[elm-discuss] Re: IntelliJ (WebStorm) devs, how do you read the compiler errors?

2016-10-24 Thread Birowsky
@Keith I have just the man for that. My colleague uses Kotlin for the 
backend, this is how hard his life is:


hover over the 5:



So yeah, i envy this guy :}


@Carlos, Keith has nailed what i hope for in his comment, and is nicely 
depicted in the scrshots above. Thanx for your approach btw, I would 
definitely be trying it out.

@Joseph catching the errors on the preview screen is not bad, but i'm 
mostly on my laptop, so i would rather try to come up with something 
similar to what Carlos has going on for him self.


So i know we are far from what Kotlin has going on for it's users, but i 
still have hope that we might be able to utilize one of the many features 
intellij is offering. For example, I noticed this thing in external tools:



So there is a way to open the console only if it had spit out an error. Say 
we succeed in that (which would be so awesome), there is also the Output 
Filters Dialog 

 which 
reportedly lets you manage the output filters associated with an external 
tool. (The output filters are used to turn absolute file paths and line 
numbers in the tool output into hyperlinks.) It simply means that we could 
configure it link the compiler error line numbers to the actual line number 
in file.

Now I could try to come up with such configuration, but since I haven't 
done any serious IntelliJ tweaking, i would expect you guys to beat me to 
it.





-- 
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: How do you name messages?

2016-10-24 Thread Birowsky
Thanx for this discussion, fellas. I cannot fully digest it at the moment, 
but I'm sure I'll be coming back to this as I go.

-- 
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: IntelliJ (WebStorm) devs, how do you read the compiler errors?

2016-10-25 Thread Birowsky
Thanx to you guys, I'm so close to what I wanted to do.

I have summed up my findings 
here: http://stackoverflow.com/q/40240254/592641
Hop on if you have an idea!

Carlos, sorry, i'm not sure what are you doing inside ESLint : ) please 
elaborate your discoveries.

-- 
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: How do you name messages?

2016-10-21 Thread Birowsky
Well, they leaned towards the second approach. The reason was: *what if 
that action is not possible*. 

What if on SubmitForm, instead of sending the registration form, the app 
would need to display validation errors? 

I see that ambiguity. But from this perspective, it doesn't seem like a 
burden to me. 

I would, however, like to know where do experienced elm devs lean on. Does 
the first approach cause ambiguity when working in a team?

-- 
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] How are you handling images references in Elm with Webpack?

2016-11-13 Thread Birowsky
I'm trying to make Elm work with images through Webpack. 

Here's my first struggle: http://stackoverflow.com/q/40580968/592641

How do you configure Webpack to rename the images references in the 
compiled elm js with the appropriate hashes? 

Just.. how do you work with images and webpack? :}

-- 
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] Managing global state in Elm

2016-12-12 Thread Birowsky
Erik, Mark, thanx a ton for your responses!

Erik, I was using that approach solely for the views but you made me think 
how I might do it in the updates too, which from here, seems like quite the 
prettification.  Thanx for that!

Mark, wow, thanx for the effort. If you could believe it, I built the whole 
thing. It was uber complicated considering it's one of the few things i've 
done in elm. There is so much plumbing and routing, in order to add a 
single api endpoint, i need to touch the codebase in exactly 8 places :}

I still don't whine tho. The good parts of Elm outshine any crap. I'm off 
to my next challenges. 

Have fun, communitymates!

-- 
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] Managing global state in Elm

2016-11-30 Thread Birowsky
Hey Eric, please elaborate on this one. How do you envision leaf component 
triggering global state update?
 

> The second problem becomes: *how do we load this global state/business 
> data into the application and cache it?* This requirement is now fairly 
> easy to wire-up in elm since the http requests and data cache all live at 
> the same level of the application (the top level). If anyone wants more 
> details on how to do this, let me know.
>

 

-- 
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] Managing global state in Elm

2016-12-02 Thread Birowsky
The problem i see with this approach is that in hierarchy of deeply nested 
components, the whole ancestry would need to know about the intention of the 
leaf. I was hoping towards more of a command-like approach.


