The goal of this blog post is to ease the confusion of Haskell string types. I assume you already know what
String is, so I’ll only cover the difference between string types and help to build intuition on what type you should choose for the task in hand.
At work we use a rebase-based git workflow to keep master history plain along with gerrit to track multiple versions of the same commit and code review. This implies doing a lot of commit juggling including fetching individual commits from gerrit, checking out back and forth, rebasing and cherry-picking. I found myself in detached HEAD state pretty often. I used to create a new branch or force update old one and checkout on it. Then I gradually started to do a part of work in detached HEAD and then realized these branches only hinder me in most cases; so now before starting work on new feature I’m not creating a new branch but rather checking out straight into detached HEAD.
I know this may be unidiomatic git, but that’s how things work for me. Even though I work with detached HEAD, most commands here are equally useful with branches. You can also adopt working in detached HEAD with you current workflow (e.g. work in detached HEAD only for small tasks).
I’ve signed for Haskell-cafe mailing list to learn something new a day ago. The first letter I received was asking which defaulting proposals are actively pursued. I’d knew nothing about defaulting and why it should be improved, so that’s what I learned today.
ProGuard is a free tool for shrinking, optimizing and obfuscating jar files. I’ve used it at work to protect a commercial application from decompilation, especially critical algorithms (unlike machine code, Java bytecode is easy to decompile).
Here I’ll try to describe how I did that.
Make is a simple and powerful tool for automatically building any type of files out of others. However, some programmers experience issues writing makefiles and reinvent things not knowing some basic Make things.
Long time ago, I have read a book The Pragmatic Programmer: From Journeyman to Master (if someone didn’t read it yet, I highly recommend it). This book is a collection of extremely useful tips for programmers. But this post is not about the book.
Recently I decided to revisit these tips again; and found that I don’t remember some of them. So that, I decided to create something that will constantly remind me about them. The best choice was on-screen popups showing one tip at a time.
The pros are:
- it’s fairly easy to create on-screen popup;
- it doesn’t require some action from me; so, I can miss it, if I so wish.
During the study of the Boost library, I’ve stumbled on Proactor pattern. This is a design pattern intended to handle I/O operations asynchronously; but let’s describe other alternatives first.
Massive web servers should serve a lot of active connections in a short period of time; so, it’s important to do this most effectively with a less overhead.
Several well-known methods exist:
- Synchronous Multi-threading
Let’s describe them in order.
By default, skype behaves strangely under awesome wm. For example, view profile window is so small that even name isn’t displayed.
Yes, that’s skype profile at the middle.
I’ve used clang_complete plugin to autocomplete my C code for five months… until YouCompleteMe caught my eye. And now I feel that would stay with it indefinitely.
YouCompleteMe (YCM) is a fast, as-you-type code completion engine for Vim. It combines output from several sources: an identifier-based engine that works with every programming language, a semantic, Clang-based engine that provides native semantic code completion for C/C++/Objective-C/Objective-C++ (from now on referred to as “the C-family languages”), a Jedi-based completion engine for Python, an OmniSharp-based completion engine for C# and an omnifunc-based completer that uses data from Vim’s omnicomplete system to provide semantic completions for many other languages (Ruby, PHP etc). And prioritize them with a complex algorithm.
Note that it’s not necessary to press any keyboard shortcut to invoke a completion menu.
The second advantage of YCM is that it has a client-server architecture. Vim part of YCM is just a thin client that talks to ycmd server. The server is automatically started and stopped as you start and stop Vim. Thus, YCM doesn’t make Vim more sluggish or somehow slow down text editing.
The third newsworthy thing is diagnostic display feature. (the little red X that shows up the left gutter) if you are editing a C-family file. As Clang compiles your file and detects warnings and errors, they will be presented in various ways. You don’t need to save your file or press any keyboard shortcut to trigger this, it “just happens” in the background.
YCM also provides semantic go-to-definition/declaration commands for C-family languages and Python.
For the more detailed feature overview, visit an YCM home page.
I’m an embedded operating system developer and I do all my development tasks solely in the terminal.
The main tool, which helps me to accomplish this, is vim. Today, I will describe how to turn vim into a powerful IDE for C/C++ projects. I will not recommend you any plugin for project management, since vanilla vim already has all the power to cope with this task.
Despite the fact that I use vim as a C IDE, the part of following recommendations are pretty general and may be used to any kind of project.