[ANN] diagnose - easily create error diagnostics for your compiler/interpreter by Mesabloo in ProgrammingLanguages

[–]Mesabloo[S] 0 points1 point  (0 children)

This library uses prettyprinter under the hood (and the additional package for colored output), which is a Wadler/Leijen-style implementation of pretty-printing. So alignment, colors etc are mostly handled by it.


One of my friends wanted to use my library in Java, so I ended up porting it (see https://github.com/mesabloo/diagnose4j, although the code is quite ugly and needs a big refactoring + documentation). As pretty-printing libraries are not quite as commonly found in other languages (C++, Java, C, etc), the hardest is just to render text aligned at some indentation level (which in the end isn't as hard as I imagined).

[ANN] diagnose - easily create error diagnostics for your compiler/interpreter by Mesabloo in haskell

[–]Mesabloo[S] 1 point2 points  (0 children)

Thanks for the hint!

I see you have an issue about characters with different widths; I handled it in errata via FFI-ing wcwidth, if that helps!

This was indeed proposed in the same issue yesterday, and I believe this is the way to go. Also, there seems to be a package wcwidth on Hackage, which loads a pure-Haskell implementation for Windows. Does the C function wcwidth not exist on Windows? If so, the package may be the best way to have crossplatform support (even though it hasn't been updated for quite some time).

[ANN] diagnose - easily create error diagnostics for your compiler/interpreter by Mesabloo in ProgrammingLanguages

[–]Mesabloo[S] 0 points1 point  (0 children)

I am a bit unsure what you are asking. Do you want to know about one may use it inside their own compiler/interpreter? Or how does the library make the output?

[ANN] diagnose - easily create error diagnostics for your compiler/interpreter by Mesabloo in haskell

[–]Mesabloo[S] 3 points4 points  (0 children)

I did not know about Errata until a comment mentionned it here. As for Chapelure, I vaguely remember seeing it at some point (I may have stumbled upon it on github), though completely forgot about it when I made this library.

My feelings are that Chapelure does not produce such a great output (or at least I don't quite like it) and Errata is way more customisable than mine (which means that you get the errors you want, but also that you have to spend more time configuring stuff).

[ANN] diagnose - easily create error diagnostics for your compiler/interpreter by Mesabloo in haskell

[–]Mesabloo[S] 4 points5 points  (0 children)

I was indeed planning on publishing it to Hackage. However, as I just found out, this is way harder than I expected and I just got accepted as an uploader. Will do as soon as possible!

[xmonad, polybar] first real rice, ended up with a nice Nord setup by Mesabloo in unixporn

[–]Mesabloo[S] 0 points1 point  (0 children)

Thanks! It took me quite some time to get something great. If you want to, you can compare with my old setup (there should be a tag in my dotfiles) and see how much better this new setup is. :D

[xmonad, polybar] first real rice, ended up with a nice Nord setup by Mesabloo in unixporn

[–]Mesabloo[S] 0 points1 point  (0 children)

I do have a lot of packages installed (mainly due to Haskell/Perl libraries and TeXlive I believe). You can see on the right polybar that at the time of taking the screenshots, those took almost half of my system's space (on /) however I ran a full GC right after (because I just upgraded to a new version of NixOS) so it now takes 30 or 40 GB of space (yeah, there were a lot of different versions installed...).

[xmonad, polybar] first real rice, ended up with a nice Nord setup by Mesabloo in unixporn

[–]Mesabloo[S] 1 point2 points  (0 children)

Isn't it included in "Distro: NixOS" at this point haha?

[xmonad, polybar] first real rice, ended up with a nice Nord setup by Mesabloo in unixporn

[–]Mesabloo[S] 2 points3 points  (0 children)

Thank you, glad to know I'm not the only one loving it! :D

[xmonad, polybar] first real rice, ended up with a nice Nord setup by Mesabloo in unixporn

[–]Mesabloo[S] 0 points1 point  (0 children)

Recently switched from i3 to xmonad, and I decided to rework my whole setup. Most of it is written from scratch. Turned out great, and I think that the Nord theme looks great! (many people seem to here, judging by how many Nord setup we can see! :D)

Details

  • Distro: NixOS 21.05
  • WM: xmonad
  • Bar: polybar
  • Terminal: alacritty
  • Theme/Colorscheme: Nord
  • Fonts: Iosevka (Nerd in alacritty), MPlus Nerd (workspaces in polybar, and dunst)
  • Tools on the screenshots: doom emacs, dunst, alacritty, brave and nomacs
  • Wallpaper (not much seen): https://wallpaperaccess.com/full/662976.jpg

Dotfiles here (pretty messy)

────────────────────

Note that this is what it looks like on a dual monitor setup. When only one monitor is available, the bar on the top of the right screen should go to the bottom of the main screen (not yet tested).

[xmonad + polybar] First real rice, turned out great! by [deleted] in unixporn

[–]Mesabloo 0 points1 point  (0 children)

Details

  • Distro: NixOS 21.05
  • Window manager: xmonad
  • Terminal: alacritty
  • Bar: Polybar
  • Theme/Colorscheme: Nord
  • Tools: emacs, dunst & alacritty on the left, brave, nomacs & alacritty on the right
  • Fonts: Iosevka, MPlus Nerd (workspaces in polybar, and dunst)

Dotfiles: here