Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,803,043 events total
2021-07-20 09:19:15 zaquest joins (~notzaques@5.128.210.178)
2021-07-20 09:22:42 ukari joins (~ukari@user/ukari)
2021-07-20 09:23:56 peterhil joins (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi)
2021-07-20 09:26:48 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
2021-07-20 09:26:50 <arahael> Hmm, very much a newbie question: How do I run 'hprotoc' that is, I think, part of 'protocol-buffers'? How do I "install" it as part of my project?
2021-07-20 09:27:04 <arahael> I'm referring to this project, which is in hackage: https://github.com/k-bx/protocol-buffers
2021-07-20 09:28:47 × peterhil quits (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Ping timeout: 265 seconds)
2021-07-20 09:29:17 <dminuoso> arahael: Are you a cabal user? Stack user?
2021-07-20 09:30:23 <arahael> cabal.
2021-07-20 09:30:34 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
2021-07-20 09:30:49 <dminuoso> In which context do you want to run this?
2021-07-20 09:30:54 <dminuoso> From inside your haskell program?
2021-07-20 09:31:09 <maerwald> nova: haskell on gentoo's PM: clear no
2021-07-20 09:31:14 <arahael> Ah, no, I think I'd ideally want it pre-generated when compiling it.
2021-07-20 09:31:40 <arahael> Either as template-haskell, or well, plain old boring code generation.
2021-07-20 09:31:45 × fef_ quits (~thedawn@user/thedawn) (Ping timeout: 244 seconds)
2021-07-20 09:32:48 shailangsa joins (~shailangs@host86-186-142-108.range86-186.btcentralplus.com)
2021-07-20 09:33:00 <dminuoso> arahael: Use a custom Setup.hs
2021-07-20 09:33:34 <arahael> dminuoso: I've never done that.
2021-07-20 09:34:11 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-07-20 09:34:26 Axman682 joins (~Axman6@user/axman6)
2021-07-20 09:34:41 <dminuoso> arahael: See https://github.com/google/proto-lens/blob/master/proto-lens-setup/src/Data/ProtoLens/Setup.hs
2021-07-20 09:35:16 <dminuoso> Also https://github.com/google/proto-lens/blob/master/proto-lens-setup/package.yaml
2021-07-20 09:35:40 <arahael> dminuoso: I'm really just looking for the hprotoc at this stage. Just did a `find .* -iname 'hprotoc'`, after ensuring that 'protocol-buffers' is in my project dependencies and having done a `cabal build` first... But... There are no results.
2021-07-20 09:35:50 <dminuoso> arahael: Yes. Look at the links I just provided.
2021-07-20 09:36:10 <dminuoso> Perhaps just the second one.
2021-07-20 09:37:11 <arahael> dminuoso: Looks like I need to use a different package? Specifically proto-lens-protoc ?
2021-07-20 09:37:35 <dminuoso> No.
2021-07-20 09:37:52 × Axman6 quits (~Axman6@user/axman6) (Ping timeout: 246 seconds)
2021-07-20 09:37:56 Axman682 is now known as Axman6
2021-07-20 09:38:27 × ij quits (~ij@host-92-28-191-159.as13285.net) (Quit: Connection closed)
2021-07-20 09:39:30 Guest26 joins (~Guest26@114.244.68.126)
2021-07-20 09:40:44 <arahael> dminuoso: I'm not seeing anything in there that specifically installs protoc, though... But inferring from the docstrings in the Setup.hs file you've got there... It seems to throw an exception if it's not on the path?
2021-07-20 09:41:13 <arahael> This is line 9 of the Setup.hs file you've linked: -- These functions assume that the @proto-lens-protoc@ executable is on the
2021-07-20 09:41:51 <arahael> So I'm thinking hprotoc is an external dependency?
2021-07-20 09:42:18 euouae joins (~euouae@user/euouae)
2021-07-20 09:42:40 Guest26 is now known as Neunsburg
2021-07-20 09:43:17 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds)
2021-07-20 09:45:38 <dminuoso> arahael: You want to generate proto buffer definitions on the fly, fight?
2021-07-20 09:45:56 MQ-17J joins (~MQ-17J@8.21.10.15)
2021-07-20 09:46:28 <dminuoso> See https://hackage.haskell.org/package/proto-lens-setup (which is just the hackage version of the above link)
2021-07-20 09:47:05 <arahael> dminuoso: Lets restart, I've just discovered the readme.md file in that repository. And yes, I wanted to generate the haskell code for .proto files, however, I was looking specifically at protocol-buffers - the hackage package called "protocol-buffers". I think the one you've linked in is better and I should probably use that _instead_.
2021-07-20 09:47:42 <dminuoso> arahael: If you want to do this yourself, then my first link is relevant. :)
2021-07-20 09:47:47 <dminuoso> https://github.com/google/proto-lens/blob/master/proto-lens-setup/src/Data/ProtoLens/Setup.hs
2021-07-20 09:48:26 <arahael> dminuoso: The problem with seeing a few hundred lines of haskell is that I'm assuming I have to read, understand, and write that hundred or so lines!
2021-07-20 09:52:01 <Gurkenglas> what would be the modern way to build Dasher https://www.youtube.com/watch?v=nr3s4613DX8 in Haskell? Somethign something FRP?
2021-07-20 09:52:53 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-07-20 09:53:02 <dminuoso> arahael: So I'm not experienced enough to give you an accurate description. I'm very likely to mix up terms and say wrong thing about cabal-install, Cabal-the-library, Setup.hs and the build process.
2021-07-20 09:53:08 Axman69 joins (~Axman6@user/axman6)
2021-07-20 09:53:17 <dminuoso> But I can point you towards https://cabal.readthedocs.io/en/3.4/cabal-package.html#more-complex-packages
2021-07-20 09:53:22 <arahael> dminuoso: I'm really just trying to get hprotoc (or whatever it's called).
2021-07-20 09:53:31 <Taneb> Gurkenglas: I'm not convinced there is an Accepted answer for custom GUIs like that in Haskell but FRP seems a reasonable approach
2021-07-20 09:54:06 <Gurkenglas> what library would you recommend?
2021-07-20 09:54:49 <Taneb> I don't have any recommendations for this I'm afraid
2021-07-20 09:55:56 <arahael> dminuoso: Ok, it's definitely an external dependency: "First, install the "protoc" binary somewhere in your PATH. You can get it by following these instructions."
2021-07-20 09:56:19 <dminuoso> arahael: Well. If you want this to happen during build, you have to do this inside Setup.hs
2021-07-20 09:56:46 × Axman6 quits (~Axman6@user/axman6) (Ping timeout: 246 seconds)
2021-07-20 09:56:51 <dminuoso> And the easiest way is to depend on it via setup-depends
2021-07-20 09:56:58 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2021-07-20 09:57:11 <dminuoso> That way you have the library at your disposal, and you can just call into it via Haskell directly
2021-07-20 09:57:14 Axman69 is now known as Axman6
2021-07-20 09:57:29 <dminuoso> Pretty much like proto-lens-setup
2021-07-20 09:58:01 <dminuoso> Id really say carefully take a look at: https://github.com/google/proto-lens/blob/master/proto-lens-setup/src/Data/ProtoLens/Setup.hs
2021-07-20 09:59:26 <arahael> dminuoso: Why does it need the `findExecutableOrDie` function there?
2021-07-20 10:00:59 <dminuoso> arahael: Ahh!
2021-07-20 10:01:10 <dminuoso> proto-lens-protoc is an executable package, not a library package
2021-07-20 10:01:16 <dminuoso> So I guess there's that./
2021-07-20 10:01:38 <arahael> dminuoso: Not only that, but I suspect it's a "plugin" for the protoc application.
2021-07-20 10:01:55 <dminuoso> No, the dependency comes in via:
2021-07-20 10:02:00 × jmorris quits (uid433911@id-433911.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
2021-07-20 10:02:16 <dminuoso> https://github.com/google/proto-lens/blob/master/proto-lens-setup/package.yaml#L64
2021-07-20 10:02:37 <dminuoso> Which is an executable: https://github.com/google/proto-lens/blob/master/proto-lens-protoc/package.yaml#L28-L29
2021-07-20 10:03:53 <arahael> dminuoso: That executable is not called "protoc", though.
2021-07-20 10:04:47 <arahael> dminuoso: The readme.md of that project says, to run it manually, run: protoc --plugin=protoc-gen-haskell=`which proto-lens-protoc`--haskell_out=. foo.proto
2021-07-20 10:06:26 <Gurkenglas> Does FRP have any advantages over, say, gloss?
2021-07-20 10:07:40 Taneb is now known as nvd
2021-07-20 10:07:48 nvd is now known as Taneb
2021-07-20 10:08:44 × azeem quits (~azeem@dynamic-adsl-94-34-39-251.clienti.tiscali.it) (Ping timeout: 255 seconds)
2021-07-20 10:09:00 azeem joins (~azeem@176.201.1.101)
2021-07-20 10:09:48 × burnsidesLlama quits (~burnsides@dhcp168-011.wadham.ox.ac.uk) (Remote host closed the connection)
2021-07-20 10:10:30 <arahael> I'm also getting a warning: Unknown field: "build-tool-depends"
2021-07-20 10:11:07 × Neunsburg quits (~Guest26@114.244.68.126) (Ping timeout: 246 seconds)
2021-07-20 10:11:49 × gustik quits (~gustik@2a01:c844:2416:5920:437:26a4:3a9:3895) (Quit: Leaving)
2021-07-20 10:12:31 × azeem quits (~azeem@176.201.1.101) (Read error: Connection reset by peer)
2021-07-20 10:12:35 × xsperry quits (~as@user/xsperry) (Killed (NickServ (GHOST command used by asfswdf!~as@cpe-188-129-80-184.dynamic.amis.hr)))
2021-07-20 10:12:42 xsperry joins (~as@user/xsperry)
2021-07-20 10:12:43 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) (Read error: Connection reset by peer)
2021-07-20 10:13:47 azeem joins (~azeem@dynamic-adsl-94-34-39-251.clienti.tiscali.it)
2021-07-20 10:14:07 × Hafydd quits (~Hafydd@user/hafydd) (Quit: WeeChat 3.2)
2021-07-20 10:20:15 × azeem quits (~azeem@dynamic-adsl-94-34-39-251.clienti.tiscali.it) (Ping timeout: 255 seconds)
2021-07-20 10:21:20 azeem joins (~azeem@62.19.162.48)
2021-07-20 10:25:40 × xff0x_ quits (~xff0x@2001:1a81:52d5:1300:6dad:c8ed:ecb7:8640) (Ping timeout: 256 seconds)
2021-07-20 10:26:11 xff0x_ joins (~xff0x@2001:1a81:52d5:1300:367a:5587:a9ce:9c94)
2021-07-20 10:32:23 euouae parts (~euouae@user/euouae) ()
2021-07-20 10:32:29 arjun joins (~Srain@user/arjun)
2021-07-20 10:33:59 peterhil joins (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi)
2021-07-20 10:35:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-20 10:35:51 <arahael> Ok, I'm stumped on that - I think when I use this alternative package - which looks better maintained than the one I was originally trying to use... There must be something wrong with my cabal setup. Maybe my version is too old, but the cconfusing thing is... 'build-tool-depends' was introduced in Cabal 2.0, but `cabal --version` reports 3.0.0
2021-07-20 10:36:10 <arahael> 3.0.0.0, rather, and compiled using 3.0.0.0 of the Cabal library.
2021-07-20 10:36:12 <arahael> So it can't be too old.

All times are in UTC.