Logs: liberachat/#haskell
| 2021-07-01 21:47:09 | <davean> | tomsmeding: you can always hide the naming by sticking it in an STRef and <$> the opterations or something :) |
| 2021-07-01 21:49:05 | → | notzmv joins (~zmv@user/notzmv) |
| 2021-07-01 21:49:48 | <safinaskar> | i wrote vector i want!!!!! look here: https://paste.debian.net/1203074/ |
| 2021-07-01 21:50:27 | <tomsmeding> | "With C++-like performance -- I didn't try to compile this" X doubt :p |
| 2021-07-01 21:51:55 | <safinaskar> | i mean "with same asymptotic" |
| 2021-07-01 21:52:22 | <tomsmeding> | yep that looks quite like I expected it to look |
| 2021-07-01 21:52:51 | <tomsmeding> | I wonder if it would be slightly more efficient to use only one STRef, but that really can only be answered with benchmarking |
| 2021-07-01 21:53:28 | <tomsmeding> | safinaskar: downside of wrapping MVector like this: you'll have to wrap all the other vector operations you want as well :p |
| 2021-07-01 21:54:15 | <orzo> | i'm looking for a haskell job |
| 2021-07-01 21:54:22 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 2021-07-01 21:54:28 | <orzo> | anybody hiring haskellers? |
| 2021-07-01 21:55:44 | <tomsmeding> | safinaskar: I believe C++ doesn't do scaling by 2 but by the golden ratio (phi), because phi^2 = phi + 1; that means that after growing twice, the new buffer fits precisely where the previous two buffers were in memory |
| 2021-07-01 21:55:46 | <tomsmeding> | but I may misremember |
| 2021-07-01 21:56:07 | <tomsmeding> | also profile profile :p |
| 2021-07-01 22:01:10 | × | Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Quit: Leaving) |
| 2021-07-01 22:02:02 | <monochrom> | That golden ratio trick is nice. |
| 2021-07-01 22:02:50 | <monochrom> | And Fibonacci is behind it. |
| 2021-07-01 22:03:08 | <monochrom> | https://twitter.com/sigfpe/status/776420034419658752 |
| 2021-07-01 22:03:15 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-07-01 22:04:05 | <safinaskar> | geekosaur: are you prematurely optimizing, or just using a non-Haskelly API for some reason?" - i already have non-optimized version, and now i want to optimize it. in fact code i want to optimize is here: https://hackage.haskell.org/package/check-cfg-ambiguity-0.0.0.1/docs/src/CheckCFGAmbiguity.html#lowLevelTestAmbiguity . it uses "STRef s [a]" |
| 2021-07-01 22:04:05 | <safinaskar> | and i want to replace it with my vector |
| 2021-07-01 22:05:07 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2021-07-01 22:05:27 | <davean> | tomsmeding: Its mroe efficient with one STRef, and I believe two refernces to the same vector |
| 2021-07-01 22:09:20 | → | cuz joins (~user@2601:182:cc02:8b0:480:5e00:5c91:f4b2) |
| 2021-07-01 22:09:49 | × | chisui quits (~chisui@200116b866be75009cc16d86abb76e8b.dip.versatel-1u1.de) (Ping timeout: 246 seconds) |
| 2021-07-01 22:13:11 | × | Kaipi quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection) |
| 2021-07-01 22:14:07 | → | Kaipi joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 2021-07-01 22:19:20 | × | Kaipi quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection) |
| 2021-07-01 22:19:31 | → | Kaipi joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 2021-07-01 22:23:29 | → | Merfont joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 2021-07-01 22:24:09 | × | Kaipi quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection) |
| 2021-07-01 22:24:28 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 2021-07-01 22:24:56 | × | chris_ quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-07-01 22:25:33 | → | chris_ joins (~chris@81.96.113.213) |
| 2021-07-01 22:27:05 | × | Merfont quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection) |
| 2021-07-01 22:27:52 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Ping timeout: 265 seconds) |
| 2021-07-01 22:29:06 | × | chomwitt quits (~Pitsikoko@2a02:587:dc0b:0:d8f7:cdfe:4658:bec4) (Ping timeout: 240 seconds) |
| 2021-07-01 22:29:34 | × | jonatan quits (~nate@h77-53-70-163.cust.a3fiber.se) (Ping timeout: 268 seconds) |
| 2021-07-01 22:30:02 | × | chris_ quits (~chris@81.96.113.213) (Ping timeout: 272 seconds) |
| 2021-07-01 22:31:09 | → | Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
| 2021-07-01 22:31:14 | → | hsiktas[m] joins (~hsiktasma@2001:470:69fc:105::30d4) |
| 2021-07-01 22:32:39 | → | Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 2021-07-01 22:32:54 | <ph88> | is there any way to get the name of the compiled binary with either stack or cabal ? i need to know the name for a command line tool |
| 2021-07-01 22:37:45 | × | dunj3 quits (~dunj3@p200300f61714a66193d8ecf822b563af.dip0.t-ipconnect.de) (Quit: Leaving) |
| 2021-07-01 22:38:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 2021-07-01 22:39:05 | × | fendor quits (~fendor@77.119.218.107.wireless.dyn.drei.com) (Read error: Connection reset by peer) |
| 2021-07-01 22:41:39 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 2021-07-01 22:42:13 | <geekosaur> | https://downloads.haskell.org/ghc/latest/docs/html/libraries/base-4.15.0.0/System-Environment.html#v:getProgName |
| 2021-07-01 22:42:54 | × | acidjnk_new quits (~acidjnk@p200300d0c72b9504558b1d2f6b7134fe.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 2021-07-01 22:46:17 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 256 seconds) |
| 2021-07-01 22:47:05 | <ph88> | geekosaur, i think that is the name of the program as it was executed (in case the user renamed the program) .. i would like the name from the cabal file how it was compiled |
| 2021-07-01 22:47:12 | <Lycurgus> | yeah |
| 2021-07-01 22:47:23 | <Lycurgus> | just look in the damn fs |
| 2021-07-01 22:48:05 | <Lycurgus> | it's usually pretty clear if you look at the tree or .local/bin , ~/.stack whatever |
| 2021-07-01 22:48:25 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 2021-07-01 22:48:44 | <Clint> | ph88: you want the equivalent of `grep -i executable *.cabal`? |
| 2021-07-01 22:49:28 | <Lycurgus> | if you mean prior the instantiation of any project, you'll need the look at the particular pkg (stack, flavors of cabal, etc) |
| 2021-07-01 22:49:37 | <Lycurgus> | *need to look |
| 2021-07-01 22:50:56 | → | oxide joins (~lambda@user/oxide) |
| 2021-07-01 22:51:30 | <geekosaur> | that seems to be the best you'll do; it's not for example part of the Paths_ module |
| 2021-07-01 22:51:42 | <ph88> | Clint, yes. I thought there might be a clean way to do this without using grep |
| 2021-07-01 22:51:54 | × | pbrisbin quits (~patrick@pool-173-49-147-28.phlapa.fios.verizon.net) (Ping timeout: 240 seconds) |
| 2021-07-01 22:52:38 | <Clint> | i'm sure you could parse the cabal file and output the list of executables |
| 2021-07-01 22:52:58 | <geekosaur> | I'm not so sure of that, parsing the cabal file is known to be painful |
| 2021-07-01 22:53:10 | <geekosaur> | I just used grep when I needed that |
| 2021-07-01 22:53:23 | <monochrom> | How automatic do you really need this to be? |
| 2021-07-01 22:54:53 | <ph88> | for a CI configuration file that i want to use for multiple projects |
| 2021-07-01 22:55:06 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 240 seconds) |
| 2021-07-01 22:55:24 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-07-01 22:58:01 | → | nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 2021-07-01 22:59:44 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 2021-07-01 23:00:32 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 2021-07-01 23:02:58 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-07-01 23:02:58 | × | Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt) |
| 2021-07-01 23:03:09 | × | nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds) |
| 2021-07-01 23:03:40 | <Clint> | ph88: you can grab them out of https://downloads.haskell.org/ghc/8.2.1/docs/html/libraries/Cabal-2.0.0.2/Distribution-Types-PackageDescription.html#t:PackageDescription |
| 2021-07-01 23:03:52 | → | chris_ joins (~chris@81.96.113.213) |
| 2021-07-01 23:03:52 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 2021-07-01 23:04:20 | <ph88> | ye ok i could build a cli tool to do just that |
| 2021-07-01 23:05:00 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 2021-07-01 23:05:00 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 2021-07-01 23:05:43 | → | gentauro joins (~gentauro@user/gentauro) |
| 2021-07-01 23:09:07 | <monochrom> | If cabal build is successful, you can expect dist-newstyle/build/<arch>/ghc-<version>/<pkg>-<version>/x to have subdirectories, one per executable. |
| 2021-07-01 23:09:38 | <monochrom> | Now I have reduced the problem to "how to compute <arch>, ghc version number, etc". >:) |
| 2021-07-01 23:10:12 | <monochrom> | But perhaps you can play fast and loose and just say "whatever directory I find at that place I'll go for it, I don't care" |
| 2021-07-01 23:13:18 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 265 seconds) |
| 2021-07-01 23:13:35 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-07-01 23:14:59 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.0.1) |
| 2021-07-01 23:19:53 | × | zeenk quits (~zeenk@2a02:2f04:a106:9600:82fb:aed9:ca9:38d3) (Quit: Konversation terminated!) |
| 2021-07-01 23:23:52 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection) |
| 2021-07-01 23:24:42 | <dsal> | I'm going to see if I can convert one of my projects to cabal again... |
| 2021-07-01 23:25:58 | × | mud quits (~mud@user/kadoban) (Ping timeout: 256 seconds) |
| 2021-07-01 23:31:45 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-07-01 23:32:53 | <jackdk> | What is a good random number generator that performs well in a multithreaded environment (ideally supported by `random-source`, since that's what the project I'm refactoring uses). /dev/urandom seems to suffer contention, if this blog post I found from 2014 is still accurate |
| 2021-07-01 23:34:33 | <dsal> | For what purpose? |
| 2021-07-01 23:34:46 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 2021-07-01 23:35:42 | <jackdk> | good question. Simulation, not cryptography |
| 2021-07-01 23:36:01 | × | stefan-_ quits (~cri@42dots.de) (Ping timeout: 265 seconds) |
| 2021-07-01 23:36:18 | <monochrom> | If just statistically random, use /dev/urandom or equivalent to seed, then use any splittable generator, e.g., random-1.2. Every time you fork, you split. |
| 2021-07-01 23:38:20 | <jackdk> | random-source includes support for StdGen. I did try splitting the stdgen before each fork, but was still pegging one core at runtime (as seen by htop). Perhaps I was doing something else wrong. At least I know that the overall idea there was correct |
All times are in UTC.