<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lisp on Lorenzo Bolla</title><link>https://lbolla-info.netlify.app/tags/lisp/</link><description>Recent content in Lisp on Lorenzo Bolla</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 09 May 2015 00:00:00 +0000</lastBuildDate><atom:link href="https://lbolla-info.netlify.app/tags/lisp/index.xml" rel="self" type="application/rss+xml"/><item><title>Flycheck checker for Erlang dialyzer</title><link>https://lbolla-info.netlify.app/blog/flycheck-checker-for-erlang-dialyzer/</link><pubDate>Sat, 09 May 2015 00:00:00 +0000</pubDate><guid>https://lbolla-info.netlify.app/blog/flycheck-checker-for-erlang-dialyzer/</guid><description>&lt;p&gt;Emacs Erlang mode misses the definition of a &lt;a href="http://flycheck.readthedocs.org/en/latest/"&gt;flycheck&lt;/a&gt; checker using &lt;a href="http://www.erlang.org/doc/man/dialyzer.html"&gt;dialyzer&lt;/a&gt;. Just add these lines to your &lt;code&gt;.emacs&lt;/code&gt; to enable it:&lt;/p&gt;
&lt;script src="https://gist.github.com/lbolla/c989096bbc0ba31bb834.js"&gt;&lt;/script&gt;
&lt;p&gt;I prefer to use it &lt;em&gt;after&lt;/em&gt; the normal Erlang checker, so I define the following, too:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lisp" data-lang="lisp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(flycheck-add-next-checker &lt;span style="color:#e6db74"&gt;&amp;#39;erlang&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;erlang-dialyzer&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I also wrote another &lt;a href="https://lbolla-info.netlify.app/blog/flycheck-checker-for-flow/"&gt;Flycheck checker&lt;/a&gt; if you are interested.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;</description></item><item><title>Flycheck checker for Flow</title><link>https://lbolla-info.netlify.app/blog/flycheck-checker-for-flow/</link><pubDate>Wed, 19 Nov 2014 00:00:00 +0000</pubDate><guid>https://lbolla-info.netlify.app/blog/flycheck-checker-for-flow/</guid><description>&lt;p&gt;&lt;a href="https://code.prod.facebook.com/posts/1505962329687926/flow-a-new-static-type-checker-for-javascript/"&gt;Yesterday&lt;/a&gt; Facebook open sourced &lt;a href="https://code.prod.facebook.com/posts/1505962329687926/flow-a-new-static-type-checker-for-javascript/"&gt;Flow&lt;/a&gt;, a static type checker for Javascript. If you use &lt;a href="http://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt;, you can use &lt;a href="http://flycheck.readthedocs.org/en/latest/"&gt;Flycheck&lt;/a&gt; to check your .js files on the fly using Flow.&lt;/p&gt;
&lt;p&gt;Here is the checker definition I use:&lt;/p&gt;
&lt;script src="https://gist.github.com/lbolla/476a030ff2fe06445918.js"&gt;&lt;/script&gt;
&lt;p&gt;I prefer to use Flow &lt;em&gt;after&lt;/em&gt; &lt;a href="https://developers.google.com/closure/utilities/docs/linter_howto"&gt;gjslint&lt;/a&gt;, so I define the following, too:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lisp" data-lang="lisp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;(flycheck-add-next-checker &lt;span style="color:#e6db74"&gt;&amp;#39;javascript-gjslint&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;javascript-flow&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I also wrote another &lt;a href="https://lbolla-info.netlify.app/blog/flycheck-checker-for-erlang-dialyzer/"&gt;Flycheck checker&lt;/a&gt; if you are interested.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;</description></item><item><title>Find hyperlinks with lisp</title><link>https://lbolla-info.netlify.app/blog/find-hyperlinks-with-lisp/</link><pubDate>Sun, 24 Oct 2010 00:00:00 +0000</pubDate><guid>https://lbolla-info.netlify.app/blog/find-hyperlinks-with-lisp/</guid><description>&lt;p&gt;Here is a quick-and-dirty script to extract all the unique links from a web page.&lt;/p&gt;
&lt;p&gt;It uses &lt;a href="http://weitz.de/cl-ppcre/"&gt;cl-ppcre&lt;/a&gt; to extract the hyperlinks-like strings from a target string. Tested using &lt;a href="http://weitz.de/drakma/"&gt;drakma&lt;/a&gt; as web client.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;(asdf:oos &amp;#39;asdf:load-op :drakma)
(asdf:oos &amp;#39;asdf:load-op :cl-ppcre)

(defparameter *url-re* &amp;#34;href *= *[&amp;#39;&amp;#34;](\S+)[&amp;#39;&amp;#34;]&amp;#34;)

(defun find-links (str)
 (let ((urls &amp;#39;()))
 (ppcre:do-register-groups
 (u) (*url-re* str nil :start 0 :sharedp t)
 (pushnew u urls :test #&amp;#39;equalp))
 (nreverse urls)))

(print
 (find-links (drakma:http-request &amp;#34;http://lbolla.wordpress.com&amp;#34;)))
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There are 139 links on this page&amp;hellip;&lt;/p&gt;</description></item></channel></rss>