妖怪世捨て人The ramblings of a recluse.2014-07-10T18:59:08http://reader.tymoon.eu/Copyright (c) 2014, TymoonNET/NexT
radiance-reader
A Peculiar Day Pt. 6 - Confession 92662014-07-10T18:59:082014-07-10T18:59:08shinmerahttps://shinmera.com/shinmera@tymoon.eu<p>Lost in the world of words, time passed quickly. Before Monika could notice, dinner was served and the darkness had reclaimed the streets outside. Both of her parents were already seated as Monika hurried into the living room to eat. She hastily threw a greeting towards her father who grunted in response and just as she was about to sit down the front door crashed open and Florian rushed in. Anja immediately shouted “clean yourself off or you'll have to do the dishes today!” The door closed and after a while Florian came in again, this time without taking a ton of snow with him.</p>
<p>Florian seated himself quickly and quietly. After pouring some soup into his bowl he started to explain where he'd been all day. Apparently after his classes a colleague of his wanted him to help with a report, but they had forgotten about the time and once they were done it had already turned dark outside. His father roughly patted him on the back and said “Don't worry about it.” Monika quickly shot a glance at Anja, who seemed to be studying the wall clock a bit too intensely. Monika resented how her mother always seemed to be much harder on Florian than anyone else, but she refrained from saying anything.</p>
<p>Dinner passed in silence. </p>
CL Symbols and Packages - Confession 82652014-07-09T17:54:032014-07-09T17:54:03shinmerahttps://shinmera.com/shinmera@tymoon.eu<p><img src="https://filebox.tymoon.eu/file/TkRZeQ==" alt="header">
While <a href="http://www.gigamonkeys.com/book/">Practical Common Lisp</a> is a superb primer on CL I feel like it doesn't cover packages and symbols early or in-depth enough as I still had to learn a lot about them afterwards. This topic as well as ASDF/Quicklisp and Slime/Swank are things that I'll talk about a bit in a few blog entries in the hopes that they may be useful to other people learning CL.</p>
<p>One of the big things to wrap your brain about when you come from other languages is the concept of symbols. A symbol is one of CL's main data types and one that doesn't exist in most other languages. Symbols are also what makes up most of the source code and allows the seamless transformation of code through macros. Looking at the <a href="http://www.lispworks.com/documentation/lw445/CLHS/Body/t_symbol.htm">hyperspec entry</a> reveals that symbols have a couple of properties, most notably a name, package, function and value.</p>
<p>When the CL <a href="http://www.lispworks.com/documentation/lw51/CLHS/Body/02_b.htm">reader</a> reads a character sequence that isn't specially handled like numbers, strings, and so forth it reads it as a symbol. To explain this in more digestible terms, when you use (<a href="http://www.lispworks.com/documentation/lw60/CLHS/Body/f_rd_rd.htm">READ</a> “foo”) it will return the interned symbol FOO. The same happens when a CL source file is first read; it is transformed into <a href="http://www.lispworks.com/documentation/lw61/CLHS/Body/26_glo_l.htm#list">list</a>s (<a href="http://www.lispworks.com/documentation/lw61/CLHS/Body/26_glo_c.htm#cons">cons</a> cells), symbols and other primitive types. A symbol can be named anything at all, though you may have to surround it with vertical lines (|) since the reader would treat certain characters differently. Symbols are also case-sensitive, but are by default <a href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/acc_readtable-case.html">automatically put into uppercase</a>.</p>
<p>So symbols are a special type of data to name variables and functions in your source code. As a symbol identifies a variable it can carry a value. This value can be retrieved through <a href="http://clhs.lisp.se/Body/f_symb_5.htm">SYMBOL-VALUE</a> or by simply writing the symbol unquoted into the source code of course. CL, unlike some other lisps, differentiates between values and functions and thus allows you to bind a function and a value to the same symbol at the same time. The function a symbol is bound to to can be retrieved with <a href="http://www.lispworks.com/documentation/lw50/CLHS/Body/f_symb_1.htm">SYMBOL-FUNCTION</a>, with the special operator <a href="http://clhs.lisp.se/Body/s_fn.htm">FUNCTION</a>, or through the reader macro <a href="http://www.lispworks.com/documentation/HyperSpec/Body/02_dhb.htm">#'</a>.</p>
<p>Usually when a symbol is read it is <a href="http://www.lispworks.com/documentation/lw61/CLHS/Body/f_intern.htm">INTERNed</a> into the current package. This sets the symbol's package property and registers it with the package, but you can also make symbols that don't belong to any package by using <a href="http://www.lispworks.com/documentation/HyperSpec/Body/02_dhe.htm">#:</a>. Packages are a rather simple form of namespaces. There is no package hierarchy as it exists in many other languages, nor are there any other complex relations. Packages merely possess a registry of symbols and a status of whether a given symbol is external, internal or inherited. When a symbol is inherited, it means it was <a href="http://clhs.lisp.se/Body/f_import.htm">IMPORTed</a> into the package from somewhere else. If a symbol is external it means it's intended for anyone to use when they want to use the functionality the package offers. Such symbols may be either imported or accessed with package:symbol. When it is internal, it resides in the package but is not meant to be used from the outside. It is however still possible to access it by using package::symbol.</p>
<p>Packages therefore offer a way to group and separate symbols. Since symbols carry functions and values we can gain access to functions and variables that are defined in other packages. One of my worries when I figured this out was that, when a package is <a href="http://clhs.lisp.se/Body/m_defpkg.htm">:USEd</a> since all the symbols it exports are now in my package, I'm basically binding my variables to ‘their’ symbols now. Of course this could be problematic if the other package defined, say, <a href="http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/dec_special.html">special</a> variables on regular symbols, I may accidentally muck things up. However, this is a non issue. First, special variables should always wear <a href="http://en.wikipedia.org/wiki/Earmuffs">earmuffs</a>, so that they can be easily identified as such. Second, establishing lexical variables should always happen with <a href="http://www.lispworks.com/documentation/lw60/CLHS/Body/s_let_l.htm">LET</a> so you wouldn't accidentally set a different value to their special in the first place. However, it could still be troublesome since it would be a dynamic binding, rather than a lexical one. One legitimate problem though is that you might want to name one of your functions the same, which would lead to a conflict. To avoid this you can <a href="http://clhs.lisp.se/Body/f_shadow.htm">SHADOW</a> the symbol, which will then create a new symbol of the same name in your package. Of course, this means that you will have to use the full package:symbol name whenever you want to use the other package's function.</p>
<p>Now you may be wondering that if the primary purpose of symbols is to allow the access of functions and values, what the point behind uninterned symbols (ones without a package) would be. These are exactly useful because they don't belong anywhere and thus can't interfere with any other symbol. The main use of such symbols is either when only the symbol-name matters (such as in <a href="http://clhs.lisp.se/Body/m_defpkg.htm">DEFPACKAGE</a> to avoid needless interning) or in macros where you need to expand to variables that hold values or functions but should not come into contact with the user of the macro. In the latter case you should use <a href="http://clhs.lisp.se/Body/f_gensym.htm">GENSYMs</a> to make absolutely sure.</p>
<p>Another thing you may be a bit iffy about is that internal symbols are still accessible, especially when coming from a language like Java with private fields. However, this can actually be used to great advantage and is something I've come to love about CL. For one, it allows you to override functions from other packages, essentially making it possible to write separate projects that act as very complex extensions that might need to change some internals of other packages to achieve their goal, or you could temporarily fix a problem in another package by fixing it yourself without needing to modify the other source code. So while yes, this does give you the ability to seriously screw over other parts of a program you still cannot do so by accident (due to the distinction between internal and external) and having the ability to do this if you need to is a great benefit. </p>
<p>To close off: Symbols are one of the more unique aspects of lisp, but they offer an ingenious way to create a uniform representation of code syntax. Understanding how they work gives a good amount of insight into why CL is able to do the things it does.
<img src="https://filebox.tymoon.eu/file/TkRZeg==" alt="footer"></p>
A Peculiar Day Pt. 3 - Confession 42622014-06-30T15:03:582014-06-30T15:03:58shinmerahttps://shinmera.com/shinmera@tymoon.eu<p>The bell finally put an end to the terror regime of the history lesson and Mr Denzler quickly hurried out without declaring the homework for next week. All the better, thought Monika and looked out of the wide classroom windows. A heavy snowstorm wailed outside, making it impossible to see anything except for a flurry of snowflakes. Mesmerised by the dance of the particles, Monika got lost in thought. Meanwhile the rest of the class was occupied with preparing for the next lesson in Biology, some of them hastily discussing the exercises they had to solve for today, others re-reading some of the chapters in the textbook.</p>
<p>Vrena was in a bit of a pickle. She hadn't managed to solve some of the exercises in time and her classmate Reta wasn't around to supply the solutions. She puzzled about what she could do as there certainly wasn't any time left to do the exercises herself and everyone else seemed to be occupied already. Looking around frantically she finally noticed someone who didn't seem to be busy with anything. Vrena hurried over and patted Monika on the shoulder lightly. “Uuh, Monika, would you happen to have the solutions for Exercises ten and twelve handy?” she said with the most friendly smile she could muster. Monika averted her gaze from the window and looked directly at Vrena. She blinked a couple of times, then her eyes suddenly widened and she flushed. She mumbled something incomprehensible and averted her eyes again. Vrena looked at her quizzically and decided to try again. “Uhm, the solutions?” she asked, pointing at her exercise sheet. Monika stammered “S-sure, just wait a second, but I don't think.. I mean I'm not sure that my solutions are correct, so use at your own risk.” She dug around in her backpack for a while before finding the right folder. Vrena sat down at the desk next to her and quickly began to copy the answers over. Having finished her task she got up, muttered a “thanks” and returned to her own desk. She looked at Monika and wondered why she had been that flustered.</p>
<p>Oddly enough Mr Joost the Biology teacher did not arrive this time. He was usually a very punctual sort and well prepared for his classes. This time however he slowly walked into the classroom five minutes too late, yawned a greeting and then spent a few minutes sorting through his papers and folders in front of the class. Monika used the opportunity to unpack her own books and papers as she had missed the bell and only now noticed that Mr Joost had arrived. With her desk finally ready, Monika directed her attention towards the blackboard. Luckily Biology wasn't as much of a bore as History was, and Mr Joost was actually able to present the topics in a digestible manner, so she had no problem paying attention and the lesson went by quickly.</p>
<p>The remainder of the morning would be a double lesson of Latin. Monika wasn't looking forward to this at all, Latin was one of her least favourite subjects. She just couldn't get a proper handle on the language with all its strange terms, tenses and sentence structure. The fact that she didn't like the Latin teacher Mr Zaugg much of course didn't help her motivation either. Monika spent the mid-morning break wishing for him to never show up at all and looking scornfully at the Latin textbook with its dumb mascot on the front cover. Sadly even long breaks come to an end and it wasn't before too long that the bell announced the beginning of the next lesson.</p>
A Peculiar Day Pt. 2 - Confession 32612014-06-27T22:35:392014-06-27T22:35:39shinmerahttps://shinmera.com/shinmera@tymoon.eu<p>Monika stomped ahead through the freezing morning cold. She progressed slowly as the snow lay thick on the streets and the cold was gnawing on her bones. Luckily the way to school wasn't all too long and the thought of napping for a bit before the first lesson motivated her to hurry ahead.</p>
<p>Not a single soul was to be found in her classroom as she arrived. Monika expected as much, as it was barely still about half an hour too early and with the current weather most would probably prefer to stay at home for as long as possible. She threw her backpack into the back corner of the room and slumped down onto the chair at her desk. The room was still unlit and the dim light combined with the heat rushing to Monika's face made her drowsy.</p>
<p>Monika awoke with a start. The classroom was now fully lit and a couple of her colleagues had arrived too. Her watch revealed that it was still about ten minutes to the beginning of the first lesson. There seemed to be awfully few students around though, usually the classroom would be filled by now. Monika counted twelve people, which meant that only half of the class was present. She briefly wondered if anything was going on that she missed, but quickly got distracted by the scribbles on her desk. Apparently someone decided to draw some horses onto the desk last week. Monika frowned as the horses looked rather unfortunate with strangely shaped heads and block-like legs. She decided to spend the remainder of the break time trying to fix the horses to her best abilities.</p>
<p>As soon as the bell rang, Mr Denzler rushed into the room, door slamming shut behind him. He aggressively threw his books onto the teacher's table, grabbed a piece of charcoal and immediately started writing on the blackboard without even losing a word to the class. Monika was already well accustomed to Mr Denzler's appearance, so she calmly put away her drawing pencils and unpacked her history books. Apparently today's lesson was about the French revolution, again. They had been covering this topic for at least three weeks now and Monika was quite sick of it. She sighed quietly and focused on the horses on her desk again; she hadn't been able to correct them to her liking, which upset her rather badly. To shield herself from this source of frustration, she quickly covered the drawings with one of her books and look around the classroom. There were still about five people missing and of those that were present, most didn't seem to pay attention to the mumbling Mr Denzer either. Not even the execution of Louis XVI managed to make the subject any more interesting and so time dragged on to infinity.</p>
A Peculiar Day Pt. 1 - Confession 22602014-06-26T22:01:502014-06-26T22:01:50shinmerahttps://shinmera.com/shinmera@tymoon.eu<p><img src="http://reader.tymoon.eu/static/reader/uploads/148-tumblr_n78au66BLs1qhttpto4_1280.jpg" alt="image">
I don't think it's wrong to assume that everyone has experienced days that in retrospect seemed to be rather peculiar. When things don't go according to plan and slightly trail off course, a feeling of uncertainty starts to build up. What follows is going to be a recounting of one such day in Monika's life.</p>
<p>The morning started out like many another in the cold and snowy winter of Switzerland. Houses, streets and cars all buried under a thick cover of snow, glimmering softly in the faint moon light. The silence of the night was harshly interrupted by the shrill sound of an alarm clock. One half still trapped on the dream side, Monika reached around blindly. After flailing about for a bit she finally succeeded in shutting down the headache inducing noise-machine.</p>
<p>Unable to find her way back to the land of dreams she rolled around in bed a bit, shuddering slightly as she began to register her senses. It was freezing cold. Finally having gathered the mental strength, Monika forced herself upright and slowly opened her eyes. Her room was bathed in a faint blue light, just barely bright enough to see her own breath crystallise. She shuddered once more, realizing that the heating must have gone out.</p>
<p>Suppressing the numb feeling of her frozen feet, she jumped out of bed and got dressed. It must have been around six 'o clock as the street lights flickered to life outside and flooded her room in yellow. Now being fully awake Monika relished the thought of hiding back underneath her warm blanket. She suppressed her instincts and went on to visit the bathroom. Looking into the mirror she was greeted by a very fair-skinned, round face with a wild, blonde mane. The cheek and nose were burning red from the cold, contrasting the azure eyes. Amused by her wild bed-hair Monika made a few faces. Carrying on to wash her face she noticed that the basin was covered in beard stubble. Her brother Florian must have already gotten up and forgotten to clean up after himself. Mildly annoyed by his lack of respect she quickly washed the stubble away.</p>
<p>Having finished her business Monika grabbed her backpack and went downstairs to wrap herself in a thousand layers of winter clothing to shield against the cold. Dressed in a wool cap, thick scarf, boots and long, winter coat she felt sufficiently geared up to fight the cold on her way to school. Though with the door handle already in her hand she suddenly remembered that she had forgotten to take out the lunch box from the fridge. She stomped back into the kitchen, praying that her mother wouldn't catch her running around in boots inside. Having successfully retrieved the lunch box and avoided a scolding Monika finally set foot outside.</p>
Confessions Primer2582014-06-25T21:02:102014-06-25T21:02:10shinmerahttps://shinmera.com/shinmera@tymoon.eu<p>In an effort to further my writing skills I'm going to try and force myself to write something every evening, in a similar spirit to my ongoing “onesies” drawing series. The content of these texts is most likely going to vary wildly, ranging from instructional and factual articles to completely unrelated fictional stories or ramblings, with the excuse that it's probably better to write about anything than not writing at all. Whether this excuse will properly disguise the fact that I'm rather terrible at coming up with good ideas on the spot is left up for the future to decide.</p>
<p>Also similar to how things roll with the onesies series is that I'm not expecting to get any feedback whatsoever, nor that anyone were to pay my whereabouts any mind in the first place. This does not change the fact that I would of course be delighted to hear that someone is willingly spending some of their preciously short life time and mental capacity on my inane and desultory projects. Just so I would too welcome suggestions and ideas for future writings if there is anything in particular that you would like to hear my thoughts on.</p>
<p>Having exhausted the possibility of talking about this endeavour itself with this I'm left to wonder if I can actually come up with a topic of even remote interest tomorrow. Time will tell. Regarding the length of these texts I am not quite sure if I should set myself a requirement as it might be difficult to stretch or cut the length depending on the topic. However, I will attempt to spend at least around twenty minutes typing on each piece to ensure that I don't simply slouch through it.</p>
<p>The reason of this undertaking is that I love typing and I consider writing an essential skill that anyone should attempt to improve. Writing has the benefit of forcing your thoughts into a certain structure and form which means it helps to process incoherent thoughts in your head into a comprehensible form. Being able to write well further has the effect of allowing one to express oneself and communicate with others in a much better way. Aside from all these practical uses that a good and often applied writing skill has, there is a certain artistic value in crafting sentences and words. Being able to not only express ideas properly, but gracefully is a prowess that I admire.</p>
<p>One of the topics I might cover more than once in this are stories and thoughts related to my story team project with Chris. In case you are unaware of what this entails, a brief description: This project aims to build a story about two fictional characters living in the early 1990s of our real world. The focus lies on developing realistic characters and circumstances and putting all of the effort into making things seem believable and ordinary. The original idea for this was the intriguing challenge of telling a story about the realistic life of two ordinary people living together and yet still making it interesting to the reader. While reflecting on one's own life and considering making stories about this seems to quickly lead to believing that it would be inherently boring to read, I cannot help but disagree. I believe there lies value in recounting a tale matter-of-factly and realistically despite all the uneventfulness and routine of it all. It seems perfectly plausible to me that given it's possible for the reader to connect emotionally with the characters and their environment, even the very essence of slice of life can be intriguing.</p>
<p>However, as both Chris and I are rather busy individuals progress on this is rather slow. We want to take our time and especially considering that we are both novices to writing and developing characters it would be a mistake to rush it. The project is split up in the way that we both each control one of the main characters and have the ability to decide on their backstories, characteristics and looks. As such the stories and thought experiments I will write about here will most likely all be about my character Monika or her family. Any part of their life that involves both characters is planned out together, so I will most likely write stories that flesh out Monika's background and childhood.</p>
<p>I'll close this entry off here and might cover more about the ideas and inspirations behind the StoryTime project in another entry dedicated to it. Again, I'm not sure what I will come up with for the next entry, but I am desperately hoping that it won't be boring as I would feel quite bad about wasting my time. </p>
<p>One last thing: The title of this series has nothing to do with the actual content of the documents within it, I merely found it to be an interesting word to use.</p>