Readit News logoReadit News
clepto commented on Show HN: I Wrote a Book on Java    · Posted by u/goostavos
geophile · a year ago
I am an OOP programmer going back to the late 80s (including the cfront days of C++), and a serious user of Python since 2007.

In Python, I sometimes try data-oriented programming, using lists and dicts to structure data. And I find that it does not work well. Once I get two or more levels of nesting, I find it far too easy to get confused about which level I'm on, which is not helped by Python's lack of strong typing. In these situations, I often introduce objects that wrap the map or dict, and have methods that make sense for that level. In other words, the objects can be viewed as providing clear documentation for the whole nested structure, and how it can be navigated.

clepto · a year ago
I see a lot of people mentioning Pydantic here, but you should take a look into TypedDict. It provides a type structure ontop of a plain dictionary, and sounds like exactly what you’d want, and is a built-in that you don’t need a dependency for.

Mypy for example can also see the types of the dictionary are supposed to be when you use it just like a normal dictionary.

clepto commented on Show HN: Shpool, a Lightweight Tmux Alternative   github.com/shell-pool/shp... · Posted by u/ethanpailes
mikenew · a year ago
This is awesome! I hate the way tmux hijacks so much of my terminal's behavior (scrollback, seaching with escape-/, etc.) and I've been looking for something like this that will manage persistent sessions without any extra nonsense.

BTW I think your readme shouldn't just characterize it as a resumeable ssh tool. I often need to start a long running process that I want to reconnect to later, or I want to put some always-on system service inside a tmux container so I can easily jump in and see logs or mess with things in one way or another. There's a lot of utility besides just handling network dropouts.

clepto · a year ago
I once had a VPN utility that HAD to be closed with a Keyboard Interrupt in order for it to shut-off properly, so my systemd setup for it didn’t work. I ended up making bash aliases for tmux commands to run it and send the keyboard interrupt signal into it to stop it. I’m sure there was a way to do this with systemd, but tmux was easy, if a bit jank.
clepto commented on Discord Rolled Out Yubikeys for All Employees   discord.com/blog/how-disc... · Posted by u/tjwds
xvector · 2 years ago
> We also instruct corporate users to set up Okta Verify for use only as a fallback MFA in the event that all their authenticators fail at once. This way, we never have user accounts lacking at least one strong form of multi-factor authentication.

Might as well not use a YubiKey at all. This just eliminates the benefits a YubiKey would provide. This reminds me of the banks that offer TOTP with fallback to SMS - just turns the "security improvement" into a waste of time and effort.

> We chose [Yubikey C NFC] for a few reasons: [...] 3. It doesn’t support OTP mode, so there’s no “Yubispam” to deal with

I think it does support OTP mode? Using one of these right now and it definitely supports OTP. You can turn it off, but that's not particular to the C NFC.

An aside: YubiKeys are great, I love them... but they need to have a display to show what, precisely, you're authenticating with, or signing, etc. You can never trust your computer's display - Ledger/Trezor's hardware wallets have the right idea. IMO current standards fall short in not providing this information to the hardware authenticator.

clepto · 2 years ago
One problem I have with switching exclusively to Yubikeys(or similar) entirely with no other 2FA option, is the lack of support in embedded browsers.

I’m not entirely sure what the support for this is like on Windows or some Linux systems, but for example on MacOS, if an application authenticates with SSO or something in an embedded browser window(one example would be like Cisco AnyConnect, but there are plenty of others. zScaler did recently update their MacOS client to authenticate inside a real full browser though so that’s nice), most every application I’ve come across uses the stripped down version of WebKit in these that doesn’t support FIDO2 or security keys at all, so I’m forced to use some other option like an authenticator app.

This is perhaps less of a problem depending on what types of auth your IDP supports, but for example with Microsoft it’s either Phone Call or SMS, their Authenticator app, or FIDO2.

clepto commented on De-cloud and de-k8s – bringing our apps back home   dev.37signals.com/bringin... · Posted by u/mike1o1
codethief · 2 years ago
To play the devil's advocate here:

> I aim to keep everything I’m working on using the simplest services possible, essentially treating AWS like it’s Digital Ocean or Linode with a stupidly complex control panel.

What's the benefit of AWS then, if you're not using any of the managed services AWS offers, and are instead treating AWS as an (overly expensive) Digital Ocean or Linode?

clepto · 2 years ago
I’m arguing there’s not a benefit, it’s just the service I have to use for reasons outside of my control.
clepto commented on De-cloud and de-k8s – bringing our apps back home   dev.37signals.com/bringin... · Posted by u/mike1o1
clepto · 2 years ago
Throughout my company’s pursuit of moving everything under the sun into AWS I have done my best to keep everything able to be migrated, we have some systems which are just, simply going to have to be completely rebuilt if we ever needed to move them off of AWS, because there is not a single component of the system that doesn’t rely on some kind of vendor lock-in system AWS provides.

I aim to keep everything I’m working on using the simplest services possible, essentially treating AWS like it’s Digital Ocean or Linode with a stupidly complex control panel. This way if we need to migrate, as long as someone can hand me a Linux VM and maybe an S3 interface we can do it.

I really just have trouble believing that everyone using Kubernetes and a bunch of infrastructure as code is truly benefiting from it. Linux sysadmin isn’t hard. Get a big server with an AMD Epyc or two and a bunch of RAM, put it in a datacenter colo, and maybe do that twice for redundancy and I almost guarantee you it can take you at least close to 9 figures revenue.

