This Library Turned my C into JavaScript wtf

Поделиться
HTML-код
  • Опубликовано: 2 янв 2025

Комментарии • 174

  • @Eldin12-l3x
    @Eldin12-l3x 3 месяца назад +316

    "My main language is acutally Russian"
    - What? I thought it was assembly all along.

    • @blackbeard3449
      @blackbeard3449 3 месяца назад +15

      Maybe russian is a flavour of assembly?

    • @theevilcottonball
      @theevilcottonball 3 месяца назад +5

      @@blackbeard3449 но руссиан ис нот а флавор оф ассембли.

  • @jacksonlevine9236
    @jacksonlevine9236 3 месяца назад +256

    "I don't speak English" - Tsoding

    • @ilia_0001
      @ilia_0001 3 месяца назад +7

      I laughed so hard at that hahaha

    • @velnbur-live3399
      @velnbur-live3399 3 месяца назад +12

      Makes content in English, refuses to elaborate further, ends the stream

    • @konstantinsotov6251
      @konstantinsotov6251 3 месяца назад +4

      comparing how 95% of russians speak english to his english is like comparing a native english speaker to a coughing chinese baby
      I was always impressed at how good he was at english for the education we have here)

    • @mirvin11
      @mirvin11 3 месяца назад

      95% of people in Russia don't speak English

    • @ilia_0001
      @ilia_0001 3 месяца назад +4

      @@konstantinsotov6251 The education you have is fine. It's very challenging for a native Russian speaker to learn and speak English because the two languages are so different in all aspects. His English is actually very good tho.

  • @seanhdka
    @seanhdka 3 месяца назад +131

    dude has no problem making a 3d software renderer in c but has to consult python for the calculation of 2024 - 12, gives me hope lmao

    • @aidennwitz
      @aidennwitz 3 месяца назад +8

      i have the same issue, especially with subtraction. i can do pretty advanced math and programming stuff, but simple calculations make me count on my fingers xd

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

      ​@@aidennwitzsame, I know how to, but cant do, specially subtractions, on my head, I either need a piece of paper or a calculator

  • @blackhaze3856
    @blackhaze3856 3 месяца назад +56

    Next project: A superset for Cello called TSello

  • @oserodal2702
    @oserodal2702 3 месяца назад +87

    var aliasing to void* gave me a good chuckle.

  • @channel11121
    @channel11121 3 месяца назад +39

    Zozin can like anything if it's implemented in C.

  • @amuerta3041
    @amuerta3041 3 месяца назад +106

    I remember rust developers answering newbie question of "can you bring rust, or any other high level functionality into C?" with such definitive no. Well well well, what is this stream all about?? 😅

    • @lame_lexem
      @lame_lexem 3 месяца назад +26

      ah yes void* everything much high level so functionality /s

    • @alexeski4109
      @alexeski4109 3 месяца назад +13

      Well c2x has auto so we have type inference now, can just replace void* with auto

    • @mateusvmv
      @mateusvmv 3 месяца назад

      @@alexeski4109 there is __auto_type
      one can implement async with future structs and coroutines, pretend a return is a yield
      same thing with iterators, pretend a return is yield and trust the compiler to inline all the bloat
      traits are also doable using vtables, mark the generic function as inline_always, and then create a function for each type
      the compiler will inline the vtable function calls in all cases, except in the case where the vtable is actually dynamic and the functions are unknown at compile time
      one can go on and on about all high level features, and since C is turing complete they're all doable if you're... imaginative enough

  • @dorukhanarslan96
    @dorukhanarslan96 3 месяца назад +11

    This is like early Objective C (which used a custom preprocessor for the Smalltalk syntax) but implemented purely using the C preprocessor. Really fun!

  • @RedStone576
    @RedStone576 3 месяца назад +33

    Now please turn my javascript into C

    • @trejohnson7677
      @trejohnson7677 3 месяца назад

      its called static hermes.

    • @illker.
      @illker. 3 месяца назад

      @@trejohnson7677or deno 2.0

    • @ripmeep
      @ripmeep 3 месяца назад

      its called hatic stermes.

    • @a_grin_without_a_cat
      @a_grin_without_a_cat 3 месяца назад +1

      There's a library that exploits a bug in the internet explorer to call winapi functions outside of ie's sandbox and a full-fledged wrapper lib for it, but I forgot the name :(

  • @1apostoli
    @1apostoli 3 месяца назад +7

    when the guy asked if they could make a JIT 😭😭😭

  • @Caellyan
    @Caellyan 3 месяца назад +3

    26:00 A slice is a kind of fat pointer. Fat pointer is a normal pointer with some metadata attached. Type of metadata is known at compile time (from usage) so it's not stored in the pointer. But metadata content is stored right after (or before) the pointer.
    This is important disambiguation because the metadata can be anything - in Rust, slices are one, but also a `&dyn Trait` is effectively `(data_addr, vtable_addr_of_trait_impl_for_data)`. And you can of course hand-craft your own metadata in case you need more/other information.

  • @rustedanvil6918
    @rustedanvil6918 3 месяца назад +9

    17:15 the best way to do optimisations in rust would be "sudo rm -f /bin/rustc"

    • @RustIsWinning
      @RustIsWinning 3 месяца назад

      Good one mr comedian! 🤡

    • @ndrechtseiter
      @ndrechtseiter 3 месяца назад +3

      ​@@RustIsWinningofc your username is "rust cool haha" and your avatar is a crab 😂

  • @arin3382
    @arin3382 3 месяца назад +46

    1:59:05 wtf he needed python of that 💀

    • @theevilcottonball
      @theevilcottonball 3 месяца назад +11

      It is a good commandline calculator. Also there was a number with four digits, that is way too complicated to calculate just in your head.

    • @madbanana22
      @madbanana22 3 месяца назад +28

      ​@@theevilcottonballdude stop acting like your brain is 8-bit

    • @SamirPSalim-k4o
      @SamirPSalim-k4o 3 месяца назад +6

      @@theevilcottonball It is just the last two digits that change. That's easy.

    • @samuelwaller4924
      @samuelwaller4924 3 месяца назад

      ​@@theevilcottonball emacs has a built in calculator that is even better

    • @Kapendev
      @Kapendev 3 месяца назад +4

      Do you feel better by writing this?

  • @mattanimation
    @mattanimation 3 месяца назад +3

    the author of this is a boss, his work on Phase-Functioned Neural Networks for Character Control, is nuts along with his other work.

  • @SimGunther
    @SimGunther 3 месяца назад +1

    2:01:40 The reason it would take multiple files is because con"cat"enation of multiple files is the entire point of the cat utility.
    What we have here is just nl without the line numbers.

  • @smiles-channel
    @smiles-channel 3 месяца назад

    15:48 the binary is so big because it includes debug symbols from the standard library. Since rust 1.77 they disable that by default so the default binary size for hello world is now ~400kb

  • @MrPetzold123
    @MrPetzold123 3 месяца назад +4

    Funny thing about library sizes was in the 90s when people considered Delphi bloated when its statically linked graphical hello was about 500 kB (it ran rings around Visual Basic btw) 😂....Delphi was a gem.

    • @stefanalecu9532
      @stefanalecu9532 3 месяца назад

      Delphi is still a gem, but buried under so much shit by Embarcadero/Idera. Lazarus/Free Pascal are gems people should use more.

  • @prostoprost9448
    @prostoprost9448 3 месяца назад +49

    so c++ if you dont like c++

  • @multicoloredwiz
    @multicoloredwiz 3 месяца назад +11

    18:20 to smile and laugh 😃

  • @mbarrio
    @mbarrio 3 месяца назад +8

    Lovecraftian C

  • @zeusdeux
    @zeusdeux 3 месяца назад +2

    Can confirm that hashtable in the title would have got me

  • @To1ne
    @To1ne 3 месяца назад

    I looked at this library in the past, I really enjoyed the playfulness of it. So much fun!

  • @0vulns
    @0vulns Месяц назад

    now I understood many of c and CS concepts in this video I would have spent years learning them thx broskieee

  • @oserodal2702
    @oserodal2702 3 месяца назад +23

    Rust runtime is big because it has stack unwind on panic, so if you want panics to behave like C runtime errors and not like C++ exceptions, you'd have to make panics abort the program.

    • @pookiepats
      @pookiepats 3 месяца назад +1

      Didn’t know rust had a runtime wow

    • @pookiepats
      @pookiepats 3 месяца назад +1

      May as well just use Go

    • @anonymousalexander6005
      @anonymousalexander6005 3 месяца назад +26

      ⁠@@pookiepatsC has a runtime too. “The more you know” (TM) 🤯
      On a serious note (whether or not you’re being sarcastic), both can ‘disable’ the runtime in order to work for embedded systems, it’s not new or unique to Rust.

    • @DeerDesigner
      @DeerDesigner 3 месяца назад

      Also, rustc essentially compiles with -ggdb by default, making the comparison even more unfair

    • @pookiepats
      @pookiepats 3 месяца назад

      @@anonymousalexander6005 lol 😆 i enjoyed this thx - and did learn something

  • @ecosta
    @ecosta 2 месяца назад

    Yo! I wasn't expecting much from Cello based on the title/thumb, but wtf indeed... So many clever ideas in Cello. More than using it, I want to try creating some stuff like that myself.

  • @antonpieper
    @antonpieper 3 месяца назад +34

    23:44 Tsodinagen

    • @toybeaver
      @toybeaver 3 месяца назад

      I was searching for this comment

    • @Kersich86
      @Kersich86 3 месяца назад

      yeah same 😂

  • @TheArtikae
    @TheArtikae 2 месяца назад +2

    1:08:08 Doesn’t use exceptions to stop iteration. Literally unusable and unpythonic. Reported to Guido for reeducation.

  • @s4n7r0
    @s4n7r0 3 месяца назад +1

    this is the first time im seeing zozin so excited about a project

  • @ovi1326
    @ovi1326 3 месяца назад

    There are jit compilers for C or more broadly anything that compiles to llvm. The general purpose one is called lili and it's actually a part of llvm itself.
    There's also the orc api which allows you to integrate llvm's jit. Mesa uses that for compiling shaders in it's software backend.

  • @carvas18
    @carvas18 3 месяца назад

    there is no going back, the only way is through!

  • @PreyMa
    @PreyMa 3 месяца назад

    Love it when Tsoding finds something he actually likes, rly wholesome episode :^)

  • @alexdefoc6919
    @alexdefoc6919 3 месяца назад +3

    1:38:30 i have not heard of this type of documentation

  • @amrshamsel-deen7928
    @amrshamsel-deen7928 3 месяца назад

    man graduated at 2013 and looks like he did it before and forget and went again, Love It

  • @hwstar9416
    @hwstar9416 3 месяца назад +2

    I find using the clangd LSP to be helpful when trying to understand a macro. you can expand a specific call to see what the macro does.

  • @Cinarbayramic
    @Cinarbayramic 3 месяца назад +1

    and my only-python-using friend still wouldnt know how to declare a variable..

  • @calabrianGuy
    @calabrianGuy 3 месяца назад +1

    waiting for a cello music player written in cello

  • @MateuszAdamowski-k8b
    @MateuszAdamowski-k8b 3 месяца назад +1

    8:10 You say you don't perceive this as a usable. production-ready library but rather an experiment.
    Just saying that I had the same opinion about python back in 2000 when I first learned of it.

    • @theunskruger1211
      @theunskruger1211 2 месяца назад

      The library itself says it's not production ready thought, its not just his personal opinion

  • @aaronspeedy7780
    @aaronspeedy7780 3 месяца назад

    Yo I just saw this the other day. This is going to be a fun episode.

  • @samuraijosh1595
    @samuraijosh1595 3 месяца назад +3

    Hey Zozing please make a video on dependent types. I think you're the best person to explain them.

  • @kodingamedev
    @kodingamedev 3 месяца назад +1

    I discovered this library in 2020; your reaction was the same as mine

  • @aciddev_
    @aciddev_ 3 месяца назад +2

    hi zozing! i have an idea: make a simple immediate gui library for raylib on some future streams? would be cool to see your approach!

  • @Momoyon
    @Momoyon 3 месяца назад +1

    57:45 why did you say thank you after sneezing?

  • @すべてに興味を失う
    @すべてに興味を失う 2 месяца назад

    _porffor join the chat_ : *let me transform your javascript into ASM or C*

  • @monad_tcp
    @monad_tcp 3 месяца назад

    51:43 look at what they have to do to achieve a fraction of the power of C++.
    It's funny thou

  • @DriftJunkie
    @DriftJunkie 3 месяца назад

    How do you turn twitch chat into subtitles 😮

  • @AK-vx4dy
    @AK-vx4dy 3 месяца назад +10

    $ ? JQuery for C ? Cquery?

    • @stefanalecu9532
      @stefanalecu9532 3 месяца назад +9

      Believe it or not, cquery is actually a thing, it used to be the main language server for the C family before ccls and clangd made it obsolete

  • @alexstone691
    @alexstone691 3 месяца назад

    Rust can be suprisingly small when using whole project, my whole project which ~2k rust code is like 2.3M compiled release mode with direct 6 dependencies

  • @Mozartenhimer
    @Mozartenhimer 3 месяца назад +1

    36:30 why not compile it more!?

  • @anon_y_mousse
    @anon_y_mousse 3 месяца назад

    This looks kind of neat. I'd still rather have more syntax than more code in certain cases, but this looks like a nice intermediary. However, someone mentioned your use of Python to calculate simple stuff and I've noticed it in other streams too. So I ask you, why not just use echo $(( )) with bash? Sometimes I don't even use echo and as long as the calculation doesn't form an existing program name I'm good. Occasionally I'll echo a calculation to `bc -ql` to get something a bit more complex, but simple decimal stuff I can just add zeroes to the numerator and use bash anyway.

  • @veevee23
    @veevee23 3 месяца назад +4

    Title got me 😅

  • @KirbySamaDesu
    @KirbySamaDesu 3 месяца назад

    Cello it's an italian word and this cello it's faster than lua jit in some cases amazing

  • @skope2055
    @skope2055 3 месяца назад

    Great video! Really fun experience :)

  • @foadsf
    @foadsf 2 месяца назад

    I wonder if we can make something like this for Python? 🤔

  • @alexdefoc6919
    @alexdefoc6919 3 месяца назад

    10:03 i'm sorry but i was watching at 2x speed and bursted laughing at him LOL

  • @asymptotic_sceptic
    @asymptotic_sceptic 3 месяца назад

    Go figure why searching for austral I landed here

  • @cryptonative
    @cryptonative 3 месяца назад +16

    Rust is 3-4mb just because it includes debug symbols

    • @rogo7330
      @rogo7330 3 месяца назад +9

      How on earth your debug symbols are bigger than all the code that you write in text? It's just adds garbage and doesn't know wtf code is doing, that's why it includes a lot of shit.

    • @araarathisyomama787
      @araarathisyomama787 3 месяца назад +7

      So did Cello. It did -g in the makefile... didn't even -Os the thing

    • @Aras14
      @Aras14 3 месяца назад

      That is only the case in Debug mode (std is stripped by default since a few versions ago), a hello world on aarch64 is ~400K

    • @cryptonative
      @cryptonative 3 месяца назад +1

      @@Aras14 a minimal function in wasm is 16kb if you remove the debug symbols

    • @tgirlshark
      @tgirlshark 3 месяца назад

      @@rogo7330 who hurt you lol, it includes debug symbols of the standard library for clean backtraces etc.

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

    Can you make a project in libcello?

  • @РоманБинюков-р7н
    @РоманБинюков-р7н 2 месяца назад

    1:44:05 Dungeon master is proud of you

  • @rutexgreat3619
    @rutexgreat3619 3 месяца назад

    1:40:30 - streaming isn't bad or outdated. It's scalable. Read entire file, maybe, only up to 100 mb? 200? 1gb if you fat or your runtime allows you to do this? What above...? Streams.

  • @ShawnShaddock
    @ShawnShaddock 3 месяца назад

    Gleam next?

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

    28:06 viruses, welcome

  • @zeusdeux
    @zeusdeux 3 месяца назад

    1:44:04 FISTING MENTIONED 💀

  • @nibrobb
    @nibrobb 3 месяца назад

    Tsoding getting new laptop :pog: 🎉

  • @Odod4000
    @Odod4000 3 месяца назад

    NEW STREAM! based library. I love your vids! 😀

  • @Bleb1k_irl
    @Bleb1k_irl 3 месяца назад

    Will this run in browser????

  • @kedarshinde4216
    @kedarshinde4216 3 месяца назад +2

    This looks straight out of my nightmare

  • @Siroitin
    @Siroitin 3 месяца назад

    Has he tried CUDA yet?

  • @hubstrangers3450
    @hubstrangers3450 3 месяца назад

    Thank you.....

  • @arunvishnuk3947
    @arunvishnuk3947 3 месяца назад

    Can your swift do that... Dabdabdab

  • @Feavy
    @Feavy 3 месяца назад +1

    28:05 😂😂

  • @oteuzay
    @oteuzay 3 месяца назад

    Bro, you need to record a video for Emacs and i3. I’ve never seen better configs!

    • @iamdozerq
      @iamdozerq 3 месяца назад

      Isnt i3 just default and emacs just in console mode? Look not so configured actually...

  • @donnadie2068
    @donnadie2068 2 месяца назад

    Why

  • @БорисНазаров-х7к
    @БорисНазаров-х7к 3 месяца назад

    Looks more like a python to me than JavaScript.

  • @mil_klover375
    @mil_klover375 3 месяца назад +1

    C already had has tables look it up and also c has generics

    • @xravenx24fe
      @xravenx24fe 3 месяца назад

      What tables are you referring to?

    • @mil_klover375
      @mil_klover375 3 месяца назад

      @@xravenx24fe it's in search.h

  • @pemrograman-cepat3393
    @pemrograman-cepat3393 3 месяца назад +1

    I see C and I click 😊

  • @tianned
    @tianned 3 месяца назад

    Well I’m too dumb for this stream😢

  • @blamechickenman7434
    @blamechickenman7434 3 месяца назад

    I can only see this useful for people who want assistance briefly transitioning from a higher-level language to C. But if it were me in such a scenario, I wouldn't use Cello for long, need to get used to writing C, which isn't difficult by any stretch.

    • @rogo7330
      @rogo7330 3 месяца назад +2

      It's the opposite of assistance. The best way to learn C is to accept that program is running on a real computer and it has memory where everything have size. Also, C is high-level language, it does not translates 1-to-1 into machine code that you type, because there is no "variables" in reality.

    • @Nova32x
      @Nova32x 3 месяца назад

      ​@@rogo7330relative to other high level languages it is comparatively low level

    • @blamechickenman7434
      @blamechickenman7434 3 месяца назад

      @@rogo7330 Yeah, I agree, but if a newbie going from Javascript to C is struggling, I would definitely tell them to use Cello very very briefly, before actually writing proper C, that's just me though.

  • @birdbeakbeardneck3617
    @birdbeakbeardneck3617 2 месяца назад

    18:30 lmaoooo😂😂

  • @alexitosworld
    @alexitosworld 3 месяца назад +1

    This reminds me so much to objective-c 😂 pretty cool project.

  • @aaabbb-gu5pz
    @aaabbb-gu5pz 3 месяца назад

    Спасибо!

  • @diegoj4382
    @diegoj4382 3 месяца назад +21

    But why?

    • @aciddev_
      @aciddev_ 3 месяца назад +28

      someone was bored, probably

    • @imbalos
      @imbalos 3 месяца назад +14

      Fun

    • @noredine
      @noredine 3 месяца назад +17

      recreation

    • @pookiepats
      @pookiepats 3 месяца назад +12

      Pointless question in web development world 😂

    • @nicksidiropoulos802
      @nicksidiropoulos802 3 месяца назад +8

      why not?

  • @nathanpotter1334
    @nathanpotter1334 3 месяца назад

    But... is it not just emcc wrapper??

  • @TheAndiKurz
    @TheAndiKurz 3 месяца назад

    Another video another reauest to look at odin lan 😉

  • @Jiyoon02
    @Jiyoon02 2 месяца назад

    You what now? God forbid, turn C into Javascript? These JS stans are getting out of hand smh. Blasphemous, lord have mercy
    lol

  • @gahshunker
    @gahshunker 3 месяца назад +3

    This Cello looks like C# ripoff

  • @glowiak3430
    @glowiak3430 3 месяца назад +2

    11:10 Same. English spelling sucks.

    • @elbandsy
      @elbandsy 3 месяца назад +1

      It's an italian word 🤷‍♂

    • @DomenicoPezzullo-ib9bg
      @DomenicoPezzullo-ib9bg 3 месяца назад +1

      @@elbandsy cello does not mean anything in italian

    • @glowiak3430
      @glowiak3430 3 месяца назад

      @@elbandsy That's why it should be adapted. As 'chello', 'tshello' or even 'tschello'. Any of these at least suggests the correct pronunciation for those not knowing Italian.

    • @elbandsy
      @elbandsy 3 месяца назад +2

      @@DomenicoPezzullo-ib9bg Sorry if I was misunderstood. It's short for the italian word "violoncello".

    • @elbandsy
      @elbandsy 3 месяца назад +3

      @@glowiak3430 Words are not written prescribed on how it should be spoken, and vice-versa. There are a lot of weird pronunciations in English (e.g. "colonel", "Wocestershire", and other words that are borrowed from other languages like French) - and in many other languages as well - that require the speaker to know it before hand by common usage. You might read it "wrong", but someone eventually might correct you.

  • @umcanalsemvidanoyoutube8840
    @umcanalsemvidanoyoutube8840 3 месяца назад

    Macros scare me 💀

  • @gusic4529
    @gusic4529 3 месяца назад +4

    ewww brother ewww

  • @CHURCHISAWESUM
    @CHURCHISAWESUM 2 месяца назад

    Ah sweet a schizo project :D

  • @blu3260
    @blu3260 3 месяца назад

    wtf

  • @orangejuice7964
    @orangejuice7964 3 месяца назад

    Wtf

  • @wtfdoiputhere
    @wtfdoiputhere 3 месяца назад

    UNINSTALL THIS NOW I DON'T WANNA HEAR ABOUT IT

  • @theevilcottonball
    @theevilcottonball 3 месяца назад

    I recommend -fno-strict-aliasing for this,