Posted by Brian Hicks on Mon, 08/22/2016 - 17:37

There have been several recent questions on the elm-discuss mailing list about decoding large JSON objects.
The problem: Elm’s decoders provide for decoding objects with up to 8 fields, but what happens when you need more?
The solution here is, unfortunately, not super obvious.

Posted by Brian Hicks on Mon, 08/15/2016 - 17:00

Last time we talked about using <| and |>.
<| and |> allow you to create pipelines through with data can flow (like water.)
That’s all well and good, but what if you need pipes without the water?
Well, that’s easy enough to do with function composition!

Posted by Brian Hicks on Mon, 08/08/2016 - 17:00

Say you’ve got a bunch of functions, and you want to use them together.
This is a common situation, but it can get a little… messy.
Let’s take an example from the Elm docs:

scale 2 (move (10,10) (filled blue (ngon 5 30)))

This is, well, just OK.
A little parentheses go a long way, but this is just unclear.
You have to follow them very closely to figure out the evaluation order.
Editor highlighting can help, but wouldn’t it be better to get rid of the problem?
But how do we do that?

Posted by Gizra on Thu, 07/28/2016 - 00:00

I work at Gizra, so it was only a matter of time before Elm infected me as well, and I think it’s growing on me.

I wanted to build something a little different, not just the plain old TodoMVC. So, I harnessed every bit of creativity I had and came up with the most radical idea ever - I took the TodoMVC in Elm and got it to work in Electron, and called it Elmctron (I know, so creative of me).

Electron enables you to build cross platform desktop apps with web technologies. So we can take all the goodies we get with Elm and use them in our desktop application. It’s a brand new world!

It was my thought that we should build a couple of gulp tasks to make our life easier - to do the bare minimum because after all, who wants to do more than we he have to? (let’s hope my boss will not read this part)

So, with that in mind, the only commands I want to run are git clone .., npm install, and gulp. The gulp tasks should:

  • Compile SASS to css.
  • Compile Elm to JS.
  • Watch and auto-reload.
  • Automagically download and install elm packages.
  • Start the electron app.

Continue reading…

Posted by Brian Hicks on Mon, 07/25/2016 - 19:35

Elm is usually pretty clear, but there are certain things that are a little hard to search for.
One of those is the ! operator, introduced in 0.17.
What does it do?
Where does it come from?
And even more important, when should you use it?

Posted by theburningmonk.com on Mon, 07/18/2016 - 12:06

Tweet Hello, Recording of my Elm talk at Polyconf this year is available now.   Tweet

Posted by LambdaCat on Sun, 07/10/2016 - 23:15

So, Purescript.

If you know Elm and want to add to your toolset a language, which actually has those higher abstractions that you've heard about, Purescript is the obvious choice.

Purescript compiles to Javascript too, it can interoperate with any Javascript library, has no runtime, and has most of those

Posted by LambdaCat on Sun, 07/10/2016 - 23:15

So, Purescript.

If you know Elm and want to add to your toolset a language, which actually has those higher abstractions that you've heard about, Purescript is the obvious choice.

Purescript compiles to Javascript too, it can interoperate with any Javascript library, has no runtime, and has most of those

Posted by LambdaCat on Fri, 07/08/2016 - 18:34

I was supposed to give this talk at the July Cambridge DDD night, but I was ko'd by a bad flu, so I sent this video instead.

I did it while running a fever, but apparently it wasn't too bad, so here it is.

If any errors made it in,

Posted by LambdaCat on Fri, 07/08/2016 - 18:34

I was supposed to give this talk at the July Cambridge DDD night, but I was ko'd by a bad flu, so I sent this video instead.

I did it while running a fever, but apparently it wasn't too bad, so here it is.

If any errors made it in,

Posted by LambdaCat on Sun, 07/03/2016 - 00:19

If you're familiar with Linux, you have certainly encountered pipes:

find / -name somename | grep ...

they take the result from one command and pass it to the next function, allowing you to chain multiple command together.

Road to Elm - Toc

They're helpful and convenient, and take advantage of the compositionality

Posted by LambdaCat on Sun, 07/03/2016 - 00:19

If you're familiar with Linux, you have certainly encountered pipes:
find / -name somename | grep ...

they take the result from one command and pass it to the next function, allowing you to chain multiple command together.

Road to Elm - Toc

They're helpful and convenient, and take advantage of the compositionality

Posted by LambdaCat on Sat, 07/02/2016 - 23:57

Chances are, if you've been reading Elm code older than a year, that you've seen a strange squiggly symbol <~.

It used to be exposed by the Signal namespace, but was then obsoleted in favour of just using its full name Signal.map (which is now itself obsolete).

in merge

Posted by LambdaCat on Sat, 07/02/2016 - 23:57

Chances are, if you've been reading Elm code older than a year, that you've seen a strange squiggly symbol <~.

It used to be exposed by the Signal namespace, but was then obsoleted in favour of just using its full name Signal.map (which is now itself obsolete).
in merge

Posted by Gizra on Thu, 06/16/2016 - 00:00

I gave an Elm session in YGLF conf. This was a great excuse to free up some hours to work on a new v0.17 SPA (Single Page Application). You won’t believe what happened next…

Well, actually, you would: it was an awesome experience. :)
In fact, I’ve reached the point that the backend me is becoming jealous of the frontend me.

View demo

Get the source code

Fetch GitHub user's info on this fake login.

My goal with building this demo app, was to give a small, yet realistic, look into how Elm
allows us to accomplish daily tasks such as HTTP requests, routing, access, and more.
It was important for me to structure it in the same way that we structure larger apps built for production, so that it could demonstrate more effectively how Elm can be used in a project.

If you are interested in Elm, and want to get a feeling of how it could be built for your apps, this might be a good starting point. I even wanted to add a single test to show how it could be done. But Elm being such a fun, predictable, opinionated, and fun (no mistake here, it deserves the double fun) to work with, I ended up adding more and more tests.
Isn’t that yet another great sign for Elm? I was adding unit tests for a demo app, while we hardly added any unit tests for our Angular apps in production!

I held myself back from adding too many features, but I couldn’t resist polishing the existing ones, and adding lots of comments. With the compiler’s tough love and ever growing unit tests, changes were
so easy it almost felt like cheating (and note that I rarely write “easy” or “trivial” about development issues).

Continue reading…