Cheesed Up
Cheesed Up
  • Видео 20
  • Просмотров 183 627
Save Money With Free and Open Source Software! | FOSS
Let's imagine a simple example of how changing the programs you use to open source alternatives not only improves your experience in the long run, but can also save you money!
Disclaimer: Not a financial advice!
Просмотров: 25

Видео

Linux Shell in 57 Lines of Rust | bubble-shell
Просмотров 6 тыс.14 дней назад
How does a shell work? What does it do? Let's walk through the code of a tiny implementation of a unix shell which fits in under 60 lines of Rust! source: github.com/JoshMcguigan/bubble-shell
Linux Containers in 41 Lines of Go
Просмотров 7 тыс.21 день назад
Do you know which basic concepts Docker or LXC use? Let's use this tiny Go example to learn how! sources: - video: ruclips.net/video/Utf-A4rODH8/видео.html - article: www.infoq.com/articles/build-a-container-golang/
Microcontr... WHAT? | What I Wish I Knew When Starting Out With Microcontrollers
Просмотров 4,2 тыс.28 дней назад
I want to share a few essentials about microcontrollers. What are they? How to pick an appropriate one for your project? What kind of software can be used to program a microcontroller? And more.
Blockchain in 72 Lines of Python | justblockchain
Просмотров 958Месяц назад
In this video, we are taking a look at a small example of a blockchain implementation in Python. The chain also implements proof of work. original source: github.com/koshikraj/justblockchain
Real-Time Operating System in 96 Lines of C | RIOS
Просмотров 84 тыс.Месяц назад
Let's take a look at the most basic form of an RTOS - a project called RIOS, which in it's most basic form fits under 50 lines of C. RIOS Source: www.cs.ucr.edu/~vahid/rios/
Game of Life in 54 Lines of Python | Conway's Game of Life
Просмотров 1,3 тыс.Месяц назад
In this video, let's quickly look at how a simple stupid implementation of Conway's famous Game of Life looks like in Python. Code based on example from here: www.geeksforgeeks.org/program-for-conways-game-of-life/
System Tray Icon in 176 Lines of C | libayatana-appindicator
Просмотров 759Месяц назад
In this video, let's look at how to create a simple GTK program which includes an app indicator icon in the system tray. Code from: github.com/AyatanaIndicators/libayatana-appindicator
Improve Your Sway Experience With Scripts | My SwayWM Scripts
Просмотров 6412 месяца назад
In this video I'll show you two of my scripts for automating certain aspects of Sway window manager: One for automatic tiling and another for managing scratchpad windows. repository: github.com/kndndrj/sway-scripts
Compiler in 191 Lines of C | tinyc
Просмотров 22 тыс.2 месяца назад
How do compilers actually work? Let's take a look inside the simplest possible compiler, which supports a subset of C and fits into 191 lines of non-comment, non-whitespace C! source: www.iro.umontreal.ca/~felipe/IFT2030-Automne2002/Complements/tinyc.c
New Iterators in Go 1.23
Просмотров 5712 месяца назад
Let's talk about iterators in the upcoming Go 1.23 release - what are they supposed to do, how they look like and are they going to make the language better or worse? sources: - python iterator example: stackoverflow.com/questions/2776829/difference-between-pythons-generators-and-iterators - rangefunc article: go.dev/wiki/RangefuncExperiment
Write a Custom Neovim Dbee Layout Using Lua!
Просмотров 3003 месяца назад
Let's make a custom layout for nvim-dbee. We'll be using the Neovim Lua API and extend the database client plugin! Dbee: github.com/kndndrj/nvim-dbee My config: github.com/kndndrj/nvim
Manage Docker Compose Projects with ease!!
Просмотров 1074 месяца назад
Conductor is my way of managing Docker Compose projects for local development. In this video, I talk about what it does and what problem it is trying to solve. repository: github.com/kndndrj/conductor
nvim-dbee: Interactive Database Client Within Neovim
Просмотров 4,5 тыс.4 месяца назад
keywords: Neovim,Vim,Database,nvim,Database Client,Postgresql,Docker,Golang,Lua,SQL,Neovim Plugin Let's have a quick look into my database client plugin for Neovim! Repository: github.com/kndndrj/nvim-dbee
Computer Mouse from SCRATCH With RUST Firmware!
Просмотров 1,4 тыс.4 месяца назад
Computer Mouse from SCRATCH With RUST Firmware!
You Wouldn't CUT Through a KEYBOARD, Would You?
Просмотров 834 месяца назад
You Wouldn't CUT Through a KEYBOARD, Would You?
Install Fusion 360 on Arch LINUX!!!
Просмотров 9 тыс.3 года назад
Install Fusion 360 on Arch LINUX!!!
Add a Simple LOADING BAR To Your Shell Scripts!
Просмотров 42 тыс.3 года назад
Add a Simple LOADING BAR To Your Shell Scripts!

