Search found 274 matches

by sean_vn
Feb 18, 2019 14:35
Forum: Community Discussion
Topic: Building FreeBASIC 1.06 Release
Replies: 25
Views: 1745

Re: Building FreeBASIC 1.06 Release

I got this little bit of weirdness when compiling with 1.06 Linux 64 as just released: fbc -O 3 "RNG3.bas" (in directory: /initrd/mnt/dev_save/FB/code) fbc: Symbol `ospeed' has different size in shared object, consider re-linking Compilation finished successfully. The code still works fine.
by sean_vn
Feb 17, 2019 12:31
Forum: Linux
Topic: Two fbgfx bugs on Linux
Replies: 2
Views: 123

Re: Two fbgfx bugs on Linux

I wasn't able to use FB for a while with Xenial Linux. I thought that was the end of it. However with the new ScPup64 Linux version the graphics are working again. Okay............
by sean_vn
Feb 03, 2019 13:58
Forum: General
Topic: RND breadth
Replies: 38
Views: 650

Re: RND breadth

If the uniform random numbers fall on a line between 0 and 1 then you will get less than 0.5 (ie anywhere on the lower half) half the time, less than 0.1 (anywhere on the lower tenth) one over ten of the time, less than 0.01 one over a hundred of the time etc. If you want an equal probability of get...
by sean_vn
Jan 14, 2019 1:31
Forum: Game Dev
Topic: GOAP: A Basic AI Tutorial
Replies: 32
Views: 1100

Re: GOAP: A Basic AI Tutorial

by sean_vn
Jan 14, 2019 1:27
Forum: Projects
Topic: glvideotexture_chung video to 3D openGL textures conversion
Replies: 6
Views: 692

Re: glvideotexture_chung video to 3D openGL textures conversion

Very technically creative. Maybe you can explore genetic algorithms and neural networks a bit. If I remember correctly you did write some neural network code one time.
by sean_vn
Dec 27, 2018 3:01
Forum: Beginners
Topic: Optimization quirks
Replies: 6
Views: 301

Re: Optimization quirks

There are no bugs in gcc. The bug is people assuming overflows etc are valid c code when they are not. The c compiler knows you will never overflow an integer operation, hence it can assume the carry flag is clear at the end of that operation. Should you do 2's complement arithmetic where overflows ...
by sean_vn
Nov 01, 2018 23:41
Forum: General
Topic: Bernard Widynski's Middle Square Weyl Sequence RNG (MsWs)
Replies: 106
Views: 2409

Re: Bernard Widynski's Middle Square Weyl Sequence RNG (MsWs)

Nice RNG algorithm. I must remember it. There is a 128 bit multiply in the AMD 64 instruction set that you can use for fixed point calculations. A random 64 bit number by (n+1) will give a result between 0 and n in the register that contains the high 64 bits of the 128 bit result. Not perfect but ge...
by sean_vn
Sep 27, 2018 13:23
Forum: General
Topic: SSE2: pand xmm3, 31?
Replies: 49
Views: 1458

Re: SSE2: pand xmm3, 31?

You can do a movd with an ordinary register

Code: Select all

mov eax,31
movd xmm0,eax

It's quite slow, about 20 clock cycle I think
by sean_vn
Sep 26, 2018 23:13
Forum: General
Topic: PRNGs randomness versus uniformity.
Replies: 8
Views: 372

Re: PRNGs randomness versus uniformity.

The upper bits of a LCG where you use only every second value seems good for uniformity. I also have experimented with using the bswap instruction with LCG. If you generate permutations from a RNG the distribution of those permutations seems like a good test but of course only works on very small se...
by sean_vn
Sep 26, 2018 22:53
Forum: Community Discussion
Topic: Like FreeBASIC? Try JavaScript
Replies: 41
Views: 2306

Re: Try JavaScript

The reason I installed an older version of linux to use FB again is the access to assembly language instructions. Then you can use Basic as an efficient scripting language to glue machine code together. I tried to keep modern with the D programming language but their assembly language compiler is br...
by sean_vn
Sep 24, 2018 14:34
Forum: General
Topic: PCG32II Help file
Replies: 10
Views: 394

Re: PCG32II Help file

I am trying the xoshiro256 type algorithms with a different mixing/tempering function to the original. You can change the timestamp function for non linux amd64. I'm not looking for the algorithm to pass the usual RNG tests (though it may or may nearly), just to have a large state space and avoid co...
by sean_vn
Sep 24, 2018 14:19
Forum: Community Discussion
Topic: Like FreeBASIC? Try JavaScript
Replies: 41
Views: 2306

Re: Try JavaScript

I actually installed an older version of a linux amd64 to use FB again, to do algorithm research in "no share" mode. Then JavaScript and HTML 5 for any commercial things. It's a very positive simplification to stick to those 2 programming languages. If you are not fixated on programming la...
by sean_vn
Aug 05, 2018 8:14
Forum: Libraries
Topic: EGGX graphics library - Linux AMD64 only
Replies: 0
Views: 444

EGGX graphics library - Linux AMD64 only

I spend a few hours creating a .bi file for the EGGX graphic library for Linux AMD64 only. That should enable me to use Freebasic again, since the built in graphics driver doesn't work for me anymore. \ Also the eggx library looks good for giving many programming language a Basic look and feel. For ...
by sean_vn
Aug 04, 2018 4:44
Forum: Projects
Topic: SparseNet
Replies: 14
Views: 956

Re: RandNet

Well, you can quantize 10.68372892 to 10.6 or 10 or 11, whatever way you want to do it. I was just saying there are some reasons to avoid anything like if possible when trying to solve problems by evolution. ..change of topic.. I was looking at Fortran as an alternative to FB. However I read that Ba...
by sean_vn
Aug 04, 2018 1:38
Forum: Projects
Topic: SparseNet
Replies: 14
Views: 956

Re: RandNet

I'm not using FB at the moment because of the graphic problem I have on linux amd64. I might try using FB with EGGX graphics library: https://www.ir.isas.jaxa.jp/~cyamauch/eggx_procall/ but that would mean writing an extensive .bi file. It seems easier to just use it from C. Anyway I had this to say...

Go to advanced search