Recent Posts

Subscribe to Recent Posts 377 posts found

posted 2 years ago
Francesco Ta... 6 posts

Forum: Instiki – Topic: Bugs

In the process of migrating my wiki from Textile to Markdown I think I found a bug:

The following snippet of text: punto!). was converted by pandoc as punto![]().. The latter text blows the editing page with the error “NameError in WikiController#save”. Step to reproduce

  1. create a new empty page
  2. write punto![](). (without apexes)
  3. save hitting the “Submit” button
 
posted 2 years ago
Francesco Ta... 6 posts

Forum: Instiki – Topic: Migration from Textile

Thanks for your quick reply, you gave me a good idea. Actually I didn’t think about the history, and luckily I don’t need to keep it. I’m the only user of my wiki, but since it was started long ago, the pages format wasn’t fully coherent, so a completely automated migration wasn’t possible, I also needed the old wiki running, as a reference. So in the end this is what I did:

  1. exported as you suggested the whole wiki, the result is a convenient “file per page”
  2. converted the files with the command pandoc file.textile -o file.markdown in a BASH for cycle
  3. moved existing installation from ~/instiki to ~/instikiold
  4. installed a new, empty, instance in ~/instiki
  5. launched the two instances together, on different ports
  6. opened all files in jedit to correct in a single shot all repetitive errors
  7. imported every page from file, one by one (starting with the smaller files!)

It took a lot of time to clean everything up, but in the end all the pages were moved successfully.

 
posted 2 years ago
itpullok 1 post

Forum: itex2MML – Topic: itex and other languages

Sounds good to me!! Heye Andrew Can you provide little information about your Extension Via PM.

cheers

 
posted 2 years ago
distler 89 posts

Forum: Instiki – Topic: Migration from Textile

Interesting question!

I guess the first question is: do you want to convert the whole history (ie all previous revisions of each page) to Markdown, or just the current version?

If you just need the current version converted, you can go to the “Export” tab, and click on “Markup” to create a zip archive containing the (Textile) markup of each page.

If you want to convert the previous revisions, too, then you should look at the rake tasks described on this page. Those instructions are geared towards migrating from one database (e.g. sqlite) to another (e.g. MySQL). But they would also be useful in converting the content of the revisions` table, without changing database engines.

  • The db:fixtures:export_all rake task dumps your database to a (series of) YAML file(s).
  • db:fixtures:import_all imports them to a (new) database.

In between, you’d run a conversion on the dump/fixtures/revisions.yml file.

 
posted 2 years ago
Francesco Ta... 6 posts

Forum: Instiki – Topic: Migration from Textile

I have an installation of Instiki, installed very long ago, and always kept up to date. I find it very useful because it runs completely in the user home, so it can be easily synced across several computers. I don’t need to write formulas to the wiki, just text and snippets of code.

Since the beginning the chosen markup was Textile (maybe was the default back then…), now I see on the web that Textile is almost unused and I wish to migrate to Markdown.

Is it there a best practice for this kind migration? Was it tested before?

Do I need to write a script that reads the sqlite database and feeds the pages to pandoc and then back to the database before changing the markup setup in “edit web”, or it’s safe to switch from one markup dialect to the other?

 
posted 2 years ago
Francesco Ta... 6 posts

Forum: Instiki – Topic: Instiki website

Ok, I’ve stumbled upon it while I was looking for informations about textile, but let me open another post, it’s a completely different topic.

 
posted 2 years ago
distler 89 posts

Forum: Instiki – Topic: Bugs

I’m sorry.

Could you please distill that long and rambling discussion in to a set of steps by which one might reproduce the bug?

 
posted 2 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

There would appear to be a bug on pages with apostrophes in their names. See http://nforum.mathforge.org/discussion/4757/apostrophes-in-page-titles-lead-to-weird-behaviour for details.

 
posted 2 years ago
distler 89 posts

Forum: Instiki – Topic: Instiki website

The instiki.org website is a hopeless mess, on many levels. Alas, I don’t control it, so I can’t do much about it (except to send the occasional plaintive email message to Matthias, which he ignores).

Instead, point your browser at my website, which contains both up-to-date information and (as best as I am able to assure) is spam-free.

 
posted 2 years ago
Francesco Ta... 6 posts

Forum: Instiki – Topic: Instiki website

Hi all, there are several pages on the site http://www.instiki.org/ that need attention:

  • both links in the export page are not working, HTML with “Internal Error An application error occurred while processing your request.” and “No webpage was found for the web address: http://golem.ph.utexas.edu/wiki/instiki/export_markup” for Markup

  • the three sandboxes links (http://instiki.org/textilesandbox/show/HomePage http://instiki.org/markdownsandbox/show/HomePage and http://instiki.org/rdocsandbox/show/HomePage) give an internal error

  • the following page http://instiki.org/show/Textile is nonsense/spam

  • the homepage is spammed too: http://instiki.org/show/HomePage (rev 240)

  • the News in homepage (http://instiki.org/show/HomePage) are not up to date

 
posted 2 years ago
user 1 post

Forum: Instiki – Topic: instiki features

hello!

I would like to know if i can use in instiki:

1) WYSIWYG editor like: ckeditor.com or tinymce.com 2) chart, flowchart, etc designer like: http://www.diagram.ly/ or http://diagramo.com/editor/editor.php 3) table designer, with sortable columns, filterable rows and columns, etc 4) treeview organizer like: www.jstree.com 5) ‘mouse over’ events that show popups, etc

thanks!

 
posted 2 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

I just tried on a completely fresh install and found that it happened just as you described: the name used was the old name (and it gets swept twice). That was a sqlite3 database.

I’ve tried to install mysql on my mac to test this there, but get to a crash when I run instiki. Not sure why, seems to be related to the gem not finding my mysql lib files but it’s taken too much of my time already to try to fix it to test further. I can try it on my linux machine later.

However, the evidence certainly suggests that there is a difference between mysql and sqlite3 on this one.

 
posted 2 years ago
distler 89 posts

Forum: Instiki – Topic: Bugs

Sorry, I follow exactly the steps you outlined, and it’s adequate+subcategory (and its variants) that get cleared from the cache, not adequate+subcategory+>+history.

The scenario you outline (involving the old name being forgotten before the cache gets swept) is exactly what the before_save action is supposed to avoid. Then the cache gets swept again in an after_save action.

Now, the only thing I can think of is that I tested this under SQLite3, rather than MySQL. Perhaps the driver for the latter does something funky. But that seems unlikely…

 
posted 2 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

I know you don’t believe in the Cache Bug …

I had a page on the nLab which I renamed. Looking at the logs, then I see the save command. It ends with:

 "alter_title"=>"1", "new_name"=>"adequate subcategory > history", "author"=>"Andrew Stacey", "web"=>"nlab", "id"=>"adequate subcategory"}

The next log items are:

24808: 2012-10-18 14:22:26 +0400: Reading page 'adequate subcategory' from web '
nlab'
24808: 2012-10-18 14:22:26 +0400: Page 'adequate subcategory'  found
24808: 2012-10-18 14:22:26 +0400: Checking DNSBL 214.7.76.192.bl.spamcop.net
24808: 2012-10-18 14:22:26 +0400: Checking DNSBL 214.7.76.192.sbl-xbl.spamhaus.org
24808: 2012-10-18 14:22:27 +0400: 192.76.7.214 added to DNSBL passed cache
24808: 2012-10-18 14:22:27 +0400: 192.76.7.214
24808: 2012-10-18 14:22:27 +0400: Reading page 'adequate subcategory' from web 'nlab'
24808: 2012-10-18 14:22:27 +0400: Page 'adequate subcategory'  found
24808: 2012-10-18 14:22:27 +0400: Maruku took 0.148016386 seconds.
24808: 2012-10-18 14:22:27 +0400: Maruku took 0.165203678 seconds.
24808: 2012-10-18 14:22:28 +0400: Expired fragment: views/nlab/show/adequate+subcategory+>+history (0.3ms)

There are then a slew of more expirations, the first ones being adequate+subcategory+>+history. The last ones are also adequate+subcategory+>+history.

I just tried on my course wiki. Here are the steps I took:

  1. Edit a page and change it’s name.
  2. Remove the automatically-inserted redirect.
  3. Save the page.

Result: the expiration sweep does not include the old name and includes the new name twice.

I’m wondering if this could be the culprit: app/controllers/revision_sweeper.rb:

  def before_save(record)
    if record.is_a?(Revision)
      expire_cached_page(record.page.web, record.page.name) 
      expire_cached_revisions(record.page)
    end
  end

I notice that in the save post data then the name is the new name and the id is the old name. Could it be that the record object is populated with the new name before this action takes place? I’m not very good at tracing through ruby code, but if my guesses about what happens are right then the before_save action takes place just before the save action is executed in page.revise. If so, then by this time the name is the new name and the old name has been forgotten: in wiki.rb then the call is page.revise(content, new_name, revised_at, author, renderer) and very early on in the revise method then I see self.name = name.

Perhaps the revise should save its name in old_name and then the before_save can use that if it differs from the current name?

 
posted 2 years ago
20tsed56 1 post

Forum: Instiki – Topic: Debugging uninterruptible sleep

that is huge data to handle …

 
posted 2 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Debugging uninterruptible sleep

Agree completely.

The processes that were handling the list call were entering uninterruptible sleep and were using a large amount of memory - of the order of 300Mb to 500Mb. The system would get bogged down if there were more than one of them, but even one would take a reasonable amount of time to complete.

My suspicion is therefore that it relates to writing the file to disk for caching. So I suspect that there really is a problem with the hardware and that having several processes trying to write the same file was exposing it.

(There was a change in hardware underpinning the VPS recently.)

 
posted 2 years ago
distler 89 posts

Forum: Instiki – Topic: Debugging uninterruptible sleep

It looks as though it is the “All Pages” request that is clogging up the works, … at 7000 pages then it’s a bit cumbersome, to say the least,

I have no idea why that would be an issue.

It’s not as if Instiki has to do anything with those 7000 pages, apart from retrieving an alphabetical list of their names (and URLs). If that’s indeed your problem, it would be nice to know why.

 
posted 2 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Debugging uninterruptible sleep

I’ve added the timestamps and process ids to the logs and that’s made things a lot clearer. It looks as though it is the “All Pages” request that is clogging up the works, and there appear to be some spiders that don’t respect robots.txt and find “All Pages” fairly early on in their crawl.

You’ve mentioned before the possibility of adding a pageinate routine to “All Pages”. Would that help me, do you think? Or is it easier just to disable it (at 7000 pages then it’s a bit cumbersome, to say the least, so I’ve no compunction at simply disabling it altogether).

Incidentally, I found I’d forgotten that bzr doesn’t set permissions so some stuff in public was unreadable. That might explain why the SVG editor wasn’t working for me as there were a couple of files from that affected.

 
posted 2 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Debugging uninterruptible sleep

I strongly doubt that it is due to instiki itself, but it would be nice to isolate exactly what causes the problem. Thanks for the link.

After watching top all day, I think things are going into D state far more than I would expect so I’m going to contact our server provider.

To help in debugging this, I’m going to add the process pid to the logging messages as that’ll make it easier to link what I see in top to what I see in the production.log.

 
posted 2 years ago
admin 58 posts

edited 2 years ago

Forum: Instiki – Topic: Debugging uninterruptible sleep

Attach gdb to the process and try to figure out where it’s stuck. It would be interesting to me if there was an Instiki-specific reason these processes were getting stuck.

But, so far, there’s no evidence for that.

 
posted 2 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Debugging uninterruptible sleep

I’m getting a slew of processes getting into “uninterruptible sleep” and staying there. They sit there, eating CPU and memory, until the system slows down enough that folks complain.

Do you happen to know how to debug these? From what I’ve read, this is likely to be something getting stuck on I/O.

One thing that occurred to me was that all the processes are logging to the same file. Could they get stuck in some sort of queue for that?

(Also from my reading around, it would appear that the root cause of this is more likely to be at the kernel end, and thus an issue with drivers and hardware, than with instiki. Still, I’d like to know what it is that is triggering the sleep.)

 
posted 2 years ago
distler 89 posts

Forum: Heterotic Beast – Topic: MathJax 2.0

The latest commits, to Heterotic Beast, upgrade it to MathJax 2.0 (from 1.1). This loads (a little) faster, and also sports a SVG rendering option (selectable from the context menu).

 
posted 2 years ago
distler 89 posts

Forum: Instiki – Topic: MathJax 2.0

The latest commits, to Instiki, upgrade it to MathJax 2.0 (from 1.1). This loads (a little) faster, and also sports a SVG rendering option (selectable from the context menu).

 
posted 2 years ago
admin 58 posts

Forum: Instiki – Topic: S5 vertical alignment

I don’t know of a totally robust way to do it. My CSS-fu is weak.

But

Test Vertical Alignment
------------------------

This is centered on the slide
{: style="margin-top:25%;text-align:center;}

is a pretty good approximation to what you want.

 
posted 2 years ago
admin 58 posts

edited 2 years ago

Forum: Instiki – Topic: Bugs

And another one, this time in how maruku parses its meta-data.

This was actually only a problem for IALs attached to <li> elements. Fixed in the latest Maruku.

(This commit gives the complete solution. Its predecessor was only a partial fix.)

(N.b.: Maruku is now unvendored, so a

ruby bundle update

will pull in the latest version from Github.)

I’m unable to run the inbuilt SVG editor on my computer (running Mac OS X, Lion).

Works fine for me under Lion. (I haven’t updated to Mountain Lion, so I can’t make any promises about that. But I’d be surprised if there were any OS dependence of this; it ought to be a function of the Javascript engine in your browser. Or perhaps I misunderstood: were you running the server on Lion, or just the client?)

 
posted 2 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

And another one, this time in how maruku parses its meta-data. It would seem that not leaving a space at the end of {: #identifier} means that the } gets into the identifier.

Presumably this is the case here as well:

  • What’s the id of this element?

I get:

<ul>
<li id='list}'>What’s the <code>id</code> of this element?</li>
</ul>

in the source.

 
posted 2 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

I’m unable to run the inbuilt SVG editor on my computer (running Mac OS X, Lion). The window launches but none of the icons are present and although the buttons highlight when I hover over them, nothing happens when I click on one.

This is with Firefox, Chrome, and Safari. Not sure what additional information you would like on this.

 
posted 2 years ago
cameron smith 1 post

Forum: Instiki – Topic: S5 vertical alignment

I apologize if I missed it somewhere else, but how do you specify that the content on each slide in an S5 slide show should be vertically centered?

 
posted 2 years ago
jl345 6 posts

Forum: Instiki – Topic: Bugs

I tried a little test case…

$ cat subtest.rb                                                                                                                                                               
#!/usr/bin/env ruby
puts '/some/other/string'.gsub( '/some/other' + File::SEPARATOR, '' )
puts '/some/other/string'.gsub( Regexp.escape( '/some/other' + File::SEPARATOR), '' )
puts '/some/other/string'.gsub( Regexp.new( Regexp.escape( '/some/other' + File::SEPARATOR ) ), '' )
$ ./subtest.rb                                                                                                                                                                 
string
string
string
$ ruby --version
ruby 1.8.7 (2012-06-29 patchlevel 370) [x86_64-openbsd]

I believe that my first and third examples are both correct and equivalent, going by official docs. The second example works, too, in this case, because a forward slash is apparently not one of the characters escaped by Regexp.escape(), which is curious, because now I am unable to reproduce the error that occurred in the rake task before I altered the code. So I’m more and more confused.

 
posted 2 years ago
distler 89 posts

Forum: Instiki – Topic: Bugs

Hmmm. Both look wrong. What I think we want is:

table_name = f.gsub( Regexp.new(Regexp.escape(Rails.root.join('dump','fixtures').to_s + File::SEPARATOR)), '').gsub('.yml', '')

The point being that the output of Regexp.escape is a (properly-escaped) string which is suitable as input to Regexp.new.