I am smiling and being such a fangirl about this. Dominik, your book "Nim in Action" is by far and large one of the absolute best books ever written about a programming language. I found is absolutely easy and interesting to expand on the examples provided for this amazing programming language. By far my favorite programming book ever, and I say this as someone that has read some of the most famous texts in the field. Thank you for your contributions to the Nim ecosystem and community. I hope to reach the level necessary to become a contributor one of these days. I am currently learning more about compiler and interpreter design, and although I am learning about it through Go, I aim to port what I find to Nim eventually and see if I can jump in an be of some help to the Nim language designers. This language truly is the future of programming, and a joy to use.
I am a Java/Kotlin developer, not experienced in C++ or Rust. I would like to ask some questions: 1. Is Nim with ORC GC memory safe while having an almost deterministic memory deallocation? 2. As of 2021, can Nim interface with C++ much better than in Rust? 3. Can we add something to detect and block cyclic references so that we can use ARC without the fear of memory leak? If the answer is yes for 1+2, then Nim is the best of both worlds: not so complicated, memory safe, almost deterministic memory management. If 3 could be done in the future too, then Nim is perfect.
1. Correct. 2. I think so yes, but the interop can always be better still. We're getting there though. 3. There is a heuristic for this already yes, but it's usually wiser to annotate your types with .acyclic (which keeps the memory safety) and let the cycle collector enabled. It's really good in the upcoming 1.6 release, nothing to worry about.
I made my internal log processing tool using nim because I had a choice and I was amazed that my code did wonders on Linux, windows and Mac same time Cool language. Great presentation Dominic
As a fairly new fullstack webdev who is using mostly js and some python, would nim be something that could be of use to me, it has caught my interest for some reason, thank you.
Sure it would. I have used it personally for a lot of web dev, both for server-side (with Jester) and client-side (with Karax). A great example of this is forum.nim-lang.org (written 100% in Nim).
I may be inexperienced, but it would be sweet with a FOR-loop that is automatically threaded (and waits until every thread is finished). C++ std containers are somewhat thread safe as I understand... Maybe in some way this can be analyzed by compiler with some more compile time which is fine to me.
@@uncannydeduction C++ std containers are not thread safe. "Somewhat thread safe" is not a thing. Since there's no synchronization, parallel mutation will lead to data races. Most programming languages offer parallel for-loop functionality in their libraries. With Nim I think you can use OpenMP for that.
@@xnoreq writing in different indices is thread safe as long as it's not reading the same indices at the same time. Most design patterns doesn't read in the same time (same scope). So there should be able to analyze the scope and whats happening and if reading is being done then add automatic mutices surrounding those parts, otherwise no mutice is needed at all.
@@uncannydeduction Do you mean mutexes? A common use case is to have a writer that adds to a collection and multiple readers that consume the items. Since STL is not thread safe, you need to use some locking mechanism. (Usually you need to lock more than just access to the collection so that's the way to go.) If you just read or can ensure that multiple writers access dedicated indices then you could as well just use an array. This still doesn't make any of this thread-safe. The whole point of thread-safety is to ensure that operations are serialized/atomic or appear as such to other threads. If you want guarantees about data-race freedom ("fearless concurrency") then you should use Rust. All the other programming languages (C, C++, Java, C#, Nim, Zig, even Go ...) all put this burden on the programmer.
Interesting talk but why not use just C++ or Go? Are there any distinct advantages of Nim over C++/Go ? Can we make Desktop UI in Nim ? If Nim has to frequently depends on C/C++ then it may not be the best thing as programmers need to know both Nim and C/C++ ?
Regarding Desktop UIs, there are several projects working on that, see WebGUI, Fidget, NimX, and Nim's own "ui" library. (Among others). As for the last part, Nim depends on C/C++ because it compiles to C/C++ (as well as JS). You don't need any C/C++ knowledge to write Nim, but you do have the freedom to easily import C libraries if you want (like Python).
@@superagucova Thanks for the explanation. My point is Is there is any advantage of porting c/c++ applications to Nim? i doubt as Nim transpiles to c/c++. So it will be difficult to convince people using c/c++ in large scale project to move to Nim. May be Python projects facing performance problems could be right candidates..
@@पापानटोले yes, but you can write library code in Nim, and have the main function on the c++ side, using that. I haven't programmed in c/c++ and don't know about its tools, but I think there are benefits to writing in Nim due to all the static checking by the compiler, i.e: for safety reasons.
Doesn't Go have a lot of error checking crud? Nim has exceptions that'll just propagate like they do in Python. C++ needs ten more years to become clean enough for general use.
this is like pythonic Go albeit more expressive with template/macro, meta and type defs are like F#. gives it ability to define enterprise application type systems, value objects and entities. I see use case of modern language semantics in GUI applications design with enterprise-grade type systems, hopefully mobile too someday as against leaky, inefficient energy sucking apps being created these days. I do recall VHDL (Ada inspired) syntax with hard typing. That was clean and so is this.
Hello , i want to start contributing into Nim , i think it can be the next mainstream lang but the problem is it is not maintained or pushed by a big company , i can influence peaople starting it and i can start dev some libraries ,
Thanks for the great intro to NIM! In my opinion, It would be better to keep dark mode also for code examples like in your video from BelFOSS 2018 : ruclips.net/video/hzxr9_ZK9uY/видео.html
Well this was unfortunately a waste of time to me personally, because the contents of this talk was basically equivalent to example program i saw on the website already. I find basic constructs to be among the least interesting traits of any language, alongside the syntax, as they are essentially arbitrary. What i want to know first thing about the language, or any tool: how does it help me solve common, complex engineering problems? First thing, before the syntax is even mentioned. If i am to spend hundreds of hours learning the language, which necessarily will include a lot of intricacies, i need a WHY, not a HOW.
you have to be completely sick/perverted to love python. It is a slowpoke, complete break, devs don't really know how to really do DEV - they were completely unable to transition to version 3 - language split in 2, and therefore i read that it is unlikely we will ever going to witness version 4, EVER.
If only nim is not sensitive ( white space ) like my ex girlfriend, im more than happy to use it..arghh..hate all python/ruby crap..i cant stand the syntax of function
How is it even a problem with modern text editors and IDEs ? And you should most likely have a consistent formatting even for languages that don't push it tho
@@heroe1486 relying to ide solely, implying a bad design of the language.. plus what happen when u are on terminal ( vim ) ? relying solely on ide is dumb
@@_slier dude My Neovim config with coc.nvim is more powerful than Vscode, that's not even an excuse, I just need to copy paste it if I'm on a remote server. And btw you don't even need a full fleged config, I'm sure vim handles indentation almost out of the box
I am smiling and being such a fangirl about this. Dominik, your book "Nim in Action" is by far and large one of the absolute best books ever written about a programming language. I found is absolutely easy and interesting to expand on the examples provided for this amazing programming language. By far my favorite programming book ever, and I say this as someone that has read some of the most famous texts in the field. Thank you for your contributions to the Nim ecosystem and community. I hope to reach the level necessary to become a contributor one of these days. I am currently learning more about compiler and interpreter design, and although I am learning about it through Go, I aim to port what I find to Nim eventually and see if I can jump in an be of some help to the Nim language designers.
This language truly is the future of programming, and a joy to use.
didn't know Nim had an Option type (a la Functional Programming) very sweet
This feels almost like a meditation ❤
I'm surprised he didn't mention a comparison to Rust
Or Julia?
because he's comparing nim to the other languages which has similarities to it. Rust is so much different to nim.
Nim is a perfect blend of Python, C and the Pascal-Family of languages(Modula, Oberon, Ada) 🤓
I am a Java/Kotlin developer, not experienced in C++ or Rust. I would like to ask some questions:
1. Is Nim with ORC GC memory safe while having an almost deterministic memory deallocation?
2. As of 2021, can Nim interface with C++ much better than in Rust?
3. Can we add something to detect and block cyclic references so that we can use ARC without the fear of memory leak?
If the answer is yes for 1+2, then Nim is the best of both worlds: not so complicated, memory safe, almost deterministic memory management.
If 3 could be done in the future too, then Nim is perfect.
1. Correct.
2. I think so yes, but the interop can always be better still. We're getting there though.
3. There is a heuristic for this already yes, but it's usually wiser to annotate your types with .acyclic (which keeps the memory safety) and let the cycle collector enabled. It's really good in the upcoming 1.6 release, nothing to worry about.
9:14 Contributing to a language at 14 😌
I'm very excited about Nim.
BRACE! This is the future!
20:00 Is the compile time calculation only for "const" types?
yes it is
26:43 Is there any sort of typeclass that tie together types that have a functionality for + operator?
I made my internal log processing tool using nim because I had a choice and I was amazed that my code did wonders on Linux, windows and Mac same time
Cool language.
Great presentation Dominic
C has a logical syntax.
As a fairly new fullstack webdev who is using mostly js and some python, would nim be something that could be of use to me, it has caught my interest for some reason, thank you.
Sure it would. I have used it personally for a lot of web dev, both for server-side (with Jester) and client-side (with Karax). A great example of this is forum.nim-lang.org (written 100% in Nim).
@@d0m96 Cheers dude.
when you run echo $some(42) you get some(42) not Some(42)
ASMR Nim intro
Loved it!
I may be inexperienced, but it would be sweet with a FOR-loop that is automatically threaded (and waits until every thread is finished). C++ std containers are somewhat thread safe as I understand... Maybe in some way this can be analyzed by compiler with some more compile time which is fine to me.
Also FOR-loop threaded on graphical card using compute shader... Please...
@@uncannydeduction C++ std containers are not thread safe. "Somewhat thread safe" is not a thing. Since there's no synchronization, parallel mutation will lead to data races.
Most programming languages offer parallel for-loop functionality in their libraries. With Nim I think you can use OpenMP for that.
@@xnoreqCan't it be automatically handled with appropriate mutices? It would just be a cool feature.
@@xnoreq writing in different indices is thread safe as long as it's not reading the same indices at the same time. Most design patterns doesn't read in the same time (same scope). So there should be able to analyze the scope and whats happening and if reading is being done then add automatic mutices surrounding those parts, otherwise no mutice is needed at all.
@@uncannydeduction Do you mean mutexes?
A common use case is to have a writer that adds to a collection and multiple readers that consume the items. Since STL is not thread safe, you need to use some locking mechanism. (Usually you need to lock more than just access to the collection so that's the way to go.)
If you just read or can ensure that multiple writers access dedicated indices then you could as well just use an array.
This still doesn't make any of this thread-safe. The whole point of thread-safety is to ensure that operations are serialized/atomic or appear as such to other threads.
If you want guarantees about data-race freedom ("fearless concurrency") then you should use Rust.
All the other programming languages (C, C++, Java, C#, Nim, Zig, even Go ...) all put this burden on the programmer.
Great video! What did you use to create the sound visualization in your slides? (Side-note: Thanks for everything you've done with Nim!)
👍Thanks!!
Interesting talk but why not use just C++ or Go? Are there any distinct advantages of Nim over C++/Go ?
Can we make Desktop UI in Nim ? If Nim has to frequently depends on C/C++ then it may not be the best thing as programmers need to know both Nim and C/C++ ?
Regarding Desktop UIs, there are several projects working on that, see WebGUI, Fidget, NimX, and Nim's own "ui" library. (Among others).
As for the last part, Nim depends on C/C++ because it compiles to C/C++ (as well as JS). You don't need any C/C++ knowledge to write Nim, but you do have the freedom to easily import C libraries if you want (like Python).
@@superagucova
Thanks for the explanation. My point is Is there is any advantage of porting c/c++ applications to Nim? i doubt as Nim transpiles to c/c++. So it will be difficult to convince people using c/c++ in large scale project to move to Nim.
May be Python projects facing performance problems could be right candidates..
@@पापानटोले yes, but you can write library code in Nim, and have the main function on the c++ side, using that. I haven't programmed in c/c++ and don't know about its tools, but I think there are benefits to writing in Nim due to all the static checking by the compiler, i.e: for safety reasons.
Doesn't Go have a lot of error checking crud? Nim has exceptions that'll just propagate like they do in Python. C++ needs ten more years to become clean enough for general use.
@@पापानटोले C transpiles to machine code, so I doubt there are any advantages to using C over just using machine code.
Thanks for this! I'm growing more and more interested in giving Nim a go.
Pun intended? ;=)
@@alelondon23 Sure ;)
But Nim doesn’t need Go???
this is like pythonic Go albeit more expressive with template/macro, meta and type defs are like F#. gives it ability to define enterprise application type systems, value objects and entities. I see use case of modern language semantics in GUI applications design with enterprise-grade type systems, hopefully mobile too someday as against leaky, inefficient energy sucking apps being created these days. I do recall VHDL (Ada inspired) syntax with hard typing. That was clean and so is this.
Hello , i want to start contributing into Nim , i think it can be the next mainstream lang but the problem is it is not maintained or pushed by a big company , i can influence peaople starting it and i can start dev some libraries ,
This is by far the SLOWEST talk I've ever heard. Even playing it at 2x wasn't enough
Thanks for the great intro to NIM! In my opinion, It would be better to keep dark mode also for code examples like in your video from BelFOSS 2018 : ruclips.net/video/hzxr9_ZK9uY/видео.html
CSM Reference
Too much pause
I optimised for clarity with the assumption that talks can always be watched at 2x speed, so feel free to watch it this way :)
I really liked the pause. Gave me time to take everything in
@@d0m96 Well pause button in player is a thing too. I too feel pauses are too long and being so long, no longer help pace the talk.
Well this was unfortunately a waste of time to me personally, because the contents of this talk was basically equivalent to example program i saw on the website already. I find basic constructs to be among the least interesting traits of any language, alongside the syntax, as they are essentially arbitrary. What i want to know first thing about the language, or any tool: how does it help me solve common, complex engineering problems? First thing, before the syntax is even mentioned. If i am to spend hundreds of hours learning the language, which necessarily will include a lot of intricacies, i need a WHY, not a HOW.
you have to be completely sick/perverted to love python. It is a slowpoke, complete break, devs don't really know how to really do DEV - they were completely unable to transition to version 3 - language split in 2, and therefore i read that it is unlikely we will ever going to witness version 4, EVER.
I couldn't (don't want to??) deal with Python's white-space significance.
Without opening this discussion yet again, let me just state that your opinion is nonsense.
Some like curly braces, some like whitespace, and some don't mind either.
If only nim is not sensitive ( white space ) like my ex girlfriend, im more than happy to use it..arghh..hate all python/ruby crap..i cant stand the syntax of function
When you could be a little sensitive (white space and girlfriend) could it be possible, that your girlfriend and Nim become accessible to you (again)
How is it even a problem with modern text editors and IDEs ? And you should most likely have a consistent formatting even for languages that don't push it tho
@@shalokshalom no thx.. why should i be sensitive to an attention seeker gf? i stick with zig ( better girlfriend )
@@heroe1486 relying to ide solely, implying a bad design of the language.. plus what happen when u are on terminal ( vim ) ? relying solely on ide is dumb
@@_slier dude My Neovim config with coc.nvim is more powerful than Vscode, that's not even an excuse, I just need to copy paste it if I'm on a remote server.
And btw you don't even need a full fleged config, I'm sure vim handles indentation almost out of the box