Profile cover photo
Profile photo
Filip Hráček
7,899 followers -
Google employee in the Dart team; gamebooks and pancakes enthusiast
Google employee in the Dart team; gamebooks and pancakes enthusiast

7,899 followers
About
Filip's posts

Post has attachment
Moje daňové přiznání pro stát Kalifornie má 63 stran, a federální má 72 stran. Třeba vám to zvedne náladu, až si příště budete vzdychat nad růžovým formulářem.

Viz také https://plus.google.com/u/0/+filiphracek/posts/dnMo4J1tTk6

Post has attachment
Randal Schwarz¹ gives a lightning talk at The Perl Conference — and recommends that everyone learns Dart.

___
[1]: https://en.wikipedia.org/wiki/Randal_L._Schwartz

Poznávací značka kabrioletu přede mnou dnes cestou z práce: BE BALD.

Slovní hříčka pobavila, stejně tak jako to, že majitel vozidla se vlastního doporučení držel. 

Post has shared content

What's the TodoMVC of mobile apps nowadays?

In other words, what kind of app should an upcoming mobile SDK have among its samples that isn't a complete "Hello World" yet allows basic comparison with other SDKs?

Post has attachment
3-4 p.m. Chat with a Czech

Do Nebrasky to mám daleko, ale tahle konkrétní část programu mě hodně láká.
Photo

Post has attachment
Pro zajímavost: takhle to vypadá, když si uživatel z USA chce pustit českou pohádku.

To jen kdyby měl někdo pocit, že tyhle věci platí jen jedním směrem. 
Photo

Post has attachment
I made a tool that takes a command line Dart app and lets you create a single executable file for all platforms that Dart VM supports: https://github.com/filiph/dartbin

I took inspiration from this npm package: https://www.npmjs.com/package/enclose

Here's how it works (don't faint):

* Build a snapshot file
* A Dart script (in bin/main.dart) creates a Go package that includes the dart executable and the snapshot in their entirety as data (2 huge lists of bytes).
* Compile that package into any platform supported by the Go compiler

Running the script
* Creates a temporary directory in /tmp (or equivalent per OS)
* Copies the bytes to two files, `dart` (the VM executable) and `exe.snapshot` (the snapshot)
* Executes `dart exe.snapshot [args]`, piping stdin, stdout and stderr and holding the exit code
* Removes the temp directory
* Exits with exitcode

This is not different from what the aforementioned npm package does (except that one probably has some form of caching of the files, so next time you run, you skip building up the directory — it's easy to add this, though). I checked and it's also how many other 'single executable' files work under the hood.

It runs reasonably fast (0.331s to execute linkcheck without arguments, versus 0.289 when run directly). The executable is large (12MB for linkcheck) but not prohibitively so.

This is obviously very ugly, no argument about it. But afaik it's the only way Dart developers can share their command line tools without requiring manual steps on the receiving side.

This was an evening project. With a bit more love, the process could be way less manual. You'd just provide a package and you'd get 6 standalone executables.

The question is: would anyone actually use those? Or is it better to do something like that, but instead of a standalone executable, build an npm package (which seems to be the de-facto 'apt-get' of the current era)?


Post has shared content
Oh great, robots now fear human children.

Post has attachment
I finally built myself a homepage that lists all of my projects and experiments. The previous version was 7 years old, only in Czech, and hosted from an ancient FTP.

Bonus points: it's just 2 files (HTML + JPG), it's built and deployed by travis-ci.org, and it's mobile friendly.
Wait while more posts are being loaded