Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 199 200 201 202 203 204 205 206 207 208 209 .. 17912
1,791,137 events total
2021-05-31 07:52:08 <dminuoso> What are you trying to do exactly?
2021-05-31 07:56:32 × jjhoo quits (jahakala@dsl-trebng21-58c18f-56.dhcp.inet.fi) (Ping timeout: 268 seconds)
2021-05-31 07:57:24 <phma> I put data files in the build directory, and I'd like to run "cabal new-run" or the like in the build directory. I don't want my data files in the repo, so I put them in the build directory.
2021-05-31 07:58:16 jjhoo joins (jahakala@dsl-trebng21-58c18f-56.dhcp.inet.fi)
2021-05-31 07:59:11 <phma> So cabal has to know where the source is. Also if I load the program in ghci, and I want to do this in the build directory so that I can run it on the datafiles, ghci has to know where the source is.
2021-05-31 07:59:48 <phma> So it may need to be an option not just for cabal.
2021-05-31 08:02:05 × holy_ quits (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) (Ping timeout: 268 seconds)
2021-05-31 08:03:18 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
2021-05-31 08:08:54 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-05-31 08:08:59 <sclv> sounds like you should just put (or symlink) the datafiles in the project directory and use a .gitignore to exclude them from the repo. or just teach your lib or executable to take a flag specifying the data file directory
2021-05-31 08:09:17 gehmehgeh joins (~user@user/gehmehgeh)
2021-05-31 08:09:40 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 252 seconds)
2021-05-31 08:10:20 kuribas joins (~user@ptr-25vy0i7o5gw6tky01tr.18120a2.ip6.access.telenet.be)
2021-05-31 08:10:28 cheater joins (~Username@user/cheater)
2021-05-31 08:11:35 <phma> I found the repo on github and am thinking about how to word the feature request.
2021-05-31 08:12:06 <kuribas> I read on an article how some database libraries aren't good because they don't prove their correctness in the type system. That makes me wonder, don't they test the code they write? I always test any code I write, even just quickly in the REPL.
2021-05-31 08:12:14 <phma> It doesn't make sense to put data files in .gitignore, because if other people work on the same project, they'll have different data files.
2021-05-31 08:12:29 <c_wraith> kuribas: I'm not sure that's a good argument
2021-05-31 08:12:51 <kuribas> c_wraith: mine or his? :-)
2021-05-31 08:12:59 × Sgeo quits (~Sgeo@user/sgeo) (Quit: Leaving)
2021-05-31 08:13:09 ddellacosta joins (~ddellacos@86.106.143.209)
2021-05-31 08:13:37 <c_wraith> The one to which you are responding. (You can't really express a lot of what SQL can do in a way that's easy to use in Haskell)
2021-05-31 08:14:05 <kuribas> the article seemed to favor opaleye
2021-05-31 08:14:28 rahguzar joins (~rahguzar@dynamic-adsl-84-220-228-254.clienti.tiscali.it)
2021-05-31 08:14:40 <kuribas> personally, I'd prefer a library to be close to SQL, rather than another abstraction to learn on top.
2021-05-31 08:14:51 <nitrix> kuribas, A static type system can catch bugs earlier in the development phase, but it's not perfect. Even if you were to encode all your invariants, you could still accidently get the requirements wrong.
2021-05-31 08:14:55 <c_wraith> Opaleye doesn't even verify that the database schema matches the queries. :P
2021-05-31 08:15:22 <kuribas> c_wraith: heh :)
2021-05-31 08:15:39 <kuribas> My library does :)
2021-05-31 08:15:43 <c_wraith> terrible that it leaves so many bugs for runtime!
2021-05-31 08:15:59 <nitrix> kuribas, Tests get you a little further, but only so much. When people talk about proof and correctness, it's a lot more rigorous than that and often impossible for an application of a moderate size.
2021-05-31 08:16:23 <kuribas> nitrix: true, and I don't think a lot of haskell code is really "proven" correct.
2021-05-31 08:16:50 hendursaga joins (~weechat@user/hendursaga)
2021-05-31 08:17:41 × ddellacosta quits (~ddellacos@86.106.143.209) (Ping timeout: 264 seconds)
2021-05-31 08:17:49 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
2021-05-31 08:17:58 <kuribas> c_wraith: I am more interested in having a library checking for mismatched columns rather than checking if the SQL is semantically sound SQL.
2021-05-31 08:18:13 <kuribas> c_wraith: because that will help in refactoring database tables.
2021-05-31 08:18:22 <kuribas> and adding new functionality.
2021-05-31 08:18:45 <kuribas> assuming I know how to write SQL, and possibly test it in the SQL REPL first.
2021-05-31 08:20:05 <nitrix> One way that people have been doing this, back in the 70s, is with metaprogramming/macros. You connect to the database and generate code for the application, knowing that they will fully correspond (assuming no bad manipulation in production).
2021-05-31 08:20:38 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 264 seconds)
2021-05-31 08:20:49 <kuribas> There are two options: 1. a library which just translates to SQL, and doesn't try to be much in the way. 2. a library which implements it's own sound model on top of SQL, but it will also limit the possible queries (persistent).
2021-05-31 08:20:53 × tomboy64 quits (~tomboy64@2a02:2454:416:db00:ba27:ebff:fe58:73c2) (Read error: Connection reset by peer)
2021-05-31 08:21:10 xkb joins (~xkb@a80-100-6-16.adsl.xs4all.nl)
2021-05-31 08:21:12 <kuribas> nitrix: that's nice until you want to compose your queries.
2021-05-31 08:21:25 <kuribas> nitrix: add sort keys, cursors, etc...
2021-05-31 08:21:42 <nitrix> I don't see the issue.
2021-05-31 08:22:01 <kuribas> nitrix: how would you compose the query if the macro is predefined?
2021-05-31 08:22:45 <nitrix> The metaprogram is just translating the databases and tables into equivalent types. You then worth with those types to make your queries like you normally would.
2021-05-31 08:22:53 <nitrix> s/worth/work
2021-05-31 08:24:54 <nitrix> You can have any sort of ORM around this, it's completely orthogonal.
2021-05-31 08:25:13 <unyu> Presumably the metaprogram runs at compile-time, so every time you want to add a new query, you need to recompile the thing, even if the actual tables have not changed.
2021-05-31 08:25:18 <xkb> Hi all, I'm trying to solve a hackerRank exercise called minimum swaps. Challenge is to determine the minmum nr of swaps needed to sort an array. I've written a (naive) Haskell solution using a graph cycle algorithm, Code is here: https://paste.tomsmeding.com/azzuoitj This solves the problem for the first 4 sample cases + 1 other but fails on
2021-05-31 08:25:19 <xkb> others. I probably made some really stupid mistake but can't see it, so would appreciate some eyes at the code. Next to this I need to optimise it, probably by fixing the hasCycle function so I don't repeatedly sort.. Just to be clear: this is not a work assessment or anything, it's one of the practice exercises from HackerRank.
2021-05-31 08:26:02 <nitrix> unyu, Not every time you add a new query, just every time you change the database structure (new tables, new columns, etc).
2021-05-31 08:26:02 <xkb> `Minimum Swaps 2` to be exact
2021-05-31 08:26:27 <unyu> Oh, then that is good.
2021-05-31 08:26:28 <kuribas> nitrix: that's what my library does, it reads the information schema and outputs template haskell with corresponding types.
2021-05-31 08:26:40 <nitrix> kuribas, Then you're set :)
2021-05-31 08:29:21 Topsi joins (~Tobias@dyndsl-095-033-095-132.ewe-ip-backbone.de)
2021-05-31 08:31:11 holy_ joins (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665)
2021-05-31 08:31:42 z0k joins (~z0k@101.50.108.132)
2021-05-31 08:31:51 feliix42 joins (~felix@gibbs.uberspace.de)
2021-05-31 08:39:21 chaosite joins (~chaosite@user/chaosite)
2021-05-31 08:40:21 bfrk joins (~Thunderbi@200116b84534a60005aeadf137ee420f.dip.versatel-1u1.de)
2021-05-31 08:41:30 dhil joins (~dhil@195.213.192.85)
2021-05-31 08:41:48 bfrk parts (~Thunderbi@200116b84534a60005aeadf137ee420f.dip.versatel-1u1.de) ()
2021-05-31 08:41:48 × z0k quits (~z0k@101.50.108.132) (Quit: WeeChat 3.0)
2021-05-31 08:42:30 × charukiewicz quits (~quassel@irouteince04.i.subnet.rcn.com) (Remote host closed the connection)
2021-05-31 08:43:40 charukiewicz joins (~quassel@irouteince04.i.subnet.rcn.com)
2021-05-31 08:46:50 fendor joins (~fendor@178.115.56.93.wireless.dyn.drei.com)
2021-05-31 08:49:33 × Guest417 quits (~winter@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com) (Ping timeout: 268 seconds)
2021-05-31 08:54:02 comerijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-05-31 08:54:29 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-05-31 08:55:10 <arahael> I'm trying to get 'newEnv' from Network.AWS.Env, which should be in https://github.com/brendanhay/amazonka/blob/a266fc686cdddb48ac791261b73798c2ed8a6097/amazonka/src/Network/AWS/Env.hs
2021-05-31 08:55:35 <arahael> However... when I compile, I get a 'Could not find module ‘Network.AWS.Env’', what must I be doing wrong? It's in amazonka-core, right?
2021-05-31 08:56:46 × hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
2021-05-31 08:58:21 <fendor> arahael, looks like it is in amazonka
2021-05-31 08:58:24 <fendor> https://hackage.haskell.org/package/amazonka
2021-05-31 08:59:17 Guest58 joins (~Guest58@125-227-78-46.HINET-IP.hinet.net)
2021-05-31 08:59:25 <arahael> fendor: Oh, so I have to get the whole thing? I can't just build-depends amazonka-core or something?
2021-05-31 08:59:47 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2021-05-31 08:59:49 <fendor> arahael, to me it looks like amazonka-core does not expose that module.
2021-05-31 08:59:58 × xprlgjf quits (~gavin@60.27.93.209.dyn.plus.net) (Remote host closed the connection)
2021-05-31 09:00:07 <fendor> so maybe? Don't know about amazonka otherwise
2021-05-31 09:00:09 <arahael> Hmm... Very curious.
2021-05-31 09:00:33 <arahael> So I'm now build-depending amazonka, amazonka-core, and amazonka-s3, lets see if that works...
2021-05-31 09:00:39 × beka quits (~beka@104.193.170-254.PUBLIC.monkeybrains.net) (Ping timeout: 268 seconds)
2021-05-31 09:01:10 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f131:7ff:d61f:7340) (Remote host closed the connection)
2021-05-31 09:01:39 <dhouthoo> arahael: i just depend on amazonka and amazonka-s3
2021-05-31 09:01:43 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7549:f26f:981e:10ae)
2021-05-31 09:01:48 × fendor quits (~fendor@178.115.56.93.wireless.dyn.drei.com) (Remote host closed the connection)
2021-05-31 09:02:05 <arahael> dhouthoo: Thanks for the tip.
2021-05-31 09:02:17 <arahael> For my learning, how do you guys figure that out?
2021-05-31 09:02:48 <dhouthoo> browsing hackage
2021-05-31 09:02:51 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
2021-05-31 09:03:59 <arahael> Ahd observing that the amazonka package does contain a Network.AWS.Env and that that does contain a newEnv, ok that works. :)
2021-05-31 09:04:04 berberman_ joins (~berberman@user/berberman)
2021-05-31 09:04:29 shiraeeshi joins (~shiraeesh@109.166.58.176)
2021-05-31 09:04:48 tremon joins (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl)

All times are in UTC.