# Recent Posts

314 posts found

 posted 2 years ago Andrew Stacey 118 posts Forum: Heterotic Beast – Topic: Bugs Is the colour of the icon next to the forum title meant to tell me if there’s new stuff there? If so, it’s not always in sync. posted 2 years ago Andrew Stacey 118 posts edited 2 years ago Forum: Instiki – Topic: nlab I was blocking them at the Apache level. That seemed to be what you were complaining about! Maybe I misunderstood. I can understand list being so big, but atom_with_content is limited to the last … whatever … revisions, so that shouldn’t be so big, should it? (I think that to get a better picture from the logs then I need to figure out a way to distinguish those that got cached from those that needed a serious operation. But as I’m back on “vanilla” instiki, my hacks to allow this have been taken out.) Incidentally, the nLab had crashed when I came in this morning, but it’s been running fairly stably all day. So that might just have been first night jitters (or the rampaging googlebot that came through at about midnight). posted 2 years ago admin 54 posts edited 2 years ago Forum: Instiki – Topic: nlab But it didn’t crash, or become otherwise unresponsive. Which is better than what you were doing before your “clean” install. Some actions, like list, are $O\left(N\right)$. With a Wiki your size, they will take a long time to complete1. If you want prevent people from calling the list action (or other $O\left(N\right)$ actions), I suggest blocking/redirecting it at the Apache level. I assume you know how to use mod_rewrite to good effect. But it appears that the nLab operates acceptably, even when you allow such actions. Incorporating will_paginate (which is used by Heterotic Beast, for just this reason) in those actions will make them $O\left(1\right)$, again. ↩ posted 2 years ago Andrew Stacey 118 posts edited 2 years ago Forum: Instiki – Topic: nlab Okay, so after a day’s trading at the nLab, here are the closing prices. This is with nothing disabled. atom_with_content: 192 requests, 176 taking less than 10s to process, 16 taking 50s to process. list: 6 requests, 2 taking less than 10s to process, 4 taking 5 minutes to process. Total number of requests: 4223, breakdown of time taken to process (rounded down to nearest 10s):  0: 4142 1: 47 2: 8 3: 3 4: 1 5: 17 6: 1 7: 1 30: 1 31: 2 32: 1 So those atom_with_content and list are a major part of the requests that take longer than 30s to deliver. posted 2 years ago distler 72 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 2 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Feature Requests Okay. So simpler just to have separate copies of the code. I guess what I’m stumbling around with this is some way to make the update cycle a little simpler. At the moment, I update a live instiki installation from golem, and with the ruby bundle step as well, then the update can take a noticeable length of time. What would be better would be to pull the changes to an offline copy on that machine, then update the live versions from the offline copy. I can easily do that with the bzr stuff, but how would it work with the gems? Perhaps if the live versions weren’t bzr repositories but were more simply synced with the offline version in some fashion (thinking a bit like how rsync works). Hmm, so the workflow would be: Pull the latest instiki revisions to the “dead” code Run ruby bundle on that Copy any updated files from the “dead” version to the live versions, being sure not to clobber anything special Restart instiki on the live versions would that work, do you think? Or is this another case of me thinking something is important which really isn’t. posted 2 years ago Andrew Stacey 118 posts edited 2 years ago Forum: Instiki – Topic: nlab I have a script that exports the day’s revisions to a set of bzr repositories (this is to make it easier for people to keep incremental backups of their webs). I haven’t reinstalled it as a cron job yet, and again I can run it manually. Root has its usual cron jobs (at least, it does now: in the installed image then it doesn’t run them but lets anacron do it, which is fine except that on a server, anacron isn’t running; however, cron just checks for the existence of anacron, not whether or not it is running). But that’s all. posted 2 years ago distler 72 posts edited 2 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 2 years ago distler 72 posts edited 2 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 2 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Feature Requests Is the following possible? I tried a couple of things, but don’t know enough to know if what I tried was all that there was. Given that instiki can be installed as a gem, can I install a system-wide version of the code and then run it as a user, with each user having their own separate instiki process, but sharing the code? posted 2 years ago Andrew Stacey 118 posts edited 2 years ago Forum: Instiki – Topic: nlab I’ve now upgraded the nLab server and reinstalled everything. In particular, I pulled a fresh copy of instiki from the repository and made only two changes: Using mysql as the database Disabled the DNSBL spam check In particular, I’m not mucking about with the logs just yet. We’ll see how this goes for now. Now, should I enable the daily check on the instiki source code, or shall I keep that off for the time being and update manually? posted 2 years ago distler 72 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 2 years ago Andrew Stacey 118 posts Forum: Heterotic Beast – Topic: Bugs This place doesn’t seem to remember me at the moment. *sigh* posted 2 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Feature Requests Ah, another UK/US distinction. Something that is a “dummy” is not necessarily “dumb”. A “dummy” simply means a fake (although it’s not as pejorative), a “stand in”. Had I meant to be rude, I would have said “dumb CSS classes”. posted 2 years ago distler 72 posts edited 2 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 2 years ago distler 72 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 2 years ago distler 72 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 2 years ago Andrew Stacey 118 posts Forum: Heterotic Beast – Topic: Feature Requests I was just thinking that if only the post itself was tagged with the edit then it wouldn’t be clear to someone reading the end of the thread that something earlier had been changed. Having it sorted by “updated_at” would fix this, but at too great a cost, I think. The extra line was meant to mitigate this without resorting the posts. You’re right that the guest user doesn’t have an empty password. The script has to know guest’s password. posted 2 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Feature Requests Yes, it worked! And to finish the thought, since I’m generating this from a LaTeX source, it can automatically handle adding the dummy CSS classes. posted 2 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Feature Requests Actually, I’m going the other way. I’m going from LaTeX to Instiki. So the source file has \label{foo} and \ref{foo} in it already and in the LaTeX output then it gets converted to “In (2) we saw that …”. So there’s nothing in the source to put as the text in the anchor and something has to be put in its place. Thus my thinking was to subvert the maruku counter-counting to figure out what text should go there. Putting a class .num_enuma on each element of the list makes maruku think that there is a list to be counted there and so it converts the \ref{foo} to the correct hyperlinked text. If you’re using maruku here, this should work: The first item. The second item. Now we should be able to refer to 1 and 2. I won’t know if that worked until I save the reply, though! Anyway, it certainly does work on Instiki. I don’t need another list in the CSS because the counters are already produced by the browser working on the list. All I need is for maruku to count the entries in the list, and for that I just need the dummy num_X classes. You’re right that I need one per list, but that shouldn’t be that many on any given page. (Okay, time to see if that list worked.) posted 2 years ago distler 72 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. The IAL on the list-item doesn’t get converted to a \label{foo} on the \item in the LaTeX output. 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 2 years ago distler 72 posts edited 2 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 2 years ago distler 72 posts Forum: Instiki – Topic: Bugs Ah, that’s unfortunate. What other markdown engines are available for Ruby? There are several. There’s rdiscount, based on discount. There’s BlueCloth, which was the “original” Markdown interpreter for Ruby, which sucked bigtime. But Bluecloth 2.x has been rewritten to use discount. 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 2 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Feature Requests Just tested adding IALs to lists. Definitely useful, but I’d add one minor modification: the ability to use \ref to refer back to list elements (at the very least, to enumerated list elements). So 1. {: #first} The first item The first item was \ref{first} would work. At the moment, I have a hack that uses the numbering system for theorems and so forth to get this to work, putting the class .num_enumX (X increments with the enumerate environment so that each is unique) on a +-- ... =-- div at the top of the list element. This seems to be enough to trigger the internal maruku counter and so make \ref{...} work. It’d be great if this were done automatically without that hack. posted 2 years ago Andrew Stacey 118 posts 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 Subcategories aren’t really hierarchical in the code, just in the layout. So “per category” doesn’t descend to categories (unless I’m misremembering … I did code this part so I ought to know!). On the nForum, then the allowed category is “nLab - Latest Changes”. To avoid spam, the person has to solve a reCaptcha to post. 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) there’s no obvious “Put your name here” field (one has to put it in the post itself). Nonetheless, it works reasonably well and means that people can leave short messages about nLab pages without having to sign up. Regarding the roles, I’d want something in between moderator and user. On the nForum, then some users have slightly more “power” with regard to organising the place. They don’t have full moderator power, so can’t edit others’ posts and so forth, but they can move posts from one category to another, or similar simple things. 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. posted 2 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Bugs Incidentally, I got around my immediate indentation problem, so you can consider that one downgraded! posted 2 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Bugs Ah, that’s unfortunate. What other markdown engines are available for Ruby? If you’re actively looking, I could run some searches on the nLab pages to see what syntax is used and what isn’t. I do think that the attribute stuff is a brilliant addition; it makes it possible to make the pages a little more easily customised. posted 2 years ago Andrew Stacey 118 posts Forum: Instiki – Topic: Feature Requests Ah, number 2 is fantastic. I hadn’t spotted that (I’ve been particularly bad at monitoring the RSS feeds since my feed reader blew up). I’ll try that. posted 2 years ago distler 72 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 2 years ago admin 54 posts Forum: Heterotic Beast – Topic: Bugs Let’s discuss bugs in Heterotic Beast.