Re: [elm-discuss] Re: elm first impressions (and frustrations)

2016-07-31 Thread nrser
thanks dude.

i read a considerable amount more before going sleep last night...
checked out the compiler repo (which has a much more clear description
of elm - "Elm is a type inferred, functional reactive language that
compiles to HTML, CSS, and JavaScript.") and played around with trying
to compile something i could use from js (didn't seem possible).

i think the conceptual architecture is fantastic. i've been down the
road you talk about... managed large products with javascript /
actionscript UI front ends... the state management was a disaster.
constant source of bugs, which at the scale we were operating translated
into very serious amounts of lost time and money.

the canonical source of truth and well-defined states and transitions is
*fucking awesome*. revolutionary. and i really like the idea of using a
functional, type-safe language.

but...
 1. too narrow of a scope. unless you already know Haskell (and most
people don't) you're learning an unfamiliar language that can only
be used in exactly one part of the stack and will need to constantly
context switch in and out of it. in my opinion, the major advantage
to universal javascript is despite js being such a POS language
(thought babel has significantly eased this pain) cutting out this
context switch. seems like logic would also need to be duplicated in
elm and the back-end language as well, which has been a source of
bugs in my experience.
 2. seem all-or-nothing - my front-end is either in Elm or it's not? i'm
not sure i can ease it in slowly and partially. if you have a rails
app or other traditional "fat-server" app this is probably not that
big of a deal because you can keep the server portion, serve api end
points, and re-write the client stuff in elm (though that alone is a
huge amount of effort and risk), but everything i'm dealing with is
already js on both sides.
 3. i'm not really sure about any of that though, because i couldn't
find any full-app or moderately complex examples to look at.
 4. it doesn't seem like interop goes the other way. i compiled a simple
module elm and took a look at the source... didn't seem setup to use
from javascript. i would love to write core libraries in something
like elm and use them from javascript by also requiring the runtime.
 5. react has a mobile story.
 6. redux (what my company is currently using) might be *good enough*.
redux is also really green and takes considerable work to understand
adapt to significantly complex apps but it plugs right in besides
whatever you've already got going.

i really wish there was a full-stack started kit. i just don't have the
bandwidth to put the rest together right now to take it for a real spin.
if i find the time to come back to it and put something together i'll
def share it with the community.

On Sun, Jul 31, 2016, at 20:56, Nathan Schultz wrote:
> Hi Neil, I'm an Elm beginner as well, but I've been enjoying it
> thus far.
>
> Elm is a programming language which currently compiles to JavaScript
> (along the lines of TypeScript, CoffeeScript, Dart, ClojureScript,
> PureScript, etc).
> It is primarily geared towards front-end web-development.
>
> Like any good programming language, it has a "Framework": a set of
> core and optional libraries (called 'packages' in Elm), which aid in
> development. React, Angular, etc, are JavaScript frameworks.
>
> Elm is also a philosophy called 'The Elm Architecture' (TEA). It is a
> pattern that naturally evolved out of using Elm, which provides a
> clear and succinct way of solving problems and taming complexity. This
> is similar to React's Redux.
>
> So why Elm? Ultimately, it is trying to tame the 'maintainability'
> nightmare, which is JavaScript. If you've ever seen enough large
> JavaScript projects, without the up-most discipline, you'll understand
> that JavaScript code can become almost undecipherable. Even with the
> aid of JavaScript frameworks, such as Angular, it can be painful
> adding new features to a complex user-interface, as fixing one thing
> seems to break a dozen. Elm on the other hand manages complexity by
> better managing "state" changes (which is what Redux does for React);
> which essentially makes even complex projects easy to reason about,
> easy to change, and easy to add new features without fear. Elm goes
> beyond where Redux does in making your programs reliable - because it
> doesn't suffer from many of the 'warts' of the JavaScript language
> (such as no type safety, no null-based errors, impure functions, etc).
> Essentially Elm programs are reliable - if it compiles, they usually
> just work with no 'run-time' bugs. Elm is also designed as an easy
> language to learn - and in fact I've seen some projects created by
> school children.
>
> On the down side, Elm is not fully mature yet; there are breaking
> changes with each new release. But the language developer, Evan
> Czaplicki, is making a 

[elm-discuss] Setting expectations for Elm development

2016-07-31 Thread Max Goldstein
I'd like to take a few moments to address something I've seen in a few 
threads recently.

I think there might be scope for syntax reduction
>
 

> I suggest having some basic checks in the compiler for these areas where 
> special care should be taken.
>
 

> it is a bit of extra noise having to add that wrapper


I admire everyone's enthusiasm for Elm and that you're pushing the 
boundaries of what you can do with it. But I'd like to emphasize a few 
things.

*Elm is a young language.* The shortcuts and alternate syntaxes you'll find 
in mature languages like Ruby don't exist yet. Evan has been reluctant to 
add them since they're quite hard to remove (see Python 3), and he's said 
that "when you release a feature is part of the feature". Expect to find 
pain points and bugs. Expect to write a few shell scripts to orchestrate a 
large project, rather than have command line tools with dozens of options.

*Elm is a small and explicit language.* It's far simpler than HTML5-era 
JavaScript, much less ES6. As Joey pointed out in another thread, it's 
likely that "the complexity [a new feature] adds outweighs the brevity it 
adds". Elm favors boilerplate over magic. Sometimes code is repeated rather 
than being implicit.

A key corollary to the above is that *there is one Elm. *We don't have 
development and production environments like Rails. We don't have a config 
file like PHP. This makes code much more portable (think libraries) and 
lowers the barrier to entry. I've seen people ask for a way for their code 
to distinguish between dev and prod, and that's been taken care of by 
*programWithFlags*. Which brings us to...

*Elm development is driven by use cases.* What do you want to do, that is 
useful in a context outside the language itself, that you can't do now, or 
that relies on ports to do now? We don't respond to "I want to code this 
way" or "this would be a neat feature" or "why isn't everything a 
component?". We respond to, "I can't determine the size of this div" or "I 
can't set the focus on the element I want".

I wish there was a way to say this without getting up on the soapbox, but I 
hope our eager contributors can really internalize these ideas and make 
great things in 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: Uncaught TypeError: Cannot read property 'tag' of undefined

2016-07-31 Thread Duane Johnson
Cool bug find :) Is it tracked on
https://github.com/elm-lang/elm-compiler/issues ?

On Sun, Jul 31, 2016 at 3:01 AM, Aditya Vishwakarma <
blackleopar...@gmail.com> wrote:

> Hi
>
> So I dug deeper into this issue. turns out that the JS code for my port
> module was being emitted before the JS of Json.Decode module.
>
> After some research, I found that if the project's port module has:
>
>- Name beginning with a letter before J, and
>- does not have a declared dependency on Json.Decode
>
> Then the elm compiler will emit the port module code before `Json.Decode`
> which causes all decoders to be `Undefined`. This results in all user
> defined incoming ports to stop throw exceptions.
>
> SSCCE: https://github.com/adityav/elm-ports-issue
>
>
> On Friday, 29 July 2016 02:27:41 UTC+5:30, Aditya Vishwakarma wrote:
>>
>> Hi
>>
>> I am getting Uncaught TypeError: Cannot read property 'tag' of undefined
>> in a sample code I built to tryout elm. The error happen when I send JSON
>> data across the elm port from JS side.
>>
>> Port defn:
>> https://github.com/adityav/elm-reddit-listing/blob/master/src/AppPorts.elm#L14
>> JS call which causes this issue:
>> https://github.com/adityav/elm-reddit-listing/blob/master/src/index.js#L36
>> git repo: https://github.com/adityav/elm-reddit-listing
>>
>> To run. Simply do
>> npm install && elm package install
>> npm start
>>
>> and open http://localhost:8080/. A listing of /r/elm should show up when
>> the app works.
>>
>> A screenshot of the exact location where the error occurs:
>>
>>
>> 
>>
>> People on slack recommended me to remove elm-stuff/build-artifacts and
>> try again. It didn't work so I removed node_modules and elm-stuff
>> directories and reinstalled the whole thing. Didn't work as well.
>> The code was working before I decided to clean it up a little to show to
>> my teammates. Stopped working the moment I shared the github link with
>> them. :|
>>
>> anyone got any ideas on this?
>>
> --
> 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.
>

-- 
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] Elm Jobs Board

2016-07-31 Thread Noah Hall
#jobs on the slack channel. http://elmlang.herokuapp.com/

On Mon, Aug 1, 2016 at 1:17 AM, Joey Eremondi  wrote:
> Advertising jobs, this is probably the best place, though you'll probably
> get good feedback on reddit.com/r/elm as well.
>
> You can look for jobs here, but Elm is *very* new. I'm sure there are a few
> people hiring Elm developers, but I doubt there are many specifically
> looking for Elm people.
>
> On Sun, Jul 31, 2016 at 4:34 AM, Andre Bolle  wrote:
>>
>> Is there a place where people can advertise and look for Elm jobs?
>>
>> Andre
>>
>> --
>> 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.
>
>
> --
> 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.

-- 
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] Elm Jobs Board

