Better HN
topnewbestaskshowjobs
Log inSign up

dbkaplun

32 karma · joined Aug 26, 2015 (11y ago) · 28 submissions

https://dbkaplun.com
Submissions

comment 8y ago · link · parent

For me, reusing widely used code that's heavily tested is preferable to the liability of handwritten code. If I'm given the opportunity, when possible, I'm going to choose the former.

comment 8y ago · link · parent

React is a view library. It keeps the page to date with your data, much like Vue or Angular.

jQuery is a DOM manipulation library, so in a sense it is lower level than React. It abstracts the DOM implementations across browsers to provide a unified interface. It lets you do things like animations, and find element dimensions in a cross-browser way.

Today, developers are choosing React because it more closely aligns with the needs of modern webapps. Most browsers have become more standards-compliant so jQuery is not such a necessity anymore. React is a fast and readable library to keep your page up to date with your data.

comment 8y ago · link · parent

RFC: https://github.com/npm/rfcs/pull/16/files?short_path=5c765e6

Summarized algorithm: https://cdn-images-1.medium.com/max/800/1*1b7KHDG2St5D-6jepf...

4.

Secure, reproducible builds for NPM(hackernoon.com ↗)

2 points · by dbkaplun · 8y ago · 2 comments

comment 8y ago · link · parent

There's a nice set of challenges for learning window functions and testing your window function knowledge: https://www.windowfunctions.com/

comment 8y ago · link · parent

> The big problem with trying to tune a guitar that way is that you're tuning a guitar so it's in tune when you don't press the strings, but then when you actually play it you do press down the strings.

When you press the strings, they will all press equally, playing a correct relative tune.

comment 8y ago · link · parent

> Any slack present in the string winding can cause the string to go out of tune easily if you loosen the string to the correct tension.

You can get around that by using harmonics. Because you play harmonics without pushing all the way down, you can achieve a more precise tune.

The strongest harmonic is achieved when you gently place your finger on the string directly over the metal fret. A harmonic can only be achieved when you do not press the string all the way down into the fret.

The harmonic on the 7th fret of one string is the same note as the harmonic on the 5th fret on the next higher string. This is true for all consecutive string pairs other than (G, B).

You can tune using these pairs of harmonics to tune more precisely than pressing all the way down.

You will need to tune the (G, B) pair without harmonics.

comment 8y ago · link · parent

The article is short and cursory. It can be summarized with the following excerpt:

> Zcash uses zero-knowledge proofs to guarantee that transactions are valid despite the fact that information about the sender, the recipient, and the amount transacted all remain hidden. The power of the idea has major banks interested. JPMorgan Chase recently worked with Zcash to add zero-knowledge functionality to its own private Ethereum-based blockchain.

comment 8y ago · link · parent

> Fulcrum. Given a sequence of integers, returns the index i that minimizes |sum(seq[..i]) - sum(seq[i..])|. Does this in O(n) time and O(n) memory.

This is doable in O(n) time and O(1) memory. Sum the list once. Then start from the beginning, collecting a running total and subtracting from the sum for a running difference.

comment 8y ago · link · parent

Perhaps China is advertising this to deter crime, as a potential criminal might worry about facial recognition before doing something illegal.

comment 8y ago · link · parent

I found this guide (with slight modifications) helpful for setting up stubby as a localhost DNS resolver to proxy through 1.1.1.1 with DNS-over-TLS on macOS: https://medium.com/nlnetlabs/privacy-using-dns-over-tls-with...

comment 8y ago · link · parent

jQuery's bread and butter is DOM manipulation. However, for even moderately small use cases (even an interactive form) it is useful to use React, Angular, or some data binding framework, as state changes in jQuery quickly become unmaintainable.

comment 8y ago · link · parent

GitUp[1] is an excellent alternative to gitx and ungit, for those unhappy with either.

[1]: https://github.com/git-up/GitUp

comment 8y ago · link · parent

Source:

https://github.com/bootandy/window_funcs

15.

Finite State Entropy, made easy(github.com ↗)

1 points · by dbkaplun · 8y ago · discuss

16.

A solution for scalable randomness(iohk.io ↗)

1 points · by dbkaplun · 8y ago · discuss

comment 8y ago · link · parent

Here's a link to the graphical explanation listed: http://www.swirlds.com/downloads/SWIRLDS-TR-2016-02.pdf

18.

Provably secure Proof of Stake(cardanodocs.com ↗)

1 points · by dbkaplun · 8y ago · discuss

comment 9y ago · link · parent

slap[0] (the terminal-based text editor) was designed to emulate Sublime's UX within the terminal. It has a shallower learning curve than other command line editors.

[0] https://github.com/slap-editor/slap

comment 9y ago · link · parent

Along with New Tab iFrame[0], I use TabTerm[1] for a terminal in the new tab page.

[0] https://chrome.google.com/webstore/detail/new-tab-iframe/pjj...

[1] https://github.com/tabterm/tabterm

comment 9y ago · link · parent

Another useful quality of a diff algorithm is being able to understand and detect moves. This is not commonly implemented but one real-world example is https://www.semanticmerge.com/.

comment 10y ago · link · parent

- "test".match(/st$/)

comment 10y ago · link · parent

The author clearly doesn't practice abundant thinking, as the title should be "The Advantages of Abundant Thinking".

24.

Show HN: A web-based process monitor(dbkaplun.github.io ↗)

4 points · by dbkaplun · 10y ago · 1 comment

comment 11y ago · link · parent

You can use otool to see what libraries a program uses:

  $ otool -L /Applications/Utilities/Activity\ Monitor.app/Contents/MacOS/Activity\ Monitor
  /Applications/Utilities/Activity Monitor.app/Contents/MacOS/Activity Monitor:
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1153.20.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1348.13.0)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57031.30.5)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/System/Library/PrivateFrameworks/GraphKit.framework/Versions/A/GraphKit (compatibility version 1.0.0, current version 25.0.0)
	/System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation (compatibility version 1.0.0, current version 55126.0.0)
	/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport (compatibility version 1.0.0, current version 631.0.0)
	/usr/lib/libsysmon.dylib (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/PrivateFrameworks/NetworkStatistics.framework/Versions/A/NetworkStatistics (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1153.18.0)
	/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 600.0.0)
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 62.0.0)
And for top:

  $ otool -L $(which top)
  /usr/bin/top:
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1151.14.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/usr/lib/libpanel.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)