[elm-discuss] Re: Status update and multiple application servers
Hi, Elm programs are compiled to JavaScript and run in the browser, not on the server. Elm provides libraries for using HTTP and WebSockets to exchange information with a server. Elm is just the programming language, so load balancing, application servers, and so on are out of scope for this group. Standard web application architecture practices apply. mch On Thursday, June 8, 2017 at 10:18:35 PM UTC-6, 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 side (as opposite to other JavaScript > frameworks running on client side). > > Then how is status consistency guaranteed in a professional enterprise > environment, in case of load balancing, multiple application servers, > etc... What if the previous message hits a server and the next another one? -- 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] Add css classes to existing html nodes
Hello Peter, thank you very much for your reply and example! I think option 2 doesn't work for me, because I render user input and using “real” html in markdown would defeat the purpose of creating tables with markdown. I also think, the first option is sadly not working for me either. I'm sorry for not being clear enough in my fist mail. I actually would like to add existing classes (i.e. the semantic-ui classes "ui table") to all tables that were generated by markdown. I don't want to mess with CSS myself (I'm not a frontend dev and really bad at it I'm afraid). I guess I could run via Elm's command external javascript that finds all tables within the markdown generated markup and then add these classes? I hoped I could stay within Elm, though. Kind regards Eike Am Freitag, 9. Juni 2017 07:46:01 UTC+2 schrieb Peter Damoc: > > Hi Eike and welcome to Elm. > > You could add some kind of a class to the div that's holding the markdown > generated html and use that as a selector. > > If you need something more complex than that, you might need to use html > inside the markdown > > Here is how to do both: > https://ellie-app.com/3r5tc7YsmmCa1/1 > > > > > On Fri, Jun 9, 2017 at 2:13 AM,wrote: > >> Hallo Elm users, >> >> I'm creating my first app with Elm, and I'm really enjoying it. I'm using >> the markdown package to generate html from user input. I'd like to add css >> classes to certain (i.e. to tables) elements generated by this library. I >> didn't find a way to do this. Is this possible? >> >> Thank you and regards >> Eike >> >> -- >> 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. >> > > > > -- > There is NO FATE, we are the creators. > blog: http://damoc.ro/ > -- 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] Is it possible to write a general tree-fold function?
I will add that you are using z when you define _l and _r but you only need to use it once. Also, a good test case is to write an in-order traversal on a binary search tree that will return the keys in sorted order. -- 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] explain how Task works
Process.sleep time is creating a Task that will be running for the duration of the time and then produce an empty tuple. Task.andThen is taking this produced task and after it finishes it calls the provided function (always <| Task.succeed msg) (always <| Task.succeed msg) is equivalent to (\_ -> Task.succeed msg) and is a function that ignores its argument and produces a Task that finishes immediately producing the provided msg. Task.perform identity takes the above produced Task and converts it to a Cmd. identity is defined as identity x = x this means that whatever is the result of the task will be the result of the Cmd. That being said, the function looks a little bit silly as the Task.andThen is redundant. It should have been: delay : Time -> msg -> Cmd msg delay time msg = Process.sleep time |> Task.perform (always msg) you can see it working here: https://ellie-app.com/3r6knRYxB2Za1/0 On Sun, Jun 4, 2017 at 3:56 PM,wrote: > Can you explain, at a beginner's level, how Task works in the following 2 > lines under Process.sleep ? > > > delay : Time.Time -> msg -> Cmd msg > delay time msg = > Process.sleep time > |> Task.andThen (always <| Task.succeed msg) > |> Task.perform identity > > Thanks > > -- > 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. > -- There is NO FATE, we are the creators. blog: http://damoc.ro/ -- 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] What is the Elm equivalent of a Data Specification Language (EDN in Closure, ADTs, etc)?
Hi Gaurav and welcome to Elm! Your intuition is correct, you should emphasize understanding the basic data structures and build something with them. If you have a concrete problem you are trying to solve you will be focusing on finding the solution. Without a concrete problem is tempting to go into your knowledge from other programming languages and try to understand Elm in terms of design. This path is less fun than the one where you implement something. Go through the guide: https://guide.elm-lang.org/ Play with the examples: http://elm-lang.org/examples One thing you could try, for example, is to use the field example and the http example together so that you can type the topic http://elm-lang.org/examples/field http://elm-lang.org/examples/http On Fri, May 26, 2017 at 3:57 PM, Gaurav Rampalwrote: > Hi, > > I am new to Elm, and thank you for your patience with my questions. > > Since the emphasis in functional languages is on keeping functions pure it > seems that an equivalent emphasis must be placed on structuring data. > > Formal computer science has ADT, Lisp has S-expressions, Clojure has EDN. > So what is the equivalent in Elm? Or should I emphasize understanding the > basic data structures and Union Types. > > Thanks > > Gaurav > > -- > 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. > -- There is NO FATE, we are the creators. blog: http://damoc.ro/ -- 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.