HNHacker News
TopNewBestAskShowJobs

uxcn

235 karma · joined January 6, 2015

https://twitter.com/uxcn_
submissionscomments
uxcn··on Calculating integer factorials in constant time, taking advantage of overflow
Asymptotically constant is what we normally talk about in relation to constant time. An algorithm that always runs in n steps with respect to input would be considered constant given the definition you're using, which would at very least be confusing.

It's also difficult to talk about constant time outside of an asymptotic context. There are a number of subtle sources for timing variances (e.g. branches, branch mispredicts, cache misses, pipeline stalls, context switches, etc..).

uxcn··on Calculating integer factorials in constant time, taking advantage of overflow
This isn't correct. Consider an algorithm that special cases powers of two for dividing a number. Both cases take a constant number of steps, although dividing by a power of two is fewer.

The lower and upper bound differ, but they are both still constant.

uxcn··on Bash Academy
The main advantage is that it's a smaller dependency. If you don't need the functionality, there's a bigger benefit to being portable. For example, running scripts on a router with embedded linux.
uxcn··on Calculating integer factorials in constant time, taking advantage of overflow
On x86, it could also compile down to just a jmp. A bsr would still be faster, but it would probably be worth checking that __builtin_clz actually compiles down to bsr.

For portability reasons, it might be better just using bit tricks and letting the compiler try to optimize it though. Clang and GCC do pretty well here.

uxcn··on Bash Academy
I use pup a lot too, which just prints the dir.
uxcn··on Calculating integer factorials in constant time, taking advantage of overflow
I was expecting to see a variant of this.
uxcn··on Bash Academy
It's useful to be able to write functions for your shell. For example, I have a function up, which moves up n dirs.
uxcn··on Bash Academy
I've started trying to stick to dash syntax for shell scripts.
uxcn··on Email made me miserable, so I decided to build my own email app from scratch
The macro/command syntax for mutt. For example, tagging all the email from someone and saving it to a folder (Tsomeone, ;s=folder). Filter rules as well (e.g. sieve).
uxcn··on Email made me miserable, so I decided to build my own email app from scratch
I'd have a hard time switching to an email client other than mutt. I'm not sure what I would do without an actual grammar to deal with email.
uxcn··on IncludeOS: C++ unikernel now free and open source
> Not strictly, no. While currently they only support the "hardware" in KVM/QEMU/VirtualBox, there's nothing stopping anyone implementing drivers for whatever hardware they want to run on, even bare metal.

