Recent Posts

Subscribe to Recent Posts 342 posts found

posted almost 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: nlab

Okay, so I just did a crude time count. I do have some lists totalling in the order of seconds. I get one at 20s, three at 10s, and about 30 over 1s. (Usual caveats that I can’t tell that all of these are from the same request. They occur concurrently in the logs.)

 
posted almost 3 years ago
Andrew Stacey 118 posts

edited almost 3 years ago

Forum: Instiki – Topic: Bugs

Just saw the following in the logs:

ActionView::TemplateError (can't convert nil into String) on line #25 of app/views/wiki/atom.rxml:
22:       else
23:         xml.content('type' => 'xhtml', 'xml:base' => url_for(:only_path => false, :web => @web_name,
                       :action => @link_action, :id => page.name) ) do
24:           xml.div('xmlns' => 'http://www.w3.org/1999/xhtml' ) do
25:             |x| x << rendered_content(page)
26:           end
27:         end
28:       end
 
posted almost 3 years ago
admin 57 posts

Forum: Instiki – Topic: nlab

The “Expired fragment” log-entries all have times (in ms) attached to them, so you would be in a better position than I to tell how long they took to execute.

But, yes, when you ask for new features (like source views for every revision), that means more pages to expire, when an edited page is saved.

 
posted almost 3 years ago
Andrew Stacey 118 posts

edited almost 3 years ago

Forum: Instiki – Topic: nlab

Urs is complaining about slow times again …

Looking at the logs, I see a heck of a log of “Expired fragment”s. Do these add to a page’s rendering time? Or does the cache sweeper act non-synchronously (or whatever it’s called)?

For example, in the logs I see 815 lines saying “Expired fragment:” and the request that it seems to be a part of (can’t be totally sure due to several processes running simultaneously) takes about 6s to render. A more systematic search of the logs shows it’s not guaranteed, but often the case that the following request is slow - and the times when it isn’t could be due to it being a parallel process (would need a more sophisticated search).

 
posted 3 years ago
distler 81 posts

Forum: Instiki – Topic: Bugs

I’m a little baffled. It should work. Sometimes it does (saving the file triggers the cache sweeper); sometimes it doesn’t. I can’t see what the difference is.

Will have to investigate further …

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

I’m on the latest version (758) on my course wiki and this still didn’t work (I thought that it did work just recently, though, did you undo something?). I uploaded a few files, then reloaded the page, and it had the greyed-out-with-question-mark look again.

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Heterotic Beast – Topic: Bugs

This place just remembered who I am. So that seems to be working now.

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Feature Requests

It would still just be one entry in the database. But it would mean that there actually was an entry in the database if “Foo” only links to an anchor on “Bar”. Having to do it via hyperlinks would mean that the pages weren’t officially linked.

My idea (no idea how practical) would be:

  1. Strip off the anchor from [[Bar#baz]] and store it temporarily
  2. Process [[Bar]] as before
  3. Put back the anchor at the end of the resulting link

So then at the point of sorting out the database, instiki doesn’t care about the anchors and just registers the link to page “Bar”.

 
posted 3 years ago
distler 81 posts

edited 3 years ago

Forum: Instiki – Topic: Feature Requests

I feel that there is a qualitative difference between a wikilink and a hyperlink

Indeed, there is. And that’s why there are no anchors allowed.

If page “Foo” has multiple WikiLinks to [[Bar]], there’s still only one corresponding entry in the database. That could no longer be true if “Foo” could link to [[Bar]] and to [[Bar#baz]].

What you want is a hyperlink, and Markdown provide a syntax for hyperlinks which permits anchors.

Update:

On reflection, I suppose that allowing the presence of anchors doesn’t strictly conflict with having just one entry in the database. I should think some more …

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Feature Requests

Here’s something I’d find useful: allowing for anchors in wikilinks. So that I could type [[homework+2011+2#question_three_5]]. Since missing anchors at least take one to the right page, I wouldn’t check that the anchor itself exists.

I feel that there is a qualitative difference between a wikilink and a hyperlink, and links to anchors on particular pages should be in the wikilink category.

 
posted 3 years ago
distler 81 posts

edited 3 years ago

Forum: Instiki – Topic: Bugs

Because of that last, my guess is that the pre-upload version is still in the cache, but that the page shown when the file is uploaded doesn’t read the cache version.

You’re probably correct. The rule is that pages with Flash messages on them (like the one that tells you that the file was successfully-uploaded) are not cached. So you get to see the correct page once, but if the incorrect one wasn’t deleted from the cache, that’s what you’ll see the second time.

Fixed in Revision 756 Revision 757.

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

New bug! I think that the page view is not getting “expired” (is that the right term?) when a file is uploaded. Here’s the “steps to reproduce”:

  1. Edit a page to include a file upload whatsit.
  2. Upload the file. Upon upload, the page looks fine and the question-mark link has been replaced by a link to the file.
  3. Reload the page. Then it reverts to the previous view and the question-mark link is back again.
  4. Next time the page is edited, it looks correct.

Because of that last, my guess is that the pre-upload version is still in the cache, but that the page shown when the file is uploaded doesn’t read the cache version.

So long as the cache hasn’t been expired, you can see this at http://ncatlab.org/doriath/show/uploads+and+caches. If you click on the question mark, you should get a copy of the Snake Lemma.

 
posted 3 years ago
distler 81 posts

edited 3 years ago

Forum: Heterotic Beast – Topic: Rails 3.1.0

I upgraded Heterotic Beast to Rails 3.1.0. Despite all my prior testing, the process didn’t go as smoothly as I would have liked, and this forum was pretty disrupted for most of Friday.

Should be back to normal now. But leave a comment here, if something’s still broken for you.

The main new feature is the Asset pipeline, which supposedly speeds the delivery of static files (CSS, javascript, and images). Unfortunately, the result seems buggy.

  • The reference

    "#{asset_path('something.png')}"

    sometimes turns into (the correct)

    "/forum/assets/something-5c4374aa4b1911ebbabb73883b3cd5c0.png"

    and sometimes it turns into (the incorrect)

    "/assets/something-5c4374aa4b1911ebbabb73883b3cd5c0.png"

    I’m using some Apache-fu to redirect the latter, but that shouldn’t be necessary.

  • I had to switch to Sass (from .css.erb) to get URLs for background images to include the fingerprint. I.e., within a .css.erb file, the above generates

    "/assets/something.png"

Other minor bugs include:

  • The acts_as_state_machine gem uses some deprecated methods, which generate a warning in the User model. There’s a Rails 3.1 fork which fixes the problem. But it’s unclear when, if ever, that will be released as a gem.

  • Prototype 1.7.0 generates a Javascript error

     Error: mismatched tag. Expected </link>.
     Source File:
     <div xmlns="http://www.w3.org/1999/xhtml"><link></div>

    The problem is in the LINK_ELEMENT_INNERHTML_BUGGY function, where you could replace <link> with <link/> to silence the error. This was not a problem in Prototype 1.6.x.

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

Of course they are different.

I reserve the right to be stupid!

 
posted 3 years ago
distler 81 posts

Forum: Instiki – Topic: Bugs

Of course they are different.

  • <a> </a>” is an ”a” element with a single child node, which is a text node, containing ” “.
  • <a></a>” is an ”a” element with no children.

In X(HT)ML, the latter is equivalent to ”<a/>”.

The short-tag construction does not exist in HTML and all browsers interpret the latter as the opening tag, ”<a>”, of an ”a” element (which is not what you want).

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

I’m afraid I’m not very well informed on the differences between XHTML and HTML. I probably ought to be (I found the w3c page on it which was useful). So <a> </a> is actually different to <a></a>, then. But it seems as though when rendered then the extra space has no actual effect. (Let’s try: a a and aa. Though my actual use case has them on lines by themselves:

Text

Text

Text

Text)

The reason why I’m using these is that in a LaTeX document, whenever a counter is stepped then hyperref inserts a bookmark in to the PDF. As there’s no actual text at that point, there’s no way to figure out what that bookmark should be attached to so I made it in to an empty anchor. But maybe I need to suppress it altogether and suppress implicit anchors, only inserting anchors that correspond to actual labels.

 
posted 3 years ago
distler 81 posts

Forum: Instiki – Topic: Bugs

<a id="anchor"> </a>

Here's a [[wikilink]

would not have triggered the bug. Only empty elements (which get converted to short-tag syntax, <a id="anchor"/>, in the output) triggered this bug. Since you probably don’t want empty a or code elements (they are perfectly correct in XHTML, but wreak havoc, when the same document is parsed as HTML), you probably didn’t want the problematic (if you prefer that to uselesss) empty elements in the first place.

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

Yet again: thanks!

Though I dispute the “equally useless”. I was using the empty anchor tag to put an anchor at a particular place on the page when there wasn’t an obvious thing to “hang” it on. Of course, I could always find something to put it with, but it was coming from my automatic LaTeX-to-iTeX package and it’s much easier to have an empty anchor than try to figure out automatically where it can be put.

 
posted 3 years ago
distler 81 posts

Forum: Instiki – Topic: Bugs

Same thing happen(ed) when you typed (the equally useless)

<code></code>


Here's a [[wikilink]].

Fixed in Revision 744.

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

Next bug. For some strange reason, empty anchors mess up wikilinks:

<a id="anchor"></a>

Here's a [[wikilink]]

means that Instiki does not process the wikilink. If I put text in the anchor, then it’s fine. If I replace the a tag by p or div then it’s fine (didn’t test other tags). The problem persists for a bit, and then starts working again (not quite figured out the rule for when it does, sometimes it seems to be in the middle of a paragraph).

This does feel a bit like a “when I bang my head on the wall then it hurts” bug, but still it is strange behaviour particularly given the tag-dependence.

(See http://ncatlab.org/nlab/show/Sandbox for some experiments.)

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: nlab

If you can’t remember, then I’ll experiment with taking it out and see who complains, and about what.

 
posted 3 years ago
admin 57 posts

Forum: Instiki – Topic: nlab

Ah. I see. I was deceived by your example

Theorem

This is italic text. But this is not.

+-- {: .num_theorem}
###### Theorem ######
This is italic text.  But [this is not](#top){: style="font-style: normal;"}.
=--

In general, the more specific CSS selector wins, and there was some circumstance where inheritance from .num_theorem was not sufficient. I needed the more specific .num_theorem *. But, for the life of me, I can’t recall the details.

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

Great! I’ll apply those tomorrow morning.

(And I learnt a new word. Doubt I’ll be able to get it in to Boggle, though.)

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: nlab

It’s about inheritance. Let me do my example again.

+-- {: .num_theorem}
###### Theorem ######
This is italic text.  *This is normal, but [this is not](#top).*{: style="font-style: normal;"}.
=--
Theorem

This is italic text. This is normal, but this is not..

The link should inherit the font-style: normal; from the span but it doesn’t because it matches the CSS rule .num_theorem *.

 
posted 3 years ago
admin 57 posts

Forum: Instiki – Topic: nlab

Works for me.

Theorem

This is in italics. This is normal. And this is italic, again.

This whole paragraph is normal.

This paragraph is in italics.

was generated by

+-- {: .num_theorem}
###### Theorem ######
This is in italics. *This is normal.*{: style="font-style: normal;"} And this is italic, again.

This whole paragraph is normal.
{: style="font-style: normal"}

This paragraph is in italics.
=--

Aside from the kludgy bit about applying styles to spans, I have no idea what your issue is.

 
posted 3 years ago
admin 57 posts

edited 3 years ago

Forum: Instiki – Topic: Bugs

Thanks for the report. Fixed in Revision 742.

I think this bug was a long-standing one. The other, fixed in that Revision, was completely iatrogenic.

Oh, and your double-escaping bug is fixed in Revision 743.

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: nlab

(Not so much a bug, but also not a feature request, so gets put here.)

Is there a reason why the italic style in theorems is done via:

.num_theorem * {
   font-style: italic;
}

rather than:

.num_theorem {
   font-style: italic;
}

The * makes it very hard to override the italic selection. For example, something like:

<p style="font-style: normal;"><a href="somewhere">link</a></p>

will come up as italic, I think. Actually, I can test it here:

Theorem

link

Yes, it did. So the normal CSS inheritance is effectively bypassed by the * selector. To override it, I need to put another * selector in place but I can only do that in the web CSS and not in the style on a div.

I’m generally reluctant to modify stuff that you’ve put in place! Is there a reason for the *, or can it be dropped?

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

Okay, next one. I’m recording the error message first. It’ll take me a few minutes to track down exactly what is causing it.

#<ActionView::TemplateError: 
ActionView::TemplateError (undefined method `children' for nil:NilClass) on line #15 of
app/views/wiki/page.rhtml:
12:     </p>
13:     <%= @renderer.display_diff %>
14:   <%- else -%>
15:     <%= @renderer.display_content %>
16:   <%- end -%>
17: </div>
18: 

Actually, didn’t take long at all. The last line of the document was * (the previous line had been a list item as well) so presumably maruku was looking for the rest of the item, couldn’t find it, and gave up in disgust.

I guess that getting a more sensible error (this causes smoke) would involve hacking maruku more than you’d like.

 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

I originally thought that this one was due to old browsers, but I’m now using FF6.0 so it can’t be that. Anyway, when I create a new page, the “Page X does not exist” is getting escaped once too often and I see:

Page &quot;Proper Homotopy Theory&quot; does not exist.<br/>
Please create it now, or hit the &quot;back&quot; button in your browser.
 
posted 3 years ago
Andrew Stacey 118 posts

Forum: Instiki – Topic: Bugs

Thanks! I’ve updated the nLab and Azimuth Project. That’s great.