Re: [Freeciv-Dev] (PR#21625) PATCH - improved hash tables

2006-10-05 Thread Vasco Alexandre da Silva Costa

http://bugs.freeciv.org/Ticket/Display.html?id=21625 >

Freeciv uses some C99 features. C99 has integer types which are guaranteed
to fit pointer values:
intptr_t and uintptr_t from inttypes.h. Although from a first glace at the
code this does not seem to be a problem.

This is the ugliest bit I found:
---
+#undef get16bits
+#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
+  || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
+#define get16bits(d) (*((const uint16_t *) (d)))
+#endif
+
+#if !defined (get16bits)
+#define get16bits(d) const uint8_t *)(d))[1] << UINT32_C(8))\
+  +((const uint8_t *)(d))[0])
+#endif
---

Basically the first case caters for a little-endian X86 architecture. I am
somewhat unsure what this
macro is supposed to do, but my guess is it is meant to snarf 16-bits in
little endian order.

I think the second case would work on a big-endian architecture. This sort
of #ifdef'ing is against
autoconf style. The check should IMO be for endianness not any specific
compiler. Alternatively,
forget the little tin god and just use the, more generic, second macro
definition.

On 10/5/06, book <[EMAIL PROTECTED]> wrote:
>
>
> http://bugs.freeciv.org/Ticket/Display.html?id=21625 >
>
>
>
> - Original Message Follows -
> From: "Per I. Mathisen" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: [Freeciv-Dev] (PR#21625) PATCH - improved hash
> tables
> Date: Wed, 4 Oct 2006 12:01:18 -0700
>
> > Are those pointer conversion macros 64bit safe? For all
> > types of common  64bit systems?
>
> No idea. As I don't have a 64bit system to test, never
> programmed on one, and
> only made the conversion macros by monkeying glib :).
>
> Actually a better way to construct the macros would be to
> have sizeof check for
> pointers in configure.ac and then use AC_DEFINE (or
> whatever) to substitute in
> the correct cast expression (this is the way glib actually
> does it, I got lazy).
>
>
>
>
> ___________
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>



-- 
Vasco Alexandre da Silva Costa

Freeciv uses some C99 features. C99 has integer types which are guaranteed to fit pointer values:intptr_t and uintptr_t from inttypes.h. Although from a first glace at the code this does not seem to be a problem.
This is the ugliest bit I found:---+#undef get16bits+#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \+  || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
+#define get16bits(d) (*((const uint16_t *) (d)))+#endif++#if !defined (get16bits)+#define get16bits(d) const uint8_t *)(d))[1] << UINT32_C(8))\+  +((const uint8_t *)(d))[0])
+#endif---Basically the first case caters for a little-endian X86 architecture. I am somewhat unsure what thismacro is supposed to do, but my guess is it is meant to snarf 16-bits in little endian order.
I think the second case would work on a big-endian architecture. This sort of #ifdef'ing is againstautoconf style. The check should IMO be for endianness not any specific compiler. Alternatively,forget the little tin god and just use the, more generic, second macro definition.
On 10/5/06, book <[EMAIL PROTECTED]> wrote:
http://bugs.freeciv.org/Ticket/Display.html?id=21625 >- Original Message Follows -From: "Per I. Mathisen" <
[EMAIL PROTECTED]>To: [EMAIL PROTECTED]Subject: Re: [Freeciv-Dev] (PR#21625) PATCH - improved hashtablesDate: Wed, 4 Oct 2006 12:01:18 -0700
> Are those pointer conversion macros 64bit safe? For all> types of common  64bit systems?No idea. As I don't have a 64bit system to test, neverprogrammed on one, andonly made the conversion macros by monkeying glib :).
Actually a better way to construct the macros would be tohave sizeof check forpointers in configure.ac and then use AC_DEFINE (orwhatever) to substitute inthe correct cast _expression_ (this is the way glib actually
does it, I got lazy).___Freeciv-dev mailing listFreeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev-- Vasco Alexandre da Silva Costa
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#21635) PATCH - asynchronous DNS core (and a few other things...)

2006-10-05 Thread Vasco Alexandre da Silva Costa

http://bugs.freeciv.org/Ticket/Display.html?id=21635 >

Holy crap.

The "Beerware" DNS code seems to be really special cased.
Goes to the point of reading "/etc/resolv.conf" in UNIX and doing some
registry funkyness in Windows.

I suspect there is an easier and more portable way of doing this.
I wonder if the Mozilla or Apache people haven't already solved this
problem.

Anyway, I can accept that evilness in the DNS IP checking code if you
provide some option for the user to override the DNS IP check (e.g. via an
environment variable).

On 10/5/06, book <[EMAIL PROTECTED]> wrote:
>
>
> http://bugs.freeciv.org/Ticket/Display.html?id=21635 >
>
> This patch requires my improved hash tables (21625).
>
> freeciv_S2_1_r12321-004-shared_improvements.diff:
> - get_file_size (for future use).
> - strchrcount (convenience).
> - data_free_func_t needed by async functions.
>
> freeciv_S2_1_r12321-005-support_improvements.diff:
> - Portable version of tmpfile: my_tmpfile. Also removes duplicate
>   code from net_lookup_service functions.
>
> freeciv_S2_1_r12321-006-adns_core_and_netintf_improvements.diff:
> - Adds data_free_func_t typedef to utility/shared.h (this is required
>   for most functions that take a callback data parameter).
> - Adds files in utility tadns.[ch], low level dns network functions
>   (tested and known to work on win32 and linux). Based on Sergey
>   Lyubka's TADNS mini-library, though now heavily modified (to support
>   reverse name lookups, among other things). utility/Makefile.am
>   modified appropriately.
> - higher level adns API added to utility/netintf.[ch]:
>   + adns_get_socket_fd - returns the UDP socket fd used for dns queries.
>   + adns_free - shutdown the adns subsystem.
>   + adns_is_available - returns TRUE if the adns subsystem was
> successfully initialized and is usable.
>   + adns_check_expired - checks the dns cache for stale entries and
> removes them.
>   + adns_init - initializes the adns subsystem.
>   + adns_poll - checks for responses on the dns UDP socket.
>   + adns_lookup/adns_lookup_full/adns_reverse_lookup - asynchronous
> functions (i.e. they call a callback when they obtain their
> results) for dns operations.
>   + adns_cancel - cancels an asynchronous DNS request in progress.
> - other functions added to utility/netintf.c:
>   + net_lookup_service_async - asynchornous equivalent to
> net_lookup_service.
>   + cancel_net_lookup_service - cancel a request made with the previous
> function.
>   + is_net_service_resolved - common code to net_lookup_service and
> net_lookup_service_async.
>   + my_socket_would_block - portable (at least win32 and linux) check
> whether the previous socket operation would block.
>   + my_socket_operation_in_progess - idem for EINPROGRESS.
> - my_nonblock made to work on win32 (by using ioctlsocket if
>   HAVE_WINSOCK is defined).
>
> Sorry if these patches mix too many new things into only a few patch
> files. If this is inconvenient I'll chop then up even more in the
> future.
>
>
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>
>
>
>


-- 
Vasco Alexandre da Silva Costa

