Re: [solved]: vi: How to display German umlauts?
Дана 24/07/13 02:18AM, Pontus Stenetorp написа: > I take it you have that function for cases where the number of files > is very large and would not fit the buffer for your shell? Actually, now that I think of it, that might be the reason why I wrote that function using find more than two years ago. For most repositories, there is no difference between using it and plain `wc -l` with a long list of arguments, but if there are a lot of *.c and *.h files in subdirectories of $HOME: $ cd $ wc -l $(find . -name '*.[ch]') E: /bin/mksh: /usr/bin/wc: Argument list too long and it is not shell-specific; it depends on the system variable ARG_MAX, which is on OpenBSD: $ getconf ARG_MAX 524288 More on this: https://www.in-ulm.de/~mascheck/various/argmax/
Re: [solved]: vi: How to display German umlauts?
Дана 24/07/12 08:50PM, Страхиња Радић написа: > No, I use the version I listed because I can format the output as I see > fit, and it gives per-file statistics. Also, I just now realize this is a case of a "useless use of awk"; I have no idea why I overlooked that wc -l *.c also gives the "total" line and the per-file statistics, and made an awk script to process the wc output. Huh. ¯\_(ツ)_/¯
Re: [solved]: vi: How to display German umlauts?
Дана 24/07/13 02:18AM, Pontus Stenetorp написа: > Always used: > > wc -l $(find vim90 -name '*.[ch]') > > Which gives roughly the same *rough* estimate: 516,321. > > I take it you have that function for cases where the number of files > is very large and would not fit the buffer for your shell? No, I use the version I listed because I can format the output as I see fit, and it gives per-file statistics. > You can also > group your wc(1) calls by using + as your terminator instead of \;. I know of that. Directories I run this function in usually don't have that many files for the "overhead" of exec'ing another wc is significant.
Re: [solved]: vi: How to display German umlauts?
On Tue 09 Jul 2024, Страхиња Радић wrote: > > sourcesize() > { > find . -name '*.[ch]' -exec wc -l {} \; | > awk '{ > size = $1 > f = $2 > sum += size > printf "%10d %s\n", size, f > } > END{ > printf "%10d total\n", sum > }' > } > > gives > > 550599 total > > when run in the root of Vim's repository. Aside from being a rough > estimate (it doesn't distinguish comment lines from real code), that > includes X11 code and various other features which could be opted out. Always used: wc -l $(find vim90 -name '*.[ch]') Which gives roughly the same *rough* estimate: 516,321. I take it you have that function for cases where the number of files is very large and would not fit the buffer for your shell? You can also group your wc(1) calls by using + as your terminator instead of \;.
Re: [solved]: vi: How to display German umlauts?
Dear Anon Loli: > (...) > software should be free, and non-personal information should be free, > too, without any IP or a requirement for a file "LICENSE".. those are > just my 2 cents.. if you don't say something about using or redisributing your software or code then nobody knows and noone can be sure if its allowed to do this or that. Just to make it clear for everyone you can give a statement about these topics. A good place for this statement is to include a file and call it LICENSE. > (...), would you use a open source peace of software that in the README > says "you can use it for whatever you want with no strings attached, > and that's it In the end it is your decision. Whether you want to hide the text down in the README or something else. If you are the creator, it's your work and your rules apply. > I'm not sure about the license thought... as I despise licenses and even > having > a copyleft license like CC is getting on my nerves, ... creative commons (CC) recommend against using their licenses for software. Very similar to most Creative Commons licenses are Permissive software licenses (e.g. Apache 2.0 License or MIT License) But here again: if it is your work then you decide the ways share your work.
Re: [solved]: vi: How to display German umlauts?
Дана 24/07/09 07:00PM, Anon Loli написа: > > All that's missing is the URL to the source code of that wonderful > > editor... if it exists at all. > > > > It's currently offline, off the internet, as far as I know, it was last hosted > on my eepsite, but circumstances mandated that I had to take down the epsite > because the site was outdated and insecure due to the circumstances > It's not usable and probably won't be as beautiful as Neatvi or Arab-friendly Right... "circumstances". How convenient. By the way, this function: sourcesize() { find . -name '*.[ch]' -exec wc -l {} \; | awk '{ size = $1 f = $2 sum += size printf "%10d %s\n", size, f } END{ printf "%10d total\n", sum }' } gives 550599 total when run in the root of Vim's repository. Aside from being a rough estimate (it doesn't distinguish comment lines from real code), that includes X11 code and various other features which could be opted out. Anyway, vis[1] (vise(1) in OpenBSD: `pkg_add vis`) has some of the functionality I mentioned earlier, and supports Unicode. The above function gives 28927 total for vis. [1]: https://github.com/martanne/vis
Re: [solved]: vi: How to display German umlauts?
On Tue, Jul 09, 2024 at 08:20:53PM +0200, Страхиња Радић wrote: > Дана 24/07/09 04:02PM, Anon Loli написа: > > That's why I use vi, and am working on my own text editor.. I don't know if > > it'll ever be good, but I'm aiming for Vi-like simplicity, suckless code > > base > > and Vim-like features (only most useful ones, the rest would be in a > > patch-form, like suckless.org has) > > Also when I said "am working", it's more like "was working and will work on > > it > > again", but I have a problem right now which has paused my programming > > life... > > I'm working on it > > If you're interested, perhaps one day you'll want to test it out.. > > All that's missing is the URL to the source code of that wonderful > editor... if it exists at all. > It's currently offline, off the internet, as far as I know, it was last hosted on my eepsite, but circumstances mandated that I had to take down the epsite because the site was outdated and insecure due to the circumstances It's not usable and probably won't be as beautiful as Neatvi or Arab-friendly I'm hesitant to upload it anywhere before I setup my site.. I want to have SOME reputaiton or something, and for that I need my website back online When I put it back online, I'm thinking about making it something similar to cGit, but without git, instead my own version control system and stuff... Ideally I'd want my site written in C, and since it would be minimalistic, that should be easy TLS/SSL is replaced/handled by I2P so one less thing to worry about
Re: [solved]: vi: How to display German umlauts?
Дана 24/07/09 04:02PM, Anon Loli написа: > That's why I use vi, and am working on my own text editor.. I don't know if > it'll ever be good, but I'm aiming for Vi-like simplicity, suckless code base > and Vim-like features (only most useful ones, the rest would be in a > patch-form, like suckless.org has) > Also when I said "am working", it's more like "was working and will work on it > again", but I have a problem right now which has paused my programming life... > I'm working on it > If you're interested, perhaps one day you'll want to test it out.. All that's missing is the URL to the source code of that wonderful editor... if it exists at all.
Re: [solved]: vi: How to display German umlauts?
On Tue, Jul 09, 2024 at 06:36:46PM +0200, prx wrote: > > > Le 9 juillet 2024 18:02:31 GMT+02:00, Anon Loli a > écrit : > >On Tue, Jul 09, 2024 at 12:38:02PM +0200, rfab...@mhsmail.ch wrote: > >> Dear Страхиња Радић, > >> dear Jan, > >> dear Christian > >> > >> Thanks a lot for your prompt and helpful answers! > >> > >> --- > >> Am 2024-07-08 20:35, schrieb Страхиња Радић: > >> > vi lacks a lot of built-in quality of life features that Vim has. > >> > >> Yes, I know Vim from Arch Linux. But for OpenBSD, I'd like to try to > >> stick to the base install as close as possible. > >> > >> --- > >> Am 2024-07-08 21:05, schrieb Jan Stary: > >> > On Jul 08 18:55:11, rfab...@mhsmail.ch wrote: > >> > > As I'd rather not switch to vim, I'd be very grateful for any tips > >> > > concerning the display of umlauts in vi. > >> > > >> > vi can't do it. > >> > >> Thanks for confirming, Jan! > >> > >> --- > >> Am 2024-07-08 22:07, schrieb Christian Weisgerber: > >> > There's a port and package of nvi-2.2.1, which is a close relative > >> > of the base system nvi that has been extended with wide character > >> > support. > >> > >> I have just installed nvi, and the umlauts are displayed correctly. > >> Many thanks for this tip! > >> > >> --- > >> I'm very grateful for the help misc@openbsd.org offers. A big thank > >> you to all the list contributors - and of course to all the contributors > >> and committers of OpenBSD itself. My family and I are very happy > >> to be able to use it for our daily home office work. > >> > >> Best regards > >> > >> Rolf > >> > >> > >> > >> > > > >Once upon a time I decided to take a look at Vim source code > >I did a wc -l, and it gave me like 70 LOC of *.c and *.h files like what > >the fuck? > >Do you know how much 700k of SLOC is? > >Terry Davis made a reasonably good OS in just 100k of SLOC! > >Very easy to hide malicious stuff like the backdoor that was in xz! > > > >That's why I use vi, and am working on my own text editor.. I don't know if > >it'll ever be good, but I'm aiming for Vi-like simplicity, suckless code base > >and Vim-like features (only most useful ones, the rest would be in a > >patch-form, like suckless.org has) > >Also when I said "am working", it's more like "was working and will work on > >it > >again", but I have a problem right now which has paused my programming > >life... > >I'm working on it > >If you're interested, perhaps one day you'll want to test it out.. > > > >I'm not sure about the license thought... as I despise licenses and even > >having > >a copyleft license like CC is getting on my nerves, software should be free, > >and non-personal information should be free, too, without any IP or a > >requirement for a file "LICENSE".. those are just my 2 cents.. > >It's a little more complicated than that, let's just say that I don't want > >being required to specify a LICENSE file... I'm just curious about the > >consequences, would you use a open source peace of software that in the > >README > >says "you can use it for whatever you want with no strings attached, and > >that's > >about it."? > > > >I'm probably rambling needlessly again, that's why none care about what I say > > > > Maybe look at neatvi: > => https://github.com/aligrudi/neatvi > > Even if I still prefer nvi and its soft wrapping. > > Oh, wow! That looks hella impressive! My text editor which is ALMOST functional (you can view and go up/down, but not edit files yet, text is in buffer), and is like 600 SLOC, where Neatvi is 8000 SLOC... But my editor doesn't have proper UTF-8 support, highlighting, any real advanced functions, right-left support or those things found in kmap.h, DIGRAPHS. OK, I'm kindof lying when I say it has no highlighting, the cursor is highlighted, and if we're talking escape sequences, that part should be easy and like 50SLOC, depending on language and what-not And the developer of Neatvi seems to be much more advanced than myself, in C. I'm definitely giving Neatvi a try, after checking out it's source code thank you, very much! I still think that I'll make my own thing, I already learnt a whole lot, like techinques for managing arrays/buffers by which I mean memory, which can be useful like everywhere I think that ANY project can be beneficial for the skill/experience Like I never worked with hexidecimal or whatever 0x7f is >>> actually checking out the source code mid-email Dude advanced poll(2) code? Fuck yeah! It's a little sad that by default C PL doesn't highlight for (u)int8-64.. but for Go it does that lol.. Also I'm not sure how safe it is when it comes to handling escape sequences, but I bet that the developer thought of that, he seems advanced I also realize that there's a ton of string manipulation, and the program manages command queries and stuff, it could easily somehow have a command that runs something malicious Honestly I don't even know what I'm looking for... I doubt it'd do a `rm -Rf ~/*` lol and for networking
Re: [solved]: vi: How to display German umlauts?
Le 9 juillet 2024 18:02:31 GMT+02:00, Anon Loli a écrit : >On Tue, Jul 09, 2024 at 12:38:02PM +0200, rfab...@mhsmail.ch wrote: >> Dear Страхиња Радић, >> dear Jan, >> dear Christian >> >> Thanks a lot for your prompt and helpful answers! >> >> --- >> Am 2024-07-08 20:35, schrieb Страхиња Радић: >> > vi lacks a lot of built-in quality of life features that Vim has. >> >> Yes, I know Vim from Arch Linux. But for OpenBSD, I'd like to try to >> stick to the base install as close as possible. >> >> --- >> Am 2024-07-08 21:05, schrieb Jan Stary: >> > On Jul 08 18:55:11, rfab...@mhsmail.ch wrote: >> > > As I'd rather not switch to vim, I'd be very grateful for any tips >> > > concerning the display of umlauts in vi. >> > >> > vi can't do it. >> >> Thanks for confirming, Jan! >> >> --- >> Am 2024-07-08 22:07, schrieb Christian Weisgerber: >> > There's a port and package of nvi-2.2.1, which is a close relative >> > of the base system nvi that has been extended with wide character >> > support. >> >> I have just installed nvi, and the umlauts are displayed correctly. >> Many thanks for this tip! >> >> --- >> I'm very grateful for the help misc@openbsd.org offers. A big thank >> you to all the list contributors - and of course to all the contributors >> and committers of OpenBSD itself. My family and I are very happy >> to be able to use it for our daily home office work. >> >> Best regards >> >> Rolf >> >> >> >> > >Once upon a time I decided to take a look at Vim source code >I did a wc -l, and it gave me like 70 LOC of *.c and *.h files like what >the fuck? >Do you know how much 700k of SLOC is? >Terry Davis made a reasonably good OS in just 100k of SLOC! >Very easy to hide malicious stuff like the backdoor that was in xz! > >That's why I use vi, and am working on my own text editor.. I don't know if >it'll ever be good, but I'm aiming for Vi-like simplicity, suckless code base >and Vim-like features (only most useful ones, the rest would be in a >patch-form, like suckless.org has) >Also when I said "am working", it's more like "was working and will work on it >again", but I have a problem right now which has paused my programming life... >I'm working on it >If you're interested, perhaps one day you'll want to test it out.. > >I'm not sure about the license thought... as I despise licenses and even having >a copyleft license like CC is getting on my nerves, software should be free, >and non-personal information should be free, too, without any IP or a >requirement for a file "LICENSE".. those are just my 2 cents.. >It's a little more complicated than that, let's just say that I don't want >being required to specify a LICENSE file... I'm just curious about the >consequences, would you use a open source peace of software that in the README >says "you can use it for whatever you want with no strings attached, and that's >about it."? > >I'm probably rambling needlessly again, that's why none care about what I say > Maybe look at neatvi: => https://github.com/aligrudi/neatvi Even if I still prefer nvi and its soft wrapping.
Re: [solved]: vi: How to display German umlauts?
On Tue, Jul 09, 2024 at 12:38:02PM +0200, rfab...@mhsmail.ch wrote: > Dear Страхиња Радић, > dear Jan, > dear Christian > > Thanks a lot for your prompt and helpful answers! > > --- > Am 2024-07-08 20:35, schrieb Страхиња Радић: > > vi lacks a lot of built-in quality of life features that Vim has. > > Yes, I know Vim from Arch Linux. But for OpenBSD, I'd like to try to > stick to the base install as close as possible. > > --- > Am 2024-07-08 21:05, schrieb Jan Stary: > > On Jul 08 18:55:11, rfab...@mhsmail.ch wrote: > > > As I'd rather not switch to vim, I'd be very grateful for any tips > > > concerning the display of umlauts in vi. > > > > vi can't do it. > > Thanks for confirming, Jan! > > --- > Am 2024-07-08 22:07, schrieb Christian Weisgerber: > > There's a port and package of nvi-2.2.1, which is a close relative > > of the base system nvi that has been extended with wide character > > support. > > I have just installed nvi, and the umlauts are displayed correctly. > Many thanks for this tip! > > --- > I'm very grateful for the help misc@openbsd.org offers. A big thank > you to all the list contributors - and of course to all the contributors > and committers of OpenBSD itself. My family and I are very happy > to be able to use it for our daily home office work. > > Best regards > > Rolf > > > > Once upon a time I decided to take a look at Vim source code I did a wc -l, and it gave me like 70 LOC of *.c and *.h files like what the fuck? Do you know how much 700k of SLOC is? Terry Davis made a reasonably good OS in just 100k of SLOC! Very easy to hide malicious stuff like the backdoor that was in xz! That's why I use vi, and am working on my own text editor.. I don't know if it'll ever be good, but I'm aiming for Vi-like simplicity, suckless code base and Vim-like features (only most useful ones, the rest would be in a patch-form, like suckless.org has) Also when I said "am working", it's more like "was working and will work on it again", but I have a problem right now which has paused my programming life... I'm working on it If you're interested, perhaps one day you'll want to test it out.. I'm not sure about the license thought... as I despise licenses and even having a copyleft license like CC is getting on my nerves, software should be free, and non-personal information should be free, too, without any IP or a requirement for a file "LICENSE".. those are just my 2 cents.. It's a little more complicated than that, let's just say that I don't want being required to specify a LICENSE file... I'm just curious about the consequences, would you use a open source peace of software that in the README says "you can use it for whatever you want with no strings attached, and that's about it."? I'm probably rambling needlessly again, that's why none care about what I say
[solved]: vi: How to display German umlauts?
Dear Страхиња Радић, dear Jan, dear Christian Thanks a lot for your prompt and helpful answers! --- Am 2024-07-08 20:35, schrieb Страхиња Радић: vi lacks a lot of built-in quality of life features that Vim has. Yes, I know Vim from Arch Linux. But for OpenBSD, I'd like to try to stick to the base install as close as possible. --- Am 2024-07-08 21:05, schrieb Jan Stary: On Jul 08 18:55:11, rfab...@mhsmail.ch wrote: As I'd rather not switch to vim, I'd be very grateful for any tips concerning the display of umlauts in vi. vi can't do it. Thanks for confirming, Jan! --- Am 2024-07-08 22:07, schrieb Christian Weisgerber: There's a port and package of nvi-2.2.1, which is a close relative of the base system nvi that has been extended with wide character support. I have just installed nvi, and the umlauts are displayed correctly. Many thanks for this tip! --- I'm very grateful for the help misc@openbsd.org offers. A big thank you to all the list contributors - and of course to all the contributors and committers of OpenBSD itself. My family and I are very happy to be able to use it for our daily home office work. Best regards Rolf