Why Nostr? What is Njump?
2023-08-13 23:13:06
in reply to

A13cui on Nostr: npub17esnv…kclcm Linux 0.0.1 being barely functional, what can I say. You couldn't ...

Linux 0.0.1 being barely functional, what can I say. You couldn't even get yourself to bring actual OSs like Research Unix VN (where N is {1..7}). V1 was at 4k lines of asm and that was a fully functional OS, unlike Linux 0.0.1. that's a really nice false equivalence you're making right there. I went ahead and cloned the source code to see what it's doing in those "50k" lines and what are the biggest files. these are the top 20:

225 ./geocoding/phonenumber_offline_geocoder.cc
239 ./regexp_adapter_icu.cc
240 ./utf/utf.h
242 ./asyoutypeformatter.h
263 ./base/basictypes.h
296 ./stringutil.cc
358 ./utf/rune.c
406 ./shortnumberinfo.cc
450 ./base/memory/scoped_ptr.h
466 ./utf/unicodetext.h
524 ./utf/unicodetext.cc
766 ./asyoutypeformatter.cc
909 ./phonenumbermatcher.cc
979 ./phonenumberutil.h
1056 ./test_metadata.cc
1608 ./alternate_format.cc
3273 ./phonenumberutil.cc
4030 ./short_metadata.cc
14119 ./lite_metadata.cc
15052 ./metadata.cc


./metadata.cc literally has only a static const unsigned char data[] that's for some reason made out of hex, same with the other metadata files. if we add all of those up, we get 34257 which leads us to 16318 lines. The metadata is generated by a Java file iirc from a XML file and packagers usually turn on the option, but can be dynamically regenerated if needed, so the metadata files are only for convenience. Here's that file: https://github.com/google/libphonenumber/blob/master/resources/PhoneNumberMetadata.xml (the biggest one, you can see the sheer complexity of phone numbers)

next utf/ is relatively heavy, but:

This project uses some third-party code:

src/phonenumbers/utf/ sources come from lib9 which is also used in Go.

So we end up at 14512 lines. Huh, we're getting close to Linux 0.0.1, aren't we?

You also need synchronization because of course you can also use this in an async context, c'est la vie. Nice making it sound worse than it actually is, eh? :blobcat3c:
Author Public Key
npub1gykyxa0f5e96pelee3spdvxhet9r0aeky05dfl9apjal4wym346q9rd8w8