I Built A VS Code Extension For Python

Поділитися
Вставка
  • Опубліковано 15 січ 2025

КОМЕНТАРІ • 91

  • @WallabyTeam
    @WallabyTeam 2 місяці тому +20

    Hey Kalle, Artem from Quokka team here. Nice work on lowpy and thanks for mentioning our tool! Just wanted to point out that in your Outro part side by side comparison you are not actually running Quokka at all. Quokka prints out results differently (and instantly), what you are seeing there looks like results (guesses) from Copilot (or some other AI completion extension that you may have installed in VS Code).

  • @CodingWithLewis
    @CodingWithLewis 2 місяці тому +98

    Reading docs on a Kindle is actually crazy!

    • @Hallden_
      @Hallden_  2 місяці тому +12

      Haha I agree

    • @Griphcode
      @Griphcode 2 місяці тому

      WHAT Lewis didn't know you would be here

  • @mdm9b
    @mdm9b 2 місяці тому +63

    bro finally remembered he got a youtube channel

    • @cru2006
      @cru2006 2 місяці тому

      fr lol i was wondering when he'd return

  • @tanmaypatel4152
    @tanmaypatel4152 2 місяці тому +3

    Hey Kalle, just here to say a big thanks. Few years back you were one of the reasons I started to learn how to code. Your python automation projects were just so fascinating to me. Glad to see you back on! All the best.

  • @vsuperbhat
    @vsuperbhat 2 місяці тому +28

    Glad to see you back 😊

  • @bestineouya5716
    @bestineouya5716 2 місяці тому +15

    Glad to see tou back with computer science stuffs

  • @bzwiv
    @bzwiv 2 місяці тому +8

    Yo! was looking forward to seeing the vid after seeing something on your Instagram. Hope you had a good summer :)

    • @Hallden_
      @Hallden_  2 місяці тому +1

      Happy to hear that! Yes O did, hope you did too :)

  • @falcon4991
    @falcon4991 2 місяці тому +4

    10:45 what if instead of running function with arguments you run the function when its called with the argument and print the output beside the function call, sounds about right

  • @MyTovarish
    @MyTovarish Місяць тому +1

    Hello Kalle, perhaps in the future you can make a video about Python for Quantum computing

  • @globalPsychologyFacts
    @globalPsychologyFacts 2 місяці тому

    It's good to see you back after a long time Kalle!

  • @Gigusx
    @Gigusx 2 місяці тому +9

    Very cool projects! Few points from me, just based on the video since I haven't used it:
    - it would probably feel a lot nicer if it wasn't running in real-time but on a very short delay after you stopped typing, something along the lines of 0.1-0.2s.
    - one thing I dislike about Quokka is how you sometimes can't tell if it's working, it actually shows it perfectly in your side-by-side comparison where it won't show anything until it's got the final result. If it ever takes too long to evaluate it's probably worth showing some kind of status text/effect to let you know it's actually doing something but you have to wait.
    - for the problem with evaluating functions, I'd probably start somewhere around reading the type annotations if they exist - the extension could maybe rely on them to give a better result or default to something else if there are no types.
    - all of the above could be a toggleable setting, too 😉

    • @Hallden_
      @Hallden_  2 місяці тому +2

      Nice man! These are some really good points👌🏼
      I didn’t show it in the video but I did implement a delay, ideally somehow it should run only when the user has finished typing I think. But not sure how

    • @WallabyTeam
      @WallabyTeam 2 місяці тому +1

      Hey, Artem from Quokka team here. Just wanted to point out that in the Outro part side by side comparison Quokka is not running at all. Quokka prints out results differently (and typically instantly), what you are seeing there looks like results (guesses) from Copilot (or some other AI completion extension installed in VS Code). We are working on Quokka v2 at the moment (going to be released very soon), and will try to address the intermediate progress issue better for long running code.

  • @jeffreydijkstra3391
    @jeffreydijkstra3391 2 місяці тому

    Kalle is back! great to see a new video pop up

  • @alanwayne366
    @alanwayne366 2 місяці тому

    The most comfortable person on the yt. Thank you for the new video :)

  • @bartekpaczesny508
    @bartekpaczesny508 2 місяці тому +2

    write this for neovim next plsss

  • @MaticJ29
    @MaticJ29 2 місяці тому

    I can see you are once again fully in coding! So great.

  • @aryan7069_
    @aryan7069_ 2 місяці тому

    you can add optional type def in function header
    def f(a : int, b : int ) and then make your extension work

  • @marcusfromsweden
    @marcusfromsweden 2 місяці тому

    Hej Kalle.
    Regarding your struggles with how to handle a function (9:45), you need to add some (initial) dummy function call to the "top" of the call-stack). In your case calculate(1, 2)" or calculate(1.2, 3.4)". This so your program can understand the context of your Executing code (the variables values and types) and thereby give you what you're looking for.
    Ex:
    function calculate (a, b) {
    return a + b; # 3.6
    }
    calculate(1.2, 3.4)

    • @marcusfromsweden
      @marcusfromsweden 2 місяці тому

      Ps. I haven't gone through all comments ... :o) so this might have been brought up before. Ds

  • @iuseneovim
    @iuseneovim 2 місяці тому

    my solution is
    I'm assuming that this extension would process code when the cursor is at print statement
    create a data structure which holds all the variables above the cursor line, and all the function calls that has been made,
    the idea is either you are making a function call directly from print or you're printing a variable
    create a tree like view of dependencies (like a function can make calls to other functions so it's depends upon those functions and it's parameters are it's dependency on variables, then mark those nodes and write them into a temp file by traversing through nodes in postorder fashion (not sure about traversal), and run it
    if during function call, operations like file i/o, socket i/o has been made then you can rip the associated variables and function calls from the processed tree, and if during this, the final tree divided into more than 1 tree then that means running the code is not safe unless you know how to handle these operations,
    this is just a rough idea so don't know if it would work

  • @FaroukHamisu
    @FaroukHamisu 2 місяці тому +1

    Bro is cooking. Actually yesterday I checked your UA-cam channel and I saw your last video was 4 month ago I was kinda worried that you quit UA-cam. But all good bro 👌

  • @marvellousruni8475
    @marvellousruni8475 2 місяці тому

    Glad to have you back

  • @slikreos
    @slikreos 2 місяці тому

    Hi Halldén I hope your having an amazing day

  • @CodeWithBehram7497
    @CodeWithBehram7497 2 місяці тому

    Was waiting for a new video, i am your old subscriber and i enjoy your every video. More power to you🎉

  • @Tribunalxx
    @Tribunalxx 2 місяці тому +1

    Hey, happy to see you. What theme do you use in VS Code?

    • @Hallden_
      @Hallden_  2 місяці тому +1

      The standard one I believe, haven’t changed anything

  • @andreichicu2799
    @andreichicu2799 2 місяці тому

    i don't know how debuggers work, but they can show the state of a code at a certain point, maybe explore that? like run the code in a debuggable mode and look at the code state

  • @devkasunlakshitha
    @devkasunlakshitha 2 місяці тому

    please make more videos. Miss your content!

  • @froehmaj
    @froehmaj 2 місяці тому

    Nice video, but what is the usecase for this? What problem are you solving?

  • @vishwanath-ts
    @vishwanath-ts 2 місяці тому

    Bro remembered the password for his youtube channel

  • @flippyhappy2891
    @flippyhappy2891 2 місяці тому +3

    the king is back

  • @erik_lonnroth
    @erik_lonnroth 2 місяці тому

    The "what type is the variable?" question seems pretty hard to solve, but it might be deducible from context in various settings, and you could make it easier for the program by always including type hints (x: int) and return type annotations ( -> int) in your functions.
    Neat idea, though I suspect the more fundamental issue is that good code is abstracted and therefore includes few constants and hard-coded strings. As a result you're just dealing with variables defined in terms of other variables running all the way back to a value in your database or one provided by the user. So unless you assigned some random values to "a" and "b", the best you could do would be to say a + b = int... not v helpful..

  • @theis4749
    @theis4749 2 місяці тому +1

    Surely for the functions you just print when the function is called, otherwise you'd have to infer types and guess args which doesn't feel correct. Would def leave this out

    • @Hallden_
      @Hallden_  2 місяці тому

      Yeah I think the best option is to leave it out

    • @supersnail5000
      @supersnail5000 2 місяці тому

      Another approach would be to work out what variables the output depends on, then use the quick input boxes in the VSC API or annotations in the code to let the user specify test inputs - either for an individual evaluation, or at the function level.
      I don't even think this is a problem with statically or dynamically typed languages, functions can have many call sites, so knowing what types the parameters are doesn't help if you don't even know what arguments are being passed in.
      I honestly think this is a good place to leave the project though, it does broadly what you set out to do and you got your feet wet with the VSC API. I don't think you'll get as much value out of putting in extra effort at this point as you would to working on something different.

  • @SleepeJobs
    @SleepeJobs 2 місяці тому +1

    Theres also another one, AREPL

  • @diallofrancis-patrick5794
    @diallofrancis-patrick5794 2 місяці тому

    Great video! How do you test this kind of extension during development? Do you have to publish it or do something else? Thank you for your answer!

  • @michael_oconnor
    @michael_oconnor 2 місяці тому

    Hotkey to cycle through different input datatypes for “determining” what datatypes to use?

  • @its_code
    @its_code 2 місяці тому

    Welcome back ❤❤❤❤❤

  • @kareladam6732
    @kareladam6732 2 місяці тому

    You forget to clean the lens front element?

    • @Hallden_
      @Hallden_  2 місяці тому

      I actually sprayed it on purpose with hairspray to get a misty look, what did you think?

    • @kareladam6732
      @kareladam6732 2 місяці тому

      @@Hallden_ :-) I know it was a purpose, but i didnt like it. But its just my opinion. Anyways I enjoy your content ;-)

  • @raghav9000
    @raghav9000 2 місяці тому

    Interesting, really cool

  • @s.m.salehahammedsium9203
    @s.m.salehahammedsium9203 2 місяці тому

    finally, new video man

  • @isfandyar3937
    @isfandyar3937 2 місяці тому

    Reading which type of data type is feed into function is an assembly problem you have to check register at assembly level
    I don't know how to check register for specific data type

  • @AhmedGamal-ky1yy
    @AhmedGamal-ky1yy 2 місяці тому +3

    Missed u bro

  • @altridotdev
    @altridotdev 2 місяці тому

    which mac are you using currently for development?

  • @anassnasserallah9883
    @anassnasserallah9883 2 місяці тому

    Welcome back bro

  • @pandatovah
    @pandatovah 2 місяці тому

    You said your project is published as open source, but the license file is missing. You might want to fix that.

  • @eRiiiiiCc
    @eRiiiiiCc 2 місяці тому

    nice kindle ad now where they released new versions 😂

  • @AlaaSaidAhmad
    @AlaaSaidAhmad 2 місяці тому

    Nice tutorial ❤ help and good. Can you tell me what font do you use for your terminal

    • @Hallden_
      @Hallden_  2 місяці тому

      Thanks! Just the basic theme for apple, I haven’t set the theme :)

    • @tanmaypatel4152
      @tanmaypatel4152 2 місяці тому

      The font is called 'Menlo'. Its the default monospace font on apple devices.

  • @nicktids
    @nicktids 2 місяці тому

    Think of it the other way your trying to show the debug console live as you code

  • @Jaydenszekely
    @Jaydenszekely 2 місяці тому

    This is sick! How would this work with data coming from an API?
    Edit: Updated idea in comments

    • @Jaydenszekely
      @Jaydenszekely 2 місяці тому

      For your A+B example
      What if there was a Class with typings called lowpy for each py file and had all the definitions of dummy data? Then when running, you see if there is a value in there to use?
      Or somehow able to read test data from a .json file or something
      I don’t know if it’s the right solution / but man this would save me sooo much time!

    • @Hallden_
      @Hallden_  2 місяці тому +1

      That’s probably a good idea!

    • @Jaydenszekely
      @Jaydenszekely 2 місяці тому

      @@Hallden_ I’ve been working on a very large computational fintech software for a client - and rerunning each time to test SUCKS. So if you add this in I’m soooo keen to use your tool!

  • @isaacquansah7023
    @isaacquansah7023 2 місяці тому

    Missed you bro

  • @sketchychillandchill
    @sketchychillandchill 2 місяці тому

    For function just make the user put input values in a comment

  • @RizzlerGod7452
    @RizzlerGod7452 2 місяці тому

    YOOOOOO, missed you bro!!!

  • @faizanahmed9304
    @faizanahmed9304 2 місяці тому

    Please make more tuts and videos

  • @danielherrman9228
    @danielherrman9228 2 місяці тому +1

    I have watch your last video just yesterday 😊 What a nice timing, also glad to see you again!
    PS: Your videos and your personality is very inspirational to me 😊 keep up the good work 💪

    • @Hallden_
      @Hallden_  2 місяці тому +1

      Nice! Thanks for watching!

  • @aryan7069_
    @aryan7069_ 2 місяці тому

    well it was weeks ago i installed it
    but dont know how to use it lol

  • @ErrolSamuel-lr3fe
    @ErrolSamuel-lr3fe 2 місяці тому

    Welcome back

  • @thenormvg
    @thenormvg 2 місяці тому

    this my guy is a pirate

  • @arshhashmi3992
    @arshhashmi3992 2 місяці тому

    🔥cool

  • @Christian.Greven
    @Christian.Greven 2 місяці тому

    Nice!

    • @Hallden_
      @Hallden_  2 місяці тому

      Tackar tackar!

  • @taiwofakayejo9684
    @taiwofakayejo9684 2 місяці тому

    Im a huge fan broo

  • @timsagichnicht
    @timsagichnicht 2 місяці тому

    Thats quite cool. If I understand it correctly it is little bit like a live running debugger. Quite useful to see the different results of different functions to understand what is going on

    • @Hallden_
      @Hallden_  2 місяці тому

      Thank you! And Yeah that’s the idea :)

  • @theyash14
    @theyash14 2 місяці тому

    I just wrapped up the development for an extension, will share the details soon once I launch it.

  • @marcoio8742
    @marcoio8742 2 місяці тому

    Ahhaha amazing you basically proved that documentation is useless. Brilliant

  • @arshhashmi3992
    @arshhashmi3992 2 місяці тому

    Bro try a new hairstyle

  • @kunalr_ai
    @kunalr_ai 2 місяці тому

    you are very handsome .... will you marry

  • @NathanielBabalola
    @NathanielBabalola 2 місяці тому

    man your apartment is so dark and moody....how do you cope

  • @sm_hasib
    @sm_hasib 2 місяці тому

    Glad to see you back 😊