|
150 | 150 |
|
151 | 151 | 00:03:57 So I started Pydantic back in 2017 as a side project.
|
152 | 152 |
|
153 |
| -00:04:01 And I toodled along. |
| 153 | +00:04:01 And I doodled along. |
154 | 154 |
|
155 | 155 | 00:04:02 And then 2021, it somehow, something happened.
|
156 | 156 |
|
|
530 | 530 |
|
531 | 531 | 00:16:18 But also this iterative JSON parsing thing is exactly what you want when you want to allow people to query JSON in a way like JSONB in Postgres.
|
532 | 532 |
|
533 |
| -00:16:27 And so we went and used Jitter to implement JSON querying inside DataFusion when we moved our database to DataFusion. |
| 533 | +00:16:27 And so we went and used Jitter to implement JSON querying inside Data Fusion when we moved our database to Data Fusion. |
534 | 534 |
|
535 | 535 | 00:16:34 And it was just like, very luckily, yeah, it happens to be exactly the right concept you need for like, for querying JSON, where you want to iterate over looking for the like string foo, and then stop as soon as you find it.
|
536 | 536 |
|
|
614 | 614 |
|
615 | 615 | 00:19:32 I'm being surprised by how, like, the legs that this has had, which I wasn't expecting when we first started it.
|
616 | 616 |
|
617 |
| -00:19:37 But yeah, the nice bit is it's all the input, the actual JSON parsing is Rust, but then we have the logic to, yeah, basically access that from Python, both in this package and in PyLantic core. |
| 617 | +00:19:37 But yeah, the nice bit is it's all the input, the actual JSON parsing is Rust, but then we have the logic to, yeah, basically access that from Python, both in this package and in Pydantic core. |
618 | 618 |
|
619 | 619 | 00:19:47 Well, you sent me over to this cargo section, or the crate section, rather.
|
620 | 620 |
|
|
702 | 702 |
|
703 | 703 | 00:23:03 I'm not clever enough to write C.
|
704 | 704 |
|
705 |
| -00:23:04 That's a void pointer pointer. |
| 705 | +00:23:04 That's a void pointer. |
706 | 706 |
|
707 | 707 | 00:23:08 What are we doing here?
|
708 | 708 |
|
|
736 | 736 |
|
737 | 737 | 00:24:21 Another example is Jitter, which I showed you.
|
738 | 738 |
|
739 |
| -00:24:24 We released Jitter a year ago now. |
| 739 | +00:24:24 We released Jiter a year ago now. |
740 | 740 |
|
741 | 741 | 00:24:27 It is the most downloaded JSON parser in Python other than the one in the standard library.
|
742 | 742 |
|
|
774 | 774 |
|
775 | 775 | 00:26:02 Literally say this is the string itself and you don't have to copy.
|
776 | 776 |
|
777 |
| -00:26:04 But that means the type you get back for when you parse a string in jitter is what is called a cow in Rust. |
| 777 | +00:26:04 But that means the type you get back for when you parse a string in jiter is what is called a code in Rust. |
778 | 778 |
|
779 | 779 | 00:26:11 And it is either an owned string, e.g. when you've copied it, or it's a reference to the underlying chunk of the array.
|
780 | 780 |
|
|
804 | 804 |
|
805 | 805 | 00:27:25 We don't really think about compiling much in Python.
|
806 | 806 |
|
807 |
| -00:27:28 We don't think about it, but you can think of import time when you do different stuff or you think about static typing when you go and run PyWrite over your code. |
| 807 | +00:27:28 We don't think about it, but you can think of import time when you do different stuff or you think about static typing when you go and run Pyrite over your code. |
808 | 808 |
|
809 | 809 | 00:27:37 And that is like very similar in some ways to compile time.
|
810 | 810 |
|
|
826 | 826 |
|
827 | 827 | 00:28:25 If you were using most other, if you were using cargo, you would have to take care.
|
828 | 828 |
|
829 |
| -00:28:30 I mean, putting the controversy over Serti to one side for a minute, you would have to take care of compiling that code yourself every time you wanted to go and go and use it. |
| 829 | +00:28:30 I mean, putting the controversy over Serde to one side for a minute, you would have to take care of compiling that code yourself every time you wanted to go and go and use it. |
830 | 830 |
|
831 | 831 | 00:28:38 Whereas actually PyPI does an amazing job of distributing compiled Rust for virtually every ecosystem, every architecture, and it just working when you install it.
|
832 | 832 |
|
|
1044 | 1044 |
|
1045 | 1045 | 00:36:25 Because I presume we've...
|
1046 | 1046 |
|
1047 |
| -00:36:27 We do do that. |
| 1047 | +00:36:27 We do that. |
1048 | 1048 |
|
1049 | 1049 | 00:36:28 Perfect.
|
1050 | 1050 |
|
|
1064 | 1064 |
|
1065 | 1065 | 00:36:43 It's a little bit like what you did, Samuel, with Pydantic and Pydantic Core.
|
1066 | 1066 |
|
1067 |
| -00:36:47 So ImportLintra is pure Python. |
| 1067 | +00:36:47 So Import-Linter is pure Python. |
1068 | 1068 |
|
1069 | 1069 | 00:36:49 Yeah.
|
1070 | 1070 |
|
|
1304 | 1304 |
|
1305 | 1305 | 00:43:32 I don't know how long ago that was you were trying, but I think it's, yeah, reduced significantly.
|
1306 | 1306 |
|
1307 |
| -00:43:37 So, I mean, I did quite a lot of the same work in PyNantic Core to avoid the overhead of calling into and out of it lots of times. |
| 1307 | +00:43:37 So, I mean, I did quite a lot of the same work in Pydantic Core to avoid the overhead of calling into and out of it lots of times. |
1308 | 1308 |
|
1309 | 1309 | 00:43:43 And I think that's less of a thing now than it used to be.
|
1310 | 1310 |
|
|
1342 | 1342 |
|
1343 | 1343 | 00:44:46 I don't know if that's in here as well.
|
1344 | 1344 |
|
1345 |
| -00:44:48 I maintain watch files, which is the file watching library used by UVicorn and some other things. |
| 1345 | +00:44:48 I maintain watch files, which is the file watching library used by UVcorn and some other things. |
1346 | 1346 |
|
1347 | 1347 | 00:44:56 And that is, again, wrapping a Rust library for getting fast system notifications.
|
1348 | 1348 |
|
|
1893 | 1893 | 01:02:00 Now get out there and write some Python code.
|
1894 | 1894 |
|
1895 | 1895 | 01:02:02 Thank you.
|
1896 |
| - |
1897 |
| -01:02:02 Thank you. |
1898 |
| - |
1899 |
| -01:02:03 Thank you. |
1900 |
| - |
1901 |
| -01:02:06 Thank you. |
1902 |
| - |
1903 |
| -01:02:06 Thank you. |
1904 |
| - |
1905 |
| -01:02:07 Thank you. |
1906 |
| - |
1907 |
| -01:02:07 Thank you. |
1908 |
| - |
1909 |
| -01:02:19 you Thank you. |
1910 |
| - |
0 commit comments