The Dream Programming Language? Lobster

Sdílet
Vložit
  • čas přidán 1. 04. 2023
  • A concise walkthrough of Lobster, a programming language that has a Python-like syntax but is statically typed with next-level inference and does not rely on a garbage collector.
    -
    Camera: Canon EOS R5 amzn.to/3CCrxzl
    Monitor: Dell U4914DW 49in amzn.to/3MJV1jx
    SSD for Video Editing: VectoTech Rapid 8TB amzn.to/3hXz9TM
    Microphone 1: Rode NT1-A amzn.to/3vWM4gL
    Microphone 2: Seinheiser 416 amzn.to/3Fkti60
    Microphone Interface: Focusrite Clarett+ 2Pre amzn.to/3J5dy7S
    Tripod: JOBY GorillaPod 5K amzn.to/3JaPxMA
    Mouse: Razer DeathAdder amzn.to/3J9fYCf
    Keyboard (sometimes): Keychron Q1 amzn.to/3YkJNrB
    Computer: 2021 Macbook Pro amzn.to/3J7FXtW
    Lens: Canon RF24mm F1.8 Macro is STM Lens amzn.to/3UUs1bB
    Caffeine: High Brew Cold Brew Coffee amzn.to/3hXyx0q
    More Caffeine: Monster Energy Juice, Pipeline Punch amzn.to/3Czmfox
    Building A Second Brain book: amzn.to/3cIShWf
  • Věda a technologie

