Interview with Nim language creator Andreas Rumpf

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ย. 2024

ความคิดเห็น • 89

  • @Richard-tr2yy
    @Richard-tr2yy 4 ปีที่แล้ว +87

    Your Channel is literally gold for programmers like me.
    You highlight new, maybe small, but interesting languages, you talk about interesting and high level topics, you explain things exact and precise...
    Keep up the good work! The big wave of subscribers will be coming soon. :)

  • @kanji_nakamoto
    @kanji_nakamoto 4 ปีที่แล้ว +37

    This guy is very talented and have put a lot of effort to make this happen!

  • @yummy2043
    @yummy2043 4 ปีที่แล้ว +48

    Just tried nim for the first time, it’s definitely gonna be a popular language soon. Love the ability to compile to 3 different languages.

    • @Don-vi2bj
      @Don-vi2bj 4 ปีที่แล้ว +5

      hopefully dependency locking comes to its package manager soon

    • @matthiasschuster9505
      @matthiasschuster9505 2 ปีที่แล้ว +1

      It's actually C, C++, Objective-C and JavaScript

  • @driziiD
    @driziiD 4 ปีที่แล้ว +29

    nim is technological feat. brilliant work Andreas!

  • @malusmundus-9605
    @malusmundus-9605 4 ปีที่แล้ว +18

    I've programmed in Python for over a decade and I've fallen in love with Nim.

  • @tullochgorum6323
    @tullochgorum6323 3 ปีที่แล้ว +13

    Genuinely elegant and productive language - makes the process of writing reliable and performant code a pleasure. Given the easy interop with C and the strong cross-platform capabilities, C developers should strongly consider making the move. Coding in C is basically a form of slow torture compared with Nim.

  • @drygordspellweaver8761
    @drygordspellweaver8761 ปีที่แล้ว +3

    I enjoy your video style of showing relevant webpages and info while the presenter is talking

  • @paulwary
    @paulwary 2 ปีที่แล้ว +7

    This is a surprisingly good format, with relevant information displayed while Andreas answers the question. Well done!

  • @thegeniusfool
    @thegeniusfool 2 ปีที่แล้ว +2

    His energy and love for his language really shines through...

  • @7447744774477447
    @7447744774477447 2 ปีที่แล้ว +5

    I am telling you these language designer guys never blink. It is the case Guido and Andreas

    • @contextfree
      @contextfree  2 ปีที่แล้ว +5

      Early on, I thought it was a good idea to ask folks to record answers on their own time, and some, like Andreas, were kind enough to do so. But I've since learned it's better to do a video chat. People are better at being natural that way. It's less stress for most folks.

  • @leonlysak4927
    @leonlysak4927 4 ปีที่แล้ว +10

    Thank you both for the interview. I'm predicting Nim is going to mature very well and quite possibly overtake Python in popularity one day.

  • @nimucity.
    @nimucity. 2 ปีที่แล้ว +2

    Nice to meet you, Thanks for sharing

  • @sken1301
    @sken1301 3 ปีที่แล้ว +6

    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 yes for 1+2, then Nim is the best of both worlds: not so complicated, memory safe, almost deterministic memory management

  • @TheArtofSoftware
    @TheArtofSoftware 4 ปีที่แล้ว +4

    Great video. I'm hoping that a Nim (or a language like it) will catch on some day. Hope they can find a large backer.

  • @JohnMitchellCalif
    @JohnMitchellCalif 4 ปีที่แล้ว +7

    really interesting, thanks for posting this! I adore Python, and adore systems programming -- Nim is a perfect fit. I'm curious how it could be also used to replace some amount of Javascript/Typescript, on the server or web levels.
    Also, thanks for showing so many sites: I'm off to investigate Rosettacode.

    • @TheMrKeksLp
      @TheMrKeksLp 4 ปีที่แล้ว

      I doubt you're gonna get very far trying to cling to Python in a sys dev environment

  • @diktomat
    @diktomat ปีที่แล้ว +3

    Nim is nice: It’s case-insensitive to accommodate different styles in naming, but at the same time prevents me from proper, individually adjustable indentation, as using tabs is an error.. 😂

  • @drewcannedy3045
    @drewcannedy3045 4 ปีที่แล้ว +5

    Interesting video. Nice job.

  • @skaruts
    @skaruts 4 ปีที่แล้ว +11

    As far as the underscore insensitivity goes, I disagree that it's not an issue. For the most part it isn't, for sure, and personally I welcome it wholeheartedly because *I can't stand **_camelCase_** one bit!!,* and so Nim lets me use its standard lib in _camel_case_ if I want, but it's not entirely without issues. I don't interact much with the community, but I've seen a short discussion where some people were missing the ability to differentiate private stuff from public using a leading underscore. I myself wish Nim allowed that, like "__foo,"_ and even "___foo,"_ (youtube formatting sucks balls...) as that isn't too cluttering and makes a big difference in telling things apart. As it stands, you can only resort to some cluttering naming conventions. I tend to use a *p_* for private, as in *p_foo,* since I don't deal with pointers in Nim. But it doesn't really make private stuff more distinct, and may confuse people reading my code...
    Another issue is that you can't just simply do this:
    *type Foo = object*
    *_x, _y:int*
    *# getter/setter*
    *proc x(self:Foo):int = self._x*
    *proc `x=`(self:Foo, x:int) = self._x = x*
    You'll need to think of something else to name your properties there... *p_x,* or *prv_x,* or *real_x,* or *THE_x,* or whatever...

    • @kcvinu
      @kcvinu 4 ปีที่แล้ว +1

      And not to mention the module dependency problem.

    • @skaruts
      @skaruts 4 ปีที่แล้ว

      @@kcvinu hmm, not sure what you mean..

    • @kcvinu
      @kcvinu 4 ปีที่แล้ว +2

      @@skaruts Assume that you have 2 modules. Module A and Module B. If you want something from B in A, you can import B in A. Same time if you need something from module A in B and you import A in B, then you cannot compile it.

    • @skaruts
      @skaruts 4 ปีที่แล้ว +2

      @@kcvinu Ah, circular dependencies. Yea I hope they get around to properly suporting that eventually.

    • @skaruts
      @skaruts 4 ปีที่แล้ว +2

      @Yardanico For more readability. Such that I look at the code and instantly know what is and what isn't private, without having to go back and check with the type or proc definitions.
      And also for what I mentioned in the OP, about differentiating an _x field from an x getter, and that sort of thing.
      The discussion I was talking about, btw, was this one: forum.nim-lang.org/t/5817

  • @पापानटोले
    @पापानटोले 4 ปีที่แล้ว +4

    Great talk. But how will one convince company/team to use this over C++/Java/GoLang?
    Systems programming language and indentation? Not sure if this will work.

    • @contextfree
      @contextfree  4 ปีที่แล้ว +6

      Adopting a less commonplace language is often considered high risk for sure.

  • @guilherme5094
    @guilherme5094 ปีที่แล้ว +2

    👍

  • @kuroitsuki4076
    @kuroitsuki4076 2 ปีที่แล้ว +3

    nim is an absurd programming language, which mean I love it lol..

  • @gimlam5909
    @gimlam5909 2 ปีที่แล้ว +1

    love

  • @dodsjanne
    @dodsjanne ปีที่แล้ว +1

    Interview the creator of D, Walter Bright! :)

    • @contextfree
      @contextfree  ปีที่แล้ว

      Hoping to sometime. Just far behind on everything.

  • @Microphunktv-jb3kj
    @Microphunktv-jb3kj ปีที่แล้ว +1

    .. no gc.. ah lol.. just realized im watching 3 years old video... while Nim 2.0 is out.
    3 years later, hows the tooling for this language?

    • @pookiepats
      @pookiepats ปีที่แล้ว +1

      the list is small but powerful, i find it quite complete for web development. i think youll find nim a much more useful language at its base with no libs than others.

    • @pookiepats
      @pookiepats ปีที่แล้ว

      also watch the video lol he covers tooling specifically, smh

  • @alainterieur5004
    @alainterieur5004 3 ปีที่แล้ว +1

    seems to be a nice programming language but I still prefer zig as a system lang

  • @alexa.davronov1537
    @alexa.davronov1537 11 หลายเดือนก่อน +1

    I just don't get. For any serious commercial projects you need combination of several things: maintanalbe, bug-free dev-x tooling, ecosystem of libraries & package management, cross-platform support, and, most importantly, well-funded company behind all that that would support you through years. I see zero advantage of nim over C/C++ sadly. Even pythong looks like a joke to me.

  • @RichardBuckerCodes
    @RichardBuckerCodes 4 ปีที่แล้ว

    I get it but then again I don't. I'm just not sure what the use-case for nim. I'm looking at a future of a tech pandemic where we are reduced back to using DOS. That said I want to capture algorithms in a simple syntax then implement the plumbing underneath. Most modern languages are many MB or GB in tools and so on.

  • @_slier
    @_slier 4 ปีที่แล้ว +6

    Awesome language..the only thing i hate is whitespace sensitivity..sry but no

  • @SimGunther
    @SimGunther 4 ปีที่แล้ว +3

    13:47
    Jai: hold my iced tea...

    • @capoiosct
      @capoiosct 4 ปีที่แล้ว +4

      I haven't tried Jai bc it's not a thing yet! but from JBlow's videos I have seen, I am not that impressed with the futures and specifically macros are just string manipulations. Also as he says the Jai compiler is heavily optimized with multithreading whereas nim compiler is not. Incremental compilation is feature which is not available yet in nim. Either way for my codebases which are medium size at most they compile pretty fast.

    • @infinitelink
      @infinitelink 3 ปีที่แล้ว +1

      @@capoiosct Probably not impressed because Jai isn't aimed to be something to win over your typical general audience, it's a language with "joy" in programming at heart, and suitability for (complicated, technical) games programming dictating much else. i.e. it'll let you shoot yourself not help, allow every "oh nooo bad" practice (according to programmers outside of games) that's useful to extract raw performance, and potentially trade away beloved anything for faster (continuous, integrated) compilation (involving many gigs of assets and real time contributors), though not along the lines of the typical myth of the "stairway to heaven".

    • @chyza2012
      @chyza2012 3 ปีที่แล้ว +1

      @@capoiosct jai macro's aren't just string manipulations, I don't know where you heard that, you can just feed the compiler strings generated by compile time execution, but its not the default way, there are more typesafe macros kinda like nim's and ast manipulation, again kinda like nim

    • @pookiepats
      @pookiepats ปีที่แล้ว

      jai lol 😅 an odd comparison

  • @KyleThompson228
    @KyleThompson228 4 ปีที่แล้ว +6

    Why would someone choose this language over Rust? In the war of modern systems programming languages, I'm not sure you could make a compelling case for any that don't have the benefits of Rust's ownership model.

    • @contextfree
      @contextfree  4 ปีที่แล้ว +17

      I like Rust, but I also think lifetimes are syntactically noisy and sometimes painful to reason about. So I'm glad different people are exploring different strategies (where ZetZ at github.com/aep/zz and Beef at github.com/beefytech/Beef are among others that I find particularly interesting). Here's a full video from Andreas Rumpf on Nim's new memory management scheme, in case you're interested: th-cam.com/video/yA32Wxl59wo/w-d-xo.html

    • @capoiosct
      @capoiosct 4 ปีที่แล้ว +10

      I have chosen Nim to learn programming languages (only a hobbist for the time being( and although it lacks some libraries i would like, things are changing in a steady pace. New libraries are emerging, compiler bugs are fixed and learning resources are written. Plus the language is a joy to program with nothing like the boiler-plate that rust is full.

    • @KyleThompson228
      @KyleThompson228 4 ปีที่แล้ว +1

      @@contextfree Sort of annoying that youtube doesn't notify on comment replies so I only saw this now. I'll look into the links you mentioned. As for lifetimes being noisy and occasionally painful to reason about I agree. The thing that most people miss though is that ignoring these concepts will very likely lead to errors anyway. Some consider c++ less painful because they don't have to deal with the borrow checker but then their code compiles with errors to be found at runtime. It may seem daunting to have weird compiler errors about lifetimes when first starting out but to me, front loading all these issues to compile time rather than runtime is a lifesaver. To me, the closer a language gets to "if it compiles, it works" the better.

    • @skaruts
      @skaruts 4 ปีที่แล้ว +16

      I can thing of two answers for that question:
      1 - Because rust is unreadable, convoluted, can take ages to compile, and it's much harder to grasp and get in the mindset of...
      2- There's no _perfect_ language that fits everyone's needs, workflow, preferences, mindset, and time, and so naturally Rust can't please everyone. And neither can Nim.
      I don't disagree with this:
      *_"To me, the closer a language gets to "if it compiles, it works" the better."_*
      But to me that's as much a selling point as the horrible syntax and convolutedness are repelling.

    • @ricowallaby
      @ricowallaby 4 ปีที่แล้ว

      @@KyleThompson228 -TH-cam does notify you on comments, you just have to set it!

  • @maryjonzezulon3092
    @maryjonzezulon3092 2 ปีที่แล้ว +1

    So sad that nim has this stupid identation flaw. Readablity of the code is so sh*t when comparing to code with parenthesis.
    In perfect world should be an option to read C-like code and translate to indentations. Is there any editor level tool, emacs mode, i can try to achieve this?

    • @contextfree
      @contextfree  2 ปีที่แล้ว

      I think I've heard they used to have this in Nim but ditched it because people weren't using it. Which surprises me. Seems like it goes along well with the naming convention independence.

    • @damaomiX
      @damaomiX 2 ปีที่แล้ว +3

      Actually you can add parenthesis around each indentation.

    • @vncstudio
      @vncstudio ปีที่แล้ว

      Some like curly brackets and some don't! Yes. You can use parentheses. It has a very good compiler.

  • @simivb
    @simivb 3 ปีที่แล้ว

    The answer to the question about garbage collection vs. systems programming language at 5:32 is beyond spurious. "Well, ideally hardware would support garbage collection"... Okay? But it doesn't? So you are a systems programming language only in your ideal world where systems look like how you want them to? And this is where your "focus of development" is? I mean... what? You call yourself a systems programming language, have been around for 13 years, and the most basic requirement for being a systems programming language is a WIP??? Seems like you should remove that claim that from your tagline.

    • @heroe1486
      @heroe1486 3 ปีที่แล้ว +3

      Haven't seen such an insecure comment in a while, maybe you should reread yourself. If you're having a bad day you'd better hit your head against a wall, if he should remove that claim, maybe you should remove "human" from your tagline and replace it with "low IQ douchebag".
      And you should probably follow the code hosted on their GitHub, instead of commenting a 1 yo video.

    • @damaomiX
      @damaomiX 2 ปีที่แล้ว +1

      You misunderstood

  • @Christobanistan
    @Christobanistan 2 ปีที่แล้ว

    Frankly, shorter code is a stupid design goal. Maintainability is vastly more important. Nim will likely go nowhere purely based on this decision. So undig your heels, buddy.

    • @maxpayne5056
      @maxpayne5056 ปีที่แล้ว

      Shorter code means more readable, easier to understand, looks like pseudocode. Translate pseudocode with minimal effort, iterate fast. UFCS means easier to refactor. You can switch a procedure for a methods with minimal editing for example.

    • @a0um
      @a0um ปีที่แล้ว

      I don’t think Nim really targets shorter code. It’s about removing “noise”, characters that carry very little out no information compared to what the indentation already provides.

    • @janAkaliKilo
      @janAkaliKilo ปีที่แล้ว

      Shorter - as in: less useless syntax.

  • @yaakovda
    @yaakovda 4 ปีที่แล้ว +18

    I wish someone demoed how to debug Nim with VS Code

    • @contextfree
      @contextfree  4 ปีที่แล้ว +6

      They claim not to support debugging at this time, but I haven't investigated the detailed status: marketplace.visualstudio.com/items?itemName=kosz78.nim

    • @krux02
      @krux02 4 ปีที่แล้ว +5

      I debug using gdb. The nim distribution comes with a start script nim-gdb that installs pretty printers that teach gdb how to understand Nim data types and visualize them correctly. Then it is up to gdb integration of your editor of how well this experience is. But it is far from perfect.

  • @overclucker
    @overclucker 2 ปีที่แล้ว +3

    case/underscore insensitivity. Good luck on your crusade, sir.

  • @sergeiepatov7683
    @sergeiepatov7683 4 ปีที่แล้ว +7

    "LLVM.. I expect the same happen to Nim"
    Noooo! Compilation to C is one of the best features of Nim. Please don't make another piece of crap from it, like Swift or Rust, that takes ages to compile.

    • @pookiepats
      @pookiepats ปีที่แล้ว

      exactly, that is what i heard to , relax guy :)

  • @skaruts
    @skaruts 4 ปีที่แล้ว +5

    As far as indentation goes, the only objection I have is that whitespace significant languages (Python, Nim, etc) tend to disallow more than 2 statements in one line... I don't know how the interpreters/compilers work, but I would bet this limitation is artificially placed. The interpreters/compilers know how to tell statements apart from the usage of a *;* , so I'd think that means they could very well deal with this:
    *if something: if x > 10: do_things(); else: do_other_things; x += 1; y -= 1*
    This isn't a great example, but sometimes there's repetitive code that spans many lines and looks better laid out like a table. Besides, economizing on vertical space should be welcome, because our monitors are wide, not tall. Whitespace significant languages have that advantage out of the box, but then they limit it...

    • @TB-tv2zf
      @TB-tv2zf 4 ปีที่แล้ว +1

      I think that nesting with a one-liner is asking for trouble. Can you come up with an example that actually improves readability?

    • @skaruts
      @skaruts 4 ปีที่แล้ว

      @@TB-tv2zf What kind of trouble can you get from having 3 or 4 statements in one line? I don't remember having any.
      And no, I don't have any examples off the top of my head. I've mostly been using whitespace languages for half a decade, so I wouldn't remember...

    • @TB-tv2zf
      @TB-tv2zf 4 ปีที่แล้ว +1

      ​@@skaruts In your example it takes a little while to find out if the else statement belongs to the first or second if statement. Obviously it's not rocket science, but to me it definitely reduces readability. Trouble might be an overstatement, but so far I cannot think of a scenario where it would be beneficial.

    • @skaruts
      @skaruts 4 ปีที่แล้ว

      If everything is in one line then the elses will follow the outward order from the ifs. There's no other way of interpreting it, and no confusion about that.
      But my example was just to illustrate it. It is a stupid example, and I was aware of that. I personally don't like laying out ifs like that. Even when I do a conditional assignment I indent it:
      let x =
      if something: 10
      else: 20
      But there are cases where laying out code in table form can help. This is valid Nim (fortunately this is allowed):
      ButtonStyle* = ref object of Style
      fg_normal*, fg_normal_h*, fg_pressed*, fg_pressed_h* :Color
      bg_normal*, bg_normal_h*, bg_pressed*, bg_pressed_h* :Color
      (That's 3 lines of code. Depending on where you're reading this it may wrap.)
      But ultimately, you never know what people may come up with, and different brains/eyes parse information differently. You never know when people might write some code that looks better in a different way, for them or for everyone. I accept that indentation has to be done in order for the compiler to make sense of where blocks of code start and end, but other than that, I will never agree with having someone's subjective standards imposed in a language's syntax.
      This may be my number 1 peeve with Nim so far: that it imposes certain standards. Python did it mostly right, it advocates for some standards, but imposed very little.

    • @doongjohnlee820
      @doongjohnlee820 4 ปีที่แล้ว +3

      @@skaruts
      aProc(); bProc(); cProc()
      var a = 10; var b = "wow"
      let nim = if b != "wow": b = "yay"; "yes" else: "no"
      let ok = (if a == 10: "yes" else: "no"); b = "wowowow"
      these are valid nim code
      basically where you would put a newline(in a single block) you can write ;
      but some codes need to be grouped by ( ) to remove ambiguity