Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 668 669 670 671 672 673 674 675 676 677 678 .. 5022
502,152 events total
2020-10-16 08:00:24 <avdb> What's the best way to install all Haskell tools on Linux? I did a fresh installation yesterday and I'd rather not clutter it again by installing GHC, Stack & Cabal in 5 different ways
2020-10-16 08:00:45 <avdb> I head you're not supposed to use Haskell Platform or something because it was harmful
2020-10-16 08:00:56 × jgt1 quits (~jgt@77-255-14-254.adsl.inetia.pl) (Client Quit)
2020-10-16 08:01:05 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-10-16 08:01:53 <merijn> define "all haskell tools" :)
2020-10-16 08:02:20 <merijn> Are you on Arch? Because if so, rule one is: avoid the official packages :)
2020-10-16 08:02:30 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) ()
2020-10-16 08:02:32 <avdb> I need GHC, GHCi, Stack, Cabal and the base packages
2020-10-16 08:02:50 <avdb> Nope, Gentoo, Haskell support is amazing
2020-10-16 08:02:55 <merijn> avdb: GHC+cabal are probably most easily/portably done via ghcup
2020-10-16 08:03:13 <merijn> stack is most easily done via, well, stack (which will get GHC for you)
2020-10-16 08:03:24 <avdb> Alright, that was the method I read about in "What I wish I knew before learning Haskell"
2020-10-16 08:03:57 <merijn> If you're a Luddite whose pedantic about his environment there's also the "just download the GHC bindist" approach
2020-10-16 08:04:13 <avdb> Unlike other books, instead of letting you dip your toes in the water first, it throws you directly in the cold water
2020-10-16 08:04:16 <merijn> Which is what I stick with, but that's not for everyone :p
2020-10-16 08:05:17 untseac joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2020-10-16 08:06:03 × anik quits (~anik@103.23.207.150) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
2020-10-16 08:07:25 <maerwald> avdb: you can't have multiple GHC in gentoo
2020-10-16 08:08:29 <maerwald> and it exposes hackage packages in a way that makes it impossible to have the same version installed multiple times, effectively leading to lots of dependency resolution problems
2020-10-16 08:09:12 lagothrix is now known as Guest70556
2020-10-16 08:09:12 × Guest70556 quits (~lagothrix@unaffiliated/lagothrix) (Killed (tolkien.freenode.net (Nickname regained by services)))
2020-10-16 08:09:21 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
2020-10-16 08:09:52 <avdb> Alright, so I need to stick with my package manager?
2020-10-16 08:10:32 <[exa]> "your package manager" as the distro's package manager?
2020-10-16 08:10:42 <avdb> Portage
2020-10-16 08:10:51 <avdb> We have a Haskell overlay
2020-10-16 08:10:54 <maerwald> avdb: as I said, you can only have one GHC and haskell packages are not handled properly
2020-10-16 08:11:10 <maerwald> it's not worth the trouble
2020-10-16 08:11:36 <[exa]> avdb: certainly use ghcup and local cabal for your development packages... the way haskell packages work is problematic for distros to grasp correctly to allow both development and reliably installed packages
2020-10-16 08:12:17 × isovector1 quits (~isovector@172.103.216.166) (Quit: Leaving)
2020-10-16 08:12:29 <avdb> Oh okay, but how do I update ghcup without hassle?
2020-10-16 08:12:30 <maerwald> most package managers were written in an era where packages were C packages and maintainers lost sleep over changing/breaking API
2020-10-16 08:12:37 <avdb> Since it's not recorded in Portage
2020-10-16 08:12:57 <avdb> Hahaha, XMonad wasn't easy on dependencies either :$
2020-10-16 08:13:00 <maerwald> now we have SemVer, npm and need tools like nix to handle any of that, but no one really understands
2020-10-16 08:13:01 <[exa]> avdb: you don't need to, it's basically an onetime script
2020-10-16 08:13:33 <[exa]> avdb: also it can kindof update itself, like rustups, pips and other "local" managers
2020-10-16 08:13:58 <[exa]> anyway I have to say that I'd welcome ghcup in distro packages
2020-10-16 08:14:10 <maerwald> it's a bit sad that you need the least ergonomic package manager out there to handle haskell packages correctly
2020-10-16 08:14:22 <avdb> Oh that's cool, seems like it installs itself in my home directory
2020-10-16 08:14:49 isovector1 joins (~isovector@172.103.216.166.cable.tpia.cipherkey.com)
2020-10-16 08:15:07 <[exa]> avdb: it's really convenient for development, just gives the user a working copy of ghc and cabal, with easy way to switch versions etc. Certainly the easiest way around, by far
2020-10-16 08:15:17 × lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Killed (hitchcock.freenode.net (Nickname regained by services)))
2020-10-16 08:15:26 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
2020-10-16 08:16:31 <[exa]> avdb: if you don't mind a bit of `make install`, you can install ghc+cabal yourself from binary distribution on the web, which will give you a similar result with a bit more control. Eventually you could compile ghc, but that's a longer adventure
2020-10-16 08:17:04 <[exa]> (by "longer" I mean "please don't do this to yourself now")
2020-10-16 08:18:12 <merijn> You shouldn't compile GHC yourself unless you really have to
2020-10-16 08:18:22 <merijn> And actually you run into circular issues anyway
2020-10-16 08:18:27 × polyrain quits (~polyrain@130.102.13.188) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-16 08:18:34 <merijn> You need to already have a working GHC to compile GHC from source
2020-10-16 08:18:48 <merijn> So, why would you bother building it if you've already got it :p
2020-10-16 08:19:22 × addcninblue quits (~addison@c-73-158-198-149.hsd1.ca.comcast.net) (Ping timeout: 256 seconds)
2020-10-16 08:19:26 <avdb> [exa]: Oh no, I already had horrible experiences compiling rust in the past
2020-10-16 08:20:00 <jchia> i'm wondering how much performance improvement you can get by compiling ghc yourself with optimization options fit for the target machine
2020-10-16 08:20:09 <avdb> You're 100% right merijn. Compiling packages from source is only useful for customization with USE flags or ports.
2020-10-16 08:20:27 <[exa]> jchia: that's very gentoo-oriented question right. :D
2020-10-16 08:20:43 <avdb> Oh and optimizations, forgot.
2020-10-16 08:20:47 <jchia> [exa]: i just find ghc, but i don't use gentoo
2020-10-16 08:20:50 <jchia> i find ghc slow
2020-10-16 08:21:16 Stanley00 joins (~stanley00@unaffiliated/stanley00)
2020-10-16 08:21:38 × lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Ping timeout: 258 seconds)
2020-10-16 08:21:40 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-16 08:21:45 <jchia> So if i can even get 5% improvement from building ghc from source, i would do it. i just haven't tried
2020-10-16 08:22:19 <[exa]> I don't really believe the machine-specific optimizations would help it... ghc is slow because it handles giant heaps of irregular structures and tries to do it in a (relatively) sane and clean way, which can be hardly optimized by lowlevel changes in the compiler
2020-10-16 08:22:49 <[exa]> jchia: would be interesting to see the benchmark though
2020-10-16 08:23:25 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
2020-10-16 08:24:12 × nyd quits (~lpy@unaffiliated/elysian) (Quit: nyd)
2020-10-16 08:26:21 × bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 260 seconds)
2020-10-16 08:26:38 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-10-16 08:26:55 moy joins (a4b11321@static-csq-cds-019033.business.bouyguestelecom.com)
2020-10-16 08:27:19 moy is now known as Guest6760
2020-10-16 08:28:11 × sdx23 quits (~sdx23@unaffiliated/sdx23) (Quit: Lost terminal)
2020-10-16 08:31:55 bahamas joins (~lucian@unaffiliated/bahamas)
2020-10-16 08:32:39 <Guest6760> Hello. Im discovering Haskell through the development of a little chat server using TCP protocole. Sadly, i can only parse the message sent initially at the client connexion. If a client keep the socket open and continue sending message, i cant get them server side. Anyone with some experience with the Network module has a clue ?
2020-10-16 08:32:51 <Guest6760> as example im using the snippet found on the Network module documentation :
2020-10-16 08:33:13 <Guest6760> https://hackage.haskell.org/package/network-3.1.1.1/docs/Network-Socket.html
2020-10-16 08:33:43 invaser joins (~Thunderbi@31.148.23.125)
2020-10-16 08:35:23 <[exa]> Guest6760: how exactly you "can't" get them on server side? the client disconnects? the read from the connection hangs forever?
2020-10-16 08:36:02 sdx23 joins (~sdx23@unaffiliated/sdx23)
2020-10-16 08:37:47 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-16 08:37:52 <[exa]> (also, it might help a lot to pastebin some representative sample of your code)
2020-10-16 08:39:06 <Guest6760> ah yeah pastebin ill do that. by i cant i mean i dont find how to do it. The client does not disconnect, but i dont know how to listen to/parse the message that the client keep sending
2020-10-16 08:40:09 <Guest6760> https://pastebin.com/RCyZcwVb here is my server code
2020-10-16 08:41:00 <Guest6760> i can log the message client send on connexion, and answer it also, at the connexion, but then nothing
2020-10-16 08:41:57 hackage benchpress 0.2.2.15 - Micro-benchmarking with detailed statistics. https://hackage.haskell.org/package/benchpress-0.2.2.15 (willsewell)
2020-10-16 08:42:36 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-16 08:42:53 <[exa]> ok good, you probably don't want to use plain 'recv' but you can wrap the socket with a handle-like interface; convert it using `socketToHandle` first. Then you can e.g. read the first "line" from the client using `hGetLine`
2020-10-16 08:43:38 <[exa]> Guest6760: btw, highly suggest using some kind of telnet or netcat tool to debug&inspect client and server separately
2020-10-16 08:43:52 kenran joins (~maier@b2b-37-24-119-190.unitymedia.biz)
2020-10-16 08:45:10 <Guest6760> ok thanks a lot, i'll give it a try. Im using netcat as client but im was not aware i could use it to debug
2020-10-16 08:45:21 <Guest6760> i was not aware
2020-10-16 08:45:24 × snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 258 seconds)
2020-10-16 08:45:29 ph88 joins (~ph88@2a02:8109:9e40:2704:21a2:9414:d2e6:266d)
2020-10-16 08:45:34 <maerwald> avdb: compiling from source is about trust too... and I don't mean that from some paranoid privacy perspective, but from the perspective that package maintainers tend to mess up
2020-10-16 08:46:06 <ph88> you mean you have to trust them not to mess up ? :P
2020-10-16 08:46:24 <[exa]> Guest6760: if you are using it as client, you are probably already there :]
2020-10-16 08:46:26 <maerwald> no, I don't have to, because I can see what they are doing exactly
2020-10-16 08:48:13 × isovector1 quits (~isovector@172.103.216.166.cable.tpia.cipherkey.com) (Ping timeout: 260 seconds)
2020-10-16 08:48:20 × toorevitimirp quits (~tooreviti@117.182.180.0) (Quit: Konversation terminated!)
2020-10-16 08:48:57 × mirrorbird quits (~psutcliff@m83-187-163-53.cust.tele2.se) (Quit: Leaving)

All times are in UTC.