sischoel

Joined 13 years ago

Karma
163
Submissions
65
Member since
Dec 27
Github: https://github.com/simonschoelly
View on Hacker News

Recent submissions

Comment · 10 months ago
The issues with auto-translated Reddit pages unfortunately also happens with Kagi. I am not sure if this is just because Kagi uses Google's search index or if Reddit publishes the translated title as metadata.

I think at least for Google there are some browser extensions that can remove these results.

Comment · 1 year ago
Dotted notation would not work because the keys in a dict can also contain dots. I am not terrible familiar with them but there is something called `lenses` that comes from functional programming that should allow you to access nested structures. And I am pretty sure there must be at least one python library that implements that.
Comment · 1 year ago
Or use itemgetter:

  >>> from operator import itemgetter
  >>> dct = {'greeting': 'hello', 'thing': 'world', 'farewell': 'bye'}
  >>> thing, greeting = itemgetter("thing", "greeting")(dct)
  >>> thing
  'world'
  >>> greeting
  'hello'
Comment · 2 years ago
I was looking a bit at the code for the shared memory implementation in https://github.com/3tilley/rust-experiments/tree/master/ipc and the dependency <https://github.com/elast0ny/raw_sync-rs.

My last systems programming class was already a few years ago and I am a bit rusty, so I got some questions:

1. Looking at the code in https://github.com/elast0ny/raw_sync-rs/blob/master/src/even...) it looks like we are using a userspace spinlock. Aren't these really bad because the mess with the process scheduler and might unnecessarily trigger the scaling governor to increase the cpu frequency? I think at least on linux one could use a semaphore to inform the consumer that new data has been produced.

2. What kind of memory guarantees do we have on modern computer architectures such as x86-64 and ARM? If the producers does two writes (I imagine first the data and then the release of the lock) - is it guaranteed that when the consumer reads the second value that also the first value has been synchronized?

Comment · 2 years ago
Comment · 2 years ago
I am not sure if this was the very first paper talking about attention, but https://arxiv.org/abs/1409.0473 from 2014 is a famous one.

What is still missing there, is the idea of self-attention.

Comment · 3 years ago
Do you have any sources on that? The only thing I could find was that some parties want to ban digital billboard in the city of Zurich (not the whole canton).
Comment · 3 years ago
A few years ago I was trying if I could port that code to Linux. I made some decent progress, but in the end I got stuck trying to convert the resources (images and audio files) to a more modern format. For example, the PICT format (https://en.wikipedia.org/wiki/PICT) is not just some pixel encoding but also contains QuickDraw commands. There are some open source converters, but they seem to support only a subset. And then I had to concentrate on finishing my degree so I abandoned that project.

Other things I remember: - Data is mapped directly from files to C structs - this provided some challenges as I had to convert big endian to little endian. - Classic MacOS handled memory allocations quite a bit different, if one wanted to access a dynamically allocated buffer, they first had to acquire a lock on that part of memory as otherwise the operating system was allowed to move the data to some other address.

My memory on these details is quite a bit fuzzy though, so I can't guarantee that what I wrote here is 100% correct.

Comment · 3 years ago
There are some very explicit images for the default prompt when one scrolls a bit around there, can't imagine that OpenAI would not filter these out.
Comment · 3 years ago
When one talks about the average income, does that average only consider people that work? Otherwise, in countries with a high rate of unemployment, I would imagine that a single salary might have to feed the whole extended family, so that one needs to have a salary that is much higher than then average income to be sustainable.
Comment · 3 years ago
It is indeed O(N). There is also a more efficient algorithm (in case the range is small) that uses binary search to find the first index. Such an algorithm would have time complexity O(log(N) + H) where H is the number of elements in the output.
Comment · 4 years ago
From skimming the paper (https://arxiv.org/abs/2211.09055), the proof seems to be amazingly short and relies only on a few theorems that one encounters in introductory class on information theory. Definitely recommendable to read if one is interested in that kind of combinatorics.
Comment · 4 years ago
Why is that though? Wouldn't something like `mov eax 0` also work?
Comment · 4 years ago
Isn't that the case for most programming languages? The only exceptions I can think of are C++ and Rust.
Comment · 4 years ago
Do you know any sources on on how set equivalence theory is related to integer programming? Because I don't see the immediate connection and I could not find anything on the internet, but maybe I used the wrong terms.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton