Logs: liberachat/#haskell
| 2021-06-22 13:16:50 | → | bontaq` joins (~user@ool-18e47f8d.dyn.optonline.net) |
| 2021-06-22 13:17:03 | <rawles> | But I'm still very much a beginner! |
| 2021-06-22 13:17:46 | <lwe[m]> | What your pet project is about? |
| 2021-06-22 13:18:14 | bontaq` | is now known as bontaq |
| 2021-06-22 13:18:27 | <rawles> | My first ever one was to store and process GPS traces of my favourite hikes. |
| 2021-06-22 13:18:31 | → | AgentM joins (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) |
| 2021-06-22 13:18:52 | <rawles> | I had to think about data structures, and pipelines of functions that would perform the transformations I needed. |
| 2021-06-22 13:19:03 | → | sekun joins (~sekun@180.190.208.125) |
| 2021-06-22 13:19:33 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 2021-06-22 13:21:38 | <jumper149> | Is it possible to view a servant API in some form of tree? |
| 2021-06-22 13:22:24 | <sekun> | This is just a hypothetical question. I've read on Reddit that GHC has accumulated a lot of baggage in the past 30 years of its development. How can this issue be addressed? Is a full rewrite of GHC a reasonable thing, or would it be better to just fix them along the way with the current GHC? |
| 2021-06-22 13:22:48 | × | nerdypepper quits (~nerdypepp@user/nerdypepper) (Quit: bye) |
| 2021-06-22 13:23:27 | × | hendursaga quits (~weechat@user/hendursaga) (Quit: hendursaga) |
| 2021-06-22 13:24:18 | × | trcc quits (~trcc@2-104-60-169-cable.dk.customer.tdc.net) (Remote host closed the connection) |
| 2021-06-22 13:24:50 | → | trcc joins (~trcc@130.225.16.16) |
| 2021-06-22 13:25:14 | → | nerdypepper joins (~nerdypepp@user/nerdypepper) |
| 2021-06-22 13:30:24 | <lyxia> | even without whatever baggage GHC is a huge thing. A rewrite would not go well. |
| 2021-06-22 13:30:24 | → | hendursaga joins (~weechat@user/hendursaga) |
| 2021-06-22 13:30:26 | → | kw joins (~user@152.1.137.158) |
| 2021-06-22 13:30:36 | → | warnz joins (~warnz@2600:1700:77c0:5610:799f:ce24:eb20:cceb) |
| 2021-06-22 13:30:37 | × | maroloccio quits (~marolocci@189.15.9.54) (Ping timeout: 246 seconds) |
| 2021-06-22 13:30:55 | → | MorrowM joins (~MorrowM_@147.161.12.3) |
| 2021-06-22 13:31:19 | <merijn> | sekun: What baggage do you imagine could be removed? |
| 2021-06-22 13:32:23 | → | maroloccio joins (~marolocci@189.15.9.54) |
| 2021-06-22 13:33:10 | <kw> | Is it possible to write a function `traverseAlt :: (Alternative m)=> (a -> m b) -> NonEmpty a -> m (NonEmpty b)` , where, for instance, `traverseAlt (const empty)` === `empty` ? Or would that require a `Monad` constraint? |
| 2021-06-22 13:33:39 | × | hmmmas quits (~chenqisu1@183.217.200.246) (Quit: Leaving.) |
| 2021-06-22 13:33:54 | × | Morrow quits (~MorrowM_@147.161.8.246) (Ping timeout: 252 seconds) |
| 2021-06-22 13:34:14 | <sekun> | merijn: (i'm not sure how to reply in IRC sorry). I'm not sure either. I just started with this language a couple months ago. I just see it get thrown here and there on /r/Haskell |
| 2021-06-22 13:34:50 | <sekun> | lyxia: Oh ok. So incremental refactors is the only realistic option? |
| 2021-06-22 13:34:59 | <lyxia> | yes |
| 2021-06-22 13:35:46 | <sekun> | I see |
| 2021-06-22 13:35:57 | → | qrpnxz joins (~qrpnxz@user/qrpnxz) |
| 2021-06-22 13:36:02 | <justsomeguy> | (Sometimes I wonder why there aren't more Haskell compilers, maybe only covering the subset of Haskell 2010, as opposed to modern Haskell with tons of language extensions.) |
| 2021-06-22 13:36:58 | → | ddellacosta joins (~ddellacos@ool-44c73aff.dyn.optonline.net) |
| 2021-06-22 13:39:02 | <qrpnxz> | even w/o extensions it would be pretty hard to make a haskell compiler, but without extentions it would be hard to compete as well |
| 2021-06-22 13:39:27 | <even4void> | resp <- 2:5 |
| 2021-06-22 13:39:27 | <even4void> | idx <- grep("4cat", names(d))[1:12] |
| 2021-06-22 13:39:27 | <even4void> | pca <- PCA(d[, idx], graph = FALSE) |
| 2021-06-22 13:39:32 | <lyxia> | kw: is the idea that if one element fails in a list of more than one, you still get the others in the result? |
| 2021-06-22 13:39:47 | <even4void> | Wrong terminal window -- sorry for the noise! |
| 2021-06-22 13:40:54 | → | chomwitt joins (~Pitsikoko@athedsl-351576.home.otenet.gr) |
| 2021-06-22 13:41:13 | <[exa]> | sekun, justsomeguy: ghc is "too good" for any simple side development to succeed, or even become visible quickly. Many people tried, tbh. |
| 2021-06-22 13:41:25 | × | janiczek quits (~janiczek@89-24-215-117.customers.tmcz.cz) (Ping timeout: 265 seconds) |
| 2021-06-22 13:41:54 | × | ddellacosta quits (~ddellacos@ool-44c73aff.dyn.optonline.net) (Ping timeout: 265 seconds) |
| 2021-06-22 13:41:56 | → | Ariakenom joins (~Ariakenom@2001:9b1:efb:fc00:c14c:3118:b974:8ae3) |
| 2021-06-22 13:42:01 | ← | li parts (~li@libera/staff/li) () |
| 2021-06-22 13:42:19 | <maerwald> | You can't even do transformers in haskell 2010, can you? |
| 2021-06-22 13:42:52 | <maerwald> | Or maybe not mtl |
| 2021-06-22 13:42:53 | ← | qrpnxz parts (~qrpnxz@user/qrpnxz) (Error from remote client) |
| 2021-06-22 13:42:58 | <[exa]> | I kindof expect that we're not getting a different haskell compiler without some significant scientifical development happening, that would e.g. substantiate a completely different type system internals or compilation method |
| 2021-06-22 13:43:15 | <Taneb> | maerwald: I think transformers is fine but mtl needs multiparam type classes and fundeps |
| 2021-06-22 13:43:38 | <Taneb> | And undecidable instances, too |
| 2021-06-22 13:43:40 | → | thyriaen joins (~thyriaen@45.178.73.238) |
| 2021-06-22 13:45:03 | <thyriaen> | Howdy, friends :: I am going through a tutorial and have solved an exercise - however it feels like i did not really embrace the functional way in my answer : what would be a more ideal way to achive doubleing every 2nd entry from the back ? https://hastebin.com/neholubeke.yaml |
| 2021-06-22 13:45:09 | <tomsmeding> | justsomeguy: Helium exists https://github.com/Helium4Haskell/helium |
| 2021-06-22 13:45:40 | × | warnz quits (~warnz@2600:1700:77c0:5610:799f:ce24:eb20:cceb) (Remote host closed the connection) |
| 2021-06-22 13:45:40 | → | hmmmas joins (~chenqisu1@183.217.200.246) |
| 2021-06-22 13:45:52 | → | warnz joins (~warnz@2600:1700:77c0:5610:799f:ce24:eb20:cceb) |
| 2021-06-22 13:46:08 | <[exa]> | thyriaen: generate both possibilities on the way, and return the one that matches once you reach the end |
| 2021-06-22 13:46:09 | <tomsmeding> | it has a focus on better-quality type errors |
| 2021-06-22 13:46:11 | <Taneb> | thyriaen: I'd have two functions that call each other. One which doubles the odd elements and one which doubles the even elements. Calling "length" every recursive step is generally a sign you're doing something wrong |
| 2021-06-22 13:46:45 | <thyriaen> | Taneb, so 2 recursive functions calling eachother alternatingly ? |
| 2021-06-22 13:47:01 | <Taneb> | Yeah |
| 2021-06-22 13:47:02 | <thyriaen> | Taneb, yeath thats what i thought so too about the length thaths why i came here |
| 2021-06-22 13:47:20 | <thyriaen> | ok thanks |
| 2021-06-22 13:47:40 | <sekun> | exa: Bummer. Yeah I just checked the Haskell about its compilers, and all the others pretty much ate GHC's dust |
| 2021-06-22 13:48:16 | <thyriaen> | Taneb, but the way i see it - that doubles them from the front not form the back |
| 2021-06-22 13:48:35 | <Taneb> | thyriaen: oh, hmm |
| 2021-06-22 13:48:58 | <Taneb> | thyriaen: I didn't see that. In which case, listen to what [exa] wrote |
| 2021-06-22 13:48:59 | → | qrpnxz joins (~qrpnxz@user/qrpnxz) |
| 2021-06-22 13:49:06 | <[exa]> | sekun: I'd say that technically reproducing SOME haskell isn't even a really complex task now, there are perfect tutorials for everything and type system and runtime approaches are well documented. But you kinda want a haskell that can run the stuff on Hackage, which uses a ton of the tiny extensions |
| 2021-06-22 13:49:19 | <[exa]> | which puts QUITE some overhead into the task |
| 2021-06-22 13:49:30 | <thyriaen> | [exa], not really sure how to do that |
| 2021-06-22 13:50:12 | <thyriaen> | Taneb, reversing the function twice is also bad form, right ? |
| 2021-06-22 13:50:37 | <Taneb> | It's better than taking the length every step but yes |
| 2021-06-22 13:50:45 | → | Morrow_ joins (~MorrowM_@147.161.9.235) |
| 2021-06-22 13:51:16 | <[exa]> | thyriaen: let's play lego. Try to combine `repeat [id,(*2)]` with `zipWith`, and write a `isEvenLength` that doesn't use `length` because we don't need them ugly integers right? |
| 2021-06-22 13:52:48 | <thyriaen> | is repeat a haskell function ? |
| 2021-06-22 13:52:54 | <[exa]> | yap |
| 2021-06-22 13:52:54 | <Taneb> | Yes |
| 2021-06-22 13:53:27 | <[exa]> | you probably won't be able to print the result of this one (unless your ghci has magicks), but you can try `repeat [1,2,3]` |
| 2021-06-22 13:53:43 | <[exa]> | actually I meant `cycle`, sorry |
| 2021-06-22 13:54:00 | <[exa]> | `cycle [id, (*2)]` or `cycle [1,2,3]`, yeah. :D |
| 2021-06-22 13:54:07 | × | MorrowM quits (~MorrowM_@147.161.12.3) (Ping timeout: 268 seconds) |
| 2021-06-22 13:55:03 | → | janiczek joins (~janiczek@89-24-215-117.customers.tmcz.cz) |
| 2021-06-22 13:56:03 | × | trcc quits (~trcc@130.225.16.16) (Remote host closed the connection) |
| 2021-06-22 13:56:16 | <[exa]> | anyway, for the first implementation, I wouldn't object just doing the stuff on a reversed list |
| 2021-06-22 13:56:31 | → | trcc joins (~trcc@130.225.16.16) |
| 2021-06-22 13:56:45 | × | derelict quits (~derelict@user/derelict) (Quit: WeeChat 3.2) |
| 2021-06-22 13:57:00 | → | derelict joins (~derelict@user/derelict) |
| 2021-06-22 13:57:34 | → | vicfred joins (~vicfred@user/vicfred) |
| 2021-06-22 13:57:54 | <thyriaen> | you mean cycle [1,2] right ? |
| 2021-06-22 13:58:05 | × | Feuermagier_ quits (~Feuermagi@2a02:2488:4211:3400:5def:8486:9e4:b49a) (Ping timeout: 252 seconds) |
| 2021-06-22 13:59:14 | <[exa]> | yes, that may also be useful |
| 2021-06-22 13:59:40 | × | janiczek quits (~janiczek@89-24-215-117.customers.tmcz.cz) (Ping timeout: 268 seconds) |
| 2021-06-22 13:59:57 | <thyriaen> | [exa], cause with a cycled [1,2] list i can then ZipWith that with * to double every 2nd element |
| 2021-06-22 14:00:09 | <[exa]> | yeah |
| 2021-06-22 14:00:53 | <[exa]> | with the thing I wrote above, you can save some multiplication-by-1, using `zipWith ($) (repeat [id,(*2)]) yourNums` |
| 2021-06-22 14:01:06 | <thyriaen> | $ ? |
| 2021-06-22 14:01:38 | <[exa]> | that's the same $ that you use for writing `f 1 (2+3)` as `f 1 $ 2+3` |
All times are in UTC.