@@gwentarinokripperinolkjdsf683 Do you want compile time functions like in zig? If yes then zig is your answer!) You can also perfome computations using good'ol macro-magick(though heavy use is ill-advised), also most of the simple computations that can be done in compile time are already done in compile time by using optimisations of modern compilers(though yes, this behaviour is NOT a guarantee). If you are talking about meta-programming then *light* macros are all you need. Anything more than that - you might as well use just c++ at this point(you can treat c++ as a feature dump of c extensions), since it has compile-time functions and a metric ton of other features like that.
I actually talked with the creator of C3 a little some time back. It was throughly a good experience both from a programming language and a personal standpoint.
a.f(b) is different from f(a, b) in which namespace f is a member of. I don't care much for method chaining, but it is useful to have built-in syntax that groups all methods for a type into their own namespace.
@@hpntic c# is c++ flavored java, but with pointers and near-c speed, it's good for rapid iteration where you don't wanna care about lifetimes nor memory size and just want to do something, but p5.js and python are too slow. currently I mostly do tool dev, so c# is my go-to
I checked C3s change logs and apparently "printn" was once "println" and they willingly changed it for some ungodly reason. Revision 2023-03-18 apparently
I hated how long and garbled printfln looked, and then I learned a bit of F# (F# uses printfn) and `printfn` quickly grew on me. A huge advantage is that it's much easier to read (fln is not good for readability).
@@christofferlerno2633 But as discussed all over these comments, fn now stands for function, even if the subprograms aren't functions at all. To please the parser, apparently.
@@christofferlerno2633 Thanks for the writeup. To me it still seems like overcomplication and NIH, though. I read about to see what the macro capability did, and it doesn't seem capable of the sort of thing I see C's preprocessor used for often, like generating multiple distinct definitions and arrays from reparsing one included file with different macros depending on pass. I also didn't see how to preserve accesses like we often do with volatile.
People like methods mostly because it makes the code read almost like english. " a = b.copy(c)" is in the same order as subject, verb, object. It also keeps the current translation unit's namespace a bit cleaner I guess.
@@RukopisyNarnie consider a void function call to a function that modifies or requires self. It would read as "Operation(self, arg)", this could be "compare(a,b)", with a method it would be "a.compare(b)". Its really just to make it easier to read and parse, I argue that not having to explicitly pass self into the function makes it a worthwhile addition in its own right
21:16 it's not "just a syntax" (well it is, but) it's actually important for organizing your code. i think it's a huge problem to not let you namespace functions like this. without it you just have a million global functions maybe namespaced with Foo_next() but Foo.next semantically lets you know the function is only relevant to the Foo struct/class
I've wrote a todo app and I've called it c3 because of it expanding calcurses todos to have a tree-like structure. I think I have to start a lawsuit against them.
have you looked at Odin-lang? I've gotten really into it as of late, it has defer and builtin vector type arithmetic as well. I'd be curious to see what you would think of it.
1) The ".o" files that were created with --target wasm32 are actually WebAssembly binaries, not ELF object files. So it seems that wasm "just works (tm)". 2) If you don't like prefixing everything with "raylib::", you can just have the main file and the raylib.c3 use the same module. You don't have to create a new module for each file. Although it is indeed a bit weird that there is no import blah::* or using blah or even import blah as foo.
If you don't want to write a module's prefix when calling something from it, you can probably make a macro that iterates over every member of the module and creates an alias.
Regarding the $foreach: When it is executed at compile time the compiler loops and generates all the io::printfn() - lines.. and then there is no loop any more in the resulting code. In order to not confuse with scope, because it isn't, they did chosse the $endforeach, maybe. To annotate that you do not have a scope you could also used special curlys like ${ and $} to annotate that this are only lingual curlys but they will not exist anymore, when the compiler slided over it.
"What's the point of `fn` keyword?" The fn keyword takes parsing a function definition from O(n^3) to O(n) (if i remember right) by making the grammar fully predictable EDIT: I did not remember right, lmao, I remembered very, very wrong
@@mrglick5050 Number of tokens in a function definition; though, I'm probably wrong about that. It's only when you get to nesting functions in other functions that you'd have ambiguity with expression statements. \shrug
There is a plan to add "defer" to C, there are even actively discussed proposals on WG14. However, "defer" introduces quite many complication due to odd corner cases. Moreover, "defer" is virtually unusable without lambdas that have their own problems.
More like, whoever proposed a defer was the same person who proposed lambdas, and used the defer as a vehicle to push his lambda proposal. You don't need lambdas for defer to work, and edge cases are mostly related to go-to.
Auto exists in C, but you have to register a function for each type. Look up the GLib macros for g_auto, g_autoptr etc etc. It uses __attribute__((cleanup(...))) to do it.
@@GegoXaren This GCC extension, not a standard portable C. Btw. it is possible to use nested functions with statement expression to get a lambda-like function that can be used with `cleanup` attribute. Something like `({ void foo(void*){...} foo; })`
I think the a.f(b) syntax reads more naturally, similarly to the "subject verb object" sentence structure in English, and if there's no runtime overhead compared to f(a, b), I say why not.
the end for each may be because otherwise it could be confused with generate a block. needed because for loops accept statements, most commonly the block statement
Have you reviewed Forth? Do you think it can replace C? The only high level language older is Fortran. First language to use a database and 2D CAD. It is low level, like C, though not as fast. Incremental compilation. Rapid development, 50x faster than C. Extend and design the language as you need. Is used in the real world, mostly microcontrollers. Is used by NASA, by Riad Airport Saudi Arabia security management system, large construction management software. Large active user community, FIG.
Okay, this language looks very cool. The only things that I don’t like are the contracts stuff and defer. I think the using keyword in C# is better approach than defer, you can really see the scope of the thing that you are “using”
Or you could define using() declaration as open ended and it effectively has the same scope as the function. That being said, if you are using enough calls to make a tower of Doom of using statements, you're probably doing something wrong.@@egorsozonov7425
but there's already a programming language called D. and it requires a runtime (including GC! 🤔), or you are limited to a subset of functionality (called BetterC).
I think zozin could love Odin language (and i'm not payed to say that). After years of C/C++, Rust and some other Scheisse, it is very refreshing to use it
Hot take: C will die when Intel comes up with a new instruction set architecture. But as long as they keep making them backwards compatible, we're stuck with C.
no? GCC/clang are made to have maximum compatibility, they'll just port to a new instruction set... that's one of the fundemental jobs of a compiler. also, intel won't change to a new ISA, i'm not sure why you think that would even remotely be a good idea for them
@@satibel itanium? you mean that ISA in 2001 that immediately flopped when it came out and that intel had zero reason to proceed with? yeah, no one is going to use a proprietary one-company ISA and move their entire infastructure over for it. companies will just move over to AMD for better top-level performance with no changes needed.
@@MartinDerTolle You likely jest, but you are to some degree correct. C inherits from B, which in turn inherits from BCPL, spawning the vigorous argument about whether C would be succeeded by D or P. Meanwhile, C-- begat Cmm which is in active use inside the Glasgow Haskell Compiler. However, none of these are prologues (that's more akin to Haskell's Prelude) or sequels (like the numbered generations of K).
I actually liked the syntax of c3. Linking native libraries is very easy. It has modules, generics, macros and what not. I think I like it more than zig already.
19:30 It looks like the syntax of some static testing of source code such as Frama-C or something, nothing really new here, must be used by the compiler
"This is what happens when C programmers start making websites" 😂
Man I laughed so loud🤣🤣🤣
Pokémon evolution!!
@@saeedhaidar1375I have got literally kicked out of a team call for laughing my soul out for this 😂
reading this comment at the same time tsoding says it hits different
I actually made the website and I'm not a C developer 😭
Everyone talking about C killers, meanwhile I'm looking for the C healer
Everyone ask what is C nobody ever ask how is C :L
HolyC
@TempCrap-nn4cm tell me about it!
I am starting to learn how to use clang tooling and I have some ideas about extending the C language. In particular I want comp time functions
@@gwentarinokripperinolkjdsf683 Do you want compile time functions like in zig? If yes then zig is your answer!) You can also perfome computations using good'ol macro-magick(though heavy use is ill-advised), also most of the simple computations that can be done in compile time are already done in compile time by using optimisations of modern compilers(though yes, this behaviour is NOT a guarantee). If you are talking about meta-programming then *light* macros are all you need. Anything more than that - you might as well use just c++ at this point(you can treat c++ as a feature dump of c extensions), since it has compile-time functions and a metric ton of other features like that.
The FAQ now has a "How do I use WASM?" section now.
Why are you still using C3 ?
C23 is already out smh
Who cares about C23? We already have C99
@@solidnywonsz i saw someone say that on the C3 video after this one and i realized i could have made the joke way funnier
14:11 face asking : " do i developed it in my dreams or something?"
Yo using SUBTITLES as CHAT LOG?? THAT'S GENIUS. Wow, im really impressed I've never seen so clever use of subtitles.
14:07 that slow look at the camera is hilarious LOL
My brain is too soyed to understand after previous web development streams
One day, I'll be able to fully comprehend the things you say
This is how charming he is.
I actually talked with the creator of C3 a little some time back. It was throughly a good experience both from a programming language and a personal standpoint.
Making the comments into UA-cam subtitles is interesting. Never thought about that option
c# but someone forgot to press shift
44:10 I think it's actually a good idea, cuz defer also accounts for breaks/continues in the while loop, in case you want to use them
a.f(b) is different from f(a, b) in which namespace f is a member of. I don't care much for method chaining, but it is useful to have built-in syntax that groups all methods for a type into their own namespace.
They are actually the same thing, in my own POV sha
You can do f_a(a, b) if you insist. Manual namespacing. But the fact that a function takes a is sufficient to classify and search for such functions.
The one thing OOP is good for
There is actually a C4 PL, but that language is a little too explosive for my taste
There is actually a C16/17/18 PL, but that language is only for android
I have a C17 compliant compiler, but not on android.
Arab programmers: "I'm in love"
We got a sequel to C before GTA 6
We already have c with four +
It names C#
C sharp sucks
C hashtag is awful
@@hpntic c# is c++ flavored java, but with pointers and near-c speed, it's good for rapid iteration where you don't wanna care about lifetimes nor memory size and just want to do something, but p5.js and python are too slow.
currently I mostly do tool dev, so c# is my go-to
i didn't expect the emacs mode of this language to be inspired from tsoding's thing hahaha
Press 6 for beatbox mantra
that is a very cool feature!
I checked C3s change logs and apparently "printn" was once "println" and they willingly changed it for some ungodly reason.
Revision 2023-03-18 apparently
it would be too good perhaps that's why. they had to get us
I guess they thought it was more C-ish to use n as in
than ln as in natural logarithm. You know, just like in puts. Wait...
I hated how long and garbled printfln looked, and then I learned a bit of F# (F# uses printfn) and `printfn` quickly grew on me. A huge advantage is that it's much easier to read (fln is not good for readability).
@@christofferlerno2633 But as discussed all over these comments, fn now stands for function, even if the subprograms aren't functions at all. To please the parser, apparently.
@@christofferlerno2633 Thanks for the writeup. To me it still seems like overcomplication and NIH, though. I read about to see what the macro capability did, and it doesn't seem capable of the sort of thing I see C's preprocessor used for often, like generating multiple distinct definitions and arrays from reparsing one included file with different macros depending on pass. I also didn't see how to preserve accesses like we often do with volatile.
Can't wait for part 4. That one's gonna blow everyone's minds.
The nice thing about methods is that auto complete is much nicer with them compared to having the entire list of all functions.
People like methods mostly because it makes the code read almost like english. " a = b.copy(c)" is in the same order as subject, verb, object. It also keeps the current translation unit's namespace a bit cleaner I guess.
raw c is more like English. a = fsin(b). A is float sinus of b.
@@RukopisyNarnie consider a void function call to a function that modifies or requires self. It would read as "Operation(self, arg)", this could be "compare(a,b)", with a method it would be "a.compare(b)". Its really just to make it easier to read and parse, I argue that not having to explicitly pass self into the function makes it a worthwhile addition in its own right
@@TheAlexgoodlife It doesn't seem more readable to me. I guess it makes it easier to chain it for functions that return its "hosting type".
this is also kinda the same grammar convention in declarative functional programming right?
@@samuraijosh1595 I am not sure if I understand what you say
21:16 it's not "just a syntax" (well it is, but) it's actually important for organizing your code.
i think it's a huge problem to not let you namespace functions like this.
without it you just have a million global functions maybe namespaced with Foo_next() but Foo.next semantically lets you know the function is only relevant to the Foo struct/class
Hello russian Tom Scott
I like that you wrote your own C3 mode before you knew C3 existed. 420 IQ move!
I swear I couldn't stop laughing throughout the entire video. Thank you, you made my year.
The only language that is syntaticlly consise that I've every seen is the dead language OOC.
That was the most beautiful thing I've ever seen.
OOC. That brings back memories, last time I read about that one was ages ago.
windows stuff might be there for cross-compilation.
I feel like the subtitles are not doing their job here... They're nice, if not for the fact that now I don't get the *real* subtitles
You can still enable the auto-generated subtitles
26:50 If you want compiletime access of the complete language, rather use Lisp or Scopes.
for changing the color you could use the vector swizzling to move to 0xFF along the color! color = color.brga;
I've wrote a todo app and I've called it c3 because of it expanding calcurses todos to have a tree-like structure.
I think I have to start a lawsuit against them.
have you looked at Odin-lang? I've gotten really into it as of late, it has defer and builtin vector type arithmetic as well. I'd be curious to see what you would think of it.
He played with it on stream. You will probably find recording of that stream on chanel.
@@RukopisyNarnie I couldn't find it, do you know what it is called? or around when it was?
@@dragonkid5204 I have no idea, but I remeber him trying it.
@@dragonkid5204 Maybe I mixed it upnwith something. Sorry.
@@RukopisyNarnieis it possible that you were thinking about zig? There was indeed a zig stream but I don’t recall an Odin stream.
I heard that the next version, whatever comes after 3, will be really explosive ( if you cannot get the joke, I’m sorry ).
1) The ".o" files that were created with --target wasm32 are actually WebAssembly binaries, not ELF object files. So it seems that wasm "just works (tm)".
2) If you don't like prefixing everything with "raylib::", you can just have the main file and the raylib.c3 use the same module. You don't have to create a new module for each file. Although it is indeed a bit weird that there is no import blah::* or using blah or even import blah as foo.
c3 before gta 6 is crazy
If you don't want to write a module's prefix when calling something from it, you can probably make a macro that iterates over every member of the module and creates an alias.
The builtin Vector types just works with raylib's Vector2/3 structs. That was beautiful.
800x600 is of the orthodox aspect ratio but the holiest resolution is 640x480.
Adding chat in CC is novel. Probably breaks UA-cam's Machine Learning too. double awesome.
Regarding the $foreach: When it is executed at compile time the compiler loops and generates all the io::printfn() - lines.. and then there is no loop any more in the resulting code. In order to not confuse with scope, because it isn't, they did chosse the $endforeach, maybe. To annotate that you do not have a scope you could also used special curlys like ${ and $} to annotate that this are only lingual curlys but they will not exist anymore, when the compiler slided over it.
"What's the point of `fn` keyword?"
The fn keyword takes parsing a function definition from O(n^3) to O(n) (if i remember right) by making the grammar fully predictable
EDIT: I did not remember right, lmao, I remembered very, very wrong
What does n represent in a function declaration? I thought it's constant time.
@@mrglick5050The number of tokens in the function definition [`void`, `main`, `(`, `)`, `{`, `}`]
@@mrglick5050tokens?
It’s probably the length of the file in # of lines
@@mrglick5050 Number of tokens in a function definition; though, I'm probably wrong about that. It's only when you get to nesting functions in other functions that you'd have ambiguity with expression statements. \shrug
I’m not sure if this version will take off, but when they fix all the problems and release it as C4, I’m sure it’ll blow up
First thing I will do is to alias c3c to "cccc", the way it should be.
This comment is underrated
Das crazy,can't wait for c4
There is a plan to add "defer" to C, there are even actively discussed proposals on WG14. However, "defer" introduces quite many complication due to odd corner cases. Moreover, "defer" is virtually unusable without lambdas that have their own problems.
More like, whoever proposed a defer was the same person who proposed lambdas, and used the defer as a vehicle to push his lambda proposal. You don't need lambdas for defer to work, and edge cases are mostly related to go-to.
Auto exists in C, but you have to register a function for each type.
Look up the GLib macros for g_auto, g_autoptr etc etc.
It uses __attribute__((cleanup(...))) to do it.
@@GegoXaren This GCC extension, not a standard portable C. Btw. it is possible to use nested functions with statement expression to get a lambda-like function that can be used with `cleanup` attribute. Something like `({ void foo(void*){...} foo; })`
The language looks very promising.
I think the a.f(b) syntax reads more naturally, similarly to the "subject verb object" sentence structure in English, and if there's no runtime overhead compared to f(a, b), I say why not.
the end for each may be because otherwise it could be confused with generate a block. needed because for loops accept statements, most commonly the block statement
14:00 that moment when you just want some pretty colors on your screen and you get doxxed by a random repo maintainer
libc doesnt have a fraction type its just a struct containing quotient and remainder from an integral division
Have you reviewed Forth?
Do you think it can replace C?
The only high level language older is Fortran.
First language to use a database and 2D CAD.
It is low level, like C, though not as fast.
Incremental compilation.
Rapid development, 50x faster than C.
Extend and design the language as you need.
Is used in the real world, mostly microcontrollers.
Is used by NASA, by Riad Airport Saudi Arabia security management system, large construction management software.
Large active user community, FIG.
Man, I'm still waiting for the day they will add classes to C :D
"Javascript damaged my brain" I think he speaks for all of us
"not readable, only maintainable"
14:40 the video is now turing complete
The random beet boxing made this all the better.
Okay, this language looks very cool. The only things that I don’t like are the contracts stuff and defer. I think the using keyword in C# is better approach than defer, you can really see the scope of the thing that you are “using”
No it’s not better, it introduces extra indentation and helps turn your code into The Tower of Doom
Or you could define using() declaration as open ended and it effectively has the same scope as the function. That being said, if you are using enough calls to make a tower of Doom of using statements, you're probably doing something wrong.@@egorsozonov7425
But wait... Sequel to C is actually D
but there's already a programming language called D. and it requires a runtime (including GC! 🤔), or you are limited to a subset of functionality (called BetterC).
14:11 That is c-2-emacs-2-human recursion...
I think zozin could love Odin language (and i'm not payed to say that). After years of C/C++, Rust and some other Scheisse, it is very refreshing to use it
Can't wait for C4, it will be the bomb
Why the need to add fn for a function tho...
@@technite5360truthfully a disgusting design choice that seems to provide 0 benefit
there is a build folder for temp files you just have to use c3c init
"What is this JAVA!?"...Yeah I totally agree 😂
Hot take: C will die when Intel comes up with a new instruction set architecture. But as long as they keep making them backwards compatible, we're stuck with C.
no? GCC/clang are made to have maximum compatibility, they'll just port to a new instruction set... that's one of the fundemental jobs of a compiler.
also, intel won't change to a new ISA, i'm not sure why you think that would even remotely be a good idea for them
@@ChristopherGray00 itanium lurking around in the corner like oscar the grouch.
@@satibel itanium? you mean that ISA in 2001 that immediately flopped when it came out and that intel had zero reason to proceed with?
yeah, no one is going to use a proprietary one-company ISA and move their entire infastructure over for it. companies will just move over to AMD for better top-level performance with no changes needed.
1:11:29 the language redeemed itself and he is expressing how much he loves it
Folders have to sorted by allocation sort folder
I'm gonna wait for C4. It's gonna be explosive.
Ngl C3 looks relaly interesting, though it's still quite early in development.
[PARENTAL ADVISORY] 18++
GCC/CLANG provides vector extension.
Can you review V lang?
if you like the built in vectors and swizzling, you might also like odin. it doesn't have methods. heh.
Can't wait for C4 programming language that just explodes your computer at compilation
I want a prequel to C. something closer to ASM, but with more verbose operations.
First you find code based from your old code then René shows up. You not only famous, you a legend. 🎓🎩 👑
14:41 broke me
We need a full version of Kawaii Frikkin Desu
I watched the entire video. Now I can say that I have 10 years experience in C3.
Man I should catch up to all the recent videos
Have you tried the prologue? C--
You don't have to make things up. The real prologue is obviously B
@@MartinDerTolle You likely jest, but you are to some degree correct. C inherits from B, which in turn inherits from BCPL, spawning the vigorous argument about whether C would be succeeded by D or P. Meanwhile, C-- begat Cmm which is in active use inside the Glasgow Haskell Compiler.
However, none of these are prologues (that's more akin to Haskell's Prelude) or sequels (like the numbered generations of K).
Now we know what language was C3PO programmed with
Someone please tell me what is happening in the closed captions for this video 😂😂😂😂
he now imports Twitch chat into the captions, pretty poggers if I say so myself.
I actually liked the syntax of c3. Linking native libraries is very easy. It has modules, generics, macros and what not. I think I like it more than zig already.
It looks like they did good work with this, but I don't really see why you'd use this over Zig, which has a faster developing ecosystem
19:30 It looks like the syntax of some static testing of source code such as Frama-C or something, nothing really new here, must be used by the compiler
we survived 30 mins without raylib
the semantics look more like rust than C
crust
lol 😅
crust
@@bossgd100 okay no cap this is a good name for a language that melds the two
@@paulkanjaI NEED THAT
This C3 thing looks a lot like hare (or hare looks like C3, idk which was there first). Still nice to have different alternatives :)
C3: 2019, Hare: 2021
do they a discord server?
Checkout Modula-3, it's an awesome language.
@@deadmarshal and Oberon, for that matter :)
That prob should have starting point
SQL in C?
whats next? PO?
I guess I'll have to look up comparisons to zig
looks like zig with less crappy syntax
$300 for another Zig stream(?
When C4?
So, will you continue using the language for other projects?