Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,055 events total
2021-08-12 18:16:08 kspalaiologos joins (~kspalaiol@user/kspalaiologos)
2021-08-12 18:19:15 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
2021-08-12 18:19:27 <seiryn> What i found is : if you put a string (I.E : something between quote) in quasiquote vim highlight it like a string, but except if it's an expression quasiquote it's not parsed like a string so the highlighting isn't relevant
2021-08-12 18:19:54 <seiryn> And it's ugly when you have random quote in your quasiquote
2021-08-12 18:22:25 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Ping timeout: 248 seconds)
2021-08-12 18:22:46 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 244 seconds)
2021-08-12 18:24:10 <monochrom> Most highlighters are poorly done.
2021-08-12 18:24:54 <monochrom> And I mean criminally negligently done.
2021-08-12 18:25:00 <seiryn> Yeaaaah
2021-08-12 18:25:32 <seiryn> My eyes : https://i.imgur.com/aaPQ6be.png
2021-08-12 18:26:03 <dminuoso> monochrom: Is there research into how this could be done intelligently? I mean if you bindly toss ghc-lib at it, you will get no highlighting on any syntax error.
2021-08-12 18:26:11 <monochrom> 99% of string literals are one-line-only, right? And for the 1% that spans multiple lines, the programmer must put some special escape code at the end of each line, right? This is practically true of all languages ever, right?
2021-08-12 18:26:53 <yushyin> seiryn: maybe nvim-treesitter does a better job?
2021-08-12 18:27:17 <monochrom> So a highlighter that sees an opening quote character and goes into "this is a char/string literal" mode, it stands to reason to at least exit that mode upon newline, right?
2021-08-12 18:27:22 <seiryn> yushyin : i don't know but i hope because i can't code in those condition
2021-08-12 18:27:27 ubert joins (~Thunderbi@77.119.168.246.wireless.dyn.drei.com)
2021-08-12 18:28:41 <monochrom> So I do not mean that a highlighter needs to be intelligent. Regex and FSA are fine, I respect that.
2021-08-12 18:28:59 <monochrom> I mean that their authors are criminally dumb.
2021-08-12 18:29:01 <seiryn> dminuoso : The default syntax highlighting of vim is very dumb, it doesn't even involve a syntax tree
2021-08-12 18:29:41 <dminuoso> seiryn: Did you consider using a custom vim script?
2021-08-12 18:29:45 <dminuoso> Perhaps https://github.com/neovimhaskell/haskell-vim ?
2021-08-12 18:30:17 <monochrom> Like what fantasy world do they live in such that if they see an opening quote character and then if it isn't closed by the end of that same line they just assume that nothing has gone wrong?
2021-08-12 18:30:26 Cajun joins (~Cajun@user/cajun)
2021-08-12 18:30:26 <dminuoso> monochrom: I can think a ton of reasons to be criminaly dumb on purpose in a highlighter
2021-08-12 18:30:29 ec joins (~ec@gateway/tor-sasl/ec)
2021-08-12 18:30:30 <dminuoso> Consider a highlighter in emacs lisp.
2021-08-12 18:30:54 <yushyin> seiryn: https://paste.xinu.at/7Li/
2021-08-12 18:30:58 <dminuoso> Naive approaches quickly generate high amounts of objects, which can cause GC issues
2021-08-12 18:32:04 <monochrom> Well that's the other kind of criminally dumb in terms of even asymptotic costs.
2021-08-12 18:32:21 <seiryn> yushyin : Thanks
2021-08-12 18:32:24 <monochrom> It's why I respect choosing regexes and FSA and KISS
2021-08-12 18:32:43 <monochrom> But within that framework, the problem of runaway string literals is trivial to solve.
2021-08-12 18:32:45 <seiryn> Hmmmmm
2021-08-12 18:32:52 <seiryn> I try something with the syntax file
2021-08-12 18:32:58 <monochrom> or at least s/solve/mitigate/
2021-08-12 18:37:22 × norias quits (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) (Ping timeout: 268 seconds)
2021-08-12 18:37:53 × wonko quits (~wjc@62.115.229.50) (Ping timeout: 248 seconds)
2021-08-12 18:39:13 × sander quits (~sander@user/sander) (Read error: Connection reset by peer)
2021-08-12 18:39:40 sander joins (~sander@user/sander)
2021-08-12 18:40:46 × azeem quits (~azeem@176.200.230.183) (Read error: Connection reset by peer)
2021-08-12 18:41:00 azeem joins (~azeem@dynamic-adsl-84-220-236-17.clienti.tiscali.it)
2021-08-12 18:42:33 JavierNeira[m] joins (~jneiramat@2001:470:69fc:105::d729)
2021-08-12 18:47:32 × ubert quits (~Thunderbi@77.119.168.246.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
2021-08-12 18:50:28 hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com)
2021-08-12 18:53:38 × vysn quits (~vysn@user/vysn) (Remote host closed the connection)
2021-08-12 18:56:13 <seiryn> Yeah so you can easily mitigate the problem but vim-treesitter is better
2021-08-12 18:58:40 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-08-12 18:59:39 × kritzefitz quits (~kritzefit@picard.host.weltraumschlangen.de) (Quit: ZNC 1.7.2+deb3 - https://znc.in)
2021-08-12 18:59:53 kritzefitz joins (~kritzefit@picard.host.weltraumschlangen.de)
2021-08-12 19:00:03 jneira[m] joins (~jneira@242.red-176-87-52.dynamicip.rima-tde.net)
2021-08-12 19:00:39 × slack1256 quits (~slack1256@181.203.118.120) (Remote host closed the connection)
2021-08-12 19:01:21 × yoctocell quits (~user@h87-96-130-155.cust.a3fiber.se) (Ping timeout: 248 seconds)
2021-08-12 19:01:26 <tomsmeding> monochrom: "I mean that their authors are criminally dumb." -- that's kind of criminally rude
2021-08-12 19:02:16 × hendursaga quits (~weechat@user/hendursaga) (Remote host closed the connection)
2021-08-12 19:03:10 <tomsmeding> The wonder of open source is that the non-criminally-dumb people can help the criminally-dumb people out in making better software ;)
2021-08-12 19:03:13 × adanwan_ quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2021-08-12 19:03:27 × kspalaiologos quits (~kspalaiol@user/kspalaiologos) (Quit: Leaving)
2021-08-12 19:05:06 hendursaga joins (~weechat@user/hendursaga)
2021-08-12 19:05:14 <monochrom> What if the dumb people outvote the non-dumb people? This has happened before. Good PRs are rejected by stubborn authors every once in a while.
2021-08-12 19:06:12 × martyall quits (~martyall@066-241-088-129.dynamic.ashlandfiber.net) (Remote host closed the connection)
2021-08-12 19:06:26 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
2021-08-12 19:06:45 <tomsmeding> At which point you can fork :)
2021-08-12 19:07:29 <tomsmeding> I'm not disagreeing with you, just disagreeing with the wording "criminally dumb"
2021-08-12 19:07:34 <tomsmeding> But I'll stop :p
2021-08-12 19:08:17 <monochrom> I don't make that kind of strong accusations lightly.
2021-08-12 19:09:10 <monochrom> Someone who writes a highlighter for the first time, if they haven't thought of the issue I explained, I wouldn't be complaining. It is not an obvious issue for a first-timer.
2021-08-12 19:09:21 × kritzefitz quits (~kritzefit@picard.host.weltraumschlangen.de) (Quit: ZNC 1.7.2+deb3 - https://znc.in)
2021-08-12 19:11:39 <monochrom> But a highlighter that has been in production use for 10 years? During which you have seen the runaway string literal problem show up a million times? During which you have learned that there are languages that use unmatched quote characters to stand for something other than string/char literals and so one should do at least a tiny little bit of mitigation? And I just mean mitigation, damage control, you don't have to fully solve the problem?
2021-08-12 19:12:07 kritzefitz joins (~kritzefit@picard.host.weltraumschlangen.de)
2021-08-12 19:12:28 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-08-12 19:13:35 martyall joins (~martyall@097-090-118-246.res.spectrum.com)
2021-08-12 19:13:41 <monochrom> And in the context of "I use a simple regex because it is right for 90% of the cases, that's good enough", and then here we see that it is wrong for 90% of the cases?
2021-08-12 19:14:10 <monochrom> And the simple fix is simply adding one small thing to your existing regex?
2021-08-12 19:14:24 <monochrom> And after all those 10 years the author still hasn't acted?
2021-08-12 19:14:26 <dolio> monochrom: Maybe they're highlighting Haskell.
2021-08-12 19:14:39 <dolio> "This is valid on a single line\
2021-08-12 19:14:56 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-12 19:15:08 <monochrom> I have already covered that from two sides.
2021-08-12 19:15:13 <dolio> :)
2021-08-12 19:15:17 × auri quits (~admin@static.46.108.40.188.clients.your-server.de) (Changing host)
2021-08-12 19:15:17 auri joins (~admin@fsf/member/auri)
2021-08-12 19:15:28 <tomsmeding> monochrom: what if the author hasn't acted? Well, you ask them to act :p
2021-08-12 19:16:04 <tomsmeding> Not acting is not criminal, and only implies dumbness if there are no external considerations
2021-08-12 19:16:22 <tomsmeding> Chris Done hasn't fixed a lot of bugs in ircbrowse, but is he dumb? I assume not :p
2021-08-12 19:16:41 <dolio> Not acting can be criminal.
2021-08-12 19:17:17 <tomsmeding> You don't have the author on contract for fixing stuff; if you do and they don't, then criminality enters the picture
2021-08-12 19:17:48 <dolio> I think that would be civil.
2021-08-12 19:17:53 × martyall quits (~martyall@097-090-118-246.res.spectrum.com) (Ping timeout: 248 seconds)
2021-08-12 19:17:58 <tomsmeding> But maybe I'm too much of a sheltered homeboy that gets scared at strong language :p
2021-08-12 19:18:08 × wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-08-12 19:18:16 <tomsmeding> dolio: indeed, even then :p
2021-08-12 19:19:19 <dolio> I tried writing vim highlighting that correctly recognized bad Haskell strings and it was pretty difficult.
2021-08-12 19:19:40 × jneira[m] quits (~jneira@242.red-176-87-52.dynamicip.rima-tde.net) (Remote host closed the connection)
2021-08-12 19:20:06 <dolio> Probably not as difficult as correctly recognizing other stuff in vi, though.
2021-08-12 19:20:14 <dolio> Vim, even.
2021-08-12 19:20:19 × mattil quits (~mattilinn@87-92-39-170.bb.dnainternet.fi) (Quit: Leaving)
2021-08-12 19:21:20 geekosaur flashes back totrying to hack around early cperl-mode bugs
2021-08-12 19:23:13 <dolio> The problem is that Vim has a system that seems like it should allow you to do some amount of hierarchical and context sensitive parsing, but in practice the features have really weird interactions that make it very difficult to actually parse anything.
2021-08-12 19:24:55 tomsmeding 's only knowledge about vim highlighting rules comes from at some point trying to ad-hoc understand enough to change a regex somewhere
2021-08-12 19:26:03 <tomsmeding> Also neither sublime text's nor vim's standard LaTeX highlighting works correctly with % within \verb| | blocks or math snippets

All times are in UTC.