<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for judofyr</title><link>http://disqus.com/by/judofyr/</link><description></description><atom:link href="http://disqus.com/judofyr/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 24 May 2013 16:36:38 -0000</lastBuildDate><item><title>Re: Lispy Abuse of Ruby: Local Functions - Howard Yeh | Metacircus</title><link>http://metacircus.com/hacking/2011/10/23/lispy-abuse-of-ruby-local-functions.html#comment-907323244</link><description>&lt;p&gt;def flet(&amp;amp;block)&lt;br&gt;  mod = &lt;a href="http://Module.new" rel="nofollow noopener" target="_blank" title="Module.new"&gt;Module.new&lt;/a&gt;&lt;br&gt;  mod.extend(mod)&lt;br&gt;  mod.extend(self) if is_a?(Module)&lt;br&gt;  mod.module_eval(&amp;amp;block)&lt;br&gt;end&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Fri, 24 May 2013 16:36:38 -0000</pubDate></item><item><title>Re: It's official: mruby-browser is now called WebRuby!</title><link>http://qiezi.me/2012/12/11/mruby-browser-is-now-called-webruby/#comment-762798235</link><description>&lt;p&gt;Hey, I'm judofyr.&lt;/p&gt;&lt;p&gt;RubyScript was a (as you said) a weekend hack. I don't think I'll continue developing it. The approach I took (implementing a YARV-interpreter + Ruby-runtime in JS) takes time and I don't really have a use-case for it.&lt;/p&gt;&lt;p&gt;You can have the name if you like.&lt;/p&gt;&lt;p&gt;FYI: "fyr" in Norwegian means "guy" :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Thu, 10 Jan 2013 14:29:45 -0000</pubDate></item><item><title>Re: WikiLeaks offentliggj&amp;oslash;r liste over strategiske installasjoner</title><link>http://www.vg.no/nyheter/utenriks/artikkel.php?artid=10012045#comment-107720943</link><description>&lt;p&gt;Målet med terrorisme er å skape frykt. Man skaper lite frykt ved å ødelegge strategiske ressurser som man relativt lett gjenoppbygge (vanskeligere å sette opp nye nasjonalsymboler). I tillegg er det mye lettere å beskytte disse målene.&lt;/p&gt;&lt;p&gt;Jeg tviler på at det største problemet for terrorister er å finne mulige mål...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Mon, 06 Dec 2010 03:10:11 -0000</pubDate></item><item><title>Re: WikiLeaks offentliggj&amp;oslash;r liste over strategiske installasjoner</title><link>http://www.vg.no/nyheter/utenriks/artikkel.php?artid=10012045#comment-107710480</link><description>&lt;p&gt;Det kalles "journalistikk".&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Mon, 06 Dec 2010 02:53:52 -0000</pubDate></item><item><title>Re: Magnus Holm - Building a Website with Webby</title><link>http://oldblog.judofyr.net/posts/building-a-website-with-webby.html#comment-85241172</link><description>&lt;p&gt;The funny thing is that if you asked me that question today, I would gladly zip the code and send it to you ;)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Fri, 08 Oct 2010 12:20:56 -0000</pubDate></item><item><title>Re: Magnus Holm - About</title><link>http://oldblog.judofyr.net/pages/about.html#comment-67631797</link><description>&lt;p&gt;Just let me know if you want to have the Webby-source, in case you're wondering how I've set it up.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Tue, 10 Aug 2010 16:06:19 -0000</pubDate></item><item><title>Re: Blog Addressing Concerns about Padrino - Padrino Ruby Web Framework</title><link>http://padrinorb.com/blog/addressing-concerns-about-padrino/#comment-43549134</link><description>&lt;p&gt;"Sinatra small"? This is small: &lt;a href="http://github.com/camping/camping/blob/master/lib/camping.rb" rel="nofollow noopener" target="_blank" title="http://github.com/camping/camping/blob/master/lib/camping.rb"&gt;http://github.com/camping/c...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Tue, 06 Apr 2010 18:13:51 -0000</pubDate></item><item><title>Re: Magnus Holm - Use the Gemspec</title><link>http://oldblog.judofyr.net/posts/gemspecs.html#comment-43155611</link><description>&lt;p&gt;Of course, if someone does eval("Gem::&lt;a href="http://Specification.new" rel="nofollow noopener" target="_blank" title="Specification.new"&gt;Specification.new&lt;/a&gt;{ ... }") there's not much we can do, but we can still handle the common case.&lt;/p&gt;&lt;p&gt;Just feed it into a Ruby parser. When it sees "Gem::&lt;a href="http://Specification.new" rel="nofollow noopener" target="_blank" title="Specification.new"&gt;Specification.new&lt;/a&gt; |s|" it knows the s binds to the specification object. When it sees "s.version = '1.0.0'" it knows the version is a literal. When it sees "s.version = Bundler::VERSION" it knows the version is an expression. This will probably work for ~ 99% of all gemspecs.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Sun, 04 Apr 2010 08:39:44 -0000</pubDate></item><item><title>Re: Magnus Holm - Use the Gemspec</title><link>http://oldblog.judofyr.net/posts/gemspecs.html#comment-43088979</link><description>&lt;p&gt;I'm an optimist, so I believe this is a perfectly solvable problem. I'll probably give it a try some time.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Sat, 03 Apr 2010 16:14:06 -0000</pubDate></item><item><title>Re: Magnus Holm - Continue that exception</title><link>http://oldblog.judofyr.net/posts/never-gonna-let-you-go.html#comment-30327825</link><description>&lt;p&gt;Hammertime was definitely what inspired me to write #continue :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Tue, 19 Jan 2010 02:15:54 -0000</pubDate></item><item><title>Re: Magnus Holm - Temple</title><link>http://oldblog.judofyr.net/posts/temple.html#comment-26255553</link><description>&lt;p&gt;Defining a method would only work if (a) a few templates are used a lot and/or (b) you can serve different shops on different servers based on which template they use (so you can define a few templates on each server). Probably not worth it though.&lt;/p&gt;&lt;p&gt;Interesting indeed. Do you have any numbers (and want to share them) of how much time rendering takes in Shopify? How do you serialize the templates now? Marshal.dump on the @nodelist? How is performance in 1.9.0 compared with 2.0? This benchmark &lt;a href="http://blog.nathanielbibler.com/post/59611286/slightly-better-performance-in-ruby-liquid-1-9-0" rel="nofollow noopener" target="_blank" title="http://blog.nathanielbibler.com/post/59611286/slightly-better-performance-in-ruby-liquid-1-9-0"&gt;http://blog.nathanielbibler...&lt;/a&gt; shows that Erubis is ~ 100 times faster than Liquid on a simple for-loop, but if it's only a fraction of the total response time, it might not matter so much.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Fri, 18 Dec 2009 14:07:17 -0000</pubDate></item><item><title>Re: Magnus Holm - Moving to Nginx</title><link>http://oldblog.judofyr.net/posts/moving-to-nginx.html#comment-26254578</link><description>&lt;p&gt;Yeah, yeah, yeah. It's not my fault Passenger didn't worked with Nginx for a loooooong time. Feel free to upgrade it yourself, if you make sure everything else works too…&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Fri, 18 Dec 2009 13:53:54 -0000</pubDate></item><item><title>Re: Magnus Holm - Temple</title><link>http://oldblog.judofyr.net/posts/temple.html#comment-25867770</link><description>&lt;p&gt;I disagree.&lt;/p&gt;&lt;p&gt;It can be run through eval, you just have to make sure the user can't put any malicous Ruby in the string. Look at Mustache - it's perfectly safe to let any user edit the mustache-files (aside from the fact that it currently has no protection to {{exit}}, but that's like a two-line patch in context.rb).&lt;/p&gt;&lt;p&gt;Just take the compiled template and store it. It's a string - fits perfect for any DB/cache. I'm pretty sure eval is faster than deserialize + render. As a string, it would also be possible to cache hot templates locally (by defining them as a method).&lt;/p&gt;&lt;p&gt;Oh, and Liquid has a quite simple syntax, but lots of little quirks too. Supports both foo[0] and &lt;a href="http://foo.bar" rel="nofollow noopener" target="_blank" title="foo.bar"&gt;foo.bar&lt;/a&gt;, even though it's not documented anywhere. Why is "nil &amp;gt;= 0 or nil &amp;lt; 0" false? Why are filters checked at render-time, not compile-time? Do you somehow run the same template under different filters? Why do you parse "&lt;a href="http://foo.bar" rel="nofollow noopener" target="_blank" title="foo.bar"&gt;foo.bar&lt;/a&gt;" at render-time too?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Tue, 15 Dec 2009 14:07:59 -0000</pubDate></item><item><title>Re: Magnus Holm - Parkaby</title><link>http://oldblog.judofyr.net/posts/parkaby.html#comment-12174576</link><description>&lt;p&gt;Erector is a lot faster than Tagz, but still far behind Parkaby. How far? Well, it all depends on how deeply you nest your blocks...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Sun, 05 Jul 2009 12:50:53 -0000</pubDate></item><item><title>Re: Magnus Holm - Parkaby</title><link>http://oldblog.judofyr.net/posts/parkaby.html#comment-12174545</link><description>&lt;p&gt;Man, there's so much awesome code hiding in GitHub! You have even implemented indentation and concat_emit_fcalls! I couldn't get it faster than Erubis though, but it's still impressing. I might have to steal some of your code ;)&lt;/p&gt;&lt;p&gt;As for 1.9, thanks to RubyParser it's possible to use Parkaby as long as you store the code in a string/file, so there shouldn't be any problem running it on Rails at least.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Sun, 05 Jul 2009 12:49:07 -0000</pubDate></item><item><title>Re: Magnus Holm - Copy'n'Paste</title><link>http://oldblog.judofyr.net/posts/copy-paste-irb.html#comment-10526038</link><description>&lt;p&gt;Weird. It appears to be a bug in RedCloth which doesn't handle &amp;lt;notextile&amp;gt; properly...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Fri, 05 Jun 2009 13:12:01 -0000</pubDate></item><item><title>Re: http://blog.rubybestpractices.com/posts/gregory/welcome.html</title><link>http://blog.rubybestpractices.com/posts/gregory/welcome.html#comment-8233606</link><description>&lt;p&gt;In case you're still in the dark: &lt;a href="http://gist.github.com/" rel="nofollow noopener" target="_blank" title="http://gist.github.com/"&gt;http://gist.github.com/&lt;/a&gt; is a Pastie-clone powered by Git (developed by the GitHub guys) :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Wed, 15 Apr 2009 13:31:43 -0000</pubDate></item><item><title>Re: Magnus Holm - Copy Folders to a Branch</title><link>http://oldblog.judofyr.net/posts/copy-folders-to-a-branch.html#comment-5845102</link><description>&lt;p&gt;Well, the idea was that branch, push_to, repo and message are settings, and will overwrite the previous value; while directory, file, keep and keep_all are DSL for describing actions (and is stackable).&lt;/p&gt;&lt;p&gt;It does makes sense to alias #branch to #branch= etc. though.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Wed, 04 Feb 2009 16:22:28 -0000</pubDate></item><item><title>Re: Magnus Holm - Tailin' Ruby</title><link>http://oldblog.judofyr.net/posts/tailin-ruby.html#comment-5550185</link><description>&lt;p&gt;Oh, thanks! Should be fixed now :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Mon, 26 Jan 2009 11:05:36 -0000</pubDate></item><item><title>Re: Magnus Holm - When in Doubt, Turn to _why</title><link>http://oldblog.judofyr.net/posts/when-in-doubt.html#comment-5479208</link><description>&lt;p&gt;Good to know (all of the things you mentioned)!&lt;/p&gt;&lt;p&gt;I've updated the post with the correct Sinatra solution and proper credits to Michael Fellinger :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Thu, 22 Jan 2009 17:47:54 -0000</pubDate></item><item><title>Re: stuff - ruby - Case Or Hash</title><link>http://stuff.lilleaas.net/case_or_hash#comment-4829101</link><description>&lt;p&gt;If you're really going to use a Hash, why don't just set the default_path as a default?&lt;/p&gt;&lt;p&gt;DOMAIN_MAPPINGS.default = "&lt;a href="http://default.com" rel="nofollow noopener" target="_blank" title="http://default.com"&gt;http://default.com&lt;/a&gt;"&lt;br&gt;...&lt;br&gt;redirect_to DOMAIN_MAPPINGS[request.domain]&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Fri, 02 Jan 2009 07:58:04 -0000</pubDate></item><item><title>Re: The Exciter - Getting Webby With It</title><link>http://theexciter.com/articles/getting-webby-with-it.html#comment-4726931</link><description>&lt;p&gt;Welcome to the club!&lt;/p&gt;&lt;p&gt;But seriously, why not just write --- in stead of #{'-'*3}? :P&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Mon, 29 Dec 2008 11:51:28 -0000</pubDate></item><item><title>Re: Build your own compiler in Ruby with LLVM
      -
      macournoyer's blog</title><link>http://macournoyer.com/blog/2008/12/09/orange/#comment-4311315</link><description>&lt;p&gt;Cool stuff. How would you implement a global variable? Now you assign the variables to the block (in a function), can you do something similar but assign it to the module? Or can functions load each others variables/pointers?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Wed, 10 Dec 2008 12:17:24 -0000</pubDate></item><item><title>Re: Magnus Holm - Building a Website with Webby</title><link>http://oldblog.judofyr.net/posts/building-a-website-with-webby.html#comment-3171060</link><description>&lt;p&gt;Yeah, Webby is really cool, even though this writeup is starting to get cold. And your design is really one of those I wish were mine :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Mon, 20 Oct 2008 13:06:35 -0000</pubDate></item><item><title>Re: Magnus Holm - It's a Gash, Gash, Gash</title><link>http://oldblog.judofyr.net/posts/its-a-gash-gash-gash.html#comment-2999960</link><description>&lt;p&gt;Well, I'm using code from git-shelve, so until Michael Siebert changes that license to MIT or allows me to release my, slightly modified, version as MIT there's not much I can do.&lt;/p&gt;&lt;p&gt;I'll send him an email, and we'll see how far we can get :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnus Holm</dc:creator><pubDate>Sat, 11 Oct 2008 14:45:32 -0000</pubDate></item></channel></rss>