Logs on 2021-08-02 (liberachat/#haskell)
| 00:16:19 | × | brandon quits (~bb_haskel@167.224.250.141) (Read error: Connection reset by peer) |
| 00:16:20 | × | steven1 quits (~steven@172.92.136.203) (Ping timeout: 256 seconds) |
| 00:22:38 | <eggplantade> | Is there a name for the programming pattern where a function or data type is polymorphic just to avoid a cyclic module dependency, and not because it's intended to be instantiated with other types? |
| 00:24:28 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 00:28:20 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 00:31:57 | <jay-invariant> | eggplantade: I'm not sure, but that sounds a bit like "dependency injection" from OOP |
| 00:36:10 | <dsal> | I don't artificially constrain things unless it adds clarity. I wouldn't name that a design pattern, though. |
| 00:45:09 | <sshine> | eggplantade, generalisation? |
| 00:47:56 | <drakonis> | singleton? |
| 00:50:39 | → | hmmmas joins (~fidnc@183.217.200.220) |
| 00:51:08 | × | hmmmas quits (~fidnc@183.217.200.220) (Client Quit) |
| 00:54:59 | × | chris_ quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 00:59:35 | × | Null_A quits (~null_a@2601:645:8700:2290:9c43:41fd:2bc5:221e) (Remote host closed the connection) |
| 01:00:14 | <eggplantade> | Adding a type parameter is generalization. This pattern isn't the usual reason for generalizing a definition though. |
| 01:09:10 | × | xff0x quits (~xff0x@2001:1a81:53aa:2400:d3c1:8423:7882:6d65) (Ping timeout: 272 seconds) |
| 01:10:30 | → | xff0x joins (~xff0x@2001:1a81:53e4:9a00:e1e1:9272:fb77:3704) |
| 01:12:16 | → | norias joins (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) |
| 01:12:47 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:13:26 | → | Null_A joins (~null_a@2601:645:8700:2290:694b:df7:8cc3:57c0) |
| 01:13:54 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:17:13 | → | Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
| 01:19:39 | × | norias quits (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) (Quit: Leaving) |
| 01:21:25 | × | fawful quits (~guy@c-76-104-217-93.hsd1.wa.comcast.net) (Quit: WeeChat 3.2) |
| 01:34:52 | → | pschorf joins (~user@c-73-77-28-188.hsd1.tx.comcast.net) |
| 01:36:06 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) (Remote host closed the connection) |
| 01:36:35 | → | elias__ joins (~elias@154.27.37.188.rev.vodafone.pt) |
| 01:38:29 | × | elias_ quits (~elias@154.27.37.188.rev.vodafone.pt) (Ping timeout: 252 seconds) |
| 01:46:17 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) |
| 01:46:33 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 01:48:38 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 01:53:46 | → | MQ-17J joins (~MQ-17J@8.6.144.192) |
| 01:55:03 | × | alx741 quits (~alx741@186.178.108.145) (Quit: alx741) |
| 01:55:29 | → | euouae joins (~euouae@user/euouae) |
| 01:57:59 | → | zebrag joins (~chris@user/zebrag) |
| 02:02:36 | <euouae> | What is a good topic to study in Haskell as a beginner? |
| 02:03:42 | × | pschorf quits (~user@c-73-77-28-188.hsd1.tx.comcast.net) (Remote host closed the connection) |
| 02:04:27 | × | Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt) |
| 02:04:32 | → | pschorf joins (~user@c-73-77-28-188.hsd1.tx.comcast.net) |
| 02:04:54 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 272 seconds) |
| 02:06:57 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 02:09:17 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 02:11:10 | <sm> | euouae: installing it |
| 02:12:18 | <sm> | or, better: the tools |
| 02:12:36 | <euouae> | OK so cabal, haddock? |
| 02:12:41 | <euouae> | maybe ghc? |
| 02:12:47 | <sm> | both of these are a bit of a topic into themselves unfortunately |
| 02:12:50 | <sm> | all the tools |
| 02:13:08 | <euouae> | Examples of some others? |
| 02:13:14 | <sm> | it isn't that much to learn and it will save you a lot of pain |
| 02:13:25 | <sm> | stack |
| 02:13:41 | <euouae> | Ok and that concludes it, right? |
| 02:13:45 | <sm> | ghc-pkg |
| 02:13:55 | × | phma quits (phma@2001:5b0:212a:da48:ca78:cb9c:83eb:4c64) (Read error: Connection reset by peer) |
| 02:14:01 | <sm> | well of course there's more but those are a good start |
| 02:14:27 | <euouae> | Hmm, alright. I'll heed your advice |
| 02:15:48 | <sm> | at least skim their user manuals, and understand the concepts of package dbs and the various places haskell libraries and executables can be |
| 02:16:40 | <sm> | also, I like this beginner book: |
| 02:16:40 | <sm> | @where HTAC |
| 02:16:40 | <lambdabot> | "Haskell Tutorial and Cookbook" by Mark Watson in 2017-09-04 at <https://leanpub.com/haskell-cookbook> |
| 02:18:04 | → | arahael1 joins (~arahael@124-150-74-227.tpgi.com.au) |
| 02:18:19 | <euouae> | That's a cool publisher |
| 02:18:46 | × | Arahael quits (~arahael@14-200-228-14.tpgi.com.au) (Ping timeout: 272 seconds) |
| 02:19:50 | × | pschorf quits (~user@c-73-77-28-188.hsd1.tx.comcast.net) (Remote host closed the connection) |
| 02:20:35 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:20:35 | FinnElija | is now known as Guest7086 |
| 02:20:35 | × | Guest7086 quits (~finn_elij@user/finn-elija/x-0085643) (Killed (sodium.libera.chat (Nickname regained by services))) |
| 02:20:35 | finn_elija | is now known as FinnElija |
| 02:21:01 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 02:28:20 | × | td_ quits (~td@94.134.91.166) (Ping timeout: 272 seconds) |
| 02:29:33 | → | td_ joins (~td@muedsl-82-207-238-030.citykom.de) |
| 02:31:02 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:31:06 | → | phma joins (phma@2001:0:c38c:c38c:cc7:e519:bcd3:2ebd) |
| 02:34:09 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 02:35:56 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds) |
| 02:38:43 | → | phma_ joins (phma@2001:5b0:211b:e2d8:c072:cd43:475:d917) |
| 02:39:06 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 272 seconds) |
| 02:39:08 | × | phma quits (phma@2001:0:c38c:c38c:cc7:e519:bcd3:2ebd) (Ping timeout: 256 seconds) |
| 02:45:42 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 02:53:31 | → | guest86 joins (~guest86@2001:8004:1420:14ac:b1cc:c092:84b0:86f6) |
| 02:54:18 | × | curiousgay quits (~curiousga@77-120-186-48.kha.volia.net) (Ping timeout: 272 seconds) |
| 02:54:53 | <guest86> | Hello, I am getting back into Haskell after being away from it for a few years. I am trying to interact with a process using System.Process.Typed. The process at some point will print: "INPUT?: " to stdout and I want to be able to enter something via STDIN when that happens. |
| 02:55:28 | <guest86> | https://paste.tomsmeding.com/iFHG9bjw <- I am trying to figure out how to read from stdin until this happens. Is there an easier way. Also, what do I need to do to whileM to have it work in IO? |
| 02:56:21 | → | hmmmas joins (~fidnc@183.217.200.220) |
| 02:59:16 | <monochrom> | Uh, you begin with "x <- hGetLine (getStdout p)", and henceforth you never even take a look at what's in x? |
| 02:59:44 | <monochrom> | I guess this is why everyone else was saying "the unsued-var warning is very informative". |
| 02:59:56 | <guest86> | monochrom in this case I know I can ignore the first line, its a toy example |
| 03:01:06 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 03:01:49 | <guest86> | The process I am talking toL |
| 03:01:51 | <guest86> | #!/usr/bin/env python3 |
| 03:01:52 | <guest86> | print("Hello there") |
| 03:01:52 | <guest86> | print("INPUT?:", end=' ') |
| 03:01:53 | <guest86> | val = input() |
| 03:01:53 | <guest86> | print(f"You entered:{val}") |
| 03:02:12 | <monochrom> | OK so what's not working? |
| 03:02:58 | <monochrom> | (That is a guiding question.) |
| 03:03:09 | → | jess joins (~jess@libera/staff/jess) |
| 03:04:18 | <monochrom> | (And training people to take the effort to describe observations.) |
| 03:07:30 | <guest86> | Well, the first issue is that |
| 03:07:31 | <guest86> | whileM (not (hIsEOF (getStdout p))) $ do |
| 03:08:13 | <guest86> | because hIsEOF (getStdout p) is IO Bool, and whileM wants a Bool |
| 03:09:20 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 03:09:30 | × | MQ-17J quits (~MQ-17J@8.6.144.192) (Ping timeout: 272 seconds) |
| 03:09:48 | <monochrom> | Uh which package does Control.Monad.Loop come from? |
| 03:10:09 | <guest86> | https://hackage.haskell.org/package/monad-loops-0.4.3/docs/Control-Monad-Loops.html |
| 03:10:28 | <monochrom> | Then whileM totally wants IO Bool alright. |
| 03:10:35 | <dsal> | `untilJust` is a pretty cool name. |
| 03:10:40 | <monochrom> | It is "not" that doesn't like IO Bool. |
| 03:11:21 | <guest86> | oh, wow, yeah looking at the compiler output you're totally right |
| 03:11:58 | <monochrom> | You can use "fmap" to bridge the gap. |
| 03:12:49 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 03:13:56 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) (Ping timeout: 272 seconds) |
| 03:14:12 | <monochrom> | You will run into the second problem after you fix that. |
| 03:14:20 | <guest86> | thanks |
| 03:14:34 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds) |
| 03:15:38 | × | ham quits (~ham4@user/ham) (Ping timeout: 265 seconds) |
| 03:15:59 | dsal | watches monochrom play Haskell chess |
| 03:16:05 | → | ham2 joins (~ham4@d8D8627D5.access.telenet.be) |
| 03:16:10 | <dsal> | type checks in three moves |
| 03:16:24 | <monochrom> | haha |
| 03:16:43 | <monochrom> | Well the second problem is mistaking EOF with "no data for now". |
| 03:17:11 | <monochrom> | If the child process doesn't close its stdout, your side will not see EOF. |
| 03:17:32 | <guest86> | So I suppose I can just get the characters until I see "INPUT?: " |
| 03:17:48 | <monochrom> | And most processes, including this one, doesn't close stdout until termination. |
| 03:17:58 | <monochrom> | Yes. |
| 03:18:05 | <guest86> | I guess the issue I was having was that I was using hGetLine, but in this case there isn't a whole line to be gotten |
| 03:18:45 | <guest86> | is hWaitForInput the way to go? |
| 03:19:17 | → | curiousgay joins (~curiousga@77-120-186-48.kha.volia.net) |
| 03:19:50 | <monochrom> | You will realize that you're making an XY problem when you find out that hGetChar already does the waiting. |
| 03:20:31 | <monochrom> | There is a third problem after you fix that. |
| 03:21:42 | <monochrom> | The third problem can only be fixed in the Python script. Or generally child code. Parent code has absolutely no say over this. None. Zilch. |
| 03:23:34 | <pavonia> | What is the third problem? |
| 03:24:09 | <monochrom> | "I see my stdout is a pipe, not a terminal, so let me switch to block buffering. My buffer is a gazillion bytes." |
| 03:24:43 | <monochrom> | This buffering is highly local and private. Even the kernel doesn't know. |
| 03:25:01 | <guest86> | Ah okay, so I think my approach is wrong. |
| 03:25:34 | <monochrom> | The only solution is rewrite child code to switch back to line buffering. Or add explicit "flush" calls. |
| 03:25:36 | <guest86> | What I would like to do is be able to monitor a python script (that I cannot necessarily modify) and send input to it under certain conditions |
| 03:26:12 | <guest86> | Am I taking the right approach? |
| 03:26:33 | <guest86> | I mean, in general, is there a better approach I should be using? |
| 03:26:53 | <monochrom> | Err actually I just recall a non-intrusive solution. You now have to make some syscalls to allocate a pseudo terminal. Then the child sees a terminal and will behave. |
| 03:27:49 | <monochrom> | But even I haven't learned the relevant syscalls. This gets highly technical and unix-specific. |
| 03:28:36 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 03:29:09 | <monochrom> | dsal had the correct count. :) |
| 03:29:17 | <euouae> | can't you just pipe the script to a file and read from the file, ignoring eof? |
| 03:29:34 | <monochrom> | Same buffering delay. |
| 03:29:52 | <monochrom> | You will find the file empty for a long, long time. |
| 03:29:54 | <guest86> | The script has a line of input (a confirmation code) that I won't have until runtime |
| 03:30:38 | <euouae> | Right... man tty and go from there |
| 03:30:57 | <euouae> | pty* |
| 03:31:00 | <monochrom> | Except now you have to make unix syscalls but you're in Haskell |
| 03:31:32 | <euouae> | No-one said all of it needs to be done in Haskell :P either write that component in C or use FFI |
| 03:31:54 | <guest86> | Yeah good point. I will explore some options. Maybe in this case I can in fact modify the python script |
| 03:32:20 | <guest86> | Actually, I don't think I can. So, I guess I will have to look into pty |
| 03:32:58 | <monochrom> | Oh the standard library has System.Posix.Terminal.openPseudoTerminal. I guess it's already half the way. |
| 03:33:04 | <euouae> | monochrom: You can just use script -c |
| 03:33:11 | <euouae> | https://linux.die.net/man/1/script |
| 03:33:47 | <monochrom> | That's nice too. |
| 03:34:01 | <euouae> | It's always a good day when you can surprise-answer a question with script(1) lol |
| 03:34:15 | <monochrom> | I prefer tee. |
| 03:34:26 | <guest86> | Thanks for the references! |
| 03:34:28 | <monochrom> | But tee is a different use case. |
| 03:36:14 | <monochrom> | If you use openPseudoTerminal, you will still need to read the pty man page, because generally these System.Posix function docs assumes unix syscall knowledge. |
| 03:36:54 | <monochrom> | Won't explain what's so "master" and "slave" about this, you're supposed to already know from unix experience. |
| 03:41:41 | <guest86> | ah okay thanks, I didn't realise that this part was so involved. Lots of learning to do I suppose |
| 03:42:09 | × | Teacup quits (~teacup@user/teacup) (Quit: Teacup) |
| 03:42:09 | <monochrom> | Perhaps use the "script" program as middle-person for now. |
| 03:42:28 | → | lavaman joins (~lavaman@98.38.249.169) |
| 03:42:38 | → | Teacup joins (~teacup@user/teacup) |
| 03:43:56 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 250 seconds) |
| 03:46:18 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 03:47:27 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 276 seconds) |
| 03:47:56 | × | cjb quits (~cjb@user/cjb) (Quit: rcirc on GNU Emacs 28.0.50) |
| 03:51:08 | <aegon> | hmm, what does ~ mean in a signature and what does GHC.Exts fromList do :| |
| 03:51:30 | <aegon> | i've been looking at the haddock and it seems like it can convert a list of item a to an item b that is convertable to from a |
| 03:51:44 | <aegon> | but i'm not sure if i'm getting that right and I can't seem to make ghci happy playing with it |
| 03:51:46 | <Axman6> | ~ is type equality, so a ~ Map k v is saying that a is the same as Map k v |
| 03:52:47 | <Axman6> | @src @hoogle fromList |
| 03:52:48 | <lambdabot> | Source not found. Sorry. |
| 03:53:17 | <Axman6> | @src IsList |
| 03:53:17 | <lambdabot> | Source not found. |
| 03:53:20 | <Axman6> | :( |
| 03:54:15 | <Axman6> | anyway, the IsList class is what's used by the OverloadedLists extension, which lets you do things like write [(True, 1),(False,7)] :: Map Bool Int |
| 03:55:32 | <Axman6> | it turns [...] from being syntax sugar for constructing lists, to being syntax sugar for constructing other types which imeplement the IsList class, and [foo,bar] gets translated into froomList [foo,bar], much like how 1 is translated to fromInteger 1 |
| 03:57:17 | <aegon> | Axman6: what does it look like to hook into that machinery? This maches up with how i think it's being used (turning lists into Tensor literals in Hasktorch) but reading through their haddock thats generated locally I can't find any mention of IsList for the Tensor data type |
| 03:57:58 | <Axman6> | maybe try loading up hasktorch in ghci and running :info IsList to find where the instance is coming from |
| 03:59:20 | <aegon> | good idea! |
| 04:01:35 | <Axman6> | where are you seeing the use of ~ btw? |
| 04:03:35 | × | hendursaga quits (~weechat@user/hendursaga) (Remote host closed the connection) |
| 04:04:02 | → | hendursaga joins (~weechat@user/hendursaga) |
| 04:04:23 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 04:05:02 | → | sim590 joins (~simon@modemcable090.207-203-24.mc.videotron.ca) |
| 04:05:29 | → | vicfred joins (~vicfred@user/vicfred) |
| 04:07:36 | <sim590> | It's weird, now when I'm compiling a project that used to compile, I'm getting this: <command line>: can't load .so/.DLL for: /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib/libpanel.so (-lpanelw: cannot open shared object file: No such file or directory). |
| 04:08:01 | <sim590> | But `readlink -f /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../lib/libpanel.so` does give an existing file `/usr/lib/libpanel.so`. |
| 04:09:10 | <aegon> | Axman6: its in this function. Everything seems to be happening in it. I wish I could get fromList to behave in ghci to poke at it |
| 04:09:39 | <sim590> | `/usr/lib/libpanelw.so` does also exist, so I'm not sure what's wrong. |
| 04:09:52 | × | Null_A quits (~null_a@2601:645:8700:2290:694b:df7:8cc3:57c0) (Read error: Connection reset by peer) |
| 04:09:55 | <euouae> | sim590: post full log |
| 04:10:12 | <aegon> | https://github.com/tscholak/two-layer-network/blob/215b68a64278711ce2e4570577c27465e2b13cdb/two-layer-network/src/Main.hs#L329-L340 |
| 04:10:33 | <aegon> | Axman6: ^ that function. I belive the fromList (pure <$> xs) is creating a tensor |
| 04:10:40 | <aegon> | but i cant get it to behave in GHCi |
| 04:12:33 | <aegon> | oh i see its defined in Torch.HList and explicitly for Maybe [a] values which seems pretty specific |
| 04:12:39 | <aegon> | digging more |
| 04:12:49 | ← | euouae parts (~euouae@user/euouae) () |
| 04:12:52 | <Axman6> | rtight, so what `ComputeHaskellType dtype ~ Float` is saying is that, a constraint on running that function is that the result of evaluating the (I asusme) type family `ComputeHaskellType` must be Float |
| 04:13:46 | <aegon> | ok so I shoudl also look into the workings of that function |
| 04:14:28 | <sim590> | aegon: http://ix.io/3uL1 |
| 04:14:34 | <aegon> | i need to replace Float with [Float] you have given me a ton of breadcrumbs to chase though. I'm thinking at this point its best to just be explicit about creating a tensor instead of using the fromList machinery but I'm gonna keep tracking down these threads to grok it better |
| 04:14:47 | <sim590> | huh. euouae ^ |
| 04:15:54 | → | lbseale joins (~lbseale@user/ep1ctetus) |
| 04:15:58 | <aegon> | I guess first see what hte fromList implementation of Maybe [Float] is doing and also check what ComputeHaskellType will evaluate to [Float] maybe this machinery they have build doesn't yet work for this use case |
| 04:17:10 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 04:19:48 | → | Null_A joins (~null_a@c-98-210-133-39.hsd1.ca.comcast.net) |
| 04:22:55 | → | thyriaen joins (~thyriaen@x4dbfed8a.dyn.telefonica.de) |
| 04:23:14 | × | jmjl quits (julian@user/jmjl) (Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the IRC world.) |
| 04:32:26 | → | qbt joins (~edun@user/edun) |
| 04:35:07 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 258 seconds) |
| 04:37:23 | arahael1 | is now known as Arahael |
| 04:38:18 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 04:41:34 | → | reumeth joins (~reumeth@user/reumeth) |
| 04:44:21 | → | gambpang joins (~ian@207.181.230.156) |
| 04:50:47 | × | curiousgay quits (~curiousga@77-120-186-48.kha.volia.net) (Remote host closed the connection) |
| 04:51:04 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Remote host closed the connection) |
| 04:51:09 | → | curiousgay joins (~curiousga@77-120-186-48.kha.volia.net) |
| 04:51:18 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 04:51:28 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 04:53:12 | × | lbseale quits (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer) |
| 05:03:15 | × | hmmmas quits (~fidnc@183.217.200.220) (Quit: Leaving.) |
| 05:05:16 | → | poljar joins (~poljar@93-139-92-135.adsl.net.t-com.hr) |
| 05:05:23 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 05:08:45 | × | Null_A quits (~null_a@c-98-210-133-39.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 05:28:34 | → | jneira joins (~jneira@212.8.115.226) |
| 05:29:23 | × | jay-invariant quits (~jay@c-24-4-6-169.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 05:39:23 | × | poljar quits (~poljar@93-139-92-135.adsl.net.t-com.hr) (Quit: WeeChat 3.2) |
| 05:39:53 | → | poljar joins (~poljar@93-139-92-135.adsl.net.t-com.hr) |
| 05:42:57 | → | lavaman joins (~lavaman@98.38.249.169) |
| 05:47:24 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
| 05:52:53 | → | awth13 joins (~awth13@user/awth13) |
| 05:55:51 | → | sergio812 joins (~sergio812@lfbn-ren-1-403-102.w2-10.abo.wanadoo.fr) |
| 05:59:12 | × | stevenxl quits (uid133530@id-133530.highgate.irccloud.com) (Quit: Connection closed for inactivity) |
| 06:00:59 | → | chris_ joins (~chris@81.96.113.213) |
| 06:04:48 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 265 seconds) |
| 06:06:49 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:11:39 | → | michalz joins (~michalz@185.246.204.61) |
| 06:17:10 | → | euouae joins (~euouae@user/euouae) |
| 06:17:17 | <euouae> | What is the meaning of ()? E..g IO () ? |
| 06:17:29 | <dminuoso> | euouae: That's the unit type. |
| 06:17:39 | <dminuoso> | It might as well been named Unit, e.g. `IO Unit` |
| 06:17:52 | <dminuoso> | It's sole data constructor is.. confusingly, also named () |
| 06:17:57 | <euouae> | Why is `IO ()` useful |
| 06:18:09 | × | michalz quits (~michalz@185.246.204.61) (Remote host closed the connection) |
| 06:18:20 | <dminuoso> | euouae: `IO ()` is an action that doesn't produce any result (well, it produces the unit result, but that has trivially no information) |
| 06:18:32 | <dminuoso> | It's roughly equivalent to a C function `void f(...)` |
| 06:18:33 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 06:18:50 | <dminuoso> | % :t putStrLn |
| 06:18:51 | <euouae> | you can throw away the result of an IO action right? |
| 06:18:51 | <yahb> | dminuoso: String -> IO () |
| 06:18:57 | <dminuoso> | Yes. |
| 06:19:23 | <euouae> | So there's always a projection `M a -> M t` |
| 06:19:30 | <euouae> | Sorry, `M a -> M ()` |
| 06:19:36 | <dminuoso> | Correct |
| 06:19:40 | <Maxdamantus> | You can't have an `IO` action that emits no value, so the value `()` is used as a placeholder. |
| 06:19:45 | <dminuoso> | % :t () <$ putStrLn "foo" -- euouae |
| 06:19:45 | <yahb> | dminuoso: IO () |
| 06:19:55 | <dminuoso> | This combinator is also, very confusingly, named `void` in base |
| 06:19:58 | <dminuoso> | % :t void |
| 06:19:58 | <yahb> | dminuoso: Functor f => f a -> f () |
| 06:20:02 | <euouae> | Which means that function taking `M ()` may as well take `M a`, it's just a hint that they do nothing with `a` |
| 06:20:08 | <dminuoso> | euouae: Precisely. |
| 06:20:14 | <dminuoso> | You're spot on. |
| 06:20:21 | <euouae> | However, they can't take `M a`, right? |
| 06:20:30 | <dminuoso> | Also correct. |
| 06:20:36 | <dminuoso> | Which is why `void` exists. |
| 06:20:37 | <euouae> | Alright, thank you for clarifying everything :) |
| 06:20:57 | <dminuoso> | It's for massaging values like IO actions into the right type, for when some other function demands say `IO ()` |
| 06:21:10 | <dminuoso> | But you can also just write `() <$ foo` if you like |
| 06:21:51 | <euouae> | But what does `() <$ putStrLn "Hello"` print |
| 06:22:02 | <dminuoso> | Oh, well to be fair that's a silly thing to do |
| 06:22:10 | <dminuoso> | % :T () <$ getLine |
| 06:22:10 | <yahb> | dminuoso: unknown command ':T'; use :? for help. |
| 06:22:12 | <dminuoso> | % :t () <$ getLine |
| 06:22:12 | <yahb> | dminuoso: IO () |
| 06:22:14 | <dminuoso> | This is a etter example |
| 06:22:19 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 06:22:45 | <euouae> | I see |
| 06:22:47 | <dminuoso> | euouae: It sitll prints "Hello". The example is poor because putStrLn at the end already produces IO (). |
| 06:23:04 | <dminuoso> | But with getLine, you still get the effect of consuing a string on stdin, but it throws away the result |
| 06:23:20 | <euouae> | Right the type information is different than the side ffects |
| 06:23:31 | <dminuoso> | Right. |
| 06:23:32 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds) |
| 06:23:33 | <euouae> | in some sense at least. of course IO is always there |
| 06:23:34 | Lord_of_Life_ | is now known as Lord_of_Life |
| 06:25:43 | <dminuoso> | euouae: Right, this is the beauty of this parametrized IO type. We separate the side-effect (IO) from the result of carrying out that side-effect. |
| 06:26:04 | <dminuoso> | Now, of course we cant know what exact side-effects actually happen inside IO. And this is where the idea of effect systems begins. |
| 06:26:13 | <dibblego> | IO is unrelated to side-effects |
| 06:27:06 | × | gambpang quits (~ian@207.181.230.156) (Ping timeout: 272 seconds) |
| 06:27:22 | → | gambpang joins (~ian@207.181.230.156) |
| 06:28:31 | → | Obo joins (~roberto@70.pool90-171-81.dynamic.orange.es) |
| 06:34:13 | × | guest86 quits (~guest86@2001:8004:1420:14ac:b1cc:c092:84b0:86f6) (Ping timeout: 246 seconds) |
| 06:36:15 | <aegon> | Axman6: if your still around i found it out. This is the wierdest syntax yet fromJust (fromList x) is the way to get it from a list that has been built up by a function |
| 06:36:33 | <aegon> | is the fromJust part of IsList stuff or is that something specific that the Hasktorch implementation did :? |
| 06:38:10 | <Axman6> | :t fromJust |
| 06:38:11 | <lambdabot> | Maybe a -> a |
| 06:38:38 | <euouae> | dminuoso: Is this related? http://okmij.org/ftp/Haskell/extensible/exteff.pdf |
| 06:38:41 | <Axman6> | I guess there's a IsList instnce for Maybe? that code looks quite confusing though |
| 06:39:41 | <dminuoso> | euouae: Yes, this is one example. |
| 06:42:05 | <euouae> | dminuoso: Ok I don't see it myself, but I trust that it's being researched :P I'll probably be learning the basics of cabal and the rest of the tools for now :) |
| 06:42:12 | × | phma_ quits (phma@2001:5b0:211b:e2d8:c072:cd43:475:d917) (Read error: Connection reset by peer) |
| 06:42:54 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 06:43:08 | <dminuoso> | euouae: Yeah. Much in the effect systems is ongoing research and experimentation, and in Haskell in particular it's mostly limited to custom effects (in the sense of how do we compose various monadic effects together in an extensible and declarative way). |
| 06:43:08 | → | phma_ joins (phma@2001:5b0:210d:4948:1e1a:34b5:d23e:1981) |
| 06:47:47 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 06:55:08 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 06:57:07 | → | acidjnk_new joins (~acidjnk@p200300d0c72b9504b8b6f59e7f78d4aa.dip0.t-ipconnect.de) |
| 07:01:27 | <sergio812> | I’m having trouble with QuickCheck’s “collect” when testing IO code... |
| 07:01:37 | <sergio812> | I can easily modify a basic property like “prop_pure list = myImpl list === refImpl list” to add case distribution like so “prop_pure list = collect (length list) $ myImpl list === refImpl list”, and all works fine. |
| 07:02:03 | <sergio812> | Now, how should I do to add case distribution to IO code like “prop_io list = monadicIO $ do { res <- run $ myImplIO list; assert $ res == refImpl list }”? |
| 07:02:19 | <sergio812> | I tried tucking in “collect (length l) $” before “run” or “assert” and GHC complained about expecting type “PropertyM IO Int” or “PropertyM IO a0”, while actual type is “Property”. |
| 07:02:20 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:4a3f:fe34:92c5:875c) |
| 07:02:33 | <sergio812> | I tried tucking in “collect (length l) $” after “run” or “assert” and GHC complained about expecting type “IO Int” or “Bool”, while actual type is “Property”. |
| 07:02:42 | <sergio812> | Can I use “collect” for IO code? If so, how? If not, how can I add case distribution? |
| 07:04:56 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 07:10:29 | → | fendor joins (~fendor@77.119.222.253.wireless.dyn.drei.com) |
| 07:11:12 | <c_wraith> | sergio812: Why are you trying to do it inside the do block? |
| 07:11:23 | <c_wraith> | sergio812: it would work just fine if you did it outside |
| 07:12:15 | <nshepperd> | sergio812: i think you're meant to use 'monitor' in io tests |
| 07:12:38 | <nshepperd> | sergio812: https://hackage.haskell.org/package/QuickCheck-2.14.2/docs/Test-QuickCheck-Monadic.html#v:monitor |
| 07:13:40 | <sergio812> | c_wraith: you mean, tuck in "collect (length list) $" before "monadicIO"? |
| 07:14:09 | <c_wraith> | oh, if it is a scoping error, then yes. monitor is what you want |
| 07:14:36 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 272 seconds) |
| 07:14:52 | <sergio812> | c_wraith: you're probably right that I can make do with putting it outside on this example |
| 07:16:40 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 07:16:41 | <sergio812> | nshepperd: thank you for pointing me to "monitor"! |
| 07:17:13 | × | azeem quits (~azeem@dynamic-adsl-94-34-48-122.clienti.tiscali.it) (Remote host closed the connection) |
| 07:17:26 | → | azeem joins (~azeem@dynamic-adsl-94-34-48-122.clienti.tiscali.it) |
| 07:20:10 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 240 seconds) |
| 07:21:52 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 07:21:52 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Read error: Connection reset by peer) |
| 07:22:03 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 07:22:58 | → | mastarija joins (~mastarija@31.217.8.174) |
| 07:24:06 | × | shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit) |
| 07:24:06 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds) |
| 07:24:21 | <mastarija> | Do we have something like the "Alternative" type class, but that is related to "Semigroup" instead of "Monoid". I'd really like an instance of the Alternative, but without that annoying "empty" |
| 07:24:48 | <dminuoso> | mastarija: Check out semigroupoids |
| 07:24:51 | → | cfricke joins (~cfricke@user/cfricke) |
| 07:25:05 | <mastarija> | dminuoso, nothing in base, huh? |
| 07:25:08 | <dminuoso> | Right |
| 07:25:17 | <dminuoso> | https://hackage.haskell.org/package/semigroupoids-5.3.5/docs/Data-Functor-Alt.html |
| 07:25:29 | <dminuoso> | mastarija: ^- this is one of the reasons quite a few packages depend on semigroupoids. :) |
| 07:25:36 | <mastarija> | :D |
| 07:25:48 | <mastarija> | I guess mine will too |
| 07:29:55 | → | jay-invariant joins (~jay@c-24-4-6-169.hsd1.ca.comcast.net) |
| 07:30:06 | <dibblego> | Either is a good example instance |
| 07:31:03 | <mastarija> | Would it be fine, if I write in my library, you are free to use the "empty", but if you do, you might loose the data you've been accumulating? |
| 07:31:22 | <dibblego> | as long as it is lawful, sure |
| 07:31:29 | <mastarija> | Yes, it is. |
| 07:31:37 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 07:32:19 | <mastarija> | I mean, everything checks out, it's just that "empty" that's a thorn in my eyes, and there's no way to introduce it through my DSL other than explicitly writing "empty" somewhere in the code |
| 07:32:37 | <mastarija> | Could I use custom error messages somehow in that case? |
| 07:32:57 | <mastarija> | So that compiler warns the user in advance if he typed empty instead of mempty? |
| 07:32:58 | <dibblego> | you might want to show the example |
| 07:33:20 | <mastarija> | data Wrong e = Neutral | Inert e | Wrong e |
| 07:33:31 | <mastarija> | My error aggregation type |
| 07:33:48 | <mastarija> | Neutral is added purely because of empty |
| 07:33:53 | <dibblego> | FYI, that's iso to data Wrong e = Neutral | Blah e Bool |
| 07:34:10 | <mastarija> | Yes |
| 07:34:26 | <dibblego> | my opinion: if there is a bug because of typing the wrong thing in a nominal system -> use parametricity more |
| 07:34:42 | <mastarija> | Ideally, it would be data Wrong e = Inert e | Wrong e |
| 07:34:53 | <dibblego> | well do that as well if it helps |
| 07:35:04 | <mastarija> | dibblego, not sure what you mean by parametricity |
| 07:35:26 | <dibblego> | x :: Alternative f => f a; x = mempty -- fails to compile |
| 07:35:38 | → | kuribas joins (~user@ptr-25vy0i94rzok8s66yz2.18120a2.ip6.access.telenet.be) |
| 07:36:09 | <kuribas> | would it be possible to get C-like performance for dealing with binary data formats? |
| 07:36:15 | <kuribas> | In C I can just cast a buffer to a datatype. |
| 07:36:26 | <euouae> | There's unboxed types |
| 07:36:44 | <kuribas> | However, in haskell instead of just deserialising, I could take a strict bytestring and use accessor functions. |
| 07:36:58 | → | mastarija_ joins (~mastarija@31.217.8.174) |
| 07:37:14 | <mastarija_> | why does this nickserv keep changing my username? |
| 07:37:21 | × | timCF quits (~timCF@200-149-20-81.sta.estpak.ee) (Quit: leaving) |
| 07:37:28 | <euouae> | You're dropping your connection mastarija_ |
| 07:37:42 | <mastarija_> | Hm... didn't used to happen. |
| 07:38:00 | <euouae> | kuribas: You can use GHCs unboxed types, wouldn't that be what you need in terms of performance? |
| 07:38:20 | <kuribas> | euouae: the bytestring is irregular, like, not a list of integers, but a index, different regions, etc... |
| 07:38:33 | <kuribas> | like a binary file format... |
| 07:39:12 | <euouae> | It can be an array of unboxed bytes which you can then interpret as you'd like |
| 07:39:28 | <kuribas> | yes, something like that... |
| 07:40:34 | × | mastarija quits (~mastarija@31.217.8.174) (Ping timeout: 272 seconds) |
| 07:41:43 | <euouae> | You need to benchmark and see whether you need that |
| 07:41:53 | <euouae> | Have you determined that your code is slow as is? |
| 07:41:59 | <nshepperd> | use Storable and hope the memcpys get optimised away? |
| 07:42:15 | <kuribas> | hmm, bytestring doesn't have O(1) conversion from C Ptr? |
| 07:43:14 | <kuribas> | Maybe I need Vector.Storable.Vector Word8 then... |
| 07:45:18 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:46:21 | × | mastarija_ quits (~mastarija@31.217.8.174) (Quit: Leaving) |
| 07:47:03 | → | chele joins (~chele@user/chele) |
| 07:47:28 | <euouae> | is it possible to work with Haskell offline? |
| 07:47:40 | <dminuoso> | Why shouldn't it? |
| 07:47:49 | <euouae> | I.e. have cabal and/or stack use the cached modules |
| 07:48:04 | <euouae> | and also access the docs from haddock for base? |
| 07:48:13 | <maerwald[m]> | Cabal has an `--offline` switch |
| 07:48:18 | <euouae> | Nice |
| 07:48:27 | <kuribas> | ah, unsafeUseAsCString is O(1) |
| 07:48:29 | <euouae> | Ok that probably does it. Thanks |
| 07:48:30 | <dminuoso> | Also, davean has build a thing while they were offline for a prolonged time. |
| 07:48:33 | <maerwald[m]> | Haddock db will need to be built afair |
| 07:48:37 | <dminuoso> | But I dont recall the name of that project |
| 07:49:42 | <euouae> | Alright, g2g, thank you for the help. |
| 07:49:45 | × | euouae quits (~euouae@user/euouae) (Quit: Client closed) |
| 07:50:32 | <merijn> | Most extreme scenario you can just host a local mirror of Hackage :p |
| 07:51:19 | <dminuoso> | Yeah, and davean build something akin to that |
| 07:51:35 | <dminuoso> | But hackage is quite a beast that cant just be run. It's very annoying |
| 07:55:53 | → | mastarija joins (~mastarija@31.217.8.174) |
| 07:57:38 | <maerwald[m]> | This should be made easier |
| 07:58:18 | × | gambpang quits (~ian@207.181.230.156) (Ping timeout: 272 seconds) |
| 07:58:34 | → | gambpang joins (~ian@207.181.230.156) |
| 07:58:46 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 08:00:25 | <kuribas> | hmm, maybe I can use GADTs to get safe indexes. For example data MyFields a where Field1 :: Field Int8; Field2 :: Field Word16, then some magic to calculate offsets... |
| 08:03:58 | <kuribas> | better than manually calculating offsets... |
| 08:05:35 | <kuribas> | Maybe a TH function that creates a function "readMyField :: ByteString -> MyFields a -> a" |
| 08:05:55 | <kuribas> | (or generics, but that doesn't seem to work with GADTs). |
| 08:06:05 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 08:08:26 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 244 seconds) |
| 08:10:22 | <kuribas> | of course the idea is that this becomes inlined, and reduced to a single indexed bytestring read. |
| 08:12:39 | <merijn> | kuribas: Why not use, like, binary? |
| 08:12:57 | <kuribas> | merijn: because that implies copying. |
| 08:13:33 | <merijn> | How so? |
| 08:14:08 | <kuribas> | merijn: because I need to deserialize the whole thing, no? |
| 08:14:20 | <kuribas> | merijn: where I want only a single field, for example. |
| 08:14:23 | <merijn> | It Depends (TM) |
| 08:14:45 | <merijn> | tbh, if you want to index specific byte locations it sounds like you just want Storable |
| 08:14:53 | × | earthy quits (~arthurvl@2001:984:275b:1:ba27:ebff:fea0:40b0) (Ping timeout: 255 seconds) |
| 08:15:27 | <kuribas> | merijn: that doesn't solve the problem of finding a single field, does it? |
| 08:16:13 | <merijn> | I think I'm missing context here |
| 08:16:47 | × | aegon quits (~mike@174.127.249.180) (Quit: leaving) |
| 08:17:17 | <kuribas> | merijn: in my example above, say I want Field2, not Field1 |
| 08:17:22 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 08:17:26 | → | zeenk joins (~zeenk@2a02:2f04:a211:a800:553b:3cb0:5ea1:7e83) |
| 08:17:47 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 08:17:50 | <kuribas> | here it's only two fields, but in reality it may be a big buffer with several indirections. |
| 08:18:26 | <merijn> | there is no example above |
| 08:18:34 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 272 seconds) |
| 08:18:45 | <merijn> | There's just a vague handwave of a GADT with no relation to any specific memory layout/whatever |
| 08:20:00 | <kuribas> | merijn: the layout is the order of the data type. |
| 08:21:06 | × | johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in) |
| 08:21:12 | <kuribas> | So struct MyFields { char field1; unsigned short field2 }. |
| 08:22:31 | <merijn> | You just said you had indirections, though, so that can't be right |
| 08:23:05 | <kuribas> | not in this example |
| 08:25:19 | <kuribas> | merijn: even without indirection, binary will not help |
| 08:25:22 | <kuribas> | or Storable |
| 08:25:58 | <merijn> | How will Storable not help? |
| 08:26:50 | → | michalz joins (~michalz@185.246.204.40) |
| 08:28:37 | <merijn> | In fact, storable is really the *only* way to arbitrary indexing |
| 08:29:20 | <dminuoso> | Storable has some really odd UX problems. :( |
| 08:30:23 | <merijn> | hmm? |
| 08:30:23 | <kuribas> | merijn: show me how how to get field2 using storable, without deserializing the whole thing? |
| 08:30:40 | <merijn> | kuribas: Storable lets you just do arbitrary pointer offsets |
| 08:31:07 | <kuribas> | merijn: but the whole idea of my construction is to **not** calculate pointer offsets. |
| 08:31:12 | <kuribas> | Well, not manually. |
| 08:31:19 | <merijn> | kuribas: Sucks to be you then |
| 08:31:27 | <kuribas> | heh, what? |
| 08:31:30 | <merijn> | You can try c2hsc or hsc2hs |
| 08:31:36 | <merijn> | And pray to god it happens to work |
| 08:32:08 | <merijn> | kuribas: You cannot automatically figure out field offsets |
| 08:32:22 | <kuribas> | merijn: you can? It's just summing the offsets. |
| 08:32:36 | <merijn> | It's not possible to correctly. There's a bunch of "best effort" attempts like c2hsc, etc |
| 08:32:40 | <kuribas> | a TH function can do that. |
| 08:32:44 | <merijn> | kuribas: And who defines those offsets? |
| 08:32:47 | <kuribas> | I do? |
| 08:33:32 | <kuribas> | merijn: or are you trying to say that C offsets aren't well defined? |
| 08:33:48 | <merijn> | kuribas: They aren't, because the sizes aren't well defined |
| 08:34:21 | <kuribas> | merijn: the size of Int8 and Word16 seems pretty well defined to me ;-) |
| 08:34:33 | <merijn> | kuribas: Well, no, because those aren't C types |
| 08:34:49 | <kuribas> | sure, so I'll use a typedef with defined sizes? |
| 08:35:05 | <sergio812> | If it's a C/C++ data structure, sizes aren't well defined. |
| 08:35:07 | <merijn> | kuribas: And then you gotta account for padding |
| 08:35:20 | <merijn> | kuribas: Compilers can (and do!) insert padding bytes into structures |
| 08:35:24 | <dminuoso> | merijn: You have a bunch of things that transitively end up doing things like `sizeOf (undefined :: a)`, even though there's values of type `a` around. So you can't trivially handle things like VLAs |
| 08:35:37 | <dminuoso> | at least not while using Foreign |
| 08:35:42 | <kuribas> | merijn: so you cannot cast a ptr in C to a struct? |
| 08:35:54 | <dminuoso> | And it's annoying because it's solveable. |
| 08:36:00 | <merijn> | kuribas: The way c2hsc works is that it generates your struct as C code, generates code that prints out byte offsets for each field and then inserts those into the hsc code |
| 08:36:13 | <merijn> | kuribas: Because that's the only way it will ever interoperate with C |
| 08:36:21 | <merijn> | kuribas: Depends on what pointer |
| 08:36:25 | <kuribas> | merijn: well, luckily I don't even need to go to C if I use this... |
| 08:36:27 | <sergio812> | But if it's a binary format stored on files, the C/C++ implementation probably use typedefs that guarantee(TM) you'll have consistent sizes |
| 08:36:39 | <sergio812> | but they may not be known from Haskell land... |
| 08:37:01 | <kuribas> | merijn: I was of the impression that people cast ptrs read from binary files to C structs... |
| 08:37:08 | <merijn> | kuribas: Yeah, morons do |
| 08:37:31 | <dminuoso> | 10:35:43 kuribas | merijn: so you cannot cast a ptr in C to a struct? <- depends. In simplified terms the C standard defines that you may not access an object through a pointer of an incompatible (i.e. different) type. |
| 08:37:34 | <merijn> | kuribas: "casting ptrs read from binary files" makes no sense, tbh |
| 08:38:13 | <kuribas> | merijn: of course you have to deal with byte ordering. But in my case I assume the byte ordering stays the same... |
| 08:38:14 | <merijn> | You can have a ptr to bytes read from a file and you can (well, imagine some very big scare quotes around that "can") cast that pointer to something |
| 08:38:32 | <merijn> | kuribas: Struct padding is different from ABI to ABI |
| 08:38:36 | <kuribas> | merijn: as it's only for storage, not for distribution. |
| 08:39:07 | <kuribas> | merijn: aren't there pragmas for dealing with padding etc... ? |
| 08:39:16 | <merijn> | kuribas: The only people who dump out struct by "serialise bytes from a pointer" are people who want to hate themselves 3 years from now |
| 08:39:41 | <merijn> | kuribas: You can adds lots of things to make dumb things seem somewhat more reasonable :p |
| 08:40:11 | <merijn> | kuribas: tbh, my first reaction would be to question your very initial assumption that you cannot afford "binary" because it copie |
| 08:40:13 | <kuribas> | So in that case, my haskell solution will be faster than C :) |
| 08:40:22 | <merijn> | Why do you think the overhead of copying will be at all relevant? |
| 08:40:37 | <merijn> | i.e. how big is your data? how sparse is your accessing? how often do you load stuff? |
| 08:41:09 | <kuribas> | merijn: it's chunked time series data. First I look up the timeseries range in the index, then the index points to another buffer with the actual data. |
| 08:41:14 | × | reumeth quits (~reumeth@user/reumeth) (Ping timeout: 256 seconds) |
| 08:41:59 | <merijn> | kuribas: I mean, binary has a "skip" combinator |
| 08:42:22 | <merijn> | I don't really see how that indirection would really form a problem if you have an accurate byte offset |
| 08:42:40 | <kuribas> | merijn: accurate byte offset is the problem... |
| 08:42:43 | <merijn> | Your binary parser doesn't really have to parse your entire format |
| 08:42:58 | <merijn> | kuribas: Well, you said you could manually define it |
| 08:43:44 | <merijn> | tbh, the question is still ill-specified as it is unclear whether this is 1) an pre-existing well defined format or 2) a format you're defining and implementing yourself |
| 08:43:54 | <kuribas> | merijn: the latter |
| 08:44:16 | <merijn> | Then you can just define it as whatever is convenient |
| 08:44:43 | <kuribas> | merijn: btw, I wrote a library for reading font formats using binary. |
| 08:44:48 | <kuribas> | It isn't all that clean... |
| 08:45:26 | <kuribas> | lot's of manual byte fiddling... |
| 08:45:40 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 08:47:02 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 08:47:56 | <kuribas> | merijn: in any case, binary and storable solve a different problem from the one I solved above, which is calculating offsets in a safer way. |
| 08:48:10 | × | fossdd quits (~fossdd@sourcehut/user/fossdd) (Ping timeout: 240 seconds) |
| 08:48:32 | <merijn> | If you are defining a format yourself you can define the format to make the offset easy and just do that? |
| 08:48:40 | → | fossdd joins (~fossdd@sourcehut/user/fossdd) |
| 08:48:41 | <merijn> | I don't understand the problem in that case |
| 08:49:04 | <merijn> | "How do I calculate offsets?" 'well, I dunno man, that depends on how you defined your format...' |
| 08:49:26 | <kuribas> | I mean, I know how to calculate offsets, but I'd prefer the compiler to do it for me... |
| 08:50:12 | <merijn> | You have to define your format somewhere anywhere, so just define the sizes there and then you can just compute it? |
| 08:50:31 | <merijn> | I literally don't understand the problem you're trying to describe |
| 08:50:55 | <merijn> | If you've defined the format, you already have the sizes defined somewhere, so you can just, like, sum them in a function and done? |
| 08:51:18 | <kuribas> | "getField bs WriteLogHead" is more descriptive than "getFieldAt bs 16" |
| 08:52:30 | <merijn> | So define a variable "writeLogHead" whose value is the sum off all the preceding fields? |
| 08:53:03 | <kuribas> | or like, don't, and let the compiler do the sum? |
| 08:53:15 | <kuribas> | why would I want to manually sum byte offsets? |
| 08:53:59 | → | drd joins (~drd@93-39-151-19.ip76.fastwebnet.it) |
| 08:54:08 | <merijn> | Well, if you wanna write TH code the loops over record fields, inspects their types, computes sizes from that, and sums them, I'm not stopping you |
| 08:55:11 | <merijn> | I mean, it'll take you 3-5 days of hating yourself to figure out the TH code, it will compile slower, no one else on the team will understand it and it'll mess up your compile times *and* ability to cross-compile, but if that seems less effort than "writing out the offsets once in a file"...nobody's stopping you |
| 08:56:00 | <mastarija> | So, I'm looking at this graph of typeclasses on typeclassopedia, https://wiki.haskell.org/File:Typeclassopedia-diagram.png |
| 08:56:08 | <mastarija> | And it says "if there is an arrow from Foo to Bar it means that every Bar is (or should be, or can be made into) a Foo" |
| 08:56:16 | <mastarija> | But that doesn't check out |
| 08:56:22 | <merijn> | mastarija: How so? |
| 08:56:25 | <mastarija> | Arrows should be in the opposite direction |
| 08:56:33 | × | azeem quits (~azeem@dynamic-adsl-94-34-48-122.clienti.tiscali.it) (Ping timeout: 258 seconds) |
| 08:56:36 | <mastarija> | Oh... |
| 08:56:38 | <merijn> | mastarija: No |
| 08:56:43 | <mastarija> | No, I read it wrong |
| 08:56:47 | <merijn> | mastarija: :) |
| 08:56:50 | <mastarija> | xD |
| 08:56:58 | × | hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity) |
| 08:57:09 | <mastarija> | But I do think arrows should be reverse :D |
| 08:57:13 | <merijn> | mastarija: Effectively the arrows are "this is a subset of" |
| 08:57:33 | <mastarija> | Yes, but my intuition is "Superset" |
| 08:57:33 | <merijn> | mastarija: I think there's something to be said for both arrow directions |
| 08:57:54 | <merijn> | mastarija: In inheritance you usually point from the superclass to subclass too |
| 08:58:10 | <merijn> | So it seems fairly natural to have arrows from superset to subset |
| 08:58:20 | → | azeem joins (~azeem@176.200.220.247) |
| 08:58:42 | <merijn> | It's also how hierarchies are normally represented |
| 08:58:43 | <mastarija> | Yes.. I guess it kind of depends on the context you're coming from |
| 09:00:44 | → | reumeth joins (~reumeth@user/reumeth) |
| 09:00:45 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 09:01:08 | → | deejaytee joins (~deejaytee@193.46-255-62.static.virginmediabusiness.co.uk) |
| 09:01:14 | → | hololeap joins (~hololeap@user/hololeap) |
| 09:03:08 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 09:03:22 | × | fossdd quits (~fossdd@sourcehut/user/fossdd) (Ping timeout: 240 seconds) |
| 09:03:43 | → | gehmehgeh_ joins (~user@user/gehmehgeh) |
| 09:04:10 | → | fossdd joins (~fossdd@sourcehut/user/fossdd) |
| 09:04:49 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 09:05:14 | → | hololeap joins (~hololeap@user/hololeap) |
| 09:05:16 | × | gehmehgeh quits (~user@user/gehmehgeh) (Ping timeout: 244 seconds) |
| 09:05:21 | → | jgeerds joins (~jgeerds@55d45555.access.ecotel.net) |
| 09:12:01 | <kuribas> | dminuoso: Storable should use at least Proxy, instead of undefined... |
| 09:12:16 | gehmehgeh_ | is now known as gehmehgeh |
| 09:12:17 | <kuribas> | dminuoso: but it was probably created before Proxy... |
| 09:12:31 | <dminuoso[m]> | kuribas: It should use the value itself. |
| 09:12:34 | <dminuoso[m]> | Otherwise you cant do things like VLAs |
| 09:13:23 | <kuribas> | what's vla? |
| 09:14:49 | <dminuoso[m]> | variable length array |
| 09:15:51 | × | fossdd quits (~fossdd@sourcehut/user/fossdd) (Remote host closed the connection) |
| 09:20:15 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 244 seconds) |
| 09:20:37 | → | mei joins (~mei@user/mei) |
| 09:20:57 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 09:22:00 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 265 seconds) |
| 09:22:25 | → | azeem joins (~azeem@176.200.220.247) |
| 09:29:34 | × | sergio812 quits (~sergio812@lfbn-ren-1-403-102.w2-10.abo.wanadoo.fr) (Ping timeout: 246 seconds) |
| 09:29:55 | → | __monty__ joins (~toonn@user/toonn) |
| 09:30:46 | × | Reyu[M] quits (~reyureyuz@matrix.reyuzenfold.com) (Remote host closed the connection) |
| 09:31:24 | → | Reyu[M] joins (~reyureyuz@matrix.reyuzenfold.com) |
| 09:31:58 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 272 seconds) |
| 09:32:12 | → | azeem joins (~azeem@176.200.220.247) |
| 09:37:55 | → | mastarija_ joins (~mastarija@31.217.8.174) |
| 09:39:34 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 272 seconds) |
| 09:40:42 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 09:41:17 | × | mastarija quits (~mastarija@31.217.8.174) (Ping timeout: 252 seconds) |
| 09:42:34 | → | jespada joins (~jespada@90.254.247.46) |
| 09:43:22 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:44:37 | → | azeem joins (~azeem@176.200.220.247) |
| 09:44:42 | × | mei quits (~mei@user/mei) (Ping timeout: 272 seconds) |
| 09:44:49 | → | lavaman joins (~lavaman@98.38.249.169) |
| 09:45:45 | × | dminuoso quits (~dminuoso@user/dminuoso) (Quit: ZNC 1.7.5 - https://znc.in) |
| 09:46:02 | → | dminuoso joins (~dminuoso@user/dminuoso) |
| 09:46:11 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 09:46:35 | → | pe200012 joins (~pe200012@113.105.10.33) |
| 09:47:01 | × | dminuoso quits (~dminuoso@user/dminuoso) (Client Quit) |
| 09:47:18 | → | dminuoso joins (~dminuoso@user/dminuoso) |
| 09:47:59 | × | berberman_ quits (~berberman@user/berberman) (Ping timeout: 252 seconds) |
| 09:48:31 | → | berberman joins (~berberman@user/berberman) |
| 09:49:04 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 09:49:14 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:49:46 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds) |
| 09:50:32 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 245 seconds) |
| 09:51:36 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) |
| 09:52:25 | <Taneb> | As a mild curiosity thing, are there any widely used libraries on Hackage with one- or two-character names? |
| 09:54:18 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 09:54:53 | <nshepperd> | ad and gl are the only ones that come to mind. not sure how widely used they are |
| 09:55:07 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:55:08 | <Taneb> | Ah yeah, I should have thought of those, I've used both of them |
| 09:56:19 | <nshepperd> | edwardk: readme for gl needs an update to point away from freenode :) |
| 10:00:34 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 10:00:55 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:03:10 | → | anandprabhu joins (~anandprab@94.202.243.198) |
| 10:03:34 | × | mastarija_ quits (~mastarija@31.217.8.174) (Ping timeout: 265 seconds) |
| 10:03:53 | <deejaytee> | Taneb: https://pastebin.com/yB6VMKJa these are the ones I got off of Hackage - no idea if any of them are particularly well-used |
| 10:03:58 | → | ubert joins (~Thunderbi@91.141.47.113.wireless.dyn.drei.com) |
| 10:05:50 | <Taneb> | deejaytee: thanks for that |
| 10:05:54 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 10:06:58 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:09:16 | → | mastarija_ joins (~mastarija@31.217.8.174) |
| 10:11:15 | → | earthy joins (~arthurvl@2001:984:275b:1:ba27:ebff:fea0:40b0) |
| 10:11:32 | × | jgeerds quits (~jgeerds@55d45555.access.ecotel.net) (Ping timeout: 252 seconds) |
| 10:12:28 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 10:12:58 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:13:44 | → | acidjnk_new3 joins (~acidjnk@p200300d0c72b95041d34620f200961c0.dip0.t-ipconnect.de) |
| 10:16:07 | → | mastarija__ joins (~mastarija@31.217.8.174) |
| 10:17:00 | × | acidjnk_new quits (~acidjnk@p200300d0c72b9504b8b6f59e7f78d4aa.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 10:18:33 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 10:18:57 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:19:31 | <kuribas> | Why does template haskell got such a bad name? |
| 10:19:32 | × | mastarija_ quits (~mastarija@31.217.8.174) (Ping timeout: 272 seconds) |
| 10:19:45 | <kuribas> | I find it easier to get correct TH than correct macros in lisp... |
| 10:20:06 | <kuribas> | probably due to the more structured AST |
| 10:20:13 | → | jippiedoe joins (~david@2a02-a448-48bd-1-6c05-d94f-4fec-758a.fixed6.kpn.net) |
| 10:21:13 | × | gehmehgeh quits (~user@user/gehmehgeh) (Ping timeout: 244 seconds) |
| 10:21:26 | <dminuoso> | What makes you think it has a bad name? |
| 10:21:29 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 10:21:33 | × | xsperry quits (~as@user/xsperry) (Remote host closed the connection) |
| 10:21:54 | <kuribas> | for example, merijn's comments |
| 10:22:06 | <dminuoso> | Though, I can think of a few things I dislike about TH. Unbounded access to IO means that every time I run `cabal update` I risk running malware on the machine. |
| 10:22:32 | <kuribas> | true, but that's also true for any installer |
| 10:22:42 | <dminuoso> | Is it true for any _compiler_? |
| 10:22:54 | <kuribas> | I don't know :P ... |
| 10:23:27 | <dminuoso> | The problem is not what `cabal update` itself does. But any subsequent `cabal build` or bumping bounds can run arbitrary code on my machine. |
| 10:23:52 | × | chris_ quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 10:24:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 10:24:45 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:30:18 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 10:31:00 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:34:26 | × | hendursa1 quits (~weechat@user/hendursaga) (Remote host closed the connection) |
| 10:34:47 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 10:36:03 | → | chris_ joins (~chris@81.96.113.213) |
| 10:36:38 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 10:37:04 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:46:18 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 240 seconds) |
| 10:46:41 | → | azeem joins (~azeem@176.200.220.247) |
| 10:47:00 | → | favonia joins (~favonia@user/favonia) |
| 10:47:24 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 10:47:40 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 10:48:47 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:51:12 | × | drd quits (~drd@93-39-151-19.ip76.fastwebnet.it) (Ping timeout: 272 seconds) |
| 10:51:46 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 10:54:30 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 276 seconds) |
| 10:54:41 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:55:38 | → | drd joins (~drd@2001:b07:a70:9f1f:1562:34de:f50f:77d4) |
| 10:57:57 | × | octeep quits (~octeep@42-2-223-196.static.netvigator.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 11:02:45 | × | haskell-lurk quits (~haskell-l@78.155.54.115) (Quit: Client closed) |
| 11:03:40 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 11:04:25 | → | hololeap joins (~hololeap@user/hololeap) |
| 11:08:09 | → | haskell-lurk joins (~haskell-l@78.155.54.115) |
| 11:13:30 | × | _bin quits (~bin@user/bin/x-1583188) (Ping timeout: 240 seconds) |
| 11:13:50 | → | _bin joins (~bin@user/bin/x-1583188) |
| 11:14:42 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 240 seconds) |
| 11:18:58 | × | pe200012 quits (~pe200012@113.105.10.33) (Quit: Konversation terminated!) |
| 11:20:04 | → | azeem joins (~azeem@176.200.220.247) |
| 11:24:24 | × | drd quits (~drd@2001:b07:a70:9f1f:1562:34de:f50f:77d4) (Ping timeout: 276 seconds) |
| 11:24:46 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 272 seconds) |
| 11:26:06 | → | mastarija_ joins (~mastarija@31.217.8.174) |
| 11:26:14 | → | pe200012 joins (~pe200012@113.105.10.33) |
| 11:27:13 | → | azeem joins (~azeem@176.200.220.247) |
| 11:29:36 | × | mastarija__ quits (~mastarija@31.217.8.174) (Ping timeout: 265 seconds) |
| 11:36:24 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 258 seconds) |
| 11:36:39 | → | azeem joins (~azeem@176.200.220.247) |
| 11:36:50 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 11:40:38 | × | reumeth quits (~reumeth@user/reumeth) (Ping timeout: 252 seconds) |
| 11:42:37 | → | mastarija__ joins (~mastarija@31.217.8.174) |
| 11:45:59 | × | mastarija_ quits (~mastarija@31.217.8.174) (Ping timeout: 258 seconds) |
| 11:49:45 | → | reumeth joins (~reumeth@user/reumeth) |
| 11:50:52 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 265 seconds) |
| 11:51:21 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 11:51:23 | × | jneira quits (~jneira@212.8.115.226) (Quit: Client closed) |
| 11:51:37 | → | jneira joins (~jneira@212.8.115.226) |
| 11:51:54 | → | azeem joins (~azeem@176.200.220.247) |
| 11:56:10 | → | poljar1 joins (~poljar@93-139-4-196.adsl.net.t-com.hr) |
| 11:56:40 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 265 seconds) |
| 11:57:42 | × | poljar quits (~poljar@93-139-92-135.adsl.net.t-com.hr) (Ping timeout: 272 seconds) |
| 11:58:20 | × | chris_ quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 12:00:03 | × | shailangsa quits (~shailangs@host86-186-196-233.range86-186.btcentralplus.com) (Ping timeout: 268 seconds) |
| 12:00:25 | → | chris_ joins (~chris@81.96.113.213) |
| 12:00:51 | → | azeem joins (~azeem@176.200.220.247) |
| 12:02:05 | × | xff0x quits (~xff0x@2001:1a81:53e4:9a00:e1e1:9272:fb77:3704) (Ping timeout: 252 seconds) |
| 12:02:43 | → | xff0x joins (~xff0x@2001:1a81:53e4:9a00:e1e1:9272:fb77:3704) |
| 12:02:46 | × | ubert quits (~Thunderbi@91.141.47.113.wireless.dyn.drei.com) (Ping timeout: 272 seconds) |
| 12:03:42 | → | enoq joins (~enoq@194-208-179-35.lampert.tv) |
| 12:06:29 | × | deejaytee quits (~deejaytee@193.46-255-62.static.virginmediabusiness.co.uk) (Ping timeout: 252 seconds) |
| 12:10:11 | → | Guest72 joins (~Guest72@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) |
| 12:11:28 | × | thyriaen quits (~thyriaen@x4dbfed8a.dyn.telefonica.de) (Quit: Leaving) |
| 12:11:47 | <Guest72> | is `callback fetch` something well-known and defined in Haskell world? |
| 12:13:50 | <dminuoso> | Probably not. |
| 12:14:08 | <dminuoso> | What exactly are you referring to? The function `callback`? |
| 12:14:13 | <dminuoso> | The value `fetch`? |
| 12:16:23 | Guest72 | is now known as rond_ |
| 12:18:08 | → | alx741 joins (~alx741@186.178.108.145) |
| 12:18:40 | <rond_> | `fetch` is a callback; I thought that maybe it's well-defined somewhere; probably not, I need to read more and perhaps I'll come back with follow-up questions |
| 12:20:06 | <merijn> | rond_: tbh at this point I have 0 idea what you're asking, so that makes answering...tricky :p |
| 12:20:09 | <dminuoso> | Well it likely is defined *somewhere* if you're reading it somewhere. :) |
| 12:20:28 | <merijn> | I don't even know what "callback fetch" is in any context |
| 12:20:47 | × | Obo quits (~roberto@70.pool90-171-81.dynamic.orange.es) (Ping timeout: 252 seconds) |
| 12:22:48 | <rond_> | the "0 idea what you're asking for" fully answers my question. If `fetch` was well-known, then you'd know what's the question about. I.e. you'd recognize `State monad` phrase or alikes :) thank you! |
| 12:23:34 | <merijn> | rond_: State monad terminology is usually get/put |
| 12:23:49 | × | goepsilongo quits (~chacho@2603-7000-ab00-62ed-0000-0000-0000-0bd0.res6.spectrum.com) (Quit: Konversation terminated!) |
| 12:27:36 | <merijn> | Entirely unrelated question |
| 12:28:01 | <merijn> | If you have a command that takes a file to diff vs a "default" configuration |
| 12:28:33 | <merijn> | Should the file argument be treated as "the old" and the default as "new" or vice versa. |
| 12:28:36 | <sshine> | rond_, is this javascript terminology? in that case, you can get calbacks by passing a function as an argument, and 'fetch' appears to be async browser requests? so... that depends on how you run Haskell in the browser... |
| 12:30:17 | <sshine> | rond_, if you mean how to write concurrent/async code in Haskell, you generally don't use promises. there's basic forking: https://github.com/crabmusket/haskell-simple-concurrency/blob/master/src/tutorial.md -- and then there's a number of abstractions built on top of that. |
| 12:30:18 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 12:30:27 | → | MQ-17J joins (~MQ-17J@8.6.144.192) |
| 12:30:57 | → | shailangsa joins (~shailangs@host86-186-196-233.range86-186.btcentralplus.com) |
| 12:31:34 | <rond_> | thank you all! :) It turned out to be a project-specific term; sorry for the confusion! |
| 12:33:47 | <sshine> | ah :) yeah, fetch is a very generic term. |
| 12:36:52 | × | shailangsa quits (~shailangs@host86-186-196-233.range86-186.btcentralplus.com) () |
| 12:38:10 | × | markpythonicbitc quits (~textual@2601:647:5a00:35:ccd8:d07e:17cb:5010) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 12:40:49 | × | PinealGlandOptic quits (~PinealGla@37.115.210.35) (Quit: leaving) |
| 12:40:56 | × | xff0x quits (~xff0x@2001:1a81:53e4:9a00:e1e1:9272:fb77:3704) (Ping timeout: 256 seconds) |
| 12:41:54 | → | xff0x joins (~xff0x@2001:1a81:53e4:9a00:3689:c5ce:3234:2238) |
| 12:43:57 | → | Melantha joins (~pyon@user/pyon) |
| 12:44:16 | → | mikoto-chan joins (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) |
| 12:45:06 | → | Putonlalla joins (~sapekiis@it-cyan.it.jyu.fi) |
| 12:45:07 | → | fendor_ joins (~fendor@178.115.48.162.wireless.dyn.drei.com) |
| 12:47:12 | → | deejaytee joins (~deejaytee@cpc91196-cmbg18-2-0-cust215.5-4.cable.virginm.net) |
| 12:47:37 | → | mastarija_ joins (~mastarija@31.217.8.174) |
| 12:47:46 | × | fendor quits (~fendor@77.119.222.253.wireless.dyn.drei.com) (Ping timeout: 250 seconds) |
| 12:49:23 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 12:49:38 | × | deejaytee quits (~deejaytee@cpc91196-cmbg18-2-0-cust215.5-4.cable.virginm.net) (Killed (zirconium.libera.chat (Nickname regained by services))) |
| 12:49:43 | → | deejaytee joins (~deejaytee@193.46-255-62.static.virginmediabusiness.co.uk) |
| 12:50:42 | × | mastarija__ quits (~mastarija@31.217.8.174) (Ping timeout: 240 seconds) |
| 12:53:50 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds) |
| 12:58:00 | → | jolly joins (~jolly@208.180.97.158) |
| 12:59:38 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 256 seconds) |
| 13:00:57 | × | ornxka quits (~ornxka@user/ornxka) (Ping timeout: 265 seconds) |
| 13:01:31 | → | ornxka joins (~ornxka@user/ornxka) |
| 13:02:41 | × | mastarija_ quits (~mastarija@31.217.8.174) (Ping timeout: 252 seconds) |
| 13:03:10 | → | acidjnk_new joins (~acidjnk@p5487d90a.dip0.t-ipconnect.de) |
| 13:03:42 | <kritzefitz> | merijn, the way you describe it I think the default should be old and the file should be new. But I guess it depends on what exactly the default is used for. |
| 13:03:44 | → | azeem joins (~azeem@176.200.220.247) |
| 13:03:59 | × | jneira quits (~jneira@212.8.115.226) (Quit: Client closed) |
| 13:04:40 | → | Obo joins (~roberto@70.pool90-171-81.dynamic.orange.es) |
| 13:04:50 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:4a3f:fe34:92c5:875c) (Ping timeout: 272 seconds) |
| 13:05:07 | × | Alex_test quits (~al_test@178.34.150.193) (Quit: ;-) |
| 13:05:28 | × | AlexZenon quits (~alzenon@178.34.150.193) (Quit: ;-) |
| 13:05:31 | × | AlexNoo quits (~AlexNoo@178.34.150.193) (Quit: Leaving) |
| 13:06:28 | → | Igor joins (~Igor@109.252.65.176) |
| 13:06:50 | → | drd joins (~drd@93-39-151-19.ip76.fastwebnet.it) |
| 13:07:18 | → | shailangsa joins (~shailangs@host86-186-196-233.range86-186.btcentralplus.com) |
| 13:07:22 | × | acidjnk_new3 quits (~acidjnk@p200300d0c72b95041d34620f200961c0.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 13:08:11 | → | tungki joins (~tngk@subs30-116-206-14-0.three.co.id) |
| 13:12:14 | × | Igor quits (~Igor@109.252.65.176) (Quit: Client closed) |
| 13:13:02 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 265 seconds) |
| 13:15:03 | → | azeem joins (~azeem@176.200.220.247) |
| 13:16:48 | → | AlexZenon joins (~alzenon@178.34.150.193) |
| 13:20:20 | → | markpythonicbitc joins (~textual@50.228.44.6) |
| 13:21:11 | → | Alex_test joins (~al_test@178.34.150.193) |
| 13:21:22 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 240 seconds) |
| 13:21:50 | → | azeem joins (~azeem@176.200.220.247) |
| 13:22:13 | × | deejaytee quits (~deejaytee@193.46-255-62.static.virginmediabusiness.co.uk) (Remote host closed the connection) |
| 13:22:42 | → | deejaytee joins (~deejaytee@193.46-255-62.static.virginmediabusiness.co.uk) |
| 13:22:45 | → | AlexNoo joins (~AlexNoo@178.34.150.193) |
| 13:23:43 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 13:25:44 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) (Ping timeout: 272 seconds) |
| 13:25:57 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 13:26:34 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 13:27:52 | → | tngk joins (~tngk@subs30-116-206-14-53.three.co.id) |
| 13:28:33 | × | Obo quits (~roberto@70.pool90-171-81.dynamic.orange.es) (Ping timeout: 276 seconds) |
| 13:28:54 | × | tungki quits (~tngk@subs30-116-206-14-0.three.co.id) (Ping timeout: 272 seconds) |
| 13:29:11 | → | mastarija_ joins (~mastarija@31.217.8.174) |
| 13:33:49 | → | jgeerds joins (~jgeerds@55d45555.access.ecotel.net) |
| 13:33:54 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 272 seconds) |
| 13:35:45 | × | kuribas quits (~user@ptr-25vy0i94rzok8s66yz2.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 13:36:28 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds) |
| 13:36:33 | → | pesada joins (~agua@2804:14c:8793:8e2f:64f8:45c2:2056:5625) |
| 13:36:52 | → | azeem joins (~azeem@176.200.220.247) |
| 13:37:30 | × | anandprabhu quits (~anandprab@94.202.243.198) (Quit: Leaving) |
| 13:38:26 | × | agua quits (~agua@2804:18:7d:7d0f:1:0:789f:b031) (Ping timeout: 252 seconds) |
| 13:39:42 | tngk | is now known as tungki |
| 13:46:38 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 272 seconds) |
| 13:47:03 | × | chris_ quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 13:48:20 | → | chris_ joins (~chris@81.96.113.213) |
| 13:48:32 | × | tungki quits (~tngk@subs30-116-206-14-53.three.co.id) (Ping timeout: 272 seconds) |
| 13:51:06 | → | azeem joins (~azeem@176.200.220.247) |
| 13:51:24 | → | nvmd joins (~nvmd@user/nvmd) |
| 13:56:11 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 13:57:14 | <boxscape> | is there a canonical word for "value of a singleton type"? |
| 13:57:38 | <boxscape> | ..."singleton"? |
| 13:58:43 | <boxscape> | looking at the documentation of singletons is looks like yes. Somehow I didn't think of that until just now |
| 13:59:08 | <boxscape> | (of using the word "singleton" for it I mean) |
| 13:59:26 | → | amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) |
| 14:06:16 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 272 seconds) |
| 14:07:04 | → | azeem joins (~azeem@176.200.220.247) |
| 14:07:13 | → | tungki joins (~tngk@subs30-116-206-14-53.three.co.id) |
| 14:07:32 | × | curiousgay quits (~curiousga@77-120-186-48.kha.volia.net) (Ping timeout: 272 seconds) |
| 14:08:10 | × | gambpang quits (~ian@207.181.230.156) (Ping timeout: 272 seconds) |
| 14:09:03 | <sshine> | boxscape, "unit"? |
| 14:10:17 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2) |
| 14:10:18 | <boxscape> | sshine, hm, perhaps. In the particular case I have (writing a comment explaining something about the value) I prefer something that evokes some relationship to singleton types |
| 14:10:32 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:10:32 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 14:14:29 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 14:15:49 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:16:15 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 14:17:35 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:20:36 | <Athas> | boxscape: "the value"! |
| 14:20:41 | <Athas> | There is only one, after all. |
| 14:21:17 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 14:21:49 | <boxscape> | hm, yes I suppose I could just "the value of a singleton type for <some type variable>" instead of insisting on a single word |
| 14:21:56 | → | Obo joins (~roberto@70.pool90-171-81.dynamic.orange.es) |
| 14:22:59 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:23:05 | <deejaytee> | "inhabitant" comes to mind |
| 14:24:08 | <Athas> | Suddenly Bob Harper appears and points out that in Haskell, every type is also inhabited by bottom. |
| 14:25:14 | <deejaytee> | *forms a T with fingers, like a cross without its top* back, back to where you came from, foul bottom! |
| 14:25:34 | <boxscape> | except we now have -XUnliftedData |
| 14:25:35 | <boxscape> | I don't think I've seen anyone use it for singletons though |
| 14:26:00 | <deejaytee> | back to the realm you inhabi-- oh... |
| 14:26:11 | <boxscape> | (actually -XUnliftedDatatypes) |
| 14:26:32 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 14:26:59 | × | jneira_ quits (~jneira_@28.red-80-28-169.staticip.rima-tde.net) (Quit: Connection closed) |
| 14:27:53 | → | jneira_ joins (~jneira_@28.red-80-28-169.staticip.rima-tde.net) |
| 14:28:16 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:28:30 | <boxscape> | seems to work just fine with singletons though, maybe it's not even a bad idea to do that |
| 14:28:45 | <merijn> | Athas: Bob Harper is the "Um, Actually..." of FP :p |
| 14:28:56 | <Athas> | merijn: more like the "Objection!" |
| 14:29:01 | → | mastarija__ joins (~mastarija@31.217.8.174) |
| 14:30:28 | <boxscape> | er hold up |
| 14:30:30 | <boxscape> | I got a seg fault trying to do that |
| 14:30:30 | <boxscape> | that's not good |
| 14:30:42 | <boxscape> | should probably recompile from HEAD and see if that still happens |
| 14:31:36 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 14:31:56 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:32:28 | <raehik> | generic-lens has a really cool typeclass hasType that I can use to make generic statements about required context in a MonadReader. But it doesn't go through multiple layers of records. Is there a method for me to achieve that (while using generic-lens where possible)? |
| 14:32:34 | × | mastarija_ quits (~mastarija@31.217.8.174) (Ping timeout: 256 seconds) |
| 14:32:39 | <raehik> | MWE here https://paste.tomsmeding.com/wemNYUPl |
| 14:33:01 | × | rond_ quits (~Guest72@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Ping timeout: 246 seconds) |
| 14:33:29 | <boxscape> | (specifically I got the segfault trying https://paste.tomsmeding.com/69xli0tn in ghci) |
| 14:33:42 | → | Ariakenom joins (~Ariakenom@c83-255-154-140.bredband.tele2.se) |
| 14:35:16 | → | Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
| 14:36:47 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 14:37:06 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:37:20 | × | Patternm1ster quits (~georg@li1192-118.members.linode.com) (Quit: leaving) |
| 14:37:36 | → | Patternmaster joins (~georg@li1192-118.members.linode.com) |
| 14:38:39 | × | dajoer quits (~david@user/gvx) (Quit: leaving) |
| 14:38:44 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.2) |
| 14:38:48 | <Lycurgus> | pavonia, should you read this, the random individual yesterday basically asked if haskell was a chinese room for functions |
| 14:39:15 | <Lycurgus> | that's the objection |
| 14:39:27 | <Lycurgus> | and memoization doesn't amount to that |
| 14:39:27 | <merijn> | Athas: Now I'm imagining him in a Phoenix Wright gif ;) |
| 14:39:29 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 14:41:36 | <amesgen[m]> | Does anybody know of existing attempts to create a fuzzer for (at least parseable) Haskell source code? |
| 14:41:58 | fendor_ | is now known as fendor |
| 14:42:36 | <Lycurgus> | fuzzer? is that like an obfuscator? |
| 14:43:15 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:43:17 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 14:43:30 | <amesgen[m]> | basically an `Arbitrary` instance for Haskell source code, not really related to obfuscation |
| 14:43:45 | <Athas> | It's not difficult to generate parseable source code when you have a grammar. The problem is that the (vast) majority of those programs would not be type correct. |
| 14:44:11 | <Athas> | It's much easier to do this for C (as in csmith). |
| 14:44:20 | <amesgen[m]> | type correctness is not that important, I want to fuzz source code formatters |
| 14:45:18 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:ce6e:8d5b:412c:109f) |
| 14:45:23 | <merijn> | oof |
| 14:45:28 | <merijn> | RIP your sanity then :p |
| 14:45:37 | <merijn> | I don't think such a thing exists atm |
| 14:46:02 | <merijn> | It shouldn't be too hard to invent something, but thinking about testing it gives me nightmares :p |
| 14:46:04 | <amesgen[m]> | I saw something like this for Scala, and it found a lot of weird errors |
| 14:46:04 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) |
| 14:46:19 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 14:46:22 | Lycurgus | makes a psychological adjustment |
| 14:47:33 | <nshepperd> | (a chinese room for functions? isn't that everything a computer does?) |
| 14:47:57 | → | hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com) |
| 14:48:58 | <amesgen[m]> | FTR: https://github.com/alexknvl/fuzzball <- the scala (or dotty, rather) fuzzer |
| 14:50:33 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 14:50:42 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 14:51:38 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Ping timeout: 265 seconds) |
| 14:52:56 | <Lycurgus> | i c, so it's an approach alternative to quickcheck oder; another culture clash thing |
| 14:52:58 | × | reumeth quits (~reumeth@user/reumeth) (Ping timeout: 256 seconds) |
| 14:54:42 | <Lycurgus> | nshepperd, an abstract conceptual computer perhaps |
| 14:55:21 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds) |
| 14:55:30 | × | Obo quits (~roberto@70.pool90-171-81.dynamic.orange.es) (Ping timeout: 265 seconds) |
| 14:56:16 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 14:56:25 | <Lycurgus> | gedanken versuch vs real thing |
| 14:56:34 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 14:56:59 | × | mastarija__ quits (~mastarija@31.217.8.174) (Quit: Leaving) |
| 14:58:50 | <merijn> | Lycurgus: Not really |
| 14:58:57 | <merijn> | Or maybe |
| 14:59:30 | <merijn> | Lycurgus: quickcheck happens at the "I'm programming level" where you have access to code |
| 14:59:47 | <merijn> | fuzzing is more about "throwing random inputs at programs and see if they crash" |
| 15:00:02 | <merijn> | So it tends to be more black-box |
| 15:00:15 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2) |
| 15:00:47 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 15:02:17 | × | chris_ quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 15:03:26 | <merijn> | At which point was <$> moved into Prelude? I'm getting a redundant import warning on GHC 8.8 |
| 15:03:36 | <merijn> | (for Control.Applicative) |
| 15:03:47 | → | chris_ joins (~chris@81.96.113.213) |
| 15:03:54 | × | tungki quits (~tngk@subs30-116-206-14-53.three.co.id) (Ping timeout: 240 seconds) |
| 15:04:04 | <Lycurgus> | merijn, exactly |
| 15:04:07 | × | favonia quits (~favonia@user/favonia) (Quit: Leaving) |
| 15:04:52 | <merijn> | Lycurgus: quickcheck is generally more grey/white box testing |
| 15:05:40 | <Lycurgus> | so you think black box hs code testing makes sense? |
| 15:06:04 | <merijn> | He wants to blackbox test Haskell code formatters |
| 15:06:04 | <Athas> | merijn: GHC 7.10 implemented the Functor-Applicative-Monad proposal I think, so surely it was before then? |
| 15:06:13 | phma_ | is now known as phma |
| 15:06:13 | <merijn> | Athas: No |
| 15:06:20 | <merijn> | Athas: Because 8.0 compiles fine |
| 15:06:25 | × | burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Remote host closed the connection) |
| 15:06:30 | <merijn> | I don't support pre-8.0 anyway, so I would've removed it then |
| 15:06:34 | <geekosaur> | Athas, no, moving it to Prelude happened later |
| 15:06:53 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 15:07:00 | <merijn> | Lycurgus: Whether those Haskell code formatters are written in Haskell was unspecified and not really relevant for purposes of testing them |
| 15:07:02 | <Athas> | merijn: out of curiosity, what are you hacking on? |
| 15:07:08 | <geekosaur> | but I don't know exactly when |
| 15:07:27 | <merijn> | Athas: Finally updating the CI for some of my packages so I can, you know, release 9.0 and 9.2 compatible versions :p |
| 15:08:18 | <merijn> | I guess it was moved in 8.8, because 8.4 and 8.6 work too >.> |
| 15:08:31 | <Athas> | Oh right, I like your website for this project: http://www.snet-home.org/ |
| 15:08:58 | <merijn> | Athas: That package is dead anyway, stopped getting paid for that in 2012 :p |
| 15:10:22 | → | Guest72 joins (~Guest72@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) |
| 15:10:34 | <merijn> | oh, wait |
| 15:10:46 | <merijn> | Maybe the real problem isn't "<$> moved to Prelude |
| 15:11:04 | <merijn> | Maybe my real problem is: "When did -Wunused-imports move into -Wall or -Wcompat" |
| 15:11:27 | × | burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 265 seconds) |
| 15:11:33 | <c_wraith> | I remember unused imports being part of -Wall back in 6.8 |
| 15:11:52 | <merijn> | ok, so then it *is* the problem of when was <$> moved :p |
| 15:13:23 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 265 seconds) |
| 15:14:32 | <Athas> | I think GHC sometimes tweaks the rules for when an import is unused. |
| 15:14:51 | <Athas> | I was surprised at some point that the property isn't "if this import can be removed and the program still works, then it is redundant". |
| 15:14:52 | <merijn> | Sure, but I'm pretty sure <$> went into Prelude in recent history |
| 15:15:29 | <Athas> | Yeah, sometime between 2013 and 2021, because I remember having to import some module to get it when I first started writing Haskell every day. |
| 15:16:54 | → | tungki joins (~tngk@subs30-116-206-14-53.three.co.id) |
| 15:17:02 | <Athas> | It was added in base 4.8. |
| 15:17:06 | × | tungki quits (~tngk@subs30-116-206-14-53.three.co.id) (Client Quit) |
| 15:17:15 | <Athas> | That's 7.10. |
| 15:18:58 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 15:18:59 | <merijn> | Then why do my 8.0-8.6 tests work >.< |
| 15:19:41 | × | Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 255 seconds) |
| 15:21:50 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 15:23:17 | × | Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt) |
| 15:23:51 | × | Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Read error: Connection reset by peer) |
| 15:25:26 | × | acidjnk_new quits (~acidjnk@p5487d90a.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 15:26:38 | → | Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius) |
| 15:33:02 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 272 seconds) |
| 15:34:30 | → | Atum_ joins (~IRC@user/atum/x-2392232) |
| 15:34:46 | → | azeem joins (~azeem@176.200.220.247) |
| 15:39:43 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 15:44:22 | × | burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 272 seconds) |
| 15:46:36 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:ce6e:8d5b:412c:109f) (Quit: WeeChat 2.8) |
| 15:46:54 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 272 seconds) |
| 15:47:01 | <lechner> | sm: Hi, I may try to migrate the Debian Wiki from MoinMoin. Have you kept up, by ony chance, on the best work-around for the missing pandoc reader? Thanks! https://github.com/jgm/pandoc/issues/185 |
| 15:47:22 | × | doyougnu quits (~user@c-73-25-202-122.hsd1.or.comcast.net) (Remote host closed the connection) |
| 15:48:16 | <merijn> | FML |
| 15:48:31 | <merijn> | Apparently 8.0 doesn't yet support "-Wwarn=" >.> |
| 15:48:41 | → | mei joins (~mei@user/mei) |
| 15:50:04 | → | azeem joins (~azeem@176.200.220.247) |
| 15:53:06 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2) |
| 15:53:28 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 15:53:55 | × | mei quits (~mei@user/mei) (Quit: mei) |
| 15:54:12 | → | myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net) |
| 15:55:09 | <myShoggoth> | I will be streaming HF Office Hours in a few minutes! https://www.twitch.tv/myshoggoth |
| 15:55:17 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 15:55:33 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:01:40 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2) |
| 16:01:53 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:02:36 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 276 seconds) |
| 16:03:20 | → | doyougnu joins (~user@c-73-25-202-122.hsd1.or.comcast.net) |
| 16:06:06 | → | azeem joins (~azeem@176.200.220.247) |
| 16:06:45 | → | euouae joins (~euouae@user/euouae) |
| 16:07:05 | <euouae> | Hello is cabal using nix style module system now ? |
| 16:07:15 | <euouae> | my cabal is about a year old and I want to update |
| 16:07:47 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2) |
| 16:08:30 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:08:34 | × | markpythonicbitc quits (~textual@50.228.44.6) (Ping timeout: 240 seconds) |
| 16:09:09 | <davean> | euouae: Uh, has for years? |
| 16:09:26 | <davean> | since 2016? |
| 16:09:33 | <euouae> | By default now, right ? My man pages say it’s experimental |
| 16:09:43 | <euouae> | I was reading my man pages to learn some cabal |
| 16:09:49 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 16:10:17 | <euouae> | Is there a way to download docs for offline reading for cabal ? |
| 16:10:55 | <davean> | Think that was more like 2 years ago, not sure the exact date. What version are you on? And what docs do you want? |
| 16:11:31 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:11:37 | <davean> | Yah, looks like nix stuff went default in Aug 2019 |
| 16:12:03 | <euouae> | Right now my laptop is turned off |
| 16:12:22 | <euouae> | I want the latest cabal version and docs |
| 16:12:45 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 16:13:02 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 245 seconds) |
| 16:13:15 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 16:13:15 | <davean> | https://www.haskell.org/cabal/download.html but you can generally just do "cabal install cabal-install" |
| 16:13:50 | <sclv> | for docs: https://readthedocs.org/projects/cabal/downloads/ |
| 16:14:16 | <sclv> | i note there's no downloads for the 3.4 tag tho, not sure how those are created! |
| 16:14:55 | <euouae> | That’s okay thank you |
| 16:15:17 | <euouae> | Can I ask cabal with the dry run to tell me the total MB to be downloaded. |
| 16:15:19 | <euouae> | ? |
| 16:15:31 | <sclv> | no |
| 16:15:33 | → | gambpang joins (~ian@207.181.230.156) |
| 16:15:44 | → | delYsid joins (~user@84-115-55-45.cable.dynamic.surfer.at) |
| 16:15:53 | <sclv> | dry run is an offline mode -- to know how much it would need to download it would need to query sizes |
| 16:16:51 | → | IgorZhiltsov joins (~IgorZhilt@109-252-65-176.nat.spd-mgts.ru) |
| 16:17:02 | <euouae> | Oh ok, but can I query otherwise ? |
| 16:17:51 | <sclv> | there's no feature that tells you ahead of time how much it will download |
| 16:17:56 | × | burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 252 seconds) |
| 16:18:05 | <euouae> | Hmm okay |
| 16:18:45 | <euouae> | For a year old installation what can I expect? One GB? |
| 16:19:15 | <sclv> | what do you mean, if you type `cabal install cabal-install`? |
| 16:19:15 | → | pavonia joins (~user@user/siracusa) |
| 16:19:37 | <sclv> | cabal packages are just source, they're tiny |
| 16:19:47 | <sclv> | the cost will largely be in terms of what's generated by ghc in binary size |
| 16:20:02 | → | econo joins (uid147250@user/econo) |
| 16:20:08 | <sclv> | i'd estimate far less than a gig, on the order of a few hundred megs, but its a guess |
| 16:20:25 | <sclv> | or you can just download the binary itself from the link davean gave, which is tiny, and involves no additional footprint |
| 16:20:25 | <euouae> | Nice thank you |
| 16:22:03 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:22:14 | <davean> | euouae: Yah, you're talking single digit MiB on the high side |
| 16:22:26 | <davean> | euouae: I don't think anyone wrote that because no one cared to check :) |
| 16:22:33 | <euouae> | Hehe ooh okay |
| 16:22:57 | <euouae> | Yeah Internet can be expensive in the absence of competition |
| 16:23:39 | <davean> | Understood, Infact I've had that problem, so I actually did a thing to download all of hackage - everything you might install with cabal install - in 1.4GiB |
| 16:23:54 | → | pschorf joins (~user@c-73-77-28-188.hsd1.tx.comcast.net) |
| 16:23:58 | <davean> | Mine is more expensive in non-monitary cost - access can be limited |
| 16:24:13 | <euouae> | I see |
| 16:24:44 | <euouae> | Ok if all of hackage is that much then I think I’m good hehe |
| 16:25:30 | <davean> | Well I do a lot of compression, but I also include the ancient versions, so its not a bad estimate of how large what you'd touch of it without hte compression is |
| 16:25:39 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 16:25:39 | <davean> | (If you did a LOT of Haskell) |
| 16:25:52 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:26:36 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 16:26:54 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:26:58 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 16:27:30 | × | deejaytee quits (~deejaytee@193.46-255-62.static.virginmediabusiness.co.uk) (Ping timeout: 272 seconds) |
| 16:29:31 | × | IgorZhiltsov quits (~IgorZhilt@109-252-65-176.nat.spd-mgts.ru) (Quit: Client closed) |
| 16:30:15 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:32:58 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 16:33:11 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:33:12 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 272 seconds) |
| 16:34:18 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 16:34:27 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 276 seconds) |
| 16:34:31 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:34:48 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:34:53 | × | azeem quits (~azeem@176.200.220.247) (Ping timeout: 252 seconds) |
| 16:35:19 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 16:36:08 | <dminuoso> | davean: what was the name of that again? |
| 16:36:10 | → | azeem joins (~azeem@176.200.220.247) |
| 16:36:55 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:37:00 | × | drd quits (~drd@93-39-151-19.ip76.fastwebnet.it) (Ping timeout: 272 seconds) |
| 16:38:18 | × | jippiedoe quits (~david@2a02-a448-48bd-1-6c05-d94f-4fec-758a.fixed6.kpn.net) (Ping timeout: 250 seconds) |
| 16:39:22 | <davean> | dminuoso: skete |
| 16:39:32 | <davean> | well, skete-haskell specificly for the one for Hackge :-p |
| 16:39:43 | × | Guest72 quits (~Guest72@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Ping timeout: 246 seconds) |
| 16:39:57 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 16:40:02 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
| 16:40:34 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:40:39 | <euouae> | Are lenses “atomic”? |
| 16:40:46 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:40:56 | <davean> | euouae: what does that even mean? |
| 16:40:56 | <dminuoso> | What does "atomic" mean? |
| 16:41:00 | <euouae> | or is atomicity someone else’s job? |
| 16:41:13 | <euouae> | well the put get is what I’m thinking of |
| 16:41:25 | <davean> | Thats oen of the laws |
| 16:41:28 | <euouae> | of course the laws are the laws. Maybe they guarantee atomicity |
| 16:41:39 | <davean> | euouae: I think you're confused |
| 16:41:47 | <euouae> | Thread safe is what I’m trying to say |
| 16:41:48 | <davean> | Haskell is a functional language |
| 16:42:10 | <davean> | Yes, thats mostly meaningless - for example you don't mutate in Haskell, you create an edited copy |
| 16:42:24 | <euouae> | Ooh I see, so the changes from put are not reflected elsewhere |
| 16:42:39 | <euouae> | it truly is like the record update |
| 16:42:45 | <davean> | yes |
| 16:42:49 | <davean> | You can have references to stuff, like MVars |
| 16:42:52 | <davean> | and you can lens into MVars |
| 16:43:10 | <davean> | but it works the same way there. Sure the changes are reflected elsewhere, but its the same, you made a copy and updated the reference |
| 16:43:21 | <euouae> | No race conditions ? |
| 16:43:46 | <dminuoso> | euouae: Right, except for the part that they are composable, first-class, and generalize to things like Folds or Traverses - things you dont get from record accessors. :-) |
| 16:43:50 | × | chris_ quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 16:43:53 | <dminuoso> | No race conditions. |
| 16:43:56 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 16:44:34 | <euouae> | Oh yeah that true, the composabilityhas me stumped |
| 16:45:03 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 16:45:30 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 16:45:31 | <euouae> | As for folds— I don’t know that one yet. It’s cool reading papers though, I find that sometimes they help a lot to read the docs |
| 16:45:47 | → | markpythonicbitc joins (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) |
| 16:46:31 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:46:42 | → | reumeth joins (~reumeth@user/reumeth) |
| 16:46:43 | <dminuoso> | % foldMapOf (folded . both . _Just) Sum [(Just 21, Just 21)] |
| 16:46:43 | <yahb> | dminuoso: Sum {getSum = 42} |
| 16:47:10 | <dminuoso> | It's the same idea as foldr. Collapsing an optic that has multiple targets into some value. |
| 16:47:26 | <dminuoso> | Or perhaps better phrased "consuming" |
| 16:47:41 | <euouae> | Oh nice |
| 16:47:48 | <delYsid> | I dont get how re from the lens package is useful. Or reuse, for that matter. If it cant modify, why is reuse _Foo more interesting then uses Foo? |
| 16:48:16 | <delYsid> | er, gets Foo I mean |
| 16:48:42 | → | chris_ joins (~chris@81.96.113.213) |
| 16:49:11 | <delYsid> | How do I change a constructor somewhere deep in a structure? |
| 16:49:38 | → | deejaytee joins (~deejaytee@cpc91196-cmbg18-2-0-cust215.5-4.cable.virginm.net) |
| 16:49:53 | <dminuoso> | delYsid: With over? |
| 16:50:47 | <dminuoso> | delYsid: Regarding reuse, it's probably more useful for non-trivial prisms. The documentation has a slightly better example |
| 16:50:50 | × | burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 256 seconds) |
| 16:50:53 | <dminuoso> | % 6 ^.re (_Left.unto succ) |
| 16:50:53 | <yahb> | dminuoso: Left 7 |
| 16:51:39 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 16:52:12 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 16:52:15 | <dminuoso> | If you happen to already hold the prism in your hand, then I think reuse has some value. But if not, you might as well just use `use (Left . succ)` |
| 16:52:28 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 16:52:41 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:52:58 | × | chris_ quits (~chris@81.96.113.213) (Ping timeout: 240 seconds) |
| 16:53:10 | <dminuoso> | Or perhaps with some Iso you hold in your hand. |
| 16:54:10 | → | mei joins (~mei@user/mei) |
| 16:54:24 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 16:54:42 | × | pe200012 quits (~pe200012@113.105.10.33) (Ping timeout: 245 seconds) |
| 16:54:48 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 16:55:14 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving) |
| 17:00:20 | × | azeem quits (~azeem@176.200.220.247) (Read error: Connection reset by peer) |
| 17:01:19 | × | jmorris quits (uid433911@id-433911.stonehaven.irccloud.com) (Quit: Connection closed for inactivity) |
| 17:01:39 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 17:02:13 | → | azeem joins (~azeem@dynamic-adsl-94-34-48-122.clienti.tiscali.it) |
| 17:03:35 | → | mattil joins (~mattilinn@87-92-172-201.rev.dnainternet.fi) |
| 17:04:13 | → | y04nn joins (~y04nn@91.193.4.154) |
| 17:05:07 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 17:05:30 | × | jgeerds quits (~jgeerds@55d45555.access.ecotel.net) (Ping timeout: 272 seconds) |
| 17:05:36 | × | mattil quits (~mattilinn@87-92-172-201.rev.dnainternet.fi) (Remote host closed the connection) |
| 17:06:01 | → | mattil joins (~mattilinn@87-92-172-201.rev.dnainternet.fi) |
| 17:07:49 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 17:07:59 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 17:07:59 | allbery_b | is now known as geekosaur |
| 17:08:52 | → | Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) |
| 17:11:50 | × | azeem quits (~azeem@dynamic-adsl-94-34-48-122.clienti.tiscali.it) (Read error: Connection reset by peer) |
| 17:15:02 | → | azeem joins (~azeem@dynamic-adsl-94-34-48-122.clienti.tiscali.it) |
| 17:16:22 | <tromp> | i don't understand the compiler error i get on https://paste.ofcode.org/DBck6pC68BLWgyrAcsn9Gq |
| 17:16:45 | <tromp> | Legality.hs:105:27: error: Variable not in scope: args :: t0 [Char] |
| 17:16:46 | <tromp> | | |
| 17:16:46 | <tromp> | 105 | verbose = "-v" `elem` args |
| 17:16:46 | <tromp> | | ^^^^ |
| 17:17:11 | × | enoq quits (~enoq@194-208-179-35.lampert.tv) (Quit: enoq) |
| 17:17:19 | <tromp> | how is args not in scope there? |
| 17:17:37 | <dminuoso> | tromp: You have to use let bindings, the where is part of the main declaration. |
| 17:17:57 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 258 seconds) |
| 17:18:00 | <dminuoso> | i.e. do { args <- getArgs; let legality = map (\fen -> fen ++ "\n " ++ research verbose (readFEN fen)); ... } |
| 17:18:47 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 17:19:49 | <tromp> | i tried a let .... in block earlier, but it failed because let and in were at same indentation level |
| 17:20:00 | <tromp> | indenting the in further fixes it |
| 17:20:07 | <dminuoso> | tromp: drop the `in` |
| 17:20:16 | <dminuoso> | do-expressions support a special form of let |
| 17:20:32 | × | arkho quits (~ccc@dynamic-acs-24-112-153-241.zoominternet.net) (Ping timeout: 252 seconds) |
| 17:20:34 | <dminuoso> | % main = do { args <- getArgs; let len = length args; print len } |
| 17:20:34 | <yahb> | dminuoso: ; <interactive>:58:63: error: parse error on input `}' |
| 17:21:15 | <tromp> | i tried |
| 17:21:16 | <tromp> | let legality = map (\fen -> fen ++ "\n " ++ research verbose (readFEN fen)) |
| 17:21:16 | <tromp> | let verbose = "-v" `elem` args |
| 17:21:16 | <tromp> | getContents >>= mapM_ putStrLn . legality . filter (not . null) . lines |
| 17:21:37 | <tromp> | but that fails with error: Variable not in scope: verbose :: Bool |
| 17:22:00 | <tromp> | oh, need to reverse order? |
| 17:22:02 | <dminuoso> | tromp: drop the second let |
| 17:22:08 | <dminuoso> | and keep the alignment |
| 17:22:46 | <dminuoso> | This way let sort of looks like where, allowing you to write multiple potentially recursive definitions, but sitting in the middle of a do expression |
| 17:23:12 | <tromp> | ah yes, that works. thanks! |
| 17:31:28 | × | nf quits (~n@monade.li) (Quit: Fairfarren.) |
| 17:31:35 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:31:57 | → | nf joins (~n@monade.li) |
| 17:32:17 | × | euouae quits (~euouae@user/euouae) (Quit: Client closed) |
| 17:33:38 | → | arkho joins (~ccc@dynamic-acs-24-112-153-241.zoominternet.net) |
| 17:34:28 | × | bgamari quits (~bgamari@2001:470:e438::1) (Ping timeout: 256 seconds) |
| 17:36:07 | × | hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1) |
| 17:37:05 | → | hendursaga joins (~weechat@user/hendursaga) |
| 17:37:10 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 17:40:58 | × | myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 272 seconds) |
| 17:41:33 | → | boggin joins (~mikey@tyhog-gua01a-216.cronon.net) |
| 17:44:43 | → | mikey joins (~mikey@79.140.120.237) |
| 17:47:05 | × | boggin quits (~mikey@tyhog-gua01a-216.cronon.net) (Ping timeout: 258 seconds) |
| 17:49:01 | → | curiousgay joins (~curiousga@77-120-186-48.kha.volia.net) |
| 17:51:56 | → | euouae joins (~euouae@user/euouae) |
| 17:53:01 | <energizer> | I generally favor replacing boolean flag arguments with two different functions. There are some blog posts about that, but they're mostly about, like, java. What do haskellers have to say about this? |
| 17:53:12 | <euouae> | I updated cabal with `cabal install cabal-install` and I get: 'Warning: Could not create a symlink in ~/.cabal/bin for cabal because the file exists there already but is not managed by cabal. You can create a symlink for this executable manually if you wish. The executable file has been installed at ~/.cabal/bin/cabal' |
| 17:53:28 | <euouae> | from 2.4.0.1 to 3.4.0.0 |
| 17:53:53 | → | bgamari joins (~bgamari@72.65.104.136) |
| 17:54:04 | <sclv> | ok so that warning should make sense to you and explain what happened |
| 17:54:27 | <sclv> | The old binary is in the first location and the new one in the second location |
| 17:54:35 | <sclv> | Manage em as you see fit |
| 17:54:38 | <euouae> | Iisn't that the same location? |
| 17:55:09 | <sclv> | hrm, good point? |
| 17:56:07 | <sclv> | The install logs should give more detail where everything ended up |
| 17:57:56 | <euouae> | It ended up in ~/.cabal/bin/cabal, I also checked with --version previously. Ok so the warning is a bit of a dud then right? |
| 17:58:18 | <sclv> | yeah must br |
| 17:58:18 | <sclv> | be |
| 17:58:31 | <euouae> | Do I just need to modify $PATH or is there some other step I need as well to have other tools that use cabal to use 3.4? |
| 17:59:04 | <sclv> | just path |
| 17:59:06 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 17:59:18 | <euouae> | great, thank you |
| 17:59:57 | <sm> | lechner: no, I didn't do any more work on it |
| 18:01:55 | <geekosaur> | energizer: look up "boolean blindness"; much of the discussion is about Haskell, because it's so easy to overcome in Haskell |
| 18:03:31 | × | deejaytee quits (~deejaytee@cpc91196-cmbg18-2-0-cust215.5-4.cable.virginm.net) (Quit: Leaving) |
| 18:03:35 | → | MoC joins (~moc@user/moc) |
| 18:04:00 | × | burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 265 seconds) |
| 18:06:15 | <energizer> | geekosaur: looking |
| 18:07:27 | <monochrom> | I am surprised that there are now even blog posts on using booleans. |
| 18:07:53 | <monochrom> | Is there no end to this infinite descent into depravity? |
| 18:08:27 | <monochrom> | "Hi all I need a blog post that explains the number 1." "Hey there you're in luck I've just written one!" |
| 18:10:02 | <euouae> | flooding the search engines with crappy blog posts is the work of big publishers |
| 18:10:22 | <euouae> | ... at least that's what I came to believe after trying to search for some college stats stuff |
| 18:10:55 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 18:13:11 | × | jess quits (~jess@libera/staff/jess) () |
| 18:13:25 | <euouae> | My blog depresses me because it's all wrong and needs a total rewrite |
| 18:13:47 | <monochrom> | Use the subtraction method. >:) |
| 18:14:04 | <euouae> | Remove until it's correct? |
| 18:14:30 | <monochrom> | Every rewrite begins with one bold step of deletion. |
| 18:15:12 | <monochrom> | Even openFile filename WriteMode begins with one bold step of erasure. |
| 18:15:24 | <monochrom> | s/Even/Every/ |
| 18:15:44 | <euouae> | without enthusiasm you don't get those blog posts, and enthusiasm wanes as knowledge increases :P |
| 18:17:05 | <monochrom> | And knowledge wanes as enthusiasm increases. |
| 18:17:21 | <euouae> | :D:D |
| 18:17:27 | × | haskell-lurk quits (~haskell-l@78.155.54.115) (Quit: Client closed) |
| 18:17:34 | <monochrom> | This is why so many blog posts and the haskell wiki are of utterly poor quality in terms of pedagogy. |
| 18:18:19 | <dsal> | energizer: Can you expand on "boolean flag arguments"? Do you mean cli args? Or just function args. Boolean blindness is real, so there's generally a better, clearer way. |
| 18:18:50 | <monochrom> | Well, knowledge of the author doesn't wane. But knowledge that the audience can actually glean from the enthusiastically incoherent writing wanes. |
| 18:19:11 | <energizer> | dsal: yeah i mean function arguments |
| 18:19:45 | <euouae> | monochrom: I'm with you on that. It's something I like thinking about, how to efficiently transmit knowledge |
| 18:21:17 | <dsal> | energizer: Ah, yeah. Even knowing about boolean blindness, I had a function that took a bool I had to look up docs for every time I used it before fixing the api |
| 18:22:37 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 18:22:54 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
| 18:23:07 | <monochrom> | I am happy if a certain parameter really has only two legal values. I'm unhappy if it is hard to remember "so True means what? False means what?" |
| 18:23:51 | <monochrom> | There there are cases where it is easy to remember and/or guess. I don't always object to booleans. |
| 18:24:11 | <monochrom> | s/There there/But there/ # Clearly I have buffering problems. |
| 18:25:33 | <euouae> | hmm my cabal manual is out of sync with the cabal version |
| 18:25:35 | → | johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) |
| 18:25:48 | <euouae> | Guess I'll download the docs from the link I was given here previously |
| 18:26:15 | <dsal> | Sure, yes. Boolean is not always wrong. I was implementing a protocol that had a bit for resuming sessions. I could never remember whether true meant use an existing one or make a new one. |
| 18:26:41 | <monochrom> | "when :: Bool -> IO a -> IO a" is one of the good cases because the name "when" already helps you, for example. |
| 18:26:49 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 18:27:12 | → | jgeerds joins (~jgeerds@55d45555.access.ecotel.net) |
| 18:27:17 | <monochrom> | Heh yeah that one is a tougher one. |
| 18:27:28 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Remote host closed the connection) |
| 18:27:52 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 18:28:05 | <monochrom> | Clearly, "should I reuse or create?" the answer is "yes". >:) |
| 18:29:33 | <monochrom> | Maybe works better for "coffee or tea?" |
| 18:30:26 | <monochrom> | People in Hong Kong are actually fond of blending coffee with tea, BTW. |
| 18:30:34 | <dsal> | We're trained to map binary concepts to true/false/file_not_found and never look to see if there's a better way. |
| 18:31:22 | <euouae> | quantum coffee |
| 18:32:08 | × | gambpang quits (~ian@207.181.230.156) (Ping timeout: 252 seconds) |
| 18:32:59 | <euouae> | I loved discovering how Maybe is an Applicative that can be summed |
| 18:33:31 | <euouae> | as someone who likes boolean tricks... not entirely related to boolean blindness I suppose |
| 18:33:48 | <euouae> | but you could emulate Maybe with a tuple (Bool, a) |
| 18:34:17 | <sclv> | not really |
| 18:34:34 | <sclv> | for `Nothing` what do you put in the `a` slot? |
| 18:34:51 | <euouae> | That right |
| 18:34:53 | <sclv> | you need a sum, not a product |
| 18:35:01 | <sclv> | so `Maybe a =~ Either () a` |
| 18:35:15 | <euouae> | okay so fair enough, this is another kind of blindness |
| 18:35:27 | <euouae> | just because you have isomorphism of types doesn't mean you should always choose the same representative |
| 18:38:10 | → | michael92342 joins (~mikey@tyhog-gua01a-216.cronon.net) |
| 18:39:17 | <euouae> | although i have cabal 3.4, in cabal init I get cabal 2.4 mentioned |
| 18:39:28 | × | Atum_ quits (~IRC@user/atum/x-2392232) (Quit: Atum_) |
| 18:39:36 | <euouae> | In the cabal file of my project, cabal-version: 2.4 |
| 18:39:45 | <sclv> | that's not cabal-install version |
| 18:39:48 | <sclv> | that's version spec for the cabal file itself! |
| 18:39:58 | <euouae> | Ah alright |
| 18:40:11 | <euouae> | It jsut happened to coincide with my previous cabal version |
| 18:40:12 | <sclv> | Those evolve at a different pace, and the init doesn't pick latest by default -- rather it tries to maintain a backwards compat range |
| 18:40:25 | <sclv> | if you use newer features, cabal might warn you that it needs bumping |
| 18:40:38 | <euouae> | nice |
| 18:40:47 | <sclv> | yeah, they used to coincide, but it was a bad idea to have protocol and exe versions evolve in lockstep |
| 18:41:08 | × | mikey quits (~mikey@79.140.120.237) (Ping timeout: 272 seconds) |
| 18:41:29 | <euouae> | I also got an idex error |
| 18:42:08 | <euouae> | Warning: Parsing the index cache failed (Data.Binary.Get.runGet at position 16; Non-matching structure hashes: ... expected: ...). Trying to regenerate the index cache... |
| 18:42:18 | <euouae> | Is this related to cache stored out of my project directory |
| 18:42:58 | <euouae> | Hmm I think so. I tried a totally new project and got no warnings |
| 18:43:09 | <euouae> | alright I'll go now. Thanks for all the help |
| 18:43:10 | × | euouae quits (~euouae@user/euouae) (Quit: euouae) |
| 18:43:43 | <monochrom> | This is cabal's own cache somewhere in $HOME/.cabal, and it is about data saved by "cabal update". |
| 18:44:18 | <monochrom> | You get this warning (OK, I get this warning) when I switch between two versions of cabal-install. |
| 18:44:35 | <sclv> | they left :-) |
| 18:44:45 | <monochrom> | Ah darn. |
| 18:45:05 | <sclv> | i will note this irritates me when i'm developing cabal and keep switching between my installed and my testing version |
| 18:45:15 | <sclv> | i know i could pass some flags to the test version to set a different repo, but its a pita |
| 18:45:26 | <sclv> | (also sometimes nix-shell will switch out cabal install versions under me) |
| 18:46:31 | <monochrom> | That gets pretty irritating, yeah. |
| 18:47:28 | × | MQ-17J quits (~MQ-17J@8.6.144.192) (Ping timeout: 272 seconds) |
| 18:49:22 | <sclv> | just file a ticket :-) https://github.com/haskell/cabal/issues/7502 |
| 18:49:42 | × | curiousgay quits (~curiousga@77-120-186-48.kha.volia.net) (Ping timeout: 245 seconds) |
| 18:51:09 | × | bruceleewees quits (~bruceleew@83.24.236.64.ipv4.supernova.orange.pl) (Remote host closed the connection) |
| 18:52:00 | → | boggin joins (~mikey@79.140.120.237) |
| 18:52:11 | × | michael92342 quits (~mikey@tyhog-gua01a-216.cronon.net) (Quit: Leaving) |
| 19:00:37 | → | haskell-lurk joins (~haskell-l@78.155.54.115) |
| 19:02:36 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 258 seconds) |
| 19:03:03 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 19:03:17 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 19:06:31 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 19:08:22 | × | y04nn quits (~y04nn@91.193.4.154) (Ping timeout: 272 seconds) |
| 19:08:58 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 19:09:40 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 19:13:43 | <maerwald[m]> | I vote for reviving sandboxes |
| 19:14:04 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 272 seconds) |
| 19:17:17 | → | Pickchea joins (~private@user/pickchea) |
| 19:17:29 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 19:18:33 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 244 seconds) |
| 19:18:52 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 19:24:16 | → | berberman_ joins (~berberman@user/berberman) |
| 19:24:18 | × | berberman quits (~berberman@user/berberman) (Ping timeout: 240 seconds) |
| 19:28:00 | × | jgeerds quits (~jgeerds@55d45555.access.ecotel.net) (Ping timeout: 272 seconds) |
| 19:29:56 | → | MoC joins (~moc@user/moc) |
| 19:32:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:33:05 | × | jneira_ quits (~jneira_@28.red-80-28-169.staticip.rima-tde.net) (Quit: Connection closed) |
| 19:33:59 | → | jneira_ joins (~jneira_@28.red-80-28-169.staticip.rima-tde.net) |
| 19:35:33 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 19:38:05 | <sclv> | that won't affect this issue at all |
| 19:40:04 | × | nf quits (~n@monade.li) (Quit: Fairfarren.) |
| 19:40:06 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 19:40:17 | → | nf joins (~n@monade.li) |
| 19:40:31 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 19:40:33 | × | mikoto-chan quits (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) (Ping timeout: 258 seconds) |
| 19:41:26 | × | mattil quits (~mattilinn@87-92-172-201.rev.dnainternet.fi) (Quit: Leaving) |
| 19:42:26 | × | alx741 quits (~alx741@186.178.108.145) (Ping timeout: 252 seconds) |
| 19:44:27 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 19:45:33 | → | y04nn joins (~y04nn@91.193.4.154) |
| 19:45:46 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
| 19:46:24 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 19:46:35 | → | lavaman joins (~lavaman@98.38.249.169) |
| 19:49:53 | <thomasjm[m]> | hi all -- i made a little tool to help you profile your builds and show how long it takes GHC to compile each module in a pretty bar graph. feedback and bug reports welcome: https://github.com/codedownio/time-ghc-modules |
| 19:55:41 | → | alx741 joins (~alx741@181.196.69.121) |
| 20:01:54 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 20:05:06 | <dsal> | This is neat. |
| 20:05:31 | → | Obo joins (~roberto@70.pool90-171-81.dynamic.orange.es) |
| 20:07:00 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 276 seconds) |
| 20:09:54 | × | Obo quits (~roberto@70.pool90-171-81.dynamic.orange.es) (Ping timeout: 240 seconds) |
| 20:09:55 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 20:10:47 | <maerwald[m]> | Sorry, simplifier and parser have the same color in the example pic |
| 20:10:59 | <maerwald[m]> | Which one is the expensive one? |
| 20:11:54 | <dsal> | It looks like the colors are in order. |
| 20:12:32 | <thomasjm[m]> | right, they're ordered in the legend by overall expensiveness. if you load the HTML report you can mouse over and tooltips will appear |
| 20:13:05 | <Hecate> | thomasjm[m]: beautiful too, thank you so much :) |
| 20:13:14 | <maerwald[m]> | Does the simplifier do cross module work? |
| 20:13:20 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 20:15:34 | × | y04nn quits (~y04nn@91.193.4.154) (Remote host closed the connection) |
| 20:15:41 | <thomasjm[m]> | beats me, i wrote this so people who understand GHC can make my stuff build faster :P |
| 20:15:59 | <dsal> | Maybe you should stop simplifying. |
| 20:21:29 | → | vysn joins (~vysn@user/vysn) |
| 20:22:18 | <koz> | > foldMap show ("foo", 5) |
| 20:22:19 | <lambdabot> | "5" |
| 20:22:22 | <koz> | Sweet. |
| 20:24:12 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) (Remote host closed the connection) |
| 20:24:50 | → | agua joins (~agua@2804:18:46:c3e6:1:0:7de0:dd8f) |
| 20:25:08 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) |
| 20:26:16 | → | Core3678 joins (~agua@2804:14c:8793:8e2f:64f8:45c2:2056:5625) |
| 20:26:30 | → | acidjnk_new joins (~acidjnk@p200300d0c72b9591e9224ac295505d06.dip0.t-ipconnect.de) |
| 20:26:44 | × | pesada quits (~agua@2804:14c:8793:8e2f:64f8:45c2:2056:5625) (Ping timeout: 256 seconds) |
| 20:27:32 | × | agua_pesada quits (~agua_pesa@2804:14c:8793:8e2f:48b4:3d09:2f3b:552b) (Ping timeout: 272 seconds) |
| 20:28:27 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 276 seconds) |
| 20:29:26 | × | agua quits (~agua@2804:18:46:c3e6:1:0:7de0:dd8f) (Ping timeout: 272 seconds) |
| 20:31:56 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2) |
| 20:33:55 | → | xrel joins (~xrel@69.233.98.238) |
| 20:34:12 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:37:44 | × | markpythonicbitc quits (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 20:38:04 | × | reumeth quits (~reumeth@user/reumeth) (Ping timeout: 256 seconds) |
| 20:38:18 | → | markpythonicbitc joins (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) |
| 20:38:21 | → | jgeerds joins (~jgeerds@55d45555.access.ecotel.net) |
| 20:39:41 | × | burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Remote host closed the connection) |
| 20:40:14 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 20:42:40 | → | mikoto-chan joins (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) |
| 20:44:34 | × | burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 258 seconds) |
| 20:45:53 | <dsal> | I'm not sure how I feel about that... |
| 20:46:27 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 20:46:34 | × | markpythonicbitc quits (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 20:47:03 | → | markpythonicbitc joins (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) |
| 20:49:42 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds) |
| 20:50:16 | × | markpythonicbitc quits (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) (Client Quit) |
| 20:50:54 | → | markpythonicbitc joins (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) |
| 20:51:04 | <johnw> | ("foo",5) is 5 with some contextual info |
| 20:51:06 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 20:52:37 | <dsal> | Yeah, I think I've used it that way. Some thing are obvious if you look at them from one angle, but bizarre if you look from another. |
| 20:53:47 | <dsal> | > view each . fmap show $ ("five", 5) |
| 20:53:48 | <lambdabot> | "five5" |
| 20:53:54 | <raehik> | I'm continually getting this mysterious "The exact Name 'f' is not in scope" error while trying to use deriving via. Anyone know what's going on? |
| 20:54:15 | <dsal> | Is the exact Name 'f' in scope? |
| 20:55:01 | <raehik> | :t f says nothing in scope |
| 20:55:02 | <lambdabot> | error: parse error on input ‘in’ |
| 20:55:20 | → | agua_pesada joins (~agua_pesa@2804:14c:8793:8e2f:48b4:3d09:2f3b:552b) |
| 20:55:24 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 20:55:43 | <raehik> | I wrote one typeclass and did some standalone deriving vias for it. now I just wrote another, and I'm getting this error (which I was also getting previously, but thought it was due to multi params type classes) |
| 20:56:16 | <raehik> | they're exactly the same apart from the function sig and name, totally lost from the error msg |
| 20:56:32 | × | markpythonicbitc quits (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 20:56:44 | → | drd joins (~drd@151.37.160.53) |
| 21:00:27 | <raehik> | is there some deriving via magic going on that doesn't like lenses?? that's the only thing I can think of |
| 21:02:39 | × | jgeerds quits (~jgeerds@55d45555.access.ecotel.net) (Remote host closed the connection) |
| 21:03:17 | × | fendor quits (~fendor@178.115.48.162.wireless.dyn.drei.com) (Remote host closed the connection) |
| 21:06:32 | <raehik> | urgh. I have no idea. Stupid Template Haskell stuff, really weird |
| 21:07:00 | <raehik> | I separate the TH (only makeLenses!) and it Just Works. sigh |
| 21:08:14 | <Hecate> | raehik: lesson of the day, TH is quirky and opaque |
| 21:08:27 | <raehik> | oh no, I was wrong, ok less mad |
| 21:08:35 | <raehik> | it *is* still broken and it wasn't TH. lol |
| 21:08:59 | <raehik> | now it tells me "it was probably TH" but the module doesn't even have it enabled. stunning |
| 21:12:08 | <dsal> | TH changes a few things. |
| 21:13:43 | <c_wraith> | TH makes declaration order matter :( |
| 21:14:24 | <raehik> | I know that TH impacts how things run. There is now no TH in this module, but the error message is quite useless |
| 21:14:58 | <raehik> | I can't find any info on debugging deriving via online (I didn't know it could emit such errors) |
| 21:15:26 | → | markpythonicbitc joins (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) |
| 21:15:40 | × | son0p quits (~ff@181.136.122.143) (Ping timeout: 272 seconds) |
| 21:17:40 | <raehik> | ohhh hold on, 'f' might be from the lens |
| 21:17:54 | <raehik> | now I'm remembering you can't stuff lenses into typeclasses without a second thought |
| 21:20:19 | <raehik> | Lord help me with GHC's error messages. that was it, me forgetting lenses and typeclasses are |
| 21:22:45 | <monochrom> | Perhaps start with no lens. |
| 21:23:13 | <dminuoso> | raehik: If you insist on what lens offers, you can also consider the `optics` package |
| 21:23:18 | <dminuoso> | Which neatly hides the implementation behind newtypes |
| 21:28:55 | <raehik> | monochrom: I did start with no lenses! I figured being able to stuff a lens inside my HasX typeclasses might be interesting, so they could be used for MonadState as well as Reader |
| 21:29:41 | <raehik> | dminuoso: I've looked *at* optics before but never into it. I'm still a relatively new Haskeller. would you recommend it over the lens pkg? |
| 21:30:10 | <geekosaur> | ifnothing else, it has better error messages than lens |
| 21:30:43 | <c_wraith> | on the other hand, the lack of extensibility feels so limitng |
| 21:30:47 | <c_wraith> | or even limiting |
| 21:30:52 | <c_wraith> | all it can do is accessors |
| 21:31:26 | <dminuoso> | raehik: Personally I prefer it for a multitude of reasons. |
| 21:31:37 | <dminuoso> | And I would recommend it over lens. |
| 21:31:45 | <dminuoso> | But it's just personal preference, really |
| 21:32:18 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 240 seconds) |
| 21:32:49 | × | xrel quits (~xrel@69.233.98.238) (Quit: nyaa~) |
| 21:32:50 | <c_wraith> | anyone know offhand whether any of the proposed designs for dependent haskell allow putting pi types on instance declarations? |
| 21:33:00 | <raehik> | thanks all, I'll remember them next time I'm using lenses. maybe I'll give one of the talks I bookmarked a shot |
| 21:33:59 | <dminuoso> | c_wraith: What do you mean by "all it can do it accessors"? |
| 21:36:06 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) (Remote host closed the connection) |
| 21:36:52 | → | mastarija joins (~mastarija@31.217.8.174) |
| 21:36:52 | × | markpythonicbitc quits (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 21:37:29 | → | markpythonicbitc joins (~textual@2601:647:5a00:35:e0da:ada7:2ca5:10dd) |
| 21:37:35 | <dsal> | I think last time I looked at optics, it didn't support prisms, which is kind of an important thing for many of my use cases. |
| 21:37:41 | <c_wraith> | dminuoso: there's no equivalent of holesOf for when you're doing non-deterministic algorithms. There's no ability to extend it to embed additional effects in the traversal process like... uh shoot, I haven't released that library yet. |
| 21:38:04 | <c_wraith> | The library works, I just hate writing enough documentation to tell people what it does :) |
| 21:38:10 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 21:38:10 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 21:38:13 | allbery_b | is now known as geekosaur |
| 21:39:23 | <c_wraith> | basically, optics is closed. It can only do what its authors build into it. lens is open, and you can add all sorts of stuff in ways that remain compatible with it. |
| 21:40:22 | <dminuoso> | dsal: You should look again. |
| 21:40:47 | <dsal> | Ooh, I was thinking about microlens |
| 21:41:16 | <dminuoso> | c_wraith: Fair enough, yeah it doesnt cater to extravagant/exotic needs. :-) |
| 21:41:29 | <dminuoso> | I think for mere mortals it's a great library. |
| 21:41:41 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) |
| 21:41:52 | <arkho> | GHC will not import Data.Scientific into my module, stating that it's not safe. What does this mean? How can I fix it? |
| 21:41:58 | <raehik> | <- mere mortal :) |
| 21:43:45 | <arkho> | Or is that a question for #ghc ? |
| 21:44:02 | <dminuoso> | Sounds like you have safe haskell enabled |
| 21:45:26 | × | mikoto-chan quits (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) (Ping timeout: 272 seconds) |
| 21:45:26 | × | bgamari quits (~bgamari@72.65.104.136) (Ping timeout: 272 seconds) |
| 21:46:31 | × | boggin quits (~mikey@79.140.120.237) (Remote host closed the connection) |
| 21:47:08 | <arkho> | Is this a global thing that I can disable? Or do I have to change source files? |
| 21:48:27 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 21:48:59 | → | acidjnk_new3 joins (~acidjnk@p5487d90a.dip0.t-ipconnect.de) |
| 21:50:18 | → | jgeerds joins (~jgeerds@55d45555.access.ecotel.net) |
| 21:50:35 | <geekosaur> | ?? this is something that you would have had to explicitly enable, so why are you asking us? |
| 21:50:35 | <lambdabot> | Plugin `compose' failed with: user error (Unknown command: "") |
| 21:51:08 | <arkho> | Because it's not my code, it's a dependency of a package I'm trying to install. |
| 21:51:59 | <arkho> | It won't build because it can't import that module, and I don't know what to do with that. |
| 21:52:12 | × | acidjnk_new quits (~acidjnk@p200300d0c72b9591e9224ac295505d06.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 21:54:56 | <arkho> | My main question is, is it a Cabal thing, a GHC thing, or a Haskell thing? Where's the switch? |
| 21:55:11 | <davean> | It depends on where you turned it on |
| 21:55:40 | <arkho> | I don't recall ever doing that. |
| 21:57:21 | <geekosaur> | in any case, scientific 0.3.7.0 claims to be Safe Haskell-safe, so you should make sure you're using that version with Safe Haskell |
| 21:57:52 | → | mastarija_ joins (~mastarija@31.217.8.174) |
| 22:00:19 | × | michalz quits (~michalz@185.246.204.40) (Remote host closed the connection) |
| 22:00:59 | <arkho> | How do I check which version of scientific I have? |
| 22:01:19 | × | mastarija quits (~mastarija@31.217.8.174) (Ping timeout: 265 seconds) |
| 22:01:22 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 22:03:05 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 22:03:37 | → | jmorris joins (uid433911@id-433911.stonehaven.irccloud.com) |
| 22:05:04 | × | Zemyla_ quits (~ec2-user@ec2-54-196-11-2.compute-1.amazonaws.com) (Ping timeout: 258 seconds) |
| 22:05:07 | <geekosaur> | cabal should have output it while building the package's dependencies |
| 22:06:13 | → | son0p joins (~ff@181.136.122.143) |
| 22:06:19 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 22:06:29 | → | fawful joins (~guy@c-76-104-217-93.hsd1.wa.comcast.net) |
| 22:06:29 | → | epolanski joins (uid312403@id-312403.brockwell.irccloud.com) |
| 22:14:03 | → | zebrag joins (~chris@user/zebrag) |
| 22:20:16 | × | drd quits (~drd@151.37.160.53) (Ping timeout: 272 seconds) |
| 22:21:58 | → | drd joins (~drd@151.57.228.213) |
| 22:23:11 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.2) |
| 22:26:32 | → | bgamari joins (~bgamari@2001:470:e438::1) |
| 22:36:42 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 22:41:01 | → | dajoer joins (~david@user/gvx) |
| 22:41:09 | → | burnsidesLlama joins (~burnsides@client-8-91.eduroam.oxuni.org.uk) |
| 22:41:39 | → | cjb joins (~cjb@user/cjb) |
| 22:42:38 | × | drd quits (~drd@151.57.228.213) (Ping timeout: 258 seconds) |
| 22:43:42 | × | agua_pesada quits (~agua_pesa@2804:14c:8793:8e2f:48b4:3d09:2f3b:552b) (Ping timeout: 272 seconds) |
| 22:45:42 | × | burnsidesLlama quits (~burnsides@client-8-91.eduroam.oxuni.org.uk) (Ping timeout: 258 seconds) |
| 22:46:17 | → | drd joins (~drd@151.57.228.213) |
| 22:48:04 | × | mastarija_ quits (~mastarija@31.217.8.174) (Quit: Leaving) |
| 22:50:02 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 272 seconds) |
| 22:51:06 | × | acidjnk_new3 quits (~acidjnk@p5487d90a.dip0.t-ipconnect.de) (Ping timeout: 265 seconds) |
| 22:51:23 | → | agua_pesada joins (~agua_pesa@2804:14c:8793:8e2f:48b4:3d09:2f3b:552b) |
| 22:54:09 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:54:39 | × | Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
| 23:00:47 | × | sheepduck quits (~sheepduck@user/sheepduck) (Remote host closed the connection) |
| 23:01:14 | → | agua joins (~agua@2804:18:7f:1e53:1:0:7e70:81d) |
| 23:02:02 | × | CannabisIndica quits (~mesa@user/mesaboogie) (Quit: ZNC - https://znc.in) |
| 23:03:51 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) (Remote host closed the connection) |
| 23:05:18 | → | mesa joins (~mesa@user/mesaboogie) |
| 23:05:51 | mesa | is now known as CannabisIndica |
| 23:05:52 | × | Core3678 quits (~agua@2804:14c:8793:8e2f:64f8:45c2:2056:5625) (Ping timeout: 272 seconds) |
| 23:10:23 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) |
| 23:10:26 | × | drd quits (~drd@151.57.228.213) (Ping timeout: 265 seconds) |
| 23:12:11 | × | meinside_ quits (uid24933@id-24933.brockwell.irccloud.com) (Quit: Connection closed for inactivity) |
| 23:15:37 | × | fawful quits (~guy@c-76-104-217-93.hsd1.wa.comcast.net) (Quit: WeeChat 3.2) |
| 23:22:37 | → | lavaman joins (~lavaman@98.38.249.169) |
| 23:34:44 | → | Atum_ joins (~IRC@user/atum/x-2392232) |
| 23:35:05 | <delYsid> | @hoogle [Maybe a] -> [a] |
| 23:35:06 | <lambdabot> | Data.Maybe catMaybes :: [Maybe a] -> [a] |
| 23:35:07 | <lambdabot> | System.Directory.Internal.Prelude catMaybes :: () => [Maybe a] -> [a] |
| 23:35:07 | <lambdabot> | Distribution.Compat.Prelude.Internal catMaybes :: [Maybe a] -> [a] |
| 23:36:16 | × | shailangsa quits (~shailangs@host86-186-196-233.range86-186.btcentralplus.com) (Ping timeout: 272 seconds) |
| 23:39:58 | <lechner> | Hi, it seems that getArgs attempts to translate UTF-8 byte strings to Unicode code points. Was getArgsBytes mentioned here ever implemented? Thanks! https://gitlab.haskell.org/ghc/ghc/-/issues/3309 |
| 23:44:18 | × | Atum_ quits (~IRC@user/atum/x-2392232) (Quit: Atum_) |
| 23:44:46 | <geekosaur> | you want https://downloads.haskell.org/ghc/latest/docs/html/libraries/unix-2.7.2.2/System-Posix-Env-ByteString.html#v:getArgs |
| 23:51:09 | → | Codaraxis_ joins (~Codaraxis@user/codaraxis) |
| 23:55:23 | × | Codaraxis quits (~Codaraxis@user/codaraxis) (Ping timeout: 265 seconds) |
| 23:56:23 | → | ironsoba joins (~z@193.36.225.59) |
All times are in UTC on 2021-08-02.