HNHacker News
TopNewBestAskShowJobs

polygot

670 karma · joined July 13, 2016

Email: identityinvisible@me.com
submissionscomments
polygot··on Make your own quadrille, graph, hex, etc. paper
What’s the license for this code? Looks cool! I’d be interested in creating a web interface for it.
polygot··on The 10:1 rule of writing and programming
Here's the repo for it: https://github.com/Decagon/hofs-churn

Here's a sample of some ratios from random git repos:

158.25:jgthms/bulma

2.37:dthree/cash

32.49:Rochester-NRT/AlphaGo

7.04:apple/swift

5.00:robbyrussell/oh-my-zsh

108.86:github/gitignore

10.17:facebook/draft-js

12.77:matryer/bitbar

7.47:Microsoft/vscode

9.42:ptmt/react-native-desktop

6.06:p-e-w/maybe

1.00:parkjs814/AlgorithmVisualizer

9.54:hollance/swift-algorithm-club

17.63:alexjc/neural-doodle

4.55:fbsamples/f8app

8.80:nodejs/node

10.64:jiahaog/nativefier

325.12:Microsoft/CNTK

28.56:atom/atom

3.21:jcjohnson/neural-style

40.01:tensorflow/models

polygot··on The 10:1 rule of writing and programming
Here's a super super hacky script that I wrote to calculate the ratio described in the article. I'll make it a lot better tonight and clean it up. Here's the bash script:

TOTAL_CHANGES="$(git log --all --numstat --pretty="%H" | awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("%d\n", plus+minus)}')"

TOTAL_LINES="$(cloc . | tail -n 2 | head -n 1 | awk '{print $NF}')"

echo "scale=2 ; $TOTAL_CHANGES / $TOTAL_LINES" | bc

echo -n ":1"

pwd

One snippet from https://gist.github.com/sephiroth74/d3ce654dcaefe1d2c4cd (modified)

How to run:

1. Clone a Git repo

2. cd into it

3. run bash ../script.sh

Output something like this:

polygot@server:~/tinkerpop$ bash ../script.sh

14.17:1/home/polygot/tinkerpop

polygot··on A new digital divide: Young people who can’t use keyboards
I'm on a bit of a tangent, but it appears that a lot of people are beginning to use voice-recognition to recognize Japanese and Chinese, or are sending the actual voice clips instead of manual input methods such as handwriting recognition.

Granted, this is my very limited experience. Perhaps this could be a competing way to help communicate in foreign languages.

polygot··on Mozilla Overhauls Speech-To-Text Contribution Interface
Really nice app. It would be a nice feature to add volume normalization as some microphones/speakers are very soft, and I can't hear what they are saying, while others are much too loud.
polygot··on Idea: use machine learning to remove product placements from images/video
The impainting can be global and locally, but it has to be temporally stable to avoid shakiness associated with impainting multiple frames.

Photoshop unveiled a similar temporally stable algorithm which does just that (provided that you select a marquee selection around the object.) I can't find the link though. Perhaps those two algorithms can be combined to first locate the object then remove it.

polygot··on Ask HN: Validate whether my side-project could be profitable
I can see where you're coming from. It is a hyper-niche product so it's hard to find the right audience. Unfortunately, I can't make it client side because the database to capitalize names and such would be unreasonably large for a user to download. However, it was very fun to build!
polygot··on Ask HN: Validate whether my side-project could be profitable
Yeah, that would be a problem. I'm thinking it could just send the first part of the email address (before the @ sign) or instead just license an encrypted blob to the company which they can run.
polygot··on A Hidden Git Feature: Notes
Are the notes tied to a specific commit, or is it per object?
polygot··on iOS 11 Security [pdf]
"The processor forwards the data to the Secure Enclave but can’t read it. It’s encrypted and authenticated with a session key that is negotiated using a shared key provisioned for each Touch ID sensor and its corresponding Secure Enclave at the factory."

> "at the factory"

I suppose the secret key is erased at the factory, however, what if it isn't? Or, is the secret key generated on-chip via a random number generator? If it were stored at the factory somewhere then it would be possible to link it to each iPhone. I'm not familiar with cryptography, so I think it's just a misunderstanding on my part, and I'm not sure if this would be a weakness in the Touch ID sensor.

