User talk:Deco

From LiteratePrograms

Jump to: navigation, search

This is a page where you can leave private comments for me by simply editing the page and adding content to the bottom. I should respond in a timely manner. Feel free to ask me anything or provide any suggestions or criticism. Thanks.


Contents

LtU and WPCS

I've posted mentions of this wiki at both the WikiProject Computer science talk page, and on LtU, which will hopefully help with recruiting :-) --Allan McInnes 12:21, 2 March 2006 (PST)

Wow, thanks! I considered posting in those forums but I was concerned that it would be a little too early (considering my article and user count). I really appreciate you getting involved. Please tell me if you have any questions, suggestions, or problems. Deco 12:27, 2 March 2006 (PST)
I couldn't think of a better way to improve both the article and user count than by getting more folks involved. I think the idea speaks for itself, even if the content is a little minimal at this point. Ultimately, I foresee a nice synergy between the content here, on Wikipedia (in the WPCS project), and on the planned LtUopedia. Seems like it makes sense to get the same folks involved in all 3 projects. --Allan McInnes 12:36, 2 March 2006 (PST)
I agree - recruiting has a difficult bootstrapping problem, as people are rightfully suspicious of getting involved with projects with minimal content, but I hope the novelty of the concept (and your endorsement :-) helps. I didn't know about LtUopedia, that's interesting. I just hope my choice of license doesn't interfere too much with exchange of content with the others. Deco 12:40, 2 March 2006 (PST)
Thanks again for your advertisement - it seems well-received, with some of the first substantive edits in the sample article and several new users. I was also surprised to see people in WPCS behind it. I appreciate it. Deco 16:07, 2 March 2006 (PST)
You're welcome! I must admit, I'm a bit surprised by the rapidity of new user sign-ups. But it's good to see that others can see the potential here. --Allan McInnes 16:18, 2 March 2006 (PST)
I've also added a link back here to the External Links section of the LP wikipedia page. Thanks for the site Deco, and thanks for the LtU tip (where I saw it) Allan! lukfugl 16:33, 2 March 2006 (MST)
Thanks! I'm not sure if I deserve an external link for a site so young and undeveloped, so I'm not sure if it'll stick, but I appreciate your adding it. Deco 16:36, 2 March 2006 (PST)
FYI, we've just revised the (draft) WikiProject Computer science "manual of style" to recommend that new sample implementations be placed here on LP, and that algorithm articles provide an external link to the corresponding LP pages (if they exist). --Allan McInnes 17:14, 2 March 2006 (PST)
I'd actually recommend they link the corresponding category, such as Category:Insertion sort, if it exists (this may be what you meant). One of my goals is to avoid the maintenance overhead of list articles as much as possible. Deco 17:20, 2 March 2006 (PST)
That's certainly what I had in mind. But in thinking about your comment, I suspect I need to make the wording clearer in our guidelines. I'll do that now. --Allan McInnes 17:30, 2 March 2006 (PST)

Syntax highlighting

I notice that you're considering moving the syntax highlighting defs into MediaWiki articles. Would this also make it possible to easily add definitions for new languages? --Allan McInnes 17:09, 2 March 2006 (PST)

Yup, that's the idea. The noweb tool is already language-independent for the most part - the only things that really depend on language are syntax highlighting and the license comment header appended to source files. Deco 17:12, 2 March 2006 (PST)
Great! --Allan McInnes 17:15, 2 March 2006 (PST)

Brilliant idea

I've been thinking of starting something similar for a while. This will be a great resource. Let's make TAOCP obsolete :-) - Fredrik 17:16, 2 March 2006 (PST)

Thanks for your reassuring comments, Fredrik. I welcome any contributions or suggestions from you. Deco 17:17, 2 March 2006 (PST)

A problem that comes to mind immediately is handling of multiple programming languages. I see for example that there are already two articles on insertion sort, for C and Ruby but with essentially the same text. This is obviously going to make maintenance difficult (imagine when we have 100 languages...). Perhaps add the ability to provide any code block in multiple languages (the user chooses which one to display/download)? Fredrik 17:29, 2 March 2006 (PST)

Well, there are some subtle differences in the explanations of those articles, such as in the printing step. I'm afraid that providing "multi-language blocks" would create a situation where people avoid idiomatic code in favour of code that fits the existing prose. I think sharing information using templates could help avoid some of the redundant parts, though. Deco 17:34, 2 March 2006 (PST)

An option might be to attach language-specific notes to individual code blocks. Templates may work. (In fact, for very generic topics, you could use a full article as a template and provide per-language-page code blocks as parameters.) Experimentation to be done... Fredrik 17:39, 2 March 2006 (PST)

One problem is that right now I believe I'm feeding the raw wikitext to noweb. I really should be using wikitext with all templates fully expanded. I'll look at fixing this. Deco 18:14, 2 March 2006 (PST)
I've fixed this now so that templates can contain code and the download code tab will pick it up. I also made another couple minor fixes. Deco 01:32, 3 March 2006 (PST)

View code tab

Hi, first let me start by saying that this is a great idea for a website. I have a suggestion; why not have a view code tab at the top of an article that will simply display the code in the browser (possibly syntax highlighted), as an alternative to downloading it. I think this would be very convenient. Mike Kucera

Thanks for your encouragement! I appreciate how annoying it can be to download an archive for every change. One approach might be to just have a "code" tab viewing code on the web, with a "Download as .zip" link at the top of the page. This seems more consistent with the general UI expectations of tabs anyway. Deco 11:28, 3 March 2006 (PST)

Welcome messages

Hope you don't mind me plastering "welcome" messages over the talk pages of all of the new users. I figured that it wouldn't hurt to emulate Wikipedia in that regard, and thought it would also help to build a sense of community. --Allan McInnes (talk) 18:04, 3 March 2006 (PST)

Not a problem at all. The only thing I might change is that it'd be great if you could try to incorporate specific comments about their contributions and stated interests (even if they're only template parameters!). This helps to make the welcome feel less like spam and more like personal interest in them as a unique contributor. Deco 18:07, 3 March 2006 (PST)
Good point. I pretty much just grabbed the standard WP welcome template, and reworked it for LP. Perhaps it'd be useful to have another template that allows more personalization. OTOH, it's easy enough to add a few personal comments after the standard template message. Since many of the new users haven't made any contributions (ar stated any interests) yet, it's sort of hard to personalize those welcome messages. But I agree that I probably could have done a better job on some of them. --Allan McInnes (talk) 18:25, 3 March 2006 (PST)
Yeah, that's the tricky part. Sometimes I wait a bit to see what they create. On the other hand, some might not create anything if they're not welcomed. I'm not complaining though, any welcome is better than none and especially now making new users happy is extremely important. Thanks for helping out with this. Deco 18:27, 3 March 2006 (PST)

Scheme

Hi Deco, thanks for the welcome message and for editing! I posted right after finding out about this wiki, so I've looked at only the bare minimum of syntax I needed at that point. That's what wikis are for!

Is Scheme syntax highlighting going to be supported in the near future? In general, would it be preferrable to declare the language used even though it is not supported yet? Salimma 09:01, 4 March 2006 (PST)

Hi Salimma! Syntax highlighting expansion is something I'm looking at right now and I'll keep your request in mind. It shouldn't be too hard since we already have Lisp support. You should go ahead and declare the language, because it will work retroactively. By the way, I'd like to give Scheme warnings/errors on the code page - can you tell me which Scheme system I should set up and how to get it to process code for errors without running the code? Thanks. Deco 13:59, 4 March 2006 (PST)

Format idea

Would it be possible to give codeblocks a different background and border color then other preformatted text? That would be helpful in making codeblocks a little more obvious, for example in an article like Insertion sort (Haskell, simple).--Allan McInnes (talk) 12:53, 4 March 2006 (PST)

This is a good idea. I'd just have to do something with the style sheets and the HTML generated by codeblock tags. Hmmm. Deco 15:03, 4 March 2006 (PST)

Odd error

When bringing up the "code" page for Merge sort (Haskell) I get the following error message at the top of the page:

Warning: unlink(/tmp/litprog7642224/mergesort.hi): No such file or directory in /nr/web/literateprograms/includes/SpecialDownloadcode.php on line 340

I haven't seen this error before, so I'm assuming it's the result of one of the recent chnages you've made (perhaps involving the syntax highlighting?) --Allan McInnes (talk) 10:09, 5 March 2006 (PST)

Update: Is this possibly caused by the fact that the merge sort (and insertion sort, where the error also occurs) files don't actually generate an executable? I don't observe the same problem on Hello World (Haskell) or the markov simulator. Is there an easy fix for this? Or should I just make the relevant literate programs executable (by, say, adding some test drivers? --Allan McInnes (talk) 10:15, 5 March 2006 (PST)

Yeah, there's my lack of Haskell experience showing, I was trying to fix the appearance of .hi files for the other examples. I now delete it only if it exists. Thanks for the heads up. Deco 12:27, 5 March 2006 (PST)
That seems to have fixed things. Thanks! --Allan McInnes (talk) 14:34, 5 March 2006 (PST)

Advanced user templates

Hi, I'm not an expert in templates, and I want to implement one having the following features:

  • it's a template for a cummunity of users
  • users can put it on their page (with argument user for instance)
  • they can put it on pages maintained by the community (with argument page)
  • the text in the right-part of the box must change according to the argument (this user is part of the community of the argument is user, and this page is maintained by the community if the argument is page)
  • a page (for instance :Catergory:User:Community:community-name) has to list all the users having the template in their pages
  • and another one (for instance :Catergory:community-name) has to list all the pages having the template in it

is it easy to build? can you do it for me? or explain to me how to do this? I begun something here.

thanks - Charles 6 March 2006.

You appear to be looking for something similar to Wikipedia's Wikiprojects. You probably want to simply have two different templates, one for users and one for pages. We can generate a corresponding category of pages bearing the template in the same way the language templates do, by including the category in the template. The one thing I'd change is that, in order to keep project content as reusable as possible, it's best to put this kind of template on the talk page. Wikiprojects do so on Wikipedia.
I'm going to suggest though that we come up with a standard nomenclature and metatemplates (templates used to make other templates) for this kind of project community, for consistency and so that others can easily create new communities. I suggest we create a page LiteratePrograms:Communities, and that each community have a page LiteratePrograms:Whatever Community. We could have metatemplates Template:Community member and Template:Community article, templates for each community like Template:Whatever Community member, Template:Whatever Community article, and categories like Category:Whatever Community members and Category:Whatever Community articles. I'll look into setting some of this stuff up and get back to you. Deco 03:03, 6 March 2006 (PST)
It seems that's indeed exactly what I need.
I tried to implement this using the two templates, and finally it worked (even if it took some times to be able to see all links).
the last pending point is to be able to have a box with the content of what links here into the community page - Charles 7 March 2006.
Wow, you took care of this all nicely. It's not currently possible to transclude the contents of "What links here." However, with a category page this is unnecessary, as any page containing the category (using the syntax without the : after the [[) will already be listed in the category. Hope this helps. Deco 02:05, 8 March 2006 (PST)

New features request

First: thank you for LP.org, it's very usefull and usable. Now I think that I always waited for a tool like this one... I have two questions about new features that could enhance LP.org:

  • could be usefull to have pages with the list of available codeblocks for each language, with links to containing pages
  • could be usefull to cite codeblocks into plain text, like this for instance <<my block name>> and have it in a special syntax (like piped words in web systems), I tried to two forms in the sandbox, those citations could be present in the upper list
  • could be usefull to use blocks from other pages, using something like <<:other page#block name>>

and a last few questions:

  • do you plan to release a version of LP.org to allow people like me to install it at home or / and at work?
  • what are the requirements to be able to run it?
  • how long do you think LP.org will be online? I really think about using it for a community of scientists I belong to, but it has to be on line several years, or I have to be sure that I will be able to get our work if LP.org will be turned off.

thanks, Charles, 7 March 2006.

Hi, Charles, these are all valid questions/suggestions. To answer your questions, I will be releasing the software in the form of a patch on the most recent MediaWiki server (first I have to get my ad hoc changes cleaned up and in source control). I also will be keeping LiteratePrograms up indefinitely, as I plan to always own a server and so I will always have the means of running it. Currently I have bandwidth limitations (DSL) but after I colocate I'll have bandwidth to spare. Additionally, I will make dumps of the database available for download on a regular basis. I hope some kind people will also consider mirroring my dumps.
For your suggestions, these are a bit trickier. I like the idea of automatically converting <<these>> into links to chunks. I was also considering automatically add links to API references and that sort of thing. Links from one page to another, though, raise versioning issues: if the links always refer to the current version, changes to the other page might break things, but if they refer to a single static version they won't receive bug fixes and such. I'm leaning towards a single static version, since at least you can update the version as you please. Thanks a lot for your feedback. Deco 02:29, 7 March 2006 (PST)
Follow-up: see LiteratePrograms:Downloading LiteratePrograms source code and content. Deco 04:59, 7 March 2006 (PST)

user css/js

hi deco, thanks for the cool idea and setting up this wiki! could you

$wgAllowUserJs = true;
$wgAllowUserCss = true;

please? btw, ff is a bit unhappy about main.css, as the "center" in

#f-poweredbyico {
    float: center;
    height: 1%;
}

seems to be an illegal value. -- 04:49, 7 March 2006 (PST)

Oops. Thanks for the heads up. I'm uncertain about enabling JS and CSS due to potential security risk. Could I ask what you want to use it for? Deco 04:55, 7 March 2006 (PST)
have a look at User:D/monobook.js and User:D/monobook.css - atm i just wanted to have my familiar mediawiki-look with the search box at the top, but i have a lot of ajax-style code which would be nice to have here, too. example: watching and unwatching pages with a single click without having to reload.
the security risk depends mostly on who you make an admin: only the the user the script belongs to can modify it - and any admin. the latter should imho be forbidden.. -- 06:14, 7 March 2006 (PST)
Okay, I've enabled this. I tried to figure out how to disable editing it for admins but I couldn't find the piece of code. Hope this helps. Deco 12:04, 7 March 2006 (PST)

New background

I like the new page background! Took me a while to notice it, but I think it looks great! --Allan McInnes (talk) 16:58, 7 March 2006 (PST)

Thanks. It's made from code on the site. I had a bit of trouble making it not be so loud as to draw attention away from the important elements. If you took a while to notice it, I guess I succeeded in that. :-) Deco 16:59, 7 March 2006 (PST)

Special:Upload

Just noticed that the Special:Upload page doesn't have a checkbox for confirming lack of copyright infringement (which it should have), but does have a checkbox for "watch this page" (which seems odd). I can't see any obvious place to fix this within the MediaWiki namespace. Am I missing something, or is that a change that you have to make outside of the wiki system? --Allan McInnes (talk) 11:17, 9 March 2006 (PST)

As an aside, do you think it's worth having a specific "image license" description on the image page, as WP does? Or is the copyright checkbox sufficient, and everything assumed to be under MIT/X11? --Allan McInnes (talk) 11:19, 9 March 2006 (PST)
Actually I think this is a Wikipedia enhancement - I'm just using base stuff for uploads. After thinking about this for a bit, I think images are often integral to the discussion, so I can't really allow them under more restrictive licenses than MIT. Also, because MIT is rather strange when applied to non-textual content, I'm tempted to insist on public domain/free use for all images. Since most images that are useful on LP are diagrams created by the authors anyway, this seems entirely practical (plus there are many existing images in this category, see Category:Public domain at Commons). Deco 11:31, 9 March 2006 (PST)
That sounds reasonable. Thanks. --Allan McInnes (talk) 12:12, 9 March 2006 (PST)
Follow-up: I wrote a license tag for this and added it to both Special:Upload and to the top of every image page. I think this will get the message across and really simplify our whole image licensing story. Deco 12:20, 9 March 2006 (PST)
So I saw. I agree that simplifies things a lot - good idea! --Allan McInnes (talk) 12:23, 9 March 2006 (PST)

Template parameters

I've been experimenting with using template parameters that have default values (e.g. {{{param|default}}}) on User:Lehalle's Template:Go to the article, and failing miserably. Am I doing something wrong, or does the version of MediaWiki we're running here not support parameter defaults? --Allan McInnes (talk) 12:14, 9 March 2006 (PST)

I felt too, and I'm interested by any solution - User:Lehalle 11 March
It's possible that it's a 1.6 feature. I'd have to check. I haven't used default template parameters myself, so I'm unsure. Deco 12:16, 9 March 2006 (PST)
It appears that default parameters are a 1.6 feature. Oh well. Guess I can live without them :-) --Allan McInnes (talk) 12:22, 9 March 2006 (PST)

Programming languages snippets

Do you know http://shootout.alioth.debian.org ? --Skim 15:59, 9 March 2006 (PST)

Hi Skim. Yes, I'm familiar with the Shootout, but unfortunately I can't accept their programs without the authors' permission because they're released under the Modified BSD license, which is more restrictive than the MIT license used on LP. Thanks for the link though, and welcome again. Deco 16:52, 9 March 2006 (PST)

Maybe we could come up with our own set of benchmarks? Fredrik 15:25, 11 March 2006 (PST)

Maybe, but meaningful time measurements generally requires establishing a very specific platform for the code, and I personally prefer code that's more portable. Also, benchmarks tend to focus on performance over clarity (I think?). It's not that we can't have performance oriented snippets, but I wouldn't consider them my first priority. Deco 15:28, 11 March 2006 (PST)
Optimization often involves non-obvious solutions; it is often instructive to explain such code in detail. A category of articles that describe specific optimization tricks in specific languages might seem more "encyclopedic" (if that concept is applicable), but a category of articles describing how to optimize for a particular problem in multiple languages (and a comparison of the results) would be useful as well. Fredrik 15:40, 11 March 2006 (PST)
I guess it would be instructive to take a simple program and demonstrate some optimizations. Maybe we could take an existing article for a problem like (for example) Insertion sort (C, simple) and make an Insertion sort (C, optimized) that goes through some optimizations. That way it still fits in the problem-and-implementation framework. It could exhibit timings on a few different common platforms to demonstrate improvement. Of course, we don't want to duplicate the compiler's optimizations too much. Deco 15:55, 11 March 2006 (PST)

Ocaml Syntax

Hi, is it possible to have ocaml highlighted syntax, please? thanks, Charles.

Hey Charles. I'll look into this, and also into highlighting for related languages like Standard ML. Deco 03:33, 17 March 2006 (PST)

XML Syntax

Hi, is it possible to have XML highlighted syntax, please? (sometimes xml files are used by programs as configuration file, and anyway XML could be one of the languages of LP.org) thanks, Charles.

Sure, this would be relatively straightforward, and could be an important basis for highlighting lots of XML-based languages like XSLT, HTML, and so on. Deco 08:52, 17 March 2006 (PST)
Perhaps we could set up a "requested syntax highlighting additions" noticeboard of some kind. That way other people could become aware of requests such as this one (as well as posting new ones), and you (Deco) wouldn't be the only one on the hook to implement all of these requests. --Allan McInnes (talk) 12:53, 17 March 2006 (PST)
Sure. The first place that occurs to me is Mediawiki talk:SyntaxHighlightingRegexps. I've added a section there for this purpose. Deco 15:53, 17 March 2006 (PST)

Mail password broken?

When I try that the system sends me a new password, I get the message "Error sending mail: error_log($IP/debug.log): failed to open stream: No such file or directory". May you correct this? Thanks.

It should have worked anyway. I fixed the error message though, thanks for the heads up. Deco 14:15, 18 March 2006 (PST)
I tried again and it does not work...
You probably entered an incorrect e-mail address during your original signup (and never received the e-mail verification mail). Please give me your e-mail and user name and I'll update it. Deco 14:37, 18 March 2006 (PST)
Thanks. They are "christophe.troestler@umh.ac.be" and "ChriS" respectively
Looks like you already have the right e-mail on your account. Are you sure it's not being blocked or placed in spam mail? I forwarded you a new password mail through my ISP - if you still don't receive this, something is definitely wrong with your mail. If it doesn't work, don't click it again, just tell me and I'll contact you in some other manner with the new password. Deco 15:32, 18 March 2006 (PST)

LaTeX problem

I've started getting a Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert) error on pages that use embedded LaTeX (such as Category:Fibonacci_numbers). Perhaps a symptom of the shift to the new 1U server? --Allan McInnes (talk) 09:15, 3 April 2006 (PDT)

Yup. I already fixed it. If you spot a page that still has it left over just make an edit. Deco 09:19, 3 April 2006 (PDT)
Hmm, I see that didn't work. Odd. Deco 10:00, 3 April 2006 (PDT)
Aha. It uses AMS markup, which requires the AMS style files included in the "tetex-extra" package. Installed this package and it's happy now. Deco 10:13, 3 April 2006 (PDT)
I was going to report this problem, but you fixed it before I had a chance :-) --Allan McInnes (talk) 11:54, 3 April 2006 (PDT)

View source on web

The svn webserver link here seems to be broken - I get a 404 error every time I click on it. --Allan McInnes (talk) 08:26, 6 April 2006 (PDT)

Yeah, I haven't migrated that to the new server yet. I'll take a look at it as soon as I have a chance. If there's anything in particular you need I can get it for you. Deco 11:52, 6 April 2006 (PDT)
I didn't actually need anything. Just happened to click on the link, and wanted to make sure that you knew it was broken. --Allan McInnes (talk) 12:07, 6 April 2006 (PDT)

CTM Wiki

A bit of a heads-up for you...

I brought up the possibility of using the LP engine for the CTM Wiki with some of the guys responsible for it. The syntax highlighting and literate programming capabilities you've developed seem like a good fit for what they're doing over there. The CTM Wiki folks seemed interested, so it's possible that Dominic Fox will contact you at some point (if he hasn't already) to discuss the mechanics of migrating an existing MediaWiki site to the LP engine. --Allan McInnes (talk) 12:12, 6 April 2006 (PDT)

Cool. Actually, the nice part is, if it's already a Mediawiki site the migration effort would mostly consist of adding suitable codeblock tags and noweb syntax, quite minimal, and it could be done in an incremental manner. Thanks for suggesting the idea. Deco 20:07, 6 April 2006 (PDT)

Possibility to view usercount / logged in users

Hi Deco

I'm not sure if this is possible in mediawiki allready but I think a special page where you can se what users are logged in, or atleast a usercount (number of users logged in) page would be quite nice. Actually I think some sort of statistic simmilar to the phpbb2 forum - kind of like this:

In total there is <number> user online :: <number> Registered, <number> Guest(s) Most users ever online was <number> on <date> Registered Users: <user1>, <user2> ... etc

Perhaps not the most usefull suggestion but I think it would be a quite cool feature ;)

Waxhead 15:05, 21 April 2006 (PDT)

This is kinda tricky, since on the web a lot of people will just close their browser window without logging off. You could guess when they're gone based on the time since they last loaded a page or whatever, but it's still a poorly-defined sort of notion. In terms of a way of finding other users who are online at the same time as you, it might be cool to have a list of users (including anonymous IPs) sorted by how recent their last edit was. Something like Special:Active editors.
In terms of actually inspecting site activity, I'm going to set up some Webalizer traffic reports, so that'll give more useful long-term info. I hope this vaguely addresses whatever you were hoping to accomplish with this suggestion. Deco 16:55, 21 April 2006 (PDT)

Additions of PD code

I hope this kind of "code dumping" is OK. It's not very "literate", but I believe in the eventualist approach. Sorry for not creating proper categories; I had to go offline abruptly. Fredrik 02:59, 24 April 2006 (PDT)

No problem, Fredrik, I'm thrilled to see these additions (and in a very interesting area). As a self-proclaimed inclusionist I'm happy to obtain any content that useful articles can be derived from. I'm hoping to help add some prose after reading the necessary papers. Deco 03:03, 24 April 2006 (PDT)

Copyright notice

Hi, when inserting the copyright/license note in the downloaded file, the shebang on the first line is moved down after the notice. Then it will obviously not work as intended, and the user has to either edit the downloaded file or specify the interpreter on the command line. Is it possible to make it so that if the first line starts with "!, the notice is inserted after the first line? Ahy1 05:32, 6 May 2006 (PDT)

Oops, you're correct of course. I'll make sure I fix this. Deco 17:12, 6 May 2006 (PDT)
Fixed! Deco 01:39, 7 May 2006 (PDT)
Thanks for the quick fix! Ahy1 02:45, 7 May 2006 (PDT)

Splitting things up

I was going to ask - is it possible to split code across several articles where code from one article has dependencies on other articles? Is there a way to reference the appropriate code so it gets pulled into the downloaded package? I was thinking about breaking things up, but I wasn't sure how to do that in practice. I have QR stuff semi-complete, and of course it relies on the matrix class, and the matrix class, in turn, relies on QR for eigenvalues (which I'm still working on). I had sort of resigned myself to one huge article and redirects on QR decomposition (Eiffel) etc. but if there's a better way to handle interdependent code I'm all ears. Leland McInnes 03:46, 12 May 2006 (PDT)

This is a good question that comes up continually. I'm a little nervous about the idea, for a few important reasons:
  • Dependencies between articles can make changes more dangerous and complicated, causing changes to one article to possibly introduce breaks in dependent articles.
  • Small, self-contained articles are easier to work into many different projects without significant disruption or "baggage" coming with them, unlike many libraries.
  • Articles that are completely self-contained are easier to understand from a pedagogical viewpoint.
The current alternative, though, which is basically forking, has its own set of problems. I think some kind of mechanism for explicitly adding and tracking dependencies of an article will become necessary, but will have to remain discouraged. There would probably be a new tag for it and a new toolbox link that says "show dependencies" that gives you dependency trees (both depends-on and required-by).
I would not advise merging articles on topics that really deserve their own separate articles for implementation reasons — although I find it hard to explain why I feel strongly about this, I think the main reason is that keeping articles at a fine granularity makes it easier to keep related articles on a single topic similar, to eliminate redundancy, and to hold an impatient reader's attention span.
Meanwhile, until I get around to implementing something appropriate, I recommend you just duplicate some of the content. For example, in Quicksort (C) I duplicated the code for insertion sort, but without any commentary, just a link and a code dump. This keeps the focus on the main topic. Deco 04:18, 12 May 2006 (PDT)

Eiffel/noweb interaction

Well, I guess this was bound to happen sooner or later... it seems that Eiffel uses << ... >> to represent literal arrays. Needless to say, this produces something of a conflict with noweb. I've tried to adjust the syntax highlighting regexps for Eiffel so that chunk identifiers must appear on a line by themselves (which I'm hoping literal arrays are unlikely to do). This seems to have partially worked, but hasn't solved all of the problems. The noweb processing step still detects the << ... >> and tries to treat it as a chunk. This produces errors on the download-code tab (see Real matrix (Eiffel) for an example). There's also some interference code you have to hyperlink chunks names, since that also picks up on the literal arrays. --Allan McInnes (talk) 12:05, 13 May 2006 (PDT)

I ran into this with the sort routines. My solution there was to split the manifest array over 2 lines: Eiffel ignores the line break, but noweb fails to see << and >> on the same line and treats them as literals. It's a little bit of a kludge, especially if you have small arrays, but it might be the simplest solution. See Quicksort (Eiffel)#Testing for an example. Leland McInnes 12:24, 13 May 2006 (PDT)
I'm afraid I don't have a great solution for this - sometimes chunks can't go on a line by themselves, as in Lisp programs. I'd like to support Eiffel code dumps without modification, but it seems to be just about the only language with this problem, with the possible exception of certain rare C/C++ expressions. Is Leland's workaround sufficient for you? I'm afraid the regular expressions will only affect syntax highlighting. Deco 12:34, 13 May 2006 (PDT)
Leland's workaround is fine with me (after all, he's pretty much the only one adding Eiffel code ATM). I had a feeling there probably wouldn't be an easy fix, but thought I should at least make you aware that it is an issue. I will modify the regexps to work with the line-split workaround. --Allan McInnes (talk) 13:22, 13 May 2006 (PDT)

Maintenance

Today seems to have been a "maintenance day" :-) --Allan McInnes (talk) 19:58, 14 May 2006 (PDT)

So I see. :-) Adding new content is always exciting, but as on any wiki it's the maintainers who keep quality up. I appreciate your effort. I hope though that I'll find a way to help automate this kind of thing in the future though - I know as well as anyone that making hundreds of little changes to many pages is no fun. Deco 20:20, 14 May 2006 (PDT)
Ahy1 deserves some of the credit too. In fact, it was his series of edits to the articles in Category:Hello World that inspired me to fix up some of the other categories. The "maintenance day" comment was also made in referenc to your deletion of the ChucK "hello world" article - looks like all of us were doing some maintenance... --Allan McInnes (talk) 20:34, 14 May 2006 (PDT)

Using LP.org technology in other wiki

Hi. I'm very impressed with your job at LP.org. I'm CTO at a software development here in México and I'm trying to integrate the literate programming techniques to our dayly work. We develop mainly on Perl, Javascript, HTML and CSS and we also have MediaWiki serving as our knowledge base. My question would then be (and I hope it doesn't sound naive) "can we download/install your technology in our server for internal documentation?", it is just maybe what we're looking for!!

Best regards.

Julián

Hi there, Julián! I don't currently make archives of the source code available, but you can check them out using Subversion according to the instructions at LiteratePrograms:Downloading LiteratePrograms source code and content. If you need an archive of the source code just drop me a line and I'll put something up for you. My code is derived from the Mediawiki server - at the moment I'm missing a few recent updates but will integrate these soon. All the code is released under the GPL. Deco 12:57, 16 May 2006 (PDT)
Just did that and we're up and running! Thanks a lot.--15:17, 18 May 2006 (PDT)

