Vasily Kirichenko's blog articles

0
comment
on 9/24/2015 8:45 AM
Let's implement the following task: read first 10M lines from a text file of the following format:then find all lines containing Microsoft namespace in them, and format the type names the usual way, like "Microsoft.Win32.IAssemblyEnum".First, F#:Now Rust:After several launches the file was cached by the OS and both implementations became non IO-bound. F# one took 29 seconds and 31MB of RAM at peak; Rust - 11 seconds and 18MB.The Rust code is as twice as long as F# one, but it's handling all possible errors[...]
>> Read the full article
.
0
comment
on 7/18/2015 3:34 AM
I don't have a clear impression about Elixir language yet. I don't like it has Ruby like syntax, but do like it has pipe operator and macros. So, Fibonacci:It executes in about 13 seconds which is on pair (even faster for unknown reason) with Erlang, no surprises here.D (GDC) - 0.990C# - 1.26D (DMD) - 1.3C++ - 1.33F# - 1.38Nemerle - 1.45Rust - 1.66Go - 2.38Haskell - 2.8Clojure - 9Elixir - 13Erlang - 17Ruby - 60Python - 120
>> Read the full article
.
0
comment
on 6/22/2015 6:36 AM
I've always been interested in metaprogramming. Sooner or later, I'm starting to feel constrained within a language without it. F# is a really nice language, but I'm afraid I'd have got bored with it if it'd not have Type Providers, for example. Why metaprogramming is so important? Because it allows changing a language without cracking the compiler. It allows making things which seemed to be impossible to implement.I'm dealing with cryptography hashes a lot at work, nothing rocket since, just MD5, SHA-1 an[...]
>> Read the full article
.
0
comment
on 6/20/2015 7:20 AM
As a reference implementation, I added C++ one: It's execution time is 1.33 seconds, which surprisingly is not the best result so far. A C# version: Also, I compiled this D code with GDC compiler and it executed in 990 ms, which is the best result:D (GDC) - 0.990C# - 1.26D (DMD) - 1.3C++ - 1.33F# - 1.38Nemerle - 1.45Rust - 1.66Go - 2.38Haskell - 2.8Clojure - 9Erlang - 17Ruby - 60Python - 120Unfortunately, I have not managed to compile the D code with LDC compiler, it returns the following error:Building:[...]
>> Read the full article
.
0
comment
on 5/16/2015 11:20 AM
I strongly believe that we should keep code as referential transparent as possible. Unfortunately, F# language does not encourage programmers to use Either monad to deal with errors. The common practice in the community is using common in the rest .NET (imperative) world exception based approach. From my experienced, almost all bugs found in production are caused by unhandled exceptions. The problemIn our project we've used the Either monad for error handling with great success for about two years. ExtCore[...]
>> Read the full article
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper