< Back to the archive

Like what you see? Subscribe here and get it every week in your inbox!

Issue #217 - May 7, 2023

If you are looking for work, check out this month's Who is hiring?, Who wants to be hired? and Freelancer? Seeking Freelancer? threads.

Here are the top threads of the week, happy reading!

Top comment by meew0

Something I'm personally excited about: colour e-ink displays. There are a few decent colour e-ink tablets on the market already, for surprisingly low prices ($400-500). So far the colour reproduction and refresh rate is still somewhat suboptimal, but development appears to be progressing rapidly. I predict that in a few years there will be little reason to get a conventional tablet over an e-ink one, at least for the “reading and taking notes” use case.

Top comment by macrael

Practice "aggressive friendship". People love being invited to things so when you find someone you like, start asking them out. Play tennis. See a movie. Get coffee. Happy hour after work. Walk through the park. Get lunch at work. Be respectful, be ok with a no, but believe that you are worth spending time with. And count on the fact that most folks are lonely too, and will jump at the opportunity to hang, an opportunity you are now providing.

The other thing I'll say is that I feel very lucky to have made friends with people who were already part of a big friend group. It's hard to build your own community from scratch, it is much easier to join an existing one. Birthday parties, shows, cook outs, are group events and making friends with friends of your friends builds out your web.

It's hard work, I was pretty lonely for the first two years after I moved out to the bay knowing no one, but building relationships is one of the most rewarding uses of time I know.

Top comment by thundergolfer

On Modal.com these 34 lines of code is all you need to serverlessly run BERT text generation inference on an A10G (which has 24GB of GPU memory). No Dockerfile, no YAML, no Terraform or AWS Cloudformation. Just these 34 lines.

  import modal

  def download_model():
      from transformers import pipeline
      pipeline("fill-mask", model="bert-base-uncased")

  CACHE_PATH = "/root/model_cache"  # model location in image
  ENV = modal.Secret({"TRANSFORMERS_CACHE": CACHE_PATH})

  image = (
      modal.Image.debian_slim()
      .pip_install("torch", "transformers")
      .run_function(download_model, secret=ENV)
  )
  stub = modal.Stub(name="hn-demo", image=image)


  class Model:
      def __enter__(self):
          from transformers import pipeline
          self.model = pipeline("fill-mask", model="bert-base-uncased", device=0)

      @stub.function(
          gpu="a10g",
          secret=ENV,
      )
      def handler(self, prompt: str):
          return self.model(prompt)


  if __name__ == "__main__":
      with stub.run():
          prompt = "Hello World! I am a [MASK] machine learning model."
          print(Model().handler.call(prompt)[0]["sequence"])

Running `python hn_demo.py` prints "Hello World! I am a simple machine learning model."

You can check out available GPUs at https://modal.com/docs/reference/modal.gpu.

There's also a bunch of easy-to-run examples in our docs :) https://modal.com/docs/guide/ex/stable_diffusion_cli

Top comment by aurbano

This is something I've been thinking for a while for my long term future!

A dream of mine would be to setup a hostel of sorts, with an area for camping, a cafe, maybe food trucks in the summer?, surf/climbing options nearby and perhaps a partnership with schools/guides.

And the main thing: a big hangar to work on campervan conversions, with a ton of tools available and some staff supervision. The idea being that you bring your van, pay some sort of membership/one-time fee and work on it, with our help.

Perhaps do some in-house conversions for clients, but that would be just a side business to help keep things going.

Top comment by jfengel

I wrote a book on that almost a quarter-century ago (Programming for the Java Virtual Machine). It includes toy versions of both a Lisp and Prolog compiler. It can definitely be done.

I don't know if it's worth it to port existing code to the JVM that way. There are so many pitfalls in porting that it's often easier to rewrite it. The older code is, the more likely it has something specific to the compiler/platform/library, and you'll spend more effort debugging that than just using it as a reference for a clean-sheet implementation in a modern language.

I picked Lisp and Prolog because those are languages with a very different style. Compared to that C/C++/Fortran are all kinda the same language. Since then functional programming has taken on a lot more prominence, though logic-style programming still hasn't caught much attention. (The book actually came out of a project to use logic programming as a database query language, and I still feel like that's better than where we are now.)

It blows my mind that the book is still in print, and dribbles out a few copies a year. It does need a good rewrite, since so many of the things I talked about are now practical rather than theoretical. The JVM has some new features for supporting non-Java languages, and there are now standard libraries for manipulating bytecode. (I had to roll my own.)

Top comment by pabs3

Probably the most useful thing you could do would be take any Android device (or iOS device with the bootrom exploit) and rebase the patches for it on mainline, clean them up and get them merged into mainline Linux. Same goes for any other device not supported in mainline really, but Android devices are almost always like this.

Along those lines, look at all the dkms modules in any Linux distro and try to talk to the module authors about mainlining, do the work needed if they agree to it.

Also, I have some ideas for Linux kernel things I noticed are needed in my branches of linux.git. I doubt I'll work on them any time soon, so feel free to use the ideas/code I've left in the branches.

  cleanups/bluetooth-magic-numbers
  cleanups/debian
  features/dmesg-richness
  features/hwmon-streaming
  features/in-kernel-cross-fs-copy
  features/lvm-raid-discard
  features/runtime-syscall-lookup
  features/sys-class-storage
  features/tmpfs-o-discard
  features/tmpfs-user-xattr
  features/usbip-flexibility
https://github.com/pabs3/linux/branches/all

Not directly related to your question, but check out the KernelNewbies community and also some of the FOSS internship programs, especially GSoC and LKMP offer paid internships to work on the Linux kernel.

https://kernelnewbies.org/ https://github.com/fossjobs/fossjobs/wiki/resources#internsh...

Top comment by crote

GSM dongles simply aren't that popular anymore.

Wifi access is near-universal, so the average consumer will pretty much never be without internet access - and their phone is a pretty suitable backup hotspot.

The people who do need GSM-based internet - like surveyors or door-to-door people - are probably better served by tablets anyways, and definitely don't want to deal with a USB dongle. If they have to, they'll just get a laptop with a M.2 GSM card. Whatever remains probably doesn't need 5G speeds to begin with.

So yeah, it's a tiny market. Expect them to be expensive. There's a 5G USB dongle made by Apal available for €400, but that's about it.

Are you sure 4G won't be enough? You can get one of those for €50 or so.

Top comment by JStanton617

Payroll is one of the very few (only?) things that "pierces the corporate veil" - that is, the principals / board members are personally liable even in the event of corporate bankruptcy.

You could engage a labor lawyer, but if this was pre-series A and the founder was self-funding, there might not be any personal assets there either.

If you think the folding of the company is in good faith, you might just want to take the loss on this one.

Top comment by roland35

I am strongly against this question. You're basically looking at who's parents provided an opportunity for them to learn coding early.

I'm sure you would find that most people who started programming at a young age (and are still doing it obviously) are probably better than average and also enthusiastic. However, I think it is still a disservice to anyone who didn't have support as a child.

For the record I was learning basic and programming games on my TI-83 calculator in middle school, so I would probably benefit from this question!

Top comment by VoodooJuJu

When I used to be an overintellectualizing, overacademizing nerd, I would use complex and regimented notetaking and review systems. The whole gamut from trendy notetaking wiki-type apps to flashcard spaced-repetition apps like anki.

These things made me feel like I was learning. Flashcards and notetaking itself were fun games. I felt like I'd stumbled onto this hyper-optimized efficient way to learn whatever I wanted.

That feeling was misplaced.

I threw away all that garbage and just started diving into things after reading/observing the bare minimum to get the wheels rolling. Read a little, act a lot. The acting is the most important part. You want to learn some thing? Just do that thing, repeatedly.

It's inefficient, failure-laden, and it's the best way to truly learn something.

This applies to abstract things too, like math and language. Don't bother making flashcards for theorems, syntax, or word definitions. You gotta do the work. For math, just do a million exercises. For language, read, write, listen, speak. You can flashcard word definitions and atomic little rules all day, and you'll feel like you're making progress, that's how Duolingo reels in so many people. It's an easy way to feel like you're accomplishing, but it's a facade. Gotta just do the work.