# Recent Posts

409 posts found

 posted 4 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 4 years ago distler 104 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. posted 4 years ago jl345 6 posts edited 4 years ago Forum: Instiki – Topic: Bugs --- instiki-0.19.4/lib/tasks/fixtures.rake.orig Sat Jun 30 19:40:02 2012 +++ instiki-0.19.4/lib/tasks/fixtures.rake Wed Jul 18 01:33:06 2012 @@ -74,7 +74,7 @@ task :import_all => :environment do ActiveRecord::Base.establish_connection Dir.glob(Rails.root.join('dump','fixtures',"*.yml")).each do |f| - table_name = f.gsub( Regexp.escape(Rails.root.join('dump','fixtures').to_s + File::SEPARATOR), '').gsub('.yml', '') + table_name = f.gsub( Rails.root.join('dump','fixtures').to_s + File::Separator, '').gsub('.yml', '') puts "Importing #{table_name}" import_table_fixture(table_name) end  That’s what I have anyways, but be careful, because somehow I got File::SEPARATOR in the wrong case in my bumbling around. I guess I got lucky: File::Separator is defined too, so no harm done. posted 4 years ago distler 104 posts Forum: Instiki – Topic: Bugs If you’ve found a mistake in the rake task, please send me a patch. posted 4 years ago jl345 6 posts Forum: Instiki – Topic: Bugs Ahh! I figured out what went wrong with my PostgresQL import. The tables were just fine in fact; just the last sequence numbers for all the primary keys had all gotten set to one for some reason. It worked fine once I got the sequence numbers adjusted to the last row in each table, so now my installation of Instiki appears to be working great on PostgreSQL. Again, Instiki is an awesome wiki, and I’m already using it to take math notes and such for stuff I have to learn. posted 4 years ago jl345 6 posts Forum: Instiki – Topic: Bugs Hi! I was experimenting around, trying to migrate this wiki to PostgreSQL 9.1.4, following your instructions, and I think there was a little bug in instiki-0.19.4/lib/tasks/fixtures.rake, line 77, where it looks like a string was escaped for a regular expression, but then it was being matched as a literal string with all the extra backslashes. After I think I more or less fixed this, I was able to run $ env RAILS_ENV=production bundle exec rake db:migrate --trace $env RAILS_ENV=production bundle exec rake db:fixtures:import_all --trace Now my database has all the tables in it, populated with rows, and I can view the pages, but when I try to edit a page, there is an error, because it looks like the primary keys were not set up properly on these tables, so I’m still trying to figure this out. Any ideas? (I think I need to make sure there is utf8 support, too…) Thanks! posted 4 years ago jl345 6 posts edited 4 years ago Forum: itex2MML – Topic: weird math fonts I didn’t mean to do that, but you like to make the forum better and better, so all’s well that ends well, I hope… With the STIX fonts, those letters do all look the same, in the curlier script. *** However, I think part of the problem is that the calligraphic BEFHIKLM live in a totally different area of Unicode than the other calligraphic letters. Your ”ℬ” at U+212C certainly doesn’t immediately follow the ”𝒜” at U+1D49C. The very next symbol after ”𝒜” is ”𝒝” (undefined), followed by ”𝒞” and ”𝒟”, because the Unicrats who designed these things in their infinite wisdom ensured that only a portion of the “calligraphic” alphabet was put in a different codepage on an alternate plane of existence, where some fonts may or may not even have glyphs, and the glyph may very well look different, because there is absolutely no assurance in Unicode of any consistency in the way fonts are going to be applied across such vastly different planes of the code space. Why isn’t it possible to put real ASCII letters in a calligraphic font? Seems like it should work but it doesn’t, in my browser anyways:  Probability Space Ω F P  posted 4 years ago distler 104 posts Forum: Heterotic Beast – Topic: MySQL Gotcha If you’re going to use Heterotic Beast in production, you need to be running MySQL 5.5.3 or later, and follow the advice in this blog post. Otherwise, the lack of support for Unicode will come back to bite you. posted 4 years ago distler 104 posts Forum: itex2MML – Topic: weird math fonts P.S.: Congratulations on figuring out how to make this page ill-formed! It took a bit of work to fix the issue. posted 4 years ago admin 58 posts edited 4 years ago Forum: itex2MML – Topic: weird math fonts Perhaps you need to install the STIX fonts (see here for some slightly out-of-date, but still useful instructions). I see those calligraphic letters all set in the same font. And, moreover $ℙ$ and $ℚ$ are set upright (as, for that matter, are $𝔸$ and $𝕓$). Alas, what you see is strongly-dependent on what fonts you have installed. In more detail: On my system, ℬ (U+212C) is available in STIXGeneral, Apple Symbols and Arial Unicode MS. But 𝒜 (U+1D49C) is only available in STIXGeneral. In current versions of Firefox, I believe the default value of font.mathfont-family is MathJax_Main, STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, Asana Math, Symbol, DejaVu Sans, Cambria Math so the version in STIXGeneral is what I see. posted 4 years ago jl345 6 posts edited 4 years ago Forum: itex2MML – Topic: weird math fonts Maybe it’s just general persnicketiness on my part, but why do $\mathrm{ℬℰℱℋℐℒℳℛ}$ appear (in Firefox and rekonq) in a different type than the letters $\mathrm{𝒜𝒞𝒟𝒢𝒥𝒦𝒩𝒪𝒫𝒬𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵}$? And how can I get a letter like $ℙ$ or $ℚ$ to stand upright like $\mathrm{ℙℚ}$ but by itself without getting italicized? (Sorry for the new username. I lost my password and for some reason Yahoo can’t get mail from the forums.) posted 4 years ago jl344 4 posts Forum: itex2MML – Topic: Bugs Good enough then and thank you. I thought $X_a b$ was producing an unacceptable space, but that was just a Firefox peculiarity. posted 4 years ago admin 58 posts Forum: itex2MML – Topic: Bugs That’s a “feature”, not a bug. As described here, $ab$ is a single token in itex (tranlated to ab); $a b$ are two tokens (translated to ab). MathML is semantically-richer than (La)TeX, and this convention gives you the ability to enter multi-character tokens, which will be interpreted as such, when translated to MathML. posted 4 years ago jl344 4 posts Forum: itex2MML – Topic: Bugs Identifiers lumped together in MathML output Example: $X_ab$ produces output ${X}_{\mathrm{ab}}$ X ab Output should be more or less ${X}_{a}b$ $X ab$ Two things wrong with this: first the “b” would never be subscripted in LaTex, and second, two variables should not be lumped in the same  element because this causes MathML to set them in upright rather than italic type. So each variable really needs to be in its own  posted 4 years ago jl344 4 posts Forum: Instiki – Topic: How could I preview/undo changes? Thanks! Nothing wrong with that at all, now that I see how it works. I did find the history after I’d been experimenting for more than half an hour. I’m glad I found this wiki. posted 4 years ago admin 58 posts Forum: Instiki – Topic: How could I preview/undo changes? Every page has a “History”, a “Diff” between successive Revisions, and the ability to Rollback to a prior Revision. Instead of a Preview, successive edits, within 1/2 hour, by the same user, do not create a new Revision. So save your work, as you go and you’ll be able to see your progress and still not lose anything (remember, with other wikis, changes which have been previewed, but not saved, will be lost). posted 4 years ago jl344 4 posts Forum: Instiki – Topic: How could I preview/undo changes? Hi, I’m totally new to the Instiki software, and having just installed it I’m curious as to whether there is a preview and/or some history to make it possible to undo changes. There doesn’t seem to be. I guess I’m just nervous that I’ll inadvertently trash something I’m working on and not be able to get it back. Anyways, I really like the simplicity of potentially being able to quickly edit and put math notes and papers on the web with MathML, and being able to print them out real nice with LaTeX, too. Great work! I haven’t been able to find any other software out there that can do that, except for UniWakka, which unfortunately doesn’t look like it’s being maintained anymore. posted 4 years ago admin 58 posts Forum: Instiki – Topic: Instiki 0.19.4 I’ve released Instiki 0.19.4. This is a security and bugfix release. Everyone should upgrade. posted 4 years ago Bernhard Sta... 4 posts Forum: Instiki – Topic: Bugs Apparently, math is completely broken in Opera 12. I installed Opera 12 today and since then, I’ve been getting “Error parsing MathML: ErrorUnknown source” errors in place of every formula. Firefox works fine, so it’s not a server bug. On http://golem.ph.utexas.edu/wiki/instiki/show/Sandbox I get the error message, while the demos from http://www.mathjax.org/demos/ work without complaint, so I guess it’s an instiki or itex2mml bug - or a bug in Opera, of course. posted 4 years ago Bernhard Sta... 4 posts edited 4 years ago Forum: Instiki – Topic: Feature Requests Sorry for not answering for so long - but I would still like to discuss the feature I wrote about a few months ago. Is this a feature that is implemented somewhere? : Your short description is slightly … underspecified. So looking at an actual implementation would be helpful to me, in deciding whether this is something to implement in Instiki. That’s true, my description is underspecified - it was just some ideas shooting through my head that I didn’t formulate clearly, and I also didn’t research existing approaches. The problem can be described as follows: Both mathematical concepts and their presentation are moving targets. Mathematical notation is developed together with mathematical concepts and is permanently being refined afterwards, as one can witness in the discussions on nLab. Notations are the “interface” through which humans interact with mathematical concepts, so elegant, intuitive, consistent notations are important for understanding them. However, it has been a time-consuming job to keep notations consistent and to update existing work to new notations, effectively impeding the improvement of notation and in the end mathematics itself - at least because of time wasted, and IMO also by suboptimal notation leading to suboptimal intuition. I think that this is a consequence of a deeper problem, namely that authors have to manipulate the presentation of the mathematical concepts they describe. My opinion is that in collaborative mathematics platforms, article authors should rather manipulate the mathematical concepts themselves. TeX-derived typesetting systems are very good at typesetting mathematical notation and should be used for presentation, but when describing mathematical concepts, you shouldn’t be bothered with such details. Rather than using TeX, I’d suggest using syntax customized for the respective field of mathematics. What I wanted to point out is that software for collaborative mathematics platforms like nLab may offer the chance to solve that problem and maybe even endorse improvement of mathematical notation by making a clear distinction between mathematical notation on the one hand, and mathematical presentation on the other hand. Mathematical concepts would be stored using a schema/ontology spanning all fields of mathematics. Mathematical notation (=wiki syntax) defined for each respective field of mathematics could then be used to write about these concepts. The presentation would be implemented using transformation from the schema/ontology to MathML or TeX or whatever. Once there is a mechanism for representing ontologies/schemata of mathematical concepts, it becomes possible for authors to choose any notation offered, or define their own. When the notation is changed to a newer version, automatic migration schemes may enable easier switching to new notation. And as for the presentation, the reader could then himself decide whether he prefers the comma category written using a downwards arrow or a slash. I actually found a project that might have similar aims, namely SWiM. But what I see in the related article doesn’t really look like what I’d expect from a wiki - the source code in the screenshot on page 4 looks worse than LISP, in my eyes. I think that this problem is caused by forcing authors to use some one-size-fits-all notation of OpenMath or similar, so my suggestion should make such a wiki usable. posted 4 years ago mmadsen 5 posts Forum: Instiki – Topic: Installation/Upgrade Issues Thank you for your help! posted 4 years ago admin 58 posts Forum: Instiki – Topic: Installation/Upgrade Issues Launchd doesn’t play well with RVM. There are workarounds, e.g. here. posted 4 years ago mmadsen 5 posts Forum: Instiki – Topic: Installation/Upgrade Issues Or….not quite there yet. irb require iconv is great starting instiki 0.19.3 from the command line is great starting instiki from the plist with launchctl is saying ” Bundler couldn’t find some gems.Did you run bundle install? (RuntimeError)” since it does not give this error when run from the command line, and “ruby bundle install” and bundle update come up clean, I’m assuming that somehow this is running with the wrong context out of the launch daemon plist given multiple rubies in the system under rvm (although the default is set). so I edited the instiki shell script to point to the correct, specific ruby directory, and I still get the same thing in system logs when using launchctl. at all points, launchctl is being executed as unprivileged user, and specifies the same unpriviliged user in the plist file. Has anyone encountered this before? posted 4 years ago mmadsen 5 posts Forum: Instiki – Topic: Installation/Upgrade Issues Fixed. Had two ruby 1.9.2 installations in rvm, one had the iconv stuff fixed, one didn’t. Will try the instiki upgrade again. Thanks for pointing me in the right direction! posted 4 years ago mmadsen 5 posts Forum: Instiki – Topic: Installation/Upgrade Issues require ‘iconv’ returns: 1.9.2p180 :001 > require ‘iconv’ LoadError: no such file to load – iconv from internal:lib/rubygems/custom_require:29:in require' from :29:in require’ from (irb):1 from /usr/local/rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in  ' and when I try to install iconv as a gem: bash-3.2# gem install iconv Fetching: iconv-0.1.gem (100%) Building native extensions. This could take a while… ERROR: Error installing iconv: ERROR: Failed to build gem native extension.  /usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb checking for iconv() in iconv.h… no checking for iconv() in -liconv… no *** extconf.rb failed *** posted 4 years ago admin 58 posts Forum: Instiki – Topic: Installation/Upgrade Issues Hmm. And does # irb > require 'iconv' return 'true'? What does # /usr/bin/env ruby -v return? posted 4 years ago mmadsen 5 posts Forum: Instiki – Topic: Installation/Upgrade Issues Hi, I’m having trouble both upgrading an existing Instiki installation (0.19.1)MML+, and installing a plain vanilla 0.19.3 from github. The issue seems to surround iconv, and none of the solutions or suggestions I’ve tried from googling have worked. The platform is OSX Lion, using Ruby 1.9.2_p180, gcc compiler version: Using built-in specs. Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/src/configure –disable-checking –enable-werror –prefix=/Developer/usr/llvm-gcc-4.2 –mandir=/share/man –enable-languages=c,objc,c++,obj-c++ –program-prefix=llvm- –program-transform-name=/^cg$/s/$/-4.2/ –with-slibdir=/usr/lib –build=i686-apple-darwin11 –enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/dst-llvmCore/Developer/usr/local –program-prefix=i686-apple-darwin11- –host=x86_64-apple-darwin11 –target=i686-apple-darwin11 –with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) The installation of 0.19.3 seems to go well, ruby bundle pulls down everything 0.19.3 requires, but the following occurs upon attempting to start instiki: mark:instiki-0.19.3/ (master)$ ./instiki -p 2501 14:26:37 NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/railties/lib/rails/gem_dependency.rb:21. /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support/inflector.rb:3:in require': no such file to load -- iconv (LoadError) from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support/inflector.rb:3:in (required)>' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb:1:in require' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb:1:in (required)>' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb:2:in require' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support/core_ext/integer.rb:2:in (required)>' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support/core_ext.rb:8:in require' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support/core_ext.rb:8:in block in (required)>' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support/core_ext.rb:8:in each' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support/core_ext.rb:8:in (required)>' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support.rb:56:in require' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/vendor/rails/activesupport/lib/active_support.rb:56:in (required)>' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/script/server:7:in require' from /Users/mark/Dropbox/Research/Instiki/instiki-0.19.3/script/server:7:in (required)>' from ./instiki:6:in load' from ./instiki:6:in 
'
I had previously rebuilt ruby 1.9.2 in rvm, after doing rvm pkg install iconv and rebuilding 1.9.2 pointing at the rvm version of iconv, as suggested online. I’m stumped. Has anyone else seen this? What did you do to solve it? Thanks! posted almost 5 years ago distler 104 posts Forum: Instiki – Topic: Some questions Is there a way to link to a category? My idea is to have a lot of categories, but only link to the most important ones from the homepage. I couldn’t figure out any way to do that. Not sure what you are after. Perhaps you mean to link to the page listing all pages in category ‘foo’. The url for that is /list/foo . Macros for iTex: Is there any way to define per-page or global macros? No. Though this is a much-discussed question. Errors for iTex: So far it seems like if some TeX expression doesn’t work you just get the source rendered, but there is no way to find exactly where the error is. This way if I have a long equation I am left to hunt through the whole thing for the missed bracket or parenthesis. Is there something I’m missing? I agree that itex’s error-reporting is pretty useless. Depending on the type of error (a missed brace bracket, say), LaTeX’s is often not much better. Here, at least, you know which equation to look at for the error, as each equation is parsed separately, and errors can’t spill over as they sometimes do in LaTeX. Linking and/or embedding local files: I am running Instiki locally, but I am syncing the whole thing online, so I can use it from more than one computer. I often use Xournal (on a tablet PC) to take notes/do calculations. While for high-level results, or summaries, Instiki is fine, for long/messy calculations it’s a lot faster to just hand-write them in Xournal. Ideally, I want to be able to link to a Xournal file from Instiki and have some quick way of viewing or editing it. Right now it seems like that the only way is to put a file:/// url, but that requires syncing two things separately, and making sure the url’s make sense on every computer I am using. Look at Instiki’s file upload capability. That probably doesn’t help you very much from the point of view of syncing between different computers (as each Instiki installation will have its own set of uploaded files). Editing SVG graphics: This is something that I’m pretty sure is a bug. It seems like unless there is empty space before and after the svg tags, the “Edit SVG graphic” button doesn’t show up. I think it doesn’t like ”