Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 115 116 117 118 119 120 121 122 123 124 125 .. 5022
502,152 events total
2020-09-21 14:04:32 irc_user joins (uid423822@gateway/web/irccloud.com/x-orjppconqhqlsued)
2020-09-21 14:05:12 × nbloomf quits (~nbloomf@2600:1700:83e0:1f40:7928:db17:6f00:cd09) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-21 14:05:49 <siraben> I wonder if I could do a dependency override in cabal like in nix
2020-09-21 14:08:26 jlamothe joins (~jlamothe@dev.jlamothe.net)
2020-09-21 14:09:22 × son0p quits (~son0p@181.136.122.143) (Ping timeout: 246 seconds)
2020-09-21 14:10:24 × IT92 quits (511495c6@198-149-20-81.sta.estpak.ee) (Remote host closed the connection)
2020-09-21 14:10:34 son0p joins (~son0p@181.136.122.143)
2020-09-21 14:11:19 oxide joins (~lambda@unaffiliated/mclaren)
2020-09-21 14:13:31 <edwardk> siraben: that is what cabal.project files are for
2020-09-21 14:13:56 <edwardk> siraben: https://github.com/ekmett/codex/blob/master/cabal.project#L57
2020-09-21 14:13:59 <edwardk> is an example
2020-09-21 14:14:24 × SanchayanM quits (~Sanchayan@106.201.114.230) (Quit: leaving)
2020-09-21 14:14:29 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
2020-09-21 14:14:57 fendor joins (~fendor@77.119.128.64.wireless.dyn.drei.com)
2020-09-21 14:15:02 <siraben> edwardk: Oh, do I have to use another tool or does it work with cabal?
2020-09-21 14:15:10 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
2020-09-21 14:15:14 <edwardk> cabal.project is part of cabak
2020-09-21 14:15:16 <edwardk> er cabal
2020-09-21 14:15:26 <siraben> Ok, I'll try that
2020-09-21 14:16:02 <edwardk> you put one at the top of your project dir, it can tell cabal where to go find libraries when they are branches in git repos, tell it to override version bounds in various ways, specify flags, etc.
2020-09-21 14:16:39 <edwardk> you can share one across multiple libraries when working on a multi-library project, etc.
2020-09-21 14:17:03 × xff0x quits (~fox@2001:1a81:53e9:6d00:158c:d17f:d83e:dc7f) (Ping timeout: 272 seconds)
2020-09-21 14:17:28 <siraben> edwardk: I already have pcf.cabal, so I add cabal.project as well?
2020-09-21 14:17:34 <edwardk> yes
2020-09-21 14:17:48 <edwardk> cabal.project is used to locate cabal files and specify things like overrides
2020-09-21 14:18:16 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-21 14:18:42 × mjuad quits (greg@2600:3c00::f03c:91ff:fec3:b10f) (Quit: WeeChat 1.6)
2020-09-21 14:18:55 <edwardk> that is the only actual required line
2020-09-21 14:19:14 × jlamothe quits (~jlamothe@dev.jlamothe.net) (Remote host closed the connection)
2020-09-21 14:19:30 <edwardk> after that you can skim through that file i linked, and at the bottom there are some examples of specifying local project bounds on things, or allowing newer versions of different libraries for either specific targets or all
2020-09-21 14:19:43 <edwardk> the cabal docs have a bunch to say on cabal.project files
2020-09-21 14:20:31 <siraben> Ah, I see
2020-09-21 14:20:32 IT78 joins (511495c6@198-149-20-81.sta.estpak.ee)
2020-09-21 14:20:34 nbloomf joins (~nbloomf@2600:1700:83e0:1f40:dceb:16d3:9c64:27d9)
2020-09-21 14:21:04 <merijn> .cabal files specify packages, cabal.project files specify "build setups"
2020-09-21 14:21:28 <merijn> One is for distributing packages, the other helps specify setups when developing packages
2020-09-21 14:22:23 <IT78> Hi guys! Can cabal package use dependencies from github like stack do? I just need a bit different version of package, but don't want to push changes and propose pull request to contributor of the package
2020-09-21 14:22:35 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-09-21 14:23:10 <siraben> edwardk: great, it works, thanks!
2020-09-21 14:23:38 <merijn> IT78: Depending on circumstances "not really" or "sorta"
2020-09-21 14:24:16 <merijn> IT78: You can use cabal.project files to point to a git repo to fetch a dependency from, which is useful for "in-flight" patches/changes
2020-09-21 14:24:30 <merijn> But it's probably a bad idea for long-term
2020-09-21 14:24:42 <IT78> merijn why?
2020-09-21 14:24:53 <tomsmeding> cheater: I believe that cmd.exe attempts to act like an xterm, which is kind of the modern (but ugly, according to some?) de-facto derivative/extension of vt100
2020-09-21 14:25:01 <merijn> Well, for one, such a package can't be (usefully) distributed via Hackage
2020-09-21 14:25:13 <cheater> tomsmeding: i thought it was trying to act like vt100
2020-09-21 14:25:16 <tomsmeding> so yes, if you manage to make vty not query terminfo and just blindly assume it runs in an xterm, then yes
2020-09-21 14:25:16 <merijn> Also, git repos tend to be more volatile in terms of lifecycle
2020-09-21 14:25:20 <cheater> tomsmeding: what do you think of my plan?
2020-09-21 14:25:21 <cheater> ok
2020-09-21 14:25:21 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
2020-09-21 14:25:41 <cheater> have you ever looked inside vty? to see if/how it figures out what escape sequences to use when?
2020-09-21 14:25:44 <tomsmeding> cheater: https://github.com/microsoft/terminal/issues/6045#issuecomment-631743728
2020-09-21 14:26:15 mastarija joins (~mastarija@93-142-74-181.adsl.net.t-com.hr)
2020-09-21 14:26:27 <IT78> merijn so how usually such issues are solved with cabal? Just create new hackage repo with new code which you can change?
2020-09-21 14:26:42 <merijn> IT78: Depends what you're working on
2020-09-21 14:26:57 <merijn> IT78: Like, if you don't ever plan to put it on hackage then the problem is moot
2020-09-21 14:27:05 <mastarija> Is it possible to read from Control.Concurrent.Chan without blocking. Or rather, is it possible to return Nothing in case there is no value in the Chan at the moment?
2020-09-21 14:27:22 × DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Quit: Leaving...)
2020-09-21 14:27:31 <tomsmeding> cheater: as for looking inside vty, well, I just did earlier today in response to your question, and found https://hackage.haskell.org/package/vty-5.30/docs/src/Graphics.Vty.Output.html#outputForConfig which, directly or indirectly, calls https://hackage.haskell.org/package/vty-5.30/docs/src/Graphics.Vty.Output.TerminfoBased.html#reserveTerminal
2020-09-21 14:27:47 <dminuoso> IT78: You could also run a local package repository (does not have to be hackage). cabal is able to use multiple repositories
2020-09-21 14:27:52 <dminuoso> Look at skete
2020-09-21 14:27:58 <merijn> mastarija: I was gonna say yes, but apparently not
2020-09-21 14:28:03 <mastarija> From what I understand, if I attempt to read from Chan when there's nothing in it, that operation will block until a new value arrives
2020-09-21 14:28:30 <merijn> mastarija: However, I've got a package that's basically a more featureful implementation of Chan which does support that ;)
2020-09-21 14:28:33 <merijn> mastarija: https://hackage.haskell.org/package/broadcast-chan
2020-09-21 14:28:34 <IT78> dminuoso thanks!
2020-09-21 14:28:36 xff0x joins (~fox@2001:1a81:53e9:6d00:158c:d17f:d83e:dc7f)
2020-09-21 14:28:44 jlamothe joins (~jlamothe@dev.jlamothe.net)
2020-09-21 14:28:47 <tomsmeding> cheater: Terminfo, there, is System.Console.TermInfo from https://hackage.haskell.org/package/terminfo , which does foreign calls to a C library; I didn't look further, but I assume that's going to fail on windows
2020-09-21 14:28:53 acidjnk_new2 joins (~acidjnk@p200300d0c73658819d57354728142a5b.dip0.t-ipconnect.de)
2020-09-21 14:28:55 × tolt quits (kevin@2600:3c03::f03c:91ff:fe79:6b76) (Quit: tolt)
2020-09-21 14:29:38 × IT78 quits (511495c6@198-149-20-81.sta.estpak.ee) (Remote host closed the connection)
2020-09-21 14:29:46 <tomsmeding> mastarija: any reason you're not able to use a TChan from Control.Concurrent.STM ? That does support polling
2020-09-21 14:29:52 <merijn> Wait, no
2020-09-21 14:29:54 <merijn> I lied
2020-09-21 14:29:58 <merijn> I should add that!
2020-09-21 14:30:03 <tomsmeding> :D
2020-09-21 14:30:07 <merijn> The Maybe is for when it's closed >.>
2020-09-21 14:30:21 <mastarija> tomsmeding, well, I kind of used Chan and am to lazy to switch now
2020-09-21 14:30:24 machinedgod joins (~machinedg@45.78.189.122)
2020-09-21 14:30:31 <mastarija> :D
2020-09-21 14:30:32 <tomsmeding> that's a reason :p
2020-09-21 14:30:56 <tomsmeding> mastarija: also, I haven't tried it, but perhaps https://hackage.haskell.org/package/base-4.14.0.0/docs/System-Timeout.html#v:timeout works
2020-09-21 14:31:08 utopic_int0x80 joins (~lucid_0x8@188.253.235.98)
2020-09-21 14:31:19 eric_ joins (~eric@2804:431:c7d4:402a:842:24e2:eb65:718)
2020-09-21 14:31:19 <mastarija> tomsmeding, that was going to be my next question :D
2020-09-21 14:31:38 ddellacosta joins (~dd@86.106.121.168)
2020-09-21 14:31:41 × Lycurgus quits (~niemand@98.4.96.130) (Quit: Exeunt)
2020-09-21 14:31:57 × mirrorbird quits (~psutcliff@2a00:801:44a:a00b:20c3:c64:eb15:73a2) (Quit: Leaving)
2020-09-21 14:32:17 <tomsmeding> even if it works, it's dangerous, though, because you might get Nothing then even if there is data on the Chan
2020-09-21 14:32:31 <mastarija> tomsmeding, although I could use MVar or something like that and a separate thread to push changes form Chan into it
2020-09-21 14:32:43 <mastarija> and then read values from that MVar
2020-09-21 14:32:43 <tomsmeding> in case the read just takes abnormally long (which I guess can happen) and that happens to be longer than the (short) timeout you specified
2020-09-21 14:33:07 Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net)
2020-09-21 14:33:18 <Eduard_Munteanu> mastarija, or TMVar
2020-09-21 14:33:27 <mastarija> tomsmeding, do you think my TMVar approach could work?
2020-09-21 14:33:46 <mastarija> Eduard_Munteanu, I kind of need speed in this case
2020-09-21 14:33:46 <tomsmeding> what even is a TMVar
2020-09-21 14:33:52 <Eduard_Munteanu> mastarija, the nice thing about STM primitives is you can do something like select()

All times are in UTC.