Bitcoin Forum
May 04, 2024, 07:34:19 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: « 1 [2]  All
  Print  
Author Topic: [Code] Will Code in Java  (Read 1542 times)
daybyter
Legendary
*
Offline Offline

Activity: 965
Merit: 1000


View Profile
January 22, 2013, 03:35:25 PM
 #21

K1773R: your second question is kinda tough for me. You want a method, that writes a value directly in some given address? I only know some Java hardware, where you can access the ram as a (pseudo-) byte array.

Is there a generic solution?

Or do you just mean some serialization to bytes?

I guess , I don't really understand your question...hmmh...

1714808059
Hero Member
*
Offline Offline

Posts: 1714808059

View Profile Personal Message (Offline)

Ignore
1714808059
Reply with quote  #2

1714808059
Report to moderator
1714808059
Hero Member
*
Offline Offline

Posts: 1714808059

View Profile Personal Message (Offline)

Ignore
1714808059
Reply with quote  #2

1714808059
Report to moderator
1714808059
Hero Member
*
Offline Offline

Posts: 1714808059

View Profile Personal Message (Offline)

Ignore
1714808059
Reply with quote  #2

1714808059
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714808059
Hero Member
*
Offline Offline

Posts: 1714808059

View Profile Personal Message (Offline)

Ignore
1714808059
Reply with quote  #2

1714808059
Report to moderator
1714808059
Hero Member
*
Offline Offline

Posts: 1714808059

View Profile Personal Message (Offline)

Ignore
1714808059
Reply with quote  #2

1714808059
Report to moderator
1714808059
Hero Member
*
Offline Offline

Posts: 1714808059

View Profile Personal Message (Offline)

Ignore
1714808059
Reply with quote  #2

1714808059
Report to moderator
K1773R
Legendary
*
Offline Offline

Activity: 1792
Merit: 1008


/dev/null


View Profile
January 22, 2013, 05:08:06 PM
 #22

K1773R: your second question is kinda tough for me. You want a method, that writes a value directly in some given address? I only know some Java hardware, where you can access the ram as a (pseudo-) byte array.

Is there a generic solution?

Or do you just mean some serialization to bytes?

I guess , I don't really understand your question...hmmh...
u can work directly with memory with the intern class named "Unsafe".
http://highlyscalable.wordpress.com/2012/02/02/direct-memory-access-in-java
http://robaustin.wikidot.com/how-to-write-to-direct-memory-locations-in-java

this is usefull in situations when primitives (char/int/... arrays) arent fast enough and u need it even faster.
for comparsion (didnt test primitive array vs direct memory way, altough i dont think its much faster.):
Integer[] -> 56 nano seconds
ArrayList -> 27755 nano seconds

[GPG Public Key]
BTC/DVC/TRC/FRC: 1K1773RbXRZVRQSSXe9N6N2MUFERvrdu6y ANC/XPM AK1773RTmRKtvbKBCrUu95UQg5iegrqyeA NMC: NK1773Rzv8b4ugmCgX789PbjewA9fL9Dy1 LTC: LKi773RBuPepQH8E6Zb1ponoCvgbU7hHmd EMC: EK1773RxUes1HX1YAGMZ1xVYBBRUCqfDoF BQC: bK1773R1APJz4yTgRkmdKQhjhiMyQpJgfN
Gyrsur
Legendary
*
Offline Offline

Activity: 2856
Merit: 1518


Bitcoin Legal Tender Countries: 2 of 206


View Profile WWW
January 22, 2013, 05:18:08 PM
 #23

K1773R: your second question is kinda tough for me. You want a method, that writes a value directly in some given address? I only know some Java hardware, where you can access the ram as a (pseudo-) byte array.

Is there a generic solution?

Or do you just mean some serialization to bytes?

I guess , I don't really understand your question...hmmh...
u can work directly with memory with the intern class named "Unsafe".
http://highlyscalable.wordpress.com/2012/02/02/direct-memory-access-in-java
http://robaustin.wikidot.com/how-to-write-to-direct-memory-locations-in-java

