Ok, but can you do this in C?

  Рет қаралды 29,064

Tsoding Daily

Tsoding Daily

Күн бұрын

Streamed Live on Twitch: / tsoding
Enable Subtitles for Twitch Chat
Chapters:
- 00:00:00 - Day 1
- 01:55:38 - Day 2
References:
- Martin Kleppe - QLOCK Post - x.com/aemkei/status/179576292...
- Martin Kleppe - QLOCK Page - aem1k.com/qlock/
- Tsoding - qlock.c - gist.github.com/rexim/f582098...
- Tsoding - qlock-toolset - github.com/tsoding/qlock-toolset
Support:
- BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9
- Pay for my VPS: zap-hosting.com/en/shop/donat...

Пікірлер: 90
@tauiin
@tauiin 11 күн бұрын
"where is my nob" - TSoding 2024
@Cmanorange
@Cmanorange 11 күн бұрын
woke up this morning and my nob was gone, can't have shit in gentoo
@dmitrykhamkalov1510
@dmitrykhamkalov1510 10 күн бұрын
Game of Life - "Hello World"
@rogo7330
@rogo7330 10 күн бұрын
Tonight: - red segfault jumpscare, - five times eight is eighty (written as four-zero), - cheating by embeding pp into cstr
@weirdo911aw
@weirdo911aw 9 күн бұрын
lol pp
@dmitrijsojma2296
@dmitrijsojma2296 11 күн бұрын
I just kept waiting for (3+2) to get replaced by 5.
@nikkehtine
@nikkehtine 11 күн бұрын
I love it when I'm watching some guy coding in C and then all of a sudden he starts beatboxing 40:15
@silloo2072
@silloo2072 10 күн бұрын
😂
@monad_tcp
@monad_tcp 10 күн бұрын
that's an undefined behavior
@silloo2072
@silloo2072 10 күн бұрын
@@monad_tcp 😂
@badstep495
@badstep495 10 күн бұрын
There seem to be two differences with respect to the Javascript variant: * The javascript variant uses two characters per pixel, making each pixel appear more squared and the text better balanced * The javascript variant makes the unlit pixels a darker color (for example dark gray on black background compared to white on black) I think by adopting those two changes, the clock will look much nicer :)
@silloo2072
@silloo2072 10 күн бұрын
Tbh I prefer the c Variant it is more readable
@danielsan901998
@danielsan901998 11 күн бұрын
#embed support was just merged to clang this week, but the next day it was reverted because it crashed.
@user-sl4th2pu1z
@user-sl4th2pu1z 11 күн бұрын
laughing man POG
@desocietate9135
@desocietate9135 11 күн бұрын
I never noticed the subtitles, indeed very funny ngl
@graverdev
@graverdev 11 күн бұрын
can't wait for someone to make this in C, just to prove it's possible edit: and here it is, it has been done
@chri-k
@chri-k 11 күн бұрын
I am trying to right now. I also haven't ever written any quine C (i only know how do do that in Ruby), so that'll go well,
@graverdev
@graverdev 11 күн бұрын
@@chri-k go go go
@chri-k
@chri-k 9 күн бұрын
the c-cloq is complete, and can be found at chri-k/quines
@chri-k
@chri-k 9 күн бұрын
@@graverdevSuccess! But due to automod, see my top-level comment
@dr-Jonas-Birch
@dr-Jonas-Birch 8 күн бұрын
Thank you. You have been an inspiration for my own YT channel about C. Keep up the good work. JB
@StaRiToRe
@StaRiToRe 10 күн бұрын
the transition from first part to second part is funny
@remrevo3944
@remrevo3944 10 күн бұрын
57:13 To find out how to clear the screen with ansi escape codes you can also just look at what `clear` is using as it really just prints escape codes to the screen. So just a quick little `clear | xxd` can get you where you need to be.
@RiteshKumar-uy7fx
@RiteshKumar-uy7fx 5 күн бұрын
great work man 100 times thumbs up
@Omena0
@Omena0 11 күн бұрын
This is interesting 🤔 I wouldn't have any idea on how to implement this.
@rodelias9378
@rodelias9378 10 сағат бұрын
Great success! High five!!
@AngisMakkalax
@AngisMakkalax 10 күн бұрын
Парень спасибо тебе что поддерживаешь интерес к Си, лайк на все видео и подписка!
@ivanjermakov
@ivanjermakov 11 күн бұрын
Uneven digit height on top and bottom drives me crazy though
@lolapplesauce
@lolapplesauce 4 күн бұрын
the day 2 rage about the quine is so on point lmao
@lame_lexem
@lame_lexem 10 күн бұрын
didn't know ddg has llm chat now, thank you for showing it
@DanielSchmitt-vu8wh
@DanielSchmitt-vu8wh 7 күн бұрын
Great video as usual. Btw what happened to the raycasting VOD on twitch?
@manucaouette
@manucaouette 10 күн бұрын
For better formatting: in your format_tokens function you forgot to increment x when you add a space to the source code, doesn't change much on the final result but every bit helps
@andrew_0149
@andrew_0149 9 күн бұрын
that is F-ing amazing
@kabukitheater9046
@kabukitheater9046 11 күн бұрын
i like how zozin talks shit about js devs. it's the content i always yearn for lol
@arcxm
@arcxm 11 күн бұрын
Zozin never fails to amaze with interesting content! ♥
@dr-Jonas-Birch
@dr-Jonas-Birch 8 күн бұрын
Is Zozin his name, a nickname of sorts or is it just a word like "buddy" in .ru or something? Regards, another KZbin coder.
@NeuronX
@NeuronX 9 күн бұрын
Hi it's been a while in your channel. I wanted to know your development environment like what distro you're using and window manager etc.
@CyprianBergonia
@CyprianBergonia 8 күн бұрын
Hi, I think now that the clock is offset, you can include time.h back in the source code.then it can compile without extra args. Great job!
@Wekuz11
@Wekuz11 10 күн бұрын
Imagine playing DOOM in a quine
@atxorsatti
@atxorsatti 8 күн бұрын
That Paul and shark shirt is wild
@nonefvnfvnjnjnjevjenjvonej3384
@nonefvnfvnjnjnjevjenjvonej3384 11 күн бұрын
can your javascript do that? can your javascript do that?
@bigmiraclewhips
@bigmiraclewhips 4 күн бұрын
legendary red segfault
@victormuriithi7926
@victormuriithi7926 3 күн бұрын
Nothing hits hard than "those javascript developers"😂😂😂😂😂 made me crack down fr fr.
@xorlop
@xorlop 11 күн бұрын
This was a really cool stream! I liked the "?" trick a lot. I was agonizing that you should have a pre-build step and was satisfied on Day 2 :)
@TsodingDaily
@TsodingDaily 10 күн бұрын
I just needed a little bit of slep
@icringe8166
@icringe8166 9 күн бұрын
What font does he use? Just curious
@hahas95
@hahas95 9 күн бұрын
Haskell quine: main = liftA2 (>>) putStr print "main = liftA2 (>>) putStr print "
@sirynka
@sirynka 10 күн бұрын
2:40:18 You can exchange your organs for "copilot at home" Powered by Nvidia ®
@rogo7330
@rogo7330 9 күн бұрын
Considering that code is only 7-bit ascii and it's not even the whole range you can obfuscate string by replacing it with numbers that encode whole patterns of letters and feed integers to printf instead of string literals.
@chri-k
@chri-k 9 күн бұрын
Remember that the primary (often unstated) goal of making a quine is that it should be as short as possible, and that is not how you do that
@TheCarlitozg
@TheCarlitozg 9 күн бұрын
Some centering and padding with comments would make it even better than JS version
@monad_tcp
@monad_tcp 10 күн бұрын
2:10:11 it means Solaris
@vanitymeetstechnology8792
@vanitymeetstechnology8792 10 күн бұрын
You are Legend My Man... I am inspired by your energy.. by the way what do you eat and drink. No cheating ok
@silloo2072
@silloo2072 10 күн бұрын
What linux are you using? And why there are some suspicious text at the bottom 😳
@ploho__3699
@ploho__3699 10 күн бұрын
that's debian with emacs
@silloo2072
@silloo2072 10 күн бұрын
@@ploho__3699 thanks
@cycomkid
@cycomkid 11 күн бұрын
Waiting for Odin stream😅, so that we can laugh at Jai and Jonathan
@Pepcen
@Pepcen 10 күн бұрын
At first glance this sounds really easy. Is there something I'm missing?
@PopescuAlexandruCristian
@PopescuAlexandruCristian 11 күн бұрын
Epic
@NimaqAlizadeh
@NimaqAlizadeh 10 күн бұрын
Nice
@Cmanorange
@Cmanorange 11 күн бұрын
3:05:11 this is python
@DART2WADER
@DART2WADER 10 күн бұрын
20:00 R"(some text)" maybe?
@chri-k
@chri-k 9 күн бұрын
I succeeded in making a C cloq that is smaller, rectangular and has high-res numbers (but rectangle comes at the cost of no includes, so it can't get the current time by itself) I uploaded it to G/H with my username being the same as my handle, chri (dash) k (that account only has one repo) I am talking in this weird way to try to not trip the auto-mod for the 13th time, and that number is *not* hyperbole
@Bredor
@Bredor 8 күн бұрын
gj!
@alvaronaranjo2589
@alvaronaranjo2589 10 күн бұрын
2:34:25 I remember the days when 256mb was a luxury
@bobtheoutbuilder8552
@bobtheoutbuilder8552 10 күн бұрын
Omg Zozin using AI 54:19 🤯
@froop2393
@froop2393 11 күн бұрын
Great alternative to watch instead the over-commercialized soccer EM.
@ivanjermakov
@ivanjermakov 11 күн бұрын
It's not JS devs who cheat, it's the fact that JS is shipped with quine support if you wish :)
@monad_tcp
@monad_tcp 10 күн бұрын
Its not JS devs that cheat, JS lang itself is a cheat for actually programming real applications in a real native language
@plesskikh
@plesskikh 10 күн бұрын
Why didn't just implement #embed via build script?
@TsodingDaily
@TsodingDaily 10 күн бұрын
That means anybody who wants to compile the quine on their machine have to use the custom script, which is unnecessary friction. I wanted the quine to be compilable with a fairly standard command on any Linux.
@zenderlor2669
@zenderlor2669 10 күн бұрын
он опять сделал неведомую фигню на си и все довольны, всем нравится)))) наш сишник!
@bobby9568
@bobby9568 10 күн бұрын
your manager earns three times more than you and knows nothing about technology. He just knows how to talk xD
@silloo2072
@silloo2072 11 күн бұрын
For the quine you could use argv[0]?
@TsodingDaily
@TsodingDaily 11 күн бұрын
It's a path to binary, not source code
@silloo2072
@silloo2072 11 күн бұрын
@@TsodingDaily oh
@rogo7330
@rogo7330 10 күн бұрын
5*8 is 69
@soniablanche5672
@soniablanche5672 10 күн бұрын
lesson of the day: only interpreted languages can be QUINed
@blackbeard3449
@blackbeard3449 10 күн бұрын
All languages result into machine code at some point which is "interpreted" by the cpu. Hence, all languages are interpreted. 😛
@monad_tcp
@monad_tcp 10 күн бұрын
@@blackbeard3449 technically its compiled, the x86 machine is practically a machine compiler for x86 bytecode to their uCode real machine language, its a JIT compiler capable of register renaming, instruction reordering, branch optimization (prediction), etc, etc. its both CISC and RISC at the same time, also being a VM.
@mariusz7238
@mariusz7238 10 күн бұрын
What is this xcancel?
@atxorsatti
@atxorsatti 8 күн бұрын
Bro is talking about js devs like they are the free masons
@Heater-v1.0.0
@Heater-v1.0.0 10 күн бұрын
Cool. Taking your interpreter idea for Quine to Rust I get: fn main() { let src = r#"fn main() { let src = r❤"?"❤; println!("{}", src.replace('\u{2764}', "❤").replace('\u{3f}', src)); }"#; println!("{}", src.replace('\u{2764}', "#").replace('\u{3f}', src)); } Not sure if I have the stamina to get on with the clock part....
@Heater-v1.0.0
@Heater-v1.0.0 9 күн бұрын
And someone suggested an even simpler quine in Rust: fn main() { print!("{}", include_str!("main.rs")); } Amazingly easy reading too. How come C can't do such a simple trick?
@OggVorbis69
@OggVorbis69 11 күн бұрын
It is superb
@Bredor
@Bredor 9 күн бұрын
Worth mentioning awesome qlock by Yusuke Endoh (kzbin.info/www/bejne/ppikeYpuhNWWirssi=v9WjZHuioWQTbW_Q). This guy does a lot of crazy shit
3D in TypeScript using Ray Casting
3:14:03
Tsoding Daily
Рет қаралды 22 М.
The Linux Experience
31:00
Bog
Рет қаралды 295 М.
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 31 МЛН
Stupid Barry Find Mellstroy in Escape From Prison Challenge
00:29
Garri Creative
Рет қаралды 20 МЛН
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 17 МЛН
Cracking Secret Message with C and Computer Vision
2:00:36
Tsoding Daily
Рет қаралды 22 М.
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 116 М.
Symbolic AGI: How the Natural Will Build the Formal
43:32
Positron's Emacs Channel
Рет қаралды 10 М.
Programming with Math | The Lambda Calculus
21:48
Eyesomorphic
Рет қаралды 103 М.
Can you actually see more than 30 FPS?
1:41:36
Tsoding Daily
Рет қаралды 20 М.
Reverse Engineering Game Code from the Neutral Zone
40:59
Retro Game Mechanics Explained
Рет қаралды 539 М.
Why do C Programmers Always Obfuscate Their Code?
2:01:57
Tsoding Daily
Рет қаралды 78 М.
Hacking Raylib
2:13:39
Tsoding Daily
Рет қаралды 20 М.
WHY did this C++ code FAIL?
38:10
The Cherno
Рет қаралды 177 М.
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 8 МЛН
Lid hologram 3d
0:32
LEDG
Рет қаралды 5 МЛН
Iphone or nokia
0:15
rishton vines😇
Рет қаралды 1,8 МЛН
iOS 18 vs Samsung, Xiaomi,Tecno, Android
0:54
AndroHack
Рет қаралды 78 М.