Re: [elm-discuss] Re: Randoms as LazyLists

2017-12-31 Thread 'Rupert Smith' via Elm Discuss
On Saturday, December 16, 2017 at 9:27:28 PM UTC, Mark Hamburg wrote: > > One can return a partial function application and it looks just like any > other function, so in the general case, it can't be garbage collected. This > isn't special to JavaScript. In fact, JavaScript doesn't support part

Re: [elm-discuss] Re: Randoms as LazyLists

2017-12-13 Thread 'Rupert Smith' via Elm Discuss
On Saturday, December 9, 2017 at 2:13:18 AM UTC, Mark Hamburg wrote: > > Functions get garbage collected. Otherwise think what would happen every > time you use partial function application or define a function within a let > or other nested context. Because those functions (can) capture values,

Re: [elm-discuss] Re: Randoms as LazyLists

2017-12-08 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, December 6, 2017 at 2:38:09 AM UTC, GordonBGood wrote: > > Meanwhile the memoized Lazy type library really is needed, else there is > no way to implement memoization without custom JavaScript, which is frowned > upon. > I think you make a good case for keeping it in Gordon. When I

Re: [elm-discuss] Re: Randoms as LazyLists

2017-12-08 Thread 'Rupert Smith' via Elm Discuss
On Friday, December 8, 2017 at 5:55:36 AM UTC, Mark Hamburg wrote: > > Functions are also heap allocated objects and reference other objects — > e.g., decoders — just like other objects do. > But presumably functions do not get garbage collected? -- You received this message because you are sub

Re: [elm-discuss] Re: Randoms as LazyLists

2017-12-07 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, December 5, 2017 at 5:16:22 PM UTC, Mark Hamburg wrote: > > If you have a recursive JSON structure to decode, then the decoder either > needs to refer to itself (a cycle) or it needs to generate a new decoder on > each recursive step. > There is a difference between a function that i

[elm-discuss] Re: Approval Queue and Moderation Slowdowns

2017-11-30 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, November 29, 2017 at 8:06:58 PM UTC, Brian Hicks wrote: > > The current candidate is Discourse. > It sounds like a great idea. There is a need for slower and less chat based discussion than Slack, that maintains a free searchable history. If you are putting in the work to give us t

Re: [elm-discuss] Re: Randoms as LazyLists

2017-11-30 Thread 'Rupert Smith' via Elm Discuss
On Thursday, November 30, 2017 at 10:29:42 AM UTC, Rupert Smith wrote: > > I need to use Decode.lazy to do this. Is that memoized? Is that how > decoders can create recursive values? Other than that, I don't see how they > could. > Do you need to start with a recursive object in Javascript, the

Re: [elm-discuss] Re: Randoms as LazyLists

2017-11-30 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 27, 2017 at 9:06:38 PM UTC, Mark Hamburg wrote: > > Recursive decoders have the same issues. > I'll see if I can get my head around that. I use recursive decoders to decode JSON into recursive types, but the values I output from this are not recursive. I did not realize it i

Re: [elm-discuss] Re: Randoms as LazyLists

2017-11-27 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 27, 2017 at 4:33:57 PM UTC, Mark Hamburg wrote: > > That page already has an example built using the decoder APIs so unless > something is changing to disallow the creation of such cyclic decoders, > cycles remain. > I'm looking at the page. I don't see a cyclic example buil

Re: [elm-discuss] Re: Randoms as LazyLists

