Search found 2211 matches
Re: Pentacles
I can Compress and Uncompress my nodes. I disagree. The nodes are still the same size, only the space between them is squeezed and stretched. Worth its own thread if you get one to work. I will start one. I think a found an error in my AI code from 2016 which might explain the disappointing results...
Re: Pentacles
For fun, some color added to the neural network thing I am working on: I do like the colours, but what would you suggest I use the NN for? The network does not do anything yet. Forward and backward propagation still need to be implemented. So for now only a complicated way to store random numbers. ...
Re: Pentacles
For fun, some color added to the neural network thing I am working on: 'sick of typing integer #define i8 byte #define u8 ubyte #define i16 short #define u16 ushort #define i32 long #define u32 ulong #define i64 longint #define u64 ulongint #define f32 single #define f64 double #define rnd_range(low...
- Mar 01, 2021 22:32
- Forum: Documentation
- Topic: String index doc
- Replies: 42
- Views: 777
Re: String index doc
Does the confusion come form the ability that the the string [] operator can be used in 2 directions? dim as string text = "Hello, world!" 'dereferenced pointer to 'o' var char = text[4] 'pointer to 'o' so we can change the memory to 'X' text[4] = asc("X") I think that automatic ...
- Feb 28, 2021 23:40
- Forum: General
- Topic: How to store Erfn() into a string variable
- Replies: 10
- Views: 191
Re: How to store Erfn() into a string variable
Here is is leaking badly:
munmap_chunk(): invalid pointer
Segmentation fault (core dumped)
munmap_chunk(): invalid pointer
Segmentation fault (core dumped)
- Feb 28, 2021 23:33
- Forum: Documentation
- Topic: String index doc
- Replies: 42
- Views: 777
Re: String index doc
You mean this page: https://freebasic.net/wiki/KeyPgOpStringIndex
I agree that it is confusing. The term 'reference' is there since the creation of this page in 2008.
I'll wait for fxm to fix/improve it, else I will try tomorrow.
I agree that it is confusing. The term 'reference' is there since the creation of this page in 2008.
I'll wait for fxm to fix/improve it, else I will try tomorrow.
- Feb 28, 2021 23:22
- Forum: Beginners
- Topic: Integer data types in 32-bit and 64-bit
- Replies: 20
- Views: 413
Re: Integer data types in 32-bit and 64-bit
dodicat wrote:You have found a Windows 64 bit bug badidea.
You mean a bug in Windows itself or in Freebasic 64-bit for Windows?
(the first one, of course, does not surprise me :-)
- Feb 28, 2021 23:18
- Forum: General
- Topic: How to store Erfn() into a string variable
- Replies: 10
- Views: 191
Re: How to store Erfn() into a string variable
I have been coding for quite a while now (+10 years) and I did not know the existence of Erfn() (and the other error handling functions I just looked up). Whatever 'on error' does in freebasic, it does not seem to prevent writing out-out-bounds(ar1x(2) = 1). I get inconsistent behavior trying 32 and...
- Feb 28, 2021 22:56
- Forum: Beginners
- Topic: Integer data types in 32-bit and 64-bit
- Replies: 20
- Views: 413
Re: Integer data types in 32-bit and 64-bit
My sum long is a factor 5.76 faster. The two CPUs should differ by a factor 2.5 only. So it seems that your 64-bit code is not very efficient under the hood. I blame it on the compiler. Note that the turbo-boost is disabled on the Dell, that reduces the maximum clock speed (I forgot the numbers). I...
- Feb 28, 2021 21:13
- Forum: Beginners
- Topic: Integer data types in 32-bit and 64-bit
- Replies: 20
- Views: 413
Re: Integer data types in 32-bit and 64-bit
I did some more tests with a bit modified code: #Define elements 100000000 '100M #ifdef __FB_WIN32__ #define OS "Windows" #else #ifdef __FB_LINUX__ #define OS "Linux" #else #define OS "Unknown OS" #endif #endif #ifdef __FB_64BIT__ #define BITS "64-bit" #else #...
- Feb 28, 2021 12:28
- Forum: Beginners
- Topic: Integer data types in 32-bit and 64-bit
- Replies: 20
- Views: 413
Re: Integer data types in 32-bit and 64-bit
Strange, I'll do some more tests on other systems and on Windows...
- Feb 28, 2021 11:26
- Forum: Community Discussion
- Topic: What does this mean?
- Replies: 12
- Views: 374
Re: What does this mean?
I don't know if his argument about performance is right or not, though. To initialize a variable, the computer has to do something: Write a value (0) to it. This can be a write action to memory (stack) or CPU cache / register depending on code and optimizations. If the compiler is smart enough, it ...
- Feb 28, 2021 10:52
- Forum: Beginners
- Topic: Integer data types in 32-bit and 64-bit
- Replies: 20
- Views: 413
Re: Integer data types in 32-bit and 64-bit
Maybe... My results: fbc32 -gen gas test.bas sizes in 32-bit code: 4 integer 4 long Sum integer= 800010752 added in 314 ms Sum long = 800010752 added in 314 ms fbc32 -gen gcc test.bas sizes in 32-bit code: 4 integer 4 long Sum integer= 800010752 added in 351 ms Sum long = 800010752 added in 342 ms ...
- Feb 28, 2021 1:43
- Forum: Beginners
- Topic: Integer data types in 32-bit and 64-bit
- Replies: 20
- Views: 413
Re: Integer data types in 32-bit and 64-bit
You can even redefine the basic data types, and forget about (u)integer completely. Example: 'sick of typing integer #define i8 byte #define u8 ubyte #define i16 short #define u16 ushort #define i32 long #define u32 ulong #define i64 longint #define u64 ulongint #define f32 single #define f64 double...
- Feb 26, 2021 9:44
- Forum: Community Discussion
- Topic: Ansi, Utf8 & Utf16 encoding problems
- Replies: 35
- Views: 683
Re: Ansi, Utf8 & Utf16 encoding problems
I do take issue with Golang using UTF-8 for in-memory representation of strings, but there are so many subtle nuances to indexing unicode strings that having an O(1) equivalent to MID$ probably isn't the end of the world. Not only Go, also Rust uses UTF-8 in memory for strings https://doc.rust-lang...