Search found 229 matches

by RockTheSchock
Jun 06, 2020 18:14
Forum: General
Topic: Optimum sum of a set of numbers
Replies: 18
Views: 661

Re: Optimum sum of a set of numbers

There could be some possibilities to optimize the alghorithm for speed or even for memory consumption, but first you must define the parameters define "set of numbers" the range / any negative numbers how many are there duplicates are they random or ... define the number "optimum sum&...
by RockTheSchock
Jun 05, 2020 6:54
Forum: Community Discussion
Topic: native At&t Assembly emitter
Replies: 17
Views: 788

Re: native At&t Assembly emitter

The world of the barebones is very diverse If i understand you correctly, you want to work and compile on an embedded system or a thin client. But why dont you use a normal workstation/notebook to do that? To test the program you can use than your embedded system. You also could use a VM with the l...
by RockTheSchock
Apr 17, 2020 13:57
Forum: Beginners
Topic: Preprocessor creation in a loop possible?
Replies: 4
Views: 372

Re: Preprocessor creation in a loop possible?

NASM has a very powerful preprocessor. It's so powerful that you can create things like nested block statements: for/next if/elseif/else/endif blocks .. Thats because of a very simple but powerfull context stack : so we would need something like #push|#pop|#set context #if defined(context) so we onl...
by RockTheSchock
Apr 10, 2020 19:02
Forum: DOS
Topic: Why do you still program for DOS?
Replies: 26
Views: 9309

Re: Why do you still program for DOS?

Ten years ago we still used a factura program / database based on OpenAccess4. It was so fast.. with only 2 or 3 key strokes you could be in any subprogram in less than a second. It did run well on Windows 32 bit. In DOS there is often only one way to do things UI wise. That makes it simpler after g...
by RockTheSchock
Nov 15, 2019 20:58
Forum: Beginners
Topic: Need speedup
Replies: 23
Views: 1581

Re: Need speedup

Another option is to use ASM with AVX / AVX2 instructions: Each YMM register can hold and do simultaneous operations on eight 32-bit single-precision floating point numbers. So basically if the algorithm could be optimally transformed you could gain almost 8 times the speed. Realistically it could b...
by RockTheSchock
Nov 15, 2019 20:44
Forum: Beginners
Topic: Need speedup
Replies: 23
Views: 1581

Re: Need speedup

Maybe it's faster if you change this by using less divisions df=((-1e12 /Rgquadro)/Rgquadro/Rgquadro)+.4 also you could change the select case: 'Maybe ? Dim as Double Rgquadro If Rglue >140 Then df=9512/((Rgquadro)) Else If rglue>= 10 Then df=((-1e12 /(Rgquadro*Rgquadro*Rgquadro)+.4 Else df=0 NUM_ER...
by RockTheSchock
Nov 10, 2019 13:30
Forum: Community Discussion
Topic: FreeBASIC Namespace Project
Replies: 72
Views: 8035

Re: FreeBASIC Namespace Project

Keywords like Name, Width, Color can't be used as properties or membervars in types, that's a bit annoying. That would be no problem if most keywords get out of global namespace.
by RockTheSchock
Nov 09, 2019 9:24
Forum: General
Topic: Len of udt
Replies: 7
Views: 431

Re: Len of udt

If you work with RANDOM files and Type records it's important not to use "As Integer" . Just "as Integer" could be 4 byte or 8 byte weather you compile for a 32 or 64 bit platform. . So if at some point you are changing platform, it would break file format compatibility and you c...
by RockTheSchock
Nov 04, 2019 17:15
Forum: Community Discussion
Topic: FreeBASIC Namespace Project
Replies: 72
Views: 8035

Re: FreeBASIC Namespace Project

I have been thinking for a while about the quirks and about namespaces or some sort of package system. I would introduce some sort of auto namespace mode, which reflects the directory structure. Also things like an auto include mode or a compiler project / options file would be nice to have some com...
by RockTheSchock
Oct 08, 2019 15:05
Forum: Community Discussion
Topic: retro-basic
Replies: 8
Views: 1354

Re: retro-basic

This code does the same as Joshy's but can be run from both QB and FB. So with QB you could actually write readable code.

Code: Select all

SCREEN 13
DIM x AS INTEGER
DIM y AS INTEGER
FOR Y = 0 TO 199
   FOR x = 0 TO 319
      PSET (x,y), x AND 127 * Y AND 127
   NEXT
NEXT
SLEEP
by RockTheSchock
Jun 20, 2019 15:41
Forum: General
Topic: smart code formatter
Replies: 9
Views: 1715

Re: smart code formatter

Regular expressions are very useful: search pattern: ^(\t*)[ ]{3,5} replace with: $1\t Explanation: linebeginning followed by arbitrary number of tabs followed by 3-5 spaces and replaced by preveoiusly found tabs + one tab replacing 3-5 spaces. search and replace several times with notepad++ Spaces ...
by RockTheSchock
Jun 03, 2019 16:17
Forum: Beginners
Topic: How to get and use a dictionary
Replies: 14
Views: 7420

Re: How to get and use a dictionary

https://github.com/first20hours/google- ... swears.txt

Here is another word list. Just remove all 1-2 char words with regexp and then you could manually modify the file further.

regexp search and replace with editor:
^([a-z]{1,2})\r\n
by RockTheSchock
Sep 09, 2018 18:33
Forum: Community Discussion
Topic: relocation advice
Replies: 10
Views: 1540

Re: relocation advice

1. I don't believe in work. 2. I believe in a cushy lifestyle. Good food, clean water, nice clothes. I love programming but I might love the beach even more! Hamburg is the 2nd biggest city of Germany and the biggest city in Europe which is not a capital. https://en.wikipedia.org/wiki/Hamburg It's ...
by RockTheSchock
Aug 29, 2018 11:17
Forum: Community Discussion
Topic: FreeBASIC Community produced game
Replies: 130
Views: 13160

Re: FreeBASIC Community produced game

Nanoships Strike Force one Year 2357.. The battle for the Belt seamed over. The Federation of Free Nations had lost. But a breakthrough in nanotechnology made the conventional Warships vulnarable. The future of space war begins... Sofisticated autonomous nanoship factories produce and maintaine clou...
by RockTheSchock
Aug 27, 2018 21:36
Forum: Community Discussion
Topic: FreeBASIC Community produced game
Replies: 130
Views: 13160

Re: FreeBASIC Community produced game

Clearly this project is way beyond my abilities to contribute with all the complexity you are all talking about Well, i didn't mean to make things more complex. If realtime is too complex, we just use a turn based approach. If physical correct is to hard, so be it. It's a game with its own rules. M...

Go to advanced search