HackerTrans
TopNewTrendsCommentsPastAskShowJobs

throwaway34241

no profile record

Submissions

New malformed Wi-Fi name bug can require iPhone factory reset to fix

appleinsider.com
5 points·by throwaway34241·5 năm trước·4 comments

Impressions of Swift from Go

forloops.substack.com
2 points·by throwaway34241·5 năm trước·0 comments

comments

throwaway34241
·4 năm trước·discuss
Sure, I’ve used a variety of other languages (C#, Java, Swift, C, even Scheme etc) and like Go, and even chose it for a solo project.

To me it feels like C with some extra features, kind of like Objective-C. If you need to do some C-like things but can afford the small latency etc overhead introduced by Go, what Go provides (GC, large standard library, green threads, package management, etc) feels like absolute luxury compared to using C. C# is another GC language with the ability to go lower level, but the syntax can also be pretty verbose.
throwaway34241
·4 năm trước·discuss
If you’re in the market for an ergo keyboard, I’ve used and liked the Kinesis Freestyle for years now. It’s a fully split keyboard with a staggered layout - I use it in a tented setup, and the ergonomics have been good while it’s similar enough to regular keyboards to not make switching back and forth too difficult.

I’ve tried the mechanical (red switch) version, but actually prefer their membrane version because it’s quieter and I like the tactile feedback better (I haven’t tried the brown/blue switch models though).
throwaway34241
·4 năm trước·discuss
> I'm not sure what the difference is with regards to pointers.

In C# most objects are 'class' objects, which are implicitly passed by pointer, although some are 'struct' objects passed by value. In Go rather than making the decision once at the type level, the decision to pass by value or pointer is made explicitly every time an object is used.

> I'm not sure that Go really had anything to figure out or invent

If you look at the discussions for Go (which started as early as 2009 [1]) [2] [3] [4] [5] generics seems as big or a bigger project as the other improvements made to the language over the last decade. My impression is there being a broad spectrum of potential trade-offs across compile speed, execution speed, convenience, etc.

The totality of the prior art here is above my pay grade, but I can quote the Haskell people they roped in [4]:

> We believe we are the first to formalise computation of instance sets and determination of whether they are finite. The bookkeeping required to formalise monomorphisation of instances and methods is not trivial ... While the method for monomorphisation described here is specialised to Go, we expect it to be of wider interest, since similar issues arise for other languages and compilers such as C++, .Net, MLton, or Rust

I think C# occupies a fairly nice design spot also (and takes advantage of its class/struct system to get fast compiles but also performance when needed). But it's not like the C# design couldn't be improved on. As far as I know you still can't write math code that works across 32 and 64 bit floats. And array covariance is implemented in a way that isn't type-safe and relies on run-time checks and exceptions. [6]

[1] https://research.swtch.com/generic

[2] https://docs.google.com/document/d/1vrAy9gMpMoS3uaVphB32uVXX...

[3] https://go.googlesource.com/proposal/+/master/design/go2draf...

[4] https://arxiv.org/pdf/2005.11710.pdf

[5] https://go.googlesource.com/proposal/+/refs/heads/master/des...

[6] https://codeblog.jonskeet.uk/2013/06/22/array-covariance-not...
throwaway34241
·4 năm trước·discuss
I think C# might be the closest mainstream language, but I’d say explicit pointers, interior pointers, and slices as the default list type might be things that make Go programming a little lower level.

There are also other differences that would prevent using C#’s system as is - Go doesn’t have the reference/value type dichotomy or inheritance. I think they also wanted to be able to abstract across float/doubles etc (unless C# added that recently).

Anyway I like both languages and I’m not trying claim one is better than the other, just trying to explain the design space Go seems to occupy.
throwaway34241
·4 năm trước·discuss
I’m not going to defend what random internet commenters may have said, but in my view the core team has been fairly consistent and their design decisions (to me) make sense.

The first thing to understand is that Go occupies a space lower level than Java but higher level than C. It includes things like explicit pointers and more control of memory layout.

Many of the design decisions make no sense without that context. Go can’t simply copy generics from Java or memory sharing from Erlang, since the design decisions made by those languages would introduce too much overhead in a language intended to be lower level. In a lower level language more aspects of how a program executes are specified explicitly, rather than accepting more overhead or guessing what a complex optimizer will do.

On generics, I think the team’s position has mostly been that it’s a big project and there’s been other priorities like rewriting the compiler in Go, improving the GC, etc. And that in the spectrum of trade-offs for generics systems they didn’t want to go all the way to Java or C++.

I feel like a lot of HN commenters compare Go to higher level languages and find it lacking, which may be a fair assessment for certain problems but isn’t really understanding the niche it tries to occupy.
throwaway34241
·5 năm trước·discuss
I agree, it seems like an editor based on direct AST manipulation could work pretty well with existing languages (I actually prototyped one a long time ago in university). Some languages like C with text-based preprocessors might cause some headaches but there are others that probably wouldn't be too bad.

There's pretty far you can go with text-based formats since you aren't obligated to display the file exactly as it's stored on disk (and many current IDEs do minor code folding things). For example embedded images can be displayed inline in the source code, but be stored as some loadImage() function on disk. You could even have some comments with base64 binary data if you really needed - at that point binary vs text is mostly a performance issue, but parsing is usually pretty fast so being text-based might still have an advantage because of better interoperability with source control etc.
throwaway34241
·5 năm trước·discuss
> The second part looks to be more interesting: I’d like to see some arguments for why a LVT wouldn’t just be passed along to the renters like every other expense is currently.

I think the general idea goes something like: a new apartment can collect $10k/mo rent, and so after construction expenses a developer can pay say $5k/mo for the land. These numbers don't change with a LVT or not.

Without the LVT, the $5k/mo that they can afford translates to say a $500k mortgage, which roughly determines the land price (as multiple developers bid for the same land).

With a LVT, there's say a $2k/mo tax, so they only have $3k/mo to pay the mortgage, which translates to a $300k land price using the same logic.

So by working backwards in this simple thought experiment the LVT is just reducing the value of the land without changing much else about the housing market. Intuitively it also sounds reasonable that taxing land values might reduce land values as a result.

I'd be interested to see the upcoming detailed analysis though.
throwaway34241
·5 năm trước·discuss
I agree that people have experiences, but I don't understand why they must be magical or non-existent in the physical world. Why can't the word "experience" simply be referring to the physical processes that happen when our mind/body is in some particular environment?

Certainly physically ingesting a small amount of certain psychedelic chemicals can have profound effects on subjective experience, so it can't be too disconnected from physical processes.

The whole issue of qualia / experiences seems like it is an extension of the dualist/materialist perspectives rather than something that sheds light on it one way or another - dualists will view qualia as something non-material and so something that materialism can't explain, and materialists will view qualia as something material along with consciousness itself.
throwaway34241
·5 năm trước·discuss
There are a lot of levels of "thinking" across the animal / insect / even plant kingdoms. The simplest levels of stimulus response (like a venus fly trap closing its mouth) don't seem to require a metaphysical explanation. But insect behavior is more complex and mammal and human behavior even more so.

At which level do the existing rules of the material world start to seem less plausible to you than a second unseen world with different rules, that interacts with this one under specific circumstances (if that's what you mean by dualism)?

As we can presently see with computers and machine learning, pretty complex behavior is possible through systems that operate via known physical processes.
throwaway34241
·5 năm trước·discuss
To add to adgjlsfhk1’s answer, if you are writing Android games you are probably using a cross-platform game engine that doesn’t use Java (like Unity) which solves the issue but more importantly also allows you to sell your game on iOS without a re-write.
throwaway34241
·5 năm trước·discuss
For memory layout C# actually has an important difference in that it supports value types (so you can have an array of vertices without individually allocating each one, which has a lot of overhead and drastically reduces cache efficiency). They’ve been working on adding support for that to Java for some time but it’s not in yet.
throwaway34241
·5 năm trước·discuss
> Being able to have many GCs is a good thing.

The only advantage I can think of to having a single GC is with using 3rd party packages. If the trade off is always low latency and throughput then libraries know to target that when optimizing, otherwise it’s less clear what to benchmark with.
throwaway34241
·5 năm trước·discuss
> Liberal market based societies / economies have many failings, and would be a very interesting conversation to explore some of these.

On an absolute basis maybe, but on a relative basis I'd say they've been very effective. But as you said that's a different conversation (which if you want to have off HN, my email is in my profile!).

> worst case they fail and some of the other XXX universities in this country will raise to the occasion and take their place. What's the big deal?

> They are so self evidently righteous that no cost is too high

> the only hope becomes, tragically, total collapse.

Well, I didn't mean to minimize it exactly, just that mass de-industrialization and 3rd world status is probably going too far.

One of the hallmarks of extremism is the view you refer to that "no cost is too high". Sometimes this is about boosting the general welfare, but more often it is about a (perceived or real) threat. If every win by the right is a slippery slope to fascism, deplatforming becomes easily justified. And if every win by the left is a slippery slope to communism, it becomes easier to tolerate public undermining of the traditional checks on power, that depend on public support to be effective, like elections / the courts / legislature / (even the same side) media, etc.

The problem is as extremism increases, the threat to the other party becomes, increasingly, real. And the case for further authoritarian measures or undermining the existing system becomes more logical.

I have two issues with this accelerationist scenario. One is that the escalation is inevitably bi-directional in the end, and it is difficult to predict which faction (if any) will win, only that they are more likely to be authoritarian.

The second is that I don't see crisis as something that necessarily leads eventually to positive reforms. I think it is fully possible to have a crisis, then have things be poorly functioning for quite some time. Crisis aided the Soviet Union's fall but it also aided its rise.

In the US, the process of escalation seems to be well on its way, and to me seems more likely to lead to crisis in the medium term than incremental reforms (in any direction).
throwaway34241
·5 năm trước·discuss
Sure, the US is certainly not immune to that dynamic. For example dysfunctional regulation restricts the housing supply (in certain areas), causing the prices to be high. Then left-wing politicians will point to the high prices as a failure of capitalism and oppose new development.

But the political coalitions here (and even the economics) are somewhat complicated. For example, California recently passed several bills to de-regulate housing, which were initiatives of (a sub-faction of) the left-leaning party that controls the state. And the right-leaning party is not a technocratic one like Singapore - an important sub-faction of the right-leaning party goes against advice by economists themselves, on macro issues and increasingly on trade also.

The non-economic factions are more poised to benefit from dysfunction, and in my view, also more likely to cause dysfunction, and so enable each other. So my view is also more similar to a tailspin than a pendulum. Just that it is not as simple as trying as hard as possible to displace the establishment, because the people best positioned to replace them are often worse.

There is another, darker, argument, which I've seen presented by some fairly well-informed people. It goes something like this: the industrial revolution, with its huge inequality, financial crash, and the eventual fall to authoritarianism around the world, is, in fact, the natural order of things. And this has been papered over by massive economic distortions by governments starting with WWII, along with perpetually increasing debt levels as interest rates decline (which since debt and savings are two sides of the same coin, allows overall savings to increase and makes things less zero-sum).

With this premise, there is no natural politically-stable state to return to, and the path for managing outcomes that maintain public support for capitalism becomes even more narrow. I'm still thinking about it, but (unfortunately) I've found the arguments pretty compelling (from billionaire capitalist Ray Dalio [1], among others).

[1] https://economicprinciples.org/
throwaway34241
·5 năm trước·discuss
> This is the very tangible result of suboptimal choices.

I agree - I've always liked that story about the grocery store.

I don't think bad policies are something that can be straightforwardly extrapolated into a course to the Soviet Union though. The US has had price controls in the past but backed off. Even large welfare states like Sweden eventually hit a point where they stopped or turned back the expansion of the public sector (reducing marginal rates, eliminating wealth taxes, spending as % of GDP leveling off, etc).

The Soviet Union even collapsed while it was heading in a more positive direction from where they were at (reducing state political and economic control).

So there doesn't seem to me to be a straightforward connection between incremental policy changes and collapse.

I don't see a clear connection between collapse and subsequent "steering back" either. Support for the market economy and multiparty democracy in Russia are both at record lows [1]. Venezuela has undergone an economic collapse but is still very dysfunctional. Neither seems on track to catch up with western countries any time soon.

It's interesting to contrast this with China, which had similar issues to the Soviet Union (of having an inefficient state-run economy) and had heavy debate about how to go about reforming it [2]. At least for their economic prospects the incremental path they chose seems to be working out better.

[1] https://www.pewresearch.org/global/wp-content/uploads/sites/...

[2] https://www.amazon.com/Escaped-Therapy-Routledge-Studies-Chi...
throwaway34241
·5 năm trước·discuss
I think it's useful to explore historical perspectives, but there are many others. If I look at my parents' generation in the US, people were being forced against their will to fight overseas in a war that didn't achieve anything (and involved mass poisoning the crops of substance farmers). You had double-digit inflation, rationing gas by license plate, and, at points, literal price controls.

Before the baby boomers we had global war, before that the great depression and growing literal communism, before that prohibition and the mob. And of course prohibition was prompted by social problems around alcohol.

So I don't think "problems compound" is always true. For a long time, teen pregnancy and alcohol use were on the rise, but that trend didn't continue indefinitely, and both have relatively recently had dramatic declines.

If you look closely enough at any time period there are often multiple serious political, economic, and/or social problems, so much so that it seems to be the norm rather than the exception.

> Post-stalinist Soviet Union, while not manically murderous, eventually imploded under the weight of a myriad suboptimal policy choices

Even this I'm not so sure. Here is a graph of their GDP [1]. My understanding is it was a political collapse first (a failed coup), and the economic collapse followed. An example that I've read China has been very mindful of (apparently Xi talks about Russia much more in his books than he does the US).

> I do wonder how US/China rivalry will play out in the 2040s and beyond.

Me too, at that point they'll probably be a much larger economy than the US. Will that have a destabilizing effect (especially with a potential military conflict over Taiwan)? Or will (the US) having a shared rival be somewhat unifying? The UK did OK despite declining in (relative) importance, but I could imagine the US struggling with its domestic problems even without any great power rivalry...

[1] https://en.wikipedia.org/wiki/File:Soviet_Union_GDP_per_capi...
throwaway34241
·5 năm trước·discuss
The corporate world isn't a bad analogy. But corporates are still by and large very profitable, some companies operate as they always have (although that isn't newsworthy, and it isn't a marketing point), and on this specific topic (testing) leetcode type questions are still ubiquitous.

If social trends seriously impaired companies' competitiveness I might expect to see the companies that are more on board underperform. But when I think of recent corporate failures (maybe Google failing to compete with FB on chat / VR / Google plus etc), garden variety mismanagement still seems like it has more impact.

So I also disagree with the policy, but worrying about "transforming the economy to third world status" like the OP seems like it is going overboard. If suboptimal policy choices or social trends destroyed society it would have been destroyed a long time ago many times over (and San Francisco wouldn't be a startup hub).
throwaway34241
·5 năm trước·discuss
> So the price of this "equity" movement is going to be (and always was) mass de-industrialization and transforming the economy to third world status

I also disagree with these sort of decisions but this seems a bit hyperbolic. Certain institutions will probably admit fewer students who are able to excel in those fields, and if the change is large enough it will affect the quality of those degree programs (although in probably any admissions process talented students will be better able to game it).

But the likely eventual outcome to that seems like it would be other institutions attracting the most talented students and professors. It's hard for me to imagine every single university getting on board with this, although I could imagine STEM being increasingly concentrated at universities with that focus like Caltech instead of general liberal-arts schools.

It also might be kind of interesting if the brightest students tried to excel more in things that aren't directly competitive (kind of like Thiel fellows), although I don't think that's the purpose behind these sorts of changes.
throwaway34241
·5 năm trước·discuss
If the government was restricting the supply of cars / TVs / medicine, etc, causing the prices to be high, you could make a similar argument: why not buy the older car / smaller TV / medicine with more side-effects that you can afford?

That might not be bad advice at an individual level. But it still seems more optimal to allow people to produce more supply, so more people can get what they want and/or spend less of their income to do so.

For housing people generally want access to good jobs, shorter commutes, more space, and lower cost. Those all exist on a spectrum, but more supply would allow, overall, more people to get more of those things.

From a philosophical point of view, there's the question of who has a legitimate interest in what can be built... there's the property owner, the people who own houses in the neighborhood, and the people who work there but commute. There's the people who live in the general metro area, where the overall supply/demand will affect prices.

You could even consider the people left behind by "economic geography" - as fewer people are employed in agriculture etc, there are less jobs in rural areas, and as knowledge work becomes more important more jobs are created in large cities with liquid job markets (which can support greater labor specialization).

I think there's a case to be made that all these levels have some reasonable interest in the outcome and not just the local municipal level. And particularly at the local level there may be some bad incentives - approving more housing may generate local downsides like traffic, while not moving the needle too much on prices which may be determined more by the metro area as a whole.
throwaway34241
·5 năm trước·discuss
It's always been incomprehensible to me why they went all the way to production on $500 standalone devices with inside-out tracking but no tracked controllers, then gave up and let Oculus/FB/Meta eat their lunch.

They did the hard part (the inside-out tracking)! And 3D input was obviously a game changer and the future (for VR) to anyone who had tried it out, which included basically everyone who had been to a VR conference at the time (and the tech had been done decently at a consumer level as far back as 2010 with Sony's Move controllers).

Why go all the way to production on a platform that obviously has no future? Why give up right before the basic UX factors are met?

And now they're putting the same person in charge again under 'labs' branding?

It's really hard to be optimistic about this leading to products that go anywhere. Google obviously has tons of tech and talent, but sometimes it feels like they manage to be way less than the sum of their parts due to poor management.