Re: [elm-discuss] Re: Help with Jupyter/IPython notebook kernel for Elm

2017-05-03 Thread Austin Bingham
me know if i can help with anything- doug > > > On Monday, March 27, 2017 at 2:10:33 PM UTC-4, Austin Bingham wrote: >> >> Hi everyone, >> >> I started hacking a bit today on a Jupyter notebook kernel for elm. You >> can see it here: >> >> https

Re: [elm-discuss] Re: Help with Jupyter/IPython notebook kernel for Elm

2017-04-10 Thread Austin Bingham
t seen it, check > it out: https://nteract.io/ > It mimics Jupyter as a desktop application, so you do not need a server. > > > On Monday, March 27, 2017 at 12:10:33 PM UTC-6, Austin Bingham wrote: > > Hi everyone, > > I started hacking a bit today on a Jupyter no

[elm-discuss] Elm kernel for Jupyter

2017-04-10 Thread Austin Bingham
I'm happy to announce that the Elm kernel for Jupyter is ready for use (by the adventurous, at least). You can get it here: https://github.com/abingham/jupyter-elm-kernel There's still a fair amount of work to do on it, but it's at the point where I think it'll benefit greatly from feedback. Id

[elm-discuss] Re: Elm events 2017

2017-04-05 Thread Austin Bingham
If you're still building this list, I've got an Elm talk at ACCU: https://conference.accu.org/site/stories/2017/sessions.html#XFunctionalProgrammingfortheWebwithElm Also, it looks like there is both an Elm workshop and a talk at NDC Oslo: http://ndcoslo.com/ In case you never got an answer to y

[elm-discuss] Re: Help with Jupyter/IPython notebook kernel for Elm

2017-03-28 Thread Austin Bingham
ascript works, them Elm > should also work. Perhaps it is already possible... import elm.js... > hmmm... I don't know. > > Sorry, if this post isn't directly related to Jupyter and your challenge > to integrate Elm in Jupyter. > > Op maandag 27 maart 2017 20:10:33

[elm-discuss] Re: Help with Jupyter/IPython notebook kernel for Elm

2017-03-28 Thread Austin Bingham
javascript seem to be available in the calling context. Maybe this is the nature of eval(), but I'm not sure. The "ReferenceError" I reported initially seems to actually come from when I try to use the "Elm" object to embed the app in a DOM object. On Monday, March 2

[elm-discuss] Help with Jupyter/IPython notebook kernel for Elm

2017-03-27 Thread Austin Bingham
Hi everyone, I started hacking a bit today on a Jupyter notebook kernel for elm. You can see it here: https://github.com/abingham/jupyter-elm-kernel It doesn't quite work yet, though, and I think I need help from someone who knows javascrip

[elm-discuss] Parsing AsciiDoc with Elm

2017-03-03 Thread Austin Bingham
Hi all, I'm looking for a way to parse and display AsciiDoc text in an elm app, similar to how evancz/elm-markdown handles markdown. I'm pretty sure I could knock something together myself (by copying the approach in elm-markdown and using asciidoctor.js), but I wanted to first see if anyone k

[elm-discuss] Re: webpack hotloading: compile errror leads to loss of state

2017-02-25 Thread Austin Bingham
Is this with elm-webpack-loader, or some other package? I use elm-webpack-loader and the webpack-dev-server, and it definitely recovers after a broken compilation. You can see my configuration here if that helps: https://github.com/abingham/accu-2017-elm-app On Saturday, February 25, 2017 at 4:

Re: [elm-discuss] Mysterious failure to find packages during compilation

2017-02-22 Thread Austin Bingham
Sorry, I should have mentioned that originally. Yes, deleting elm-stuff was the first thing we tried. On Wednesday, February 22, 2017 at 11:16:37 PM UTC+1, Noah Hall wrote: > > Did you try deleting the `elm-stuff `folder and trying again? > > On Wed, Feb 22, 2017 at 6:11 PM, Au

[elm-discuss] Mysterious failure to find packages during compilation

2017-02-22 Thread Austin Bingham
I'm trying to sort out a compilation problem that I (really, a friend trying to use my code) is seeing. In a nutshell, when he compiles my project he sees this: ERROR in ./src/Main.elm Module build failed: Error: Compiler process exited with error Compilation failed Could not find package

[elm-discuss] Re: Guidance for using "type alias" vs. single-constructor union types

2017-01-16 Thread Austin Bingham
Ah ha! That bit of syntax is exactly what I was looking for. That get's me a lot of what I was hoping for. Regarding the use of helper functions, I agree in principle. But in my particular case, at least, I think it's mostly an academic issue. I want to distinguish between various "classes" of

[elm-discuss] Re: Guidance for using "type alias" vs. single-constructor union types

2017-01-16 Thread Austin Bingham
voiding-primitives-in-elm > > cheers > - magnus > > > > On Monday, 16 January 2017 09:40:13 UTC+1, Austin Bingham wrote: >> >> I recently had to chase down a bug where I was calling a function with >> the arguments in the wrong order. The function's declared

[elm-discuss] Guidance for using "type alias" vs. single-constructor union types

2017-01-16 Thread Austin Bingham
I recently had to chase down a bug where I was calling a function with the arguments in the wrong order. The function's declared argument types were each an alias for string, so the compiler happily let me swap them. In order to avoid this in the future, I'm experimenting with using single-cons

Re: [elm-discuss] Cmd.andThen

2016-11-30 Thread Austin Bingham
As a relative newcomer to Elm, the impression I have is that Cmd is "special" and really part of the underlying runtime world. Maybe this is a misconception, but the impenetrability of Cmd gives it that sense. At the same time, Task is accessible, well supported, and put forward as the proper way t

Re: [elm-discuss] Re: Passing properties as arguments to messages?

2016-11-22 Thread Austin Bingham
elm-monocle) to see one approach that might > appeal to you. > > > This is pretty cool. I've often made setter functions for my records, > wrapping around Elm's regular update syntax. I didn't realize that it's > part of a larger class of patterns. > >

Re: [elm-discuss] Re: Passing properties as arguments to messages?

2016-11-22 Thread Austin Bingham
You might look at lenses (e.g. elm-monocle) to see one approach that might appeal to you. Lenses are apparently frowned upon by some, but I think they capture the essence of what you're asking. On Tue, Nov 22, 2016 at 4:04 PM Wouter In t Velt wrote: > Op dinsdag 22 november 2016 15:55:25 UTC+1 s

Re: [elm-discuss] Re: Errors when using Chart.js in a port subscription

2016-11-13 Thread Austin Bingham
That definitely looks like it would address the issues I'm seeing. Thanks for pointing it out! ‪On Sun, Nov 13, 2016 at 12:53 AM ‫أحمد حبنكة‬‎ wrote:‬ > > > بتاريخ الأربعاء، 9 نوفمبر، 2016 10:11:06 ص UTC+2، كتب Austin Bingham: > > I'm trying to use Chart.js from my elm

Re: [elm-discuss] Re: Errors when using Chart.js in a port subscription

2016-11-09 Thread Austin Bingham
heh...that episode was next in my podcast queue! I'll give it a listen. Thanks! On Wednesday, November 9, 2016 at 10:19:09 PM UTC+1, Rolf Sievers wrote: > > The lastest Elm Town Podcast did discuss JS interop and also mentioned > waiting for the dom to update. > > They suggest you wait for the n

Re: [elm-discuss] Re: Errors when using Chart.js in a port subscription

2016-11-09 Thread Austin Bingham
e on more robust implementations. Austin On Wednesday, November 9, 2016 at 11:50:03 AM UTC+1, Austin Bingham wrote: > > There does seem to be some effect related to the timing of dom rendering, > but it's not really clear what it is. If I add a setTimeout on the js > function, the ver

Re: [elm-discuss] Re: Errors when using Chart.js in a port subscription

2016-11-09 Thread Austin Bingham
ct, so that you allow elm time to render the div ? > > -magnus > > > > > On Wednesday, 9 November 2016 09:11:06 UTC+1, Austin Bingham wrote: > > I'm trying to use Chart.js from my elm app, and I'm running into some > errors that I can't sort out. In sho

[elm-discuss] Errors when using Chart.js in a port subscription

2016-11-09 Thread Austin Bingham
I'm trying to use Chart.js from my elm app, and I'm running into some errors that I can't sort out. In short, I've got a elm-to-javascript port that takes in a data structure describing the chart I want to draw. Then on the javascript side I've got a subscription to that port that renders that char

Re: [elm-discuss] Re: How do you test a TEA `update` function?

2016-11-07 Thread Austin Bingham
I asked more or less the same question about a month ago and got no responses: https://www.reddit.com/r/elm/comments/593vua/how_to_test_the_complete_update_cycle/ https://groups.google.com/d/msg/elm-discuss/634UXiZjRFQ/lVeDED1oBQAJ The only practical answer right now seems to be to use elm-t

[elm-discuss] How to test the complete update cycle

2016-10-20 Thread Austin Bingham
This has been discussed a bit before , I think, but I couldn't find any real solution. I'm trying to understand how to test my update function, and in particular how to test it when one call may produce new Cmds which I also want

[elm-discuss] Re: Generating a batched Cmd of more than one msg from Task.perform

2016-10-19 Thread Austin Bingham
nesday, October 19, 2016 at 12:41:08 PM UTC+1, Austin Bingham wrote: >>> >>> I don't think I follow your logic. If my task produced a batch Cmd >>> somehow (I'm not even sure how I would do that) >>> >> >> You need to figure out how to do t

[elm-discuss] Re: Generating a batched Cmd of more than one msg from Task.perform

2016-10-19 Thread Austin Bingham
f the puzzle. On Wednesday, October 19, 2016 at 3:05:11 PM UTC+2, Rupert Smith wrote: > > On Wednesday, October 19, 2016 at 12:41:08 PM UTC+1, Austin Bingham wrote: >> >> I don't think I follow your logic. If my task produced a batch Cmd >> somehow (I'm not even su

Re: [elm-discuss] Re: Generating a batched Cmd of more than one msg from Task.perform

2016-10-19 Thread Austin Bingham
.) ... > msgs)? > > Then when you call Task.perform you make it generate a *single* Msg that > is a Several [msg1, msg2] value. That way, you do have the “production of > two messages” at the place you want it expressed. > ​ > > 2016-10-19 13:51 GMT+02:00 Austin Bingham &g

[elm-discuss] Re: Generating a batched Cmd of more than one msg from Task.perform

2016-10-19 Thread Austin Bingham
Simon wrote: > > Sounds like you a recursively apply the update function, and that sounds > like pretty solid functional programming > > > On Wednesday, 19 October 2016 11:51:16 UTC+2, Austin Bingham wrote: >> >> Is there a way to make Task.perform produce a batched "

[elm-discuss] Re: Generating a batched Cmd of more than one msg from Task.perform

2016-10-19 Thread Austin Bingham
> > On Wednesday, October 19, 2016 at 10:51:16 AM UTC+1, Austin Bingham wrote: >> >> Is there a way to make Task.perform produce a batched "Cmd msg" on >> success (or failure, for that matter)? I've got a case where, on success, I >> want to send out mo

[elm-discuss] Generating a batched Cmd of more than one msg from Task.perform

2016-10-19 Thread Austin Bingham
Is there a way to make Task.perform produce a batched "Cmd msg" on success (or failure, for that matter)? I've got a case where, on success, I want to send out more than one Msg, but because the success handler for Task.perform can only generate one msg this isn't straightforward. What I'm doin

Re: [elm-discuss] Properly using Task.perform with tasks that always succeed

2016-10-15 Thread Austin Bingham
Brilliant, thanks! On Sat, Oct 15, 2016 at 8:06 PM Janis Voigtländer < janis.voigtlaen...@gmail.com> wrote: > The function from that thread exists as > http://package.elm-lang.org/packages/NoRedInk/elm-task-extra/2.0.0/Task-Extra#performFailproof > > > > Am 15.10.2016

[elm-discuss] Properly using Task.perform with tasks that always succeed

2016-10-15 Thread Austin Bingham
I've got a situation where I've got task that will always succeed, and I want to know the best practice for using it with Task.perform. The task itself is a Task.sequence of tasks that may individually fail, and I want to report the result - success or failure - for each of them. So there's no