2017-11-27 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 27, 2017 at 7:50:01 AM UTC, Mark Hamburg wrote: > > P.S. Cyclic structures can be avoided by having the compiler perform a > strongly connected component analysis (e.g., using Tarjan's algorithm) and > disallowing any SCC's that include anything other than function > definit

Re: [elm-discuss] Re: Array map with start and end

2017-11-23 Thread 'Rupert Smith' via Elm Discuss
On Thursday, November 23, 2017 at 2:28:50 AM UTC, Matthieu Pizenberg wrote: > > > Could JsArray.elm by made to work with JavaScript typed arrays? >> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays >> > > That was exactly what I was wondering. I peaked at the elm and kernel co

Re: [elm-discuss] Re: Array map with start and end

2017-11-22 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, November 21, 2017 at 10:47:02 AM UTC, Robin Heggelund Hansen wrote: > > Something like > https://github.com/Skinney/core/blob/master/src/Elm/JsArray.elm ? It's > what is used as the basis for Arrays in 0.19. It is not planned to be > opened for use outside of elm-lang/core, but if

Re: [elm-discuss] Re: Array map with start and end

2017-11-21 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 20, 2017 at 5:29:25 PM UTC, Francisco Ramos wrote: > > Ultimately, I'd like to rewrite NumElm using the elm-ndarray. Not sure how > I'm gonna do this without writing kernel code. Linear algebra operations > such as Inverse, Pseudo-inverse, Singular value decomposition, Eigenva

[elm-discuss] Re: Decoding a json property with different types of values

2017-11-20 Thread 'Rupert Smith' via Elm Discuss
On Friday, November 17, 2017 at 3:19:55 PM UTC, Thiago Temple wrote: > > I have situation where I have to a jso object similar to this > > { "level": 1, "displayValue": "some text", "dataValue": "a string with > the value" } > > { "level": 1, "displayValue": "some text", "dataValue": { "name": "xx

Re: [elm-discuss] Re: Randoms as LazyLists

2017-11-20 Thread 'Rupert Smith' via Elm Discuss
On Friday, November 17, 2017 at 1:25:02 PM UTC, GordonBGood wrote: > > The rational to depreciating these seems to be performance when applied to > their limited use in tests and I see that, as I tried to make changes to > Lazy that would improve its lack of performance when run on some JavaScrip

[elm-discuss] Re: Array map with start and end

2017-11-17 Thread 'Rupert Smith' via Elm Discuss
On Friday, November 17, 2017 at 8:25:22 AM UTC, Francisco Ramos wrote: > > Hi there, > > Was wondering how I can map over an array with a start and end indexes. I > know I could slice the array and then map, but performance is a concern and > slicing is O(N) where N = end - start, plus the actual

[elm-discuss] Re: Randoms as LazyLists

2017-11-14 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 13, 2017 at 11:48:19 PM UTC, GordonBGood wrote: > > The LazyList library as it exists is seriously flawed as it crashes for > many cases for infinite length lazy lists, which is probably why there is > that caution. Please see my extensive PR which fixes almost every function

Re: [elm-discuss] Re: Randoms as LazyLists

2017-11-14 Thread 'Rupert Smith' via Elm Discuss
On Monday, November 13, 2017 at 5:49:32 PM UTC, art yerkes wrote: > > 'iterate' is the right way to do what you're looking for. No idea why > they chose to expose that. > > generate : Generator a -> Seed -> LazyList a > generate generator seed = > let start = Random.step generator seed in >

[elm-discuss] Re: Randoms as LazyLists

2017-11-13 Thread 'Rupert Smith' via Elm Discuss
On Saturday, November 11, 2017 at 6:33:34 PM UTC, art yerkes wrote: > > I always interpreted the warning in the documentation as "Don't use the > name LazyListView or the Nil and Cons constructors, instead using head, > tail and headAndTail for most pattern matchng". I think it makes sense not

[elm-discuss] Re: Randoms as LazyLists

2017-11-10 Thread 'Rupert Smith' via Elm Discuss
On Friday, November 10, 2017 at 4:45:54 PM UTC, Rupert Smith wrote: > > The function uses the exposed Lazy.List.LazyListView type, which I would > rather avoid if it makes sense to: > The documentation says: "It is not recommended to work with this type directly. Try working solely with the pro

[elm-discuss] Randoms as LazyLists

2017-11-10 Thread 'Rupert Smith' via Elm Discuss
I have a function that takes a random Generator and turns it into a LazyList. The reason for this is so that I can combine random streams together with other lazy streams that I have using the Lazy.List library. The function uses the exposed Lazy.List.LazyListView type, which I would rather avo

[elm-discuss] Re: Json.Decode without failing on the first error?

2017-11-09 Thread 'Rupert Smith' via Elm Discuss
On Thursday, November 9, 2017 at 2:39:45 PM UTC, Ilias Van Peer wrote: > > Yeah, I did that some time ago - > package.elm-lang.org/packages/zwilias/json-decode-exploration/latest > > Demo here, the very last one in the output is a scenario not unlike yours > :) https://ellie-app.com/3vVLfrNDnSXa1

[elm-discuss] Re: Expanding competence

2017-11-09 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, November 8, 2017 at 6:18:39 AM UTC, David Legard wrote: > > Many thanks for that recommendation. > > Yes, it is the back-end part that I was concerned about. > Try this, makes it easy to get started with Elm on AWS, and it can run locally too: https://github.com/ktonon/elm-serverle

[elm-discuss] Re: What build system do you prefer for Elm?

2017-11-07 Thread 'Rupert Smith' via Elm Discuss
On Sunday, November 5, 2017 at 8:19:37 AM UTC, Simon wrote: > > I use my own starter, which includes hot reloading: > https://github.com/simonh1000/elm-webpack-starter > I'm intrigued to try hot reloading. Does it only work if you don't change the type of the Model? -- You received this messa

Re: [elm-discuss] Re: The NumPy for Elm

2017-11-03 Thread 'Rupert Smith' via Elm Discuss
On Friday, November 3, 2017 at 10:06:49 AM UTC, Francisco Ramos wrote: > > Sounds good. Remember, I built NumElm with Machine Learning algorithms in > mind. So I added mostly the functionality used in such algorithms. > I suppose polynomial fitting is a kind of machine learning. I am a little b

Re: [elm-discuss] Re: The NumPy for Elm

2017-11-03 Thread 'Rupert Smith' via Elm Discuss
On Thursday, November 2, 2017 at 5:28:15 PM UTC, Francisco Ramos wrote: > > Hey Rupert, > > Let me have a look when I have a little bit of time and I'll get back to > you. > > Fran > I will also have a go at implementing the polynomial stuff in my own Plynomials.elm built on top of what NumElm

[elm-discuss] Re: ELM = JAVASCRIPT REINVENTED (PART 1)

2017-11-03 Thread 'Rupert Smith' via Elm Discuss
On Friday, November 3, 2017 at 4:08:37 AM UTC, Richard Feldman wrote: > > Any ways in which Elm's design resembles JS are almost certainly > coincidental! No programmers were harmed in the making of this movie... -- You received this message because you are subscribed to the Google Groups "El

[elm-discuss] Re: The NumPy for Elm

2017-11-02 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, November 1, 2017 at 8:38:48 PM UTC, Rupert Smith wrote: > > How would I write a curve fitting alrogithm with this? So I have a 3rd > order polynomial: > > y = a + b.x + c.x^2 + d.x^3 > > and some linear algebra on 100 data points will yield values for a, b, c > and d. I'll post up t

[elm-discuss] Re: Multiple "Middleware" pattern instead of single *.program

2017-11-02 Thread 'Rupert Smith' via Elm Discuss
On Thursday, November 2, 2017 at 12:09:55 AM UTC, Martin Janiczek wrote: > > >1. Is this a good idea at all? > > Having stacked a few programs together by hand, this strikes me as an excellent idea and one that is worth exploring. One problem I had was with TimeTravel.program which I was wrap

[elm-discuss] Re: The NumPy for Elm

2017-11-01 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, October 31, 2017 at 12:32:06 PM UTC, Francisco Ramos wrote: > > https://github.com/jscriptcoder/numelm > > Please, any feedback would be highly appreciated. > So, I have a project at work where we are using NumPy running on AWS. I have been looking into how to write AWS Lambda functio

Re: [elm-discuss] The NumPy for Elm

2017-10-31 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, October 31, 2017 at 12:42:07 PM UTC, Peter Damoc wrote: > > Hi Fran, > > I would be interested in seeing performance benchmarks agains NumPy. > I'm expecting NumElm to be worse but I'm curious how much worse it is. :) > > In any case, congrats for creating this! > I'm expecting the

[elm-discuss] What build system do you prefer for Elm?

2017-10-31 Thread 'Rupert Smith' via Elm Discuss
I've been using grunt up until now. Looking into webpack at the moment as a few github projects I've been looking at use it. Anyone got any thoughts on the advantages/disadvantages of the various possibility wrt Elm? -- You received this message because you are subscribed to the Google Groups

[elm-discuss] Re: Higher-order functions with a function using an extensible record?

2017-10-11 Thread 'Rupert Smith' via Elm Discuss
On Sunday, October 8, 2017 at 6:48:39 PM UTC+1, art yerkes wrote: > > It's a niggle, but I think it's more correct to say that type inference > isn't completely decidable in the presence of subtyping. > Fair enough. Even with subtyping, it is sometimes obvious that a type can still be correctly

[elm-discuss] Re: Elm feasibility for large, complex desktop browser application with dependencies on many newer web APIs

2017-10-11 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, October 10, 2017 at 8:55:44 PM UTC+1, Gareth Ari Aye wrote: > > * react and redux for managing components and application state > This is the part that is most like Elm, so you might consider porting that to Elm first? -- You received this message because you are subscribed to the

Re: [elm-discuss] Re: Easy way to set up a caching proxy for github to make elm-install run faster?

2017-10-11 Thread 'Rupert Smith' via Elm Discuss
On Friday, October 6, 2017 at 3:42:20 PM UTC+1, Chad Woolley wrote: > > I asked Evan about this at last week's ElmConf, and he said in the next > release of Elm, there will be changes that make it easier to cache > dependencies which have previously been downloaded. > Yes, elm-install already do

[elm-discuss] Re: Higher-order functions with a function using an extensible record?

2017-10-06 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 4, 2017 at 3:19:45 PM UTC+1, Rémi Lefèvre wrote: > > When I try to build this code: > > type alias Named a = >{ a | name : Maybe String } > > getName : Named a -> Maybe String > getName { name } = >name > > type Element >= AnElement { name : Maybe String } >| A

[elm-discuss] Re: Easy way to set up a caching proxy for github to make elm-install run faster?

2017-10-06 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, October 4, 2017 at 5:02:30 AM UTC+1, Gusztáv Szikszai wrote: > > I suppose another way would be to modify elm-install such that it take a >> command line argument that tells it to skip checking for updates. Maybe -o >> for offline mode. >> > There is one it's the --skip-update I've

[elm-discuss] Re: Easy way to set up a caching proxy for github to make elm-install run faster?

2017-10-03 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, October 3, 2017 at 4:32:09 PM UTC+1, Rupert Smith wrote: > > I tend to use elm-install to manage my package dependencies, as it also > caches them locally. However, it needs to reach out to github to check for > any updates, each time it is run. I am working on a slow internet > conn

[elm-discuss] Easy way to set up a caching proxy for github to make elm-install run faster?

2017-10-03 Thread 'Rupert Smith' via Elm Discuss
I tend to use elm-install to manage my package dependencies, as it also caches them locally. However, it needs to reach out to github to check for any updates, each time it is run. I am working on a slow internet connection some of the time. Does anyone know of an easy way to set up a caching p

[elm-discuss] Re: elm-outdated

2017-10-01 Thread 'Rupert Smith' via Elm Discuss
On Saturday, September 30, 2017 at 6:27:24 PM UTC+1, Fedor Nezhivoi wrote: > > Hi folks! > > Those of you who are writing production applications probably have to look > after outdated dependencies from time to time. Usually it’s a bit of a pain > since there is no built-in way in elm-package to

[elm-discuss] Re: Issues with drag & drop (also reproducible in drag example on elm website)

2017-09-25 Thread 'Rupert Smith' via Elm Discuss
On Friday, September 15, 2017 at 12:27:27 PM UTC+1, Jan Hrček wrote: > > I suspect that this behavior has something to do with text withing the > dragged element's inner text being selectable. > When I add the following style attributes to the drag example, I can no > longer reproduce the issue n

[elm-discuss] Re: Issues with drag & drop (also reproducible in drag example on elm website)

2017-09-25 Thread 'Rupert Smith' via Elm Discuss
On Friday, September 15, 2017 at 12:27:27 PM UTC+1, Jan Hrček wrote: > > I've been figthing with the following drag and drop issue: when performing > multiple drag & drop operations in rapid succession it sometimes happes > that drag is in progress, even though my mouse key is up. > Also happen

Re: [elm-discuss] Strange compiler error - cannot find a field that is obviously there.

2017-09-11 Thread 'Rupert Smith' via Elm Discuss
On Monday, September 11, 2017 at 6:39:32 PM UTC+1, Ian Mackenzie wrote: > > Have you added type annotations to all top-level functions/values? My > first guess would be some sort of type inference issue that's propagating > across files, which can usually be narrowed down by explicitly annotating

Re: [elm-discuss] Strange compiler error - cannot find a field that is obviously there.

2017-09-08 Thread 'Rupert Smith' via Elm Discuss
On Friday, September 8, 2017 at 7:52:34 PM UTC+1, Eelco Hoekema wrote: > > That absolutely looks like you still some old compiled stuff lying around > somewhere. What happens if you copy the code to a clean directory, run > elm-package install again? > I have been deleting 'elm-stuff', is there

[elm-discuss] Re: Strange compiler error - cannot find a field that is obviously there.

2017-09-08 Thread 'Rupert Smith' via Elm Discuss
On Friday, September 8, 2017 at 10:47:04 AM UTC+1, Rupert Smith wrote: > > I fixed the code so that the Account model has the uuid field, and the > module which depends on that also now has the uuid field. A clean compiler > run with elm-stuff deleted says that the dependant module has an extra

[elm-discuss] Re: Strange compiler error - cannot find a field that is obviously there.

2017-09-08 Thread 'Rupert Smith' via Elm Discuss
On Friday, September 8, 2017 at 9:37:16 AM UTC+1, Rupert Smith wrote: > > On Friday, September 8, 2017 at 9:35:14 AM UTC+1, Rupert Smith wrote: >> >> Has anyone seen an error like this before? I don't see it in the github >> elm-compiler issues, so I though I might try and put together an SSCCE fo

[elm-discuss] Re: Strange compiler error - cannot find a field that is obviously there.

2017-09-08 Thread 'Rupert Smith' via Elm Discuss
On Friday, September 8, 2017 at 9:35:14 AM UTC+1, Rupert Smith wrote: > > Has anyone seen an error like this before? I don't see it in the github > elm-compiler issues, so I though I might try and put together an SSCCE for > it. Which I may manage to do, if my hypothese > Which I may manage to d

[elm-discuss] Strange compiler error - cannot find a field that is obviously there.

2017-09-08 Thread 'Rupert Smith' via Elm Discuss
When I try to compile this: module Model exposing (..) type Account = Account { uuid : String , username : Maybe String , password : Maybe String , root : Maybe Bool , id : Maybe String } accountEncoder : Account -> Encode.Value accountEncod

[elm-discuss] Elm and Swagger - what is currently available?

2017-09-07 Thread 'Rupert Smith' via Elm Discuss
Swagger is a data model that describes a REST API, the URLs of endpoints and json-schemas describing the json that they accept or produce. I didn't find anything in package.elm-lang.org relating to it. I did find this github project which implements a CLI for converting a Swagger .json into Elm

[elm-discuss] Re: Elm as templating engine

2017-09-04 Thread 'Rupert Smith' via Elm Discuss
On Sunday, September 3, 2017 at 12:18:26 AM UTC+1, Birowsky wrote: > > Trying to use elm as a templating engine for AMP pages. But they have > specific requirements where I need to specify attributes without values. Is > that possible with some elm construct? > > https://www.ampproject.org/docs/

Re: [elm-discuss] Elm with one message

2017-08-24 Thread 'Rupert Smith' via Elm Discuss
On Thursday, August 24, 2017 at 8:47:24 AM UTC+1, Peter Damoc wrote: > > Without using Cmds and/or Subs it is an interesting approach if you use > it for managing very small bits of state (the open/close status of a > dropdown) but I'm afraid that it might bring performance problems if you > us

Re: [elm-discuss] best practices for handling unreachable code, i.e., how to handle situations where runtime assertions would be used in other languages

2017-08-22 Thread 'Rupert Smith' via Elm Discuss
On Monday, August 21, 2017 at 9:41:55 PM UTC+1, Dave Doty wrote: > > But it does make me long for runtime exceptions for those errors where you > know that not only the current function, but also any function that may > have called it, really isn't going to be able to do any error-handling or >

[elm-discuss] Re: elm-format did something change?

2017-08-16 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, August 15, 2017 at 11:37:12 PM UTC+1, Francesco Orsenigo wrote: > > I suppose the question is, is there a consensus on which version is >> considered to be the most 'definitive' for 0.18 code? >> > > The last one. > Other than that, or what you consider "last" there is no consensus and

Re: [elm-discuss] Re: elm-format did something change?

2017-08-16 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, August 16, 2017 at 6:49:25 AM UTC+1, Aaron VonderHaar wrote: > > As I get closer to the 1.0 release, I've been trying to figure out how we > can still get user feedback for future format changes. So the plan is to > have -exp releases that have features that may change or be remove

[elm-discuss] Re: elm-format did something change?

2017-08-15 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, August 15, 2017 at 11:11:07 AM UTC+1, Rupert Smith wrote: > > I am just wondering if I should update all public repositories that I > maintain to match the latest version of elm-format? Otherwise we have to > keep turning off elm-format-on-save to make nice diffs. > I suppose the que

[elm-discuss] Re: elm-format did something change?

2017-08-15 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, August 15, 2017 at 11:18:23 AM UTC+1, Rupert Smith wrote: > > On Tuesday, August 15, 2017 at 11:11:07 AM UTC+1, Rupert Smith wrote: >> >> I recently did a full upgrade and re-installed my whole system, including >> elm, atom and elm-format. I notice now that when I save files elm-forma

[elm-discuss] Re: elm-format did something change?

2017-08-15 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, August 15, 2017 at 11:11:07 AM UTC+1, Rupert Smith wrote: > > I recently did a full upgrade and re-installed my whole system, including > elm, atom and elm-format. I notice now that when I save files elm-format is > giving a huge diff compared with what I had before, particularly arou

[elm-discuss] elm-format did something change?

2017-08-15 Thread 'Rupert Smith' via Elm Discuss
I recently did a full upgrade and re-installed my whole system, including elm, atom and elm-format. I notice now that when I save files elm-format is giving a huge diff compared with what I had before, particularly around comments. A little example: {-| Username and password based login credent

[elm-discuss] Re: Using extensible records for optional attributes?

2017-08-14 Thread 'Rupert Smith' via Elm Discuss
On Wednesday, August 2, 2017 at 4:17:49 AM UTC+1, Mike Austin wrote: > > I'm curious if it's possible to use extensible records for HTML attributes > instead of lists of function application such as [id "foo", class "bar"]? > I've poked around a bit, but didn't find too much on specifically this.

[elm-discuss] Re: Drawing Directed Graphs (?) in Elm

2017-08-11 Thread 'Rupert Smith' via Elm Discuss
On Monday, August 7, 2017 at 2:34:37 PM UTC+1, Michael Jones wrote: > > Thank you for the suggestions. My concerns are inline with Steve > Schafer's. I would like a dominantly vertical alignment with a clear > structured hierarchy spreading evenly left & right rather than an organic > circular s

Re: [elm-discuss] Local third-party packages

2017-07-04 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, July 4, 2017 at 7:27:10 AM UTC+1, Peter Damoc wrote: > > On Mon, Jul 3, 2017 at 4:15 PM, Jens Egholm > wrote: > >> Just a thought; shouldn't this be available through native Elm package >> management? >> >> > NO! > > This kind of unsafe use of code is and should forever be discourag

[elm-discuss] Re: Looking for pretty printers written in Elm?

2017-07-03 Thread 'Rupert Smith' via Elm Discuss
On Monday, July 3, 2017 at 6:17:22 PM UTC+1, Max Goldstein wrote: > > Can you please tell us more about what you are trying to pretty print > (JSON?) and why (restraints, assumptions, etc)? To begin with Java code, XML, Elm code. I do a lot of stuff with code generators and currently use someth

[elm-discuss] Looking for pretty printers written in Elm?

2017-07-03 Thread 'Rupert Smith' via Elm Discuss
There is this one, which I would need to upgrade from 0.17: http://package.elm-lang.org/packages/vilterp/elm-pretty-print/1.0.1 Any others? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails

Re: [elm-discuss] any editor supports elm simple whole-buffer reformat?

2017-07-03 Thread 'Rupert Smith' via Elm Discuss
On Monday, July 3, 2017 at 7:55:41 AM UTC+1, Zachary Kessin wrote: > > I have found elm and emacs work just fine it just takes some fine tuning > Care to share some of your emacs configuration? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To

Re: [elm-discuss] Re: How to manage long running computations in Elm?

2017-07-03 Thread 'Rupert Smith' via Elm Discuss
On Monday, July 3, 2017 at 9:42:09 AM UTC+1, Jakub Hampl wrote: > > In JS, you could measure the time of each iteration and then only do so > many that it would fit into a “frame budget” (so < 16ms, or if you are > updating the DOM you would probably only spend say 10ms). However, I’m not > sure

[elm-discuss] Re: How to manage long running computations in Elm?

2017-07-02 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Friday, June 30, 2017 at 9:43:51 AM UTC+1, Jakub Hampl wrote: > > One way of approaching this is to show the user progress in an interesting > way. In this example > , the > computation that calculates the final layout of a netwo

Re: [elm-discuss] any editor supports elm simple whole-buffer reformat?

2017-07-02 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Saturday, July 1, 2017 at 1:33:04 AM UTC+1, Raoul Duke wrote: > > Thanks! I did do that. Did sorta get it working in emacs mode! But > overall it didn't / doesn't seem to work so well, as I said -- wonky > UX. Now hoping for something that really just works out of the box > w/out any extra co

[elm-discuss] Re: elm-mdl only one dialog per application?

2017-07-02 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Saturday, July 1, 2017 at 11:06:58 PM UTC+1, Christopher Roe wrote: > > Just in case this conversation is still active .. and following on from > OverMind's suggestion that the Dialog interface be redrawn to match the > current need for user input via a dialog ... If I have 2 buttons visible o

Re: [elm-discuss] Re: elmq - is it a worthwhile abstraction or not?

2017-06-21 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Monday, June 19, 2017 at 11:15:26 PM UTC+1, Rupert Smith wrote: > > On Friday, June 16, 2017 at 5:27:37 PM UTC+1, Mark Hamburg wrote: >> >> All that said, I think elmq is really interesting for the case where the >> interaction isn't hierarchical. >> > > Yes. In my case I have the Auth module,

Re: [elm-discuss] Re: elmq - is it a worthwhile abstraction or not?

2017-06-19 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Friday, June 16, 2017 at 5:27:37 PM UTC+1, Mark Hamburg wrote: > > All that said, I think elmq is really interesting for the case where the > interaction isn't hierarchical. > Yes. In my case I have the Auth module, and other modules using it, which are typically structured like this: Main

[elm-discuss] Re: elmq - is it a worthwhile abstraction or not?

2017-06-16 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Friday, June 16, 2017 at 12:04:48 PM UTC+1, Rupert Smith wrote: > > As above, make my own ElmqMessage type and pull the routing logic out of > the effects module. This would result in a message router that retains the > dynamic routing capability, should anyone ever need such a thing. > This

[elm-discuss] elmq - is it a worthwhile abstraction or not?

2017-06-16 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
By writing this post, I may answer my own question, but anyway your opinions appreciated as always. === What is it? As I have posted on here before, I pulled this library: https://github.com/rupertlssmith/elmq Out of the elm-ui code here: https://github.com/gdotdesign/elm-ui The idea is that

Re: [elm-discuss] Add css classes to existing html nodes

2017-06-15 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Monday, June 12, 2017 at 8:03:41 AM UTC+1, Pi wrote: > > Hi Eike! > Have you had a look at the package pablohirafuji/elm-markdown? It's a pure > Elm implementation of a Markdown parser where you can customize how HTML > gets rendered. > See https://github.com/pablohirafuji/elm-markdown#customi

[elm-discuss] Re: How to manage long running computations in Elm?

2017-06-13 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, June 13, 2017 at 4:10:15 AM UTC+1, Matthieu Pizenberg wrote: > > On Wednesday, June 7, 2017 at 4:08:37 PM UTC+8, Rupert Smith wrote: >> >> On Tuesday, June 6, 2017 at 3:20:42 PM UTC+1, Rupert Smith wrote: >>> >>> The problem with long running computations in a single threaded UI is >>>

[elm-discuss] Re: How to manage long running computations in Elm?

2017-06-13 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, June 13, 2017 at 4:26:33 PM UTC+1, Vlad GURDIGA wrote: > > One thing that I think I would have tried in this case, it to delegate the > long running computation to a webworker > , and then talk with it through > a port. > Yes, and I see Rich

[elm-discuss] Re: Status update and multiple application servers

2017-06-10 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Friday, June 9, 2017 at 5:18:35 AM UTC+1, machinelea...@gmail.com wrote: > > Sorry I'm only a beginner and I need to understand this thing at the level > of software architecture. > > If I'm not wrong, status management (or more generally application logic) > is implemented in Elm on server s

[elm-discuss] Re: How to manage long running computations in Elm?

2017-06-07 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, June 6, 2017 at 3:20:42 PM UTC+1, Rupert Smith wrote: > > The problem with long running computations in a single threaded UI is that > they may cause the UI to block and become unresponsive for a period. > Definitely not an acceptable user experience. > > I have created a library for

[elm-discuss] How to manage long running computations in Elm?

2017-06-06 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
The problem with long running computations in a single threaded UI is that they may cause the UI to block and become unresponsive for a period. Definitely not an acceptable user experience. I have created a library for helping with AI-type searches. This provides a 'next' function that steps th

[elm-discuss] Re: Force directed graph drawing in Elm

2017-05-29 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Sunday, May 28, 2017 at 1:03:05 PM UTC+1, Jan Hrček wrote: > > Would some of you find such library useful? If so what functionality it > should provide? > > My idea for the functionality provided by the library would be this: > > What you provide: > - a graph with some data (probably based on

Re: [elm-discuss] Re: Implementing websocket-based protocol - lessons learned

2017-05-23 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, May 23, 2017 at 3:30:44 PM UTC+1, Christophe de Vienne wrote: > > It is what I did at first, but it has serious drawbacks. The biggest was > that a subscription implies an update of the Nats state... so I had to > push the state to all the update functions and they had to sent it > b

[elm-discuss] Re: Best practices to create examples for an elm package?

2017-05-23 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Monday, May 8, 2017 at 3:38:55 PM UTC+1, Eirik Sletteberg wrote: > > Maybe write an example in the form of an integration test - then you know > your example will be up to date with the actual code, and it may even > discover bugs! I think there is an issue here that did not come up for disc

Re: [elm-discuss] Re: Implementing websocket-based protocol - lessons learned

2017-05-23 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, May 23, 2017 at 3:04:01 PM UTC+1, Christophe de Vienne wrote: > > A discussion around a concept of "middleware", able to define its own > Cmd and Sub that it could rewrite along with updating its own state > (which can be a part of the app model), would be interesting. > > Cmd and Su

Re: [elm-discuss] Re: Implementing websocket-based protocol - lessons learned

2017-05-23 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, May 23, 2017 at 3:06:29 PM UTC+1, Rupert Smith wrote: > > There was someone else who wrote a 'middleware' component for Elm, but did > it with 'out messages' instead of as an effect module. There was a routing > part that you put in you top-level update function. Let me see if I can

Re: [elm-discuss] Re: Implementing websocket-based protocol - lessons learned

2017-05-23 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, May 23, 2017 at 2:50:05 PM UTC+1, Rupert Smith wrote: > > I'm going to the upcoming Elm Europe conference, so I can talk to the core > devs there and see what they think of it. As I said before, perhaps its not > an 'architectural' direction that they like; on the other hand it does s

Re: [elm-discuss] Re: Implementing websocket-based protocol - lessons learned

2017-05-23 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Monday, May 22, 2017 at 4:08:13 PM UTC+1, Christophe de Vienne wrote: > > I should have had a better look at what elmq allowed indeed. > > That said until elmq (or something equivalent) is published on > package.elm-lang.org, we get a non-publishable package. > Yes, it would make your packag

Re: [elm-discuss] Idris holes - Thoughts for Elm?

2017-05-23 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, May 23, 2017 at 6:45:20 AM UTC+1, Aaron VonderHaar wrote: > > If you haven't seen it already, https://atom.io/packages/elmjutsu has > support for creating case statement scaffolds (search the README for > "Insert case/of") > Elmjutsu is also already making use of 'type holes' to infe

[elm-discuss] Re: Implementing websocket-based protocol - lessons learned

2017-05-22 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Monday, May 22, 2017 at 8:46:14 AM UTC+1, Christophe de Vienne wrote: > > * not being an effect module has clear pros : > - we can rely on other effect modules (in my case: WebSocket and > Random) > > * Being an effect module would allow a much simpler and natural API. > But then we

Re: [elm-discuss] Re: Implementing a protocol on top of WebSocket: should I build a effect module ?

2017-05-18 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Wednesday, May 17, 2017 at 5:02:55 PM UTC+1, Christophe de Vienne wrote: > > The main thing that bothers me is that I will need to pass the > Nats.State to every update function because subscribing requires an > update of the state... And I see no way to avoid that except using an > effect mo

[elm-discuss] Re: What heap implementations exist for Elm?

2017-05-17 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Wednesday, May 17, 2017 at 3:57:44 PM UTC+1, Rupert Smith wrote: > > On Wednesday, May 17, 2017 at 11:40:35 AM UTC+1, Rupert Smith wrote: >> >> http://package.elm-lang.org/packages/TSFoster/elm-heap/latest >> > > Bugger. This heap implementation does not allow and arbitrary comparison > functio

[elm-discuss] Re: What heap implementations exist for Elm?

2017-05-17 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Wednesday, May 17, 2017 at 11:40:35 AM UTC+1, Rupert Smith wrote: > > http://package.elm-lang.org/packages/TSFoster/elm-heap/latest > Bugger. This heap implementation does not allow and arbitrary comparison function. It has this: by : (a -> comparable) -> Options b -> Options a But that req

[elm-discuss] What heap implementations exist for Elm?

2017-05-17 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
I need a heap where I can supply my own ordering function: ordering : a -> a -> Order And be able to take the smallest item from the heap: Heap.least : Heap a -> a There is this one: http://package.elm-lang.org/packages/TSFoster/elm-heap/latest Any others? -- You received this message becau

[elm-discuss] Re: How would you code a search in Elm?

2017-05-16 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Saturday, May 13, 2017 at 11:40:59 PM UTC+1, Rupert Smith wrote: > > But I can see that I can build different searches over this state space by > replacing the explicit infinite listing of it. Instead defining a monad > that will give me operations to 'succeed' on a goal state and to list a >

[elm-discuss] Re: How would you code a search in Elm?

2017-05-13 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Thursday, May 11, 2017 at 11:01:51 AM UTC+1, Rupert Smith wrote: > > On Wednesday, May 10, 2017 at 5:07:29 PM UTC+1, Rupert Smith wrote: >> >> By search, I mean a backtracking search over a 'graph' of possibilities. >> > So I am starting to get my head around this. I had not come across the con

Re: [elm-discuss] Platform.Cmd.batch executes commands in reverse order

2017-05-12 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Friday, May 12, 2017 at 4:53:19 PM UTC+1, Peter Damoc wrote: > > The execution of a Cmd.batch list of commands has not ordering guarantee. > I suspect that whilst there is no ordering guarantee given, the actual implementation probably does a 'foldr' executing them in reverse order. This beh

[elm-discuss] Re: Linear algebra for 2d geometry?

2017-05-12 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Thursday, May 11, 2017 at 7:00:06 PM UTC+1, Ian Mackenzie wrote: > > I also cloned OpenSolid/svg and made a version that renders to >> elm-community/typed-svg. Once I have finished converting the docs, tests >> and examples you might like to clone it back again and publish it under >> OpenSol

[elm-discuss] Re: How would you code a search in Elm?

2017-05-11 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Wednesday, May 10, 2017 at 5:07:29 PM UTC+1, Rupert Smith wrote: > > By search, I mean a backtracking search over a 'graph' of possibilities. > > There is a well-known pretty printing library by Joh Hughes. It is for > Haskell but can be made to work on ML style languages by introducing some >

[elm-discuss] How would you code a search in Elm?

2017-05-10 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
By search, I mean a backtracking search over a 'graph' of possibilities. There is a well-known pretty printing library by Joh Hughes. It is for Haskell but can be made to work on ML style languages by introducing some laziness explicitly. Haskell is lazy by default, which is why it is not neede

[elm-discuss] Re: Local third-party packages

2017-05-09 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, May 9, 2017 at 8:36:37 AM UTC+1, Gusztáv Szikszai wrote: > > I'm glad it worked :) I need to figure out something for the install > problem though, probably will find an other place where the binary can be > stored. > Its strange that when running "npm install -g elm-github-install"

[elm-discuss] Re: Linear algebra for 2d geometry?

2017-05-09 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, May 9, 2017 at 10:25:11 AM UTC+1, Rupert Smith wrote: > > I also cloned OpenSolid/svg and made a version that renders to > elm-community/typed-svg. > Fork is here: https://github.com/rupertlssmith/svg -- You received this message because you are subscribed to the Google Groups "Elm

[elm-discuss] Re: Linear algebra for 2d geometry?

2017-05-09 Thread &#x27;Rupert Smith&#x27; via Elm Discuss
On Tuesday, May 9, 2017 at 2:46:06 AM UTC+1, Ian Mackenzie wrote: > > In general, yes, using matrices would likely be a bit more efficient, but > you can get pretty close using techniques like the above, and I think the > expressiveness/clarity/flexibility is better. > Thanks for this explanati

  1   2   3   4   5   6   7   >