Nettle
by Per Hedbor () @ Pike (-) developers forum
05 Feb '04
05 Feb '04
Or at least CPU / Memory / motherboard / OS dependant.
If you have two machines with identical configurations, you would most
likely get similar values.
Hi,
Is there any way to _change_ default backend? Something like
Pike.DefaultBackend->replace(MyBackend) - so all subsequent calls to
call_out() and all file descriptors allocated after this will use
new backend?
And more... It would be nice to have dedicated backends in some
threads, so (say) all calls to call_out() and fd's allocation will
use thread-specific backend (if it is set - and default otherwise).
Something like Thread.Thread()->set_backend()...
All this …
[View More]functionality can be simulated(?) - like intercepting
Stdio.File|Stdio.FILE object creation (to use
Backend()->add_file()), call_out()s etc., but it wouldn't be as
clean as "native" support (there is always chance to overlook
something).
As to "Why?" - well, I simply don't want to (over)load single
backend with callbacks from everywhere... Especially when I've SMP
machine - it won't be used efficiently with single backend.
Any comments?
Regards,
/Al
[View Less]
Just a thought.
It would be darn sexy with a format parameter for whitespaces in
sscanf (for whitespace elimination)?
array_sscanf(" void foo(10)", "%*w%s%*w%s(%d)" );
array_sscanf(" void foo(10)", "%*[ \t]%s%*[ \t]%s(%d)");
Hi,
How to compare two objects which are implemented in C module?
What I don't know is how to make sure that other object is of same
type.
Is it field "subtype", or? Where object type is stored and how it is
assigned, BTW?
Thanks!
Regards,
/Al
7
20
Crypto naming
by Niels M�ller (v�ssar r�dpennan) @ Pike (-) developers forum
04 Feb '04
04 Feb '04
I've browsning some of the code, and have a few comments.
I think Crypto.SHA ought to be renamed Crypto.SHA1.
The name Crypto.Proxy is somewhat strange (it's actually a buffer).
Perhaps it should be renamed, and perhaps it would make sense with a
feed/drain interface. Also the pad method looks a little strange,
PIKEFUN string pad() {
ptrdiff_t i;
for (i = THIS->backlog_len; i < THIS->block_size - 1; i++)
THIS->backlog[i] = DO_NOT_WARN((unsigned char)(my_rand() &…
[View More]amp; 0xff));
THIS->backlog[THIS->block_size - 1] =
DO_NOT_WARN((unsigned char)(7 - THIS->backlog_len));
^
The constant should probably be something like THIS->block_size - 1.
[View Less]
3
6
nettle
by Mirar @ Pike developers forum
04 Feb '04
04 Feb '04
| AC_MSG_ERROR([Cannot compile --with-bignums without the GMP library
| It is highly recommended that you install a working GMP
| library on your system as that will add features to Pike
| required by many applications (such as Roxen). However,
| if you know that you do not need GMP, you may re-run configure
| with the option --without-bignums instead.])
Considering that Pike now needs Nettle to have at least a semi-usable
make verify, maybe adding such a test to configure for …
[View More]Nettle too
wouldn't be a bad idea?
[View Less]
4
9
Nettle or no Nettle?
by Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
03 Feb '04
03 Feb '04
Hm, what's up with this:
misao:/space/hack/Pike/7.5/build% ls -l lib/modules/*Nettle*
-rw-rw-r-- 1 marcus local 147 Feb 3 22:44 lib/modules/Nettle.pmod
-rwxrwxr-x 1 marcus local 92147 Feb 3 22:44 lib/modules/___Nettle.somisao:/space/hack/Pike/7.5/build% ldd lib/modules/___Nettle.so
libnettle.so.2 => /usr/lib/libnettle.so.2 (0x6ff97000)
libc.so.6 => /lib/libc.so.6 (0x0fe80000)
libgmp.so.3 => /usr/lib/libgmp.so.3 (0x6ff43000)
/…
[View More]lib/ld.so.1 => /lib/ld.so.1 (0x08000000)
misao:/space/hack/Pike/7.5/build% grep HAVE_LIBNETTLE post_modules/Nettle/nettle_config.h
#define HAVE_LIBNETTLE 1
misao:/space/hack/Pike/7.5/build% make run_hilfe /space/hack/Pike/7.5/build/pike -DNOT_INSTALLED -DPRECOMPILED_SEARCH_MORE -m/space/hack/Pike/7.5/build/master.pike
Pike v7.5 release 17 running Hilfe v3.5 (Incremental Pike Frontend)
> indices(Nettle);
(1) Result: ({ })
>
[View Less]
1
0
mktime
by Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
03 Feb '04
03 Feb '04
The function my_tm_diff() in buildint_functions.c is bugged. It
doesn't differentiate between months of different length, but treats
all months as having 30 days, 10 hours and 30 minutes. This means
that e.g. the dates 2004-01-31-12:00:00 and 2004-02-01-01:30:00 will
be considered _equal_. The recent failures of the testsuite is due to
these state of affairs. The bug can be reproduced with
mktime(gmtime(1075550400))
The bug is likely to occur with any date being the last day of a month
…
[View More]containing 31 days, after 10:30 AM.
[View Less]
Hi,
I asked this once on general Pike list, nobody answered, so I'll try
here :)
The question is - why create() is called when module is inherited, not
when it is instaniated?
If there is Parent.pmod (with create() defined), and Child.pmod, which
inherits Parent, then create() defined in Parent will be called when
Child is _compiled_. Compilation of Parent won't call it's create()
method.
In case if module is _imported_, such behavior is logical, but when
inherited... What …
[View More]especially confuses me is the fact that regular
parent class definition won't cause such effect...
Any ideas/explanations? :) Is this "behavior by design" or?
Regards,
/Al
[View Less]
Correction: Thread A might release its read lock after checking that
the object is thread local, and then the fact that no other thread can
access it is relevant. I don't think it'd be good to make threads keen
on releasing the read lock though, since they can't reasonably do any
significant amount of work without reading global objects.