> On Dec 2, 2016, at 14:45, Erik Lott <mrerikl...@gmail.com> wrote:
> 
> Birowsky, your leaf component will need return messages to the parent, and 
> the parent can act on those messages to update it's state. There's no magic 
> to it unfortunately. Do you have a specific problem you're trying to solve?
> 
> On Wednesday, November 30, 2016 at 12:04:08 PM UTC-5, Birowsky wrote:
> Hey Eric, please elaborate on this one. How do you envision leaf component 
> triggering global state update?
>  
> The second problem becomes: how do we load this global state/business data 
> into the application and cache it? This requirement is now fairly easy to 
> wire-up in elm since the http requests and data cache all live at the same 
> level of the application (the top level). If anyone wants more details on how 
> to do this, let me know.
> 
>  
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Elm Discuss" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/elm-discuss/j-Wa6NGiYUM/unsubscribe 
> <https://groups.google.com/d/topic/elm-discuss/j-Wa6NGiYUM/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> elm-discuss+unsubscr...@googlegroups.com 
> <mailto:elm-discuss+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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: Need help with Polymer inconsistencies with Elm vdom

2017-01-06 Thread Birowsky
It's actually true, Rupert. Earlier with Josh from daily drips we 
discovered that adding  gives it a place to put the light-dom. 

I haven't mentioned it yet, because it only works for shady dom if NO shady 
dom is being used :/ 

Simply put, the template must look exactly like this 
.

It's not such a bummer since i can simply compose the reusable dom within 
Elm and I haven't had issues with shady dom, I'm just afraid what other 
Elm/Polymer inconsistencies are there..

-- 
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] Need help with Polymer inconsistencies with Elm vdom

2017-01-06 Thread Birowsky
Given:

swiper =
 div []
 [ node "swiper-node"
 [ class "block" ]
 [ div [ id "swiperContainer" ]
 [ div [ class "swiper-wrapper" ]
 [ div [ class "swiper-slide", style [ ( "height", 
"400px" ), ( "background", "gray" ) ] ] [ text "slide1" ]
 , div [ class "swiper-slide", style [ ( "height", 
"400px" ), ( "background", "gray" ) ] ] [ text "slide2" ]
 , div [ class "swiper-slide", style [ ( "height", 
"400px" ), ( "background", "gray" ) ] ] [ text "slide3" ]
 , div [ class "swiper-slide", style [ ( "height", 
"400px" ), ( "background", "gray" ) ] ] [ text "slide4" ]
 ]
 ]
 ]
 ]


 
   
 
   
   
 
   
 (function () {
   Polymer({
 is: 'swiper-node',
   });
 }());
   




The rendered HTML is:



Notice the empty `swiper-node`.

The interesting thing is that this happens when the app starts AND `swiper` 
is IN the Elm dom.

However, if
- the app starts
- AND the `swiper` is NOT in the elm dom
- AND on some user event, the `swiper` is added to the elm dom
- it’s rendered correctly





After going through this 
thread: 
https://groups.google.com/forum/#!msg/elm-discuss/8Q2xwRh6UYc/tGem48QjAQAJ 
I did the same configuration of:

 window.Polymer = {
   dom: 'shadow',
   lazyRegister: true
 };

And in both cases:
- app starts with `swiper`
- `swiper` is added later

here is the rendered HTML:





Altho we've reached consistency, the `swiper-node` is not being rendered. U 
know how when you hover a dom element in the inspector, it highlights in 
the render window? Well, hovering on any of the  `swiper-node` children, 
shows nothing.

I'm only utilizing Polymer abstraction/component so i can utilize a js 
library in a nice way. So don't assume great Polymer or web-components 
knowledge on my end.


-- 
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: Need help with Polymer inconsistencies with Elm vdom

2017-01-06 Thread Birowsky
If anyone's hungry for points, here's a Stack Overflow 
version: http://stackoverflow.com/q/41510541/592641

-- 
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] Calling window.open through port

2017-04-08 Thread Birowsky


I'm implementing social auth. When the user clicks on a button, I send a 
command so I can call window.open().

Looking at this call-stack, we can see that the port handler is called in 
the next event: [image: enter image description here] 


Since window.open is not being called within the click event lifecycle, 
browsers like safari do not allow for the popup to show up. 

What is your approach?
I've got some upvotes for you if you can help 


-- 
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] ADT: How to know whether two values have the same constructor?

2017-07-17 Thread Birowsky
That's not so bad. But the compiler wouldn't be able to nudge me to add a 
new comparison when I add a new constructor in the Bla union.

Thanx anyways.

-- 
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] ADT: How to know whether two values have the same constructor?

2017-07-16 Thread Birowsky
Given:

type Bla = A Int | B Int
valA1 = A 1
valA2 = A 2


Is there a way for me to check whether `valA1` has been constructed with 
the constructor of `valA2`?

-- 
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] ADT: How to know whether two values have the same constructor?

2017-07-18 Thread Birowsky
I agree. Here it goes:


type Route 
  = Route1 SubRoute1
  | Route2 SubRoute2


Routes are coming into the app. I want to detect when the base route 
changes. Example, from Route1_, to Route2 _.

(This is part of solution to a challenge where I need to keep the scroll 
position of a list view upon a navigation to one of it's list items, so 
that when the user goes back, he's faced with the same scroll position. The 
approach that I'm taking is by not destroying the list view in the first 
place. Problem there is that there might happen a buildup of multiple list 
views causing memory pressure, so we still need to decide when is a good 
time to destroy the list view. The way I rationalize: if after the list 
item navigation, the user makes another base navigation, he doesn't care 
about the scroll position of the list view. Ergo,  I want to detect when 
the base route changes. You can check out this behavior in the list views 
in Dscova . I took a different 
approach where I'm tracking the routes history.)

-- 
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] ADT: How to know whether two values have the same constructor?

2017-07-18 Thread Birowsky
Petre, give it to me straight. Is the potential deprecation of toString the 
only drawback to this approach? We need to be pragmatic here :}



-- 
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] On producing production product

2017-06-07 Thread Birowsky
Sup team, I just poured my feelings towards Elm on Medium:

Web is ready for you on line Elm 
<https://medium.com/@birowsky/web-is-ready-for-you-on-line-elm-d3aa14dbf95>



-- 
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: On producing production product

2017-06-13 Thread Birowsky
Sorry Berry, I was too busy enjoying Elm Europe. I offer my thanx for your 
kind words. If you were there, I would've bragged to your face all day long 
xD

But yeah, it's a client project, so the source is a top secret of a 
multi-national value. 

About the PWA specific patterns, I would point out that they are not 
related to Elm. They are specific to the platform. But please don't think 
twice to ask anything specific about it. For example, for the toaster 
notifications we use Firebase Cloud Messaging. So as they come through, we 
just send them to the Elm app through port, from where, our custom toaster 
takes over:


  navigator.serviceWorker.addEventListener('message', ({data}) => 
newNotificationPort.send(data));





Christian, we gonna make a joke out of the "Javascript Fatigue" aren't we.

-- 
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: Elm as templating engine

2017-09-03 Thread Birowsky
Unfortunately, it just adds `=""`. You can't see it in the dev tools 
because the browser strips it away.

Now, while the validation passes with empty string as a value, what 
frightens me, is that the AMP docs state that the online validator is not a 
complete validation and some errors would surface only after google crawls 
the content. I swear I read it somewhere in the official docs, I'll update 
when I find it :}

-- 
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] Elm as templating engine

2017-09-02 Thread Birowsky
Trying to use elm as a templating engine for AMP pages. But they have 
specific requirements where I need to specify attributes without values. Is 
that possible with some elm construct?

https://www.ampproject.org/docs/tutorials/create/basic_markup

for an example:

amp =
boolProperty "⚡" True


creates `⚡="true"` instead of just the `⚡`

-- 
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: Elm as templating engine

2017-09-05 Thread Birowsky
Yap, that's the route I took. If you don't hear back from me, it means 
Google has not complained :}

-- 
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.