Better HN
topnewbestaskshowjobs
Log inSign up

BiteCode_dev

24,628 karma · joined Oct 21, 2019 (7y ago) · 5,512 submissions

I write to save you time and effort when dealing with Python:

https://www.bitecode.dev/

Email: contact at bitecode.dev

Submissions

comment 6y ago · link · parent

Pdb works fine in notebooks though, and that's one of the numerous reasons students should learn it first, before any GUI debugger.

comment 6y ago · link · parent

Python had one:

https://morepypy.blogspot.com/2016/07/reverse-debugging-for-...

Never got popular enough to be ported to cpython, let alone python 3.

It's no surprise though: my experience is that most python devs don't know how to use a debugger. In fact, the huge majority of tutorials to learn python don't include one, nor they give explanation about python -m, venv, pip, the python path and other very important basis.

Even the people using pdb don't know very important commands like until, jump, up or tbreak.

comment 6y ago · link · parent

People would start to priorize. Not a bad thing.

comment 7y ago · link · parent

I micro dose with psilocybin, and order on zamnesia in amsterdam since i'm in europe.

comment 7y ago · link · parent

I can attest to that. Micro-dosing is only a bonus. In fact, I regularly stop taking them when I don't feel like it, and I'm just back to my normal self, not lower. No negative side effect, no dependencies, and it helps taking care of yourself: eating better, sleeping more, etc.

But OP is right on one thing: it is not a substance the body needs. It's an artificially induced condition, and it's why it's important to take days off. Sometimes I take a week, not just the 1/2 days of the most popular protocols.

This way you can see if you are improving deep inside, and that it's not just the drug saying you are fine. Plus those substance allow it: no hard in stopping cold turkey. It's beautiful how positive this stuff is.

Up to now, I can attest than, yes, even when I'm not taking it, I'm better. Mostly because when I take it, I live a better life.

comment 7y ago · link · parent

EventSource is only from the server to the client. Pub/sub goes in any direction: client to client, client to server, etc.

Crossbar.io provides that with websocket.

Eventsource + the sync rfc would mean everybody would build a non standard bridge for this to link a publication, a sync from the server and an event source. And because we only need 2, and they are overlapping, several completly incompatible de facto solutions would emerge.

Pub/sub is useful for any kind of communication that doesn't involve a resource: notifications of events , communication between microservices, etc. Basically anything that doesn't have a need for an history.

Of course, you can always create abstract conceptual resources you sync with to obtain this effect. E.G: the "streaming service is down event" could be a sub to a "service/streaming/heartbeat" event that you sync, and ignore versions and give no parents. It's just a bit twisted.

It feels more natural to have a pub/sub primitive that goes back and forth in any direction, and build the specific case for sync with that. Even if sync is 90% of the time what you want.

comment 7y ago · link · parent

Yes, the question is whether to make it a standard.

comment 7y ago · link · parent

This is true for any medical act you perform on a massive scale really. Including vaccination, supplementation, etc. Everything is a cost/benefit ratio.

comment 7y ago · link · parent

Yes but 5% of false positive raise the price of this a lot for a large scale campaign.

comment 7y ago · link · parent

I really like the RFC.

Two questions:

- do you think it would make sense to allow the "Patches" header only in PATCH and not PUT?

- how do you feel about a generic "subscribe" mechanism that is not specific to sync but can just say "I'm interested in this topic, with this params" ? Then this could be specialized with the version+parents params to get sync. This way we get a generic HTTP standard for PUB/SUB, which is badly needed, and is a very basic primitive you can build many things on. It would be a shame to have to add one after the fact.

comment 7y ago · link · parent

> The reasoning behind this seems to be that the alternatives right now are either polling or a homegrown websocket based protocol.

Right. Same with routed RPC and routed PUB/SUB. I currently use the WAMP (protocol, not stack) for that, as it is a Webocket based IANA standard, but with http2/3, having the HTTP version of it would make sense to have this baked in as well.

In fact, their subscribe thingy should probably be more generic and accept a topic and optional params. Params could be then use to upgrade the use case, like version+parents for sync. Plus client may want to push events as well.

I don't know how one can contribute to the debate. Would you explain it to me?

> I've personally seen both PUT and PATCH used for updates, so this didn't seem particularly odd to me, and seemed more like a nod to one particular method of updates.

PUT in REST is for sending the full object, PATCH is for partial updates. So both are valid, but I would allow the "Patches" headers for the PATCH method only.

comment 7y ago · link · parent

:) Well, good thing you updated the site then.

comment 7y ago · link · parent

