Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 689 690 691 692 693 694 695 696 697 698 699 .. 5022
502,152 events total
2020-10-17 04:41:49 <koz_> larou: If by 'different' you mean 'profunctor optics', then I think the issue remains, though I'm not sure.
2020-10-17 04:41:55 <larou> i thought you could exhaustively enumerate Traversables
2020-10-17 04:42:02 <koz_> larou: What does that even _mean_?
2020-10-17 04:42:25 × ephemera_ quits (~E@122.34.1.187) (Ping timeout: 240 seconds)
2020-10-17 04:42:25 <koz_> (also, probbo not, since we have type Lens s t a b = forall p. Strong p => Optic p s t a b)
2020-10-17 04:42:40 <larou> isnt there soemthing halfway towards the lenses setup?
2020-10-17 04:43:08 <larou> that instead of abstracting over Traversals, just systematically represents them?
2020-10-17 04:43:33 <larou> im not sure if that would solve the issue
2020-10-17 04:43:44 ephemera_ joins (~E@122.34.1.187)
2020-10-17 04:43:46 shatriff joins (~vitaliish@176.52.219.10)
2020-10-17 04:43:59 <koz_> larou: The specifics of the question don't mention Traversals.
2020-10-17 04:44:28 <larou> i cant quite remember how it goes, but it was something to do with biplate
2020-10-17 04:45:03 <larou> i think you can do all the lens stuff when you have arbitrary Traversal instances
2020-10-17 04:45:04 <koz_> larou: You'd have to give me a more specific reference, because nothing like this comes to mind, and I don't think I get it in the abstract.
2020-10-17 04:45:17 <koz_> Traversal? Or Traversable?
2020-10-17 04:45:36 <larou> you avoid Traversal, but enumerating instances of Traversable
2020-10-17 04:45:56 <larou> this gives you the modifiers and insertion/deletion operations
2020-10-17 04:46:09 <koz_> Yeah, I'm not sure I follow. 'Enumerating instances of Traversable' doesn't make much sense to me.
2020-10-17 04:46:23 <larou> i just approach it in terms of Get & Set instances
2020-10-17 04:46:34 <larou> with abstractions to account for "structure"
2020-10-17 04:46:51 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-10-17 04:47:01 <larou> i think these can basically be formulated into monadic Get/Set varients
2020-10-17 04:47:08 day_ joins (~Unknown@unaffiliated/day)
2020-10-17 04:47:18 <larou> where the monad is sufficient to capture structure information
2020-10-17 04:47:41 <larou> if its true, that everything Traversable is...
2020-10-17 04:47:49 <larou> oh no, wait, then you get scanners
2020-10-17 04:48:01 <larou> because you cant do monadic traversal properly
2020-10-17 04:48:26 <larou> i think geti&seti get there for the pure varients
2020-10-17 04:48:44 <larou> but the nested states are difficult
2020-10-17 04:48:51 <larou> for the unfolding therof
2020-10-17 04:49:18 <larou> like, imagine trying to unfold a list of lists, you need a depth 2 nested state for the unfold
2020-10-17 04:49:46 <larou> and if your trying to capture all possible Traversal instance, you need a systematic framework for the nested States and Costates
2020-10-17 04:49:56 <larou> for the unfolds and folds respectively
2020-10-17 04:50:04 <MarcelineVQ> bleep borp
2020-10-17 04:50:11 <larou> so the geti&seti setup isnt quite suffiencet
2020-10-17 04:50:28 × day quits (~Unknown@unaffiliated/day) (Ping timeout: 260 seconds)
2020-10-17 04:50:29 day_ is now known as day
2020-10-17 04:50:37 fragamus joins (~michaelgo@73.93.153.121)
2020-10-17 04:51:54 <gnumonik> The problem (as far as I can tell) is that in order to cross the bridge from string land to lens land in a way that lets you compose, you a function with a type like :: forall a c. (forall b. Lens' a b -> c) -> String -> c. I think anyway. This is my first real haskell program so I might be wrong
2020-10-17 04:51:59 <larou> idk if it solves your impredictive polymorphism problem...
2020-10-17 04:52:02 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
2020-10-17 04:52:07 <gnumonik> And that's an impossible function
2020-10-17 04:52:15 Tario joins (~Tario@201.192.165.173)
2020-10-17 04:52:44 <larou> seems like an ambitious first program!
2020-10-17 04:53:04 cole-h_ joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-10-17 04:53:07 <larou> i cant really follow sorry, idk lenses, but thanks for explaining
2020-10-17 04:53:41 <larou> i have never really seen anything that enamoured me towards them - let alone the documentation!
2020-10-17 04:54:43 <gnumonik> I wrote the rest of it on the assumption that there'd be some easy way to parse strings into lenses... I don't want to give up but right now my best idea for how to make it work is "rewrite the whole thing in clojure"
2020-10-17 04:55:20 × fragamus quits (~michaelgo@73.93.153.121) (Ping timeout: 256 seconds)
2020-10-17 04:55:35 fragamus joins (~michaelgo@73.93.153.97)
2020-10-17 04:55:38 <larou> does that have impredictive polymorphism?
2020-10-17 04:56:07 <gnumonik> No but I'm pretty sure I could make this work in an impure dynamic language
2020-10-17 04:56:33 <larou> hmm, intersting.
2020-10-17 04:56:37 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 264 seconds)
2020-10-17 04:56:57 <gnumonik> It's either that, or write a type system capable of supporting profunctor optics for a dsl that is (aside from the record accessing stuff) about as a complicated as a calculator
2020-10-17 04:57:34 gioyik joins (~gioyik@190.67.155.46)
2020-10-17 04:58:02 <larou> ah, your making me wish i knew what you mean
2020-10-17 04:58:15 <larou> the siren song of lenses!
2020-10-17 04:59:06 <larou> i thought your whole problem was writing DSLs in the first place!
2020-10-17 04:59:11 <larou> seems like a catch 22
2020-10-17 04:59:28 × Stanley|00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
2020-10-17 05:00:03 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-17 05:01:06 <gnumonik> Well I read that haskell was a good language for embedding a dsl and was like "oh this will be a good first project", but that is apparently only true if you want to use the features of haskell that don't involve higher rank types. Which is kinda disappointing I guess.
2020-10-17 05:01:28 × Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
2020-10-17 05:02:03 <larou> im still not convinced that its inexpressible in this language
2020-10-17 05:02:39 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-17 05:02:40 <larou> either your lens problem is totally profound, or its just a limitation of trying to use that machinery
2020-10-17 05:02:59 × anik quits (~anik@103.23.207.148) (Quit: Textual IRC Client: www.textualapp.com)
2020-10-17 05:03:05 <larou> can you tell if its a revelation or a limitation of lenses?
2020-10-17 05:03:19 Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net)
2020-10-17 05:04:38 × ephemera_ quits (~E@122.34.1.187) (Remote host closed the connection)
2020-10-17 05:04:45 × Tops2 quits (~Tobias@dyndsl-091-249-082-055.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2020-10-17 05:05:10 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2020-10-17 05:06:09 ephemera_ joins (~E@122.34.1.187)
2020-10-17 05:06:11 × Amras quits (~Amras@unaffiliated/amras0000) (Ping timeout: 272 seconds)
2020-10-17 05:06:26 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2020-10-17 05:06:27 <gnumonik> as far as i can tell it's a limit of the type system. I mean there is a way to make it work. Actually, there are 2 ways: One is to package the program with Hint (makes the binary 10x as large and isn't suitable for my application cuz it needs to be run as root), and use that as a 100mb parser for the lenses. The other is to write a super rich type system for what amounts to a calculator. I'm probably not smart enough to do the
2020-10-17 05:06:27 <gnumonik> latter :-(
2020-10-17 05:07:28 <davean> gnumonik: do you mean the 'hint' package?
2020-10-17 05:08:24 <gnumonik> yeah
2020-10-17 05:08:30 <davean> ... why would you run that as root?
2020-10-17 05:08:44 anik joins (~anik@103.23.207.140)
2020-10-17 05:09:08 <gnumonik> You wouldn't. But my DSL is for packet capturing, so you need superuser, so although hint solves the "parse some lenses" problem, it's not suitable
2020-10-17 05:09:18 <davean> No you don't?
2020-10-17 05:09:24 <davean> You can packet capture without root
2020-10-17 05:09:31 <davean> thats what capabilities are for
2020-10-17 05:09:49 × proofofme quits (~proofofme@184-96-74-65.hlrn.qwest.net) (Remote host closed the connection)
2020-10-17 05:10:30 <davean> Also, lenses have composition rules
2020-10-17 05:10:36 <davean> so if you just map strings to the lens objects
2020-10-17 05:10:45 <davean> and combine them with the operators, you don't need to use something like 'hint'
2020-10-17 05:10:55 <davean> Haskell is a functional language
2020-10-17 05:11:02 × slack1256 quits (~slack1256@191.125.41.183) (Remote host closed the connection)
2020-10-17 05:11:23 jud joins (~jud@cpe-70-113-106-222.austin.res.rr.com)
2020-10-17 05:11:23 × jud quits (~jud@cpe-70-113-106-222.austin.res.rr.com) (Changing host)
2020-10-17 05:11:23 jud joins (~jud@unaffiliated/jud)
2020-10-17 05:11:33 proofofme joins (~proofofme@184-96-74-65.hlrn.qwest.net)
2020-10-17 05:12:05 toorevitimirp joins (~tooreviti@117.182.180.0)
2020-10-17 05:12:44 <gnumonik> Yeah you can write a function from "foo" to foo (where foo without quotes is a lens), but as far as I can tell you can't write a function from a string to any given lens for a data type
2020-10-17 05:13:21 <davean> No, you have to enumerate the lenses that exist
2020-10-17 05:13:21 <dsal> You should also be able to test packet capture mechanisms offline.

All times are in UTC.