2401
12
2402
88

Having smart people with a lot of knowledge results in progress only if information flows well in the veins of the organization

2403
7
Useful JavaScript Array Methods (javascript.withcodeexample.com)
2404
9

cross-posted from: https://programming.dev/post/12104901

https://github.com/dislux-hapfyl/pynksh

Writing functional shell snake code to improve my sanity.

2405
143
2406
346
2407
22
2408
17

To clarify, I mean writing scripts that generate or modify classes for you instead of manually writing them every time, for example if you want to replace reflection with a ton of verbose repetitive code for performance reasons I guess?

My only experience with this is just plain old manual txt generation with something like python, and maintaining legacy t4/tt VS files but those are kind of a nightmare.

What's a good modern way of accomplishing this, have there been any improvements in this area?

2409
21
2410
328
2411
33

While reading Sipser's book on theory of computation, it relies heavily on the concept of formal language, and machines that merely accept or reject an input.

But most useful programs we deal with do more than merely verify an input. They compute something. We may compute a solution for an equation instead of merely verify it. We may sum a list of numbers, or calculate some function on it.

Maybe "most" is an exaggeration since I can't prove it. But still, it begs the question. Why not deal with machines than do more than merely verify?

2412
51
2413
11
submitted 2 years ago* (last edited 2 years ago) by chevy9294@monero.town to c/programming@programming.dev

Hi, I'm working on a PQC key establishment and authentication protocol. Currently it works like this:

  1. Client and server each generate ECDSA and Dilithium identity keys and share them between each other, with usb for example.
  2. Client sends to the server single-use ECDH public key, single-use Kyber public key, timestamp, ECDSA and Dilithium signature of everything before it.
  3. Server verifies the message using clients identity keys, generates 2 secrets, one from ECDH and one from Kyber and then it uses blake3 kdf to derive a key from both secrets. Then it sends response with single-use ECDH public key, Kyber ciphertext, timestamp, ECDSA and Dilithium signature of everything before it.
  4. Client verifies the message using servers identity keys, and generates 2 secrets, one from ECDH and one from Kyber ciphertext and then it uses blake3 kdf to derive a key from both secrets.

Kyber: kyber1024 ECDH: secp256k1 ECDSA: secp256k1

I will use the key for XChaCha20-blake3 aead. I don't know yet how will I generate and keep track of used/unused nonces.

Building this was interesting and fun, but I want more. How can I improve this key exchange, make it more secure, faster, and smaller? Both messages are huge (6268 bytes), because of Kyber and Dilithium.

Any ideas for what application could be this used?

2414
144
2415
-2

cross-posted from: https://programming.dev/post/11943806

In this blog post, we will explore how to detect and prevent these anti-patterns using pair programming, code reviews, and observability.

2416
15

Apologies if the title is confusing, but I couldn't think of better phrasing in short text.

Whenever we define / specify a certain automaton (such as a finite state machine or a turing machine) by defining all of its States, transition function, etc., this feels awfully similar to defining an algorithm. For example, I can define a machine that can tell if a number is divisible by 3. It is very similar to writing an algorithm and the steps to solving the problem.

Now I understand that the two aren't exactly equivalent. But would it be incorrect to say that the specification of a machine is a type of algorithm, since we're defining the steps it takes to solve a problem (how to respond to a specific state or input to solve a specific problem)?

2417
54
2418
24
2419
49

In this post, I share 8 principles I believe in:

  1. Less is more
  2. Start with the solution or the ask
  3. Show the facts, with examples
  4. Always quantify
  5. Include links and references
  6. Explain why it matters
  7. Ask feedback from one person
  8. Sleep on it

As engineers and developers, we often focus heavily on technical skills while neglecting the importance of clear, compelling writing. But the reality is, our ability to communicate effectively can have a major impact on our careers.

2420
10

I'm a beginner to Powershell and CLI in general, but this task does not need to use either so I'm open to using other tools.

I'm trying to do the following:

  1. Create multiple files from a Word template.
  2. Rename each file based on a list of names found in an Excel/CSV sheet.

Thanks in advance!

2421
114
2422
77
DuckDB as the New jq (www.pgrs.net)
2423
44

GitHub: https://github.com/microsoft/garnet

Just saw this today and I am pretty stoked. It's just a drop in replacement and performs > 10x faster under workloads with many client connections. Not that I found redis slow, but in Enterprise workloads that's a lot of money saved. $50k Garnet clusters handling similar workloads for $5k would be significant.

It being essentially entirely written in C# makes it pretty easy to read, understand, contribe to, and extend. Custom functions in C# have a pretty low barrier to entry.

I get that there's probably going to be a lot of hate just because this is released by Microsoft developers.... But in my opinion the C# ecosystem is one of the best to build on.

2424
101
Dead Man Switch (lemmy.world)

This week I read a post about the death of the Boeing whistleblower, and how Boeing might have suicided him.

I don't care about if the rumors are true or not, however someone mentioned in the comments that in such situations one should always have a Dead Man Switch.

For those who don't know a Dead Man Switch is basically an action TBD in case you die, like leaking documents, send messages/emails, kill a server etc . . .

The concept tickled me a bit, and I decided I want to build a similar system for myself. No, I am not in danger but I would like to send last goodbyes to friends and family. I think it would be cool concept.

How would you go and build such service?

I thinking of using a VPS to do the actions because it would be running for a while before my debit card gets cancelled.

The thing that is bugging me out is the trigger, I will not put that responsibility onto someone that's cheating, so it would have to be something which can reliably tell I am dead and has to run regularly.

Where is what I come up with :

  • Ask a country association through email if am I am dead.

  • Check if I haven't logged out on my password manager in a week. If it's even possible.

TLDR; Give me ideas on how to build a DEAD MAN SWITCH and what triggers should I use.

2425
18
Decision logs (vitonsky.net)
view more: ‹ prev next ›

Programming

28322 readers
748 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS