<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>pvaneynd</title>
  <link>https://pvaneynd.dreamwidth.org/</link>
  <description>pvaneynd - Dreamwidth Studios</description>
  <lastBuildDate>Thu, 30 Mar 2017 07:19:10 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>pvaneynd</lj:journal>
  <lj:journaltype>personal</lj:journaltype>
  <image>
    <url>https://v2.dreamwidth.org/7693145/447974</url>
    <title>pvaneynd</title>
    <link>https://pvaneynd.dreamwidth.org/</link>
    <width>76</width>
    <height>100</height>
  </image>

<item>
  <guid isPermaLink='true'>https://pvaneynd.dreamwidth.org/153920.html</guid>
  <pubDate>Thu, 30 Mar 2017 07:19:10 GMT</pubDate>
  <title>20 years of UNICODE for the win?</title>
  <link>https://pvaneynd.dreamwidth.org/153920.html</link>
  <description>As some of you know I&apos;m back to coding. This morning I was trying to create a SQL table which failed with mysterious errors, like:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;DB=&amp;gt; CREATE TABLE sequence (
 sequence_id INTEGER NOT NULL,
 guid_id INTEGER REFERENCES public.guid(id),
 sequence_number INTEGER NOT NULL);
ERROR:  relation &quot;public.guid&quot; does not exist
Time: 3.007 ms
DB=&amp;gt; \dt guid
        List of relations
 Schema | Name | Type  |  Owner
--------+------+-------+----------
 public | guid | table | pevaneyn
