Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-04-11 14:45:12 ulfryk joins (~ulfryk@2a01:4b00:872d:e600:a55a:b8e3:54cc:d8d6)
2021-04-11 14:48:10 kaction joins (~kaction@pool-96-255-101-159.washdc.fios.verizon.net)
2021-04-11 14:49:55 × ulfryk quits (~ulfryk@2a01:4b00:872d:e600:a55a:b8e3:54cc:d8d6) (Ping timeout: 260 seconds)
2021-04-11 14:50:23 kuribas joins (~user@ptr-25vy0i7appkeq6vlzis.18120a2.ip6.access.telenet.be)
2021-04-11 14:50:49 ulfryk joins (~ulfryk@2a01:4b00:872d:e600:a55a:b8e3:54cc:d8d6)
2021-04-11 14:50:58 <kuribas> is there a way to generate javascript?
2021-04-11 14:51:02 <kuribas> I wanted to use Aeson, but that doesn't allow inline javascript...
2021-04-11 14:51:31 × dexterlb quits (~dexterlb@2a01:9e40:2:2::2) (Quit: Boing)
2021-04-11 14:51:45 <kuribas> Some hack on top of Aeson is also possible.
2021-04-11 14:52:08 <kuribas> Maybe some clever search replace in the JSON...
2021-04-11 14:53:28 × shalokshalom quits (~quassel@2a02:1748:dd5e:7f60:cf49:8384:7c93:3106) (Quit: https://quassel-irc.org - Komfortabler Chat. Überall.)
2021-04-11 14:55:06 × kaction quits (~kaction@pool-96-255-101-159.washdc.fios.verizon.net) (Remote host closed the connection)
2021-04-11 14:55:11 Alleria joins (~textual@zrcout.mskcc.org)
2021-04-11 14:55:29 × ulfryk quits (~ulfryk@2a01:4b00:872d:e600:a55a:b8e3:54cc:d8d6) (Ping timeout: 258 seconds)
2021-04-11 14:55:35 Alleria is now known as Guest3534
2021-04-11 14:56:13 idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
2021-04-11 14:57:46 × Pickchea quits (~private@unaffiliated/pickchea) (Ping timeout: 268 seconds)
2021-04-11 14:57:51 jakalx parts (~jakalx@base.jakalx.net) ("Error from remote client")
2021-04-11 14:57:55 × slaterr quits (~bc8134e3@217.29.117.252) (Quit: quit)
2021-04-11 15:00:42 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-04-11 15:01:22 <__minoru__shirae> kuribas: what happens to the generated javascript after it is generated?
2021-04-11 15:01:35 <kuribas> __minoru__shirae: rendered on a webpage
2021-04-11 15:01:58 <__minoru__shirae> do you bundle all the javascript into one file, or do you add each script to the page manually
2021-04-11 15:02:26 <__minoru__shirae> because you can simply create a script and add it to the page manually
2021-04-11 15:02:34 × myShoggoth quits (~myShoggot@75.164.73.93) (Ping timeout: 260 seconds)
2021-04-11 15:03:29 <kuribas> __minoru__shirae: sadly it has to be in the json
2021-04-11 15:03:42 <kuribas> __minoru__shirae: http://www.alpacajs.org/docs/api/events.html
2021-04-11 15:04:03 <kuribas> shatters my idea of a nice declarative UI :-(
2021-04-11 15:05:22 × son0p quits (~ff@181.136.122.143) (Ping timeout: 252 seconds)
2021-04-11 15:05:50 dexterlb joins (~dexterlb@2a01:9e40:2:2::2)
2021-04-11 15:09:28 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
2021-04-11 15:10:36 <__minoru__shirae> kuribas: why generate javascript?
2021-04-11 15:10:57 <kuribas> __minoru__shirae: did you click the link?
2021-04-11 15:11:02 <__minoru__shirae> yes
2021-04-11 15:11:10 <kuribas> there you see the javascript?
2021-04-11 15:11:31 <__minoru__shirae> I mean, you want something like macros for js?
2021-04-11 15:11:49 <__minoru__shirae> yes, I see the js there
2021-04-11 15:12:22 <kuribas> no, I want to generate the javascript
2021-04-11 15:12:54 <kuribas> I am making combinators for generating these config.
2021-04-11 15:13:10 <kuribas> Which was nice using Aeson, but the Javascript is problematic.
2021-04-11 15:13:11 × hpc quits (~juzz@ip98-169-35-13.dc.dc.cox.net) (Ping timeout: 240 seconds)
2021-04-11 15:14:29 nbloomf joins (~nbloomf@2600:1700:ad14:3020:392f:8948:67b:8e77)
2021-04-11 15:15:14 <__minoru__shirae> you can parameterize some js function with something that changes and then call that function with different parameters
2021-04-11 15:15:23 hpc joins (~juzz@ip98-169-35-13.dc.dc.cox.net)
2021-04-11 15:15:24 average joins (uid473595@gateway/web/irccloud.com/x-kahrnfsnbzakrhmz)
2021-04-11 15:15:53 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2021-04-11 15:16:17 <__minoru__shirae> I mean, instead of generating "x + y", you can create function plus(x, y) and then call it
2021-04-11 15:16:37 <__minoru__shirae> that's why I'm asking: why generate js?
2021-04-11 15:17:09 <kuribas> I don't how that solves anything...
2021-04-11 15:19:59 <kuribas> maybe I'll generate some pattern, like "$postRenderFunction$", then replace it in the generated ByteString
2021-04-11 15:22:41 <kuribas> I could use language-ecmascript-0.19.1.0, but that's not very convenient.
2021-04-11 15:27:16 <kuribas> oh wait, I can separate the javascript and JSON...
2021-04-11 15:27:52 <kuribas> then I generate the separately, and just use string concatination...
2021-04-11 15:29:52 × raym quits (~ray@45.64.220.116) (Quit: leaving)
2021-04-11 15:31:12 kritzefitz joins (~kritzefit@212.86.56.80)
2021-04-11 15:32:02 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
2021-04-11 15:32:08 Tario joins (~Tario@201.192.165.173)
2021-04-11 15:36:15 <__minoru__shirae> so you want to generate "json with functions" using something on top of json converter library
2021-04-11 15:36:40 <kuribas> yeah
2021-04-11 15:38:44 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:392f:8948:67b:8e77) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-04-11 15:39:00 × notzmv quits (~zmv@unaffiliated/zmv) (Read error: Connection reset by peer)
2021-04-11 15:39:35 <__minoru__shirae> I doubt that those libraries provide an API for inlining functions into json
2021-04-11 15:39:58 nut joins (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2021-04-11 15:40:11 × aveltras quits (uid364989@gateway/web/irccloud.com/x-bzwnkfqpsbcsteyn) (Quit: Connection closed for inactivity)
2021-04-11 15:41:05 <__minoru__shirae> what if you approach the problem from the other end?
2021-04-11 15:43:02 <__minoru__shirae> you can create some translation layer to js, so that you send proper json and then translate it to whatever alpaca wants
2021-04-11 15:43:05 <kuribas> __minoru__shirae: I'll use ByteString.++ :-)
2021-04-11 15:43:14 × rdivyanshu quits (uid322626@gateway/web/irccloud.com/x-axpcumsbabjjlcuo) (Quit: Connection closed for inactivity)
2021-04-11 15:43:54 Guest35219 joins (~zmv@unaffiliated/zmv)
2021-04-11 15:43:57 jakalx joins (~jakalx@base.jakalx.net)
2021-04-11 15:44:01 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-04-11 15:44:03 × jophish__ quits (ca536851@202.83.104.81) (Ping timeout: 240 seconds)
2021-04-11 15:44:08 × Guest35219 quits (~zmv@unaffiliated/zmv) (Remote host closed the connection)
2021-04-11 15:44:28 pavonia joins (~user@unaffiliated/siracusa)
2021-04-11 15:44:51 cfricke joins (~cfricke@unaffiliated/cfricke)
2021-04-11 15:45:13 notzmv- joins (~zmv@unaffiliated/zmv)
2021-04-11 15:45:30 notzmv- is now known as notzmv
2021-04-11 15:45:49 <__minoru__shirae> I mean, instead of calling "$("#field1").alpaca({"some json with functions": ""})"
2021-04-11 15:46:11 <__minoru__shirae> you call $("#field1").alpaca(translate({"some proper json":""}))
2021-04-11 15:46:51 × xff0x quits (~xff0x@2001:1a81:5278:bf00:86d4:8676:2f4e:4222) (Ping timeout: 260 seconds)
2021-04-11 15:46:52 <__minoru__shirae> the difference is calling "translate" function
2021-04-11 15:47:11 × gdude2002 quits (~gdude2002@178.239.168.171) (Ping timeout: 240 seconds)
2021-04-11 15:47:46 xff0x joins (~xff0x@port-92-193-213-105.dynamic.as20676.net)
2021-04-11 15:48:49 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
2021-04-11 15:48:54 <kuribas> ah I see what you mean.
2021-04-11 15:49:05 <kuribas> yeah, that could work
2021-04-11 15:49:40 <kuribas> I could separate the JSON as much as possible with some custom javascript.
2021-04-11 15:50:07 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 265 seconds)
2021-04-11 15:50:19 coot joins (~coot@37.30.50.130.nat.umts.dynamic.t-mobile.pl)
2021-04-11 15:51:59 <kuribas> Then I never need to generate javascript, I just make a single javascript function, which I put into a haskell string.
2021-04-11 15:54:00 <kuribas> That soulds like the best plan.
2021-04-11 15:56:40 renzhi joins (~renzhi@2607:fa49:653f:a800::4223)
2021-04-11 16:00:03 × jerin quits (jerinmatri@gateway/shell/matrix.org/x-zeozwveuydonwzcq) (Quit: Idle for 30+ days)
2021-04-11 16:00:29 Rudd0 joins (~Rudd0@185.189.115.108)
2021-04-11 16:04:23 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-04-11 16:05:38 lemmih_ joins (~lemmih@58.182.184.138)
2021-04-11 16:06:16 average parts (uid473595@gateway/web/irccloud.com/x-kahrnfsnbzakrhmz) ()
2021-04-11 16:06:46 chenshen joins (~chenshen@2620:10d:c090:400::5:b6af)
2021-04-11 16:07:10 × lemmih quits (~lemmih@2406:3003:2072:44:194c:74d8:3073:4082) (Ping timeout: 258 seconds)
2021-04-11 16:09:10 × amiri quits (~amiri@cpe-76-91-154-9.socal.res.rr.com) (Remote host closed the connection)

All times are in UTC.