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

Markdown would make it:

    # You website: title

    ## Title of your site

    Here begins the text of this page
I do think it's easier to type.

comment 5y ago · link · parent

Because you don't always need this. In python, it's optional: you can use it when it matters.

comment 5y ago · link · parent

Python the language != Python the runtime.

comment 5y ago · link · parent

WASM alredy got a killer app: being able to run any snippet of any language in a browser. For teaching programming, it's use, because projects like pyiodine can load a full python vm in a the browser and let the student experiment with the snippet without taking the risk of ruining my server.

comment 5y ago · link · parent

If the timestamp is a creation date after your system went on, which it is here, you can always store 0 for false.

comment 5y ago · link · parent

And the worst thing is: malaria is easily curable, as malaron is not only preventive, but fully kill the plasmodium in the liver cells. Despite that, we don't provide the drug to them.

It would cost a fraction of what we spend on research for a vaccine, but no cigar.

Of course, there is the argument that we risk developing resistant bugs. But the truth is, if suddenly all mosquitoes were moved magically to the US, you would see the drug massively used for everybody without a second though.

comment 5y ago · link · parent

"The books stopped working" is a fantastic writing prompt for a dystopian novel.

comment 5y ago · link · parent

Lol, just realized my table should be "EURO_SIGN=b'\xe2\x82\xac'.decode('utf8')".

Damn, a perfect example of why it's nice to be able to just do "€" in my file. It's also less bugs.

comment 5y ago · link · parent

There is no moral component in a dev choosing a language for themself, what are you even talking about?

comment 5y ago · link · parent

Comparing people taste in language with slavery.

That's... bold.

comment 5y ago · link · parent

Because as a dev, my attention is precious. To be productive, I prefer to pull information, than to be pushed information to.

E.G: HN doesn't push information on me. I can answer to you now because I know that at this very moment, I don't need to focus on something hard. But this afternoon, I will, and so I don't want to be disturbed and will just close this tab. Voilà, no distraction.

I don't need to be notified bugs: I don't work on them in real time. In the morning, I select the ones I will work on. New ones have little relevance to me until the next morning, which a dashboard will show me.

I need notifications on things like my clients calling me or my server failing. Those are the stuff that I need in real time.

The very first thing I do when registering with a new service, especially corporate/social ones is to go to the notification settings and disable everything but the direct message stuff.

comment 5y ago · link · parent

Yes but all those tools share one common problem: they leak their implementation or want to do too much.

The ruby one ask to gem install, the python one to pip install, the one in bash assumes Unix, the one in perl tells you to "make install" (!), radicle wants to replace my entire stack.

As a Python dev, I don't want to ask my front end experts or worse, my testing team, to setup an entire python env just so they can fill tickets. I just want to donwload an executable, and then fill in my tickets.

gitbug gives us binaries. You just execute it, and you are good to go.

Maybe one day, Python devs will take the time to use nuitka to produce binaries for their users.

comment 5y ago · link · parent

I don't care, I want to use it not dev in it.

If the people working for free to give me FOSS are happy with this stack, more power to them. No complaining.

comment 5y ago · link · parent

You are my hero today.

EDIT: just tried it, still very basic, but already does the job for a small project. I'm considering contributing.

comment 5y ago · link · parent

I understand to not want utf8 for the identifiers, as you type them often and want the lowest common keyboard layout demonitor, but comments and hardcoded strings, certainly not.

Otherwise, chinese coders can't put their name in comments? Or do they need to invent an ascii names for themself, like we forced them to do in the past for immigration ?

And no hard coded value for any string in scripts then? I mean, names, cities, user messages and label, all in in config files even for the smallest quick and dirty script because you can't type "Joyeux Noël" in a string in your file? Can't hardcode my "Téléchargements" folder when in doing some batch work in my shell?

Do I have write all my monetary symbols with escape sequences? Having a table of constant filled with EURO_SIGN=b'\xe2\x82\xac' instead of using "€"? Same for emoji?

I disagree, and I'm certainly glad that not only Python3 allows this, but do it in a way that is actually stable and safe to do. I rarely have encoding issues nowadays, and when I do, it's always because something outside is doing something fishy.

Utf8 in my code file, yes please.

comment 5y ago · link · parent

I'd like to have a serverless bug tracker, like Fossil, but for git.

Basically a bug tracker that stores the whole DB in the git repo but separately from the main tree. The tickets get synced when I push/pull, I can interact with them locally without needing an internet connection, without having to filter out projects, authenticate, etc. An open ticket would have my current branch/tag/commit as a default value for tracking, although it could be change.

And I really, really don't want notifications. Just a dashboard where the last things that are important to me are listed as long as I haven't marked them as read, and an access history.

But you can't make money with that I guess.

comment 5y ago · link · parent

Interestingly, the author classifies python as a brown language, yet it's on the top 15 of most loved programming languages.

Now, maybe it's because for a lot of people, it's a green language since it only became that popular in the last 10 years despite being an old one (1991).

But for me it's definitely a brown language, as I've been using it since 2.4 (we are at 3.9). And I must say, reading a decade old Python code bases, even with the 2=>3 transition in the middle, is still very easy.

I went back to a project I wrote 10 years ago (first commit 2011), and the code is clear. I can make changes to it with no problem at all. And it's not even a small project, it's a streaming website that still serves half a million users a day using an old Django.

Today I'm working for a client on a FastApi project. It uses all the current modern Python gimmicks, async, typing and f-string and so on. I could get into the code base in less than a day, and make my first commit.

I know Python has the reputation to not scale, not be good for big projects or big teams, but It's certainly not have been my experience.

The upcoming Python 3.10 has been controversial because it introduce some weird choices for pattern matching. But it's the tree hiding the forest:

- it's a sign the language is still actively evolving and will not become obsolete. Legacy design decision will always make adding new features an exercise in compromises.

- 3.10 also have been focusing on not-s-sexy but oh-so-important things like improving the error messages (I'm actually very excited about this, I've followed it and it's very well done)

So I'm pretty confident it's going to stay a brown, but nice language to work with.

Not that's it perfect, the more I use other languages, the more I can see the limits of Python. But I expect it to still be a solid choice for new projects for a long time.

comment 5y ago · link · parent

I'm sure somebody said something like that when all those kids started to the clever abstractions that were functions instead of doing things manually in assembly.

Simplicity!

comment 5y ago · link · parent

As somebody living in Europe, I think it's a perspective you can have only if you live mostly in an English speaking world.

Up to 2015, my laptop was plagued with Python software (and others) crashing because they didn't handle unicode properly. Reading from my "Vidéos" directory, entering my first name, dealing with the "février" month in date parsing...

For the USA, things just work most of the time. For us, it's a nightmare. It's even worse because most software is produced by English speaking people that have your attitude, and are completely oblivious about the crashing bugs they introduce on a daily basis.

In Asia it's even more terrible.

And I've heard the people saying you can perfectly code unicode aware software in Python 2. Yes, you can, just like you can code memory safe code in C.

In fact, just teaching Python 2 is painful in Europe. The student write their name in a comment ? Crashes if you forget the encoding header. Using raw_input() with unicode to ask a question? Crashes. Reading bytes from an image file ? Get back a string object. Got garbage bytes in string object ? Silently concatenate with a valid string and produce garbage.

comment 5y ago · link · parent

> It is often best to avoid non-ASCII characters in source code. Indeed, in some cases, there is no standard way to tell the compiler about your character encoding, so non-ASCII might trigger problems. To check all non-ASCII characters, you may do [^\x00-\x7F].

Depends of the language. In Python 3, files are expected to be utf8 by default, and you can change that by adding a "# coding: <charset>" header.

In fact, it's one of the reasons it was a breaking release in the first place, and being able to put non-ASCII characters in strings and comments in my source code are a huge plus.

I mentioning this because in another article, the author said being used to code in "C++, C, Go, Java, JavaScript, Python, R, Swift, Rust, C#" so I find it kinda weird.

comment 5y ago · link · parent

Use Vite to dev, then setup a separate webpack + babel for testing and build for prod.

comment 5y ago · link · parent

I've been repeating it in several threads already, and this post confirms it: if you haven't tried Vite yet, you really should. It will take 15 minutes, and if you do any Vue and/or React dev at all, it will be the best 15 minutes you ever invested in a tool.

It's fast, it works out of the box with sane default, it's fast, doc is stellar, it's fast, it support ts, jsx and sass. Also, it's really fast.

Between Vue and Vite, in 10 years Evan You is going to be known as the person who made frontend dev simple again.

(And thank you Esbuild)

comment 5y ago · link · parent

The problem with such experiment is that it can be a front. If you are a big entity, gov, or whatever, and you need to insert a vulnerability in the kernel, you can start a "research project". Then you try to inject it with this pretense, and if it fails, you can always say "my bad, it was for science".

comment 5y ago · link · parent

If you haven't already, give a try to ViteJS.

It's from the author of Vue, and support both Vue and React, including JSX and TS.

It has the qualities of Vue:

- it works out of the box

- setup and usage are super easy

- it's wicked fast

- documentation rocks

I talked about it to one of my client 3 days ago. They tried it 5 minutes and decided to spend a day migrated their project immediately.

It's that good.

And the migration took only 2 hours.

comment 5y ago · link · parent

Thanks for the explanation, although I could have done without the condescending tone.

comment 5y ago · link · parent

It uses BT right ? So how can it be useful on luggages, like in their ad ? If someone steals it or the airport lose it, BT is of not use here, isnt it ?

Someone help me undertand, it's a genuine question.

comment 5y ago · link · parent

It creates confusion since both share the word wormhole and the goal the share files.

If you still can, changing the name of your product would help a lot, and also show respect to the older FOSS project.

comment 5y ago · link · parent

I can rewrite your entire documentation using clearer words than the ones you are using.

Are they going to go through the whole dictionary to eliminate all those non-double-plus-good words that are not efficient enough?

Don't you feel that it's just getting ridiculous at this point?

comment 5y ago · link · parent

> agnostic

> Don't use. Instead, use a precise term like platform-independent.

Oh, FFS. I've been agnostic for half of my life and I don't know a single one agnostic that would want that.

In fact, I feel more offended that it's on this novlang manual.

comment 5y ago · link · parent

I never considered Julia to extend python but it makes sense.

Although as mentioned in the benchmark, with py2o, rust will be a superb contender, especially considering:

- the toolchain is the easiest to setup

- you can embed asm if you really need this extra juice

1
144145146
184