Exokernels (https://en.wikipedia.org/wiki/Exokernel) essentially implement this. Hardware has been adding more support for virtualization though, so I imagine unikernels are better able to take advantage of things like virtualized page tables, virtualized io-mmu, etc...

I'd be curious to see benchmarks for something generally IO bound like PostgreSQL or HyperTable. IO scheduling isn't trivial, so it might give a good idea of what some of the trade-offs might be.

uxcn··on Static Website Generators Are the Next Big Thing
Considering a lot of content seems to be increasingly generated and handled via Javascript, what are some of the downsides to statically generating a website or webapp?
uxcn··on William Binney Explains Snowden Docs (2014)
What happened to Frank Drake, Ed Loomis, et al. is an injustice.
uxcn··on VMware GPL Enforcement Suit in Germany Continues
GPLv3 has to do with locking hardware (https://en.wikipedia.org/wiki/Tivoization), which Amazon is still vehemently opposed to for obvious reasons.
uxcn··on Cmus – A Small Terminal Music Player
I tag my music through MusicBrainz (https://musicbrainz.org/) and I generally don't have to worry about metadata anymore. I generally try to correct anything I find that's wrong. abcde + picard + ncmpcpp.
uxcn··on Memory Layouts for Binary Search – V2
Interesting results. Thanks, I'll have to take a deeper look through the paper.

Cuckoo hashing seems to be the standard, but I still haven't seen concrete numbers comparing different variations or other schemes like hopscotch particularly for latency and throughput. Hopscotch seems like it might give better latency. For simple stuff, I've found that a good hash and linear probe generally outperforms other simple schemes up to roughly 50% load, but I honestly haven't really had a need to dig further into other schemes so far.

uxcn··on Memory Layouts for Binary Search – V2
Does anyone know if there are any similar studies for hash tables (e.g. algorithm, bucket layouts, probe sequences)?
uxcn··on Amazon Sues Fake Reviewers on Fiverr
I have to wonder how effective this will actually be considering that Amazon's reviews are completely unmoderated, and explicitly open to the public.

The one thing I will credit Amazon with, is that they are quick to reimburse for fraudulent products when you can demonstrate that it is fraudulent. Quality might be slightly more debatable, but I would be willing to bet Amazon will reimburse on that as well.

uxcn··on The Most Mysterious Star in Our Galaxy
The rebuttal has to do with the definition of economic growth (assuming it isn't connected to energy consumption and gdp), which the economist argues has to do with quality of life. The rebuttal is that quality of life can only objectively improve to a certain point, and that the remaining measures aren't really quantifiable.

So the last, albeit minor, argument is that there would be a point where there isn't anything to invest in to grow, which essentially describes the ultimate form of secular stagnation. I think the economic counter-argument goes something like the money supply isn't inherently finite. I could see that being an interesting argument.

uxcn··on The Most Mysterious Star in Our Galaxy

    > Economist: But I have to object to the statement that growth must stop once 
    > energy amount/price saturates. There will always be innovations that people 
    > are willing to purchase that do not require additional energy.
...and so on
uxcn··on The Most Mysterious Star in Our Galaxy
The other article isn't entirely arguing that energy is a fundamental limit, although the example it gives is pretty hilarious. It's ultimately arguing that there are fundamentally limited things for capital to invest in and grow.
uxcn··on The Most Mysterious Star in Our Galaxy
The math is essentially correct, but it oversimplifies some things, and it skips a number of factors.

Larry Summers recently shared his opinion on the topic https://www.washingtonpost.com/opinions/the-global-economy-i....

uxcn··on The Most Mysterious Star in Our Galaxy
I'm just not entirely convinced of the premise that energy consumption on that scale would be necessary for an advanced civilization. Particle accelerators would be a reasonable possibility though.
uxcn··on The Most Mysterious Star in Our Galaxy

    > Jason Wright, an astronomer from Penn State University, is set to publish an 
    > alternative interpretation of the light pattern. SETI researchers have long
    > suggested that we might be able to detect distant extraterrestrial 
    > civilizations, by looking for enormous technological artifacts orbiting 
    > other stars. Wright and his co-authors say the unusual star’s light pattern 
    > is consistent with a “swarm of megastructures,” perhaps stellar-light 
    > collectors, technology designed to catch energy from the star.
I guess the theory is that an advanced civilization would be building particle accelerators on the scale of solar systems, or maybe constructing wormholes?
uxcn··on Struct Iteration Through Abuse of the C Preprocessor
It isn't a question of testing changes. The more people working on the codebase, the more people it impacts. Adding manual steps is tempting the fates.
uxcn··on Struct Iteration Through Abuse of the C Preprocessor
Python is definitely a better syntax to write meta-programs than the pre-processor, but you still have the issue of the additional step/tool. Anything that depends on the generated code depends on the step which, if it's missed, can lead to non-good things.
uxcn··on Struct Iteration Through Abuse of the C Preprocessor
It can be a bit tricky if it isn't integrated with the build process.
uxcn··on ‘99.99 percent air’: Boeing releases video of revolutionary lightweight metal
It's still a fluid though, so applying a force doesn't necessarily compress it. Think about dropping an egg into water.

I wonder if you could convert all the deceleration into compression using water though.

uxcn··on The future of UI is text
I think people probably do tend to type queries into search providers like Google in whatever their native language is. A web text box might not be the best example for people trying to do discrete tasks though, but at a higher level the queries are probably part of some goal like "get times for new Ridley Scott movie" or "check availability of X" . I'm not sure I can see people typing that into a launch menu, but I'm guessing that's roughly what Microsoft wanted to see happen with Cortana.

Stricly using commands, discoverability probably is still an issue. Text doesn't necessarily need to be command based though. For example, if there are 10 (100, 1000, etc...) options on a screen I suspect it's probably easier to select using text. In some ways it could be similar to a touchscreen.

uxcn··on The future of UI is text
It's a little better with info documents.
← PreviousPage 4 of 10Next →