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

That the beauty of it with python:

- if you want to treat paths like unicode strings, you can. Which is great for simple scripts where you don't want to deal with complexity. And 99% of the time, it's enough with modern OSes.

- if you want to threat path as bags of raw bytes, you can. Which is necessary to transparently copy and do not evaluate, as you said, for covering edge cases.

- if you need to actually deal with those as strings but don't want to loose data for edge cases, so a mix of the 2 above, you can use surrogate escapes

comment 5y ago · link · parent

Sure. And the google map api is free to use, you can send tweet using sms, facebook doesn't show ads and web services never change policies once they get enough users.

Good thing it's running on your machine and you can see and control when it updates.

comment 5y ago · link · parent

Unfortunately, it's true, most toolchains are stuck in the past, and don't deal with non-ascii characters or even spaces very well. In fact, I just learned that spaces in .deskop files values could cause trouble after a long debugging.

But it's a shame.

In Europe, we do have a lot of non-ascii characters everywhere. Ubuntu puts a "Vidéo" and a "Téléchargements" directory in my $HOME because I'm french. If I were to use my name as my username I would have even more troubles.

I'm careful with not using special chars in names for work, but it feels like I'm a girl trying to not dress sexy in the wrong part of town: necessary, but I shouldn't have to do this, and it's definitely the others to blame.

All in all, I thank the Gods of encoding for Python 3 unicode handling. Having a scripting language that does the right thing out of the box is wonderful on this side of the pond.

comment 5y ago · link · parent

It's not only an awesome technical achievement, but it has also so much potential to be useful.

And yet, something at the back on my head is screaming:

WARNING!

I have the intuition that, on the long run, using more and more tools that are not on your own machine will create a dependency on systems big companies control. And something tells me we are going to pay for it in the end.

So I'll stay away.

Maybe I'm getting paranoid, but I don't regret not having ever created a Facebook account, or not getting on the 2010 hype train of magical SAAS services like Firebase that lock you in eventually.

We'll see in 10 years I guess.

comment 5y ago · link · parent

My way to work around this is to make a zipapp that contains several files, hence the entry point can do the checking and import another file that contains the code. But since its a zipapp, it behaves like a single file script: https://docs.python.org/3/library/zipapp.html

Nowaday, I use shiv to produce the zipapp:

https://shiv.readthedocs.io/en/latest/

It's handy because you can also now embed 3rd party dependencies, even for small quick scripts if you wish.

comment 5y ago · link · parent

Because in order to avoid paying taxes, a lot of companies balance books so that no profit emerges.

comment 5y ago · link · parent

Yes, but I tried to say "ok google" to my phone, and if I don't press anything, it doesn't switch on.

Not to say it couldn't, but by default, it's not supposed to be listening.

While alexi is.

My intent is different.

comment 5y ago · link · parent

"Private by design so you’re in control."

Oh, come on.

comment 5y ago · link · parent

setting up is still unsolved, but:

- for librairy packaging and general dep maangement, poetry is the solution

- for packaging a web project and ship it on the server, shiv is the solution

- for distribution, half the solution is nuitka for compiling the program. Creating the installer is now the hard part

comment 5y ago · link · parent

Do you use Cue for generating config, or for more for validating it.

I kinda like Jsonnet, but it only generates.

comment 5y ago · link · parent

Can you give more info on how "parse, don't validate" has been helping you? I'm trying to get on the train, but I have so much validating code.

comment 5y ago · link · parent

As a python dev, nim was much easier to get into than Go, Rust, or even Zig.

If you squint, it looks like a toddler Python with strong typing, compilation and a few different API, espacially for managing finalisation.

comment 5y ago · link · parent

https://developers.slashdot.org/story/21/05/17/0225252/micro...

comment 5y ago · link · parent

Sure, if you need high availability + replication cross db, go for Kafka, but that's the thread point: it's not a common use case.

Most people don't need high availability, and most replication use the same db which comes with tooling for that.

comment 5y ago · link · parent

The internet in one comment, ladies and gentlemen.

comment 5y ago · link · parent

And just like that, the outrage about the photo scanning malware Apple installed on their iPhone is forgotten.

"The screeching voices of the minority" indeed.

comment 5y ago · link · parent

Because it looks like a bot, not a human being.

Hey, @nlarion, if you are not a bot, say so.

comment 5y ago · link · parent

Can we report this account? It has been opened 4 years ago, with 2 comments, including this one.

comment 5y ago · link · parent

Well, if you want events, you have lighter alternative. Redis pub/sub, crossbar... Even rabbitMQ is lighter.

If you need queuing, you have libs like celery.

You don't need to go full kafka

comment 5y ago · link · parent

Stream? Unless you have really hight traffic, put that in a python script while loop that regularly check for new rows, and it will be fine.

If you want to get fancy, db now have pub/sub.

There are use case for stream replication, but you need way more data than 99% of biz have.

comment 5y ago · link · parent

I think that's part of the plan to accelerate Python that the Microsoft team has.

comment 5y ago · link · parent

I'm the first person to complain about bloated electron apps, but this is a task that I do so rarely I really don't mind it's electron.

This is, btw, not really an alternative to etcher, more like an alternative to rufus or unetbootin.

Indeed, the reason they made etcher was because they had too many help requests from hobbyists trying to flash their raspi sd cards. So they made a candy UI, and the requests dropped.

The candy UI is the main goal of etcher, if you remove that, then why not use the already very fine existing solutions?

comment 5y ago · link · parent

It is a solved problem. The entire world has solved this problem.

This is not a reason, this is a pretext.

comment 5y ago · link · parent

You gotta find material for the next season of Black Mirror somehow.

comment 5y ago · link · parent

Yes, but a good embeded search makes all the diff.

VueJS and Tailwind CSS both are indexed, but on those particular site I use the web site search _when I'm looking back for the reference of something I know_, because it's faster and more accurate than googling.

Granted, it's rare, but if you manage it, it's great.

comment 5y ago · link · parent

Imagine if we said that about web sites at the begining. The Web needs to decide what it want to be? A plaftorm to sell stuff? Contact people? Write? Listen to music?

comment 5y ago · link · parent

I know, but we could make coroutine creates with async have a special marker that is different to yield and auto schedule.

comment 5y ago · link · parent

The idea is that once task groups are implemented, you can switch back to asyncio, which as more chance than Trio to be supported.

comment 5y ago · link · parent

Ah economic indicators are really strange.

comment 5y ago · link · parent

That's weird. Most people live in low income countries, if 6 billions doses have been administrated, that's about half the world with 2 doses.

The 2 metrics doesn't seem to go together.

1
116117118
184