Goal of this article is to describe the concept of Abstraction in an understandable manner. It should cover the process of learning and display how abstraction works in empirical mode and in self-contained (mathematical) mode, as well as providing information about the pattern recognition and noticing similarities that trigger abstraction.

What is abstraction in the big picture? It is a process of creating a framework to think about a class of problems or processes. In this framework are normally included three things — objects, relations and operations.

Below we provide a motivational example for empirical abstraction.

Humans noticed that different similar objects can be grouped and counted. Sheep or horses, amount of soldiers in an army, all different, but similar and we can calculate the precise quantity of those. This gives raise to natural numbers, such as $ 1 $, $ 2 $, $ 3 $ , $ \cdots{} $. Interestingly, when armies fight and the amount of soldiers decrease due to injury or, G-d forbid, death, the quantity changes, which gives raise to the operation of subtraction. When new cattle is born, the amount of sheep in the herd increases, which gives raise to addition.

Here is the summary of how empirical abstraction works:

- Objects that represent generalized version of entities that we work with while dealing with a class of problems or the process we abstract over. In the example with natural numbers, entities are things that are similar to each other — sheep, soldiers, et cetera. We abstract over the type of entity and the order in which we count those, assigning numbers to groups based on result of counting entities in those. Object in this example is a number.
- Relations that represent how objects compare to each other. In our example, relation would be “belonging to a group of similar things”, which is an abstraction over “soldiers belonging to west army, soldiers belonging to north army, sheep in Joe’s herd”.
- Operations on objects which allow us to get a desired result, which is either a solution for a problem or a useful description of a process. Operations in the example we’re working with abstract over events, such as birth of cattle or injury of soldiers.

Notice, that the example is abstraction that is purely based on experience. For example, it doesn’t give raise to negative numbers (such as -5, -42), or to real numbers, such as (9¾, 13.37).

HW #1: Which experience, that we should experience daily, can give raise to the abstract notion of real numbers?

This is a perfect example of empirical abstraction, the one that was made through experience.

Mathematics for at least a couple of last centuries, however, strives to bring the abstraction approach to the absolute, becoming self-contained, disregarding relation to the physical and social world. For instance, when we’re talking about natural numbers as mathematicians, we prefer to disregard things we can do with numbers, such as counting sheep or calculating losses in our army, but instead provide a system of objects and operations in the vacuum of itself. We will discuss how can it be so useful later on.

Now let’s ponder on the concept of this different sort of abstraction a little bit more (the explanation we provide here is almost completely taken from a paper by Michael Mitchelmore et al, that surveys the proceedings in understanding and defining abstraction in mathematics and mathematical learning[2]).

- Mathematics uses everyday words, but their meaning is defined precisely in relation to other mathematical terms and not by their everyday meaning. Even the syntax of mathematical argument (such as proofs) is different from the syntax of everyday language and is again quite precisely defined. These ideas are demonstrated pretty well in the first chapter of “Proofs and Fundamentals” by E. D. Bloch[1].
- Mathematics contains objects which are unique to itself. For example, although everyday language occasionally uses symbols like x and p, objects like x^p or sqrt(-1) are unknown outside mathematics.
- A large part of mathematics consists of rules for operating on mathematical objects and relationships. It is important that students learn to manipulate symbols using these rules and no others. For example, if we have a category that contains as objects things that aren’t necessarily numeric, and a custom operation “+” is defined on it, we can’t use operation “×” just because we feel like addition and multiplication are closely related. We can think of operations on mathematical objects as of rules of a board game, such as the way pieces move in chess.

These three aspects of mathematics make it unfeasible, or — even stronger — impossible to construct objects, relations and operations using empirical abstraction. Instead, an axiomatic approach is used, which we will illustrate, continuing the example of natural numbers.

Here is an accurate enough description of the most famous way in which natural numbers are defined in mathematics. It is called “Peano Axioms”.

- $ 0 $ is a number.
- If $ a $ is a number, $ S(a) $ is a number.
- There is no such number $ a $ that $ 0 = S(a) $.
- $ m = n $ if and only if $ S(m) = S(n) $
*“If and only if” is often written as “iff” in mathematical texts*. - If a set $ I $ contains $ 0 $ and also successor of every number in $ I $ then $ I $ contains all numbers.

From those axioms, we can formally derive true statements. Those are called “lemmas” or “theorems” and the derivation is called “a proof”.

For instance, based on this list of axioms, we can prove that if $ m $ and $ n $ are equal then successor of successor of $ n $ is equal to successor of successor of $ m $.

HW#2 (optional): Prove it.

If we will run around, making an axiomatic out of every interesting abstraction, we’ll quickly get tangled with a bunch of different incompatible chunks of mathematics. However, we would like to have a way to develop axioms and prove statements with those (or, in other words, develop theories) completely independently. This is why in mathematics there is a notion of foundations. A foundation is a special bunch of axioms that provide mathematician with everything necessary to unify their new shiny theory with the work of other mathematicians on their shiny theories. The result of a process of specifying how exactly does a theory map onto a foundation is called “a model”. For example, a model of the Peano axioms is a 3-tuple $ (N, 0, S) $, where $ N $ is an infinite set, $ 0 \in N $, and $ S: N \to N $ satisfies Peano Axioms. This maps well to foundations such as ZF set theory.

Even though mathematics is developed as a thing in itself, it is useful.

Mathematics allows us to carry out computations. Starting from calculating change in a shop, ending in solving equations for some variable given parameters. For example, using calculations we can decide how many stops can we afford to make in order to travel from one country in Europe to another under a certain amount of time.

Mathematics is a powerful, if not the only proper tool for building models. Models are never 100%-precise, but useful to predict outcomes of processes in reality. For instance, we can have a model of a bet winning given historical data which is inherently probabilistic, or we can have a model of a rocket vertically landing on a launchpad, so that we don’t have to construct expensive rockets to check their properties.

Another important application of mathematics is reasoning. Example of mathematically-powered reasoning can be found in computer programming, where it allows us to extract interesting information about our programs. The kinds of this information are vast: starting from complexity analysis, ranging over simple type systems and type systems with dependent types (where you can write type-level programs), to complex and featureful proof assistants to generate proofs about the properties of software. Mathematical logic also might help in mundane reasoning.

Theories such as category theory show correspondence between different fields of knowledge, pointing how they map to each other, making results from one field applicable to another field.

Finally, let’s formulate informally the answer to the question “how to learn mathematics?”.

In order to learn mathematics, we have to see patterns and similarities in a problem domain. Often it is hard to see those, so we can use guided approach, where those similarities are suggested by an educator. As we are sure that those similarities aren’t noise, but are indeed characteristic to a given problem domain, we empirically abstract over those. Here we as students should try our best to come up with abstractions ourselves, keeping in mind the problems we want to solve. If we are studying with an educator, an educator should criticize our abstractions and point out some things that we might have missed. At the end of this back-and-forth, we should end up with a class of good-enough abstractions for the problem domain that help us solve practical problems. Next step is to play with those empirical abstractions and build up an intuition about how they work. With the intuition in place, we can now learn corresponding mathematical abstractions. This process will be reinforced with developed intuition, hence it should be relatively simple to fit mathematical abstractions in our head (simple does not necessarily mean easy!). In order to verify success in learning of mathematical abstractions, we should periodically solve exercises and mathematical problems. Now that we have mastered a mathematical theory or its part, vast opportunities lie as we proceed. We can decide to use it in practice, we can see how this theory correlates with other theories, check if there are generalizations of it. Most importantly though, have fun while learning and using your knowledge!

References:

[1] E.D.Bloch: Proofs and Fundamentals — http://www.unalmed.edu.co/~cemejia/doc/bloch.pdf

[2] Michael Mitchelmore et al: Abstraction In Mathematics and Mathematics Learning — http://www.emis.de/proceedings/PME28/RR/RR031_Mitchelmore.pdf

]]>So I came up with a new reality show — go to an unknown city and try to find an album of a progressive rock band. That sounds less stupid than you might think it is, it’s a great way to meet fellow progheads and see the town from the inside. Having a goal while traveling actually makes it fun and less pointles for me.

For me, the town was Tallinn, and the album was In the Land of Grey and Pink by Caravan. First I went to the most hipster place I could find. It’s called bitt.me, located on the third floor, on Pikk 9, in the Old Town. Not only didn’t they have any progressive music, but also they had little other music than some Estonian underground. A fun shop to attend, but I had to move on. From the guy working there I got recommendations to go to Viru Trading centre and try Laserit (or what was it called? I don’t remember, really, it was — spoiler alert — a waste of time anyway), which was supposed to be the biggest records shop in Tallinn.

So I went to Laserit. It had nothing. It was small. They had no idea about any non-mainstream music. It was just sad. They sent me, however, to a hipster book / recording store on the third floor, which yielded no luck. In desperation, I started to ask around for alternatives, and people suggested a new store called “Terminal”, which was in another building of the same centre. I got there to get lost in ridiculously laid out clothes shops, but to be saved by a nice worker of a rather shitty shop. She directed me to “Terminal”.

There was no needed album there, the last copies of both LP and disk were sold two days ago, but a guy working there actually knew a lot about Cravan, and he knew quite a bit about the prog scene in general. He gave me three directions — to nailboard, which is a big webshop, rockroad community on Facebook (these guys apparently are keen on selling musical curiosities) and music second-hand Led Zeppelin.

I found nailboard’s phone number on their website and called them, they happened to have the album, LP and CD, original mastering and remake. I ordered the original disk and went there to get it. NB! As it is a web-shop, their office and their storage are at different places. Storage is on Madara 31. Go there. There are no signs, but the employee in charge will meet you.

The disk was comparitively cheap, and the guy who sold it to me got a considerable tip for awesomenes.

And that’s how you buy progressive music in Tallinn.

What a nice trip to Estonia it was…

It really got me.

I’m definitely going to live in Tallinn for at least three months either in 2016 Autumn or 2017 Summer. Listening to the anthem of the trip over, and over, and over again:

Right now I’m going to Croatia (arrive on May 22nd, depart — May 25th) through Austria (arrive on May 21st) now to see my man Reslav Hollós and some of the great friends I have there — Domagoj and Saša, Rena, of course. After a couple of days in Zagreb, I’m going to Trieste (arrive on May 25th, depart in the night on May 26th) to take a long ferry ride to Igoumenitsa.

From Igoumenitsa it is trivial to get to my final destination — the island of Corfu, where Bitcoin summer school is held.

Bitcoin summer school is, basically, a cryptographic conference with an emphasis on blockchain technologies. A word has been out that SPECTRE, a successor to GHOST[1][2] will be announced there, so it has a potential to be a real breakthrough in the theory of blockchain building.

On Jun 3rd, joint Serokell / IOHK team will hold a presentation on our proceedings with RSCoin and Scorex projects, I think it’s going to be something like a three-hour panel and I’m really looking forward to meeting some of the scientists who are interested in our ambitious experiments.

Afterwards, I’m going back to Rīga, Latvia (arrive on Jun 9th) through Igoumenitsa, Venice, Trieste, Zagreb (only one full day there instead of a week I planned before!), Vienna, Krakow.

On Jun 23rd I go to St.Petersburg with Kirils Skrabe to play some music at the Engineering Castle stairs and, of course, meet my esteemed colleagues from ITMO. On Jun 30th, I’m back to Rīga and possibly will go to Tallinn again to have a cup of tea… Or three.

References:

[2]: GHOST Paper

]]>Here we continue to re-implement Lens Over Tea.

Ongoing work in covering the entire document can be found in my slides repo.

```
{-# LANGUAGE RankNTypes #-}
module Main where
import Data.Functor (($>))
import Data.Functor.Compose (Compose (..))
------------------------------------------------------------------------
type Lens s t a b = forall f . (Functor f) => (a -> f b) -> s -> f t
type Lens' s a = Lens s s a a
ix :: Int -> Lens' [a] a
ix i f [] = lrgErr
ix 0 f (x:rest) = (:rest) <$> f x
ix i f (x:rest)
| i < 0 = geqErr
| True = (x:) <$> ix (i-1) f rest
------------------------------------------------------------------------
type Getting s a = (a -> Const a a) -> s -> Const a s
view :: Getting s a -> s -> a
view l = getConst . l Const
------------------------------------------------------------------------
type Setting s t a b = (a -> Identity b) -> s -> Identity t
over :: Setting s t a b -> (a -> b) -> s -> t
over l f = runIdentity . l (Identity . f)
------------------------------------------------------------------------
-- _1 :: Functor f => (a -> f b) -> (a, x) -> f (b, x)
_1 :: Lens (a, x) (b, x) a b
_1 g (k, l) = g k >$< (,l)
-- _2 :: Functor f => (a -> f b) -> (x, a) -> f (x, b)
_2 :: Lens (x, a) (x, b) a b
_2 g (k, l) = g l >$< (k,)
-- Make a lens out of a getter and a setter.
lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b
lens get set g y = (g . get) y >$< set y
-- Combine 2 lenses to make a lens which works on Either. (It's a good idea
-- to try to use bimap for this, but it won't work, and you have to use
-- explicit case-matching. Still a good idea, tho.)
--
-- :: Functor f1, f2, f3 => ((a -> f1 b) -> s1 -> f1 t1 ) ->
-- ((a -> f2 b) -> s2 -> f2 t2 ) ->
-- (a -> f3 b) -> Either s1 s2 -> f3 (Either t1 t2)
choosing :: Lens s1 t1 a b -> Lens s2 t2 a b
-> Lens (Either s1 s2) (Either t1 t2) a b
choosing l1 _ g (Left y) = l1 g y >$< Left
choosing _ l2 g (Right y) = l2 g y >$< Right
-- Modify the target of a lens and return the result. (Bonus points if you
-- do it without lambdas and defining new functions. There's also a hint
-- before the end of the section, so don't scroll if you don't want it.)
(<%~) :: Lens s t a b -> (a -> b) -> s -> (b, t)
(<%~) l h = l (\x -> (h x, h x))
-- Modify the target of a lens, but return the old value.
(<<%~) :: Lens s t a b -> (a -> b) -> s -> (a, t)
(<<%~) l h = l (\x -> (x, h x))
-- There's a () in every value. (No idea what this one is for, maybe it'll
-- become clear later.)
united :: Lens' s ()
united g = ($>) $ g ()
```

]]>Earlier I was going through fun custom formats and picked “Boosted” format, which is described by its creator the following way:

In boosted formats (e.g. Boosted Modern), all Magic cards cost 2 less to play, and so does the mana cost in their triggered and activated abilities, and the starting life total is 40. Only the colorless part of a mana cost is reduced in this way, i.e. Lightning Bolt would still cost R, but also Arc Lightning would cost R, and just to take a random example, Teneb, the Harvester would read:

Teneb, the Harvester

1BGW

6/6

Flying.

Whenever Teneb, the Harvester deals combat damage to a player, you may pay B. If you do, put target creature card in a graveyard into play under your control.

In this format, cards that are considered traditionally strong in Modern could become less effective due to the availability of cards that for the same cost do a much better effect. Moreover, cards with too expensive mana cost in classical Modern, would become playable in Boosted Modern, the same for Standard, Limited, and whatever format. Probably, there would be the need of banning several cards.

I think that it can be fixed by saying “All costs are reduced by {2}. If this change of cost changes cost to be {0}, it changes it to be {1} instead“.

It will still be an interesting format with fast “broken” cards, but we won’t end up introducing any super-moxen or some such.

Also, wording “All costs are reduced by {2}” is so elegant, I just can’t resist it. Looking forward to play a Boosted Booster Draft.

]]>This blog post contains spoilers of Star Wars: Episode VII.

This blog post is written after only one seeing of the film. I intend to read the novelization, watch the movie a couple more times and update this post accordingly.

```
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
* * *
```

Back in 2011, when I was reading the numerous rumors about work on Episode VII happening within Lucas Film I, much like many other nerds was not believing it. Lucas swore that the movies are going to end at VI, didn’t he? There was a plenty of “passive revenue” from selling licenses to other authors and accompanying works in the canon of Expanded Universe, wasn’t there?

Besides, I, as many other nerds, wasn’t particularly impressed with the editor’s work on Episodes I-III, after the second episode I was almost praying for Lucas Film to make another person, not Lucas, the editor of the third episode.

So even though the storm was gathering, the news of the end of October 2012 struck like a lightning out of a blue sky. My initial feeling was denial. I have immediately messaged a friend of mine, Michelle, who is a huge Star Wars geek as well, querying if she is to watch the movie once it’s out, she said something like “Why, of course!”. That sort of forced me to end rebuttal and to face the fact that I *will* watch this movie.

My prejudice was coming in waves: I was thinking how good can it be if done properly, how Expanded Universe can get incorporated into the new trilogy (oh how foolish I was to think it will be going to be a new trilogy). I was thinking about how terrible the movie will be if they will market the shit out of it. New movies clearly won’t have any reason to be created except for marketing and making money. They might turn out good or even amazing, but the sole consideration is profits, not high ideals. If profits go down, they will Firefly the franchise. Indeed, Lucas started writing the story of Episode VII to increase the price of Lucas Film, and what to say about what Disney does to franchises (can you tell X-Men movies from one another? Spider-Man? Really? I don’t believe you if you said “yes” to this). So my hope for new Star Wars movie to be an artwork, in purest sense of art, in the same way Episode IV was a piece of an art, was very childish and fragile.

But those were only feelings. Those came in waves, negating each other. Long before the movie was released.

Days before the premiere I didn’t feel the same hype I felt days before Episode III, or even Episode II. I didn’t want to go and I knew I had to. I was very-very confused and anxious.

Yesterday, on new year’s eve, a chaotic decision has been made to go and watch it finally. Here is how I have approached watching it:

I have cleared my mind and promised myself three things:

- I will be ruthless to marketing bullshit
- I will not let nostalgia have me
- I will do my best to watch this movie as “a movie”, not as “Star Wars”.

Maybe it was wiser to just to give in to the Marketing Side of the Force and enjoy the show, but I conditioned myself akin to a Bene Gesserit sister.

After the movie was over I asked myself “How it was? Did I like it?” and to my despair, I couldn’t answer this question. Big picture, I was smiling and pretty happy with the movie. It did not suck. It was a good movie. It is good by itself. Whenever anyone says that it is a poor, bottom-shelf Sci-Fi, they should get a fucking pill of anti-hypocricine. They are asking me to pretend that there was no Star Wars Universe in the first place and try to perceive the movie as a separate movie and telling me that it’s low quality. Well, let’s think about it.

The movie has obviously a vast mythology underneath and telling us how heroes of the Past, warriors of the old days are giving place to those who will fight everlasting battle against Evil today and in the future. Guiding them where they can. On a side note: that is something yet unseen in the Star Wars movies, at least not like this, not through continuous interaction between new characters and the characters of the Past, not on the canvas of *one* movie. Observe:

- Episode IV takes a narrative leap
- Obi-Wan, guiding Luke, has his own, detached story line
- Yoda, later also doesn’t really swing his tiny impractical lightsaber shoulder-to-shoulder with Luke, the only duels he fights are duel with his insanity and shame, and duel over a torch against R2D2.
- Episode I, and II are, in fact, the closest with teacher-student relationship between Qui Gon Jin and Obi-Wan and Obi-Wan and Anakin

The movie has stellar, flawless spaceship fights, has a touch of medieval nobleness with all the shining swords; maybe even appeals to the story of the round table? (Remember, in our thought-experiment other Star Wars movies don’t exist! So, holy shit, this fresh lightsaber idea is awesome!). This movie asks questions regarding morality, belief that people change, facing reality over being drowned in hopes and sorrow of those never coming true. The only flaw of this movie, really, is that it has too many characters. It’s a little bit hard to follow (especially given that all of them supposedly have a rich back-story, none of which are revealed to us in its full extent).

So… Sorry, haters, this *is* a good piece of Sci-Fi, *especially* if you look at it aside from the rest of the movies. If you doubt that, show it to a kid or someone who haven’t seen Star Wars yet and ask them to review it briefly. If they are at least a little bit into that sort of fiction, they will like it very much.

Now we know that it is a good movie overall, let’s think if it’s a good Star Wars movie?

Let me recall the movie as best as I can and comment on it, keeping in mind that it is the new beginning for Star Wars, the new hope.

I was very happy to hear the Main Title music and see the classic opening crawl. It sets the context up. The viewer now know that First Order inherited the shards of mighty Empire and their primary goal is to destroy the last (at least somewhat formally) trained Jedi. New Republic also participates in this race to find Luke to use him in the struggle against pretty strong armies of united (?) forces of the fallen Empire.

Opening Crawl also is pretty vague about affiliation between the Resistance and the New Republic. It says that the latter supports the former. Alright, so far so good, I’m buying it.

Now something that is extremely unclear to me: the existence of an “old ally” who has discovered a clue to Luke’s whereabouts. The clue is a map. A map, which, how we will get to know at the end of the movie, complements part of the map that is in memory of R2D2. The map that leads to the Jedi Temple planet (I don’t think it has a name in the movie). This I don’t buy. How did the old man get this map (also, is it just me or is he cast to resemble Sir Alec Guinness? I bet he’d be happy about that)? I believe that Luke went to the Jedi Temple planet with R2 on board, when Ben (Kylo) killed the students there, Luke must have repelled him and sent all the survivors (if any) to hideouts and sent all the droids (including R2D2) out of the system with instructions to erase the data about the system from their memories and power down.

But then who and how restored the part of the map? Also, how in the Galaxy did the First Order obtain information about Poe’s mission? I’m afraid, those questions shall be remained unanswered in films, at least. I’m really curious about the restoration aspect because it doesn’t really make much sense to me. Maybe the system was re-charted, but then how was the trajectory of Luke’s ship restored? Given that it’s the most important storyline, as far as the opening crawl is concerned, there could have been more detail and logic to it, I think.

Remember those mindless drones called Stormtroopers? They are trained to do just one thing well: shoot with a blaster and miss. Now the beginning of TFA shows us a different sort of Stormtroopers. They are equipped with a custom equipment, suitable for “scorched earth” kind of misssion, they have a clear chain of command, firing teams. Then they show us that one of them is force-sensitive and, well, has feelings. That’s weird because Stormtroopers were always but mobs, but tokens, but I’m buying it and I’m happy for diversity in the main character origins (no pun intended). Force-sensitive part feels a lot weird though. Why didn’t Kylo Ren killed him when he sensed the Force disturbance around him? And physiologically, are these stormtroopers clones? Are they selected? Are they taken away from their parents being babies and then zombified? From what I gather from Phasma’s phrase said on the spaceship after attack on Jakku, they should be if not clones then something very similar to it. But then why did midi-chlorians chose him? It is another weird inconsistent storyline, from which we can only conclude that the new Stormtroopers weren’t, in fact, clones, they were trained separately or in small squads and that Kylo Ren wanted to teach FN-2187 the ways of the Force, exploiting his fear. Again, explanations exist, maybe those are even presented in the auxiliary literature (I will check it), but it’s very difficult to relax and enjoy the movie while continuously faced with that sort of puzzles.

The character of Poe is more or less all we want to see from Lawful Good version of Han Solo, I’ve got no problems with that.

No problems, really, J.J. Abrams knows how to recreate Tatooine. I love Ray character, having some problems with how the authors of the movie portray her as a know-it-all Hermione Granger out of the blue, but that will go later on. Beautiful and majestic ruins of an orbital battle with people salvaging wrecks for food makes for an amazing contrast and brings up the topics of military budget planning of countries and social inequality.

The scene of escape from the star destroyer is reasonable. Really, there are no problems with it. I’m not sure how well does the dialogue between Phasma and Kylo Ren play with the fact that FN-2187 was escorting an important prisoner, but given that he was a well-recognized Stormtrooper amongst his peers and a well-respected one (see Before the Awakening booklet for a reference), it is likely that he social-engineered his way to the prisoner pilot.

The fact that he is a skilled and talented trooper also explains the fact that, not minding his low self-esteem, he managed to pick shooting on-board weapons of a TIE fighter fast enough.

Poe giving a name to Finn is also cute.

Cute robots are cute, am I right? Rey fell for BB-8’s cuteness and didn’t want a perfectly functional droid to be scrapped. She didn’t try to take it for herself, instead she suggests it how to approach accomplishing its mission of getting to Mos Eisley, ughm, no… “What’s the name” village.

Also, I really loved an alien of the species we see first in the Mos Eisely Cantina appearing out of the sand and looking at passing BB-8.

Rey decides to guide the robot to the village, why not, she needs to get there herself anyway. She refuses a lot of food in favour of keeping the droid alive, that’s fine as well, remember, BB-8 is a really-really cute robot! After Finn meets Rey (the meeting was epic, by the way, loved everything about the scene, from “Water! Water!”, to zapping BB-8. They make a run from Stormtroopers deployed on Jakku to find a ship and escape the mess.

There was no surprise that the ship which is referenced as “garbage” or some such was the Millennium Falcon. When we see a parked Millenium Falcon we aren’t surprised, even though JJ tried his best to surprise us with this scene.

I didn’t quite get the idea behind the poisonous gas filling the interior of the Falcon, but from what I gathered, Rey fixed it with a roll of yellow duct-tape. Some things are the same. I bet on-board computer is programmed in an ancient dialect of Perl.

Then they get tractor-beamed to some ship, Finn, out of fear assumes that it’s First Order who got them, but we, again, understand that on meta-level, it’s a perfect time for Captain Solo to reunite with his ship again.

The story is predictable but slick. Bought.

Nerds had to tear up here, right? But because it all was so railed and unavoidable from the standpoint of storyline (and maybe because of my anti-nostalgic shield which was up), I didn’t feel much of anything here. I was happy to see Han Solo and Chewbacca, I can’t deny that.

Now here’s the know-it-all portrayal of Rey that I have a large problem with. THERE IS MORE THAN ONE WAY TO SHOW THAT SOMEONE POSSESSES DEEP KNOWLEDGE ABOUT A SUBJECT! However, the authors of the movie decided to hammer the image of Rey being a know-it-all by forcing her saying the same phrases Han Solo says at the very same time. Amazing! For a high-school comedy film. This scene was a pretty sad display of “We gave only this much fucks about the dialogues in the movie”.

This scene transitions into “The Ranthars!” scene which, aside from weird-as-fuck and out-of-place British accent and some Japanese mafia guys (was I the only one who thinks that a scene like this would me more appropriate in Pam’s story line in Archer series?) is okay.

What I’m not buying is that Ranthar who captured Finn changing the hunting / defensive strategy all of the sudden, dragging ex-Stormtrooper across an unfamiliar ship to get killed with a door. But hey, Finn is Force-sensitive, maybe he used the Force there or something. You know how it goes, if we have Magic in our Universe, we can use it to account for scrapy stories and scenes.

So let’s now talk about New Yoda: Maz Kanata. She is Force-sensitive, she covers smugglers, being, as it seems, a non-violent dissident alright. She’s surrounded with both Empire spies and New Republic spies. Who does background checks when you run such a watering hole? Okay, it sounds reasonable.

As the party enters the Castle we get to the all-so-familiar Stat Wars cantina. I don’t remember this scene well because I was looking at the screen and my mind was playing the beginning of New Hope. It should be noted, however, that I deeply appreciate the fact that JJ and crew re-used a ton of McQuire’s work that didn’t get to be implemented in the original trilogy.

Yay, death star! Bigger, scarier, drawing energy from a star, warping energy on higher-than-light speed through the Galaxy, destroying entire systems. People think that it’s an overstretch, but I don’t give a fuck about their opinion. It’s bad-ass.

The problem I have with the scene of blowing up entire star system as portrayed was, well, that it felt a tad too casual. It’s impossible to portray an event like this better, I guess, as nobody knew what was coming their way, but then hey, we could, as film authors make the mechanics of Starkiller a little bit different. Say, a small fleet of destroyer-class ships has to warp into the system, install a beacon of a sort, through which the warped mass of energy would be channeled, refocused and split across the planets. Then we could have portrayed a scene of a skirmish of slow-to-react New Republic fleet, realization of the role of the refocusing sub-system, panic on the planets of the New Republic system, vain attempts to escape (or maybe some of them not-so-vain ?!). This thing here is *important* *as* *fuck*. We know that it will get destroyed by the end of the movie (but what if not, lol? PLOT TWIST. Nah, this is a no-plot-twist area), however narratively it is the most devastating, terrible thing happened in the entire movie, a huge win for the First Order, a huge blow to credibility of the New Republic.

Also, I find it odd that while the Resistance knew about the Starkiller, even had it’s principle schematics (they weren’t delivered by neither Finn, nor someone else, I believe that they had those the entire time), they didn’t reveal the danger of this station. I’m not sure if I understood the movie correctly on this point, but I do think that Finn provided but the very generic yet essential information, such as, well, the location of the Starkiller and on-site navigation.

Errata: according to the storyline, it seems that Resistance engineers reverse-engineered the Starkiller design from Finn’s words, who was, like Roger Wilco, a space janitor (kudos for that, JJ). Then they guessed that there should be a containment field oscillator and Finn pointed out where it is. Uh, these troopers (ok, prodigal ones) know and overhear a lot of stuff, don’t they? Opsec, First Order! Opsec!

But let’s go back to the Stormtroopers appearing at Maz’s castle and what happens next.

So the party goes to Maz for a clean ship, get spotted by both First Order and Resistance spies (which makes me wonder if that was that good of an idea in the first place). Kylo appears there to fetch the droid he’s looking for himself.

In the meantime Rey see Force-induced visions (hello, Dark Side Passage) and flees those. She says that she needs to go home, then Maz advices her not to do so, after that she snaps out and literally runs onwards, and onwards, and onwards, till she got caught by Kylo Ren.

Ok. I mean. I’d buy it. It’s what a person who is overwhelmed with all the craziness that’s going on would do. That shatter feminist propaganda opinion (which is bullshit anyway. We always had girl-power tone to the movies. Leia, Padme, Rey). This doesn’t show Rey as an uber-human super-rational woman who can singlehandedly save the Universe. She’s strong, she’s quick, she is independent, but she fucks up big time just as anybody else.

Kylo Ren has problems with self-esteem. He overestimates his power to break other Force-user’s mental shields, he underestimates his general abilities, always seeking for a consolation talking to the mask of his grandfather, he overestimates his strategic and tactical abilities (or else the abduction would have been a stellar success!).

With not enough practice of high-profile operations involving Force-users he screws up and lets Rey slip with her newly-discovered abilities.

They meet after a long time not seeing each other due to Han’s “business trips” and General Organa’s occupation with Resistance organization. And they look at each other. Actually, I find this scene pretty good. I’m not sure we wanted to see C3PO there but hey, with complete and utter lack of Jar-Jar Binks and other ewoks, and C3PO being canonically annoying, we can excuse the ruined moment.

Here Finn leaks the information he has about the new station and Resistance engineers reverse the station from it. Not impressed, but ok. (See above).

Classical Star Wars cliffhanger. Who the fuck is it? We can only guess.

Regarding events that led to the final part of the movie. It was pretty damn sad. It was all pretty good though. It also explained the limitations of Starkiller’s power, which was the right thing to do. Without it, I would question Republic’s decision not to participate in the arms race against the First Order.

But then, again, the map. I don’t get it. Why didn’t R2 show it to BB-8 immediately when they talked? Who and how did convince R2 to do that finally? We don’t know.

How the hell did the old man who looked like Sir Alec Guinness get his hands on the map of the system with *navigation data*?

If the destination of this navigation data was the same Jedi Temple planet where Luke was training new generation of Jedis and where Ben (Kylo Ren’s real name) was training then why can’t Kylo Ren navigate by memory / from logs of some of his old astrodroids? Sudden amnesia?

All things considered, this movie is a good movie. Any Star Wars nerd should watch it. It is not art, but neither are 99% of Hollywood movies.

To me, after a day of thinking about it, and analysing my first seeing of it, it falls somewhere between a great fan-fic and a long-long-long trailer for better movies to come. It is a trailer in a sense that it doesn’t tell a whole lot of story and the story it tells, is pretty rough around the corners. The iconic sides of Star Wars are very reasonably and carefully maintained:

- Spaceship skirmishes make more tactical sense than in the classical trilogy
- Lightsaber duels are not overused which is extremely pleasing
- Random weird creatures, different beautiful planets, McQuarriesque settings we love

I’m looking forward to watching the movie again, solving the storyline conundrums and then waiting patiently for Episode VIII.

Considering merchandise and auxiliary works: I used to hate the fact that they threw away Expanded Universe. I don’t think that it’s that bad after all. Remember, for every great Star Wars novel which was a part of EU we had a couple of not-so-good ones! Besides, consider this - if you are as hardcore Star Wars fan as me, remember the thrill of purchasing a new book, especially as a kid, remember the thrill of writing your own stories that go hand in hand with the stories you have read which have the blessing of Lucas Films and playing them with Star Wars d20 or another table top role playing system (if that is your cup of tea). Much like technical debt in programming, writing a single-sharded story with shared timeline while having different quality of material yields the effect of adding a new story getting incrementally harder. Thus, a reset helps authors and Disney be more free in their expansion of the Universe, it increases the value of my collection of classical Expanded Universe books because all of those are so out of print by now, it’s not even funny, it also allows the next generation of nerds to have something Star Wars-related to collect, read and discuss while waiting for the next episode.

A Star Wars nerd must have the deepest commitment, the most serious mind. This one a long time have I watched. All his life has he looked away, to the future, to the horizon. Never his mind on where he was. Hrr. What he was doing. Hrr. To movies going just for fun. Heh. Excitement. Heh. A Star Wars nerd craves not these things.

]]>I have suffered a known existential crisis this December. It was mostly due to my disappointment with my Haskell skills, not being able to represent abstractions in a sufficiently polymorphic and refactorable way (yet tightly enough to benefit from using type system).

