Recent Posts by distler

Subscribe to Recent Posts by distler 77 posts found

posted almost 3 years ago
distler 77 posts

edited almost 3 years ago

Forum: Heterotic Beast – Topic: Bugs

Layer 1

It would be more sensible if it took me to the point where I last read up to (which I presume it knows).

How does Vanilla keep track of what posts you’ve read?

 
posted almost 3 years ago
distler 77 posts

Forum: Instiki – Topic: nlab

One thing that I am pretty sure that slows down a page load is if the page has a lot of wikilinks on it. I don’t know how it checks all the links, but is there some way that that could be speeded up?

Could you compare (by deleting the cached page and reloading ) how long it takes to build a wikilink-heavy page, versus a “normal” one?

I’m particularly interested in the database-lookup times. As I said via email, the WikiReferences model uses a lot of raw SQL queries (which, therefore, do not benefit from ActiveRecord caching). But I am a little skeptical that is the cause of much of a slowdown.

 
posted almost 3 years ago
distler 77 posts

edited almost 3 years ago

Forum: Instiki – Topic: nlab

It keeps 25 files, of size 1MB each.

Both of these numbers are configurable.

 
posted almost 3 years ago
distler 77 posts

edited almost 3 years ago

Forum: Instiki – Topic: nlab

I wouldn’t count this morning’s crash as anything special.

You seem to be inured to the idea of Instiki crashing. I am not. It shouldn’t crash, and there’s something wrong if it does. I’m not even convinced that my PassengerPoolIdleTime theory explains the phenomenon. Let’s see if it can go a week without hiccup.

 
posted almost 3 years ago
distler 77 posts

Forum: Instiki – Topic: Feature Requests

As far as I can tell, updating the application files on a running Rails application (in production mode) has no effect, until the application is restarted. I, honestly, haven’t thought about the bundled Gems, but I expect the answer is the same.

In any case, ruby bundle is pretty fast (of course, that’s because it’s actually superfluous) if the Gemfile hasn’t changed. I suppose you can stat the Gemfile to see whether you actually need to run ruby bundle at all.

But I don’t think that’s your issue…

 
posted almost 3 years ago
distler 77 posts

edited almost 3 years ago

Forum: Instiki – Topic: Feature Requests

Given that instiki can be installed as a gem …

Instiki cannot be installed as a Gem.

There’s an old (~0.10.x) version, which worked as a Gem, and which is probably still floating around (on the internets, nothing ever really disappears). But that was long before my time, and I have not even thought about packaging the current version as a Gem.

Of course, under Passenger, you can run multiple instances of a Rails application (including Instiki), under different subdirectories (or subdomains, if you have virtual hosts enabled).

(At least with Instiki, that would require separate copies of the code, as each instance would have to point to its own database (in config/database.yml). I suppose one could use soft-links astutely, so that there was really only one copy of the source code, shared by these different instances.)

 
posted almost 3 years ago
distler 77 posts

edited almost 3 years ago

Forum: Instiki – Topic: nlab

Let’s keep it “off” for the time-being; I don’t have any plans to change anything for the next week, at least.

Do you have any other scripts/cron-jobs running?

 
posted almost 3 years ago
distler 77 posts

Forum: Instiki – Topic: Feature Requests

Something that is a “dummy” is not necessarily “dumb”. A “dummy” simply means a fake …

I am familiar with the usage (there’s not a UK/US distinction).

I was making a lame attempt at humour, whilst making the serious point that these CSS classes are used for styling (generated content), and as structural hooks (for converting the \ref{}s into hyperlinks), hence are not “dummy” in either sense.

 
posted almost 3 years ago
distler 77 posts

edited almost 3 years ago

Forum: Heterotic Beast – Topic: Bugs

Hmmm. /users/nnn/posts?monitored=true doesn’t seem to return anything, here on Golem. But it works fine on my test installation.

Both are running in production mode. The test installation uses sqlite3; this one uses mysql. The (admittedly complicated) SQL join seems not to work on the latter.

Hah! Fixed, now. Boolean comparisons are not the same in SQLite3 and MySQL. Finding a syntax that works in both was … umh … fun.

 
posted almost 3 years ago
distler 77 posts

Forum: Heterotic Beast – Topic: Feature Requests

Hmm. I think tagging a post as having been edited, after the grace period, should suffice.

See what you think.

 
posted almost 3 years ago
distler 77 posts

Forum: Instiki – Topic: Feature Requests

…dummy CSS classes.

I bridle, only at referring to these as “dummy.” I thought that the whole mechanism I invented with those classes was very clever. And even more versatile than I had originally envisioned.

Not “dummy” at all….

 
posted almost 3 years ago
distler 77 posts

Forum: Instiki – Topic: Feature Requests

