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 5y ago · link · parent

How do you make 4%?

3722.

Nginx playground: paste a Nginx config and play with it(nginx-playground.wizardzines.com ↗)

56 points · by BiteCode_dev · 5y ago · 4 comments

comment 5y ago · link · parent

We did that, it was called PHP, and it turns out DSL are pretty limited outside of their sweat spot. Also they don't evolve as fast as libs and framework.

Case in point: PHP worked well, but framework like Rails and Django became very attractive because their offered more, and used languages that could be good outside of their niche.

And what did the PHP community to stay relevant ? They developed great frameworks, and improved the non web language capabilities.

Turns out the web moves fast, and coding a web app is more than web programming anyway.

comment 5y ago · link · parent

Servers and consumer laptop are very different beast though, so not sure the comparison hold. You don't shut them off often, they don't go to sleep, rarely undergo shock, plane travel or forced shut down...

comment 5y ago · link · parent

I also want money, but I don't lie about my grandma dying to get it from my friends.

comment 5y ago · link · parent

I don't worry about multi billions dollar company having to lobby a little more to update the default port format in 10 years. They are good at it.

I do worry about the invisible hand of the market not being a good balance for interoperability or sustainability.

comment 5y ago · link · parent

Well, if you start enforcing quality standards, suddenly, local products become way more competitive.

comment 5y ago · link · parent

Fun

comment 5y ago · link · parent

For now, flatpack and snap sandboxes perf hit are quite significant, and devs don't manage the permissions well so you often end up with software that can't open the files you want.

When you fire and electron app from a sandbox, it's a hog riding a slug, then you try to open your files only to find yourself in a temp folder or chrooted to a config subdir.

It think those tech can bring a lot, but there is still work to do.

comment 5y ago · link · parent

Payload size doesn't matter that much, a ping is ping.

Currently my ping to this website is 167 ms:

ping news.ycombinator.com PING news.ycombinator.com (209.216.230.240) 56(84) bytes of data. 64 bytes from news.ycombinator.com (209.216.230.240): icmp_seq=1 ttl=49 time=167 ms 64 bytes from news.ycombinator.com (209.216.230.240): icmp_seq=2 ttl=49 time=167 ms 64 bytes from news.ycombinator.com (209.216.230.240): icmp_seq=3 ttl=49 time=167 ms

Which means it's a cost I have to pay, before payload matters, before parsing matters, before rendering matters.

I'm at home, on fiber, on an ethernet cable, so ping should be very fast. And it can be:

ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=114 time=5.63 ms

Unfortunately, the network is not uniform.

It's of course, worse on Wifi, and even worse on mobile phone, on the go. Depending on your location, YMMV quite a lot as well. Then you have hardware quality playing a role, the user may use other software (torrenting, streaming, playing) that can also affect that.

Bottom line, you cannot assume the internet connection is snappy. Or stable (which is a problem with websocket, as you have to implement robust automatic reconnect, and it is slow and expensive, but then your use cannot use your software).

So knowing the trade off you make is important. On a local network in the corporate world, life view seems like a terrific deal. On a heavy mobile user centric app, it will probably hinder your app ergonomics.

comment 5y ago · link · parent

I have a backup, but this is not a solution. Only a crutch. I had those problems on several machines, including brand new ones.

comment 5y ago · link · parent

Maybe, I don't know enough about this, but I've been using this veracrypt disk on 6 machines, now, and I have the problem with each of them.

Also, I don't have any problem with non encrypted data.

comment 5y ago · link · parent

Ok, so the trade off is a less snappy UI as soon as you have a state, because you can't do optimistic updates on the view, send the request, then deal with the error.

But you write only the code of the validation, and the vue, once, so it's more productive, and the state is always consistent.

I assume this means no PWA mode, although I don't really miss this.

comment 5y ago · link · parent

Are other people experiencing too many corruption problems on encrypted disks?

