Bitcoin Forum
May 24, 2024, 08:21:40 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 [37] 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 »
721  Economy / Speculation / Re: Trading Bots on: April 09, 2012, 04:48:01 PM
Yep, allocation with malloc works fine.

Except now I have OpenCL errors, will fix those...

Quote
Then look at the libs you use. What is openCL good for? Do you really need it?

Testing many combinations on an algorithm at once.
722  Economy / Speculation / Re: Trading Bots on: April 09, 2012, 01:50:08 AM
Stack overflow... Now I'll know to be weary of static variables. I'll try replacing large static arrays with allocated memory and hopefully it will work... I thought the stack size would grow to meet larger variables... It would be nice if there was some error or warning when this happens.
723  Economy / Speculation / Re: Trading Bots on: April 09, 2012, 01:22:55 AM
I fiddled with the code and slowly removed parts until I got a super small program that crashes:

Quote
#include <errno.h>

int main () {
   if (!errno) {
      int bar[2096159];
   }
   return 0;
}

This gives:

Code:
(null):Parrallel BitCoin Trading Algorithm matt$ gcc -g test.c -o test
(null):Parrallel BitCoin Trading Algorithm matt$ gdb test
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done

(gdb) run
Starting program: /Users/matt/Programming/Bit Coin algorithm/Parrallel BitCoin Trading Algorithm/test
Reading symbols for shared libraries +. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00007fff5f3ffff8
0x00007fff5fc1404c in __dyld__ZNK26ImageLoaderMachOCompressed18findExportedSymbolEPKcPPK11ImageLoader ()
(gdb)

But if the array is one smaller:

Code:
#include <errno.h>

int main () {
if (!errno) {
int bar[2096158];
}
return 0;
}

Then this happens:

Code:
(null):Parrallel BitCoin Trading Algorithm matt$ gcc -g test.c -o test
(null):Parrallel BitCoin Trading Algorithm matt$ gdb test
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done

(gdb) run
Starting program: /Users/matt/Programming/Bit Coin algorithm/Parrallel BitCoin Trading Algorithm/test
Reading symbols for shared libraries +. done

Program exited normally.
(gdb)

Stack trace:

Code:
(gdb) bt
#0  0x00007fff5fc1404c in __dyld__ZNK26ImageLoaderMachOCompressed18findExportedSymbolEPKcPPK11ImageLoader ()
#1  0x00007fff5fc0f141 in __dyld__ZNK16ImageLoaderMachO18findExportedSymbolEPKcbPPK11ImageLoader ()
#2  0x00007fff5fc12b34 in __dyld__ZN26ImageLoaderMachOCompressed15resolveTwolevelERKN11ImageLoader11LinkContextEPKS0_bPKcPS5_ ()
#3  0x00007fff5fc12dd0 in __dyld__ZN26ImageLoaderMachOCompressed7resolveERKN11ImageLoader11LinkContextEPKchiPPKS0_PNS_10LastLookupE ()
#4  0x00007fff5fc1699e in __dyld__ZN26ImageLoaderMachOCompressed20doBindFastLazySymbolEjRKN11ImageLoader11LinkContextE ()
#5  0x00007fff5fc0478f in __dyld__ZN4dyld18fastBindLazySymbolEPP11ImageLoaderm ()
#6  0x00007fff8812800a in dyld_stub_binder ()
#7  0x0000000100001030 in pvars ()
#8  0x0000000100000ef4 in start ()

Well I'm stumped...
724  Economy / Speculation / Re: Trading Bots on: April 09, 2012, 12:08:01 AM
At this point in the program nothing is initialised since it's at the main function entry. I ran gdb again and it shows 0xbea7d7cc again. No idea where it came from. What I'll try to do is make and share a minimalist version of the program that replicates the problem...
725  Economy / Speculation / Re: Gold collapsing. Bitcoin up. on: April 08, 2012, 11:57:14 PM
Months means the markets can change even more so. I think completely oppositely: Use technical analysis more so in day trading. Dissonance between the fundamentals and the price shows opportunity for longer trades. Markets follow reality and not just predictable price patterns. If you can figure out something most others cannot then you can make good decisions. No doubt most people are clueless to the silver and gold manipulation and economics... knowledge of which puts people into an advantage.

726  Economy / Speculation / Re: Gold collapsing. Bitcoin up. on: April 08, 2012, 07:37:50 PM
Quote
you can't possibly know all the fundamental factors involved that go into the price of gold. 

