HNHacker News
TopNewBestAskShowJobs

aban

544 karma · joined December 25, 2015

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 ]

submissionscomments
aban··on Categorifying cardinal arithmetic [pdf]
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...

aban··on Ask HN: How do you organize/track your personal goals?
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

aban··on Practical, verifiable software freedom with GuixSD
Slides: https://www.gnu.org/software/guix/guix-libreplanet-practical...
aban··on Theorem Proving in Lean
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

aban··on Canada facing ‘brain drain’ as tech talent leaves for Silicon Valley
Security clearance not as in the kind that you need to work government jobs. Security clearance as in "basic" background checks.
aban··on John Perry Barlow has died
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.

aban··on NPL: A programming language for neural networks, 3d simulation and visualization
They have a couple of screenshots on their website [0].

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

aban··on Introducing Exclusive Features to GitLab.com Bronze, Silver and Gold Plans
See https://github.com/go-gitea/gitea/issues/1029.
aban··on Typing Nix
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...

aban··on Dynamic Dispatch in Haskell
Discussion on /r/haskell: https://www.reddit.com/r/haskell/comments/6a5e0v/dynamic_dis...
aban··on The Rust Libs Blitz
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...

aban··on Feynman Algorithm (2014)
You're welcome :)
aban··on Feynman Algorithm (2014)
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...

aban··on Iosevka – A Typeface for Code, from Code
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

aban··on Haskell Concepts in One Sentence
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

aban··on Windows 10 is bringing ads to File Explorer – how to turn them off
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.

aban··on Vimperator: a Vim-like Firefox
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/

aban··on Why I only work remotely
Previous discussion (from 6 days ago): https://news.ycombinator.com/item?id=13230508
aban··on Ask HN: What are other minimal, all-content, no-frills discussion sites like HN?
Done. No problems!
aban··on Ask HN: What are other minimal, all-content, no-frills discussion sites like HN?
You can come hang out in #lobsters on freenode and ask for one. I can invite you both if you like.
aban··on Ask HN: What are other minimal, all-content, no-frills discussion sites like HN?
https://freepo.st/
aban··on Awesome window manager framework version 4.0 changes
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

aban··on Awesome window manager framework version 4.0 changes
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...

aban··on The little book about OS development
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...

aban··on Show HN: Rocket – Web Framework for Rust
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...

aban··on Ask HN: What coding/programming podcasts are you listening to?
The Scalawags [0] seems like a pretty good Scala podcast, though I haven't followed them personally as I don't do much Scala.

If you're into functional programming, Functional Geekery [1] is awesome. Also check out FPCasts [2] if you want some more great FP podcasts.

[0]: http://scalawags.tv/

[1]: https://www.functionalgeekery.com/

[2]: https://www.fpcasts.com/

aban··on Show HN: Rocket – Web Framework for Rust
I wrote a long reply, but ended up erasing it and I'll just say that many of these vulnerabilities are due to the programmer using one type (i.e. string) to represent all kinds of data that might be malicious and unsanitized, and then losing track of whether a piece of data is safe for use (e.g. to be sent to DB) or not.

I recommend checking out the Yesod web framework [0], which leverages Haskell's strong type system to provide type-safety and a whole range of nice guarantees, including preventing vulnerabilities like the ones you mentioned.

Spock [1] is another cool web framework also written in Haskell that looks quite promising.

[0]: http://www.yesodweb.com/page/about

[1]: https://www.spock.li

aban··on Racket Language – New website design
The re-design was done by Matthew Butterick [0].

IMHO it looks nice and modern, and quite readable thanks to the great typography, but there are some fair issues raised here. So I opened an issue to let them know about it [1].

[0]: https://github.com/racket/racket-lang-org/pull/28

[1]: https://github.com/racket/racket-lang-org/issues/31

aban··on Free Hardware and Free Hardware Designs (2015)
You can find more information here (no specific figures though): https://fsf.org/appeal
aban··on Zero Cost Abstractions
Not the author (Ruud), but I've been in touch with him.

The source code for his website is free software [0], so feel free to have a look or adopt it for yourself.

Ruud uses a small static site generator he's written in Haskell, and in his own words it “includes a tiny templating engine, an html and css minifier, and an aggressive font subsetter.”

[0]: https://github.com/ruuda/blog

Page 1 of 3Next →