However, it was coupled with general feel of disappointment in myself - from lack of skill in playing StarCraft, to, well, not able to type with nine-ten fingers, using only five-seven (on a good day).

This discovery correlates, yet is not caused by the fact that I have recently obtained my first mechanical keyboard. I have decided to check if I know how to type after I have followed a link from an old (classical - ?) blog-post, referenced recently on Twitter by Chris Allen, called “Teach, Don’t Tell”. The name of this article was pretty pretentious, it was called “Programming Dirtiest Little Secret”, or some such.

This blog post states, that one of the most important, or rather, fundamental skills a computer programmer can have is touch-typing. Go ahead and read it. It’s a funny little rant.

That reminds me of a recent meeting I had with one of my employees. I thanked him for the hard and productive work and said that I was fairly impressed with the pace the project develops. To what he answered something along the lines of “Well, it’s my other colleague’s effort, really. While I think about approaches to learn that some of those will never work, he tries things out with code, makes improvements and come up with solutions as good as mine, but faster.” Needless to say that that last colleague of ours has a very high MMR in DotA and amazing typing mechanics. I wonder how much of that has to do with him being amazing programmer.

So I, naturally striving for best in my life, have decided to pick touch-typing as well. For one, because I find it humiliating for a computer programmer or a businessman to be suboptimal about things (especially things they do daily). If another reason is needed, the guy with the rant-blog said that it’s going to be easy, so why not.

My initial approach, the one that I took yesterday was to spin up good old GNU Typist and start meticulously doing exercises, one by one.

I find the tutor-ish style of gtypist most friendly and fun, however I find the lack of real-world typing mode (where backspace allows you to fix a mistake) most disturbing. See, if I miss a key, especially in the beginning of studying touch-typing, that means that I have a trouble with locating this key on the keyboard because of unusual finger placement. What’s a better way to force me to learn the position of this key and which finger is responsible for pressing it except for forcing me to go back for a couple of letters in order to try to press the same letter again. If I am to fail, then again. Over and over till I learn its position.

This is why I have decided to force myself to write texts by touch-typing and this one, as you might guess, is the first one of those.

I think that by combining knowledge about the culture of typing, exercises from gtypist, and writing texts using Backspace key frequently, I will get from 30-40 WPM I have since I switched to touch-typing to the old 60-70 WPM in a week or so.

Till then, I’ll tank the damage of severely increased text-writing times, which will include not only blog posts or personal notes, but also business e-mails and such.

I’m not sad. I embrace the failure. And so should you.

Dec 30th, 2015

]]>THC (Tiny Haskell Cheatsheet) showing the concept of a smart constructor.

```
{-# LANGUAGE OverloadedStrings #-}
module Main ( YandexWallet -- NB! We're hiding constructors in exports!
, yandexWallet -- The only constructor for YandexWallet type!
, main
) where
import Control.Exception (assert)
import qualified Data.Text as T
data YandexWallet = YandexWallet T.Text deriving (Show)
yandexWallet :: T.Text -> YandexWallet
yandexWallet x = assert (T.length x == 14) $ YandexWallet x
main = do
putStrLn $ show $ yandexWallet "6666 6666 6666"
putStrLn $ show $ yandexWallet "phayul"
```

will produce:

```
Mon Nov 23 23:45:08:450160612 sweater@chill ~
λ ghci -XOverloadedStrings /tmp/Main.hs
GHCi, version 7.10.2: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( /tmp/Main.hs, interpreted )
Ok, modules loaded: Main.
*Main> main
YandexWallet "6666 6666 6666"
*** Exception: /tmp/Main.hs:13:18-23: Assertion failed
```

Notice, that `assert`

from Control.Exception is not the only way to make sure that smart constructors construct correct values, you can do all sorts of clever things in those. The important part of the concept is that you hide default constructors and only export the type, then you write custom constructors for it and export all of those.

While proof-reading lens over tea series, I’ve decided to challenge myself with the following — without reading code presented in the article series, implement important functions mentioned in the article.

I think that series like that are perfect for teaching huge libraries such as length.

```
{-# LANGUAGE RankNTypes #-}
module Main where
import Data.Functor (($>))
import Data.Functor.Compose (Compose (..))
geqErr = error "index must be geq 0"
lrgErr = error "index too large"
iGuard x y z f =
if x < 0
then geqErr
else f x y z
type Lens s a = (a -> a) -> s -> (a, s)
type LensL s a = (a -> [a]) -> s -> (a, [s])
type LensF s a = forall f . (Functor f) => (a -> f a) -> s -> (a, f s)
ix :: Int -> Lens [a] a
ix i f xs =
iGuard i f xs ixDo
where
ixDo _ _ [] = lrgErr
ixDo 0 f (x:rest) = (x, ((f x):rest))
ixDo i f (x:rest) = let (x', rest') = ixDo (i-1) f rest in
(x', x:rest')
ixl :: Int -> LensL [a] a
ixl i f xs =
iGuard i f xs ixDo
where
ixDo _ _ [] = lrgErr
ixDo 0 f (x:rest) = (x, [(x':rest) | x' <- f x])
ixDo i f (x:rest) = let (x', rest') = ixDo (i-1) f rest in
(x', map (x:) rest')
ixf :: Int -> LensF [a] a
ixf i f xs =
iGuard i f xs ixDo
where
ixDo _ _ [] = lrgErr
ixDo 0 f (x:rest) = (x, (:rest) <$> f x)
ixDo i f (x:rest) = let (x', rest') = ixDo (i-1) f rest in
(x', (x:) <$> rest')
---
type LensF1 s a = forall f . (Functor f) => (a -> f a) -> s -> f s
-- |
-- λ> let (Pair x y) = ixf1 6 (\x -> Pair (Const x) [666]) [1..10]
-- λ> (getConst x,y)
-- (7,[[1,2,3,4,5,6,666,8,9,10]])
ixf1 :: Int -> LensF1 [a] a
ixf1 i f xs =
iGuard i f xs ixDo
where
ixDo _ _ [] = lrgErr
ixDo 0 f (x:rest) = (:rest) <$> f x
ixDo i f (x:rest) = (x:) <$> ixDo (i-1) f rest
```

]]>In this really short post I want to deliver one simple thought — there is no sense to split each religion into “good sects” and “bad sects”.

One can say that Judaism is alright, it’s just casual rock-throwing is a tiny little bad part of it. No, it’s not. It’s a problem to be dealt with. It’s a problem that discredits religion by showing that immature behaviour is casually employed.

One can say that Christianity is alright, it’s just oppressive sects, such as LDS or Jehovah’s Witnesses are a bad part. It is wrong. Those sects exploit the philosophy of love, giving promises of care to people who need someone to care about them, getting in return what’s left of lives of those people. This is the problem of the entire movement and it has to be addressed by Christians.

One can say that Islam is alright, Muslims who kill other Muslims and innocent people are the bad part. Notice how this discourse is exploited by those who possess power. “Hey, look, we have Sufism that’s a good part”! Well, tell that to those Muslims who kill Sufis in organized and ruthless fashion. The ones who has to strive to break this status quo first have to be people of power in Muslim-majority governments. But they don’t seem to care much, leaving religious leaders to stand in and come up with excuses trying to convince people that Islam is a religion of peace, it’s just something “those bad guys” didn’t understand.

If you are an adept of any religion, just stop for a second and think critically about it. Stop separating your religion into movements for one little second and see if it makes sense to fight for something like that, seen as a monolith. See if it’s worth making somebody else consider adopting your belief system. If you think that the answer is “yes”, you are not right; even if your “religion” is atheism.

]]>[..] if you really want to understand, discourse of normal versus abnormal has to be factored out and flushed down the toilet. Only then will you be able to study something, to destructure, and to find out what is at hand. And if you drown in fear (in your research) that will be your scientific problem.

— G. Schedrovitsky, Science. Methodology. Philosophy.

[..] если вы хотите понять, разговоры о нормальном и ненормальном надо вынести за скобки и спустить в унитаз. И только тогда вы впервые сможете что-то исследовать, разбирать и выяснять, что мы имеем. И если вас там охватит ужас - в ваших научных исследованиях, - это уже ваше научное дело и ваши проблемы.

— Г. П. Щедровицкий, Наука. Методология. Философия.

]]>Went 2-0, winning both 2-1:

And a sample game:

Deck list:

```
// Main deck
1 Explorans Datacloud
3 Influence
1 Mirrorsheen Owl
1 Faithsower
2 Blockbird
2 Elusive Automaton
1 Aeroshell Hermit
1 Labormaker
2 Rapid Reiteration
1 Contreleportation
1 Laboratory Labor
1 Thoughtfault Inspector
1 Spellgrasper
1 Explorans Rewinder
1 Canine Subjugator
1 White Vanilla
1 Opress
1 Thoughtfault Collector
3 Swamp
8 Island
6 Plains
// Sideboard
1 Fabricans Forge
1 Enhancing Medicaments
1 Furnace Fisher
1 Fleshball Homunculus
1 Thoughtfault Collector
1 High Taxes
1 Blue Vanilla
2 Garbage Compressor
1 Thundering Harvest
2 Surging Rejuvenator
1 Constant Exploitation
2 Executive Orders
1 Industrial Rumbling
1 Tappy Fighty
1 Industry Generator
1 Shrapshell Bomb
```

]]>*via ancestral @ freenode*

Very interesting format, wonder how to put concept of mana there to play, say, X-spells.

Not sure why the requirement for cards being common or uncommon is placed there. Also, I feel like land elimination is a more subtle and cute mechanics that solves similar problem in less direct way.

Love the changeling-card though, I think that this format should be tested with limited as well. Not sure how to adjust it though.

Once the student is familiar enough with the core concepts of the game, thanks to the full information “Rochester Booster Wars” format, we can move on to play a small, limited information format.

Each player provides a booster pack and gets the set of “trick or treat” lands. If it is a 14-card booster, this set is the following:

```
6 Mountain (Keep)
5 Plains (Swap)
2 Forest (Swap!)
1 Swamp (Keep!)
1 Island (Peek)
```

If 15-card booster packs are used, one Plains (Swap) card is added.

Players open booster packs, but don’t go through the cards, instead, they set aside the first card face down (reading it) and may read the next card in the pack (but not the one after it).

Once that is done, players select a “trick or treat” land from their pool and put it on the table face down. After both players put their lands face down, the lands are turned face up and then the following happens:

If both lands are Plains (Swap), players swap the face down cards. If one of those is Plains and the other is Mountain (Keep), players don’t swap the cards, as at least one wants to keep the card.

However, if a player *really* wants to swap a card, he or she may use Forest (Swap!), which can only be trumped by a Swamp (Keep!).

If a player used an Island (Peek) card, he or she gets to see opponent’s “trick or treat” land and gets to then choose a land he or she wants to replace Island with, knowing opponent’s decision. If both lands are Islands, both players have to repeat choosing a land and putting it on the table face down.

“Deck building” is the same as in Rochester Booster Wars — you may replace up to one card of the ones you’ve drafted with an Utopia card (rainbow land) and add any number of basic land cards plus at most one additional Utopia card. Minimum deck size for 14-card booster packs is 25, for 15-card packs — 27.

Games are played with Land Elimination rule *(all land cards have “Exile this card from your hand: search your library for a card with the same name and exile it, then shuffle your library. You may play it this turn. This ability can’t be countered.”)*.

Here I post translation of the description of Stella Maris, single, made possible by the determination of Boris Grebentshikov and talent of Robert Wyatt.

Please listen to this piece. It’s good for your soul!

A while ago, in a monastery in Tibet on Kathmandu I was talking to a monk who was a helper to old Lama Tsechu, who became world-famous thanks to the book by Lama Ole Nydahl “Diamond Way Buddhism”. I needed to get a blessing from Tsechu. “Simply ask him”, the monk said; “I don’t feel comfortable disturbing Lama with such a request”, I replied; to that, the monk proclaimed a great truth: “shy won’t get enlightened”.

That’s foreword to our story, and here is the story:

Once during recording of “Salt”, the album, I thought of how great would it be if one of my most adored musicians in the world — Robert Wyatt — could play cornet in the last song of the album — “Stella Maris”. That song felt like a perfect fit for him. I wrote Robert a letter asking to participate in the recording, but was politely refused: “I’d be happy to, but I’m done with making music forever”.

When the song was finished, I — without any plotting — sent it to Robert: “here’s the song which I had in mind”. His response stunned me. Robert wrote that he liked the song very much and for the sake of contributing to this song he is ready to make music once again, asking for a permission to work with it. In two months he sent us his own version of “Stella Maris“ where not only he plays cornet but also sings. Recently, complying with his wish, we have released it online.

]]>Miracles happen.

Это короткий пост про то, как я живу без будильника и всюду успеваю, про проблемы со сном и про то, как я жил с будильником.

Каждый человек когда-то в жизни с ужасом просыпал будильник. А потом с ужасом просыпал будильник снова. Это происходит потому, что наш головной мозг способен на фильтрацию шумов, которые эмпирически не исходят от опасных источников. Мы не просыпаемся просто от того, что слышим звук или даже от того, что внезапно поменялась громкость среды. Мы, как это ни тавтологично звучит, просыпаемся от того, что наш мозг считает, что нам нужно проснуться. Так вот, ясно, что головной мозг тренируется распозновать опасные и безопасные звуки. Естественным образом, мы учимся распознавать тот же самый рингтон, орущий в ухо неделю за неделей и месяц за месяцем, а если мозг хитрее, то и вовсе распознавать звук будильников на концептуальном уровне. Со мной это случилось во времена регулярного использования будильника и пришлось переходить на более тяжелые наркотики.

Я написал скриптик, который строит графики разных функций громкостью колонок и скриптик, который начинает в определённое время играть музыку. Это очень интересный подход к пробуждению, поскольку масса звука обрушивается на нас внезапно — мозг не различает плавное увеличение звука в рамках 3db. После этого (иногда) наступает тишина. Моя любимая функция пробуждения была

`f x = min 100 $ (abs . tan) x`

Но обыкновенный синус тоже ничего. Такого рода нерегулярный будильник делает странное с мозгом и мозгу довольно трудно к нему привыкнуть, всячески рекомендую.

Также, для конвенциональных будильников имеет смысл менять рингтон.

Небольшое замечание на тему cat /dev/sda > /dev/dsp и прочих urandom. В моём случае, пробуждаясь от такого, мозг вёл себя в режиме борьбы с опасностью, я вставал, вырубал будильник, часто находя терминал не с первого раза, и шёл снова спать.

Сказав это, я хочу сказать пару слов о том, что из себя представляет будильник и почему не нужно его использовать вовсе.

Подобно тому как бумажка или доска является расширением памяти, которое помогает запоминать некоторые вещи, будильник является расширением природных часов и перегружает биоритмы. Если мозг считает, что ему нужен отдых от накопленой за день устаолсти длительностью в N часов, а мы даём ему регулярно N-K часов, очевидо, ни к чему хорошему это не приведёт. По факту, еслди это к чему–то и приведёт — это к снижению производительности и росту числа N.

Здоровый образ жизни, включающий в себя регулярную зарядку и достаточно регулярное питание, а также прогулки и ментальные нагрузки позволяет полнотсью избавиться от необходимости в будильнике. Со временем я стал спать по шесть-семь часов и стал использовать час-два, которые у меня появились в каждом дне на физическое развитие или отдых посреди дня (научные публикации [citation needed] показывают, что сиеста увеличивает life expectancy), при этом моему мозгу не хочется “ещё пять минуток” полежать в кроватке, я ложусь спать заблаговременно из расчёта когда мне нужно встать, а если не получается, заблаговременно же предупреждаю коллег о том, что меня, скажем, не будет на стендапе.

Ответственность за моё время снова лежит на мне, а не на куске пластмассы.

В силу жизненных потрясений, в конце 2014го / начале 2015го меня начала мучать бессонница. Я с ней справился без лекарств, физической нагрузкой и медитацией. Полезные выводы про бессонницу, которые я сделал —

- Не пытайтесь рационализировать невозможность заснуть. Это расстройство, с которым нужно что-то сделать.
- Гоните от себя мысли “мне нужно вставать через три часа, и я уже два часа не могу заснуть, какой смысл теперь вообще засыпать”. Даже пятнадцать минут сна имеют смысл, а чем раньше вы заснёте, тем больше минут сна у вас будет.
- Перед сном выйдите на улицу, побегайте, примите тёплый душ или тёплую ванну.
- Разберитесь, что мешает вам заснуть и измените жизнь, чтобы это больше не мешало.
- Если ничего не помогает и вы мучаетесь больше месяца, обратитесь к врачу за консультацией!

As some of you know, I’m a huge geek of making new Magic: the Gathering formats.

I authored Double Rainbow format, when players share library and scry 3 then draw instead of drawing, Unsealed Draft, where players get sealed pool, then pick 45 cards which go into common pool and boosters are getting generated at random for a draft to be played.

Now I present a format that is aimed to be a perfect tool for educational purposes.

But before that, let me present a card that’s familiar to Mental Magic players — Utopia.

Two players each provide a booster pack of Magic: the Gathering cards, consisting of 14 or 15 cards.

A player who picks first is selected at random, and his or her booster gets layed out with cards face up. Then players take turns picking cards till all the cards are drafted. A time to review picks is given between packs and the second booster gets drafted the same way (with second player picking first this time).

Players then make decks with minimum size of 25 cards if 14-card boosters were used and 27 cards if 15-card boosters were made. Players may include any amount of basic land cards and up to one Utopia land card to the cards they have drafted. In addition to that, they can replace up to one card they drafted with an Utopia card.

For instance, when we were battling with boosters from “Friends Cube” — an unpowered cube, me and my friends put together. I replaced Hex with an Utopia and my opponent replaced Goblin Grenade.

Here’s my “Beatdown” deck from the playtest:

```
2 Utopia
4 Plains
2 Mountain
1 Forest
4 Swamp
1 Llanowar Elves
1 Skirk Marauder
1 Inkfathom Infiltrator
1 Wicked Akuba
1 Stormgald Crusader
1 Fumiko the Lowblood
1 Undead Warchief
1 Crested Craghorn
1 Holy Day
1 Altar's Reap
1 Terror
1 Blinding Beam
1 Wing Shards
```

I like the fact that even though the decks are so tiny, this format teaches student about the real principles of Magic™ — mana curves, mana base, who’s the beatdown, card advantage and tempo.

When teaching someone Magic™ using this format, I suggest saying out loud what you’re thinking and how you’re evaluating cards in given booster while drafting, and answering questions of the weaker player, if any.

Playtests show that racing is very important in this format, no matter the set. Soft locks are great, but you can often draft around those. In the end, often, beatdown has to pick up some high-range control cards to unlock the table, while control has to pick up some low-cost cards to trade 1-for-1 with beatdown.

Format is pretty interesting, yet it has a major flaw — flood!

That being said, Mike Strashun offered an interesting twist to this format (which can actually be used in a bunch of other formats as well) which I call “Eliminating Lands” so, here it is —

All land cards have “Exile this card from your hand: search your library for a card with the same name and exile it, then shuffle your library. You may play it this turn. This ability can’t be countered.”

We’ll run another playtest with Fate, Dragons, Dragons tomorrow which will actually involve three boosters!