(1 row)&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;I was suspecting a hidden character, so &lt;tt&gt;od&lt;/tt&gt; to the rescue:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;$ od -c failing-command
...
0000140   i   d       I   N   T   E   G   E   R       R   E   F   E   R
0000160   E   N   C   E   S     357 273 277   g   u   i   d   (   i   d
...
&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Octal 357 273 277? Clearly this is UTF-8 encoding of something invisible. Let&apos;s use &lt;a href=&quot;http://clisp.org/&quot;&gt;clisp&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;[1]&amp;gt; CUSTOM:*TERMINAL-ENCODING*
#&amp;lt;ENCODING CHARSET:UTF-8 :UNIX&amp;gt;
[2]&amp;gt; (EXT:CONVERT-STRING-FROM-BYTES (vector #o357 #o273 #o277) CUSTOM:*TERMINAL-ENCODING*)
&quot;&quot;
[3]&amp;gt; (aref (EXT:CONVERT-STRING-FROM-BYTES (vector #o357 #o273 #o277) CUSTOM:*TERMINAL-ENCODING*) 0)
#\ZERO_WIDTH_NO-BREAK_SPACE

Ok an invisible space got inserted somewhere along the line... At least I&apos;m not getting mad and forgetting basic SQL :)&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=pvaneynd&amp;ditemid=153920&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://pvaneynd.dreamwidth.org/153920.html</comments>
  <category>common-lisp</category>
  <category>opensource</category>
  <lj:mood>relieved</lj:mood>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://pvaneynd.dreamwidth.org/153364.html</guid>
  <pubDate>Fri, 23 Oct 2015 04:30:10 GMT</pubDate>
  <title>waisting some CPU time</title>
  <link>https://pvaneynd.dreamwidth.org/153364.html</link>
  <description>Given &lt;a href=&quot;https://freedom-to-tinker.com/blog/haldermanheninger/how-is-nsa-breaking-so-much-crypto/&quot;&gt;some people having rainbow tables&lt;/a&gt;  I&apos;m now waisting a lot of cpu time doing:

&lt;tt&gt;&lt;pre&gt;for i in 2046 3072 4096 6144 7680 8192 ; do 
  ssh-keygen -G moduli-$i.candidates -b $i 
  ssh-keygen -T moduli-$i -f moduli-$i.candidates 
done
mv /etc/ssh/moduli /etc/ssh/moduli-normal
cat moduli-[23478]* &amp;gt; /etc/ssh/moduli
systemctl restart ssh.service
&lt;/pre&gt;&lt;/tt&gt;

This should give me brand-new primes, used only by me. So even if &apos;bad people&apos; spend a lot of time and money hacking the 20 odd 2048-bit primes distributed with ssh, I would be ... higher on their target list?&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=pvaneynd&amp;ditemid=153364&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://pvaneynd.dreamwidth.org/153364.html</comments>
  <category>opensource</category>
  <category>crypto</category>
  <category>life</category>
  <lj:security>public</lj:security>
  <lj:reply-count>4</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://pvaneynd.dreamwidth.org/152374.html</guid>
  <pubDate>Fri, 04 Jul 2014 07:04:19 GMT</pubDate>
  <title>A tale of four disks</title>
  <link>https://pvaneynd.dreamwidth.org/152374.html</link>
  <description>A had a long string of problems with our server at home...

&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://pvaneynd.dreamwidth.org/152374.html#cutid1&quot;&gt;Read more...&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=pvaneynd&amp;ditemid=152374&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://pvaneynd.dreamwidth.org/152374.html</comments>
  <category>storage</category>
  <category>life</category>
  <category>opensource</category>
  <category>zfs</category>
  <lj:mood>accomplished</lj:mood>
  <lj:security>public</lj:security>
  <lj:reply-count>1</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://pvaneynd.dreamwidth.org/152129.html</guid>
  <pubDate>Fri, 18 Apr 2014 12:41:36 GMT</pubDate>
  <title>Finding a new line in a file</title>
  <link>https://pvaneynd.dreamwidth.org/152129.html</link>
  <description>Today I helped a collegue who came with the question: &lt;i&gt;I have two files, how do I find which lines were added to one file, but not to the other?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;He was thinking of a program to write. I&apos;m more a KISS person, why waste time writing a program when brute force will do &lt;i&gt;just fine&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;So:&lt;br /&gt;&lt;br /&gt;We have two files &lt;b&gt;a&lt;/b&gt; and &lt;b&gt;b&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;
pevaneyn@mac-book:/tmp :) $ cat a
1
2
3
4
5
pevaneyn@mac-book:/tmp :) $ cat b
1
2
3
4
5
7
8&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;We want to see the lines in &lt;b&gt;b&lt;/b&gt; which are not in &lt;b&gt;a&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;pevaneyn@mac-book:/tmp :) $ cat a b | sort | uniq -u
7
8&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;So we take the two files, sort then and then print the unique lines.&lt;br /&gt;&lt;br /&gt;But what if there are also unique lines in a which we don&apos;t need? So let&apos;s add a line to 0 which we do not want to see in the output:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;pevaneyn@mac-book:/tmp :) $ cat &amp;gt;&amp;gt; a
0
pevaneyn@Pmac-book:/tmp :) $ cat a b | sort | uniq -u
0
7
8&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;How do we remove this 0?&lt;br /&gt;&lt;br /&gt;A trick is to include &lt;b&gt;a&lt;/b&gt; twice, then a line in a will never be unique:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;pevaneyn@mac-book:/tmp :) $ cat a a b | sort | uniq -u
7
8&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;I used a similar method today to find which interface gave the CRC errors...&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=pvaneynd&amp;ditemid=152129&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://pvaneynd.dreamwidth.org/152129.html</comments>
  <category>life</category>
  <category>work</category>
  <category>tricks</category>
  <category>opensource</category>
  <lj:mood>happy</lj:mood>
  <lj:security>public</lj:security>
  <lj:reply-count>2</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://pvaneynd.dreamwidth.org/152036.html</guid>
  <pubDate>Mon, 07 Apr 2014 06:49:41 GMT</pubDate>
  <title>Old versus new</title>
  <link>https://pvaneynd.dreamwidth.org/152036.html</link>
  <description>For a side project at $WORK I need to plot some data.&lt;br /&gt;&lt;br /&gt;In the past I used &lt;a href=&quot;http://www.gnuplot.info/&quot;&gt;gnuplot&lt;/a&gt; but as I wanted to interactively investigate the data I wrote a GUI browser in &lt;a href=&quot;http://clojure.org/&quot;&gt;Clojure&lt;/a&gt;. This was relatively easy and fast enough.&lt;br /&gt;&lt;br /&gt;But I&apos;ve been told that I&apos;m not with the new hotness and that I should investigate doing this in the browser. So I found the pretty impressive &lt;a href=&quot;http://dygraphs.com/&quot;&gt;dygraphs&lt;/a&gt; javascript library.&lt;br /&gt;&lt;br /&gt;The plots look fantastic and are really what I need. So I make my first html5 like page and tried it.&lt;br /&gt;&lt;br /&gt;At first I thought that something was wrong. If I do this plot with gnuplot I get:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;$ time gnuplot plot.gnuplot

