Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

array v3.0 is released

96 views
Skip to first unread message

Digi

unread,
Apr 2, 2022, 9:10:39 AM4/2/22
to
greetings for all

the new version of the library for working with an arrays in gawk is available at :

https://github.com/digics/gawklib
the v3.0 files is:

array.inc
array.rtf

the new version comparing with the previous:

- even more higher performance
- variable index step parameter for array-joining functions
- two types of an arrays supported
- flexible parameter set
- non array-join functions for array's definition, data movements and arrays printing

just @include file array.inc in your project.

note: library needs for it's own initialization located in the BEGIN area. please make sure that its performed before using ANY of the library's resource

the library's documentation is also available in wordpad's .rtf format in file array.rtf. the documentation is well although it has some sections not finished. i will update it continuously.

for any questions, suggestions, bug reporting, feature request etc - please contact me at cosm...@gmail.com

i will be glad for any feedback

with the kind Regards
Denis Shirokov

Kenny McCormack

unread,
Apr 2, 2022, 9:22:17 AM4/2/22
to
In article <c92981d4-9ef3-4250...@googlegroups.com>,
Digi <cosm...@gmail.com> wrote:
>greetings for all
>
>the new version of the library for working with an arrays in gawk is available at :
>
>https://github.com/digics/gawklib
>the v3.0 files is:
>
>array.inc
>array.rtf

Could you give us some idea of what this is about? Just posting URLs is
lazy. Anyway, I tried:

$ lynx https://github.com/digics/gawklib

and looked around a little, but couldn't figure anything out. So, I gave up.

Note that I am not about to download a .RTF file, because then I'd have to
find a Windows machine somewhere on which to read it. Couldn't you just
post a text version of it here - or at least some subset that would give us
some idea what it is about?

Suggestion: If there is some non-text attributes of the documentation that
you want to preserve, consider saving it as (i.e., converting it to) HTML.
That's a bit more universal than .RTF.

>the new version comparing with the previous:

This is the first I've heard of it. I didn't see any previous
announcements (in this newsgroup).

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/CLCtopics

Digi

unread,
Apr 2, 2022, 9:52:58 AM4/2/22
to
hello

got it!

i was converting .rtf file to html by the first converter that i was found. so documentation is now available at the same place in array.html

one year ago i was releasing the previous version of the array library and have some feedbacks from a peoples

thnx
Denis

Ed Morton

unread,
Apr 2, 2022, 10:00:50 AM4/2/22
to
On 4/2/2022 8:10 AM, Digi wrote:
> greetings for all
>
> the new version of the library for working with an arrays in gawk is available at :
>
> https://github.com/digics/gawklib

Please add a README.md file to the repo explaining what it's about and
how to use it.

Ed.

Kenny McCormack

unread,
Apr 2, 2022, 11:56:03 AM4/2/22
to
In article <5c64d406-6742-4597...@googlegroups.com>,
OK, but you still haven't given us any idea what this is really about.

Yes, I know I could probably go online and hunt around and get stuff and
figure it out, but the point is that: A) Most people won't do that - yes,
because they are lazy, and B) I won't do it - I just don't see sufficient
motivation. So, if you want people to know what you're doing, you're going
to have to do a little more enticing.

--

"This ain't my first time at the rodeo"

is a line from the movie, Mommie Dearest, said by Joan Crawford at a board meeting.

Digi

unread,
Apr 2, 2022, 9:28:19 PM4/2/22
to
file array.inc that is library itself is updated due to some environmental bugs fixed

Digi

unread,
Apr 2, 2022, 9:41:44 PM4/2/22
to
hello

I have no experience in publishing code and I have no idea what and how to do it, I apologize)

array v3.0 is a library of the functions for effectively works with an arrays in gawk.
it's have five functions for joining an array: simple join, join with separator, join-pairs, join pairs with separator

the join functions have high performance and ready for working with a large amount of data

in addition, the library includes
other really useful functions for working with an arrays: for it's definiyion and for a data movements

also library includes functions for printing(dumping) a contents of an array and content of the two arrays

and finally library contains sometimes useful other array functions

i've just added file 'test.gwk' to the git repository that is simple code examples working with this library

Kind Regards

Denis

Ed Morton

unread,
Apr 2, 2022, 9:57:27 PM4/2/22
to
On Saturday, April 2, 2022 at 8:41:44 PM UTC-5, Digi wrote:
> hello
>
> I have no experience in publishing code and I have no idea what and how to do it, I apologize)

No problem. See https://www.nobledesktop.com/learn/git/create-a-readme-file and https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes and do THAT as a starting point so people know what your repo is for and how to use it.

Ed.

Kpop 2GM

unread,
Apr 11, 2022, 11:41:12 PM4/11/22
to
@Digi : if your intention in the initialization process is to create an array for all 256-bytes, you can add this offset to each number,

2 * 3^3 * 4^5
or
6^5 * 4^3 / 3^2
or
4^5 * 54
or
6^3 * 4^4

which will allow you to print out any arbitrary byte even in gawk unicode mode. If that fails to generate the bytes properly, then use 8^7 instead.

(ps : they're all the same number)

— The 4Chan Teller

Digi

unread,
Apr 15, 2022, 1:32:01 PM4/15/22
to
hello

"...you can add this offset to each number.."

i know the place of what you're talikng about. it's like:

for ( c = 0; c < 256; c++ )
ASC[ sprintf( "%.c", c ) ] = c

allows: ASC[ char ] == code

but i completely misunderstanding what offset is adding to what number?

i cannot understand how text that you're provided may help me to convert numeric byte value to it's character or it's hexadecimal form


Kpop 2GM

unread,
Apr 15, 2022, 5:45:45 PM4/15/22
to
Try calculating it - all of them arrives at the exact same number that's a very crucial code point in Unicode spec - and it's that crucial point allowing you to get a full array of bytes without using byte mode or adjusting locales.

Kpop 2GM

unread,
Apr 15, 2022, 5:53:09 PM4/15/22
to
Hi Digi

Here's the proof of concept why that works - i've forced gawk unicode mode to print me out all 256-bytes, in descending order, including every byte that isn't part of Unicode at all, such as \xC1 or \xFC (some ancient nomenclature claims all the way to like xFD or xFE, but those are very much outdated - Unicode consortium themselves specifically say those aren't even in consideration)

LC_ALL='en_US.UTF8' gawk -e 'BEGIN { __=4^5 * 54
_=4^4-1;
do { printf("%c",_+__) } while(!(--_<-_)) }' | god -b

0000000 377 376 375 374 373 372 371 370 367 366 365 364 363 362 361 360
0000020 357 356 355 354 353 352 351 350 347 346 345 344 343 342 341 340
0000040 337 336 335 334 333 332 331 330 327 326 325 324 323 322 321 320
0000060 317 316 315 314 313 312 311 310 307 306 305 304 303 302 301 300
0000100 277 276 275 274 273 272 271 270 267 266 265 264 263 262 261 260
0000120 257 256 255 254 253 252 251 250 247 246 245 244 243 242 241 240
0000140 237 236 235 234 233 232 231 230 227 226 225 224 223 222 221 220
0000160 217 216 215 214 213 212 211 210 207 206 205 204 203 202 201 200
0000200 177 176 175 174 173 172 171 170 167 166 165 164 163 162 161 160
0000220 157 156 155 154 153 152 151 150 147 146 145 144 143 142 141 140
0000240 137 136 135 134 133 132 131 130 127 126 125 124 123 122 121 120
0000260 117 116 115 114 113 112 111 110 107 106 105 104 103 102 101 100
0000300 077 076 075 074 073 072 071 070 067 066 065 064 063 062 061 060
0000320 057 056 055 054 053 052 051 050 047 046 045 044 043 042 041 040
0000340 037 036 035 034 033 032 031 030 027 026 025 024 023 022 021 020
0000360 017 016 015 014 013 012 011 010 007 006 005 004 003 002 001 000
0000400

Digi

unread,
Apr 28, 2022, 9:13:50 AM4/28/22
to
oh this is cool!

i really not specialist about unicode. i know about it just a few things:

single character may have up to 15 bytes of code

in theory - unicode may implement ANY KIND of language including speach and writes

there is some unicodes thats determinate the type and method of sounds generated by human's .... mmm... an output interface devices)))) like mouth, lips, tooths, breathes and etc

however - i have some picture - let's look it at https://github.com/digics/gawklib/blob/main/1252_scheme.png

this table is the result of little research that i was performed about twelve years ago.
it's covers amount of encodings that are was been actually reduced to cover Windows-125x / ISO 8859-x

the blue lines surrounds local alpha characters that ARE local alpha characters in all encodings.
the green lines surrounds characters that are exist in all covered encodings.

i think that this make you a fun =)


Keith Thompson

unread,
Apr 28, 2022, 1:51:05 PM4/28/22
to
Digi <cosm...@gmail.com> writes:
> oh this is cool!
>
> i really not specialist about unicode. i know about it just a few
> things:
>
> single character may have up to 15 bytes of code

No. Unicode just specifies an integer value for each character. The
highest allocated value is 0x10FFFD, which fits in 21 bits.

There are several *representations* of Unicode. The most common is
UTF-8, which can encode all Unicode characters in no more than 4 bytes.
There's nothing that would reqiure 15 bytes in any encoding I'm aware
of (unless you want to invent something silly like UTF-5).

> in theory - unicode may implement ANY KIND of language including
> speach and writes
>
> there is some unicodes thats determinate the type and method of sounds
> generated by human's .... mmm... an output interface devices)))) like
> mouth, lips, tooths, breathes and etc

If by "some unicodes" you mean "some unicode characters", I don't
believe that's correct.

[...]

https://en.wikipedia.org/wiki/Unicode

--
Keith Thompson (The_Other_Keith) Keith.S.T...@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Ben

unread,
Apr 28, 2022, 3:25:37 PM4/28/22
to
Keith Thompson <Keith.S.T...@gmail.com> writes:

> Digi <cosm...@gmail.com> writes:
<cut>
>> in theory - unicode may implement ANY KIND of language including
>> speach and writes
>>
>> there is some unicodes thats determinate the type and method of sounds
>> generated by human's .... mmm... an output interface devices)))) like
>> mouth, lips, tooths, breathes and etc
>
> If by "some unicodes" you mean "some unicode characters", I don't
> believe that's correct.

Maybe he or she is talking about the IPA characters?

--
Ben.

Kpop 2GM

unread,
May 28, 2022, 12:38:20 PM5/28/22
to
i think what it was is that gnu-od defaulted 16 columns, but since the octals of eerily look like first column in reverse order, so maybe he excluded that and counted 15 ?
0 new messages