HN user

djstein

193 karma

cto primitive.tech steins.studio

Posts11
Comments124
View on HN
CSS Grid Areas 2 years ago

while I love CSS Grid and Areas I still think the hardest part is managing responsiveness especially between mobile and desktop sizes. I find that grid-template-area and the rows / columns sizes needs to be updated via JavaScript based on what UI elements should be open / full screen

I haven’t found a world where minmax or calc fixes this. hope someone has answers!

hey! would love to hear your experience about this. we’re building a system that should help alleviate this pain when developing embedded systems. emails / cal link are within my person site on bio!

Hey HN, wrote up a guide on how I've been creating Python Docker images. I seem to always need to install a software dependency that forces me to break out of the basic Python tags. A great example is installing Node and Python at the same time or creating containers that can use PyTorch.

Love feedback to on how to make the image better if you've got any!

I’m happy others are writing on this subject! I appreciate your enthusiasm for trying to do the most “basic” things in Python. While I personally enjoy a bit more management with tools like Poetry, I believe all Python programmers should know how pip and setuptools work before trying their supersets.

To add to this discussion, I recently wrote this less wordy guide on macOS Python setup https://steins.studio/technical/01-python-setup

waited a long time for this since they first demoed it at react conf 2018? in vegas. this was the last piece in the SSR + streaming + suspense holy grail. looks like the pieces are all finally done. congrats on the launch

Django 5.0 3 years ago

for those keeping up with Django’s async story the biggest updates with Django 5.0 are:

The new asynchronous functions are now provided, using an a prefix: django.contrib.auth.aauthenticate(), aget_user(), alogin(), alogout(), and aupdate_session_auth_hash().

AuthenticationMiddleware now adds an HttpRequest.auser() asynchronous method that returns the currently logged-in user.

[Edit: paste wasn’t the full sentence]

nope. I spoke to HR regarding this after my manager threatened to fire the whole team and said we could not take vacation the entirety of next year. This was after repeated similar comments and hostility. I was promptly let go this week. So to be clear, don’t talk to HR either if you feel unsafe.

for those wishing to use http3 with a Python web framework, the ASGI hypercorn[1] currently supports it.

made a Django example last week with a sample client based on the examples from aioquic[2]: https://github.com/djstein/django-http3-example

this example also includes the first pass at async Django REST Framework using adrf[3] based on these GitHub issues:

- https://github.com/encode/django-rest-framework/pull/8617

- https://github.com/encode/django-rest-framework/issues/8496

sources

[1] https://github.com/pgjones/hypercorn

[2] https://github.com/aiortc/aioquic

[2] https://github.com/em1208/adrf

Location: San Fransisco

Remote: Prefer in Person! Would love to work with folks in SF proper or NYC

Willing to relocate: relocate for NYC only

Technologies: (I'll keep it short) Distributed Systems, Prototype Hardware Management, Customer Facing CLI tools, Kubernetes, GraphQL, Django, NextJS, react-query, React, Python, TypeScript, Linux systems

Résumé/CV: https://www.dylanstein.dev and https://www.dylanstein.dev/resume

Email: dylan@steins.studio

I create full stack applications that use frontends and CLI tools to allow users to interact with experimental hardware. I have an expertise in deploying apps end to end with a focus on user interaction.

- at Apple I built a system that took logs and data upon runtime exceptions from autonomous robots and would that data over LTE to a processing system. Built on device daemon, API, NextJS UI with web socket frontend for auto updates, Kube deployment, etc. This allowed engineers to fix bugs as they happened, instead of waiting for a full ingestion pipeline.

- (abstract) at Tenstorrent and Apple, I have built systems that handle the lifecycle of experimental hardware distributed across labs and data centers around the world. Leveraging Kubernetes we can connect Unix like hardware to experimental hardware. Create UI/CLI for viewing, reserving, and provisioning said hardware. Use UI/CLI to run customers code in containers against said managed hardware. My system at Apple managed the hardware behind SPG's testing suite.

I've decided I'm going to start interviewing with a set of PR's per each role we hire for. each PR will have obvious mistakes, complicated logic problems, as well as code that could be "refactored" once the whole PR has been read.

this provides a few things; it gives us an ability at how the interviewee problem solves. next we can see how they respond too obvious fixes (would they be someone you'd want to send a PR too?). finally, it tests their knowledge of the language and APIs, hopefully much better than Leet Code can. I would also like to see if the user can spot obvious bugs in the setup code (say, package.json, pyproject.toml, etc)

I am going to make an example PR for: - frontend (React/NextJS, TypeScript, CSS) - backend (Django, Python) - DevOps (potentially some Pulumi code for deploying to a Kubernetes cluster?)

Tqdm (Python) 5 years ago

this looks like a fantastic tool! would love to use this in some Python CLI's to help users understand the progress

The strangest part of this dataset to me was tests being run using Daphne with Starlette, instead of Django. Unclear who would reach for that combo in production, since Daphne is meant for Django.

Heard from HN. Saved up a ton of money in college for one. Miss how good the original beds used to be. We went with another 3 years after our first in 2013 and it was horrible in comparison. Used to recommend the brand to everyone until that point. Sounds like you made a great exit however

Current stack for creating easy to use GraphQL APIs + Frontend Integration:

- Django 3 backed with a Postgres database (standard stuff) [0]

- Add Graphene to enable Relay [1]

- Setup a fresh TypeScript based NextJS project [2]

- Add graphql-code-generator with a few plugins, mainly the graphql-request one [3]

- THE MAGIC: Generate your sdk by pointing graphql-codegen at your Django GraphQL schema!

- Add react-query, use the newly generated graphql-request client [4]

From here you've enabled the best of frontend technologies (NextJS, react-query) with a fully typed SDK generated by your familiar Python/Django bindings.

You can then move forward to add GraphQL based WebSockets via django-channels [5] + django-channels-graphql-ws [6] that update your existing react-query caches. Combine this with background Celery workers that make push to django-channels via Redis and you've got a a UI that auto updates based on background tasks as well.

[0] https://www.djangoproject.com

[1] https://docs.graphene-python.org/projects/django/en/latest/

[2] http://nextjs.org/

[3] https://www.graphql-code-generator.com

[4] https://react-query.tanstack.com

[5] https://github.com/django/channels

[6] https://github.com/datadvance/DjangoChannelsGraphqlWs

[Edit] Line formatting