2016-07-31 Thread Joey Eremondi
Advertising jobs, this is probably the best place, though you'll probably
get good feedback on reddit.com/r/elm as well.

You can look for jobs here, but Elm is *very* new. I'm sure there are a few
people hiring Elm developers, but I doubt there are many specifically
looking for Elm people.

On Sun, Jul 31, 2016 at 4:34 AM, Andre Bolle  wrote:

> Is there a place where people can advertise and look for Elm jobs?
>
> Andre
>
> --
> 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.
>

-- 
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 first impressions (and frustrations)

2016-07-31 Thread Neil Souza
it seems like a language combined with a client-side framework... something 
you might use in place of React and Redux (or Angular or what-have-you).

i'm checking it out because i've had some companies i advise ask what i 
think of it and if they should look into using it. i'm detailing the 
experience here because i thought it might be a valuable perspective for 
the developers and community, and because the responsiveness of the 
community and developers is an important aspect of that evaluation. seems 
like people here are very active and helpful, which is great. thanks :)

if anyone involved in the project is reading this, it would be great if 
there was some clear copy to the home page that explains what elm is (and 
what it isn't). it jumps into features before i really understand what it 
is. "use this instead of React / Redux" would make it very clear what i'm 
looking at.

everything i've seen so far is for the web client. that means you need to 
plug in the rest of the stack. i'd like to see how it integrates; that's 
why i asked about a full-app example.

since it compiles to js i would guess it can be employed isomorphically (or 
"universally" or whatever we're calling it these days). it would be great 
to see how that lays out. pipeline and tooling are really important there. 
the amount of effort and complexity in initial setup and during iterative 
development are major considerations.

i know it's a very new technology, but it would be great to have some 
information on where it's going and what it aims to be. you said that it's 
client-only "currently"... is the goal to become a full client-server 
framework?

On Monday, August 1, 2016 at 4:52:25 AM UTC+8, Nick H wrote:
>
> Elm is a programming language. Currently it is for client-side (browser) 
> use only. So there is no server or db persistence layer. "elm-make --output 
> elm.js" compiles your elm program to JavaScript, so that it can be embedded 
> in a web page.
>
> You can learn how to use Elm by following this guide 
> .
>
>
>
> On Sun, Jul 31, 2016 at 1:27 PM, Neil Souza  > wrote:
>
>> ok, npm install worked.
>>
>> cloned the todo example, cd into the directory and ran `elm reactor`.
>>
>> opened up http://localhost:8000, see the list of files.
>>
>> clicked on `Todo.eml` and got a blank page.
>>
>> ok, get out of reactor, run `elm-make Todo.elm --output elm.js` and open 
>> `index.html`.
>>
>> todo example is working now, but i'm just pointing to a file in the 
>> client.
>>
>> what is elm? http://elm-lang.org/ doesn't really explain much. i thought 
>> it was a framework... is it just a transpiler?
>>
>> where can i get an app example with server, client and db persistence?
>>
>>
>> On Monday, August 1, 2016 at 3:06:28 AM UTC+8, Neil Souza wrote:
>>>
>>> ok, i wanted to take elm for a spin after hearing and reading about it.
>>>
>>> searched for "getting started" and found my way to the install 
>>>  page.
>>>
>>> i'm on OSX... ok, no package manager options. that's an issue since i 
>>> manage teams of developers and work on multiple machines and use 
>>> configuration management software to keep everyone and everything in sync.
>>>
>>> ...and the download is not served over https. i live in China so running 
>>> executables downloaded insecurely is a big no-no (and it probably should be 
>>> everywhere). change the url to https and the page doesn't even load. i'm 
>>> confused.
>>>
>>> alright, some searching led me to
>>>
>>> https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660
>>>
>>> i've got cabal installed, and i'll just assume that it fetches packages 
>>> securely.
>>>
>>> $ cabal update
>>> Downloading the latest package list from hackage.haskell.org
>>> Skipping download: Local and remote files match.
>>>
>>> $ cabal install elm
>>> Resolving dependencies...
>>> Configuring Elm-0.12.3...
>>> Building Elm-0.12.3...
>>> Failed to install Elm-0.12.3
>>> Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
>>> Configuring Elm-0.12.3...
>>> Building Elm-0.12.3...
>>> Preprocessing library Elm-0.12.3...
>>> [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
>>> build/Generate/Html.o )
>>> [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs, 
>>> dist/build/Generate/Markdown.o )
>>>
>>>
>>> compiler/Generate/Markdown.hs:7:41:
>>> Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
>>>with ‘Pandoc’
>>> Expected type: String -> Pandoc
>>>   Actual type: String
>>>-> Either Text.Pandoc.Error.PandocError Pandoc
>>> In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
>>> In the expression:
>>>   writeHtmlString writeOptions . readMarkdown readOptions
>>> cabal: Error: some packages failed to install:
>>> Elm-0.12.3 failed during the building phase. The exception was:
>>> ExitFailure 1
>>>
>>> 

Re: [elm-discuss] elm first impressions (and frustrations)

2016-07-31 Thread Janis Voigtländer
Ha, Nick. Nice opening statement. :-)

And rest of message.

Am Sonntag, 31. Juli 2016 schrieb Nick H :

> Elm is a programming language. Currently it is for client-side (browser)
> use only. So there is no server or db persistence layer. "elm-make --output
> elm.js" compiles your elm program to JavaScript, so that it can be embedded
> in a web page.
>
> You can learn how to use Elm by following this guide
> .
>
>
>
> On Sun, Jul 31, 2016 at 1:27 PM, Neil Souza  > wrote:
>
>> ok, npm install worked.
>>
>> cloned the todo example, cd into the directory and ran `elm reactor`.
>>
>> opened up http://localhost:8000, see the list of files.
>>
>> clicked on `Todo.eml` and got a blank page.
>>
>> ok, get out of reactor, run `elm-make Todo.elm --output elm.js` and open
>> `index.html`.
>>
>> todo example is working now, but i'm just pointing to a file in the
>> client.
>>
>> what is elm? http://elm-lang.org/ doesn't really explain much. i thought
>> it was a framework... is it just a transpiler?
>>
>> where can i get an app example with server, client and db persistence?
>>
>>
>> On Monday, August 1, 2016 at 3:06:28 AM UTC+8, Neil Souza wrote:
>>>
>>> ok, i wanted to take elm for a spin after hearing and reading about it.
>>>
>>> searched for "getting started" and found my way to the install
>>>  page.
>>>
>>> i'm on OSX... ok, no package manager options. that's an issue since i
>>> manage teams of developers and work on multiple machines and use
>>> configuration management software to keep everyone and everything in sync.
>>>
>>> ...and the download is not served over https. i live in China so running
>>> executables downloaded insecurely is a big no-no (and it probably should be
>>> everywhere). change the url to https and the page doesn't even load. i'm
>>> confused.
>>>
>>> alright, some searching led me to
>>>
>>> https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660
>>>
>>> i've got cabal installed, and i'll just assume that it fetches packages
>>> securely.
>>>
>>> $ cabal update
>>> Downloading the latest package list from hackage.haskell.org
>>> Skipping download: Local and remote files match.
>>>
>>> $ cabal install elm
>>> Resolving dependencies...
>>> Configuring Elm-0.12.3...
>>> Building Elm-0.12.3...
>>> Failed to install Elm-0.12.3
>>> Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
>>> Configuring Elm-0.12.3...
>>> Building Elm-0.12.3...
>>> Preprocessing library Elm-0.12.3...
>>> [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
>>> build/Generate/Html.o )
>>> [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs,
>>> dist/build/Generate/Markdown.o )
>>>
>>>
>>> compiler/Generate/Markdown.hs:7:41:
>>> Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
>>>with ‘Pandoc’
>>> Expected type: String -> Pandoc
>>>   Actual type: String
>>>-> Either Text.Pandoc.Error.PandocError Pandoc
>>> In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
>>> In the expression:
>>>   writeHtmlString writeOptions . readMarkdown readOptions
>>> cabal: Error: some packages failed to install:
>>> Elm-0.12.3 failed during the building phase. The exception was:
>>> ExitFailure 1
>>>
>>> googled around a bit, found this:
>>>
>>> https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels
>>>
>>> guess it's not being published to cabal anymore.
>>>
>>> seems to leave me with no scalable secure way to install elm.
>>>
>>> what's the deal? am i missing something?
>>>
>>>
>>> --
>> 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.
>>
>
> --
> 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.
>

-- 
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] elm first impressions (and frustrations)

2016-07-31 Thread Janis Voigtländer
Elm is a programming language.

Am Sonntag, 31. Juli 2016 schrieb Neil Souza :

> ok, npm install worked.
>
> cloned the todo example, cd into the directory and ran `elm reactor`.
>
> opened up http://localhost:8000, see the list of files.
>
> clicked on `Todo.eml` and got a blank page.
>
> ok, get out of reactor, run `elm-make Todo.elm --output elm.js` and open
> `index.html`.
>
> todo example is working now, but i'm just pointing to a file in the client.
>
> what is elm? http://elm-lang.org/ doesn't really explain much. i thought
> it was a framework... is it just a transpiler?
>
> where can i get an app example with server, client and db persistence?
>
> On Monday, August 1, 2016 at 3:06:28 AM UTC+8, Neil Souza wrote:
>>
>> ok, i wanted to take elm for a spin after hearing and reading about it.
>>
>> searched for "getting started" and found my way to the install
>>  page.
>>
>> i'm on OSX... ok, no package manager options. that's an issue since i
>> manage teams of developers and work on multiple machines and use
>> configuration management software to keep everyone and everything in sync.
>>
>> ...and the download is not served over https. i live in China so running
>> executables downloaded insecurely is a big no-no (and it probably should be
>> everywhere). change the url to https and the page doesn't even load. i'm
>> confused.
>>
>> alright, some searching led me to
>>
>> https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660
>>
>> i've got cabal installed, and i'll just assume that it fetches packages
>> securely.
>>
>> $ cabal update
>> Downloading the latest package list from hackage.haskell.org
>> Skipping download: Local and remote files match.
>>
>> $ cabal install elm
>> Resolving dependencies...
>> Configuring Elm-0.12.3...
>> Building Elm-0.12.3...
>> Failed to install Elm-0.12.3
>> Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
>> Configuring Elm-0.12.3...
>> Building Elm-0.12.3...
>> Preprocessing library Elm-0.12.3...
>> [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
>> build/Generate/Html.o )
>> [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs,
>> dist/build/Generate/Markdown.o )
>>
>>
>> compiler/Generate/Markdown.hs:7:41:
>> Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
>>with ‘Pandoc’
>> Expected type: String -> Pandoc
>>   Actual type: String
>>-> Either Text.Pandoc.Error.PandocError Pandoc
>> In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
>> In the expression:
>>   writeHtmlString writeOptions . readMarkdown readOptions
>> cabal: Error: some packages failed to install:
>> Elm-0.12.3 failed during the building phase. The exception was:
>> ExitFailure 1
>>
>> googled around a bit, found this:
>>
>> https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels
>>
>> guess it's not being published to cabal anymore.
>>
>> seems to leave me with no scalable secure way to install elm.
>>
>> what's the deal? am i missing something?
>>
>>
>> --
> 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.
>

-- 
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 first impressions (and frustrations)

2016-07-31 Thread Nick H
Elm is a programming language. Currently it is for client-side (browser)
use only. So there is no server or db persistence layer. "elm-make --output
elm.js" compiles your elm program to JavaScript, so that it can be embedded
in a web page.

You can learn how to use Elm by following this guide
.



On Sun, Jul 31, 2016 at 1:27 PM, Neil Souza  wrote:

> ok, npm install worked.
>
> cloned the todo example, cd into the directory and ran `elm reactor`.
>
> opened up http://localhost:8000, see the list of files.
>
> clicked on `Todo.eml` and got a blank page.
>
> ok, get out of reactor, run `elm-make Todo.elm --output elm.js` and open
> `index.html`.
>
> todo example is working now, but i'm just pointing to a file in the client.
>
> what is elm? http://elm-lang.org/ doesn't really explain much. i thought
> it was a framework... is it just a transpiler?
>
> where can i get an app example with server, client and db persistence?
>
>
> On Monday, August 1, 2016 at 3:06:28 AM UTC+8, Neil Souza wrote:
>>
>> ok, i wanted to take elm for a spin after hearing and reading about it.
>>
>> searched for "getting started" and found my way to the install
>>  page.
>>
>> i'm on OSX... ok, no package manager options. that's an issue since i
>> manage teams of developers and work on multiple machines and use
>> configuration management software to keep everyone and everything in sync.
>>
>> ...and the download is not served over https. i live in China so running
>> executables downloaded insecurely is a big no-no (and it probably should be
>> everywhere). change the url to https and the page doesn't even load. i'm
>> confused.
>>
>> alright, some searching led me to
>>
>> https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660
>>
>> i've got cabal installed, and i'll just assume that it fetches packages
>> securely.
>>
>> $ cabal update
>> Downloading the latest package list from hackage.haskell.org
>> Skipping download: Local and remote files match.
>>
>> $ cabal install elm
>> Resolving dependencies...
>> Configuring Elm-0.12.3...
>> Building Elm-0.12.3...
>> Failed to install Elm-0.12.3
>> Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
>> Configuring Elm-0.12.3...
>> Building Elm-0.12.3...
>> Preprocessing library Elm-0.12.3...
>> [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
>> build/Generate/Html.o )
>> [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs,
>> dist/build/Generate/Markdown.o )
>>
>>
>> compiler/Generate/Markdown.hs:7:41:
>> Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
>>with ‘Pandoc’
>> Expected type: String -> Pandoc
>>   Actual type: String
>>-> Either Text.Pandoc.Error.PandocError Pandoc
>> In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
>> In the expression:
>>   writeHtmlString writeOptions . readMarkdown readOptions
>> cabal: Error: some packages failed to install:
>> Elm-0.12.3 failed during the building phase. The exception was:
>> ExitFailure 1
>>
>> googled around a bit, found this:
>>
>> https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels
>>
>> guess it's not being published to cabal anymore.
>>
>> seems to leave me with no scalable secure way to install elm.
>>
>> what's the deal? am i missing something?
>>
>>
>> --
> 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.
>

