ChatGPT4 As Developer WOW
I tried ChatGPT3 about a year ago, and I was not impressed, it would regurgitate code examples, tweak them a bit but as soon as you started to add complex rules, it will get confused and become very creative (I mean: the code won’t work).About a week ago a business partner recommended me to subscribe to ChatGPT4 (the paid version), I said:
look, I tried it before, not great.
A lot has changed.
OK I try.Oh,
yes, he was right.
Blog Post with details:
https://yeah.computer/posts/025-chatgpt4-as-developer-wow/
11
views
Brute Force: is there such a thing?
In this video we explore the realities of implementing a brute force solution by doing an exhaustive search over all the possible moves in the game.
The game is a Mobile game called Water Sort Puzzle available in Android and IOS. The solution is in this GitHub implemented in Golang.
0:00 Start
0:40 How is the Game
2:30 It is never brute force
4:30 The Code
6:30 The Prunning
12:00 Board Hashing
16:00 Reusing State Buffers
20:45 CPU Caches, GC and Optimising memory use
23:35 Conclusions
https://yeah.computer/posts/024-brute-force-is-there-such-a-thing-solving-water-puzzle/
https://github.com/kuking/WaterSortPuzzleSolver/
8
views
How Computers Deal With Time; a compendium
How Computers Measure Time; a compendium
0:00 Start
1:05 Time Sources
4:50 Time Keepers
6:35 Measuring Physical Time
9:28 Measuring CPU Time
11:55 Storing Time
14:05 Arithmetics
16:55 Serialisation
2
views
How I got Myself Involved in Quantum Cryptography
I implemented FrokoKEM in Golang as a way to learn more about Golang and Quantum cryptography, and I ended up getting a job offer in the process. Or how can you get yourself involved in an industry or technology by implementing things that maybe are already done or 'solved' problems, still it signals a strong interest. I also explain a bit about the project, how it is tested and its code quality that managed to get referenced as the Golang implementation by the authors.
https://frodokem.org/
https://github.com/kuking/go-frodokem
0:00 Intro to NIST Quantum Cryptography competition
2:15 FrodoKEM
3:30 Quantum is moving fast, lots of people
5:10 Details on my Golang implementation
9:30 Soak Tests
13:10 Example Code for using The library
16:20 Code Details, Matrixes! Further AVX2
18:42 Timing Attacks, or how to shot yourself in the foot 4 million times
22:30 You have to do Cryptography to learn Cryptography (responsibly)
24:00 Build Things even if they are "Solved/Done": Best job introduction or Partner
24
views
Learning Quantum Cryptography by Doing It
PQSW is a secure transport layer (like TLS) implemented using modern quantum resistant cryptography from scratch, for learning and fun (I can not say it can be used commercially as it has not been audited, but it has been done properly, it is not a toy project.)
We explore one-time-pads, client puzzles, session key derivation, how to optimise the encryption envelops for network traffic, and some other intricancies.
0:00 Introduction & Caveats
3:05 Post-Quantum Secure Wire
8:25 Protocol Handshake
10:20 Client Puzzle intro
12:20 KEM's Server & Client setting a session
16:30 Pragmatic One-Time-Pads
18:00 The Key Distribution 'problem' not solved
19:16 Mini-demo
20:00 The Config File
20:25 How The Client Puzzle Works
22:05 Testing it
26:00 Key Encapsulation Mechanism (KEM) in detail
30:30 Key Schemes and its Key Sizes
34:00 Session Keys, AES Encryption
36:00 Network Packeting approach
39:30 Closing Comments
6
views
Passwords: Welcome to the Rabbit Hole
Will passwords be obsolete? In 5 or 10 years? Probably not ... It is likely you might end up having to implement an authentication system or a password storing
software and... well, welcome to the rabbit hole of dealing with passwords.
In this presentation we give comprehensive overview on how to handle, verify and store passwords correctly.
0:00 Start
0:28 Are Needed?
1:15 Password Strength
6:08 Online Attacks
9:20 Offline Attacks
11:25 Salt, Pepper & Stretching
11:30 Stretching
16:25 Salt
18:35 Pepper
21:45 Then and only after doing all that, you can store it!
22:05 Rotating Passwords
24:45 Indirect Master Password Derivation
28:25 The Future Now
28:30 Authenticate With a device
33:20 A password-less future?
https://yeah.computer/posts/020-passwords-welcome-to-the-rabbit-hole/
14
views
Why You Should Use Memory Mapped Files
A memory mapped file is a file that can be read like a byte array from your program. They are the fastest way to parse data and to do inter-process communication (by a long way). In this video we explain its intricacies, and we show a demo program capable of doing 11 million ping-pong messages per second between two process using memory mapped files.
0:00 Start
2:30 Some of the Basics First
7:00 Semantical Benefits
10:40 Code: How to Open a Memory Map File
15:30 Performance Benefits
16:00 Swap and Memory Map Files are the same thing
22:00 Most Efficient way to Share Memory Between Processes; Compare And Swap, Memory Barriers
25:20 One System Call
27:38 Code: Memory Mapped File Ping between two processes
31:00 Code: Atomic Load/Store
34:50 Demo: 9 millions pings per second between two processes via mapped files
36:30 Demo: vs 24 kilo pings per second when using local network
40:20 The Small Prints: two caveats
46:30 Thank you
The Memory Ping Pong: https://github.com/ComputerSaysYeah/MemMapPing
The Blog Post: https://yeah.computer/posts/019-why-you-should-use-memory-mapped-files
19
views
Cryptography: Seof Golang encrypted os.file
**We dive into cryptography topics, filesystem internals, attack vectors and mitigations, etc.**
We explain the internals for seof.File a Golang drop-in replacement for os.File. As per its website https://github.com/kuking/seof : Encrypted drop-in replacement of golang' os.File, the file stored in disk will be encrypted, and the resulting type can be used anywhere an os.File could be used. i.e. it can be both sequentially and randomly read and write, at any file position for any amount of bytes, can be truncate, seek, stats, etc. i.e. Read, ReadAt, WriteAt, Seek, Truncate, etc.
0:00 Start
0:48 What is SEOF?
1:58 Why you Want Something Like This?
12:12 How do you Use It?
13:58 Roughly How it Works?
20:05 File Structure
26:30 Code Overview
29:10 Command Line Interface
32:35 Soak Test
36:10 Theoretical Attack Vectors Discussion
51:30 Usage and Final Words
Blog article: https://yeah.computer/posts/018-cryptography-seof-golang-encrypted-os_file
40
views
LeetCode 2734: Lexicographically Smallest String After Substring Operation
This one is not as hard as it looks. We just need to replace some characters, only one edge case to consider.
https://yeah.computer/posts/016-leetcode-2734-lexicographically-smallest-string-after-substring-operation/
9
views
LeetCode 2684: Maximum Number of Moves in a Grid
A recursive dynamic programming solution implemented using Python 3 @Cache to simplify its solution, it avoids building dynamic arrays, etc. It also makes it easier to follow and understand.
https://yeah.computer/posts/015-leetcode-2684-maximum-number-of-moves-in-a-grid/
8
views
LeetCode 2729: Fascinating checking if the number
We check if a number is fascinating in this exercise according to what LeetCode says is a fascinating number 😄
https://yeah.computer/posts/013-leetcode-2729-checking-if-the-number-if-fascinating/
4
views
LeetCode 2733: Neither Minimum or Maximum
One word changes everything. We solve LeetCode 2733 problem in this exercise, where we are asked to find a number that is either not the maximum nor the minimum of a given list. Solved in Python 3.
https://yeah.computer/posts/014-leetcode-2733-neither-minimum-or-maximum/
7
views
LeetCode 2683: Partners In Crime, Neighbouring Bitwise XOR
One line solution to a boolean logic arithmetics puzzle. We are given a derived array and a ruleset for creating those arrays; the puzzle is about deciding if that derived array can be constructed using those rules. The solution is one line of Python 3 for a Medium level problem.
https://yeah.computer/posts/012-leetcode-2683-partners-in-crime-neighbouring-bitwise-xor/
5
views
LeetCode 2685: A Good One! Number of Connected Components
We give a brief introduction to graph painting and what are 'clique sub-graphs' which is what the problem is actually asking to find. Solved in Python 3.
https://yeah.computer/posts/011-leetcode-2685-a-good-one-number-of-connected-components/
3
views
LeetCode 2682: Don't Be Loser! Find The Loser!
In this episode we are solving a simple looping game with a module twist operation. Infinite loops, but warrantied finishing due to maths and sets. Solved in Python 3.
https://yeah.computer/posts/010-leetcode-2682-dont-be-loser-find-the-loser/
8
views
LeetCode 2731: Lots of Hacks! Movement of Robots
In this video we show how a 'convoluted' problem description can be simplified massively, but you need to know the math and do the thinking! Solved in Python 3.
https://yeah.computer/posts/009-leetcode-2731-lots-of-hacks-movement-of-robots/
6
views
LeetCode 2711: Cleverly Done! Difference of Number of Distinct Values
We comment on a very clever and "Pythonesque" way of solving LeetCode 2711 by the user `IvanWW` in one big expression. A masterclass in List comprehensions.
https://yeah.computer/posts/008-leetcode-2711-cleverly-done-difference-of-number-of-distinct-values/
9
views
LeetCode 214: Shortest Palindrome
In this video we show how a 'hard' problem is not necessarily hard to understand and deconstruct. We show how it can be split in two basic problems, verifying if a string is palindrome, and one by one starting to build up the prefix until it satisfies.
Solved in Python 3
Blog post here: https://yeah.computer/posts/007-leetcode-214-shortest-palindrome
8
views
LeetCode 8: String To Integer
We are solving LeetCode 8 "String to Integer (atoi)" because this one also has generated a lot of grief in the reviews (3.3k 👍 vs 10.2k 👎).
A simple greedy algorithm but way too many complains on edge cases.
Solved in Python 3
Blog post here: https://yeah.computer/posts/006-leetcode-8-string-to-int/
5
views
LeetCode 2716: Keep It Simple
LeetCode 2716. Minimize String Length
Please ignore all the noise, if there is a big complicated explanation, its only purpose it is probably to confuse you.
Solved in Python 3
Blog post here: https://yeah.computer/posts/004-leetcode-2716-keep-it-simple/
5
views
LeetCode 11: Don't Be Average!
LeetCode 11. Container With Most Water
In this video we split the average vanilla solution for LeetCode 11 by introducing two IF conditions, and by doing so we make it the fastest algorithm. We explore the point of mathematical declarations versus procedural calculations and finally we introduce a tiny optimisation on dealing with the height.
Solved in Python 3
Blog post here: https://yeah.computer/posts/003-leetcode-11-dont-be-average/
9
views
LeetCode 1: Two Sums Revisited and Demystified
Dictionaries are Overrated
In this video we revisit and demystify the two common solutions for the classic LeetCode : Two Sums.
Memory Vs CPU, The C part of O(1)+C.
Solved in Python 3
Blog post here https://yeah.computer/posts/001-leetcode-1-two-sums-revisited-demystified/
17
views