If at that point it’s not enough, congratulations you have the money to figure it out. If it’s not enough to get you to that point, perhaps you need to re-think your engineering philosophy(for example, stop putting 100 data constraints per endpoint in your python API when you have zero Postgres utilization beyond basic tables and indexes).

If you still really genuinely can’t make that setup work, then congratulations you are in the 10%(maybe) of companies that actually need everything k8s or “cloud native” solutions offer.

I would like to note that given these opinions, I do realize there are problems that need the flexibility of a platform like AWS, one that comes to mind is video game servers needing to serve very close to a high number of geographic areas for latency concerns.

clepto commented on Even the Pylint codebase uses Ruff   github.com/PyCQA/pylint/b... · Posted by u/thatxliner
charliermarsh · 2 years ago
Yeah we don't support arbitrary Flake8 plugins. We do plan to support plugins eventually but the exact architecture and API are TBD.

If there are plugins that would be particularly impactful for you, I'd be happy to take a look at adding them. (We support some of the plugins you use in SQLAlchemy, like flake8-docstrings and flake8-builtins, but not flake8-rst-docstrings which I'm guessing is a blocker.)

clepto · 2 years ago
Are smaller plugins like this potentially an easy place for first time contributors to work in?

My Rust skills are certainly very lacking but if there is some big list of arbitrary flake8 plugins that there is a desire to have ported, that sounds like it could be a relatively easy place to get one’s feet wet.

clepto commented on Even the Pylint codebase uses Ruff   github.com/PyCQA/pylint/b... · Posted by u/thatxliner
zzzeek · 2 years ago
just tried it and this is immensely fast.

too bad it doesn't appear to support flake8 plugins and only has a small subset hardcoded into it. if it could support arbitrary flake8 plugins I would move SQLAlchemy to this tool immediately.

the main reason people want to move off flake8 is not so much a speed issue but that its author refuses to allow it to use pyproject.toml files for configuration, meaning every project's configuration has to remain half-broken using obsolete setup.cfg files. A very silly situation.

clepto · 2 years ago
I maintain a few open source libraries and we have recently switched to Ruff from Flake8 exclusively because of the lack of pyproject.toml support.

These are relatively speaking small codebases, and the speed improvements really don’t make a difference for us, but with trying to get our own projects in line with current standards flake8’s refusal to support it was the final nail in the coffin.

I think the point was reasonable when pyproject.toml first came about and parsing it was a bit more of a Wild West, I can certainly understand the unwillingness to try and support it then. Now with Python itself having toml support in the standard library, and every other major tool standardizing on it, not to mention TOML being the de-facto config file for Rust projects. It just seems like a bizarre hill to die on to me now.

It’s not as if the work hasn’t been done, there are forks of flake8 with pyproject.toml support, but as far I’m aware multiple PRs with support for it have been denied.

clepto commented on GitHub staff are required to use Teams by Sep 1, 2023   twitter.com/karrisaarinen... · Posted by u/gslin
whatever1 · 3 years ago
How can the company who makes one of the best (if not the best) electron app (vscode), also ship one of the worst electron apps (Teams)?

Can’t they just set up a meeting and and take notes on how the other team did it?

clepto · 3 years ago
They tried to setup a meeting to go over it but no one was able to join because Teams was broken
clepto commented on Open RuneScape Classic   rsc.vet/... · Posted by u/camhart
clepto · 3 years ago
I used to be really involved in RuneScape private server development in the early to mid 2010’s. It is to this day some of the most enjoyable programming I’ve done. The challenge presented by reverse engineering an obfuscated client and building a server framework off of that works almost like a puzzle game.

There were a lot of really talented developers in the space, but unfortunately the predatory donation systems and toxic culture between different servers/projects generally caused the good developers to move away from the community(or be just outright banned from community forums for no sane reason). It’s really nice to see a project in this space building a strong community with good open source culture.

I didn’t see on the website anywhere, but I’m curious if Jagex has given them any kind of permission for distributing the copyrighted assets/client? They may not care since it is focused on very old versions that Jagex themselves don’t even have or intend to profit from ever, but it would be cool to see them actually endorse a community project like this.

clepto commented on Ask HN: Those making $0/month or less on side projects – Show and tell    · Posted by u/code_Whisperer
clepto · 3 years ago
I work on a Python game engine called Arcade[1] and other projects within it's Github organization such as pytiled-parser. We also help to drive continued development and improvement within Pyglet[2]. Recently, my efforts have been focused on creating a version which can be run in web browsers by using Pyodide and WebGL[3], though that is still fairly early stages.

Arcade's primary focus is on being an educational tool for beginner programmers, so my hope is that with browser compatibility we can lower the barrier to entry further and make it more accessible and easy to get started with. In a similar vein to the goals of browser compatibility, we've recently enabled full compatibility with Raspberry Pi through the use of OpenGL ES(and this was largely only possible thanks to the huge amount of work that everyone involved in the Mesa project puts in)

I'm not the original author of Arcade, but I am a current maintainer and put a substantial amount of time into it and it's community.

[1] - https://github.com/pythonarcade/arcade [2] - https://github.com/pyglet/pyglet [3] - https://github.com/pythonarcade/arcade-web

u/clepto

KarmaCake day98February 19, 2021View Original