I have a veracrypt drive, and I regularly have to run a scan and fix on it because it's very sensitive to power cut, brutal restart, etc.

Also, it's slow. I put my firefox conf folder in it, but it slows the browser down.

Once I went full encrypted disk, but one day corruption happened, and it stopped booting. So I went back.

comment 5y ago · link · parent

Same but I already find ajax based app very slow if they implement optimist updates, now with this system, you have to wait a round trip for each interactions. This means click a counter will round trip before updating?

comment 5y ago · link · parent

Does this mean the entire state of each connected user is hold on the server?

What's the resource cost ?

And that adding an element on a list don't show it up before a server round trip ?

What's the latency cost ?

comment 5y ago · link · parent

I don't see how you address the whistle blower issue.

I get how useful it can be, but repeating "positive" is not a magical solution.

comment 5y ago · link · parent

It's a tough ethical choice. On one hand, you want a company to avoid leaking data to bad actors, on the other hand, this would probably first used against legitimate whistleblowers.

3739.

Nimpy: Implementing a Python Module in Nim(github.com ↗)

4 points · by BiteCode_dev · 5y ago · discuss

comment 5y ago · link · parent

There is already type inference in Python type tooling.

3741.

From duck typing to platypus typing(twitter.com ↗)

8 points · by BiteCode_dev · 5y ago · 2 comments

3742.

Starship: A fast and versatile cross shell prompt(starship.rs ↗)

2 points · by BiteCode_dev · 5y ago · 2 comments

comment 5y ago · link · parent

It doesn't know. You can identify a wrong answer without knowing the right one.

I can tell you 1 + '1' is wrong in python, but can't tell what you meant.

comment 5y ago · link · parent

Next python release (3.10) made a lot of noise because it introduced pattern matching.

But I'm very excited about this upcoming version for a very different reason: they made a huge work on error messages!

Check this out: https://docs.python.org/3.10/whatsnew/3.10.html#better-error...

Syntax errors are more precisely reported, AttributeError/NameError suggest a spelling correction, IndentationError will pinpoint where you screw up...

And yes, a good IDE already does that for you, but a lot of Python dev are using a ligth text editor or just a shell/notebook.

This, to me, is progress! Unsexy, warmly welcome progress.

comment 5y ago · link · parent

Yet. They are just getting started. Plus their modules have an open design.

comment 5y ago · link · parent

Except:

- some conf room don't have a projector, but flat screens, a smart white boards or some remote conf setup that needs you to plug in, and/or no walls that fits the bill for projection

- some conf rooms don't have a place to put for your projector and get a good picture. Their is own the ceiling.

- unless you buy a very good one, some conf rooms won't have the light for your projector to be readable

- it addresses only the projector problem, not ethernet, sd card, usb A, etc

- a good projector is way more expensive that a few dongles, are easier to break, harder to replace if lost/broken or if you forget it at home

Not to say it's a bad idea to _also_ have a projector.

comment 5y ago · link · parent

I don't see how putting a cable in my backpack is going to be better than a dongle, and I'm certainly not going to a client for the first time then complain they don't have the right cable.

Not to mention the dongle supports several ports.

But you know what is better than either ?

The framework laptop solution of letting me configure the port I want before going to my client.

comment 5y ago · link · parent

Give them time, they are just getting started.

comment 5y ago · link · parent

HN bubble at work, right here.

Some of my clients still have projectors with... vga ports.

Then you need ethernet and hdmi of course, regularly in the corporate world or at your friends house.

So yeah, dongle it is. USB-C dongle for sure, but still dongle.

comment 5y ago · link · parent

Quite the opposite, it means you can start with plenty of usbA port, and when you don't need them anymore, switch them to usbc, without changing your laptop.

It means when one port wears of, fixing it is easy, cheap, and doesn't immobilize your machine.

It means you can change your port to fit an hdmi or ethernet as needed, without having the stuff coming out your laptop, all ugly and taking space on the desk.

1
124125126
184