Logs: freenode/#haskell
| 2021-04-29 05:10:30 | <desophos> | why does `sequence` return a cross-product of a list of lists? i can intuitively understand how it works for other Monads like Maybe and Either but i'm struggling to understand what it means to collect [] actions |
| 2021-04-29 05:11:23 | → | ddellacosta joins (~ddellacos@86.106.143.86) |
| 2021-04-29 05:14:47 | <c_wraith> | desophos: you can think of the [] instance for monad modeling nondeterministic choice. Internally, you never know what element you'll get, just that it's going to be *something* |
| 2021-04-29 05:15:35 | → | superstar64 joins (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net) |
| 2021-04-29 05:15:42 | <c_wraith> | > do { a <- [1,2] ; b <- [3,4,5] ; c <- [7, 8] ; return (a, b, c) } |
| 2021-04-29 05:15:44 | <lambdabot> | [(1,3,7),(1,3,8),(1,4,7),(1,4,8),(1,5,7),(1,5,8),(2,3,7),(2,3,8),(2,4,7),(2,... |
| 2021-04-29 05:16:00 | <superstar64> | is there anyway i can make cabal run be interpreted rather then compiled? |
| 2021-04-29 05:16:10 | × | ddellacosta quits (~ddellacos@86.106.143.86) (Ping timeout: 252 seconds) |
| 2021-04-29 05:16:29 | <c_wraith> | desophos: you can see how each bind picks one element from the list it's pulling from in the example above |
| 2021-04-29 05:17:11 | <c_wraith> | desophos: well, that's basically what sequence does, except instead of working on tuples, it works on arbitrary length lists. |
| 2021-04-29 05:17:25 | <desophos> | ah ok, so it represents all possible values returned from accessing each list -- like a product type? |
| 2021-04-29 05:17:30 | <c_wraith> | yes |
| 2021-04-29 05:17:34 | <desophos> | interesting |
| 2021-04-29 05:18:26 | <desophos> | the product of all possible values of each list |
| 2021-04-29 05:18:30 | <desophos> | thanks, that makes sense! |
| 2021-04-29 05:18:39 | <c_wraith> | cartesian product is the standard term |
| 2021-04-29 05:19:01 | <desophos> | right, i was just trying to reconcile that with how sequence works on other Monads |
| 2021-04-29 05:19:45 | <desophos> | the idea of combining each of the nondeterministic choices makes sense |
| 2021-04-29 05:19:48 | × | xkapastel quits (uid17782@gateway/web/irccloud.com/x-odtfelnunqxapxmp) (Quit: Connection closed for inactivity) |
| 2021-04-29 05:20:20 | <c_wraith> | yep. it recursively binds elements from the input. in the case of the [] monad, that's a choice operation in some sense. |
| 2021-04-29 05:21:11 | <c_wraith> | from the outside there's nothing non-deterministic about it. But from the inside, that's how it acts. You just don't know which element you'll be working with. |
| 2021-04-29 05:22:05 | <desophos> | right, non-deterministic in the sense that it can evaluate to any of its possible values when accessed |
| 2021-04-29 05:22:19 | <desophos> | right? |
| 2021-04-29 05:22:24 | <c_wraith> | exactly |
| 2021-04-29 05:22:34 | <curiousgay> | > lastDigit :: [Integer] -> Integer |
| 2021-04-29 05:22:34 | <curiousgay> | > lastDigit = (`mod` 10) . foldr (\x y -> if y == 0 then 1 else x ^ ((y-1) `mod` 40 + 1)) 1 |
| 2021-04-29 05:22:34 | <curiousgay> | I have an exercise to find the last digit of x1^(x2^(...)), I've made 3 different versions of working code, but they all are slower then what codewars expect from me, I have no idea how can it be faster than that |
| 2021-04-29 05:22:36 | <lambdabot> | error: |
| 2021-04-29 05:22:36 | <lambdabot> | Variable not in scope: lastDigit :: [Integer] -> Integer |
| 2021-04-29 05:22:36 | <lambdabot> | <hint>:1:11: error: <hint>:1:11: error: parse error on input ‘=’ |
| 2021-04-29 05:23:30 | <curiousgay> | s/then/than/ |
| 2021-04-29 05:23:50 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 2021-04-29 05:26:06 | <c_wraith> | superstar64: https://www.reddit.com/r/haskell/comments/ko6zgn/cabal_project_for_scripts_with_no_build_artifacts/ has a couple ideas |
| 2021-04-29 05:27:21 | → | solidus-river joins (~fuag1@174.127.249.180) |
| 2021-04-29 05:27:28 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 2021-04-29 05:29:37 | × | hypercube quits (~hypercube@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com) (Ping timeout: 250 seconds) |
| 2021-04-29 05:29:47 | → | hololeap joins (hololeap@gateway/vpn/protonvpn/hololeap) |
| 2021-04-29 05:30:07 | <superstar64> | oh, so it's single file only? |
| 2021-04-29 05:31:01 | <solidus-river> | i gotta gush for a second or two. I've been a c++ coder in gaming for about 12 years now or so. Just finished what I hope to open source come august of a decentralized mesh Augmented reality simulation protocol with foundations in zmq and I cannot fathom writing it in the time i did in a langaue aside from haskell |
| 2021-04-29 05:31:07 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 2021-04-29 05:31:41 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 2021-04-29 05:32:04 | <c_wraith> | superstar64: probably could work with multiple-file stuff, but it might be a bit weird with source directories. I don't know for sure - this doesn't look like a deeply-developed feature |
| 2021-04-29 05:32:34 | <solidus-river> | this community and language is a true gem, the concise descriptions and low level control so far have been amazingly fruitful in design without feeling sacraficial to performance. I'm sure that will change but.. wow fellow beings, this stuff is legit cool. I love it. |
| 2021-04-29 05:32:48 | <superstar64> | i wanted to try it because apt broke my linker, but i'll guess i'll have to fix it |
| 2021-04-29 05:33:22 | <solidus-river> | i have to translate my prototype library into c++ and I'm dreading the task |
| 2021-04-29 05:33:26 | × | jao quits (~jao@pdpc/supporter/professional/jao) (Ping timeout: 240 seconds) |
| 2021-04-29 05:33:29 | <superstar64> | also, what's the best way to format a project? i'm currently doing `ormolu -o -XTypeApplications -i `find source -type f` |
| 2021-04-29 05:34:06 | × | mounty quits (~mounty@236.216.214.218.sta.wbroadband.net.au) (Ping timeout: 240 seconds) |
| 2021-04-29 05:34:15 | <superstar64> | solidus-river what's a simulation protocol? |
| 2021-04-29 05:34:48 | <solidus-river> | superstar64, its a new type of mesh network for locality based augmented reality hosted on a mesh network of peers |
| 2021-04-29 05:35:07 | <solidus-river> | or specifically, its a protocol specification that allows simulation between networked actors |
| 2021-04-29 05:35:35 | <solidus-river> | and I'm being redundant but i'm also having a couple beers in celebration of end to end tests working out :\ |
| 2021-04-29 05:35:47 | <solidus-river> | s/protocol specification/protocol/g |
| 2021-04-29 05:36:18 | <solidus-river> | i'm shooting to open source in august for siggraph |
| 2021-04-29 05:36:26 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 2021-04-29 05:37:04 | <solidus-river> | but tldr, haskell is amazeballs to work with. It's painful to go back to c++ land to make the client libs for devices / engines |
| 2021-04-29 05:37:43 | <solidus-river> | and i'm super grateful to have the learnings from building those proto libraries in hask |
| 2021-04-29 05:37:57 | <superstar64> | this thing https://en.wikipedia.org/wiki/Mesh_networking i know nothing about networking |
| 2021-04-29 05:38:40 | <solidus-river> | allows non-mediated set of peers to partake in an augmented reality with other peers nearby |
| 2021-04-29 05:39:27 | <solidus-river> | i'm using the term mesh because stuff like ipfs is involved, i don't even know if thats accurate |
| 2021-04-29 05:39:42 | <solidus-river> | but the end result is rad and i'm stoked to flush it out and share :D |
| 2021-04-29 05:39:56 | <sshine> | sounds cool, solidus-river. |
| 2021-04-29 05:40:29 | <sshine> | congrats on your tests succeeding. :) |
| 2021-04-29 05:40:38 | <solidus-river> | thanks :) |
| 2021-04-29 05:41:48 | × | shailangsa quits (~shailangs@host86-186-132-95.range86-186.btcentralplus.com) (Ping timeout: 265 seconds) |
| 2021-04-29 05:42:10 | <superstar64> | solidus-river, do you have any recommendation where i can learn about this stuff? |
| 2021-04-29 05:42:24 | <superstar64> | it would be nice to at least have a cursory overview |
| 2021-04-29 05:42:37 | <solidus-river> | i've got a lot of problems around federated peers to sort out i'm hoping to steal a lot from BGM for but i'm also hoping to drop a less open network, in oss land around august |
| 2021-04-29 05:42:56 | → | maroloccio joins (~marolocci@pousada3ja.mma.com.br) |
| 2021-04-29 05:43:04 | <solidus-river> | superstar64, the zeromq guide has a lot of hyperbolie but also a good overview of the space |
| 2021-04-29 05:43:47 | <solidus-river> | superstar64, there are various iot type protocols out there that are working on more general solutions but less suited for real time / coordinated AR experiences |
| 2021-04-29 05:44:18 | <solidus-river> | i think a bunch of the larger tech firms today are working on similar projects, the thing I hope to beat them on is open sourcing it |
| 2021-04-29 05:44:28 | → | Ro joins (b54123e9@181.65.35.233) |
| 2021-04-29 05:44:36 | × | Ro quits (b54123e9@181.65.35.233) (Client Quit) |
| 2021-04-29 05:45:04 | <solidus-river> | I've had the priviledge of being poached by apple / facebook for leadership roles around this area. I think the world where they own this stuff is balls though. We need like an ar www type thing built on top of existing infra |
| 2021-04-29 05:45:42 | <solidus-river> | its criminal how little we ask of our smart devices in terms of meshing imo. but i'm not qualified to weigh in there |
| 2021-04-29 05:45:58 | <superstar64> | i wish i had a job, i'm still in college |
| 2021-04-29 05:46:41 | <solidus-river> | there's endless work out there |
| 2021-04-29 05:47:13 | <solidus-river> | focus on what you want to manifest with tech vs what will pay the bills |
| 2021-04-29 05:47:24 | <solidus-river> | imo |
| 2021-04-29 05:47:46 | → | ddellacosta joins (~ddellacos@86.106.143.203) |
| 2021-04-29 05:47:50 | <superstar64> | i think it depends on where you live, also i'm mostly into compiler dev, which i don't think there are many jobs for |
| 2021-04-29 05:48:56 | <solidus-river> | ah, yeah it might. I'm from america and i consider this culture pretty brutal |
| 2021-04-29 05:49:14 | <solidus-river> | i think in a less brutal culture i'd be more concerned about area of expertise |
| 2021-04-29 05:49:34 | <superstar64> | i'm in suburban florida |
| 2021-04-29 05:49:39 | <solidus-river> | but i'm pretter sure in these barrens knowing a bit of code is a ticket to decent money under the hand of those with power |
| 2021-04-29 05:50:20 | <solidus-river> | your golden then, this country doesn't care about intelligence and doesn't educate its citizens |
| 2021-04-29 05:50:31 | <solidus-river> | just knowing code you got income set up for you imo |
| 2021-04-29 05:50:41 | → | wonko7 joins (~wonko7@62.115.229.50) |
| 2021-04-29 05:50:57 | <solidus-river> | its terribly stupid and i should shut up |
| 2021-04-29 05:51:11 | <solidus-river> | i'm only 30-ish and i'll regret saying all that later |
| 2021-04-29 05:51:41 | <solidus-river> | tldr, haskell is really cool. I super respect it and those that have helped make it real and hope to contribute some of that back |
| 2021-04-29 05:52:08 | × | ddellacosta quits (~ddellacos@86.106.143.203) (Ping timeout: 246 seconds) |
| 2021-04-29 05:52:19 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 2021-04-29 05:52:38 | <solidus-river> | if your in suburban florda, live anywhere else, preferably outside of the states after the pandemic |
| 2021-04-29 05:52:41 | <superstar64> | https://www.cs.utexas.edu/users/EWD/transcriptions/OtherDocs/Haskell.html |
| 2021-04-29 05:52:41 | <superstar64> | i wish more colleges though haskell so the industry would adopt it more |
| 2021-04-29 05:53:18 | <solidus-river> | in my experience the industry doesn't care, but also gives a lot of autonomy to coders |
| 2021-04-29 05:53:36 | <solidus-river> | so its kinda a chicken fight to get folks to consider haskell |
| 2021-04-29 05:53:51 | <solidus-river> | and its hard because its got a name for being "haughty" or what you will |
All times are in UTC.