this is usefull in situations when primitives (char/int/... arrays) arent fast enough and u need it even faster.
for comparsion (didnt test primitive array vs direct memory way, altough i dont think its much faster.):
Integer[] -> 56 nano seconds
ArrayList -> 27755 nano seconds


ok, but I'm afraid you are more low level engineer/hacker so Java don't really fit your needs. Smiley how about C??

daybyter
Legendary
*
Offline Offline

Activity: 965
Merit: 1000


View Profile
January 22, 2013, 05:21:49 PM
 #24


u can work directly with memory with the intern class named "Unsafe".
http://highlyscalable.wordpress.com/2012/02/02/direct-memory-access-in-java
http://robaustin.wikidot.com/how-to-write-to-direct-memory-locations-in-java

this is usefull in situations when primitives (char/int/... arrays) arent fast enough and u need it even faster.
for comparsion (didnt test primitive array vs direct memory way, altough i dont think its much faster.):
Integer[] -> 56 nano seconds
ArrayList -> 27755 nano seconds


That's cool, but I try to avoid the sun* classes usually. Maybe I should give you my trading sources, so you could speed them up a bit... Smiley

K1773R
Legendary
*
Offline Offline

Activity: 1792
Merit: 1008


/dev/null


View Profile
January 23, 2013, 08:54:44 AM
 #25

That's cool, but I try to avoid the sun* classes usually. Maybe I should give you my trading sources, so you could speed them up a bit... Smiley
atm im quite busy, but if u want i can give it a look/try later.

ok, but I'm afraid you are more low level engineer/hacker so Java don't really fit your needs. Smiley how about C??
yes, C is one of my favorite ones. i dev with Java too, but only little tools and such (if i need it fast and speed dosnt matter). i didnt intend to bash java with these questions Wink

[GPG Public Key]
BTC/DVC/TRC/FRC: 1K1773RbXRZVRQSSXe9N6N2MUFERvrdu6y ANC/XPM AK1773RTmRKtvbKBCrUu95UQg5iegrqyeA NMC: NK1773Rzv8b4ugmCgX789PbjewA9fL9Dy1 LTC: LKi773RBuPepQH8E6Zb1ponoCvgbU7hHmd EMC: EK1773RxUes1HX1YAGMZ1xVYBBRUCqfDoF BQC: bK1773R1APJz4yTgRkmdKQhjhiMyQpJgfN
daybyter
Legendary
*
Offline Offline

Activity: 965
Merit: 1000


View Profile
January 23, 2013, 10:01:24 AM
 #26

Well...since it's more than 100 classes, you 'll need some time,  I guess...

Epicblood (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
January 27, 2013, 05:33:55 AM
 #27

Bump

1AbYgR1FspHBB5EqyaxX6MrT6jmc7eMVEQ
Looking for Scrypt miner for ML605
Revolutionary MoneyMaking! Build your own cloud miner!
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
January 28, 2013, 03:23:15 AM
 #28

Hey! Java still rules and will exist long after c# is gone...
  • security holes
  • terrible performance
  • wtf syntax

yeah, it's going to exist in the same realm as FORTAN

If java is really so bad, then why is one of the first things colleges and employers ask here in silicon valley whether or not you know java?
And if java is so bad, then is minecraft bad? Even with it's 2,637,857 PAYING customers?
let's see the games made in c++:
ALL the AAA games in the last 10 years

Hey all,

I am pretty good at Java, but would like to get better.
I will code some programs in Java for anyone here. Price depends on how complicated the program is, but as I am doing this mostly just to get better it probably will be fairly cheap.
Payment will only be made AFTER I complete the program to your satisfaction, and an escrow can be arranged if you prefer.
Feel free to PM me or post here and please include how much you would be willing to pay.
You can also email me at epicblood@gmail.com

3 questions:
can you force the GC to do its job?
can you work directly with memory?
do you use Arrays or Lists?
i got you covered:

1: delete myMemory;
2: type2* var2 = reinterpret_cast<type2*>(var1); or *(int*)0x12345678 = 1337;
3. T a[10], or std::vector

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!