[elm-discuss] Scrolling to bottom of div

2016-07-18 Thread Wayne Choi
I want to scroll down to the bottom of a div for, what else, a chat app. Right now I'm using element.scrollTop = element.scrollHeight and it works fine with just javascript and html. Once I port the div to Elm, however, the function doesn't scroll all the way down. Am I missing something with

Re: [elm-discuss] Re: html formatting words in string

2016-07-18 Thread Wayne Choi
Yeah, it took me a bit to get my head around it but I really appreciate how elegant the solution is. On Sunday, July 17, 2016 at 7:32:59 PM UTC-7, Max Goldstein wrote: > > I'll jump in here and say that this is one of the things I really like > about Elm views. Instead of needing to learn some

[elm-discuss] Re: How do I organize "inheritance" between my data types?

2016-07-18 Thread Evan
Both Max and Aaron PS suggested using extensible records for this scenario, but I don't think that is the right way to go. It is particularly tempting for folks who want Elm to just work like an OO language, but it isn't like that. I think Tessa put it very nicely in her post

[elm-discuss] Re: How do I organize "inheritance" between my data types?

2016-07-18 Thread Leroy Campbell
It may help to watch this talk on modeling from a functional programming perspective (features F#, but applicable to Elm since they both are ML-based): https://vimeo.com/162036084 On Sunday, July 17, 2016 at 7:06:32 PM UTC-4, Leonardo Sá wrote: > > Short question: > > What is the best way to

[elm-discuss] Re: Port Error

2016-07-18 Thread Leroy Campbell
I recreated your example without issue, so I wonder if there is another problem. Here's a fork of your gist: https://gist.github.com/artisonian/11e93321cd7fd108142115269cbeafe7 On Monday, July 18, 2016 at 4:40:06 AM UTC-4, Zachary Kessin wrote: > > I am having a strange problem with ports, I am

Re: [elm-discuss] What is the Elm-way to update a nested record field?

2016-07-18 Thread Peter Damoc
If you talk about explicitly updating each level then yes, that's still the best approach. You break your models into components and update each component as per Elm Architecture. If you talk about Focus, then no, I have not seen that really used. you could do update functions like this:

Re: [elm-discuss] Re: Svg.image not showing when embedded inside HTML

2016-07-18 Thread Peter Damoc
Wow, changing attribute "xlink:href" imgData to xlinkHref imgData solved the issue. Which was a little bit weird because the output code looks identical. With this occasion I also found out about attributeNS, which might come in hand. ;) Thank you Iwan! On Mon, Jul 18, 2016 at 4:43 PM,

[elm-discuss] Re: Trying to understand the community overlap between Elm and Elixir

2016-07-18 Thread Rex van der Spuy
> > Can someone help clarify why Elixir is appealing to Elm developers > specifically (as opposed to Elixir being appealing on its own merits)? > Actually, Elm is appealing to Elixir developers, not the other way around ;) A lot of the talk you see around Elixer in Elm's discussion forums

Re: [elm-discuss] Port Error

2016-07-18 Thread Duane Johnson
Where is `subs` coming from? I see it used in the onEffects function, but I don't see its definition. On Mon, Jul 18, 2016 at 2:40 AM, Zachary Kessin wrote: > I am having a strange problem with ports, I am trying to send a list of > data through the port (see gist) and I it

[elm-discuss] Re: Svg.image not showing when embedded inside HTML

2016-07-18 Thread Iwan Birrer
Hi Peter, Have you got a specific reason to use VirtualDom directly? If not, here is a version that should work, which is not using VirtualDom: https://gist.github.com/ibirrer/1ab87a2e9b0acad6976a06a3a8a76bff Am Montag, 18. Juli 2016 13:18:10 UTC+2 schrieb Peter Damoc: > > Hello kind people,

[elm-discuss] Svg.image not showing when embedded inside HTML

2016-07-18 Thread Peter Damoc
Hello kind people, I've been struggling with an issue and maybe one of you has an insight on what else could I try. Here is the SSCCE: https://gist.github.com/pdamoc/53a312e7bb3d08b256a2afb3a584661f *The problem:* I try to display an image embedded as base64 inside a SVG (the final purpose is

[elm-discuss] Port Error

2016-07-18 Thread Zachary Kessin
I am having a strange problem with ports, I am trying to send a list of data through the port (see gist) and I it is giving me a runtime error. Actually it seems to have nothing to do with the data, as I am trying to send a string through a different port in the same file and getting the same