-- 
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 first impressions (and frustrations)

2016-07-31 Thread Neil Souza
ok, npm install worked.

cloned the todo example, cd into the directory and ran `elm reactor`.

opened up http://localhost:8000, see the list of files.

clicked on `Todo.eml` and got a blank page.

ok, get out of reactor, run `elm-make Todo.elm --output elm.js` and open 
`index.html`.

todo example is working now, but i'm just pointing to a file in the client.

what is elm? http://elm-lang.org/ doesn't really explain much. i thought it 
was a framework... is it just a transpiler?

where can i get an app example with server, client and db persistence?

On Monday, August 1, 2016 at 3:06:28 AM UTC+8, Neil Souza wrote:
>
> ok, i wanted to take elm for a spin after hearing and reading about it.
>
> searched for "getting started" and found my way to the install 
>  page.
>
> i'm on OSX... ok, no package manager options. that's an issue since i 
> manage teams of developers and work on multiple machines and use 
> configuration management software to keep everyone and everything in sync.
>
> ...and the download is not served over https. i live in China so running 
> executables downloaded insecurely is a big no-no (and it probably should be 
> everywhere). change the url to https and the page doesn't even load. i'm 
> confused.
>
> alright, some searching led me to
>
> https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660
>
> i've got cabal installed, and i'll just assume that it fetches packages 
> securely.
>
> $ cabal update
> Downloading the latest package list from hackage.haskell.org
> Skipping download: Local and remote files match.
>
> $ cabal install elm
> Resolving dependencies...
> Configuring Elm-0.12.3...
> Building Elm-0.12.3...
> Failed to install Elm-0.12.3
> Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
> Configuring Elm-0.12.3...
> Building Elm-0.12.3...
> Preprocessing library Elm-0.12.3...
> [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
> build/Generate/Html.o )
> [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs, 
> dist/build/Generate/Markdown.o )
>
>
> compiler/Generate/Markdown.hs:7:41:
> Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
>with ‘Pandoc’
> Expected type: String -> Pandoc
>   Actual type: String
>-> Either Text.Pandoc.Error.PandocError Pandoc
> In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
> In the expression:
>   writeHtmlString writeOptions . readMarkdown readOptions
> cabal: Error: some packages failed to install:
> Elm-0.12.3 failed during the building phase. The exception was:
> ExitFailure 1
>
> googled around a bit, found this:
>
> https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels
>
> guess it's not being published to cabal anymore.
>
> seems to leave me with no scalable secure way to install elm.
>
> what's the deal? am i missing something?
>
>
>

-- 
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] "I know what I'm doing"-syntax and helpful error messages for string interpolation

2016-07-31 Thread Filip Haglund
Keeping with the helpfullness of the compiler, having warnings when doing 
scetchy things with string interpolation (issue #905 on Github 
) could be useful. 
This could be warnings about building urls's from variables that might be 
user input. It could also be about building SQL queries, or HTML. 

I suggest having some basic checks in the compiler for these areas where 
special care should be taken. This would generate warnings, assuming it is 
a mistake until proven otherwise.

`"http://example.com/profile/{{userdata}}/"` would generate a warning. 
`"http://example.com/profile/{{[url] userdata }}/"`would not. 

`"My name is {{[url] userdata}}."`would generate a warning.
`"My name is {{userdata}}."`would not.

`"Check out my blog."` would generate a warning.
`"Check out my blog."` 
would generate a warning.
`"Check out my blog."` would not.

`"Select * from users where username = '{{userdata}}'"` would generate a 
warning.
`"Select * from users where username = '{{[html, url] userdata}}'"` 
would generate a warning.
`"Select * from users where username = '{{[sql] userdata}}'"` would not.

Exact syntax is not important right now. I want to know what the community 
thinks about the idea of "I know what I'm doing"-annotated string 
interpolation.

-- 
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] elm first impressions (and frustrations)

2016-07-31 Thread Neil Souza
thanks for the npm option, i'll try that out. someone mentioned that it's 
right there on the installer page and i missed it (hehe).

you don't want to serve executables insecurely because anyone in the middle 
can change it to whatever they want (or such is my understanding). which is 
bad to run on your computer.

On Monday, August 1, 2016 at 3:23:56 AM UTC+8, Joey Eremondi wrote:
>
> ok, no package manager options
>
>
> Did you try NPM? https://www.npmjs.com/package/elm
>
> I also don't fully understand why the Mac installer isn't suitable: 
> http://install.elm-lang.org/Elm-Platform-0.17.1.pkg
>
>  ...and the download is not served over https
>
>
> It's downloading source, not executables, if you're using Cabal. But you 
> can't use Cabal the way you do, since up to date versions are not on 
> Hackage. The proper way to install with Cabal is BuildFromSource.hs:  
> https://github.com/elm-lang/elm-platform.
>
> On Sun, Jul 31, 2016 at 12:06 PM, Neil Souza  > wrote:
>
>> ok, i wanted to take elm for a spin after hearing and reading about it.
>>
>> searched for "getting started" and found my way to the install 
>>  page.
>>
>> i'm on OSX... ok, no package manager options. that's an issue since i 
>> manage teams of developers and work on multiple machines and use 
>> configuration management software to keep everyone and everything in sync.
>>
>> ...and the download is not served over https. i live in China so running 
>> executables downloaded insecurely is a big no-no (and it probably should be 
>> everywhere). change the url to https and the page doesn't even load. i'm 
>> confused.
>>
>> alright, some searching led me to
>>
>> https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660
>>
>> i've got cabal installed, and i'll just assume that it fetches packages 
>> securely.
>>
>> $ cabal update
>> Downloading the latest package list from hackage.haskell.org
>> Skipping download: Local and remote files match.
>>
>> $ cabal install elm
>> Resolving dependencies...
>> Configuring Elm-0.12.3...
>> Building Elm-0.12.3...
>> Failed to install Elm-0.12.3
>> Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
>> Configuring Elm-0.12.3...
>> Building Elm-0.12.3...
>> Preprocessing library Elm-0.12.3...
>> [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
>> build/Generate/Html.o )
>> [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs, 
>> dist/build/Generate/Markdown.o )
>>
>>
>> compiler/Generate/Markdown.hs:7:41:
>> Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
>>with ‘Pandoc’
>> Expected type: String -> Pandoc
>>   Actual type: String
>>-> Either Text.Pandoc.Error.PandocError Pandoc
>> In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
>> In the expression:
>>   writeHtmlString writeOptions . readMarkdown readOptions
>> cabal: Error: some packages failed to install:
>> Elm-0.12.3 failed during the building phase. The exception was:
>> ExitFailure 1
>>
>> googled around a bit, found this:
>>
>> https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels
>>
>> guess it's not being published to cabal anymore.
>>
>> seems to leave me with no scalable secure way to install elm.
>>
>> what's the deal? am i missing something?
>>
>>
>> -- 
>> 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...@googlegroups.com .
>> For more options, visit 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.


Re: [elm-discuss] elm first impressions (and frustrations)

2016-07-31 Thread Neil Souza
yup, i'm an idiot.

On Monday, August 1, 2016 at 3:45:24 AM UTC+8, Eduardo Cuducos wrote:
>
> But it is, it's the third item (just below Mac and Windows) ; )
>
> On Sun, Jul 31, 2016 at 9:43 PM Neil Souza  
> wrote:
>
>> thanks, that's great. that should probably be on the install page.
>>
>>
>> On Monday, August 1, 2016 at 3:23:16 AM UTC+8, Eduardo Cuducos wrote:
>>
>>> Hi, Neil,
>>>
>>> Sot sure if it helps, but if your team already use Node, npm install -g 
>>> elm install it (BTW this is my standard way to get Elm working locally 
>>> and in production).
>>>
>>> Best,
>>>
>>> On Sun, Jul 31, 2016 at 9:06 PM Neil Souza  wrote:
>>>
>> ok, i wanted to take elm for a spin after hearing and reading about it.

 searched for "getting started" and found my way to the install 
  page.

 i'm on OSX... ok, no package manager options. that's an issue since i 
 manage teams of developers and work on multiple machines and use 
 configuration management software to keep everyone and everything in sync.

 ...and the download is not served over https. i live in China so 
 running executables downloaded insecurely is a big no-no (and it probably 
 should be everywhere). change the url to https and the page doesn't even 
 load. i'm confused.

 alright, some searching led me to


 https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660

 i've got cabal installed, and i'll just assume that it fetches packages 
 securely.

 $ cabal update
 Downloading the latest package list from hackage.haskell.org
 Skipping download: Local and remote files match.

 $ cabal install elm
 Resolving dependencies...
 Configuring Elm-0.12.3...
 Building Elm-0.12.3...
 Failed to install Elm-0.12.3
 Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
 Configuring Elm-0.12.3...
 Building Elm-0.12.3...
 Preprocessing library Elm-0.12.3...
 [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist
 /build/Generate/Html.o )
 [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs, 
 dist/build/Generate/Markdown.o )


 compiler/Generate/Markdown.hs:7:41:
 Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
with ‘Pandoc’
 Expected type: String -> Pandoc
   Actual type: String
-> Either Text.Pandoc.Error.PandocError Pandoc
 In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
 In the expression:
   writeHtmlString writeOptions . readMarkdown readOptions
 cabal: Error: some packages failed to install:
 Elm-0.12.3 failed during the building phase. The exception was:
 ExitFailure 1

 googled around a bit, found this:

 https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels

 guess it's not being published to cabal anymore.

 seems to leave me with no scalable secure way to install elm.

 what's the deal? am i missing something?


 -- 
 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...@googlegroups.com.
>>>
>>>
 For more options, visit 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...@googlegroups.com .
>> For more options, visit 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.


Re: [elm-discuss] elm first impressions (and frustrations)

2016-07-31 Thread Eduardo Cuducos
But it is, it's the third item (just below Mac and Windows) ; )

On Sun, Jul 31, 2016 at 9:43 PM Neil Souza  wrote:

> thanks, that's great. that should probably be on the install page.
>
>
> On Monday, August 1, 2016 at 3:23:16 AM UTC+8, Eduardo Cuducos wrote:
>
>> Hi, Neil,
>>
>> Sot sure if it helps, but if your team already use Node, npm install -g
>> elm install it (BTW this is my standard way to get Elm working locally
>> and in production).
>>
>> Best,
>>
>> On Sun, Jul 31, 2016 at 9:06 PM Neil Souza  wrote:
>>
> ok, i wanted to take elm for a spin after hearing and reading about it.
>>>
>>> searched for "getting started" and found my way to the install
>>>  page.
>>>
>>> i'm on OSX... ok, no package manager options. that's an issue since i
>>> manage teams of developers and work on multiple machines and use
>>> configuration management software to keep everyone and everything in sync.
>>>
>>> ...and the download is not served over https. i live in China so running
>>> executables downloaded insecurely is a big no-no (and it probably should be
>>> everywhere). change the url to https and the page doesn't even load. i'm
>>> confused.
>>>
>>> alright, some searching led me to
>>>
>>> https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660
>>>
>>> i've got cabal installed, and i'll just assume that it fetches packages
>>> securely.
>>>
>>> $ cabal update
>>> Downloading the latest package list from hackage.haskell.org
>>> Skipping download: Local and remote files match.
>>>
>>> $ cabal install elm
>>> Resolving dependencies...
>>> Configuring Elm-0.12.3...
>>> Building Elm-0.12.3...
>>> Failed to install Elm-0.12.3
>>> Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
>>> Configuring Elm-0.12.3...
>>> Building Elm-0.12.3...
>>> Preprocessing library Elm-0.12.3...
>>> [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
>>> build/Generate/Html.o )
>>> [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs,
>>> dist/build/Generate/Markdown.o )
>>>
>>>
>>> compiler/Generate/Markdown.hs:7:41:
>>> Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
>>>with ‘Pandoc’
>>> Expected type: String -> Pandoc
>>>   Actual type: String
>>>-> Either Text.Pandoc.Error.PandocError Pandoc
>>> In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
>>> In the expression:
>>>   writeHtmlString writeOptions . readMarkdown readOptions
>>> cabal: Error: some packages failed to install:
>>> Elm-0.12.3 failed during the building phase. The exception was:
>>> ExitFailure 1
>>>
>>> googled around a bit, found this:
>>>
>>> https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels
>>>
>>> guess it's not being published to cabal anymore.
>>>
>>> seems to leave me with no scalable secure way to install elm.
>>>
>>> what's the deal? am i missing something?
>>>
>>>
>>> --
>>> 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...@googlegroups.com.
>>
>>
>>> For more options, visit 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.
>

-- 
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] elm first impressions (and frustrations)

2016-07-31 Thread Neil Souza
thanks, that's great. that should probably be on the install page.

On Monday, August 1, 2016 at 3:23:16 AM UTC+8, Eduardo Cuducos wrote:
>
> Hi, Neil,
>
> Sot sure if it helps, but if your team already use Node, npm install -g 
> elm install it (BTW this is my standard way to get Elm working locally 
> and in production).
>
> Best,
>
> On Sun, Jul 31, 2016 at 9:06 PM Neil Souza  
> wrote:
>
>> ok, i wanted to take elm for a spin after hearing and reading about it.
>>
>> searched for "getting started" and found my way to the install 
>>  page.
>>
>> i'm on OSX... ok, no package manager options. that's an issue since i 
>> manage teams of developers and work on multiple machines and use 
>> configuration management software to keep everyone and everything in sync.
>>
>> ...and the download is not served over https. i live in China so running 
>> executables downloaded insecurely is a big no-no (and it probably should be 
>> everywhere). change the url to https and the page doesn't even load. i'm 
>> confused.
>>
>> alright, some searching led me to
>>
>> https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660
>>
>> i've got cabal installed, and i'll just assume that it fetches packages 
>> securely.
>>
>> $ cabal update
>> Downloading the latest package list from hackage.haskell.org
>> Skipping download: Local and remote files match.
>>
>> $ cabal install elm
>> Resolving dependencies...
>> Configuring Elm-0.12.3...
>> Building Elm-0.12.3...
>> Failed to install Elm-0.12.3
>> Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
>> Configuring Elm-0.12.3...
>> Building Elm-0.12.3...
>> Preprocessing library Elm-0.12.3...
>> [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
>> build/Generate/Html.o )
>> [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs, 
>> dist/build/Generate/Markdown.o )
>>
>>
>> compiler/Generate/Markdown.hs:7:41:
>> Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
>>with ‘Pandoc’
>> Expected type: String -> Pandoc
>>   Actual type: String
>>-> Either Text.Pandoc.Error.PandocError Pandoc
>> In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
>> In the expression:
>>   writeHtmlString writeOptions . readMarkdown readOptions
>> cabal: Error: some packages failed to install:
>> Elm-0.12.3 failed during the building phase. The exception was:
>> ExitFailure 1
>>
>> googled around a bit, found this:
>>
>> https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels
>>
>> guess it's not being published to cabal anymore.
>>
>> seems to leave me with no scalable secure way to install elm.
>>
>> what's the deal? am i missing something?
>>
>>
>> -- 
>> 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...@googlegroups.com .
>> For more options, visit 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.


Re: [elm-discuss] elm first impressions (and frustrations)

2016-07-31 Thread Eduardo Cuducos
Hi, Neil,

Sot sure if it helps, but if your team already use Node, npm install -g elm
install it (BTW this is my standard way to get Elm working locally and in
production).

Best,

On Sun, Jul 31, 2016 at 9:06 PM Neil Souza  wrote:

> ok, i wanted to take elm for a spin after hearing and reading about it.
>
> searched for "getting started" and found my way to the install
>  page.
>
> i'm on OSX... ok, no package manager options. that's an issue since i
> manage teams of developers and work on multiple machines and use
> configuration management software to keep everyone and everything in sync.
>
> ...and the download is not served over https. i live in China so running
> executables downloaded insecurely is a big no-no (and it probably should be
> everywhere). change the url to https and the page doesn't even load. i'm
> confused.
>
> alright, some searching led me to
>
> https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660
>
> i've got cabal installed, and i'll just assume that it fetches packages
> securely.
>
> $ cabal update
> Downloading the latest package list from hackage.haskell.org
> Skipping download: Local and remote files match.
>
> $ cabal install elm
> Resolving dependencies...
> Configuring Elm-0.12.3...
> Building Elm-0.12.3...
> Failed to install Elm-0.12.3
> Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
> Configuring Elm-0.12.3...
> Building Elm-0.12.3...
> Preprocessing library Elm-0.12.3...
> [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
> build/Generate/Html.o )
> [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs,
> dist/build/Generate/Markdown.o )
>
>
> compiler/Generate/Markdown.hs:7:41:
> Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
>with ‘Pandoc’
> Expected type: String -> Pandoc
>   Actual type: String
>-> Either Text.Pandoc.Error.PandocError Pandoc
> In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
> In the expression:
>   writeHtmlString writeOptions . readMarkdown readOptions
> cabal: Error: some packages failed to install:
> Elm-0.12.3 failed during the building phase. The exception was:
> ExitFailure 1
>
> googled around a bit, found this:
>
> https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels
>
> guess it's not being published to cabal anymore.
>
> seems to leave me with no scalable secure way to install elm.
>
> what's the deal? am i missing something?
>
>
> --
> 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.
>

-- 
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] elm first impressions (and frustrations)

2016-07-31 Thread Joey Eremondi
>
> ok, no package manager options


Did you try NPM? https://www.npmjs.com/package/elm

I also don't fully understand why the Mac installer isn't suitable:
http://install.elm-lang.org/Elm-Platform-0.17.1.pkg

 ...and the download is not served over https


It's downloading source, not executables, if you're using Cabal. But you
can't use Cabal the way you do, since up to date versions are not on
Hackage. The proper way to install with Cabal is BuildFromSource.hs:
https://github.com/elm-lang/elm-platform.

On Sun, Jul 31, 2016 at 12:06 PM, Neil Souza  wrote:

> ok, i wanted to take elm for a spin after hearing and reading about it.
>
> searched for "getting started" and found my way to the install
>  page.
>
> i'm on OSX... ok, no package manager options. that's an issue since i
> manage teams of developers and work on multiple machines and use
> configuration management software to keep everyone and everything in sync.
>
> ...and the download is not served over https. i live in China so running
> executables downloaded insecurely is a big no-no (and it probably should be
> everywhere). change the url to https and the page doesn't even load. i'm
> confused.
>
> alright, some searching led me to
>
> https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660
>
> i've got cabal installed, and i'll just assume that it fetches packages
> securely.
>
> $ cabal update
> Downloading the latest package list from hackage.haskell.org
> Skipping download: Local and remote files match.
>
> $ cabal install elm
> Resolving dependencies...
> Configuring Elm-0.12.3...
> Building Elm-0.12.3...
> Failed to install Elm-0.12.3
> Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
> Configuring Elm-0.12.3...
> Building Elm-0.12.3...
> Preprocessing library Elm-0.12.3...
> [ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
> build/Generate/Html.o )
> [ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs,
> dist/build/Generate/Markdown.o )
>
>
> compiler/Generate/Markdown.hs:7:41:
> Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
>with ‘Pandoc’
> Expected type: String -> Pandoc
>   Actual type: String
>-> Either Text.Pandoc.Error.PandocError Pandoc
> In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
> In the expression:
>   writeHtmlString writeOptions . readMarkdown readOptions
> cabal: Error: some packages failed to install:
> Elm-0.12.3 failed during the building phase. The exception was:
> ExitFailure 1
>
> googled around a bit, found this:
>
> https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels
>
> guess it's not being published to cabal anymore.
>
> seems to leave me with no scalable secure way to install elm.
>
> what's the deal? am i missing something?
>
>
> --
> 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.
>

-- 
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 first impressions (and frustrations)

2016-07-31 Thread Neil Souza
ok, i wanted to take elm for a spin after hearing and reading about it.

searched for "getting started" and found my way to the install 
 page.

i'm on OSX... ok, no package manager options. that's an issue since i 
manage teams of developers and work on multiple machines and use 
configuration management software to keep everyone and everything in sync.

...and the download is not served over https. i live in China so running 
executables downloaded insecurely is a big no-no (and it probably should be 
everywhere). change the url to https and the page doesn't even load. i'm 
confused.

alright, some searching led me to

https://github.com/elm-lang/elm-compiler/issues/776#issuecomment-56264660

i've got cabal installed, and i'll just assume that it fetches packages 
securely.

$ cabal update
Downloading the latest package list from hackage.haskell.org
Skipping download: Local and remote files match.

$ cabal install elm
Resolving dependencies...
Configuring Elm-0.12.3...
Building Elm-0.12.3...
Failed to install Elm-0.12.3
Build log ( /Users/nrser/.cabal/logs/Elm-0.12.3.log ):
Configuring Elm-0.12.3...
Building Elm-0.12.3...
Preprocessing library Elm-0.12.3...
[ 1 of 62] Compiling Generate.Html( compiler/Generate/Html.hs, dist/
build/Generate/Html.o )
[ 2 of 62] Compiling Generate.Markdown ( compiler/Generate/Markdown.hs, dist
/build/Generate/Markdown.o )


compiler/Generate/Markdown.hs:7:41:
Couldn't match type ‘Either Text.Pandoc.Error.PandocError Pandoc’
   with ‘Pandoc’
Expected type: String -> Pandoc
  Actual type: String
   -> Either Text.Pandoc.Error.PandocError Pandoc
In the second argument of ‘(.)’, namely ‘readMarkdown readOptions’
In the expression:
  writeHtmlString writeOptions . readMarkdown readOptions
cabal: Error: some packages failed to install:
Elm-0.12.3 failed during the building phase. The exception was:
ExitFailure 1

googled around a bit, found this:

https://groups.google.com/forum/#!topic/elm-discuss/UYPDjXrHels

guess it's not being published to cabal anymore.

seems to leave me with no scalable secure way to install elm.

what's the deal? am i missing something?


-- 
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] Scope for shorter syntax?

2016-07-31 Thread Joey Eremondi
>
> So, not really sure of your point.


It's not shorter if you only use it once, but if you have some record type,
and you're repeatedly providing it with arguments, in order, it can save
you a lot of time.


> Secondly, you mention variables? To the best of my knowledge, there are no
> variables in Elm.
>
> Identifiers are probably a better name. But when you have something like
"\ x -> x + 1", we commonly refer to x as a variable.

It's not a mutable variable, but it's still a variable i.e. parameter to a
function.

Finally, it's worth mentioning that Elm values clarity over brevity. We try
not to brag about cryptic one-liners the way some Haskell people do. So, a
shortening like this will be considered, but it's very possible that it
won't get added, because the complexity it adds outweighs the brevity it
adds.

On Sun, Jul 31, 2016 at 11:20 AM, Janis Voigtländer <
janis.voigtlaen...@gmail.com> wrote:

> Andre, to your second point: Have you looked at the Elm compiler's error
> messages? They frequently talk about variables. But maybe you were lucky so
> far and didn't get many error messages. :-)
>
>
> Am Sonntag, 31. Juli 2016 schrieb Andre Bolle :
>
>> Hi Joey,
>>
>> A couple of points,
>>
>> Firstly, "type alias MyRecord = {init : Foo, view : Bar, update : Baz,
>> subscriptions : Something}"
>> followed by "Html.App.program (MyRecord init view update subscriptions )"
>> is *not* shorter than
>> the long version of Html.App.program { init = init, view = view, update =
>> update, subscriptions = subscriptions }. So, not really sure of your point.
>>
>> Secondly, you mention variables? To the best of my knowledge, there are
>> no variables in Elm.
>>
>> On Sunday, July 31, 2016 at 6:07:55 PM UTC+1, Joey Eremondi wrote:
>>>
>>> Elm currently lets you do something similar. If you have
>>>
>>>   type alias MyRecord = {init : Foo, view : Bar, update : Baz,
>>> subscriptions : Something}
>>>
>>> then you can do
>>>   Html.App.program (MyRecord init view update subscriptions )
>>>
>>> where it follows the order they were declared in the type alias.
>>>
>>> What you've described would work only in the case where:
>>> 1. every argument is a variable, not some more complicated value
>>> 2. the field names are identical to the variable names.
>>>
>>> In any other case, we wouldn't be able to infer the type of the record,
>>> which would not work in Elm.
>>>
>>> On Sun, Jul 31, 2016 at 8:03 AM, OvermindDL1  wrote:
>>>
 Javascript ES2015-like, would be useful.


 On Sunday, July 31, 2016 at 3:24:25 AM UTC-6, Andre Bolle wrote:
>
> Hi,
>
> I think there might be scope for syntax reduction in the case where
> the names of functions match the names of fields in a record.
>
> e.g.
>
>Html.App.program { init = init, view = view, update = update,
> subscriptions = subscriptions }
>
> can be written as
>
> Html.App.program { init, view, update, subscriptions }
>
> Just an idea,
> Andre
>
> --
 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...@googlegroups.com.
 For more options, visit 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.
>>
> --
> 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.
>

-- 
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] Scope for shorter syntax?

2016-07-31 Thread Janis Voigtländer
Andre, to your second point: Have you looked at the Elm compiler's error
messages? They frequently talk about variables. But maybe you were lucky so
far and didn't get many error messages. :-)

Am Sonntag, 31. Juli 2016 schrieb Andre Bolle :

> Hi Joey,
>
> A couple of points,
>
> Firstly, "type alias MyRecord = {init : Foo, view : Bar, update : Baz,
> subscriptions : Something}"
> followed by "Html.App.program (MyRecord init view update subscriptions )"
> is *not* shorter than
> the long version of Html.App.program { init = init, view = view, update =
> update, subscriptions = subscriptions }. So, not really sure of your point.
>
> Secondly, you mention variables? To the best of my knowledge, there are no
> variables in Elm.
>
> On Sunday, July 31, 2016 at 6:07:55 PM UTC+1, Joey Eremondi wrote:
>>
>> Elm currently lets you do something similar. If you have
>>
>>   type alias MyRecord = {init : Foo, view : Bar, update : Baz,
>> subscriptions : Something}
>>
>> then you can do
>>   Html.App.program (MyRecord init view update subscriptions )
>>
>> where it follows the order they were declared in the type alias.
>>
>> What you've described would work only in the case where:
>> 1. every argument is a variable, not some more complicated value
>> 2. the field names are identical to the variable names.
>>
>> In any other case, we wouldn't be able to infer the type of the record,
>> which would not work in Elm.
>>
>> On Sun, Jul 31, 2016 at 8:03 AM, OvermindDL1  wrote:
>>
>>> Javascript ES2015-like, would be useful.
>>>
>>>
>>> On Sunday, July 31, 2016 at 3:24:25 AM UTC-6, Andre Bolle wrote:

 Hi,

 I think there might be scope for syntax reduction in the case where the
 names of functions match the names of fields in a record.

 e.g.

Html.App.program { init = init, view = view, update = update,
 subscriptions = subscriptions }

 can be written as

 Html.App.program { init, view, update, subscriptions }

 Just an idea,
 Andre

 --
>>> 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...@googlegroups.com.
>>> For more options, visit 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.
>

-- 
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: Scope for shorter syntax?

2016-07-31 Thread Andre Bolle
Hi Joey,

A couple of points,

Firstly, "type alias MyRecord = {init : Foo, view : Bar, update : Baz, 
subscriptions : Something}"
followed by "Html.App.program (MyRecord init view update subscriptions )" 
is *not* shorter than
the long version of Html.App.program { init = init, view = view, update = 
update, subscriptions = subscriptions }. So, not really sure of your point.

Secondly, you mention variables? To the best of my knowledge, there are no 
variables in Elm.

On Sunday, July 31, 2016 at 6:07:55 PM UTC+1, Joey Eremondi wrote:
>
> Elm currently lets you do something similar. If you have
>
>   type alias MyRecord = {init : Foo, view : Bar, update : Baz, 
> subscriptions : Something}
>
> then you can do
>   Html.App.program (MyRecord init view update subscriptions )
>
> where it follows the order they were declared in the type alias.
>
> What you've described would work only in the case where:
> 1. every argument is a variable, not some more complicated value
> 2. the field names are identical to the variable names.
>
> In any other case, we wouldn't be able to infer the type of the record, 
> which would not work in Elm.
>
> On Sun, Jul 31, 2016 at 8:03 AM, OvermindDL1  > wrote:
>
>> Javascript ES2015-like, would be useful.
>>
>>
>> On Sunday, July 31, 2016 at 3:24:25 AM UTC-6, Andre Bolle wrote:
>>>
>>> Hi,
>>>
>>> I think there might be scope for syntax reduction in the case where the 
>>> names of functions match the names of fields in a record.
>>>
>>> e.g.
>>>
>>>Html.App.program { init = init, view = view, update = update, 
>>> subscriptions = subscriptions }
>>>
>>> can be written as
>>>
>>> Html.App.program { init, view, update, subscriptions }
>>>
>>> Just an idea,
>>> Andre
>>>
>>> -- 
>> 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...@googlegroups.com .
>> For more options, visit 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.


Re: [elm-discuss] Re: Scope for shorter syntax?

2016-07-31 Thread Joey Eremondi
Elm currently lets you do something similar. If you have

  type alias MyRecord = {init : Foo, view : Bar, update : Baz,
subscriptions : Something}

then you can do
  Html.App.program (MyRecord init view update subscriptions )

where it follows the order they were declared in the type alias.

What you've described would work only in the case where:
1. every argument is a variable, not some more complicated value
2. the field names are identical to the variable names.

In any other case, we wouldn't be able to infer the type of the record,
which would not work in Elm.

On Sun, Jul 31, 2016 at 8:03 AM, OvermindDL1  wrote:

> Javascript ES2015-like, would be useful.
>
>
> On Sunday, July 31, 2016 at 3:24:25 AM UTC-6, Andre Bolle wrote:
>>
>> Hi,
>>
>> I think there might be scope for syntax reduction in the case where the
>> names of functions match the names of fields in a record.
>>
>> e.g.
>>
>>Html.App.program { init = init, view = view, update = update,
>> subscriptions = subscriptions }
>>
>> can be written as
>>
>> Html.App.program { init, view, update, subscriptions }
>>
>> Just an idea,
>> Andre
>>
>> --
> 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.
>

-- 
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] textarea selection

2016-07-31 Thread OvermindDL1
That sounds horrifyingly wonderfully hacky.  ^.^

Good idea to keep in mind for the future, though I think keeping with my 
port right now is good.  I have a growing PortHelper module that I am 
stuffing all my port helpers into with a single javascript file that I can 
call a function in passing an Elm app to setup.  It works well and is 
re-usable.  :-)

