I Built A VS Code Extension For Python

preview_player
Показать описание


Camera gear

Рекомендации по теме
Комментарии
Автор

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).

WallabyTeam
Автор

Reading docs on a Kindle is actually crazy!

CodingWithLewis
Автор

bro finally remembered he got a youtube channel

mdmb
Автор

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.

tanmaypatel
Автор

Glad to see tou back with computer science stuffs

bestineouya
Автор

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

falcon
Автор

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

bzwiv
Автор

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

MyTovarish
Автор

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 😉

Gigusx
Автор

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

globalPsychologyFacts
Автор

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

jeffreydijkstra
Автор

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

alanwayne
Автор

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

iuseneovim
Автор

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) <- dummy call

I hope this helps :o)

Keep up the good work.
//m

marcusfromsweden
Автор

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

aryan_
Автор

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

MaticJ
Автор

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

CodeWithBehram
Автор

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..

erik_lonnroth
Автор

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

FaroukHamisu
Автор

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

michael_oconnor