HNHacker News
TopNewBestAskShowJobs

extasia

424 karma · joined September 7, 2022

AI doctoral student focusing on health applications.

Former SWE.

submissionscomments
extasia··on CLI tools hidden in the Python standard library
The standard library has type hints in the "typeshed" github repo. Please do not submit PRs to cpython to add type hints (I made this error before too:))
extasia··on CLI tools hidden in the Python standard library
I agree. I made a little code formatter for aligning variable assignments on adjacent lines and used chatgpt for a lot of help with the regex
extasia··on Canada plans brain drain of H-1B visa holders, with no-job, no-worries permits
350? What do you do?
extasia··on Intermittent fasting is as effective as counting calories, new study finds
Aren't those like 100 bucks a pop?
extasia··on Intermittent fasting is as effective as counting calories, new study finds
Goals are important sure. As the commenter above mentioned, most people are above what would be considered an ideal weight for their body. It's a fair assumption that these people would want to lose weight.

As somebody who finds it harder to gain weight, I still recognise that most have the opposite problem and understand that most content will be tailored to the average Joe, which is fine.

extasia··on Ask HN: What is the most enlightening concept that changed how you program?
Minimising complexity by reducing the number of paths (branches, nested loops etc.) through your code.

Thinking of the stupidest way we can get it done and then ruthlessly refactoring until the resulting algorithm / system is as simple as possible.

Edit: point 1 comes from A Philosophy of Software Design. One of my fave programming books of all time.

extasia··on Any Deep ReLU Network Is Shallow
Thanks for the explanation. I've heard this before but think I get it now!
extasia··on Ohio Prison System Bans Java Computer Manual, but Allows Hitler’s Mein Kampf
There's a joke about Java and OOP somewhere in there, trying to break free!
extasia··on A single line of code made a 24-core server slower than a laptop (2021)
I like the writing style of this post, it doesn't gloss over the details and conveys a lot of information from first principles. Good work pkolaczk.
extasia··on Ask HN: What is the most complex software that you have built/worked on?
This is sort of what puts me off trying to do kernel work tbh.. I'm a C intermediate but dealing with mountains of other people's macros scares me to death.
extasia··on Ask HN: What do you put in a “in case of death” file?
"after me, the flood" it's a quote from King Louis the 15th apparently.
extasia··on Ask HN: What do you put in a “in case of death” file?
Before me, the rain?

What does this mean? Sorry, I don't speak French..

extasia··on Nvidia H100 and A100 GPUs – comparing available capacity at GPU cloud providers
What's ViT?
extasia··on Building an Instagram Clone for Puppies Using Courier Inbox, Next.js and Inngest
Sure that's a good point. I remember saying bitterly to a friend of mine that "your hamster doesn't love you, it just has Stockholm syndrome".

Are you against animal ownership in general or just dogs?

extasia··on Ask HN: No raises/promotions until next year. Is this a red flag?
How big is the company?

Did management also forego raises alongside devs?

Whether or not the company is behaving rationally is the wrong question to ask I think, all you can change is how you manage yourself.

extasia··on Building an Instagram Clone for Puppies Using Courier Inbox, Next.js and Inngest
Why so edgy bro? Most relationships between pets and owners are symbiotic!
extasia··on Dating, education, and sex ratios
Tldr, get your degrees up fellas
extasia··on Taurine deficiency as a driver of aging
"snapcaster, flashback counterspell" "gg"
extasia··on Ask HN: Which textbooks gave a new dimension to your thinking process?
I think it would be more accurate to say that you can _describe_ almost any problem using linalg.

Solving them is the hard part;)

extasia··on Ask HN: Code review as part of the peer review process?
I understand that the goals of research code are very different from prod. code, and I suppose that the reviewers would have to tailor their review towards verifying the integrity of the results presented, rather than code quality in and of itself.

Criticism would be moderated through the journal editor, as with typical review comments.

