WEBVTT 00:00.000 --> 00:14.080 I will be talking about liberal physicist Python API, which we call Pi, you know, and it 00:14.080 --> 00:20.440 is one of all the most popular API to use for any kind of extension development nowadays 00:20.440 --> 00:28.080 because it's easily accessible, but the whole Python you get approach while it has lots 00:28.080 --> 00:36.640 of NFS and making it really easy to use, thus have some implied limitations which you 00:36.640 --> 00:41.720 can do some ugly stuff to work around there. That's what I'm going to be talking about, 00:41.720 --> 00:53.080 and I'm far back my way, so let's say that part. So why Pi, you know, almost disregarding 00:53.080 --> 01:04.160 basic all other unabindings of liberal-fest needs you to compile it to some kind of architecture, 01:04.160 --> 01:12.680 and then that easily kills it being a truly cross-platform. So, Python, when you use Pi, 01:12.680 --> 01:18.800 you know, since liberal-fest already picks up it, it's on Python version, a truly 01:18.880 --> 01:26.760 cross-platform, so it makes super-sense to use it, you can just, yeah, when you write 01:26.760 --> 01:30.920 some kind of extension or script on it, it will work almost everywhere. If you're not 01:30.920 --> 01:37.720 using some always specific Python thing there, I don't know, that's also possible, you 01:37.720 --> 01:44.520 can do that, but other than that it should work. So usually, Python is a popular language, 01:44.600 --> 01:50.600 we could say everybody knows Python. It does have this huge, extensive library ecosystem, 01:50.600 --> 01:57.880 and there's lots of stuff you can take that, there's lots of different data processing tools. 01:57.880 --> 02:06.120 I don't know, nowadays we can also integrate AI and whatever. And Pi, you know, comes 02:06.200 --> 02:14.240 with the Uno Helper, which I really like, usually when you create any kind of liberal-fest 02:14.240 --> 02:21.640 interface, actually registering that is quite complicated, but with Pi, you know, I will 02:21.640 --> 02:32.640 do some, I will screen on code on screen type of deal, so you just need to import the Uno Helper, 02:32.640 --> 02:38.440 and then, from that you can get the implementation helper, and as long as you just 02:38.440 --> 02:43.760 give it, the actual Python implementation, implementation name and the service name is good 02:43.760 --> 02:52.880 to go. If you use something like C++, you would need, I guess, three different C-call type 02:52.880 --> 02:58.680 functions to register stuff, it gets really ugly real fast. A lot of people play this 02:58.760 --> 03:03.560 I really didn't use in just Pi, you know. Okay, what limits I'm talking about then, 03:03.560 --> 03:12.360 like, if Pi, you know, it's easy to use, you avoid boilerplate, okay, maybe before 03:12.360 --> 03:17.240 this I should also mention that, like, do whole Python and get burst ping, what I mean by 03:17.240 --> 03:27.240 that, in terms of Pi, you know, you can just, when you're using any kind of integer, that 03:27.320 --> 03:36.840 will be three, will be converted to any kind of long short or whatever type of Uno function 03:36.840 --> 03:43.400 you're calling, what type it expects, and when you get it, you can just use it at whatever 03:43.400 --> 03:50.040 as well, usually, in any other language other than basic, that liberal office supports, 03:50.040 --> 03:59.080 you need to explicitly set things up. But when you come to sequences that, you know, 03:59.080 --> 04:06.600 extensively uses for anything list-based or whatever, if they have a type, the Pytonic 04:06.600 --> 04:15.960 approach basically can't do this because the sequences are represented by tuples and tuples 04:15.960 --> 04:26.120 are mapped to a sequence of any, always, and if you just pass a, any sequence to a function 04:26.120 --> 04:32.920 that doesn't expect any sequence, it doesn't work. For, they are some kind of similar problem 04:32.920 --> 04:39.080 with Enals Python, doesn't have enough, and as for that, you can pass in integers and liberal 04:39.160 --> 04:46.840 functions, actually, expect the specific Enalm type, that also makes things fall apart, 04:47.400 --> 04:53.720 and the last thing that I kind of have an e-cabot is, you can't really purely implementation 04:53.720 --> 05:00.920 of an interface on the goal reliably, at least if you're not doing the work hands that I'm 05:00.920 --> 05:08.600 going to talk about, you can't use something like, easy instance or, like, the liberal office's 05:08.680 --> 05:19.320 own x-interface purely interface to get, if an interface actually implements some interfaces you're 05:19.320 --> 05:26.200 looking for, some implementation, and the work hands for type sequences is this ugly thing 05:26.200 --> 05:31.960 through Uno, you can do Uno that any, then in, with this thing, you can actually define the type, 05:32.680 --> 05:40.040 and you can then give it this triple, which it will basically try to cast each item in the 05:40.040 --> 05:48.360 triple into the type, that lets you represent these, for instance, a sequence of short, instead of a 05:48.360 --> 05:55.000 sequence of anis, and then if you've got to use this, you've got to use this Uno that 05:55.000 --> 05:59.960 in work with it, which gets quite hairy, as you can see, like, you need to give it the object, 06:00.760 --> 06:07.400 and then the name of the call, all of those are just strings, like, nothing's fancy going on there, 06:07.400 --> 06:13.480 and then you need to give it the property itself, and then inside of that, you, like, just look at 06:13.480 --> 06:19.000 the end of the sign line there, how many parentheses are there? This is just hard to use the 06:19.000 --> 06:28.600 level out. I don't really know, but maybe another day is with someone who's interested in 06:28.600 --> 06:32.920 contributing into this area, it might be possible they actually do this runtime and get rid of 06:32.920 --> 06:41.560 this as well, and you could just, yeah, just don't trick them. Yeah, so what about checking the 06:41.560 --> 06:48.920 level, in planetation of an interface? This is basically disturbed from this, asking the broker's 06:48.920 --> 06:56.680 form, a post, what you've got to do that is a very care and as you need to get to pay, you know, 06:56.760 --> 07:02.760 interface, which is this prototype, what I mean by, is the only interface that pie you know 07:02.760 --> 07:10.440 interface, which is basically this strictly presentation of the underlying type, and then you 07:10.440 --> 07:17.720 can pass that, you know, get typed by name, which gives you the actual underlying type, 07:17.720 --> 07:22.840 you can't really reference that directly through Python suddenly, and then finally you can 07:22.840 --> 07:28.680 use purely interface to actually see if purely interface will work, and if you actually 07:28.680 --> 07:34.440 implement the interface or not. Yeah, for the Enemies, it's quite similar to the 07:35.480 --> 07:42.040 sequence thing, you need to actually define what type of Enemies is, then just give it a number, 07:42.040 --> 07:50.040 and the Python will cast it into that, but it's ugly. Some tips and tricks that I want to 07:50.120 --> 07:54.280 mention was like, this is from the readme, actually, but I never got around to reading it 07:54.280 --> 08:01.080 until I was preparing this for the real presentation. In Python, I loaded a pie on the 08:01.080 --> 08:05.320 pie, you know, if you set the bug, like on and you compile a lib service, you will actually set 08:05.320 --> 08:12.920 free all the exceptions and principles of Python, which are not naturally free. They don't 08:12.920 --> 08:19.480 appear anywhere, it's very hard to debug, this makes it easier. I just wanted to show you lots 08:19.480 --> 08:25.960 of different UI stuff, but yeah, maybe I solved a bit too much. Yeah, last point I wanted to mention 08:25.960 --> 08:34.520 is that lib rowfaces generally, Uno in general is ideal to say a great application, 08:34.520 --> 08:42.600 development framework, but it lacks a decent API. So what you can do with Uno is actually 08:42.920 --> 08:49.080 all types of stuff you could basically re-implement any kind of UI integrate your own UI toolkit. 08:50.920 --> 08:55.880 Anyway, I just wanted to show you that. Let me just cut this short. 08:59.000 --> 09:05.960 For instance, you could, oops, I forgot a better Bitcoin, like everything is dynamic, you could 09:05.960 --> 09:16.040 actually change this button position in real-time, whatever, and also you could define custom 09:16.040 --> 09:28.840 rendering functions via using this paintless scenarios and paintless scenarios and set graphics 09:29.640 --> 09:37.240 calls, which I wanted to do. This is why my presentations were a bit sloppy. I was about to 09:37.240 --> 09:45.000 showcase your detection runs, do kind of deal, it didn't happen sadly, but maybe after the fact 09:45.000 --> 09:48.920 I've shared it in the end, but I'll just show you this thing. Like it just follows the mouse, 09:48.920 --> 09:56.440 but in the idea is you can, with this same concept, you can implement any kind of custom UI handling. 09:57.400 --> 10:06.440 You can hook to clicks, drags, whatever you can create a system level, drag and drop as well, 10:06.440 --> 10:12.840 as far as I can see. So yeah, this all from me. Thank you for listening.