I'm trying to develop a game engine using pike.
But there is a big problem that I can't play any sound file using pike and SDL.
I write a simple test script trying to play a .wav sound file, but it exit
and nothing happened when I run this program.
Here is my code, where should I check?
int main ()
{
SDL.init( SDL.INIT_AUDIO );
SDL.open_audio ( 22050 , SDL.AUDIO_S16 , 2 , 4096 );
SDL.Music music = SDL.Music ( "test.wav" );
music->pause();
music->play ( 0 );
SDL.quit();
return 0;
}
//
// MessageId: WSAENOTSOCK
//
// MessageText:
//
// An operation was attempted on something that is not a socket.
//
#define WSAENOTSOCK 10038L
/ Henrik Grubbström (Lysator)
Previous text:
>13658795 2005-09-15 11:34 /47 lines/ Brevbäraren
>Recipients: Pike (-) ticket import
>Subject: Protocols.DNS.client() not functional on Windows [3992]
>--------------------------------------------------------------------
>
> Product: Pike
> Version: 7.4
> Component: Modules
> Reporter: anders(a)roxen.com
> URL: https://community.roxen.com/crunch/show_bug.cgi?id=3992
>
>All syncronous operations with Protocols.DNS.client is broken on windows.
>The following program only returns the expected result from the second part
>when using the async_client (which by the way is undocumented). This was
>tested on both Windows 2000 and 2003.
>
>void got_result(string from, string to, mixed ... extra)
>{
> werror("Got result: %O, %O, %O\n", from, to, extra);
>}
>int main()
>{
> Protocols.DNS.client con = Protocols.DNS.client();
> werror("Host: %O\n", con->gethostbyname("wwww.roxen.com"));
> werror("MX: %O\n", con->get_primary_mx("roxen.com"));
> werror("Sync: %O\n", con->do_sync_query(con->mkquery("pike.ida.liu.se",
> Protocols.DNS.C_IN,
> Protocols.DNS.T_A)));
>
> Protocols.DNS.async_client dns = Protocols.DNS.async_client();
> dns->host_to_ip("www.roxen.com", got_result);
> dns->get_mx("roxen.com", got_result);
>
> return -17;
>}
>
>When using Stdio.UDP directly this is the result:
>C:\pike\pike\7.4.326\bin>pike
>Pike v7.4 release 326 running Hilfe v3.5 (Incremental Pike Frontend)
>> object udp = Stdio.UDP();
>> string s =Protocols.DNS.protocol()->mkquery("www.roxen.com",
>Protocols.DNS.C_IN, Protocols.DNS.T_A);
>> udp->bind(0);
>(1) Result: Stdio.UDP()
>> udp->send("212.247.28.2", 53, s);
>(2) Result: 31
>> udp->wait(5);
>udp->wait(): select() failed with errno 10038
>Stdio.UDP: Stdio.UDP()->wait(5)
>HilfeInput:1: HilfeInput()->___HilfeWrapper()
>
>
>(13658795) /Brevbäraren/--------------------------------------------
>
I've discovered a problem with Pike 7.6.24 (and 7.6.34) when using
constant Classname = (program)"Classname.pike" statements:
12:41 ~/fetch KingOfPrussia) pike fetch.pike
Incorrect number of arguments.
.. expected behaviour. but:
12:41 ~/fetch KingOfPrussia) cd hui
12:42 ~/fetch/hui KingOfPrussia) pike ../fetch.pike
/home/tobij/fetch/ImgJob.pike:1:Error evaluating constant.
Cast "FetchJob.pike" to program failed.
/usr/lib/pike/master.pike:1002: master()->cast_to_program("FetchJob.pike",0,0)
/home/tobij/fetch/ImgJob: object(/home/tobij/fetch/ImgJob.pike)->__INIT()
/usr/lib/pike/master.pike:349:
master()->compile_string("static constant FetchJob =
(program)\"FetchJob.pike\";\n\ninherit FetchJob;\n\nstatic Regexp.PCRE
fname = Regexp.PCRE(\"([^/]*)$\");\n\nstatic void
"+[190],"/home/tobij/fetch/ImgJo
b.pike",0,/home/tobij/fetch/ImgJob,0,0)
/usr/lib/pike/master.pike:819:
master()->low_findprog("/home/tobij/fetch/ImgJob",".pike",0,0)
/usr/lib/pike/master.pike:928:
master()->findprog("/home/tobij/fetch/ImgJob",".pike",0,0)
/usr/lib/pike/master.pike:976:
master()->low_cast_to_program("ImgJob","/home/tobij/fetch/fetch.pike",0,0)
/usr/lib/pike/master.pike:998:
master()->cast_to_program("ImgJob.pike","/home/tobij/fetch/fetch.pike",0)
/home/tobij/fetch/fetch.pike:0: object(/home/tobij/fetch/fetch.pike)->FetchJob()
/usr/lib/pike/master.pike:349:
master()->compile_string("#!/usr/bin/pike\n\n#ifndef NT\n# define
NT\t4\n#endif\n\n#define unless(x) if(!(x))\n\nstatic constant Manager
= (program)\"Manager.pike\";\nstatic cons"+[1034],"/home/tobij/fetch/
fetch.pike",0,/home/tobij/fetch/fetch,0,0)
/usr/lib/pike/master.pike:819:
master()->low_findprog("/home/tobij/fetch/fetch",".pike",0,0)
/usr/lib/pike/master.pike:928:
master()->findprog("/home/tobij/fetch/fetch",".pike",0,0)
/usr/lib/pike/master.pike:964:
master()->low_cast_to_program("/home/tobij/fetch/fetch","/usr/lib/pike/master.pike",0,0)
/usr/lib/pike/master.pike:998:
master()->cast_to_program("/home/tobij/fetch/fetch.pike","/usr/lib/pike/master.pike",0)
/home/tobij/fetch/ImgJob.pike:1:Error in constant definition.
/home/tobij/fetch/fetch.pike:11:Error evaluating constant.
/home/tobij/fetch/fetch.pike:11:Error in constant definition.
Pike: Failed to compile script:
Compilation failed.
/usr/lib/pike/master.pike:2650:
master()->_main(({"pike","../fetch.pike"}),({"MANPATH=/usr/local/share/"+[216],"SSH_AGENT_PID=6952","HOSTNAME=KingOfPrussia","INTEL_LICENSE_FILE=/opt/i"+[14],"SHELL=/bin/tcsh","TERM=rxvt","HOST=KingOfPrussi
a","QTDIR=/usr/qt/3",,,53}))
The program files are deposited at http://public.tobij.de/res/plain/.
The problem might be that ImgJob.pike gets compiled by low_findprog(),
and the compiler seems to not supply the 'current_file' argument to
it's cast_to_program("FetchJob.pike", ...) call...
Should this behaviour of Pike considered to be a bug, or are my casts
illegitimate?
PS: Martin Baehr told me that the problem does not occur with Pike-7.6.13.
hi,
in C the following gives an error:
enum boolean
{
YES
,
, // here
,
,
NO
};
in pike, multiple , in enum are ignored.
is there a reason for that?
greetings, martin.
There have been on and off calls for a wiki-like application for people to
share information about Pike development and related topics. Not much ever
came of it, so I decided to do something about it.
I wrote a simple wiki application yesterday and have made it available for
anyone to contribute to. Anonymous editing is restricted, in order to
minimize possibilities of spam, but the authentication is shared with the
pike module repository, so if you've already got a modules.gotpike.org
account, you're set to edit.
I've started things off with some of my own personal information. Take a
moment and share your notes and thoughts (there's a page with notes and
guidelines for contributions, please have a look before you post):
http://www.gotpike.org/PikeWiki
As always, comments and suggestions are welcome. I'll give you all a week
or so to bang on it before I share this with the general lists.
Bill
> Now IDA can do whatever they like... but if they do not, this is one
> more time a proof that pike is a language that is dying...
IDA provides free hosting. It does not provide free development; that
is ambition based, and your words of encouragement are better aimed at
the heroes who spend time making Pike better, of their own free will.
Hi there.
After thinking *why* coredump generated was getting both libraries
libpthreads and libc_r... I have tested pikefarm with forcing
library...using --with-thread-library flag.
Now it is working right on freebsd.home.oav.net so we can easyly
guess the autoconf is b0rken with freebsd > 5.0 about thread support.
Since CVS access is not working, can someone patch autoconf to
*avoid* -lc_r and -lpthread and/or -lthr on FreeBSD.
Defaut that should be used :
- FreeBSD < 5.0 : -lc_r (this is the _only_ thread library that exist)
- FreeBSD >= 5.0 < 5.3 : -lc_r (but -lkse, -lthr and -lpthread
exists. note that -lpthread is -lc_r on these version)
- FreeBSD >= 5.4 : -lpthread (but -lc_r, -lthr still exists).
Now this will fix all freebsd pikefarm from stock... and help all
FreeBSD developpers to *really* find the problems.
And this case was not "fix your OS" case, but fix the bloooooody
autoconf brain damage.
/Xavier
Hello,
I am trying to fix an oddyty with autoconf on freebsd that is still
including both -lpthreads and -lc_r on pikefarm...
But is seems that CVS is broken ?
Can someone check (hostname is kiwi.oav.net).
blackmagic:~/cvs/pike/Pike/7.7 kiwi$ cvs update -Pd
pike.ida.liu.se: Operation timed out
cvs [update aborted]: end of file from server (consult above messages if any)
blackmagic:~/cvs/pike/Pike/7.7 kiwi$ cvs update -Pd
pike.ida.liu.se: Operation timed out
cvs [update aborted]: end of file from server (consult above messages if any)
blackmagic:~/cvs/pike/Pike/7.7 kiwi$
/Xavier