Комментарии

  • @kjyu4539
    @kjyu4539 5 часов назад

    salute to Richard Stallman the great

  • @Ahoora-o2v
    @Ahoora-o2v День назад

    Hello, I have a question. I want to know whether Zig language can be better than Rust or not, and why Rust has been getting so much hate for some time now, and what is your opinion about Zig or Rust for creating very bad malware?

    • @cheesed_up
      @cheesed_up 14 часов назад

      I haven't really had a lot of experience with Zig, but the way I see it, they are different languages for different purposes. Zig wants to be more like "the next C", whereas Rust wants to be "the next C++". In terms of Rust getting hate... I'm not sure what you think, but if Rust is getting hate it's probably because of either Rust evangelists (users, who think Rust should be used for everything everywhere unconditionally) or the Rust Foundation (the org behind Rust). For writing malware, I think that very good malware is probably like any good software - it can be written with numerous tools, it's just easier to do it with some. Hope I helped!

  • @WiseWeeabo
    @WiseWeeabo День назад

    "in 191 Lines of C" The lines: if (sym == ID) { x=new_node(VAR); x->val=id_name[0]-'a'; next_sym(); }

    • @cheesed_up
      @cheesed_up 14 часов назад

      I know, I thought the same thing - but I decided to leave the code be as the original author wrote it. I guess we could **improve** the code to make a "compiler in 1 line of C" :D

  • @lawrencemanning
    @lawrencemanning 3 дня назад

    It make me laugh how new kids to Linux harp on about containers (less so admittedly now Docker is no longer new) yet folk were selling locked down “private” shell access on Unix machines back to the early/mid 1990s! Chroot on steroids as another commenter wrote.

    • @cheesed_up
      @cheesed_up 3 дня назад

      Really is chroot on steroids, that comment made me laugh as well! Jokes aside, I'm very glad that containers are a thing, pushing to prod and development are a lot easier in some circumstances :D

    • @lawrencemanning
      @lawrencemanning 3 дня назад

      @@cheesed_up sure thing. But the guts of Docker are nothing a competent Unix sysadmin couldn’t knock together in a few hundred lines of /bin/sh.

  • @ixin645
    @ixin645 4 дня назад

    i was thinking of achieving that with some kind of a buffer for the current tty and using clear to update it to the next one (instead of remembering cursor position)

  • @spacedock873
    @spacedock873 4 дня назад

    The family of MCUs you choose depends mostly on the size of project you intend to do now in the future. Recommending an ARM controller is likely to be massive overkill and completely overwhelming for hobbyists and beginners. It's like buying an articulated truck to transport a parcel to the post office - yes, it will do it but it is big, expensive, complex and complete overkill. Arduino would be a much better choice for this target audience. I personally use PIC controllers and program in assembler for small hobby projects.

    • @cheesed_up
      @cheesed_up 4 дня назад

      Thanks for the comment! And yes, I mostly agree with you - in terms of "getting there fast" nothing can beat Arduino.

    • @spacedock873
      @spacedock873 3 дня назад

      Great things about the Arduino are that they can be very cheap (depending which version you get), have a thriving community, have comprehensive libraries for many devices, have a simple programming environment and work at a hobbyist friendly 5V. I have everything from simple 8 pin PIC's up to Raspberry Pi's and choose an appropriate scale of device depending on the project. I tend to use mid-range 8-bit PIC's most of the time due to their range of capabilities and small size but I do admit that Microchip's documentation is often confusing or misleading and in some cases is completely wrong! Not ideal for beginners!

  • @shenmuea
    @shenmuea 5 дней назад

    great video! How can I implement this in a system update script I made?

    • @cheesed_up
      @cheesed_up 4 дня назад

      I think there should be info about this in the readma (see description for the link to the project). But essentially, you copy these functions to your script and call them at appropriate times.

  • @Chemaclass
    @Chemaclass 6 дней назад

    Super cool!

  • @bubach85
    @bubach85 7 дней назад

    FYI: This guy has no idea what an RTOS is. Nothing he said about it is true. 🤣

    • @cheesed_up
      @cheesed_up 4 дня назад

      Thanks for the feedback! May I ask what makes you say that? I don't want to spread misinformation and am happy to listen to what you have to say!

  • @TopchetoEU
    @TopchetoEU 8 дней назад

    for the love of christ never show your code publicly again

  • @anon_y_mousse
    @anon_y_mousse 9 дней назад

    I'm wondering if the link in the description was changed or if the people complaining about it don't know how to copy and paste. Even cell phones allow you to copy and paste from descriptions so I can only assume it was altered. That said, it'd be cool if you took the TinyC code and refactored it. Use more modern idioms and maybe add some optimizations to it. Perhaps turn it into an actual compiler that generates either assembly or a binary object file ready to link.

    • @cheesed_up
      @cheesed_up 8 дней назад

      Regarding links: RUclips masks them if the channel is not big enough or something like that.

    • @anon_y_mousse
      @anon_y_mousse 8 дней назад

      @@cheesed_up If that's what it was, then congrats on getting big enough. Hopefully that doesn't sound weird.

  • @PotatoCider
    @PotatoCider 9 дней назад

    it seems that all commands in the pipelime get executed at once. what happens when a command in the pipeline exits due to a syntax error? does stderr print to the parent shell directly? great code analysis btw.

    • @cheesed_up
      @cheesed_up 4 дня назад

      I can't say anything for certain - but as you already figured it out, this example is (IMO) very good for getting a feeling for what a shell is and what it does. But it skips on a lot of good practices, including error handling :/. I still recommend playing around with the example - I had quite a lot of fun!

  • @ItsCOMMANDer_
    @ItsCOMMANDer_ 10 дней назад

    Looks cool, maybe i'll make my own using a round robin sheduler, i'll see

  • @CallousCoder
    @CallousCoder 10 дней назад

    Terrible code! All in s single main ugghhh… 😂 Also there are no spaces required before and after pipeline. So the example code is even flawed 😂

    • @cheesed_up
      @cheesed_up 4 дня назад

      Yes, the code is just an "as dumb as it gets" example. I hope that the video was still enjoyable :)! Thanks for the comment!

    • @CallousCoder
      @CallousCoder 4 дня назад

      @@cheesed_up it was good video for sure!

  • @DanDeebster
    @DanDeebster 11 дней назад

    Great video with no wasted time, good stuff 👍

  • @orgs804
    @orgs804 11 дней назад

    which color scheme is that?

    • @cheesed_up
      @cheesed_up 10 дней назад

      it's from gleam lang's website - I found it just for VSCode though :/

  • @DeclanMBrennan
    @DeclanMBrennan 12 дней назад

    Thanks for a very clear explanation. I wonder why all the "goto again" s are included rather than the usual style of using break and placing the switch in a do while loop controlled by a handled bool.

    • @cheesed_up
      @cheesed_up 10 дней назад

      Glad that you liked the video! I wondered the same thing, but I gotta admit that even using goto's looks pretty clean. Because of this unexpected observation, I don't want to alter the code of these examples if possible. I like seeing different programming styles, even though I don't necessarily like them!

  • @jon9103
    @jon9103 12 дней назад

    RTOS doesn't mean a basic OS, though they typically are. It means that they are designed to handle real-time constraints which is difficult to do on bloated OSes, hence why they tend to be stripped down, bare bones implementations.

    • @cheesed_up
      @cheesed_up 10 дней назад

      If I could pin a comment, this would probably be it :D

  • @marcsfeh
    @marcsfeh 13 дней назад

    thanks for this BLAZINGLY FAST and MEMORY SAFE shell, very cool

  • @mattiamarchesini3387
    @mattiamarchesini3387 14 дней назад

    cd without arguments should drop you into the home directory

    • @cheesed_up
      @cheesed_up 14 дней назад

      I agree. It's probably done this way to avoid handling env vars (I haven't tried if "$HOME/" instead of "/" works though.

  • @ruffianeo3418
    @ruffianeo3418 14 дней назад

    Its not R (real time), its not OS. Its just a program, where you moved all task executions into the interrupt handler. To make out of your "interrupt runner" a scheduler, you should at least schedule the tasks from main. Your timer interrupt is then just the producer of your ticks time base (e.g. 1ms per tick). And main() calls your cooperative "schedule()" function within its while loop. To make it a "cooperative real time scheduler", if such a thing exists, you would need to runtime validate the time constraints of each running task, to see if R is violated and then... do something drastic to inform the user (of the device). I recommend a 150dbA siren for that... And you would specify for each (periodic) task, not only its interval, but also its maximum allowed run time per call. To make it an OS, well - some OS indeed are only the scheduler. You could add inter-task communication facilities or something. Or a driver model... The PC version of my especially for this comment hacked up cooperative scheduler thing is around 200 lines + the application code of the demo with 5 cyclic tasks (another 100 lines). here, main() looks like this: int main (int argc, const char* argv[]) { HCOOP coop = CoopInitialize(5); if (0 != coop) { init_tasks(coop); int running = 1; while (running) { running = CoopSchedule(coop); milli_sleep(10*1000); } } CoopTerminate(coop); return 0; } The milli_sleep() is not for the embedded case, but even there, you might want to save power while nothing is running. (HALT instruction on some CPU and let the timer interrupt wake you up.) The scheduler just runs tasks, which need running according to the current tick-time. int CoopSchedule(HCOOP domain) { CoopDomain_t* coop = (CoopDomain_t*)domain; if (NULL != coop) { uint64_t now = atomic_load(&coop->ticks); for (size_t i = 0; i < coop->tasksEnd; i++) { if (now >= coop->tasks[i].next_due) { coop->tasks[i].next_due = now + coop->tasks[i].interval; if (TEST_FLAG(coop->tasks[i].flags, TASK_FLAG_ENABLED) && NULL != coop->tasks[i].body) { coop->currentTaskId = coop->tasks[i].id; coop->tasks[i].body(domain); } } } return coop->running; } return 0; } I use atomics, because my ticks are being incremented in an extra thread (kinda simulating the ISR of a timer). And just because I wanted to.

  • @twenty-fifth420
    @twenty-fifth420 15 дней назад

    I would classify this channel the ‘The Joy of Programming’, it is like Bob Ross but with code. “Now let me just paint this happy little shell right here in my VIM. Don’t be afraid of that loop, it will keep you safe while you structure your -painting- program.”

    • @cheesed_up
      @cheesed_up 15 дней назад

      made my day, thanks :D

  • @clojurediary
    @clojurediary 15 дней назад

    Wow!

  • @arlenegrundy7671
    @arlenegrundy7671 15 дней назад

    Nice…❤

  • @Kalumbatsch
    @Kalumbatsch 15 дней назад

    Not sure if a minimalist scheduler running on a microcontroller qualifies as an operating system, but hey. It's kind of cute.

    • @cheesed_up
      @cheesed_up 14 дней назад

      To add to this: I'm not sure if an RTOS qualifies as an operating system :D

  • @patryk4815
    @patryk4815 15 дней назад

    there is also Time namespace, he, is missing on video

  • @x-gamessimulator1067
    @x-gamessimulator1067 16 дней назад

    I like the ESP32 because it's a SoC microcontroller! WiFi and Bluetooth on board is great, plus ESP-NOW! What I don't like about the ESP32 is that the ADC inputs work strangely!

  • @AK-vx4dy
    @AK-vx4dy 16 дней назад

    Cool & interesting video! We need more like this !

  • @0x9e
    @0x9e 16 дней назад

    from 6:55 to 6:58, you show us a list of topics. im interested in looking at the whole list, what's the source? great video by the way

    • @cheesed_up
      @cheesed_up 16 дней назад

      Sure: www.grymoire.com/Unix/Sh.html - it's a pretty interesting site!

  • @ollicron7397
    @ollicron7397 16 дней назад

    Rust...the woke language.

    • @cheesed_up
      @cheesed_up 16 дней назад

      Yes, I think its time to rewrite this channel in Rust!

  • @papakamirneron2514
    @papakamirneron2514 16 дней назад

    These projects take my understanding of shells and OSs from “unfathomably complex millions of lines of code” to “quite easy if you’re ok with it not being the next Linux”.

    • @cheesed_up
      @cheesed_up 16 дней назад

      I'm very glad that you like it! That was my goal with these "Something in N lines of code" videos :D

  • @stefanalecu9532
    @stefanalecu9532 16 дней назад

    rUsT

  • @guzmonne
    @guzmonne 17 дней назад

    Very cool

  • @xxXXuser69420XXxx
    @xxXXuser69420XXxx 18 дней назад

    is arch's sh not posix compliant? if [ $(($bar_count % $percent)) -lt 100 ]; then won't stop complaining about the %

  • @lets_lvl_up
    @lets_lvl_up 18 дней назад

    avrdude..... gr8 naming right there

  • @cloud-native-corner
    @cloud-native-corner 19 дней назад

    Excellent explanation!

  • @typedef_
    @typedef_ 19 дней назад

    I only understood line 26

  • @pavelyankouski4913
    @pavelyankouski4913 20 дней назад

    ASCII stuff

  • @gerooq
    @gerooq 20 дней назад

    Very cool but how is this actually different from just regular old embedded programming?

    • @cheesed_up
      @cheesed_up 14 дней назад

      I don't think it's different. This is just an example of how a basic preemptive scheduler might look like.

  • @Alice8000
    @Alice8000 21 день назад

    You shoulda just said I use Neovim at the beginning... sheesh

  • @ChrisCox-wv7oo
    @ChrisCox-wv7oo 22 дня назад

    Are there any sort of performance benchmarks, or reasons that I wouldn't want to use a docker container compared to this technique? We often use containers to build against platforms and libraries that are not on the host machine.

    • @MaxCE
      @MaxCE 22 дня назад

      this isn't a tutorial this is just learning how most Linux containers work

  • @Paxsali
    @Paxsali 22 дня назад

    I don't understand why there is no LISP like low-level programming language. If the syntax was a LISP, then the compiler would not have to worry about converting tokens into an AST, because who cares about that anyway? The job of the compiler is to produce portable or optimized code, not do re-invent wheels. Imagine a C like low-level systems programming language that forces their users to write in a LISP like syntax, so that the context of any number of operations and functions is crystal clear for the compiler (and unambiguous). The compilers would have a lot less complexity that way and can focus on stuff that makes them "magic" (all the implicit re-writes and transformations that makes code faster). Just my thoughts that were spontaneously popping in my head as I was listening to this video...

    • @DeclanMBrennan
      @DeclanMBrennan 12 дней назад

      Crystal clear to the compiler but hard on the human with *L* ots of *I* rritating *S* uperfluous *P* arentheses. 🙂 (A very old joke).

  • @khomo12
    @khomo12 22 дня назад

    Very nice!

  • @Antonio-yy2ec
    @Antonio-yy2ec 23 дня назад

    Pure gold! What a coincidence! Just what I needed

  • @zactron1997
    @zactron1997 23 дня назад

    Really informative video! My only critique is your microphone makes it a little hard to hear your voice sometimes. The auto-generated subtitles help a lot, but if you could work on that for future videos that would be amazing. Your actual content and how you speak is great, keep it up!

    • @cheesed_up
      @cheesed_up 23 дня назад

      Thanks for the feedback! I need to learn how to work with sound and buy a new microphone!

  • @dllsmartphone3214
    @dllsmartphone3214 23 дня назад

    Docker = chroot on steroods

  • @khoaho1446
    @khoaho1446 24 дня назад

    Thank you sir

  • @MahmudulHasan-wk3qv
    @MahmudulHasan-wk3qv 24 дня назад

  • @evespirit
    @evespirit 24 дня назад

    You cannot possibly call a simple scheduler like this a "real time operating system". This is nothing more than ready made boilerplate.

    • @cheesed_up
      @cheesed_up 4 дня назад

      I agree, if this was a "real" project, calling it RTOS would be a bit arrogant to say the least. However, since this is ane ducational example, I don't blame the authors for calling it that. Do you agree?

  • @enriquedelacal2814
    @enriquedelacal2814 25 дней назад

    Can you provide a source for the tinyc code? Im afraid the link in the description doesnt work

    • @cheesed_up
      @cheesed_up 4 дня назад

      Should be there now!

    • @enriquedelacal2814
      @enriquedelacal2814 2 дня назад

      @@cheesed_upthank you so much! Im cheesed to say im subscribed