this is why technical analysis is so important.

You can know what you can and that's better than blindness.
727  Economy / Speculation / Re: Gold collapsing. Bitcoin up. on: April 08, 2012, 04:39:13 PM
The manipulation is staring you in your face, it's hard to disagree with it.
728  Economy / Speculation / Re: Trading Bots on: April 08, 2012, 04:31:34 PM
Well I just tried compiling and running outside of Xcode and I get the same thing...

Code:
Matthew-Mitchell:Parrallel BitCoin Trading Algorithm matt$ gcc -g cmain.c -o test -lcurl -framework OpenCL -std=c99 -arch i386
Matthew-Mitchell:Parrallel BitCoin Trading Algorithm matt$ gdb testGNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .... done

(gdb) run
Starting program: /Users/matt/Programming/Bit Coin algorithm/Parrallel BitCoin Trading Algorithm/test
Reading symbols for shared libraries .+++.................................................................. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0xbea7d7cc
0x00003e9a in main (argc=0, argv=0x1000) at cmain.c:572
572 int main (int argc, const char * argv[]) {
(gdb)

Sad Also when running directly in the command line, it returns instantly.
729  Economy / Speculation / Re: Gold collapsing. Bitcoin up. on: April 08, 2012, 03:43:17 PM
What I mean is hedging isn't manipulation so it's all lies.
730  Economy / Speculation / Re: Gold collapsing. Bitcoin up. on: April 07, 2012, 08:10:33 PM
And who is JP Morgan "hedging" silver for? Doesn't add up.
731  Economy / Speculation / Re: Trading Bots on: April 07, 2012, 04:57:32 PM
I removed all optimisation and now the line during the crash is shown at entering the main function...

I removed all curllib and the same problem occurs...

I removed all of the OpenCL and the same problem occurs... What? Is Xcode broken...

I replaced the entire program with:

Code:
#include <stdlib.h>
#include <stdio.h>

int main(){
printf(":O");
return EXIT_SUCCESS;
}

It works... Time to scratch my head...
732  Economy / Speculation / Re: Trading Bots on: April 07, 2012, 02:58:27 PM
Well I modified the code:

Quote
int main (int argc, const char * argv[]) {
   float usd,btc,bid,ask,order_price,possible_price;
   printf("HALLO\n");
   DateData * prices = load_prices();

It never prints HALLO and it now crashes o the printf line...
733  Economy / Speculation / Re: Gold collapsing. Bitcoin up. on: April 07, 2012, 02:16:25 PM
Mike Maloney on silver manipulation: http://www.youtube.com/watch?v=pB_aZo5emio
734  Economy / Speculation / Re: MintChip Vs bitcoin, the currency wars are starting... who will win? on: April 06, 2012, 10:54:24 PM
I don't really know what MitChip is but it seems like it isn't competing with bitcoin at all and it's competing more with payment processors like Visa.
735  Economy / Speculation / Re: Trading Bots on: April 06, 2012, 10:53:19 PM
OK but what is wrong with this line?

Code:
FILE * file = fopen("price.dat", "rb");

That's as perfect as a line of code can be. It makes me think the compiler is corrupting the program somehow.
736  Economy / Speculation / Re: Trading Bots on: April 06, 2012, 12:43:34 PM
Code:
(*PPO_results)[x]

This is is not a C++ object. I'm not even using C++, I'm using C. The type is CombinationResult[PPO_COMBINATIONS * 11].

Also I don't know why declaring several variables on one line is bad style...
737  Economy / Speculation / Re: Trading Bots on: April 06, 2012, 10:52:56 AM
Forgot about that, it's a structure with an int and float.
738  Economy / Speculation / Re: Trading Bots on: April 06, 2012, 12:23:00 AM
I'm currently unable to test that but that should not be the case. It works when I return from the other function before the suspected bad line occurs.
739  Economy / Speculation / Re: Trading Bots on: April 05, 2012, 11:23:31 PM
I updated my algorithm in attempt to get it to test for consistency over different time periods and also use use more data but unfortunately it has a weird problem. http://stackoverflow.com/questions/10036739/line-of-c-code-causes-a-segmentation-fault-on-a-completely-irrelevant-line-of-co  Huh
740  Economy / Speculation / Re: Gold is Bitcoin is Gold on: April 04, 2012, 05:44:45 PM
The recent fall in gold and silver didn't happen with bitcoin.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 [37] 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!