real	0m0.818s
user	0m0.608s
sys	0m0.209s&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;In Safari it took &lt;b&gt;22 minutes&lt;/b&gt;, while showing a beachball all the time, to plot this data. Chrome and Firefox do it quite a bit better at only two minutes, but still... not subsecond is it? Using the &apos;canvas&apos; html5 terminal in gnuplot produces 14M html file which only takes something lik 20 seconds to get drawn in all browsers.&lt;br /&gt;&lt;br /&gt;But I must admit that the default look and interactivity of dygraph is lightyears ahead of my gnuplot settings...&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=pvaneynd&amp;ditemid=152036&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://pvaneynd.dreamwidth.org/152036.html</comments>
  <category>opensource</category>
  <category>work</category>
  <category>gnuplot</category>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://pvaneynd.dreamwidth.org/148844.html</guid>
  <pubDate>Sat, 04 Feb 2012 16:13:17 GMT</pubDate>
  <title>IPv6 versus IPv4 at fosdem :S</title>
  <link>https://pvaneynd.dreamwidth.org/148844.html</link>
  <description>&lt;img src=&quot;http://img2.ipv6-test.com/speedtest/result/2012/02/04/aeaec0ede84118f02b20a202c40e3857.png&quot;&gt;&lt;br /&gt;&lt;br /&gt;how so?&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;pevaneyn-mac:wireshark pevaneyn$ traceroute v4.fr.ipv6-test.com
traceroute to v4.fr.ipv6-test.com (46.105.61.149), 64 hops max, 52 byte packets
 1  193.191.79.254 (193.191.79.254)  6.215 ms  0.282 ms  0.244 ms
 2  ge.ar1.brucam.belnet.net (193.191.4.49)  0.350 ms  0.325 ms  0.365 ms
 3  10ge.cr2.bruvil.belnet.net (193.191.16.189)  1.143 ms  0.964 ms  0.994 ms
 4  ovh.bnix.net (194.53.172.70)  2.396 ms  1.900 ms  1.942 ms
 5  rbx-g2-a9.fr.eu (94.23.122.137)  5.712 ms  4.725 ms  4.794 ms
 6  rbx-2-6k.fr.eu (91.121.131.9)  10.489 ms  15.149 ms
    rbx-1-6k.fr.eu (91.121.131.13)  50.591 ms
 7  rbx-26-m1.fr.eu (213.251.191.201)  4.448 ms
    rbx-26-m1.routers.ovh.net (213.251.191.73)  4.754 ms  4.996 ms
 8  eight.t0x.net (46.105.61.149)  3.950 ms  3.975 ms  4.067 ms
pevaneyn-mac:wireshark pevaneyn$ traceroute6 v6.fr.ipv6-test.com
traceroute6 to v6.fr.ipv6-test.com (2001:41d0:1:d87c::7e57:1) from 2001:6a8:1100:beef:114f:fb76:XXXX:XXXX, 64 hops max, 12 byte packets
 1  2001:6a8:1100:beef::1  0.558 ms  0.674 ms  0.507 ms
 2  2001:6a8:1000:800f::1  0.370 ms  0.414 ms  0.393 ms
 3  10ge.cr2.bruvil.belnet.net  1.106 ms  1.112 ms  1.034 ms
 4  ae0-200.bru20.ip6.tinet.net  1.620 ms  1.572 ms  1.523 ms
 5  xe-2-1-0.ams20.ip6.tinet.net  6.063 ms
    xe-5-2-0.ams20.ip6.tinet.net  5.999 ms
    xe-8-1-0.ams20.ip6.tinet.net  6.002 ms
 6  * * *
 7  * * *
 8  * * *
 9  fra-5-6k.de.eu  25.602 ms *  30.531 ms
10  rbx-g2-a9.fr.eu  31.890 ms  27.448 ms  26.656 ms
11  rbx-1-6k.fr.eu  29.996 ms
    rbx-2-6k.fr.eu  33.715 ms
    rbx-1-6k.fr.eu  26.735 ms
