Recent Posts by jl345

Subscribe to Recent Posts by jl345 6 posts found

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
jl345 6 posts

edited 2 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 2 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 2 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 2 years ago
jl345 6 posts

edited almost 2 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:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Probability Space</title></head>
<body>
<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mfenced>
    <mi>Ω</mi>
    <mi mathvariant='script'>F</mi>
    <mi mathvariant='double-struck'>P</mi>
  </mfenced>
</math>
</body>
</html>`
 
posted 2 years ago
jl345 6 posts

edited 2 years ago

Forum: itex2MML – Topic: weird math fonts

Maybe it’s just general persnicketiness on my part, but why do ℬℰℱℋℐℒℳℛ appear (in Firefox and rekonq) in a different type than the letters 𝒜𝒞𝒟𝒢𝒥𝒦𝒩𝒪𝒫𝒬𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵? And how can I get a letter like or to stand upright like ℙℚ 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.)