HNHacker News
TopNewBestAskShowJobs

Rounin

88 karma · joined May 22, 2018

submissionscomments
Rounin··on Ask HN: Which are good LINQ equivalents in other languages?
Many other languages have similar mechanisms to the Java streams API. Scheme, and probably Lisp in general, is well known for it. Then we have Ruby, Crystal, Python, D, JavaScript...

I can't think of other languages that have something exactly like LINQ, though, unless you count SQL.

Rounin··on Ask HN: Which are good LINQ equivalents in other languages?
In Java, the closest alternative that's part of the standard language is streams. Off the top of my head, it goes something like this:

List<Integer> numbers = number_list.stream().filter(number -> number > 3).collect(Collectors.toList())

boolean isTrue = Stream.of(boolean_array).anyMatch(Function.identity());

String checkForNull = Optional.ofNullable(some_xml).map(SomeXml::getSomeField).map(SomeField::GetSomeAttribute).orElse("nothing here");

Rounin··on Ask HN: Is taking a US based job not a good idea nowadays as an European?
Perhaps you should consider negotiating a higher salary.

One of the attractions of tech jobs in the US is that their salaries tend to be a fair bit higher than in Europe, so if you're already earning the same amount, it might be worth it to research what other people in similar positions are earning in that area.

Another thing you might consider is getting a bank account denominated in US Dollars, and finding a method of transferring the money that has a lower spread and / or lower fees. But currency fluctuations between USD and your local currency may still be much greater than 3%, which could have a significant impact.

Rounin··on Adding ANSI C11 C compiler to D so it can import and compile C files directly
Well, as mentioned, I got a whole list of different compile-time options to try - no-this and no-that, but the executable still crashed in the end.
Rounin··on Adding ANSI C11 C compiler to D so it can import and compile C files directly
Ah, well, it must have been zig c++, then, necessarily. Was I planning to file an upstream bug? I was unaware. I did contact them about it, actually, but it wasn't solved at the time.
Rounin··on Adding ANSI C11 C compiler to D so it can import and compile C files directly
Not that this is terribly relevant to the discussion, but back in the day, I did try compiling bzflag with zig cc and then with clang, and the first executable crashed, while the second worked.

Despite being told numerous compile-time options to use by different manuals and documents and people on IRC, nothing appeared to change the outcome. It might be due to some undefined behaviour in bzflag, of course, but it made zig cc a non-starter for C.

Rounin··on “This destroys the RSA cryptosystem”
Apparently a newer version of the PDF can be found on the university's website, and the "destroys RSA" phrase isn't found there either:

https://twitter.com/ManishEarth/status/1366906561486983171 https://www.math.uni-frankfurt.de/~dmst/teaching/WS2019/SVP9...

Rounin··on OpenStreetMap charts a controversial new direction
That does put it into perspective. Perhaps one shouldn't be too quick to dismiss it outright.
Rounin··on OpenStreetMap charts a controversial new direction
I suppose you're right. After all, one is a one-time cost, and the other is an ongoing cost. So that's a positive thing, at least.
Rounin··on OpenStreetMap charts a controversial new direction
That's a good point. It doesn't make me more optimistic about the situation, but it's certainly a good observation.
Rounin··on OpenStreetMap charts a controversial new direction
As far as licences go, though, the terms and conditions regulating usage of OpenStreetMap now fill not three documents, but three SECTIONS on the OpenStreetMap Foundation's wiki. However liberal these licences may be, for the money it would cost me to hire a lawyer to read through them, I could just buy access to a commercial service.
Rounin··on The NoJS Club
HTML also has elements such as <video>, <object> and <embed>, some of which have existed for many years already. As far as I'm aware, browsers are free to play any media files included via these tags directly, without relying on any external piece of software.
Rounin··on The NoJS Club
That's not the case at all. Ecommerce is mainly a serverside application. At most, doing everything serverside would introduce some extra lag.
Rounin··on Ask HN: Do you have inspiring spontaneous conversations while remote working?
1. No, I don't miss them. Quite the opposite: Having to handle people who constantly felt the need to provide "feedback" and "input" used to be a big distraction, which is now more manageable due to the slightly higher threshold for initiating communication. The ones who seem to miss these "spontaneous conversations" the most is management, who seem to have been told that we should be made to have them. As for the more enjoyable conversations, they may be less spontaneous now, but remote collaboration tools ensure that they're still possible.

At the office, we usually had such spontaneous conversations around lunchtime, and they were sometimes work-related and sometimes not.

2. From time to time. When I want to talk to someone, I use one of our remote communication tools to have a text chat with them. Some prefer to use a voice chat or telephone call instead. Either way works fine.

Rounin··on Facebook account now required to login to Oculus devices
Your assumption would certainly be a reasonable one, though in today's world, who knows? Many mobile phones, for instance, now try to introduce additional "terms and conditions" before they're willing to work. Who wants to buy a whole Oculus in order to find out whether it feels like working or not?
Rounin··on Facebook account now required to login to Oculus devices
Call me old-fashioned, but does anyone else find it a bit strange that one needs to log in in order to use a display device?

