Better HN
topnewbestaskshowjobs
Log inSign up

aban

544 karma · joined Dec 25, 2015 (10y ago) · 85 submissions

Amin Bandali -- https://aminb.org

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 ]

Submissions

comment 8y ago · link · parent

Not to disagree; but if you use Firefox, PDF.js has some convenient shortcuts [0]: n/j to go to next page, and p/k to go to previous page.

Works quite nicely for flipping through PDF slides.

[0]: https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Ques...

comment 8y ago · link · parent

I've never used Org Timeline, but these two links may be of interest to you:

- https://www.reddit.com/r/orgmode/comments/7hps9j/rip_orgtime...

- https://github.com/Fuco1/org-timeline

comment 8y ago · link · parent

Slides: https://www.gnu.org/software/guix/guix-libreplanet-practical...

4.

Practical, verifiable software freedom with GuixSD(media.libreplanet.org ↗)

1 points · by aban · 8y ago · 1 comment

comment 8y ago · link · parent

An Introduction to Lean [0] is another nice (albeit incomplete) tutorial.

There’s a fairly active community over on Zulip [1] if you like to drop by for a chat or get some help.

[0]: https://leanprover.github.io/introduction_to_lean/

[1]: https://leanprover.zulipchat.com

comment 8y ago · link · parent

Security clearance not as in the kind that you need to work government jobs. Security clearance as in "basic" background checks.

comment 8y ago · link · parent

Thank you so much for sharing this. This, and When Worlds Collide, are some of the most touching pieces I've ever read.

Rest in peace John.

comment 9y ago · link · parent

They have a couple of screenshots on their website [0].

[0]: http://www.nplproject.com

comment 9y ago · link · parent

See https://github.com/go-gitea/gitea/issues/1029.

comment 9y ago · link · parent

Great talk.

For more on concurrency and parallelism in Haskell, check out Parallel and Concurrent Programming in Haskell [0], deemed as the best book on the subject, also written by Simon Marlow.

[0]: http://chimera.labs.oreilly.com/books/1230000000929

comment 9y ago · link · parent

Neat. Somewhat related is hnix [0], a community effort in re-implementing the Nix expression language in Haskell.

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

For more on Rosette I recommend watching Emina's keynotes at the (sixth RacketCon) [0] and Clojure/west 2017 [1].

[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

Discussion on /r/haskell: https://www.reddit.com/r/haskell/comments/6a5e0v/dynamic_dis...

comment 9y ago · link · parent

Agreed. I feel like the state of documentation of Haskell libraries in general could be much better.

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

You're welcome :)

comment 9y ago · link · parent

Whenever the Feynman Algorithm comes up, I'm tempted to share "Stop Treading Water: Learning to Learn" [0] by Edward Kmett. It's a great talk and I highly recommend it if you haven't watched it (or frankly, if you already have :).

[0]: https://yow.eventer.com/yow-2014-1222/stop-treading-water-le...

comment 9y ago · link · parent

Of course not!

The color scheme [0] is my fork of tango-plus [1] with a few small changes.

[0]: https://github.com/aminb/tango-plus-theme

[1]: https://github.com/tmalsburg/tango-plus-theme

comment 9y ago · link · parent

Iosevka is indeed a very pretty typeface. I've been using it for a while now and been really enjoying it.

Here's some Dafny code for your viewing pleasure: https://i.imgur.com/clxUR1y.png

comment 9y ago · link · parent

That's a good explanation of Monoids. You can also watch (at least the first half) of this video for more on Monoids:

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

It was indeed 12.04 and only affecting Unity (Canonical's Desktop Environment), not other DE's like GNOME or KDE.

You should check out https://fixubuntu.com nonetheless, which surfaced at that time, is still up and relevant.

comment 9y ago · link · parent

With Vimperator you can remap the keys as you wish [0]; e.g.

  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

Previous discussion (from 6 days ago): https://news.ycombinator.com/item?id=13230508

comment 9y ago · link · parent

Done. No problems!

comment 9y ago · link · parent

You can come hang out in #lobsters on freenode and ask for one. I can invite you both if you like.

comment 9y ago · link · parent

https://freepo.st/

comment 9y ago · link · parent

What the parent said.

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

Yup, been there too, but I simply can't go back to a non-tiling WM after being spoiled with tiling ones.

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

Here it is: http://www.brokenthorn.com/Resources/OSDevIndex.html

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

This is not true, at least not anymore.

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...

123