From hans at gambas-buch.de Mon Apr 1 09:13:41 2019 From: hans at gambas-buch.de (Hans Lehmann) Date: Mon, 1 Apr 2019 09:13:41 +0200 Subject: [Gambas-user] Profiling In-Reply-To: References: Message-ID: <0e00e5a9-af7a-ad15-df0c-f19ed0cde8da@gambas-buch.de> Thank you very much for the answers. That broadens the view of profiling enormously. Yours sincerely Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From shordi at gmail.com Thu Apr 4 09:02:31 2019 From: shordi at gmail.com (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Thu, 4 Apr 2019 09:02:31 +0200 Subject: [Gambas-user] Too much silence Message-ID: Hi, Just testing -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Thu Apr 4 09:08:14 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 4 Apr 2019 09:08:14 +0200 Subject: [Gambas-user] Too much silence In-Reply-To: References: Message-ID: Le jeu. 4 avr. 2019 09:03, Jorge Carri?n a ?crit : > Hi, > Just testing > Shhht we are working ? I'm studying flatpack/appimg for my side and you ? > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chrisml at deganius.de Thu Apr 4 10:08:19 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Thu, 4 Apr 2019 10:08:19 +0200 Subject: [Gambas-user] Too much silence In-Reply-To: References: Message-ID: Am 04.04.19 um 09:08 schrieb Fabien Bodard: > Shhht we are working ? Uaaahhhh .... sleeping ... ;-) Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From adamnt42 at gmail.com Thu Apr 4 10:13:04 2019 From: adamnt42 at gmail.com (Bruce) Date: Thu, 4 Apr 2019 18:43:04 +1030 Subject: [Gambas-user] Too much silence In-Reply-To: References: Message-ID: <4be9b5bc-abc5-02fb-20f7-72958ab61912@gmail.com> The noble man honours in himself the powerful one, him also who has power over himself, who knows how to speak and how to keep silence, who takes pleasure in subjecting himself to severity and hardness, and has reverence for all that is severe and hard like the gb.dbus component. Friedrich Nietzsche (sort of) B On 4/4/19 6:38 pm, Christof Thalhofer wrote: > Am 04.04.19 um 09:08 schrieb Fabien Bodard: > >> Shhht we are working ? > > Uaaahhhh .... sleeping ... ;-) > > > Alles Gute > > Christof Thalhofer > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From shordi at gmail.com Thu Apr 4 18:20:03 2019 From: shordi at gmail.com (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Thu, 4 Apr 2019 18:20:03 +0200 Subject: [Gambas-user] Too much silence In-Reply-To: <4be9b5bc-abc5-02fb-20f7-72958ab61912@gmail.com> References: <4be9b5bc-abc5-02fb-20f7-72958ab61912@gmail.com> Message-ID: I'm 6 months away from my retirement, so I've started delegating work to younger people and I've thinking about to write a novel. I started by writing my own software to write a novel ... but when it was 60% finished I found Manuskript ( https://www.theologeek.ch/manuskript/ made in python) which is exactly the program that I was doing... but finished! I stopped writing software and started with fun ... I think I'll do Good Old Space Opera.... ??? Best regards El jue., 4 abr. 2019 a las 10:14, Bruce () escribi?: > The noble man honours in himself the powerful one, him also who has > power over himself, who knows how to speak and how to keep silence, who > takes pleasure in subjecting himself to severity and hardness, and has > reverence for all that is severe and hard like the gb.dbus component. > Friedrich Nietzsche (sort of) > > B > > On 4/4/19 6:38 pm, Christof Thalhofer wrote: > > Am 04.04.19 um 09:08 schrieb Fabien Bodard: > > > >> Shhht we are working ? > > > > Uaaahhhh .... sleeping ... ;-) > > > > > > Alles Gute > > > > Christof Thalhofer > > > > > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at gambas-buch.de Mon Apr 8 17:38:23 2019 From: hans at gambas-buch.de (Hans Lehmann) Date: Mon, 8 Apr 2019 17:38:23 +0200 Subject: [Gambas-user] Where is the mistake? Message-ID: <78ccab90-09be-7e42-acd8-b945b563afc8@gambas-buch.de> Hello! Where is the mistake? Print "Time-Part:? "; Round(Frac(Now()), -8); " ? "; Format$(Time(Frac(Now())), "hh:nn:ss"); Format$(Time(Frac(Now())), "(t)") Print "Time-Part:? "; Round(Frac(Now()), -8); " ? "; Format$(Time(Now()), "hh:nn:ss"); Format$(Time(Now()), "(t)") Output: Time-Part:? 0,59328568 ? *14*:14:19 (CEST) ' UTC! Time-Part:? 0,59328568 ? *16*:14:19 (CEST) Regards Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bgfakapmkfhkheen.png Type: image/png Size: 2282 bytes Desc: not available URL: From taboege at gmail.com Mon Apr 8 18:20:04 2019 From: taboege at gmail.com (Tobias Boege) Date: Mon, 8 Apr 2019 18:20:04 +0200 Subject: [Gambas-user] Where is the mistake? In-Reply-To: <78ccab90-09be-7e42-acd8-b945b563afc8@gambas-buch.de> References: <78ccab90-09be-7e42-acd8-b945b563afc8@gambas-buch.de> Message-ID: <20190408162004.GA28012@highrise.localdomain> On Mon, 08 Apr 2019, Hans Lehmann wrote: > Hello! > > Where is the mistake? > > Print "Time-Part:? "; Round(Frac(Now()), -8); " ? "; Format$(Time(Frac(Now())), "hh:nn:ss"); Format$(Time(Frac(Now())), "(t)") > Print "Time-Part:? "; Round(Frac(Now()), -8); " ? "; Format$(Time(Now()), "hh:nn:ss"); Format$(Time(Now()), "(t)") > BTW, this could be written in a single Format$() call: Print "Time-Part:? "; Round(Frac(Now()), -8); " ? "; Format$(Time(Frac(Now())), "hh:nn:ss (t)") > Output: > > Time-Part:? 0,59328568 ? *14*:14:19 (CEST) ' UTC! > Time-Part:? 0,59328568 ? *16*:14:19 (CEST) > Dates in Gambas are not what you seem to think they are, or what people usually write on paper and call a "date". In Gambas a Date is a floating point value which points to a specific point in time (in UTC). There is no timezone attached to it -- as opposed to people, who have a timezone in mind when they talk about dates and times. Beno?t likes to say that "Dates are absolute in Gambas". The timezone is only applied when rendering this floating point value as a string, which is when the timezone makes a difference at all. Consequently, when you use "t" to get the timezone in Format$(), you are not reading off a property from the Date. The timezone is a property of your system and hence does not change depending on the Date you pass to Format$(). If you want to work with (Date, Timezone) pairs, have a look at how I did it in gb.web.feed. As for the following oddity: $ gbx3 -e 'CDate(1 + Frac(Now))' 01/01/-4801 18:14:44 $ gbx3 -e 'CDate(Frac(Now))' 16:14:49 It seems that a time-only date (which is what you get from calling Frac() on a date) are *not* subject to timezone calculations. As soon as the Date has a date part (a positive integral part in the Float representation), the system timezone is taken into account. If you think about it, it makes sense (at least a little): if you have no date, how are you going to handle the timezone calculation causing your time to overflow and the change the (non-existent) date? [ Or it might be a bug... ] Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From hans at gambas-buch.de Tue Apr 9 09:52:55 2019 From: hans at gambas-buch.de (Hans Lehmann) Date: Tue, 9 Apr 2019 09:52:55 +0200 Subject: [Gambas-user] Timezone format Message-ID: Hello. Does anyone know the reason why the offset to UTC does not have the official format ? HH*:*MM, but a gambas-specific format ? HHMM? With kind regards Hans -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Tue Apr 9 11:10:18 2019 From: taboege at gmail.com (Tobias Boege) Date: Tue, 9 Apr 2019 11:10:18 +0200 Subject: [Gambas-user] Timezone format In-Reply-To: References: Message-ID: <20190409091018.GA28655@highrise.localdomain> On Tue, 09 Apr 2019, Hans Lehmann wrote: > Hello. > > Does anyone know the reason why the offset to UTC does not have the official > format ? HH*:*MM, but a gambas-specific format ? HHMM? > "Official" by who? ISO 8601 [1] allows both formats. HHMM is not a gambas- specific format as it is the standard way of writing timezones in email, as per RFC 2822 [2]. Look at how your email client displays the timezone of this email, chances are it's HHMM. That said, I found that RFC 3339 [3] does require the colon in the middle. [ Note that RFCs are internet-related standards, so I don't know which should be given the greatest weight. ] So, my answer is: because it's a standard format used in electronic communication between humans. And it's very much not gambas-specific: it's not even Gambas who chooses this format, it's the C library's strftime(3), whose documentation makes a reference to said RFC 2822. Regards, Tobi [1] https://www.cl.cam.ac.uk/~mgk25/iso-time.html [2] https://www.ietf.org/rfc/rfc2822.txt [3] https://www.ietf.org/rfc/rfc3339.txt -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From g4mba5 at gmail.com Thu Apr 11 02:40:27 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 11 Apr 2019 02:40:27 +0200 Subject: [Gambas-user] Release of gambas 3.13 Message-ID: Hi, I have just released the 3.13 version of Gambas. It is available at: https://gitlab.com/gambas/gambas/-/archive/3.13.0/gambas-3.13.0.tar.bz2 It fixes many annoying bugs of Gambas 3.12, and add the following features: - JIT compilation is now done in background, speeding up program start. - The IDE now supports automatic translation tools. - File.RealPath() is a new method that canonicalizes a path, removing all its symbolic links. - Array.SortUsing() is a new method that sorts an array using an order defined by another array. - Array.Shuffle() is a new method that randomly shuffles the contents of an array. - TimeBox is a new control to enter durations. See http://gambaswiki.org/wiki/doc/release/3.13.0 for the detailed changelog. Enjoy it! -- Beno?t Minisini From sebikul at gmail.com Thu Apr 11 03:20:29 2019 From: sebikul at gmail.com (=?UTF-8?Q?Sebasti=C3=A1n_Kulesz?=) Date: Wed, 10 Apr 2019 22:20:29 -0300 Subject: [Gambas-user] Release of gambas 3.13 In-Reply-To: References: Message-ID: Hi Benoit! Awesome news!! Unfortunately, I'm going on holidays this Friday, and will be in the middle of nowhere without any kind of reception. I'm wary of pushing an update to the stable repo in this situation, as any issues would have to wait almost two weeks to be resolved. I will push an update as soon as I get back and have some time in my hands, but please be patient. I know some people depend on the PPA being stable, and I don't want to risk that. Sorry for the timing. I just wanted to report in case anybody asks in a week why the update hasn't gone through. Regards, Sebastian On Wed, Apr 10, 2019, 21:41 Beno?t Minisini wrote: > Hi, > > I have just released the 3.13 version of Gambas. It is available at: > > https://gitlab.com/gambas/gambas/-/archive/3.13.0/gambas-3.13.0.tar.bz2 > > It fixes many annoying bugs of Gambas 3.12, and add the following features: > > - JIT compilation is now done in background, speeding up program start. > > - The IDE now supports automatic translation tools. > > - File.RealPath() is a new method that canonicalizes a path, removing > all its symbolic links. > > - Array.SortUsing() is a new method that sorts an array using an order > defined by another array. > > - Array.Shuffle() is a new method that randomly shuffles the contents of > an array. > > - TimeBox is a new control to enter durations. > > See http://gambaswiki.org/wiki/doc/release/3.13.0 for the detailed > changelog. > > Enjoy it! > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Thu Apr 11 03:40:31 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 11 Apr 2019 03:40:31 +0200 Subject: [Gambas-user] Release of gambas 3.13 In-Reply-To: References: Message-ID: Le 11/04/2019 ? 03:20, Sebasti?n Kulesz a ?crit?: > Hi Benoit! Awesome news!! > > Unfortunately, I'm going on holidays this Friday, and will be in the > middle of nowhere without any kind of reception. I'm wary of pushing an > update to the stable repo in this situation, as any issues would have to > wait almost two weeks to be resolved. > > I will push an update as soon as I get back and have some time in my > hands, but please be patient. I know some people depend on the PPA being > stable, and I don't want to risk that. > > Sorry for the timing. I just wanted to report in case anybody asks in a > week why the update hasn't gone through. > > Regards, > Sebastian > No problem, happy holidays! -- Beno?t Minisini From bagonergi at gmail.com Thu Apr 11 11:13:02 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 11 Apr 2019 11:13:02 +0200 Subject: [Gambas-user] Slight error in master compilation Message-ID: Hi Benoit, the gambas3 master compilation is OK but the output return this: ... Installing gb.form.terminal... Compiling gb.term.form... nl.po:1:2: syntax error nl.po:1: the keyword "HEAD" is unknown nl.po:5: the keyword "a247c14d24b8edc4533cba6bf1b9240a4bf1463a" is unknown msgfmt: found 3 fatal errors gbc3: warning: unable to compile translation file with 'msgfmt': nl.po ... Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Thu Apr 11 14:37:20 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 11 Apr 2019 14:37:20 +0200 Subject: [Gambas-user] Eval wiki error Message-ID: Eval exsample two return the error: #11: Unknown symbol 'Font' in class 'Application' in http://gambaswiki.org/wiki/lang/eval Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Thu Apr 11 15:19:51 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 11 Apr 2019 15:19:51 +0200 Subject: [Gambas-user] Eval wiki error In-Reply-To: References: Message-ID: Le 11/04/2019 ? 14:37, Gianluigi a ?crit?: > Eval exsample two return the error: #11: Unknown symbol 'Font' in class > 'Application' in http://gambaswiki.org/wiki/lang/eval > > Regards > Gianluigi > Of course, the playground has no GUI. -- Beno?t Minisini From Karl.Reinl at Fen-Net.de Thu Apr 11 16:06:27 2019 From: Karl.Reinl at Fen-Net.de (Charlie Reinl) Date: Thu, 11 Apr 2019 16:06:27 +0200 Subject: [Gambas-user] gambas3 Version in IDE Message-ID: <1554991587.11168.5.camel@Scenic.local> Salut, update (git) some minutes ago, get 3.12.90 in IDE, is that right ? -- Amicalement Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: Bildschirmfoto vom 2019-04-11 16:00:29.png Type: image/png Size: 9592 bytes Desc: not available URL: From g4mba5 at gmail.com Thu Apr 11 16:55:32 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 11 Apr 2019 16:55:32 +0200 Subject: [Gambas-user] gambas3 Version in IDE In-Reply-To: <1554991587.11168.5.camel@Scenic.local> References: <1554991587.11168.5.camel@Scenic.local> Message-ID: <7167719e-72a7-651f-b76f-49f0393121f5@gmail.com> Le 11/04/2019 ? 16:06, Charlie Reinl a ?crit?: > Salut, > > update (git) some minutes ago, get 3.12.90 in IDE, is that right ? > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > The version has not been updated yet. -- Beno?t Minisini From bagonergi at gmail.com Thu Apr 11 19:29:56 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 11 Apr 2019 19:29:56 +0200 Subject: [Gambas-user] Eval wiki error In-Reply-To: References: Message-ID: Il giorno gio 11 apr 2019 alle ore 15:20 Beno?t Minisini ha scritto: > Le 11/04/2019 ? 14:37, Gianluigi a ?crit : > > Eval exsample two return the error: #11: Unknown symbol 'Font' in class > > 'Application' in http://gambaswiki.org/wiki/lang/eval > > > > Regards > > Gianluigi > > > > Of course, the playground has no GUI. > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > Right, I hadn't thought of it. But if it can't work, why create it? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Thu Apr 11 19:36:19 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Thu, 11 Apr 2019 19:36:19 +0200 Subject: [Gambas-user] Eval wiki error In-Reply-To: References: Message-ID: Le jeu. 11 avr. 2019 19:31, Gianluigi a ?crit : > > > Il giorno gio 11 apr 2019 alle ore 15:20 Beno?t Minisini > ha scritto: > >> Le 11/04/2019 ? 14:37, Gianluigi a ?crit : >> > Eval exsample two return the error: #11: Unknown symbol 'Font' in class >> > 'Application' in http://gambaswiki.org/wiki/lang/eval >> > >> > Regards >> > Gianluigi >> > >> >> Of course, the playground has no GUI. >> >> -- >> Beno?t Minisini >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > Right, I hadn't thought of it. > > But if it can't work, why create it? > Because it was here before playground > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Thu Apr 11 19:43:32 2019 From: bagonergi at gmail.com (Gianluigi) Date: Thu, 11 Apr 2019 19:43:32 +0200 Subject: [Gambas-user] Eval wiki error In-Reply-To: References: Message-ID: Il giorno gio 11 apr 2019 alle ore 19:37 Fabien Bodard ha scritto: > > > Le jeu. 11 avr. 2019 19:31, Gianluigi a ?crit : > >> >> >> Il giorno gio 11 apr 2019 alle ore 15:20 Beno?t Minisini < >> g4mba5 at gmail.com> ha scritto: >> >>> Le 11/04/2019 ? 14:37, Gianluigi a ?crit : >>> > Eval exsample two return the error: #11: Unknown symbol 'Font' in >>> class >>> > 'Application' in http://gambaswiki.org/wiki/lang/eval >>> > >>> > Regards >>> > Gianluigi >>> > >>> >>> Of course, the playground has no GUI. >>> >>> -- >>> Beno?t Minisini >>> >>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >>> >> >> Right, I hadn't thought of it. >> > > >> But if it can't work, why create it? >> > > Because it was here before playground > > >> Regards >> Gianluigi >> > I didn't know that playground is formed automatically. How does it work? Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Thu Apr 11 23:38:44 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Fri, 12 Apr 2019 00:38:44 +0300 Subject: [Gambas-user] Eval wiki error In-Reply-To: References: Message-ID: I think it just compiles the example code. What do you mean? Jussi On Thu, Apr 11, 2019 at 8:44 PM Gianluigi wrote: > > > Il giorno gio 11 apr 2019 alle ore 19:37 Fabien Bodard < > gambas.fr at gmail.com> ha scritto: > >> >> >> Le jeu. 11 avr. 2019 19:31, Gianluigi a ?crit : >> >>> >>> >>> Il giorno gio 11 apr 2019 alle ore 15:20 Beno?t Minisini < >>> g4mba5 at gmail.com> ha scritto: >>> >>>> Le 11/04/2019 ? 14:37, Gianluigi a ?crit : >>>> > Eval exsample two return the error: #11: Unknown symbol 'Font' in >>>> class >>>> > 'Application' in http://gambaswiki.org/wiki/lang/eval >>>> > >>>> > Regards >>>> > Gianluigi >>>> > >>>> >>>> Of course, the playground has no GUI. >>>> >>>> -- >>>> Beno?t Minisini >>>> >>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>> ]---- >>>> >>> >>> Right, I hadn't thought of it. >>> >> >> >>> But if it can't work, why create it? >>> >> >> Because it was here before playground >> >> >>> Regards >>> Gianluigi >>> >> > I didn't know that playground is formed automatically. > How does it work? > > Regards > Gianluigi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Fri Apr 12 09:24:03 2019 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 12 Apr 2019 09:24:03 +0200 Subject: [Gambas-user] Eval wiki error In-Reply-To: References: Message-ID: I think the playground is very nice, but the Run button should be present only where the code can work. Regards Gianluigi Il giorno gio 11 apr 2019 alle ore 23:39 Jussi Lahtinen < jussi.lahtinen at gmail.com> ha scritto: > I think it just compiles the example code. What do you mean? > > Jussi > > On Thu, Apr 11, 2019 at 8:44 PM Gianluigi wrote: > >> >> >> Il giorno gio 11 apr 2019 alle ore 19:37 Fabien Bodard < >> gambas.fr at gmail.com> ha scritto: >> >>> >>> >>> Le jeu. 11 avr. 2019 19:31, Gianluigi a ?crit : >>> >>>> >>>> >>>> Il giorno gio 11 apr 2019 alle ore 15:20 Beno?t Minisini < >>>> g4mba5 at gmail.com> ha scritto: >>>> >>>>> Le 11/04/2019 ? 14:37, Gianluigi a ?crit : >>>>> > Eval exsample two return the error: #11: Unknown symbol 'Font' in >>>>> class >>>>> > 'Application' in http://gambaswiki.org/wiki/lang/eval >>>>> > >>>>> > Regards >>>>> > Gianluigi >>>>> > >>>>> >>>>> Of course, the playground has no GUI. >>>>> >>>>> -- >>>>> Beno?t Minisini >>>>> >>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net >>>>> ]---- >>>>> >>>> >>>> Right, I hadn't thought of it. >>>> >>> >>> >>>> But if it can't work, why create it? >>>> >>> >>> Because it was here before playground >>> >>> >>>> Regards >>>> Gianluigi >>>> >>> >> I didn't know that playground is formed automatically. >> How does it work? >> >> Regards >> Gianluigi >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Fri Apr 12 09:39:01 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Fri, 12 Apr 2019 09:39:01 +0200 Subject: [Gambas-user] Eval wiki error In-Reply-To: References: Message-ID: Le ven. 12 avr. 2019 09:25, Gianluigi a ?crit : > I think the playground is very nice, but the Run button should be present > only where the code can work. > > Yes but if you want to check manually thousand pages... free to you ? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Fri Apr 12 09:52:42 2019 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 12 Apr 2019 09:52:42 +0200 Subject: [Gambas-user] Eval wiki error In-Reply-To: References: Message-ID: My current intent is to translate the whole wiki into Italian. If you believe it is in my abilities, and explain to me how to eliminate Run buttons without doing damage (I must be able to put them too), I start doing that too. Regards Gianluigi Il giorno ven 12 apr 2019 alle ore 09:40 Fabien Bodard ha scritto: > > > Le ven. 12 avr. 2019 09:25, Gianluigi a ?crit : > >> I think the playground is very nice, but the Run button should be present >> only where the code can work. >> >> Yes but if you want to check manually thousand pages... free to you ? > >> >> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Fri Apr 12 10:36:06 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Fri, 12 Apr 2019 10:36:06 +0200 Subject: [Gambas-user] Eval wiki error In-Reply-To: References: Message-ID: <8f6db1f1-c6f5-6ce5-4863-73a6a319348c@gmail.com> Le 12/04/2019 ? 09:52, Gianluigi a ?crit?: > My current intent is to translate the whole wiki into Italian. > If you believe it is in my abilities, and explain to me how to eliminate > Run buttons without doing damage (I must be able to put them too), I > start doing that too. > > Regards > Gianluigi > You can't at the moment. As soon as there is an example with output, the playground is embedded. I will see if I can add a css class to make the difference between examples and examples without playground. Regards, -- Beno?t Minisini From bagonergi at gmail.com Fri Apr 12 10:49:39 2019 From: bagonergi at gmail.com (Gianluigi) Date: Fri, 12 Apr 2019 10:49:39 +0200 Subject: [Gambas-user] Eval wiki error In-Reply-To: <8f6db1f1-c6f5-6ce5-4863-73a6a319348c@gmail.com> References: <8f6db1f1-c6f5-6ce5-4863-73a6a319348c@gmail.com> Message-ID: Il giorno ven 12 apr 2019 alle ore 10:37 Beno?t Minisini ha scritto: > Le 12/04/2019 ? 09:52, Gianluigi a ?crit : > > My current intent is to translate the whole wiki into Italian. > > If you believe it is in my abilities, and explain to me how to eliminate > > Run buttons without doing damage (I must be able to put them too), I > > start doing that too. > > > > Regards > > Gianluigi > > > > You can't at the moment. As soon as there is an example with output, the > playground is embedded. I will see if I can add a css class to make the > difference between examples and examples without playground. > > Regards, > > -- > Beno?t Minisini > > OK, even though my father-in-law always said "never offer you volunteer", when possible, I volunteer. :-) Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From clhamilto at gmail.com Mon Apr 15 01:27:12 2019 From: clhamilto at gmail.com (Curtis Hamilton) Date: Sun, 14 Apr 2019 19:27:12 -0400 Subject: [Gambas-user] Release of gambas 3.13 Message-ID: New JIT compilation in Gambas 3.13 release causes segfaults on FreeBSD/Powerpc64. See below is gdb output. root at lenoil8:/usr/local/bin # gdb gbx3 gbx3.core GNU gdb (GDB) 8.0.1 [GDB v8.0.1 for FreeBSD] Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "powerpc64-portbld-freebsd11.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from gbx3...(no debugging symbols found)...done. [New LWP 100775] [New LWP 100261] Core was generated by `gbr3 /usr/local/bin/gambas3'. Program terminated with signal SIGSEGV, Segmentation fault. #0 JIT_ctype_to_type (class=0x5082e568, ctype=...) at jit.c:113 113 CLASS_ARRAY *desc = class->load->array[ctype.value]; [Current thread is 1 (LWP 100775)] (gdb) backtrace #0 JIT_ctype_to_type (class=0x5082e568, ctype=...) at jit.c:113 #1 0x000000005ce903d4 in push_unknown (index=) at jit_body.c:906 #2 JIT_translate_body (func=0x508963e4, ind=) at jit_body.c:2945 #3 0x000000005ce8bd8c in JIT_translate_func (index=19, func=0x508963e4) at jit.c:354 #4 JIT_translate (name=, from=) at jit.c:490 #5 0x000000005ce719bc in Jit_Translate (_object=, _param=0x510171c0) at main.c:35 #6 0x0000000010065314 in ?? () #7 0x000000001005dee8 in ?? () #8 0x0000000010063f74 in ?? () #9 0x0000000010064804 in ?? () #10 0x0000000010031904 in ?? () #11 0x0000000010008660 in ?? () #12 0x00000000100124a4 in ?? () #13 0x0000000010013064 in ?? () #14 0x0000000010036084 in ?? () #15 0x0000000010052c4c in ?? () #16 0x000000001001ce30 in ?? () #17 0x000000001003be44 in ?? () #18 0x0000000010005aec in ?? () #19 0x00000000100065f8 in ?? () #20 0x0000000050092db0 in ._rtld_start () at /usr/src/libexec/rtld-elf/powerpc64/rtld_start.S:104 Backtrace stopped: frame did not save the PC (gdb) quit -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Apr 15 02:29:11 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 15 Apr 2019 02:29:11 +0200 Subject: [Gambas-user] Where is the mistake? In-Reply-To: <20190408162004.GA28012@highrise.localdomain> References: <78ccab90-09be-7e42-acd8-b945b563afc8@gambas-buch.de> <20190408162004.GA28012@highrise.localdomain> Message-ID: <79028350-36a7-4f81-abd8-27bb3bdb0872@gmail.com> Le 08/04/2019 ? 18:20, Tobias Boege a ?crit?: > It seems that a time-only date (which is what you get from calling Frac() > on a date) are *not* subject to timezone calculations. As soon as the Date > has a date part (a positive integral part in the Float representation), > the system timezone is taken into account. If you think about it, it makes > sense (at least a little): if you have no date, how are you going to handle > the timezone calculation causing your time to overflow and the change the > (non-existent) date? [ Or it might be a bug... ] > > Regards, > Tobi > It's intended exactly like you wrote: timezone is used only if there is a date. If there is only a time (i.e. the data part is zero), then the timezone is ignored when transforming it into a string. Regards, -- Beno?t Minisini From g4mba5 at gmail.com Mon Apr 15 02:30:29 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 15 Apr 2019 02:30:29 +0200 Subject: [Gambas-user] Release of gambas 3.13 In-Reply-To: References: Message-ID: <29f7ffeb-8a1a-328e-1abb-e396a42ca819@gmail.com> Le 15/04/2019 ? 01:27, Curtis Hamilton a ?crit?: > New JIT compilation in Gambas 3.13 release causes segfaults on > FreeBSD/Powerpc64. > > See below is gdb output. > > ... Is it possible for you to compile gambas without optimization, and give me an ssh access to your machine so that I can see what happend from the debugger? -- Beno?t Minisini From peterpeyotle at gmx.de Mon Apr 15 15:58:50 2019 From: peterpeyotle at gmx.de (Peter Peyotle) Date: Mon, 15 Apr 2019 15:58:50 +0200 Subject: [Gambas-user] gambas and sqlite3 Message-ID: <71ee4502-6799-f954-16aa-99895b1408a5@gmx.de> Hello and good day. I use Gambas 3.12.2 with Linux Mint LXDE 18.2. How do I tell Gambas which Sqlite3 version to use? I query the sqlite3 version in Gambas Ide with "select sqlite_version ()" I get 3.11. I ask in the shell with "sqlite - version" I get "not installed". OK. I install the most recent from the sqlite page about compiling I get with "sqlite --version" the correct installed version. In Gambas, however, still the 3.11. And gb.db.sqlite3 also uses these because the features like "select * from pragma_table_info ...." are not supported. Only from version 3.16. So Gambas really uses the 3.11. On my laptop I have the version 3.18 installed via another source with ppa with "sudo apt-get install ....". Here also in Gambas then the version 3.18 is displayed and the pragma functions are available. I think there has to be an environment variable or something similar for gb.db.sqlite3 to use the installed sqlite version as well. So how do I get Gambas to support the installed latest sqlite3 version as well? best regards Klaus-Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Tue Apr 16 01:08:00 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 15 Apr 2019 19:08:00 -0400 Subject: [Gambas-user] gambas and sqlite3 In-Reply-To: <71ee4502-6799-f954-16aa-99895b1408a5@gmx.de> References: <71ee4502-6799-f954-16aa-99895b1408a5@gmx.de> Message-ID: Perhaps you need to re-launch the IDE, or reboot your system for the change in version to get picked up. ___ Lee On 4/15/19 9:58 AM, Peter Peyotle wrote: > So how do I get Gambas to support the installed latest sqlite3 version as well? From bagonergi at gmail.com Tue Apr 16 13:41:41 2019 From: bagonergi at gmail.com (Gianluigi) Date: Tue, 16 Apr 2019 13:41:41 +0200 Subject: [Gambas-user] gambas and sqlite3 In-Reply-To: <71ee4502-6799-f954-16aa-99895b1408a5@gmx.de> References: <71ee4502-6799-f954-16aa-99895b1408a5@gmx.de> Message-ID: You could write what the terminal gives you: (first you need to install the sqlite3 command, no sqlite only) sudo apt install sqlite3 sqlite3 -version in Mint 19, I get: 3.22.0 To indicate to Gambas what you want to use you must write: Connection.Type = "sqlite3" [0] Regards Gianluigi [0] http://gambaswiki.org/wiki/comp/gb.db/_connection/type Il giorno lun 15 apr 2019 alle ore 15:59 Peter Peyotle ha scritto: > Hello and good day. > > I use Gambas 3.12.2 with Linux Mint LXDE 18.2. > How do I tell Gambas which Sqlite3 version to use? > I query the sqlite3 version in Gambas Ide with "select sqlite_version ()" > I get 3.11. > I ask in the shell with "sqlite - version" I get "not installed". OK. > I install the most recent from the sqlite page about compiling I get with > "sqlite --version" the correct installed version. In Gambas, however, still > the 3.11. And gb.db.sqlite3 also uses these because the features like > "select * from pragma_table_info ...." are not supported. Only from version > 3.16. So Gambas really uses the 3.11. > On my laptop I have the version 3.18 installed via another source with ppa > with "sudo apt-get install ....". > Here also in Gambas then the version 3.18 is displayed and the pragma > functions are available. > I think there has to be an environment variable or something similar for > gb.db.sqlite3 to use the installed sqlite version as well. > So how do I get Gambas to support the installed latest sqlite3 version as > well? > > best regards > Klaus-Peter > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedron at exede.net Sat Apr 20 18:15:13 2019 From: cedron at exede.net (Cedron Dawg) Date: Sat, 20 Apr 2019 12:15:13 -0400 (EDT) Subject: [Gambas-user] Comment Blocks Message-ID: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> Kind of slow around here, so here is something to ponder. I'm wondering what others think about the ability to have comment blocks. In C, I use them as intended, but they are also darn handy to block out sections of code while debugging. The same would be true in Gambas. I would suggest using the much underutilized reverse apostrophe (aka grave accent or backquote), living lonely under the tilde on most keyboards, in combination with the traditional apostrophe to make the demarcation quite clear. '` Anything here is comment...(including multiple lines)..... `' Kind of makes them look like stylish double quotes. I haven't tried these yet: http://gambaswiki.org/wiki/doc/helpcomments But they could be done as '`''' .... `' and '`'' .... `' respectively. Thoughts? From t.lee.davidson at gmail.com Sat Apr 20 19:20:06 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Sat, 20 Apr 2019 13:20:06 -0400 Subject: [Gambas-user] Comment Blocks In-Reply-To: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> Message-ID: Though not via bona fide comment blocks, we do have the ability to block out sections of code. Just highlight the block and then click the "Comment" button. ___ Lee On 4/20/19 12:15 PM, Cedron Dawg wrote: > Kind of slow around here, so here is something to ponder. > > I'm wondering what others think about the ability to have comment blocks. In C, I use them as intended, but they are also darn handy to block out sections of code while debugging. The same would be true in Gambas. > > I would suggest using the much underutilized reverse apostrophe (aka grave accent or backquote), living lonely under the tilde on most keyboards, in combination with the traditional apostrophe to make the demarcation quite clear. > > '` Anything here is comment...(including multiple lines)..... `' > > Kind of makes them look like stylish double quotes. > > I haven't tried these yet: http://gambaswiki.org/wiki/doc/helpcomments > > But they could be done as '`''' .... `' and '`'' .... `' respectively. > > Thoughts? > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From cedron at exede.net Sat Apr 20 19:35:07 2019 From: cedron at exede.net (Cedron Dawg) Date: Sat, 20 Apr 2019 13:35:07 -0400 (EDT) Subject: [Gambas-user] Comment Blocks In-Reply-To: References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> Message-ID: <714131606.16417090.1555781707396.JavaMail.zimbra@exede.net> Thanks, I didn't know about those. That'll cover both purposes, but the appearances will differ. ----- Original Message ----- From: "T Lee Davidson" To: "user" Sent: Saturday, April 20, 2019 1:20:06 PM Subject: Re: [Gambas-user] Comment Blocks Though not via bona fide comment blocks, we do have the ability to block out sections of code. Just highlight the block and then click the "Comment" button. ___ Lee From jussi.lahtinen at gmail.com Sun Apr 21 00:34:33 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sun, 21 Apr 2019 01:34:33 +0300 Subject: [Gambas-user] Comment Blocks In-Reply-To: References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> Message-ID: Even better: Ctrl + k and Ctrl + u. Jussi On Sat, Apr 20, 2019 at 8:21 PM T Lee Davidson wrote: > Though not via bona fide comment blocks, we do have the ability to block > out sections of code. Just highlight the block and then > click the "Comment" button. > > > ___ > Lee > > > On 4/20/19 12:15 PM, Cedron Dawg wrote: > > Kind of slow around here, so here is something to ponder. > > > > I'm wondering what others think about the ability to have comment > blocks. In C, I use them as intended, but they are also darn handy to > block out sections of code while debugging. The same would be true in > Gambas. > > > > I would suggest using the much underutilized reverse apostrophe (aka > grave accent or backquote), living lonely under the tilde on most > keyboards, in combination with the traditional apostrophe to make the > demarcation quite clear. > > > > '` Anything here is comment...(including multiple lines)..... `' > > > > Kind of makes them look like stylish double quotes. > > > > I haven't tried these yet: http://gambaswiki.org/wiki/doc/helpcomments > > > > But they could be done as '`''' .... `' and '`'' .... `' > respectively. > > > > Thoughts? > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From denisc at exemail.com.au Sun Apr 21 00:39:04 2019 From: denisc at exemail.com.au (Denis Crowther) Date: Sun, 21 Apr 2019 08:39:04 +1000 Subject: [Gambas-user] Comment Blocks In-Reply-To: References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> Message-ID: <8d6817f4-3870-a256-e492-b2c16a498edb@exemail.com.au> excellent, didn't know that. Would be kinda cool if the tooltip for these buttons mentioned the hot keys. Regards Denis On 21/4/19 8:34 am, Jussi Lahtinen wrote: > Even better: Ctrl + k and Ctrl + u. > > Jussi > > On Sat, Apr 20, 2019 at 8:21 PM T Lee Davidson > wrote: > > Though not via bona fide comment blocks, we do have the ability to > block out sections of code. Just highlight the block and then > click the "Comment" button. > > > ___ > Lee > > > On 4/20/19 12:15 PM, Cedron Dawg wrote: > > Kind of slow around here, so here is something to ponder. > > > > I'm wondering what others think about the ability to have comment > blocks.? In C, I use them as intended, but they are also darn handy > to block out sections of code while debugging.? The same would be > true in Gambas. > > > > I would suggest using the much underutilized reverse apostrophe > (aka grave accent or backquote), living lonely under the tilde on > most keyboards, in combination with the traditional apostrophe to > make the demarcation quite clear. > > > > '`? Anything here is comment...(including multiple lines)..... `' > > > > Kind of makes them look like stylish double quotes. > > > > I haven't tried these yet: > http://gambaswiki.org/wiki/doc/helpcomments > > > > But they could be done as '`'''? ....? ? ?`' and '`''? .... > ?`' respectively. > > > > Thoughts? > > > > ----[ Gambas mailing-list is hosted by > https://www.hostsharing.net ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From g4mba5 at gmail.com Sun Apr 21 02:09:57 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sun, 21 Apr 2019 02:09:57 +0200 Subject: [Gambas-user] Comment Blocks In-Reply-To: <8d6817f4-3870-a256-e492-b2c16a498edb@exemail.com.au> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> <8d6817f4-3870-a256-e492-b2c16a498edb@exemail.com.au> Message-ID: <68893e11-6e03-57b7-9e94-d0923848d8d6@gmail.com> Le 21/04/2019 ? 00:39, Denis Crowther a ?crit?: > excellent, didn't know that. > > Would be kinda cool if the tooltip for these buttons mentioned the hot > keys. > > > Regards > Denis > '?' -> 'Keyboard shortcuts' menu in the IDE shows you most of the IDE shortcuts. REgards, -- Beno?t Minisini From buster6seven at gmail.com Sun Apr 21 04:39:37 2019 From: buster6seven at gmail.com (Shane) Date: Sun, 21 Apr 2019 12:39:37 +1000 Subject: [Gambas-user] arrays Message-ID: I have coded this At the beginning of the main module i declare public s[100] as point {point is a class with x as integer and y as integer and thats all} so I go to use the array s2.SetPosition(s[i].x * size, s[i].y * size) but i get an error null object the array side works i get 100 arrays of NULL now do i make the elements accessible? I was expecting to have 100 elements of x=0 and y=0 can someone enlighten me please thanks Shane From taboege at gmail.com Sun Apr 21 05:01:40 2019 From: taboege at gmail.com (Tobias Boege) Date: Sun, 21 Apr 2019 05:01:40 +0200 Subject: [Gambas-user] arrays In-Reply-To: References: Message-ID: <20190421030140.GF30006@highrise.localdomain> On Sun, 21 Apr 2019, Shane wrote: > I have coded this > > At the beginning of the main module i declare > > public s[100] as point {point is a class with x as integer and y as integer > and thats all} > > so I go to use the array > > s2.SetPosition(s[i].x * size, s[i].y * size) > > but i get an error null object > > the array side works i get 100 arrays of NULL > > now do i make the elements accessible? > > I was expecting to have 100 elements of x=0 and y=0 > > can someone enlighten me please thanks > If you create an array of type X with N elements, you're allocating space to store N elements of type X, nothing more. Creating an array will not automatically create objects that go into the array for you (auto-vivifying, as its called in other languages). The array is filled with Null, which explains the error you get. It's *not* filled with usable objects whose properties are zero. In short: you have to initialize the array yourself: For i As Integer = 0 To 99 s[i] = New Point Next And by the way, "s[100] As Point" will create a so-called embedded array which has several drawbacks [1]. It's mostly useful when you need to be certain about the memory layout of the array, like when interfacing with external libraries. Use "s As New Point[100]" instead, which creates a normal array of predefined size. Regards, Tobi [1] http://gambaswiki.org/wiki/cat/arraydecl -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From buster6seven at gmail.com Sun Apr 21 06:11:06 2019 From: buster6seven at gmail.com (Shane) Date: Sun, 21 Apr 2019 14:11:06 +1000 Subject: [Gambas-user] arrays In-Reply-To: <20190421030140.GF30006@highrise.localdomain> References: <20190421030140.GF30006@highrise.localdomain> Message-ID: Thanks Tobi On 21/4/19 1:01 pm, Tobias Boege wrote: > For i As Integer = 0 To 99 > s[i] = New Point > Next From charlie at cogier.com Sun Apr 21 17:50:30 2019 From: charlie at cogier.com (Charlie Ogier) Date: Sun, 21 Apr 2019 16:50:30 +0100 Subject: [Gambas-user] arrays In-Reply-To: References: <20190421030140.GF30006@highrise.localdomain> Message-ID: <05be5047-3353-8799-5c10-ce490360edb5@cogier.com> Better still: - *s.Fill(0)* Charlie On 21/04/2019 05:11, Shane wrote: > Thanks Tobi > > On 21/4/19 1:01 pm, Tobias Boege wrote: >> For i As Integer = 0 To 99 >> ???? s[i] = New Point >> ?? Next > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at gmail.com Sun Apr 21 18:18:55 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Sun, 21 Apr 2019 18:18:55 +0200 Subject: [Gambas-user] arrays In-Reply-To: <05be5047-3353-8799-5c10-ce490360edb5@cogier.com> References: <20190421030140.GF30006@highrise.localdomain> <05be5047-3353-8799-5c10-ce490360edb5@cogier.com> Message-ID: *s.Fill(0)* > > I think it can not work this way because it set the same instance of the point class in each array entry. So each array entry have a pointer to the same point object. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.roper at iinet.net.au Mon Apr 22 02:56:31 2019 From: ian.roper at iinet.net.au (Ian Roper) Date: Mon, 22 Apr 2019 08:56:31 +0800 Subject: [Gambas-user] Error after last PPA Update - Project properties Message-ID: Greetings After the last update from the Daily PPA, I get this when I go to open Project Properties. (Monday 22/04 around 8:30 Perth Australia time) This application has raised an unexpected error and must abort. [17] 'ListEditor.ReadOnly' is not a property. FProjectProperty.FProjectProperty.0 I tried a number of projects that I have and they all have the same error when attempting to open the project properties. Cheers, Ian Roper -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Apr 22 03:28:52 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 22 Apr 2019 03:28:52 +0200 Subject: [Gambas-user] Error after last PPA Update - Project properties In-Reply-To: References: Message-ID: <0182a5a2-b0e2-128e-e92f-dc3f45fa8778@gmail.com> Le 22/04/2019 ? 02:56, Ian Roper a ?crit?: > Greetings > > After the last update from the Daily PPA, I get this when I go to open > Project Properties. > > (Monday 22/04 around 8:30 Perth Australia time) > > This application has raised an unexpected error and must abort. [17] > 'ListEditor.ReadOnly' is not a property. FProjectProperty.FProjectProperty.0 > > I tried a number of projects that I have and they all have the same > error when attempting to open the project properties. > > Cheers, > > Ian Roper > It should be fixed in the last commit. Wait for the next PPA update. Regards, -- Beno?t Minisini From buster6seven at gmail.com Mon Apr 22 04:52:49 2019 From: buster6seven at gmail.com (Shane) Date: Mon, 22 Apr 2019 12:52:49 +1000 Subject: [Gambas-user] Ide Crash Message-ID: I'm getting this when I load my Current project image -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot at 2019-04-22 10-56-35.jpeg Type: image/jpeg Size: 63856 bytes Desc: not available URL: From g4mba5 at gmail.com Mon Apr 22 10:19:25 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 22 Apr 2019 10:19:25 +0200 Subject: [Gambas-user] Ide Crash In-Reply-To: References: Message-ID: <8291a471-c924-2789-b194-d1003aeba33e@gmail.com> Le 22/04/2019 ? 04:52, Shane a ?crit?: > I'm getting this when I load my Current project > > image > Please specify your full system information, and the editor font name and font size you are using. Thanks. -- Beno?t Minisini From g4mba5 at gmail.com Mon Apr 22 10:19:44 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 22 Apr 2019 10:19:44 +0200 Subject: [Gambas-user] Ide Crash In-Reply-To: <8291a471-c924-2789-b194-d1003aeba33e@gmail.com> References: <8291a471-c924-2789-b194-d1003aeba33e@gmail.com> Message-ID: <72307cc5-6300-bb5a-f810-b42403850830@gmail.com> Le 22/04/2019 ? 10:19, Beno?t Minisini a ?crit?: > Le 22/04/2019 ? 04:52, Shane a ?crit?: >> I'm getting this when I load my Current project >> >> image >> > > Please specify your full system information, and the editor font name > and font size you are using. > > Thanks. > ...and provide your project of course. -- Beno?t Minisini From cedron at exede.net Mon Apr 22 19:58:24 2019 From: cedron at exede.net (Cedron Dawg) Date: Mon, 22 Apr 2019 13:58:24 -0400 (EDT) Subject: [Gambas-user] Are GoSubs efficient? Message-ID: <117451520.692902.1555955904160.JavaMail.zimbra@exede.net> I'm a big fan of GoSubs. See my last post in https://forum.gambas.one/viewtopic.php?f=4&t=694 The question I have about GoSubs in Gambas is how lightweight are they compared to a regular sub call? From taboege at gmail.com Mon Apr 22 21:18:47 2019 From: taboege at gmail.com (Tobias Boege) Date: Mon, 22 Apr 2019 21:18:47 +0200 Subject: [Gambas-user] Are GoSubs efficient? In-Reply-To: <117451520.692902.1555955904160.JavaMail.zimbra@exede.net> References: <117451520.692902.1555955904160.JavaMail.zimbra@exede.net> Message-ID: <20190422191847.GG30006@highrise.localdomain> On Mon, 22 Apr 2019, Cedron Dawg wrote: > I'm a big fan of GoSubs. See my last post in > > https://forum.gambas.one/viewtopic.php?f=4&t=694 > > The question I have about GoSubs in Gambas is how lightweight are they compared to a regular sub call? > At the bytecode level, GoSub compiles to a single instruction, whereas a call is at least two. This nonsensical piece of code Public Function f(a As Integer, b As Integer) As Integer _Next: Dec a GoSub _Next f(a, b - 1) End for example becomes 0000 : 02FE PUSH PARAM -2 0001 : AFFF ADD QUICK -1 0002 : 0AFE POP PARAM -2 0003 : 2300 FFFB GOSUB 0000 0005 : B803 PUSH FUNCTION f 0006 : 02FE PUSH PARAM -2 0007 : 02FF PUSH PARAM -1 0008 : AFFF ADD QUICK -1 0009 : 1C02 CALL (2) 0010 : 1A01 DROP (1) 0011 : 1002 RETURN (2) As for the runtime overhead, GOSUB at [1] is literally saving some context, including the instruction pointer, followed by a GOTO. The CALL instruction at [2] is obviously more complicated. Whereas the GoSub target offset is encoded in the instruction, pretty much every form of CALL requires some kind of lookup in the current context and parameter checks. Finally, running these two, hopefully comparable enough [*], implementations of the identity function: Public Function f(b As Integer) As Integer Dim a As Integer _Inc: Inc a Dec b If b Then GoSub _Inc Return a End Public Function g(b As Integer) As Integer If Not b Then Return b Return 1 + g(b - 1) End each with argument 10e4 and 10e4 times, I get the following timings in milliseconds: 3115 4246 Regards, Tobi [1] https://gitlab.com/gambas/gambas/blob/master/main/gbx/gbx_exec_loop.c#L940 [2] https://gitlab.com/gambas/gambas/blob/master/main/gbx/gbx_exec_loop.c#L1059 [*] For example, I took care not to have g allocate a new local variable on each call, because f doesn't do that. Both do two additions per "iteration" and have a single conditional. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From cedron at exede.net Mon Apr 22 22:41:46 2019 From: cedron at exede.net (Cedron Dawg) Date: Mon, 22 Apr 2019 16:41:46 -0400 (EDT) Subject: [Gambas-user] Are GoSubs efficient? In-Reply-To: <20190422191847.GG30006@highrise.localdomain> References: <117451520.692902.1555955904160.JavaMail.zimbra@exede.net> <20190422191847.GG30006@highrise.localdomain> Message-ID: <1667236180.898497.1555965706355.JavaMail.zimbra@exede.net> Thanks, this was really helpful and extremely informative. ----- Original Message ----- From: "Tobias Boege" At the bytecode level, GoSub compiles to a single instruction, whereas a call is at least two. This nonsensical piece of code Public Function f(a As Integer, b As Integer) As Integer _Next: Dec a GoSub _Next f(a, b - 1) End for example becomes 0000 : 02FE PUSH PARAM -2 0001 : AFFF ADD QUICK -1 0002 : 0AFE POP PARAM -2 0003 : 2300 FFFB GOSUB 0000 0005 : B803 PUSH FUNCTION f 0006 : 02FE PUSH PARAM -2 0007 : 02FF PUSH PARAM -1 0008 : AFFF ADD QUICK -1 0009 : 1C02 CALL (2) 0010 : 1A01 DROP (1) 0011 : 1002 RETURN (2) As for the runtime overhead, GOSUB at [1] is literally saving some context, including the instruction pointer, followed by a GOTO. The CALL instruction at [2] is obviously more complicated. Whereas the GoSub target offset is encoded in the instruction, pretty much every form of CALL requires some kind of lookup in the current context and parameter checks. Finally, running these two, hopefully comparable enough [*], implementations of the identity function: Public Function f(b As Integer) As Integer Dim a As Integer _Inc: Inc a Dec b If b Then GoSub _Inc Return a End Public Function g(b As Integer) As Integer If Not b Then Return b Return 1 + g(b - 1) End each with argument 10e4 and 10e4 times, I get the following timings in milliseconds: 3115 4246 Regards, Tobi [1] https://gitlab.com/gambas/gambas/blob/master/main/gbx/gbx_exec_loop.c#L940 [2] https://gitlab.com/gambas/gambas/blob/master/main/gbx/gbx_exec_loop.c#L1059 [*] For example, I took care not to have g allocate a new local variable on each call, because f doesn't do that. Both do two additions per "iteration" and have a single conditional. -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From nando_f at nothingsimple.com Mon Apr 22 23:51:12 2019 From: nando_f at nothingsimple.com (nando_f at nothingsimple.com) Date: Mon, 22 Apr 2019 17:51:12 -0400 Subject: [Gambas-user] Are GoSubs efficient? In-Reply-To: <1667236180.898497.1555965706355.JavaMail.zimbra@exede.net> References: <117451520.692902.1555955904160.JavaMail.zimbra@exede.net> <20190422191847.GG30006@highrise.localdomain> <1667236180.898497.1555965706355.JavaMail.zimbra@exede.net> Message-ID: <20190422214237.M7887@nothingsimple.com> I have been using GOSUB as a common code subroutine when I don't need to pass variables. It's almost like having an anonymous function using the existing local vars. It works much faster overall especially if you do a lot them and time matters. I also use them for making PDF's in a function to do little repeated work. They also help me with user input cleanup. I believe there is a place for their use. I normally place/write them at the end of a function ---------- Original Message ----------- From: Cedron Dawg To: user Sent: Mon, 22 Apr 2019 16:41:46 -0400 (EDT) Subject: Re: [Gambas-user] Are GoSubs efficient? > Thanks, this was really helpful and extremely informative. > > ----- Original Message ----- > From: "Tobias Boege" > > At the bytecode level, GoSub compiles to a single instruction, whereas > a call is at least two. This nonsensical piece of code > > Public Function f(a As Integer, b As Integer) As Integer > _Next: > Dec a > GoSub _Next > f(a, b - 1) > End > > for example becomes > > 0000 : 02FE PUSH PARAM -2 > 0001 : AFFF ADD QUICK -1 > 0002 : 0AFE POP PARAM -2 > 0003 : 2300 FFFB GOSUB 0000 > 0005 : B803 PUSH FUNCTION f > 0006 : 02FE PUSH PARAM -2 > 0007 : 02FF PUSH PARAM -1 > 0008 : AFFF ADD QUICK -1 > 0009 : 1C02 CALL (2) > 0010 : 1A01 DROP (1) > 0011 : 1002 RETURN (2) > > As for the runtime overhead, GOSUB at [1] is literally saving some context, > including the instruction pointer, followed by a GOTO. The CALL instruction > at [2] is obviously more complicated. > > Whereas the GoSub target offset is encoded in the instruction, pretty much > every form of CALL requires some kind of lookup in the current context and > parameter checks. > > Finally, running these two, hopefully comparable enough [*], implementations > of the identity function: > > Public Function f(b As Integer) As Integer > Dim a As Integer > _Inc: > Inc a > Dec b > If b Then GoSub _Inc > Return a > End > > Public Function g(b As Integer) As Integer > If Not b Then Return b > Return 1 + g(b - 1) > End > > each with argument 10e4 and 10e4 times, I get the following timings in > milliseconds: > > 3115 > 4246 > > Regards, > Tobi > > [1] https://gitlab.com/gambas/gambas/blob/master/main/gbx/gbx_exec_loop.c#L940 > [2] https://gitlab.com/gambas/gambas/blob/master/main/gbx/gbx_exec_loop.c#L1059 > > [*] For example, I took care not to have g allocate a new local variable > on each call, because f doesn't do that. Both do two additions per > "iteration" and have a single conditional. > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- ------- End of Original Message ------- From buster6seven at gmail.com Tue Apr 23 04:14:33 2019 From: buster6seven at gmail.com (Shane) Date: Tue, 23 Apr 2019 12:14:33 +1000 Subject: [Gambas-user] Ide Crash In-Reply-To: <8291a471-c924-2789-b194-d1003aeba33e@gmail.com> References: <8291a471-c924-2789-b194-d1003aeba33e@gmail.com> Message-ID: <2e6e7241-1d6e-9a06-4ed3-a9901b124106@gmail.com> I found my problem I had pasted some C code into the ide and did not comment it out correctly and that is what was causing the problem, i had to edit the source code in a text editor to remove it. sorry for all the fuss cheers Shane On 22/4/19 6:19 pm, Beno?t Minisini wrote: > Le 22/04/2019 ? 04:52, Shane a ?crit?: >> I'm getting this when I load my Current project >> >> image >> > > Please specify your full system information, and the editor font name > and font size you are using. > > Thanks. > From chrisml at deganius.de Tue Apr 23 07:32:32 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 23 Apr 2019 07:32:32 +0200 Subject: [Gambas-user] Ide Crash In-Reply-To: <2e6e7241-1d6e-9a06-4ed3-a9901b124106@gmail.com> References: <8291a471-c924-2789-b194-d1003aeba33e@gmail.com> <2e6e7241-1d6e-9a06-4ed3-a9901b124106@gmail.com> Message-ID: <338eed02-6566-679b-26bc-a356d05e1cd2@deganius.de> Am 23.04.19 um 04:14 schrieb Shane: > I found my problem I had pasted some C code into the ide and did not > comment it out correctly and that is what was causing the problem, i had > to edit the source code in a text editor to remove it. > > sorry for all the fuss But this should not crash the IDE. The piece of code which crashed would be interesting. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From pinozollo at gmail.com Tue Apr 23 15:23:10 2019 From: pinozollo at gmail.com (Pino Zollo) Date: Tue, 23 Apr 2019 09:23:10 -0400 Subject: [Gambas-user] Cross compiling Message-ID: <32d72941-927c-e18f-c7db-6a17fc767db2@gmail.com> I have a small graphic application developed on Linux Mint... I wold like to move it to Raspberry. Is it possible to cross compile ? ....I did fail in installing the last version of Gambas3 on my Raspberry.... The instructions on wiki are quite confusing for me. Many thanks Pino From chrisml at deganius.de Tue Apr 23 22:48:36 2019 From: chrisml at deganius.de (Christof Thalhofer) Date: Tue, 23 Apr 2019 22:48:36 +0200 Subject: [Gambas-user] Cross compiling In-Reply-To: <32d72941-927c-e18f-c7db-6a17fc767db2@gmail.com> References: <32d72941-927c-e18f-c7db-6a17fc767db2@gmail.com> Message-ID: <8d40dd64-cc53-af13-545b-271686f65b58@deganius.de> Am 23.04.19 um 15:23 schrieb Pino Zollo: > I have a small graphic application developed on Linux Mint... > > I wold like to move it to Raspberry. > > Is it possible to cross compile ? > > ....I did fail in installing the last version of Gambas3 on my Raspberry.... > > The instructions on wiki are quite confusing for me. I get Gambas3 for my Raspberry Pi's from domotiga.nl: https://domotiga.nl/projects/domotiga/wiki Applications developed in Ubuntu run flawlessly on the Raspi. Alles Gute Christof Thalhofer -- Dies ist keine Signatur -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From g4mba5 at gmail.com Wed Apr 24 00:32:44 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Wed, 24 Apr 2019 00:32:44 +0200 Subject: [Gambas-user] "Additional references" to Gambas projects Message-ID: <9b5ac22a-a395-416a-cd3d-83b67bdd61eb@gmail.com> Hi, In the last commits, you can know define "additional references" to your project, in the "library" tab of the project property dialog. An additional reference is a Gambas executable whose exported classes are available to your project. Why that? In some way, it's the contrary of a library. It means that your project will be used as a library by the referenced project, and will call the exported classes of this referenced project. In other words, it means that your project is a plugin of the referenced project (usually loaded dynamically with the Component.Load method). If it's not clear for you, tell me, I will try to explain differently (if I can!) Regards, -- Beno?t Minisini From t.lee.davidson at gmail.com Wed Apr 24 01:07:53 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Tue, 23 Apr 2019 19:07:53 -0400 Subject: [Gambas-user] "Additional references" to Gambas projects In-Reply-To: <9b5ac22a-a395-416a-cd3d-83b67bdd61eb@gmail.com> References: <9b5ac22a-a395-416a-cd3d-83b67bdd61eb@gmail.com> Message-ID: <20df2eaf-81af-cb87-d6eb-cd03be1ba0aa@gmail.com> On 4/23/19 6:32 PM, Beno?t Minisini wrote: > Hi, > > In the last commits, you can know define "additional references" to your project, in the "library" tab of the project property > dialog. > > An additional reference is a Gambas executable whose exported classes are available to your project. > > Why that? > > In some way, it's the contrary of a library. It means that your project will be used as a library by the referenced project, and > will call the exported classes of this referenced project. > > In other words, it means that your project is a plugin of the referenced project (usually loaded dynamically with the > Component.Load method). > > If it's not clear for you, tell me, I will try to explain differently (if I can!) > > Regards, > I think I understand it better from the perspective of the referenced project. In very simple and general terms, the referenced project is an application that is extendable with plugins that can have access to its exposed API. By referencing the extendable application, the plugin is declaring that it wants access to the API. If that's close, I hope it helps anyone that might have been having a bit of difficulty grasping the concept on the first read :-) ___ Lee From buster6seven at gmail.com Wed Apr 24 04:45:50 2019 From: buster6seven at gmail.com (Shane) Date: Wed, 24 Apr 2019 12:45:50 +1000 Subject: [Gambas-user] Ide Crash In-Reply-To: <338eed02-6566-679b-26bc-a356d05e1cd2@deganius.de> References: <8291a471-c924-2789-b194-d1003aeba33e@gmail.com> <2e6e7241-1d6e-9a06-4ed3-a9901b124106@gmail.com> <338eed02-6566-679b-26bc-a356d05e1cd2@deganius.de> Message-ID: <8d6632d6-0c11-f05f-34d9-59cd5f3e64f1@gmail.com> sorry i deleted it I think it might of had some rogue formating charters in it On 23/4/19 3:32 pm, Christof Thalhofer wrote: > Am 23.04.19 um 04:14 schrieb Shane: > >> I found my problem I had pasted some C code into the ide and did not >> comment it out correctly and that is what was causing the problem, i had >> to edit the source code in a text editor to remove it. >> >> sorry for all the fuss > But this should not crash the IDE. The piece of code which crashed would > be interesting. > > > Alles Gute > > Christof Thalhofer > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From buster6seven at gmail.com Wed Apr 24 04:49:04 2019 From: buster6seven at gmail.com (Shane) Date: Wed, 24 Apr 2019 12:49:04 +1000 Subject: [Gambas-user] Array's Message-ID: I have this Array Private Figures As New Integer[4, 7] and I want to pre fill it with data so I do This Figures[0, 0] = 1 Figures[1, 0] = 3 Figures[2, 0] = 5 Figures[3, 0] = 7 ?is there a better way to do this in gambas that is like a short hand of this ? Cheers Shane From gambas.fr at gmail.com Wed Apr 24 08:50:31 2019 From: gambas.fr at gmail.com (Fabien Bodard) Date: Wed, 24 Apr 2019 08:50:31 +0200 Subject: [Gambas-user] Array's In-Reply-To: References: Message-ID: for i = 0 to 3 Figures[i,0]=[1,3,5,7][i] next then without size maintain (and without instantiation) so the array will be a (4,1) at the start Figures = [[1],[3],[5],[7]] Le mer. 24 avr. 2019 ? 04:50, Shane a ?crit : > I have this Array > > Private Figures As New Integer[4, 7] > > and I want to pre fill it with data > > so I do This > > Figures[0, 0] = 1 > Figures[1, 0] = 3 > Figures[2, 0] = 5 > Figures[3, 0] = 7 > > is there a better way to do this in gambas that is like a short hand > of this ? > > > Cheers Shane > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwe-sse at osnanet.de Wed Apr 24 12:16:54 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 24 Apr 2019 12:16:54 +0200 Subject: [Gambas-user] Comment Blocks In-Reply-To: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> Message-ID: Am 20.04.19 um 18:15 schrieb Cedron Dawg: > Kind of slow around here, so here is something to ponder. > > I'm wondering what others think about the ability to have comment blocks. In C, I use them as intended, but they are also darn handy to block out sections of code while debugging. The same would be true in Gambas. > > I would suggest using the much underutilized reverse apostrophe (aka grave accent or backquote), living lonely under the tilde on most keyboards, in combination with the traditional apostrophe to make the demarcation quite clear. > > '` Anything here is comment...(including multiple lines)..... `' > > Kind of makes them look like stylish double quotes. > > I haven't tried these yet: http://gambaswiki.org/wiki/doc/helpcomments > > But they could be done as '`''' .... `' and '`'' .... `' respectively. > > Thoughts? > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > I like the idea, because it would save several steps (even when a keystroke is used for commenting, you still have to highlight the block). However, don't like ` for it because it's tricky on a German keyboard layout. Why not an easy combination of ((+ and +)) ? Or additionally to the quote sign '(( and ')) Regards Rolf From nando_f at nothingsimple.com Wed Apr 24 14:11:30 2019 From: nando_f at nothingsimple.com (nando_f at nothingsimple.com) Date: Wed, 24 Apr 2019 08:11:30 -0400 Subject: [Gambas-user] Comment Blocks In-Reply-To: References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> Message-ID: <20190424120152.M19478@nothingsimple.com> Always a very good idea for block quotes. unfortunately, the backtick is presented very and similar to it's friend ' '`''' a bit cryptic? `' If I had my way, just the backtick only on position 1 would start or stop block quotes. ` PRINT "Hello" ` I might have it highlight in yellow or something to show. Thanks, -Fernando -- Open WebMail Project (http://openwebmail.org) ---------- Original Message ----------- From: Rolf-Werner Eilert To: user at lists.gambas-basic.org Sent: Wed, 24 Apr 2019 12:16:54 +0200 Subject: Re: [Gambas-user] Comment Blocks > Am 20.04.19 um 18:15 schrieb Cedron Dawg: > > Kind of slow around here, so here is something to ponder. > > > > I'm wondering what others think about the ability to have comment blocks. In C, I use them as intended, but they are also darn handy to block out sections of code while debugging. The same would be true in Gambas. > > > > I would suggest using the much underutilized reverse apostrophe (aka grave accent or backquote), living lonely under the tilde on most keyboards, in combination with the traditional apostrophe to make the demarcation quite clear. > > > > '` Anything here is comment...(including multiple lines)..... `' > > > > Kind of makes them look like stylish double quotes. > > > > I haven't tried these yet: http://gambaswiki.org/wiki/doc/helpcomments > > > > But they could be done as '`''' .... `' and '`'' .... `' respectively. > > > > Thoughts? > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > > > I like the idea, because it would save several steps (even when a > keystroke is used for commenting, you still have to highlight the block). > > However, don't like ` for it because it's tricky on a German keyboard > layout. Why not an easy combination of ((+ and +)) ? Or additionally to > the quote sign '(( and ')) > > Regards > Rolf > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- ------- End of Original Message ------- From cedron at exede.net Wed Apr 24 17:57:02 2019 From: cedron at exede.net (Cedron Dawg) Date: Wed, 24 Apr 2019 11:57:02 -0400 (EDT) Subject: [Gambas-user] Comment Blocks In-Reply-To: References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> Message-ID: <108775818.3179247.1556121422350.JavaMail.zimbra@exede.net> Hi Rolf, If it isn't easy on all keyboards, I agree, show stopper for the `. I think I would like this better, '{ }' or make it reminsicent of C, '* *' but I would not want to see /* */. Maybe '" "' The priority of this is low for me. What is available will suit my needs, but I still think this would be a nice addition to Gambas. Ced ----- Original Message ----- From: "Rolf-Werner Eilert" I like the idea, because it would save several steps (even when a keystroke is used for commenting, you still have to highlight the block). However, don't like ` for it because it's tricky on a German keyboard layout. Why not an easy combination of ((+ and +)) ? Or additionally to the quote sign '(( and ')) Regards Rolf From cedron at exede.net Wed Apr 24 17:58:22 2019 From: cedron at exede.net (Cedron Dawg) Date: Wed, 24 Apr 2019 11:58:22 -0400 (EDT) Subject: [Gambas-user] Comment Blocks In-Reply-To: <20190424120152.M19478@nothingsimple.com> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> <20190424120152.M19478@nothingsimple.com> Message-ID: <1145445748.3180120.1556121502952.JavaMail.zimbra@exede.net> Hi Fernando, Block comments are a bit different than block quotes with both intersecting the concept of line continuation characters. I think the backtick is out as a candidate (see Rolf's comment). I combined it with a single quote (apostrophe) in order to make intent clear and introduce directionality to the demarcation. Having just single backticks would be fine with me as well, however, as mentioned, backticks aren't a good candidate. There aren't any other really good single character candidates except for maybe the tilde. I wouldn't restrict them to being in column one either. That seems unnecessary. Having an open and a close allows for embedded comments within a line as well, though I'm not a big user of embedded comments. Yes, '`''' Is very cryptic indeed `'. I was just trying to find the closest fit to the current demarcation which is ''' on every line. Ced ----- Original Message ----- From: "nando f" Always a very good idea for block quotes. unfortunately, the backtick is presented very and similar to it's friend ' '`''' a bit cryptic? `' If I had my way, just the backtick only on position 1 would start or stop block quotes. ` PRINT "Hello" ` I might have it highlight in yellow or something to show. Thanks, -Fernando From rwe-sse at osnanet.de Wed Apr 24 18:07:34 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 24 Apr 2019 18:07:34 +0200 Subject: [Gambas-user] Comment Blocks In-Reply-To: <108775818.3179247.1556121422350.JavaMail.zimbra@exede.net> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> <108775818.3179247.1556121422350.JavaMail.zimbra@exede.net> Message-ID: <03ec4771-bd6d-c747-5859-fe3718fa3988@osnanet.de> Hi Ced, Do you know the German keyboard? All {} and [] and ~\??| use a special combination key "AltGr" (which is Ctrl+Caps). So it includes pressing two keys, like with Caps + 8 for "(". So it is ok, we are used to it. But the ` is on its own key together with aguile and it waits for the letter to be combined with to produce ? or whatever. So we have to press Caps + ` and then a whitespace to get it. Very roundabout. Regards Rolf Am 24.04.19 um 17:57 schrieb Cedron Dawg: > Hi Rolf, > > If it isn't easy on all keyboards, I agree, show stopper for the `. > > I think I would like this better, > > '{ }' > > or make it reminsicent of C, > > '* *' > > but I would not want to see /* */. > > Maybe > > '" "' > > The priority of this is low for me. What is available will suit my needs, but I still think this would be a nice addition to Gambas. > > Ced > > > ----- Original Message ----- > From: "Rolf-Werner Eilert" > > > I like the idea, because it would save several steps (even when a > keystroke is used for commenting, you still have to highlight the block). > > However, don't like ` for it because it's tricky on a German keyboard > layout. Why not an easy combination of ((+ and +)) ? Or additionally to > the quote sign '(( and ')) > > Regards > Rolf > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From rwe-sse at osnanet.de Wed Apr 24 18:11:42 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Wed, 24 Apr 2019 18:11:42 +0200 Subject: [Gambas-user] Comment Blocks In-Reply-To: <108775818.3179247.1556121422350.JavaMail.zimbra@exede.net> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> <108775818.3179247.1556121422350.JavaMail.zimbra@exede.net> Message-ID: <95092b41-3b87-ec4c-4773-0b2772eb25f8@osnanet.de> Oh yes, forgot this about {} you proposed: When using an apostrophy, I will need Caps on a German keyboard for the apostrophy, then change to AltGr to produce { for instance. This is roundabout too. When I use '(, I can leave my finger on the Caps key and type in the two signs directly: Caps + # + 8 = '( Rolf Am 24.04.19 um 17:57 schrieb Cedron Dawg: > Hi Rolf, > > If it isn't easy on all keyboards, I agree, show stopper for the `. > > I think I would like this better, > > '{ }' > > or make it reminsicent of C, > > '* *' > > but I would not want to see /* */. > > Maybe > > '" "' > > The priority of this is low for me. What is available will suit my needs, but I still think this would be a nice addition to Gambas. > > Ced > > > ----- Original Message ----- > From: "Rolf-Werner Eilert" > > > I like the idea, because it would save several steps (even when a > keystroke is used for commenting, you still have to highlight the block). > > However, don't like ` for it because it's tricky on a German keyboard > layout. Why not an easy combination of ((+ and +)) ? Or additionally to > the quote sign '(( and ')) > > Regards > Rolf > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > From genbraga1 at gmail.com Wed Apr 24 18:44:57 2019 From: genbraga1 at gmail.com (gen braga) Date: Wed, 24 Apr 2019 13:44:57 -0300 Subject: [Gambas-user] Version mismatch in daily build ppa Message-ID: Althrough the IDE was updated to 3.13.90 (and display It correctly), .deb files are still named 3.12.90 in launchpad. Gen. -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Wed Apr 24 20:08:20 2019 From: taboege at gmail.com (Tobias Boege) Date: Wed, 24 Apr 2019 20:08:20 +0200 Subject: [Gambas-user] Comment Blocks In-Reply-To: <95092b41-3b87-ec4c-4773-0b2772eb25f8@osnanet.de> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> <108775818.3179247.1556121422350.JavaMail.zimbra@exede.net> <95092b41-3b87-ec4c-4773-0b2772eb25f8@osnanet.de> Message-ID: <20190424180820.GL30006@highrise.localdomain> On Wed, 24 Apr 2019, Rolf-Werner Eilert wrote: > Oh yes, forgot this about {} you proposed: > > When using an apostrophy, I will need Caps on a German keyboard for the > apostrophy, then change to AltGr to produce { for instance. This is > roundabout too. When I use '(, I can leave my finger on the Caps key and > type in the two signs directly: Caps + # + 8 = '( > I don't know about this objection. I'm used to these keys being hard to reach by now. They're ubiquitous in programming. (I affectionately call it cultural imperialism :-) Some people I know switch to an English keyboard layout for programming, but I never got the hang of that.) Using a (sometimes) dead key like ` is one thing, but '{} seems fine to me. Gr??e, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From taboege at gmail.com Wed Apr 24 20:20:39 2019 From: taboege at gmail.com (Tobias Boege) Date: Wed, 24 Apr 2019 20:20:39 +0200 Subject: [Gambas-user] Comment Blocks In-Reply-To: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> Message-ID: <20190424182039.GM30006@highrise.localdomain> On Sat, 20 Apr 2019, Cedron Dawg wrote: > Kind of slow around here, so here is something to ponder. > > I'm wondering what others think about the ability to have comment blocks. In C, I use them as intended, but they are also darn handy to block out sections of code while debugging. The same would be true in Gambas. > > I would suggest using the much underutilized reverse apostrophe (aka grave accent or backquote), living lonely under the tilde on most keyboards, in combination with the traditional apostrophe to make the demarcation quite clear. > > '` Anything here is comment...(including multiple lines)..... `' > > Kind of makes them look like stylish double quotes. > > I haven't tried these yet: http://gambaswiki.org/wiki/doc/helpcomments > > But they could be done as '`''' .... `' and '`'' .... `' respectively. > > Thoughts? > My initial thought about this was: it adds complexity that wasn't there before. If you write a syntax highlighter for Gambas right now, you do not have to keep track of state between lines. You can analyze all lines independently of each other, in parallel, in a random order if you wish. A fully-fledged parser of course doesn't benefit this greatly from it, and the Gambas internals seem relatively agnostic about if, but a syntax highlighter is what I'm currently working on (in vimscript, if you have to ask, so keeping state *is* an issue). But, this property is lost anyway once we get line continuation characters, by Bug#1540. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From jussi.lahtinen at gmail.com Wed Apr 24 21:03:16 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Wed, 24 Apr 2019 22:03:16 +0300 Subject: [Gambas-user] Comment Blocks In-Reply-To: <108775818.3179247.1556121422350.JavaMail.zimbra@exede.net> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> <108775818.3179247.1556121422350.JavaMail.zimbra@exede.net> Message-ID: My vote goes to '* *' . No special characters and it's already almost familiar to people, since it's so close to C style. Jussi On Wed, Apr 24, 2019 at 6:58 PM Cedron Dawg wrote: > Hi Rolf, > > If it isn't easy on all keyboards, I agree, show stopper for the `. > > I think I would like this better, > > '{ }' > > or make it reminsicent of C, > > '* *' > > but I would not want to see /* */. > > Maybe > > '" "' > > The priority of this is low for me. What is available will suit my needs, > but I still think this would be a nice addition to Gambas. > > Ced > > > ----- Original Message ----- > From: "Rolf-Werner Eilert" > > > I like the idea, because it would save several steps (even when a > keystroke is used for commenting, you still have to highlight the block). > > However, don't like ` for it because it's tricky on a German keyboard > layout. Why not an easy combination of ((+ and +)) ? Or additionally to > the quote sign '(( and ')) > > Regards > Rolf > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedron at exede.net Wed Apr 24 22:21:54 2019 From: cedron at exede.net (Cedron Dawg) Date: Wed, 24 Apr 2019 16:21:54 -0400 (EDT) Subject: [Gambas-user] Comment Blocks In-Reply-To: References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> <108775818.3179247.1556121422350.JavaMail.zimbra@exede.net> Message-ID: <1650954773.3481894.1556137314068.JavaMail.zimbra@exede.net> I think those are good too, but I have the concern that a lot of code already has '* in it. This would cause a lot of unnecessary code breakage. Restricting the candidates to common characters, and some thought, I am liking ': :' ----- Original Message ----- From: "Jussi Lahtinen" To: "user" Sent: Wednesday, April 24, 2019 3:03:16 PM Subject: Re: [Gambas-user] Comment Blocks My vote goes to '* *' . No special characters and it's already almost familiar to people, since it's so close to C style. Jussi From rwe-sse at osnanet.de Thu Apr 25 10:08:06 2019 From: rwe-sse at osnanet.de (Rolf-Werner Eilert) Date: Thu, 25 Apr 2019 10:08:06 +0200 Subject: [Gambas-user] Comment Blocks In-Reply-To: <20190424182039.GM30006@highrise.localdomain> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> <20190424182039.GM30006@highrise.localdomain> Message-ID: <5ce5a430-1814-047a-a1be-539e987a99ad@osnanet.de> Am 24.04.19 um 20:20 schrieb Tobias Boege: > On Sat, 20 Apr 2019, Cedron Dawg wrote: >> Kind of slow around here, so here is something to ponder. >> >> I'm wondering what others think about the ability to have comment blocks. In C, I use them as intended, but they are also darn handy to block out sections of code while debugging. The same would be true in Gambas. >> >> I would suggest using the much underutilized reverse apostrophe (aka grave accent or backquote), living lonely under the tilde on most keyboards, in combination with the traditional apostrophe to make the demarcation quite clear. >> >> '` Anything here is comment...(including multiple lines)..... `' >> >> Kind of makes them look like stylish double quotes. >> >> I haven't tried these yet: http://gambaswiki.org/wiki/doc/helpcomments >> >> But they could be done as '`''' .... `' and '`'' .... `' respectively. >> >> Thoughts? >> > > My initial thought about this was: it adds complexity that wasn't there > before. If you write a syntax highlighter for Gambas right now, you do not > have to keep track of state between lines. You can analyze all lines > independently of each other, in parallel, in a random order if you wish. Ah ok, didn't see that. I have a project with an editor for printing forms, and I managed to change the editor in a way it can recognize blocks (like very long definitions of some kind spread to several lines) to highlight them in the same color. It was easy because in that "page language" I use, all commands are within {}, so the editor only has to keep the "command" color until the closing bracket appears. But I know what you mean... > A fully-fledged parser of course doesn't benefit this greatly from it, > and the Gambas internals seem relatively agnostic about if, but a syntax > highlighter is what I'm currently working on (in vimscript, if you have > to ask, so keeping state *is* an issue). > > But, this property is lost anyway once we get line continuation characters, > by Bug#1540. > > Regards, > Tobi > What do you mean line continuation? Some character to set the rest of a lengthy declaration from one line to the next one? Or would it be concatination of several commands on one line instead of spreading them to several lines? I would definitely like to have the latter. Sometimes there are a number of very short lines, and it would be nice to have them on one line. There were many BASIC dialects which knew this, usually with a ":" as the special character. Rolf From taboege at gmail.com Thu Apr 25 12:08:43 2019 From: taboege at gmail.com (Tobias Boege) Date: Thu, 25 Apr 2019 12:08:43 +0200 Subject: [Gambas-user] Comment Blocks In-Reply-To: <5ce5a430-1814-047a-a1be-539e987a99ad@osnanet.de> References: <1227935380.16346255.1555776913952.JavaMail.zimbra@exede.net> <20190424182039.GM30006@highrise.localdomain> <5ce5a430-1814-047a-a1be-539e987a99ad@osnanet.de> Message-ID: <20190425100843.GO30006@highrise.localdomain> On Thu, 25 Apr 2019, Rolf-Werner Eilert wrote: > Am 24.04.19 um 20:20 schrieb Tobias Boege: > > My initial thought about this was: it adds complexity that wasn't there > > before. If you write a syntax highlighter for Gambas right now, you do not > > have to keep track of state between lines. You can analyze all lines > > independently of each other, in parallel, in a random order if you wish. > Or, more importantly, if one line is changed, the syntax highlighter has to rehighlight only that one line, not jump some amount of lines back to hopefully get all relevant context (how long do you expect the average block comment to be?) and parse all those lines until you have gathered the information to correctly highlight the one that actually changed. Yes, the rehighlighting algorithm can be improved, but that sophistication isn't necessary right now -- as much as I like line continuation, BTW. > > > A fully-fledged parser of course doesn't benefit this greatly from it, > > and the Gambas internals seem relatively agnostic about if, but a syntax > > highlighter is what I'm currently working on (in vimscript, if you have > > to ask, so keeping state *is* an issue). > > > > But, this property is lost anyway once we get line continuation characters, > > by Bug#1540. > > > > Regards, > > Tobi > > > > What do you mean line continuation? Some character to set the rest of a > lengthy declaration from one line to the next one? Or would it be > concatination of several commands on one line instead of spreading them to > several lines? > I'm talking about the former. It is about "escaping" the newline that would otherwise end a statement in Gambas, so that you can spread a statement over multiple lines. That feature is requested in Bug#1540 [1] and Accepted. The latter, a new statement separator, is also requested there! > I would definitely like to have the latter. Sometimes there are a number of > very short lines, and it would be nice to have them on one line. There were > many BASIC dialects which knew this, usually with a ":" as the special > character. > I think the Gambas scripter supports the colon already so that you can write a "oneliner" Gambas program in the terminal. But I don't know how robust the implementation is. It's certainly not available in the normal Gambas. The scripter having it would be a case for ":" as the separator character though. Regards, Tobi [1] https://lists.gambas-basic.org/pipermail/bugtracker/2019-March/001121.html -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From mckaygerhard at gmail.com Thu Apr 25 14:40:45 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Thu, 25 Apr 2019 08:40:45 -0400 Subject: [Gambas-user] "Additional references" to Gambas projects In-Reply-To: <9b5ac22a-a395-416a-cd3d-83b67bdd61eb@gmail.com> References: <9b5ac22a-a395-416a-cd3d-83b67bdd61eb@gmail.com> Message-ID: the reference its a relative path? or its a inclusive reference that will inside have a relative path or absolute? Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com El mar., 23 de abr. de 2019 a la(s) 18:33, Beno?t Minisini (g4mba5 at gmail.com) escribi?: > Hi, > > In the last commits, you can know define "additional references" to your > project, in the "library" tab of the project property dialog. > > An additional reference is a Gambas executable whose exported classes > are available to your project. > > Why that? > > In some way, it's the contrary of a library. It means that your project > will be used as a library by the referenced project, and will call the > exported classes of this referenced project. > > In other words, it means that your project is a plugin of the referenced > project (usually loaded dynamically with the Component.Load method). > > If it's not clear for you, tell me, I will try to explain differently > (if I can!) > > Regards, > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Thu Apr 25 14:44:24 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 25 Apr 2019 14:44:24 +0200 Subject: [Gambas-user] "Additional references" to Gambas projects In-Reply-To: References: <9b5ac22a-a395-416a-cd3d-83b67bdd61eb@gmail.com> Message-ID: <353740f3-0ca8-5beb-7893-f493a267e9ef@gmail.com> Le 25/04/2019 ? 14:40, PICCORO McKAY Lenz a ?crit?: > the reference its a relative path? or its a inclusive reference that > will inside have a relative path or absolute? You select a path, and the IDE makes it relative to your project if possible. -- Beno?t Minisini From ivan-kern at freenet.de Thu Apr 25 14:55:03 2019 From: ivan-kern at freenet.de (Ivan Kern) Date: Thu, 25 Apr 2019 14:55:03 +0200 Subject: [Gambas-user] Output buffer of Serial Port Message-ID: <09d2b762-2c52-5a81-59e1-c8329999b2d5@freenet.de> Good afternoon, everyone. is it possible to empty the output buffer of Serial Port? Greetings, Ivan From mckaygerhard at gmail.com Thu Apr 25 14:57:07 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Thu, 25 Apr 2019 08:57:07 -0400 Subject: [Gambas-user] gambas and sqlite3 In-Reply-To: <71ee4502-6799-f954-16aa-99895b1408a5@gmx.de> References: <71ee4502-6799-f954-16aa-99895b1408a5@gmx.de> Message-ID: El lun., 15 de abr. de 2019 a la(s) 09:59, Peter Peyotle ( peterpeyotle at gmx.de) escribi?: > I query the sqlite3 version in Gambas Ide with "select sqlite_version ()" > I get 3.11. > I ask in the shell with "sqlite - version" I get "not installed". OK. > when you ask to ide the returned version are sahred lib in the console that "sqlite" command are not installed only shared lib! obvious! THAT WAS THE PROBLEM! > I install the most recent from the sqlite page about compiling I get with > "sqlite --version" the correct installed version. In Gambas, however, still > the 3.11. And gb.db.sqlite3 also uses these because the features like > "select * from pragma_table_info ...." are not supported. Only from version > 3.16. So Gambas really uses the 3.11. > On my laptop I have the version 3.18 installed via another source with ppa > with "sudo apt-get install ....". > Here also in Gambas then the version 3.18 is displayed and the pragma > functions are available. > I think there has to be an environment variable or something similar for > gb.db.sqlite3 to use the installed sqlite version as well. > So how do I get Gambas to support the installed latest sqlite3 version as > well? > > best regards > Klaus-Peter > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mckaygerhard at gmail.com Thu Apr 25 15:06:01 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Thu, 25 Apr 2019 09:06:01 -0400 Subject: [Gambas-user] "Additional references" to Gambas projects In-Reply-To: <353740f3-0ca8-5beb-7893-f493a267e9ef@gmail.com> References: <9b5ac22a-a395-416a-cd3d-83b67bdd61eb@gmail.com> <353740f3-0ca8-5beb-7893-f493a267e9ef@gmail.com> Message-ID: El jue., 25 de abr. de 2019 a la(s) 08:45, Beno?t Minisini (g4mba5 at gmail.com) escribi?: > Le 25/04/2019 ? 14:40, PICCORO McKAY Lenz a ?crit : > > the reference its a relative path? or its a inclusive reference that > > will inside have a relative path or absolute? > You select a path, and the IDE makes it relative to your project if > possible. > OH! Finally this feature has arrived! OH MY GOODNESS! OH EXTRATERRESTRIAL ALIENS! THANKS THANKS! BENOIIT My only complaint! because you did not do it before .. this feature is so necessary !! Thanks men! > > -- > Beno?t Minisini > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Thu Apr 25 15:09:49 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Thu, 25 Apr 2019 15:09:49 +0200 Subject: [Gambas-user] Output buffer of Serial Port In-Reply-To: <09d2b762-2c52-5a81-59e1-c8329999b2d5@freenet.de> References: <09d2b762-2c52-5a81-59e1-c8329999b2d5@freenet.de> Message-ID: Le 25/04/2019 ? 14:55, Ivan Kern a ?crit?: > Good afternoon, everyone. > is it possible to empty the output buffer of Serial Port? > > Greetings, Ivan > How do you do that in C ? -- Beno?t Minisini From taboege at gmail.com Thu Apr 25 21:15:16 2019 From: taboege at gmail.com (Tobias Boege) Date: Thu, 25 Apr 2019 21:15:16 +0200 Subject: [Gambas-user] IRC channels Message-ID: <20190425191516.GP30006@highrise.localdomain> Hi list, I want to let you know that I have registered a "gambas" group on the Freenode IRC network [1]. This means that we have first-class presence on the network, which in turn doesn't really mean anything, except that we can give out project cloaks for the Gambas project now (I just got mine) and that I get an excuse to remind you that the channels exist at all. In case you don't know, Freenode is an IRC network dedicated to FOSS or peer-directed projects, and lots of well-known projects have a presence and support channels there, including Wikipedia, various Linux distri- butions, various programming languages, myriads of libraries and other software. It's not in our disadvantage to mix Gambas into that. The #gambas channel existed there for many years, before the group was registered, and didn't see much traffic since I joined. I got the idea to revive it when we recently had a bunch of questions here about native component development. Most questions are adequately discussed on the mailing list, because they require experimentation, reading code, careful wording, attachments, archival... But walking someone through the process of writing their first native component or solving an installation issue, for instance, can benefit from interactive realtime discussion. Therefore I think IRC can complement the mailing lists quite well. There are two channels: #gambas : general-purpose: about the language, components, libraries #gambas-dev : about the C part of Gambas: compiler, interpreter, C API I hope that some of you, who hang around the network anyway, bring their expertise into the channels and that people with questions will find them. I added them to the wiki [2] already. Regards, Tobi [1] https://freenode.net/ [2] http://gambaswiki.org/wiki/doc/forum -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From mike.crean at y7mail.com Fri Apr 26 07:54:58 2019 From: mike.crean at y7mail.com (Mike Crean) Date: Fri, 26 Apr 2019 05:54:58 +0000 (UTC) Subject: [Gambas-user] Output buffer of Serial Port In-Reply-To: References: <09d2b762-2c52-5a81-59e1-c8329999b2d5@freenet.de> Message-ID: <99746179.856846.1556258098832@mail.yahoo.com> Just read the data in it should empty it. EG, Public Rxs As String Public Sub Sport_Read()? Dim Rx As String? Sleep 0.05?? Read #Sport, Rx, Lof(Sport)? Rxs = Rxs & Rx ? If Rx = Chr$(13) Then? ? '*** Do some thing with the data ****????TextArea1.Text = TextArea1.Text & Rxs? ? Rxs = ""? End IfEnd Mike On Thursday, 25 April 2019, 9:10:05 pm AWST, Beno?t Minisini wrote: Le 25/04/2019 ? 14:55, Ivan Kern a ?crit?: > Good afternoon, everyone. > is it possible to empty the output buffer of Serial Port? > > Greetings, Ivan > How do you do that in C ? -- Beno?t Minisini ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan-kern at freenet.de Fri Apr 26 08:28:18 2019 From: ivan-kern at freenet.de (Ivan Kern) Date: Fri, 26 Apr 2019 08:28:18 +0200 Subject: [Gambas-user] Output buffer of Serial Port In-Reply-To: <99746179.856846.1556258098832@mail.yahoo.com> References: <09d2b762-2c52-5a81-59e1-c8329999b2d5@freenet.de> <99746179.856846.1556258098832@mail.yahoo.com> Message-ID: <60783a74-fcb6-89f7-0a77-e6ce439011d2@freenet.de> Thanks to everyone, the matter is settled. The problem was the wrong serial port settings. Greetings, Ivan Am 26.04.2019 um 07:54 schrieb Mike Crean via User: > Just read the data in it should empty it. > > EG, > > Public Rxs As String > > Public Sub Sport_Read() > ? Dim Rx As String > ? Sleep 0.05 > ? Read #Sport, Rx, Lof(Sport) > ? Rxs = Rxs & Rx > ? If Rx = Chr$(13) Then > ? ? '*** Do some thing with the data **** > ????TextArea1.Text = TextArea1.Text & Rxs > ? ? Rxs = "" > ? End If > End > > > Mike > > > > > > On Thursday, 25 April 2019, 9:10:05 pm AWST, Beno?t Minisini > wrote: > > > Le 25/04/2019 ? 14:55, Ivan Kern a ?crit?: > > Good afternoon, everyone. > > is it possible to empty the output buffer of Serial Port? > > > > Greetings, Ivan > > > > How do you do that in C ? > > -- > Beno?t Minisini > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net > ]---- > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mckaygerhard at gmail.com Fri Apr 26 14:37:40 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Fri, 26 Apr 2019 08:37:40 -0400 Subject: [Gambas-user] IRC channels In-Reply-To: <20190425191516.GP30006@highrise.localdomain> References: <20190425191516.GP30006@highrise.localdomain> Message-ID: GREAT! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com El jue., 25 de abr. de 2019 a la(s) 15:16, Tobias Boege (taboege at gmail.com) escribi?: > Hi list, > > I want to let you know that I have registered a "gambas" group on the > Freenode IRC network [1]. This means that we have first-class presence > on the network, which in turn doesn't really mean anything, except that > we can give out project cloaks for the Gambas project now (I just got mine) > and that I get an excuse to remind you that the channels exist at all. > > In case you don't know, Freenode is an IRC network dedicated to FOSS or > peer-directed projects, and lots of well-known projects have a presence > and support channels there, including Wikipedia, various Linux distri- > butions, various programming languages, myriads of libraries and other > software. It's not in our disadvantage to mix Gambas into that. > > The #gambas channel existed there for many years, before the group was > registered, and didn't see much traffic since I joined. I got the idea > to revive it when we recently had a bunch of questions here about native > component development. > > Most questions are adequately discussed on the mailing list, because > they require experimentation, reading code, careful wording, attachments, > archival... But walking someone through the process of writing their first > native component or solving an installation issue, for instance, can > benefit from interactive realtime discussion. Therefore I think IRC can > complement the mailing lists quite well. > > There are two channels: > > #gambas : general-purpose: about the language, components, libraries > #gambas-dev : about the C part of Gambas: compiler, interpreter, C API > > I hope that some of you, who hang around the network anyway, bring their > expertise into the channels and that people with questions will find them. > I added them to the wiki [2] already. > > Regards, > Tobi > > [1] https://freenode.net/ > [2] http://gambaswiki.org/wiki/doc/forum > > -- > "There's an old saying: Don't change anything... ever!" -- Mr. Monk > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mckaygerhard at gmail.com Fri Apr 26 14:44:27 2019 From: mckaygerhard at gmail.com (PICCORO McKAY Lenz) Date: Fri, 26 Apr 2019 08:44:27 -0400 Subject: [Gambas-user] IRC channels In-Reply-To: References: <20190425191516.GP30006@highrise.localdomain> Message-ID: the gambas-dev channel does not permit send mesages! Lenz McKAY Gerardo (PICCORO) http://qgqlochekone.blogspot.com El vie., 26 de abr. de 2019 a la(s) 08:37, PICCORO McKAY Lenz ( mckaygerhard at gmail.com) escribi?: > GREAT! > > Lenz McKAY Gerardo (PICCORO) > http://qgqlochekone.blogspot.com > > > El jue., 25 de abr. de 2019 a la(s) 15:16, Tobias Boege (taboege at gmail.com) > escribi?: > >> Hi list, >> >> I want to let you know that I have registered a "gambas" group on the >> Freenode IRC network [1]. This means that we have first-class presence >> on the network, which in turn doesn't really mean anything, except that >> we can give out project cloaks for the Gambas project now (I just got >> mine) >> and that I get an excuse to remind you that the channels exist at all. >> >> In case you don't know, Freenode is an IRC network dedicated to FOSS or >> peer-directed projects, and lots of well-known projects have a presence >> and support channels there, including Wikipedia, various Linux distri- >> butions, various programming languages, myriads of libraries and other >> software. It's not in our disadvantage to mix Gambas into that. >> >> The #gambas channel existed there for many years, before the group was >> registered, and didn't see much traffic since I joined. I got the idea >> to revive it when we recently had a bunch of questions here about native >> component development. >> >> Most questions are adequately discussed on the mailing list, because >> they require experimentation, reading code, careful wording, attachments, >> archival... But walking someone through the process of writing their first >> native component or solving an installation issue, for instance, can >> benefit from interactive realtime discussion. Therefore I think IRC can >> complement the mailing lists quite well. >> >> There are two channels: >> >> #gambas : general-purpose: about the language, components, libraries >> #gambas-dev : about the C part of Gambas: compiler, interpreter, C API >> >> I hope that some of you, who hang around the network anyway, bring their >> expertise into the channels and that people with questions will find them. >> I added them to the wiki [2] already. >> >> Regards, >> Tobi >> >> [1] https://freenode.net/ >> [2] http://gambaswiki.org/wiki/doc/forum >> >> -- >> "There's an old saying: Don't change anything... ever!" -- Mr. Monk >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedron at exede.net Fri Apr 26 17:30:06 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 26 Apr 2019 11:30:06 -0400 (EDT) Subject: [Gambas-user] Using soft links for source code files Message-ID: <1329135857.5733726.1556292606347.JavaMail.zimbra@exede.net> Suppose that I have a class file or module file that I want to use in several projects. Obviously I can copy it around, but then all the sudden I run into versioning issues. Or I can create a soft link to the source file which Gambas interprets as a [read-only] file. This works just fine for me, but I am wondering if there is a different way or any problematic issues with this approach. Thanks, Ced From tmorehen at ajm-software.com Fri Apr 26 18:02:32 2019 From: tmorehen at ajm-software.com (Tony Morehen) Date: Fri, 26 Apr 2019 12:02:32 -0400 Subject: [Gambas-user] Using soft links for source code files In-Reply-To: <1329135857.5733726.1556292606347.JavaMail.zimbra@exede.net> References: <1329135857.5733726.1556292606347.JavaMail.zimbra@exede.net> Message-ID: <81e114d6-dd4e-454b-3bb3-ca8ca4f7920e@ajm-software.com> Use hard links.? Symlinked files will be read-only in the project with the symlinks.? You can only edit in the original project. On 2019-04-26 10:30 a.m., Cedron Dawg wrote: > Suppose that I have a class file or module file that I want to use in several projects. Obviously I can copy it around, but then all the sudden I run into versioning issues. Or I can create a soft link to the source file which Gambas interprets as a [read-only] file. This works just fine for me, but I am wondering if there is a different way or any problematic issues with this approach. > > Thanks, > > Ced > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From cedron at exede.net Fri Apr 26 18:47:58 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 26 Apr 2019 12:47:58 -0400 (EDT) Subject: [Gambas-user] Using soft links for source code files In-Reply-To: <81e114d6-dd4e-454b-3bb3-ca8ca4f7920e@ajm-software.com> References: <1329135857.5733726.1556292606347.JavaMail.zimbra@exede.net> <81e114d6-dd4e-454b-3bb3-ca8ca4f7920e@ajm-software.com> Message-ID: <1952656796.5828350.1556297278945.JavaMail.zimbra@exede.net> For me, the [read-only] is a feature. It tells me that that file is "imported" and maintained elsewhere (easily found by the link properties). With a hard link they are "the same file" in two spots. The danger there is if two or more projects are open, then there is the possibility of edits stepping on each other. When I make a source archive, or a zip file, the soft linked files get copied as though they are there, so that works fine. My concern is there might be other issues that could trip me up, but I can't think of any. I also can't find another slick way to share source code files amongst projects. ----- Original Message ----- From: "Tony Morehen" Use hard links.? Symlinked files will be read-only in the project with the symlinks.? You can only edit in the original project. From kicking177 at gmail.com Fri Apr 26 18:53:28 2019 From: kicking177 at gmail.com (KKing) Date: Fri, 26 Apr 2019 17:53:28 +0100 Subject: [Gambas-user] Debugging Gambas (again) Message-ID: So I'm back to trying to establish why a large application ported from powerbasic is failing with a segmentation fault. Please note I am not looking for anyone to tell me the problem with my code, I am looking for guidance on how to go about debugging a Gambas application. I found this link https://www.domotiga.nl/projects/domotiga/wiki/Gambas_Debugging And have been following the section titled Debug Signal #11 for reference when I do $ gdb gbx3 GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 The program is an order entry system with multiple ordering lines to be entered, after a certain number of entries the program fails, under gdb it gives Program received signal SIGSEGV, Segmentation fault. 0x0806d8d3 in STRING_new (src=0x0, len=2) at gbx_string.c:311elAddr 311??? ??? str = alloc_string(len); I can follow the next commands all okay and one below does highlight the line I know it gets to via a manual trace log file I write to, in fact it is a call to the trace log that it fails on (and has been through this same routine a large number of times already) (gdb) p DEBUG_get_position(EXEC_current.cp, EXEC_current.fp, EXEC_current.pc) $1 = 0x80a0d00 "Module1.dBUse.142" But I'm not sure about the line (gdb) l gbx_watch.c:504 why? and is it likely to be still correct for my version of (compiled from source) Gambas (3.8.4)? I'm not sure if the response below is what look for/expecting ? << 499??? ??? ??? ??? ??? (*(wcb.callback_read))(wcb.fd, GB_WATCH_READ, wcb.param_read); 500??? ??? ??? ??? } 501??? ??? ??? } 502 503??? ??? ??? if (FD_ISSET(wcb.fd, wfd)) 504??? ??? ??? { 505??? ??? ??? ??? FD_CLR(wcb.fd, wfd); 506??? ??? ??? ??? if (wcb.callback_write) 507??? ??? ??? ??? { 508??? ??? ??? ??? ??? #ifdef DEBUG_WATCH >> and if I do the next two lines I get. (gdb) print ret No symbol "ret" in current context. (gdb) info locals No locals. Any idea what I am doing wrong there? Also when I try to save I get the following (gdb) gcore warning: Memory read failed for corefile section, 12288 bytes at 0xb7fda000. Saved corefile core.7817 Then I tried with valgrind. it starts with << $ tail -f /tmp/valgring.log ==6154== Memcheck, a memory error detector ==6154== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==6154== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info ==6154== Command: gbx3 ==6154== Parent PID: 6086 ==6154== ==6154== Invalid read of size 4 ==6154==??? at 0x806D8D3: STRING_new (gbx_string.c:311) ==6154==??? by 0x806DC05: STRING_new_temp_value (gbx_string.c:459) ==6154==??? by 0x806D057: NUMBER_int_to_string (gbx_number.c:491) ==6154==??? by 0x804DC91: VALUE_convert (gbx_value.c:576) ==6154==??? by 0x8061271: SUBR_conv (gbx_subr_conv.c:108) ==6154==??? by 0x807F281: EXEC_loop (gbx_exec_loop.c:510) ==6154==??? by 0x80510E1: EXEC_function_loop (gbx_exec.c:931) ==6154==??? by 0x8051764: EXEC_function_real (gbx_exec.c:895) ==6154==??? by 0x804B4FB: main (gbx.c:416) ==6154==? Address 0x2867d400 is not stack'd, malloc'd or (recently) free'd ==6154== ==6154== ==6154== Process terminating with default action of signal 11 (SIGSEGV) ==6154==? Access not within mapped region at address 0x2867D400 ==6154==??? at 0x806D8D3: STRING_new (gbx_string.c:311) ==6154==??? by 0x806DC05: STRING_new_temp_value (gbx_string.c:459) ==6154==??? by 0x806D057: NUMBER_int_to_string (gbx_number.c:491) ==6154==??? by 0x804DC91: VALUE_convert (gbx_value.c:576) ==6154==??? by 0x8061271: SUBR_conv (gbx_subr_conv.c:108) ==6154==??? by 0x807F281: EXEC_loop (gbx_exec_loop.c:510) ==6154==??? by 0x80510E1: EXEC_function_loop (gbx_exec.c:931) ==6154==??? by 0x8051764: EXEC_function_real (gbx_exec.c:895) ==6154==??? by 0x804B4FB: main (gbx.c:416) ==6154==? If you believe this happened as a result of a stack ==6154==? overflow in your program's main thread (unlikely but ==6154==? possible), you can try to increase the size of the ==6154==? main thread stack using the --main-stacksize= flag. ==6154==? The main thread stack size used in this run was 8388608. ==6154== ==6154== HEAP SUMMARY: ==6154==???? in use at exit: 210,929 bytes in 1,065 blocks ==6154==?? total heap usage: 1,700 allocs, 635 frees, 865,849 bytes allocated ==6154== >> then multiple repeating (with varying content) sections like below << ==6154== 16 bytes in 1 blocks are possibly lost in loss record 7 of 183 ==6154==??? at 0x402A1CC: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==6154==??? by 0x804CA32: my_malloc (gb_alloc_temp.h:368) ==6154==??? by 0x80553FC: CLASS_find (gbx_class.c:543) ==6154==??? by 0x8054EC3: CLASS_init_native (gbx_class_init.c:145) ==6154==??? by 0x806C663: init (gbx.c:87) ==6154==??? by 0x804B33F: main (gbx.c:372) >> and finally << ==6154== 45,920 bytes in 2 blocks are possibly lost in loss record 183 of 183 ==6154==??? at 0x402A1CC: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==6154==??? by 0x804CA32: my_malloc (gb_alloc_temp.h:368) ==6154==??? by 0x805BBD4: STREAM_load (gbx_stream.c:1450) ==6154==??? by 0x8056F6E: load_without_inits (gbx_class_load.c:1012) ==6154==??? by 0x80585A1: CLASS_load_real (gbx_class_load.c:1311) ==6154==??? by 0x806A2C9: ARCHIVE_load_exported_class (gbx_archive.c:196) ==6154==??? by 0x806A416: ARCHIVE_load_main (gbx_archive.c:282) ==6154==??? by 0x805D0DA: PROJECT_load_finish (gbx_project.c:489) ==6154==??? by 0x806C6AF: init (gbx.c:103) ==6154==??? by 0x804B33F: main (gbx.c:372) ==6154== ==6154== LEAK SUMMARY: ==6154==??? definitely lost: 32 bytes in 1 blocks ==6154==??? indirectly lost: 64 bytes in 2 blocks ==6154==????? possibly lost: 133,072 bytes in 576 blocks ==6154==??? still reachable: 77,761 bytes in 486 blocks ==6154==???????? suppressed: 0 bytes in 0 blocks ==6154== Reachable blocks (those to which a pointer was found) are not shown. ==6154== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==6154== ==6154== For counts of detected and suppressed errors, rerun with: -v ==6154== ERROR SUMMARY: 117 errors from 117 contexts (suppressed: 0 from 0) >> So have I misunderstood any of the instructions in https://www.domotiga.nl/projects/domotiga/wiki/Gambas_Debugging or do I need to do it slightly differently for some reason(s) ? My next steps are likely to be to grab the latest version of Gambas source and compile that on a Debian 9 64bit unit, and assuming it still fails, repeat the above. Does that sound reasonable, anything else I should do differently? K. From taboege at gmail.com Fri Apr 26 20:15:47 2019 From: taboege at gmail.com (Tobias Boege) Date: Fri, 26 Apr 2019 20:15:47 +0200 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: References: Message-ID: <20190426181546.GS30006@highrise.localdomain> On Fri, 26 Apr 2019, KKing wrote: > So I'm back to trying to establish why a large application ported from > powerbasic is failing with a segmentation fault. > > Please note I am not looking for anyone to tell me the problem with my code, > I am looking for guidance on how to go about debugging a Gambas application. > > I found this link > https://www.domotiga.nl/projects/domotiga/wiki/Gambas_Debugging > > And have been following the section titled Debug Signal #11 > > for reference when I do > $ gdb gbx3 > GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 > > The program is an order entry system with multiple ordering lines to be > entered, after a certain number of entries the program fails, under gdb it > gives > > Program received signal SIGSEGV, Segmentation fault. > 0x0806d8d3 in STRING_new (src=0x0, len=2) at gbx_string.c:311elAddr > 311??? ??? str = alloc_string(len); > Here the output of the "bt" command would be interesting. Which path does the interpreter take to the segfault? Sadly, the alloc_string where the error happens is a macro, so we don't know exactly where the error occurs. If you turn on the DEBUG_ME directive as explained below, it will be demacroed, so we'll get a better look. > I can follow the next commands all okay and one below does highlight the > line I know it gets to via a manual trace log file I write to, in fact it is > a call to the trace log that it fails on (and has been through this same > routine a large number of times already) > > (gdb) p DEBUG_get_position(EXEC_current.cp, EXEC_current.fp, > EXEC_current.pc) > $1 = 0x80a0d00 "Module1.dBUse.142" > > But I'm not sure about the line > (gdb) l gbx_watch.c:504 > > why? and is it likely to be still correct for my version of (compiled from > source) Gambas (3.8.4)? > The "l gbx_watch.c:504" in the tutorial was just an example that is not relevant here. The "l" command lists source code, but gbx_watch.c doesn't seem to be involved in this issue. We'll know more once you have a back- trace from "bt". If you compiled Gambas yourself with debugging symbols enabled (-O0 -g), then yes, the filenames and lines will match what's inside the Gambas sources on your system. They will not necessarily match what everybody else has on their computers, or the current stable version. > I'm not sure if the response below is what look for/expecting ? > << > 499??? ??? ??? ??? ??? (*(wcb.callback_read))(wcb.fd, GB_WATCH_READ, > wcb.param_read); > 500??? ??? ??? ??? } > 501??? ??? ??? } > 502 > 503??? ??? ??? if (FD_ISSET(wcb.fd, wfd)) > 504??? ??? ??? { > 505??? ??? ??? ??? FD_CLR(wcb.fd, wfd); > 506??? ??? ??? ??? if (wcb.callback_write) > 507??? ??? ??? ??? { > 508??? ??? ??? ??? ??? #ifdef DEBUG_WATCH > >> > > My next steps are likely to be to grab the latest version of Gambas source > and compile that on a Debian 9 64bit unit, and assuming it still fails, > repeat the above. > > Does that sound reasonable, anything else I should do differently? > Compiling the latest Gambas is very reasonable (in this case). When you do, you can also add "-DDEBUG_ME" to CFLAGS and CXXFLAGS when calling make, like the debugging tutorial tells you to do with with "-O0 -g" already. DEBUG_ME will enable lots of diagnostic messages from the interpreter and cause some macros to be replaced by properly tracable functions. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk From cedron at exede.net Fri Apr 26 21:40:11 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 26 Apr 2019 15:40:11 -0400 (EDT) Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: References: Message-ID: <55671253.5975382.1556307611860.JavaMail.zimbra@exede.net> I'm not understanding the need for deep-diving debugging here. You have some code that is blowing up. It doesn't blow up immediately, so you know it isn't an obvious inherent Gambas problem. Something must be different in the call that blows up vs the calls that don't. That something is in your code, and you need to find it. It seems to me, tracing the blowup into the internals of Gambas to see what actually blows, so you can deduce what you did in your code to make that happen is a cumbersome way to go about it. Traditional source code level debugging, e.g. print statements, breakpoints, and watch variables, should help you find your problem. The most I can see arising from doing the debugging down to the Gambas code itself, is to formulate a recommendation for one more safety check in the code. Depending upon what the problem is, this may or may not be something that needs fixing. But, you still know you have a problem in your code. Perhaps you should post a part of your code around the problem area and somebody might spot what is going on. On the other hand, if you are interested in these advanced debugging techniques in their own right, forget everything I said. Ced For upgrading your Gambas, doesn't the PPA (team-gambas/gambas3) work for you? You shouldn't need to compile it yourself. ----- Original Message ----- From: "KKing" ... So I'm back to trying to establish why a large application ported from powerbasic is failing with a segmentation fault. Please note I am not looking for anyone to tell me the problem with my code, I am looking for guidance on how to go about debugging a Gambas application. .... My next steps are likely to be to grab the latest version of Gambas source and compile that on a Debian 9 64bit unit, and assuming it still fails, repeat the above. Does that sound reasonable, anything else I should do differently? K. ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- From jussi.lahtinen at gmail.com Sat Apr 27 00:46:13 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sat, 27 Apr 2019 01:46:13 +0300 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: <55671253.5975382.1556307611860.JavaMail.zimbra@exede.net> References: <55671253.5975382.1556307611860.JavaMail.zimbra@exede.net> Message-ID: It is Gambas problem when there is segmentation fault from native Gambas code. Jussi On Fri, Apr 26, 2019 at 10:41 PM Cedron Dawg wrote: > I'm not understanding the need for deep-diving debugging here. > > You have some code that is blowing up. It doesn't blow up immediately, so > you know it isn't an obvious inherent Gambas problem. Something must be > different in the call that blows up vs the calls that don't. That > something is in your code, and you need to find it. It seems to me, > tracing the blowup into the internals of Gambas to see what actually blows, > so you can deduce what you did in your code to make that happen is a > cumbersome way to go about it. > > Traditional source code level debugging, e.g. print statements, > breakpoints, and watch variables, should help you find your problem. The > most I can see arising from doing the debugging down to the Gambas code > itself, is to formulate a recommendation for one more safety check in the > code. Depending upon what the problem is, this may or may not be something > that needs fixing. But, you still know you have a problem in your code. > > Perhaps you should post a part of your code around the problem area and > somebody might spot what is going on. > > On the other hand, if you are interested in these advanced debugging > techniques in their own right, forget everything I said. > > Ced > > For upgrading your Gambas, doesn't the PPA (team-gambas/gambas3) work for > you? You shouldn't need to compile it yourself. > > > ----- Original Message ----- > From: "KKing" > > ... > > So I'm back to trying to establish why a large application ported from > powerbasic is failing with a segmentation fault. > > Please note I am not looking for anyone to tell me the problem with my > code, I am looking for guidance on how to go about debugging a Gambas > application. > > .... > > My next steps are likely to be to grab the latest version of Gambas > source and compile that on a Debian 9 64bit unit, and assuming it still > fails, repeat the above. > > Does that sound reasonable, anything else I should do differently? > > K. > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedron at exede.net Sat Apr 27 01:26:22 2019 From: cedron at exede.net (Cedron Dawg) Date: Fri, 26 Apr 2019 19:26:22 -0400 (EDT) Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: References: <55671253.5975382.1556307611860.JavaMail.zimbra@exede.net> Message-ID: <984709481.6181765.1556321182590.JavaMail.zimbra@exede.net> Ideally that is true. You shouldn't be able to throw anything at the underlying code and have it seg fault. Nor am I ruling out some sort of Gambas bug in this situation. But what is the difference between a seg fault and some other sort of cleaner error exit in this case? (Assuming the OP's source code is flawed) The fact that it happens as "after a certain number of entries the program fails" indicates either a capacity issue or a bad case scenario. If it failed the first time, then go looking for an obvious Gambas bug. My bet is that the problem ends up being in the OP's code, and maybe he's found a place where Gambas needs to be better fool-proofed. However, adding parameter validation testing to every function call is a questionable endeavor. Just 2 cents. I am curious about how this turns out. ----- Original Message ----- From: "Jussi Lahtinen" To: "user" Sent: Friday, April 26, 2019 6:46:13 PM Subject: Re: [Gambas-user] Debugging Gambas (again) It is Gambas problem when there is segmentation fault from native Gambas code. Jussi From jussi.lahtinen at gmail.com Sat Apr 27 02:31:59 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sat, 27 Apr 2019 03:31:59 +0300 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: <984709481.6181765.1556321182590.JavaMail.zimbra@exede.net> References: <55671253.5975382.1556307611860.JavaMail.zimbra@exede.net> <984709481.6181765.1556321182590.JavaMail.zimbra@exede.net> Message-ID: Understanding why sig11 is bug in Gambas requires some understanding of how modern operating systems and how interpreted languages like Gambas work. https://en.wikipedia.org/wiki/Memory_protection https://en.wikipedia.org/wiki/Bytecode Only way this could not be bug in Gambas (it may very well be *also* bug in the OPs code), is that the OP is calling external function written in some other language and the error comes from there, but by quick look it doesn't look like that. Jussi On Sat, Apr 27, 2019 at 2:27 AM Cedron Dawg wrote: > Ideally that is true. You shouldn't be able to throw anything at the > underlying code and have it seg fault. Nor am I ruling out some sort of > Gambas bug in this situation. But what is the difference between a seg > fault and some other sort of cleaner error exit in this case? (Assuming > the OP's source code is flawed) > > The fact that it happens as "after a certain number of entries the program > fails" indicates either a capacity issue or a bad case scenario. If it > failed the first time, then go looking for an obvious Gambas bug. > > My bet is that the problem ends up being in the OP's code, and maybe he's > found a place where Gambas needs to be better fool-proofed. However, > adding parameter validation testing to every function call is a > questionable endeavor. > > Just 2 cents. I am curious about how this turns out. > > > ----- Original Message ----- > From: "Jussi Lahtinen" > To: "user" > Sent: Friday, April 26, 2019 6:46:13 PM > Subject: Re: [Gambas-user] Debugging Gambas (again) > > It is Gambas problem when there is segmentation fault from native Gambas > code. > > > Jussi > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Sat Apr 27 03:01:16 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sat, 27 Apr 2019 04:01:16 +0300 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: References: <55671253.5975382.1556307611860.JavaMail.zimbra@exede.net> <984709481.6181765.1556321182590.JavaMail.zimbra@exede.net> Message-ID: I gave you kinda lazy answer, sorry but I'm tired. Segfault comes from operating system and "the clean errors" comes from Gambas interpreter. I hope that will clear the confusion after you do some reading. Jussi On Sat, Apr 27, 2019 at 3:31 AM Jussi Lahtinen wrote: > Understanding why sig11 is bug in Gambas requires some understanding of > how modern operating systems and how interpreted languages like Gambas work. > https://en.wikipedia.org/wiki/Memory_protection > https://en.wikipedia.org/wiki/Bytecode > > Only way this could not be bug in Gambas (it may very well be *also* bug > in the OPs code), is that the OP is calling external function written in > some other language and the error comes from there, but by quick look it > doesn't look like that. > > > Jussi > > > On Sat, Apr 27, 2019 at 2:27 AM Cedron Dawg wrote: > >> Ideally that is true. You shouldn't be able to throw anything at the >> underlying code and have it seg fault. Nor am I ruling out some sort of >> Gambas bug in this situation. But what is the difference between a seg >> fault and some other sort of cleaner error exit in this case? (Assuming >> the OP's source code is flawed) >> >> The fact that it happens as "after a certain number of entries the >> program fails" indicates either a capacity issue or a bad case scenario. >> If it failed the first time, then go looking for an obvious Gambas bug. >> >> My bet is that the problem ends up being in the OP's code, and maybe he's >> found a place where Gambas needs to be better fool-proofed. However, >> adding parameter validation testing to every function call is a >> questionable endeavor. >> >> Just 2 cents. I am curious about how this turns out. >> >> >> ----- Original Message ----- >> From: "Jussi Lahtinen" >> To: "user" >> Sent: Friday, April 26, 2019 6:46:13 PM >> Subject: Re: [Gambas-user] Debugging Gambas (again) >> >> It is Gambas problem when there is segmentation fault from native Gambas >> code. >> >> >> Jussi >> >> >> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Sat Apr 27 03:25:51 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 27 Apr 2019 03:25:51 +0200 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: References: Message-ID: <4c7677d0-cbab-50b8-8027-97aee1e5b9cf@gmail.com> Le 26/04/2019 ? 18:53, KKing a ?crit?: > So I'm back to trying to establish why a large application ported from > powerbasic is failing with a segmentation fault. > > Please note I am not looking for anyone to tell me the problem with my > code, I am looking for guidance on how to go about debugging a Gambas > application. > > I found this link > https://www.domotiga.nl/projects/domotiga/wiki/Gambas_Debugging > > And have been following the section titled Debug Signal #11 > > for reference when I do > $ gdb gbx3 > GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 > > The program is an order entry system with multiple ordering lines to be > entered, after a certain number of entries the program fails, under gdb > it gives > > Program received signal SIGSEGV, Segmentation fault. > 0x0806d8d3 in STRING_new (src=0x0, len=2) at gbx_string.c:311elAddr > 311??? ??? str = alloc_string(len); > As Tobias said, provide the stack backtrace of the crash. And to really get useful information, you have to recompile gambas with debugging information enabled first. But without the source code and without knowing what you do exactly (for example do you use external functions and all the unsafe functions associated with them?), it will difficult to track the possible big. If possible, you should try to isolate the bug as much as possible. Regards, -- Beno?t Minisini From kicking177 at gmail.com Sat Apr 27 10:41:36 2019 From: kicking177 at gmail.com (KKing) Date: Sat, 27 Apr 2019 09:41:36 +0100 Subject: [Gambas-user] Debugging Gambas (again) Message-ID: <8d75b22e-04c0-3aa2-1b24-fe253cfcafa7@gmail.com> thankyou, that gives me a better understanding and lets me plan next steps, which will be to grab latest sources and compile with the "-DDEBUG_ME" to CFLAGS and CXXFLAGS, which I will not have done last time. @Ced: I am "interested in these advanced debugging techniques" and also because I've been through the << Traditional source code level debugging, e.g. print statements, breakpoints, and watch variables >> And found that it fails in a section of code that is called repeatedly without issue until the segfault and by nature of the data that is being passed around and changing the order it is entered I know it is not the data and on face of it not program code. The goal is to not only get the code to run but also to establish why it is failing and if it is within Gambas internals or a component, to help identify and improve it, or in worst case have a "do not do this with Gambas". K. From kicking177 at gmail.com Sat Apr 27 14:08:11 2019 From: kicking177 at gmail.com (KKing) Date: Sat, 27 Apr 2019 13:08:11 +0100 Subject: [Gambas-user] Debugging Gambas (again) Message-ID: again, thankyou all. just for ref here is the backtrace from current dev system if it has any value, remember it is from 3.8.4 << (gdb) bt #0? 0x0806d8d3 in STRING_new (src=0x0, len=2) at gbx_string.c:311 #1? 0x0806dc06 in STRING_new_temp_value (value=0xb7447a80, src=0x0, len=2) at gbx_string.c:459 #2? 0x0806d058 in NUMBER_int_to_string (nbr=0, prec=0, base=10, value=0xb7447a80) at gbx_number.c:491 #3? 0x0804dc92 in VALUE_convert (value=0xb7447a80, type=9) at gbx_value.c:576 #4? 0x08061272 in SUBR_conv (code=26377) at gbx_subr_conv.c:108 #5? 0x0807f282 in EXEC_loop () at gbx_exec_loop.c:510 #6? 0x080510e2 in EXEC_function_loop () at gbx_exec.c:931 #7? 0x08051765 in EXEC_function_real () at gbx_exec.c:895 #8? 0x08052420 in EXEC_public_desc (class=0x80ac99c, object=0x0, desc=0x80c8834, nparam=0) at gbx_exec.c:1616 #9? 0x0804b4fc in main (argc=1, argv=0xbffff3c4) at gbx.c:416 >> Could you elaborate on what you define as << external functions >> assuming you don't mean functions defined in other gambas modules or classes from the source folder, then the only thing that possibly stands out is the gb.ncurses component? Yes I realise source code would help, and preferably a stripped down version that replicates the issue, but the former is rather large and frankly a mess from a rushed attempt to port from PowerBasic and the latter would take some time and could go a few different tacks, i.e. I could look to do this without ncurses to try and rule that out, but a console app is preferred so that effort if narrows it down to gb.ncurses is going to be thrown away and still leaves the issue to resolve. I will try to find time to create a stripped down version to replicate the issue, which suspicion is currently around a class with a number of variables defined at top before any Sub or Function along with an Ncurses window excerpt is: Private $hText As Window Private sProductCode as String Private sProductDescription as String Private fPrice as Float When the current code fails it is when it enters a routine to fetch data from a data file to populate the above variables which are then displayed via $hText.Print. This works multiple times until the screen needs to scroll the content which it does all that and calls a routine to reset the data variables for the last line which performs the following sProductCode = Space$(10) sProductDescription = Space$(30) fPrice = 0 and displays that to the screen via $hText.Print, still all okay. But when it calls the routine to read from the data file that it SegFaults, currently on one my TraceLog calls. So I will be trying to craft a cut down version around the above, though I would like to do that with a more recent version of Gambas Source. Where should I pull the source from? K. From g4mba5 at gmail.com Sat Apr 27 14:21:04 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Sat, 27 Apr 2019 14:21:04 +0200 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: References: Message-ID: <9dfaa287-7f8f-27eb-cedd-603d093ba168@gmail.com> Le 27/04/2019 ? 14:08, KKing a ?crit?: > again, thankyou all. just for ref here is the backtrace from current dev > system if it has any value, remember it is from 3.8.4 > > << > (gdb) bt > #0? 0x0806d8d3 in STRING_new (src=0x0, len=2) at gbx_string.c:311 > #1? 0x0806dc06 in STRING_new_temp_value (value=0xb7447a80, src=0x0, > len=2) at gbx_string.c:459 > #2? 0x0806d058 in NUMBER_int_to_string (nbr=0, prec=0, base=10, > value=0xb7447a80) at gbx_number.c:491 > #3? 0x0804dc92 in VALUE_convert (value=0xb7447a80, type=9) at > gbx_value.c:576 > #4? 0x08061272 in SUBR_conv (code=26377) at gbx_subr_conv.c:108 > #5? 0x0807f282 in EXEC_loop () at gbx_exec_loop.c:510 > #6? 0x080510e2 in EXEC_function_loop () at gbx_exec.c:931 > #7? 0x08051765 in EXEC_function_real () at gbx_exec.c:895 > #8? 0x08052420 in EXEC_public_desc (class=0x80ac99c, object=0x0, > desc=0x80c8834, nparam=0) at gbx_exec.c:1616 > #9? 0x0804b4fc in main (argc=1, argv=0xbffff3c4) at gbx.c:416 > >> > OK. Can you enter "p DEBUG_get_current_position()"? It will tell you where the crash occurs in your Gambas code. Can you send the source code of the function where it crashes? > Could you elaborate on what you define as > << > external functions > >> > assuming you don't mean functions defined in other gambas modules or > classes from the source folder, then the only thing that possibly stands > out is the gb.ncurses component? If you don't know, then you didn't use them an everything is fine. :-) -- Beno?t Minisini From cedron at exede.net Sat Apr 27 14:59:46 2019 From: cedron at exede.net (Cedron Dawg) Date: Sat, 27 Apr 2019 08:59:46 -0400 (EDT) Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: <8d75b22e-04c0-3aa2-1b24-fe253cfcafa7@gmail.com> References: <8d75b22e-04c0-3aa2-1b24-fe253cfcafa7@gmail.com> Message-ID: <2058782329.6795893.1556369986281.JavaMail.zimbra@exede.net> Hi K, I appreciate that. Had you said: "Please note I don't think there is a problem with my code, I am looking for guidance on how to go about debugging Gambas." Instead of: "Please note I am not looking for anyone to tell me the problem with my code, I am looking for guidance on how to go about debugging a Gambas application." Then I wouldn't have had to fluster Jussi a little bit. (BTW, Jussi, I wrote a comprehensive byte-code interpreter in 8086 assembly in Real Mode as a DOS 3.1 TSR that was used in production for several years, circa 1988) I don't like ncurses, it is a bloated mess, but it's been around a long time, so if that is the locus of the problem, I would suspect gb.ncurses first. I've attached an incomplete project which you might find useful. It is part of a path towards a lightweight ncurses "equivalent". The attached code is essentially the same as early BASICs: It gives you a Locate statement for printing and provides an Inkey and Line Input for reading terminal input with VT100 escape sequences translated to character codes. Ced ----- Original Message ----- From: "KKing" To: "user" Sent: Saturday, April 27, 2019 4:41:36 AM Subject: Re: [Gambas-user] Debugging Gambas (again) thankyou, that gives me a better understanding and lets me plan next steps, which will be to grab latest sources and compile with the "-DDEBUG_ME" to CFLAGS and CXXFLAGS, which I will not have done last time. @Ced: I am "interested in these advanced debugging techniques" and also because I've been through the << Traditional source code level debugging, e.g. print statements, breakpoints, and watch variables >> And found that it fails in a section of code that is called repeatedly without issue until the segfault and by nature of the data that is being passed around and changing the order it is entered I know it is not the data and on face of it not program code. The goal is to not only get the code to run but also to establish why it is failing and if it is within Gambas internals or a component, to help identify and improve it, or in worst case have a "do not do this with Gambas". K. -------------- next part -------------- A non-text attachment was scrubbed... Name: NiceTerm-0.0.4.tar.gz Type: application/x-compressed-tar Size: 25261 bytes Desc: not available URL: From kicking177 at gmail.com Sat Apr 27 16:15:58 2019 From: kicking177 at gmail.com (KKing) Date: Sat, 27 Apr 2019 15:15:58 +0100 Subject: [Gambas-user] Debugging Gambas (again) Message-ID: ok ??? p DEBUG_get_current_position() seems to do same as ??? p DEBUG_get_position(EXEC_current.cp, EXEC_current.fp, EXEC_current.pc) both return $1 = 0x80a0d00 "Module1.dBUse.142" so line 142 is the line with "Debug This 1007A" below, << For iField = 1 To iNumOfFields ??? If (Main.giLNBP = 4) Then ????? Main.TraceLog("Debug This 1006: iField " & CStr(iField)) ??? End If ??? DBFField = Null ??? If (Main.giLNBP = 4) And (iField = 17) Then ????? Main.TraceLog("Debug This 1007A: iField " & CStr(iField)) ??? End If ??? DBFField = New CDBFFields ??? If (Main.giLNBP = 4) And (iField = 17) Then ????? Main.TraceLog("Debug This 1007B: iField " & CStr(iField)) ??? End If ?..... snip ..... Next >> The "IF" statements were me narrowing down the point it (currently) SegFaults. In the TraceLog I am writing too it has the "Debug This 1006" but not the "Debug This 1007A", but could that be cache not flushed on crash? If I take away the "IF" statements (as I had at one stage) the log file has << ????? Main.TraceLog("Debug This 1007A: iField " & CStr(iField)) >> and lines before and after, multiple times including for when iField is 17. Does "Module1.dBUse.142" mean the line that fails, or the last line that processed okay? and hence is it really the line << DBFField = New CDBFFields >> that it is crashing on? for ref CDBFFields is a class with << Public FieldName As String Public FieldType As String Public FieldLength As Byte Public FieldOffset As Short Public FieldDecimals As Byte >> Question is the << ??? DBFField = Null >> before << ??? DBFField = New CDBFFields >> within the for next okay? I've not provided the full function because it is rather long with a lot more further sub classes that really would protract the discussion and would be better served by me trying to create a cut down version to work from. K From d4t4full at gmail.com Sat Apr 27 16:21:47 2019 From: d4t4full at gmail.com (d4t4full at gmail.com) Date: Sat, 27 Apr 2019 11:21:47 -0300 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: <2058782329.6795893.1556369986281.JavaMail.zimbra@exede.net> References: <8d75b22e-04c0-3aa2-1b24-fe253cfcafa7@gmail.com> <2058782329.6795893.1556369986281.JavaMail.zimbra@exede.net> Message-ID: Personally, I always hated the awkward Microsoftean way to LOCATE things to PRINT. Two statements? Why? Instead, always loved the british Sinclairean way, which uses: PRINT AT , Simple, elegant, shorter, it has it all... and even looks more VT100 oriented, where you put coordinate/color/etc. codes right before the payload. Same way to handle attributes (color, etc): PRINT AT 3, 10; INK 7; PAPER 0; FLASH 1; INVERSE 0; BRIGHT 1; OVER 0;"Hello world." Could go on with replacing the also Microsoftean LEFT$, RIGHT$ and MID$ abominations with the simpler and more readable Sinclairean syntax VAR$( TO ) but enough nostalgia trip... ZXMarce. On Apr 27, 2019, 10:00, at 10:00, Cedron Dawg wrote: >Hi K, > >I appreciate that. > >Had you said: "Please note I don't think there is a problem with my >code, I am looking for guidance on how to go about debugging Gambas." > >Instead of: > >"Please note I am not looking for anyone to tell me the problem with my >code, I am looking for guidance on how to go about debugging a Gambas >application." > >Then I wouldn't have had to fluster Jussi a little bit. (BTW, Jussi, I >wrote a comprehensive byte-code interpreter in 8086 assembly in Real >Mode as a DOS 3.1 TSR that was used in production for several years, >circa 1988) > >I don't like ncurses, it is a bloated mess, but it's been around a long >time, so if that is the locus of the problem, I would suspect >gb.ncurses first. > >I've attached an incomplete project which you might find useful. It is >part of a path towards a lightweight ncurses "equivalent". The >attached code is essentially the same as early BASICs: It gives you a >Locate statement for printing and provides an Inkey and Line Input for >reading terminal input with VT100 escape sequences translated to >character codes. > >Ced > > >----- Original Message ----- >From: "KKing" >To: "user" >Sent: Saturday, April 27, 2019 4:41:36 AM >Subject: Re: [Gambas-user] Debugging Gambas (again) > >thankyou, that gives me a better understanding and lets me plan next >steps, which will be to grab latest sources and compile with the >"-DDEBUG_ME" to CFLAGS and CXXFLAGS, which I will not have done last >time. > >@Ced: I am "interested in these advanced debugging techniques" and also > >because I've been through the ><< >Traditional source code level debugging, e.g. print statements, >breakpoints, and watch variables > >> >And found that it fails in a section of code that is called repeatedly >without issue until the segfault and by nature of the data that is >being >passed around and changing the order it is entered I know it is not the > >data and on face of it not program code. The goal is to not only get >the >code to run but also to establish why it is failing and if it is within > >Gambas internals or a component, to help identify and improve it, or in > >worst case have a "do not do this with Gambas". > >K. > > >------------------------------------------------------------------------ > > >----[ Gambas mailing-list is hosted by https://www.hostsharing.net >]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedron at exede.net Sat Apr 27 17:31:39 2019 From: cedron at exede.net (Cedron Dawg) Date: Sat, 27 Apr 2019 11:31:39 -0400 (EDT) Subject: [Gambas-user] Reply to personal rant... Message-ID: <162020120.6969838.1556379099630.JavaMail.zimbra@exede.net> Separate email because I don't want to hijack the originating thread. I just added a PrintAt(R,C,String) method to my NiceTerm class. I was going to do it originally, but I don't really have a problem with using two statements. Lines of code is not a good metric for either code complexity or code efficiency. I've seen programmers reduce "lines of code" by calling external routines, which in turn, load tons of baggage code, actually take longer to execute, and add an external dependency just to avoid writing a few lines of code that would do the same task. I've also seen programmers who overload statements with incredibly complex calculations which would be much more clear if they introduced a few temporary variables and broke the calculation into a few lines. Coding for clarity and coding for fewest number of lines are often conflicting goals. I strongly favor the former. I happen to like Left, Right, and Mid as they are, but I also like Python's approach of treating strings as character arrays and having range specification capability in subscripting. That is very similar to the Sinclairean syntax you noted. In fact, I would really like to see Gambas adopt the Python range specification convention for all arrays. This includes negative values for wraparound specifications. I wrote NiceTerm because I want to develop a bunch of console apps and I really don't like ncurses. So this isn't merely nostalgic, these are issues for consideration today. Ced ========================================================================== Personally, I always hated the awkward Microsoftean way to LOCATE things to PRINT. Two statements? Why? Instead, always loved the british Sinclairean way, which uses: PRINT AT , Simple, elegant, shorter, it has it all... and even looks more VT100 oriented, where you put coordinate/color/etc. codes right before the payload. Same way to handle attributes (color, etc): PRINT AT 3, 10; INK 7; PAPER 0; FLASH 1; INVERSE 0; BRIGHT 1; OVER 0;"Hello world." Could go on with replacing the also Microsoftean LEFT$, RIGHT$ and MID$ abominations with the simpler and more readable Sinclairean syntax VAR$( TO ) but enough nostalgia trip... ZXMarce. ========================================================================== From d4t4full at gmail.com Sat Apr 27 21:17:05 2019 From: d4t4full at gmail.com (d4t4full at gmail.com) Date: Sat, 27 Apr 2019 16:17:05 -0300 Subject: [Gambas-user] Reply to personal rant... In-Reply-To: <162020120.6969838.1556379099630.JavaMail.zimbra@exede.net> References: <162020120.6969838.1556379099630.JavaMail.zimbra@exede.net> Message-ID: <60b6b357-bea5-4d6b-92e7-c3e08723a358@gmail.com> Cedron, I see we agree on most things, I also like the Python (or even C) way to see strings as character arrays. I also agree that source size is not a good way to measure code efectivity or efficiency; at the same time, I like code readability. Regards, zxMarce. On Apr 27, 2019, 12:32, at 12:32, Cedron Dawg wrote: >Separate email because I don't want to hijack the originating thread. > >I just added a PrintAt(R,C,String) method to my NiceTerm class. I was >going to do it originally, but I don't really have a problem with using >two statements. > > >Lines of code is not a good metric for either code complexity or code >efficiency. > > >I've seen programmers reduce "lines of code" by calling external >routines, which in turn, load tons of baggage code, actually take >longer to execute, and add an external dependency just to avoid writing >a few lines of code that would do the same task. > >I've also seen programmers who overload statements with incredibly >complex calculations which would be much more clear if they introduced >a few temporary variables and broke the calculation into a few lines. >Coding for clarity and coding for fewest number of lines are often >conflicting goals. I strongly favor the former. > >I happen to like Left, Right, and Mid as they are, but I also like >Python's approach of treating strings as character arrays and having >range specification capability in subscripting. That is very similar >to the Sinclairean syntax you noted. > >In fact, I would really like to see Gambas adopt the Python range >specification convention for all arrays. This includes negative values >for wraparound specifications. > >I wrote NiceTerm because I want to develop a bunch of console apps and >I really don't like ncurses. So this isn't merely nostalgic, these are >issues for consideration today. > >Ced > > >========================================================================== > > >Personally, I always hated the awkward Microsoftean way to LOCATE >things to PRINT. Two statements? Why? > >Instead, always loved the british Sinclairean way, which uses: > >PRINT AT , > >Simple, elegant, shorter, it has it all... and even looks more VT100 >oriented, where you put coordinate/color/etc. codes right before the >payload. Same way to handle attributes (color, etc): > >PRINT AT 3, 10; INK 7; PAPER 0; FLASH 1; INVERSE 0; BRIGHT 1; OVER >0;"Hello world." > >Could go on with replacing the also Microsoftean LEFT$, RIGHT$ and MID$ >abominations with the simpler and more readable Sinclairean syntax > >VAR$( TO ) > >but enough nostalgia trip... > > > >ZXMarce. >========================================================================== > >----[ Gambas mailing-list is hosted by https://www.hostsharing.net >]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at gmail.com Sun Apr 28 00:24:27 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Sun, 28 Apr 2019 01:24:27 +0300 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: <2058782329.6795893.1556369986281.JavaMail.zimbra@exede.net> References: <8d75b22e-04c0-3aa2-1b24-fe253cfcafa7@gmail.com> <2058782329.6795893.1556369986281.JavaMail.zimbra@exede.net> Message-ID: BTW, Jussi, I wrote a comprehensive byte-code interpreter in 8086 assembly > in Real Mode as a DOS 3.1 TSR that was used in production for several > years, circa 1988 > Segmentation fault means that the program is trying to access memory address, which it doesn't have privileges to access. So, you can right away say it is *definitely not *capacity issue or "bad case scenario" in the program logic, as you suggested. How could it be? Also whether the program causes crash right away or later, says absolutely *nothing* about where the bug is. It just cannot, not even in theory. Test this: Dim p As Pointer = 1 Dim hStream As Stream hStream = Memory p For Write Print #hStream, "hello!" Close hStream There is no segmentation fault, but "write error" from Gambas. Why? Because if errors are not caught by Gambas, then they can lead to undetermined behaviour later. Thus this "However, adding parameter validation testing to every function call is a questionable endeavor" is also sign of not understanding at all what you are talking about. Once more: Segmentation fault = operating system tells that Gambas tried to do something illegal. The "clean" errors = Gambas tells the programmer, that he tried to do something illegal. Jussi -------------- next part -------------- An HTML attachment was scrubbed... URL: From kicking177 at gmail.com Sun Apr 28 20:19:37 2019 From: kicking177 at gmail.com (KKing) Date: Sun, 28 Apr 2019 19:19:37 +0100 Subject: [Gambas-user] Debugging Gambas (again) Message-ID: <54df15e1-c28c-e491-f1d5-14093bec557c@gmail.com> so I've setup a new unit with Debian 9.9 64bit and as an initial step installed Gambas 3.9.1 from the Debian repositories. my code is still failing in or around the same area but is displaying different behaviour to the previous 32bit system. If I run it in the IDE it runs up till around the same point as before but behaves like the program was asked to stop and closes the terminal opened for ncurses, I've run out of time and patience to try and manually catch it before this happens. When I run it via dbg it displays one of my messages that I placed near a catch statement and is either looping or locked up but does not segfault. When I set a breakpoint in the IDE on the catch it doesn't hit it. So I have pulled the 3.13.0 sources and have run make with the extra debug statements but I have not installed yet. Question, do I have to uninstall the Debian packaged 3.9.1 first (before doing the sudo make install)? Could I run more than one version of Gambas? K. From the_watchmann at yahoo.com Mon Apr 29 15:40:45 2019 From: the_watchmann at yahoo.com (David Silverwood) Date: Mon, 29 Apr 2019 13:40:45 +0000 (UTC) Subject: [Gambas-user] DATE function Gambas 3.8.4 (Distro) References: <2077851537.1776294.1556545245218.ref@mail.yahoo.com> Message-ID: <2077851537.1776294.1556545245218@mail.yahoo.com> HiI'm new to the forum so please forgive any mistakes in protocol. I am also pretty new to Gambas and have a lot to learn, so please forgive once again any stupid questions or mistakes.Am trying to get Gambas dates to work for me. I have a SQLite3 database and as we know SQLite dates are stored as YYYY-MM-DD. It seems Gambas dates are stored MM-DD-YYYY which in South Africa doesn't work as our local dates are stored dd-mm-yyyy. Now, when I format$ my dateboxes/textboxes to read yyyy-mm-dd, depending on the date, I either get a blank box or the month and day are swopped and therefore also renders the date unusable here.?My localisation settings for Linux Mint 18.3 KDE are correct.How can I convince Gambas to use the local date settings or at least format the date to the 'correct' format for our area? The problem occurs when I load the dates from the database and try and format the dates to 'yyyy-mm-dd' using? If edtDate.Text Then? ? dDate = Val(edtDate.Text)? ? edtDate.Text = Format$(dDate, "yyyy-mm-dd")? Endif Any but any suggestions/directions would be much appreciated. Thanks David -------------- next part -------------- An HTML attachment was scrubbed... URL: From bagonergi at gmail.com Mon Apr 29 15:58:17 2019 From: bagonergi at gmail.com (Gianluigi) Date: Mon, 29 Apr 2019 15:58:17 +0200 Subject: [Gambas-user] DATE function Gambas 3.8.4 (Distro) In-Reply-To: <2077851537.1776294.1556545245218@mail.yahoo.com> References: <2077851537.1776294.1556545245218.ref@mail.yahoo.com> <2077851537.1776294.1556545245218@mail.yahoo.com> Message-ID: Il giorno lun 29 apr 2019 alle ore 15:41 David Silverwood via User < user at lists.gambas-basic.org> ha scritto: > Hi > I'm new to the forum so please forgive any mistakes in protocol. I am also > pretty new to Gambas and have a lot to learn, so please forgive once again > any stupid questions or mistakes. > Am trying to get Gambas dates to work for me. I have a SQLite3 database > and as we know SQLite dates are stored as YYYY-MM-DD. It seems Gambas dates > are stored MM-DD-YYYY which in South Africa doesn't work as our local dates > are stored dd-mm-yyyy. Now, when I format$ my dateboxes/textboxes to read > yyyy-mm-dd, depending on the date, I either get a blank box or the month > and day are swopped and therefore also renders the date unusable here. > My localisation settings for Linux Mint 18.3 KDE are correct. > How can I convince Gambas to use the local date settings or at least > format the date to the 'correct' format for our area? > > The problem occurs when I load the dates from the database and try and > format the dates to 'yyyy-mm-dd' using > If edtDate.Text Then > dDate = Val(edtDate.Text) > edtDate.Text = Format$(dDate, "yyyy-mm-dd") > Endif > > Any but any suggestions/directions would be much appreciated. > > Thanks > > David > Hi David, if I understand the problem, you could download ReportTest from the Software farm > Examples and see how the project loads the dates into SQLite and then shows them. I hope it also works on the 3.8 If instead of installing you just download it you can still see the code. Regards Gianluigi -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedron at exede.net Mon Apr 29 17:19:55 2019 From: cedron at exede.net (Cedron Dawg) Date: Mon, 29 Apr 2019 11:19:55 -0400 (EDT) Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: References: <8d75b22e-04c0-3aa2-1b24-fe253cfcafa7@gmail.com> <2058782329.6795893.1556369986281.JavaMail.zimbra@exede.net> Message-ID: <1461629979.9256027.1556551195193.JavaMail.zimbra@exede.net> Jussi, First, I wish I could help the OP better. I can understand his frustration. If the problem is in Gambas, finding the minimal program that demonstrates it is definitely the best approach. If that is a laborious task, I think he should ask if he can email the full code to either Tobi or Benoit to look at, rather than attach it to this thread. He can also email it to me (cedron at exede dot net), and if I can reproduce it (3.12.2) I might be able to minimize it. Let's return to our discussion and generalize it away from the OP's situation. How can capacity issues lead to a seg fault? Here's a few ways: 1) A malloc return value is not checked and a memory allocation error occurs returning a null. The subsequent code tries to write to the NULL pointer and boom, seg default. 2) The interpreter keeps an internal stack of some type. The calling program never calls the "close" for all the "open"s, the stack overflows, and boom, seg default. 3) A circular buffer captures sensor readings. The process reading the buffer calculates the index into a lookup table by taking the difference of two sensor readings. They can only change so much from reading to reading so a range check isn't made. The sensor goes nuts, starts spewing out readings, the buffer overflows, and the lookup index is made from two readings that buffer size apart, goes out of range, and boom seg default. How can a "bad case scenario" lead to a seg fault? Here's an example: Suppose the interpreter provides a "SendToRemotePeer" function that has an internal buffer for holding the message text. The function call specifies where in the buffer to lay the text. This code has to be fast so range checks aren't made. The calling program passes parameters that causes an overwrite on the buffer by one character. The bug is in the calling program, not the interpreter, boom, seg fault. Even though it had called the same function flawlessly thousands of times before. Now, let's talk about fragility and robustness. The difference only becomes important when the calling program sends invalid parameters. Shouldn't all functions be coded to be robust? No. Robustness comes at a cost in code size, complexity, and execution time. Whether it is worth it in a particular location is a judgement call. What is robustness? "parameter validation" How do errors get caught by the interpreter? "parameter validation" What happens when you fail to do "parameter validation" and invalid data gets through? Like you said, unpredictable results, and maybe, even yes, boom, seg fault. All of the examples I cited above could have been caught with proper parameter validation. Fragile code is not a bug or an error. The bug lies in the code calling the fragile code with invalid values. Should an interpreter be coded to be robust? A general purpose usage one, like Gambas, yep. Should it be absolutely robust? I'm not sure that is even theoretical possible. >From the user point of view, does it make much difference if Gambas catches a seg fault and displays a popup, or does a parameter validation finding the error cleanly and give the user a popup. The latter is likely to be a tad more informative of the nature of the error, but other than that there isn't really a qualitative difference. In the OP's situation, what needs to be determined is: 1) Is it invalid data from the calling program and fragile Gambas code. or 2) Is it valid data from the calling program and a bug in Gambas code. Finally, about blowing up on the first call being a locus indicator. If a function call blows up on the first call, you can easily determine whether the parameters are valid or not at the calling level. So, with valid data, you know it is condition 2 above and a bug in the interpreter. However, if the function call works a bunch of times, then fails, condition 1 becomes the more likely case. I still probably didn't explain things clearly enough, but that's what I was saying. Ced P.S. "Real Mode" was the predecessor to "Protected Mode" meaning there was no processor level out of range checking on memory referencing. Those kinds of bugs are particularly difficult to reproduce and find. ----- Original Message ----- From: "Jussi Lahtinen" To: "user" Sent: Saturday, April 27, 2019 6:24:27 PM Subject: Re: [Gambas-user] Debugging Gambas (again) BTW, Jussi, I wrote a comprehensive byte-code interpreter in 8086 assembly in Real Mode as a DOS 3.1 TSR that was used in production for several years, circa 1988 Segmentation fault means that the program is trying to access memory address, which it doesn't have privileges to access. So, you can right away say it is definitely not capacity issue or "bad case scenario" in the program logic, as you suggested. How could it be? Also whether the program causes crash right away or later, says absolutely nothing about where the bug is. It just cannot, not even in theory. Test this: Dim p As Pointer = 1 Dim hStream As Stream hStream = Memory p For Write Print #hStream, "hello!" Close hStream There is no segmentation fault, but "write error" from Gambas. Why? Because if errors are not caught by Gambas, then they can lead to undetermined behaviour later. Thus this "However, adding parameter validation testing to every function call is a questionable endeavor" is also sign of not understanding at all what you are talking about. Once more: Segmentation fault = operating system tells that Gambas tried to do something illegal. The "clean" errors = Gambas tells the programmer, that he tried to do something illegal. Jussi From charlie at cogier.com Mon Apr 29 17:49:46 2019 From: charlie at cogier.com (Charlie Ogier) Date: Mon, 29 Apr 2019 16:49:46 +0100 Subject: [Gambas-user] TimeBox bug. Message-ID: <5d24b854-52d0-b85f-f699-f9c84a78639b@cogier.com> Hi, I was playing with TimeBox and if you try to set the 'Read only' value to 'True' an error occurs. 'SpinBox.ReadOnly is not a property' Charlie -------------- next part -------------- An HTML attachment was scrubbed... URL: From g4mba5 at gmail.com Mon Apr 29 18:39:15 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Mon, 29 Apr 2019 18:39:15 +0200 Subject: [Gambas-user] TimeBox bug. In-Reply-To: <5d24b854-52d0-b85f-f699-f9c84a78639b@cogier.com> References: <5d24b854-52d0-b85f-f699-f9c84a78639b@cogier.com> Message-ID: <48812157-a2f5-e4cf-dfcc-685937c754c1@gmail.com> Le 29/04/2019 ? 17:49, Charlie Ogier a ?crit?: > Hi, > > I was playing with TimeBox and if you try to set the 'Read only' value > to 'True' an error occurs. 'SpinBox.ReadOnly is not a property' > > Charlie > Fixed in commit https://gitlab.com/gambas/gambas/commit/92a54677b5138ef7cabf3beee90a46de2c663560. Regards, -- Beno?t Minisini From charlie at cogier.com Mon Apr 29 18:12:13 2019 From: charlie at cogier.com (Charlie Ogier) Date: Mon, 29 Apr 2019 17:12:13 +0100 Subject: [Gambas-user] DATE function Gambas 3.8.4 (Distro) In-Reply-To: <2077851537.1776294.1556545245218@mail.yahoo.com> References: <2077851537.1776294.1556545245218.ref@mail.yahoo.com> <2077851537.1776294.1556545245218@mail.yahoo.com> Message-ID: Hi David, Try this code: - Dim dDate As Date Dim sDate As New String[] edtDate.Text = "2019-04-29" ??? ??? 'I presume this is the format you get so you can take this line out. It was for me to test. If edtDate.Text Then ? sDate = Split(edtDate.Text, "-") ? dDate = Date(sDate[0], sDate[1], sDate[2]) ? edtDate.Text = Format$(dDate, "dd/mm/yyyy") Endif If you use the ppa you can have the latest version of Gambas. Run the following command in Terminal and Gambas 3.13.0 will install. You will need a reasonable internet connection. sudo add-apt-repository -y ppa:gambas-team/gambas3 && sudo apt-get update && sudo apt-get -y install gambas3 Hope that helps, Charlie On 29/04/2019 14:40, David Silverwood via User wrote: > Hi > I'm new to the forum so please forgive any mistakes in protocol. I am > also pretty new to Gambas and have a lot to learn, so please forgive > once again any stupid questions or mistakes. > Am trying to get Gambas dates to work for me. I have a SQLite3 > database and as we know SQLite dates are stored as YYYY-MM-DD. It > seems Gambas dates are stored MM-DD-YYYY which in South Africa doesn't > work as our local dates are stored dd-mm-yyyy. Now, when I format$ my > dateboxes/textboxes to read yyyy-mm-dd, depending on the date, I > either get a blank box or the month and day are swopped and therefore > also renders the date unusable here. > My localisation settings for Linux Mint 18.3 KDE are correct. > How can I convince Gambas to use the local date settings or at least > format the date to the 'correct' format for our area? > > The problem occurs when I load the dates from the database and try and > format the dates to 'yyyy-mm-dd' using > ? If edtDate.Text Then > ? ? dDate = Val(edtDate.Text) > ? ? edtDate.Text = Format$(dDate, "yyyy-mm-dd") > ? Endif > > Any but any suggestions/directions would be much appreciated. > > Thanks > > David > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From claus.dietrich at freenet.de Mon Apr 29 19:26:42 2019 From: claus.dietrich at freenet.de (Claus Dietrich) Date: Mon, 29 Apr 2019 19:26:42 +0200 Subject: [Gambas-user] gb.media: No display of videos in Gambas controls In-Reply-To: <2ddf3cc4-7ff3-3b23-1018-927a22ef0727@freenet.de> References: <2ddf3cc4-7ff3-3b23-1018-927a22ef0727@freenet.de> Message-ID: <758ecedd-955a-d891-ae75-2b79cf48b67b@freenet.de> Hi I am running Linux Mint 19 Mate with VirtualBox on a Windows Host with all host and guest additions installed. Tests with GStreamer in a terminal showed, that only /autovideosink/ works as video-sink in this environment (xvimagesink or ximagesink don't work) . The working GStreamer pipeline was successfully rebuilt in Gambas 3.13.0 with gb.media as follows: ' Gambas class file Public pl As MediaPipeline Public dr As DrawingArea Public Sub Form_Open() Dim src, snk As MediaControl Dim ftr1, ftr2 As MediaFilter ? With dr = New DrawingArea(Me) ??? .X = 10 ??? .Y = 10 ??? .W = 640 ??? .H = 480 ??? .Background = Color.Black ? End With ? ? FMain.width = dr.w + 20 ? ? pl = New MediaPipeline ? ? ' 'With webcam ? ' src = New MediaControl(pl, "v4l2src") ? ' src["device"] = "/dev/video0" ? ' ftr1 = New MediaFilter(pl, "jpegdec")? ? ' ftr2 = New MediaFilter(pl, "video/x-raw,width=640,height=480,framerate=15/1") ? ' snk = New MediaControl(pl, "autovideosink") ? ' src.LinkTo(ftr1) ? ' ftr1.Linkto(ftr2) ? ' ftr2.LinkTo(snk) ? ? 'With test source ? src = New MediaControl(pl, "videotestsrc") ? snk = New MediaControl(pl, "autovideosink") ? src.LinkTo(snk) ? 'pl.SetWindow(dr) ? End Public Sub Button1_Click() ? pl.pause ? pl.Play() End Public Sub Button2_Click() ? ? pl.pause ? pl.close ? pl.stop End The problem: When I am trying with the above out-commented command line "pl.SetWindow(dr)" to display the video in a Gambas control, Gambas throws the error "Not supported on this control". Earlier examples found in the Web showed, that this was working with Drawing Areas. Did this function went lost? Is there anything wrong in my program? Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From peterpeyotle at gmx.de Mon Apr 29 21:18:31 2019 From: peterpeyotle at gmx.de (Peter Peyotle) Date: Mon, 29 Apr 2019 21:18:31 +0200 Subject: [Gambas-user] gambas, sqlite and foreign key Message-ID: <846794b8-b192-1e05-3a1d-81778e4b6a07@gmx.de> Hello, again. I have the following problem with sqlite and gambas. I would like to use the functions of Foreign Key with sqlite and gambas. The problem with this is that with Gambas the execute statement "pragma foreign_keys = on" is unsuccessful. The "pragma foreign_keys" statement always returns "0", ie no foreign key is active. However, if I set the foreign key property at the shell level, this will correctly return the "1" (at the shell level) as a successful setting. If I use the same database at the same time as this one on the shell level, however, I only get back the "0" in Gambas, so no foreign key is active. Does Gambas have a problem with the foreign key? So set foreign key on the shell level - no problem. Create foreign key within Gambas - not possible. I have already tested this with different sqlite versions higher than 3.6 in the virtualbox with Lubuntu and Ubuntu. Always the same result. How can I use Foreign Key with Gambas? For solutions and suggestions, I would be very grateful. greetings Peter ...... -------------- next part -------------- An HTML attachment was scrubbed... URL: From shordi at gmail.com Mon Apr 29 22:15:42 2019 From: shordi at gmail.com (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Mon, 29 Apr 2019 22:15:42 +0200 Subject: [Gambas-user] gambas, sqlite and foreign key In-Reply-To: <846794b8-b192-1e05-3a1d-81778e4b6a07@gmx.de> References: <846794b8-b192-1e05-3a1d-81778e4b6a07@gmx.de> Message-ID: This works for me: miconectionSqlite.Exec ("*PRAGMA* foreign_keys = ON") Hope it helps... Best Regards El lun., 29 abr. 2019 a las 21:19, Peter Peyotle () escribi?: > Hello, again. > > I have the following problem with sqlite and gambas. > I would like to use the functions of Foreign Key with sqlite and gambas. > The problem with this is that with Gambas the execute statement "pragma > foreign_keys = on" is unsuccessful. The "pragma foreign_keys" statement > always returns "0", ie no foreign key is active. > However, if I set the foreign key property at the shell level, this will > correctly return the "1" (at the shell level) as a successful setting. If I > use the same database at the same time as this one on the shell level, > however, I only get back the "0" in Gambas, so no foreign key is active. > Does Gambas have a problem with the foreign key? > So set foreign key on the shell level - no problem. > Create foreign key within Gambas - not possible. > I have already tested this with different sqlite versions higher than 3.6 > in the virtualbox with Lubuntu and Ubuntu. Always the same result. > How can I use Foreign Key with Gambas? > For solutions and suggestions, I would be very grateful. > > > greetings > > Peter ...... > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.lee.davidson at gmail.com Mon Apr 29 22:38:42 2019 From: t.lee.davidson at gmail.com (T Lee Davidson) Date: Mon, 29 Apr 2019 16:38:42 -0400 Subject: [Gambas-user] gambas, sqlite and foreign key In-Reply-To: References: <846794b8-b192-1e05-3a1d-81778e4b6a07@gmx.de> Message-ID: <2e974899-69ec-ff1f-519c-cab811f07a44@gmail.com> It works for me even with all lowercase: Dim Res As Result $con.Exec("pragma foreign_keys = on") Res = $con.Exec("pragma foreign_keys") Print Res!foreign_keys ' Prints "1" ___ Lee [System] Gambas=3.12.90 f23228638 (master) On 4/29/19 4:15 PM, Jorge Carri?n wrote: > This works for me: > > miconectionSqlite.Exec ("*PRAGMA* foreign_keys = ON") > > Hope it helps... > > Best Regards > > El lun., 29 abr. 2019 a las 21:19, Peter Peyotle (>) escribi?: > > Hello, again. > > I have the following problem with sqlite and gambas. > I would like to use the functions of Foreign Key with sqlite and gambas. > The problem with this is that with Gambas the execute statement "pragma foreign_keys = on" is unsuccessful. The "pragma > foreign_keys" statement always returns "0", ie no foreign key is active. > However, if I set the foreign key property at the shell level, this will correctly return the "1" (at the shell level) as a > successful setting. If I use the same database at the same time as this one on the shell level, however, I only get back the > "0" in Gambas, so no foreign key is active. Does Gambas have a problem with the foreign key? > So set foreign key on the shell level - no problem. > Create foreign key within Gambas - not possible. > I have already tested this with different sqlite versions higher than 3.6 in the virtualbox with Lubuntu and Ubuntu. Always > the same result. > How can I use Foreign Key with Gambas? > For solutions and suggestions, I would be very grateful. > > > greetings > > Peter ...... > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > > > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > From jussi.lahtinen at gmail.com Mon Apr 29 23:46:16 2019 From: jussi.lahtinen at gmail.com (Jussi Lahtinen) Date: Tue, 30 Apr 2019 00:46:16 +0300 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: <1461629979.9256027.1556551195193.JavaMail.zimbra@exede.net> References: <8d75b22e-04c0-3aa2-1b24-fe253cfcafa7@gmail.com> <2058782329.6795893.1556369986281.JavaMail.zimbra@exede.net> <1461629979.9256027.1556551195193.JavaMail.zimbra@exede.net> Message-ID: Did you even read what I wrote? You got nothing correct. Your points; 1. In C, not in Gambas. We were talking about Gambas. 2. Can happen in C, but the stack protection probably stops the execution before that happens... and again, not in Gambas. 3. Same as point 1. *"Suppose the interpreter provides a "SendToRemotePeer" ..."* Wrong, does not happen in Gambas. Unless of course there is bug in Gambas. *"Should an interpreter be coded to be robust? A general purpose usage one, like Gambas, yep. Should it be absolutely robust? I'm not sure that is even theoretical possible."* I'm not talking about "absolute robustness", I'm talking about fixing bugs when we find them. Proper error message tells quite a much more than just sig11. Jussi On Mon, Apr 29, 2019 at 6:20 PM Cedron Dawg wrote: > Jussi, > > First, I wish I could help the OP better. I can understand his > frustration. If the problem is in Gambas, finding the minimal program that > demonstrates it is definitely the best approach. If that is a laborious > task, I think he should ask if he can email the full code to either Tobi or > Benoit to look at, rather than attach it to this thread. He can also email > it to me (cedron at exede dot net), and if I can reproduce it (3.12.2) I > might be able to minimize it. > > Let's return to our discussion and generalize it away from the OP's > situation. How can capacity issues lead to a seg fault? Here's a few ways: > > 1) A malloc return value is not checked and a memory allocation error > occurs returning a null. The subsequent code tries to write to the NULL > pointer and boom, seg default. > > 2) The interpreter keeps an internal stack of some type. The calling > program never calls the "close" for all the "open"s, the stack overflows, > and boom, seg default. > > 3) A circular buffer captures sensor readings. The process reading the > buffer calculates the index into a lookup table by taking the difference of > two sensor readings. They can only change so much from reading to reading > so a range check isn't made. The sensor goes nuts, starts spewing out > readings, the buffer overflows, and the lookup index is made from two > readings that buffer size apart, goes out of range, and boom seg default. > > How can a "bad case scenario" lead to a seg fault? Here's an example: > > Suppose the interpreter provides a "SendToRemotePeer" function that has an > internal buffer for holding the message text. The function call specifies > where in the buffer to lay the text. This code has to be fast so range > checks aren't made. The calling program passes parameters that causes an > overwrite on the buffer by one character. The bug is in the calling > program, not the interpreter, boom, seg fault. Even though it had called > the same function flawlessly thousands of times before. > > Now, let's talk about fragility and robustness. The difference only > becomes important when the calling program sends invalid parameters. > Shouldn't all functions be coded to be robust? No. Robustness comes at a > cost in code size, complexity, and execution time. Whether it is worth it > in a particular location is a judgement call. > > What is robustness? "parameter validation" How do errors get caught by > the interpreter? "parameter validation" > > What happens when you fail to do "parameter validation" and invalid data > gets through? Like you said, unpredictable results, and maybe, even yes, > boom, seg fault. > > All of the examples I cited above could have been caught with proper > parameter validation. Fragile code is not a bug or an error. The bug lies > in the code calling the fragile code with invalid values. > > Should an interpreter be coded to be robust? A general purpose usage one, > like Gambas, yep. Should it be absolutely robust? I'm not sure that is > even theoretical possible. > > From the user point of view, does it make much difference if Gambas > catches a seg fault and displays a popup, or does a parameter validation > finding the error cleanly and give the user a popup. The latter is likely > to be a tad more informative of the nature of the error, but other than > that there isn't really a qualitative difference. > > In the OP's situation, what needs to be determined is: > > 1) Is it invalid data from the calling program and fragile Gambas code. > > or > > 2) Is it valid data from the calling program and a bug in Gambas code. > > Finally, about blowing up on the first call being a locus indicator. If a > function call blows up on the first call, you can easily determine whether > the parameters are valid or not at the calling level. So, with valid data, > you know it is condition 2 above and a bug in the interpreter. However, if > the function call works a bunch of times, then fails, condition 1 becomes > the more likely case. > > I still probably didn't explain things clearly enough, but that's what I > was saying. > > Ced > > P.S. "Real Mode" was the predecessor to "Protected Mode" meaning there > was no processor level out of range checking on memory referencing. Those > kinds of bugs are particularly difficult to reproduce and find. > > > > ----- Original Message ----- > From: "Jussi Lahtinen" > To: "user" > Sent: Saturday, April 27, 2019 6:24:27 PM > Subject: Re: [Gambas-user] Debugging Gambas (again) > > BTW, Jussi, I wrote a comprehensive byte-code interpreter in 8086 assembly > in Real Mode as a DOS 3.1 TSR that was used in production for several > years, circa 1988 > > Segmentation fault means that the program is trying to access memory > address, which it doesn't have privileges to access. So, you can right away > say it is definitely not capacity issue or "bad case scenario" in the > program logic, as you suggested. How could it be? Also whether the program > causes crash right away or later, says absolutely nothing about where the > bug is. It just cannot, not even in theory. > > Test this: > > Dim p As Pointer = 1 > Dim hStream As Stream > > hStream = Memory p For Write > Print #hStream, "hello!" > Close hStream > > There is no segmentation fault, but "write error" from Gambas. Why? > Because if errors are not caught by Gambas, then they can lead to > undetermined behaviour later. Thus this "However, adding parameter > validation testing to every function call is a questionable endeavor" is > also sign of not understanding at all what you are talking about. > > Once more: > Segmentation fault = operating system tells that Gambas tried to do > something illegal. > The "clean" errors = Gambas tells the programmer, that he tried to do > something illegal. > > > Jussi > > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From the_watchmann at yahoo.com Tue Apr 30 11:03:33 2019 From: the_watchmann at yahoo.com (David Silverwood) Date: Tue, 30 Apr 2019 09:03:33 +0000 (UTC) Subject: [Gambas-user] DATE function Gambas 3.8.4 (Distro) In-Reply-To: References: <2077851537.1776294.1556545245218.ref@mail.yahoo.com> <2077851537.1776294.1556545245218@mail.yahoo.com> Message-ID: <497802234.2219331.1556615013711@mail.yahoo.com> Thank you very much Charlie and Gianluigi. Those were pointers in the right direction for me! I really appreciate your help. (Not to mention I just learned a lot from both of your code too.) On Monday, April 29, 2019, 7:24:06 PM GMT+2, Charlie Ogier wrote: Hi David, Try this code: - Dim dDate As Date Dim sDate As New String[] edtDate.Text = "2019-04-29" ??? ??? 'I presume this is the format you get so you can take this line out. It was for me to test. If edtDate.Text Then ? sDate = Split(edtDate.Text, "-") ? dDate = Date(sDate[0], sDate[1], sDate[2]) ? edtDate.Text = Format$(dDate, "dd/mm/yyyy") Endif If you use the ppa you can have the latest version of Gambas. Run the following command in Terminal and Gambas 3.13.0 will install. You will need a reasonable internet connection. sudo add-apt-repository -y ppa:gambas-team/gambas3 && sudo apt-get update && sudo apt-get -y install gambas3? Hope that helps, Charlie On 29/04/2019 14:40, David Silverwood via User wrote: Hi I'm new to the forum so please forgive any mistakes in protocol. I am also pretty new to Gambas and have a lot to learn, so please forgive once again any stupid questions or mistakes. Am trying to get Gambas dates to work for me. I have a SQLite3 database and as we know SQLite dates are stored as YYYY-MM-DD. It seems Gambas dates are stored MM-DD-YYYY which in South Africa doesn't work as our local dates are stored dd-mm-yyyy. Now, when I format$ my dateboxes/textboxes to read yyyy-mm-dd, depending on the date, I either get a blank box or the month and day are swopped and therefore also renders the date unusable here.? My localisation settings for Linux Mint 18.3 KDE are correct. How can I convince Gambas to use the local date settings or at least format the date to the 'correct' format for our area? The problem occurs when I load the dates from the database and try and format the dates to 'yyyy-mm-dd' using ? If edtDate.Text Then ? ? dDate = Val(edtDate.Text) ? ? edtDate.Text = Format$(dDate, "yyyy-mm-dd") ? Endif Any but any suggestions/directions would be much appreciated. Thanks David ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedron at exede.net Tue Apr 30 15:56:31 2019 From: cedron at exede.net (Cedron Dawg) Date: Tue, 30 Apr 2019 09:56:31 -0400 (EDT) Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: References: <8d75b22e-04c0-3aa2-1b24-fe253cfcafa7@gmail.com> <2058782329.6795893.1556369986281.JavaMail.zimbra@exede.net> <1461629979.9256027.1556551195193.JavaMail.zimbra@exede.net> Message-ID: <1625291329.10465658.1556632591361.JavaMail.zimbra@exede.net> Jussi, Briefly, when I said "generalize the discussion" I also meant generalizing to any interpreter, not just Gambas. This is pretty clear from the second line you quoted me on. As for the points: 1) Gambas programs (except for the JIT component) aren't executed, they are interpreted, they are a data stream. The actual execution (native machine code) is the interpreter running. So it is the interpreter that is causing the seg faults based on the values in the byte code stream, or passing along bad values to system calls/external functions which then can seg fault. A seg fault is initiated by the processor, which calls a kernel handler, which sends a signal, ..... Either the interpreter checks and catches bad values before it executes them and does a clean, hopefully informative, "error exit" or it doesn't check and seg faults. You keep inferring fragile code is an error, I don't see it that way. That is not the same as saying that Gambas should not have any fragile code, which seems to be such a strong sentiment for you that you don't make the distinction and say that is a bug. 2) "some sort of internal stack" means a program defined LIFO (Last In First Out) storage structure and is not referring to the processor stack (ESP/EBP register controlled on x86). Whether it is overflow protected is implementation dependent. Tobi's testing of GoSubs vs Calls with 10000 level deep recursive calls without overflow indicates to me that Gambas has overflow protection (and automatic expansion) built into its internal process control stacks. Returning to the OP's particular situation. I think it is safe to say that if the interpreter running the OP's Gambas code seg faults then there is either fragile interpreter code or a bug in the interpreter code. If it is a bug, of course it should be fixed. If it is a matter of fragility, whether to add further parameter validation code (i.e. look for errors) is a judgement call in which the answer is likely to be yes. My initial assessment of this situation was that it was a case of interpreter fragility and invalid OP data. Now, I'm not leaning at all. Still curious though. Ced ----- Original Message ----- From: "Jussi Lahtinen" To: "user" Sent: Monday, April 29, 2019 5:46:16 PM Subject: Re: [Gambas-user] Debugging Gambas (again) Did you even read what I wrote? You got nothing correct. Your points; 1. In C, not in Gambas. We were talking about Gambas. 2. Can happen in C, but the stack protection probably stops the execution before that happens... and again, not in Gambas. 3. Same as point 1. "Suppose the interpreter provides a "SendToRemotePeer" ..." Wrong, does not happen in Gambas. Unless of course there is bug in Gambas. "Should an interpreter be coded to be robust? A general purpose usage one, like Gambas, yep. Should it be absolutely robust? I'm not sure that is even theoretical possible." I'm not talking about "absolute robustness", I'm talking about fixing bugs when we find them. Proper error message tells quite a much more than just sig11. Jussi From kicking177 at gmail.com Tue Apr 30 16:00:02 2019 From: kicking177 at gmail.com (KKing) Date: Tue, 30 Apr 2019 15:00:02 +0100 Subject: [Gambas-user] Debugging Gambas (again) Message-ID: <372579b4-7382-6930-21f2-1847abef8231@gmail.com> Hi All, Good news and.... The good news, my project (with no code changes) does not crash on 3.13.0 ! So I can carry on with the the proof of concept porting from PowerBasic. OTOH, it would have been nice to learn more about (lower level) debugging. I did compile 3.13.0 with the extra debug symbols.... but it was very slow and even without having opened a project yet seemed to be churning out continual (possibly repetitive) logging? I ended up doing another make without the debug symbols and it now performs as expected around the area that it always failed on with a segfault in 3.8.4 or seeming inexplicable termination on 3.9.1 (no segfault, was as if a stop instruction encountered) Thankyou all. K. From g4mba5 at gmail.com Tue Apr 30 16:46:18 2019 From: g4mba5 at gmail.com (=?UTF-8?Q?Beno=c3=aet_Minisini?=) Date: Tue, 30 Apr 2019 16:46:18 +0200 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: <372579b4-7382-6930-21f2-1847abef8231@gmail.com> References: <372579b4-7382-6930-21f2-1847abef8231@gmail.com> Message-ID: Le 30/04/2019 ? 16:00, KKing a ?crit?: > Hi All, > > Good news and.... > > The good news, my project (with no code changes) does not crash on 3.13.0 ! > You should check with 'valgrind' that you really don't have any bad memory access, because a bad memory access does not auomatically imply a segmentation fault. 'valgrind' is stricter than the OS, and so it detects them. But there is a good chance that the bug has been fixed meanwhile. Regards, -- Beno?t Minisini From shordi at gmail.com Tue Apr 30 20:50:22 2019 From: shordi at gmail.com (=?UTF-8?Q?Jorge_Carri=C3=B3n?=) Date: Tue, 30 Apr 2019 20:50:22 +0200 Subject: [Gambas-user] Mysql strange behaviour on open database with gambas 3.13 Message-ID: Since this morning (with the new Gambas 3.13 and the update of the MysqlClient from Linuxmint repositories in Abr, 29) I can't connect with our MySql server. This is the code (more of less) we use until now: with myHcon .Type = "mysql" .host = myhost .port = 3306 .User = "myuser" .Password = "mypassword" .Name = "mydatabasename" Try .Open If Error Then Print Error.Text If Not .opened Then Message.Error("No Connection") Return False Endif This code doesn't work and generates this error: "Cannot open database: Can't connect to MySQL server on '' (4)" *BUT *If wait one second and try again then all works fine: with myHcon .Type = "mysql" .host = myhost .port = 3306 .User = "myuser" .Password = "mypassword" .Name = "mydatabasename" Try .Open If Error Then Print Error.Text If Not .opened Then wait 1 Try .Open if not .opened then Message.Error("No Connection") Return False endif Endif This code shows the error and connect fine the second time... In error log of mysql server appears this message each time the connection is failure: "2019-04-30T18:43:07.166136Z 11664 [Note] Got an error reading communication packets" I don't understand nothing. Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From taboege at gmail.com Tue Apr 30 23:57:11 2019 From: taboege at gmail.com (Tobias Boege) Date: Tue, 30 Apr 2019 23:57:11 +0200 Subject: [Gambas-user] Debugging Gambas (again) In-Reply-To: <372579b4-7382-6930-21f2-1847abef8231@gmail.com> References: <372579b4-7382-6930-21f2-1847abef8231@gmail.com> Message-ID: <20190430215711.GV30006@highrise.localdomain> On Tue, 30 Apr 2019, KKing wrote: > Hi All, > > I did compile 3.13.0 with the extra debug symbols.... but it was very slow > and even without having opened a project yet seemed to be churning out > continual (possibly repetitive) logging? This is the effect of "-DDEBUG_ME". You do not get this with just "-O0 -g". DEBUG_ME enables all sorts of diagnostics and tracing inside the interpreter, as you have seen, and it does not discriminate which Gambas program you're running. If you have to enable DEBUG_ME at some point in the future again, do *not* run your project through the IDE but directly from the command line. You don't want to debug the IDE opening your project after all. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk