James Harton | 9 Oct 22:35
Favicon

gethostbyname() & gethostbyaddr()

Hi there.

Other than using Protocols.DNS.Query is there a way to look up IPv6  
pointers and quad-A records?

 > gethostbyname("www.kame.net");
(7) Result: ({ /* 3 elements */
               "www.kame.net",
               ({ /* 1 element */
                   "203.178.141.194"
               }),
               ({ })
           })
 > gethostbyaddr("2001:200:0:8002:203:47ff:fea5:3085");
gethostbyaddr(): IP-address must be of the form a.b.c.d

Thanks,

James.

Marc Dirix | 9 Oct 15:15

pike -x module spotless

Hi,

It seems "pike -x module spotless" is not so spotless after all.

It leaves both "configure" and "autom4te.cache" in the module
source directory.

Marc

C API: accessing to the elements of an array

Yep, but possibly with a typecheck first. (I still don't know if the
method is internal, then it might just as well *return* the array.)

C API: accessing to the elements of an array

Accessing the elements is not that difficult either. This should give
the array_index item (svalue) from the array at stack_index position on
the stack.

ITEM(Pike_sp[-stack_index])[array_index]

Felip Alàez Nadal | 30 Sep 09:06

C API: accessing to the elements of an array

Hello:

I'm adding a solveLinearEquations method to Math.Matrix, writting new code in matrix_code.h. There's something I don't know how to do.

Well, from inside solveLinearEquations I call the method which does the LU decompositon, by typing

static void solveLinearEquations ( INT32 args )
{
//SOme code to access to the parameters

matrixX(_lu) (0 ); // the lu decomposition doesn't need any parameters

//Here I need something to access to the elements of the array which matrixX(_lu) returns into pike.


//More code which solve the equations system
}

The matrixX(_lu) method pushes an array with for elements into the stack calling something similar to

push_object( L);
 push_object ( U);
 push_object ( Permutations );
 push_int ( Sign );
 f_aggregate (4); /* Make an array of the 4 top elements on the stack. */

Now I want to access those elements from solveLinearEquations in order to use the L and U matrices to solve a linear equations system. How can I "unaggregate" those elements, or pop the complete array and access Its individual elements?

Thanks you.

--
Felip Alàez Nadal
Arne Goedeke | 23 Sep 16:11

Filesystem.System()->mkdir()

not there. any reason for that or is it just missing?

James Harton | 22 Sep 04:54
Favicon

Public.Tools.RRDtool

Hi there.

There are no module docs for this module on modules.gotpike.org - does 
anyone have any code they can show me?

Cheers.

James.

dwim - format not handled

They are actually getting more common in recent geek/web2 dev circles.
Surprising but pleasant.

Jeff Ober | 18 Sep 21:12

dwim - format not handled

The Calendar module FAQ asked for notifications for standard formats that the dwim functions do not successfully parse.  Here is a sample one, used in some RSS-type feeds (notably, Flickr/Yahoo's Media RSS format):

2008-08-08T15:13:53-08:00

Replace the T with a space and it parses correctly.

--
Old programmers don't die; they just parse on...
http://www.artfulcode.net


Re: Math.Matrix revisited

There hasn't been a lot of man-hours dedicated to it lately. Feel free
to pick a FIXME from CHANGES and fill out the details.

Re: Math.Matrix revisited

Anyone working on that?


Gmane