Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-03 16:01:16 <merijn> __minoru__shirae: I'm not sure which "unneeded" parts you imagine exist
2021-03-03 16:01:25 <dolio> The end result is that it's a lot of work, GHC releases routinely make it (temporarily) obselete, and it never quite matches what GHC accepts anyway.
2021-03-03 16:01:26 <larryba> Philonous, I don't get it? accumulator is a function?
2021-03-03 16:01:30 <merijn> You can't even leave out code generation
2021-03-03 16:01:31 <Philonous> larryba, Yes
2021-03-03 16:01:34 <merijn> Because that breaks TH
2021-03-03 16:01:38 <Philonous> larryba, That's the trick
2021-03-03 16:02:04 <merijn> __minoru__shirae: Also, what do you think all the C/C++ LSP tools do?
2021-03-03 16:02:10 <merijn> __minoru__shirae: They just embed all of LLVM
2021-03-03 16:02:19 <merijn> Because anything else is insanity
2021-03-03 16:02:29 <Philonous> larryba, Do you want to see the complete solution or would you rather figure it out on your own?
2021-03-03 16:02:43 × bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 256 seconds)
2021-03-03 16:02:43 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer)
2021-03-03 16:02:54 emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com)
2021-03-03 16:02:57 <__minoru__shirae> merjin: so if you want convenience of any language server, you generally have to pay with your ram?
2021-03-03 16:02:57 <merijn> Just look at clangd
2021-03-03 16:03:05 <merijn> __minoru__shirae: Well, yes
2021-03-03 16:03:29 <merijn> __minoru__shirae: You need a compiler, and generally you want the one that you *actually* use. Not a crappy, half done reimplementation
2021-03-03 16:03:34 <larryba> Philonous, I will try it on my own first
2021-03-03 16:03:44 <swarmcollective> RAM is a lot cheaper than your time, in most cases.
2021-03-03 16:04:05 <__minoru__shirae> merjin: unless language designers create a lightweight language server themselves
2021-03-03 16:04:09 <merijn> If you design your compiler to be cheap ahead of time it can be fairly efficient
2021-03-03 16:04:34 <merijn> __minoru__shirae: Sure, but that takes a lot of effort
2021-03-03 16:04:46 <merijn> So then the question becomes: Does anyone who is *paying* care?
2021-03-03 16:04:47 <aggin> merijn: but why does hls take so much more ram than other LSP's
2021-03-03 16:04:51 <merijn> The answer is: no
2021-03-03 16:04:59 <aggin> gopls takes only 100 mb ram on my system
2021-03-03 16:05:06 <aggin> when opening a single file
2021-03-03 16:05:18 <merijn> aggin: Go's compiler was from the start engineered to be resource low
2021-03-03 16:05:38 <merijn> aggin: I wouldn't be surprised of clangd took 1GB for 1 C++ file either
2021-03-03 16:05:40 <yushyin> c++ LSP server are also very RAM hungry
2021-03-03 16:05:48 <kuribas> go is also a cripled language
2021-03-03 16:05:50 <merijn> Making decades old compilers resource efficient is *hard*
2021-03-03 16:06:11 <merijn> It's not that it *can't* be done, it just that it's not worth the time of anyone involved
2021-03-03 16:06:13 <kuribas> ghc does A LOT more than go, removing abstractions, etc...
2021-03-03 16:06:41 <merijn> GHC is fairly resource heavy, so people who use it to compile already need RAM for that anyway
2021-03-03 16:06:44 × jrqc quits (~rofl@96.78.87.197) (Ping timeout: 245 seconds)
2021-03-03 16:06:46 <kuribas> it's also a thankless job that nobody wants to do, unless it's needed.
2021-03-03 16:06:58 × chisui quits (59f77c97@i59F77C97.versanet.de) (Quit: Connection closed)
2021-03-03 16:07:11 chisui joins (59f77c97@i59F77C97.versanet.de)
2021-03-03 16:07:20 ClaudiusMaximus joins (~claude@191.123.199.146.dyn.plus.net)
2021-03-03 16:07:23 <swarmcollective> Logically, it seems an Assembly Language LSP would be quite efficient. :D
2021-03-03 16:07:33 × ClaudiusMaximus quits (~claude@191.123.199.146.dyn.plus.net) (Changing host)
2021-03-03 16:07:33 ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus)
2021-03-03 16:07:44 <swarmcollective> Is it worth spending more time writing the code to save on RAM usage?
2021-03-03 16:07:45 stree joins (~stree@68.36.8.116)
2021-03-03 16:07:52 <merijn> Most people have laptops (or even phones) with multiple GBs of RAM, so there's just not much incentive to make GHC small as long as the code it produces is
2021-03-03 16:07:56 conal joins (~conal@64.71.133.70)
2021-03-03 16:07:58 <aggin> yushyin: clangd doesn't take much resources for me
2021-03-03 16:07:59 newbie76 joins (4cbf11e9@node-17-233.flex.volo.net)
2021-03-03 16:08:09 <merijn> aggin: On C or on C++?
2021-03-03 16:08:14 <aggin> both
2021-03-03 16:08:16 robwebbjr joins (ac3a109d@172.58.16.157)
2021-03-03 16:09:48 jrqc joins (~rofl@96.78.87.197)
2021-03-03 16:09:56 × ericsagnes quits (~ericsagne@2405:6580:0:5100:3952:4f6a:8da:bef6) (Ping timeout: 240 seconds)
2021-03-03 16:10:47 alecs joins (~alecs@151.62.127.229)
2021-03-03 16:10:47 <merijn> Quick test show clangd using about 1GB on a file for me here
2021-03-03 16:11:06 <aggin> Is it part of some big project or something ?
2021-03-03 16:11:09 <yushyin> I've projects where ccls takes up to 2GB RSS
2021-03-03 16:11:18 <merijn> aggin: Not that big, but lots of template stuff
2021-03-03 16:11:57 <merijn> aggin: Anyway, GHC isn't optimised for tiny systems and people are trying to optimise it, but that's mostly focussed on compile speed, not RAM usage
2021-03-03 16:12:33 <merijn> I'm sure any efforts to make it thriftier/smaller would be welcome, but it's just not that big a problem in practice, unless you try to, like, compile on a netbook
2021-03-03 16:12:42 <merijn> To which the simple solution would be: don't :p
2021-03-03 16:13:28 <aggin> well I guess I should stick with using ghci for autocompletion
2021-03-03 16:13:38 <aggin> all I wanted was some autocompletion
2021-03-03 16:13:45 × curiousgay quits (~gay@178.217.208.8) (Ping timeout: 264 seconds)
2021-03-03 16:14:10 vicfred joins (~vicfred@unaffiliated/vicfred)
2021-03-03 16:15:55 <robwebbjr> Hi. I'm working Haskell From First Principles and this (https://paste.tomsmeding.com/46ZIqwk9) example has me confused.
2021-03-03 16:16:06 × emmanuel_erc quits (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com) (Read error: Connection reset by peer)
2021-03-03 16:16:13 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2021-03-03 16:16:20 <newbie76> I have a really basic question. I just set up my first haskell project directory. I have a working package.yaml file that hpack uses to generate the stack.yaml file. I have Docker for Mac installed. I'm trying to figure out how to a) create a local Docker image of my project and b) write a Dockerfile such that a CI service can create a docker image
2021-03-03 16:16:21 <newbie76> from it when I push to git. Getting lots of errors and finding very little guidance in online resources. My first attempt at a Dockerfile is this : "FROM haskell:8
2021-03-03 16:16:21 <newbie76> ADD .
2021-03-03 16:16:22 <newbie76> RUN stack build
2021-03-03 16:16:22 <newbie76> CMD stack exec"
2021-03-03 16:16:23 <newbie76> And in my user-level stack config file I've enabled docker, but can't figure out where the resolver specification should go or if I should just try to use an image? This doesn't work:
2021-03-03 16:16:23 <newbie76> "docker:
2021-03-03 16:16:24 <newbie76>     enable: true
2021-03-03 16:16:24 <newbie76>     repo: "fpco/stack-build"
2021-03-03 16:16:25 <newbie76>     resolver: lts-9.5"
2021-03-03 16:16:25 <newbie76> Any help is very much appreciated - thanks for reading.
2021-03-03 16:16:30 emmanuel_erc joins (~user@2603-7000-9600-01c9-0000-0000-0000-0874.res6.spectrum.com)
2021-03-03 16:16:50 <swarmcollective> @where paste
2021-03-03 16:16:51 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2021-03-03 16:17:13 <merijn> robwebbjr: Any clue *what* part has you confused? ;)
2021-03-03 16:18:02 heatsink joins (~heatsink@2600:1700:bef1:5e10:dd5f:6f4f:a50:215d)
2021-03-03 16:18:06 × aggin quits (~ecm@103.88.87.46) (Quit: WeeChat 3.0.1)
2021-03-03 16:18:22 <robwebbjr> 1) What happens to b and 2) why does myAny even [1..] stop recurring when it reaches 2?
2021-03-03 16:18:28 <Taneb> robwebbjr: should that say "Bool" rather than "Book"?
2021-03-03 16:18:41 <merijn> Taneb: presumably ;)
2021-03-03 16:19:08 <merijn> > foldr f z [1..5]
2021-03-03 16:19:10 <lambdabot> f 1 (f 2 (f 3 (f 4 (f 5 z))))
2021-03-03 16:19:38 <robwebbjr> merijn: sorry, on phone and inexperienced with irc
2021-03-03 16:20:13 <merijn> robwebbjr: Now, let's imagine we're using "even :: Int -> Bool". If we fill in your lambda in that example we'd get:
2021-03-03 16:20:22 <robwebbjr> Yes, Bool
2021-03-03 16:20:54 <dolio> larryba: Don't spend too much time. Even the right perspective to approach the problem to work out the answer may not be terribly obvious.
2021-03-03 16:21:02 <merijn> robwebbjr: (||) (even 1) ((||) (even 2) ...)
2021-03-03 16:21:12 <newbie76> could anyone here help me with an hpack / stack / docker setup issue?
2021-03-03 16:21:25 <robwebbjr> False for 1 then True for 2
2021-03-03 16:21:42 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)

All times are in UTC.