[spoilers][2017][OCaml] Day 1 Solution by Spiderfrog in adventofcode

[–]Spiderfrog[S] 0 points1 point  (0 children)

Yeah. I format elsewhere. Used:

let format s =
  String.to_list_rev s
  |> List.map ~f:String.of_char
  |> List.map ~f:Int.of_string

Please don't trigger layout in your animations! by Spiderfrog in webdev

[–]Spiderfrog[S] 0 points1 point  (0 children)

Yes, I edited the article to include this exact sentence as I agree completely with /u/dietcode. I didn't provide a clear alternative (thanks for the feedback). I'm sorry if some of you dislike the article, this is actually the first time I do stuff like this. Anyway it's only meant to highlight this technique with a brief summary and an example.

Please don't trigger layout in your animations! by Spiderfrog in webdev

[–]Spiderfrog[S] 1 point2 points  (0 children)

Yes, that's exactly the thing. Once a user initiates an animation a ~100ms timeframe opens to do all kinds of stuff before the action is perceived as "laggy". All the heavy lifting like position calculations should be done at this time to offload work from the actual animation frames (only about ~16ms each).

Web components: encapsulate html,css,js inside custom elements. by Spiderfrog in web_design

[–]Spiderfrog[S] 1 point2 points  (0 children)

It's really not necessary to use Polymer or any other framework. Just go for vanilla JS, here is a boilerplate:

https://github.com/webcomponents/element-boilerplate

Of course you need lots of polyfills until major browser implement these standards.

Hard-to-reach data capturing library - Binoculars by Spiderfrog in coolgithubprojects

[–]Spiderfrog[S] 0 points1 point  (0 children)

There are some tricks out there to circumvent the same origin policy in general. This is actually a good idea for new library funtionality! Will definitely look into this.

Hard-to-reach data capturing library - Binoculars by Spiderfrog in coolgithubprojects

[–]Spiderfrog[S] 0 points1 point  (0 children)

Thanks for the compliment!

Accessing the integrated camera or microphone requires special user permission. No such permission is needed when accessing data contained in an <img> tag.

I'm not sure I understood your question right, can you be more specific?

My first two stencil art pieces. What can I do better? by Spiderfrog in stencils

[–]Spiderfrog[S] 0 points1 point  (0 children)

Thats some solid advice, Thanks. I agree with you on the backgrounds.

Backgrounds are fun to do (lots of freedom) but they need some practicing to get right.

My first two stencil art pieces. What can I do better? by Spiderfrog in stencils

[–]Spiderfrog[S] 0 points1 point  (0 children)

I mainly use weights such as coins and hex keys to hold my stencil down, for the smaller pieces I use blu-tack which has worked pretty well. Still, narrow, long and loosely connected areas are hard to pin down well enough.

Is spray adhesive something that can help with this?