[elm-discuss] Re: Parallelism support in Elm

2016-11-13 Thread 'Rolf Sievers' via Elm Discuss
The Process documentation has a section on Future plans:

http://package.elm-lang.org/packages/elm-lang/core/4.0.5/Process

I believe actual parallelism in elm will take quite a while. Before it is 
implemented, the Elm community needs to think about “What would we use it 
for?” and use workarounds for a while. (E.g. do your heavy calculation in 
JS web workers and communicate over ports.)

Probably Robin asked “What would you use it for?” because of that. (Or he 
wants to make sure you didn't get hit by the 
http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem)


Am Sonntag, 13. November 2016 00:53:05 UTC+1 schrieb أحمد حبنكة:
>
> according to this 
>  
> question, 
> Elm doesn't support parallelism yet.  
>
>
> I know that right now the idiomatic way in JS (and in result Elm) is to do 
> concurrency instead of parallelism but I think in the future web workers 
> might become as idiomatic as AJAX or Promises.  
>
> Given that JS does now support it via web workers, I was wondering what 
> are the plans for adding Parallelism to Elm ?
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Re: Errors when using Chart.js in a port subscription

2016-11-09 Thread 'Rolf Sievers' via Elm Discuss
The lastest Elm Town Podcast did discuss JS interop and also mentioned 
waiting for the dom to update.

They suggest you wait for the next animation frame, then the DOM will be 
rendered. I guess that is what you want over waiting 50ms. I did a quick 
search on elm-package and found this one:

http://package.elm-lang.org/packages/fredcy/elm-defer-command/latest

I didn't try that myself yet, so treat my suggestion with a grain of salt. 
Maybe look for more info on animation frames yourself.


-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Pure Elm contenteditable rich text editor

2016-10-11 Thread 'Rolf Sievers' via Elm Discuss
If your users understand markdown, you could use markdown input and maybe 
even render a preview.

This is what I am doing for a project of mine. (This of course circumvents 
the problem of writing a rich text editor but might help with your original 
problem.)

Am Montag, 10. Oktober 2016 22:42:49 UTC+2 schrieb Bulat Shamsutdinov:
>
> Hello!
>
> I have aside project which I really want to write in Elm. That project 
> needs rich text edit (nothing fancy, just bullets and text styles).
>
> To my knowledge there is no solution to that task in Elm (which is a 
> bummer). And even ports require nasty hacks (according to previous 
> discussions here)
>
> Is there a way to implement that basic functionality using only Elm? 
>
>- Is it technically possible at the moment?
>- What approach would you suggest?
>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] A library for manipulating Font Awesome icons

2016-10-03 Thread 'Rolf Sievers' via Elm Discuss
Greetings everyone!

I am new to Elm and currently working on a small project using Font Awesome 
icons. I moved those icons to a separate library and coaxed elm-package 
into publishing it. The idea is to wrap the icons in an opaque Icon class. 
To insert it in your view use toHtml : Icon -> Html msg. Wrapping icons in 
an extra type has one key advantage: You can modify the intermediate icon 
before turning it into Html.


import FontAwesome exposing (Icon, toHtml)import FontAwesome.Icons as Fa

import FontAwesome.Modifiers as FaMod
myIcon =
  Fa.birthday_cake
|> FaMod.double
|> FaMod.rotate90
|> toHtml


The FontAwesome.Modifier exposes several Icon -> Icon functions which can 
be applied in a piping style.

http://package.elm-lang.org/packages/roSievers/font-awesome/1.0.0/



I would love some feedback on my first package!




For comparison, there are two other libraries currently offering Font 
Awesome as well.

jystic/elm-font-awesome

Gives vector graphics instead of html.


Fresheyeball /elm-font-awesome 
 

Well, I totally didn't anticipate that. When I started writing this 
announcement I wanted to copy in jystic/elm-font-awesome only to find out 
that a new package had popped up.

>From what I understand, this package skips the intermediate Icon type and 
directly returns a Html msg. I.e. it has no parallel to 
FontAwesome.Modifiers.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.