Refactoring Pages

Hi, I just discovered Literateprograms.org and in a flash of mad creativity wrote a second version of Hello World (Java). Unfortunately, I think the title I gave my effort "HelloWorld Java 2" was wrong and didn't fit the naming conventions of the site. So I created "Hello World 2 (Java)" and copied the text over. Can you delete "HelloWorld Java 2" to tidy up?

Thanks

Chris Jobling

Hi there. I suggest you just overwrite the original article - it was minimal and the only extra thing it had was the for loop, which arguably isn't even part of a normal Hello World program. In any case I don't particularly like the idea of assigning arbitrary numbers to articles, so if this doesn't work out I'll try to come up with a new name. Nevertheless I welcome you and your contribution, good stuff! Please stay and write some more. :-) Deco 06:49, 28 May 2006 (PDT)
I've deleted "Hello World Java 2" (incidentally, in the future it might be better to "move" - using the move tab at the top of the page - any articles you think you've misnamed). After looking through the current version of "Hello World 2 (Java)" I agree with Deco that it might be better to simply move all of that content into the original Java hello world article. Failing that, a new name (rather than a number) might be nice. Preferably something that establishes what makes this article different than than regular Java hello world. But really, I'd prefer to just see a merge. --Allan McInnes (talk) 16:24, 28 May 2006 (PDT)
Allow me to also add my welcome to Deco's! --Allan McInnes (talk) 16:25, 28 May 2006 (PDT)


Thanks for the warm welcome guys. I have taken your suggestion and merged "Hello World 2 (Java)" with the original Hello World (Java). I guess that means that "Hello World 2 (Java)" can now be removed. It has lost the for loop, but I guess that's ok.

Thanks also for the tip on "move", I hadn't spotted that one!

Cpjobling 18:30, 28 May 2006 (PDT)

I've gone ahead and deleted "Hello World 2 (Java)". --Allan McInnes (talk) 22:00, 31 May 2006 (PDT)

Matlab file for LP.org

I just uploaded a Matlab file which convert any Matlab program into something that can be copied-and-pasted into LP.org. I called it Ocamaweb2. It could be usefull to have something more generic (not written in Matlab, but in an open source and multi platform language) like this. It should be parametrized for each language (according to the comment marks). I suggest to keep the comment tags the same - Lehalle

Hi Lehalle. That's a really neat idea. It could be a great starting point for conversion of existing programs, and could even be built into the server. I'm not very familiar with Matlab though, so it might take a bit for me to figure out your implementation. Thanks again. Deco 14:43, 30 May 2006 (PDT)


I'm not specially proud of my code (made in 4 hours...) but if you could guess the comment tags I use in my files, it could be a good start to implement a more generic version. I promised to a lot of OCAMAWEB users to upgrade it soon (more that 2 years without a new version...), I will try to include an 'export to LP.org' feature in it. In fact, I will include a feature called 'export to another literate programming tool'. It was my initial goal about Ocamaweb: to write a program to convert any file to its literate programming version, but finally it seems easier (for Ocamaweb users) to use only one program. It works quite simply: you include tags into your comments (for matlab, it's %% or %<, but Ocamaweb has a configuration file, so for awk it is ## or #<) to mark begining of blocks of code. All comments that follow immediately the line which begin the block of code are the block comment (the comment mark is removed and they will be interpreted at text). There is also a tag for ending blocks of code (it's %>, the blocks which begin by %% automatically end at the next %%), you can find a simple example here, and on the sample page the ocamaweb2_original.m file is itself commented this way...

My next step (I never performed it), should be to design a program which will automatically include Ocamaweb marks into a code...

Lehalle

Duplicate categories

We appear to have both Category:Programming language:JavaScript and Category:Programming language:Javascript (note the lower case 's'). Since the existing JS articles seem to show up in both categories I'm not even sure if this is a problem. But it does seem odd to have duplication like this. What do you think? --Allan McInnes (talk) 21:59, 31 May 2006 (PDT)

Hi Allan. Thanks for the heads-up. I just converted the incorrect one to a redirect, which seems to work in this case. Deco 22:33, 31 May 2006 (PDT)

wikistats

Is it possible to have a LP.org entry in the wikipedia statistics?. Lehalle

Hi Lehalle. I'm sorry is you felt misled, but LP is not affiliated with the Mediawiki Foundation or any of its projects, including Wikipedia, although there's quite a bit of crosslinking (all via external links only) and sharing of members. As such, I have no control over the Wikipedia statistics site and I don't think it'd be appropriate to list LP there, unless the Foundation decided to acquire it. Deco 13:41, 1 June 2006 (PDT)

No problem, it seems that I am naive about all those wikipedia stuff... But is it possible to have such statistics? Lehalle 13:50, 1 June 2006 (PDT)

Definitely - in fact, the scripts are available for free. Only catch is that the data wouldn't be quite as interesting, because we've only been up for a few months instead of years, and we only have one site instead of a zillion. But I'll take a look at it - it would provide an interesting comparison with the Mediawiki projects. Deco 13:55, 1 June 2006 (PDT)

Have you historical statistics for the hits on articles? because it seems that there have been an acceleration weeks ago. Lehalle

Recent moves

I was looking at all of the "Insertion sort (language X, simple)" entries earlier today, and thinking that they should be moved. I was going to bring it up with you sometime in the next few days, but it looks like you beat me to it :-) --Allan McInnes (talk) 19:12, 2 June 2006 (PDT)

Yeah, as you can remember it was the first article. I was sort of overcategorizing as a theoretical demonstration of how articles on the same topic and in the same language with different implementations could be split into different articles. In reflection I don't think this was such a useful idea, but everybody copied me. :-) Deco 19:29, 2 June 2006 (PDT)
On the same topic, the article naming discussion in LiteratePrograms:How to write an article still suggests the "Insertion sort (language X, simple)" style. Should we change that guidance too, or do you think there still may be cases where its warranted? --Allan McInnes (talk) 22:08, 2 June 2006 (PDT)
I think I'll keep it. The reasons for having separate articles for separate programming languages - because a person might know some languages and not others, might only be interested in an implementation in one language, or because different languages require fundamentally different program structure - seem like they could apply to two very different implementations in the same language as well. The benefit of a single article is that context established in the first implementation can be leveraged in the second. I think it'll have to be a case by case thing, but in the footsteps of Wikipedia I'm going to disfavor pre-emptive disambiguation. Deco 22:15, 2 June 2006 (PDT)

A LP.org poster?

May be we could have a LP.org poster for academics who want to put it universities. It could promote LP.org to students and other academics, with a clear desciption of the download code tab. For instance here is a french poster for wikipedia (too long, one page could be enough for a poster). - Lehalle 09:27, 9 June 2006 (PDT)

That's an interesting idea. I hadn't really thought about offline advertising. Unfortunately I'm also finding it difficult to imagine how to make literate programming visually exciting. It might help to emphasize the use of tables, section headers, and diagrams to complement the embedded code. Also, as you say, the "download code" tab should be emphasized, which is our "big thing" in the same way "edit this page" was Wikipedia's big thing. Makes me wish I were a better graphical designer. :-) Deco 09:41, 9 June 2006 (PDT)

Moving/renaming categories

I cannot find a "move" link in the categories. Is moving only available for articles? Ahy1 02:49, 10 June 2006 (PDT)

Afraid so. This is something that would require software changes, and I think it's on Mediawiki's bug list somewhere but not high priority. The workaround is to copy paste the content and delete the old category. Deco 02:52, 10 June 2006 (PDT)

the new 'download code' button

It's a good idea to have a new 'download code' button at the bottom of the pages, but it is really ugly... Could it be possible to have some with a border and quite the same aspect as the top tabs? - Lehalle

I agree that it's ugly. Maybe a border would help. I'll try it. Deco 11:50, 13 June 2006 (PDT)
may be putting it with a border, in small font, and at the right of the page could be better... Lehalle
Well, I wanted to make sure it's clearly visible, that's the primary reason I added it. Not enough people were visiting the download code page. I don't want it to look garish though. I'd like to look at more options first. Deco 02:14, 14 June 2006 (PDT)
or a very large bar at the bottom of the page, like:
Download code
Hey Lehalle. I've modified the code to make this message accessible for editing at MediaWiki:Downloadcodebottom and modified it to something a little prettier. Feel free to try any other changes you want. Deco 20:14, 14 June 2006 (PDT)
thanks a lot and good idea - Lehalle

Some advertising, Wikimedia

This is a very neat idea. I've just posted about it on the mailing lists for Wikibooks and Wikipedia. I've also submitted a story to Slashdot, but they have a 99.9% rejection rate. [UPD: rejected - probably better for your server ;-)] Have you considered proposing this as an official Wikimedia project?--Erik Möller 20:11, 18 June 2006 (PDT)

sorry, I rollbacked this section by mistake Lehalle 05:37, 19 June 2006 (PDT)
Thanks, Erik! It can be difficult for me to get attention for the project without causing a negative reaction, and I appreciate your support. You should write some code yourself. :-) I originally proposed something somewhat like LP as a Wikimedia project, then a Wikicities project, but the interested parties didn't seem to understand the crucial differences between LP and an ordinary "programming wiki", and they were not willing to consider a license as liberal as the MIT License, which is important to me. I don't mind remaining unaffiliated, at least as long as I can afford the traffic. Deco 06:50, 19 June 2006 (PDT)
I actually agree with you on the licensing -- I put all my contributions to MediaWiki in the public domain, because I don't support the notion that freedom needs to be protected through coercion. When we launched Wikinews, I made a very strong case initially that the content has to be in the public domain, and we ended up migrating it to CC-BY (in part because of the legal complexity of the public domain). So there is a precedent in Wikimedia for projects without copyleft or the GFDL.
I probably won't find time to contribute here, but I'd be happy to help you through the process if you decide you want to take it to Wikimedia. Feel free to contact me at User:Eloquence any time.--Erik Möller 08:22, 19 June 2006 (PDT)

FYI: Ryan524 has proposed a new wikimedia project called WikiCode here. And imho nits looking pretty good :). greetings--Kajk 08:34, 1 January 2007 (PST)

Formatting of Code

There seems to be a few problems with the processing of code from noweb. My recollection of using noweb on plain text files is that indentation if preserved so that is we have:

public static void main(String[] args) {
   body of main method
}

and a chunk:

<<body of main method>>=
for (int i = 0; i < 10; i++) {
    System.out.println(i);
}

the result would be

public static void main(String[] args) {
   for (int i = 0; i < 10; i++) {
       System.out.println(i);
   }
}

This doesn't seem to be the case with the wiki. For example in the code tangled from Basic constructs (Java), the braces don't align properly and the code looks incorrect (even though it isn't). I don't know if this is a bug or not, and I note that other authors (e.g. for Basic constructs (C)) add indentation to the chunks rather than indenting the placeholders. Cpjobling 06:16, 30 June 2006 (PDT)

The reason for this is because of how noweb performs indention of chunks - it uses a mixture of spaces and tabs depending on the length, and this renders differently in different viewers. Tabs can't be eliminated altogether due to their significance in certain languages. I think the best solution is to just copy the spaces before the chunk name - I have to make a fork of noweb to do this. Deco 09:24, 30 June 2006 (PDT)

InterWiki links

Are interwiki links implemented on this wiki? I often find myself linking to Wikipedia but the expected inter-wiki link Wikipedia:99 Bottles of Beer doesn't work and I end up having to use 99 Bottles of Beer. I thought this would be standard in a MediaWiki wiki! Cpjobling 07:26, 1 July 2006 (PDT)

Nope. I was considering adding an interwiki syntax for linking to Wikipedia, but currently decided against it in order to avoid creating the impression that the site is affiliated with Wikipedia. It's not a standard Mediawiki thing. Good question though. Deco 19:46, 4 July 2006 (PDT)

footnotes

could it be possible to have footnotes as in wikipedia? Lehalle 00:47, 18 August 2006 (PDT)

I think the <ref> syntax should also work here. If not, it probably will after the next integration of MediaWiki. Deco 14:53, 29 August 2006 (PDT)

LOL

  • I AM AN OPEN PROXY, PLEASE BLOCK ME NOW!--85.195.119.22 19:58, 2 September 2006 (PDT)LOL

Question about Median Cut

I've posted a question on the Median Cut Discussion page.Davecotter 11:15, 13 September 2006 (PDT)

Syntax highlighting for R

is it possible to have Syntax highlighting for the R language? regards - Lehalle

Hi, Lehalle, it certainly is. Unfortunately I would be ill-equipped to do so with no knowledge of its syntax. Could you supply a reference, ideally a comprehensive standard one, for its syntax? Thanks. Deco 12:21, 7 November 2006 (PST)
This section of the R manual would seem to be what we need (if you scroll down a bit, the "expressions" covers things like reserved words). Unfortunately, I don't have the time to mess with adding another syntax right now, but I'll try to get to it at some point in the next month or two, assuming someone else doesn't beat me to it. --Allan McInnes (talk) 21:22, 8 November 2006 (PST)

May be it could help to read some of the ESS-mode of emacs. Here are some (possible interesting) pieces of codes:

<<semantic-r.el>>=
(defvar semantic-toplevel-r-bovine-table
  nil
  "Table for use with semantic for parsing R.")

(defvar semantic-r-keyword-table
  (semantic-flex-make-keyword-table 
   `( ("..." . VARARGS)
      ("<-" . ASSIGNMENT)
      ("_" . ASSIGNMENT2)
      ("$" . DOLLAR)
      ("<<-" . ENVASSIGNMENT)
      ("try" . TRY)
      ("while" . WHILE)
      ("library" . LIBRARY)
      ("source" . SOURCE)
      ("require" . REQUIRE)
      )
   '(
     ("<-" summary "assignment of closure")
     ("_" summary "assignment of closure")
     ("try" summary "try {<stmts>} [catch(<parm>) {<stmts>} ...] [finally {<stmts>}]")
     ("while" summary "while (<expr>) <closure>;")
     ("library" summary "library(packagename)")
     ("source" summary "source()")
     ("require" summary "require(packagename)")
     ))
  "Keyword table for use with semantic for parsing R.")

(defvar semantic-default-r-setup 
  nil
  " test .")

hope that it can help; regards - Lehalle


I dont if know if can wrote u here, but i need how use the program quine-mccluskey: http://en.literateprograms.org/Quine-McCluskey_algorithm_(Java)#chunk%20use:vastianos_example_1.3.txt%20use:vastianos_example_1.3.txt i try run but java show me: Exception in thread "main" java.lang.NoSuchMethodError:main how induce the trem to simpli.....

THANKS!!!!!! luis Zamudio

Quine-McCluskey_algorithm_(Java)

I dont if know if can wrote u here, but i need how use the program quine-mccluskey: http://en.literateprograms.org/Quine-McCluskey_algorithm_(Java)#chunk%20use:vastianos_example_1.3.txt%20use:vastianos_example_1.3.txt

i try run but java show me: Exception in thread "main" java.lang.NoSuchMethodError:main

how induce the trem to simpli.....

THANKS!!!!!! luis Zamudio

Sure. Click Download code, click zip to download all the files, extract this archive, then run:
javac *.java
java Formula input_example.txt
You will require version 1.5 of the Java 2 Platform. Tell me if you encounter any further trouble. Deco 17:48, 15 November 2006 (PST)

Account renaming

Thanks! I'm standardizing my Wiki account names - 'Salimma' just sounds wrong because of the capitalization. Could I get 'VerusHircus' instead?

hircus 09:30, 17 November 2006 (PST)

Go ahead and sign up for the new user, redirect your old user page and talk page to that user, and then I'll reassign your old edits to the new user. Deco 13:53, 17 November 2006 (PST)
I redirected the old user and talk pages, but would it be possible to transfer the edit histories for the old talk page to the new one? If I just cut-and-paste them it will appear as if I wrote the entire thing. Thanks! hircus 21:19, 17 November 2006 (PST)

Installing lpwiki

Hi, I hit a snag when attempting to install the Literate Programs wiki. I grabbed the latest from the SVN, set up a database, started the wiki and went through the mediawiki installation. No problems so far. Media wiki starts up and there's a download programs link on the home page which talks to noweb. Unfortunately, when I go to login as administrator (to import the latest lpwiki database dump) I hit a snag.

It seems that the lpwiki code is patched to assume installation at DocumentRoot "/" rather than somewhere else. So URLs for the Login page, presumably the other wiki pages and special pages, and redirects don't work. My installation's URL prefix is /~eechris/lpwiki and this seems to have been set properly in the mediawiki's installation properties file (I forget the exact name of the PHP variable for this). However the prefix seems to be ignored by lpwiki when generating links. Thus Login or register is rendered as http://localhost/Special:UserLogin rather than http://localhost/~eechris/lpwiki/Special:UserLogin and the server returns a 404 error.

If I navigate directly to http://localhost/~eechris/lpwiki/Special:UserLogin, I get the login page which works, but the redirect omits the /~eechris/lpwiki prefix and a 404 results again!

Is there a simple fix for this?

I had no trouble with mediawiki, which is happy to live wherever I put it, so I wonder if there's been a slight fork here.

Cpjobling 12:42, 7 February 2007 (PST)

Sorry for the trouble. I use a Mediawiki customization for short URLs that requires an Apache configuration change for URL rewriting. I ought to have documented this somewhere but I didn't. I had to change a small piece of Mediawiki code somewhere to make this work and this broke your setup. I'll find the piece of code shortly and get back to you. Deco 15:24, 11 February 2007 (PST)
The relevant change is in Title.php:
===================================================================
--- Title.php   (revision 1)
+++ Title.php   (revision 2)
@@ -778,7 +778,7 @@
                        if ( $query == '-' ) {
                                $query = '';
                        }
-                       $url = "{$wgScript}?title={$dbkey}&{$query}";
+                       $url = "/{$dbkey}?{$query}";
                }

                if ($action == 'render')
You'll need to reverse this change to use it with standard URLs. Will mail you this info as well. 131.107.0.73 16:11, 23 February 2007 (PST)
I've made changes to LocalSettings.php and Title.php that will enable LP to work easily out of the box on Apache - just comment out the set of settings near "$wgVeryShortUrls = true;" and uncomment the set of settings near "$wgVeryShortUrls = false;". I've tested both configurations and added explanatory comments. Checking in now. Deco 11:36, 24 February 2007 (PST)

Images display

Hi Deco,
I have a problem to display the images I upload, see for instance Image:Arrangement-min-lines.png. I found that I am not the only one in this situation. What can I do? Lehalle

Hi Lehalle. This is probably a Mediawiki problem and I'll take another look at it after integrating the latest version. Sorry for the slow response. Deco 18:01, 4 May 2007 (PDT)

History of LP wiki

Hi, I'm currently researching the history of literate programs and wikipedia. I have found enough information behind the history of literate programming and wikipedia as two seperate topics but cannot find any information on how this literate programs wiki started. I would like to know who created it, what influenced them to create it and when it was created. Any information would be much appreciated. You can email me at 322398@swan.ac.uk or just respond here.

Hi, sorry for the slow response. LiteratePrograms wiki has a relatively short and uninteresting history. I'm a long-time contributor to the English Wikipedia, and in particular to the articles on sorting algorithms, which had an unfortunate habit of developing long lists of implementations in many different languages, most of which were not useful to the point of the article. I moved most of them into separate articles, which were later deleted as being out of scope. I also noticed that people had an annoying habit of "fixing" code by making small changes that caused it to not work, or not even build. I wanted to exploit this inexplicable energy people have for adding implementations by creating a code wiki, but without the disadvantages of fragility and constricted layout.
Originally I tried to start a wiki at Wikia for this purpose (then Wikicities), but was denied on the basis of other existing code wikis at Wikia, and also disagreements of license (they force GFDL, which I strongly believe is not appropriate for code). So, I got the idea to exploit literate programming, which I had experimented with in the past (see for example this article on my personal web site) to deal with these issues in a clever way. I modified a Mediawiki server for the purpose and put it up on my own web server at home. I advertised it in a couple relevant places on Wikipedia and some interested people posted it to LambdaTheUltimate, whence it got most of its attention. More recently there's been a push to get it made into an official Wikimedia Foundation project and discussion on the foundation-l mailing list regarding that. Still don't know what will happen. Deco 18:15, 4 May 2007 (PDT)
See [1] for recent discussion, including a comment that "LiteratePrograms already exists, support that. Making a new wiki would be a textbook example of the NIH syndrome." (!) In my opinion it would be really good if this project could be moved to WikiMedia servers. -- Coffee2theorems 14:52, 8 August 2007 (PDT)

User Question

Look: this is really cool, but at one level, its *heavyweight* -isn't there some lightweight way to add this functionality into base MediaWiki so I can run a small, checked-out-of-svn code tree, and have syntax highlighting and begin to move it into a literate programming web style as-I-go? -ggm

The syntax highlighting is already integrated with Mediawiki and just needs an effective caching scheme. I plan to integrate noweb-like functionality directly into Mediawiki as well instead of externally invoking it, which will make this much more efficient, and to cache its results as well. The test compilation step is probably too heavyweight to scale, but it could be removed. Also, my scheme was intended more for small isolated programs rather than an entire tree of connected code. Deco 18:05, 4 May 2007 (PDT)

Reimplementation of noweb into Mediawiki 1.10.x

Hi Deco! Derek showed me how LP could be used to translate POT/PO-files - see PO-file discussion. I see from this page that you are planning to include noweb functionality directly into LP/Mediawiki - or as a Mediawiki extension? I would like to see this functionality as soon as possible, as it would lower the barriers to set up LP and make coding and translating that much easier because you can discuss context and so on using only a browser. If you need someone to test it, please send me note. Cheers, Haakon

I will, thanks for your interest. I have to complete the integration of Mediawiki 1.10.x first, but that's coming very soon. Deco 15:04, 21 May 2007 (PDT)
Great! Haakon 23:09, 21 May 2007 (PDT)
What if LP could be self-hosting, in stead of using Subversion? Maybe LP would be translated more easily too? The proof of the pudding is in the eating... :-) Haakon 03:01, 18 June 2007 (PDT)

Bug in Quine-McCluskey code?

I've downloaded and tried your Quine-McCluskey code and it works perfectly except for one mysterious case. "a&b | c&!b | a&c" is not minimized, but should be minimized to "a&b | c&!b". Is this a bug?


Naming issued

I do not understand the nameing stuff. For Insertion Sort e.g in the top of the C page one sees other immplentation and there is an Io solution also, but on the Smalltalk page is no Io entry. some pages have a move tab at the top but not in Category:Programming languages:IO e.g

I found that the correct name should be Io instead of IO. I created a new page but have not idea on how to get rid of the old one. Help would be appreciated.

Regards Frido

I believe that the kinds of changes you are interested in making can only be made to Category pages if your account has administrative privileges (which regular users do not have). I have deleted Category:Programming language:IO for you. You should see only Category:Programming language:Io now. Hope that takes care of your concerns. --Allan McInnes (talk) 22:45, 20 June 2007 (PDT)

Well yes, thanks. User:Frido)

Thanks for taking care of this, Allan. I'm too slow. :-) Deco 14:21, 22 June 2007 (PDT)
No problem :-) --Allan McInnes (talk) 17:50, 22 June 2007 (PDT)

Syntax highlighting with CSS?

I just wanted to notice you of my comment on MediaWiki talk:SyntaxHighlightingStylesheet. --Ce 10:17, 29 June 2007 (PDT)

Sub pages

Hi, is it possible to activate sub page functionality on the main namespace? It would also be nice if code from sub pages of an article is included in the downloaded archive (Perhaps in a sub-directory). Ahy1 04:40, 4 August 2007 (PDT)

Sure, I can do that. You can include code from subpages currently using the reference mechanism, but I'd have to formally enable subpages to get the automatic backlinks. Will do this soon. Deco 20:52, 12 August 2007 (PDT)

databasedumps

Hi Deco,

I think the site is excellent and was looking at the databasedumps - there may be a problem with your script as the dumps do not seem to have any content :(

Thanks again (25 October, 2007)

I'll take a look at this, there may be a problem, sorry! Deco 17:12, 27 November 2007 (PST)

User list

There appear to be a large number of machine-generated users in the user list, one of which has just been used by the current active spammer. -- Derek Ross | Talk 12:37, 9 November 2007 (PST)

I see - likely the result of an attack. Unfortunately there's no simple way to automatically distinguish them from legitimate users, so the best we can do is just manually block them all. Thanks a lot for your help in reverting spam and apologies for the slow response. :-) Deco 17:16, 27 November 2007 (PST)


Problem with rbtree

Hi, I have a problem with your rbtree lib, if I replace the main of "testmain.c" with this function, the program has a bug : the root (20) is not black.

   int main() {
   rbtree t = rbtree_create();
   print_tree(t);
   
   int x = 10;
   printf("Inserting %d -> %d\n\n", x, x);
   rbtree_insert(t, (void*)x, (void*)x, compare_int);
   print_tree(t);
   x = 20;
   printf("Inserting %d -> %d\n\n", x, x);
   rbtree_insert(t, (void*)x, (void*)x, compare_int);
   print_tree(t);
   
   x = 10;
   printf("Deleting key %d\n\n", x);
   rbtree_delete(t, (void*)x, compare_int);
   print_tree(t);
   return 0;
   }

Is it a problem of your lib or an use problem ? Thank you.

Bug in "@@" interpretation

It currently interprete "@@" differently between the document and its corresponding download code page. See,

--Ans 06:02, 21 January 2008 (PST)

good anti-spam suggestion

Deco, I just got a note on my talk page suggesting a solution to our ongoing spam problem. To quote:

I notice you've been having problems with spambots. SNPedia used to have the same problem, but the recaptcha mediawiki extension fixed the problem quickly. cariaso. http://recaptcha.net/plugins/mediawiki/

I had a look at it and I think it would actually work pretty well against spam. It only brings up a captcha for "dangerous" edits so it shouldn't impact ordinary editors much. I'd recommend that you consider it. -- Derek Ross | Talk 18:56, 11 March 2008 (PDT)

LP: status and plans for the future?

Hello, a colleague fan of nuweb just discovered your tool and showed it to me.
This is a very interesting project!
Actually I started to do something similar but at a much smaller scale:
A Mediawiki extension to regroup several snippets of code from a wikipage and have a way to download it directly as a file. The difference is that for now you cannot reorder the snippets but you can have several files on one wiki page.
The code of the extension itself is written in LP-style, cf http://www.mediawiki.org/wiki/Extension:RawFile

But all that is very modest, more a proof-of-concept than anything else.

I saw you're running Mediawiki 1.6 and I saw some discussions about migrating to 1.10.
I had a look at your code but I actually got the whole Mediawiki software so it's hard for me to evaluate what part is your LP code.
Do you have plans to upgrade to MW 1.12?
Now with the hooks provided by MW 1.12 do you thing this could become a real MW extension?
My guess is that it would help a lot the adoption, just by publishing your LP extension on Mediawiki extensions page.

Personally I didn't try to implement the syntax highlighting myself but I'm using the GeSHi enxtension so I got support for 89 languages for free :-)

What's your own plans for the future?
I'd be happy to help you.
--User:PhilippeTeuwen 2008-06-10

Sorry for the slow response. My extension is primarily based on external invocation of the noweb tool, preceded by an in-PHP parsing phase that extracts the code blocks and writes them to a noweb input file. It then inserts the license header using the correct comment syntax for the language and invokes some external compiler tools on the result to check for compiler warnings/errors, for some types of files. GeSHi is nice and wasn't around back then. I like the LP wiki concept, but don't think I'll have time to maintain and upgrade it by myself, in light of its stagnated contributions. I've seen some extensions on Commons of comparable complexity, so perhaps it is possible to implement as an extension. This would've generated more interest as a Mediawiki Foundation project, but there are licensing issues (they're very pro-GFDL, which I believe is inappropriate for code). Right now I'm primarily letting it stand for historical interest, and might consider protecting it all. Deco 06:21, 25 June 2008 (EDT)
Some time ago I wrote to the author of noweb, asking if it would be difficult to port noweb to PHP. In short, he said "no". I'm very interested in a LP as a common tool for developers, documenters and translators working together. See this discussion and example together with Derek Ross. Today, I can have Mediawiki up and running in 15 minutes at most hosting providers with PHP/MySQL, and if LP only required the same, then you would have a smash hit. It is too difficult to help out on most projects, because a contributor - especially documenters and translators - needs so many tools before they can start working. With Mediawiki/LP you only need a browser, and you are free to use the full gettext functionality for languages like Arabic and Polish, which are rather different than English. Deco, I don't understand why you care about the others being pro-GFDL. Mediawiki is GNU GPL, LP has to be GNU GPL, but the content here at www.literateprograms.org does not have to be GFDL even if has to be GFDL at WikiCode - that's up to you as the site owner to decide.Haakon 18:35, 21 July 2008 (EDT)
That's a valid point - I think it's a good idea to pursue the literate programming mechanism being a pure extension. I don't currently have time to pursue this myself, because I have some higher-priority work, but it would enable it to be distributed more easily and I'll definitely think about it for the future. Deco 20:02, 12 August 2008 (EDT)

Spam problem

Please see LiteratePrograms:Public forum#Spam attack --Ce 03:52, 3 September 2008 (EDT)

literateprograms base dump

Hi Deco, I am just trying to install lpwiki locally and it seems that the database dump you provide (dump_current.20YY-MM-DD.xml) are all truncated around 13Ko! could you help, please? In fact I would need an "empty" dump: without lpwiki articles, but with mandatory pages (to start lpwiki)... Lehalle 06:02, 21 November 2008 (EST)

Personal tools