HNHacker News
TopNewBestAskShowJobs

alex_smart

1,323 karma · joined April 30, 2014

submissionscomments
alex_smart··on I kind of killed Mercurial at Mozilla
Essentially, the problem with git is - it is a tool that is simple in its internals, but with a complex/confusing UI. The only way for someone to feel somewhat in comfortable with git is to have a good conceptual model for how it works internally. Once you have that mental model, you feel like a magician with git, but for beginners, it is a source of endless confusion and fear.
alex_smart··on Why I tend not to use content negotiation
> But that was too ugly for URLs, so modern websites now use browser history APIs just so they can remove 3 characters from the URL and do stuff like

Would back/forward buttons continue to work if we decided not use browser history APIs?

alex_smart··on This is what the year actually looks like (2018)
Am I the only one who visualises the year not as a line or circle but pages on a calendar?
alex_smart··on GNU Turns 40
>It's a decent hook to grab your attention while still being fully accurate

Well in that case, it had the exact opposite of the intended effect on me.

alex_smart··on GNU Turns 40
What does it mean for one of the most successful and influential opensource projects to not be ready for "prime time"?
alex_smart··on Leaving Haskell behind
> How do you set a breakpoint on an annotation? You can’t, and that’s the issue.

You can set a breakpoint on your normal method and you can see if any proxy object was introduced by the annotation in the call stack and set a breakpoint there. You can also just see the usages of the annotation to see where and how it is being used and set a breakpoint there.

Anyway, going back to my original question, similar criticism is equally valid when you do metaprogramming in lisp/python/ruby. Why are these concerns only raised in the context of Java?

alex_smart··on Using LD_PRELOAD to cheat, inject features and investigate programs
It was, and great colleagues too! Although this wasn't "assigned" work. Just me being curious/bored.
alex_smart··on Using LD_PRELOAD to cheat, inject features and investigate programs
>Which is unambiguously not the case, they merely slow it down by a small margin.

When you are using shared libaries, it is fairly trivial to hook into the library calls and replace them with whatever you want. When you are using static libraries, the linker and optimizer could for example inline the machine code directly in the application code. What tools do you have to do similar tricks with statically compiled binaries?

alex_smart··on Using LD_PRELOAD to cheat, inject features and investigate programs
This reminds me of the first internship I did. It was at an AI based anamoly detection startup. Their pipeline for the biggest client used to run in just under 3 hours, most of which was apparently spent extracting meaningful information from sensor data from a proprietary binary format using a shared library provided by the client. Ran it under perf and found that most of the time was spent calculating a bunch of sines and cosines. Used the LD_PRELOAD trick to log the sine and cosine calls and turns out that we were just calculating the sines and cosines of the same set of angles over and over again literally thousands of times. Wrote a wrapper to cache the values of sines and cosines in a table and return the cached value if it is already calculated and brought the running time of the pipeline to under 15 minutes. Which meant that the data science team could run their experiments and iterate on their model much faster and cheaper. Fun times.
alex_smart··on What's new in Emacs 29.1
Emacs is literally the best self-documenting system in the world - zero exceptions. You can easily see the documentation of every function which usually explains what it does and what each parameter is for. And in case you are not satisfied with that, you can quickly jump into the definition and see the code for yourself.
alex_smart··on Leaving Haskell behind
> Dependency injection and annotation-driven development is “magic happens here” that is hard to analyze when something doesn’t work

I don't quite get the criticism against annotations. Metaprogramming and code as data seem to get a lot of love in the context of lisp, python or ruby, but a lot of hate when it happens to be done in Java. I absolutely love the powers that reflection, annotations etc give me.

The difficulty of analyzing dependency injection and "magic happens here" is overstated. Just run the code in the debugger. And if you are having problems with the auto-configuration stuff, you can always selectively disable it and explicitly define the beans you need.

alex_smart··on Leaving Haskell behind
That maven link is perhaps not the most useful, but it is not hard to find better-written articles. For example-

https://docs.github.com/en/actions/publishing-packages/publi...

The steps are roughly: 1. Configure the repository you want to push to. 2. Set up your account with the repository. 3. Configure your credentials. 4. Deploy.

alex_smart··on Leaving Haskell behind
What is wrong with Java's tooling?
alex_smart··on Mastering Emacs
I love both my Emacs and the Jetbrain IDEs.

There is not a single modern tool that beats Emacs in ease of customizability and extension.

alex_smart··on Complexity theory’s 50-year journey to the limits of knowledge
My comment was not meant to be snarky. I actually got the (incorrect) impression from reading your comment that P = NP would imply a polynomial time algorithm that decides SAT. I decided to look up a more authentic source and shared the best resource that I could find.

I am guessing you took offense at the "an actual complexity theorist" part of my comment, but it wasn't a personal remark against you. The general audience of hackernews is programmers and startup enthusiasts.

>I'm more than qualified enough to understand and present well-known complexity results from half a century ago, even when a misguided appeal to authority is at play.

All the more reason you should not be so insecure and automatically assume the worst about other people's intentions. *

* This time the snark is intentional.

alex_smart··on Complexity theory’s 50-year journey to the limits of knowledge
Relevant blog post by an actual complexity theorist: https://blog.computationalcomplexity.org/2018/10/if-pnp-then....

>The following does not quite show it can't happen but it does give one pause: an old result of Levin's shows that there is a program you could write NOW such that if P=NP then this program decides SAT except for a finite number of formulas (all of which are NOT in SAT) and can be proven to work in poly time (I will later give three pointers to proofs). The finite number of formulas is why the people above may still be right. But only a finite number- seems like a weak kind of nonconstructive.

So, based on this post, it is actually not known that P=NP implies existence of polynomial time algorithm for deciding SAT. The universal search idea only yields a polynomial time algorithm that decides SAT for all but a finite number of formulas.

alex_smart··on Emacs 29.1
Eclipse and vscode are the same type of IDE? What?
alex_smart··on Grammarly will discontinue the Text Editor SDK
Aren't the two of you saying the same things?
alex_smart··on Pricing Money: A beginner's guide to money, bonds, futures and swaps
Rural India (unlike urban India) is relatively high trust environment. Everybody knows each other and there are lots of shared ethical values. But they still have to build their houses one brick wall at a time (lack of access to home loans) and be at the risk of financial ruin due to unpredictable life events (lack of access to insurance).

Urban India is a very low trust environment, but people still have access to things like home loans, insurance and capital markets (equity and loans).

> lack of good governance (bad or non-existant laws, corruption etc)

I agree that good governance is a necessity for development of financial markets, but not sure what it has to do with being a high trust or low trust society.

alex_smart··on Pricing Money: A beginner's guide to money, bonds, futures and swaps
This is exactly the why and how of "travel broadens the mind". You only have to visit countries and socities that do not have well-developed financial markets to directly see and appreciate the value financial markets bring to your own society.

Visit a part of the world where most people do not have access to home loans, health insurance etc. and you will not have to ask how mere redistribution of risk and capital adds to productivity ever again. (I happen to have been born one such part of the world.)

alex_smart··on A terminal case of Linux
I have honestly not seen a more egregious case of "premature optimization". Who the fuck cares about 1% extra performance on something they are doing on the interactive shell? (And the answer wouldn't even change if the performance difference was 100%.)

What an utterly useless thing to get pedantic about.

alex_smart··on How the lemon was invented (2018)
So, we just posting from r/popular now? Wtf?
alex_smart··on Pharo 11
Pharo by Example is a good book to start with.
alex_smart··on India’s religious AI chatbots speak in the voice of god – and condone violence
I fail to see how and why that particular reply is considered problematic at all. Is not the duty of Ukranian soldiers to fight off and kill the Russian soldiers invading their country? I would argue that the answer is consistent with most people's moral position regarless of religious background.
alex_smart··on Show HN: Frogmouth – A Markdown browser for the terminal
Soon, browse the web and watch youtube vidoes inside your terminal.
alex_smart··on DuckDuckGo removed the ability to filter search results
That isn't how the quote feature is supposed to work. I just tried putting the individual keywords in quotes ("lowes" "pet" "bedding") and it works exactly like you would expect.
alex_smart··on A Mulching Proposal (2019)
Yes, I am sure that westerners are saying ghee wrong. The sounds they make when they say "ghee" maps to a completely different (non-existent) word in Indian languages

It's the exact same way Indians mispronounce many English words when they map it to some equivalent native sounds.

alex_smart··on A Mulching Proposal (2019)
>I just looked up a youtube video of the pronunciation in Hindi and g is pronounced basically the same way as I say it in northeast Ohio, which is generally pretty close to standard American english.

If you think that, your ear is simply not hearing the difference because the sound does not exist in your language.

The Wiktionary is in fact listing two different pronunciations of the word. The one mentioned under South Asia is the correct one.

alex_smart··on A Mulching Proposal (2019)
It is like goat but more voiced, with a hint of h. In Indian languages there are four different g-like sounds (two that are somewhat like g as in goat and two that somewhat like g as in George).
alex_smart··on A Mulching Proposal (2019)
That pronunciation is incorrect.
← PreviousPage 6 of 19Next →