PATCH became a standard in 2010 (https://tools.ietf.org/html/rfc5789), I just never patched my brain with this new revision and had stale data.

comment 7y ago · link · parent

Damn, I knew I sucked at probabilities, but I apparently I didn't know how much.

comment 7y ago · link · parent

You won't, of course. Just like with aids, a positive would be then double checked with a safer test.

EDIT: nevermind, I got educated by _Microft.

comment 7y ago · link · parent

If it's very cheap, fast and convenient, then it's enough for at least screen the population regularly. Catching only part of the cancers is quite nice already.

comment 7y ago · link · parent

Reading the RFC, this seems to make HTTP stateful:

"A subscription is different from a GET connection (e.g. a TCP connection, or HTTP/2 stream). If a client requests "Subscribe: keep-alive", then the subscription will be remembered even after the GET connection closes."

It also uses PUT to patch things, but then why not use PATCH ? You could say it's non standard, but at this point, everybody uses it. Plus their stuff apparently deviates from the HTTP standard as well by allowing headers after the first line of the payload and introducing the forGET command.

Or am I missing something ?

Interesting anyway, especially the way they create of graph of unique ID to solve the ordering problem. Feels like Git. The flow of patch reminds me of react-redux.

Plus it's great to have more geeky technical things on HN. I'm missing it, among all the news and start up things.

They also mention a really cool RFC on a JSON patch format: https://datatracker.ietf.org/doc/html/rfc6902

I'm reading RFC and getting excited about it. Damn, that must be what they call growing old.

comment 7y ago · link · parent

Yes, I checked and all I see is 22 requests. I don't know where OP got the 504 numbers. It also loads instantly for me.

Ignore my comments, then.

comment 7y ago · link · parent

From what I see in my viewport, no it's not reasonable.

Using 500 requests for this because http2 exists is like stating it's ok electron apps eat 1 Go of ram because we have big configs today.

That's also why, in 2019, with quad cores, SSD and more memory than ever, things doesn't feel faster than 10 years ago.

comment 7y ago · link · parent

I would check why my code do 500 requests in the first place. That's unsane unless you do some kind of video game.

5481.

Ask HN: How to do a SaaS with client side encryption, yet a Web API?

4 points · by BiteCode_dev · 7y ago · 1 comment

comment 7y ago · link · parent

Do you think Windows or MacOS make compromise on the way they code their kernel to accomodate nVidia ?

No, it's just a matter of economics.

comment 7y ago · link · parent

Step one: do not create a DRM standard.

Step two: if it happens, make sure it can't be a proprietary binary blob.

Step three: damn, too late.

comment 7y ago · link · parent

Indeed, they are not competitors. Just for git integration alone, having a text based diagram is great.

comment 7y ago · link · parent

While it is a constraint for sure, it is not so different from accommodating other people schedule anyway. As a professional, I am not available 90% of my time to interact with others: I have things to do, and if you want to get a piece of me you have to deal with my schedule. Same with my client. So what do we do ? We plan, we make compromise.

Time zones managing is the same, it just add a bit more friction to the process.

When I see people having problem with time zones, it's usually more a symptom of an deeper issue elsewhere: bad organization, unhealthy communication habits, unnecessary coupling between parties, micro-management, people not doing their job and so on.

comment 7y ago · link · parent

That's not the point. The point is it's not built it, because the architecture decisions were unsound.

Now, don't get me wrong, I use and like Wordpress. There is not more versatile yet approachable blog/CMS/whatever out there, the ecosystem is huge and it's my go to tool when I want a quick and dirty solution.

But it doesn't change the fact it has been badly designed from the start.

Popularity in software doesn't reward good design. It rewards solving problems.

comment 7y ago · link · parent

I also like draw.io.

Yes, it's not text based, but it has such a cool hack: it saves the xml reprensentation of the diagram inside the png. So you can publish it anywhere as a regular png, and still edit it !

comment 7y ago · link · parent

Yes, althought in the case of wordpress, it's also because it's really badly architectured: no internal cache, so many requests for just one page, comment are loaded even when you don't read them, etc.

It's not optized at all.

comment 7y ago · link · parent

The problem here is not prototyping, it's the service accepting executable code from the user.

comment 7y ago · link · parent

Sleep, friends, meditation (this requires serious practice, not dabling) , nutriment supplementation (a LOT of it), cut down on sugar, weight lifting, intermitent fasting, psychotropic microdosing.

That's a ton, so I wouldn't start with more than one, preferably the easiest, then increment. They support each otber because constant anxiety for me is just the symptom that everything is going to crap.

Meditation has the strongest reward, but also the highest cost. Psycheselic have the best cost/reward ratio but may hide other problems: once you feel great, you may stop working on it.

Food, friends and sleep are hard, because they affect your life so much and requires motivation.

Supplements require no motivation, little effort to take and have a huge impact... But require a lot of reading, trials and errors et money.

Neverthless, I wish I knew all that 15 years ago. It would have saved me so much trouble, and actually work on the root problem, as anxiety is just one of the many small tip of a huge and deep iceberg.

1
180181182183184