[Gambas-user] Gambas Playground

2017-07-15 Thread Adrien Prokopowicz
Hello Everyone ! These past few days I had fun putting together an online playground for Gambas ! You can find it here : https://gambas-playground.proko.eu/ :) The playground is a little place to write and run Gambas code snippets, which I think could be very useful in the mailing-list

Re: [Gambas-user] My quest for efficiency

2017-07-15 Thread Caveat
Something is horribly wrong, or you're running on a 286 :-) I just tested here, and the program runs on a 51 MB test file in about 5 seconds. Some reasonably well commented code for you... Public Sub Main() Dim inFile, outFile As File Dim buff As New Byte[1024] Dim idx, remBytes,

Re: [Gambas-user] My quest for efficiency

2017-07-15 Thread Benoît Minisini via Gambas-user
Le 15/07/2017 à 20:49, Tony Morehen a écrit : Did you try Benoit's suggestion: Public Sub Main() Dim sIn as String Dim sOut as String sIn = File.Load("/home/fernando/temp/deah001.dhn") sOut = Add11(sIn) File.Save("/home/fernando/temp/deah001.11Added.dhn", sOut) End Public Sub

Re: [Gambas-user] My quest for efficiency

2017-07-15 Thread Tony Morehen
Did you try Benoit's suggestion: Public Sub Main() Dim sIn as String Dim sOut as String sIn = File.Load("/home/fernando/temp/deah001.dhn") sOut = Add11(sIn) File.Save("/home/fernando/temp/deah001.11Added.dhn", sOut) End Public Sub Add11(InputString as String) as String Dim bArray

Re: [Gambas-user] My quest for efficiency

2017-07-15 Thread Fernando Cabral
Well, after 5 hours the most efficient version is still running. Only 1/5 of the file has been processed. The less efficient version has only processed 1 MB, or 1/ 42 of the file. So I decided to write a C program to do the same task. Since I have not been using C in the last 20 years, I did not

Re: [Gambas-user] My quest for efficiency

2017-07-15 Thread Benoît Minisini via Gambas-user
Le 15/07/2017 à 16:08, Fernando Cabral a écrit : Hi I've found a file whose text has been obfuscated by subtracting 11 from every byte. Now I want to bring it back to regular text. To do this I have to add 11 to each byte read from that file. Now, I have tried several ways to do it, and they

[Gambas-user] My quest for efficiency

2017-07-15 Thread Fernando Cabral
Hi I've found a file whose text has been obfuscated by subtracting 11 from every byte. Now I want to bring it back to regular text. To do this I have to add 11 to each byte read from that file. Now, I have tried several ways to do it, and they all seemed every inefficient to me. Two examples

Re: [Gambas-user] Weather app in Software Farm

2017-07-15 Thread Charlie
Tony Morehen wrote > I just uploaded a Weather systray app to the software farm. > Comments/suggestions welcome. Enjoy. Hi Tony, I tried your program on a computer at work and got it working after adding *gb.qt4*. Linux Mint does not have QT5 yet. I tried it a home but even after fixing QT I