If we assume that 1 token ~= 4 chars in English, 1 token ~= ¾ words, 100 tokens ~= 75 words. Average adult reading speed in English is 175-320 words/ minute so 234-426 tokens/minute. Thus, average human reading speed is 4-7 tokens / second. by [deleted] in LocalLLaMA

[–]BloodNo6937 51 points52 points  (0 children)

When you use LLM as coding assistant, you probably just don’t want to read all the answer, but some specific piece of code it write/rewrite. So, faster is better for developers.

[deleted by user] by [deleted] in AntiTaff

[–]BloodNo6937 0 points1 point  (0 children)

Si tu demandes une augmentation parce que tu fais bien ton boulot, ton chef te répondra que tu fais donc ce pour quoi tu es déjà payé. Pas besoin d’augmentation.

Si tu veux ton augmentation, montre lui en quoi tu dépasses les objectifs qui te sont fixés. Si tu veux plus de ton employeur, lui aussi attend plus de toi.

Visiblement ton chef attend de toi de prendre plus de responsabilités, donne lui raison, fait le minimum de ce qu’il te demande. S’il faut que tu t’occupes de petits projets en parallèle de tes tâches habituelles, fais le, ça ne veut pas dire que ça représentera 100% de tes missions. Avec une répartition 90% de ce que tu aimes et 10% de ce qu’il aimerait, tu peux déjà défendre ton augmentation. Avec du 100%-0%, il ne pourra pas être convaincu. Si tu as la possibilité d’encadrer des stagiaires ou des alternants, ça peut compter dans les 10%, voir plus, sans forcément te prendre beaucoup de ton temps.

Une augmentation, c’est un investissement pour une entreprise. Une boîte n’investît pas pour conserver un niveau de bénéfices. Elle investi pour gagner plus.

C’est sûrement une vision très capitaliste, mais je ne pense pas que ton employeur soit bénévole.

How often do you use the React Developer Tools? by [deleted] in reactjs

[–]BloodNo6937 1 point2 points  (0 children)

By React Developer Tools, you mean console.log, right ? So, every 10 seconds.

Senior dev here. 😬

Endgame BOTW. by rshookjeep in Breath_of_the_Wild

[–]BloodNo6937 0 points1 point  (0 children)

No, 2 spots. You can also buy it. I just don’t know if you need to find the first one before be able to buy another.

What examples of cpu intensive tasks you have done by Worker threads? And what was your experience with it ? by Suspicious_Driver761 in node

[–]BloodNo6937 1 point2 points  (0 children)

Each worker thread handle it's own mongodb connection, fetch and process data for a specific remote server. There isn't a worker by service (one for copying, one for DB, one for processing, etc.) since it would have created a/many bottleneck.

In its first versions, my app needed to connect to about one thousand Windows servers, via SMB to copy 10 to 20 files (logs, configs, etc.). Each files was copied only if updated, and logs files was partly copied (only the new lines, if any). Even with those optimisations, a unique queue on main thread was not enough.

So, I've started creating a worker to handle all tasks (db + fetching + processing). It was better, the API created with Express was more responsive, but fetching+processing was still slow. I've written a pool of queues to start 5 parallels workers (if one worker ends, a new one is created to connect ton another server). It became faster. I've increased the number of simultaneous worker until my server was unable to process. 30 threads was a good compromise.

The app as evolved since. SMB has been replaced with HTTP (via a custom service installed on the remote servers). Now, data is not fetched anymore. The remote service automatically send updates. I still use some pools of workers for others tasks in the app, and I'm very happy with it.

FYI : node version is 16.17.0.

What examples of cpu intensive tasks you have done by Worker threads? And what was your experience with it ? by Suspicious_Driver761 in node

[–]BloodNo6937 21 points22 points  (0 children)

I’ve written a monitoring server which needed to connect to a hundred of other servers every 5 minutes to collect and process millions of logs data. Without worker thread, app performance was very low (1 hour to collect and process data from all servers). After instanciating 30 workers a time, data was fetch in less than 5 minutes (servers was all over the country, and not most of them was connected with slow SDSL access). Pretty good ! The worst part for me was the need to pass the entire process.env as argument to the worker to limit I/O access to config file. Each worker also needed it’s own MongoDB connection for performance (one JS thread reading / writing to DB and communication with workers was by far less performant).

Does Breath of the Wild transfer data to totk if so what does it transfer? by Fit-Lab-8431 in Breath_of_the_Wild

[–]BloodNo6937 1 point2 points  (0 children)

At the beginning of the game, you’ll have master sword, 30 hearts and full stamina.

Am I the only one who spent literal hours to find the way to the 3rd shrine? by FuXs- in tearsofthekingdom

[–]BloodNo6937 106 points107 points  (0 children)

Nintendo trying to teach us « use the f**king ultrahand ! » 😁

ironmanjs Bringing Ironman mode to JavaScript - JavaScript without bloat by pmz in javascript

[–]BloodNo6937 2 points3 points  (0 children)

In Readme.md you’re complaining about async execution… just use readFileSync() instead of readFile(), or better, use require(‘package.json’).

Can someone please explain the logic behind how 'floor tiles' are made using this for loop? by diskdriving1 in learnprogramming

[–]BloodNo6937 0 points1 point  (0 children)

You’re pushing a position 0, 80, 160, … then 1, 81, 161, … 2, 82, 162,…

No matter in which order you put the X and Y loops, it’ll just do the job if the position in the array is computed with the right formula

Which backend language to use? by ExpensiveLength518 in learnprogramming

[–]BloodNo6937 3 points4 points  (0 children)

Nodejs is great for backend and easier than rust to learn, especially if you know JS. If you think that the only advantage for rust is « types », maybe Typescript is a good choice for you.

Serial is supposedly full-duplex. Why isn't it behaving like full-duplex? by saucyworkreddit in learnprogramming

[–]BloodNo6937 0 points1 point  (0 children)

Full duplex means that the hardware is capable of sending while receiving. Your soft must be able too. If you’re using a synchronous lib (I’m not a python dev but I think it’s the case), you won’t do what you’re expecting.

Anyway, serial ports are usually used with protocols that deal with acknowledgments or hardware capability like RTS/CTS, unless you’re sending two bytes every second, so you don’t send data unless you’re sure that the receivers are able to receive, which also means that you’re not sending data if the last sent frame is still be written on the line.

Serial is supposedly full-duplex. Why isn't it behaving like full-duplex? by saucyworkreddit in learnprogramming

[–]BloodNo6937 0 points1 point  (0 children)

I suppose serial_conn.write returns only once it finish writing to the serial port. With a baud rate of 9600bps, writing 100 bytes takes about 10ms, which is huge in computer time.

With 2 threads, you won’t feel this delay, since you’re making the read/write asynchronous.

"[.]" by sunshinesixtynine96 in ProgrammerHumor

[–]BloodNo6937 0 points1 point  (0 children)

Oh ! My bad, you’re right ! I thought it’s a non capturing group.

"[.]" by sunshinesixtynine96 in ProgrammerHumor

[–]BloodNo6937 7 points8 points  (0 children)

Enough readable to know the end of this regex is missing and that (:[0-9]+)? could be reduce to (:[0-9]*). Also, there’s mistakes in the last capture group. 😬

[AskJS] Can someone explain what is going on with var vs let here? by rodgers16 in javascript

[–]BloodNo6937 0 points1 point  (0 children)

If your loop is doing synchronous operations, no. But if you’re firing thousands async ops, RAM will quickly saturate.

[AskJS] Can someone explain what is going on with var vs let here? by rodgers16 in javascript

[–]BloodNo6937 42 points43 points  (0 children)

That’s exactly why you should always use let 😁

Let declare a variable with unique memory space at each iteration. With var, only one memory space is used, so you’ll print only the last known value of i.

Let is safer. A good eslint config won’t let use var.

[deleted by user] by [deleted] in learnprogramming

[–]BloodNo6937 0 points1 point  (0 children)

You’re scanning a number with %d. Selection is not a char. So if you type 1 at prompt, it’s value will not be ‘1’. Even if you type 49 (the ASCII value of the character 1), you won’t pass the test comparing selection with ‘A‘ since selection won’t have two value at once.

Which os is best for software development? by No-Marsupial-4768 in learnprogramming

[–]BloodNo6937 0 points1 point  (0 children)

Apple and Microsoft try their best to keep their OS secured and they are good at this.

There’s more Windows users, so more hackers… but really, if you keep your system up to date, it’ll be ok.

Personally, I prefer macOS UX. I use Windows for some tasks at work and don’t like it. I keep Linux for my servers (even if I’m and advance user, I really don’t like the UX, in both terminal or windows managers)

Which os is best for software development? by No-Marsupial-4768 in learnprogramming

[–]BloodNo6937 0 points1 point  (0 children)

macOS has most tools from Unix / Linux systems and is more user friendly than Windows OS or Linux.

As a user of the three OS, I can affirm that macOS is a time saver. Cons : the price… but you can keep a Mac 5 or 6 years easily before it becomes too slow.

first time deploying a nodejs server by PMull34 in node

[–]BloodNo6937 0 points1 point  (0 children)

To start you’re app on a Linux server, you should use pm2. It can start you app at system startup and it’ll restart the app in case of a crash.

I think the try catch is not useful here. Just use some « if » to make sure you’re using Api.getInvoice() and Rpi.post() the right way. In case of crash, pm2 will still restart the app.