Lisplog

Blogging in Lisp

Search

Feed Aggregator

Rendered on Sun, 19 Aug 2018 17:04:39 GMT  newer latest older 
Next udpate: Sun, 19 Aug 2018 17:30:00 GMT feeds

Where can I find new features of Elm 0.19?

via Elm Discourse - Latest posts by @desireco Zeljko Dakic on Sun, 19 Aug 2018 16:29:50 GMT

Wanted to learn about what is coming but I am failing in that, so maybe someone can point me how to go about it.

Thanks in advance.

Using Spacemacs with Elm

via Elm Discourse - Latest posts by @system system on Sun, 19 Aug 2018 04:22:38 GMT

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

Any recommendations for hosting elm examples?

via Elm Discourse - Latest posts by @edkv Eduard Kovalov on Sat, 18 Aug 2018 16:08:40 GMT

@rupert Firebase is also a good option

Any recommendations for hosting elm examples?

via Elm Discourse - Latest posts by @joakin Joaquin on Sat, 18 Aug 2018 11:14:23 GMT

Shout out to localtunnel too as a ngrok alternative, great tools!

Podcast: Elm Town 35 - Herzog Drei with Francesco Orsenigo

via Elm Discourse - Latest posts by @system system on Sat, 18 Aug 2018 06:49:37 GMT

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

Any recommendations for hosting elm examples?

via Elm Discourse - Latest posts by @mattpiz Matthieu Pizenberg on Sat, 18 Aug 2018 03:07:17 GMT

By the way, it is not for permanent hosting, but if you want to show an elm app of yours for a few minutes to a friend not on the same local network than you, ngrok is awesome. You just start your local server, say python -m http.server 8888, then you start ngrok, ngrok http 8888 and in few seconds it gives you a generated address like http://b938248cd.ngrok.io that you can share with your friends and is a realtime proxy to your local server. There are of course limitations (nb connections, etc.) but for the use case of just showing temporarily to friend / collegue for demo, I find it perfect.

Any recommendations for hosting elm examples?

via Elm Discourse - Latest posts by @fizwidget on Sat, 18 Aug 2018 01:13:48 GMT

+1 for Github pages. I’ve hacked together a deployment script for using it in my projects, but sounds like I could replace that with the gh-pages util mentioned above!

Updating the highlight.js mode for Elm

via Elm Discourse - Latest posts by @evancz Evan on Fri, 17 Aug 2018 23:01:15 GMT

I noticed that the highlight.js mode for Elm does some weird stuff on the main website. The current version lives here.

I started trying to trim it down and ended up with:

function(hljs) {
  return {
    keywords:
      'let in if then else case of where module import exposing ' +
      'type alias as port effect',
    contains: [
      hljs.COMMENT('--', '$'),
      hljs.COMMENT('{-', '-}', { contains: ['self'] }),
      {
        className: 'string',
        begin: '"""', end: '"""'
      },
      hljs.APOS_STRING_MODE
      hljs.QUOTE_STRING_MODE,
      hljs.C_NUMBER_MODE,
      {
        className: 'upper',
        begin: '\\b[A-Z][\\w]*',
        relevance: 0
      },
      {begin: '->|<-'} // No markup, relevance booster
    ],
    illegal: /;/
  };
}

I think it’d be cool to try to match what some of the editors do a bit more. E.g. List in types is a different color than Nothing in expressions.

Can someone try to go the rest of the way with this? Don’t worry about coordinating. Just do it if it seems fun.

Any recommendations for hosting elm examples?

via Elm Discourse - Latest posts by @joakin Joaquin on Fri, 17 Aug 2018 18:37:43 GMT

I usually use https://www.npmjs.com/package/gh-pages with the Command line utility docs method:

{
  "scripts": {
    "deploy": "gh-pages -d public"
  }
}

The definition of `validate` does not match its type annotation

via Elm Discourse - Latest posts by @zinggi on Fri, 17 Aug 2018 18:35:57 GMT

Without seeing the User type it’s a bit hard to make a guess, but it seems like User takes two parameters, not just one.
Assuming you have something like: type alias User = { kind: Kind, role: Role }
then validate is missing the field role.

So it should probably be:

validate : Validation CustomError User
validate =
  succeed User
    |> andMap (field "user[kind]" validateKind)
    |> andMap (field "user[role]" validateRole)

Or a constant field or whatever you need for the “role” field.

 newer latest older