The rules are adjusted as follows — three boosters are drafted instead of two, minimum deck size: 27, up to two Utopias, Eliminating Lands. Player, who picks second in the first booster makes two first picks in the second one instead of one. That means that second player will get all three second-picks and an extra (good) card, which should balance out the fact that first player has two first picks.

Playtest went great, being able to eliminate few off-color cards/unplayables make decks better and weenie viable. Bombs still need to be played around cautiously, as they appear almost guaranteed, but outracing those isn’t impossible if you mulligan correctly.

Post-factum documenting three player rochester booster war — rules are the same as in Rochester Booster War, except three players draft three packs.

This was actually the most entertaining way to play super-small formats listed card pool is large enough to split some colors and make very stable decks, manabase-wise. Besides, it was still possible for WG player to hate Necromaster Dragon as a first pick in third pack and get to play it effectively.

]]>Boys, girls, humans.

Recently I’ve devoured a Soviet book in Category theory and want something more.

That being said, I’m glad to announce that I’m starting a HoTT study group in Zagreb. Going from functional programming to type theory to topology and all the way back sounds like an awesome trip.

I’ll coordinate with functional programming user group (did you know we have one in Zg?) Here is a talk that may motivate such a study group.

We will, of course, eventually dig through “Homotopy Type Theory: Univalent Foundations of Mathematics”.

Before that we want to organize the first meeting to get acquainted with each other and see how do we want to approach this SG.

May the types be with us. To get included into the mail thread, contact me.

]]>title: Bittorrent |

tags: utorrent, bittorrent, blame the user |

Судя по количеству шума про то, что utorrent решил помайнить с помощью ботнета (в открытую). Напрашивается вывод о том, что есть люди, которые всерьёз используют торрент-клиенты с домашних компьютеров без опции plausible deniability.

К сожалению, большим сообществам характерна абсолютно ужасная безразличность и иннертность в отношении частных вещей, которые якобы работают. Я убеждён в том, что протокол Bittorrent нужно выкинуть на свалку и на его место поставить иной протокол, который обеспечит более контролируемую приватность и котнролируемую “наглость” в несупервизированных сетях. Пока этого не произошло, нужно всячески образовывать пользователей на тему того, как правильно и гигиенично пользоваться bittorrent.

]]>Interesting read (both code-wise and discussion-wise). Even declined PRs are worth reading.

Pop-sci journal that actually feels like it’s written by paparazzi in a very distinctive scandalous language. Enjoyed this particular article, maybe there’s more, but I feel like it gets tiresome very fast.

Another article touching the fact that human conventions and perception are arbitrary.

This article is great because if you read between the lines, you actually get to understand the mechanism UEFI uses to boot.

I’m not saying that UEFI is a good idea, I’m saying that this article plus some thinking provides one with a generic way to make UEFI-bootable iso`s.

]]>- Shift+a — create a primitive (we should have something to edit first, don’t we?)
- Tab — enter edit mode
- z — object shading switch (toggles see-through “wireframe”)
- Ctrl+r — enter median-cut mode (you can use mouse wheel to increase number of cuts)
- N — transform panel
- Ctrl+l — link certain things across selection

- b
- box with left-click — add vertices to selection
- box with middle-click — remove vertices from selection

- Shift+left-click — add a vertex to selection
- Shift+right-click — remove a vertex from selection
- a — toggle select all vertices

- Ctrl+r — normal (orthogonal) cut
- scroll-up — increase number of cuts
- scroll-down — decrease number of cuts
- right-click — apply (after application, you can use
`g`

/`s`

to move or scale selected vertices)

- Ctrl+b — corner cut (Bevel)
- move mouse — place the cut
- scroll-up — increase number of cuts
- scroll-down — decrease number of cuts

- NUM5 — toggle isometry
- NUM7 — top ortho
- NUM1 — front ortho
- NUM3 — right ortho

- Shift+s — cursor menu
- Ctrl+Alt+Shift+c — origin and center of mass manipulation

```
time blender \
-b ./file.blend \
-o "/tmp/out$(date --iso-8601=seconds)" \
-F JPEG \
-P ~/memoricide/goodies/misc/gpurenderpre.py \
-x 1 -f 1
```

where `gpurenderpre.py`

is

```
import bpy
bpy.context.scene.render.engine = 'CYCLES'
bpy.data.scenes['Scene'].cycles.samples=500
bpy.context.scene.cycles.device = 'GPU'
```

]]>```
>>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>
>>= >>= >>= $ ∷∷∷∷ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= ∷∷∷∷∷∷∷∷ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= ∷∷∷∷∷∷∷∷∷∷∷∷ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= $
>>= >>= >>= ∷∷∷∷∷∷∷∷∷ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= ◇◇ ∷∷∷∷ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= $ ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>
>>= >>= >>= >> ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>= $
>>= >>= >>= >>= ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= >>= ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= >>= ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= >>= $ ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>
>>= >>= >>= >>= >> ◇◇◇ ∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷ >>= >>= >>= >>
>>= >>= >>= >>= >>= ◇◇◇ ◇◇ >>= >>= >>= $
>>= >>= >>= >>= >>= ◇◇◇ ◇◇◇ >>= >>= >>=
>>= >>= >>= >>= >>= ◇◇◇ ◇◇◇ >>= >>= >>=
>>= >>= >>= >>= >>= $ ◇◇◇ ◇◇◇ ∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷ >>= >>= >>=
>>= >>= >>= >>= >>= >> ◇◇◇ ∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷ >>= >>= >>=
>>= >>= >>= >>= >>= >>= ◇◇◇ ∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷ >>= >>= >>=
>>= >>= >>= >>= >>= >>= ◇◇◇ >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= >>= >>= >>= ◇◇◇ >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= >>= >>= >>= ◇◇◇ ∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷ >>= >>= >>=
>>= >>= >>= >>= >>= >>= ◇◇◇ ◇◇ >>= >>= >>
>>= >>= >>= >>= >>= >> ◇◇◇ ◇◇◇ >>= >>= $
>>= >>= >>= >>= >>= $ ◇◇◇ ◇◇◇ >>= >>=
>>= >>= >>= >>= >>= ◇◇◇ ◇◇◇ >>= >>=
>>= >>= >>= >>= >>= ◇◇◇ ◇ ∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷ >>= >>=
>>= >>= >>= >>= >>= ◇◇◇ >◇◇ ∷∷∷∷∷∷∷∷∷∷∷∷∷∷∷ >>= >>= $
>>= >>= >>= >>= >> ◇◇◇ $ ◇◇◇ ∷∷∷∷∷∷∷∷∷∷∷∷ >>= >>= >>=
>>= >>= >>= >>= $ ◇◇◇ >>= ◇◇◇ >>= >>= >>= >>= >>=
>>= >>= >>= >>= ◇◇◇ >>= $ ◇◇◇ >>= >>= >>= >>= >>=
>>= >>= >>= >>= ◇◇◇ >>= >>= ◇◇◇ >>= >>= >>= >>= >>
>>= >>= >>= >>= ◇◇◇ >>= >>= ◇◇◇ >>= >>= >>= >>= $
>>= >>= >>= >> ◇◇◇ >>= >>= >> ◇◇◇ >>= >>= >>= >>=
>>= >>= >>= $ ◇◇◇ >>= >>= >>= ◇◇◇ >>= >>= >>= >>=
>>= >>= >>= ◇◇◇ >>= >>= >>= $ ◇◇◇ >>= >>= >>= >>=
>>= >>= >>= ◇◇◇ >>= >>= >>= >>= ◇◇◇ >>= >>= >>= >>
>>= >>= >>= ◇◇◇ >>= >>= >>= >>= ◇◇◇ >>= >>= >>= $
>>= >>= >> ◇◇◇ >>= >>= >>= >>= >> ◇◇◇ >>= >>= >>=
>>= >>= $ ◇◇◇ >>= >>= >>= >>= >>= ◇◇◇ >>= >>= >>=
>>= >>= ◇◇◇ >>= >>= >>= >>= >>= $ ◇◇◇ >>= >>= >>=
>>= >>= ◇◇◇ >>= >>= >>= >>= >>= >>= ◇◇◇ >>= >>= >>=
>>= >>= ◇◇◇ >>= >>= >>= >>= >>= >>= $ ◇◇ >>= >>= >>= $
>>= >> ◇◇◇ >>= >>= >>= >>= >>= >>= >>= ◇ >>= >>= >>= >>=
>>= $ ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= $
$ ◇◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>
>> ◇◇ >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
>>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>
>>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>= >>=
```

]]>I find modern indie-scene most amusing. Even though I’m not the hugest fan of musical part of this culture, the organizational side of it is quite interesting.

Mechanisms of expenses minimization and effective management are moving and impacting indie-scene vastly.

Take musical covers — for instance, band Tunng (pioneers of folktronica genre) covered “Pioneers” by Bloc Party;

Then we have Birdy, indie musician and singer from UK, backed by Warner Music, covering huge amount of modern compositions, including indie-star’s “Skinny Love”.

It’s interesting how in this culture — powered by the Internet — some well-recognized cultural artifacts are used as a trampoline for other artists. Much like with cover bands, but on a global scale.

Overall, indie-culture turns out to be the other side of popular culture, having different target audience and different propagation methods. As a great friend of mine said — the real deal is happening only in the kitchens and think-tank flats, all the rest is basically the same.

]]>Я давно понял, что финальные штрихи в картинку моей личности мир внёс в 2007-2011 гг. Это был замечательный этап с известным количеством прекрасных людей, которые остаются со мной навсегда (пусть и за тысячи километров от меня).

Вписки, гитары, любовь и музыка.

Как писал товарищ Мураками, в каждой комнате в жизни есть вход и выход. Комната без выхода — это смерть. Так что я не сокрушаюсь по утерянной молодости и про то, что какие-то вещи закончились не так гладко, как хотелось —

Apologies mean nothing

When the damage is done

But I can’t switch off my loving

Like you can’t switch off the sun

Желаю всем пережить пафос молодости и стать от этого лучше.

Мир!

]]>Even though I do think that this post is pretty pointless, I found it entertaining. Besides, I do agree with tedu when he says

The point here isn’t to pick on rust. I could have written the same program with the same flaw in go, or even haskell if I were smart enough to understand burritos. The point is that if we don’t actually understand what vulnerabilities like Heartbleed are, we are unlikely to eliminate them simply by switching to a magic vulnerability proof language. Everyone may have heard about Heartbleed, but that doesn’t necessarily make it a good exemplar.

Perhaps Heartbleed is a just a stand in term referring not to Heartbleed itself, but rather any number of other bugaboos. I’m not sure that’s better. Vulnerabilities like Heartbleed but not too much like Heartbleed is a poorly defined class. It’s hard to assess any claims about such a class.

When speaking about vulnerabilities and how they can be resolved, we should try to be precise and accurate. The hype around Heartbleed (and ShellShock, etc.) makes them attractive targets to latch an argument on to, but in doing so we must be careful that our chosen example fits the argument. Misidentified problems lead to misapplied solutions.

Silver-bullet cultists, static-typing fundamentalists and functional programming purists shouldn’t be taken seriously because fundamentalism in any shape and form blinds its adept and makes her detached from reality.

That being said, I find the post pointless because, after stripping fundamentalist bullshit, we’re left with a statement like “while writing idiomatic parsers in functional style we severely reduce the probability of having leaky buffers”. Ugly optimizations, however, oftentimes break the idiomaticness of the code, hence the whole discussion retards to a simple pair of non-contradicting statements not worth the holy war.

Docker is the most famous LXC/AUFS wrapper. I didn’t care enough to dig it even though we were using it in production with one of the companies I was working for.

In the linked posts is pretty reasonable critique of this library. Looks like my gut feeling about projects in Go is yet to fail me.

A later, more complete version of this paper is available as well.

This paper describes Hydra, the current CI system used to test Nix expressions. A perfect thing to read before you make your first Hydra deployment.

Interesting project, use case of which is limited to one thing — simple shell-scripting for teams of Haskell programmers/dev-ops. I really hope that someone will either write a translator from Turtle to Shell, or nobody will going to ever use this library for writing user-facing scripts.

Mirror:

```
curl \
http://media.ccc.de/.../...hd.rss | \
grep -oE "<link>.*</link>" | grep -oE "http[^<]*"
```

Here we parse out links from HD rss of Chaos Communication Congress and get the torrent link to downolad it with transmission or rtorrent. If you are an asshole and don’t want to use a torrent, you can just use this mirror to get the videos. Consider putting up a mirror if you do so, to give back the traffic.

```
# Download CCC talks in English
m="http://mirror.netcologne.de/CCC/congress/2014/h264-hd/"
for x in \
$(curl $m \
| grep -oE 'href="[^"]*"' \
| grep -oE '31c3.*-en[^"]*'); do wget "$m$x"
done
```

https://github.com/manpages/dotfiles/blob/master/nixos/hydra.nix#L8-L26

]]>I’m a believer.

If I am to label my religious system, that’d be reformist Judaism. Which is ironic, as I value Judaic Tradition very much and think of it as of the most important part of Judaism.

That being said, I have a strong opinion on uselessness of religious debates.

It is quite obvious that existence of G-d is unprovable in terms of physical world. It means that discussions involving G-d, its existence and its miracles are orthogonal to discussions involving *observable* reality. Simply speaking — G-d is irrelevant in trans-personal reality.

What happens when we mix discussions regarding G-d into discussions about reality and use those to perform social decision-making? Well, even our intentions are good, after some time we will end up with two parasitic camps of extremists — manipulators (read: Church, corrupt pseudo-Rabbis, Muslim terrorist cells, Induism esoteric sects, …) and opposition (read: aggressive atheists who make money on eternal struggle against creationists). Both extremist groups are are at the very least non-constructive and at most — destructive, sometimes even oppressive.

By not discussing any intelligent creation belief system publicly (doesn’t matter, yours or others’) and explaining your [religious] peers why they shouldn’t do so either, you’ll make the world a better, more peaceful and G-dly place.

Also, I find this answer by Dr. Tyson extremely reasonable —

Sums up my thoughts regarding the current state of the art in international politics, “religions” and other social and meta-social segregation mechanisms:

]]>Poirot is not concerned with nations. Poirot is concerned with private individuals, who have the right not to have taken from them their lives.

Болеть — неважно и не нужно. Лучшее, что я сделал за время болезни — гифка, которая нарезана из сериала про Пуаро.

Восприимчивость к свету, боль в суставах, невозможность адекватно размышлять над сложными проблемами, всё это заставило меня задуматься о том, что такое „нормальное самочувствие“ и что бы было, если бы эта норма находилась в другом месте.

Скажем, если бы люди спали не восемь часов в сутки, а шестнадцать. Или, наоборот, если бы люди всегда были в тонусе и сфокусированы на проблеме, которую надо решить в данный момент. Мне почему-то кажется, что человечество бы от этого не сильно изменилось, ибо ультимативный двигатель эволюции и стимул к деятельности — это смерть, а не изменения самочувствия.

А ещё, не следует игнорировать симптомы. Я чувствовал, что заболеваю примерно две недели, даже брал в сумме пару дней на то, чтобы привести себя в порядок, много спал на выходных. Но всё равно носился по магазинам, изматывал себя марафонами работы. В итоге слёг почти на неделю (сейчас начинается пятый день больничного). Перефразируя классика, „простуда — бессердечная ты сука“.

Updated on January 30, 2015

Начался шестой день болезни (я журналирую простуду, поскольку интересно, действительно ли обычно люди выздоравливают за семь дней, ну и вообще, перед сном что бы не пожурналировать).

29го утром сходил в магазин, спал десять часов, проснулся вечером в самочувствии более плохом чем то, когда начал писать эту заметку.

В ретроспективе — ходить в магазин было идеей не из лучших. Провёл на морозе примерно полчаса, а ещё в магазине некоторое время.

Этой ночью восстановилось обоняние и чувство вкуса. Сейчас (05:18) чувствую себя значительно лучше и снова буду отдыхать.

]]>```
ffmpeg -i ~/in -vf scale=320:-1 -t 10 -r 12 -ss 186 \
-loop 0 out.gif
```

It might be not obvious that here -loop 0 means that GIF will has no delay between loops. As one might guess, -r defines rate, -t defines the length of period to dump and -ss denotes the offset.

Result:

`mv ~/.ghc/x86_64-linux-7.8.4{,.old}`

Equivalent of changing mirrorlist options in Arch Linux —

```
nix-channel --add \
https://nixos.org/channels/nixpkgs-unstable
```

Equivalent of `pacman -Sy`

(synchronize package database) —

`nix-channel --update`

Equivalent of `pacman -Su`

(install fresh stuff) —

`nixos-rebuild switch --upgrade`

]]>When in doubt,

`mv ~/.ghc/x86_64-linux-7.8.4{,.old}`

especially if you do a lot of library testing outside nix shell.

Nix can’t collect garbage from your local ghc-pkg cache.

]]>JavaScript stands out, even in the Haskell world:

```
...
[ 2 of 149] Compiling Yi.Syntax.Layout
[ 3 of 149] Compiling Yi.Keymap.Vim.MatchResult
[ 4 of 149] Compiling Yi.Keymap.Vim.Digraph
[ 5 of 149] Compiling Yi.Keymap.Completion
[ 6 of 149] Compiling Parser.Incremental
[ 7 of 149] Compiling Yi.IncrementalParse
[ 8 of 149] Compiling Yi.Event
[ 9 of 149] Compiling Yi.UI.Vty.Conversions
[ 10 of 149] Compiling Yi.JumpList
[ 11 of 149] Compiling Yi.KillRing
[ 12 of 149] Compiling Yi.Debug
[ 13 of 149] Compiling Data.DelayList
[ 14 of 149] Compiling Control.Exc
[ 15 of 149] Compiling System.CanonicalizePath
[ 16 of 149] Compiling System.FriendlyPath
[ 17 of 149] Compiling Yi.Layout
[ 18 of 149] Compiling Yi.UI.Pango.Layouts
[ 19 of 149] Compiling Paths_yi
[ 20 of 149] Compiling Yi.UI.Pango.Utils
[ 21 of 149] Compiling Yi.Monad
[ 22 of 149] Compiling Yi.Process
[ 23 of 149] Compiling Yi.Interact
[ 24 of 149] Compiling Yi.Window
[ 25 of 149] Compiling Yi.Tab
[ 26 of 149] Compiling Yi.String
[ 27 of 149] Compiling Yi.Syntax.Tree
[ 28 of 149] Compiling Yi.Syntax.OnlineTree
[ 29 of 149] Compiling Yi.Syntax.Driver
[ 30 of 149] Compiling Yi.Syntax.Haskell
[ 31 of 149] Compiling Yi.Syntax.Paren
[ 32 of 149] Compiling Yi.Syntax.Strokes.Haskell
[ 33 of 149] Compiling Yi.Syntax.Latex
[ 34 of 149] Compiling Yi.Syntax.JavaScript
src/library/Yi/Syntax/JavaScript.hs:121:10-25: Warning:
No explicit implementation for
‘uniplate’ and ‘emptyNode’
In the instance declaration for ‘IsTree Statement’
[ 35 of 149] Compiling Yi.Verifier.JavaScript
[ 36 of 149] Compiling Yi.Config.Misc
[ 37 of 149] Compiling Yi.Buffer.Implementation
...
```

Anyway, here are the good news:

]]>This is a short post revealing two little-known facts about two IRC-networks.

So, let’s say you need to find a channel on a large IRC network.

Turns out that on freenode, you can use convenient bot called Alis.

Let’s say, you want to find a channel about My Little Pony on freenode:

```
/msg alis list *pon* -min 10
/msg alis list *mlp* -min 10
```

where `-min 10`

means “has at least 10 users right now” and the rest is self-explanatory.

For an arbitrary large network that doesn’t have awesome bots, we can use an expect-script to `/LIST`

it and then grep the output. We will use telnet, so we’d like that network to operate in plain text mode.

Here’s my script:

```
#!/usr/bin/env expect
set ircNet [lindex $argv 0]
set ircPort [lindex $argv 1]
set nick "thelistbot"
set user "list 8 * : List Bot"
spawn telnet $ircNet $ircPort
sleep 3
send "NICK $nick\r\n"
sleep 1
send "USER $user\r\n"
sleep 1
send "LIST\r\n"
interact
```

then

```
ircNet="irc.oftc.net"
listIrc $ircNet 6667 | tee $ircNet.list
grep \#tor $ircNet.list
```

One must realize that `interact`

statement and sleep timings in my script are pretty arbitrary. The script, however, does what it should for most connections and most IRC servers.

Turns out, ung-dly service “gitter” has IRC backend. Still, it’s pretty awful: it drops messages when another client is connected to gitter with the same credentials, however it sorta works.

Here you can get instructions, written in ugly-backlit neon font.

as it turns out, as for now Gitter’s IRC backend is beyond unusable. Unlike in-browser client, this backend doesn’t shuffle messages randomly, neither have we observed it assigning authorship of a message to a wrong user. However, for large and active rooms, IRC backend proven to start dropping messages (not showing those at all) with no obvious pattern. And it doesn’t have anything to do with poor, if not lacking, multisession support of Gitter, problem persists even when we’re sure that no other sessions of the same user are initialized. I wouldn’t recommend using gitter for anything serious. (*Cough*, hello, webpack *cough*).

*Буллшыт-детектор, оригинальная идея которого принадлежит ftrvxmtrx.*

HR-ам предлагается заполнить следующий опросник, состоящих из простых Да/Нет-вопросов, сосчитать количество ответов „Да“, после чего свериться с ключом для того, чтобы определить дальнейшие действия.

- Используете ли вы Hadoop?
- Есть ли у вас open-floor офисы?
- Считаете ли вы JavaScript сообразным инструментом разработки крупных информационных систем?
- Согласны ли вы с тезисом „использование PhoneGap вместо написания нативных приложений экономит время и деньги“?

Количество ответов „Да“ | Дальнейшее действие |
---|---|

0 | Продолжайте процесс рекрутинга. |

1+ | Идите к чёрту. |

Все | Получите приз „Худшая контoра по ftrvxmtrx-шкале“, после чего идите к чёрту. |

This post provides a list of the coolest articles and papers read by me during January 2015. Currently, this post is a work in progress.

This is a blog-post about using monoid to turn annotated binary tree into a data-structures-Swiss-army-knife. Main idea is that because often tag (annotation) of a branch is, practically, a function of annotations of its children:

```
annotation v a ∷ Tree v a → v
annotation (Branch _ x y) = f (annotation x) (annotation y)
annotation (Leaf _ a) = measure a
```

where `f`

fits axioms of `mappend`

and `v`

so often behaves like `Monoid`

, Apfelmus, citing Hinze, R. and Patterson, R. offers following generalization:

```
class Monoid v ⇒ Measured a v where
measure ∷ a → v
branch ∷ Monoid v ⇒ Tree v a → Tree v a → Tree v a
branch x y = Branch ((annotation x) ◇ (annotation y)) x y
leaf ∷ Measured a v ⇒ a → Tree v a
leaf a = Leaf (measure a) a
```

For practical uses, read the full article, it’s quite entertaining.

Luca is doing important job of covering grounds of interactive documentation for Nix package manager and NixOS.

Nix pills start with trivial stuff, like language overview and basic expressions and are taking reader to an entertaining ride through some specific parts of Nix workflows that might be obscure for a Nix newcomer.

The design of the blog is pretty terrible (see initial `callPackage`

definition in this post), but with w3m or lynx, it’s pretty readable.

A great post that boils down to the simple notion of choosing the right tool for the job, hinting the need of hiring experienced software architects and doing R&D properly (not following the hype).

Based on Volkov, N. 2013. Anonymous records. A solution to the problems of record-system. proposal, Nikita Volkov suggests using type-level string literals to build a library, capable of quite sexy things, like

```
type Person =
[r| {name ∷ String,
birthday ∷ {year ∷ Int, month ∷ Int, day ∷ Int},
country ∷ Country} |]
type Country =
[r| {name ∷ String,
language ∷ String} |]
person ∷ Person
person =
[r| {name = "Yuri Alekseyevich Gagarin",
birthday = {year = 1934, month = 3, day = 9},
country = {name = "Soviet Union", language = "Russian"}} |]
```

A subset of lens are integrated with Volkov’s records:

```
getPersonBirthdayYear ∷ Person → Int
getPersonBirthdayYear =
view ([l|birthday|] . [l|year|])
setPersonBirthdayYear ∷ Int → Person → Person
setPersonBirthdayYear =
set [l|birthday.year|]
```

There’s a long way to go for this library, but I really hope for a standard and sane records in Haskell.

That’s why you read maling lists, not wiki, people. Awesome article by Peter Simons, providing up-to-date information regarding setting up Haskell environment(s). Helped me to organize my environment.

Peter explains what haskellngPackages are, which problems they solve and why you should go to nixpkgs and mark stuff that doesn’t build as broken (at least).

Good article to read, to get a perspective of Haskell NG development.

FAQ about state of the art of Haskell NG and why should we care. Explains `provideOldHaskellAttributeNames`

, explains why did `ghc-wrapper`

disappear for good and much more. Prototype for new Nix Haskell documentation.

*Even though at the moment of writing I’m not sure if I can successfully build yesod and yi on my computer with nix, I have a clear picture of what I should do next. When I accomplish that, be sure that I’ll write a blog post about it.*

*Added, Jan 25th — turns out, haskellng is great for libraries that aren’t inherently broken (read: for major Haskell libraries and applications that don’t follow Yesod’s distribution pattern). Besides, Pete Simons is really fast on fixing bugs in haskellng expressions. I’m a little bit shy to send PRs myself yet though.*

In this post, Leo rolls out a Yesod-less grocery shopping listing application. What I love about this blog-post (and most of his blog-posts) is that it has this “get things done” attitude. Don’t expect production-grade code there, however it’s a very nice and gentle introduction into the world of WAI.

I found this article somewhat related to the talk, given by Paolini-Subramanya, M. at Erlang User Conference in 2013 (that I had an honour to witness in person). There Mahesh was talking about the practical sides of queue management and why in real high-load systems it’s absolutely critical to get less wrong. In that sense, some of theoretical insights given by Brandon.

The source code of this library is a nice study in queues, definitely worth looking at.

- Hoare’s Quotes (through AkkaRaceSample README).
- Two books about food and dietology (thanks, mkaito).
- Probability monad
- 31C3

На выходных поигрался с rust 1.0.0-alpha, потыкал немного Idris, почти написал решалку для кен-кена (на питоне, потому, что помогаю любимой женщине с универом).

Ну то есть как „на выходных“… За субботу и ночь на воскресенье. Пришло время спать, чтобы вечер воскресенья был таким же продуктивным.

Кстати, начал засыпать в тишине, под книгу Пратчетта. До этого несколько лет засыпал под какой-нибудь Adventure Time или My Little Pony; часто — тихую музыку.

Вообще, читать худ-лит — это круто. Обязательно напишу про свои впечатления от прочитанных за январь книг в начале следующего месяца!

]]>Гуманитарии в естественной среде обитания — копипаста.

]]>You remember that time when your mother first heard King Crimson’s “21st Century Schizoid Man” and asked “what’s that noise?”. You don’t? Well, must be my personal trauma.

So I’ve got myself a complete discography of threefold band Xhol Caravan-Soul Caravan-Xhol and decided to tell a little bit about the way I’ve got into kraut rock. Along with that, I’ll give a couple of suggestions about how to listen kraut rock.

When I first heard a band that was playing kraut rock I felt strange. Given that I’m a fan of symphonic and vocal progressive music — Emmerson, Lake and Palmer, Gentle Giant, and so on — I couldn’t help but to think to myself “what’s that noise?!”. I think, it was something by Kollektiv, not sure which composition, but think of something like Xhol’s Orgelsolo (from “Motherfuckers GmbH & Co KG”).

The little I knew that there is mindblowingly beautiful and complex Universe of jazzy-progressive there with twenty-minute improvisations and fine-grained recordings. It’s like Art Nouveau of jazz. In the universe of kraut rock there is also place for symphonic deviations (like Grobschnitt), for a little bit more “standard” prog (Can) and much more (read at progarchives).

Never underestimate amazingness of kraut live recordings, remember — that’s where possibly greatest improvisations of seventies happened! Don’t freak out when you get one of “those” kraut compositions, having occasional child laughing to a bass violin for four minutes is perfectly normal for kraut albums (but hey, doesn’t that happen to the best of bands?).

Don’t expect strongly conceptual albums from kraut bands, it’s not what it’s all about, just grab an album, such as “Electrip” by aforementioned Xhol and get dissolved in the great and rich music full of twists and changing patterns. Alternatively, you can get this disk set — Krautrock - Music for Your Brain, it surely is a great compilation made by people, who really care a lot about the kraut scene.

By the way, I’m thinking about making this blog hybrid and utilize non-textual content delivery over hyperboria. This way I’ll be able to post compositions, or fragments of compositions (as far as fair use goes, of course) without having to go through any C&D nonsense. What do you think? Drop me a mail if you’d like that! I’d surely be glad to link compositions I’m talking about in the posts about music.

]]>Наконец запилил бложек такой, как давно хотел — с категориями, раздельными RSS-фидами и на Хаскеле.

Предыдущая попытка была ужасно зелёной, соляризованой мерзостью, которую я пытался хостить на github.io. Рендерил я всё это, естественно, Jekyll’ом, что добавляло тленности в картину.

На Hakkyl я поглядывал давно, но всячески его избегал. Проект довольно большой, а у больших проектов на Haskell есть свойство не билдиться без бубна.

Однако, с тех пор как я перешел на NixOS, я периодически вспоминал про этот замечательный генератор статического контента. Дело в том, что Nix-выражения чистые — один набор инпутов имеет всегда один и тот же аутпут. Поскольку множественность и вариативность билдов одной и той же библиотеки заложена в саму архитектуру пакетного менеджера Nix, Cabal hell решается сам собой. Сбилдить Hakyll с помощью Nix тривиально:

`nix-env -i haskell-hakyll-ghc7.8.4-4.6.1.1-shared`

Последней каплей для создания Hakyll-блога стало активное обсуждение создания русскоязычного хаба для агрегации контента про мой любимый язык программирования.

Я очень хочу в какой-то момент попоститься на haskell.ru, так что планирую использовать сей уютненький бложек как стейджинг для статей. Ну и типа там еще с ЖЖ-времен все говорят про переезд на стандалон, а в итоге переезжают в тупые социалочки и прочий хабр.

Короче вот. Поехали!

]]>Снилось, что в IRCе Попов мне сообщает, что типа завтра концерт Аквариума. Я отвечаю, что не успеваю, ну вообще никак, но всё же еду, бросив всё™.

Концерт, почему-то, происходит в полупустом зале некой школы, на концерте преимущественно молодёжь и — естественно — моя мама.

На сцене два Бориса, Игорь, Шар и Титов. Проверяют звук. Играют песню, забыл какую (может быть «День Радости»), потом уходят в джем. Я фотографирую всё это из-под сцены на «Смену».

Тут происходит что-то вообще странное — на сцене появляется Попов с флейтой и начинает дико сейшнить. Музыка Аквариума затихает, группа уходит за кулисы для финальных приготовлений перед первой песней и он меняет инструмент на какой-то маленький синтезатор, который, однако, звучит как электро-гитара. Голосом Финна из Adventure Time поёт Stairway to Heaven.

На сцену возвращается Аквариум, концерт начинается, я неторопливо просыпаюсь.

```
sweater | Microsoft™ progress bar meets rsync:
sweater | season05-episode05.mkv
sweater | 101,974,016 -2147483648% 469.32kB/s ??:??:??
sweater | 32 minutes remaining.
```

```
sweater | Here we go again: http://memorici.de/
vaskozl_ | German domain, Latvian hosting, English Articles + Russian
sweater | vaskozl_: aaaaand you have just described a personal blog of a guy who lives in
| Croatia
vaskozl_ | ^^
```

]]>