Oxygen Basic

Information => Open Forum => Topic started by: JRS on August 26, 2017, 05:33:23 PM

Title: FreeBASIC
Post by: JRS on August 26, 2017, 05:33:23 PM
It seems the FreeBASIC maintainer has moved on. It might be a good time for the remaining FB user base to consider migrating to OxygenBasic.

The PowerBASIC folks should have already migrated after the author died 5 years ago. I really don't see Drake Software doing anything but retaining the asset hoping for a buyer and make a profit from Vivian's fire sale of PowerBASIC.


Title: Re: FreeBASIC
Post by: Charles Pegge on August 27, 2017, 09:43:33 PM
Hi John,

Yes, I've been following DKL's thread:

Currently inactive
http://freebasic.net/forum/viewtopic.php?f=17&t=25691

FreeBasic is very good at what it does, ( it takes less than 2 seconds to compile Oxygenbasic :) ), but there appears to be a sharp decline of interest in the BASIC language itself. If it remains an elderly and impoverished cousin of C++, the prospects are not good. What it needs is an infusion of new concepts to bring it into the 21st century, while maintaining ease of use for non-professional programmers.

I think its worth following the latest thinking in the C++ community. Much of this lecture by Bjarne Stroustrup goes over my head but I get the gist of it: simplification of source code to improve readability and reliability; the development of highly standardised generics; the abandoning of ad-hoc preprocessor macros; built-in support for parallel processing. We can take some of this on board.

Bjarne Stroustrup - Keynote Meeting C++ 2016: What C++ is and what it will become
https://www.youtube.com/watch?v=DvUL0Y2bpyc
Title: Re: FreeBASIC
Post by: Kuron on August 27, 2017, 11:09:09 PM
Less romantic historians would point out that FB has been dead for a LONG time.

When Bob died and left his company in bad hands with absolutely no direction, many people followed my advice and moved to PureBasic.  The majority of those that made the switch are still happily plugging along with PureBasic which routinely sees free updates, supports 64bit and the three major OSes.

It would appear some of Bob's users decided to adopt FB.   Not a bad thing as Paul Squires is the single best thing to ever happen to the FB community.  However, for an open source project to live and grow, it needs somebody competent to be working on it and maintaining it (which it has not had for years).  The biggest strike against FB is not supporting MacOS.  Nowadays for any language to get accepted and widely used it needs to support the three major OSes:  Windows, Linux, MacOS.  FB used to be a blast and have a large dedicated gaming community.  But that was around 10 years ago.

I am patiently waiting for FBSL to get back on its feet, so I can download it and get to work on some new projects as that is my language of choice.  I still hold out hope that it will see MacOS support in my lifetime.
Title: Re: FreeBASIC
Post by: Aurel on August 28, 2017, 09:41:01 AM
first mr.Kuron ( that sounds very ugly on my home language  ;D )
OBJECTION !

Less romantic historians would point out that FB has been dead for a LONG time.
[/color]
This is not true ,if that is true then there we can still we have old FB version from 10 years ago?

When Bob died and left his company in bad hands with absolutely no direction, many people followed my advice and moved to PureBasic.  The majority of those that made the switch are still happily plugging along with PureBasic which routinely sees free updates, supports 64bit and the three major OSes.
what a heck PowerBasic author dead have with FreeBasic ...beep..beep  ::)
followed your advice ....??????  give me a break
don't put yourself so high...please !
Pure Basic is nice language but is not really BASIC then programming language with small elements of BASIC.
It is popular in France and Germany and some other part of Europe.
 

It would appear some of Bob's users decided to adopt FB.   Not a bad thing as Paul Squires is the single best thing to ever happen to the FB community.  However, for an open source project to live and grow, it needs somebody competent to be working on it and maintaining it (which it has not had for years).  The biggest strike against FB is not supporting MacOS.  Nowadays for any language to get accepted and widely used it needs to support the three major OSes:  Windows, Linux, MacOS.  FB used to be a blast and have a large dedicated gaming community.  But that was around 10 years ago.

MacOs is not very much popular Os in Europe or is not very much used in Europe.
Linux heh...it looks that he loose battle with Windows( unfortunately lot of unfinished potential- for Desktop OS)

