Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-09 04:32:46 <curiousgay> ok
2021-03-09 04:33:06 <redmp> curiousgay: there are variations on the way to compile haskell; i think you can get 100% static musl based binaries, but i haven't looked into that
2021-03-09 04:33:33 curiousgay runs void linux with glibc
2021-03-09 04:34:22 <redmp> curiousgay: you can always use `runhaskell` ;)
2021-03-09 04:34:49 <spidr> oh what
2021-03-09 04:35:01 <monochrom> runhaskell is just runghc
2021-03-09 04:35:10 <spidr> could I use runhaskell with fastcgiwrapper
2021-03-09 04:35:23 <spidr> to run myfile.hs in /cgi-bin/
2021-03-09 04:35:47 <monochrom> Yes.
2021-03-09 04:36:14 <curiousgay> I'm surprised that the only binary stack doesn't install in PATH is GHC itself
2021-03-09 04:37:54 <curiousgay> so I'm just thinking of "stack ghc" as "go build" :D
2021-03-09 04:38:27 <monochrom> Isn't "stack build" even closer? better?
2021-03-09 04:39:42 <curiousgay> I didn't read documentation on "stack build" command because it was mentioned in creating packages
2021-03-09 04:39:49 <redmp> spidr: runhaskell/runghc might need help finding your dependencies if they're outside of `ghc-pkg list` which is usually only the stdlib packages
2021-03-09 04:40:07 <curiousgay> so I decided to skip that part until I'm ready to create packages
2021-03-09 04:40:11 <redmp> spidr: also runhaskell/runghc will be slower than compiling things, but that might be ok depending on what you're doing
2021-03-09 04:40:20 <redmp> *slower than binaries
2021-03-09 04:40:47 <curiousgay> you mean they run ghci?
2021-03-09 04:41:32 <monochrom> basically yes, if you understand it to be "runghc = ghci - the interactive prompt"
2021-03-09 04:41:37 <redmp> curiousgay: stack build and cabal build are like go build .. they make your libs into shared libs or your executables into a binary
2021-03-09 04:42:23 <monochrom> The speed of interpretation without the hinderance of UI.
2021-03-09 04:42:39 plutoniix joins (~q@184.82.204.248)
2021-03-09 04:43:13 <curiousgay> redmp: you mean they don't require setting up yaml file and simply accept single .hs file as an argument?
2021-03-09 04:44:36 × augnun quits (~augnun@2804:14c:658b:41bb:5bdd:b325:740e:cfd8) (Quit: WeeChat 3.1)
2021-03-09 04:45:20 <spidr> redmp: im only learning, it would likely playing with base
2021-03-09 04:46:12 <redmp> spidr: then you should be good! runhaskell is great for learning and for not worrying about package formats
2021-03-09 04:46:38 <spidr> I need a project or something to actually write for practice
2021-03-09 04:46:48 <spidr> maybe I'll look at project euler
2021-03-09 04:46:58 <redmp> curiousgay: yes
2021-03-09 04:47:31 <curiousgay> thanks
2021-03-09 04:50:02 <redmp> spidr: the recent advent of code was also fun, i hear
2021-03-09 04:50:18 bartemius joins (~bartemius@109-252-32-214.nat.spd-mgts.ru)
2021-03-09 04:50:27 × polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 272 seconds)
2021-03-09 04:56:41 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-03-09 04:59:43 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-09 05:01:01 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
2021-03-09 05:02:26 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 264 seconds)
2021-03-09 05:04:48 <Axman6> curiousgay: I think the fact that go doesn't link to anything is more a reflection on Go's deep NIH syndrome than Haskell's strangeness
2021-03-09 05:05:21 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2021-03-09 05:06:33 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-03-09 05:06:37 × drbean quits (~drbean@TC210-63-209-26.static.apol.com.tw) (Read error: Connection reset by peer)
2021-03-09 05:06:53 drbean joins (~drbean@TC210-63-209-84.static.apol.com.tw)
2021-03-09 05:07:02 jacks2 joins (~bc8134e3@217.29.117.252)
2021-03-09 05:09:16 × Guest47409 quits (~micro@a9.lence.net) (Quit: leaving)
2021-03-09 05:09:30 micro joins (~micro@unaffiliated/micro)
2021-03-09 05:11:13 <spidr> thanks
2021-03-09 05:11:30 <curiousgay> Axman6: I think Go not linking to anything allows easy cross-compilation, if you write Go program on linux you can cross-compile it to windows, macos, freebsd, plan 9, wasm and others by just setting GOOS and GOARCH environment variables
2021-03-09 05:12:06 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
2021-03-09 05:12:08 <Axman6> sure, it also means needing a team of people who can maintain that, and we don't have that luxury
2021-03-09 05:12:09 × drbean quits (~drbean@TC210-63-209-84.static.apol.com.tw) (Ping timeout: 256 seconds)
2021-03-09 05:12:14 <curiousgay> Go compiler is written in Go, Go runtime is written in Go, Go standard library is written in Go (with few exceptions like DNS resolver in net package)
2021-03-09 05:12:53 <curiousgay> and Go has its own assembler
2021-03-09 05:14:09 <curiousgay> Axman6: I think the not fair part about Go to Haskell is Ken Thompson :)
2021-03-09 05:14:17 <Axman6> the GHC RTS is quite a small amount of C, mostly responsible for allocations/GC, resource management through threads/sparks and interraction with the OS. We don';t want our GHC devs wasting their time maintaining essentially their own libc for each OS they target if we can have them doing useful work
2021-03-09 05:15:16 supercoven_ joins (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi)
2021-03-09 05:15:50 <Axman6> there's no particularly good reason why we couldn't get rid of C from the OS, but it's not worth the effort
2021-03-09 05:15:56 <curiousgay> that's fine, languages and their ecosystems are different, that's why they both are fun to learn
2021-03-09 05:16:10 × elliott_1 quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
2021-03-09 05:16:57 <curiousgay> it's not even possible to get rid of C on windows, macos, solaris, openbsd and ios (and maybe android?)
2021-03-09 05:17:19 <Axman6> sure it is, if you're happy to write assembly
2021-03-09 05:17:30 <curiousgay> so Go bends to their rules while staying uncompromised on other OSes
2021-03-09 05:18:10 <curiousgay> Axman6: writing assembly won't help because syscalls are forced through C library by operating system kernel, that means even assembly code must link to libc to do syscalls
2021-03-09 05:18:24 × supercoven quits (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) (Ping timeout: 245 seconds)
2021-03-09 05:18:44 <Axman6> really? you can't just use an int instruction?
2021-03-09 05:18:50 <curiousgay> no
2021-03-09 05:19:12 <curiousgay> err, wait, you can
2021-03-09 05:19:30 <curiousgay> but you can make syscalls only through libc on exotic operating systems
2021-03-09 05:20:23 <curiousgay> Axman6: https://github.com/golang/go/issues/36435
2021-03-09 05:21:40 <curiousgay> but at least openbsd allows them from static binaries
2021-03-09 05:21:45 <Axman6> If I had to choose between the two, I'd choose to continue using OpenBSD and not Go :)
2021-03-09 05:22:28 <curiousgay> you use openbsd???
2021-03-09 05:22:56 <Axman6> yes, for my router. FreeBSD for the server this IRC client is running on, and macOS for for getting work done
2021-03-09 05:23:08 <curiousgay> you don't want to know who I am :)
2021-03-09 05:23:10 <jacks2> what libraries are recommended these days for writing a webserver in haskell?
2021-03-09 05:23:13 nbloomf joins (~nbloomf@2600:1700:ad14:3020:fc2c:a791:ab0d:f870)
2021-03-09 05:23:39 <spidr> I am also interested, want to try writing an api in haskell
2021-03-09 05:23:40 <redmp> jacks2: servant, servant-server
2021-03-09 05:23:46 <redmp> jacks2: warp
2021-03-09 05:23:50 <Axman6> jacks2: I'm a huge fan of Servant (enough so that the main author said It was their best advertising at somepoint)
2021-03-09 05:24:19 <monochrom> Classic Mac used Pascal.
2021-03-09 05:25:00 <jacks2> thanks. I used scotty in the past. are these better?
2021-03-09 05:25:04 <redmp> spidr: jacks2: https://docs.servant.dev/en/stable/tutorial/index.html
2021-03-09 05:25:06 <curiousgay> Axman6: anyway, as a former desktop user of openbsd I think it's reasonable to use it for router (because I don't understand any firewall besides pf), but I won't use it for any other stuff anymore
2021-03-09 05:25:07 <Axman6> Servant isn't exactly the most beginniner friendly, as it uses a lot of advanced type system features that can be hard to deciphjer the compile errors of if you aren't familliar with it. but if you are happy with those features it's fantastically descriptive and builds a lot for you straight from the types
2021-03-09 05:25:15 notzmv joins (~zmv@unaffiliated/zmv)
2021-03-09 05:25:21 <redmp> jacks2: servant lets you write a type to define your endpoints
2021-03-09 05:25:41 <curiousgay> and it's not only about Go, it's about many other decisions openbsd makes
2021-03-09 05:25:50 <Axman6> monochrom: back in the cooperative multitasking days - MacOS was so much fun back then. OS 9 was such a nice change
2021-03-09 05:26:10 <redmp> jacks2: and after writing your API type you can extract a server (a wai application to use with warp server) or a client (provided by servant-client
2021-03-09 05:27:31 <monochrom> Coincidence or plagiarism? 1. Classic MacOS used Pascal, Windows used and still uses the Pascal calling convention. 2. Classic MacOS used cooperative multitasking, so did Win16.
2021-03-09 05:29:39 × notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 245 seconds)
2021-03-09 05:30:31 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:fc2c:a791:ab0d:f870) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-09 05:32:32 nbloomf joins (~nbloomf@2600:1700:ad14:3020:fc2c:a791:ab0d:f870)
2021-03-09 05:32:39 <Axman6> curiousgay: pf is the main reason for me to use it, but I also like how east it is to administer, and it's getting eacier with each release. one of the places where NIH is done well =)
2021-03-09 05:32:48 vonfry joins (~user@116.236.75.207)
2021-03-09 05:33:19 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:fc2c:a791:ab0d:f870) (Client Quit)
2021-03-09 05:34:09 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-03-09 05:37:07 <Axman6> one day, I swear, I will learn to type
2021-03-09 05:37:14 × aarvar quits (~foewfoiew@2601:602:a080:fa0:3d29:8370:5f36:8c65) (Ping timeout: 264 seconds)
2021-03-09 05:37:33 raym joins (~ray@45.64.220.113)

All times are in UTC.