On Sunday, July 31, 2016 at 3:05:22 AM UTC-6, debois wrote:
>
> This is something of a hack and likely not preferable to your current 
> solution using a port, but if you're desperate to avoid ports (say, you are 
> building a package), here's an option:
>
> Write a Json decoder for the Buttons onClick event which "walks the DOM" 
> by decoding `offsetParent` etc.; find the textfield, decode 
> `selectionStart` and `selectionEnd` on it.
>
> More details in this post:
>
> https://medium.com/@debois/elm-the-dom-8c9883190d20#.kyhqu07pi
>
> You might find this library helpful:
>
> https://github.com/debois/elm-dom
>
> If you take this route, consider submitting a PR for the library with 
> decoders for selection properties.
>
> I believe proper support for accessing selection will come to core 
> eventually, but not in the short term:
>
>
> https://www.google.com/url?q=https%3A%2F%2Fgist.github.com%2Frtfeldman%2F5f015adbdfbba541c7e7e1409b6efeef=D=1=AFQjCNHad6MkGVczjUkktrV_ACgfhvIr-g
>
>

-- 
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] Decoding JSON for Lists of Objects With Arbitrary Fields

2016-07-31 Thread OvermindDL1
I have far too many cases where I translate a port input into a Dict, it is 
a bit of extra noise having to add that wrapper in my subscriptions and the 
port outgoing calls.  Is there anything that makes the Dict conversion 
across Ports more automatic?

On Saturday, July 30, 2016 at 4:14:11 PM UTC-6, Nick Hollon wrote:
>
> Elm has never allowed for arbitrary fields to be added to records at 
> runtime ( it used to allow field insertion & deletion, but you still need 
> to know the field names at compile time )
>
> Instead of a record, maybe you should represent your data as a dict? This 
> has the property you are looking for.
>
> On Jul 30, 2016, at 5:54 PM, Gary Young  
> wrote:
>
> Thanks Duane, but I don't see how your suggestion fixes my problem.
>
> My goal is to manipulate a single string variable, call it "theJson", into 
> an Elm list of records so that I can operate on it as I would any other 
> list of records in Elm.  
>
> So far I believe this cannot be done because Elm doesn't allow record 
> fields to be added at run time.  Previously Elm had the capability of doing 
> this, but it was recently removed.  
>
> Is my research accurate?  I have a number of applications where I must do 
> this type of thing, and I believe this is a common enough use-case that the 
> Elm creators would want to support it.
>
> Thanks!
>
>
> On Saturday, July 30, 2016 at 4:24:43 PM UTC-5, Duane Johnson wrote:
>>
>> Yes, if you keep the objects in the Json.Encode.Value type, then you can 
>> contain a tree of arbitrary JSON types all the way down.
>>
>> This helped me understand the above Json.Encode.Value type a little bit 
>> better:
>>
>> $ elm repl
>>
>> > import Json.Encode
>> > Json.Encode.string "hi"
>> "hi" : Json.Encode.Value
>> > Json.Encode.list []
>> {} : Json.Encode.Value
>> > Json.Encode.list [Json.Encode.string "hi"]
>> { 0 = "hi" } : Json.Encode.Value
>> > Json.Encode.object [("hi", Json.Encode.int 1), ("bye", 
>> Json.Encode.list [Json.Encode.int 1, Json.Encode.int 2])]
>> { hi = 1, bye = { 0 = 1, 1 = 2 } } : Json.Encode.Value
>>
>> So basically, you can keep encoding things as this generic 
>> "Json.Encode.Value" type, and nesting them inside one another. From Elm's 
>> perspective, they're all the same type, so where javascript arrays could 
>> have multiple things in them (e.g. ["one", 2, {3: "four"}]) Elm is ok with 
>> a list of single-type things.
>>
>>
>> On Sat, Jul 30, 2016 at 3:15 PM, Gary Young  wrote:
>>
>>> Hi guys,
>>>
>>> I have a reporting app where actions by the user generate arbitrary 
>>> lists of objects(records) coming back from a JSON store.  I do not know at 
>>> compile time what the fields in the objects(records) will be.  Can Elm do 
>>> this?  How?
>>>
>>> Thanks in advance!
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> For more options, visit 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...@googlegroups.com .
> For more options, visit 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: Elmx

2016-07-31 Thread OvermindDL1
Heh, though by not 'first-class' I mean that almost no tool supports it, it 
is a manual pre-compilation step, as well as it has some oddities like 
unable to recurse inside the {}, which is easily worked around (my main 
thing is lack of tool support, elm-make, elm-format, etc...).  But yep, it 
is just the Html.* library in html syntax, though I really wished it 
supported giving tag names that went directly to a given import, I.E. 
instead of `stuff` going to `Html.ul [blah] [text "stuff"]` I 
wish it went to `ul [blah] [text "stuff"]` that way I could import, say, 
Material.Options.ul or so, or that I could do `import Material.Button as 
Button` and be able to use it some how, some kind of compat layer.  So that 
is what I mean I guess, just it 'only' works with Html, not other Html-'ish 
libraries like elm-mdl (which I do wish followed Html more if it were 
somehow possible).

On Saturday, July 30, 2016 at 7:28:58 AM UTC-6, Rex van der Spuy wrote:
>
> Hi,
>
> "Elmx" is just ordinary Elm functions that happen to have exactly the same 
> names as HTML tags. 
> So, it's 100% first class, if that's what you mean...?
> Those functions just take two parameters: a list of attributes and a list 
> of child nodes.
>
> http://guide.elm-lang.org/architecture/user_input/buttons.html
>
> Personally, for me, Elm makes makes working with HTML "almost nice" (as 
> opposed to "patently horrible", which is what working with plain-vanilla 
> HTML is ... and JSX isn't any better.)
> So, yeah, it's awesome :)
>

-- 
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] Scope for shorter syntax?

2016-07-31 Thread Andre Bolle
Hi,

I think there might be scope for syntax reduction in the case where the 
names of functions match the names of fields in a record.

e.g.

   Html.App.program { init = init, view = view, update = update, 
subscriptions = subscriptions }

can be written as

Html.App.program { init, view, update, subscriptions }

Just an idea,
Andre

-- 
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: Uncaught TypeError: Cannot read property 'tag' of undefined

2016-07-31 Thread Aditya Vishwakarma
Hi

So I dug deeper into this issue. turns out that the JS code for my port 
module was being emitted before the JS of Json.Decode module. 

After some research, I found that if the project's port module has:

   - Name beginning with a letter before J, and
   - does not have a declared dependency on Json.Decode
   
Then the elm compiler will emit the port module code before `Json.Decode` 
which causes all decoders to be `Undefined`. This results in all user 
defined incoming ports to stop throw exceptions.

SSCCE: https://github.com/adityav/elm-ports-issue


On Friday, 29 July 2016 02:27:41 UTC+5:30, Aditya Vishwakarma wrote:
>
> Hi
>
> I am getting Uncaught TypeError: Cannot read property 'tag' of undefined 
> in a sample code I built to tryout elm. The error happen when I send JSON 
> data across the elm port from JS side. 
>
> Port defn: 
> https://github.com/adityav/elm-reddit-listing/blob/master/src/AppPorts.elm#L14
> JS call which causes this issue: 
> https://github.com/adityav/elm-reddit-listing/blob/master/src/index.js#L36
> git repo: https://github.com/adityav/elm-reddit-listing
>
> To run. Simply do
> npm install && elm package install
> npm start
>
> and open http://localhost:8080/. A listing of /r/elm should show up when 
> the app works. 
>
> A screenshot of the exact location where the error occurs:
>
>
> 
>
> People on slack recommended me to remove elm-stuff/build-artifacts and try 
> again. It didn't work so I removed node_modules and elm-stuff directories 
> and reinstalled the whole thing. Didn't work as well. 
> The code was working before I decided to clean it up a little to show to 
> my teammates. Stopped working the moment I shared the github link with 
> them. :|
>
> anyone got any ideas on this?
>

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