12  2001:41d0:1:d87c::7e57:1  25.498 ms  31.873 ms  30.815 ms
&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;So a trip around Europe. But IPv6 needs not be slow:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;pevaneyn-mac:fosdem pevaneyn$ traceroute6 www.debian.org
traceroute6: Warning: www.debian.org has multiple addresses; using 2001:858:2:2:214:22ff:fe0d:7717
traceroute6 to www.debian.org (2001:858:2:2:214:22ff:fe0d:7717) from 2001:6a8:1100:beef:114f:fb76:XXXX:XXXX, 64 hops max, 12 byte packets
 1  2001:6a8:1100:beef::1  0.640 ms  1.731 ms  0.607 ms
 2  2001:6a8:1000:800f::1  0.491 ms  0.356 ms  0.387 ms
 3  2001:6a8:1000:2::2  0.442 ms
    10ge.cr2.bruvil.belnet.net  1.081 ms  0.989 ms
 4  10ge.cr1.brueve.belnet.net  1.979 ms
    10ge.cr1.brueve.belnet.net  1.718 ms  1.479 ms
 5  20gigabitethernet1-3.core1.ams1.ipv6.he.net  4.766 ms  8.460 ms  7.190 ms
 6  10gigabitethernet1-1.core1.fra1.he.net  16.977 ms  20.783 ms  11.835 ms
 7  ge2-19-decix-ipv6-c1.ix.sil.at  70.823 ms  42.928 ms  45.012 ms
 8  2001:858:66:203:215:2cff:fe8d:bc00  27.416 ms  26.934 ms  28.561 ms
 9  ip6-te1-4-c2.oe3.sil.at  26.776 ms  26.413 ms  26.856 ms
10  2001:858:66:22c:217:fff:fed4:6000  27.156 ms  27.472 ms  26.778 ms
11  englund.debian.org  27.211 ms  27.641 ms  27.823 ms
pevaneyn-mac:fosdem pevaneyn$ traceroute www.debian.org
traceroute: Warning: www.debian.org has multiple addresses; using 86.59.118.148
traceroute to www.debian.org (86.59.118.148), 64 hops max, 52 byte packets
 1  193.191.79.254 (193.191.79.254)  0.619 ms  0.254 ms  0.255 ms
 2  ge.ar1.brucam.belnet.net (193.191.4.49)  0.432 ms  0.385 ms  0.448 ms
 3  10ge.cr1.brueve.belnet.net (193.191.16.205)  1.153 ms  1.557 ms  0.951 ms
 4  nl-asd-dc2-ias-csg01.nl.kpn.net (195.69.144.144)  5.608 ms  5.442 ms  10.251 ms
 5  * * *
 6  ffm-s1-rou-1021.de.eurorings.net (134.222.229.10)  38.019 ms  37.926 ms
    ffm-s1-rou-1021.de.eurorings.net (134.222.231.250)  39.953 ms
 7  ffm-s1-rou-1022.de.eurorings.net (134.222.228.86)  40.075 ms
    ffm-s1-rou-1022.de.eurorings.net (134.222.228.90)  38.180 ms
    ffm-s1-rou-1022.de.eurorings.net (134.222.228.86)  42.755 ms
 8  mchn-s1-rou-1022.de.eurorings.net (134.222.228.194)  33.019 ms  33.211 ms  37.045 ms
 9  wien-s2-rou-1002.at.eurorings.net (134.222.228.46)  39.827 ms  37.795 ms  39.839 ms
10  wien-s2-rou-1041.at.eurorings.net (134.222.123.242)  37.581 ms  37.633 ms  39.505 ms
11  sil.cust.at.eurorings.net (134.222.123.150)  37.654 ms  35.650 ms  35.521 ms
12  englund.debian.org (86.59.118.148)  38.009 ms  38.124 ms  40.628 ms&lt;/pre&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=pvaneynd&amp;ditemid=148844&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://pvaneynd.dreamwidth.org/148844.html</comments>
  <category>life</category>
  <category>fosdem</category>
  <category>opensource</category>
  <category>ipv6</category>
  <lj:mood>amused</lj:mood>
  <lj:security>public</lj:security>
  <lj:reply-count>1</lj:reply-count>
</item>
</channel>
</rss>