extasia··on Universal basic income of £1,600 a month to be trialled in England
Trial implies some sort of study or analysis that the other two words you suggest don't.
extasia··on Nvidia Started in a Denny’s. Now It’s Worth $1T
I have been to a Dennys. (euro enjoyer here)
extasia··on Show HN: Word2vec Algorithm in ~100sloc with NumPy
It's not a serious implementation but one for didactic purposes:)

I've used gensim's one and it seems great for practical use but I wanted to build an understanding of the underlying algorithm, so built my own from scratch. I was hoping others might learn from it, but it's not really a practical approach to constructing w2v embeddings.

extasia··on 1-liner for viewing the shape of all local Tensors in Python
Using torch and numpy a lot I find myself perplexed about the shape of some torch.Tensors, particularly if they have a non-obvious set of dimensions (e.g a batch dimension or something). I reach for this one-liner pretty regularly so perhaps it can be of use to others:)

Here's an example output:

  Array Shapes:
  ==================================================
  attention1          : Tensor : (8, 8921, 251)
  m                   : Tensor : (8, 8921, 50)
  ŷ0                  : Tensor : (8, 8921, 50)
  ŷ1                  : Tensor : (8, 8921)
  ŷ2                  : Tensor : (8, 8921)
  random_np_arr       : ndarray: (2, 3)
And the code:

  print(f"\nArray Shapes:\n{'':=>50}"); [print(f"{k:<20}: {str(type(v).__name__):<7}:",  tuple(v.shape)) for k, v in locals().items() if hasattr(v, "shape") and not hasattr(getattr(v, "shape", None), "__call__")]  # Exclude the 'numpy' import, the `shape` func. isn't relevant
(semi-golfed to be able to easily run in a `breakpoint()`)
extasia··on Scientists need to get high
What do you mean by self regularisation?
extasia··on Show HN: Word2vec Algorithm in ~100sloc with NumPy
The context for one training step is the target word, plus a window of the `n` words that precede and follow that word.

For example in the sentence:

> Usually titles are more relevant to a document then a random sentence or word in the middle of it

If 'document' is the current target word, we select ["relevant", "to", "a"] and ["then, "a", "random"] as our left and right contexts. These context words and our target word, ["document"] form our 'positive' examples that we want to move closer together in the embedding space.

Position in the text is not used in this algorithm. You're right about titles being more relevant to the meaning of a document but the document isn't important: it's just a resource that we're using to learn which words occur together (and thus are semantically related). The algorithm steps through every single word as a target and thus will inevitably utilize words that were titles just as much as words in any other part of the text:)

Hope that helps!

extasia··on Show HN: Word2vec Algorithm in ~100sloc with NumPy
Do you mean html tags? I'm not sure I follow!
extasia··on Show HN: Word2vec Algorithm in ~100sloc with NumPy
Hi eesmith, thanks for your insight! I've applied a lot of the improvements you mentioned, the collections.Counter one didn't even cross my mind- very neat:)

The lines are processed independently as they are separate sentences. One line may be from one source, and the next from a completely different source. The problem with simply concatenating them is that the target words on the boundaries between sentences can end up with context words from unrelated sentences.

>I liked seeing the 'η' - I haven't yet used non-ASCII in my code!

Then you may enjoy this april fool's python issue I made https://github.com/python/cpython/issues/103172

Yeah, I like using utf-8 chars for mathematical symbols, it makes my brain hurt a little less when mapping between the two! I also like using ŷ for predictions in ML contexts as that's the canonical symbol used in the literature.

extasia··on Show HN: Word2vec Algorithm in ~100sloc with NumPy
In the skip-gram algorithm (aka word-2-vec), words vectors are global; i.e one word maps to one vector.

In practice, as you intuit, contextual embeddings are in fact useful for obtaining more precise word vectors. The example given in[0] is BERT's embeddings, though I would imagine that most NLP applications nowadays all use contextual embeddings since they're a strict improvement over static embeddings.

[0]. https://web.stanford.edu/~jurafsky/slp3/6.pdf (search for 'static embeddings')

extasia··on Scar tissues make relationships wear out (2013)
What is thought is not what is said. What is said is not what is heard.
← PreviousPage 5 of 10Next →