Cover photo
Jyri-Matti Lähteenmäki
Works at Solita Oy
Attended Tampere University of Technology
Lives in Kangasala, Finland
118 followers|58,338 views


About Subtext
I watch a video, which I highly recommend to everyone: I decided to write some thoughts on three issues discussed in the video. Program logic as text versus table Fibonacci and readability/editability Melee example and maintainab...
Add a comment...
"After each project, we felt we were getting better superlinearly. Our experiences carried forward elsewhere too. Our Python code became more functional, concise and easier to maintain."
Add a comment...
As Google abandons its past, Internet archivists step in to save our collective memory.
Add a comment...
Didn't like his style talking to youngsters as a grown up...

...but the point was excellent, and the references to data were interesting.

If you can't find the time to watch this, just remember to get rid of as many lines of code as possible ;)
Add a comment...
Enlightening video of the remarkable capabilities of Lenses!
I'm sooooo going to spend many nights striving to comprehend all this stuff...
Add a comment...
GHC truly seems like a brilliant piece of work. Not because of what it is, but what it can be extended to be!
Add a comment...
Have him in circles
118 people
Matti Jaakkola's profile photo
Olli Nevalainen's profile photo
Tuomo Turunen's profile photo
Jari Hämäläinen's profile photo
Iiro Uusitalo's profile photo
Josh Helpert's profile photo
Outi Niinikoski's profile photo
Lari Österholm's profile photo
Jussi Koiranen's profile photo
Some real-life Haskell:

fromCsvFake :: Either String (Vector (Double,Double))
fromCsvFake = CSV.decode CSV.NoHeader $ BS.pack "1.0,2.0"

fromCsv :: IO (Either String (Vector (Double,Double)))
fromCsv = CSV.decode CSV.NoHeader <$> BS.readFile "data.csv"

The first one is a simple line to parse a CSV. Anyone could write that. Feels easy. But it's not "real", it's parsing a fake value.

But I can see from my own programming that when some context is brought in, whether it's IO or anything else, I totally freeze. For some reason I find it incredibly difficult to implement the second function straight away. I'll turn to do-notation and argh, It takes ages to turn that into a one-liner like above.

One of the beauties of Haskell is that it abstracts away contexts. After all, why should it matter if a value has some context around it, since all the same information is there? Shouldn't the same code work for both plain values and contextual ones? Ofcourse it should.

As can be seen from the example, changing the fake value to an IO ByteString, is only a matter of letting the compiler know that we need a slightly different function application, namely <$> instead of $. Alternatively one could lift the function to a contextual scope like this:

fromCsv :: IO (Either String (Vector (Double,Double)))
fromCsv = liftA (CSV.decode CSV.NoHeader) $ BS.readFile "data.csv"

Sometimes I like to think it as lifting, sometimes I like the applicative syntax. I'm not sure yet which one's preferable, maybe it depends.

But one thing really bothers me: Since there are different ways to apply values to functions - the regular way, the applicative way and a monadic way (a.k.a "bind") - and the compiler should know which one is needed, why do I have to be explicit about it? Why couldn't the compiler "automatically lift" the functions for me when needed?
Add a comment...
Sounds like a reeeeally great family to belong to. Worth reading as a whole, but here's a few clips anyway:

"We have no managers, not even a CEO. Instead we rely on self-organization and transparency. Almost everything is bottom-up, and anyone can drive any decision."

"Crisp doesn’t want to earn money from it’s consultants. It is in practice a non-profit company (although not formally so). Consultants keep most of what they earn."

"No gold on the table – we don’t try to build financial value in the company."

"We don’t have a growth target. Growth is not a goal in itself. We grow only when we find awesome people and aren’t suffering from growth pain."

"Our model is simple: anyone who has been at Crisp for 2+ years can become an owner."

"As opposed to most traditional consulting companies, her job is not to maximize profit or sell as many consulting hours as possible. Instead, she optimizes for the happiness index, which means learning and adapting to each person’s individual needs"

"We used to have a more traditional budget process and debate about things like how much Crisp should spend on what. Lots of spreadsheets, discussions, compromises, and not very effective. After a while we got fed up with the whole idea of a centralized budgeting process and abandoned it in favor of something more like beyond budgeting"
What is this? This site is an open-source site describing how Crisp works and why. Crisp is a consulting company based in Stockholm, Sweden. But we aren't a very typical consulting company. For example: None of the 30+ consultants are actually employed by Crisp (although we do have a few ...
Add a comment...
If you're a statistician and think that R is somehow cool, please read this!
The categorical distribution is the main distribution for handling discrete data. I like to think of it as a histogram. For example, let's say Simon has a bag full of marbles. There are four “categories” of marbles—red, green, blue, and white. Now, if Simon reaches into the bag and randomly ...
Add a comment...
Interesting. Had to buy to see what's the state of data analysis with Haskell. After all, R is an abomination.

Gosh, my reading list just grew to 58 books...
Add a comment...
Brilliant ;!)
I just wish and pray it would happen much sooner...

Anyway, he's absolutely right in that JavaScript is eventually going to "die" in the sense that it will deteriorate to be just an assembly language.
The Birth & Death of JavaScript. A talk by Gary Bernhardt from PyCon 2014. This science fiction / comedy / absurdist / completely serious talk traces the history of JavaScript, and programming in general, from 1995 until 2035. It's not pro- or anti-JavaScript; the language's flaws are discussed ...
Add a comment...
Cool, but I'm a little bit worried about "the level of transactionality". They say that purity is essential, and they use a cache to "guarantee" it.  In their open-sourcing announcement they state:

"One minor caveat is that requests could be overlapping without necessarily being identical—say, the last 10 and the last 100 posts made by a person. In such a case, it would be possible to observe a changing world. We do not feel this is a significant problem in practice, however it may be addressed in a future version of the library."

I'd say that it may not be a problem for Facebook, but it surely is a problem in general. Talking in SQL Transaction Isolation Levels, their solution corresponds to Repeatable-read, which leaves a lot to the responsibility of the programmer but which Simon said was something they wanted to avoid? For years in SQL databases we've had almost Serializability via MVCC databases, and even full Serializability with often acceptable performance, which greatly release burden from the programmers.

So, maybe great for Facebook and other "doesn't really need to work correctly most of the time" software, but probably not in general.
Add a comment...
Have him in circles
118 people
Matti Jaakkola's profile photo
Olli Nevalainen's profile photo
Tuomo Turunen's profile photo
Jari Hämäläinen's profile photo
Iiro Uusitalo's profile photo
Josh Helpert's profile photo
Outi Niinikoski's profile photo
Lari Österholm's profile photo
Jussi Koiranen's profile photo
Software Designer
Scala, Haskell, Java, ...
  • Solita Oy
    Software designer, 2007 - present
  • Metso Automation
    Summer trainee, 2006 - 2006
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Kangasala, Finland
Tampere, Finland - Kangasala, Finland
A wanna-be Software Architect
Bragging rights
3 kids, wife, passion for elegant software solutions
  • Tampere University of Technology
    Computer Science, 2003 - 2010
  • Tampereen Ammattikoulu
    Telecommunications engineer + Matriculation, 1998 - 2002
Basic Information
January 22, 1982
Jyri-Matti Lähteenmäki's +1's are the things they like, agree with, or want to recommend.
Language Power

First, let me clarify that there are all sorts of wonderful patterns in software–things like “functions”, “iteration”, “monads”, “concurrent

Windows 8 — Disappointing Usability for Both Novice &amp; Power Users (J...

Hidden features, reduced discoverability, cognitive overhead from dual environments, and reduced power from a single-window UI and low infor


(noin 20 kpl) 200 g tuorejuustoa 50 g voita 3 1/2 dl tomusokeria 150 g valkosuklaata 3 rkl vahvaa kahvia 2 munaa (1 rkl konjakkia) 1 sitru

Propositional Logic in Coq - Paul Snively's Blog

As promised, I’m going to talk a little about simple propositional logic in the Coq proof assistant. Remember the first puzzle from Smullyan

in which we cater to those with an allergic reaction to parentheses - Te...

A lot of people have been talking about how parentheses are such a big barrier to adoption of Clojure these days. Apparently they're pretty

Sorting and searching at the library

If you ever want to screw over a library, just walk up to any shelf, pick up any book, and put it on another shelf where it doesn't belong.

PHP: a fractal of bad design - fuzzy notepad

Preface I’m cranky. I complain about a lot of things. There’s a lot in the world of technology I don’t like, and that’s …

Why Structure and Interpretation of Computer Programs matters

Why Structure and Interpretation of Computer Programs matters. Brian Harvey University of California, Berkeley. In 2011, to celebrate the 15

How Google Builds Its Maps—and What It Means for the Future of Everything

An exclusive look inside Ground Truth, the secretive program to build the world's best accurate maps.

On Scala, Functional Programming and Type-Classes

I've been following the excellent Coursera course on Functional Programming Principles in Scala led by Martin Odersky. This was not my first

What is it like to have an understanding of very advanced mathematics?

Answer (1 of 11): * You can answer many seemingly difficult questions quickly. But you are not very impressed by what can look like magic,

IT Security in a Nutshell - The Fishbowl

Charles Miller's weblog, covering Apple, Java, and whatever assorted nerdery happens to cross my path.

Fukushima - Rakkaani: Miksi mannerlaatat liikkuvat?

Ritva, mon amour secret et tout le monde: Mannerlaattojen liikkeen aiheuttavat konvektiovirtaukset. Elikkä kiinteähkön laatan alla on hitaas

Software Effort Estimation Considered Harmful - Rogish Reading Writing

Delta Air Lines tells me it will take two hours and twenty-five minutes to fly from New York City to Atlanta, GA. American says two thirty.

Byte Buffers and Non-Heap Memory

Most Java programs spend their time working with objects on the JVM heap, using getter and setter methods to retrieve or change the data in

git concepts simplified

master TOC | chapter TOC | license. git concepts simplified. The title of this page used to be "git for computer scientists -- my version",

Java Streams Preview vs .Net High-Order Programming with LINQ

In today's post I want to share with you a comparison that I did this weekend between the high-order programming features from LINQ and thos

The Downfall of Imperative Programming | FP Complete

Imperative programming is in my bloodstream. I've been a C++ programmer for most of my life. I wrote a book about C++. I helped Andrei and W

Effective Scala

Fork me on GitHub. Effective Scala. Marius Eriksen, Twitter Inc. (@marius). Table of Contents. Introduction; Formatting: