Hacker Newsnew | past | comments | ask | show | jobs | submit | djstein's commentslogin


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!



The way to go with this is to still use a grid, but make the row/col values be css variables ( "var(--foo)" ) instead of fixed values.

Then you can update the value of just that variable from JS, and the grid will reflect it.


I was surprised to not see the author call out how amazing template areas are for responsiveness. Using media queries lets you define different grid areas for different screens and then your elements can be moved to whatever layout you'd like for that screen size. If you need to hide an element at a certain size just give it display: none at that size.

Here's a very simple example: https://codepen.io/trescenzi/pen/vYqpjvL.


The author shows media query examples like that in 6.2 and 6.4.

But I thought that using screen size media queries is an anti-pattern, and that we should be aiming for fluid design without arbitrary breakpoints.


That’s how I understood it too and it works. But the navtoggle and maybe asides need the width trigger it seems. I want to learn named areas in grid and just use that. Going to read the article and do that.


I believe that many such cases can be solved by using :had() and/or subgrids, but I do not have too much experience in this


Have you tried media queries?


I have zero clue why this is downvoted. You can combine media queries and grid template areas to obtain arbitrary cross platform layouts without a single line of javascript.


i actually like this on mobile for a file browsing system


love to see this running as a django app!


why specifically django?


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!


We were using a CPU core vendor's compiler with flexlm licensing(well, Edison Design Group frontend and proprietary backend). We kept using it for ages because it regularly beat GCC due to some issues in GCC with register allocation and instruction reordering that only microchip seems to have ever fixed.

A traditional makefile like setup would only build one compilation unit per compiler invocation.

Each compiler invocation requires a license checkout over TCP. This was badly impacted by Nagling and delayed ACK. The license server was not managed by engineering rather the IT department so we were unable to get them to enable TCP_NODELAY.

Multiprocess scaling was challenging - you could give the compiler multiple compilation units, but sometimes doing so would effect the order of things in the object file, now you lose reproducible builds. These seemed to always be minor things that didn't significantly effect the executable, but rarely you'd crash the compiler and all its jobs would need restarted on the next rebuild.

For those of us batching our compiler invocations for local development builds, the last straw came when an ops team unfamiliar with the tools was put in charge of license management. They started kicking out license checkouts beyond a few seconds in the name of fairness. Build times increased further, but license checkouts per second went up so they thought they were helping.

Eventually I realized it wasn't the 1970s anymore and since I no longer smoke I was bored out of my skull just waiting for timesharing computer to compute again.

Several teams did move to GCC when it got bad enough - hand tuning loops and such when needed.

Probably shouldn't've had so much code in headers - APIs had a lot of dependencies and when I needed to change CompanyName.h, I was in for a few 90%+ rebuilds.

It was a combination of: not my problem, nobody's problem, I got mine, codebase is already like that, death by a thousand cuts, we've never better so how can you say this is bad, network latency.


It’s crazy that in 2024 we are still struggling with the kinds of things highlighted in your comment. Almost all are self-imposed pain, too.


Mercury also rolled this out recently. got the email yesterday.


Given the timing, I wonder if this has anything to do with compliance of FinCEN's new Beneficial Ownership Information Reporting requirements.


I think this is exactly related to that. Someone was whining in a different post yesterday for similar new requirements from google to publish an app on the Play Store and they felt that was "discriminatory" and devs should "band together to sue them".


Thanks for reminding me, I also got an email from Google about that. It seems like there is a larger force at play rather than a coincidence that all of these companies suddenly have similar requirements.


Yes, there are new reporting requirement effective Jan 1 2024 in the US that entities that do business here have beneficiaries registered https://www.federalregister.gov/documents/2022/09/30/2022-21...


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


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

Thanks for this. It's exactly the the format and depth I wanted.

I haven't been able to muster the time or energy to start digging into the quagmire that is the Python ecosystem but this seems like the perfect place to start (and hopefully stay for a while.)


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


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]


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: