hi,
a group of students here is working on a project that involves sTeam.
they are using uml and they would like to generate pike code from it,
has anything like this been attemted yet?
greetings, martin.
2
1
Language comparisions
by Martin Nilsson (ja till euro, nej till cent) @ Pike (-) developers forum
05 Sep '03
05 Sep '03
I have spent the day adding a Pike column to some more language
comparisions on the net, and thought it wise to save some info on where
Pike failed:
Python and Perl has a three way (</=/>) comparision function "cmp".
Should Pike have one, and where?
Pliant has a four way (</=/>/not comparable) comparision function
"compare". Should Pike that instead or at all?
Should we make an eval function like most other languages.
mixed eval(string x) {
return compile_string("mixed foo(){ "+x+";}")()->foo();
}
Should we have an identity function for the fun of it (Haskell has id
and Smalltalk has yourself)?
Should upper_case and lower_case be able to operate on integers
(chars)?
Should we add Array.shift and Array.pop to remove elements in either end
of the Array?
Should we add Array.zip and Array.unzip to merge and split arrays.
Should we add Array.partition that splits an array into two (like filter
with two outputs)?
Should we add Array.exists/any to determine if at least one element
satisfies a criterion and Array.every/all to determine if the all are?
Should we add the possibility to define default values for types, e.g.
typedef int myint = 7;
Do we need a Math.divmod?
Questions, questions...
9
28
foreach problem
by Martin Stjernholm, Roxen IS @ Pike developers forum
05 Sep '03
05 Sep '03
I was bit yesterday by a bug/misfeature in foreach regarding
iterators. After getting the index and/or value from the iterator, it
increments it before executing the loop code. I.e. the following will
throw an error:
String.Iterator iter = String.Iterator ("foo");
foreach (iter; int idx;)
if (idx != iter->index()) error ("wtf?\n");
I consider it a bug and intend to change foreach so that the iterator
is incremented after the loop instead.
Unfortunately that change can have nasty effects in code that expects
foreach to behave like this. I can either change it in 7.5 only and
fix some #pike 7.4 compatibility goo, or I can "ignore" the compat
issue and fix it in both 7.4 and 7.5. I'm actually inclined to do the
latter, under the assumption that there still is very little code that
use iterators this way (Grubbas new compiler is the only example I
know). If it stays as it is in 7.4 it can be cumbersome to update code
to 7.5.
Not sure though if we can get away with pulling a stunt like that this
long after the 7.4 release. Does anyone know of more code that depends
on this foreach quirk?
I've been fiddling with the Java support lately, and it appears that while
the Java bridge has no real documentation, it's pretty full featured. That
said, I'm trying to get a feel for the limitations, and ran into one that
just doesn't seem right:
if I create a new java array of any type other than string, I can't assign
values to it:
example using string:
import Java;
object t=machine->find_class("java/lang/String");
object o=pkg["java/lang/reflect/Array"]->newInstance(t, 5);
o[0]="foo";
o[1]="bar";
works just fine, but this example using integers doesnt:
import Java;
object t=machine->find_class("java/lang/Integer");
object o=pkg["java/lang/reflect/Array"]->newInstance(t, 5);
o[0]=12;
o[1]=5;
incompatible types passed to method.
jvm.c:3550: jvm.c:3550()->`[]=(0,1)
/usr/local/pike/7.4.20/lib/modules/Java.pmod:301: Java.jarray()->`[]=(0,1)
test.pike:7: test()->main()
Any ideas? I had been using java the manual way by manually connecting
methods, and it worked fine using Array.set() (admittedly a different
technique).
Thanks!
Bill
Hello,
I am trying to make Java support under FreeBSD (mostly for some .jsp
and some caudiumish things).
When I trying to search for java, the autoconf file does that :
###################################################
## Configuring module: Java
## Installation dir:
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether
/home/kiwi/xenoclient/pike-7.5/kiwi.isdnet.net/buildtmp/Pike7.5-
20030904-122007/build/freebsd-4.8-release-p3-i386/smartlink gcc accepts
-g... (cached) yes
checking if we are using TCC... (cached) no
checking how to run the C preprocessor... gcc -E
checking which operating system we are using... freebsd
checking which architecture we are using... i386
checking what kind of threads to use... native_threads
checking for working ls... /bin/ls
checking for JAVA_HOME... /usr/local/jdk1.3.1/jre
checking for Java libraries... /usr/local/jdk1.3.1/jre/lib/i386/classic
/usr/local/jdk1.3.1/jre/lib/i386
Adding /usr/local/jdk1.3.1/jre/lib/i386/classic
/usr/local/jdk1.3.1/jre/lib/i386 to the library search path.
checking for the Java include directory...
/usr/local/jdk1.3.1/jre/../include
Adding /usr/local/jdk1.3.1/jre/../include to the include search path.
Adding /usr/local/jdk1.3.1/jre/../include/freebsd to the include search
path.
checking for JavaVM (MacOS X)... no
checking for jni.h... yes
checking for winbase.h... (cached) no
checking for setjmp.h... (cached) yes
checking for sysOpen in -lhpi... no
checking for JNI_CreateJavaVM in -ljvm... no
checking for known machine language... x86
checking whether make sets ${MAKE}... (cached) yes
checking for the Pike base directory...
/home/kiwi/xenoclient/pike-7.5/kiwi.isdnet.net/buildtmp/Pike7.5-
20030904-122007/src
updating cache ../.././config.cache
configure: creating ./config.status
config.status: creating make_variables
config.status: creating Makefile
config.status: creating module.pmod.in
config.status: creating config.h
configure: configuring in MIME
configure: running /usr/local/bin/bash
'/home/kiwi/xenoclient/pike-7.5/kiwi.isdnet.net/buildtmp/Pike7.5-
20030904-122007/src/modules/MIME/configure'
--cache-file=../.././config.cache
--srcdir=/home/kiwi/xenoclient/pike-7.5/kiwi.isdnet.net/buildtmp/
Pike7.5-20030904-122007/src/modules/MIME
configure: loading cache ../.././config.cache
But ...
checking for JNI_CreateJavaVM in -ljvm... no
Is the most interresting part, config.log says :
configure:2450: checking for JNI_CreateJavaVM in -ljvm
configure:2471:
/home/kiwi/xenoclient/pike-7.5/kiwi.isdnet.net/buildtmp/Pike7.5-
20030904-122007/build/freebsd-4.8-release-p3-i386/smartlink gcc -o
conftest -g
-I/usr/local/include/pth -I/usr/local/jdk1.3.1/jre/../include/freebsd
-I/usr/loc
al/jdk1.3.1/jre/../include -I/usr/local/include -I/usr/X11R6/include
-L/usr/loc
al/jdk1.3.1/jre/lib/i386 -R/usr/local/jdk1.3.1/jre/lib/i386
-L/usr/local/jdk1.3.
1/jre/lib/i386/classic -R/usr/local/jdk1.3.1/jre/lib/i386/classic -g
-O2 -pipe -
I/usr/local/include/pth -L/usr/local/lib/pth conftest.c -ljvm -lm
-lpthread -lc
rypt >&5
/usr/local/jdk1.3.1/jre/lib/i386/classic/libjvm.so: undefined reference
to `setFPMode'
configure:2474: $? = 1
configure: failed program was:
#line 2459 "configure"
#include "confdefs.h"
#include <jni.h>
int
main ()
{
JNI_CreateJavaVM((JavaVM**)0,(void**)0,(void*)0);
;
return 0;
}
configure:2500: result: no
Now what it "sefFTPMode" and where does this thing comming from ?
/Xavier
could a news item be added to the pike site with the announcement below?
(the first paragraph with the new links could be used as the summary for
the front page)
Call for Participation and Contributions
Pike Conference 2003 - Sep 25-27
Pike In Distributed Knowledge Environments
http://pike.ida.liu.se/conferences/2003/
The Pike conference is only a few weeks away and it is time to
register, you can do that now on the conference website:
http://www.open-steam.org/conferences/pike2003/http://www.open-steam.org/conferences/pike2003/registration
Conference Information:
-----------------------
The conference is being held on the 25th to the 27th of september.
There is an extension to the 29th for Caudium specific topics.
The conference is held at Paderborn University in Germany and with
attendees coming from as far as Australia and New Zealand it is set
to be a good one!
After you have registered, you will be able update your registration
details right up until the day of the event.
If you have any further questions you may post them on the board inside
the conference area after logging in.
There will also be a FAQ available on the website in the next few days.
Submissions:
------------
Please note that the date for submissions of talks, presentations or
workshops has been changed and is now around the 18th of september.
Pike:
-----
This years conference is titled
"Pike in Distributed Knowledge Environments"
and we invite Pike programmers all over the world to meet in Paderborn,
to discuss and present how Pike is used, what development has been done
and what direction that development should take in the future.
Caudium:
--------
The Caudium extension is the first worldwide meeting of Caudium
developers and users, and we invite all of you who wish to be involved
in a brief catch-up with what has happened so far in the project, and
help choose direction for the future of the project. Any participants of
the Pike conference are welcome to join.
Cost:
-----
This years conference is being kindly sponsored by Paderborn University,
however there is a cost to organising these events and a small, as yet
undecided fee will be charged to all entrants. Rest assured that we
will endeavour to keep it as low as possible.
Thanks for your time and see you in Paderborn!
for the conference team (www.open-steam.org),
martin.
3
6
Re: Language comparisions
by Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
03 Sep '03
03 Sep '03
This is how you implement zip using zipWith in Haskell:
Prelude> zipWith (\a b -> (a,b)) [1,3,5,7] [2,4,6,8]
[(1,2),(3,4),(5,6),(7,8)]
Prelude>
(Actually, zip is defined as
zip = zipWith (\a b -> (a,b))
which works due to curryficiation.)
Hey all,
We didn't had all the answers we expected from Paderborn or german people
about the youth hotel yet, but we think it's time for booking now.
We are looking forward sleeping at the "Heiersburg" youth hotel located in
Paderborn (http://www.jugendherberge.de/jh/paderborn/)
- it's about 30 minutes walk from the conference place
- it's cheap (17.5 EUR / night)
- it could be nice to be many at the same place
- it looks nice
- it's not easy for non-native german people to look for accomodations in
Paderborn :)
So, here are the booking i'll do tonight at 23h00 (GMT+2), please correct me
if wrong, and contact me if you want to get a room there too:
* The hardcore Pike and Caudium conferencers, from the 25 to the 29
september (4 nights - arrival at Paderborn the 25 in the morning):
- bill (Bill WELLIVER)
- vida (David GOURDELIER)
* The Caudium-only conferencers (ie the unlucky ones), from the 26 to the 29
september (3 nights - arrival at Paderborn the 26 late in the evening):
- bertrand (Bertrand LUPART)
- daffy (Olivier WARIN)
- grendel (Marek HABERSACK)
- kiwi (Xavier BEAUDOUIN)
Not sure to come, yet:
- barbiche (Frédéric RENAULT)
- benoit (Benoit PLESSIS)
--
Bertrand LUPART Linkeo.com - R&D | http://www.linkeo.com/
+33 1 72 71 71 82 | 17, rue de la Banque - F75002 Paris
Systèmes de gestion d'email entrant | Email management systems
Hello guys,
first, I am new to the list, just subscribed some hours ago.
Well, I am also new to pike, I heard of pike for the first time
yesterday but I have to admit that it looks really promising and I'll
have a closer look at it ;)
I have committed an ebuild for pike-7.4.20 to gentoo's portage tree.
Gentoo users can install it just like every other ebuild, too.
For reference, you can also take a look at it using our viewcvs:
http://www.gentoo.org/cgi-bin/viewcvs.cgi/dev-lang/pike/
This is the initial commit of a pike ebuild so I'd be warmly interested
in every sucess and failure story regarding the ebuild ;-)
With your feedback I hope to steadily improve the pike ebuilds and get
it into the stable tree quite soon.
--
Rainer Groesslinger
http://dev.gentoo.org/~scandium/