<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Arcane Syntax]]></title><description><![CDATA[An assortment of incantations and observations on the functional arts.]]></description><link>https://jarcane.github.io</link><image><url>http://jarcane.github.io/images/arcane_seals_by_draydenx-d5s2slo.jpg</url><title>Arcane Syntax</title><link>https://jarcane.github.io</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Jul 2017 20:37:48 GMT</lastBuildDate><atom:link href="https://jarcane.github.io/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Alone]]></title><description><![CDATA[<div class="paragraph">
<p>When I was 13 years old I predicted, and held for some time, that I would die by the age of 35. That deadline is just 8 months away.</p>
</div>
<div class="paragraph">
<p>I am 34 years old.</p>
</div>
<div class="paragraph">
<p>I was 31 years old before I had my first relationship.</p>
</div>
<div class="paragraph">
<p>31 years old before the first, and so far only woman, to say "I love you" to me.</p>
</div>
<div class="paragraph">
<p>32 before my first proper kiss.</p>
</div>
<div class="paragraph">
<p>32 before I first made love.</p>
</div>
<div class="paragraph">
<p>And now I am alone again.</p>
</div>
<hr>
<div class="quoteblock">
<blockquote>
<div class="paragraph">
<p>"Some people, they are raised with a lot of love," she explains, "but some people are not. And these people who didn&#8217;t get love in their childhood, when they meet a partner, they try to hold onto him like they own him. They think that this one person, they can only love him and he is the only one who will ever love them. And when they break up, the person feels like their life is over." Atsa thinks for a moment. "Maybe I am giving them a little love."</p>
</div>
</blockquote>
<div class="attribution">
&#8212; The Arctic Suicides
</div>
</div>
<hr>
<div class="paragraph">
<p>It is a standard piece of advice you will hear many times when you are single, and especially after a break-up or a divorce, that you must somehow become accustomed to being alone before you can proceed to find love. "You need to get comfortable just being yourself for a while."</p>
</div>
<div class="paragraph">
<p>With all due respect to all those well-meaning souls, I recommend you try it for a couple decades sometime before you consider passing on that advice a second time.</p>
</div>
<div class="paragraph">
<p>We human beings need love. We need it like we need air, or water, or food.</p>
</div>
<div class="paragraph">
<p>We love to cling to pride and declare our independence, to declare that we stand alone, but no one truly does.</p>
</div>
<div class="paragraph">
<p>And when that need is deprived, or warped, or broken, and we stop believing that we can or should be loved, that is when we begin to walk a dark path. We cut ourselves off, from our emotions, from our humanity, from our fellow humans. We hurt ourselves. We hurt others. Sometimes, we can&#8217;t even go on living.</p>
</div>
<hr>
<div class="quoteblock">
<blockquote>
<div class="paragraph">
<p>The first assignment was to get into groups to brainstorm reasons that a person might commit suicide. The other boys in Paul-Ib&#8217;s group messed around with a paper football. Paul-Ib bent over the paper and, in haphazard pencil, scribbled out 10 reasons. The first one said <em>Loneliness. Being lonely for long time. Being lonely in whole life.</em></p>
</div>
<div class="paragraph">
<p>Number three read simply <em>Love.</em></p>
</div>
</blockquote>
<div class="attribution">
&#8212; The Arctic Suicides
</div>
</div>
<hr>
<div class="paragraph">
<p>I have found it difficult to describe to someone what it is even like to be so long without love. People do not believe it.</p>
</div>
<div class="paragraph">
<p>Those same people who will tell you with great air of wisdom and authority of the importance of coming to terms with being alone will look in abject disbelief and respond with blank platitudes when I tell them that, for instance, every single romantic pursuit in my 34 years on this planet has ended in heartbreak.</p>
</div>
<div class="paragraph">
<p>The very notion of what that might feel like seems to so terrify them that they flee into cliche rather than confront the thought.</p>
</div>
<div class="paragraph">
<p>I do not judge them for it. I fled myself, in a way. I knew from a very early age that what I wanted more than anything in this world was love, and when more than a decade of my life came and went with only one disappointment and loss after another, I simply gave up for another decade.</p>
</div>
<div class="paragraph">
<p>I sank into nothingness. 10 years or more of my life simply vanished with no consequence, as I simply grew accustomed only to surviving and finding ways to keep myself entertained as I waited out existence. I had few friends that were not digital, I achieved nothing of any note, my career slowly spiraled towards the drain.</p>
</div>
<div class="paragraph">
<p>I was simply waiting to die, and prepared for however long that would take.</p>
</div>
<div class="paragraph">
<p>Then one day I nearly did. I stared death in the face, screaming and afraid, and to my surprise, I fought it.</p>
</div>
<div class="paragraph">
<p>For four days and five nights I fought it, and somehow, I won.</p>
</div>
<div class="paragraph">
<p>When I came out the other side, I found what had been keeping me alive: I still wanted love. And I was damned if I was going to die before I found it.</p>
</div>
<div class="paragraph">
<p>Now, here on the other side of one of the greatest chances I have ever taken in my life, a chance I took ultimately in hopes I had found it, I once again found myself facing that same realization. I came all this way to find love and, ultimately, found only fantasy. Time to keep looking.</p>
</div>
<hr>
<div class="quoteblock">
<blockquote>
<div class="paragraph">
<p>“Son. Everyone dies alone. That&#8217;s what it is. It&#8217;s a door. It&#8217;s one person wide. When you go through it, you do it alone. But it doesn&#8217;t mean you&#8217;ve got to be alone before you go through the door. And believe me, you aren&#8217;t alone on the other side.”</p>
</div>
</blockquote>
<div class="attribution">
&#8212; Jim Butcher<br>
<cite>Dead Beat</cite>
</div>
</div>
<hr>
<div class="paragraph">
<p>I&#8217;m afraid to die.</p>
</div>
<div class="paragraph">
<p>Mortally afraid.</p>
</div>
<div class="paragraph">
<p>As the hour of my youthful prophecy looms I have found myself often gripped with actual terror at the thought, at the idea of empty void where I simply cease. It is a notion too horrible to even fathom, and I find myself mystified by confident atheists who can march forth with such blasé calm about the notion of literal oblivion.</p>
</div>
<div class="paragraph">
<p>I&#8217;m afraid of heartbreak.</p>
</div>
<div class="paragraph">
<p>In 34 years a person can accumulate an awful lot of heartbreak. Every woman I have ever loved has broken my heart. The only woman who ever said she loved me spent nearly two years breaking my heart over and over again until I feared nothing was left. My reckless crusade to not let that be the final chapter on love in the book of my life has put me through so much concentrated heartbreak that my body and mind have both felt on the point of breaking.</p>
</div>
<div class="paragraph">
<p>Yet most of all, in the end, I am afraid of being alone.</p>
</div>
<div class="paragraph">
<p>I remember those lost years. That seemingly endless vacuum where I simply existed, for lack of any better option. It was not life, that existence, only a waking death.</p>
</div>
<div class="paragraph">
<p>So I keep trying. Keep accumulating more heartbreak, even though every one hurts just a little more than the last, every one leaves one more scar that never quite heals. Sometimes it feels as if it is a race, a desperate sprint against my very own heart, wondering whether I will reach the finish line before it finally gives out and kills me.</p>
</div>
<div class="paragraph">
<p>Yet I cannot give up. Cannot stop running. Cannot give in to waking nothingness. To simply existing.</p>
</div>
<div class="paragraph">
<p>Even now, after a lifetime of breaking my heart down into so many barely glued together pieces, there are fading slivers of hope. At times I feel I have more to give now than I ever have. Like a <em><a href="https://en.wikipedia.org/wiki/Kintsugi">kintsugi</a></em> pot, this heart still holds as much or more than it ever did, and has grown facets and aspects in the breaking that I never even knew were there. Where once was only youthful fantasy and puppy love has now found passion, song, and tenderness I have never felt before.</p>
</div>
<div class="paragraph">
<p>But does anyone see it? When they see those cracks, do they see gold, or do they see only rotten plaster? Hope seems almost mad in the face of a life with not one success to show, not one moment of real and true love to point to. What do others see when they look at me that drives them away, that I cannot see myself? Is forcing myself to go on in spite of so much pain just another venue for self-destruction?</p>
</div>
<div class="paragraph">
<p>I do not know. Perhaps I will never know. I can only keep filling and repairing the cracks as best I can and hope that someone among them will see the value in those <a href="https://en.wikipedia.org/wiki/Wabi-sabi">imperfections</a>.</p>
</div>
<div class="paragraph">
<p>We are all just broken pottery. A heart once mended is never the same again, but in the mending, can become something wonderful or terrible.</p>
</div>
<div class="paragraph">
<p>I can only pray, and strive, for wonderful.</p>
</div>
<hr>
<div class="paragraph">
<p><em>Quotes from <a href="http://www.npr.org/sections/goatsandsoda/2016/04/21/474847921/the-arctic-suicides-its-not-the-dark-that-kills-you">The Arctic Suicides</a> by Rebecca Hersher, except where otherwise indicated</em></p>
</div>]]></description><link>https://jarcane.github.io/2016/04/29/Alone.html</link><guid isPermaLink="true">https://jarcane.github.io/2016/04/29/Alone.html</guid><category><![CDATA[personal]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Fri, 29 Apr 2016 00:00:00 GMT</pubDate></item><item><title><![CDATA[We can be heroes]]></title><description><![CDATA[<div class="videoblock">
<div class="content">
<iframe src="https://www.youtube.com/embed/bsYp9q3QNaQ?rel=0" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="paragraph">
<p>On the 10th of January, 2016, David Bowie left this Earth a blander place.</p>
</div>
<div class="paragraph">
<p>There are people who walk this earth so long, and with such power over our hearts, that we never believe they will truly leave.</p>
</div>
<div class="paragraph">
<p>When a man of Bowie&#8217;s legend leaves it, it reminds us all that no one is truly immortal except by what they leave behind.</p>
</div>
<div class="paragraph">
<p>And it is in that moment that we feel afraid, and we feel lost, and we feel powerless. If a man like him can fall, what of us?</p>
</div>
<div class="paragraph">
<p>I chose this song to head this post because he was one of mine. Though I did not follow his life, what I followed and admired since I was a young man was the icon, the music, the face. As an odd, thin, bicurious young man struggling with his place in the world, nothing ever inspired me more than knowing there was someone like him out there daring anyone in the world to deny him the right to be all that and so much more.</p>
</div>
<div class="paragraph">
<p>"We can be heroes, just for one day," he sings. "We can beat them, just for one day."</p>
</div>
<div class="paragraph">
<p>Some days, that&#8217;s all the hope you need. All the reason you need to reach for love, for courage, to be who you truly wish to be. That we can find our happiness, if just for one day.</p>
</div>
<div class="paragraph">
<p>"Oh we can beat them, for ever and ever."</p>
</div>
<div class="paragraph">
<p>Thank you, David. For everything.</p>
</div>]]></description><link>https://jarcane.github.io/2016/01/11/We-can-be-heroes.html</link><guid isPermaLink="true">https://jarcane.github.io/2016/01/11/We-can-be-heroes.html</guid><category><![CDATA[personal]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Mon, 11 Jan 2016 00:00:00 GMT</pubDate></item><item><title><![CDATA[Hero]]></title><description><![CDATA[<div class="paragraph">
<p>My Facebook this morning brought to my attention <a href="http://www.hitfix.com/news/carrie-fisher-just-scorched-good-morning-america-and-youre-not-worthy">this amazing and wonderful interview with Carrie Fisher and her dog Gary.</a></p>
</div>
<div class="paragraph">
<p>Carrie Fisher is something of a hero of mine. And not because of Star Wars, massive fan that I am, but from  interviews like this one, and especially when I first saw her talk with Stephen Fry in his amazing "The Secret Life of the Manic Depressive".</p>
</div>
<div class="paragraph">
<p>Years of dealing with drug abuse, Hollywood sexism, and a serious case of bipolar disorder, and she takes it with humor and wit and tenacity and it gives me hope the rest of us can do the same.</p>
</div>
<div class="paragraph">
<p>I have, as I&#8217;ve increasingly made no attempts to hide, a whole fucking raft of mental problems. The clinical depression I&#8217;ve talked about at some length, with its mood swings, lack of motivation, self-doubt, and even suicidal thoughts, kept at bay only by a mortal fear of death and pain. For this I&#8217;m on a daily regimen of two moclobemide a day to keep it from being even worse than what I deal with on the stuff. The doctors waffle back and forth on my official diagnosis, whether it&#8217;s chronic or moderate or mild or whatever, but the truth is that I&#8217;ve been dealing with depression since I was a child, and may very well always deal with it.</p>
</div>
<div class="paragraph">
<p>What I don&#8217;t much, if ever, talk about is the social issues. I had an extremely isolated and sheltered childhood, thanks to growing up first an only child and home schooled, then moved around damn near every other year, and facing bullying for much of my schooling, and the result is that I&#8217;m frankly kind of clueless about how to even handle myself in a lot of social functions and interactions, and especially romantic ones. I fake it well in the right circumstances but sometimes when you see me being all gregarious or running at the mouth, that&#8217;s just because I don&#8217;t know what else to do. I&#8217;m a man of words and so it&#8217;s sometimes the only tool in the box. Yet other times I&#8217;m so terrified of saying or doing the wrong thing, that often I simply don&#8217;t act at all, and sit in the corner in silence until I can go home.</p>
</div>
<div class="paragraph">
<p>When I moved to Finland I also developed severe anxiety, owing to largely the combination of culture shock and psychological abuse. The first time it happened I didn&#8217;t even know what was happening, I just blacked out in the middle of a conversation and stopped even being able to put a train of thought together. For the most part it&#8217;s under control now, but I still have a bottle of oxazepam in my house in case of emergencies, and I still get irrationally nervous in certain social situations especially if I have to use Finnish.</p>
</div>
<div class="paragraph">
<p>I have an attention disorder. I don&#8217;t know which, because it&#8217;s never been officially diagnosed, but it runs in the family, and the symptoms are all there. I have a hard time focusing on anything for too long a space of time, save for those times when I become so hyperfocused on one thing I ignore or neglect everything around me to sometimes pathological extent.</p>
</div>
<div class="paragraph">
<p>And so, with all of this to deal with, for a good 10 to 20 years of my life, I just dealt with it by lopping off parts of my personality. I couldn&#8217;t deal with fear so I conditioned myself not to think of anything scary. I never had much joy to begin with, but what I did I came to treat with suspicion. I couldn&#8217;t focus anything so I just gave up on any hope of achieving anything, and even on many of the things I used to love, like films and games. I didn&#8217;t know how to deal with social situations, so I mostly just stopped having friends, and even now have a bad habit of falling out of touch with anyone I don&#8217;t see regularly. Love, year on year, just lead to one broken heart after another, so I gave up on that too. All I had left was a life of emotional deadness punctuated only by the occasional angry outburst.</p>
</div>
<div class="paragraph">
<p>But after over a decade living like a hermit and longer still living under the thumb of all that mess, I&#8217;m just fucking sick of it. I mean it. The very idea now that I might let any of it keep me from what I really want in life fills me with actual anger. If I&#8217;ve learned anything from spending my life dealing with mental illness it&#8217;s that sometimes the greatest threat is how much power you give it over you.</p>
</div>
<div class="paragraph">
<p>I set out for <a href="https://www.youtube.com/watch?v=AYQJiUCBRc4">my standup debut</a> to write a set about depression, because I wanted to strip it of that power. To make a fucking mockery of it. To educate, to deprive it of its mystique, of its stigma, and of the hopelessness it can set about your mind.</p>
</div>
<div class="paragraph">
<p>Even as I struggle with it daily, I refuse to be constrained by it, or to let it tell me I am worthless or unworthy because of it. I want to live. I want to love. I want to come out of the cave.</p>
</div>
<div class="paragraph">
<p>And seeing Carrie up there on the screen gives me hope that another 20 years on I still can be there, fighting on.</p>
</div>]]></description><link>https://jarcane.github.io/2015/12/05/Hero.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/12/05/Hero.html</guid><category><![CDATA[personal]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Sat, 05 Dec 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[Fuck you, I'm great]]></title><description><![CDATA[<blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">Hey new dev - think you&#39;re dumb? I struggled for 2 hours yesterday because I forgot how a single HTML tag works. We all make mistakes. ❤</p>&mdash; 10x Pro Grammar (@kerrizor) <a href="https://twitter.com/kerrizor/status/646699976911814656">September 23, 2015</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<div class="paragraph">
<p>When I first got back into programming, I was pleasantly surprised to discover that after all these years I still rather enjoyed it. When I then discovered, and finally understood, Lisp and functional programming, it blew my mind. It felt like magic; here was a way of doing programming that had actually thought hard about how to abstract away much of the tedium, and how to compose those abstractions in powerful ways that made the old days of structured QBasic, C, and even modern Python feel like going back to the stone ages.</p>
</div>
<div class="paragraph">
<p>At one point, after listening to a lot of Neil Gaiman and feeling the high of the newbie functional programmer who feels like he&#8217;s working some kind of sorcery whenever he writes a curried function, I&#8217;d even started a weird piece of urban fantasy fiction about forgotten gods who&#8217;ve learned the language of the universe itself, but hide out as Lisp gurus in unassuming office blocks.</p>
</div>
<div class="paragraph">
<p>But the days of "programming is magic" seem ever numbered for most programmers, myself not excluded. Over time, programming takes on a different, darker hue. Oh for sure there are still moments when the old wizardry shines through, where you find some clever bit that someone else has coded, or come up with some clever function of your own. But then you have one of those days where you fight CSS bugs for an entire work day, or have to Google a function you could swear you just used yesterday, or have a bit of code refuse to work despite being identical to at least a dozen other bits of code in the same file.</p>
</div>
<div class="paragraph">
<p>That&#8217;s when the lights start to flicker.</p>
</div>
<div class="paragraph">
<p>Perhaps the more accurate phrase is "programming is gaslighting."</p>
</div>
<hr>
<div class="paragraph">
<p>This pattern of conflict continues in my language studies. Finnish is a language packed to the gills with syntax, and teachers who teach it blindly with little concern as to the semantics, and often no knowledge of how to even explain it. In my early studies at first it seemed like I was indeed learning quite quickly, but soon found my actual comprehension of Finnish, especially in the real world, was far slower to catch up. Time and again in my language studies I am met with patronizing praise from teacher after teacher for how well I&#8217;m doing, when all the while I barely comprehend the most basic conversations in Finnish.</p>
</div>
<div class="paragraph">
<p>In Finland, in order to apply for full citizenship, you must take what a language proficiency test. Normally this test costs upwards of 130€, but if you are in certain language courses and your teacher is sufficiently confident in your ability to pass it, they can give you a form to apply to take it through your course for free.</p>
</div>
<div class="paragraph">
<p>A few weeks ago, my teacher handed me that application form.</p>
</div>
<div class="paragraph">
<p>I don&#8217;t even understand the practice materials for the proficiency test. My chances of actually passing this test by my estimation are just this side of nil. I couldn&#8217;t even pass all the sections of the test for the "basic" half of this course.</p>
</div>
<div class="paragraph">
<p>And then today, we spent half the class making children&#8217;s building blocks out of matchsticks and paper.</p>
</div>
<div class="paragraph">
<p>I don&#8217;t want to be a kid again. I just want to know how to talk to a receptionist without a translator.</p>
</div>
<hr>
<div class="paragraph">
<p>My ex-wife often called me a child, among other things.</p>
</div>
<div class="paragraph">
<p>I am fast approaching the two-month anniversary of my divorce, but for two years of my life I was endlessly degraded as untrustworthy and incompetent over the slightest mistakes. If I remembered to do a thing every day for two months, it would be the day I forgot that the fireworks would explode and I would be treated to a tirade about my unreliability and even unsuitability as a spouse. Everything I had ever done wrong would be dredged up again as further proof of my inability to do right when it was needed, even if only hours before some act of kindness or even simple competence had been met with glowing praise.</p>
</div>
<div class="paragraph">
<p>If I dared defend myself, which I was prone, perhaps foolishly, to do in such instances, the argument would escalate until the threats came out. She would threaten me with divorce, knowing full well what a situation that would put me in as an immigrant. When I asked her once after all these years if she knew what she&#8217;d been hanging over my head, she just said yes, but "it was the only way I could get you to listen."</p>
</div>
<div class="paragraph">
<p>When the end finally came, and the divorce papers were filed, she found other things to throw at me. She called me ungrateful, denied I&#8217;d ever loved her, accused me of using her. For the first time in two years of marriage, suddenly even my abilities as a lover were not off the table, just one more thing to lash out with to try to break down what was left of my self-confidence.</p>
</div>
<div class="paragraph">
<p>Deprived of the ability to further threaten me with divorce, she instead would threaten me with homelessness, and even the police. In the last argument I ever had with her, she even implied she and her parents could contact the police and tell them I&#8217;d "lied" and have me deported.</p>
</div>
<div class="paragraph">
<p>Even now, writing those words, admitting those words in public, makes me shake a little with fear. And my heart still struggles to shake off the weight of all these sources telling me how worthless, incompetent, and unwanted I am.</p>
</div>
<div class="paragraph">
<p>And I am goddamn sick of it.</p>
</div>
<hr>
<div class="paragraph">
<p>I could, and indeed for some weeks now have, sit here and stew over the above. To go on believing that I am less than nothing, and depriving myself of what I most want in this world. To deride myself as a sad, fat old man, who even now has been hesitating on a million little and big steps to improving himself out of the belief that he does not and cannot deserve them.</p>
</div>
<div class="paragraph">
<p>But you know what? That sad fat old man can go fuck himself. He&#8217;s not me. He&#8217;s merely an illusion, a devil&#8217;s collaboration between outside and in designed to keep me in place and in check.</p>
</div>
<div class="paragraph">
<p>I am not a sad fat old man. I&#8217;m not that fat, I&#8217;m not nearly old enough to be "old," and in truth I actually haven&#8217;t been all that sad lately. I realized the other day that, for the first time in longer than I can precisely determine, that I have in fact had quite a lot of days lately in which I was genuinely happy.</p>
</div>
<div class="paragraph">
<p>Instead of wallowing in self-pity, I think it&#8217;s about time I put modesty aside and gave an honest self-inventory. As a society we are taught never to value ourselves too highly in public, while at the same being endlessly shamed for our failures. To which I would like to say, "Fuck you, I&#8217;m great."</p>
</div>
<div class="paragraph">
<p>Herein then, is a short list of my talents, better natures, and life accomplishments:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>I&#8217;m a hell of a writer. And for that matter, not a bad publisher either, all things considered. I published three fucking books almost entirely on my own effort, and I still get positive reviews for Hulks and Horrors now some two years on from release.</p>
</li>
<li>
<p>I am a pretty damn good singer. Despite two years of neglect, it turns out I can even still nail Chris Isaak like it was nothing, and recently I even pulled off Stairway. Even the high notes.</p>
</li>
<li>
<p>It&#8217;s been a while, but quite frankly, I was a pretty good actor in school too. In two years of study I went from a barely contained mess of nerves and enthusiasm into the kind of controlled performance I never thought I&#8217;d be capable of, and I would love the chance to really work my form up again in a proper production.</p>
</li>
<li>
<p>I am a good programmer. I am not the most knowledgable nor the most experienced, but hell I&#8217;ve only been at this damn coding thing for a year and already I&#8217;ve learned and done things I&#8217;m genuinely surprised I even managed in such a short space of time. I should stop getting so overwhelmed by the complexity of big things and learn to build on things part by part.</p>
</li>
<li>
<p>I&#8217;m actually pretty funny, dammit. I sometimes wish I was "always on" the way some funny guys are, but I can crack up a room from time to time. I&#8217;ve felt for years like there&#8217;s a funnier me in there that only sometimes gets let out the box, and I&#8217;m just too scared to let him out more often. I&#8217;ve contemplated doing standup for years. Hell I&#8217;ve been piecing together a few bits in my head lately.</p>
</li>
<li>
<p>I&#8217;ve got a heart three sizes too big and it&#8217;s killing me being alone again. For all the accusations and the recriminations, I was faithful and even cared up to the end in my marriage. It took <strong>all of that</strong>, all the anger and strife and threats and abuse, to make me fall out of love with my wife. I still wasn&#8217;t even sure I wanted to leave yet until things truly got nasty. I can&#8217;t imagine what I could be for someone who didn&#8217;t insult me and threaten me with poverty and exile. I can be compassionate, attentive, and even charming when my guard is down, and I hope someday soon I&#8217;ll get to be that again.</p>
</li>
<li>
<p>And hey, I ain&#8217;t ugly. Most guys would be lucky to age as well as I have, and dammit, I&#8217;ve got my good features. I mean, have you seen my hair? My hair is fucking fabulous.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Life is short, and what&#8217;s worse, you can never even be certain how short. Statistically I could have another 40 or 50 years left at least, but I&#8217;ve got the scars from too many brushes with death to take that for granted.</p>
</div>
<div class="paragraph">
<p>Don&#8217;t you think, if life is so short, so precious, that the last thing we should waste our time doing is telling ourselves how shit we are? Sure a little introspection is valuable now and then, but come on. All this "humility" crap is for the birds. Own how great you are. Sit down sometime and really think hard and give yourself permission to do your own self-inventory, and remind yourself of what&#8217;s great in your life.</p>
</div>
<div class="paragraph">
<p>And if anyone has a problem with it? Fuck 'em. Let them marry the gaslighters of the world, while you&#8217;re off having the time of your life.</p>
</div>]]></description><link>https://jarcane.github.io/2015/09/24/Fuck-you-Im-great.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/09/24/Fuck-you-Im-great.html</guid><category><![CDATA[personal]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Thu, 24 Sep 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[Stories]]></title><description><![CDATA[<div class="paragraph">
<p>I want a burrito.</p>
</div>
<div class="paragraph">
<p>I have lived in Finland for two years, and sometimes, even often, I still crave a burrito. And not just any burrito, but the unique blend of cheese, greasy meat, and too-runny, lard-cooked refried beans you can acquire at Mexican-American taquerias almost anywhere in the Western United States.</p>
</div>
<div class="paragraph">
<p>I can of course make burritos. I learned how to make a mighty fine burrito from my father when I was a child, who  improvised the family burrito recipe after being introduced to a particularly good such taqueria in Madras, Oregon, by coworkers at the wood products company that employed him until he was stricken with esophageal cancer caused by decades of untreated acid reflux disease.</p>
</div>
<div class="paragraph">
<p>I even, after inheriting a barrel full of pinto beans from a salad kitchen where I was once employed, had learned how to make refried beans from scratch.</p>
</div>
<div class="paragraph">
<p>And yet, I was never able to truly reproduce that taqueria experience, nor am I here in Finland fully able to reproduce the hot pork sausage which was the cornerstone of the family burrito recipe either. I have done the best I can here, but even finding the right beans is difficult in Finland. It was only recently that I was easily able to acquire even a suitable cheese for a good burrito, thanks to the Fazer Company putting out a line of pre-grated cheddar and mozzarella tossed with peppers and spices, which serves as a reasonable substitute for the pepper jack cheese that was the family favorite. At home I have more often of late stuck with Tex-Mex styled tacos and fajitas, owing to the greater easy of reproducing the experience.</p>
</div>
<div class="paragraph">
<p>I just want to go down to a local burrito joint and buy one of those big burritos the size of my head and devour it. And as long as I am here, I cannot.</p>
</div>
<hr>
<div class="paragraph">
<p>I bought a packet of cigarettes today, Lucky Strike Reds, the local version of an old favorite.</p>
</div>
<div class="paragraph">
<p>It is the first such pack I&#8217;ve purchased in some time, not since a particularly rough patch in the summer of last year, which ended after only a couple of months at the most. Part of my decision to terminate their use was because my wife was quite upset at the prospect of my taking on the habit again, but partly it was because they just aren&#8217;t the same here.</p>
</div>
<div class="paragraph">
<p>I was initially elated to discover that so many of my most favorite brands were sold here, even my beloved Chesterfield cigarettes, a brand long dead in America, and which I had not smoked in maybe 15 years. The last place I knew of to find them was a particular Safeway store in Redmond, Oregon, where I&#8217;m told they were pretty much only bought by a handful of retirees.</p>
</div>
<div class="paragraph">
<p>Sadly, I would be disappointed to discover that despite the brand names, they were not at all the same recipes I remembered, and were more or less unidentifiable by taste as any cigarette I had ever smoked abroad. It turns out, for one thing, that there are laws in Finland regarding the manufacture of cigarettes. Their nicotine content is tightly controlled and broken into categories, and they&#8217;re required to be impregnated with chemicals that make them self-extinguishing, so that Finland&#8217;s great forests aren&#8217;t set ablaze by stray butts like so many of America&#8217;s are. The result is that almost every cigarette I have ever smoked in Finland has tasted and smoked exactly the same.</p>
</div>
<hr>
<div class="paragraph">
<p>Outside the kiosk where I purchased my cigarettes, there was a young woman there panhandling for change. She was was a punk from head to toe, with a shock of blue hair, a ripped jean jacket covered in patches, and tattered black stockings. She was spread out on a bit of cloth, and holding a cardboard sign asking for money for some purpose which I was unable to translate.</p>
</div>
<div class="paragraph">
<p>As I passed her going in, she smiled at me and chirped a polite request for attention in Finnish which I did not fully understand. She was quite cheery for a panhandler, and rather lovely too. I caught my imagination wandering almost at once, and I theorized that she was probably a musician of some kind.</p>
</div>
<div class="paragraph">
<p>So, when I came out of the kiosk and had lit my first cigarette in at least a year, I went over and dropped to fifty-cent pieces into her cup. She had been joined by another young woman, who both now thanked me merrily as I went on my way.</p>
</div>
<div class="paragraph">
<p>When my bus would pass back by there some 5 minutes later, they were gone, and a man with a mohawk had taken their place.</p>
</div>
<div class="paragraph">
<p>Life goes on.</p>
</div>
<hr>
<div class="paragraph">
<p>In the early days of my time here, my wife would criticize me for my tendency to go on and on about the differences here, and about the things I missed from back in the United States. At times it darn near boiled her blood: she would get angry, appalled at what seemed to her to be a slight against the products of her homeland in my complaints.</p>
</div>
<div class="paragraph">
<p>You&#8217;re here now, she would remind me, and tell me that I should learn to accept what&#8217;s in front of me. That I was in Finland now, and I should expect what Finland has to offer, not to torture myself over what I can&#8217;t have.</p>
</div>
<div class="paragraph">
<p>My wife and I are separating now, because I could not accept all of what she was either.</p>
</div>
<hr>
<div class="paragraph">
<p>When I came here, I came here pursuing a dream. I had, based only on our rapt and endless conversations and a handful of pictures, fallen madly in love with a woman who I almost at once decided to run off to a foreign land to meet, to be with her and only her for the rest of my life. She was warm, and kind, and forgiving, and sang like no songbird on earth, and she would be my wife, there could be nothing else for it.</p>
</div>
<div class="paragraph">
<p>So confident was I in this impossible dream, that I would produce one of the hardest creative projects of my life just to pay for me to buy as close to a one-way ticket as I could get. I was genuinely annoyed that it turns out the airlines won&#8217;t even let you buy a one-way ticket overseas, so feeling so self-assured that I would have no need of the return ticket, I scheduled my return for three months away: the maximum visa period.</p>
</div>
<div class="paragraph">
<p>I wrote and wrote and waited and waited until the day I would board that plane. I had already dispossessed myself of most of my belongings when I had gone to university, but now I would leave behind even most of these, taking only a suitcase full of clothes and the stuffed bear I had owned since infancy. I stripped my computer down to its component bits and sent them by post to arrive and be reassembled sometime after I got there.</p>
</div>
<div class="paragraph">
<p>And then, the day came. I packed my bags, took a bus first to Olympia and then went by shuttle to the Seattle-Tacoma Airport, where I would board the plane that would take me away from the United States, possibly forever. The flight was long, some thirty hours of ever so slightly uncomfortable economy class during which my ears never popped, and with a transition in Amsterdam which I would nearly miss and would cost me access to my luggage for several weeks.</p>
</div>
<div class="paragraph">
<p>I arrived at Helsinki Airport. After some waiting around wondering when my bags would come, I inquired at the desk what had become of them, only to be told it had been left behind. All of my possessions save a tiny carry-on bag were now still somewhere in Amsterdam. They gave me a tiny travel kit and said my bags would be along and they would notify me when they were available.</p>
</div>
<div class="paragraph">
<p>And then I walked out through the security gate and proceeded to break her heart for the first time: I was disappointed.</p>
</div>
<div class="paragraph">
<p>My dream wasn&#8217;t a dream, just a person. It was the lowest and most shallow moment of my life, but I realized almost immediately that she did not look like who I had imagined from those handfuls of photographs, and I was disappointed.</p>
</div>
<div class="paragraph">
<p>And she knew it, immediately. She even asked me about it later that evening, and I just hedged and lied and said she was taller than I&#8217;d expected and I&#8217;d been surprised. I would continue to hedge and lie in moments like that for two years. I was scared, confused, and I didn&#8217;t want to hurt anyone, so I lied. It would become the rotten worm at the core of our marriage, turning me distant and her alternately resentful and insecure.</p>
</div>
<div class="paragraph">
<p>I tried to remind myself of who I fell in love with, that it was still her after all, still the same person I&#8217;d talked to through all those late nights. Still the same beautiful eyes, the same warm smile. But the smiles got fewer and farther between over the years. Her doubts and my neglect turned to harshness, impatience, and fighting. Every fight seemed worse than the last, and with every fight, it became harder and harder to remember what it was that I loved about her. I was also terrified even still to find myself alone again, and of what would happen to me in this strange land without her or any real support network of any kind. In time this fear would turn into full blown anxiety, the panic attacks from which would wind up putting me in the hospital at least twice, and leave me constantly scared of my own shadow.</p>
</div>
<div class="paragraph">
<p>The panic then blew up again when I first came to Finnish school, and as I dove into trying to speed-learn my way into some kind of employable level of programming skill. This panic and stress over the first things I&#8217;d really done to contribute to our welfare in two years lead to even more and uglier fights, and the worsening of her mental state as well. The endless alternation between verbal combat and isolation wore me down until I simply went numb, trying only to get through each day without setting off another battle, and having seemed to lose any sense of what I was doing here other than obligation.</p>
</div>
<div class="paragraph">
<p>Finally, my neglect and growing coldness could not be ignored, and she asked me to be honest. So I was.</p>
</div>
<div class="paragraph">
<p>I broke her heart for a second time, this time by telling her the truth.</p>
</div>
<hr>
<div class="paragraph">
<p>Or at least, this makes a nice fiction. By and large it&#8217;s even true.</p>
</div>
<div class="paragraph">
<p>Writers are so very good at stories, at fiction, even when they purport to write about the "truth." We are such good liars. We can make any piece of history or human event or person into whatever we want it to be, to make sympathetic and even noble the worst of villains, or to make devils and cowards out of the best of heroes.</p>
</div>
<div class="paragraph">
<p>There are other stories that could be told of these same events, all of them true as well, in their own way.</p>
</div>
<div class="paragraph">
<p>One story is of a dirty, sad, hypocritical old man, a shallow disgrace of a human being who preached in public of equality and tolerance, but neglected his own wife because she wasn&#8217;t attractive enough for him. This is the story I tell myself at my lowest.</p>
</div>
<div class="paragraph">
<p>Another story is of a man lured away to a distant land on false hopes and promises that turned into a nightmare he felt he could not escape, who felt betrayed by reality itself. This is the story I have not yet let myself be angry enough to tell.</p>
</div>
<div class="paragraph">
<p>Still another story is of a scared, lonely little boy, fumbling his way through the first and only real relationship he&#8217;d ever had, clinging on despite everything because he was scared of losing it. This is a story I do not tell because it hurts me too much, and reminds me of too many stories before it.</p>
</div>
<div class="paragraph">
<p>My wife&#8217;s story is perhaps instead of a man who came into her life and told her nothing but sweet lies, who used her and lead her on as he stole two years of her life on an empty promise. That story is hers to tell, and so I will not speak it.</p>
</div>
<div class="paragraph">
<p>Some stories are more true than others, and I cannot now even tell you which one I truly believe. It changes from mood to mood, as the pain carries me this way or that.</p>
</div>
<div class="paragraph">
<p>I shall leave it only to say that for my part, I am truly sorry for what&#8217;s become of it all. I&#8217;ve betrayed almost everything I ever believed about myself.</p>
</div>
<div class="paragraph">
<p>I can only hope that somewhere in one of these stories is a lesson for me to learn.</p>
</div>
<div class="paragraph">
<p>Life goes on.</p>
</div>]]></description><link>https://jarcane.github.io/2015/07/30/Stories.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/07/30/Stories.html</guid><category><![CDATA[personal]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Thu, 30 Jul 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[Comfortable]]></title><description><![CDATA[<div class="paragraph">
<p>A thread on HN asks, <a href="https://news.ycombinator.com/item?id=9936544">"Why do you want to achieve something?"</a> This <a href="https://news.ycombinator.com/item?id=9939147">particular answer</a> struck a chord:</p>
</div>
<div class="quoteblock">
<blockquote>
<div class="paragraph">
<p>Honestly, it&#8217;s the growing realization that despite all of my efforts, I haven&#8217;t done anything worth feeling proud of. To me that feels like I&#8217;ve lived a waste of a life.</p>
</div>
<div class="paragraph">
<p>As you can tell, this is an ineffective strategy for motivation.</p>
</div>
</blockquote>
</div>
<div class="paragraph">
<p>When I was a child, my parents and I once went down to see a guest preacher at the local church down in the canyon. It was the concluding event of a "vacation bible camp" I&#8217;d been attending on my parents'  wishes over the summer. I don&#8217;t really remember the content of the speech he gave, other than that he was fond of audience participation, and at several points called upon random members of the audience to illustrate this point or that.</p>
</div>
<div class="paragraph">
<p>I was one of them.</p>
</div>
<div class="paragraph">
<p>That day, I had chosen to wear to church the jersey of the Chicago Cubs, the famously losing baseball team, who had not at that time won a World Series in something nearly like a century. I wasn&#8217;t really a fan or anything, I didn&#8217;t even like baseball, but someone had given it to me, and I liked wearing it because it was comfortable and cool in the summer time.</p>
</div>
<div class="paragraph">
<p>The preacher had evidently noticed the shirt, however, and at one point in his sermon chose to punctuate his point by singling me out of the crowd based entirely on my choice of clothing. He told me he felt sorry for anyone who was a Cubs fan, but admired my decision to stick with a losing team. For taking part as living prop to his point, or perhaps just for being a good sport and saying little of anything to interrupt it, he gave me a little plastic dinosaur egg, inside which I would later discover was some mediocre candy and a tiny rubberized plastic velociraptor.</p>
</div>
<div class="paragraph">
<p>I just liked the shirt.</p>
</div>
<hr>
<div class="paragraph">
<p>When I was 18, and what was left of my high school education was rapidly drawing to a close, my father came to me and told me he had an opportunity for me at the wood products company where he worked. The IT department there was looking to hire a new employee, and I would be perfect for the job owing to the peculiar requirement that the  department head had set on the hire.</p>
</div>
<div class="paragraph">
<p>The new boss was a man with a considerable amount of experience in the IT industry, and also who had a very particular way of doing things. Because of this, he quite specifically did not want to hire anyone who had any real work experience in the field, preferring instead a new body who would serve as a kind of apprentice. He could then train up a new employee to do exactly what he needed them to do, in the way that he needed them to do it, without having to "untrain" them from any method they might&#8217;ve picked up in their previous jobs.</p>
</div>
<div class="paragraph">
<p>He and my father had evidently discussed me as a serious candidate for the position, and felt that my hobby experience with computers would make me a perfect match. The job was more or less mine, all I had to do was say I wanted it, and I could be employed tomorrow. The pay was good, probably better from the start than any job I would wind up taking the rest of my life, and it came with benefits like health care and vacation which didn&#8217;t seem especially important to me at the time but nowadays are worth their price alone.</p>
</div>
<div class="paragraph">
<p>I turned it down.</p>
</div>
<div class="paragraph">
<p>I didn&#8217;t want to have to stay living with my parents, out in Crooked River Ranch, which was so far away from anything like culture or human activity that for me it may as well have been the third moon of Rigel VII. Nor did I want to move to Madras, closer to where work was actually located, because it was the asshole of the tri-county area, essentially an entire city that had been turned into a ghetto for migrant workers from Mexico.</p>
</div>
<div class="paragraph">
<p>I said too, that I didn&#8217;t think I wanted to work with computers for a living. That they were fine and fun as a hobby, but I was afraid I&#8217;d soon come not to enjoy dealing with them at all if I had to do anything with them for work.</p>
</div>
<div class="paragraph">
<p>Sometimes I wonder if I was right &#8230;&#8203;</p>
</div>
<hr>
<div class="paragraph">
<p>Nearly five years ago now, after reaching more or less the inescapable death of my cooking career, and being rejected by the United States Air Force on the basis of my poor credit history, I enrolled at  Central Oregon Community College in Bend, Oregon. I didn&#8217;t really know what else I was going to do, so I thought, well, maybe I should finally go back to school and learn how to do something that would pay me a living without having to be exchanged for a life of bone-battering toil.</p>
</div>
<div class="paragraph">
<p>College was a wonderful place. I felt like I was at home for the first time in a decade. I had incredible teachers and professors, who taught me about writing and literature and history, who gave me the chance to explore talents that had been all but neglected for the past third of my life.</p>
</div>
<div class="paragraph">
<p>One of those professors was Cora Agatucci, an incredible old woman with a passion for film like no one I have ever met before. She was the kind of woman who would sigh dreamily at the thought of a good Truffaut shot, and her enthusiasm was almost viral. Almost no one, even the most slackoff of students, could manage to find no joy in her classrooms, and it was there that I rekindled a long neglected love of film.</p>
</div>
<div class="paragraph">
<p>I decided, in fact, that I would make it my major, and even registered it as such with the admissions office. I made inquiries into what universities would be best for me to eventually transfer to in order to complete my degree, and learned of a promising new "cinema studies" program at the University of Oregon.</p>
</div>
<div class="paragraph">
<p>It was around this time, however, that an acquaintance of mine who worked in the film industry suggested instead that I should not waste my time with university, or even a degree. He said it wasn&#8217;t necessary, and if I really wanted to get into film what I should do was just come down to California and he would help find me internships on film sets instead, where I could learn on the job.</p>
</div>
<div class="paragraph">
<p>I declined his offer. I said I wasn&#8217;t really sure I wanted to live in California, and I as well still felt like I needed the qualification and credential a degree would give me. Indeed, at one point I&#8217;d more or less decided that I wanted to try and make a go of a film career without ever having to go anywhere near Los Angeles if I could help it, and in fact, harbored hopes of even studying abroad somehow instead. Maybe Vancouver, or France.</p>
</div>
<hr>
<div class="paragraph">
<p>Now comes the point in the piece where I should be expected to remind you again about the quote at the beginning, and tell you how I identified with it, how I was driven by guilt over my own lack of accomplishments. I would tell you the sob story of my father, who died aged 50 when I was only in my early 20s, having never seen me amount to anything but a regularly unemployed couchsurfer. I would tell you, perhaps even, if I truly wanted to bend the heartstrings, of hearing my father&#8217;s words in the opening track of the last album my father ever listened to. "Carry On, my Wayward Son," it said. "There&#8217;ll be peace when you are done."</p>
</div>
<div class="paragraph">
<p>It&#8217;s a good story. I am sure that in the fullness of time I could spin up at least a few hundred words on that passage alone. The partial draft of that story is even now buried within the technological wonder that is Git file history.</p>
</div>
<div class="paragraph">
<p>It&#8217;s also a lie.</p>
</div>
<div class="paragraph">
<p>Oh for sure, on some level I have for many years believed that lie. It took me some years to make piece with having been a living disappointment to my father, who had himself worked so hard for so many years to keep food on the table for my many siblings and I. In my head for many years I made many plans and wishes and dreams for bigger and better things, as so many do.</p>
</div>
<div class="paragraph">
<p>And yet, by any honest accounting of my actions, year on year, I can find little evidence whatsoever to support the idea that I have ever truly been driven by anything resembling a desire for success or achievement. In truth, a look at my history shows that I have repeatedly and deliberately managed to avoid it entirely. I have avoided both risk and opportunity time after time, and all in the effort to simply be at least "tolerably uncomfortable," as that former draft said in perhaps its only self-honest words. I would pine for a time in which I was not poor, but cringed at the tasks before me that seemed my only routes out of it, or simply found no route at all. When a route was actually presented to me, I would find wany number of ways to avoid it entirely. I have lacked the confidence or the drive to truly grab those things which I claimed to want and dream of, even when the only barrier to my achieving them was my own use of my time.</p>
</div>
<div class="paragraph">
<p>No, I must instead say that my motives have far more often been that of the terminal care doctor, to be kept as "comfortable as possible."</p>
</div>
<div class="paragraph">
<p>Throughout my life, I have sought to ensure only there was good food in my belly, and something to keep me entertained as day passes after day. I embraced a policy of supreme relaxation, the end result of accidental Buddhism perhaps: I had lost so much and had so little over the years, that in the end I gave up on attachment simply as a matter of habit. What&#8217;s the use of worry, of fear, of dwelling on loss and lack? What merit in torment?</p>
</div>
<div class="paragraph">
<p>And yet, through the years, that little lie still lived there, never quite silent. But guilt is a funny thing. It is, as the quoted said, not actually that effective of a motivator. It wallows. It festers. It condemns. But it seldom motivates. What better tool then, to enforce my self-imposed terminal patient status?</p>
</div>
<div class="paragraph">
<p>We are all, after all, terminal patients. Life is fatal, that much is certain. And so it is often the path of least resistance simply to keep oneself as comfortable as possible while one waits out their final hours, however long that might take. Why we do more than that is perhaps the mystery of the ages, certainly the animals seem to do little more than ensure their survival, content with just so.</p>
</div>
<div class="paragraph">
<p>I must thus advise, then, that should you truly wish to achieve, make sure of your motives. And if you find yourself becoming comfortable, get up and run. The secret of achievement is that the only way to achieve anything is just to do it, and the only way to get opportunity is to ask for it, or take it. The greatest achievers are those who are never satisfied with anything.</p>
</div>
<div class="paragraph">
<p>Comfortable is the enemy of progress itself.</p>
</div>]]></description><link>https://jarcane.github.io/2015/07/24/Comfortable.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/07/24/Comfortable.html</guid><category><![CDATA[personal]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Fri, 24 Jul 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[What's the use of Monads?]]></title><description><![CDATA[<div class="paragraph">
<p><em>The following was originally posted on <a href="https://news.ycombinator.com/item?id=9920860">HN</a>.</em></p>
</div>
<div class="quoteblock">
<blockquote>
<div class="paragraph">
<p>OK, go on, explain what else it is, rather than accidental convention of how to ensure an order of evaluation of a pair of expressions in a particular lazy pure-functional language?</p>
</div>
<div class="paragraph">
<p>Erlang, for example, being functional but strict language, requires no monads. So does Standard ML. In these languages a monads would be a useless, redundant abstraction which will only clutter the code.</p>
</div>
</blockquote>
</div>
<div class="paragraph">
<p>Do notation.</p>
</div>
<div class="paragraph">
<p>Haskell&#8217;s do notation is syntactic sugar over monads which effectively allows you to write 'imperative-looking' code while still carrying a local state forward without mutation. The <a href="https://en.wikibooks.org/wiki/Haskell/do_notation">Wikibook</a> does a pretty good example of explaining what this looks like (though I&#8217;m guessing you already know this).</p>
</div>
<div class="paragraph">
<p>Now, obviously it is true that <strong>one</strong> of do notation&#8217;s advantages is the same as any other monad usage: it allows us to explicitly sequence events in a lazy language that otherwise offers no (obviously intuitive) guarantees on evaluation order. In that sense it&#8217;s nothing more than sugaring over the otherwise necessary usage of a lot of ugly <code>&gt;&gt;</code> and <code>&gt;&gt;=</code> operators everywhere in increasingly annoying indentation.</p>
</div>
<div class="paragraph">
<p>But the other thing it offers is a syntactic sugaring over carrying state forward into successive computations (like the <a href="https://wiki.haskell.org/State_Monad">State monad</a>), which still carries at least some useful sweetness in a language that is otherwise functionally pure, which is why F# generalized the concept even further to <a href="http://tomasp.net/blog/2013/computation-zoo-padl/">computation expressions</a>.</p>
</div>
<div class="paragraph">
<p>Looked at another way, do notation, or something like it, can be used to sugar over something that rather more looks like the Clojure <code>&#8594;</code> and <code>&#8594;&gt;</code> operators, where the initial value is essentially a local namespace. Much like the threading macros, the result even <strong>appears</strong> to be doing a kind of mutation, even though it&#8217;s actually doing nothing of the sort.</p>
</div>
<div class="paragraph">
<p>This kind of thing turns out to be useful for games, for instance, as the linked State monad example above does. In games we often have a main update loop, where we have to do several successive operations on our game that might change the state. We can do this a number of ways, but one way is with something like do notation, where for instance (in some hypothetical language) we might do this:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>do with gameState
  oldGame &lt;- gameState
  gameState &lt;- checkInput
  gameState &lt;- tick
  if gameState != oldGame
    draw</pre>