Holy crap.The "Beerware" DNS code seems to be really special cased.Goes to the point of reading "/etc/resolv.conf" in UNIX and doing some registry funkyness in Windows.I suspect there is an easier and more portable way of doing this.
I wonder if the Mozilla or Apache people haven't already solved this problem.Anyway, I can accept that evilness in the DNS IP checking code if youprovide some option for the user to override the DNS IP check (
e.g. via an environment variable).On 10/5/06, book <[EMAIL PROTECTED]> wrote:
http://bugs.freeciv.org/Ticket/Display.html?id=21635 >This patch requires my improved hash tables (21625).freeciv_S2_1_r12321-004-shared_improvements.diff:
- get_file_size (for future use).- strchrcount (convenience).- data_free_func_t needed by async functions.freeciv_S2_1_r12321-005-support_improvements.diff:- Portable version of tmpfile: my_tmpfile. Also removes duplicate
  code from net_lookup_service functions.freeciv_S2_1_r12321-006-adns_core_and_netintf_improvements.diff:- Adds data_free_func_t typedef to utility/shared.h (this is required  for most functions that take a callback data parameter).
- Adds files in utility tadns.[ch], low level dns network functions  (tested and known to work on win32 and linux). Based on Sergey  Lyubka's TADNS mini-library, though now heavily modified (to support  reverse name lookups, among other things). utility/Makefile.am
  modified appropriately.- higher level adns API added to utility/netintf.[ch]:  + adns_get_

Re: [Freeciv-Dev] (PR#14382) Art: Diplomacy dialog graphics

2006-12-30 Thread Vasco Alexandre da Silva Costa

http://bugs.freeciv.org/Ticket/Display.html?id=14382 >

On 12/30/06, Daniel Markstedt <[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=14382 >
>
> A new set of diplomacy icons: same thumbs-up thumbs-down symbols, but
> upgraded to SVG. Based on PD by pratheep from Wikimedia Commons.

Nice!

-- 
Vasco Alexandre da Silva Costa



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] State of Civworld

2007-02-05 Thread Vasco Alexandre da Silva Costa

IIRC there were some port attempts, but there were too many changes to
the codebase
since then.

It was eventually decided that we should try to incorporate the
Civworld functionality
into the regular civclient, via an edit mode, changing it to enable
remote map editing.

I believe some of these features are in CVS right now, but support is
rudimentary
and poorly tested.

On 2/5/07, Daniel Markstedt <[EMAIL PROTECTED]> wrote:

I tried the old unofficial win32 build of Civworld from late 2004
(http://deepblue.sk/~r0b0/freeciv/
), and it seems to be working fine with 2.0.8. The instructions were
outdated though and potentially confusing, so I modified the package
slightly and uploaded to our ftp.

How much would the Civworld code for 2.0 have to be modified to work
with 2.1? Even though a build-in editor is in the works for 2.2, we
should still IMO have a Civworld 2.1.

 ~Daniel

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev




--
Vasco Alexandre da Silva Costa

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#35738) Kludge to fix infinite loop on edit mode

2007-02-11 Thread Vasco Alexandre da Silva Costa

http://bugs.freeciv.org/Ticket/Display.html?id=35738 >

Bug happens when typing "/obs" in the chatline after selecting edit mode
in the client menu.

Reported by Mike Kaufman and Jason Dorje Short.
Index: client/gui-gtk-2.0/menu.c
===
--- client/gui-gtk-2.0/menu.c	(revision 12623)
+++ client/gui-gtk-2.0/menu.c	(working copy)
@@ -589,12 +589,18 @@
   }
 }
 
+static int menu_updating = FALSE;
+
 /
   Callback function for when an item is chosen from the "editor" menu.
 /
 static void editor_menu_callback(gpointer callback_data,
  guint callback_action, GtkWidget *widget)
 {   
+  if (menu_updating) {
+return;
+  }
+
   switch(callback_action) {
   case MENU_EDITOR_TOGGLE:
 key_editor_toggle();
@@ -1337,6 +1343,8 @@
 
 menus_set_active("/_View/_Full Screen", fullscreen_mode);
 
+menu_updating = TRUE;
+
 menus_set_sensitive("/_Editor",
 			can_conn_enable_editing(&aconnection));
 menus_set_sensitive("/_Editor/_Tools",
@@ -1346,6 +1354,8 @@
 menus_set_active("/_Editor/Editing Mode",
 		 can_conn_edit(&aconnection));
 
+menu_updating = FALSE;
+
 /* Remaining part of this function: Update Orders menu */
 
 if (!can_client_issue_orders()) {
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#37436) [Patch] Base UnitFlag requirements

2007-03-03 Thread Vasco Alexandre da Silva Costa

http://bugs.freeciv.org/Ticket/Display.html?id=37436 >

> [EMAIL PROTECTED] - Sat Mar 03 21:50:23 2007]:
> 
> On 3/3/07, Per I. Mathisen <[EMAIL PROTECTED]> wrote:
> >
> > On Sat, 3 Mar 2007, Marko Lindqvist wrote:
> > > Remove hardcoded unit type flag requirements for building base.
> > > Instead ruleset defined "UnitFlag" requirements are used. As flag
> > > "Airbase" no longer has any hardcoded behavior, it is renamed as
> > > "User1".
> >
> > That makes no sense to me. User1?
> 
>  Flag behavior is completely defined by user (ruleset author). It is
> given to unit only for matching UnitFlag req.
> 
>  Do you have better naming convention for such flags? I think we
> should provide several such flags in the future.

How about allowing for ruleset definable flag names? That would make the
rulesets more readable when doing this kind of stuff and not require
changing the source code to add just one more ruleset specific flag.

---
Vasco Alexandre da Silva Costa


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#36617) Charset recoding problem

2007-03-03 Thread Vasco Alexandre da Silva Costa

http://bugs.freeciv.org/Ticket/Display.html?id=36617 >

On 2/23/07, Jason Dorje Short <[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=36617 >
>
> Egor Vyscrebentsov wrote:
> > http://bugs.freeciv.org/Ticket/Display.html?id=36617 >
> >
> > Good daytime!
> >
> > There is a problem in freeciv with recoding if string contains
> > symbol that is not present in target charset. Resulted string is
> > fully not recoded in this case.
> >
> > Detected on ru_RU.KOI8-R, gui-xaw civclient, civserver (!) are
> > affected.
>
> This is a known and longstanding bug.
>
> If you use GNU libiconv (as opposed to glibc iconv) the name will be
> transliterated (IIRC).  Or, if you use gui-gtk-2.0, utf-8 is used and
> this is not a problem (not sure about gui-sdl but I strongly suggest it
> use utf-8 also).  Or, if you use utf-8 as your local encoding then
> gui-xaw will use that also.
>
> gui-xaw could be backfitted to use utf-8 internally.  However this
> requires using utf-8 versions of all string formatting functions in xaw
> (hopefully this is possible).

It is possible. With a XFree86 extension that xorg also has.
It will not work on old X systems however.

-- 
Vasco Alexandre da Silva Costa



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Permission to make freeciv headers standard C/C++ compatible.

2007-06-03 Thread Vasco Alexandre da Silva Costa

On 6/3/07, James Supancic <[EMAIL PROTECTED]> wrote:


I'm working on a C++ GUI for freeciv. I need to make some calls into
the C component of client. The problem I'm running into is that the
freeciv header files are neither standard C or C++ compatible.

For example:
typedef enum a b;
enum a { A, B };

When this is compiled with g++ or 'gcc -pedantic' there will be an
error, if it is compiled with gcc there will be no error.



Why even compile with -pedantic in the first place?

Given this problem, I see three possible solutions:

1) Quit
2) update the freeciv headers
3) write a C++ compatible wrapper for the functions I need.

#3 would be the easiest in the short term, but long term it will
require a significant amount of additional work to maintain. #2 is the
best in the long term, but has significant dangers. In updating the
headers, I could possibly introduce bugs or break features.

I'd like to do #2, with permission from the freeciv development team.
However, I'm also willing to do #3 if they feel it is unsafe.

#2 will probably involve me moving around some typedefs so that they
don't come before enum declarations and refactoring the code to
eliminate the use of 'class' as an identifier (as this is a C++
reserved keyword), perhaps other things.

Thank you for your time,
James Steven Supancic III

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev





--
Vasco Alexandre da Silva Costa
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39391) Warnings in lua code

2007-06-10 Thread Vasco Alexandre da Silva Costa

http://bugs.freeciv.org/Ticket/Display.html?id=39391 >

On 6/10/07, Per I. Mathisen <[EMAIL PROTECTED]> wrote:
>
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39391 >
>
> On Sun, 10 Jun 2007, Jason Short wrote:
> On 6/10/07, Per I. Mathisen <[EMAIL PROTECTED]> wrote:
> >> How should we fix these? Modify lua code in repository, or try to
> upgrade
> >> it to a more recent lua version?
> >
> > Would upgrading help?  Anyone tried compiling a more recent lua with
> > all the -W parameters we use?
> >
> > What version of gcc/platform are you using?  I don't get these errors...
>
> I use Fedora 7.
>
> [EMAIL PROTECTED] ~]$ gcc --version
> gcc (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12)
>

Is this a X86-64 platform perchance?

'uname -a'

-- 
Vasco Alexandre da Silva Costa

On 6/10/07, Per I. Mathisen <[EMAIL PROTECTED]> wrote:
http://bugs.freeciv.org/Ticket/Display.html?id=39391 >On Sun, 10 Jun 2007, Jason Short wrote:On 6/10/07, Per I. Mathisen <
[EMAIL PROTECTED]> wrote:>> How should we fix these? Modify lua code in repository, or try to upgrade>> it to a more recent lua version?>> Would upgrading help?  Anyone tried compiling a more recent lua with
> all the -W parameters we use?>> What version of gcc/platform are you using?  I don't get these errors...I use Fedora 7.[EMAIL PROTECTED] ~]$ gcc --versiongcc (GCC) 4.1.2 20070502 (Red Hat 
4.1.2-12)Is this a X86-64 platform perchance?'uname -a'-- Vasco Alexandre da Silva Costa

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39391) Warnings in lua code

2007-06-16 Thread Vasco Alexandre da Silva Costa

http://bugs.freeciv.org/Ticket/Display.html?id=39391 >

On 6/11/07, Per I. Mathisen <[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39391 >
>
> On Sun, 10 Jun 2007, William Allen Simpson wrote:
> > But since getting various reports of warnings turning into fatal errors,
> > probably should upgrade the entire lua package.
>
> Anyone know which version we have in our repository? It does not say.

PR#12706: Add lua 5.0.2 and tolua 5.0 to the dependencies directory.

> > I'll note that included gettext is pretty old, too.
>
> I think we should just remove it. I do not think anyone use it. People
> either have gettext in their system, or just get it included with their
> binary download.

Agreed.

> Speaking of gettext, in recent versions it now has support for qualified
> strings. However, their solution is rather different than ours. We may
> want to convert eventually.
>
>
-- 
Vasco Alexandre da Silva Costa



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39391) Warnings in lua code

2007-06-16 Thread Vasco Alexandre da Silva Costa

http://bugs.freeciv.org/Ticket/Display.html?id=39391 >

On 6/11/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39391 >
>
> On 6/11/07, Per I. Mathisen <[EMAIL PROTECTED]> wrote:
> >
> > http://bugs.freeciv.org/Ticket/Display.html?id=39391 >
> >
> > On Sun, 10 Jun 2007, Vasco Alexandre da Silva Costa wrote:
> > >>> What version of gcc/platform are you using?  I don't get these errors...
> > >>
> > >> I use Fedora 7.
> > >>
> > >> [EMAIL PROTECTED] ~]$ gcc --version
> > >> gcc (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12)
> > >>
> > >
> > > Is this a X86-64 platform perchance?
> >
> > Yes.
> >
> >- Per
>
>  I studied this a bit a couple of months back. There should be old
> ticket for this.

I believe the warnings are about pointers cast to ints or back. This is used by
some tricks with pointer tables, which I guess are used by some interpreters.
If 32-bit pointers are being cast to 32-bit ints, it works. But if
64-bit pointers
are being cast to 32-bits, there is not enough space to fit the data.
A 64-bit int
type should be used then. Even better, since we use C99, intptr_t or
uintptr_t can
be used.

Of course, if the Lua people fixed this, we probably should just
upgrade. Otherwise
we should fix it and give them a patch.

-- 
Vasco Alexandre da Silva Costa



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Xcode Intel SDL almost working (no more X11) !

2007-06-16 Thread Vasco Alexandre da Silva Costa
On 6/17/07, mecanography <[EMAIL PROTECTED]> wrote:
> Wow... finaly got it kinda working... I launched a civserver through
> command line and could connect and start a game (build city,
> irrigation, move, enter huts, etc...), I just had a crash when trying
> to open unit info panel... The SDL client is very nice looking!
> (didn't test sound, is it working? because the option is dim out here).
>
> By the way, I found how to "properly" use DEFAULT_DATA_PATH (and let
> FREECIV_PATH alone)^^ now I must link the embedded civserver
> (hints?)! And I just found a definition for "readline" so I guess
> this option is pretty useless in this build (or does it serve kinda
> client-server operations? I doubt it but as I don't precisely know, a
> confirmation wuld be nice).
>
> Fact is the HAVE_CONFIG_H doesn't keep it defined value through .c
> code files on compile (surely an option I didn't check in Xcode) so I
> changed all headers needing it accordingly and it seems that headers
> order has importance especialy when "config.h" is involved. I guess
> most errors came from that.
>
> It's very nice to have a Cocoa SDL (though X11 was fine too), thanks
> to the SDL team!

The more users the better! It would be nice to have binary packages so
the other Mac users do not have to compile their own SDL client though.

> P.-S. I hope I'm not disturbing the serenity of the list by posting
> my findings ( there are questions as well, newby ones mostly sorry
> for that).

-- 
Vasco Alexandre da Silva Costa

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Xcode Intel SDL almost working (no more X11) !

2007-06-18 Thread Vasco Alexandre da Silva Costa
On 6/17/07, fmarlier <[EMAIL PROTECTED]> wrote:
> P.-.S your name ring a bell, Vasco do you make noise/abstract/ambient music
> and/or have you been related with James Plotkin on some projects?

Nah, I am affraid my musical skills are rather lacking. I do make lots
of noise though. :-)

-- 
Vasco Alexandre da Silva Costa

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] Future of this mailing list

2007-08-25 Thread Vasco Alexandre da Silva Costa
Hello,

As you are probably aware, I (vasc) am no longer actively coding for
this project. I used to be active in the past, before I, and the other
maintainers, felt we had better avenues to pursue and went elsewhere.
But we still have a place in our heart for this project. See:
http://www.ohloh.net/projects/3229/analyses/latest/contributors

We have some new manpower but the House of Freeciv is a bit ruined.

Dust and mothballs are piling up. I believe the first place to start
with, now that the game code and data, our crown jewels, are safe, is
communication. I believe e-mail lists, news, forums are relics of the past.

We should offload all our public group communications to Google Groups.

Why?
- Nearly everyone already has a Google account.
- The freeciv-dev and player forum discussions are public anyway.
- It takes no extra maintainer effort from us.
- It does e-mail and it does web forums.

Please discuss.

--
Vasco Alexandre da Silva Costa

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Future of this mailing list

2007-08-26 Thread Vasco Alexandre da Silva Costa
On 8/26/07, Daniel Markstedt <[EMAIL PROTECTED]> wrote:
> > I think that Freeciv still should have this mailing list, it's has
> > probably been crucial for the project in the past, and I don't think that
> > has changed much. Many of the successfull open source projects still use
> > mailing lists.

Are they GUI or command line projects?
Client or Server?
Game or Application?

Wesnoth uses forums and is growing stronger as we grow weaker.
I believe we need to take one step ahead of our team mates this time.
;-)

> > Why is the "House of Freeciv a bit ruined"? I would think that there are
> > still a lot of people interested in the project...  :-)

Just because a roof has leaks, it does not mean the leaks cannot be plugged.
:-)

> Google Groups are nice and spiffy and everything, but are they really
> a web forum replacement? One of the wonders with a web forum is the
> very low threshold of participation. I can think of several non-techie
> contributors who started out as anonymous posters there...

You mean moderation. I believe Google Groups has support for that.
It also has support for e-mail. Plus most people are already registered Google
users. Win-win.

> Vasco, by "dust and mothballs" do you mean in the code base, or is it
> the infrastructure that is collecting dust?

Everything. But the infrastructure is worst. We should focus on the worst
problem first. It does not mean the other problems cannot be fixed in parallel
however. Just help where you wish and can.

-- 
Vasco Alexandre da Silva Costa

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Future of this mailing list

2007-08-26 Thread Vasco Alexandre da Silva Costa
Regarding Google Groups access controls:

===Choose an Access level===
Public - Anyone can read the archives. Anyone can join, but only
members can post messages, view the members list, create pages and
upload files.

Announcement-only - Anyone can read the archives. Anyone can join, but
only managers can post messages, view the members list, create pages
and upload files.

Restricted - People must be invited to join the group. Only members
can post messages, read the archives, view the members list, create
pages and upload files. Your group and its archives do not appear in
public Google search results or the directory.

==

I created some 'freeciv' groups. Took me a couple of seconds:
http://groups.google.com/group/freeciv-announce
http://groups.google.com/group/freeciv-commits
http://groups.google.com/group/freeciv-dev
http://groups.google.com/group/freeciv-i18n

Play for yourselves and see if its good enough or not. I think it will
take less time than
arguing about it. :-)

---
Vasco Alexandre da Silva Costa

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv web client

2007-08-27 Thread Vasco Alexandre da Silva Costa
On 8/26/07, Andreas Røsdal <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I sent a proposal about a web client for Freeciv some time ago.
> Now I've implemented a prototype / proof of concept.
>
> It uses a webservice which allows a browser to communicate with a
> civclient process on the server. The mapview is renederes using the canvas
> element which is drawn upon using Javascript.
>
> Screenshot:
> http://www.pvv.ntnu.no/~andrearo/freeciv-web-client.png
>
> Source code:
> http://www.pvv.org/~andrearo/webclient.tar.bz2
> http://www.pvv.org/~andrearo/architecture.png
>
> Requirements:
> csoap - http://csoap.sourceforge.net/
> Apache Axis - http://ws.apache.org/axis/
>
>
> It would be great with some feedback on the Freeciv C part of the
> webservice. It is found under /client/gui-web. The performance still has a
> way to go, perhaps someone has some suggestions.
>
> It currently should work with any browser supporting the canvas
> HTML element. This includes Firefox 1.5, Opera, Safari and even Internet
> Explorer (using excanvas from Google).

This looks very nice.

I thought we had to wait for web 3.0 and RIAs for someone to make this work.
I guess I was wrong.
:-)

-- 
Vasco Alexandre da Silva Costa

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] Fwd: Variable array var = { ...} is not displayed

2007-09-01 Thread Vasco Alexandre da Silva Costa
Hello folks,
I am forwarding this e-mail to the main Freeciv development list.

So young, and the metaserver project already has a bug report and patch.
:-)

-- Forwarded message --
From: Carl <[EMAIL PROTECTED]>
Date: Aug 21, 2007 6:30 PM
Subject: Variable array var = { ...} is not displayed
To: Vasco Alexandre da Silva Costa <[EMAIL PROTECTED]>



Please could you apply this patch. Variable array var = { ...} is not
displayed since players exist bcs variables $row["host"] and $row["port"] are
erase by the query.

I have posted ticket (PR#39598) at [EMAIL PROTECTED] Could close it in
same times. Tks

diff -urda trunk/metaserver.phtml orig/metaserver.phtml
--- orig/metaserver.phtml   2007-08-21 19:10:17.0 +0200
+++ trunk/metaserver.phtml  2007-08-21 19:17:40.0 +0200
@@ -262,6 +262,7 @@
 }

 $stmt="select * from players where
hostport=\"".$row["host"].":".$row["port"]."\" order by name";
+$stmt2="select * from variables where
hostport=\"".$row["host"].":".$row["port"]."\"";
 $res1 = fcdb_exec($stmt);
 $nr1 = fcdb_num_rows($res1);
 $output .= "nplayers = \"$nr1\"\n";
@@ -278,8 +279,7 @@
   $output .= "}\n";
 }

-$stmt="select * from variables where
hostport=\"".$row["host"].":".$row["port"]."\"";
-$res2 = fcdb_exec($stmt);
+$res2 = fcdb_exec($stmt2);
     $nr2 = fcdb_num_rows($res2);
 if ($nr2 > 0) {
   $output .= "vars = { \"name\", \"value\"\n";



Regards


___
  Message posté via/par Gna!
  http://gna.org/

-- 
Vasco Alexandre da Silva Costa

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] compilers that aren't C99

2009-01-04 Thread Vasco Alexandre da Silva Costa
On Fri, Jan 2, 2009 at 8:55 PM, Brandon Van Every  wrote:
> On Fri, Jan 2, 2009 at 3:08 PM, Marko Lindqvist  wrote:
>>
>>  I have been told that VisualStudio lacks several C99 features (and
>> has incompatible implementation for some, I believe) simply because
>> it's not even meant to be C compiler. It's an C++ compiler.
>
> I don't think "meant to be" is quite the right turn of phrase, since
> it is a C compiler.  Rather, as noted in that "wontfix" notice,
> Microsoft feels that its customers are C++ centric.  So they put their
> development resources into that, and not C99.
>
> I must admit, C++ having far more users than C is an argument with
> some weight.  Especially in the game industry: C is done for some
> things, but C++ is the primary resume skill.  You may not care about
> resume skills around here, but a lot of people feel that kind of
> justification is important for what projects they work on.  I have
> wondered how "Freeciv is strictly C" might impede developer retention.
>
> One could argue that GNU is C centric, being obsessed with the ability
> to bring up programs on all systems, no matter how obscure.  Also,
> most "advanced" languages that are not C++, like Scheme or Lisp or
> OCaml or whatnot, have a much easier time talking to C.

Actually, GCC usually supports C++ features before they are
implemented in Visual Studio.
Take TR1 functionality for example. One thing it tradiotionally lagged
behind was in code optimization, but even that has changed recently.

-- 
Vasco Alexandre da Silva Costa
PhD Student and Teaching Assistant at Department of Information
Systems and Computer Science
IST/Technical University of Lisbon

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] SourceForge services

2009-01-14 Thread Vasco Alexandre da Silva Costa
Hi folks,

I noticed SourceForge now offers Mediawiki, phpBB and Trac, among
other stuff, as hosted services:
http://alexandria.wiki.sourceforge.net/Hosted+Apps

That is something that could prove helpful to the project in the future.

Have a great new year,

-- 
Vasco Alexandre da Silva Costa
PhD Student and Teaching Assistant at Department of Information
Systems and Computer Science
IST/Technical University of Lisbon

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #20844] Effects.ruleset [effect_maint_player] has unknown req: Building" "Service Shop"

2013-05-28 Thread Vasco Alexandre da Silva Costa
"Player" range is used for small wonders. If the building is not a small
wonder it won't work.
"City" is the range used for checking if a particular city has that
improvement.


On Sat, May 25, 2013 at 4:59 PM, anonymous  wrote:

> URL:
>   <http://gna.org/bugs/?20844>
>
>  Summary: Effects.ruleset [effect_maint_player] has unknown
> req: Building" "Service Shop"
>  Project: Freeciv
> Submitted by: None
> Submitted on: Sat 25 May 2013 03:59:18 PM UTC
> Category: rulesets
> Severity: 3 - Normal
> Priority: 5 - Normal
>   Status: None
>  Assigned to: None
> Originator Email: nighto...@cox.net
>  Open/Closed: Open
>  Release: FreeCiv 2.4.0 Beta 2 gui-gtk 2.0 client
>  Discussion Lock: Any
> Operating System: Microsoft Windows
>  Planned Release:
>
> ___
>
> Details:
>
> Upgrade_Unit only works for Leonardo's Workshop
>
> Tried Several Variations
>
> [effect_maint_player]
> name = "Upgrade_Unit"
> value   = 1
> reqs=
> { "type", "name", "range"
>   "Building", "Service Shop", "RANGE"
> }
> Player and Continent Got same error
>
> Local and City Load and run but do not upgrade units
>
> more info and effects.ruleset add and building ruleset add in attached
> files i
> did have this working in freeciv 2.2.? i thing can't access  due to drive
> crash
>
>
>
> ___
>
> File Attachments:
>
>
> ---
> Date: Sat 25 May 2013 03:59:18 PM UTC  Name: Upgrade_Unit Problems.txt
>  Size:
> 3kB   By: None
>
> <http://gna.org/bugs/download.php?file_id=18008>
>
> ___
>
> Reply to this item at:
>
>   <http://gna.org/bugs/?20844>
>
> ___
>   Message sent via/by Gna!
>   http://gna.org/
>
>
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>



-- 
Vasco Alexandre da Silva Costa
PhD Student at Department of Information Systems and Computer Science
IST/Technical University of Lisbon
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-07-14 Thread Vasco Alexandre da Silva Costa
Using function pointers is seldom a good idea.
Also what will you do if the function calls take different parameters?


On Mon, Jul 14, 2014 at 9:17 AM, Marko Lindqvist <
no-reply.invalid-addr...@gna.org> wrote:

> URL:
>   <http://gna.org/patch/?4949>
>
>  Summary: [Metaticket] Get rid of massive switch-cases
>  Project: Freeciv
> Submitted by: cazfi
> Submitted on: Mon 14 Jul 2014 11:17:00 AM EEST
> Category: None
> Priority: 5 - Normal
>   Status: None
>  Privacy: Public
>  Assigned to: None
> Originator Email:
>  Open/Closed: Open
>  Discussion Lock: Any
>  Planned Release:
>
> ___
>
> Details:
>
> To at least open a ticket of something I've long wanted to do...
>
> We have a couple of switch - case constructs with a lot of cases (packet
> handling has a case for each packet number, ai effect evaluation for each
> effect type). While I haven't measured how much that affects our overall
> performance, checking against each case in often called functions certainly
> gives us some performance hit (I don't think any compiler can make major
> optimizations on this - feel free to correct me).
>
> My plan is to investigate possibilities to build function arrays, so that
> what
> currently is an case would be array index:
>
> switch (var) {
> case 0:
>   func0();
>   break;
> case 1:
>   func1();
>   break;
> case 2:
>   func2();
>   break
> ...
> }
>
> ->
>
> funcs[var]();
>
>
>
>
>
> ___
>
> Reply to this item at:
>
>   <http://gna.org/patch/?4949>
>
> _______
>   Message sent via/by Gna!
>   http://gna.org/
>
>
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>



-- 
Vasco Alexandre da Silva Costa
PhD Student at Department of Information Systems and Computer Science
IST/Technical University of Lisbon
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #13813] Where are the FUADEC pics?

2010-11-17 Thread Vasco Alexandre da Silva Costa
Last time I heard about the box it was somewhere in California. AFAIK it was
kept on until it crashed due to a hardware failure of some sort.
Paul and his family moved to Africa a couple of years back to do missionary
work. I do not know if he has come back or not. His website is at:
http://zastoupil.org/zblog/

On Wed, Nov 17, 2010 at 1:59 AM, Daniel Markstedt <
no-reply.invalid-addr...@gna.org> wrote:

>
> Follow-up Comment #3, bug #13813 (project freeciv):
>
> MIA are also a couple of of scripts and tools under
> old.freeciv.org/graphics/utils/ including tileselect-0.3.scm.gz and
> palettes.tar.gz.
>
> Perhaps Paul or Vasco knows where the old.freeciv.org box is at these
> days.
>
>___
>
> Reply to this item at:
>
>  <http://gna.org/bugs/?13813>
>
> ___
>   Message sent via/by Gna!
>   http://gna.org/
>
>
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>



-- 
Vasco Alexandre da Silva Costa
PhD Student at Department of Information Systems and Computer Science
IST/Technical University of Lisbon
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #13813] Where are the FUADEC pics?

2010-11-17 Thread Vasco Alexandre da Silva Costa
PS: Someone used to keep their own backup of the contents at old.freeciv.org.
I do not remember if it was Per or Jason. Perhaps they still have it.

On Wed, Nov 17, 2010 at 6:07 PM, Vasco Alexandre da Silva Costa <
vasco.co...@gmail.com> wrote:

> Last time I heard about the box it was somewhere in California. AFAIK it
> was kept on until it crashed due to a hardware failure of some sort.
> Paul and his family moved to Africa a couple of years back to do missionary
> work. I do not know if he has come back or not. His website is at:
> http://zastoupil.org/zblog/
>
>
> On Wed, Nov 17, 2010 at 1:59 AM, Daniel Markstedt <
> no-reply.invalid-addr...@gna.org> wrote:
>
>>
>> Follow-up Comment #3, bug #13813 (project freeciv):
>>
>> MIA are also a couple of of scripts and tools under
>> old.freeciv.org/graphics/utils/ including tileselect-0.3.scm.gz and
>> palettes.tar.gz.
>>
>> Perhaps Paul or Vasco knows where the old.freeciv.org box is at these
>> days.
>>
>>___
>>
>> Reply to this item at:
>>
>>  <http://gna.org/bugs/?13813>
>>
>> ___
>>   Message sent via/by Gna!
>>   http://gna.org/
>>
>>
>> ___
>> Freeciv-dev mailing list
>> Freeciv-dev@gna.org
>> https://mail.gna.org/listinfo/freeciv-dev
>>
>
>
>
> --
> Vasco Alexandre da Silva Costa
> PhD Student at Department of Information Systems and Computer Science
> IST/Technical University of Lisbon
>
>


-- 
Vasco Alexandre da Silva Costa
PhD Student at Department of Information Systems and Computer Science
IST/Technical University of Lisbon
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [task #7257] Find a new home for the wiki

2010-11-22 Thread Vasco Alexandre da Silva Costa
AFAIK sourceforge allows hosting per project Wikis using MediaWiki. However
I propose not to host the Wiki on the same service as the rest. Having
single points of failure is never nice.

On Mon, Nov 22, 2010 at 12:58 AM, Daniel Markstedt <
no-reply.invalid-addr...@gna.org> wrote:

>
> URL:
>  <http://gna.org/task/?7257>
>
> Summary: Find a new home for the wiki
> Project: Freeciv
>Submitted by: dmarks
>Submitted on: Monday 11/22/2010 at 09:58
> Should Start On: Monday 11/22/2010 at 00:00
>   Should be Finished on: Friday 01/22/2010 at 00:00
>Category: None
>Priority: 5 - Normal
>  Status: None
> Privacy: Private
>Percent Complete: 0%
> Assigned to: None
> Open/Closed: Open
> Discussion Lock: Any
>  Effort: 0.00
> Planned Release:
>
>___
>
> Details:
>
> To find a new home for the Freeciv wiki, currently hosted by Wikia.
>
> Database dumps for each localized wiki available from:
>
> http://freeciv.wikia.com/wiki/Special:Statistics
> http://ca.freeciv.wikia.com/wiki/Especial:Estad%C3%ADstiques
> http://da.freeciv.wikia.com/wiki/Speciel:Statistik
> http://de.freeciv.wikia.com/wiki/Spezial:Statistik
> http://es.freeciv.wikia.com/wiki/Especial:Estad%C3%ADsticas
> http://fi.freeciv.wikia.com/wiki/Toiminnot:Tilastot
> http://fr.freeciv.wikia.com/wiki/Sp%C3%A9cial:Statistiques
> http://ja.freeciv.wikia.com/wiki/%E7%89%B9%E5%88%A5:%E7%B5%B1%E8%A8%88
>
> http://ru.freeciv.wikia.com/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Statistics
>
>
>
>
>___
>
> Reply to this item at:
>
>  <http://gna.org/task/?7257>
>
> ___
>  Message sent via/by Gna!
>  http://gna.org/
>
>


-- 
Vasco Alexandre da Silva Costa
PhD Student at Department of Information Systems and Computer Science
IST/Technical University of Lisbon
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [task #7257] Find a new home for the wiki

2010-11-22 Thread Vasco Alexandre da Silva Costa
On Mon, Nov 22, 2010 at 1:55 AM, David Zuccaro wrote:

> On Mon, 2010-11-22 at 01:58 +0100, Daniel Markstedt wrote:
>
> > To find a new home for the Freeciv wiki, currently hosted by Wikia.
>
> This is a good idea. There seems to be some sort of technical/political
> problem at wikia. Wikia now appears to be not compatible with
> firefox/iceweasel.
>
>
I use Firefox on Windows and Ubuntu Linux and I can see the website ok:
http://www.freeciv.org

'http://freeciv.org' is not working however. Perhaps there is a problem with
the redirect?

-- 
Vasco Alexandre da Silva Costa
PhD Student at Department of Information Systems and Computer Science
IST/Technical University of Lisbon
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] Fwd: SourceForge.net passwords reset

2011-02-15 Thread Vasco Alexandre da Silva Costa
-- Forwarded message --
From: SourceForge.net Team 
Date: Sat, Jan 29, 2011 at 1:50 AM
Subject: SourceForge.net passwords reset
To: vasco.co...@gmail.com


Hello,

We recently experienced a directed attack on SourceForge infrastructure
(http://sourceforge.net/blog/sourceforge-net-attack/) and so we are
resetting all passwords in the sf.net database -- just in case.  We're
e-mailing all sf.net registered account holders to let you know about this
change to your account.

Our investigation uncovered evidence of password sniffing attempts. We have
no evidence to suggest that your password has been compromised. But, what
we definitely don't want is to find out in 2 months that passwords were
compromised and we didn't take action.

So, as a proactive measure we've invalidated your SourceForge.net account
password. To access the site again, you'll need to go through the email
recovery process and choose a shiny new password:

https://sourceforge.net/account/registration/recover.php

If you need help with this, feel free to e-mail us:

sfnet_...@geek.net

We appreciate your patience with us as we work to respond to this attack.
We'll be working through the weekend to get things back to normal as
quickly as possible.

Watch for updates on the service outages on our blog:

http://sourceforge.net/blog/

Thank you,

The SourceForge Team

--
SourceForge.net has made this mailing to you as a registered user of
the SourceForge.net site to convey important information regarding
your SourceForge.net account or your use of SourceForge.net services.

We make a small number of directed mailings to registered users each
year regarding their account or data, to help preserve the security of
their account or prevent loss of data or service access.

If you have concerns about this mailing please contact our Support
team per: http://sourceforge.net/support



-- 
Vasco Alexandre da Silva Costa
PhD Student at Department of Information Systems and Computer Science
IST/Technical University of Lisbon
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv should have the "Terra" mapscript from Civilization 4

2015-05-26 Thread Vasco Alexandre da Silva Costa
The Aztecs were not "wandering barbarian units" and even North America had
settled areas, farmers and fishermen before the Europeans came. The
Americas were not something out of a cowboy movie.

On Sun, May 24, 2015 at 11:19 AM, Jim K  wrote:

> What is the point of simulating the technologies from the Voyages of
> Discovery if there is no New World to discover? Sure, there are other
> continents, but they are no different from your home continent due to the
> fact that they carry the same advanced civilizations. I mean as in, a
> large, empty, almost-entirely undisturbed hemisphere ready to be exploited.
>
> I have no experience with coding, so pardon my ignorance if these requests
> seem too large, but why not have a map generation type that simply puts in
> 2 continent-shaped blobs. The "Old World", where all the players start,
> will be larger to accomodate the density of many civs stuck on one
> landmass, and represent how large Afro-Eurasia is compared to the Americas.
>
> The "New World" will have plenty more resources to encourage Colonisation,
> as well as limited wandering barbarian units to represent native peoples.
>
> I can understand if this task is too difficult, and I may be asking the
> wrong person, but if you do know who to send it to, please do.
>
> *But if there is a way to simply manipulate the custom game options, to
> get something like I described above, or any custom-made maps from the Wiki
> starting all players in a single landmass, please inform me.*
>
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>
>


-- 
Vasco Alexandre da Silva Costa
PhD Student at Department of Information Systems and Computer Science
Instituto Superior Técnico/University of Lisbon, Portugal
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Freeciv should have the "Terra" mapscript from Civilization 4

2015-05-26 Thread Vasco Alexandre da Silva Costa
The way this is reproduced in games like Europa Universalis is that nations
in the Americas and Africa have a reduced tech research rate due to their
'culture'. EU has nation, race, culture attributes. The race attributes
influence the ease of assimilation of conquered lands and revolt risk.

On Tue, May 26, 2015 at 3:29 PM, Vasco Alexandre da Silva Costa <
vasco.co...@gmail.com> wrote:

> The Aztecs were not "wandering barbarian units" and even North America had
> settled areas, farmers and fishermen before the Europeans came. The
> Americas were not something out of a cowboy movie.
>
> On Sun, May 24, 2015 at 11:19 AM, Jim K  wrote:
>
>> What is the point of simulating the technologies from the Voyages of
>> Discovery if there is no New World to discover? Sure, there are other
>> continents, but they are no different from your home continent due to the
>> fact that they carry the same advanced civilizations. I mean as in, a
>> large, empty, almost-entirely undisturbed hemisphere ready to be exploited.
>>
>> I have no experience with coding, so pardon my ignorance if these
>> requests seem too large, but why not have a map generation type that simply
>> puts in 2 continent-shaped blobs. The "Old World", where all the players
>> start, will be larger to accomodate the density of many civs stuck on one
>> landmass, and represent how large Afro-Eurasia is compared to the Americas.
>>
>> The "New World" will have plenty more resources to encourage
>> Colonisation, as well as limited wandering barbarian units to represent
>> native peoples.
>>
>> I can understand if this task is too difficult, and I may be asking the
>> wrong person, but if you do know who to send it to, please do.
>>
>> *But if there is a way to simply manipulate the custom game options, to
>> get something like I described above, or any custom-made maps from the Wiki
>> starting all players in a single landmass, please inform me.*
>>
>> ___
>> Freeciv-dev mailing list
>> Freeciv-dev@gna.org
>> https://mail.gna.org/listinfo/freeciv-dev
>>
>>
>
>
> --
> Vasco Alexandre da Silva Costa
> PhD Student at Department of Information Systems and Computer Science
> Instituto Superior Técnico/University of Lisbon, Portugal
>



-- 
Vasco Alexandre da Silva Costa
PhD Student at Department of Information Systems and Computer Science
Instituto Superior Técnico/University of Lisbon, Portugal
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [patch #6938] [Metaticket] Get rid of gtkpixcomm

2016-02-09 Thread Vasco Alexandre da Silva Costa
GtkPixcomm is a widget I ported over from the Xaw client to GTK+. At the
time GTK+'s GtkImage widget had memory leaks and did not include rectangle
drawing routines. Without GtkPixcomm the Freeciv client would increase its
memory resource usage quickly over the course of 30 minutes because of the
memory leaks. You could test this easily by opening a city dialog and
running a game with AIs on auto and took at the memory consumption of the
client with 'top'.

I hope GTK+ upstream fixed those memory leaks. But then again I don't know
which widgets you are using atm.

On Tue, Feb 9, 2016 at 3:08 PM, Marko Lindqvist <
no-reply.invalid-addr...@gna.org> wrote:

> URL:
>   <http://gna.org/patch/?6938>
>
>  Summary: [Metaticket] Get rid of gtkpixcomm
>  Project: Freeciv
> Submitted by: cazfi
> Submitted on: Tue 09 Feb 2016 05:08:45 PM EET
> Category: client-gtk-3.0
> Priority: 5 - Normal
>   Status: None
>  Privacy: Public
>  Assigned to: None
> Originator Email:
>  Open/Closed: Open
>  Discussion Lock: Any
>  Planned Release: 2.6.0, 3.0.0
>
> ___
>
> Details:
>
> This has been in my TODO for some time, but with very slow progress.
> Gtkpixcomm is remnant from gtk+-1.2 time. It seems that gtk+ dropped it,
> but
> we kept internal copy and carried it over to gtk+-2, and then to gtk+-3.
> gtk2-client can probably keep on using it to the end (already coming near)
> but
> gtk3- and especially gtk3x-client should switch to supported solutions.
>
> There's know breakaga at the moment: msys2 mingw64 version of gtk3-client
> does
> not build because of problems in gtkpixcomm. For a quick resolution (to get
> something working on msys2 win64) for that one we probably still need to
> make
> fix to gtkpixcomm, though we should get rid of gtkpixcomm soon anyway.
>
>
>
>
> ___
>
> Reply to this item at:
>
>   <http://gna.org/patch/?6938>
>
> ___
>   Message sent via/by Gna!
>   http://gna.org/
>
>
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>



-- 
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [patch #6938] [Metaticket] Get rid of gtkpixcomm

2016-02-10 Thread Vasco Alexandre da Silva Costa
Feh, it seems that GTK+ 3.x itself uses deprecated code inside GtkImage
(which is not deprecated). e.g.:
https://git.gnome.org/browse/gtk+/tree/gtk/gtkimage.c

G_GNUC_BEGIN_IGNORE_DEPRECATIONSG_DEFINE_TYPE_WITH_PRIVATE (GtkImage,
gtk_image, GTK_TYPE_MISC)
G_GNUC_END_IGNORE_DEPRECATIONS

https://git.gnome.org/browse/gtk+/tree/gtk/gtkimage.h

#include 


Even GtkLabel is like this. I would just do the same thing they do in the
GTK+ 3.x widgets. Silence the warnings.
Once they actually figure out how to reimplement the GtkMisc derived
classes then this can be changed. When will that be 4.0?
https://wiki.gnome.org/Projects/GTK+/Roadmap

However it seems you still need to port some other things to port the
GtkPixcomm widget to 3.x. It's your call if GtkImage is useable enough
to replace GtkPixcomm as of GTK+ 3.x.

Just my two cents worth...


On Wed, Feb 10, 2016 at 9:59 PM, Marko Lindqvist <
no-reply.invalid-addr...@gna.org> wrote:

> Follow-up Comment #1, patch #6938 (project freeciv):
>
> The build problem is likely caused by the fact that parent class, GtkMisc,
> has
> been deprecated.
>
> See also vasco's comments on mailing list:
> http://mail.gna.org/public/freeciv-dev/2016-02/msg00332.html
>
> ___
>
> Reply to this item at:
>
>   <http://gna.org/patch/?6938>
>
> ___
>   Message sent via/by Gna!
>   http://gna.org/
>
>
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>



-- 
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [patch #6938] [Metaticket] Get rid of gtkpixcomm

2016-02-10 Thread Vasco Alexandre da Silva Costa
Feh, it seems that GTK+ 3.x itself uses deprecated code inside GtkImage
(which is not deprecated). e.g.:
https://git.gnome.org/browse/gtk+/tree/gtk/gtkimage.c

G_GNUC_BEGIN_IGNORE_DEPRECATIONSG_DEFINE_TYPE_WITH_PRIVATE (GtkImage,
gtk_image, GTK_TYPE_MISC)
G_GNUC_END_IGNORE_DEPRECATIONS

https://git.gnome.org/browse/gtk+/tree/gtk/gtkimage.h

#include 


Even GtkLabel is like this. I would just do the same thing they do in the
GTK+ 3.x widgets. Silence the warnings.
Once they actually figure out how to reimplement the GtkMisc derived
classes then this can be changed. When will that be 4.0?
https://wiki.gnome.org/Projects/GTK+/Roadmap
There is some patch to derive GtkImage from GtkWidget direct in the GTK+
Bugzilla but I would rather wait until it lands on something solid.

However it seems you still need to port some other things to port the
GtkPixcomm widget to 3.x. The destroy callback handler seems to be moved to
the finalize handler.

Just my two cents worth...


On Wed, Feb 10, 2016 at 9:59 PM, Marko Lindqvist <
no-reply.invalid-addr...@gna.org> wrote:

> Follow-up Comment #1, patch #6938 (project freeciv):
>
> The build problem is likely caused by the fact that parent class, GtkMisc,
> has
> been deprecated.
>
> See also vasco's comments on mailing list:
> http://mail.gna.org/public/freeciv-dev/2016-02/msg00332.html
>
> ___
>
> Reply to this item at:
>
>   <http://gna.org/patch/?6938>
>
> ___
>   Message sent via/by Gna!
>   http://gna.org/
>
>
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>



-- 
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Git migration; contributor details needed

2017-04-01 Thread Vasco Alexandre da Silva Costa
Hello,
IIRC my user id was either 'vas' or 'vasc' (maybe even both). You can use:
Vasco Costa  (my current e-mail address)

Regards,

On Sat, Apr 1, 2017 at 7:23 PM, Jacob Nevins <
0jacobnk@chiark.greenend.org.uk> wrote:

> With Gna shutting down, we intend to migrate the official source
> repository from Subversion to Git. (Currently we expect to host the
> result on Github.)
>
> I'm just getting started on this conversion (offline), but one thing
> that will be needed is full committer details of the form
>   Jacob Nevins <0jacobnk@chiark.greenend.org.uk>
> for every commit, where currently we just have local usernames like
> 'jtn'. Once we have published an official git history, these details
> will be essentially unchangeable for existing commits.
>
> If you have a preference as to how your commits will appear, please let
> me know, including your svn/CVS user ID. (If you send me a preference
> you'll probably save me time.)
>
> By default I will make some effort to track down real names and current
> public email addresses, starting with the most prolific contributors and
> probably stopping when I run out of time.
>
> I will use Gna real names where available, but I will not use your
> registered Gna email address if it's not public on Gna, unless I'm
> reasonably convinced it is otherwise a public email address for you.
> I'll also be using <http://www.freeciv.org/wiki/People> as a resource.
>
> For anyone I can't track down (or if I run out of time) I expect I'll
> use @freeciv.org (email to which will in most cases
> bounce; I don't intend to set up forwarding in the first instance).
>
> I don't currently intend to go through the history and populate separate
> author/committer fields correctly (except perhaps for the very early CVS
> history which was all committed by a user called 'freeciv'), so above
> I'm talking only about people who've actually committed to CVS or SVN.
>
> I've attached a list of distinct usernames found in the repository as of
> r35175, sorted alphabetically.
>
> =-=-=-=-=-
>
> I intend to use the reposurgeon tool, and broadly follow the method of
> <http://www.catb.org/~esr/reposurgeon/dvcs-migration-guide.html>,
> although not slavishly (for instance I'm not going to rewrite commit
> messages to have git-ish summaries, and I'd like to preserve svn
> revision information).
>
> I hope to put candidate histories up somewhere for review as they become
> available. I'm aiming to be done by the end of April, because that is
> the best guess we have about when Gna will shut down.
>
> At some point I'll have to declare svn.gna.org closed to further commits
> to enable the final migration; probably there will be a period where
> committing new code will not be possible.
>
> =-=-=-=-=-
>
> Help wanted:
>
>  - Do you know of pre-2006 mailing list archives (complete or partial)?
>(From when the mailing lists were @freeciv.org, hosted by
>complete.org.)
>gmane.org had them, but is not currently reliable.
>
>  - Do you know anything about the CVS->Subversion migration?
>Various evidence points to it happening 2005-10-11 and being done
>with 'cvs2svn'.
>If the pre-migration CVS repository (pile of ,v files) is preserved
>somewhere (even partially) that would be useful.
>(So that I can take the opportunity to investigate and rectify any
>history mangling during this conversion; everyone I know of who's
>done a svn->git migration says they found history badness from a
>previous CVS->svn migration. But this will not block the migration if
>it doesn't turn up.)
>
> ___
> Freeciv-dev mailing list
> Freeciv-dev@gna.org
> https://mail.gna.org/listinfo/freeciv-dev
>
>


-- 
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] gna.org (Freeciv code and mailing list host) is shutting down

2017-04-16 Thread Vasco Alexandre da Silva Costa
On Sun, Apr 16, 2017 at 12:47 PM, Jacob Nevins <
0jacobnk@chiark.greenend.org.uk> wrote:

> PS: if you are a veteran Freeciv admin or developer from the CVS era
> (2005 or before), and are happy to answer some questions, please get in
> touch with me personally or email freeciv-dev@gna.org; you may be able
> to help with the quality of the Git history conversion.
>

Like I said, I'm willing to help with the conversion if you need any info.
I began with this project when Mitch Davis was the admin.

Regards,

-- 
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [bug #21851] Possible memory leak in city dialog (in X server?)

2017-05-18 Thread Vasco Alexandre da Silva Costa
Guys,
I don't know if this is the issue but here is some info:
- if the memory leaks are severe it probably means we are leaking pixmaps
somewhere (it's the only thing that uses that much space).
- we had issues with severe memory leaks in citydlg.c when we did the
initial GTK+ 2.x client. I found out they were caused by the GtkImage
widgets back then (namely the units and possibly also the improvements
icons). that's why I eventually wrote the GtkPixcomm widget class (similar
to the one present in the Xaw client) to solve the memory leak and
performance issues back then. that supposedly solved the leaks.
- the production icons (added later) still used the standard GTK+ library
widgets (we never made our own specific list widget for this). so those
should use a lot of of memory. the fact is we shouldn't allocate any
pixmaps or pixbufs. We should just use the sprites data and redraw things
as necessary to avoid memory allocations.
- back then the easiest way to reproduce leaks was to repeatedly open and
close the city dialog.
- i also had issues with using Valgrind back then to debug the memory
leaks. but had some success with a leak detector tool that back then was
used developed by the GNOME developers (MemProf).

You guys should probably ask the GNOME or GTK+ developers what they
currently use to profile leak detection as they should have experience with
this. Valgrind should work but it's probably a configuration issue. See:
https://wiki.gnome.org/Valgrind

It hope this helps. I doubt there is a bug in X11 (it is usually pretty
well tested). I would not discount a bug in GTK+. But it is quite likely
the bug is in our application proper.

Regards,
-Vasco Costa
original GTK+/GTK+2.0 client port author.


On Thu, May 18, 2017 at 11:11 PM, David Fernandez <
no-reply.invalid-addr...@gna.org> wrote:

> Follow-up Comment #28, bug #21851 (project freeciv):
>
> I stopped playing freeciv for some time due to this issue, but I have no
> longer noticed this problem in my upgraded linux version:
> Kubuntu 15.10
> KDE Plasma 5.4.2
> gtk+ 2.24.28
> glib 2.46.2
>


-- 
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev