HNHacker News
TopNewBestAskShowJobs

knight17

672 karma · joined May 23, 2008

submissionscomments
knight17··on Regexper – Regular expressions visualizer
> I can't shake the feeling that Regexp could be written just as efficiently as a fluent interface with a more human friendly syntax.

You can use SRL - Simple Regex Language (https://simple-regex.com/) for making readable regex/matching rules. It is supported in C++, Java, C#, PHP, Javascript, and Python. Also, you can use the web version to generate equivalent regex if your language is one of the above.

Here is an example from the website for matching an e-mail address:

  begin with any of (digit, letter, one of "._%+-") once or more,
  literally "@",
  any of (digit, letter, one of ".-") once or more,
  literally ".",
  letter at least 2 times,
  must end, case insensitive
Regex to do the same:

  /^(?:[0-9]|[a-z]|[\._%\+-])+(?:@)(?:[0-9]|[a-z]|[\.-])+(?:\.)[a-z]{2,}$/i
The first one is readable, second one is cryptic. https://simple-regex.com/examples has more examples.

SRL was previously discussed here in 2017, see https://news.ycombinator.com/item?id=12384862

Also, the parse feature (DSL) of Rebol language is an excellent regex alternative:

1. Why Rebol, Red, and the Parse dialect are Cool (http://blog.hostilefork.com/why-rebol-red-parse-cool/)

2. Rebol's answer to Regex: parse and Rebol types (https://rebol-land.blogspot.in/2013/03/rebols-answer-to-rege...)

knight17··on Halmak, the AI designed keyboard layout (2016) [video]
I am fearful of switching because of all the keyboard shortcuts I'd have to relearn. Sometimes an established layout like Dvorak and Colemak has scripts/modifications readily available from the community that can help you to get things working quickly, for e.g. Emacs and Vim rebindings.

How are you finding the keyboard shortcuts after your transition?

Is there any community around QFMLWY (forums/mailing list)?

knight17··on Tools for Thinking and Tools for Systems
I think Outliners are great for thinking and note taking.

For me tools to help me think usually means those that help in writing. Writing is thinking on paper, giving it a tangible form. You write after spending considerable time distilling your ideas and assumptions to a coherent form. However, the problem with writing is that it is time consuming. Anyone who has written more than a paragraph will attest that the important part of writing is to whittle away all the flab by editing to make your ideas clear to your audience. To make things clear often the writing needs to be reorganised because the vision of the writer can't always be conveyed successfully to the reader without considerable skill from the writer.

Outliners helps in this organising aspect. In a wordprocessor or text-editor you work with logical units of sentences and paragraphs that carries multiple ideas. It is not easy to mix and match stuff there as you need to rewrite them often which can become tiring. With Outliners, you can, in a way, do that. Incessant focus on features to reorganise ideas aid in creating logica arguments. Clarity comes with having an understandable structure. Outliners let you tinker with the structure without much cost. In a wordprocessor, cutting and pasting becomes tedious after a while. Outliners are built for moving things around. It is comparitively easy to move text around. Keyboard shortcuts are tailored to allow you to do it easily. It becomes second nature after a while and you feel constrained using any other tool.

Outliners use each line/bullet as the smallest constituent of the 'document'. It can be heirarchichal or it can be flat. Bullet points allow ideas to be concise. You can divide ideas to make small sub-chunks while your brainstorming sessions progresses. These programs allow them to be moved around and edited to make them fit with the idea you want to communicate. SInce each lilne only contains only one idea, it is easy to move them around without much editing. Good outliners (single pane outliners) allows features such as 'hoisting' (hides everything except the current idea under consideration) and sorting features to make thought creation and organisation a breeze.

Many 'outliner people' [0] will have a brainstorming session to get everything they have in their minds out in the open. Later they rearrange them in to heirarchies (paragraphs/headings) to make sense of them. You can sort, resort and arrange your ideas in whatever way you like.

Many people use this together with similar other tools like Mindmapping software, which accepts OPML file format as input, allowing work to be transferred seamelessly to tools that are best for the job.

It is sad that outliners are not seen wide adoption among people but they were big in the 90s and many were hit products (Thinktank, More, Maxthink). I can't even find good outliners now for Windows. Some exist for Mac (Omniouliner). Although I am a user of Org-mode in Emacs, it is not useful as a thinking and brainstorming tool as it doesn't have the ability (out of the box; anything is possible in Emacs) to move around stuff easily as in a dedicated outtliner.

[0] https://www.technologyreview.com/s/520246/as-we-may-type/

knight17··on Halmak, the AI designed keyboard layout (2016) [video]
How long did it take you to learn the new layout? Why this one instead of Dvorak or Colemak?
knight17··on Moving efficiently in the CLI
>>That's one of my absolute favourite things about Mac OS

Mine too, but I'm on Windows where none of this work out of the box. However, I've found XKeymacs [0] which allows Emacs keys system wide. It is not fool proof, but I've found that the movement keys can be used without much trouble.

Currently I use:

Movement:

C-b C-f backward/forward-char

M-b M-f backward/forward-word

C-p C-n previous/next-line

C-a C-e Home End

C-x h

Capitalisation:

M-l M-c downcase-word, capitalise-word

M-F12 rollup-window

C-z iconify-deiconify-frame

C-q enable-disable xkeymacs

[0] https://github.com/fujieda/xkeymacs http://xkeymacs.osdn.jp/

I also use TouchCursor [1] to get vim like hjkl movement system wide while Space is pressed

[1] https://martin-stone.github.io/touchcursor/overview.html

knight17··on Purgecss – Easily remove unused CSS
This is neat. Few other tools that do the same job:

- PurifyCSS https://github.com/purifycss/purifycss

- Google Chrome dev tools https://www.labnol.org/internet/remove-unused-css/28635/

- Firefox https://developer.mozilla.org/en-US/docs/Tools/CSS_Coverage

- Penthouse a critical path CSS generator https://github.com/pocketjoso/penthouse

- uncss https://www.npmjs.com/package/uncss

knight17··on The new microcode from Intel and AMD adds three new features
First time seeing this usage, can you tell me what is this called exactly, in grammatical terms? Tried to Google and can't seem to reach anywhere.
knight17··on Facebook to Let Users Rank Credibility of News
WhatsApp groups are not discoverable (or publicly listed) unless someone invites you or provides you with a specific invite link with which you can join the group.
knight17··on Google Memory Loss
Instead of clicking you can use / or h to focus on the search field, press [right] arrow key and your preferred bang (!g) to open in google, no need to add any space to the last word (as you said).

https://duck.co/help/features/keyboard-shortcuts

knight17··on Free static websites with SSL for hackers
You can try using an exporter to see how much more work you'll have to do to make the new static version work to your liking.

https://gohugo.io/tools/migrations/#wordpress https://import.jekyllrb.com/docs/wordpress/

knight17··on The Casio AL-1000
Thanks for the Wiby link.

Million Short is a search engine that can remove popular websites from the search results. You can set how many sites you want to filter out when searching, for example, you can remove the top 100, 1000, 10k, 100k, or million sites. I find that using it leads to reaching a different set of, less commercial, low ranked sites that are usually hidden in Google search. This is good for explorative searches and to find opinionated POV writing but not always, sometimes you just get trash. YMMV.

https://millionshort.com/

knight17··on Why things might have taken so long
>warning controversial hypothesis

Prior to 1790, Clark asserts that man faced a Malthusian trap: new technology enabled greater productivity and more food, but was quickly gobbled up by higher populations.

In Britain, however, as disease continually killed off poorer members of society, their positions in society were taken over by the sons of the wealthy. In that way, according to Clark, less violent, more literate and more hard-working behaviour - middle-class values - were spread culturally and biologically throughout the population. This process of "downward social mobility" eventually enabled Britain to attain a rate of productivity that allowed it to break out of the Malthusian trap.

knight17··on Tricks to make yourself effortlessly charming
Similarly, I have observed 'abject' going with 'poverty', usually.
knight17··on The Emacs Calculator (2009)
Emacs calc can do financial/TVM calculations, too. A useful tutorial by Andrew Hyatt on doing financial calculations [0]; he has wrote many other calc tutorials [1] in the Emacs Google Plus community [2].

[0] Emacs financial calculations: https://plus.google.com/+AndrewHyatt/posts/YdwsbNmZ4NL

[1] Index of Andrew Hyatt's emacs calc tutorials: https://blog.markhepburn.com/2013/12/07/andrew-hyatts-emacs-...

[2] Emacs Google Plus community: https://plus.google.com/communities/114815898697665598016

knight17··on Learn to sell
By copy, I think he meant the writing of the page, copywriting. Please pursue the below links, you may find them helpful. I also recommend redesigning the site to be little more visually appealing.

https://news.ycombinator.com/item?id=11469889

https://medium.com/@InVisionApp/10-ux-copywriting-tips-for-d...

https://medium.com/talking-microcopy-writing-ux/go-to-guide-...

knight17··on Bitcoin: A Peer-to-Peer Electronic Cash System (2008) [pdf]
Similar to Fermats Library is the annotated version from Genius.com: https://genius.com/3869621
knight17··on Bitcoin: A Peer-to-Peer Electronic Cash System (2008) [pdf]
That is my default assumption too, that I will not get what they are saying.

OT: This paper is produced using a wordprocessor; my PDF reader says it is produced by OpenOffice.org 2.4. The word spacing and justification of paragraphs makes me think that this is not LaTeX, nevertheless it looks professional. Tex experts have also come to this conclusion [1]. But is it the original PDF or someone's version/copy of it?

[1] : https://tex.stackexchange.com/questions/306754/was-anything-...

knight17··on A Peek at David Rockefeller’s Rolodex
This is similar to Farley file [0], a file kept by politicians to record all the people they meet; and they meet a lot of people daily, dealing with a variety of issues, so it is good to write everything down. When it is time to meet them again, they now know enough details about the person to appear considerate and caring: their name, spouse's name, last topic discussed etc.

It gets its name from James Farley, Franklin Roosevelt's campaign manager:

>> A bad memory is not a great asset in politics, so Jim Farley devised a clever remedy: he kept an index card of every person that Roosevelt met, and recorded the names of spouses, children, hobbies, education, place of employment—any personal information that you could reasonably expect a "good friend" to remember. If Roosevelt returned to the same area, Farley would hand him the index cards of everyone he might meet. << [1]

In Rome, they had slaves for this sort of thing, called Nomenclators [2]. Their duty was to remind their master of people he had met earlier.

[0] : https://en.wikipedia.org/wiki/Farley_File

[1] : https://markmilliorn.blogspot.in/2015/05/who-are-you.html

[2] : https://en.wikipedia.org/wiki/Nomenclator_(nomenclature)

knight17··on 'I beat type 2 diabetes with 200-calorie drinks'
Having your body weight under control helps in controlling diabetes. This finding is, however, not new. Here is a 2011 study [0] using the same 600 calorie/day diet. This study only had 11 people, the current study [1] has 298.

By reducing the calorie intake you lose the fat/weight, afterwards you can resume a normal diet. The calorie restricted diet seems to restart the pancreas, kicking in the insulin production. If you can maintain your weight you are good, else you will eventually have to go back to medicine. Guardian report on the 2011 study [2].

A reddit AMA with Roy Taylor of Newcastle University [3]. Previously discussed on HN [4].

[0] : https://link.springer.com/article/10.1007%2Fs00125-011-2204-...

[1] : https://www.theguardian.com/society/2011/jun/24/low-calorie-...

[2] : http://www.thelancet.com/journals/lancet/article/PIIS0140-67...

[3] : https://www.reddit.com/r/IAmA/comments/47psga/iama_hi_im_new...

[4] : https://news.ycombinator.com/item?id=2699693

knight17··on Extensions in Firefox 58
I also begrudge the loss of many useful extensions in my workflow. It is a sad loss.

But couple of your annoyances can be fixed rather easily:

1. Get back the toolbar back: View (or Alt-V) - Toolbars - Menu Bar

2. To clean recent history: Ctrl-Shift-Del will give you the clean recent history dialog box. It can be accessed from toolbar too: History - Clear recent history.

knight17··on Inadequacy and Modesty
Yes: https://www.lesserwrong.com/feed.xml. Firefox auto-detected it.
knight17··on The “Rules” of Writing
Imitating the greats before venturing on your own was an accepted practice in the earlier days. It is called copywork. Many famous writers used this method to hone their writing chops. Benjamin Franklin, Jack London, Robert Louis Stevenson all practiced copying the work of authors they admired.

http://www.artofmanliness.com/2014/03/26/want-to-become-a-be...

https://thehustle.co/how-to-not-write-like-an-asshole

knight17··on Mali’s Desert Elephants, on Edge of Annihilation, Get a Fighting Chance
There is a link between power structures and illegal activity. It is heartening to see this positive development where both government and communities are working together. As the article suggested, the poachers along with the entire network of supply chain [0] of illegal ivory trade should be dismantled by prosecuting all those who are involved, else this will only be a temporary gain.

After narcotics and weapons, animal trafficking is listed as the most lucrative illicit trade commodity. [1]

Countries like Tanzania should take note. The Economist reports [2] that "Every third poached elephant in Africa dies on the watch of Tanzania’s president, Jakaya Kikwete". Just two months back, Wayne Lotter, an elephant conservationist was shot dead in Tanzania [3].

The solution is not easy: "a gate-keeper state” run by corrupt politicians, with wildlife policy too heavily influenced by “prima-bwanas” – heads of international NGOS. Local people get left out. Poorer, marginal communities’ land and grazing rights get nibbled away. They have lived alongside elephants for centuries but are being neglected and excluded. Vulnerable, they succumb to the offer of money so they can live. Supporting and strengthening communities so they can manage wildlife responsibly from the bottom up, with some controlled hunting, is an argument that many wildlife experts have come to see is the only long term viable solution." [0]

0 : http://blogs.lse.ac.uk/africaatlse/2017/01/27/book-review-iv...

1 : https://www.cfr.org/blog/lords-resistance-army-and-elephant-...

2 : https://www.economist.com/news/middle-east-and-africa/216312...

3 : https://www.theguardian.com/environment/2017/aug/17/leading-...

https://www.cfr.org/expert-brief/tackling-illicit-african-wi...

knight17··on JOE – Joe's own editor 4.5 released
They are now in better hands from what I read. Slashdot and Sourceforge were both acquired two years ago: https://arstechnica.com/information-technology/2016/06/under...
knight17··on Text-only CNN
Yes, Brave browser is open-source: https://github.com/brave
knight17··on Texture is a toolset for the production of scientific content
There is BaKoMa TeX: http://www.bakoma-tex.com/
knight17··on YouTube’s mobile app will soon better display all video formats, add messaging
I want two features from the YouTube Android application: Firstly, the ability to increase the video playback speed, similar to one available on my desktop browser. Secondly, remove the annoying incidence of comment reply opening my soft keyboard every time I try to read a comment thread.
knight17··on Britain's master forger
Very fascinating. I think it is Mark Landis that you have in mind:

"It obviously isn't a crime to give a picture to a museum, and they treated me like royalty. One thing led to another, and I kept doing it for 30 years," says Mark Landis, one of the most prolific art forgers in US history.

- America's most generous con artist http://www.bbc.com/news/magazine-31818367

I think this would make a really good film. An artist who is clever, talented, persuasive, calculating, and just want to do some good by donating 'forged' art to museums.

knight17··on Google scored points with its community by supporting Kotlin
I did not know that Android's 'stuck at Java 6' situation was due to the Apache Harmony project-Oracle scuffle.

Statement by the ASF Board on our participation in the Java Community Process:

> Through the JSPA, the agreement under which both Oracle and the ASF participate in the JCP, the ASF has been entitled to a license for the test kit for Java SE (the "TCK") that will allow the ASF to test and distribute a release of the Apache Harmony project under the Apache License. Oracle is violating their contractual obligation as set forth under the rules of the JCP by only offering a TCK license that imposes additional terms and conditions that are not compatible with open source or Free software licenses. The ASF believes that any specification lead that doesn't follow the JCP rules should not be able to participate as a member in good standing, and we have exercised our votes on JSRs -- our only real power on the JCP -- accordingly. We have voted against Sun starting and continuing JSRs, and have made it clear that we would vote against the JSR for Java SE 7 for these reasons. https://blogs.apache.org/foundation/entry/statement_by_the_a...

knight17··on What a stranger taught me about Japan
> Japanese people are raised in Japanese schools.

I would like to know more about Japanese schools. You seem to know about Japanese culture a great deal. Is there any material (fiction, non-fiction) accessible in English that talks of this 'national character building' occurring at Japanese schools.

← PreviousPage 3 of 6Next →