I am patiently waiting for FBSL to get back on its feet, so I can download it and get to work on some new projects as that is my language of choice.  I still hold out hope that it will see MacOS support in my lifetime.
Hmm in my opinion better than thinBasic  but never very much popular between basic programmers.
reason..probably with free-non -free licence ...or something like that .
Title: Re: FreeBASIC
Post by: Kuron on August 28, 2017, 02:39:36 PM
Aurel, in stepping up to flex his insecurities, has reminded us one of the reasons Oxygen does not have a larger user base.

Quote
MacOs is not very much popular Os in Europe or is not very much used in Europe.

In the Sculley years, Macs were actually more popular among the creative demographic in Europe than in the USA.  When Jobs returned and brought NeXT technology with him, Macs were pretty equal in Europe and the USA among creative professionals.  Cook has largely destroyed the creative's use of Macs with going for looks over performance and targeting the coffee-house crowd.  Still, there is a dedicated group of creative professionals that are still using Macs world-wide and that (along with the creative's using Windows) is the demographic many of us have to target.
Title: Re: FreeBASIC
Post by: JRS on August 28, 2017, 04:00:17 PM
My personal goal for the remainder of this year is to finish C BASIC. I want to use Script BASIC to translate C code into C BASIC .  I have a good start and it would be a shame not to finish it.
Title: Re: FreeBASIC
Post by: Arnold on August 30, 2017, 07:07:36 AM
I agree with Charles: the interest in using BASIC has been lost in general. Probably in schools BASIC is not taught any more. If I visit a bookstore, I will find books about C, C++, Java, Python, Ruby, Php, Matlab, R, Arduino, maybe a book about Lisp or Visual Basic NET. Even Perl has more followers than BASIC. There are so many languages for many purposes available these days. And it is like in sports. There are some organizations with a lot of passive members and therefore earn a lot of money, and many clubs with members which do their sport for fun and for their health.

I myself am happy with Oxygenbasic which helped me to learn more about how other programming languages work and which helps me to train my brain cells a little bit (due to a generously helpful coach). And as this is a very flexible language for many possible applications perhaps the user base will get a little bit larger some day.
Title: Re: FreeBASIC
Post by: Aurel on August 30, 2017, 08:36:14 AM
well look
when i first time tried o2 i was thinking that nothing work..
but when i see and study some Cherles and Peter Wirbelauer examples..
(where is that guy ? )
i was figured what is this all about ..  :D
so  for Free Basic ,well i also think that FreeBasic is very well language
/Oxygen is compiled with FB / -which means powerful
Package in which comes FB is not very much beginner or user friendly(no editor)
also if you ask me too much command line switches  ::)
FB members talking about anything more than about FB ,
babeling how python,scratch or other are fancy or great will not improve current
things in FB.
Title: Re: FreeBASIC
Post by: JRS on August 30, 2017, 10:19:53 AM
BASIC for me is about getting the job done without having to recreate the wheel with framework code just to get started., It's also about code readability.
Title: Re: FreeBASIC
Post by: JRS on August 31, 2017, 03:52:51 PM
I think users would have more interest in ThinBasic if Eros would port it to OxygenBasic. It would give O2 a good test and encourage PowerBASIC users to give O2 a serious look. Charles and Eros work well together and would help keep BASIC alive.

Just being free of all the PowerBASIC restrictions of not allowing direct use of PB functions would be motivation enough to make  the move.
Title: Re: FreeBASIC
Post by: Aurel on September 02, 2017, 10:04:06 AM
it seems to me that some of them put his hope in JoseRoca cWindow includes and
PaulSquirk ..damn squrikie ..squak... sh**
i forget name winFB or something ..
Also it looks that PowerBasic users migrate to PureBasic
probably because they don't like open source Free Basic..
ahh who care....anyone with 'grain of salt in brain' should try Oxgen  :)
Title: Re: FreeBASIC
Post by: JRS on September 02, 2017, 10:36:19 PM
BASIC is still popular as ASP.NET and VBA in Microsoft Office products. I don't see much action with BASIC in other environments.

My hope is I can create some interest in using Script BASIC as a replacement for Node.js. My goal is to provide both traditional CGI and asynchronous I/O web applications.
Title: Re: FreeBASIC
Post by: edcronos on December 05, 2017, 02:15:39 AM
Hi, first of all, I'm sorry, I'm from Brazil and I'm using a translator.

I believe that the biggest problem of the BASIC language is the lack of rigid standardization
this de-stimulates new developers by not knowing what the future will be and fear of having to rewrite everything they've done
the thinbasic creator himself has withdrawn goto and gosub by personal considerations
Modes of declaring and using variables change considerably, arrays ...
things that should have a fixed base do not talk between the various versions

without firm bases, can not build large structures
I think BASIC could be saved with a union of the still lovers of that language
Title: Re: FreeBASIC
Post by: Charles Pegge on December 06, 2017, 04:46:06 AM
Hi Eduardo,

Welcome to the forum!

OxygenBasic supports goto, gosub..ret, and line numbers too :)

It also supports 'C' syntax to facilitate the use of C headers, and porting of C code.

I think it might be possible to standardise Basic as a scripting language, but Basic compilers need to follow C/C++ very closely.
Title: Re: FreeBASIC
Post by: edcronos on December 06, 2017, 07:10:39 AM
hi Charles Pegge
thank you

I think that who insists with the basic is because it does not like the () {}; C
I know it has goto and gosub, but even C took out the gosub,
the problem as I said, is the basis that instead of the developers add resources they try to implement their own concepts by removing or changing what already exists

I have been following the forum for some years even though I have not been participating
I realized that you try to be as democratic as possible in this matter adding resources and not limiting your own taste

for me it is difficult to understand this war between languages, being that in a context only differ in their features and facilities because in the end they will be translated to the same machine code

BASIC has salvation?
I think so, because it is an easy language to learn and implement and can be as fast as C depending only on the compiler, but it will depend more on the passion of one. "Unless, you're rich in $$"

I even imagined creating a group on the face, but I do not get along with social networking, so I dropped it at the very beginning
https://www.facebook.com/Programming-in-BASIC-768714663280647/

the vba of the mainly excel office package still has a wide range of users despite the abandonment of ms, many are even programmers of other languages,
perhaps bringing the Oxygen closer to that follow-up that, although limited, can bring a massive interest back into language.
Title: Re: FreeBASIC
Post by: Aurel on December 06, 2017, 08:43:26 AM
Quote
bringing the Oxygen closer to that follow-up that
hmm ...what that means ?

well facebook for basic -programmers heh
i dont know but i ..you know I hate faceBook
maybe is not bad idea  ::)

ooups ...sorry Eduardo ...welcome to the forum!  :)
Title: Re: FreeBASIC
Post by: JRS on December 06, 2017, 09:16:26 AM
Quote from: Chales Pegge
I think it might be possible to standardise Basic as a scripting language ...

BASIC's only future is in the form of a typeless scripting language with a mature syntax everyone knows how to use.

Most BASIC efforts today are toys that are never fully implemented.
Title: Re: FreeBASIC
Post by: edcronos on December 06, 2017, 09:56:57 AM
Quote from: Chales Pegge
I think it might be possible to standardise Basic as a scripting language ...

BASIC's only future is in the form of a typeless scripting language with a mature syntax everyone knows how to use.

Most BASIC efforts today are toys that are never fully implemented.

the Basic language of this the beginning had a problem of pradronization
a small program did not run without adaptation in another Basic, from Sinclair to msx for example
this scares a more professional use
how many versions of BASIC that already existed with changes in the use of variables or functions, and how many of C?

Quote
bringing the Oxygen closer to that follow-up that
hmm ...what that means ?
there are still many many VBA users for professional use
some applications get really slow even with the use of arrays
 
if you can take the Oxygen into the vba, as the syntax is similar can give an advance in the use and this bring the interest of professional programmers


I'm sorry for using a translator to communicate, nowadays it's even shameful not to know English
Title: Re: FreeBASIC
Post by: Aurel on December 06, 2017, 10:52:14 AM
No there is no problem with that ..i mean language
my english is sometimes too crappy  ;D
VBA hmmm i never use that ...and well BASIC is not language for proffesionals
i think  ::)
Title: Re: FreeBASIC
Post by: JRS on December 06, 2017, 11:10:02 AM
Script BASIC is used by two major commerical entities for their controllers. (BacNet, IoT, ...) SB is mature and stable enough that SB was burnt into firmware. If SB were to have bugs, millions of dollars in controllers would have to be thrown in the trash.
Title: Re: FreeBASIC
Post by: edcronos on December 06, 2017, 11:15:07 AM
No there is no problem with that ..i mean language
my english is sometimes too crappy  ;D
VBA hmmm i never use that ...and well BASIC is not language for proffesionals
i think  ::)
My English is zero.

but what differentiates Basic from C language?

what is for professional use or not, what is it that defines it?
vba on the contrary is not professional, besides being stuck to the program has no way to protect the content
excel for example is normally used only as a graphical interface
usually most users seek ease of implementation
Title: Re: FreeBASIC
Post by: JRS on December 06, 2017, 11:20:37 AM
Quote

but what differentiates Basic from C language?

Not much. I think I've already made that point with the C BASIC gcc preprocessor include.
Title: Re: FreeBASIC
Post by: edcronos on December 06, 2017, 11:32:35 AM
Quote

but what differentiates Basic from C language?

Not much. I think I've already made that point with the C BASIC gcc preprocessor include.

which is why I say that only Basic is lacking a solid base, where developers only add features, and do not change as you write the basics
where simple rows with variables, arrays, loops and if do not need to be re-executed, where goto goes from the taste of the programmer, not from who wrote the compiler
Title: Re: FreeBASIC
Post by: JRS on December 06, 2017, 11:57:15 AM
Script BASIC is a traditional BASIC that is thread safe, embeddable with it's own multi-threaded memory manager that exceeds the limitations Windows enforces on that platform.

If you're going to try to compete with the big boys, you better have something unique.
Title: Re: FreeBASIC
Post by: Aurel on December 06, 2017, 12:14:04 PM
First of all ScriptBasic is ScriptBasic  and not usual traditional Basic used as educational
programming language and is not very much for Windows
i mean is better than crap called python.
Yeah why C -- C syntax and complete language is oriented to as much as posible
better transformation to machine language and that is why is very fast.
Also i dont know why you insist on VBA - or basic from Office pack...is that VBA?
If you whish to use or to try Oxygen Basic then download package and try...
asking questions before you try is almost useless..because i really dont know for
any Oxygen basic example that work with VBA or similar.
Title: Re: FreeBASIC
Post by: JRS on December 06, 2017, 12:24:20 PM
Here you go Aurel. VBScript/VBA/WSHost are widely used as glue interfacing with Office tools.

Code: Script BASIC
  1. IMPORT COM.sbi
  2.  
  3. oscript = COM::CreateObject("WScript.Shell")
  4. COM::CallByName(oscript,"Run",vbMethod,"onecust.vbs")
  5. COM::ReleaseObject(oscript)
  6.  
Title: Re: FreeBASIC
Post by: edcronos on December 06, 2017, 01:22:31 PM
First of all ScriptBasic is ScriptBasic  and not usual traditional Basic used as educational
programming language and is not very much for Windows
i mean is better than crap called python.
Yeah why C -- C syntax and complete language is oriented to as much as posible
better transformation to machine language and that is why is very fast.
Also i dont know why you insist on VBA - or basic from Office pack...is that VBA?
If you whish to use or to try Oxygen Basic then download package and try...
asking questions before you try is almost useless..because i really dont know for
any Oxygen basic example that work with VBA or similar.

and why BASIC can not be a language of professional use if it is not very different from C?
I speak of VBA not only because I use it, but because it has a large amount of dependent users, and are dependent precisely on the ease of use.
the small user who understands little is that they are the majority, but these are that attract the economic interest of few entrepreneurs
I commented because the community is very extense, and this would spread knowledge about Oxygen more easily.
with more people talking about it and using it even if for simple things it attracts the interest of big users and maybe developers

my interest in Oxygem is precisely to use with excel and vba, with this I can have the knowledge gained in forums and communities of the sector
Title: Re: FreeBASIC
Post by: edcronos on December 10, 2017, 11:32:38 AM
I think vba was also implemented in other professional applications
precisely because of the ease of learning and implementation
like autocad and corel

