HNHacker News
TopNewBestAskShowJobs

vyuh

1,069 karma · joined March 24, 2016

I like extremely concise source code, particularly in C or PERL.
submissionscomments
vyuh··on Short URLs: Why and How
I like this idea, It'll be good to have the best of both worlds. Is there a way to optimize search engine visibility for such short urls? perhaps with a good title, meta tags having keywords etc.? Is there a HTML meta tag that gives the search engine crawlers an alternate hierarchical url for the same page? I believe setting up the server to do this is not too difficult.
vyuh··on Ask HN: HN-Post of two large maps showing chemical transformations
https://hn.algolia.com/?q=bio+chemical I think this is it. keyword: bio chemical pathway
vyuh··on Nim 1.6
> Fast compile times: a full compiler rebuild takes ~12s (Rust: 15min, gcc: 30min+, clang: 1hr+, Go: 90s) [2].

Whoa, this really surprised me!

vyuh··on Awk: The Power and Promise of a 40-Year-Old Language
I believe the source is https://mathwithbaddrawings.com/2015/12/16/good-mathematicia...
vyuh··on Awk: The Power and Promise of a 40-Year-Old Language
"A good programmer uses the most powerful tool to do a job. A great programmer uses the least powerful tool that does the job." I believe this, and I always try to find the combination of simple and lightweight tools which does the job at hand correctly.

Awk sometimes proves surprisingly powerful. Just look at the concision of this awk one liner doing a fairly complex job:

    zcat large.log.gz | awk '{print $0 | "gzip -v9c > large.log-"$1"_"$2".gz"}' # Breakup compressed log by syslog date and recompress. #awksome
Taken from: https://mobile.twitter.com/climagic/status/61415389723039744...
vyuh··on Coding with Character
Agave[1] and Lekton[2] are among my favorite monospace fonts.

[1]: https://app.programmingfonts.org/#agave

[2]: https://app.programmingfonts.org/#lekton

vyuh··on Flame: A PureScript front-end framework inspired by the Elm architecture
I think if someone implements this thing without breaking backward compatibility, then it will be valuable even as a fork of the original elm compiler. I think the License allows this.

Also, Evan has not closed this issue since 2015. Most probably it is about "too much work to get it right" rather than "I'm not convinced that we need it".

vyuh··on Flame: A PureScript front-end framework inspired by the Elm architecture
Can you (or anyone) point me to the files where this `comparable` logic is implemented in elm compiler? I'll try my hand at least making Bool and Record types Comparable. Or maybe implement comparable Enumerated Type in elm which behaves mostly like custom Union Type.
vyuh··on Flame: A PureScript front-end framework inspired by the Elm architecture
I am hopeful about using Flame (posted link) along with https://pursuit.purescript.org/packages/purescript-ordered-c....

Looks like purescript development requires node, purescipt compiler, and spago build tool. I have set these up. In future I'll try to learn Flame framework and then adapt my elm code to this.

vyuh··on Flame: A PureScript front-end framework inspired by the Elm architecture
Elm handicaps my attempts of "making impossible states impossible" because:

- I can't have Sets of arbitrary Types they must be `comparable`. I cannot create a custom comparable type.

- Records, Bool and custom Union Types are not `comparable`

- Bool and Simple Union Types could have been comparable if their comparison worked like they were Enumerated Types. Elm does not have Enumerated types.

Basically https://github.com/elm/compiler/issues/1008 made me look for better alternatives.

vyuh··on Inkscape 1.1
I agree, this can be shocking for many casual users. I think there is an option to save a "plain SVG" as opposed to "inkscape SVG". Does "plain SVG" also include such information?
vyuh··on Elm-visualization: A data visualization library for Elm
Examples: https://elm-visualization.netlify.app/
vyuh··on Zola: A fast static site generator in a single binary
A few months ago I tried my hand at this because it had some better defaults. Also, I didn't like camel case variables everywhere in Hugo. Then, I gave up when I realised that Zola does not even allow YAML config files. Nit picks everywhere..
vyuh··on The Zen of Erlang (2016)
This is a loose transcript of presentation given at ConnectDev'16.

Video of the presentation: https://youtu.be/4ZIPijEqrNI

vyuh··on Hindley-Milner Type Inference (2012)
The algorithm, the type system, and some of the logical background are explained in this tutorial, along with an implementation in standard ML.

http://steshaw.org/hm/hindley-milner.pdf I found this 30 page PDF document very helpful in understanding the Algorithm.

vyuh··on Linux Mint drops Ubuntu Snap packages
When I removed snapd from Ubuntu, all installed snaps and their mount points still remained. Then I reinstalled snapd to remove the snaps. I could not find a command to force remove a snap if other snaps depend on it. So I had to delete each snap one by one manually, taking care of dependency tree.
vyuh··on Advice to Young Web Developers
> Even if you need to preserve client state between page loads (for e.g. music or video playback) you can let the browser do most of the heavy lifting by fetch()ing a new page and replacing your content container at the DOM level.

Anyone knows of some easy to learn example of such DOM replacement?

vyuh··on Show HN: Simple PDF to PNG Server
"to convert the PDF (or Word doc, XLS, etc) remotely without the file ever touching the user's device"

This made me think that the site accepts a URL to a PDF/XLS/DOC file and returns PNG.

vyuh··on Organice – Using Org mode from a smartphone or browser [video]
Github: https://github.com/200ok-ch/organice

Web Browser App: https://organice.200ok.ch/sample

vyuh··on A Problem of Ramanujan
"At the age of 17, Nobel Laureate Physicist Abdus Salam found a 2-page long elegant proof of one of Ramanujan's problems. This was his 1st paper ever published..."

https://twitter.com/fermatslibrary/status/118916752447211929...

vyuh··on Organice – Org mode without the dependency of Emacs
The organice web app. https://organice.200ok.ch/sample
vyuh··on Notepad++ repository is being spammed after “Free Uyghur” release
The issues page is https://github.com/notepad-plus-plus/notepad-plus-plus/issue.... Spam started 16 hours ago with issue #6286. The issue count stands at #7480 at the moment. ~1200 issues in 16 hours!
vyuh··on Lesser Known Coding Fonts
Agave[1] and Lekton[2] are among my favorites.

[1]: https://app.programmingfonts.org/#agave

[2]: https://app.programmingfonts.org/#lekton

vyuh··on Deep Learning with PyTorch: A 60 Minute Blitz [video]
I posted this link but now the title has somehow changed. I do not know what is the policy on HN. But the title saying "[video]" might give a wrong impression that this points to a one hour long video. The link points to a tutorial which embeds an entirely optional two minute video that introduces the main content contained in five web pages.
vyuh··on Jtc – CLI tool to extract, manipulate and transform source JSON
The author has also written related tools. One to convert XML to JSON and back (https://github.com/ldn-softdev/jtm) and another to convert JSON to SQLite tables (https://github.com/ldn-softdev/jsl). Combining these with the hxnormalize tool ( https://www.w3.org/Tools/HTML-XML-utils/man1/hxnormalize.htm...), one can do very sophisticated manipulation on HTML web pages.

HTML -> XML (via hxnormalize) -> JSON (via jtm) -> process using jtc (or even jq)

vyuh··on Jtc – CLI tool to extract, manipulate and transform source JSON
https://github.com/ldn-softdev/jtc#jtc-vs-jq
vyuh··on Sudoku Solver in Common Lisp (2009)
I wrote a program that generates all sudokus that satisfy constraints given in a partially filled grid. I thought it might be feasible to find out the distribution of 81 digit numbers that are valid Sudokus by such brute force. Since there are so many sudokus, I made the program capable of resuming an interrupted computation using a dump file. All this I did in C. It was quite a learning experience. Here goes: (https://github.com/vyuh/sud.c)

For some fun I also translated the algorithm to Javascript (https://github.com/vyuh/sud.js) and Java (https://github.com/vyuh/sudoku-lister/blob/master/java/sudok...). The javascript code is used in a toy browser application i made (https://su-do-ku.herokuapp.com/).

Some day I might generalize the program to larger Latin Squares (https://en.wikipedia.org/wiki/Latin_square).

vyuh··on How to delete Facebook and not lose your friends and photos
When I downloaded my Facebook data few years ago, my notes were missing. I had to reactivate my account, save them as HTML pages, and queue account for deletion again. One should not think of profiles on these sites as reliable archive of ones data. There is no alternative to local backup for this. With deletion one loses so many little memorable things, for example comments.
vyuh··on St – A simple terminal implementation for X
In config.h:

  /*
   * appearance
   *
   * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
   */
   static char font[] = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
Try to specify font name in this format.
vyuh··on Show HN: My first web app – PDF memo creator
I tried to use it on Opera Mini native on Android. Download dialog is shown but it never starts transferring data. No error message shown.
Page 1 of 2Next →