Hacker Newsnew | past | comments | ask | show | jobs | submit | 0xml's commentslogin

I'm using Google's `repo` for multi-repo project at work.

https://gerrit.googlesource.com/git-repo


Last time I found a paper in Graphics Gems titled Solving the Nearest-Point-on-Curve Problem, which transforms the problem into a Bernstein polynomial form. Then an exact solution can be obtained using A Bézier Curve-Based Root-Finder. This is my implementation [1], but it's not very robust for high-degree cases.

[1] https://github.com/Long0x0/distance-to-bezier


Your link 404s- private repo?


Oops, updated.


Better if it allowed single-tool installs instead of the whole suite.


Don't have access to read the code, but I think ideally there should be only one instance created at startup, right?


At most one instance at start up. Asynchronous creation or lazy creation on first use are two other potential options. Speaking generally, not Unreal-specific.


If VPNs don't work for you, I recommend using an anti-censorship tool with an obfuscation protocol like v2ray which is commonly used in China.

https://github.com/v2fly/v2ray-core https://github.com/XTLS/Xray-core https://github.com/net4people/bbs https://en.wikipedia.org/wiki/Great_Firewall


Not exactly - encoding it twice increases by 4/3 * 4/3 - 1 = 7/9, which is about 77.78% more than the original.



Maybe Printable Document Format.


This was my first instinct as well, which makes sure numbers are adjacent. OP also mentioned this variant as lucidBrot/hexgridspiral in the older post.


Firefox expects your script to return undefined, so you can add one at the end (or even shorter: void 0).


Thank you (and neighbors), I didn't know this.


To clarify slightly, bookmarklet behavior across browsers is to call `document.write` with the result of the bookmarklet’s last expression unless that result is `undefined`, and calling `document.write` after page load completes replaces the page’s DOM with the content written. It’s a weird bookmarklet thing, I don’t think there’s anywhere else in JS that accepts a list of statements, not expressions, but cares about the result of the last expression.

People often disable this by making the last expression `void 0`, which evaluates to `undefined`. This is really an anachronism, though, the original point wasn’t actually brevity (it’s only one character shorter after URL encoding, not worth funky syntax) but that just writing `undefined` was broken and sometimes didn’t evaluate to the special value undefined. That’s fixed now, so I would just append `undefined` instead.

Though, really what you should do is always wrap bookmarklets in IIFEs, which avoids stomping around the page’s global variables, lets you write code with early exits, lets you opt back in with an explicit return rather than editing boilerplate, and also solves this issue as a bonus.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: