- 21
- 1 114 639
Daedalus Community
Italy
Приєднався 19 сер 2018
Everything (mostly computer) science!
Making a simple Dynamic Memory Allocator (malloc)
In this video I discuss how to make a simple dynamic Memory Allocator.
CODECRAFTERS x DWB:
Link of the charity: www.doctorswithoutborders.org/
Codecrafters Link, offering a 40% discount off of our 1-year plan: app.codecrafters.io/join?via=mell-o-tron
CODECRAFTERS x DWB:
Link of the charity: www.doctorswithoutborders.org/
Codecrafters Link, offering a 40% discount off of our 1-year plan: app.codecrafters.io/join?via=mell-o-tron
Переглядів: 11 896
Відео
Lizards that play Rock Paper Scissors - Uta Stansburiana Sillycon Desert
Переглядів 2944 місяці тому
Part of the final 2024 seminar session of "The Knights Who Say Lambda" In this seminar, Alessandro Scala and Salvatore Salerno tell us about some lizards, and their Rock-Paper-Scissors behaviour.
Frog Checking - Applying Model Checking to a Population of Frogs
Переглядів 1924 місяці тому
Part of the final 2024 seminar session of "The Knights Who Say Lambda" In this seminar, the Frog Master (Matteo Simone) tells us how to apply approaches from model checking to a population of frogs.
Complex Systems and Traffic Models
Переглядів 2784 місяці тому
Part of the final 2024 seminar session of "The Knights Who Say Lambda" In this presentation I introduce the topic of complex dynamical systems, and describe how I implemented two traffic models in Godot. Github: github.com/mell-o-tron/road-network-sim
Computing π with four dice and a grid (π day 2024)
Переглядів 7568 місяців тому
Hi! In this video I compute π through a classic Montecarlo algorithm. Hope you enjoyed it! More to come soon!
Can we do without while loops?
Переглядів 4,7 тис.Рік тому
Proof that the Ackermann function is not primitive recursive: www.cs.utep.edu/vladik/cs5315.21/notAllPr.pdf
Graph Theory (for Computer Science) - A Short Overview
Переглядів 4,1 тис.Рік тому
Graph Theory (for Computer Science) - A Short Overview
Computing π with my own programming language (Pi Day 2023)
Переглядів 2,7 тис.Рік тому
This is not the usual video, the quality is terrible, but I hope you'll appreciate this anyway :) Happy pi day! Github repo: - github.com/mell-o-tron/Lambda-Maj7 Corrections: - When I said "multiple of ten", I of course meant "power of ten"
Functional programming - A general introduction
Переглядів 115 тис.Рік тому
The functional paradigm is a bit different from the ones most people are familiar with. This is why I decided to make a video about it, to present its general features without talking about any language in particular, and without ever mentioning category theory.
My Latest Projects - Short Recap (2021/22)
Переглядів 3,7 тис.2 роки тому
This is a very, very short update of what I have been doing lately :) The sound is a bit off, because I'm in campus and don't really have a good microphone here... sorry about that! Project repos: github.com/mell-o-tron/PySimplex2D github.com/mell-o-tron/PyNewton github.com/mell-o-tron/PyNewtonFractal github.com/mell-o-tron/MellOs Additional projects I've worked on after publishing the video: g...
Making an OS (x86) Chapter 7 - Cross Compiler, Bootloader, Kernel
Переглядів 67 тис.3 роки тому
The Arch build script is finally here! github.com/mell-o-tron/MellOs/blob/main/A_Setup/setup-gcc-arch.sh Note: the "extern" keyword from C doesn't work in C !You need to say extern "C" instead of extern (from user Barracuda _) Next Episode: www.patreon.com/posts/55409989 Debian Shell Script: github.com/mell-o-tron/MellOs/blob/main/A_Setup/setup-gcc-debian.sh Full Code: github.com/mell-o-tron/OS...
Making an OS (x86) Chapter 6 - Entering Protected mode, GDT
Переглядів 59 тис.3 роки тому
Corrections: - You could actually use colors in real mode as well, by setting the bl register - I wrote binary values as 010010 instead of 0b010010 Hostinger link: www.hostinger.com/daedalus Coupon code: DAEDALUS New Website: www.mrdalliard.com Full Code: github.com/mell-o-tron/OS-Reference/blob/main/6/6.asm OSDev articles for exercise: wiki.osdev.org/Text_mode wiki.osdev.org/Drawing_In_a_Linea...
Making an OS (x86) Chapter 5 - Reading the disk with BIOS
Переглядів 46 тис.3 роки тому
Corrections: - 2:37 the size of the boot sector is 512 bytes, not 256 - 3:29 you can't just move 0 to the es register. you should do something like: mov ax, 0 mov es , ax make sure you're not losing the contents of ax, do a push/pop if you want to be safe with that. Full Code: github.com/mell-o-tron/OS-Reference/blob/main/5/5.asm As requested by some of you, I made a patreon: www.patreon.com/Da...
Making an OS (x86) Chapter 4 - Stack, Functions, Segmentation
Переглядів 49 тис.3 роки тому
Making an OS (x86) Chapter 4 - Stack, Functions, Segmentation
Making an OS (x86) Chapter 3 - Strings, Keyboard Input in BIOS
Переглядів 75 тис.3 роки тому
Making an OS (x86) Chapter 3 - Strings, Keyboard Input in BIOS
Making an OS - Update, Resources, Future of the Series
Переглядів 35 тис.3 роки тому
Making an OS - Update, Resources, Future of the Series
Making an OS (x86) Chapter 2 - BIOS, Printing the Alphabet, Conditional Jumps
Переглядів 161 тис.4 роки тому
Making an OS (x86) Chapter 2 - BIOS, Printing the Alphabet, Conditional Jumps
Making an OS (x86) Chapter 1 - CPU, Assembly, Booting
Переглядів 475 тис.4 роки тому
Making an OS (x86) Chapter 1 - CPU, Assembly, Booting
I try it, but the screen keep resetting. Is there something wrong with the build file or the setup: ASM=nasm SRC_DIR=src BUILD_DIR=build $(BUILD_DIR)/main_floppy.img: $(BUILD_DIR)/main.bin cp $(BUILD_DIR)/main.bin $(BUILD_DIR)/main_floppy.img truncate -s 1440k $(BUILD_DIR)/main_floppy.img $(BUILD_DIR)/main.bin: $(SRC_DIR)/main.asm mkdir -p $(BUILD_DIR) $(ASM) $(SRC_DIR)/main.asm -f bin -o $(BUILD_DIR)/main.bin setup: QEMU KVM 1 core CPU 512MB RAM
@@nvs-different-ideas if the screen keeps resetting, it means that either the program counter is executing stuff that is not code, or that you're hitting some fault. To check your code, use the OS Reference repo on my github. Let me know :)
5:23 I feel dense… 😅. How does (foo(2))(5) return 10 if 5 was never passed in?
Because foo(2) returns a function that doubles its input. Let's call it f. foo(2) = f such that f(x) = 2x f(5) = 2*5 = 10 Therefore: (foo(2))(5) = 10
@ I guess the f(5) isn’t intuitive to me with (foo(2))(5) because my brain is reading it as (2x)(5) not (2 * 5). I appreciate you responding!
free() needs to know the size passed to malloc(). It can not turn off all the contiguous '1's because it could deallocate another blocks
I spend 2h trying to make it print hello world from 16bits example, converted from AI to 32bits and do not work. your videos make it a lot more easy to understand it. Thanks. *It is hard to find videos like this. A lot of the videos use syscall, that do not help me*
mov ah, 0x0e; Switch to teletype mode mov al, 'A' loop: int 0x10 cmp al, 'z' je end inc al cmp al, 96 jl capital jg small capital: add al, 32 jmp loop small: sub al, 32 jmp loop end: jmp $ times 510-($-$$) db 0 dw 0xaa55
We need your help for making an amd64 OS because I understand the best from you.
3:40 mfw almost a decade ago, I had that exact CM12 rom on that exact LG G3 phone with that exact same "bios" boot animation 😏
0:24 when ur codin in python when doing lists "pop" has the same defiition
the "hello weirdo" jmpscared me(see what i did there)
Thank gosh i resolved my mental problem with this
I started learning elixir and just reading it feels like reading Chinese. This helped a lot! Thanks
2:34 lines of WHAT ...oh...
Your cadence is impossible to predict. I am unable to anticipate when you will do this random 100-200ms pauses in your speech, you are an artist. Love the video. Cheers.
Yeah it's a combination of the way I use punctuation, deliberate short pauses that try to [pause...] **stress** a certain word, and honestly just random pauses introduced by mistake when cutting the SEVERAL audio takes, lol
4:21 shouldn't this be (ds << 16) + offset? Or am I missing something... Why would you add the 16-bit offset (which could be as large as 65535) to a base that is only a multiple of 16? The "ds:offset" expression, in my experience, means "ds concatenated with offset". In this case, that would be the same as (ds << 16) + offset.
my brain hurts
who else opened the console to check the [] + [] and {} + []?
Excuse me, but i am getting an error from qemu, saying no bootable disk. Do you know any way to fix this?
Use this reference code to troubleshoot: github.com/mell-o-tron/OS-Reference
This sounds like jibberish to me. A command is an instruction telling the computer what to do. Whatever form it takes, it is still a command. I don't get the distinction since you never trully define what a command is. I'm also disturbed by the use of the term, "command" in functional programming. Why not choose a unique word without other mean like bloud instead of trying to redefine the word, command? All you're doing is creating confusion. I've watched a number of videos on functional programming without a clear definition of a command. I'll keep trying until I find someone who truly understands this and can explain it to me in terms that I can understand.
0:09: low level* you mean
It's higher level compared to assembly, but overall yeah, I'd say it's pretty low level
Reading through the comment section of every functional programming videos/shorts I've watched, I've come to conclude at the hypothesis that either 1. nobody can agree on the what even is the difference between Functional Programming vs Procedural Programming, everyone keeps saying that an explanation is a procedural programming paradigm even when they are wrong, and vice versa 2. Everyone thinks they are smarter than a university/course lecturer Why the hell are we even using paradigms, just start programming instead of writing a thesis
Perhaps you have something valuable to add to the conversation?
Finally, finallium
After 8 months I decided to tackle this topic again with better understanding of assembly! Anyway here's my homework: mov ah, 0x0E mov al, 'A' something: int 0x10 inc al xor al, 0x20 ; literally only this instruction got added LOL cmp al, 'Z' + 1 jne something jmp $ times 510-($-$$) db 0 db 0x55, 0xAA
the volume of the background music is so high, it's quite annoying. Please either a) talk or b) do music, but when doing a) make sure b) doesn't interfere.
Yeah I'm aware of this. The main problem is, I find my own voice a bit annoying with no background music. Also, my choice of background music is not ideal, I'd like something a bit more soothing and less distracting, but so far I haven't been able to find anything that fits well :(
as an idiot and also a java dev and java enjoyer this was very informative and entertaining, thank you & subbed <3 @Comment @Dishwasher @CommentContentsConstructor @NoCommentContentsConstructor Sent from my public void abstract interface AccountSubscriberUserBuilderFactoryHelperUtil
This is THE comment
you forgot to extend dozen more interface
Errr.. FUNCTIONS ABSTRACT OVER EXPRESSIONS. End of briefest possible introduction! Simples... (:-)
5:11 I have never thought that assembly was easy
I think I'll stop at Kotlin & Lambdas . Anything more is too pure to me :)
What is property 1 and 2 at the first place You explanation is not clear at all buddy!
The properties are the following: 1: programs are expressions, not commands 2: functions are values I'm sorry you found this unclear, if I can help I'm here :)
i couldnt do the function one i dont know how it works i mean how c i convert it to its ascii value without a database can i get some help
Hi, what specifically do you need help with? If you want an ascii table, google "ascii table" and you will find it
[org 0x7c00] start: mov ah, 0x0e mov bx, variable loopA: mov al, [bx] cmp al, 0 je config1 int 0x10 inc bx jmp loopA config1: mov ah, 0x0e mov al, 0x0a int 0x10 mov al, 0x0d int 0x10 xor bx, bx mov bx, buffer xor cx, cx loopB: xor ax, ax int 0x16 mov [bx], al cmp al, 0 je loopB mov ah, 0x0e int 0x10 inc bx inc cx cmp cx, 10 je config2 jmp loopB config2: mov byte [bx], 0 mov ah, 0x0e mov al, 0x0d int 0x10 mov al, 0x0a int 0x10 mov bx, buffer loopC: mov al, [bx] cmp al, 0 je hang int 0x10 inc bx jmp loopC hang: xor al, al xor ah, ah xor bx, bx jmp $ variable: db "write a word with 10 letters", 0 buffer: times 11 db 0 times 510-($-$$) db 0 db 0x55, 0xaa
me wasting 35 minutes staring at the code not realising i declared the variable after the boot signature
i did the alphabet without cheating... and i put dashes between them too💁♀ Update: i did A-B-C-D-E...Y-Z /13 min/ and A-a-B-b-C-c-D-d-E-e...Y-y-Z-z /around 30 min/ and A-b-C-d-E...Y-z /like 1 minute if not less cuz i just edited the code of the prev one/
Dashes? Now that's fancy :)
0:23 The 🐐
I think there's a mistake in the proof. When you define what list[n] is, the definition isn't include "they can call another list function." There are 2 reason why this rule shouldn't be included. 1. This will cause "circular definition." You can't define list[n] to be "those who can return in a finite time and call another *list function*," or it will be defined by themselves. 2. Consider this function: input n; return list[n](n); This is the function that appeared in video but without "+1" in return statement. If a list function can call another list function, then the above function should also be one. Assume the index of it is x. Then we give x as an argument for it. It will return list[x](x), and it's just itself, so it will be in a recursion for infinite time. Obviously, an infinite recuring function isn't an interesting function, so it isn't a list function, either. Due to the two reasons, a list function shouldn't call another one, so the "weird function" in the video isn't in the list. Therefore, the proof in the video is invalid.
I don't understand what you mean. I define list[n] as "the n-th program that does not use while loops, according to some arbitrary enumeration". The function f(n) = list[n](n) + 1 fits the definition of computable function (because it calls a computable function and applies a computable operation to it), yet by a diagonal argument it is shown not to be in the list. The proof is quite standard, and it is mentioned in several books, among which Godel Escher Bach by Hofstadter, who used a slightly different formalism for the proof: en.wikipedia.org/wiki/BlooP_and_FlooP. The proof also relies on the fact that the set of (finite length) programs that do not use while loops is countable (i.e. it is in a bijection with the naturals), whereas the set of countable functions is not. Therefore, these cannot be in a bijection, hence there are some computable functions that cannot be expressed without using while loops. Edit: Here is a further example of a diagonal argument: en.wikipedia.org/wiki/Cantor's_diagonal_argument Further edit: I probably now understand what you mean. You are saying that making it so that a function in the list can call another function in the list would make the definition circular. It is an understandable objection, and the reason why it is not valid is a bit deep. - As mentioned before, we define the list[n] as "the n-th program that does not use while loops, according to some arbitrary enumeration". - Once we have defined the list, we can define the function f(n) = list[n](n) + 1, and we can ask whether or not such a function is or is not in the list. The one key point is that we're asking *if there is a function in the list that is equal to f*. In order for two functions to be equal, they need not have the same "body", they just need to return the same output whenever provided with the same input. As an example, the two functions "g (x) = sqrt (x^2)" and "h(x) = abs(x)" are not written in the same way, but are **the same function**. So, the function that we are looking for in the list is not one that "calls a list element", but one that behaves in the same manner as the function f(n) = list[n](n) + 1, and is not written using while loops. Is it clearer now?
@@DaedalusCommunity Thanks for you explanation. Now I know where I misunderstood the proof. I mistook the same functions for those with the same body, so i mistakenly thought there's some list[n] call itself and cause infinite recursion. You explained very well. I'm very grateful.
@@dying476 thanks! Your question was very good, too!
Could you help me with the os tutorial? I created an array inside the c file, and when I try to access the array, all the values are null or 0. Could you show me how to fix this?
Could you make a repo and share your code?
Nevermind. I fixed it. Now i need help with including bin files in c.
yapper
ua-cam.com/video/T7UqhDs8zj4/v-deo.html
How dare u give us homework!🤬
👀
Holy sh*t youre back
Quite :))
Fascinating
It's not true you can move memory in linear way with memove moving a pointer elsewhere
(yet another)
Holy shit, you came back
We're so back
I know this isn't the exercise but this looks cool: ; BIOS loads boot sector at 0x7c00 [org 0x7c00] mov ah, 0x0e mov bx, helloworld jmp printout printout: mov al, [bx] cmp al, 0x0 je keybrd int 0x10 inc bx jmp printout keybrd: mov ah, 0 int 0x16 mov ah, 0x0e cmp al, 13 je keybrd_thx int 0x10 jmp keybrd keybrd_thx: mov bx, thx jmp printout helloworld: db "Input stuffs >>> ", 0x0 thx: db " <- lol thx | ", 0x0 ; boot sector times 510-($-$$) db 0 db 0x55, 0xaa
Please, explain what was the purpose of subtracting 3 from 510, to then just add 3 to 507 and end up with 510 again, I got confused
I was explaining the usage of "times" to pad the program with zeroes. 3 bytes is the length of the program so far, hence (510 - 3) is the length of the zero bytes we need to pad the program with. These add up, obviously, to 510.
@@DaedalusCommunity Thank you for the quick response! So if I understood you correctly, hypothetically, one could "hard-code" 510, i.e. "times 510 db 0", right? But that would be bad practice, right?
0:31 only few know what the number 0x7c00 really means
Are you by any chance from the Birmingham school of computer science? Because your code like exactly matches the lectures from the said university -> www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf
void* my_alloc(size_t bytes) { return malloc(bytes); } // ez
You forgot there's no LIBRARIES.
And no size_t
great video, but there was way too much text. it might just be my brain but it took a looong time to get through.
Yeah a few sequences had definitely too much text. That's what happens when one runs out of ideas for animation :( Thanks for the feedback, I'll try to work on that!