</div>
</div>
<div class="paragraph">
<p>And all of this kind of "fake mutation" can be handled underneath the sugar in a purely functional manner. It&#8217;s something I&#8217;ve been meaning to put into Heresy for some time. Heresy uses continuation based loops that have a "carry value", that can be passed from one cycle to the next. It&#8217;s a simple matter of some macro magic to then layer over this some syntax sugar that makes that carry value effectively a name space, that can be altered from one statement to the next, but all entirely without actual mutation underneath.</p>
</div>
<div class="paragraph">
<p>You can write whole imperative, mutation-riddled languages in purely functional ones this way. There&#8217;s even <a href="http://augustss.blogspot.fi/2009/02/is-haskell-fast-lets-do-simple.html">an implementation of BASIC</a> that runs in the Haskell do notation.</p>
</div>]]></description><link>https://jarcane.github.io/2015/07/21/Whats-the-use-of-Monads.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/07/21/Whats-the-use-of-Monads.html</guid><category><![CDATA[Haskell]]></category><category><![CDATA[functional]]></category><category><![CDATA[Heresy]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Tue, 21 Jul 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[How do you say it?]]></title><description><![CDATA[<div class="paragraph lead">
<p>I cried this morning.</p>
</div>
<div class="paragraph">
<p>I didn&#8217;t know precisely why even, at the time. Moments before I had been attempting to look up options for our next meal on the internet. My wife stepped out on to the balcony, and while she was out there, I started weeping.</p>
</div>
<div class="paragraph">
<p>After some time of this, when she had returned and asked me what was the matter, and I had managed to pull myself together enough to croak out a response, I said this:</p>
</div>
<div class="paragraph">
<p>"Everything is terrible."</p>
</div>
<div class="paragraph">
<p>My wife suggested that this was merely the depression talking. As Vonnegut might&#8217;ve said, my brain was producing bad chemicals again.</p>
</div>
<hr>
<div class="paragraph">
<p>The cat doesn&#8217;t like me.</p>
</div>
<div class="paragraph">
<p>It&#8217;s warming up again, I think, but very slowly. It still bolts from my presence if I try to offer it my hand.</p>
</div>
<div class="paragraph">
<p>It wasn&#8217;t always like this. When we first brought her home, I was the one to break the ice and pet the cat for the first time, eventually leading her to my wife. When my wife was out of town for a day the first week, the cat even came to me that night on the couch, and was brave enough to give me a kiss on the nose.</p>
</div>
<div class="paragraph">
<p>Then the next night, she was terrified of me, and ran from the room at every approach.</p>
</div>
<div class="paragraph">
<p>I suspect the cat has suffered some trauma in her previous home. We purchased her from a woman with very Russian-inflected English who held her, or rather attempted to hold her, for the entire visit.</p>
</div>
<div class="paragraph">
<p>I have never in my life seen a cat that more clearly did not want to be where it was than at that moment. The woman gave us the hard sell, of course, telling us how it was her daughter&#8217;s (whom we&#8217;ve never met face to face), and how the daughter moved in with a boyfriend whose young male cat was mean to it.</p>
</div>
<div class="paragraph">
<p>It didn&#8217;t matter. From the moment I saw its face, wide eyed and squirming against the grasp of this strange woman, all I could think was "I&#8217;ve got to get this poor thing the hell out of here!" If I didn&#8217;t, who would? What would happen to it? There was so much fear and discomfort in it&#8217;s eyes. It needed to be rescued.</p>
</div>
<div class="paragraph">
<p>So we did.</p>
</div>
<hr>
<div class="paragraph">
<p>In my life time, there has never been a political party or leader or government in power which I can describe as properly left-wing.</p>
</div>
<div class="paragraph">
<p>In my home country, one has the choice between an obstructionist far-right party, and an ineffectual moderate-right party that inevitably makes a show of things but then caves to the demands of the former. Largely, this is because both parties take money in great quantities from the same very rich people, in order to fund their campaigns. So nothing ever changes on any meaningful level, it just gets worse, as the arms race for campaign expenditure only puts them more and more in the pockets of the same very rich people. This is OK by them, however, because by and large most of the people elected are very rich people themselves.</p>
</div>
<div class="paragraph">
<p>America is a classist society at heart, which tells fairy tails of a classless one in order to keep the poor from complaining too much about the ruling class. And if they dare, they call them communists, or socialists, or anarchists, and send armed men to beat them up should they demonstrate in too great a number.</p>
</div>
<div class="paragraph">
<p>That is the country I grew up in.</p>
</div>
<hr>
<div class="paragraph">
<p>When I was in school, I had a social studies teacher. His name was Jim Erickson. He was of Scandinavian descent, if I recall correctly, which perhaps goes to explain why he was the first and only teacher I ever had in my life to introduce me to the concept of democratic socialism, as it was called in those days.</p>
</div>
<div class="paragraph">
<p>Nowadays of course, the term "social democracy" is often preferred, because "socialism" has been turned into a word so dirty that many people used it against the current president and his ruling party for suggesting that maybe the health care system of the United States might be a little less inclined towards reducing people to poverty and bankruptcy because they were sick.</p>
</div>
<div class="paragraph">
<p>Mr. Erickson taught us, for the first time in my young life, that there was more to the decisions of economy and government than blind faith in "free enterprise". He taught us the concept of income inequality, showing us with stark clarity not only the difference in income between rich and poor in our country, but just how wide that difference was compared to other countries. He showed us that the notion of a "free country" was not predicated solely on how mindbogglingly rich one could be come at the expense of others, but that there were other countries that were just as democratic but where the gap between the rich and poor was not so vast. That in fact, the gap in our country had become almost insurmountable, and it might be far more "free" to help everyone have a level playing field.</p>
</div>
<div class="paragraph">
<p>Yet it&#8217;s only gotten worse, as long as I have been alive. Reagan must be dancing in his grave.</p>
</div>
<hr>
<div class="paragraph">
<p>I dreamed of living in one of those countries, even as a boy. I knew my place in the world, knew my government. Even then I had no hope. I watched my first election play out, a choice between a robot and an idiot, both of whom were taking the same amount of money from the same companies and rich benefactors.</p>
</div>
<div class="paragraph">
<p>Before the 2000 election, one of the biggest political issues in the world of technology was United States v. Microsoft. For the first time since Ma Bell, the federal government was going after a monopoly for once, and to boot: they won! In June of 2000, the judge in that case even ordered a breakup of Microsoft.</p>
</div>
<div class="paragraph">
<p>With the election coming up, and the internet for the first time a real force that might turn the tide of it, there was a lot of interest in some powerful new tools, one of which was a search engine for campaign finances. You could punch in the name of a candidate, and find out who was giving them money. You could punch in the name of a company, and it would tell you what candidates they gave money to.</p>
</div>
<div class="paragraph">
<p>Naturally of course, the first company I thought to enter was Microsoft.</p>
</div>
<div class="paragraph">
<p>They had given money to both parties. In fact, they&#8217;d given almost exactly the same amount to both parties, within only a couple of thousand dollars. The margin was so close that to this day I&#8217;m not sure I could tell you which one.</p>
</div>
<div class="paragraph">
<p>The 2000 election came and went. The government stopped bothering Microsoft. And that breakup never happened.</p>
</div>
<div class="paragraph">
<p>Imagine that.</p>
</div>
<hr>
<div class="paragraph">
<p>Today I actually do live in one of those countries. I have socialized medicine, such as it is, and an unemployment system that is paying me to intern at a Finnish software consultancy, and to study the Finnish language.</p>
</div>
<div class="paragraph">
<p>And yet, this year my adopted country also elected a centre-right government in coalition with the local racist party and the same austerity party that had been, in theory, ousted. To add insult to injury, they even made the former PM a minister in the new coalition. And they put the racist party leader in charge of foreign policy.</p>
</div>
<div class="paragraph">
<p>The ruling party, meanwhile, have the vice president of the EU among their ranks, and the coalition as a whole is wholly committed to the unending economic atrocity being committed in Greece.</p>
</div>
<div class="paragraph">
<p>The government of one of the lesser lights of the great Nordic system is currently enthusiastically committed to reducing the nation of Greece to abject poverty, in order to protect its own rich creditors from losing money.</p>
</div>
<div class="paragraph">
<p>Some social democracy.</p>
</div>
<div class="paragraph">
<p>Elsewhere in Europe, there are actual fascist parties rising up again all over the continent. Anti-immigration sentiment is at an all time high. The great liberal paradises of the North are home to racist parties and politicians who whine about "scroungers" as if they were Tories.</p>
</div>
<div class="paragraph">
<p>The Tories, meanwhile, are unaccountably in power still, having somehow squashed a possible challenge from the actually social democratic SNP party by banging on about nationalism and posting reddit-esque photoshops of the Labour and SNP leaders on the front pages of newspapers, even as those same papers routinely pay homage to pint-swilling national fascist icon Nigel Farage.</p>
</div>
<div class="paragraph">
<p>The Russians have descended into open fascism with Putin as their Great dictator, and gays as their personal scapegoat. They have even taken steps to secure their own Sudetenland by annexing increasingly large sections of Ukraine.</p>
</div>
<div class="paragraph">
<p>My home country is engaged in bitter debate about the flag of a dead racist rebellion, even as its police officers murder black people with impunity on the streets. An election is coming soon, one with, at the moment, the first genuinely liberal politician since FDR running for office, and who has thus naturally been repeatedly made to look like a mad person and a fool.</p>
</div>
<div class="paragraph">
<p>We&#8217;ll have a world war next. You can bet on it.</p>
</div>
<hr>
<div class="paragraph">
<p>A while back I wrote a short review of Kurt Vonnegut&#8217;s <em>Breakast of Champions</em>, in which I professed to be, as Vonnegut was, <a href="https://jarcane.github.io/2015/02/01/A-Man-Without-a-Country.html">a man without a country</a>.</p>
</div>
<div class="paragraph">
<p>But I think now that I was wrong.</p>
</div>
<div class="paragraph">
<p>Oh for sure, I do still feel as I did then and have for many years that the nation in which I was born did not and probably never will come even within a hair&#8217;s breadth of my ideals. I feel so too of my adopted country, in which I still do not speak the language and in which some 17% of the country recently voted in a party whose principle platform is that immigrants like me should never have been allowed in in the first place (especially if they aren&#8217;t as white as the driven snow).</p>
</div>
<div class="paragraph">
<p>I am not just without a country though, I am without even anyone in some other country who even remotely represents me. The fabled "Founding Fathers" allegedly waged war on the basis of "taxation without representation," yet here I am today in a world where there&#8217;s not one party of any real power or influence it seems anywhere in the world that remotely represents what I believe.</p>
</div>
<div class="paragraph">
<p>The whole planet seems to be inexorably sliding towards fascism once more, and I find myself wondering if this is what it felt like in the 1930s. The whole world has gone mad again, and I am just one man without voice, power, or influence to do one thing to stop the oncoming storm, nonetheless driven at times to want to scream.</p>
</div>
<div class="paragraph">
<p>Or cry, as I did this morning.</p>
</div>
<div class="paragraph">
<p>I surround myself with other people who themselves are screaming but, what can we do? We scream and wail but, we do little else.</p>
</div>
<div class="paragraph">
<p>We have become so callous as a species that we send machines to do our killing for us, rather than bother to make the effort ourselves, and then we automate the report of our automated atrocities in <a href="http://www.dronestre.am/">convenient Tweet-sized form.</a></p>
</div>
<div class="paragraph">
<p>Such perfect monsters we are!</p>
</div>
<div class="paragraph">
<p>Half of us commit unspeakable atrocities, while the rest are satisfied, or at least mollified, with merely disapproving of them.</p>
</div>
<div class="paragraph">
<p>But again, what can we do? Rise up in the streets? Take to arms and fill the streets with the blood and guts of the ruling class, and thus become just another generation of self-justified monsters?</p>
</div>
<div class="paragraph">
<p>I should think not, though at times, I do hope nonetheless.</p>
</div>
<div class="paragraph">
<p>So I ask you, dear reader: was it really just bad chemicals that made me say this morning, "everything is terrible"?</p>
</div>
<div class="paragraph">
<p>How else could I say all of this in one sentence?</p>
</div>]]></description><link>https://jarcane.github.io/2015/07/18/How-do-you-say-it.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/07/18/How-do-you-say-it.html</guid><category><![CDATA[personal]]></category><category><![CDATA[politics]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Sat, 18 Jul 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[Enthusiasm.]]></title><description><![CDATA[<div class="imageblock">
<div class="content">
<img src="https://scontent-ams3-1.xx.fbcdn.net/hphotos-xpf1/v/t1.0-9/11014861_936544586383102_8303108115918938460_n.jpg?oh=773ce2a3dd72d234c67145fab380cd1e&oe=561AD611" alt="11014861 936544586383102 8303108115918938460 n.jpg?oh=773ce2a3dd72d234c67145fab380cd1e&amp;oe=561AD611">
</div>
</div>
<div class="paragraph">
<p>I honestly believe this is what happened to Howard Dean too. I was excited about Dean, he was the first candidate in my adult life who displayed anything like passion or enthusiasm or conviction.</p>
</div>
<div class="paragraph">
<p>The media drove him out of the race based entirely on footage of one enthusiastic shout.</p>
</div>
<div class="paragraph">
<p>I wonder what the modern media would&#8217;ve made of Teddy Roosevelt.</p>
</div>]]></description><link>https://jarcane.github.io/2015/07/11/Enthusiasm.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/07/11/Enthusiasm.html</guid><category><![CDATA[politics]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Sat, 11 Jul 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[Hocus Pocus - Excerpts from Chapter 32]]></title><description><![CDATA[<div class="paragraph">
<p>“What a  clever trap your Ruling Class set for us,” he went on. “First the atomic bomb. Now this.”</p>
</div>
<div class="paragraph">
<p>“Trap?” I echoed wonderingly.</p>
</div>
<div class="paragraph">
<p>“They looted your public and corporate treasuries, and turned your industries over to nincompoops,” he said. “Then they had your Government borrow so heavily from us that we had no choice but to send over an Army of Occupation in business suits. Never before has the Ruling Class of a country found a way to stick other countries with all the responsibilities their wealth might imply, and still remain rich beyond the dreams of avarice! No wonder they thought the comatose Ronald Reagan was a great President!”</p>
</div>
<hr>
<div class="paragraph">
<p>They had managed to convert their wealth, which had originally been in the form of factories or stores or other demanding enterprises, into a form so liquid and abstract, negotiable representations of money on paper, that there were few reminders coming from anywhere that they might be responsible for anyone outside their own circle of friends and relatives.</p>
</div>
<div class="paragraph">
<p>They didn’t rage against the convicts. They were mad at the Government for not making sure that escapes from prison were impossible. The more they ran on like that, the clearer it became that it was their Government, not mine or the convicts’ or the Townies’. Its first duty, moreover, was to protect them from the lower classes, not only in this country but everywhere.</p>
</div>
<hr>
<div class="paragraph">
<p>If the Trustees were bad, the convicts were worse. I would be the last person to say otherwise. They were devastators of their own communities with gunfights and robberies and rapes, and the merchandising of brain-busting chemicals and on and on.</p>
</div>
<div class="paragraph">
<p>But at least they saw what they were doing, whereas people like the Trustees had a lot in common with B-52 bombardiers way up in the stratosphere. They seldom saw the devastation they caused as they moved the huge portion of this country’s wealth they controlled from here to there.</p>
</div>
<div class="paragraph">
<p>Unlike my Socialist grandfather Ben Wills, who was a nobody, I have no reforms to propose. I think any form of
government, not just Capitalism, is whatever the people who have all our money, drunk or sober, sane or insane, decide to do today.</p>
</div>
<div class="paragraph">
<p>― Kurt Vonnegut, Hocus Pocus</p>
</div>]]></description><link>https://jarcane.github.io/2015/07/10/Hocus-Pocus-Excerpts-from-Chapter-32.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/07/10/Hocus-Pocus-Excerpts-from-Chapter-32.html</guid><category><![CDATA[miscellaneous]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Fri, 10 Jul 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[Believing in people]]></title><description><![CDATA[<div class="paragraph">
<p><em>The following is cross posted from this <a href="https://www.reddit.com/r/rust/comments/3cl12r/is_rust_too_complicated/csxcbt1?context=1">reddit thread</a>. I really suggest you read it, both Steve and eddyb&#8217;s posts, they&#8217;re great stuff.</em></p>
</div>
<div class="paragraph">
<p><em>This post has since also been quoted by <a href="http://www.infoworld.com/article/2947214/open-source-tools/two-reasons-the-rust-language-will-succeed.html">InfoWorld</a>.</em></p>
</div>
<div class="exampleblock">
<div class="content">
<div class="quoteblock">
<blockquote>
<div class="paragraph">
<p>To determine what "too complicated" even means, you have to ask "for what"?</p>
</div>
<div class="paragraph">
<p>Rust&#8217;s core mission is something that has inherent complexity. I think we&#8217;ve done a good job of not adding additional complexity beyond that, personally. I would argue Rust is simpler than C++, which is widely used.</p>
</div>
<div class="literalblock">
<div class="content">
<pre>is rust is planned to be used by average developer</pre>
</div>
</div>
<div class="paragraph">
<p>I believe in people, personally.</p>
</div>
</blockquote>
</div>
<div class="paragraph">
<p>&#8201;&#8212;&#8201;Steve Klabnik</p>
</div>
</div>
</div>
<div class="paragraph">
<p>Here&#8217;s the thing that touches me about "I believe in people": It&#8217;s not about 'dumbing down' or not, it&#8217;s about how you respect the learner.</p>
</div>
<div class="paragraph">
<p>I have been programming again for a year now. Before that, I hadn&#8217;t touched anything more than a few trivial BASIC and Python programs in nearly a decade and a half. I&#8217;ve essentially had to relearn programming all over again, and because of the way my brain works, I&#8217;ve dabbled in a <strong>lot</strong> of languages and dealt with a lot of different approaches to learning a language in order to do that. I&#8217;ve done everything from interactive tutorials, to koans, to books, to good old-fashioned "type in the code from the guide" stuff, in no less than half a dozen languages.</p>
</div>
<div class="paragraph">
<p>Something I think Rust gets right, the community, the book, even the compiler, is that it does believe in you, but it also doesn&#8217;t expect you to just "get it" overnight.</p>
</div>
<div class="paragraph">
<p>There is a tone to the literature, to the compiler messages, to the IRC channel, which is this: "we understand."</p>
</div>
<div class="paragraph">
<p>Rust is a language that has taken some of the best ideas of programming, and added on top of them some very clever ideas of its own, ideas that take some thinking to get your head around.</p>
</div>
<div class="paragraph">
<p>And it feels to me, like everyone knows this, and <strong>hasn&#8217;t forgotten that.</strong> The single hardest thing about teaching anything is understanding just exactly how much you&#8217;ve internalized and forgotten that you even know.</p>
</div>
<div class="paragraph">
<p>Perhaps this is simply because it&#8217;s a young language yet, and to some extent even the team developing Rust itself is still sort of learning what Rust is and is to be.</p>
</div>
<div class="paragraph">
<p>But I don&#8217;t think it&#8217;s just that.</p>
</div>
<div class="paragraph">
<p>I&#8217;ve yet to feel stupid programming in Rust. I&#8217;ve yet to feel like "oh, dummy, you should&#8217;ve known that." I&#8217;ve yet to feel embarrassed for not knowing something or not puzzling it out on my own. When I read the books, the tone that comes across is "Yeah, this is a little tricky, but don&#8217;t worry if you don&#8217;t get it the first time. You&#8217;ll get it in time." When I ask in the channel, I get prompt and helpful answers, not just to my question, but often to what it means and why. As if there&#8217;s an acknowledgement that every such question is an opportunity to teach, an expected event, instead of a mutual nuisance to be exchanged in the hopes someone else will return the favor later.</p>
</div>
<div class="paragraph">
<p>There&#8217;s a collective impression that programming is challenging, the ideas Rust presents are something a bit new, and everyone&#8217;s gone through their share of puzzling through how it works. No one&#8217;s going to judge you in the slightest for not getting it the first time, but everyone believes you can do it, and wants to help you get to that moment that is by now already probably familiar to many Rust programmers where the little light bulb goes on and you go "oh! That makes perfect sense. Thanks."</p>
</div>
<div class="paragraph">
<p>Part of truly believing in someone is helping them see through their failures to the successes they&#8217;re capable of. I hope this community never loses that, because it&#8217;s something special.</p>
</div>]]></description><link>https://jarcane.github.io/2015/07/09/Believing-in-people.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/07/09/Believing-in-people.html</guid><category><![CDATA[Rust]]></category><category><![CDATA[learning]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Thu, 09 Jul 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[First Rust project: wf]]></title><description><![CDATA[<div class="paragraph">
<p>Perhaps one of the most exciting languages I&#8217;ve had hands on since Haskell, or maybe even Lisp, Rust has had my eye since at least 0.10. The promise of a C competitor systems language, with an ML-inspired type system, and lots of functional tools was intriguing as hell, and I&#8217;ve kept watch for a stable release, intent on checking things out once they settled down a little.</p>
</div>
<div class="paragraph">
<p>With Rust 1.0 finally stable and released, I finally sat down a few weeks ago and started digging into the literature in my off hours. I dove into the brilliant <a href="http://rustbyexample.com/">Rust By Example</a> book, and couldn&#8217;t stop reading. I literally read every last entry, fiddled with the code samples, and generally was excited more and more with every page. It&#8217;s honestly one of the only programming books I&#8217;ve ever finished cover to cover (metaphorically speaking of course, what with it being an interactive web book and all). It&#8217;s a brilliant piece of work, one of the best learning tools for a programming language I&#8217;ve seen.</p>
</div>
<div class="paragraph">
<p>I of course followed it up with some readings from <a href="https://doc.rust-lang.org/book/">The Book</a>, doing a few of the tutorials, as well as a few of the <a href="http://exercism.io">exercism</a> challenges, and bounced around thoughts for a few different project ideas.</p>
</div>
<div class="paragraph">
<p>In the end, it was one of <a href="http://exercism.io/submissions/bcdad67b3093490c86801cd5ef43cba4">those exercism challenges</a> that gave me a good quick "weekend project" idea. The challenge was to write a function to count word frequencies, and I was proud enough of the resulting code to want to turn it into an actual utility.</p>
</div>
<div id="app-listing" class="listingblock">
<div class="title">word_count.rs</div>
<div class="content">
<pre>// Word count

use std::collections::HashMap;

pub fn word_count(s: &amp;str) -&gt; HashMap&lt;String, u32&gt; {
    s.split(|c: char| !c.is_alphanumeric())
        .filter( |s| !s.is_empty() )
        .map(|s| { s.chars().flat_map(char::to_lowercase).collect::&lt;String&gt;() })
        .fold(HashMap::new(), |mut m, i| {
            *m.entry(i).or_insert(0u32) += 1;
            m
        })
}</pre>
</div>
</div>
<div class="paragraph">
<p>It turns out, there isn&#8217;t actually a standard Unix utility for doing this, though it&#8217;s possible through various pipelines with the existing tools, so I wrote one.</p>
</div>
<div class="paragraph">
<p>wf (<a href="https://github.com/jarcane/wf">Github link</a>) is a simple Unix-style command-line utility in the spirit of <a href="https://en.wikipedia.org/wiki/Wc_%28Unix%29">wc</a> that takes a stream of text on stdin, and returns a list of word frequencies. In total, it&#8217;s only about 120 lines of pure Rust, and even includes a couple options (for counting or skipping numbers, and even sorting). No man-page or install script yet; I don&#8217;t actually have a *nix install at the moment, so it&#8217;d be hard to test, but if anyone wants to bundle it up themselves I&#8217;m happy to take pull requests or suggestions.</p>
</div>
<div class="paragraph">
<p>In general, I am left with just as much enthusiasm for Rust as I had when I started. There&#8217;s some odd quirks to it, in particular it&#8217;s not always strictly possible to follow a purely functional style; there&#8217;s still some methods in the standard lib that are purely imperative in nature or require mutation. The memory model takes some getting used to as well, and I still find myself battling with the compiler sometimes, but crucially I generally find that once I find the solution (or get help with it, more on that in a moment), it almost always makes perfect sense.</p>
</div>
<div class="paragraph">
<p>In general though, it&#8217;s a cool language. It feels like C hacking, but with all the functional and type system toys I love, and as a result manages to trip every happy button in my little programmer brain at once in a way no language has since Racket. Everything largely feels <a href="http://graydon2.dreamwidth.org/218040.html">very well thought out</a>, lacking quite so many weird niggles and shoot-your-foot surprises.</p>
</div>
<div class="paragraph">
<p>Perhaps the best part for me too has been the community. The Rust team have committed to creating a very welcoming, helpful environment, and it has paid dividends. If I have a question, someone will answer, and even be willing to walk me through things. It&#8217;s amazing.</p>
</div>
<div class="paragraph">
<p>Honestly, the whole ecosystem just feels like Rust has nailed on all fronts "what programming is supposed to be like" as well as anyone could.</p>
</div>]]></description><link>https://jarcane.github.io/2015/07/05/First-Rust-project-wf.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/07/05/First-Rust-project-wf.html</guid><category><![CDATA[Rust]]></category><category><![CDATA[wf]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Sun, 05 Jul 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[Trying out Hubpress]]></title><description><![CDATA[<div class="paragraph">
<p>My blog has languished considerably as of late. Partly this is due to simple negligence, but also partly because of the effort and cumbersome workflow involved in using a static blog generator. I loved supporting a good Racket project, and Frog is an excellent blog generator, it was just a pain to go through so many steps just to post something, especially if it was only a quick thought.</p>
</div>
<div class="paragraph">
<p>So, giving Hubpress a shot. I&#8217;m not sure about the AsciiDoc thing, but being able to open an admin panel and add a post as easily as any Blogger page is definitely appealing.</p>
</div>
<div class="paragraph">
<p>I&#8217;ll try and get the old posts converted up as soon as I can, though it might be a while.</p>
</div>
<div class="paragraph">
<p>EDIT: I&#8217;m also monkeying about with themes, so my apologies if things are a bit screwy for a while.</p>
</div>]]></description><link>https://jarcane.github.io/2015/07/03/Trying-out-Hubpress.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/07/03/Trying-out-Hubpress.html</guid><category><![CDATA[announcements]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Fri, 03 Jul 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[First week on the job]]></title><description><![CDATA[<div class="paragraph">
<p>It has begun.</p>
</div>
<div class="paragraph">
<p>In accordance with my education in the Finnish language, a portion of
time, about two months, has been set aside over the summer for the
students to take a "work trial" at a Finnish workplace. Owing to my
powerful disinterest in winding up spending my summer stocking shelves
at a supermarket, I naturally was quite on top of attempting to find
some more suitable environment for a budding programmer, which I&#8217;m
delighted to say I did.</p>
</div>
<div class="paragraph">
<p>The work place in question is a firm called <a href="http://metosin.fi">Metosin</a>,
a Clojure consulting firm stationed right in the heart of the city, and
this week was my very first week on the job. It had, as it was, been a
little while since I dove into Clojure (which anyone who&#8217;s actually read
any of this blog, ie. no one, is likely to remember), so prior to
starting the job I dove into a couple web apps in anticipation of my
arrival and future employment.</p>
</div>
<div class="paragraph">
<p>For starters, I did Ludum Dare this year, banging out a spiffy little
Pokémon themed idler game in Hoplon, which you can find
<a href="https://github.com/jarcane/trainers-progress">here</a>. Hoplon is an
interesting framework, whose concept I was initially quite excited by,
an excitement whose dwindling you can perhaps most likely best glean
from the fact that when for my try-out task for Metosin it was suggested
I use Reagent instead, I was actually more than a bit relieved.</p>
</div>
<div class="paragraph">
<p>This task took the form of a full-stack weather look-up application,
which I in my infinite nerditude decided to call
<a href="https://github.com/jarcane/wunderprojectj">wunderprojectj</a>, a reference
so unutterably obscure than I&#8217;m pretty sure no one even noticed, and if
you did, perhaps I shall consider buying you a beer (and then backing
slowly away into the night).</p>
</div>
<div class="paragraph">
<p>Since my official start date, I&#8217;ve been at work on a simple CRUD sort of
a web app for managing members of a matrikkeli organization (a term
which I am obliged to indicate I&#8217;m not entirely sure there&#8217;s a direct
translation for, but that doesn&#8217;t really matter for the purposes of this
blog anyway).</p>
</div>
<div class="paragraph">
<p>It&#8217;s been suggested I keep some kind of log of how the work is going and
what I&#8217;ve been learning, so after the jump, I&#8217;ll get on with how my
week&#8217;s been going.</p>
</div>
<div class="paragraph">
<p>The app is, by the description of my fellow co-workers, quite simple,
which is to say, by the standards of anything I&#8217;d had a personal hand in
previously, it is enormously complicated. Or at least, that&#8217;s how I felt
for the first two days on the job, especially as initially my suggested
task was first porting the entire front-end from Om to Reagent. I spent
the bulk of the first few days just trying to get my head 'round the
organization of the code base, and reading reams and reams of
documentation on various libraries trying to come to grips with the
moving parts and how such a task might even be approached. I had a hell
of a time finding a whole lot of anything from anyone who&#8217;s actually
made such a transition, and Om and Reagent do things in very different
ways; besides which I had trouble even finding many examples of an
application of this scope written in Reagent. I actually wound up
banging up an incredibly primitive toy Reagent app just to figure out
how to refer to a single state atom across multiple files. You can see
that <a href="https://github.com/jarcane/multipage-reagent">here</a> for what it&#8217;s
worth.</p>
</div>
<div class="paragraph">
<p>In the process, I did manage to fix a couple of bugs with the user
profile image display and upload, one of which (with help) was
discovered to be the result of an API refactor that&#8217;d never been
translated to the actual front end calls, and the other of which was a
failure in the image validation which more or less turned the image
upload into an accidental file hosting service.</p>
</div>
<div class="paragraph">
<p>Eventually after some discussions mid-week with the rest of the crew,
the scope of my responsibility was narrowed down instead to new feature
implementation, which has gone a bit better, and given me a bit more
opportunity to really get used to the project organization and so forth.
I managed to implement a user status flag and interest tags on the
back-end, and search for the latter on the front-end. Sadly I&#8217;ve so far
not yet found a way to making those user tags user-editable yet, partly
I suspect because I&#8217;m having a bit of trouble following the libraries
used for the user profile form. My intent is to keep at it though, at
least to get some kind of rough working prototype.</p>
</div>
<div class="paragraph">
<p>At this point it&#8217;s difficult to pin down exactly how much I&#8217;ve learned
from all this, but I&#8217;ve certainly been exposed to quite a lot of new
technology, and I&#8217;d like to think I&#8217;m getting a bit more comfortable
with the work at least so far. On the whole, not totally unproductive
for a first week.</p>
</div>]]></description><link>https://jarcane.github.io/2015/06/05/First-week-on-the-job.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/06/05/First-week-on-the-job.html</guid><category><![CDATA[Clojure]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Fri, 05 Jun 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[A Man Without a Country]]></title><description><![CDATA[<div class="paragraph">
<p><em>Originally posted on <a href="https://ello.co/jarcane/post/kbS4tYC1SuSs5V4n05jz7A">ello</a></em></p>
</div>
<div class="paragraph">
<p>If you have even the slightest question about what book you should read next, the answer is that you should read Breakfast of Champions by Kurt Vonnegut. Probably even if you have already read it, except perhaps if you&#8217;ve read it very recently. If you have never read it, then you should absolutely read it from cover to cover, or at least listen to it via audiobook (there is an excellent recording with Stanley Tucci as narrator).</p>
</div>
<div class="paragraph">
<p>Breakfast of Champions was published in 1973.</p>
</div>
<div class="paragraph">
<p>And nearly every word of it is still true today in America, in 2015, 42 years later.</p>
</div>
<div class="paragraph">
<p>It is at times eerie to read or hear the words of Breakfast of Champions because of this fact. It is a work of both staggering brilliance in so much as it is absolutely incisive, insightful, and even prescient, yet it is also very nearly depressing because so much of that "prescience" is only because so little has really changed since 1973 once you scratch the surface.</p>
</div>
<div class="paragraph">
<p>In some ways, it has gotten worse. Kurt Vonnegut seemed to believe so, with his customary humor of course. In 2004, Vonnegut wrote that Kilgore Trout, the recurring protaganist, supporting cast member, and occasional hero of many of his books, had committed suicide on October 15th, 2004 by drinking Drano, as a result of being informed by a psychic that George W. Bush would be elected president for a second term.</p>
</div>
<div class="paragraph">
<p>He was.</p>
</div>
<div class="paragraph">
<p>Kurt Vonnegut himself went to his grave two years later. In the last book ever published while he was still alive, he had, like myself, given up on his country. Indeed, that was spelled out in the very title of the book, which echoes a <a href="https://www.goodreads.com/quotes/71604-in-case-you-haven-t-noticed-as-the-result-of-a">quote</a> from within: A Man Without a Country.</p>
</div>
<div class="paragraph">
<p>Kurt Vonnegut, was a very smart man. I think he was perhaps the greatest American writer since Mark Twain, and like Mark Twain, he had an utterly razor sharp gift for cutting through the bullshit of American culture and life.</p>
</div>
<div class="paragraph">
<p>Also like Mark Twain, in the end, he just couldn&#8217;t put up with the bullshit anymore. And thus, A Man Without a Country, and his choice of "last words", which were these:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>"Life is no way to treat an animal, not even a mouse."</pre>
</div>
</div>
<div class="paragraph">
<p>Mr. Vonnegut is gone now, and life can&#8217;t treat him that way any more. The rest of us live on with what&#8217;s left of this planet. At least I no longer must live on with what&#8217;s left of the country we both were born into, yet no longer called our own. I too, am a man without a country.</p>
</div>]]></description><link>https://jarcane.github.io/2015/02/01/A-Man-Without-a-Country.html</link><guid isPermaLink="true">https://jarcane.github.io/2015/02/01/A-Man-Without-a-Country.html</guid><category><![CDATA[politics]]></category><category><![CDATA[literature]]></category><category><![CDATA[personal]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Sun, 01 Feb 2015 00:00:00 GMT</pubDate></item><item><title><![CDATA[A resume and a code example in one]]></title><description><![CDATA[<div class="paragraph">
<p>Recently I asked on Twitter about whether it was possible to find work
in functional programming without a degree, seeing as I&#8217;m a functional
programmer and I don&#8217;t have a degree, and was pleasantly surprised to be
contacted by a recruiter who provided some very useful advice on which
languages to look into.</p>
</div>
<div class="paragraph">
<p>They also asked for a resume, which suddenly brought me to the
realization that I hadn&#8217;t actually yet written a programming-oriented
resume yet.</p>
</div>
<div class="paragraph">
<p>So I started thinking of how I could write a resume that would actually
highlight my skills thus far as a programmer in an immediately obvious
way, and I think I found an interesting solution.</p>
</div>
<div class="paragraph">
<p>It&#8217;s pretty common for UI or graphics designers to hand design their own
resumes; it&#8217;s a very clear and direct way of showing off your own design
skills in an obvious way. Sadly, other than that there&#8217;s little in the
way of options for the rest of us: there&#8217;s loads of templates out there
for making an interesting <em>looking</em> resume, but that&#8217;s not really the
same effect for programmers as it is for a designer.</p>
</div>
<div class="paragraph">
<p>What&#8217;s needed is a way to show off what one is capable of as a
programmer through the medium of the resume itself.</p>
</div>
<div class="paragraph">
<p>I&#8217;m not sure I&#8217;ve quite got that far yet, but I have done what I think
is a close-by solution: showing off one&#8217;s basic capabilities as a
programmer through the medium of how the resume is <em>generated</em>.</p>
</div>
<div class="paragraph">
<p>Thus, <a href="https://github.com/jarcane/resume.hsy">resume.hsy</a>.</p>
</div>
<div class="paragraph">
<p><code>resume.hsy</code> is a straightforward Heresy program with one goal: to
generate my resume in Markdown format. After just a half-day&#8217;s effort,
it succeeds at it.</p>
</div>
<div class="paragraph">
<p>It&#8217;s not particularly impressive code (and the contortions involved in
generating the output strings are a little ugly), and the output result
is by design, not especially beautiful. The point here isn&#8217;t to make a
beautiful design object, but to present my skills in a clear format
through the lens of a clear example of how I code. The fact that I
designed the language it&#8217;s written in is also part of the point of the
demonstration, inspired by
<a href="https://twitter.com/boothead/status/545886788196507648">the reaction of
one commenter</a> to my original post on Twitter.</p>
</div>
<div class="paragraph">
<p>Admittedly, that last bit is probably also a weakness: nobody codes in
Heresy yet except me. But the Markdown output is readily available, and
the code is mostly readable to anyone familiar with Lisp, and I&#8217;m also
very proud of having written the first example of useful code in Heresy.</p>
</div>]]></description><link>https://jarcane.github.io/2014/12/29/A-resume-and-a-code-example-in-one.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/12/29/A-resume-and-a-code-example-in-one.html</guid><category><![CDATA[Heresy]]></category><category><![CDATA[programming]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Mon, 29 Dec 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Inventing a Thing]]></title><description><![CDATA[<div class="paragraph">
<p>One of the more ambitious features I decided to attempt for Heresy was
to create a new kind of struct-like syntax that would be easier and
faster to use in-place in a functional style. Racket has a very robust
struct system which I was initially quite enamored of, but which I soon
discovered could get quickly cumbersome to deal with. For Heresy, I
wanted something simpler.</p>
</div>
<div class="paragraph">
<p>So, some days ago I wrote myself
<a href="https://github.com/jarcane/heresy/issues/5">a spec</a> for something called
"Things," but set it aside because I was largely convinced it would take
a considerable amount of wizardry to pull it off. The spec contained a
considerable amount of functionality, from pattern-matching syntax to
inheritance and on.</p>
</div>
<div class="paragraph">
<p>I was wrong. It took me half a day. And
<a href="https://github.com/jarcane/heresy/commit/7dd1456cbeae767be786cbeb94d40c5ea645f325">only
29 lines of code.</a></p>
</div>
<div class="paragraph">
<p>Part of the secret of course to this was actually in the reading and
studying I did trying to learn more about combinators and other such
lambda-based wizardry. It took me about a week of gestating, but what I
realized is that what I needed wasn&#8217;t a static data structure with some
macrology attached to various names, but actually, all that syntax
needed to live in the data structure itself. Then inheritance and
renaming and copying and all that fun stuff comes for free.</p>
</div>
<div class="paragraph">
<p>The result is Things. We can define a new kind of Thing:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>(describe Cthulhu (size 'Immense) (type 'Winged) (status 'sleeping))</pre>
</div>
</div>
<div class="paragraph">
<p>We can call values from Cthulhu:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>&gt; (Cthulhu 'size)
'Immense</pre>
</div>
</div>
<div class="paragraph">
<p>We can copy Cthulhu with new values:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>&gt; ((Cthulhu * * 'awake) 'status)
'awake</pre>
</div>
</div>
<div class="paragraph">
<p>We can give a new name to Cthulhu:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>&gt; (def Dreamer Cthulhu)
&gt; (Dreamer 'type)
'Winged</pre>
</div>
</div>
<div class="paragraph">
<p>And we can make children of Cthulhu:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>&gt; (def Star-Spawn (Cthulhu 'Medium * 'awake))
&gt; (Star-Spawn 'size)
'Medium</pre>
</div>
</div>
<div class="paragraph">
<p>So how does it work? It&#8217;s all just a lambda. (describe &#8230;&#8203;) is a simple
macro wrapper that defines a name and seeds it with a call to (thing
&#8230;&#8203;), which is a helper function that returns a lambda containing a
closure that holds the actual alist that holds our values as well as the
argument handling code for calling and copying it. Indeed, copying
Things is just a recursive call to Thing with new values, and (thing
&#8230;&#8203;) can potentially be called anonymously just like lambdas can. And
because functions are first-class values, inheritence and value-passing
just come with the territory.</p>
</div>
<div class="paragraph">
<p>There is one weakness though:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>&gt; Cthulhu
#&lt;procedure:Cthulhu&gt;</pre>
</div>
</div>
<div class="paragraph">
<p>Because Things are just lambdas underneath, they read naked as
procedures, so they are not immediately transparent.</p>
</div>
<div class="paragraph">
<p>Instead, we have to do this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>&gt; (Cthulhu)
'((size 'Immense) (type 'Winged) (status 'sleeping))</pre>
</div>
</div>
<div class="paragraph">
<p>Though on the upside, this is not merely a print routine: It actually
returns the naked alist underneath the snytax sugar, so you can mangle
it with assoc and subst or whatever other unspeakable horror you wish to
do to the Great Dreamer in the Deep.</p>
</div>]]></description><link>https://jarcane.github.io/2014/12/01/Inventing-a-Thing.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/12/01/Inventing-a-Thing.html</guid><category><![CDATA[Heresy]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Mon, 01 Dec 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[So I made a programming language. Now what?]]></title><description><![CDATA[<div class="paragraph">
<p>About a week ago, I had a ridiculous idea. I was in the process of
learning some basic Racket macros, and also still following the progress
of a couple vintage Lisp dialects for the Tandy Color Computer. Even
played around a bit with XLISP in OS-9. And then someone asked me what a
Lambda was.</p>
</div>
<div class="paragraph">
<p>Somehow, in the fog of all that (plus a week with a hell of a lot of
stress, mostly irrational), came a mad idea. What if someone mashed up
BASIC with Lisp? Stranger still, a functionally-oriented BASIC Lisp.</p>
</div>
<div class="paragraph">
<p>Then I went and wrote one.</p>
</div>
<div class="paragraph">
<p>I called it <a href="https://github.com/jarcane/heresy">Heresy</a>, because that
seemed like the right name for it.</p>
</div>
<div class="paragraph">
<p>With help from a few helpful Racketeers in IRC, I now have a functional
dialect of Lisp that borrows heavily from BASIC syntax; a kind of
"Nutrasweet" syntax married with immutable variables and some (I&#8217;d like
to think) vaguely clever use of seemingly imperative constructs executed
with functional code.</p>
</div>
<div class="paragraph">
<p>It is also now the most well-recieved project I&#8217;ve ever released,
netting 18 stars on Github, almost 3,000 vistors to the repo, and a
whole day near the top of Hacker News' front page.</p>
</div>
<div class="paragraph">
<p>Now, don&#8217;t get me wrong or think I&#8217;m letting it get to my head (well, I
probably am a little). I fully expect that many of those clicks were
more at the very novelty and silliness of the idea. But as ideas go,
I&#8217;ve seen dumber ones succeed, and it&#8217;s been a useful learning project
that fits nicely into my current schedule. The question is though, what
do I do with it? Where do I want to go? Is Heresy a way to ease BASIC
programmers Lisp? A playground for weird ideas about functional
programming?</p>
</div>
<div class="paragraph">
<p>Time to establish some ground rules.</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><em>Heresy is BASIC</em> - Heresy is an heir to BASIC, and aims to be at
least somewhat easy for BASIC programmers to learn. Mostly this means we
prefer BASIC names over the Lisp name, and naming conventions like the $
for string functions.</p>
</li>
<li>
<p><em>Heresy is a Lisp</em> - Heresy is still a Lisp, and loves simple syntax
and s-expressions. While it makes use of some sugaring like literal
keywords for certain common primitives, these are best used sparingly.
Heresy is the Diet Coke of Evil, just one calorie, not quite evil
enough.</p>
</li>
<li>
<p><em>Heresy is functional</em> - Functional, but not Haskell. It is not
intended solely as a vehicle for absolute functional purity. I love
Haskell. You love Haskell. We don&#8217;t need to write another Haskell. Think
more in terms of a lower-calorie, more intelligible Clojure.</p>
</li>
<li>
<p><em>Heresy is for learning</em> - Heresy started as a learning project for
me, a chance to learn how Lisp and functional programming really work on
a practical level. I hope that, in time, it can be that for others as
well, especially those who grew up with BASIC like me and still
sometimes struggle to get their head on this brave new FP world we live
in now.</p>
</li>
<li>
<p><em>Heresy is an experiment</em> - Heresy is an experimental language. It&#8217;s
very DNA is as a mad idea that came to life, and it&#8217;s development should
be ready and willing to embrace new mad ideas and run with them. This is
where <em>carry</em> came from, and I hope to have more mad ideas in the
future.</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>Those are my thoughts for now though. I would like to point your
attention to #5 in particular, because one of it&#8217;s side effects is that
any or all of these rules probably will change or be ignored as
necessary over time. It also leaves out some things I haven&#8217;t decided
yet, like how much of Heresy should be self-hosted (probably as much as
can be borne), or a more specific syntax standard for function names
(because ? for preds still looks wrong and un-BASIC to me).</p>
</div>
<div class="paragraph">
<p>Heresy is the projection of a fevered imagination still buzzing away
with strange new ideas. Think of me less as a BDFL and more of a Mad
King gibbering in the dark, still sometimes speaking truth in between
the deranged quartos and evocations of elder things from beyond time and
space &#8230;&#8203;</p>
</div>]]></description><link>https://jarcane.github.io/2014/11/18/So-I-made-a-programming-language-Now-what.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/11/18/So-I-made-a-programming-language-Now-what.html</guid><category><![CDATA[Heresy]]></category><category><![CDATA[Racket]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Tue, 18 Nov 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[On LET: a brief comparative thesis]]></title><description><![CDATA[<div class="paragraph">
<p>I started programming, as many people my age did, as a kid, with a
computer running Microsoft BASIC. Disk Extended Color Basic on a Tandy
Color Computer 3, to be precise. I wrote quite a few programs, large and
small, as well as modding a few others that came on various Rainbow
disks I&#8217;d cobbled together mostly from either the Internet or an uncle
who was far more invested in the scene.</p>
</div>
<div class="paragraph">
<p>Thus, when I at last discovered the introduction to macros and language
definitions in <em>Realm of Racket</em>, it struck me that it might be
interesting to practice those tools by experimenting with defining a
BASIC-Lisp hybrid which I am tentatively tempted to entitle "Heresy".</p>
</div>
<div class="paragraph">
<p>I&#8217;m still in the research stages right now, though I&#8217;m putting code to
file today, and in researching how to map keywords from one to the other
I discovered a very important clash: LET.</p>
</div>
<div class="paragraph">
<p>Besides the obvious math operators and so forth, LET is one of the few
standard keywords that exists in both BASIC and Lisp languages, but both
could not possibly seem to describe more polar opposite functions.</p>
</div>
<div class="paragraph">
<p>LET in BASIC is the somewhat deprecated global variable declarator and
assigner. Ie.:</p>
</div>
<div class="paragraph">
<p><code>LET X = 5</code></p>
</div>
<div class="paragraph">
<p>LET in old-school BASIC is probably closer in function to the old Lisp
keyword SETQ, in that it is used both to explicitly declare a new
variable, but also to set that variable to a new value. It&#8217;s also
distinct from DIM in that DIM was primarily used to declare arrays until
much later dialects like QBasic and Visual Basic, and also because it
must explicitly assign a value.</p>
</div>
<div class="paragraph">
<p>LET in Lisp and Scheme however exist to provide temporary names for
local values, usually within a function or a macro. They almost provide
for variables what lambdas do for functions, and even allow the
definition of new functions as well (either through explicit syntax for
this, or by taking advantage of lambdas).</p>
</div>
<div class="paragraph">
<p>And yet &#8230;&#8203; look back at that syntax for the BASIC version again. Both
of these terms are coming from the same place: algebra. I am willing to
bet that nearly everyone reading this write now has done at least one
problem, probably thousands, that started with some statement of 'let x
equal &#8230;&#8203;.' Wiktionary even cites this in the definition of the word as
an example: "Let P be the point where AB and OX intersect."</p>
</div>
<div class="paragraph">
<p>There is of course a reason for this. Lisp is famously based on Church&#8217;s
lambda calculus, and its mathematical pedegree is hardly a secret.
Dartmouth BASIC meanwhile was originally made mainly to help students do
calculations for their homework assignments, the terminology springing
directly from the pages of their algebra and trigonometry assignments.</p>
</div>
<div class="paragraph">
<p>And it&#8217;s in this historical meeting point that we can ask ourselves a
question, and answer it.</p>
</div>
<div class="paragraph">
<p>Question: how did these two uses of LET evolve into such polar
opposites? Answer: They didn&#8217;t. They both mean the same thing; it&#8217;s
their approach to problem solving that&#8217;s different.</p>
</div>
<div class="paragraph">
<p>Wait, what?</p>
</div>
<div class="paragraph">
<p>It&#8217;s true. If you go back and look at the exercises and code samples and
tools offered in the original Dartmouth BASIC, you realize something
about what BASIC programs are meant to be, vs. how Lisp programs are
generally approached. Dartmouth BASIC was written for tiny problems,
word problems. The domain of a BASIC program was expected to be a single
problem, and so the syntax and semantics both were constructed with that
goal in mind.</p>
</div>
<div class="paragraph">
<p>Lisp on the other hand, while it has diverged over the years into many
approaches from the purely functional Clojure to the 'basically just
rewritten C' of some Emacs-Lisp code, still fundamentally it comes
instead from a logic that was about breaking down one big program into
many littler problems, each of which may potentially need to define it&#8217;s
own local variables.</p>
</div>
<div class="paragraph">
<p>It&#8217;s not that LET necessarily means something different etymologically
here, both creators were ultimately seeking to define the same tool, but
the difference in how they actually work on a practical level and how
they came to act as keywords in two very different ways, has more to do
with how they approach problems as discrete pieces.</p>
</div>
<div class="paragraph">
<p>In the past I&#8217;ve often defended BASIC, in part on the strength of the
revisions made in more purely proceduraly dialects like QBasic, and in
part because we BASIC 'hobbyists', shunned away as we were by the C
coders and the elite ASM hackers of the day and since, really often
could write code just as procedural and well thought out as any. It&#8217;s
just that the dirty secret, what those sneering outsiders could see that
we couldn&#8217;t, was just how much we were working <em>against</em> the language to
do it. BASIC was asked, and somehow managed, to do things and solve
problems far in advance of the scope for which it was ever designed.</p>
</div>
<div class="paragraph">
<p>There is actually tail-call-optimization and code for writing recursive
macros in <em>FreeBASIC</em> now (there are, amusingly enough, even a couple
simple Lisp interpreters, even an embedded scripting language in Lisp
for FB). Of course, this is in FB, a modern dialect of the QBasic branch
with at least something more resembling a modern approach, but it still
illustrates the fierce devotion that BASIC fans were almost <em>driven to</em>
by their reputation in the wider community.</p>
</div>
<div class="paragraph">
<p>These days of course, I look at even QBasic code and shudder to think,
but then I also feel the same way looking at Java. And while Heresy
kinda started as a joke esolang idea and may stay that way, it interests
me to wonder if a "Lisp-flavored BASIC" might be a genuinely useful
dialect for introducing those die-hard BASIC coders to the flexibility
of a language that is not still fighting attempts to use it for more
than solving simple algebraic equations.</p>
</div>
<div class="paragraph">
<p>Of course, I still haven&#8217;t decided which definition of LET to stick to.</p>
</div>]]></description><link>https://jarcane.github.io/2014/11/11/On-LET-a-brief-comparative-thesis.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/11/11/On-LET-a-brief-comparative-thesis.html</guid><category><![CDATA[Racket]]></category><category><![CDATA[programming]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Tue, 11 Nov 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[I am.]]></title><description><![CDATA[<div class="paragraph">
<p>The following post is mostly about personal matters, and save where
those matters affect my progress as a wannabe programmer, probably won&#8217;t
talk about that subject much. So if you don&#8217;t want to listen to the
rantings of a frustrated and depressed individual venting his
frustration with life under mental illness, you need not bother clicking
past the more link for this one. Sorry.</p>
</div>
<div class="paragraph">
<p>My name is John Berry, and I am depressed.</p>
</div>
<div class="paragraph">
<p>I fucking hate that word.</p>
</div>
<div class="paragraph">
<p>Really, genuinely, truly hate it. With every fiber of my fucking being.</p>
</div>
<div class="paragraph">
<p>It is the most inherently fucking trivializing bullshit there is, that
word. It&#8217;s trivializing because you can always, always tack "just" on
the front of it, and people believe it. Even people who <em>are</em> depressed,
like me, get in the habit of that. It doesn&#8217;t even really truly express
with any genuine emphasis what living with it is actually like. The word
itself feeds the disease by anointing it with a term that most people
use for a mere temporary and justifiable down moment in life, even when
what&#8217;s actually meant is the relentless oppressive influence of a part
of your own brain unceasingly pursuing a course of deliberate misery and
self-sabotage.</p>
</div>
<div class="paragraph">
<p>I&#8217;m not "depressed".</p>
</div>
<div class="paragraph">
<p>I&#8217;m fucking <em>angry</em>. I&#8217;m angry because I was put on this earth with a
reasonably creative and intelligent mind that nonetheless has to be
dragged kicking and screaming into actually fucking doing anything with
it. I am angry because I watch the world go by me at a dizzying pace
while I struggle just to keep from getting trampled. I&#8217;m angry because I
see what "normal" people do every day and I&#8217;m doing less than half that
and I feel like I&#8217;ve barely enough time and energy to manage that.</p>
</div>
<div class="paragraph">
<p>I am sick to fucking death of feeling sick to fucking death. I&#8217;m sick of
spending half my day just trying to stay awake and the other half just
trying to force myself to actually do anything other than fall back to
the usual useless and unproductive defaults. I&#8217;m sick of freak panic
attacks, sudden headaches, sudden weakness, sudden numbness, loss of
appetite, loss of energy, loss of sleep, too much sleep, wild mood
swings, emotional vomiting, of some days suddenly being overcome with
the desire to just curl up and weep in a corner until I pass out, and of
feeling like my whole useless body is simply slowly dying off bit by
bit.</p>
</div>
<div class="paragraph">
<p>I am afraid. Afraid all the time about everything and anything. Afraid
I&#8217;m going to die. Afraid I&#8217;m not afraid enough of that idea. Afraid of
what I&#8217;d do if I got any worse than this. Afraid of what my body does to
me every day. Afraid I&#8217;ve lost the ability to tell what&#8217;s real and
what&#8217;s not, either in my own symptoms or my own thoughts.</p>
</div>
<div class="paragraph">
<p>I am out of my goddamn mind. I know it. I don&#8217;t always know where the
line is between rational self-talk and just pure festering evil, but
damned if I don&#8217;t know full well I shouldn&#8217;t be like this. That feeling
sick from some new medication that doesn&#8217;t work is not an excuse to then
go into full fucking internal hysterics. That see-sawing wildly from
crushingly depressed, uncontrollably angry, and completely bloody numb.</p>
</div>
<div class="paragraph">
<p>Because some days?</p>
</div>
<div class="paragraph">
<p>I just <em>am</em>.</p>
</div>
<div class="paragraph">
<p>I exist. I am alive. And sometimes that feels like the best I can
muster, and I don&#8217;t even know why other than I&#8217;m terrified of not being
so. I don&#8217;t know what I&#8217;m doing, I don&#8217;t know why I&#8217;m doing it, how I
got here, where I&#8217;m going, anything. I&#8217;m just waiting out the day until
the next one; rinse and repeat. Only now I feel like I&#8217;m thrust into a
situation where I can&#8217;t even do <em>that</em> right anymore.</p>
</div>
<div class="paragraph">
<p>Every day I get up in the dark and I watch the time already slipping
away from me before I&#8217;ve scarcely even felt awake, before dragging
myself to a class I desperately want to be better at, but find myself
struggling just to keep up with that kind of concentration and focus
requirement. Then I come home and argue with myself until I manage to
win and feed myself, and now I get to spend the next few hours feeling
guilty and lost about where or what I&#8217;m even doing programming, until
it&#8217;s time to make dinner and another window of opportunity closes.</p>
</div>
<div class="paragraph">
<p>I desperately want to finish this Finnish course, because I&#8217;m tired of
being lost and confused in this country whenever anyone tries to speak
to me, but I&#8217;m struggling like hell just to get there in the mornings. I
know I&#8217;m learning, but I honestly don&#8217;t even know how at this point. I&#8217;m
on fucking auto-pilot. The captain just gets up and goes to the loo
sometimes, or chats up a stewardess, in the middle of conversation
sometimes. And of course, when something comes up that&#8217;s unfamiliar, or
sometimes just because the captain&#8217;s out of the cockpit, I crash into a
damn mountain.</p>
</div>
<div class="paragraph">
<p>And even once it&#8217;s done, I don&#8217;t know what the hell I&#8217;m going to do with
the <em>rest</em> of my life. I&#8217;ll just be a reasonably fluent Finnish-speaking
jobless, careerless drifter. Roleplaying was never going to pay the
bills on my energy level. There are guys who do it, but they write at
paces that would make most professional novelists blanch, making up for
low pay with insane work hours that I just can&#8217;t keep up with. And I
don&#8217;t even know where to start finding some other writing focus, and
it&#8217;s not like there&#8217;s a lot of work in English writing here.</p>
</div>
<div class="paragraph">
<p>So I got into programming, because I had the free time, and I did get
properly sucked in by the Codecademy approach. Taking that Python course
woke me up at last to the realization that I actually did enjoy doing
it, I just didn&#8217;t always know what I was doing as a kid, because I only
had my own clueless fumblings and a handful of manuals to work with. But
since then, I&#8217;m fumbling the carry, and I know it. It&#8217;s right back to
how it was every time in the last 10 or 15 years I&#8217;ve tried to pick it
up again: just a lot of blind fumbling, toying with various books and
tools and languages until I get bored or frustrated or lost and just
give up and get depressed about it. I feel like I&#8217;ve got so much more
progress to make, and I&#8217;m making none of it, and I do still dread
spending all this time finding the love of programming only to wind up
working in some awful code factory of Vogonic doom.</p>
</div>
<div class="paragraph">
<p>And on top of all of this, or perhaps because of it, my brain just seems
to keep getting worse. I am really, honestly fucking losing it lately.
Ready to just breakdown on a hair trigger and I don&#8217;t know how I&#8217;ve
coped. I don&#8217;t even talk to anyone about it because where do I start?
And how do I explain that sometimes there isn&#8217;t <em>really</em> a "why" or an
easy fix or fault to be corrected. The reality is that this, all of this
huge fucking storm in my head, is just a bad spell of what I&#8217;ve been
dealing with on some level for most of my adult life. The end result of
too much stress, not enough sleep, and not enough grip on where I&#8217;m
going and what I&#8217;m doing, to be able to put up as much of a fight as I
might otherwise be able to.</p>
</div>
<div class="paragraph">
<p>Even speaking to the doctor about just part of my symptoms felt like
trying to explain the Iliad to a tortoise. They just fixate on one thing
and ignore the rest, and prescribe shit at random in the hopes that
something will make it go away. Sometimes it helps, and then sometimes,
like today, I get to go home early because the fucking <em>melatonin</em> that
the doctor gave someone who has <em>energy issues</em> turns out to not be a
good fucking idea because of course it bloody isn&#8217;t.</p>
</div>
<div class="paragraph">
<p>Still here I am, getting older all the time.</p>
</div>
<div class="paragraph">
<p><a href="https://www.youtube.com/watch?v=5boNqPH9vv8">I miss ska.</a></p>
</div>]]></description><link>https://jarcane.github.io/2014/10/23/I-am.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/10/23/I-am.html</guid><category><![CDATA[Personal]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Thu, 23 Oct 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[A Quickstart Guide to Frog and GitHub Pages]]></title><description><![CDATA[<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>It was discussed recently on the #racket freenode channel that getting
going with Frog might actually be a bit tricky for someone not coming
from the Racket ecosystem or unfamiliar with Github Pages. The process
is actually pretty straightforward, but the steps involved aren&#8217;t
exactly documented anywhere in one place, and I promised to look into
remedying that. Arcane Syntax itself is hosted on GHP, and generated
with Frog, so I had some experience in getting it all working and
thought I could help.</p>
</div>
<div class="paragraph">
<p>Read on past the jump for a quick guide to building a blog in Frog and
hosting it on Github Pages.</p>
</div>
</div>
</div>
<div class="sect3">
<h4 id="step-1-install-racket">Step 1: Install Racket</h4>
<div class="paragraph">
<p>Frog is powered by the Racket programming language, and is currently
available primarily as a package for Racket, so we&#8217;ll need that. You can
download Racket for your platform, be it *nix, Mac, or Windows, from
their <a href="http://download.racket-lang.org/">web site</a>. If you&#8217;re on a Linux
or BSD, you might also check your package repo for it, but be sure it&#8217;s
up-to-date: Frog needs Racket 6, and I know at least Debian is still
only hosting 5.x.</p>
</div>
<div class="paragraph">
<p>Crucially here, you also need to make sure that Racket&#8217;s root directory
is available in your command-line path. Unixen should take care of this
automatically, but Windows will need it added to the $PATH if we want
this to be a painless process. You&#8217;ll need to go to the System Control
Panel, Advanced System Settings, Environment Variables, and edit Path to
include "C:\Program Files\Racket" for 64-bit Racket or "C:\Program Files (x86)\Racket" for 32-bit.</p>
</div>
</div>
<div class="sect3">
<h4 id="step-2-install-frog">Step 2: Install Frog</h4>
<div class="paragraph">
<p>As long as Step 1 has gone fine, this part is easy. Go to your command
line and do <code>raco pkg install frog</code>.</p>
</div>
<div class="paragraph">
<p>raco is the Racket command-line swiss army knife, used for everything
from compiling executables to installing packages; it&#8217;ll also be your
interface for Frog commands too, now that it&#8217;s installed.</p>
</div>
</div>
<div class="sect3">
<h4 id="step-3-make-a-github-account">Step 3: Make a Github Account</h4>
<div class="paragraph">
<p><a href="http://github.com">GitHub</a> is a service for hosting source repositories
managed by the Git version control system. You can create a new account
right from the main page, picking a username, email, and password. It&#8217;ll
ask you what plan you wish to use, with Free as an option so long as you
don&#8217;t mind all your repos being public. It will also send an email to
whatever account you gave it, to verify that email for future use for
things like password recovery.</p>
</div>
<div class="paragraph">
<p><em>NOTE:</em> By default, the email address you give Github will be publicly
posted on your account profile. If you don&#8217;t want this to happen, once
you&#8217;ve verified your email address, you can tell it to 'keep my email
address private' on the email settings page.</p>
</div>
</div>
<div class="sect3">
<h4 id="step-4-install-git">Step 4: Install Git</h4>
<div class="paragraph">
<p>You&#8217;ll also need to install Git, because as the previous step alluded
to, it&#8217;s what we&#8217;re going to use to manage and sync our changes to the
blog whenever we generate a new post and so forth.</p>
</div>
<div class="paragraph">
<p>If you&#8217;re on Windows, the path of least resistance here is just to
install the <a href="http://windows.github.com">Github for Windows</a> client. Ditto
for Macs, which have their <a href="https://mac.github.com/">own client</a>. It&#8217;s not
without it&#8217;s wrinkles, but for our purposes it is dead easy. Otherwise,
if we&#8217;re on Unixen, we&#8217;ll probably need to install it from our package
repo of choice.</p>
</div>
<div class="paragraph">
<p>You&#8217;ll also need to do some additional setup things as well, like
creating an SSH key for using Git and stuff, which I am going to pass
along to the absolutely excellent
<a href="https://help.github.com/articles/set-up-git/">Github Tutorial page</a> on
setting up Git.</p>
</div>
</div>
<div class="sect3">
<h4 id="step-5-make-a-repo-for-your-page">Step 5: Make a Repo for your page</h4>
<div class="paragraph">
<p>If you&#8217;re logged in to Github, you can just click on the little + symbol
on the top bar of the site and choose "New Repository".</p>
</div>
<div class="paragraph">
<p>For the name, we want to name it after the URL we&#8217;re going to use to get
to our new blog. Github does a really cool thing where a
<em>username</em>.github.com repo will be automatically uploaded and hosted
at that URL. So that&#8217;s what we&#8217;ll name our repo, using the username we
chose in Step 3.</p>
</div>
<div class="paragraph">
<p>It&#8217;s up to you whether you want it to be public or private, but the
latter option is only available if you pay for hosting. You can also
provide a description. Don&#8217;t worry about the .gitignore and license
stuff, and we don&#8217;t really need to make a README either. We actually
want our new repo completely empty.</p>
</div>
</div>
<div class="sect3">
<h4 id="step-6-make-the-local-mirror-of-our-blog">Step 6: Make the local mirror of our Blog</h4>
<div class="paragraph">
<p>Guess what! See that page that just appeared when we started an empty
repo? It happens to be a complete set of instructions to link our online
repository to a local folder on our computer. We just have to know a
little bit more on what to do with them.</p>
</div>
<div class="paragraph">
<p>If you&#8217;re on Windows or Mac, and you&#8217;ve installed the Github client,
this is easy as can be: click that green button. If you&#8217;ve followed the
set up instructions I linked in Step 4, that should open it up in our
Github client and let us create a local "clone" of our online repo.</p>
</div>
<div class="paragraph">
<p>If you&#8217;re on Unixen, we want to do the thing it says there under "or
create a new repository on the command line", save that it&#8217;s left out an
important step: we need to make a folder for all this to happen in! So
we revise the instructions too:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>mkdir [username].github.com
cd [username].github.com
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/frogtutorial/frogtutorial.github.com.git
git push -u origin master</pre>
</div>
</div>
<div class="paragraph">
<p>Substitute <code>[username]</code> for the name you used on Github.</p>
</div>
</div>
<div class="sect3">
<h4 id="step-7-build-our-new-blog">Step 7: Build our new blog</h4>
<div class="paragraph">
<p>Navigate to the directory you created in the previous step in your
favorite command-line shell, and do <code>raco frog --init</code>.</p>
</div>
<div class="paragraph">
<p>Frog will now build all the requisite template files to generate your
new blog! These will all be on defaults, of course, but you can even run
<code>raco frog -bp</code> and it will build and open your blog in your web browser
running on a local webserver. Neat! Hit Ctrl-C to stop the server if you
don&#8217;t want it to stay running.</p>
</div>
</div>
<div class="sect3">
<h4 id="step-8-customize-our-blog">Step 8: Customize our Blog</h4>
<div class="paragraph">
<p>Right now though, our blog is pretty generic. It&#8217;s all on defaults! We
can change some of the most common settings and details from the
<code>.frogrc</code> file that lives in the root of our site folder. Open it up in
your favorite text editor.</p>
</div>
<div class="paragraph">
<p>Crucially, we really need to change the URL, to match the URL of our
Github page: <code>http://[username].github.com</code></p>
</div>
<div class="paragraph">
<p>You can also change the title and author here, as well as some settings
about how Frog generates pages, which are all helpfully described right
there in the file. We don&#8217;t really need to mess with any of them for now
though.</p>
</div>
<div class="paragraph">
<p>We can also tell it which text editor we use, by giving it the name of
the executable. This is useful because we can follow up with some
helpful frog command to open the editor to the last new post we told it
to make.</p>
</div>
<div class="paragraph">
<p>The default templates that Frog uses to generate pages are also
tweakable, if you know some HTML and so forth, and it uses Bootstrap for
making a pretty site; so you can use Bootstrap templates like those on
<a href="http://bootswatch.com/">Bootswatch</a> to jazz it up from the basic
template. I&#8217;ve also written a short little guide for setting up
<a href="http://jarcane.github.io/blog/2014/09/16/disqus-comments-with-frog.html">Disqus
comments</a> properly.</p>
</div>
</div>
<div class="sect3">
<h4 id="step-9-generate-a-new-post">Step 9: Generate a new post</h4>
<div class="paragraph">
<p>So let&#8217;s make a post to our new blog! Once more from our blog&#8217;s home
folder, we can do <code>raco frog -n "[post title]"</code>. It will helpfully
display the name of the Markdown file it just generated to be the
template of our new post.</p>
</div>
<div class="paragraph">
<p>You can open up this .md file in your favorite text editor or run
<code>raco frog --edit</code> if we&#8217;ve set that up.</p>
</div>
<div class="paragraph">
<p>Frog files are in the form of Markdown, which is a handy little markup
language invented by John Gruber that makes pretty looking text files
that also parse semi-easily to equally pretty HTML. Mr. Gruber has a
helpful guide for the basics on his page defining
<a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a>.</p>
</div>
<div class="paragraph">
<p>A new Frog post already includes some boilerplate stuff: a block at the
top with title, date/time, and tags, some filler text, and a <code>more</code> tag
for marking a break in the text between what&#8217;s shown in your main blog
page and what&#8217;s only shown by clicking through to individual posts.</p>
</div>
<div class="paragraph">
<p>The filler text can be replaced, the more tag removed or placed where
you like, but crucially, you <em>MUST</em> change the DRAFT tag to something
else, or else Frog will skip it when you build the blog!</p>
</div>
</div>
<div class="sect3">
<h4 id="step-10-build-your-blog">Step 10: Build your blog</h4>
<div class="paragraph">
<p>Save your text file, and now we can rebuild the blog to include it. Do
the following on the command line:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>raco frog -c  *clears any old cached files, don't forget this!*
*then*
raco frog -bp  *if you want to see a preview*
*or just*
raco frog -b  *if you don't*</pre>
</div>
</div>
<div class="paragraph">
<p>If everything looks satisfactory, proceed to step 11. Otherwise, tweak
things as needed and redo the build.</p>
</div>
</div>
<div class="sect3">
<h4 id="step-11-sync-your-changes-with-github">Step 11: Sync your changes with Github</h4>
<div class="paragraph">
<p>Now we need to commit and upload our newly built blog to Github to host.</p>
</div>
<div class="paragraph">
<p>If you&#8217;re on Windows or Mac and using the Github client, this can be
done by clicking on our repo, adding a summary and description under
"Uncommitted Changes", clicking "Commit to master", then finally
clicking the Sync button on the upper right.</p>
</div>
<div class="paragraph">
<p>If we&#8217;re on Unixen, we do this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>git add -A
git commit -m "Some kind of short description"
git push</pre>
</div>
</div>
<div class="paragraph">
<p>Once everything is uploaded, and accounting for a bit of time for Github
itself to recognize that stuff lives there now, we should be able to see
our new blog online at <code>http://[username].github.com</code>!</p>
</div>
<div class="paragraph">
<p>If you want any more help with Frog, be sure to check out the
<a href="https://github.com/greghendershott/frog">Frog repo</a>, and if you&#8217;ve any
questions about Git or Github, their help files are surprisingly helpful
and informative. Enjoy!</p>
</div>
</div>]]></description><link>https://jarcane.github.io/2014/10/18/A-Quickstart-Guide-to-Frog-and-GitHub-Pages.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/10/18/A-Quickstart-Guide-to-Frog-and-GitHub-Pages.html</guid><category><![CDATA[Racket]]></category><category><![CDATA[Frog]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Sat, 18 Oct 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Sort in a Tweet]]></title><description><![CDATA[<div class="paragraph">
<p>Sometimes I just can&#8217;t leave well enough alone. After my last post I
dove into further simplifying my Racket code, and as a fun way of
<a href="https://twitter.com/J_Arcane">relaunching my Twitter</a> I decided to take
the lock back off with a bang by code-golfing the sort algorithm down to
fit in a tweet.</p>
</div>
<div class="paragraph">
<p>With some extra pointers from Rosetta Code and Jens Axel Soegaard in the
#racket channel, I boiled it down to
<a href="https://twitter.com/J_Arcane/status/520664571858911232">this tweet</a>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>#lang racket (define (s f l)(match l['() '()][`(,h .,t)`(,@(s f(filter(curry(negate f)h)t)),h,@(s f(filter(curry f h)t)))]));(sort fun list)</pre>
</div>
</div>
<div class="paragraph">
<p>I also debuted a new personal logo, developed entirely in Racket using
the Racket image libraries. I was inspired by the shape of the
<a href="http://en.wikipedia.org/wiki/Lambda_phage">lambda phage</a> and the Plague
Inc. computer game to create a new lambda logo:</p>
</div>
<div class="paragraph">
<p><span class="image"><img src="http://i.imgur.com/xHfZ0a2.png" alt="The Lambdemic Logo"></span></p>
</div>
<div class="paragraph">
<p>This can be helpfully generated with the following piece of Racket code:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>#lang racket

(require pict
         images/icons/style
         images/icons/symbol
         images/icons/misc
         file/convertible)

(define lambda-phage
  (pict-&gt;bitmap
   (cc-superimpose
    (bitmap (regular-polygon-icon 6
                                  (* -1/2 (- (/ pi 6) (* 1/2 pi)))
                                  #:color "darkred"
                                  #:height 256
                                  #:material glass-icon-material))
    (bitmap (lambda-icon #:height (* 256 3/4)
                         #:color "white"
                         #:material plastic-icon-material)))))

(send lambda-phage save-file "lambdemic-big.png" 'png)</pre>
</div>
</div>
<div class="paragraph">
<p>And for that amusing little banner image:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>#lang racket

(require pict
         pict/code
         file/convertible)

(define define-universe
  (pict-&gt;bitmap
   (cc-superimpose
    (colorize (filled-rounded-rectangle  1500 500) "Moccasin")
    (parameterize ([current-code-font "Envy Code R"]
                   [get-current-code-font-size (lambda () 48)])
      (code (begin
              (define universe
                (void))))))))

(send define-universe save-file "define-universe.png" 'png)</pre>
</div>
</div>]]></description><link>https://jarcane.github.io/2014/10/10/Sort-in-a-Tweet.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/10/10/Sort-in-a-Tweet.html</guid><category><![CDATA[Racket]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Fri, 10 Oct 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Correction and refactoring]]></title><description><![CDATA[<div class="paragraph">
<p>I was thinking again this evening about last week&#8217;s quicksort post
(which I&#8217;ve since even been informed isn&#8217;t technically a quicksort
algorithm), and decided to tinker with streamlining my Racket version a
bit more to take better advantage of higher-order functions.</p>
</div>
<div class="paragraph">
<p>To my horror I realized in looking at last week&#8217;s code I&#8217;d actually
munged up the qs-2 version, which should look like this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>(define (qs-2 fun lst)
  (if (empty? lst)
      lst
      (let* ((hd (car lst))
             (tl (cdr lst))
             (smaller (qs-2 fun (for/list ((i tl) #:when (fun i hd)) i)))
             (larger (qs-2 fun (for/list ((i tl) #:when ((negate fun) i hd)) i))))
         (flatten (cons smaller (cons hd larger))))))</pre>
</div>
</div>
<div class="paragraph">
<p>However, as it turns out, Racket actually has built-ins for function
currying, and as well, filter&#8217;s really a better (and Lispier) function
here than a for loop, so we can actually match the Haskell version&#8217;s
line count like so.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>(define (qs-3 fun lst)
  (if (empty? lst)
      lst
      (let ((smaller (qs-3 fun (filter (curryr fun          (car lst)) (cdr lst))))
            (larger  (qs-3 fun (filter (curryr (negate fun) (car lst)) (cdr lst)))))
        (flatten (cons smaller (cons (car lst) larger))))))</pre>
</div>
</div>
<div class="paragraph">
<p>Voila. Now we have a version that is both Lispier and makes better use
of higher-order functions. Alas, we still can&#8217;t universalize it in so
little space (that I know of anyway). The Ord typeclass is one powerful
little bugger.</p>
</div>]]></description><link>https://jarcane.github.io/2014/10/10/Correction-and-refactoring.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/10/10/Correction-and-refactoring.html</guid><category><![CDATA[Racket]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Fri, 10 Oct 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Haskell is Cool]]></title><description><![CDATA[<div class="paragraph">
<p>After my last post and some thinking, I ultimately settled on <em>Learn You
a Haskell</em> as my next book to work through, and after some initial
hassles trying to get a decent working environment set up, I must say
that I&#8217;m quite enjoying the language itself. It was running across
<a href="http://tryhaskell.org/">Try Haskell</a> that actually spurred me to finally
take the leap in that direction (seriously, online REPLs are the best
language demos period), and I was quickly impressed by the power hiding
in that seemingly obtuse syntax.</p>
</div>
<div class="paragraph">
<p>And of course, like everyone else ever (so many that <em>Learn You a
Haskell</em> actually makes a bit of a joke out of it), I was impressed as
hell with the Haskell quicksort solution.</p>
</div>
<div class="paragraph">
<p>But after some tinkering in Racket, not for precisely the same reasons
as the book uses it.</p>
</div>
<div class="paragraph">
<p>For reference, the Haskell recursive quicksort looks like this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-haskell" data-lang="haskell">quicksort :: (Ord a) =&gt; [a] -&gt; [a]
quicksort [] = []
quicksort (x:xs) =
    let smallerSorted = quicksort [a | a &lt;- xs, a &lt;= x]
        biggerSorted = quicksort [a | a &lt;- xs, a &gt; x]
    in smallerSorted ++ [x] ++ biggerSorted</code></pre>
</div>
</div>
<div class="paragraph">
<p>I know, right? It&#8217;s short and sweet, and using multiple recursion and
list filtering to solve it takes a hell of a lot of the work out of it.
Hell, this is actually the first version of quicksort I&#8217;ve ever
understood; though in my defense the last time I tried to write a
quicksort was some 15 years ago as a teenage BASIC hacker (I failed.
Repeatedly.)</p>
</div>
<div class="paragraph">
<p>The book of course uses it as an example of the power of recursion, and
it is indeed a good example of where clever use of that can do a lot in
very little space (though personally I think the lazy factorial method
is a cooler example), but the thing is that any language that implements
good recursion can do the same algorithm and just as fast.</p>
</div>
<div class="paragraph">
<p>For instance, Racket can do the exact same algorithm in just a few more
lines (most of them in this case for clarity and convenience,
semantically it&#8217;s <em>almost</em> identical [but not quite, and I&#8217;ll get to
why]).</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-racket" data-lang="racket">(define (qs lst)
  (if (empty? lst)
      lst
      (let* ((hd (car lst))
             (tl (cdr lst))
             (smaller (qs (for/list ((i tl) #:when (&lt;= i hd)) i)))
             (larger (qs (for/list ((i tl) #:when (&gt; i hd)) i))))
         (flatten (cons smaller (cons hd larger))))))</code></pre>
</div>
</div>
<div class="paragraph">
<p>So clearly, it&#8217;s not exactly the <em>recursion</em> that makes the example so
cool. No, what makes the Haskell version cool is when you realize what
it can do that our Racket port can&#8217;t: anything but numbers. The Haskell
quicksort can readily handle numbers, strings, or lists of chars, all
thanks to the power of this line right here:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-haskell" data-lang="haskell">quicksort :: (Ord a) =&gt; [a] -&gt; [a]</code></pre>
</div>
</div>
<div class="paragraph">
<p><em>Especially</em> the <code>(Ord a)</code> bit: that&#8217;s the Ord typeclass, which imports
types that Haskell knows how to put in order, thus allowing a statically
typed language to still nonetheless use the same &#8656; operator regardless
of what type is actually being fed it (the other part of that feat is
the <code>[a]</code> bit, the generics).</p>
</div>
<div class="paragraph">
<p>To be able to get a similarly powerful, if not as convenient function,
we have to upgrade our Racket version a bit:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-racket" data-lang="racket">(define (qs-2 fun lst)
  (if (empty? lst)
      lst
      (let* ((hd (car lst))
             (tl (cdr lst))
             (smaller (qs (for/list ((i tl) #:when (fun i hd)) i)))
             (larger (qs (for/list ((i tl) #:when ((negate fun) i hd)) i))))
        (flatten (cons smaller (cons hd larger))))))</code></pre>
</div>
</div>
<div class="paragraph">
<p>Now our Racket quicksort has become a higher-order function, and must be
passed the less-than function it will use to find <em>smaller</em> as well as
negate to find <em>larger</em>. But it&#8217;s still not exactly replicated the
feat that Haskell&#8217;s version would, and doing so directly would mean a
whole range of type checks. It is almost certainly possible, but not in
so concise a manner.</p>
</div>
<div class="paragraph">
<p>And of course, some of this difference comes from Haskell&#8217;s special
little rules, like lists being mono-typed elements (as opposed to
Racket&#8217;s free-wheeling ones); this is more limiting but also means that
functions like quicksort can largely be written to assume a list will
behave with it. If we pass it a list from elsewhere in our program, it
will still work as long as its members are members of Ord.</p>
</div>
<div class="paragraph">
<p>The amusing footnote to this is that the easy solution for Racket is to
make it a higher-order function (and in fact, this is even what Racket&#8217;s
built-in sort does), whereas in <em>Learn You a Haskell</em> the author doesn&#8217;t even get to
higher-order functions until the chapter after the quicksort example.</p>
</div>]]></description><link>https://jarcane.github.io/2014/10/03/Haskell-is-Cool.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/10/03/Haskell-is-Cool.html</guid><category><![CDATA[Haskell]]></category><category><![CDATA[Racket]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Fri, 03 Oct 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Learning Programming: the Backlog]]></title><description><![CDATA[<div class="paragraph">
<p>Thus far, I have been back to programming for a vanishingly small amount
of time, roughly three months by Github commit reckoning (plus a bit of
time spent in Codecademy). In that time it has seemed, to myself and
even to others to a lesser extent, rather remarkable the amount of
progress I&#8217;ve made. In just that three months and change I&#8217;ve written a
roguelike game, an old-fashioned line editor, a text graphics wrapper,
an esolang, a virtual machine, a basic weblog, and even taken over as
chief maintainer of an open source project for the first time.</p>
</div>
<div class="paragraph">
<p>Thus by all appearances, it seems like I&#8217;ve already learned a lot, and
in some ways that&#8217;s true.</p>
</div>
<div class="paragraph">
<p>In other ways, it&#8217;s not.</p>
</div>
<div class="paragraph">
<p>What I have learned thus far, more than anything, is that in actuality
for someone with a particular frame of mind and some grasp of logical
thinking and problem solving, it is relatively easy to make a seemingly
large amount of apparenty progress as a programmer in a very short span
of time.</p>
</div>
<div class="paragraph">
<p>I&#8217;ve realized that it is very easy to get fairly far in programming with
just a little bit of knowlege and some basic logic skills, but then when
you start wanting to push just a bit farther than that, the whole sense
of progress collapses like a house of cards &#8230;&#8203;</p>
</div>
<div class="paragraph">
<p>And the thing is, this can be a very dangerous trap, for learning
anything. A crucial time, one I&#8217;m frankly wrestling with. When learning
(or re-learning) a new skill, there&#8217;s a point at which the "good start"
you&#8217;ve made is actually a hindrance. You <em>can</em> become a programmer in 28
days.</p>
</div>
<div class="paragraph">
<p>You might even be decent at it, given some more practice, if you&#8217;ve the
head for it and all you want to do is be a
<a href="http://www.paulgraham.com/avg.html">"Blub"</a> coder for life. In the old
days this was how a lot of working programmers got started, and cubicle
farms the world over are similarly filled with these. The local Java
apprenticeship program I think lasts all of three months. Many so-called
"hacker schools" and "bootcamps" more or less crash-course young minds
through an easy language like Ruby or Python in a matter of weeks and
send them off into the world $10,000 poorer and with all the coding
knowledge of the average Codecademy user.</p>
</div>
<div class="paragraph">
<p>To be a <em>good</em> one, though, even a <em>great</em> one, you need to be willing
to set aside that "good start" and keep building back on the
fundamentals again and again. And when you already have that start, when
you already feel like you <em>are</em> "good enough," it&#8217;s incredibly hard to
force yourself to go back to feeling like you&#8217;ve no idea what you&#8217;re
doing all over again.</p>
</div>
<div class="paragraph">
<p>I programmed when I was younger, quite a lot in fact, and that skill
never quite decays, so that plus some great re-introductory material
seemed to be catapulting me into the stratosphere at a rate not
dissimilar from my foray into book publishing. There was a window when I
think I was even getting a bit cocky about it. Racket was good for
breaking this. The basics of Racket are as easy to grasp as any other,
probably the easiest Lisp to learn, with some pretty good intro books
and guides. But those advanced topics, the language tools, the
contracts, the dialects, all hang there in the Guide sidebar reminding
you of just how much more there is to learn. And hanging out with the
PLT crew, and the #esolang hackers, and other similarly smart folk
(seriously the smartest people I&#8217;ve ever met in programming were either
esolang nerds or Lispers or one flavor or another), is also hugely
eye-opening for a cocky young sprat.</p>
</div>
<div class="paragraph">
<p>This is all one reason why I&#8217;ve picked up quite a bit of backlog of
books to study, probably enough to fill a year&#8217;s university curriculum
at a minimum. Now that the rambling phase of the post is over, I thought
it might be useful to someone or simply for posterity to catalog my
current "learn stack". These are the books I want to tackle in the
near-ish future, though in what order and which next is still the
subject of some debate.</p>
</div>
<div class="paragraph">
<p><a href="http://www.ccs.neu.edu/home/matthias/HtDP2e/">How To Design Programs</a> -
I&#8217;ve started this book twice. Both times I&#8217;ve got impatient or
distracted and gone on to something that seemed to be leading me towards
more direct progress; it has a very particular style of design it
teaches that I found a bit odd, and the focus on "learning languages"
was a bit frustrating when all I really wanted to do was learn more
about Racket proper.</p>
</div>
<div class="paragraph">
<p><a href="https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-1.html">Structure
and Interpretation of Computer Programs</a> - Anyone who is reading this
probably already is at least familiar with this name. It seems to be
perhaps one of the most well-regarded books on programming and CS there
is; almost no one I&#8217;ve ever spoken to about it had anything but glowing
praise, even the ones who didn&#8217;t even write Scheme or Lisp anymore. I&#8217;m
definitely curious, especially as it covers a lot of systems programming
stuff that seems to be where my mind wants to go as a programmer. (For
similar reasons, I&#8217;m also really interested in
<a href="http://cs.brown.edu/courses/cs173/2012/book/">PLAI</a>)</p>
</div>
<div class="paragraph">
<p><a href="http://www.buildyourownlisp.com/">Build Your Own Lisp</a> - An unusual
approach for a new language introduction, this book aims to teach the
reader C by walking them through the development of a dialect of Lisp.
I&#8217;m a bit suspicious of some of the design decisions (it controversially
avoids dealing with quote and macros by replacing them with something
called "Q-expressions"), but C is a good language to know and this seems
like a fun way to learn it. In a similar vein, there is
<a href="https://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours">Write
Yourself A Scheme in 48 Hours</a>, which aims to give a crash course in
Haskell by teaching you how to build a basic Scheme interpreter with it.
This leads to my next pick:</p>
</div>
<div class="paragraph">
<p><a href="http://learnyouahaskell.com/">Learn You a Haskel for Great Good</a> - I am
deeply curious about Haskell, because I am deeply curious about
functional programming and also by the unusual arcaneness of it. This
book seems to be a fan favorite, as it were, and the tone is certainly
inviting. There&#8217;s also an <a href="http://learnyousomeerlang.com/">Erlang book</a>
inspired by it, which I&#8217;m more interested for professional reasons: it
was invented next-door, as it were, so there&#8217;s a fair number of jobs
about in Erlang still.</p>
</div>
<div class="paragraph">
<p>I think the next book I tackle will be one of these, I just haven&#8217;t
decided which yet. I&#8217;m very open to advice, so feel free to leave your
thoughts in the comments, as opinionated as you like.</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/29/Learning-Programming-the-Backlog.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/29/Learning-Programming-the-Backlog.html</guid><category><![CDATA[programming]]></category><category><![CDATA[learning]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Mon, 29 Sep 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[HateStack: The self-deleting rantbin]]></title><description><![CDATA[<div class="paragraph">
<p>Inspired by a tweet that Zoe Quinn made the other day, I knocked out a
little web app over the weekend for a self-deleting public blogthing.
The original spec was a social network that worked like a SnapChat for
text, in which the user could post an angry rant with the assurance that
it would be automatically deleted in 30 minutes' time.</p>
</div>
<div class="paragraph">
<p>Taking that a step further, in part to limit its utility for nefarious
purposes and also in part to keep the project simple, I adapted this to
a single-page stack model, with post contents dwelling entirely within
memory to ensure maximum privacy. Gone is gone, here, no database
remnants or temporary files.</p>
</div>
<div class="paragraph">
<p>The result is <a href="https://t.co/bX5kiqZSm7">HateStack</a>, a simple Racket web
application in a single 172-line file, with layout assistance from
Bootstrap (helpfully imported by BootstrapCDN). It&#8217;s not yet hosted
anywhere; to be honest I&#8217;m not in a great hurry to go wrestling with yet
another server when I&#8217;ve still probably got work to do on
<a href="http://try-racket.org">Try Racket</a>. But it was an interesting little
project that gave me a chance to tinker a bit more with my HTML/CSS
skills, and thus be reminded why most of the time I play around with
almost anything else besides web applications &#8230;&#8203;</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/28/HateStack-The-self-deleting-rantbin.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/28/HateStack-The-self-deleting-rantbin.html</guid><category><![CDATA[announcements]]></category><category><![CDATA[Racket]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Sun, 28 Sep 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Announcing try-racket.org]]></title><description><![CDATA[<div class="paragraph">
<p>It is my pleasure to announce that at long last, Racket has an online
REPL. I&#8217;ve taken it upon myself to acquire a domain and a DigitalOcean
droplet, and hosted the long-mothballed Try Racket code which you can
find at <a href="http://try-racket.org" class="bare">http://try-racket.org</a>. The PLT folks have also kindly offered an
alternate URL at <a href="http://try.racket-lang.org" class="bare">http://try.racket-lang.org</a>.</p>
</div>
<div class="paragraph">
<p>I&#8217;ve also taken up the responsibility of maintaining the code: I had to
fork it by necessity to modify some things necessary to get it to run
without X, and as the original maintainer had no interest in pursuing it
further than that, he asked me if I&#8217;d like to take over. You can thus
find my fork of it <a href="https://github.com/jarcane/try-racket">here</a>, where
future issues and development should take place.</p>
</div>
<div class="paragraph">
<p>The code&#8217;s still a bit rough, with a number of issues to be resolved,
and I welcome any and all contributions to the code; pull requests will
be tested and then accepted so long as they don&#8217;t appear to be breaking
anything. In particular, it seems the memory constraints for the sandbox
need revision to prevent a server crash, and there is some amount of
demand for proper multi-line entry in the style of the offline Racket
REPL. The tutorial is a bit tedious without it at present.</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/23/Announcing-try-racketorg.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/23/Announcing-try-racketorg.html</guid><category><![CDATA[announcements]]></category><category><![CDATA[Racket]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Tue, 23 Sep 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Trying a new theme]]></title><description><![CDATA[<div class="paragraph">
<p>It would appear that Bootswatch has been updated to Boostrap 3, because
I was able to install Slate without any apparent issue. Let me know if
you notice anything. I&#8217;m also testing some issues with Frog giving me
grief on builds.</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/20/Trying-a-new-theme.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/20/Trying-a-new-theme.html</guid><category><![CDATA[announcements]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Sat, 20 Sep 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Apologizing for exuberance]]></title><description><![CDATA[<div class="paragraph">
<p>So after some further consideration, I think I am not really the person
to reinvent the internet filter. I have a lot of learning to do before I
could possibly tackle something like that in anything like a useful
manner. It&#8217;s possible I could hack together a pretty simple
word-frequency model, but I&#8217;m not at all certain I could really go
beyond that; I&#8217;m not an AI programmer, nor do I have any experience with
natural language processing. My experience so far has mostly been with
basic systems programming and game design. It&#8217;s probable I&#8217;ll return to
the problem in the distant future, but for right now I think it&#8217;s best I
leave such a task to more capable hands.</p>
</div>
<div class="paragraph">
<p>I just get frustrated. I feel like I actually want to <em>do</em> something
about the shit that&#8217;s going on, besides just spreading the word about it
and condemning it. That is, to me, literally the least I can do. Hell,
if I <em>didn&#8217;t</em> do that, I&#8217;d think rather ill of myself, frankly.</p>
</div>
<div class="paragraph">
<p>I am merely a writer, ultimately, be it in code, in prose, or in games.
And as I said before, when all the tools you have are words, but the
jackals have not ears to hear or eyes to read those words, it can feel
like a bit of a useless talent. Instead perhaps the best I can do is, if
not contributing to the fight for equality necessarily, at least to the
fight for a better class of game that speaks to broader themes and more
inclusive worlds than more manshoots and bald-man-saves-the-world games.
Recent events have really done havoc to my motivation and enthusiasm for
gaming; but maybe if I can write something I <em>am</em> enthusiastic about, it
might come back. If good writing and creativity are "killing games",
then maybe I should take up the hatchet as well&#8230;&#8203;</p>
</div>
<div class="paragraph">
<p>I&#8217;m curious what others think, especially those women who&#8217;re facing this
mess. What can I do? Or even, <em>should</em> I be doing anything other than
what I have been; after all, it&#8217;s your voice far more than mine that
needs to be heard right now.</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/19/Apologizing-for-exuberance.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/19/Apologizing-for-exuberance.html</guid><category><![CDATA[abuse]]></category><category><![CDATA[games]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Fri, 19 Sep 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[We need a new filter]]></title><description><![CDATA[<div class="paragraph">
<p>In the wake of recent events in the gaming sphere, I&#8217;ve been thinking a
good hard think. Harassment on the internet is becoming a major societal
problem. People&#8217;s lives are being threatened. Women are bombarded with
abuse on an unconscionable scale. Something needs to be done: we can
talk until we&#8217;re blue in the face about why sending someone violent
threats and harassment is wrong, but the harassers aren&#8217;t listening.</p>
</div>
<div class="paragraph">
<p>What we need, is an abuse filter.</p>
</div>
<div class="paragraph">
<p>Since the public birth of the internet, millions, possibly even billions
of dollars have been spent in pursuit of building a better spam filter.
Countless man-hours have been dedicated to finding new ways of
identifying and properly filing away to /dev/null the endless torrent of
garbage emails about Viagra and Nigerian princes.</p>
</div>
<div class="paragraph">
<p>And yet, where are the millions spent on solutions for internet
harassment? The countless man-or-woman-hours poured into making life on
the internet less an endless free-fire zone for abusive sociopaths?</p>
</div>
<div class="paragraph">
<p>Most existing social media systems rely entirely on user reporting,
essentially leaving it to the user to manually report and block each and
every abusive message. This is about as ludicrous a task to demand as it
would be for spam. Especially for those targeted by concerted campaigns
like #gamergate/#quinnspiracy, this is more or less an intractable
problem. Props aplenty for the courage of women like Zoe Quinn and Anita
Sarkeesian who&#8217;ve stuck it out and even done that work, but they never
should&#8217;ve had to do it in the first place, and many choose simply to
leave rather than deal with it. Some very talented women and men alike
have literally quit gaming entirely over this kind of harassment, and
similar incidents have occured elsewhere in any number of fields.</p>
</div>
<div class="paragraph">
<p>What we need is something that takes the burden of policing one&#8217;s own
timelines and inboxes off of the user, just as spam filters do for
advertising and scams.</p>
</div>
<div class="paragraph">
<p>But there&#8217;s an important difference here: ignoring spam has little
consequence. Ignoring violent threats can be dangerous, and even
ignoring mundane harassment often sends the message that such behavior
is itself without consequence.</p>
</div>
<div class="paragraph">
<p>Thus unlike a spam filter which simply consigns a useless message to a
dustbin, an abuse filter would need to properly file and report abusive
and threatening messages, possibly even for reporting to legal
authorities. It needs to be smart enough to know not just what an
abusive message is, but what to <em>do</em> about it.</p>
</div>
<div class="paragraph">
<p>This also would require some cooperation from service providers,
however, not all of which even provide such avenues. A Twitter client,
for instance, would need to be able to report a user as abusive, yet the
Twitter APIs, that I can see, do not appear to support reporting a user
for abuse, only for spam.</p>
</div>
<div class="paragraph">
<p>I am just one guy, a relative amateur at that. This is a large problem
that will require brilliant minds, lots of man hours, and probably more
resources than I have at my disposal. But that doesn&#8217;t mean I can&#8217;t get
it started. I intend to take a crack at developing a simple filtering
engine to file and classify abusive messages given the pair of an
identifying username and the text of the message. I&#8217;ll be doing it in
Racket, because I think the tools Racket offers for parsing might offer
some clever avenues for solutions to such problems.</p>
</div>
<div class="paragraph">
<p>It&#8217;s likely to be unimpressive, and it&#8217;s likely to bring grumbles about
the choice of language, the simplicity of the model, and on and on.
That&#8217;s the point. Consider it my challenge. A first effort to get the
ball rolling, with the tacit expectation that you indeed can do better:
so prove it.</p>
</div>
<div class="paragraph">
<p>Work begins soon, announcements and github repo pending. Let&#8217;s help make
the internet a better place to be.</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/17/We-need-a-new-filter.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/17/We-need-a-new-filter.html</guid><category><![CDATA[Racket]]></category><category><![CDATA[abuse]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Wed, 17 Sep 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[URI bug fixed]]></title><description><![CDATA[<div class="paragraph">
<p>Thanks to the quick efforts of Greg Hendershott, we now have a fix for
the Windows URI path generation, so links to subpages should all work
correctly now. Let me know if there&#8217;s any further problems.</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/16/URI-bug-fixed.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/16/URI-bug-fixed.html</guid><category><![CDATA[announcements]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Tue, 16 Sep 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Technical Difficulties]]></title><description><![CDATA[<div class="paragraph">
<p>Currently aware of an issue in Frog resulting in malformed page URLs for
my posts. Users on browsers other than Chrome will get 404 errors
accessing full blog pages. Greg Hendershott is aware of the issue now,
and I&#8217;ll get the site patched as soon as he pushes a fix to Frog.</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/16/Technical-Difficulties.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/16/Technical-Difficulties.html</guid><category><![CDATA[announcements]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Tue, 16 Sep 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Disqus comments with Frog]]></title><description><![CDATA[<div class="paragraph">
<p>I had a slightly tricky time setting up a numbered comment link with
Disqus, so I thought it might be helpful to write up a quick post on how
I did it.</p>
</div>
<div class="paragraph">
<p>The standard Frog templates of course include a widget for embedding a
Disqus comment thread in a page, which is quite handy, however without
configuration Disqus defaults to an obnoxious thing full of Yahoo ads.
To fix this, you need to register an account with Disqus, and create a
new site with it, which you can do
<a href="https://disqus.com/admin/create/">here</a>. Give it a name and a unique URL,
which will provide the "shortname" you&#8217;ll use with the Disqus widget and
scripts.</p>
</div>
<div class="paragraph">
<p>From here, you&#8217;ll go to the install page, from which you can select from
a number of options from which we want to choose the one called
<em>Universal Code</em>. This page contains instructions for manually
embedding the necessary JavaScript files for Disqus to work. Leave this
open for now, we actually don&#8217;t need it for step 1, which has already
been helpfully provided via Frog&#8217;s Disqus widget.</p>
</div>
<div class="paragraph">
<p>Instead, we want to open up the <code>post-template.html</code> in our Frog
project&#8217;s <em>src directory, and look for the
<code>@disqus-comments["shortname"]</code> line and replace "shortname" with the
shortname you chose for your Disqus account. If you&#8217;re not sure what
that is, look in the template code on the _Universal Code</em> guide for
<code>var disqus_shortname =</code> at the top of the code box in step 1.</p>
</div>
<div class="paragraph">
<p>This is enough to get us comments pages that should now be blissfully
free of annoying Yahoo Ads, and also gives us moderation tools and other
handy settings for configuring how Disqus works, but there&#8217;s one other
useful step you might want (I did), and that&#8217;s one of those nice little
numbered "comments" links at the bottom of our posts when looking at the
main blog page.</p>
</div>
<div class="paragraph">
<p>To do that, we need to make some modifications to <code>index-template.html</code>
and create a footer that contains what we want. We want to add a set of</p>
</div>
<div class="paragraph">
<p>tags after <code>@|content|</code> to contain a link that the Disqus software will
then modify to contain a comments count. This looks like this:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>  &lt;footer&gt;
    &lt;br&gt;
    &lt;a href='@|uri-path|#disqus_thread'&gt;Comments&lt;/a&gt;
    ** Disqus javascript goes here**
  &lt;/footer&gt;</pre>
</div>
</div>
<div class="paragraph">
<p>Then, after the <code>a href</code> line we can just paste in the code from the
second box in the <em>Universal Code</em> guide, under "How to display comment
count."</p>
</div>
<div class="paragraph">
<p>And voila, numbered comments links in our Frog posts!</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/16/Disqus-comments-with-Frog.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/16/Disqus-comments-with-Frog.html</guid><category><![CDATA[Racket]]></category><category><![CDATA[Frog]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Tue, 16 Sep 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Christening the Grimoire]]></title><description><![CDATA[<div class="paragraph">
<p>Welcome to Arcane Syntax, destined to be the new home of all things
relating to the arcane art of computer programming and development, as
flowing from the mind of myself, an self-trained apprentice programmer,
Finnish language student, and former tabletop games writer.</p>
</div>
<div class="paragraph">
<p>The chief subject matter of Arcane Syntax is likely at this point to be
focusing especially on the Racket programming language, which has
ultimately proved my favorite home in the magical land of Lisp dialects,
for reasons which I shall expound upon in my next post.</p>
</div>
<div class="paragraph">
<p>I have been at this programming thing for but a short time, having
previously not touched more than a few simple dice rollers in at least a
decade. If something I should happen to post on this blog demonstrate a
profound ignorance, it is likely for lack of education, and thus polite
instruction is likely to be welcomed eagerly.</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/15/Christening-the-Grimoire.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/15/Christening-the-Grimoire.html</guid><category><![CDATA[announcements]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Mon, 15 Sep 2014 00:00:00 GMT</pubDate></item><item><title><![CDATA[Choosing a Lisp]]></title><description><![CDATA[<div class="paragraph">
<p>I began my adventure back into the world of programming with Python. My
last book had started to peter out in sales, and I began seriously
re-evaluating my career potential, and it was at this point that a
friend introduced me to <a href="http://codecademy.com">Codecademy</a>. I was
immediately taken with the interactive approach to programming
instruction, and in particular gravitated to Python, because it was a
language I&#8217;d tinkered with before and whose power, especially in strings
and lists, I&#8217;d always been impressed with.</p>
</div>
<div class="paragraph">
<p>I devoured the Python course greedily and soon moved on to my first
"big" project, <a href="https://github.com/jarcane/handhRL">handhRL</a> a roguelike
based on one of my tabletop rulesets. However, as I grappled with the
tedium of building random object generators with massive elseif-based
constructor patterns, and the poor performance and gaming potential, I
also was acutely aware I&#8217;d need to branch out into other languages.</p>
</div>
<div class="paragraph">
<p>And then another friend recommended I try Lisp. I consider it a fateful
day. I&#8217;m not honestly certain whether to curse him for it or thank him.
I tried a number of entryways into the world, and indeed, choosing which
Lisp to focus on has consumed much of the last two months of my time. I
fall more in love with Lisp the more I learn of it, but choosing a
flavor of it has tormented me more than perhaps it should.</p>
</div>
<div class="paragraph">
<p>Here&#8217;s what I have learned.</p>
</div>
<div class="paragraph">
<p>There are a dizzying array of Lisps out there, but by and large the main
options boil down to the following:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Common Lisp</p>
</li>
<li>
<p>Scheme</p>
</li>
<li>
<p>Clojure</p>
</li>
<li>
<p>Racket</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>There&#8217;s more of course, Paul Graham has Arc which powers Hacker News,
there&#8217;s the venerable Emacs Lisp that powers the very editor I write
these posts on, but those four are probably the most prominent and
feasible for at least some practical amount of actual work.</p>
</div>
<div class="paragraph">
<p>I started with Common Lisp. Or at least, attempting it. I suspect many
people do, those that don&#8217;t instead get exposed to Scheme in college. I
suspect now I understand why so many come away with a bad impression.
Common Lisp is far easier to learn now than it was 10 years ago, but
it&#8217;s still a dialect built on compromises and mired in ancient and
cthonian syntax. I found myself stymied by having to learn 12 different
ways of doing any given thing, and by chapter-long exercises done
entirely in a REPL that then crashed or fell victim to an error
somewhere back on page 2.</p>
</div>
<div class="paragraph">
<p>So, from there I cast around and found Racket. And lo, the heavens did
open, and mine eyes did see the light. While I did catch glimpses of the
power of Lisp with my initial toolings, it was in the purity and clarity
of Racket, in its wonderful documentation, in the easy power of the
Lisp-1, that I found the full breadth of what I&#8217;d seen as I stumbled
through the CL wilderness. I played and tinkered and hacked. I wrote an
<a href="https://github.com/jarcane/MicroMini">8-bit VM</a> in just 206 lines of
code. 206!</p>
</div>
<div class="paragraph">
<p>But I stumbled as well. I ran into problems implementing terminal i/o
with my virtual machine, so it would only run in Linux. I found myself
frustrated by the lack of mature development for pretty common "getting
work done" tasks, at least for the kind of work I wanted to do. As well,
I found myself stymied by the books and documentation; put off by the
beginner material, but utterly baffled by the advanced features.</p>
</div>
<div class="paragraph">
<p>I made another run at Common Lisp, getting pretty far in Peter Seibel&#8217;s
excellent <a href="http://www.gigamonkeys.com/book/">Practical Common Lisp</a>.
Ultimately though, more exposure to the many-splendored weirdness of CL
ultimately lead me to think perhaps it just wasn&#8217;t the flavor for me.</p>
</div>
<div class="paragraph">
<p>Another friend had mentioned Clojure. I was put off by Clojure up until
now, because it reeked of startup culture and I frankly have a
long-standing grudge against Java. But Java is practically the reigning
Lord and Master of the mobile-heavy Finnish scene, and it seemed to be
driving a lot of new adoption locally and even a few actual jobs.</p>
</div>
<div class="paragraph">
<p>So, I discussed it with my wife and we mutually agreed I should give it
a shot. I meditated upon the
<a href="http://clojurescriptkoans.com/">ClojureScript Koans</a>, and was initially
quite intrigued by its #() and its funcional purity, if a bit baffled by
the sheer number of different data types, and put off by the ugly
syntax. I code-golfed a FizzBuzz in a tweet done in CS. I then thought I
should meditate upon the full
<a href="https://github.com/functional-koans/clojure-koans">Clojure Koans</a> in
order to learn those things which CS had by necessity neglected.</p>
</div>
<div class="paragraph">
<p>By the end, the only "enlightenment" I found there was the cold burning
focus of pure fury. I hated its clunky implementation, it&#8217;s utter
violation of the purity I so loved in a Lisp. I hated how utterly
inconsistent everything was. I hated how any error could spell utter
doom to your entire system, as typo&#8217;d recursions led to full CPUs and
runaway threads. I hate hate hated the threading macro with the fire of
a thousand incandescent supernovas.</p>
</div>
<div class="paragraph">
<p>However, it also gave me a sense of perspective, and so I meditated on
the <a href="https://github.com/google/lisp-koans">Common Lisp Koans</a>. There I
faced a an anticlimax. The final meditation was on SBCL threads, and
SBCL threads were like grasping a stream of water. I had recieved all
the enlightenment that Common Lisp seemed ready to offer.</p>
</div>
<div class="paragraph">
<p>And in the end, all I wanted was my Racket back. The prodigal son wanted
to come home.</p>
</div>
<div class="paragraph">
<p>I am sure that in the cold light of reason I could find work in Clojure
or Common Lisp. I do indeed envy their library support, and have come to
respect a number of those features that they offer, and may even seek to
reimplement some of them in my own Racket set up.</p>
</div>
<div class="paragraph">
<p>It is true as well that Racket is not well represented in the world of
working programmers. But it is well represented in the world of computer
science, a world I increasingly suspect I might like to enter if I
should prove worthy. While there is something of a gap between the
"beginner" and "advanced" levels of the Racket world, the flipside to
this is that it is stuffed with incredibly brilliant people who are
almost to a one the most polite and helpful people I&#8217;ve met since
returning to programming.</p>
</div>
<div class="paragraph">
<p>So, with at least a year of language courses before I can even think
about a job or university, why not hang around and contribute and learn
in a place where I feel most at home? It was Python being this for me
that made me a programmer again, and I think it could be Racket doing so
that makes me a <em>good</em> one.</p>
</div>]]></description><link>https://jarcane.github.io/2014/09/15/Choosing-a-Lisp.html</link><guid isPermaLink="true">https://jarcane.github.io/2014/09/15/Choosing-a-Lisp.html</guid><category><![CDATA[Lisp]]></category><category><![CDATA[Racket]]></category><dc:creator><![CDATA[John Berry]]></dc:creator><pubDate>Mon, 15 Sep 2014 00:00:00 GMT</pubDate></item></channel></rss>