Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 219 220 221 222 223 224 225 226 227 228 229 .. 5022
502,152 events total
2020-09-26 06:30:03 <Guest26> i guess i could use yesod instead
2020-09-26 06:30:07 mu_ joins (~mu@unaffiliated/mu)
2020-09-26 06:30:11 <dsal> My mqtt client and server both support websockets. That's about all I know about WS. heh
2020-09-26 06:31:24 <Guest26> it doesnt have to be a haskell program - it just has to be simple enough code for me to understand, and haskell is a huge advantage in that
2020-09-26 06:31:52 <Guest26> the html used in o'charles blog post is very very simple, simple enough to understand even
2020-09-26 06:32:03 <Guest26> graphana however...
2020-09-26 06:32:18 <fraktor> I've never read HTML I couldn't understand. It's just markup
2020-09-26 06:32:39 <Guest26> well, anything except haskell is difficult for me to read
2020-09-26 06:33:03 <fraktor> Can you use WebSockets in HTML without Javascript?
2020-09-26 06:33:08 <fraktor> I haven't heard of that before
2020-09-26 06:33:15 <dsal> You can't use websockets in html at all.
2020-09-26 06:33:47 × sfvm quits (~sfvm@37.228.215.148) (Remote host closed the connection)
2020-09-26 06:33:47 <dsal> There's a javascript mechanism.
2020-09-26 06:33:57 <Guest26> whatever is the least sufficient way to convert it to haskell development, like a thin wrapper in HTML or something, thats fine, as long as it does not require any actual proficiency in the second language to maintain - thats why i cant do android
2020-09-26 06:34:15 <dsal> My GoPro interface was written in elm and I figured writing a websockets client would be easy there. It was silly hard.
2020-09-26 06:34:38 <fraktor> I mean, ports?
2020-09-26 06:34:40 <dsal> Having the haskell code write to WS via MonadLogger was tiny and boring.
2020-09-26 06:35:00 <Guest26> here is the code from that blog post example above if you want to see the HTML https://github.com/ocharles/blog/blob/master/code/2013-12-19-client.html
2020-09-26 06:35:05 <dsal> Guest26: You have no path that doesn't require learning.
2020-09-26 06:35:32 <Guest26> least sufficient HTML is preferred to graphana
2020-09-26 06:35:43 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-kucaomxlfuldfryc) (Quit: Connection closed for inactivity)
2020-09-26 06:36:14 <Guest26> its more transferable. if i learn how to do graphs with html and js and haskell, im sure thats a better approach
2020-09-26 06:36:16 <dsal> Do you even have a theoretical way to display a timeseries chart in HTML?
2020-09-26 06:36:26 <Guest26> arguably industry might prefer i use graphana.
2020-09-26 06:36:48 <fraktor> dsal: Why was the Elm client silly hard?
2020-09-26 06:37:03 <Guest26> dsal: no, but thats the perfect question
2020-09-26 06:37:23 <Guest26> i wonder if there is anything written using scotty that does that
2020-09-26 06:37:54 <dsal> fraktor: there's just no way to do websockets. Required lots of weird stuff in a third party library and javascript bridgy stuff to get working at all.
2020-09-26 06:38:23 × mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Ping timeout: 260 seconds)
2020-09-26 06:39:34 <fraktor> Oh yeah. You need ports and message conversion and stuff
2020-09-26 06:39:34 × mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer)
2020-09-26 06:39:35 mnrmnaugh joins (~mnrmnaugh@unaffiliated/mnrmnaugh)
2020-09-26 06:39:39 <Guest26> i suppose i could just send all the data through the websocket and not bother with the db
2020-09-26 06:39:59 mu_ joins (~mu@unaffiliated/mu)
2020-09-26 06:40:00 <fraktor> It's better now though https://github.com/elm-lang/websocket
2020-09-26 06:40:04 <Guest26> but thats not really "language independent"
2020-09-26 06:40:28 <Guest26> if i wrote it to SQL, then that R visualisation approach would work too...
2020-09-26 06:41:10 <Guest26> i guess with that design consideration im back considering SQL proper vs haskelly alternatives
2020-09-26 06:41:28 <Guest26> im not sure if they are as easy to query from some arbitrary endpoint language
2020-09-26 06:42:04 <Guest26> i can find this though; https://github.com/dleutnant/influxdbr
2020-09-26 06:42:10 <dsal> fraktor: hmm... That might be better.
2020-09-26 06:42:28 <Guest26> "R interface to InfluxDB"
2020-09-26 06:42:41 <Guest26> and then i guess i would want this in html aswell
2020-09-26 06:43:23 <dsal> I had to use some PortFunnel thing and a bunch of other junk.
2020-09-26 06:44:03 <fraktor> https://github.com/elm-community/js-integration-examples/tree/master/websockets
2020-09-26 06:44:11 <fraktor> This is apparently the preferred solution nowadays
2020-09-26 06:44:17 <Guest26> i might want to add a button or something, i dont know if i could do that with graphana
2020-09-26 06:44:28 hackage commandert 0.1.0.0 - A monad for commanders https://hackage.haskell.org/package/commandert-0.1.0.0 (sgschlesinger)
2020-09-26 06:44:31 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-26 06:44:36 <Guest26> and i might not want to be working in r if i want to start making it more complicated
2020-09-26 06:44:57 <Guest26> so i think a haskell html thing is really what i want, for the reason of customisability
2020-09-26 06:45:26 <Guest26> i might want to restart the simulation from different random initialisation for example
2020-09-26 06:45:35 <dsal> You want a thing you don't know anything at all about because it does all the things you can imagine. heh
2020-09-26 06:45:56 <dsal> fraktor: I guess I should update this gross stuff.
2020-09-26 06:45:57 <Guest26> well, thats why i want to have it written mostly in haskell
2020-09-26 06:46:31 <Guest26> so far it seems like databasing is only good for interfacing with R or graphana or such
2020-09-26 06:46:59 <Guest26> and that what i should really be asking is more to do with writing a simple graph in yesod or something
2020-09-26 06:47:07 <dsal> I gave a kid a 3D printer a few days ago. He was asking me whether he could make each of a long list of things. He just saw a tool come in that can make physical things, so he thinks of every physical thing and asks if it can make that thing.
2020-09-26 06:47:46 <Guest26> im justifying, with a good reason, why graphana isnt right for what i want to do
2020-09-26 06:48:18 <fraktor> You don't have to justify it to us
2020-09-26 06:48:22 <Guest26> while motivating why the approach i would prefer, is better
2020-09-26 06:48:31 <Guest26> ok, well i just thought id explain
2020-09-26 06:48:34 <dsal> Your reason is "I don't know anything about how web UIs work, but I can write something better than what everyone else uses once I learn it all."
2020-09-26 06:48:43 <Guest26> dsal: im happy for the kid that got the 3d printer
2020-09-26 06:48:45 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-09-26 06:49:05 × mu_ quits (~mu@unaffiliated/mu) (Quit: mu_)
2020-09-26 06:49:08 <EvanR> didn't you just explain 99.9% of where web UIs came from
2020-09-26 06:49:20 <EvanR> seems to work
2020-09-26 06:49:21 <Guest26> i dont need it to be "better" i just need it to support a graph, and a button
2020-09-26 06:49:39 <dsal> Heh, that's fair, EvanR
2020-09-26 06:49:41 <Guest26> and anything else i need to think of to mean graphana isnt going to do it!
2020-09-26 06:49:57 hackage commander-cli 0.8.0.0 - A command line argument/option parser library https://hackage.haskell.org/package/commander-cli-0.8.0.0 (sgschlesinger)
2020-09-26 06:50:02 <dsal> Guest26: but you don't have a working theory of what "a graph and a button" in haskell might look like.
2020-09-26 06:50:15 <dsal> Because you can't just throw haskell at a web browser and get that result.
2020-09-26 06:50:35 <dsal> You have to feed the browser a language it understands, or use an intermediary that someone has built for you.
2020-09-26 06:50:40 <Guest26> this is the question - and the graphana is a distraction from that ultimate goal
2020-09-26 06:50:47 <EvanR> a graph and a button is really easy with some javascript
2020-09-26 06:50:55 <dsal> e.g., ghcjs will *run* in a browser, but it won't magically make a functional UI.
2020-09-26 06:51:34 <Guest26> well then it seems like "no haskell for the web interface" is advocated
2020-09-26 06:51:56 <EvanR> if the goal is to use haskell that's another story
2020-09-26 06:52:15 <Guest26> it would be better if as much of it as possible was in the language i can actually write in
2020-09-26 06:52:35 × fxg quits (~fxg@unaffiliated/fxg) (Ping timeout: 240 seconds)
2020-09-26 06:52:57 hackage commander-cli 0.9.0.0 - A command line argument/option parser library https://hackage.haskell.org/package/commander-cli-0.9.0.0 (sgschlesinger)
2020-09-26 06:53:03 <Guest26> then the html could be as simple as just refreshing an image, and the haskell file then just has to write the graph to a .png
2020-09-26 06:53:28 <Guest26> and the button with simple websockets is basically all then covered by that o'charles blogpost
2020-09-26 06:53:34 <fraktor> dsal: Regarding PortFunnel, it looks like you wanted to take different kinds of websocket messages and turn them into different elm messages. Which I think you can do with a case statement in subscriptions?
2020-09-26 06:53:38 <dsal> Why websockets?
2020-09-26 06:53:48 × josh_ quits (~josh@c-67-164-104-206.hsd1.ca.comcast.net) (Remote host closed the connection)
2020-09-26 06:53:55 <Guest26> to send the data from the button to the running haskell program
2020-09-26 06:54:12 <dsal> fraktor: I spent a while trying to figure it out when I wrote that. A better answer would be great. This one also seems a little unreliable.
2020-09-26 06:54:22 josh_ joins (~josh@c-67-164-104-206.hsd1.ca.comcast.net)
2020-09-26 06:54:47 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-26 06:54:55 <Guest26> but then the problem is still, producing a png from the haskell data
2020-09-26 06:55:10 <Guest26> and then im back trying to send it through R
2020-09-26 06:55:17 <dsal> Guest26: why does the button have data? It's unclear what webockets does other than make the problem a lot harder.
2020-09-26 06:55:35 edwardk joins (sid47016@haskell/developer/edwardk)
2020-09-26 06:55:42 <dsal> I'm using websockets to stream MonadLogger messages to my web app as stuff happens.
2020-09-26 06:56:00 ChrisMarquardt joins (~ChrisMarq@84.39.117.57)
2020-09-26 06:56:41 snakemasterflex joins (~snakemast@213.100.206.23)
2020-09-26 06:56:43 × vicfred quits (~vicfred@unaffiliated/vicfred) (Remote host closed the connection)

All times are in UTC.