That Oculus had better have some pretty special pixels, if they need a network connection to even be visible.

Rounin··on [dead]
The problem with Plus Codes is that they aren't codes - they're half a code, with the most significant bits cut off and replaced with a location name that often is only found in Google Maps. If these codes are ever going to be useful for anything, the standard will have to be updated to either disallow these half-codes, or to place definite limits on the place names that can be used in place of part of the code.
Rounin··on An interview code submission that wasn’t even submitted changed our process
And let's not forget what kind of treatment awaits you if by some astronomical coincidence you do get hired. There are some shit jobs out there. Highly paid shit jobs, though. So we've got that going for us.
Rounin··on No cookie consent walls, scrolling isn’t consent, says EU data protection body
You realize the linked article IS a cookie consent wall, right?
Rounin··on Ask HN: How to rediscover the joy of programming?
After 20 years of programming professionally, you may have found that a good few of the products you're making and tools you're using aren't ones you specifically enjoy. You may have found yourself at one or more jobs that weren't quite what you were looking for, and staying there mainly for the money, without feeling some of the intrinsic motivation you usually have.

If some of that applies to you, then perhaps the answer is that you should do programming that you enjoy. That could mean doing hobby projects on the side, it could mean trying to start your own business and seeing how that goes, or switching jobs and hoping you get lucky. If programming for 20 years has made you rich, then you could also try living off your savings (and the interest/dividends of what money you invest) and doing some of the above without a 9-5 and seeing how that goes.

Rounin··on Myst Almost Couldn't Run on CD-ROM [video]
I remember working around Riven's disk swapping problem by mounting all of the disks at once in five virtual CD-ROMs. To prevent audio and video crashes, the entire game had to run on one single CPU core. Finally, there was a part when some buttons had to be clicked, but the game only occasionally captured the mouse presses. So I made a button mashing script to work around that.

Nowadays, though, the game runs fine in ScummVM. It's amazing how many games they've saved over the years. Myst III runs in a similar project called ResidualVM.

Rounin··on Ask HN: How to explain job gaps on the resume?
You could just say what you just told us - that you took a break for a medical reason, and then chose to take some extra time off. There is something to be said for not trying too hard, but focusing on going to interviews and enjoying the experience. Having 5+ years of work experience is said to be a huge advantage as well.
Rounin··on The BLAKE3 cryptographic hash function
Regarding the speed, meow_hash is certainly performant, but when hashing a single file, b3sum actually seems to be faster, perhaps due to using more threads. Could meow_hash be made even faster by running more operations in parallel?

time ~/.cargo/bin/b3sum ubuntu-19.10-beta-desktop-amd64.iso 0899b731b6b57d75a65273fe29d54802653b3bbe3bae6732140c487c4f0ece71 ubuntu-19.10-beta-desktop-amd64.iso

real 0m0,180s user 0m1,735s sys 0m0,092s

time meow_example ubuntu-19.10-beta-desktop-amd64.iso meow_example 0.5/calico - basic usage example of the Meow hash (C) Copyright 2018-2019 by Molly Rocket, Inc. (https://mollyrocket.com) See https://mollyrocket.com/meowhash for details.

  Hash of "ubuntu-19.10-beta-desktop-amd64.iso":
    E5CC524A-522BDE7E-ED34A277-5C7D73AF
real 0m0,766s user 0m0,119s sys 0m0,645s
Rounin··on Ask HN: How often do you vote on posts in the “new” tab?
You can vote on things? Thanks for letting us know.
Rounin··on Open Location Code: An Open Source Standard for Addresses
There is one significant problem with how Open Location Codes are being used and promoted by Google.

Try to find the following place on Bing or OpenStreetMap without using Google's services: 9MHR+PW Retkowy, Poland

The 9MHR+PW part is readily decodable, and could denote any of thousands of places around the globe. But the most significant part of the code is routinely omitted by Google, and replaced by a place name that one needs Google Maps to look up.

The question is, do we really need another way to link to Google Maps?

Rounin··on It’s hard to have an unusual name in China
Indeed:

$ echo 张𬎆| iconv -f utf-8 -t gb18030 | iconv -f gb18030 -t utf-8

张𬎆

Rounin··on It’s hard to have an unusual name in China
Wow! I take it back! https://news.ycombinator.com/item?id=17623870 gives the character 𬎆. But for whatever reason, 㼆 and 𬎆 are not marked as variants of one another.
Rounin··on It’s hard to have an unusual name in China
For what it's worth, it's there in Unicode, but only in traditional Chinese, so it's 張㼆 or nothing.
Rounin··on John Conway: Discovering free will (2011)
By the way, thanks for the suggestion.
Rounin··on John Conway: Discovering free will (2011)
On second, thought, though, after looking at the paper at finmin's suggestion, I agree that their definition is distinct from randomness in a meaningful and interesting way.
← PreviousPage 2 of 3Next →