Difference in execution speed

2008-03-24 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Now the loops are optimized away as well: | ./pike -mmaster.pike lyslyskom16362790.pike 47 10 | Running 10 iterations on array of size 47 | ==-1 took 0.000s | 0 took 0.000s | has_index() took 0.000s

Filenames in the Pike CVS repository are now valid UTF-8

2008-03-19 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
FYI: I doubt that anyone will notice (or care :-)), but I've just renamed the few files in Pike that contained 8-bit characters, so that they may be stored on filesystems that enforce UTF-8 encoding (eg HFS or ZFS). The only files affected were the (deleted) file

Filenames in the Pike CVS repository are now valid UTF-8

2008-03-19 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
The replacement machine has now been installed in it's new home. No user accounts yet.

Re: follow up: segfault

2008-03-10 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Right, my mistake.

follow up: segfault

2008-03-09 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
On Sat, 8 Mar 2008, Arne Goedeke wrote: Also with this particular case (when the first constant is wrong), pike segfaults, apparently in f_function_name called by _sprintf in the last backtrace frame of that compile error. I looked into it again and the problem seems to be that in

debian package of pike (and caudium)

2008-01-30 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
As some of you may have seen, a new Debian package of 7.6.112 was uploaded the other day. I hope it will be well tested! It failed to build on Alpha, however. Apparently a double free or corruption happened in libjpeg (used by the Image.JPEG module) during autogeneration og the documentation

Calendar: Weeks spanning years

2008-01-27 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
I've now fixed the week vs year/day problems that showed up in the testsuite.

Calendar: Weeks spanning years

2008-01-25 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
I made a simple attempt to make 7.6 compatibility wrappers but it failed, perhaps due to the resolver tricks in the Calendar module. Shall we back out this again until someone manages to get working compat? Sounds reasonable.

7.6 release plans?

2007-12-12 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Compilation failure: Linking Gdbm ld: fatal: library -lgdbm: not found Looks like libgdbm is in some directory that gcc has in its default library path, but that isn't in /usr/ccs/bin/ld's.

Re: Pike 7.8

2007-11-23 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
class X (int n) { private X `+ (int n2) {return X (n + n2);} } Here the function `+ is made private, but not the ability to use the object in an addition; you can still do X(3) + 4. I think this should Actually, you can't. lfuns that are private won't be used. apply to these

master()-fc

2007-11-13 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Some digging reveals that that is very old code, probably from the dark confused ages. Sounds likely. From ulpc/lib/master.lpc: | object cast_to_object(string oname) | { | object ret; | | if(oname[0]=='/') | oname=combine_path(getcwd(),oname); | |

Snapshot tarballs and packaging/debian

2007-10-01 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Those tarballs are made by checking out a pristine pike tree from CVS, and running make snapshot_export. In your case, preferrably checking out with cvs -D iso8601timestamp, picking a suitable UTC time from one of the appropriate times when export.pike tagged a stable tree. For builds by pikefarm

catch in c code

2007-08-21 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
what's the recommended approach for performing the equivalent of a catch around apply_svalue()? The most common approach is to use safe_apply_svalue(), it unfortunately only supports two error handling modes; either passing errors along to master()-handle_error(), or ignoring them entirely. If

catch in c code

2007-08-21 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Btw, shouldn't throw_value and throw_severity really be fields in the Pike_interpreter struct? Yes, they probably should.

file_peek and async_connect

2007-07-29 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
peek() can currently not be used there since it doesn't exist on Windows (that ought to be fixed, though). Fixed. Note that neither read(0,1) nor peek() is used in that spot in 7.7; only the !errno() check remains. That happened with this somewhat cryptic comment: revision 1.222 date:

peek changes

2007-07-29 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Fixed.

Re: file_peek and async_connect

2007-07-29 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
i guess the docs for Stdio.File()-peek() should be fixed then, because they say: Returns 1 if there is data available to read ?? As far as I can see, the documentation says the following: *! Check if there is data available to read, *! or wait some time for available data to read. *! *!

file_peek and async_connect

2007-07-26 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
using peek() instead of read(0,1) in __stdio_close_callback() and adding }else if (fds.revents (POLLERR | POLLHUP)){ ret=0; to file_peek() fixed this issue for me. Thanks for the suggestion. I've now

Attributed types

2007-04-22 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
As you all probably know, I've been tinkering with the type system in Pike 7.7 for a while now, and I've now reached the point of implementing attributed types. The question once again is which syntax do you prefer?: GCC-style: void __attribute(noreturn) error(string msg); string

Attributed types

2007-04-21 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
As you all probably know, I've been tinkering with the type system in Pike 7.7 for a while now, and I've now reached the point of implementing attributed types. The question once again is which syntax do you prefer?: GCC-style: void __attribute(noreturn) error(string msg); string

7.7 continues

2007-04-17 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Trying to build a Pike with --with-long-long-int and --with-double-precision: | /home/mirar/pike/build/linux-2.6.17-11-generic-x86_64/pike -DNOT_INSTALLED -DPRECOMPILED_SEARCH_MORE -m/home/mirar/pike/build/linux-2.6.17-11-generic-x86_64/master.pike

sprintf() arguments now type checked in Pike 7.7.

2007-04-06 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
I've added some type checking support for sprintf() arguments: New type checker: sprintf(%s%i%f\n, 17, , 14.0); Compiler Error: 1:Error in format string, i is not a format. Compiler Error: 1:Bad argument 2 to sprintf. Compiler Error: 1:Expected: object | string Compiler Error: 1:Got

New function call type checker for pike

2007-03-30 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Hmm... Seems to work even for the more obscure cases: typeof(class{}); (4) Result: function( : object(is HilfeInput()-__class_65709_0_line_1)) typeof(Stdio.Stat()); (5) Result: object(is _static_modules.files()-Stat) Note that it will fall back to the old syntax if it fails to look up the

New function call type checker for pike

2007-03-29 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Those who have monitored the Pike 7.7 CVS the last week or so, may have noticed a few new type checking related functions. These are intended to replace the current style of type checking where a function type for the current call is created and then compared in one pass against the declared type.

error: `LIBS' was not set in the previous run

2007-03-28 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Looks like you need to add some more entries to the pollution filter in aclocal.m4:AC_OUTPUT (line ~733 - ~748).

error: `LIBS' was not set in the previous run

2007-03-28 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Anyway the precious variable stuff breaks the support for chained configure scripts in combination with config.cache.

problems resolving program in a cmod

2007-03-20 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
I used to do this to get a program of an external class in c: ... push_text(Someclass); SAFE_APPLY_MASTER(resolv, 1); if (((struct svalue *)(Pike_sp - 1))-type != PIKE_T_PROGRAM) { Pike_error(Could not resolv program Someclass.\n); } prog = ((struct svalue *)(Pike_sp - 1))-u.program;

problems resolving program in a cmod

2007-03-20 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
The reason you run into a problem is probably that the program you attempt to resolve uses the parent pointer, so you get a T_FUNCTION rather than a T_PROGRAM. For what purpose do you need the program pointer? For some purposes, program.c:program_from_svalue() may return something you can use. You

problems resolving program in a cmod

2007-03-20 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
Correct, as I said above, you probably want to use parent_clone_object() (or just call the svalue directly). Do you actually need the program pointer for something? I need it to create an object of that program. I am a little confused though. If there is a simpler solution to create an object

Syntax for restricted width string types

2007-03-02 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
I'm considering adding support for differentiating between different width strings to the type system. This whould be useful in tracking down places where wide strings are passed where narrow strings are expected. The question is what the syntax should be. Please note that the syntax should aim at

Re: Default cast LFUN

2007-01-22 Thread Henrik Grubbstrm (Lysator) @ Pike (-) developers forum
In Pike, data type conversion is typically handled completely by whatever type of object is being converted to, with no help from the object being converted from. This is done in create(), and to convert an array of integers treated as time_t seconds-since-the-Epoch, into Calendar.Second objects,

<    1   2   3   4   5