Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,223 events total
2021-08-21 18:08:17 <tomsmeding> maerwald: https://en.wikipedia.org/wiki/Unicode#Code_planes_and_blocks (I'm not recalling this from memory or something :p)
2021-08-21 18:09:05 <maerwald> yeah, it def performs worse than the hand-written 'toLower' of Word8
2021-08-21 18:09:26 <tomsmeding> heh you can compress that table in WCsubst.c quite a bit if you allow for a slightly more complicated lookup function
2021-08-21 18:09:37 <maerwald> 41.10 μs vs 7.613 μs
2021-08-21 18:10:11 <tomsmeding> lots of alternating rule22 and rule23, which is just the same but then uppercase/lowercase
2021-08-21 18:10:28 × mestre quits (~mestre@191.177.175.57) (Quit: leaving)
2021-08-21 18:10:37 <maerwald> well, good enough
2021-08-21 18:10:41 × keutoi quits (~keutoi@223.238.95.231) (Quit: leaving)
2021-08-21 18:10:43 mestre joins (~mestre@191.177.175.57)
2021-08-21 18:10:56 <tomsmeding> and that binary search is also inefficient in general, because of the use of the bsearch C library function, which is fine but not inlined (because C) so the comparison function is an indirect function call
2021-08-21 18:12:01 <tomsmeding> in other words, if you want a really efficient implementation of isLower for Word16, you can do a bit better than ghc's current impl :)
2021-08-21 18:12:24 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
2021-08-21 18:13:11 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 268 seconds)
2021-08-21 18:13:48 geekosaur joins (~geekosaur@xmonad/geekosaur)
2021-08-21 18:14:34 <tomsmeding> wait, that isLower calls u_iswlower which is an _unsafe_ FFI call
2021-08-21 18:14:36 × azeem quits (~azeem@dynamic-adsl-94-34-33-6.clienti.tiscali.it) (Ping timeout: 250 seconds)
2021-08-21 18:15:50 markpythonicbtc joins (~textual@2601:647:5a00:35:697a:eb38:2e9e:dc30)
2021-08-21 18:16:48 azeem joins (~azeem@176.200.245.90)
2021-08-21 18:17:16 <maerwald> hmm... if you want to deal with UTF-16LE ShortByteString on a BE platform, then `pack :: [Word16] -> ShortByteString` will give you a surprise
2021-08-21 18:17:45 <tomsmeding> endianness yay
2021-08-21 18:18:01 <maerwald> Word16 appears to be BE interpreted by the primitives like writeWord16Array#
2021-08-21 18:18:11 <maerwald> and so it performs alignment based on platform
2021-08-21 18:18:50 × markpythonicbtc quits (~textual@2601:647:5a00:35:697a:eb38:2e9e:dc30) (Client Quit)
2021-08-21 18:18:51 zaquest joins (~notzaques@5.128.210.178)
2021-08-21 18:19:07 <tomsmeding> probably the most efficient implementation
2021-08-21 18:20:14 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 250 seconds)
2021-08-21 18:20:14 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
2021-08-21 18:21:09 geekosaur joins (~geekosaur@xmonad/geekosaur)
2021-08-21 18:25:15 <kuribas> I am trying vscode again after a few months "the haskell server crashed 5 times in the last 3 minutes".
2021-08-21 18:25:26 <kuribas> Is this really what I should recommend to my team?
2021-08-21 18:25:40 × aman quits (~aman@user/aman) (Ping timeout: 240 seconds)
2021-08-21 18:26:07 <janus> kuribas: who said you should recommend it to anyone?
2021-08-21 18:26:13 markpythonicbtc joins (~textual@2601:647:5a00:35:697a:eb38:2e9e:dc30)
2021-08-21 18:26:24 <kuribas> janus: many people recommend the LSP.
2021-08-21 18:26:36 <monochrom> I think you can try for yourself again.
2021-08-21 18:27:04 <kuribas> It's nice when it works. But it never works (for me).
2021-08-21 18:27:44 aman joins (~aman@user/aman)
2021-08-21 18:27:51 <janus> doesn't work for me either when you have hundreds of modules. i thought it was just because of that
2021-08-21 18:28:13 <janus> what kinda problem are you having? memory usage? if so, it's probably just because it was developed and tested on small projects
2021-08-21 18:28:27 × azeem quits (~azeem@176.200.245.90) (Read error: Connection reset by peer)
2021-08-21 18:28:30 × meinside_ quits (uid24933@id-24933.brockwell.irccloud.com) (Quit: Connection closed for inactivity)
2021-08-21 18:29:07 <janus> high latency, high memory usage, leaking memory, those are the problems i had with v1.1
2021-08-21 18:29:43 azeem joins (~azeem@dynamic-adsl-94-34-33-6.clienti.tiscali.it)
2021-08-21 18:29:53 <kuribas> janus: idk
2021-08-21 18:30:21 <kuribas> I just cannot say to the team, haskell is great, but you have to debug the tooling...
2021-08-21 18:30:36 <janus> how can you not know what kinda problem you're having? how do you even know you're having a problem if you don't know how to describe it?
2021-08-21 18:30:58 <kuribas> janus: the problem I have is "the haskell server crashed 5 times in the last 3 minutes"
2021-08-21 18:30:59 × t0zy quits (~t0zy@49.207.193.1) (Remote host closed the connection)
2021-08-21 18:31:00 <monochrom> I think "crashed" was already said.
2021-08-21 18:31:12 <janus> right, it probably crashed because of the OOM killer
2021-08-21 18:31:16 t0zy joins (~t0zy@49.207.193.1)
2021-08-21 18:31:57 <janus> but it's just my guess of course, based on the problems i had
2021-08-21 18:32:02 <kuribas> Perhaps, I have a module which is using TH to compile a large amount of code.
2021-08-21 18:32:10 <kuribas> but it works fine in emacs.
2021-08-21 18:32:12 <kuribas> (without LSP)
2021-08-21 18:33:16 <kuribas> anything else that might work? maybe intellij?
2021-08-21 18:34:16 <monochrom> My students seem to be fine with vscode, but it's probably because of 2 factors. 1. My course doesn't have TH, or lots of code. 2. I think most of them are still not using HLS or LSP.
2021-08-21 18:34:44 <monochrom> Does intellij even know of Haskell?
2021-08-21 18:34:59 <kuribas> monochrom: well, isn't it then nothing more than a glorified text editor with syntax highlighing?
2021-08-21 18:35:05 <janus> you can get far just with Telescope (a Ctrl-P like for Neovim). it allows you to quickly jump to another module. and you can use ripgrep from neovim also, allowing you to quickly search for the word under the cursor
2021-08-21 18:35:11 <kuribas> monochrom: or do they use another plugin?
2021-08-21 18:35:25 <janus> you can also use CoCSearch to do a global replace with context, that is pretty cool
2021-08-21 18:35:30 <monochrom> I think my students don't insist on anything more.
2021-08-21 18:35:30 <kuribas> monochrom: yes, there are intellij plugins for haskell.
2021-08-21 18:36:01 <janus> kuribas: check out this screenshot : https://github.com/neoclide/coc.nvim/issues/1080
2021-08-21 18:36:22 <janus> you see the context of the searched term across all files, and then you can replace it accordingly
2021-08-21 18:36:50 <janus> if you do a global replace in the CoC buffer/window (dunno terminology) , it automatically applies it in each file
2021-08-21 18:37:05 <janus> kinda like a perl pie++ http://technosophos.com/2009/05/21/perl-pie-if-you-only-learn-how-do-one-thing-perl-it.html
2021-08-21 18:37:17 <kuribas> janus: what I want at least is to visualise type errors.
2021-08-21 18:37:47 <janus> ah, ok, i don't have that, never seemed like a big problem to jump to the line number from the error message
2021-08-21 18:38:27 × Guest2172 quits (~Guest21@2a02:8109:a080:6368:d5d2:328b:373c:5b57) (Quit: Client closed)
2021-08-21 18:38:36 <janus> the line number is in the error message, then it is two chars to open Telescope, couple of chars to type parts of the file name (fuzzy search), couple of chars to jump to the line
2021-08-21 18:39:19 <monochrom> Why is that not called Microscope? :)
2021-08-21 18:39:23 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: Lost terminal)
2021-08-21 18:40:04 <janus> what i do is i have a terminal running in neovim on the right, which contains the compilation loop or ghcid. so you won't need to switch windows
2021-08-21 18:40:22 <tomsmeding> kuribas: that "using TH to compile a large amount of code" sounds heavily suspect; HLS had lots of trouble with TH in the past, and it's for sure not completely resolved yet
2021-08-21 18:41:16 <tomsmeding> but in a project I work on, which has ~130 modules, it works fine and it doesn't crash on me -- though I don't actually work on the modules that define or use TH, it's just elsewhere in the project
2021-08-21 18:41:54 <tomsmeding> also: having C code in the project makes things finicky; it can work fine, but you have to first compile the project fully first, and only then start up HLS
2021-08-21 18:42:07 × mastarija quits (~mastarija@78-3-210-70.adsl.net.t-com.hr) (Ping timeout: 252 seconds)
2021-08-21 18:43:04 <kuribas> tomsmeding: what do you use?
2021-08-21 18:43:25 <tomsmeding> HLS in neovim, since a few days with the new neovim 0.5 built-in LSP support, but before that using ALE
2021-08-21 18:43:36 <kuribas> ALE?
2021-08-21 18:43:57 <tomsmeding> vim plugin that, among other things, has a bare-bones (but solid) LSP implementation
2021-08-21 18:44:50 gentauro_ joins (~gentauro@95.166.247.26)
2021-08-21 18:46:24 <maerwald> tomsmeding: TH, big modules, hsc files, ...
2021-08-21 18:47:35 <Drew[m]> ghcup-hs's source currently crashes my HLS server when I try to open up the contents of the /app folder. There is TH and CPP in those modules and I've chalked it up to those
2021-08-21 18:48:54 <Drew[m]> maerwald: does that happen for you too?
2021-08-21 18:49:09 <maerwald> yeah
2021-08-21 18:49:16 <hololeap> isn't there another library that does the same thing as this? https://github.com/hdgarrood/qq-literals
2021-08-21 18:49:18 <maerwald> especially the Main module
2021-08-21 18:49:23 <maerwald> it's big and has quasiquotes
2021-08-21 18:50:02 <hololeap> I want to parse literals and throw compile errors if they are incorrect
2021-08-21 18:50:54 <hololeap> someone recommended a library for this once, but I can't remember the name of it
2021-08-21 18:51:51 <monochrom> Would it be https://hackage.haskell.org/package/string-qq ? https://hackage.haskell.org/package/string-quote ?
2021-08-21 18:52:09 mastarija joins (~mastarija@78-3-210-70.adsl.net.t-com.hr)
2021-08-21 18:52:43 <monochrom> I don't know the difference, or why the author made both.
2021-08-21 18:53:42 <janus> from looking at the docs, it seems the difference is "that the leading newline is trimmed and carriage returns stripped."
2021-08-21 18:53:45 <hololeap> no, it wasn't either of those. it had a much more fleshed-out interface and it gave an example in the readme for checking for odd numbers
2021-08-21 18:53:51 <hololeap> (or something like that)
2021-08-21 18:55:28 × jamestmartin quits (james@jtmar.me) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)

All times are in UTC.