I’m not sure I understand. If an element has an explicit id, because you gave it a {: #foo} IAL, then you can refer to it a [fubar](#foo). \ref{...} is used for linking to things with generated numbers (like theorems, ‘n such).

I think your motivation is to have something that converts to LaTeX. \ref{foo} converts just fine. There are two issues, if I understand correctly.

  1. The IAL on the list-item doesn’t get converted to a \label{foo} on the \item in the LaTeX output.
  2. For the XHTML output to behave as you would like, you need to invoke Maruku’s internal counter, so that \ref{foo} is converted to a hyperlink, with anchor-text being the number of the list-item.

The latter is a bit awkward, as there can be several ordered-lists on a page. We’d need a separate counter for each one, no?

 
posted almost 3 years ago
distler 77 posts

edited almost 3 years ago

Forum: Heterotic Beast – Topic: Feature Requests

With the anonymous posting, then I can specify it on a “per category” basis in Vanilla. The hierarchy in Vanilla is:

Forum: Category: [Subcategory:...] Discussion: Post

I think this maps onto

Site: Forum: Topic: Post

with the proviso that (at least as currently implemented) “Sites” need to live on separate subdomains.

So you’re talking about allowing anonymous postings on a per-forum basis?

To avoid spam, the person has to solve a reCaptcha to post.

There’s some captcha mechanism built-in (but disabled) in Beast. Will have to explore …

Behind the scenes, there is a “guest” user and the software logs in the guest user, posts the post, and then logs out again. All such posts get authored by “Guest” and (this is less than ideal) …

I suppose just creating a “Guest” user, with a blank password, would not suffice, as “Guest” could then post to any forum.

Regarding “editable” posts, I’d go for “created_at”. A discussion is a linear thing, and most of the time edits will be for minor typos which certainly shouldn’t change the order. Deciding on the difference between minor and major is a human thing.

If you wanted the best of both worlds, an edit to a post could insert a line at the relevant time point saying “Post X was edited at …”. That wouldn’t disrupt the flow of the conversation but would signal that someone had potentially thrown a stone in to the water.

Or simply tag the post, itself, as having been “Edited at …”

Maybe best of all would be a 5-minute grace period: if updated_at time - created_at time > 5 minutes, then include such a tag.

… Like on this post.

 
posted almost 3 years ago
distler 77 posts

Forum: Instiki – Topic: Bugs

Ah, that’s unfortunate. What other markdown engines are available for Ruby?

There are several.

  1. There’s rdiscount, based on discount.
  2. There’s BlueCloth, which was the “original” Markdown interpreter for Ruby, which sucked bigtime. But Bluecloth 2.x has been rewritten to use discount.
  3. There’s rpeg-markdown, based on peg-markdown.

The latter is probably the most promising. One “just” needs to write a PEG grammar for Maruku’s extended Markdown syntax, and then drop it in as a replacement.

“Just”

 
posted almost 3 years ago
distler 77 posts

Forum: Heterotic Beast – Topic: Feature Requests

Andrew Stacey wants:

  • The ability to selectively allow anonymous posts (ie, posts by unregistered users). It’s not clear whether he wants that on a per-forum basis, or on a per-topic basis. It’s also not clear who gets to decide (moderator or admin).
  • Themes. I think themes_for_rails looks promising.
  • More fine-grained access-controls. Apparently, admin/moderator/user(/anon) is insufficiently fine-grained.

Other thing that bear looking at:

  • The Signup process.
  • Since posts are editable, should they be ordered by updated_at instead of by created_at dates?
 
posted almost 3 years ago
distler 77 posts

edited almost 3 years ago

Forum: Instiki – Topic: Bugs

Both this request (for “fenced” quotations and lists) and this one, in the other thread, are for extensions to the Markdown syntax in Maruku.

Frankly, I’m very reluctant to spend any time working on Maruku.

The author (who is no longer actively developing the software) insists on a GPL license, which conflicts with the licenses for both Instiki (Ruby) and Heterotic Beast (MIT). Unless he changes his mind (which seems unlikely, as I’ve asked several times), I would prefer to ditch Maruku, in favour of another Markdown engine.

Consequently, I’d rather spend my time extending that engine (whatever it turns out to be). Of course, for the present, I am still going to fix bugs in Maruku.

Update:

Well, OK, I didn’t exactly keep that promise…

 
posted 3 years ago
distler 77 posts

edited 7 months ago

Forum: Instiki – Topic: Shiny new forum

We can type equations

(1)(a b c d)(x y)=0 \fghighlight{red}{\begin{pmatrix}a&b \\ c&d\end{pmatrix}} \begin{pmatrix}x\\ y\end{pmatrix}=0

or put them in SVG graphics

Layer 1 ( a b c d ) ( x y ) = 0 \begin{pmatrix}a&b \ c&d\end{pmatrix} \begin{pmatrix}x\ y\end{pmatrix}=0

or type some code

require 'chunks/chunk'

# Contains all the methods for finding and replacing wiki links.
module WikiChunk
  include Chunk

  # A wiki reference is the top-level class for anything that refers to
  # another wiki page.
  class WikiReference < Chunk::Abstract
	
    # Name of the referenced page
    attr_reader :page_name

    # Name of the referenced page
    attr_reader :web_name

    # the referenced page
    def refpage
      @content.web.page(@page_name)
    end
	
end

and so forth.

Theorem

(Distler’s Theorem). Any given programming task is easier with Rails.