C++ in Python the Easy Way!

Поделиться
HTML-код
  • Опубликовано: 2 авг 2024
  • You voted, so here it is. I tried to condense everything you might need to know to get going with writing Python interfaces to C++ code. The breakdown is
    0:00 Intro
    0:39 Absolute minimum example
    2:28 Exploration of generated module
    3:25 Classes
    4:49 STL containers, Python types
    6:20 Numpy support
    7:24 Properties
    8:00 The GIL
    #python #cplusplus
    All the code for this can be found here: gist.github.com/safijari/f7ae...
    The official CMake example: github.com/pybind/cmake_example
    Definitely check out my sponsor at www.hbtapp.com
    Join the subreddit at reddit.com/r/JackOfSome

Комментарии • 180

  • @StanSays
    @StanSays 3 года назад +86

    1:56 Me noticing the missing semicolon before he compiles while understanding very little about everything else:
    "Sometimes my genius is almost frightening"

    • @JackofSome
      @JackofSome  3 года назад +6

      I'm genuinely impressed since the video is in turbo mode 😅

  • @idirhouari3878
    @idirhouari3878 5 месяцев назад +4

    I usually watch videos in x2 speed, however here I had to put it in 0.5x speed 🤣 I'm discovering both C++ and pybind11 so although it is hard to follow everything yet your explanation is pretty cool as it sums up most of the functionalities available in a short time, I now understand better where I need to start ! thank you

  • @esalexander5807
    @esalexander5807 3 года назад +14

    Found your channel a few days ago, and absolutely loving your intuitive example-based explanations. It's also great that when you start covering a topic you stick to the essentials - it's short, to the point, and incredibly helpful when getting started!

  • @ThankYouESM
    @ThankYouESM 3 года назад +9

    Subscribed! I love that you zoom in as necessary, which makes it perfect to watch on my smartphone... that you provide the source code much as possible... that you speak very clearly... that you actually communicate great with your many fans... and let us know what other alternatives there are for those of us not familiar with other modules.

  • @ayuminor
    @ayuminor Год назад

    Stumbling on this video while researching this topic, I was initially disappointed to see, that it was only 10 minutes long but holy crap this is jam packed with info. Thanks a bunch!

  • @vintagewander
    @vintagewander 3 года назад +2

    man your way of teaching is amazing but interesting and entertaining as well, instant sub

  • @ScriptureFirst
    @ScriptureFirst 3 года назад +11

    This was really gangsta: thanks for the concise cuts. Never had to hear you take a breath: very well cut 👏🏻🙏🏼

    • @Key_Capz_
      @Key_Capz_ 10 месяцев назад

      real gangsta right here g

  • @maisun_vlogs
    @maisun_vlogs 2 года назад +1

    I usually steer clear of youtube videos for technical things. But dang!! this has been super useful.

  • @greg6094
    @greg6094 3 года назад +4

    wow, this is amazing, love your work!

  • @Dima-qq9og
    @Dima-qq9og 3 года назад +3

    Great video, learned a lot!

  • @dank8981
    @dank8981 10 месяцев назад

    Straight to the point and super clear!

  • @noctesomnium
    @noctesomnium 7 месяцев назад

    is there any way to make intellisense to analyse the python module imported?

  • @lion123-nh6jb
    @lion123-nh6jb 3 месяца назад

    how can I use pybind11 as python-package? If I install it via conda/pip, what is then the path in find_package command in CMake?

  • @user-lm7gq9nl8l
    @user-lm7gq9nl8l 2 года назад +3

    thanks a lot, but I met an error: ImportError: DLL load failed while importing module_name. I don't know how to fix it.

  • @deeplazydev
    @deeplazydev 5 месяцев назад +1

    Amazing video!

  • @SimonMeansSimulation
    @SimonMeansSimulation 2 года назад +1

    Great video. How do you pass by reference from C++ to an embedded python interpreter?

  • @sunday-thequant8477
    @sunday-thequant8477 2 года назад

    this is the usefull video i found, thanks!

  • @w24lp05
    @w24lp05 Год назад

    Thx, all I needed!

  • @Alan-wl9xi
    @Alan-wl9xi 2 года назад

    Keep making more of this, how to pass c++/py types to each other without copying.

  • @krishnateja271997
    @krishnateja271997 2 года назад

    I got a question. How do I make regular multidimensional array (ex. static int array[100][100][10] ) to return as a numpy array? What if I just have a pointer to this array (which I created using typedef)? I like to avoid any copying, if possible. Hope I get a reply soon. Thanks in advance!

  • @fps079
    @fps079 3 года назад +1

    I have to write a python program to run this video at half speed. Either that or pause it ever 5 seconds. Lots of information packed into a few minutes.

  • @jacanchaplais8083
    @jacanchaplais8083 2 года назад +14

    Very useful, although the pace was quite hard to keep up with, for me.

  • @NN-yw2sx
    @NN-yw2sx 2 года назад

    Thank you, but unfortunately I get No module named build.module_name error

  • @Bbdu75yg
    @Bbdu75yg 7 месяцев назад

    Amazing ❤

  • @nabilnajem1793
    @nabilnajem1793 3 года назад

    does someone knows how to switch from compiling from python to compiling with cpp please ?

  • @riellaw.3424
    @riellaw.3424 3 года назад +1

    Hi, thank you for the nice and recent tutorials! I was having trouble running an existing git that binds c++ module. When I try same thing as 2:33, it gives me ImportError: dynamic module does not define module export function (PyInit_shot

    • @macewindont9922
      @macewindont9922 2 года назад

      I had this issue. The name of the module in main.cpp MUST be the same as the target name in CMakeLists.txt. When you have "PYBIND11_MODULE(name1, m)" in main.cpp and "pybind11_add_module(name2 main.cpp)" in CMakeLists.txt, name1 must be the same as name2. name2 will be the name of the so file generated, which python will look for the module name. So you can do "import name2" and python will identify name2 as the name of a python module. But name1 will be the module that is actually defined inside the so file. But if you try "import name1", python won't be able to find the name1 module.

  • @alecmather
    @alecmather Год назад

    Literally subscribed to your channel within like 6 seconds of watching your first video 😂❤

  • @pedrovic12
    @pedrovic12 Год назад

    Whats your font family of IDE?

  • @vegardjerven
    @vegardjerven 2 года назад +3

    I just want to comment that i loved this video! It's the first time a video has helped me more than any written tutorials/docs I could find, I struggled for a day before I came across this!
    As a side note - I would love if you had posted the whole file-structure and a note on the dependencies, I struggled a bit before figuring out that pybind11.h needs to include Python.h and related files. I feel like that is a point practically all tutorials on pybind11 are missing, hence why I haven't gotten any of them to work for me :P

    • @mariam.magued24
      @mariam.magued24 Год назад

      hii, were you able to solve this? i'm facing the same problems but don't know how to deal with them :((

    • @vegardjerven
      @vegardjerven Год назад

      @@mariam.magued24 I got it working shortly after posting this, and first of all I want to say: Pybind11 is a GODSEND. Once you figure it out it just works amazingly. It is definitely worth the couple of days you might have to spend before you get everything to work smoothly.
      To address the issue: You have to figure out how to download/install the python developer files for your system. For Linux it's something like "apt-get install python-dev". For macOS (darwin) it's something like "brew install python-dev". Then you have to make sure that pybind11 finds the correct python-files on your PATH. Uninstalling old versions of python that you have lying around may help.

    • @alexkonopatski429
      @alexkonopatski429 Год назад

      @vegardjerven I am currently struggling too, but not only a little bit but a lot. How did you solve your problems and how did you find that out, that Python.h has to be included in pybind11.h? My main problem is actually that I get this error: Python libraries not found. Can you maybe help me with that and tell me what you did to get everything going? I know you probably have better things to do than help a random kid on the internet, but I would really appreciate any help. Maybe you can recommend a good tutorial on YT or google which helped you solve your problems. Thanks in Advance!

    • @vegardjerven
      @vegardjerven 11 месяцев назад

      @@alexkonopatski429 Hey! I'm happy to help as much as I can :) the first issue is that I haven't found any tutorial on that part of getting pybind to work, it seems like the kind of thing everybody just "expects you to know"... The second thing I want to say is: Don't give up! Pybind11 is worth every second you put into getting it working the first time. After that it's smooth sailing.
      With that said: You first have to download and install "python with developer files". The easiest thing to do, might be to uninstall any and all python installations on your system (be careful if you have linux). Then google "install python with headers" or "install python developer" or something like that, and install python with the headers (Sorry, I can't help you more without knowing what system you're on etc.). Once you have those, you can point pybind11 to your python executable with "set(PYTHON_EXECUTABLE )" in your CMakeLists.txt file.
      You can also try adding the python include directory to your projects include path using target_include_directories (cmake.org/cmake/help/latest/command/target_include_directories.html#command:target_include_directories) after the call to pybind11_add_module.
      If you get that right, pybind11 should be able to find the headers it needs.
      Best of luck!

  • @ErdosainNueve
    @ErdosainNueve 3 года назад +2

    Excellent!

  • @yashindane2844
    @yashindane2844 2 года назад +1

    very helpful

  • @DragonKidPlaysMC
    @DragonKidPlaysMC 3 года назад

    What is the name of your colorscheme?

  • @CoolDude911
    @CoolDude911 Год назад

    I have a silly question. If cmake uses the clang compiler instead, would this be a problem?
    I have seen some people doing this online. However, if Python is building modules it would use the gcc or msvc compiler by default, i.e. the compiler used to make the python distribution.

  • @sirskyy9920
    @sirskyy9920 2 года назад

    Hello! I am wondering, what theme were you using in this video? Thanks :D

  • @phonglai86
    @phonglai86 8 месяцев назад

    I don't know how to write a Makefile for this :((

  • @pcs155251
    @pcs155251 Год назад

    Hi, nice contents, really enjoy watching. What is the font in this video?

  • @Morberticus
    @Morberticus Год назад

    Useful tutorial, though I when I follow the absolute minimal example, I get the error "ImportError: dynamic module does not define module export function (PyInit_pybind_test)"

  • @thomasseillers3905
    @thomasseillers3905 3 года назад +1

    what previous knowledge do i need to know to follow this? Any tips? I need to learn about pybind11 but i coulndt really follow your video :/

    • @JackofSome
      @JackofSome  3 года назад +1

      Fundamentals of C++, python, cmake, git, and basic Linux.

  • @VenuVGR007
    @VenuVGR007 Год назад

    What is the name of the C++ file you create where you write all the commands "#include

    • @VenuVGR007
      @VenuVGR007 Год назад

      nvm got it to work. Thanks!

  • @pixelsbyme
    @pixelsbyme 3 года назад +1

    Hello man! U have great videos. Love it.
    Can u please tell me how did you changed the tab fonts in your browser ( u maybe using chrome, i think 😅 )

    • @JackofSome
      @JackofSome  3 года назад

      I'm using the Brave browser, no customizations

  • @aniruddhamandal1544
    @aniruddhamandal1544 3 года назад +3

    Would you please let us know what is this text editor and how you configured it.
    It looks excellent.

    • @JackofSome
      @JackofSome  3 года назад

      Emacs. The configuration is forked from github.com/safijari/stupid-spacemacs but I keep this one private because of work related configs.

    • @aniruddhamandal1544
      @aniruddhamandal1544 3 года назад

      @@JackofSome this is cool. Thank you 🤓

  • @DoctorBollocks
    @DoctorBollocks 3 года назад +2

    Thanks for a very quick easy to consume starting point for pybind11. Have you any experience with cppyy? If so, how does it compare to pybind11?

    • @JackofSome
      @JackofSome  3 года назад

      I just found out about cppyy a few days ago. Haven't looked too much into it.

  • @macewindont9922
    @macewindont9922 2 года назад +1

    This is the video that I wish had existed when I started using pybind11.

    • @JackofSome
      @JackofSome  2 года назад

      That's basically what I wanted to make, the reference I wish I had.

  • @azratosh
    @azratosh 3 года назад +7

    Great video once again. I like your speed of presentation - I usually watch tutorial or showcase videos with 1.5x speed (sometimes even 2.0x, ugh) because I detest long, drawn out sentences and vacuous rhetoric. I actually had to check whether my playback speed was still up, hahaha. Nice job!

    • @JackofSome
      @JackofSome  3 года назад +5

      "not wasting the viewer's time" is my mission statement

    • @azratosh
      @azratosh 3 года назад

      @@JackofSome Well, you earned yourself a sub.

  • @user-kt9nl7sc2l
    @user-kt9nl7sc2l 3 года назад +2

    what is wrong? ImportError: No module named module_name. i want to know the answer. thank you.

  • @sagnikbhattacharya1202
    @sagnikbhattacharya1202 3 года назад

    What font is this?

  • @126sivgucsivanshgupta2
    @126sivgucsivanshgupta2 Год назад

    Hey, great video, it is a nice intro to pybind11, i have a 2 questions, a pybind11_module is a seperate c++ file right, say i am embedding along with extending python, how do I let the c++ module know of the resources in the main executable?
    Second question, vsc just bugs out while i am trying to call the functions in the module, do you have any idea how to fix the intellesence ?

    • @JackofSome
      @JackofSome  Год назад

      The C++ resources get garbage collected like any other Python object unless you make special changes to their lifetime management.
      No idea how to fix the intellisense, sorry :(

  • @CristiNeagu
    @CristiNeagu 3 года назад +1

    Unrelate question: I'm looking for a way to compile python scripts into executables. It's not py2exe and it's not pyinstaller. I came across the site a few weeks ago, but i cannot remember the name of it, and i can't find it in my history. A google search doesn't help. I think i may have heard about it on this channel, which is why i'm asking here.

    • @JackofSome
      @JackofSome  3 года назад

      Unlikely to be here. I've only ever deployed python programs as packages (source or wheel) and with scripts as entey points. Sorry

    • @dariusravn9982
      @dariusravn9982 3 года назад +1

      Auto-py-to-exe

    • @CristiNeagu
      @CristiNeagu 3 года назад +2

      @@dariusravn9982 Looks cool, but it wasn't it. Your hint did lead me to the correct one: Nuitka. Thanks! Now i don't know if that's any good, but i wanted to try it. And then i lost the site :D

  • @seawardspy-jl4hz
    @seawardspy-jl4hz Месяц назад

    Anyone else have trouble with PB11 not generating the Python module? Win11 Visual Studio 2022

  • @gregwoolley
    @gregwoolley Год назад

    Nice content, thank you! I suggest slowing would be helpful as the ends of your sentences and visuals were often cut off too quickly.

  • @motbus3
    @motbus3 3 года назад +5

    Hey nice video.
    Pybind is really simpler than other methods i used before.
    i shared with some friends thst might find it useful.
    if I may, I would give just a little small feedback on the video itself.
    i really like the fast paced style but would it be possible to let a second of code in the screen so it makes easier to pause and read? sometimes after the last char of the code is completed screens change and makes watching in mobile is little harder
    great video and nice explanation!!!!

    • @JackofSome
      @JackofSome  3 года назад +1

      Thanks for the suggestion. I was a little worried that it may be too fast. I'll be more cognizant of that in future videos.

    • @motbus3
      @motbus3 3 года назад +2

      @@JackofSome actually I love it's fast.
      many people are just to slow and kept in the bare basics to kick out like 10 videos of just too basic stuff
      just need a little second there just to click the pause button :)

    • @JackofSome
      @JackofSome  3 года назад +1

      The code is linked in the description too

    • @youhackforme
      @youhackforme 3 года назад +1

      @@JackofSome I really liked the speed in this video, it was perfect. I do agree with OP that simply leaving the code on screen for an extra second would be very helpful though.

  • @DariuszMakowski
    @DariuszMakowski 3 года назад +1

    Awesome example. It would be great if u could do a course for pybind11 from a to z ;- )

    • @JackofSome
      @JackofSome  3 года назад

      This video covers most of what you'd use in normal use case. I'll make another they looks at stone special cases.

  • @AtharvaShekatkar
    @AtharvaShekatkar 3 года назад

    Help when I run make it says: make: *** No targets specified and no makefile found. Stop.
    What do I do?

    • @JackofSome
      @JackofSome  3 года назад

      You have to generate the makefile first using cmake. Check if the cmake output has errors

    • @AtharvaShekatkar
      @AtharvaShekatkar 3 года назад

      @@JackofSome it did have errors, which I fixed. But then the make couldn't be completed because python was giving quite a few errors, the solution to which I haven't found yet. Although I'm on Windows and I'm having a lot of trouble with this. Nearly every major module for integrating C++ and Python is primarily for Linux and I unfortunately can't install Linux as of yet. Anyway, thank you for your time! I'll refer to your video again when I'm actually on Linux, which will hopefully be in a month or two!

    • @JackofSome
      @JackofSome  3 года назад

      You can also look into using WSL.

  • @miloz1950
    @miloz1950 3 года назад

    Man please, could you tell me the name of the font you're using in that editor.

    • @JackofSome
      @JackofSome  3 года назад +1

      Mononoki

    • @miloz1950
      @miloz1950 3 года назад

      @@JackofSome Thank you so much and great video, very helpful actually :D

  • @dnasredine
    @dnasredine 3 года назад +2

    I thought the video was sped up but no it is normal. Is that you work like numba in fast mode

    • @stokesarisnet
      @stokesarisnet 3 года назад +1

      Great content, but too much, too fast.

  • @danielrydstrom
    @danielrydstrom 3 года назад +3

    I really liked this video. You immediately answered the two questions I had after messing around for a couple of hours trying to wrap a quite complicated algorithm today.
    I have one suggestion for improvement. While you talked a bit fast for me to follow I could slow down the video. However, some of the code after you finish writing and some prints when running are difficult to see. I would like to have at least a few frames with the final result. For example I don't think the final line with gil_scoped_acquire was completely there...
    Liked it a lot though, I will check out more of your content!

    • @JackofSome
      @JackofSome  3 года назад

      Glad it was helpful. Yeah I overcorrected in this video. Definitely would have been better as a 15 minute video

    • @danielrydstrom
      @danielrydstrom 3 года назад

      @@JackofSome your tips worked perfectly! Now we have a nice Python wrapper for our most used image processing tool! Thanks!

  • @SuperSmitty9999
    @SuperSmitty9999 Год назад

    Hi just FYI the link to your code is broken

  • @eduarch--
    @eduarch-- 2 года назад

    I was delighted with your vim the entire video! Could you share yours config?

    • @JackofSome
      @JackofSome  2 года назад

      I ... I am so so sorry.
      That's not vim that's emacs 😅

    • @eduarch--
      @eduarch-- 2 года назад

      @@JackofSome No problem. It can be from emacs too! XD

    • @JackofSome
      @JackofSome  2 года назад +1

      It's not fully public, but a version of it is here
      github.com/safijari/stupid-spacemacs
      It's basically my own take on a spacemacs/doom emacs style kit.

  • @tructruc00
    @tructruc00 3 года назад

    What is your OS ?

  • @RivenbladeS
    @RivenbladeS 3 года назад

    It gives me ' File "../test.py", line 4, in
    from build.module_name import *
    ModuleNotFoundError: No module named 'build.module_name'

    • @RivenbladeS
      @RivenbladeS 3 года назад

      Ok i fixed it by deleting the module_name.cpython... that cmake was making, and replacing with mine after running '$ c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) ../main.cpp -o main$(python3-config --extension-suffix)' from pybind11.readthedocs.io/en/stable/basics.html

    • @user-kt9nl7sc2l
      @user-kt9nl7sc2l 3 года назад

      mee to. how fo you fix it?

    • @user-kt9nl7sc2l
      @user-kt9nl7sc2l 3 года назад

      d

    • @RivenbladeS
      @RivenbladeS 3 года назад

      @@user-kt9nl7sc2l run "g++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) ../main.cpp -o main$(python3-config --extension-suffix)

    • @RivenbladeS
      @RivenbladeS 3 года назад

      And replace that file that this command produces with what cmake produced(module_name.cpython...)

  • @brockobama257
    @brockobama257 2 года назад

    I don't know what cmake is. I researched a little and have two Qs:
    1) should I pip install cmake? Is there a better way?
    2) Is our cmake file .cmake? Is that a file I create?

    • @JackofSome
      @JackofSome  2 года назад

      Pip or use the package manager of your OS.
      Cmake files are traditionally named CMakeLists.txt

  • @Popart-xh2fd
    @Popart-xh2fd 7 дней назад

    On Linux it's a piece of cake, on Windows it's impossible!

  • @joestevenson5568
    @joestevenson5568 3 года назад +7

    Having to redefine what functions in a class to expose seems very unnecessary when the original c++ code will already have defined what is public and private.

    • @JackofSome
      @JackofSome  3 года назад +1

      I find myself treating what's public/private differently than what's kosher for a python interface, since more considerations go into that (e.g. object lifetime concerns), so I personally like that it's this way. I think I did see a macro once that automated some parts of it.

    • @youhackforme
      @youhackforme 3 года назад +1

      Often what you want to be public and private in code may be different to what you want to expose. For example using helper classes/structs and such in your code.

  • @willjohnson4579
    @willjohnson4579 3 года назад

    Guess i gotta learn C++ now, C Py and JS aren't quite enough haha

    • @JackofSome
      @JackofSome  3 года назад

      It's a good investment of time IMO

  • @robvp71
    @robvp71 Год назад

    This must be the only instruction video I don't need to speed up :-)

  • @SHONNER
    @SHONNER 3 года назад +1

    2:33 "dire" command? I've always said "der" command. I feel so old now.

    • @JackofSome
      @JackofSome  3 года назад

      Nice. I always assumed dire since it's from directory.

    • @youhackforme
      @youhackforme 3 года назад

      @@JackofSome that makes sense. I think the people who say "dire" pronounce directory as "dire-rec-tory" but the people who say "der" pronounce directory as "der-rec-tory".

    • @jwadaow
      @jwadaow 3 года назад

      @@youhackforme I don't think that's got anything to do with it and people pronounce it as they see it.

  • @dann1kid
    @dann1kid 3 года назад +1

    c is better than c++, i have choosed next lang, thanx for showing coding

  • @sirnigelcogs
    @sirnigelcogs 3 года назад

    This is a genuine question. Considering standard Python is so much slower than C / C++ and newer compiled languages like D and Nim are just about as easy as Python with the added benefit of being compiled and pretty much as fast as C / C++, why is Python so popular and used so much?

    • @JackofSome
      @JackofSome  3 года назад +1

      Legacy. If I were to move my code base to another language it would take a team twice the size of my own (my team is really small) at least a year to make the transition.

    • @sirnigelcogs
      @sirnigelcogs 3 года назад

      @@JackofSome That makes sense. I've heard similar reasons for using Java outside of app development as well. Thank you for answering.

    • @youhackforme
      @youhackforme 3 года назад

      @@JackofSome also availability of libraries. No one wants to write things over and over again and python simply has many many libraries while having "good enough" performance. If a developer cares about speed, c++ or rust may even be better!

    • @GoldPhoenix99
      @GoldPhoenix99 3 года назад +1

      ​@@JackofSome True, but I personally don't feel like "legacy code" is the top reason why python is pervasive. I think people really enjoy writing in python in a way that, imo, no other language has captured. That user experience is what caused the scientific computing community to move their work over to python during the 2000-2010's, which is what opened up python to being the most important language for ML, and why there's so many utilities surrounding that field for CV/NLP/etc. (Also, I think the "python is slow" mantra is overblown, but that's another discussion, lol.) btw, I love your video! This was very interesting and informative, and I know that I'd love some follow up videos if you're interested!

  • @Alex-gc2vo
    @Alex-gc2vo Год назад

    im not seeing why this is easier than just including the python.h in your C++ script and wrapping your function in python types.

    • @xCwieCHRISx
      @xCwieCHRISx 10 месяцев назад

      CFFI is the easiest way in my opinion.

  • @frostiiify9505
    @frostiiify9505 3 года назад

    Im currently learning C to make my own programming language, I'm calling it "Vide", can you tell the basics of a programming language, if you know what the basics are?

  • @keepsecret7624
    @keepsecret7624 3 года назад

    This need a written tutorial - let us have a pdf.please

    • @JackofSome
      @JackofSome  3 года назад

      The docs are actually really good

  • @cr_satan
    @cr_satan 2 года назад

    Did he say Python 🐍 11? 😅😂

  • @SkyFly19853
    @SkyFly19853 3 года назад

    Like Cython?

    • @JackofSome
      @JackofSome  3 года назад

      Never been able to get into Cython. I know some folks that swear by it though

    • @SkyFly19853
      @SkyFly19853 3 года назад

      @@JackofSome
      That's OK.
      I understand.
      I respect Cython, because I do NOT have to learn entire C or C++ to use in Python.

    • @JackofSome
      @JackofSome  3 года назад +1

      That's perfectly fair. Like I said in the video if my aim is to just speed up a bunch of code I usually turn to Numba. Pybind11 is great for those cases where I have to use C++, for any number of reasons.

    • @aniruddhamandal1544
      @aniruddhamandal1544 3 года назад +1

      @@JackofSome It seems that pybind11 is a better choice than cython for those people who love c/c++.

    • @SkyFly19853
      @SkyFly19853 3 года назад

      @@JackofSome
      So true and I am very interested in using C or C++ extension for making rts, etc video games in Python.

  • @pianochannel100
    @pianochannel100 3 года назад

    You've been doing too much python, forgetting the virtues of the ; :)

    • @JackofSome
      @JackofSome  3 года назад

      If ; is so great why isn't there ;2 ?

  • @shikanokonokokoshitantan
    @shikanokonokokoshitantan 11 дней назад

    Why pronounce dir as "dire" and not "dear" 😭

    • @JackofSome
      @JackofSome  11 дней назад +1

      Oh dear, what a dire situation.

  • @nb664rbk
    @nb664rbk Год назад

    did it ever cross your mind that you're going too fast?

  • @JackLilhammers
    @JackLilhammers 3 года назад +1

    Your video is interesting and clear, but I downvoted it because it's way too fast.
    It's even kind of hard to pause the video at the right moment to read the code.
    I know I can slow the playback speed, but that's just a workaround

    • @JackofSome
      @JackofSome  3 года назад +1

      That's fair. I overcorrected it seems.
      Code is linked in description if that helps. Thanks for commenting and I'll be more cognizant in the future.

    • @frostiiify9505
      @frostiiify9505 3 года назад

      @@JackofSome No, no! I like the speed you talk. It's not tok slow, not too fast, it's perfect! Please don't change anything.

  • @d-shiri
    @d-shiri 3 года назад

    nah, I've seen easier ways haha

  • @hideakipage8151
    @hideakipage8151 2 года назад

    Maybe you could slow down your presentation for us mere mortals

  • @joeysmith7021
    @joeysmith7021 3 года назад

    You dont even go over the installation and setup.

    • @JackofSome
      @JackofSome  3 года назад

      Installation is cloning the repo, setup is making the cmakelists file (integration to setup.py and deployment specifics will be another video). Both are covered here.

    • @joeysmith7021
      @joeysmith7021 3 года назад

      @@JackofSome one more question. With the example you have in the video. What would be the cmake file. For example, what would CMakeLists.txt look like for you? Thank you.

  • @raym6415
    @raym6415 2 года назад

    This is not a tutorial in any form. It would easier to find a piece of code similar to that and read it than listening to this guy pre-record code and debugging process while flying through it. Please do not share :)

    • @JackofSome
      @JackofSome  2 года назад

      40000 people disagree with you.

    • @raym6415
      @raym6415 2 года назад

      I guess your counting is as good as the quality of your video. You don’t even have 40000 views. You only have 1.1k likes.
      Don’t argue with me. I am telling you, the quality of your tutorial sucks. You wanna know how you should teach a programming piece? Watch one video from Corey Schafer's Python videos. You wanna watch how to produce a nice instructional (non-coding) video, watch ChrisFix. Then come back and redo this please.
      Thanks