2024/04/23

Newest at the top

2024-04-23 17:38:36 +0200 <ncf> yeah use a better data structure. if you really want to use lists then use lens probably
2024-04-23 17:38:30 +0200 <EvanR> nesting
2024-04-23 17:38:16 +0200 <EvanR> since it's 2D you would implement the 2D version by chaining that function once
2024-04-23 17:37:56 +0200 <EvanR> when using a list like that, I always make a "update ith element with function or replacement" function, which isn't included in prelude by default. Probably to discourage using lists like this
2024-04-23 17:37:18 +0200 <Guest13> if it helps, this is again for an AOC problem on day 10 part 2 '=D
2024-04-23 17:37:10 +0200cs(~AdminUser@46.191.138.60) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2024-04-23 17:36:50 +0200 <Guest13> I have indices for the loop and notLoop
2024-04-23 17:36:36 +0200 <Guest13> the goal is to map those indices only to a default value, or equally anything that is not in those indices
2024-04-23 17:35:56 +0200 <Guest13> yes
2024-04-23 17:35:51 +0200 <ncf> a list of indices into the 2D list? as in a list of pairs of natural numbers?
2024-04-23 17:35:38 +0200 <Guest13> I am trying to fill in areas that I designate as "not in loop" as a default object. I have the loop as a path which is a list of indices and the grid is a [[Tile]] where Tile is simply Pipe Char or Empty
2024-04-23 17:34:11 +0200 <EvanR> if you're only going to accept very specific answers you'll need to get much more specific with the question
2024-04-23 17:33:58 +0200 <danse-nr3> for an efficient solution it would be helpful to know whether you expect more indexes or more elements
2024-04-23 17:33:08 +0200 <Guest13> but it would take me a long time to update the code to use this, is the only other option to concat and zip ?
2024-04-23 17:32:55 +0200 <EvanR> but you could also use an actual array
2024-04-23 17:32:37 +0200 <EvanR> a list, or nested list, is certainly not that
2024-04-23 17:32:18 +0200 <Guest13> this is probably a better way to do it in hindsight. I was used to treating a grid as a 2d array
2024-04-23 17:31:28 +0200 <EvanR> another way to represent a grid of A is Map (Int,Int) A
2024-04-23 17:30:27 +0200 <Guest13> hi there, I have a beginner Haskell question: I have a list of indices and a 2d list to update. so far I have been using zip and map combined, but this gets quite confusing for the 2d case. is there a better way of doing this?
2024-04-23 17:28:55 +0200Guest13(~Guest13@cpc93370-hers8-2-0-cust590.6-3.cable.virginm.net)
2024-04-23 17:24:59 +0200ncf(~n@monade.li)
2024-04-23 17:24:49 +0200raehik(~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 256 seconds)
2024-04-23 17:24:47 +0200ncf(~n@monade.li) (Client Quit)
2024-04-23 17:22:04 +0200Square(~Square@user/square) (Ping timeout: 268 seconds)
2024-04-23 17:21:56 +0200ncf(~n@monade.li)
2024-04-23 17:21:44 +0200cs(~AdminUser@46.191.138.60)
2024-04-23 17:21:29 +0200ncf(~n@monade.li) (Quit: Fairfarren.)
2024-04-23 17:20:20 +0200rosco(~rosco@yp-146-6.tm.net.my) (Quit: Lost terminal)
2024-04-23 17:19:00 +0200madeleine-sydney(~madeleine@c-76-155-235-153.hsd1.co.comcast.net) (Remote host closed the connection)
2024-04-23 17:17:45 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-04-23 17:10:41 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2024-04-23 17:07:09 +0200hippoid(~hippoid@user/hippoid)
2024-04-23 17:07:09 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2024-04-23 17:06:25 +0200hippoid(~hippoid@user/hippoid) (Quit: WeeChat 4.2.1)
2024-04-23 17:00:57 +0200matthias1(~igloo@104.28.196.78) (Ping timeout: 252 seconds)
2024-04-23 16:59:30 +0200 <Hecate> hippoid: hurray
2024-04-23 16:59:01 +0200 <hippoid> Hecate: thanks, I got that to work!
2024-04-23 16:56:41 +0200zetef(~quassel@5.2.182.99)
2024-04-23 16:55:47 +0200matthias1(~igloo@104.28.196.78)
2024-04-23 16:50:36 +0200 <Hecate> hippoid: make a cabal.project file at the top-level that lists the various packages (in A, manifestly). Then cabal should be able to traverse the hierarchy of directories and run the stuff related to A
2024-04-23 16:50:10 +0200 <ph88> cool Hecate
2024-04-23 16:49:46 +0200 <Hecate> some examples in this codebase as well, ph88 : https://github.com/flora-pm/flora-server/blob/65fee43f571a94fc8823be8f7d575f676484eb5e/src/core/Fl…
2024-04-23 16:49:18 +0200 <hippoid> I have a project setup like A/B, where A and B are dirs. B is a haskell project. The cabal file lives in B. From A, I want to do a `cabal run...` such that it runs the cabal project in B. how ?
2024-04-23 16:49:16 +0200 <Hecate> https://github.com/anoma/juvix/pull/2663 nice example as well
2024-04-23 16:49:00 +0200 <Hecate> https://tristancacqueray.github.io/blog/introducing-effects
2024-04-23 16:49:00 +0200 <Hecate> https://github.com/change-metrics/monocle also uses it
2024-04-23 16:47:14 +0200 <Hecate> ph88: https://github.com/Kleidukos/get-tested/blob/main/app/Main.hs
2024-04-23 16:45:11 +0200matthias1(~igloo@104.28.196.78) (Remote host closed the connection)
2024-04-23 16:44:08 +0200 <ph88> Hecate, i started to use it too, still new for me. I mainly started to use it because of the promise of performance
2024-04-23 16:43:37 +0200 <ph88> Hecate, link me some code :)