polygot··on Leaving htop running freezes macOS High Sierra
Out of curiosity, is this bug related to CPU cache? I don't know really anything about how CPU's work internally, however. It just "feels like" it's applying a bunch of instructions very quickly but ignoring the internal clock if that makes any sense.

For example, the CPU percentage counter in Activity Monitor was around 3,000,000. If there was a loop to increment the CPU usage counter, it sounds like it incremented it so fast that the thread that reset it didn't run since it wasn't scheduled to run (as it only runs every few seconds.) Again, this is just pure speculation and if anyone knows otherwise please let me know!

polygot··on Leaving htop running freezes macOS High Sierra
On Mac OS 10.4 (tiger) when I left Activity Monitor going in the background for a few minutes and returned to it, sometimes it would all of a sudden refresh the values super super fast with historical data (appearing to catch up on the iterations that it did not display.)

On 10.6, when I ran Windows in a virtual machine while it was doing windows update, and left it running in the background for a few minutes and returned to it, sometimes I would get 60fps in the machine for a few seconds and it updated very very fast, and then it went back to 15fps (seemingly getting more CPU power.)

On 10.7 (if I recall) if I left Activity Monitor running in the background for a few minutes and returned to it, I would get nonsensical values for the CPU usage for a few seconds (e.g. 398423.34%) but then it would return to normal. Perhaps this error has been accumulating over the years.

polygot··on Show HN: Convert your Google Slides to high-quality animated GIFs and tweet
Here's the source code (PowerPoint compatibility will be added soon, but Google Slides works): https://github.com/Decagon/muto
polygot··on Ask HN: What do you love/hate about terminals? Would you change them?
Sometimes clear; reset works but other times I can't see what I'm typing, and so when I type it and hit enter it might clear the screen, sometimes it runs the command but the bash prompt is completely messed up. I use tmux a lot, so I usually use the reset code from this answer: https://unix.stackexchange.com/questions/49886/tmux-status-b...

stty sane; printf '\033k%s\033\\\033]2;%s\007' "`basename "$SHELL"`" "`uname -n`"; tput reset; tmux refresh

polygot··on Ask HN: What do you love/hate about terminals? Would you change them?
On the lines of "just working", it'd be cool to have a shell which if I could accidentally cat a binary file and not have the shell be completely in-operable or have to run this long archaic command to get it working again.

Maybe have something like "when I run the cat command, ignore all commands to the terminal until cat finishes".

polygot··on Show HN: Convert your Google Slides to high-quality animated GIFs and tweet
Cool idea! I think it's very useful for people who want to share slides but don't want to share the entire pptx file.

I wanted to make a GIF of another user's Google Slide, but with the webapp it looks like I only have access to my own slides, and only google slides. I whipped up a quick API to generate a GIF of any Google Slide URL or of any PPTX file available on the web: http://159.203.37.136/

You can use the API like this: http://159.203.37.136/?url=xyz&delay=100 which would make a GIF of the URL pptx file. For example, it could be https://docs.google.com/presentation/d/13838392jfdjkfsd/edit... or https://scholar.harvard.edu/files/torman_personal/files/samp... or any ppt or pptx url of your choosing. It works with any public google slides too.

As a sample, you can try http://159.203.37.136/?url=https://scholar.harvard.edu/files...

polygot··on Don't tell people to turn off Windows Update
There's a way to choose the business branch instead of the comsumer branch, which might delay some of the feature updates. Iirc there was an option to delay features by up to 180 days, but that doesn't actually stop the updates though.
polygot··on Story-Like Visual Explanations by Watching Movies and Reading Books Using a CNN
The title is a bit dense; a good example of what it does is available here: http://yknzhu.wixsite.com/mbweb (takes in a movie and its book form, and syncs them up and many other things.)

Abstract:

Books are a rich source of both fine-grained information, how a character, an object or a scene looks like, as well as high-level semantics, what someone is thinking, feeling and how these states evolve through a story. This work aims to align books to their movie releases in order to provide rich descriptive explanations for visual content that go semantically far beyond the captions available in current datasets. To align movies and books we propose a neural sentence embedding that is trained in an unsupervised way from a large corpus of books, as well as a video-text neural embedding for computing similarities between movie clips and sentences in the book. We propose a context-aware CNN to combine information from multiple sources. We demonstrate good quantitative performance for movie/book alignment and show several qualitative examples that showcase the diversity of tasks our model can be used for.

polygot··on Ask HN: Is there HN App that will notice me on new reply to my comment?
Sample check response confirmed--but I think I have to fix something
polygot··on Ask HN: Is there HN App that will notice me on new reply to my comment?
Another sample reply after script modification to improve efficiency
polygot··on Ask HN: Who uses the HN api and what for?
Get HN replies notifications without a centralized server or needing to provide your email: https://gist.github.com/Decagon/1ef31011d05bf71aa5570f2bddda...

Bit hacky, but uses the HN API to get a comment based on their ID (scraping the new comments page for ids), and then extracts the id from the comment and checks if the parent comment is the same as your username (by querying the API again), and if it is, then it sends a notification.

polygot··on Ask HN: Is there HN App that will notice me on new reply to my comment?
I just whipped up a super hacky Python 2 script which will notify you if someone replies to your comment, without requiring your email, and can be self hosted (fill in your HN username in the variable): https://gist.github.com/Decagon/1ef31011d05bf71aa5570f2bddda...

Just run it with: while true; do python HNgetCommentReplies.py | mail -s "new hn reply" me@example.com; sleep 1m; done;

(e.g. check every minute for new comment replies and mail output.) It will output "Reply to comment: hn-url" if there is a reply, otherwise it will output nothing. Unfortunately it doesn't save any state, so it doesn't know if it already emailed you a reply. This can be easily fixed but I don't have too much time right now. Also, it makes one query at a time, which is a bit slow (as it takes around 20 seconds to check for replies.) This can be parallelized to make it much faster.

Benefits of this script is that if it were centralized, n users could be subscribed to get notifications (e.g. a million users) it would only use one query to the hacker news server every 30 seconds or so. It just looks to see if all recent comments have a parent whose name matches yours.

I'll dogfood it for a while and see if any replies to this comment works.

polygot··on Ask HN: In your company, how important is code quality vs. getting things done
I'm not super familiar with python, but I've tried using a pep8 auto formatter and it seemed to reformat it to comply to standards https://github.com/hhatto/autopep8

Perhaps that could be useful when having to write pep8 compliant code but don't want to manually format everything.

polygot··on [dead]
I'm not sure why this redirects to Trello. However this is what appears to be the website: https://totalcloud.io/
polygot··on Google Chrome to stop autoplaying content with sound
What about YouTube? I'm sure they'll add an exception for it, but it technically does classify as automatically playing a video when you click on a link.
polygot··on Titan in depth: Security in plaintext
This looks like a pretty cool project. How much research went into creating Titan? Why did Google decide to create a custom hardware-based solution (Titan) instead of using something off the shelf, like Intel's Secure Boot?
polygot··on Try googling “random number generator” and see what you get
Try entering -9999999999999999999999999 as the min value and 10 as the max value :).
polygot··on SSH browser with rsync transfer engine
Looks interesting!

I had a pain point a few days ago when I had to delete a few thousand files from my VPS over SFTP (it took forever.) This project looks like it could help out a lot in that regard because it uses rsync, which should be much faster than FTP's method of deleting the files one by one.

polygot··on DuoCopter
They have another design that can go from 0km/hr to 100km/hr in 1.5 seconds: http://www.research-drone.com/en/extreme_climb_rate.html
polygot··on HP Elite Slice
"Protect, detect, and recover from malicious BIOS attacks using HP Sure Start with Dynamic Protection - the industry’s first self-healing BIOS that monitors and corrects BIOS corruption in real-time"

In the footnote, it says that it corrects BIOS corruption every 15 minutes. I'd be interested to see how this works and what technology they are using. What happens if my BIOS is corrupted within the 15 minute window and I reboot?

← PreviousPage 4 of 5Next →