544 karma · joined Dec 25, 2015 (10y ago) · 85 submissions
Computer Scientist. Into Haskell and Elisp.
topcolor: ffbb33 (previously c6c6c6)
[ my public key: https://keybase.io/amin; my proof: https://keybase.io/amin/sigs/UYO-kN31F2vPwJvP8DYLwTeGBihIAV6FjcWIU5QLryY ]
comment 8y ago · link · parent
Works quite nicely for flipping through PDF slides.
[0]: https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Ques...
comment 8y ago · link · parent
- https://www.reddit.com/r/orgmode/comments/7hps9j/rip_orgtime...
4.
Practical, verifiable software freedom with GuixSD(media.libreplanet.org ↗)
1 points · by aban · 8y ago · 1 comment
comment 8y ago · link · parent
There’s a fairly active community over on Zulip [1] if you like to drop by for a chat or get some help.
comment 9y ago · link · parent
While so far the focus has mostly been on implementing the expression language as is, hnix being written in Haskell could be attractive for enriching the language with fancier features:
"Because now that it's in Haskell, now that a lot of other hackers could get involved, we could do things like add optional typing to the Nix language." — J. Wiegley
For more on hnix check out Haskell Cast's Episode 13 [1] with John Wiegley.
[0]: https://github.com/jwiegley/hnix
[1]: http://www.haskellcast.com/episode/013-john-wiegley-on-categ...
comment 9y ago · link · parent
[0]: http://con.racket-lang.org/2016/#speakers
[1]: https://www.youtube.com/watch?v=KpDyuMIb_E0&index=25&list=PL...
comment 9y ago · link · parent
comment 9y ago · link · parent
There was actually a thread on /r/haskell a few months ago [0] in response to an HN comment. In that thread, a few libraries were mentioned as examples of having amazing docs.
For instance, Gabriel Gonzalez writes a Tutorial module for his libraries, which introduces the basics of the library and shows you the big picture. The tutorial walks you through different pieces of the library, how to use them, and how they come together.
It's hands down one of the most effective ways of documenting I've ever seen and I'd love to see other communities' take on it.
To point out a specific example, you should check out Turtle's tutorial [1].
[0]: https://www.reddit.com/r/haskell/comments/5khts3/on_haskell_...
[1]: https://hackage.haskell.org/package/turtle-1.3.3/docs/Turtle...
comment 9y ago · link · parent
[0]: https://yow.eventer.com/yow-2014-1222/stop-treading-water-le...
comment 9y ago · link · parent
The color scheme [0] is my fork of tango-plus [1] with a few small changes.
comment 9y ago · link · parent
Here's some Dafny code for your viewing pleasure: https://i.imgur.com/clxUR1y.png
comment 9y ago · link · parent
https://www.youtube.com/watch?v=WsA7GtUQeB8
There are already a good number of people trying to explain Monads in this thread, so I won't attempt it. But I'll say this (in the context of Haskell):
In Haskell, like how Monoid is a typeclass, Monad is just another typeclass. So me mentioning "typeclass" twice in a sentence suggests that you probably have to first understand typeclasses and data types.
Also, I wouldn't recommend tackling Monad right after grasping Monoid. I'd recommend you read about and understand Functor and Applicative functors first, and that will ease you into understanding Monads and actually why you would want to have them.
So, you may want to read these pages from Wikibooks in this order:
https://en.wikibooks.org/wiki/Haskell/Classes_and_types
https://en.wikibooks.org/wiki/Haskell/The_Functor_class
https://en.wikibooks.org/wiki/Haskell/Applicative_functors
https://en.wikibooks.org/wiki/Haskell/Applicative_prologue
The last link is the first section of a chapter on Monads; so use the links on the sidebar to read the subsequent sections of the chapter.
Typeclassopedia is another great resource for the typeclasses I mentioned: https://wiki.haskell.org/Typeclassopedia
comment 9y ago · link · parent
You should check out https://fixubuntu.com nonetheless, which surfaced at that time, is still up and relevant.
comment 9y ago · link · parent
noremap <C-p> 2k
noremap <C-n> 2j
To do the same in VimFx, see [1].Also, Conkeror [2] to Emacs is as qutebrowser is to Vim.
[0]: https://gist.github.com/avendael/7028513
[1]: https://www.reddit.com/r/emacs/comments/561b03/emacs_keybind...
[2]: http://conkeror.org/
comment 9y ago · link · parent
comment 9y ago · link · parent
To be even more specific, network management is really distro- and DE-agnostic. For instance, Arch wiki describes a multitude of ways for wired [0] and wireless [1] network configuration, that would technically work in other distros as well.
Most distros and DEs ship with Gnome's NetworkManager [2] but with different front-ends: distros with GTK-based DEs like Gnome or Unity usually ship network-manager-applet, and distros with Qt-based DEs like KDE usually ship plasma-nm or networkmanager-qt.
Power management [3] is a bit different. There are distro-specific recommendations and also 3rd party apps, but DEs usually have their own power manager.
Now, when you choose to use a DE, the choice of which network or power management solution you use is already made for you, but when you don't use a DE then you will be choosing them yourself.
[0]: https://wiki.archlinux.org/index.php/Network_configuration [1]: https://wiki.archlinux.org/index.php/Wireless_network_config...
[2]: https://wiki.archlinux.org/index.php/NetworkManager [3]: https://wiki.archlinux.org/index.php/Power_management
comment 9y ago · link · parent
If you want to give it a shot, there's a guide on using Awesome with Gnome [0], and the last time I tried it worked just fine. Though, awesome replaces both mutter (Gnome's WM) and the Gnome Shell itself, so you won't have Gnome's panel etc anymore.
I wanted a nicer integration between a DE and a WM, and the two nicest options by far have been Xfce and LXQt for me.
LXQt makes it trivial to use your own WM (they use Openbox by default) since they have an option for it in their Preferences [1].
With Xfce however it's a bit more involved [2], since Xfce is more tightly coupled with Xfwm and using a custom WM is not as easy as LXQt makes it.
That said, I'm using Xfce + bspwm for now (as opposed to LXQt + bspwm) mainly because Xfce's display and power manager are more matured than LXQt's.
[0]: https://web.archive.org/web/20160726160922/https://awesomewm...
[1]: https://wiki.archlinux.org/index.php/LXQt#Replace_Openbox
[2]: https://wiki.archlinux.org/index.php/Xfce#Default_window_man...
comment 9y ago · link · parent
The website's working just fine for me, but in case it doesn't work for someone else or if it goes down again: https://web.archive.org/web/20161223021815/http://www.broken...
comment 9y ago · link · parent
Yesod uses xss-sanitize [0], and their sanitize function does indeed prevent "javascript:" attempts. They even have a test case for it [1].
Playing around with it in the REPL:
Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "<IMG SRC=javascript:alert('XSS')>"
"<img>"
Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "<IMG SRC=\"javascript:alert('XSS')\">"
"<img>"
Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "<IMG SRC=fine>"
"<img src=\"fine\">"
Prelude Text.HTML.SanitizeXSS Data.Text> sanitize $ pack "<IMG SRC=\"this is ok too\">"
"<img src=\"this is ok too\">"
[0]: https://hackage.haskell.org/package/xss-sanitize[1]: https://github.com/yesodweb/haskell-xss-sanitize/blob/9a9101...