Komentáře • 404

  • @toyin5522
    @toyin5522 Před rokem +113

    "Languages faster than python are more common like hydrogen atoms" 😆 🤣

    • @NoidoDev
      @NoidoDev Před 10 měsíci +3

      People are always just referring to runtime speed, not development speed or the learning curve.

    • @novamc7945
      @novamc7945 Před 8 měsíci +7

      @@NoidoDev But that is what speed *should* refer to. How your app performs in production is more important than the development, but that's my opinion

    • @mikumikudice
      @mikumikudice Před 4 měsíci

      ​@@NoidoDev ok, you lanched your app in three days. now add a new feature without breaking everything. try to factor out a type. even in this parameters python is slow

    • @camwhit8892
      @camwhit8892 Před měsícem

      @@novamc7945 I feel like both are really important.

  • @nitsanbh
    @nitsanbh Před 5 měsíci +7

    This language is like my high school essays. I had zero unique ideas to say so I copied sentences from articles on the web and called it a new article

    • @codetothemoon
      @codetothemoon  Před 5 měsíci +1

      I think of programming languages like recipes - cheese, tomato sauce and bread all existed before pizza. But despite that, pizza is still novel (and amazing) isn't it?

    • @lepidoptera9337
      @lepidoptera9337 Před 4 měsíci +1

      @@codetothemoon Yeah, if you are treating languages like pizza, then you will find even programming the temperature controller of a pizza oven hard. ;-)

    • @NoName-md6fd
      @NoName-md6fd Před 2 dny

      I mean, lobster is basically raylib in programming language form. So no, syntax wise it's not new stuff, but all the batteries are included to make a game, which is the point of the language.

  • @Nox3x3
    @Nox3x3 Před rokem +196

    I love everything about this. That's why I use Nim. It has almost all of these features, except for the hardcore inference, but is much more mature. Yes, including the memory system.

    • @nERVEcenter117
      @nERVEcenter117 Před rokem +59

      A LOT of these newer languages seems to be re-implementing features that are already extremely mature in Nim. I'm still shocked it has so little reach given that people keep making languages that do what it does incredibly well, and has done for a decade. But PLs are a hype-driven domain. New and weird always seem to beat older and stable.

    • @JustSomeAussie1
      @JustSomeAussie1 Před rokem +37

      Nim compiler errors really suck, and the syntax is too loose (some_func and someFunc are the same thing).

    • @thephoenixsystem6765
      @thephoenixsystem6765 Před rokem +20

      @@JustSomeAussie1 that is a turnoff

    • @asandax6
      @asandax6 Před rokem +13

      ​@@JustSomeAussie1 Yeah that's the reason I dropped nim. Too many ways to the same thing = confusion when reading someone else's code.

    • @culi7068
      @culi7068 Před rokem +5

      tbh the hardcore inference is the only thing that really caught my eye. The other features seem nice but kinda like double-edged swords (and not in a "this might lead to bad practices because it makes you lazy" way. Rather in a "the language has structural limitations on what it can do now because it bent over backwards to support this neat syntactic sugar" way).
      I wish TypeScript's inference got this good

  • @doktoracula7017
    @doktoracula7017 Před rokem +20

    A lot of stuff in Lobster reminds me of Koka, especially all the syntax sugar. It also has indentation based scopes but those are defined as implicit brackets (and code is desugared to those brackets).

  • @mr.m8539
    @mr.m8539 Před rokem +33

    Wish you covered memory management more in depth.

  • @daviidon
    @daviidon Před rokem +35

    Parameter type inference is standard in the ml family(eg:F#). The dev ex is a little better as the ide will show the inferred types so you get all the benefits of specifying the type without having to write it out.

  • @GreatWalker
    @GreatWalker Před rokem +15

    @8:56, it kinda looks a little more concise than Python 2/3 because there is no constructor in the class definition or dataclass decorator (pls ignore the `let` keyword)

  • @JoelJosephReji
    @JoelJosephReji Před rokem +7

    Thanks for the great video! I found a little audio issues like some "pops" in between and maybe this info would help you sort that issue out (I initially thought that it had something to do with my headphone but then I confirmed it by listening from the laptop speaker)! (keep the good work going btw!)

    • @mskaarupj
      @mskaarupj Před rokem +1

      I also get these pops. They are also in the Leaps for neovim video

  • @irlshrek
    @irlshrek Před rokem +55

    my initial thought is that I think that its possible to be so concise so as to be harder to reason about and in my opinion this, at least, treads that line. Its like, you COULD make a Venn Diagram without the circles but does it actually make it better?

    • @J-Kimble
      @J-Kimble Před rokem +6

      Yeah I know what you mean. I think about golang along these lines.

    • @WoutervanOortmerssen
      @WoutervanOortmerssen Před rokem +8

      It is so concise because Lobster thinks these things (like trailing lambdas) are more fundamental than other languages do, and wants to make them as easy to use as built-in control structures for example. There are ways to make lambdas / types more verbose if you want, but yes, if you dislike looking at concise code in general then Lobster is not for you :)

    • @wafikiri_
      @wafikiri_ Před rokem +8

      ​@@WoutervanOortmerssen I do like concise code, up to but not including figuring out what I meant. Concise but formal and well-defined syntax is a must for me.

  • @headder7802
    @headder7802 Před rokem +10

    Strange... It looks like Rust, Nim, Crystal and Python had a baby... ;P

  • @EliteTester
    @EliteTester Před rokem +7

    This is exactly the mix of simlicity and terseness that I would expect from a good game dev, it kinda looks like a python+lua with types :D

  • @NOPerative
    @NOPerative Před rokem

    Concise, fun vid.
    Good stuff.

  • @mrmagnetic927
    @mrmagnetic927 Před rokem +11

    Haha, Another crustacean library ( i see what they did there ). Lets call it the Seafood stack😂

  • @soanvig
    @soanvig Před rokem +4

    The problem I can see here is variable mutation. Albeit you have let/var, if the let contains class you are able to modify the class instance itself assigned to that name.

  • @qsykip
    @qsykip Před rokem +11

    The type inference for functions seems to work like Julia, which is even more powerful because of its multiple dispatch.

    • @WoutervanOortmerssen
      @WoutervanOortmerssen Před rokem +12

      Except Julia will default to dynamic typing if it can't infer types, and Lobster will error :)

  • @lekretka
    @lekretka Před 10 měsíci +4

    The type inference looks very powerful. I tried F#, but this thing is on another level. Curious how it works under the hood, but it seems like Go duck typing or C++ templates, but you don't need to declare interface or specify parameter type. Never seen something like that in a statically typed language.

    • @codetothemoon
      @codetothemoon  Před 10 měsíci +1

      that was my impression as well! Seems like it gives us pretty much all the advantages of dynamic typing, but with none of the downsides

  • @comproprasad6438
    @comproprasad6438 Před rokem +6

    This looks like my dream programming language

  • @pixl_xip
    @pixl_xip Před rokem +2

    Flying cars in 1985? 😂 Great video!

  • @driden1987
    @driden1987 Před rokem +8

    Hmmm, not really a fan of having so many syntactical subtleties. I am a fan of having one way to do things

  • @angeldude101
    @angeldude101 Před rokem +4

    Not for me. For one, most of this video was focused on syntax, which is the _one_ thing I would change about Rust (I'd rather it looked more like Haskell, but oh well), but mainly I like Rust because it gives explicit control and tight restrictions that let me use that control without worrying. The language will automatically allocates if it can't solve the ownership? That's a deal breaker for me. What if I don't _have_ an allocator to begin with?

  • @oglothenerd
    @oglothenerd Před 4 měsíci +1

    I am making my own language. It aims to merge Zig and Rust together, and aims to solve flaws like relying on an Internet connection just to compile.

  • @freedom_aint_free
    @freedom_aint_free Před rokem +4

    It kinda put itself in the toy language category the moment it stated in "What lobster is not" that it is not suitable for big projects.

    • @codetothemoon
      @codetothemoon  Před rokem +2

      I agree it's a bit ominous of a statement to see when you're deciding whether to invest time in learning a new language

    • @thavrisco1632
      @thavrisco1632 Před rokem +1

      The author claims Lobster is not for AAA games because it lacks features that smaller creators probably don't want and what big studios do want. It's like the difference between coding proprietary software for game development and using a game engine. Many AAA game companies don't use Unity or Unreal because they need something specific to their complex needs and these game engines get in the way of that.
      So Lobster is like Unity in that large studios might not want to use it for their projects.

    • @NoidoDev
      @NoidoDev Před 10 měsíci +2

      Calling such languages "toy languages" is the problem. Some people need something powerful to work on their own projects, without a team.

  • @jekyllorhyde9785
    @jekyllorhyde9785 Před 10 měsíci +7

    Something that I have grown to accept about coding as I've gone further along, is that, in the words of Tim Peters: "Explicit is better than implicit"

    • @codetothemoon
      @codetothemoon  Před 10 měsíci +1

      I actually mostly agree with the spirit of that statement, but I also think that, as with many of these types of blanket statements - there are always exceptions

  • @wojtek1180
    @wojtek1180 Před 9 měsíci +1

    I see something about "this new programming language" i click . What can I say I'm simple man

  • @somcho
    @somcho Před rokem +3

    for the next one I'd like to hear your summary/thoughts on lean4 prover functional programming language

    • @astroid-ws4py
      @astroid-ws4py Před rokem

      And Glamorous Toolkit in Pharo for interactive (live objects) development style will also be cool.

  • @gabriellevesque2185
    @gabriellevesque2185 Před rokem +50

    Hmm, "yet another language". :P

    • @codetothemoon
      @codetothemoon  Před rokem +9

      indeed!

    • @iglobrothers645
      @iglobrothers645 Před rokem +4

      Took what makes C and rust so great and threw it out the window...
      (talking about curly brackets)

    • @klamberext
      @klamberext Před rokem

      And decided to base itself on Python 😢

  • @lolwingding
    @lolwingding Před rokem

    Please make a video on Cone lang, I found it through C3 lang. Love your thoroughness 😍

  • @michaelsydenham2918
    @michaelsydenham2918 Před 11 měsíci +6

    Great video. The author has listed 'consider using something else instead of _ for namespaces' in his todo list. I guess it's possibly a concern if you use _ in your variables.

    • @codetothemoon
      @codetothemoon  Před 11 měsíci

      thank you! yeah I heard this issue was going to be addressed which seems like a great thing

  • @daviidon
    @daviidon Před 8 měsíci +2

    I just wrote my first program in lobster and love the syntax. Only issue I have is that there's no method chaning ie: filter().map()

  • @jaysonbunnell8097
    @jaysonbunnell8097 Před 7 měsíci

    most languages that I've seen with hindley-milner type inference make it necessary to declare types for function signatures (although fundamentally it isn't necessary). Cool vid!

    • @mattetis
      @mattetis Před měsícem

      What languages are those?
      I only know of Haskell and OCaml and they do not require that

  • @guilherme5094
    @guilherme5094 Před rokem +1

    At the beginning of the video:
    Lobster what?
    At the end of the video:
    It looks really interesting👍

  • @uzimonkey
    @uzimonkey Před rokem +1

    The duck typing and anonymous function as last argument syntax is very Ruby-esque.

    • @codetothemoon
      @codetothemoon  Před rokem

      Definitely - the really cool thing though is that you get static type checking at compile time, despite the syntax being concise like Ruby!

  • @soyitiel
    @soyitiel Před rokem +9

    12:27 maybe a better way to execute the *_x* notation, where x is a-z, would be to type *$n* , where n is 0-infinity, a bit more flexible
    everything else seems awesome

    • @IMJamby
      @IMJamby Před rokem +3

      I guess if you need more than 26 parameters for a function you definitely have bigger problems 😅

    • @soyitiel
      @soyitiel Před rokem

      @@IMJamby Yeah, I guess you're right. I still think my solution is bit more intuitive, and of course since I'm biased, but you're totally right

    • @terryriley6410
      @terryriley6410 Před 11 měsíci +1

      @@soyitiel $1 looks confusing and noisy. it's fine in bash but I much prefer _a * _b than $1 * $2. the former feels better to type as well as being easy on the eyes.

  • @edgeeffect
    @edgeeffect Před rokem +1

    "If you squint, you feel like you're writing Haskel".... ... or Ruby! :)

  • @bobweiram6321
    @bobweiram6321 Před 5 měsíci +1

    Whenever I see the **def** keyword in a language, I already know it favors brevity over clarity.

    • @codetothemoon
      @codetothemoon  Před 5 měsíci

      why is that?

    • @bobweiram6321
      @bobweiram6321 Před 5 měsíci

      @@codetothemoon Def is meaningless. Def what? Leopard? Oh, it's short for define? So functions are defined but not the rest of the program? Function is more descriptive. Why is it so hard to spell out keywords, especially when there's no screen real estate penalty, powerful text editors, and Language Servers. In my experience, brevity also carries with it laziness and sloppiness in the language designers as well as the person programming in it. Don't believe me? C/C++ code is ugly and sloppy when compared to Pascal or Ada.

  • @everestshadow
    @everestshadow Před rokem +7

    For implicit ownership memory management it comes down to how often can the compiler remove reference counting. If it can not do it's job well you end up with one of the worst kind of GC.

  • @wgolyoko
    @wgolyoko Před rokem

    >Worked on Borderlands 2
    Alright, here's my guru now

  • @SliceOfFish
    @SliceOfFish Před rokem +2

    > Or maybe cherry-pick the features you like and go seek them the out in other languages
    *and implement them in your yet another language

  • @torarinvik4920
    @torarinvik4920 Před rokem +1

    Wow, this is close to perfect.

  • @donleyp
    @donleyp Před rokem +1

    The inference of duck-typing is pretty cool.

  • @omashune5546
    @omashune5546 Před rokem +1

    wow, looks really interesting!

  • @MsDuketown
    @MsDuketown Před 2 měsíci

    The Lobster language competes Cute Fish OS with curl.

  • @delphicdescant
    @delphicdescant Před rokem +6

    This must not be the one for me. After most of the features shown, I found myself asking "but why?"
    Nope, I'm happy keeping Zig as my current hype language.

    • @terryriley6410
      @terryriley6410 Před 11 měsíci

      zig is not a hype language, it has curly brackets like its the 80s

    • @delphicdescant
      @delphicdescant Před 11 měsíci

      @@terryriley6410 Spoken like a true web developer.

    • @terryriley6410
      @terryriley6410 Před 11 měsíci +1

      @@delphicdescant it's a joke. fyi indentation sensitive syntax dates back to the 60s.
      also most of the "big names" in no-curly-brackets languages are not web-dev focused: Python, Haskell, F#
      web development happens mainly in JavaScript and TypeScript, both have curly braces to denote scope

    • @delphicdescant
      @delphicdescant Před 10 měsíci

      @@terryriley6410 Joke acknowledged. Really hard to tell what's supposed to be a joke on the internet in these post-irony times.

  • @BraxtonMeyer
    @BraxtonMeyer Před rokem

    what font are you using. Reminds me a lot of Code New Roman...

  • @MrAbrazildo
    @MrAbrazildo Před rokem +3

    I guess the only thing world needs, for leading language, is an easier way to catch undefined behavour in C++.

  • @KrXYT
    @KrXYT Před rokem +8

    Indentation for scopes sucks so bad

  • @AD-zs9cc
    @AD-zs9cc Před rokem +6

    Reminds me of scala, both with syntax and static type inference. Will be cool to see if the memory management works as intended.

  • @bertiesmith3021
    @bertiesmith3021 Před rokem

    What is the point of the parameter type determining whether it is passed by value or reference, rather than the caller making that choice?

  • @leschopinesns100
    @leschopinesns100 Před rokem +14

    It's so funny when he says "this language has the inference you would expect from modern language, and even more !", ML languages have the same inference and they're 40 years old.

    • @WoutervanOortmerssen
      @WoutervanOortmerssen Před rokem +6

      Not quite, they're based on "Hindley Milner" type inference which has the downside that inference breaks down if it can't infer generic types for ALL callers of a function.. and if it can, all those types need to go through that generic representation, potentially making things really slow. That's what you need type classes in Haskell for. Lobster can deal with wildly different types without a common super type or type class, and also be more efficient for each caller.

    • @leschopinesns100
      @leschopinesns100 Před rokem +2

      @@WoutervanOortmerssen I'm not sure to get it all. I looked up "Hindley Milner type system" and it seems really interestng. What you're saying is Lobster has another way of infering types, which is more efficient ? That makes me curious about it.

    • @AnthonyBullard
      @AnthonyBullard Před rokem +3

      @Wouter van Oortmerssen could you talk more about Lobsters type system? Is it on the web site?

  • @socvirnylestela5878
    @socvirnylestela5878 Před rokem

    interesting language to toy around with

  • @Stopinvadingmyhardware
    @Stopinvadingmyhardware Před rokem +4

    Another language, and still the same barrier of entry with development environments.

  • @antoniong4380
    @antoniong4380 Před 4 měsíci

    8:19 this wild Type Inference wouldn't really fit in rust because (talking for myself) there's no clear way on how to solve conflicting names (yeah, I guess just import as a different name), I feel like might incur heavier compile times.
    Weird or hard ABI(?) interface support
    Rust Compiler was designed to only see your function signature at callsite. It then checks if the defined Function Signature matches with the body. It is a bit easier to make sense imo because you would only be worried that you work with whatever was defined in the function signature, however I agree this gives an advantage towards fast prototyping

  • @sumitftr
    @sumitftr Před rokem +4

    this language should replace python, which will be a great improvement in execution time

    • @NoidoDev
      @NoidoDev Před 10 měsíci

      We have Mojo, also Nim exists. But we'll see.

  • @josgraha
    @josgraha Před rokem +1

    nice memory management features but type inference and no pattern matching :(. thank you so much for the tour, well done!

  • @Pythagoras1plus
    @Pythagoras1plus Před rokem +2

    whoa... this is the game developer who made the cube and sauerbraten fps games that have an included editor by just pressing E 😮

    • @codetothemoon
      @codetothemoon  Před rokem +1

      looks like it! I actually hadn't heard of these.

  • @SabeDoesThingsChannel
    @SabeDoesThingsChannel Před 9 měsíci +1

    you should cover the squirrel programming language.

  • @DataPastor
    @DataPastor Před rokem +1

    Does it have a binding library for Python, such as PyO3 of Rust? It would be great to write Python libraries in Lobster.

    • @matrix07012
      @matrix07012 Před rokem +5

      Have you tried Nim? It's fairly similar to Lobster, but more mature and does have Python bindings

    • @DataPastor
      @DataPastor Před rokem +1

      @@matrix07012 I listened to you and checked Nim. I always knew that Nim users love it, but until your comment I have never checked it. I have to say WOW. This is amazing. Thanks for your proposal!

  • @thomasrosebrough9062
    @thomasrosebrough9062 Před rokem +2

    I don't understand how that is memory management if it isn't garbage collected? Do you have to manually call something that's like "clear any memory with no ownership"?

    • @codetothemoon
      @codetothemoon  Před rokem

      nope - it uses automatic reference counting under the hood. So you get the same benefits as a garbage collected language in terms of not having to manually manage memory, but the runtime overhead is more predictable (and in some cases, non-existent). My understanding is that it doesn't handle cycles though.

  • @guy-
    @guy- Před rokem +1

    Lobster: 🙂
    Lobster without limbs: 😳

    • @codetothemoon
      @codetothemoon  Před rokem

      you might have to walk me through this one :)

    • @guy-
      @guy- Před rokem

      @@codetothemoon it's just the tail thing and the head
      Kinda phallic
      Please don't ban me off the channel or whatever, my dirty mind made stupid idea

  • @DarkblooM_IO
    @DarkblooM_IO Před 7 měsíci +2

    So it's basically rusty Python

  • @adilsongoliveira
    @adilsongoliveira Před rokem +2

    You lost em at the indentation. I don't know why but I simply cannot work like that, that's why I've never used python. I know it's weird but this kind of feature makes me very uncomfortable, maybe because my background is C, Pascal, Ada and Prolog.

    • @codetothemoon
      @codetothemoon  Před rokem

      I probably did! I personally enjoy indentation for scoping, but I can totally relate to the arguments against it

    • @xeschire706
      @xeschire706 Před rokem

      Probably because, or at least what I'm thinking anyway 🤔, is they always fail to tell you, for some ridiculous reason, when using a programming language that uses indentation for scoping, to never, ever mix tab indentation with space bar indentation in a language like python, where it expects consistent indentation types for it's scopes, unlike the C-like languages that use my least favorite thing that I think is time waster, curly braces to handle scopes.
      Gosh darn, if I had known that python treats tab based, & space bar based indentation differently, & actually discourages the use tab based indentation anyway, that one detail in the indentation rules that's easy to overlook, that would have saved me from receiving the dreaded "indentation errors" that left me scratching my head, wondering, how? What did I do wrong, when this looks correct! I would have not gotten demoralized so fast when I was learning to code since I was 14 years old, & probably would have advanced far enough to create my own memory safe programming language, & maybe even my own os, wayyyy sooner, maybe even started coding for the Arduino as well at a younger age! 😅

    • @xeschire706
      @xeschire706 Před rokem

      ​​@@codetothemoon I think the arguments against indentation for handling scopes are very silly, because they most, very likely overlook the fact, that you should never mix tab based indentation, with space based indentation in these types of programming languages, which makes me wonder 🤔, why on earth does tab based indentation have to be different from space based indentation, instead of making tab equal four space in python, or similar language? Would prevent all of the dreaded "indentation" errors, especially when programmers, are very used to using tabs & space in conjunction with one another while coding?
      Anyway, to me, the only really valid reasoning to be against indentation for code scoping, can only be within the realm of personal preference/taste, & nothing more whatsoever.

  • @PatrickSteil
    @PatrickSteil Před rokem +3

    Compiled Python! Awesome!

  • @porky1118
    @porky1118 Před rokem +1

    8:15 That's just what the Scopes language does.

    • @porky1118
      @porky1118 Před rokem +2

      8:55 Oh, I never thought, this is one of the coolest features of Scopes. Even if I like that feature, it didn't seem that special to me.
      The coolest feature of Scopes, despite having a bunch of fancy features, is the handling of references:
      - if a is a reference, a.b is a reference, even if you assign them to a temporary name
      - if a is a value, a.b is a value
      - you can only assign to references, values are immutable
      - most of the time you don't create variables, when you create variables explicitly, they normally don't point to an existing value

  • @cbbcbb6803
    @cbbcbb6803 Před rokem +1

    We need eight billion programming languages, each one customized for each one of the eight billion of us on planet Earth. Each language would have to conform to the personality and personal preferences of each individual user. We all have personal tastes, and deserve to have them respected.
    For example, when coding a class, I would prefer something like "class ... end-class" instead of making spaces, tabs, and line feeds the equivalent of reserved words. Even if I am wrong, I would still prefer something like that.
    "if ... end-if" "function (fn) ... end-function (end-fn)".
    And I prefer hyphen (-) over underscore (_). The underscore is not a space. No one is fooled by it.

    • @codetothemoon
      @codetothemoon  Před rokem +1

      You speak in jest, but the funny thing is that language models should conceivably allow anyone to create their very own programming language on a whim. Not sure if that is a good or bad thing 😎

    • @cbbcbb6803
      @cbbcbb6803 Před rokem +1

      @@codetothemoon Or, am I speaking in jest? 😏

  • @user-zd9wd
    @user-zd9wd Před rokem

    How does it deal with reference cycles

  • @hansdietrich1496
    @hansdietrich1496 Před 2 měsíci

    What I never get: If you already lean on the snytax of another language: Why these arbitrary divergence, e.g. the curly brackets for instantiation? It doesn't need to be a perfect clone of python, but differing arbitrarily just makes it harder to switch.

  • @renghenkow
    @renghenkow Před rokem +7

    lots of nim vibe in lobster

  • @koalakid3609
    @koalakid3609 Před 10 měsíci

    How do I run the code? for lobster

  • @mariafrancodev
    @mariafrancodev Před 10 měsíci

    Hi, how can I run a Lobster file?

  •  Před rokem +1

    Doesn't seem to have algebraic datatypes and pattern matching?

  • @joshuathomasbird
    @joshuathomasbird Před rokem

    the cars location is actually a location on a space filling curve

  • @doigt6590
    @doigt6590 Před rokem +1

    C++ doesn't have structs the same way C# structs or Lobster structs work. In C++, structs are just classes where members are public by default.

    • @codetothemoon
      @codetothemoon  Před rokem +3

      What I meant is that Lobster has both structs and classes, not necessarily that they work the same way. I definitely could have worded that in a less ambiguous way!

  • @BohdanTrotsenko
    @BohdanTrotsenko Před rokem

    3:00 these are not "structs as in C#" - there one can mutate fields

  • @kruth6663
    @kruth6663 Před rokem

    I have a beginner question: when you talk about faster than python, does it mean faster to write, faster to compile, or faster to run? Or all of them?

    • @smallSphere69
      @smallSphere69 Před rokem +1

      Faster to compile and faster to run.
      The more low level you'll go the faster the language in those manners.
      Python < Java/pHp < C/C++/Rust < Assembly languages
      Assembly is the fastest (hardest also) among of all.

    • @kruth6663
      @kruth6663 Před rokem

      @@smallSphere69 I see, thank you for replying!

  • @AcidiFy574
    @AcidiFy574 Před rokem

    Can you give us their official website ?

  • @HyperCodec
    @HyperCodec Před rokem +2

    Looks interesting

  • @marketsmoto3180
    @marketsmoto3180 Před 9 měsíci +3

    EVERYBODY GET OUT, THERE'S A LOBSTER LOOSE

  • @marioschmidt1251
    @marioschmidt1251 Před rokem +1

    Does it have multi-inheritance or traits or interfaces or something?

    • @WoutervanOortmerssen
      @WoutervanOortmerssen Před rokem +1

      Nope, currently just single inheritance.. that has so far worked well for gamedev and its "functional" orientation. Its easy to do the equivalent of interfaces informally with static duck typing, i.e. "this will work on any type with a foo method" but there is no way to specify that formally currently.

    • @wafikiri_
      @wafikiri_ Před rokem

      Multi-inheritance really means you are not classifying anymore, single inheritance gives way to a tree structure of mutually-excluding classes whereas multi-inheritance's structure is latticial and results in not necessarily mutually excluding kinds while still ontologically permitting generalization and particularization. The hype for exclusive classes has always been a hindrance to me. I prefer kinds to classes. However, not much programming will be affected by lacking multi-inheritance, whose implementation I suspect may complicate matters a lot (compiler, memory management, optimization...).

  • @oleksandr.kryvonos
    @oleksandr.kryvonos Před 4 měsíci

    hi, what editor do you use ?

  • @HenriqueNewsted
    @HenriqueNewsted Před rokem +1

    Which colorscheme is this in vim?

  • @Dev-Siri
    @Dev-Siri Před 10 měsíci +1

    we don't need anymore crustaceans. can we have a mollusc based language now?

    • @codetothemoon
      @codetothemoon  Před 10 měsíci

      hah yeah the crustacean programming language field is getting a bit saturated! 🦀

  • @MichaelSh
    @MichaelSh Před rokem +2

    Is this being transmitted from the alternative reality where C# does not exist?

  • @mistical1409
    @mistical1409 Před 5 měsíci +2

    i've been trying this language for about 3 weeks but havent found any way to operate with bigInts or insanely big numbers, the closest to that is using floats but still overflows eventually, if anyone had found a way to use bigInts with the integrated libs or functions that this language has, please let me know :D

    • @codetothemoon
      @codetothemoon  Před 5 měsíci +1

      maybe check with the folks on the Lobster discord server, I think Wouter is pretty active there!

    • @mistical1409
      @mistical1409 Před 5 měsíci

      ​@@codetothemoonwow, i didnt knew there was a discord server, please, may you tell me where to find the link? hope i dont bother you, and thanks!!

    • @codetothemoon
      @codetothemoon  Před 5 měsíci +1

      discord.gg/szJPYdX@@mistical1409

    • @mistical1409
      @mistical1409 Před 5 měsíci

      @@codetothemoonThank you very much!! you earned a new sub! :D

  • @Mik1604
    @Mik1604 Před rokem

    So the signature for instantiating an object depends on whether a default value was specified within the class? That is just all kinds of horrible.

  • @lance_c1323
    @lance_c1323 Před rokem +1

    Remember this comment when Shrimp programming language finally comes out 🦐🦐🦐

    • @anon_y_mousse
      @anon_y_mousse Před rokem

      Will it be the tiniest programming language?

  • @arcticyeti1
    @arcticyeti1 Před 4 měsíci

    Oh cool they're releasing python 4

  • @9SMTM6
    @9SMTM6 Před rokem +3

    Huh. At first I thought this was a late April 1st video.
    Gonna add a few comments as the video goes on:
    * Yeah I like Python syntax
    * not a big fan of the lacking mutability controls. Making that the difference between class and struct... I don't know another language that does that, I'd prefer a more general system.
    * default values are nice. Not sure if I like the fact that you HAVE to specify it during instanciation, but I could see it grow on me
    * ouch Inheritance. Having learned both Rust + Java thoroughly ruined Inheritance for me. Java shows the bad sides of inheritance, and Rust shows that you can do without, without it causing major issues, with stuff like generic trait implementation covering most of what I need. The situations where Rust is lacking a bit are caused by coherence constraints - like the orphan rule - which one could relax in an "easier" language like this one.
    * unqualified access to argument fields/methods: Yeah not sure on that either... Javas implicit shadowing with the implied this has already caused many headaches for me. I mean, at least it's opt-in, but making that decision on the whole method body... Not a fan. I get that this can be very helpful, I too am at times annoyed at constantly having to write self in Rust. But I'd like the ability to constrain this more. Like how you can do "use Enum::*" in Rust and constrain to a block {}.
    * ah, that is C++ style of static checking for "generics". C++ does this mostly in a way that is problematic, would have to see how well this language does. Rusts requirement to explicitly declare used interfaces can be annoying, but it leads to REALLY nice compiler errors, and also, with C++ I've often created long methods just to find out that the type I wanted to call it with does not fulfill all the implicit requirements. That form of delayed compiler error happens only with lifetimes in Rust.
    * GODDAMMIT LANGUAGES STOP CALLING LISTS VECTORS.
    * don't particularly like elif. Much harder to parse for a human than a switch (or Rust match, Kotlin when). Also, is that an expression? Don't really want to miss controlflow expressions anymore.
    * uhh. No implicit namespacing with files... Not a fan.
    * oh wow, when continuing... They really fucked up namespaces.
    * Memory Management: So how is this different from Swift? Sounds to me very similar to what that language does. And many others, just that these others use GC as fallback. Swift also only has Reference counting fallback, I'm fairly certain. So this sounds like Swifts system with Rusts terminology

    • @WoutervanOortmerssen
      @WoutervanOortmerssen Před rokem +2

      * structs are copied always, so making field mutable could be confusing with users not understanding why their changes don't perculate.. I already had the plan to allow optional mutation of struct fields, which could go along with optional non-mutation of class fields, but the use cases for that are rare (in gamedev)
      * not a fan of inheritance either, but at least in games it makes it really easy to specify what you need.. the lack of it in Rust is not popular with everyone, or so I have heard.
      * Unqualified access: this simply mimics what happens in most languages in "methods", just in Lobster they can be written separate from the class they apply to. Personally would not enjoy writing `self.` all over the place, but to each their own :)
      * Yes it is monomorphisation like in C++, but in a language that is WAY simpler, and thus the compile time errors that result never get to C++ wtf level. And it is super easy to add some explicit types along the chain if you want to reduce it even further.
      * Sorry, hold-over from having worked with `std::vector` for an eternity. I agree it would be good to change since it is confusing with 2d/3d vector types.
      * There is a switch too, and a rather nice one at that (allows ranges etc).
      * Not sure what you mean with "namespacing with files".. ah I guess the fact the namespace automatically ends at file end instead of needing to indent the whole file?
      * namespaces were such because _ was already used everywhere in an ad-hoc way to indicate namespaces.. agree its a weak spot and will think of alternatives.
      * Swift afaik does not have anywhere near the whole-program analysis to completely elide refc ops like this does.

    • @TijmenZwaan
      @TijmenZwaan Před rokem +1

      @@WoutervanOortmerssen I assume by "implicit namespacing with files" he means that if you don't specify the namespace, the contents of a file are automatically assigned to the namespace that's the same as the name of the file.

    • @WoutervanOortmerssen
      @WoutervanOortmerssen Před rokem

      @@TijmenZwaan except that doesn't happen in Lobster.. if you don't specify a namespace it is simply in the global namespace, like most languages, independently of filename or path

    • @TijmenZwaan
      @TijmenZwaan Před rokem +1

      @@WoutervanOortmerssen I didn't mean it happened in lobster. The OP said "No implicit namespacing with files", as in, it does not have that feature.
      I was simply making a guess as to what I thought he meant.

    • @9SMTM6
      @9SMTM6 Před rokem

      @@TijmenZwaan yes, that is what I meant. With some languages, eg. Rust, but also Python, you map files to namespaces by default. If you want to, you can avoid this namespacing with wildcard or element imports.
      IMO that is strictly better than all alternatives (as long as wildcard imports and reexports exist). So no reason not to do it.

  • @kiyasuihito
    @kiyasuihito Před 10 měsíci +1

    I'm already sold 🎉

  • @Peanut-qw8ny
    @Peanut-qw8ny Před rokem +1

    I haven’t watched the video so I have no idea what it is. But there can’t be two crustaceans in the sea.

    • @codetothemoon
      @codetothemoon  Před rokem

      apparently there is Shrimp too! www.chandoo.de/shrimp/#start seems to be a crowded space lol

  • @ConnorMcCormick
    @ConnorMcCormick Před rokem +1

    I really like how for and while loops aren't language level. Means you could make your own
    LOVE the argument hoisting
    The underscore thing is klugey for sure
    what do multiline anonymous functions look like? Do they require `return` or is it just the last line

    • @notkamui9749
      @notkamui9749 Před rokem +2

      seems like the last line of lambda functions are the returned value. See the map example. A mapper should return a value, but no return was written, so I would assume my theory is correct
      as a matter of fact, he never showed us how to return from a normal function either, and I think it might be the same thing, for consistency. Like Rust, I would also assume you still can add the return keyword, for early returns for example

    • @WoutervanOortmerssen
      @WoutervanOortmerssen Před rokem +2

      @@notkamui9749 that is actually different, you use `return` for a named function, and last exp for a lambda. But why, do you ask, well, because `return` inside a lambda allows you to return from the enclosing named function! This truly allows lambdas to function like the body of a control structure. In other languages, you can write your own "for" loop using a lambda, but you'd have no way to break/return from that iteration

    • @michaelsydenham2918
      @michaelsydenham2918 Před 11 měsíci +1

      re: 'underscore thing is klugey', the author appears to be considering using something else instead of _ for namespaces, as per his todo list on github.

  • @jikrochmal1174
    @jikrochmal1174 Před rokem +1

    Very cool language! The title is misleading though as C already exists.

  • @myronkipa2530
    @myronkipa2530 Před rokem

    What's the font?

  • @muhdiversity7409
    @muhdiversity7409 Před rokem +7

    I'm working on a language called "Deer Tick" that is more expressive than Lobster, C++, Python and Rust combined. It can do 10x what the best code written in those other languages can do in 1 (one!) statement. It is turbocharged by its runtime environment called "Lyme-De". I'll share a link to the repo after I have dinner.

    • @codetothemoon
      @codetothemoon  Před rokem +4

      nice, no offense but it sounds disease ridden! and reminds me of a somewhat traumatic incident where I slept an entire night with a dog tick attached to the back of my head 😳

    • @muhdiversity7409
      @muhdiversity7409 Před rokem +4

      @@codetothemoon Ah, you just need a dose of antibiotics after each 10x programming session. Re the Dog tick. ewww.

    • @skaruts
      @skaruts Před 10 měsíci +2

      Are you still having dinner?

    • @muhdiversity7409
      @muhdiversity7409 Před 10 měsíci +2

      ​@@skaruts Yep, still on the appetizer.

  • @ongteckwu1725
    @ongteckwu1725 Před rokem

    The video is only focused on syntax, so I will focus my critique on syntax. There are a few things I like and dislike about the syntax, with one I absolutely despise.
    The few things I like are the explicit auto-binding of class to functions with :: . I kinda like it. But I dont think Id allow it in a multi-contributor repo though.
    I also like the alphabet-style lambdas. Very cool.
    I dont really favour the implicit class auto-binding (without the ::). It’s cool though, but it allows method calls to be strewn all over the codebase. Not good for ergonomics.
    Now to the dislikes.
    I dislike the currying (actually currying in general). Makes it difficult for reading. Maybe I will get used to it. I hope.
    The one I really despise is the implicit imports, because it will be very hard to figure out where the function came from, unless you have a tool to do so. I do like dependency injections, but not this level of implicity.
    Overall, the things I dislike are the implicits, but in general it is still usable, since most of the things I dislike can be disabled at lint-time.

  • @rvdende
    @rvdende Před rokem +1

    April 1st right

  • @gamcd
    @gamcd Před rokem

    Aren’t structs also passed by reference but act as if it was by value because they are immutable?

    • @WoutervanOortmerssen
      @WoutervanOortmerssen Před rokem

      they are actually passed as a copy at an implementation level, which is actually faster for the common use case of 2d/3d vector types.. they could be made mutable, just haven't gotten to that

    • @gamcd
      @gamcd Před rokem

      Good to know thank you!

  • @rokoblox
    @rokoblox Před rokem +2

    A language with python-like syntax will never be a dream language for me😐😐😐😐

    • @codetothemoon
      @codetothemoon  Před rokem +2

      understandable, the whole idea of using indentation to define scopes seems to be very polarizing

  • @mikopiko
    @mikopiko Před rokem +6

    Interesting

  • @realderek
    @realderek Před rokem +1

    "Undefined method? What do you mean, it's right there! Oh... *highlight and presses tab*" I'll always dislike indention-based languages 😬

  • @jantoko
    @jantoko Před rokem

    This mean, Rust will take system seriously. it might there is an interpreter on top of rust.