Re: [elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-23 Thread Nick H
> > My issue is in fact related to mutually recursive types, it's just that my > types are truly infinite. According to the linked doc about recursive types: > "Somewhere in that cycle, you need to define an actual type to end the > infinite expansion." Which mine does not. That's just what I

Re: [elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-23 Thread John Kelly
To my knowledge, the recursive type that you specified *will* compile. See here . My issue is in fact related to mutually recursive types, it's just that my types are truly

[elm-discuss] Re: How to write function that updates arbitrary element of a record

2016-10-23 Thread Leroy Campbell
I think I have something close to what you're looking for, but my solution makes me wonder, *why store text in your model rather than the parsed float/int values?* It seems like you want the parsed values for a calculation, not to format a paragraph of text. update : Msg -> Model -> Model

Re: [elm-discuss] Taking over the DOM in WebGL

2016-10-23 Thread Rudi Chen
This is possible, the folks at Figma are doing something similar to have a native-like editing experience on the browser. It's hard though, you'd be implementing a whole rendering engine to achieve that. For the more average application, it would restrict you to one-page apps, failures wouldn't

Re: [elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-23 Thread Nick H
I guess you weren't explicitly defining type aliases for those records. But still, I think you might be able to salvage the API if you wrap the records in union type constructors. On Sun, Oct 23, 2016 at 6:10 PM, Nick H wrote: > If you are trying to make a recursive

Re: [elm-discuss] Anyone using Firebase 3.0 with Elm 0.17?

2016-10-23 Thread Scott Mueller
Just a friendly bump and vote for Elm 0.18 and Firebase 3.0 support... Also happy to help with this. On Wednesday, August 17, 2016 at 4:29:49 AM UTC-7, Thomas Weiser wrote: > > I have sketched an API for an effect manager module and will discuss it > soon with you all. > > First I will target

[elm-discuss] Re: Problem with Html.Lazy

2016-10-23 Thread Frank Bonetti
I'd also like to hear way it was designed this way. I assumed that `lazy` would compare the argument *values*, not *references*. It appears to use `===` under the hood. In its current state, lazy is pretty much unusable unless the given argument is a String, Int, Float, Bool (in other words,

Re: [elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-23 Thread Nick H
If you are trying to make a recursive type definition, you need to use union types. E.G. This is not OK: type alias Session = { speaker : Speaker } type alias Speaker = { sessions : List Session } But this will compile. type Session = Session { speaker : Speaker } type Speaker = Speaker {

Re: [elm-discuss] Re: Metalinguistic abstractions over databases

2016-10-23 Thread John Kelly
I'm coming to the sad realization that an api like this is simply not possible: ``` session = resource "sessions" { id = int "id" , speaker_id = int "speaker_id" , start_time = string "start_time" , end_time = string "end_time" , location = string

Re: [elm-discuss] Looking for subcomponent example to learn from

2016-10-23 Thread Nick H
Hmm, I haven't used that library, so I won't be of much help. On Sun, Oct 23, 2016 at 11:57 AM, Brian Marick wrote: > > On Oct 22, 2016, at 7:56 PM, Nick H wrote: > > Which of these elements can fire events? Is the text at the bottom the >

[elm-discuss] Re: Pre-requisites for learning Elm?

2016-10-23 Thread OvermindDL1
Elm is definitely a front-end language for javascript so it does assume at least a little prior experience, at least with html/css and how they work if not javascript (depending on what you need to do). The class does not have those pre-requisites first? Is it Elm specific or just a generic

[elm-discuss] Re: Pre-requisites for learning Elm?

2016-10-23 Thread Mickey Vashchinsky
What course is it? On Monday, October 24, 2016 at 12:22:22 AM UTC+3, Razi Syed wrote: > > Hi everyone, I've never programmed before and in my first year course > we're doing Elm. The prof expects us to learn Elm on our own, and simply > does examples in class applying what he thinks we should

[elm-discuss] Pre-requisites for learning Elm?

2016-10-23 Thread Razi Syed
Hi everyone, I've never programmed before and in my first year course we're doing Elm. The prof expects us to learn Elm on our own, and simply does examples in class applying what he thinks we should have learned. Problem is, I'm totally lost. Some people are telling me you're supposed to know

[elm-discuss] Re: Elm GUI component library

2016-10-23 Thread Mickey Vashchinsky
You might find https://github.com/debois/elm-mdl interesting. On Wednesday, October 12, 2016 at 12:17:04 AM UTC+3, Casper Bollen wrote: > > I would love to use ELM as my client side language. However, a show > stopper at the moment is the lack of a decent ELM GUI component library. > >

Re: [elm-discuss] Looking for subcomponent example to learn from

2016-10-23 Thread Mark Hamburg
You may want to think in terms of "shared" data — e.g., the time or the fluid level — and "private" data — e.g., the animation data — and possibly some additional configuration data that doesn't change. Then you end up with type signatures like the following: view : Config -> SharedData ->

Re: [elm-discuss] Re: More on external "components"

2016-10-23 Thread Mark Hamburg
The project in question was Elm 0.16 based and we've moved on to other work so the details need some translation (which I will attempt to handle here), but the net was that it worked reasonably well with some caveats and hacks. The first problem is getting Dropzone.js to attach its logic to the

Re: [elm-discuss] Looking for subcomponent example to learn from

2016-10-23 Thread Brian Marick
> On Oct 22, 2016, at 7:56 PM, Nick H wrote: > > Which of these elements can fire events? Is the text at the bottom the only > place where the user can interact? > > If so, then the graphical elements up top can just be functions that take > whatever data is needed

Re: [elm-discuss] Re: Inter-Component Communication in 0.17

2016-10-23 Thread Erik Lott
If you need to communicate between 2 or more enclosed pieces of functionality/modules, you'll need to orchestrate that communication via their parent. Like I said, I regret posting the original solution that I did, since it was essentially circumventing the elm language. You should try to stay

[elm-discuss] Taking over the DOM in WebGL

2016-10-23 Thread Zane Hitchcox
Would there be any interest/way to just take over the dom rather than use diffing? Like, could we just control the screen directly using WebGL and eliminate the dom completely? I feel like this would be easy using Three.js, but no one has done it...am I missing something here? -- You received

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

2016-10-23 Thread Carlos Poon
@Birowsky - thanks for those keyboard shortcuts ! very useful. I'm not sure about Elm 0.17.1 but future versions may use elm-make with --debug, which you can add to your build script, i guess. I have setup a nice way of building any current .elm file in Webstorm, using File Watcher dialog,

Re: [elm-discuss] why no more primes on 0.18 ?

2016-10-23 Thread John Orford
For the record I loved using primes for the first time in Haskell - it gave me the feeling of doing maths again, but while programming : ) I agree with your '_' point. Perhaps it should also be nixed following your line of logic... But I love my underscore and forget variables also : / On Sun,

Re: [elm-discuss] Re: Inter-Component Communication in 0.17

2016-10-23 Thread António Ramos
Were does this all stand? can anyone post an example that all agree to understand the best way to Inter-Component Communication in 0.17 ?! 2016-10-22 18:26 GMT+01:00 Erik Lott : > You're such a jerk Richard :) > > > On Saturday, October 22, 2016 at 1:21:44 PM UTC-4, Richard

Re: [elm-discuss] why no more primes on 0.18 ?

2016-10-23 Thread Bob Hutchison
> On Oct 19, 2016, at 2:59 AM, John Orford wrote: > > I am coming around to the make things as easy as possible for newbs approach. > > Elm is a big jump for people coming from JS, every little helps, including > removing string syntax misinterpretations. > > Having

[elm-discuss] Re: Proposal: Rename case..of -> match..with

2016-10-23 Thread joseph ni
> The reason being that I believe the words better matches what the construct does. To me, `case x of` conveys *what* the construct does. It says, handle all the different cases/scenarios/possibilities of `x` as follows. Ties in nicely with the compiler msg: "You haven't handled these cases of