Logs: freenode/#haskell
| 2020-09-26 06:11:26 | <Guest26> | sorry |
| 2020-09-26 06:11:35 | <dsal> | Most of my stuff is readings I pick up via mqtt and write to influxdb (using github.com/dustin/influxer ) |
| 2020-09-26 06:11:40 | → | ggole joins (~ggole@2001:8003:8119:7200:7423:d49d:a274:5670) |
| 2020-09-26 06:11:48 | <dsal> | If my network wakes up, I'll try to pull up a dashboard. |
| 2020-09-26 06:13:09 | <dsal> | Here's a small dashboard of my car from a recent drive: https://snapshot.raintank.io/dashboard/snapshot/biEthNTKdEOHlOrgIpnrcUFjQljRrQTF |
| 2020-09-26 06:13:38 | <fraktor> | Yo I gotta ask, why |
| 2020-09-26 06:13:45 | <Guest26> | im not quite sure what im looking at here |
| 2020-09-26 06:14:03 | <Guest26> | either the github or the graphana dashboard |
| 2020-09-26 06:14:08 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-26 06:14:18 | <fraktor> | This is a dashboard for the various metrics that were collected from dsal's car |
| 2020-09-26 06:14:18 | <dsal> | This is one of my haskell MQTT servers: https://snapshot.raintank.io/dashboard/snapshot/nvP6u1KXnbrd0fY9RFz2qCYvBe4YHUsy |
| 2020-09-26 06:14:52 | <Guest26> | it seems like this is very powerful visualisation. it could be perfect - the bit im not sure about now is the databasing |
| 2020-09-26 06:14:53 | <dsal> | fraktor: people mock my Car monad, but the Car monad serves me well. |
| 2020-09-26 06:15:11 | <Guest26> | what does its join instance do!? |
| 2020-09-26 06:15:13 | <dsal> | This is backed by nifluxdb. My programs just dump stuff into influxdb. |
| 2020-09-26 06:15:25 | <dsal> | Crashes cars! |
| 2020-09-26 06:15:27 | → | mpereira joins (~mpereira@2a02:810d:f40:d96:5151:9344:10a3:da64) |
| 2020-09-26 06:16:00 | <Guest26> | makes a train? |
| 2020-09-26 06:16:03 | <alexm_> | @pl score c = Score . fromMaybe 0 $ lookup c score |
| 2020-09-26 06:16:04 | <lambdabot> | score = fix (((Score . fromMaybe 0) .) . flip lookup) |
| 2020-09-26 06:16:08 | <fraktor> | The way that Grafana works is that you create graphs that are associated with queries, and then the results of those queries are used in the visualization. So you can have the same underlying data and change the query to visualize the same data in a different way without modfying your program. |
| 2020-09-26 06:16:12 | <dsal> | It mainly just holds the state and pushes stuff through. e.g. https://dustin.github.io/tesla/Tesla-Car-Command-Alerts.html |
| 2020-09-26 06:16:45 | <dsal> | heh, if pl gives you fix, you should win a prize. |
| 2020-09-26 06:16:57 | <Guest26> | hmm, it seems like i would have to learn graphana before i could get this up and running |
| 2020-09-26 06:17:10 | <dsal> | What would you prefer to learn? |
| 2020-09-26 06:17:12 | <fraktor> | It's very easy to get started with, especially compared to writing your own visualization |
| 2020-09-26 06:17:17 | <fraktor> | @pl |
| 2020-09-26 06:17:18 | <lambdabot> | (line 1, column 1): |
| 2020-09-26 06:17:18 | <lambdabot> | unexpected end of input |
| 2020-09-26 06:17:18 | <lambdabot> | expecting white space, "()", natural, identifier, lambda abstraction or expression |
| 2020-09-26 06:17:24 | <fraktor> | What is @pl? |
| 2020-09-26 06:17:35 | <Guest26> | i was hoping there might be a path of less resistance - i just needed a very simple plot - and if it can be haskell that would be better |
| 2020-09-26 06:17:44 | <Guest26> | i kind of wanted haskell html |
| 2020-09-26 06:17:50 | <dsal> | fraktor: pl is a pointfree converter. |
| 2020-09-26 06:17:58 | <dsal> | @pl f x = a x |
| 2020-09-26 06:17:59 | <lambdabot> | f = a |
| 2020-09-26 06:18:01 | <fraktor> | Guest26: Well, you'd need to write that yourself then, afaik. |
| 2020-09-26 06:18:11 | <Guest26> | thats what i was asking about |
| 2020-09-26 06:18:25 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2020-09-26 06:18:29 | <Guest26> | but yes, a very much more simple version of this is kind of what i was after |
| 2020-09-26 06:18:33 | <Guest26> | but written in haskell |
| 2020-09-26 06:19:06 | <dsal> | At some point, you have to make things a browser understands. |
| 2020-09-26 06:19:55 | × | mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-26 06:20:00 | → | mu__ joins (~mu@unaffiliated/mu) |
| 2020-09-26 06:20:20 | → | Omentiger joins (~Omentiger@cpe-24-25-246-129.hawaii.res.rr.com) |
| 2020-09-26 06:20:37 | <fraktor> | Also, I think that setting up a grafana dashboard would still be easier than writing a haskell program, even if a library for client-side visualization already existed? |
| 2020-09-26 06:20:42 | <Guest26> | perhaps it could be as simple as just displaying a jpg, but then i would need to use something like an external ploting program to produce this from input data |
| 2020-09-26 06:20:54 | × | Faker quits (bad2e02e@186.210.224.46) (Ping timeout: 245 seconds) |
| 2020-09-26 06:21:08 | <Guest26> | oh, and then it wouldnt refresh properly |
| 2020-09-26 06:21:25 | <Guest26> | fraktor: im not sure that it would |
| 2020-09-26 06:21:30 | <fraktor> | Grafana is probably the most robust solution |
| 2020-09-26 06:21:31 | <dsal> | jpg is the worst format for displaying data |
| 2020-09-26 06:21:36 | <fraktor> | At least use PNG |
| 2020-09-26 06:21:42 | <Guest26> | sorry... |
| 2020-09-26 06:21:52 | <fraktor> | No, it's okay! We're just thinking about what would annoy us as users |
| 2020-09-26 06:21:56 | <dsal> | heh |
| 2020-09-26 06:22:04 | <Guest26> | oh! it wasnt for an actual webpage |
| 2020-09-26 06:22:06 | <dsal> | dumb peeves |
| 2020-09-26 06:22:15 | <Guest26> | i mean, not for comercial use |
| 2020-09-26 06:22:24 | <fraktor> | Even as an internal user I would be annoyed |
| 2020-09-26 06:22:32 | <Guest26> | i just wanted to be able to quickly refresh the graph of some data i was generating |
| 2020-09-26 06:22:48 | <dsal> | this problem has been solved so many ways, it's weird to even talk about it. |
| 2020-09-26 06:22:52 | <Guest26> | there is something nice about the low latency of the html solution |
| 2020-09-26 06:23:00 | → | justan0theruser joins (~justanoth@unaffiliated/justanotheruser) |
| 2020-09-26 06:23:04 | <fraktor> | Also dsal, I don't know what to ask about first: the fact that you have a dashboard of metrics for your Tesla, or the fact that it's called "Muad'Dib." Do you have a spice-powered car? |
| 2020-09-26 06:23:08 | <dsal> | what's low latency about htlm? |
| 2020-09-26 06:23:22 | <fraktor> | Guest26: I mean, Grafana automatically refreshes stuff, and you don't have to refresh the whole page |
| 2020-09-26 06:23:22 | <dsal> | fraktor: haha. I was reading Dune when I got it. |
| 2020-09-26 06:23:46 | <dsal> | fraktor: I like collecting data, though. |
| 2020-09-26 06:23:55 | <Guest26> | hmm, i think i should probably insist on the approach that doesnt use the third party tool |
| 2020-09-26 06:24:09 | <fraktor> | You do you |
| 2020-09-26 06:24:14 | <Guest26> | im specifically trying to write a webpage with a very simple graph |
| 2020-09-26 06:24:18 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-26 06:24:20 | <Guest26> | and my main concern is the database |
| 2020-09-26 06:24:40 | <Guest26> | im not sure if inflixdb is best - maybe thats just good for graphana |
| 2020-09-26 06:24:49 | <fraktor> | Do you want to keep old data around for a while? Or can it be discarded? |
| 2020-09-26 06:25:02 | × | justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 246 seconds) |
| 2020-09-26 06:25:25 | <dsal> | I wrote a tool called 'influxer' that writes stuff from mqtt to influxdb, and a tool called outfluxer that runs influxdb queries and spits out mqtt topics. |
| 2020-09-26 06:25:46 | <dsal> | Lets me make easy dashboards on my phone that tell me current things like how much energy I've generated today so far. |
| 2020-09-26 06:26:05 | × | TooDifficult quits (~TooDiffic@139.59.59.230) (Ping timeout: 240 seconds) |
| 2020-09-26 06:26:07 | <Guest26> | the database should persist in memory - but i can write these to special .dat files, and then just have another program mirroring these on to the database, that shouldnt be too hard, the main point is having it as something that can be easily queried by the HTML page |
| 2020-09-26 06:26:15 | <Guest26> | i dont want to be writing fancy HTML |
| 2020-09-26 06:26:37 | → | isovector1 joins (~isovector@172.103.216.166) |
| 2020-09-26 06:26:46 | <fraktor> | You're going to have to write something to do the plot? |
| 2020-09-26 06:26:53 | <Guest26> | yes |
| 2020-09-26 06:27:11 | <Guest26> | but i was hoping there would be html or js solutions |
| 2020-09-26 06:27:28 | <Guest26> | not sure how difficult it would be to use them with a haskell webpage though |
| 2020-09-26 06:27:39 | <dsal> | fraktor: For a good time, you can see my influxer confs. Gets a few fun things I can plot in grafana, but the tool also stores the whole captured state periodically: https://gist.github.com/dustin/3015d0dee2b5cee3ce8b2d1895aee144 |
| 2020-09-26 06:27:52 | → | oxide joins (~lambda@unaffiliated/mclaren) |
| 2020-09-26 06:28:16 | <dsal> | I realized looking at this that one of my mqtt servers isn't storing its stats. :( |
| 2020-09-26 06:28:25 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2020-09-26 06:29:04 | <fraktor> | Guest26: There are Javascript libraries that do graphs and so on |
| 2020-09-26 06:29:10 | × | isovector1 quits (~isovector@172.103.216.166) (Client Quit) |
| 2020-09-26 06:29:11 | <Guest26> | this is what i used to get a html thing working; https://ocharles.org.uk/posts/2013-12-19-websockets.html |
| 2020-09-26 06:29:16 | <fraktor> | But if you want a pre-built solution in HTML/JS that can do visualizations... Grafana |
| 2020-09-26 06:29:31 | <Guest26> | but thats not a haskell program |
| 2020-09-26 06:29:31 | × | mu__ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-26 06:29:34 | <dsal> | Now you're getting into websockets? |
| 2020-09-26 06:29:52 | <Guest26> | that was just a simple web example |
| 2020-09-26 06:29:55 | <fraktor> | ...Why does it have to be a Haskell program? So that you don't need the database? |
All times are in UTC.