it is not that language is weak, but the lack of standardization disrupts
yes it is a language for beginners but this does not prevent that it is used professionally

many things we do are just for testing and hobby,

the excel vba has not decayed despite the years because excel is a great presentation window next to the vba it becomes flexible and fast to mount some project without having to draw windows,
unfortunately it is not commercial and it is neither possible to protect the project effectively
Title: Re: FreeBASIC
Post by: edcronos on December 11, 2017, 03:15:30 AM
I saw that Oxigen has a very flexible syntax
I like it,
but could have put a selection key for each syntax
I say this not only to avoid the programmer getting confused
but to allow portability
thus allowed until the exchange of key words of the various versions
something like gosub's "ret" by returning some versions of basic
tbm would guarantee write codes can paste in others without fear of syntax failures
@thinBasic
Goto ss <--- error
Gosub ss <--- error

I think this would allow an interchange between versions and greater flexibility as well as greater security in carrying codes from one to the other

I think that thinbasic has something like keyword exchanges, this along with syntax picker and some kind of function modules could make Oxygen in the intermediary of the several existing versions where disappearing the person becomes orphaned
Title: Re: FreeBASIC
Post by: Charles Pegge on December 11, 2017, 02:16:31 PM
Yes, I agree there are a number of portability problems.uit  it should be possible to create emulations of other basics by exploiting Oxygen's ability to override existing names and confine them within a namespace or scope.

I deliberately removed the assembler switch as well, so OxygenBasic is now a fusion of Basic, C and Assembly code :)
Title: Re: FreeBASIC
Post by: edcronos on December 11, 2017, 03:18:08 PM
I know I could not even say something I can not help
Oxygen is very flexible. also seems to be very powerful, with the sum of being free
this can make Oxygen the base of the new Basic
I'm sorry if I say bullshit, I really do have limited knowledge
but with the key words of Oxygen being the main ones, would not it be possible to create translation tables for other versions?
I do not know if this would have to be done directly in the Ide
  and the worst would be the syntax and extra features

the translation table could be filled by the employees themselves or create their own versions for personal use
as well as the creation of auxiliary function modules if Oxygen does not have the function
when changing the key the excerpt would be automatically translated and could be ported to the other compiler for tests

I'm sorry, they're just crazy in my head.
and I also do not know if the translator is doing a good job
Title: Re: FreeBASIC
Post by: Charles Pegge on December 12, 2017, 10:25:55 PM

Taking VBA as an example, I think OxygenBasic would understand VBA code quite well, without too many complications. The syntax is highly compatible, and the main task is to add extra functions and procedures.

The main challenge is to make VBA objects compatible with O2 classes, which may require a few changes to the core O2 language.
Title: Re: FreeBASIC
Post by: edcronos on December 12, 2017, 11:38:10 PM
I consider that many detrimental changes,
adding functionality is always good, but getting changed what users are accustomed to can be detrimental and takes away the confidence
so that selectors can be a good one, you can add new features that would be competing without harming the old users
as things were progressed, the procedures already left aside could be excluded
equal to the change that you announced "include, includepath", anyone with an ongoing project in which the changes affect could not migrate to the new version without risks, and with that they would lose the chance to take advantage of the new features
Title: Re: FreeBASIC
Post by: JRS on December 13, 2017, 12:46:50 AM
I would love to see VBScript being accessed via COM to call methods, access variables and evaluate code strings.
Title: Re: FreeBASIC
Post by: Charles Pegge on December 15, 2017, 02:23:59 AM
One of the criteria for designating o2 as 'beta' will be to avoid any code-busting changes. I have already cleaned out old syntax and some experimental features which proved to be unuseful. As far as I can tell, I was the only one using those features, and it only affected a small number of the 1400+ examples included with o2basic.

One small adjustment, which I think will support more consistent syntax, in support of VBA is to allow 'dim' to be used inside classes and types. Generally, dim can be treated as a redundant word.
Title: Re: FreeBASIC
Post by: jack on December 15, 2017, 05:52:40 AM
hello Charles Pegge
dkl at the freebasic forum was discussing C/C++ binding integration https://www.freebasic.net/forum/viewtopic.php?f=8&t=26175
would you be interested in participating?
Title: Re: FreeBASIC
Post by: edcronos on December 15, 2017, 06:40:56 AM
I have already cleaned out old syntax and some experimental features which proved to be unuseful. As far as I can tell, I was the only one using those features, and it only affected a small number of the 1400+ examples included with o2basic.

could you tell what these resources are?

in my case what bothers is the lack of persistence in the syntax of Basic
note that even if you have so many Basic projects in the active, what you notice is that what you write in one does not work in another
Title: Re: FreeBASIC
Post by: Charles Pegge on December 15, 2017, 07:19:08 AM
Hello Jack,

I think it would be much simpler, and more advantageous to enhance FreeBasic syntax, so it can read C headers directly. Freebasic is in some ways closer to C than is OxygenBasic, yet we have demonstrated the concept works quite well.

But dare I introduce this idea under the topic being discussed and risk arousing irritation!
Title: Re: FreeBASIC
Post by: Charles Pegge on December 15, 2017, 07:40:45 AM
Hello Eduardo,

I record all the changes I make to O2 in inf/oxylog.txt in reverse order. There are in excess of 1500 of them, but the ones to note start with the word Revoke or Deprecate

There may still be some broken examples, but I have fixed most of them, and my latest update will be posted to Github shortly.

Here are most of the recent ones:

06:38 11/09/2017 Revoke 'indexers' and 'offset'. (o2tran.bas)

00:18 08/09/2017 Revoke inner functions and classes. Use macros instead, or place outside.

21:31 06/09/2017 Revoke leftmatch in matalanguage. Use match instead  (o2meta.bas)

15:38 05/09/2017 Revoke extincli early 'def' expansion (o2tran.bas typo=18)

03:31 18/05/2017 Revoke 'exposed' (o2tran.bas o2sema.bas o2link.bas)

10:59 17/03/2017 Revoke o2 API calls: o2_get, o2_put and o2_assemble. o2_basic o2_asmo now return o2 binary code pointer. (oxygen.bas)

21:35 10/03/2017 Revoke #ifexist #ifnexist: use #ifdef #ifndef instead

06:13 10/03/2017 Deprecate 'global' use 'dim' instead

11:03 02/03/2017 Revoke keywords basic o2h asm #basic #asm. No low level syntax switching

12:06 01/03/2017 Revoke Data and Dataspace / to use embedfile for raw data instead (o2tran.bas o2keyw.bas)

Title: Re: FreeBASIC
Post by: Aurel on December 15, 2017, 11:05:19 AM
Hmm in my programming with o2 i never used one of this features simply because
i dont need them ..of course i dont say that are useless..
I only know if I use standard set of oxygen functions/macros everything work on
the speed of light and work as it supposed to be
which means that oxygen compiler is really stable and fine
(there are some quirks with strange strings ) but in general most of important things
work properly  :)
Title: Re: FreeBASIC
Post by: edcronos on December 15, 2017, 11:24:36 AM
I'll wait for the beta before I start implementing some code
this version will support 128bit binary operations?

my use of programming is just like hobby
I started with a project and went for something completely different "lotteries"
unfortunately did not know that even without betting this would become vice,
the good thing is that ideas fly high, the bad that has no commercial value
Title: Re: FreeBASIC
Post by: JRS on December 15, 2017, 06:20:09 PM
Maybe you should look into BitCoin mining and let luck control the lotto.
Title: Re: FreeBASIC
Post by: edcronos on December 15, 2017, 08:24:46 PM
I do not bet, I do not have the money
I went to build a routine for a bettor and I enjoyed playing with it.
lottery is waste of time and money, but putting together the routines can provide experience for other things, also has the fact that some codes really look interesting
Title: Re: FreeBASIC
Post by: Charles Pegge on December 16, 2017, 02:28:35 AM
128bit math is too specialised to consider for the o2 core, but operations for specialised types are supported, (operator overloading) through an extension of o2 macros. So it is possible to devise new mathematical types and use them in expressions.

I see that GCC 4.6, and above, support 128bit types. If you come across the source code, that could be ported into o2 easily. Multiply, divide, power, log and roots are non-trivial.

For bitcoin mining you will need to buy a server farm with units stuffed with GPUs, and a small power station. The NSA have a facility in Utah, well suited to this enterprise :)


Title: Re: FreeBASIC
Post by: edcronos on December 16, 2017, 03:11:27 AM
in C I already came to find about 128bit, I read that in assembly the process would be direct
so I figured that in Oxygen could mount some functions using the assebly internally

about bitcoin I do not know if I did not understand the process, but it seemed to me a pyramid system,
who put the money first has a high appreciation, and if these people start to redeem these values will make the value lose and consecutively who entered the last will lose money, I'm sorry if I'm wrong, anyway I only have money left over for my day on the day
Title: Re: FreeBASIC
Post by: JRS on December 16, 2017, 11:52:24 AM
Quote
he NSA have a facility in Utah, well suited to this enterprise

A great way to reduce the national debt. I know too funny and we all know where the bucks will end up.

Curious. The more BitCoin is mined, does it make it just that much harder to find the next coin? How did the early pioneers with a standard PC generate so many BitCoins?
Title: Re: FreeBASIC
Post by: Charles Pegge on December 17, 2017, 02:57:22 AM
Operations can be defined in inline assembler, so there is very little loss of efficiency.

Re BitCoins: I understand they are like prime numbers. The brute processing involved in finding new ones, increases exponentially. It's perfect for a pyramid scheme.
Title: Re: FreeBASIC
Post by: edcronos on December 17, 2017, 03:35:16 AM
for me it's complicated, I researched and read about it,
but for the variety of answers it seems to be tricky even for seasoned programmers
in Vba I used 4 32-bit integers for the process, but ended up not fitting at all what I wanted to do, besides complicating the whole process
basically I use only Or, And, Xor, Not, and bitcount,
Title: Re: FreeBASIC
Post by: JRS on December 17, 2017, 04:24:23 PM
Quote
It's perfect for a pyramid scheme.

Can you imagine the US government not being able to print money on demand?  :D
Title: Re: FreeBASIC
Post by: Charles Pegge on December 20, 2017, 09:04:39 AM
basically I use only Or, And, Xor, Not, and bitcount,

logic, addition and subtraction is very easy to implement in any binary width. Multiplication and division are the trick operations. I'm still fine-tuning the operator system, but this illustrates what a 128-bit logic operator set would look like, without Assembly code:

Code: [Select]
type i128 int i1,i2,i3,i4

macro i128_op(a,  p)
  macro .ops(p,a)
    ac.i1 p a.i1
    ac.i2 p a.i2
    ac.i3 p a.i3
    ac.i4 p a.i4
  end macro
  macro ."save"(a)
    i128 ac
    a.i1=ac.i1
    a.i2=ac.i2
    a.i3=ac.i3
    a.i4=ac.i4
  end macro
  macro ."load"(a)
    dim i128 ac
    i128_op.ops(=,a)
  end macro
  macro ."and"(a)
    i128_op.ops(and=,a)
  end macro
  macro ."or"(a)
    i128_op.ops(or=,a)
  end macro   
  macro ."xor"(a)
    i128_op.ops(xor=,a)
  end macro   
  macro ."not"(a)
    i128_op.ops(=not,a)
  end macro   
end macro

'TEST
dim u,v,w,x as i128
u=v and (w or x)
Title: Re: FreeBASIC
Post by: edcronos on December 20, 2017, 11:52:13 AM
thank you
I've been a bit busy, but still searched for asm, I was already working on some things to use 32bit and 64bit, I noticed it's quite complicated to implement 128bit
I do not know if it's possible something like that.
__int64a;
__int64 b;
__int64 c;
int Count;
asm {
  mov rax, a
  mov rbx b
   and rax, rbx
   mov c rax
     popcnt Count, rax
}

I am waiting for the new version of the Oxygen to try to migrate my functions, some not even use but can serve something like the ones that generate the csn "Combinational Sequence Number" by the combination and that generates the combination by csn

there are people who learn to program specifically because of lotteries, in the forum there is one that has learned Delphi even made a program for personal use, and now he is learning Python to be able to take advantage of the available resources, but unlike me he makes bets,