Author

Topic: Is Python good for bitcoin apps? (Read 425 times)

newbie
Activity: 42
Merit: 0
February 19, 2018, 04:12:28 PM
#27
There are a lot of bitcoin projects built with Python.

Large ones (Electrum, Armory), libraries and utility scripts.

If I am starting a larger bitcoin project I would probably prefer a language with static type checking but still has similar memory safety (like C# or Java/Kotlin)
newbie
Activity: 11
Merit: 0
February 19, 2018, 08:32:21 AM
#26
python works,
java
Javascript

but to make apps or or software with GUI
java to android
objective C to IOS

crypto kittes was built in Javascipt using the ethereum network so if you want to down that route google that.

javascript can be ported to most of these but that can be said to with most languages now in 2018.

just go for a language you belive in or that looks and feels good to you.

newbie
Activity: 14
Merit: 0
February 18, 2018, 05:37:59 AM
#25
I am agreed the following opinions.   Python is a scrpit lang, not for big program.


I want know, Is Python good for bitcoin apps?

Depends on what you mean with "apps".
Python is a scripting language.
You won't be able to comfortably code "big" software using python

For small scripts, sure.. python is awesome IMO.



I want to try make easy bitcoin app and heard that Python is best for coding blockchain..
Is it really?

There is no "best for coding blockchain".
Blockchain is a technology. Bitcoin utilizes blockchain.

The best programming language to code scripts/programs is the one you are most comfortable with!

If you are just starting to program and you don't want to code a wallet like electrum from scratch i would say Python is pretty good to get started.
Its straight forward and lets you pretty much "do whatever you want" without having to worry about memory allocation, etc.. too much



What language you use for coding?

I personally use either C, Java or Python.
Most preferably i use python because.. well.. its basically like writing pseudo code.
Additionally you can basically modify strings/data in python any way you want without having to write 100's of lines just for a simple modifying function.
sr. member
Activity: 1330
Merit: 258
February 12, 2018, 02:57:30 AM
#24
I want create script and use blockchain node API and create "little" online/offline game  Smiley

Thanks for answers.
I will try get few lessons "Python coding" and
after will make choose.

The variety of library that Python have give you a lot of API support to play around, I'm sure it will give you a lot of option. But I doubt Python would be good for a game, I'm sure there are better programming languages for it, and also the leading game engines don't support Python.

Thanks to all for details info and your adiveces.
I choose Python for start Smiley

P.s. I want to create "small" project, this will be not highload and scale project.
That is the beauty of Python its good for the small project, but when the project getting bigger the performance will be decreased.

Python don't support game engines? Sad
I don't know about it..  Unity is best easy engine.
need find info about game engines support Python
legendary
Activity: 1932
Merit: 1273
February 12, 2018, 02:37:35 AM
#23
I want create script and use blockchain node API and create "little" online/offline game  Smiley

Thanks for answers.
I will try get few lessons "Python coding" and
after will make choose.

The variety of library that Python have give you a lot of API support to play around, I'm sure it will give you a lot of option. But I doubt Python would be good for a game, I'm sure there are better programming languages for it, and also the leading game engines don't support Python.

Thanks to all for details info and your adiveces.
I choose Python for start Smiley

P.s. I want to create "small" project, this will be not highload and scale project.
That is the beauty of Python its good for the small project, but when the project getting bigger the performance will be decreased.
sr. member
Activity: 1330
Merit: 258
February 11, 2018, 11:13:47 AM
#22
Thanks to all for details info and your adiveces.
I choose Python for start Smiley

P.s. I want to create "small" project, this will be not highload and scale project.
legendary
Activity: 1512
Merit: 1049
Death to enemies!
February 10, 2018, 04:54:28 PM
#21
Only advantage of high level language is relatively fast development, ease of portability between Windows and *nix and it is friendly to noobish programmers.

I counted four in your text. Also, i can tell about one more advantage: high level language is better for small projects, like blockchain parser or transaction accelerator or data storage.
Portability and noob friendliness is not advantages. I do not care about other OS than one running on my computer. Fast development also does not matter. Once a software is written, it is.
sr. member
Activity: 377
Merit: 282
Finis coronat opus
February 10, 2018, 04:19:54 PM
#20
Only advantage of high level language is relatively fast development, ease of portability between Windows and *nix and it is friendly to noobish programmers.

I counted four in your text. Also, i can tell about one more advantage: high level language is better for small projects, like blockchain parser or transaction accelerator or data storage.
legendary
Activity: 1512
Merit: 1049
Death to enemies!
February 10, 2018, 02:09:11 PM
#19
As a interpreted language instead of compiled, it is not good for anything serious. Python is modern day version of 90ties Visual Basic.

You do realize that:
1) Python scripts can be compiled and
2) Electrum is written in python

Your statement is completely senseless. Unless, of course, you consider electrum as "not serious".
Python is one of the (if not) the best scripting langauge to process/handle data and strings.
It provides a lot of useful functions which you would have to write yourself in other languages (e.g. C/C++/Java).
Yes, I realize that
1) is true
2) also is true.

I consider Electrum as usable software, just as other software written in Python. But remember that a lot of hacking software in early 2000 was written in Visual Basic. It worked, but was nightmare, all those ocx files and also for just simple sending few magic packets and repeating it made like 700KB executable files while same functionality could be implemented in C/C++ that weighs less than 4KB.

Can You optimize Python program to take advantage of various CPU hardware features same as C with inline Assembler does? I doubt. Python is high-level programming/scripting language. By definition it cannot be as good and powerful as low level language like C and ASM. Only advantage of high level language is relatively fast development, ease of portability between Windows and *nix and it is friendly to noobish programmers.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
February 10, 2018, 01:21:08 PM
#18
As a interpreted language instead of compiled, it is not good for anything serious. Python is modern day version of 90ties Visual Basic.

You do realize that:
1) Python scripts can be compiled and
2) Electrum is written in python

Your statement is completely senseless. Unless, of course, you consider electrum as "not serious".
Python is one of the (if not) the best scripting langauge to process/handle data and strings.
It provides a lot of useful functions which you would have to write yourself in other languages (e.g. C/C++/Java).

I think MysteryMiner is referring to the main console only allowing interpreting of the software.

Microsoft and other companies have made powerful compilers of it though however and yes electrum is mostly written in Python. Even theymos says they like to use electrum for small amounts of bitcoins that he wants to transfer/store.
legendary
Activity: 1624
Merit: 2481
February 10, 2018, 12:25:05 PM
#17
As a interpreted language instead of compiled, it is not good for anything serious. Python is modern day version of 90ties Visual Basic.

You do realize that:
1) Python scripts can be compiled and
2) Electrum is written in python

Your statement is completely senseless. Unless, of course, you consider electrum as "not serious".
Python is one of the (if not) the best scripting langauge to process/handle data and strings.
It provides a lot of useful functions which you would have to write yourself in other languages (e.g. C/C++/Java).
legendary
Activity: 1512
Merit: 1049
Death to enemies!
February 10, 2018, 06:35:44 AM
#16
As a interpreted language instead of compiled, it is not good for anything serious. Python is modern day version of 90ties Visual Basic.
legendary
Activity: 1624
Merit: 2481
February 10, 2018, 06:14:03 AM
#15
I would say that if you plan on working on wallet software, learn javascript..

No. Just no.

Some reasons for javascript to suck hard:
  • JS supports "Number" as the only number format -> Supports only 64bit Doubles
    The problem with large intergers with floating point variables is, that you won't be able to represent large number correctly.
    99999999999999999 == 100000000000000000 evaluates to true in javascript.
    Its kinda suicide to use javascript for handling large numbers (private-/public keys).
  • JavaScript heavily depends on global variables.
    You not just can use them.. you have to use them. This makes it a pain in the ass to get a structure over a complex program (e.g. wallet)
  • There are a lot of traps you have to watch out in JS
    For example: -1 < Number.MIN_VALUE returns true, because Number.MIN_VALUE returns the lowest positive number and the real lowest number is -Number.MAX_VALUE
  • JS has a TON of vulnerabilities. You don't want to have security vulnerabilities in your wallet. To name the most common JS is so vulnerable to: XSS[1] and CSRF[2]


Those were a few reasons. There are way more.
But this should give a small insight why you shouldn't use javascript to code a wallet. In fact, you shouldn't use javascript at all.


[1] https://en.wikipedia.org/wiki/Cross-site_scripting
[2] https://en.wikipedia.org/wiki/Cross-site_request_forgery
member
Activity: 89
Merit: 10
February 10, 2018, 05:18:20 AM
#14
I would say that if you plan on working on wallet software, learn javascript and how Node.js works.
If you would like to work on bitcoin's core components and someday be a Satoshi 2.0... then learning C++ is the way to go.
If you want to be and all-rounder. Python is an amazing language, and can do things all the way from powering wallets like Electrum and Armory, all the way to powering blockchain parsers and the like.

If I had to pick one, I'd say Python. It's easy to learn.
full member
Activity: 378
Merit: 197
February 10, 2018, 03:55:32 AM
#13
I want know, Is Python good for bitcoin apps?

Python is excellent for bitcoin apps.
What makes is so good is that it already has good easy to use libraries for doing all the math behind bitcoin.
Support for: big numbers, SHA256, ripemod160, elliptic curve operations etc...

Those can be a real PITA if you have to write any of them in C++, or whatever.
Actually C++ also has some libraries you can use, but at least those that I have seen are quite difficult to use and complicated.

On python being slower... yes, compiled languages are faster, but you wont be needing to use the full capabilities of a computer for doing bitcoin operations. 

One example of a python program is Electrum
staff
Activity: 3304
Merit: 4115
February 09, 2018, 09:32:25 PM
#12
I want create script and use blockchain node API and create "little" online/offline game  Smiley

Thanks for answers.
I will try get few lessons "Python coding" and
after will make choose.


You could tie into that via Python. I would imagine that there's several APIs out there which support the blockchain and Python. Bitcoin is written in c++ but, isn't one of the easiest languages to learn as it's quite awkward in certain areas.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
February 09, 2018, 11:26:41 AM
#11
I want create script and use blockchain node API and create "little" online/offline game  Smiley

Thanks for answers.
I will try get few lessons "Python coding" and
after will make choose.


JSON and URLLIB (preisntalled in Python are helpful - if you are pulling info from it). I started fiddling with pulling block data from it.

They do have a limit of one request per 10 seconds which is quite slow if you want to pull quite a few blocks (I haven't tried going below it but now and again if you make 2 requests in the same 10 seconds it might go unnoticed).
jr. member
Activity: 77
Merit: 2
CarnaLife.io
February 09, 2018, 12:49:14 AM
#10
Hi,

I want know, Is Python good for bitcoin apps?

I want to try make easy bitcoin app and heard that Python is best for coding blockchain..
Is it really? (I choose new stack for code)

or best stack MEAN?

What language you use for coding?

Thanks.
According to me, if you have complete knowledge of even one kind of programming language, you won't find it difficult to understand a code in another language, I don't think it is necessary to learn python from scratch for this purpose.
sr. member
Activity: 1330
Merit: 258
February 08, 2018, 08:53:02 PM
#9
I want create script and use blockchain node API and create "little" online/offline game  Smiley

Thanks for answers.
I will try get few lessons "Python coding" and
after will make choose.
staff
Activity: 3304
Merit: 4115
February 08, 2018, 06:07:13 PM
#8
Python is considered simple by nature and is a little easier to pick up than some programming languages which require a little bit more work to get things to work but, I believe you can learn more from actually running into more problems and figuring them out. The easy way isn't always the most beneficial.
 
sr. member
Activity: 377
Merit: 282
Finis coronat opus
February 08, 2018, 05:12:08 PM
#7
But i guess python is way more easy to operate than java , c++ or even C . I personally like to use either python or perl both are extremely easy to use compared to java and c++
Python is good for script programs: parsers, bots and others.
But many "big" programs writed on Python. Pywallet, electrum and others.

Python is preferred more because it can be compiled into a executable code or even can run uncompiled.
Every code can be compiled into exe.
You can run code uncompiled only if you have python interpreter.

Python is way easier to understand even for beginners so choosing python over java and C++ will be a good choice.

It's hard to say what's "easier". It depends what you are learning before in your life.
full member
Activity: 182
Merit: 100
February 08, 2018, 12:41:00 PM
#6
Hi,

I want know, Is Python good for bitcoin apps?

I want to try make easy bitcoin app and heard that Python is best for coding blockchain..
Is it really? (I choose new stack for code)

or best stack MEAN?

What language you use for coding?

Thanks.
I think choosing a language is not what matters but what matter is that in which language you are more comfortable and which language you know better. But i guess python is way more easy to operate than java , c++ or even C . I personally like to use either python or perl both are extremely easy to use compared to java and c++. Python is preferred more because it can be compiled into a executable code or even can run uncompiled. Python is way easier to understand even for beginners so choosing python over java and C++ will be a good choice.
legendary
Activity: 1624
Merit: 2481
February 08, 2018, 07:43:22 AM
#5
As an extra note, Python is quite slow as a language to run (not entirely sure why) ...

For the ones of you who are interested in why phyton is slower than other languages (C for example):

1) Python is more of a interpreted than compiled language. (This is dependend on the implementation. Bust mostly its interpreted)


2) Initialization of variables is dynamically, not statically.
In C the compiler knows the type of a variable by its definition.
In Python the interpreter only knows that assigned variables are objects. The interpreter has to create/initialize a new python object to hold the returned value when the code is already running.


3) Pythons object model leads to inefficient memory access
Regarding Arrays:
In C you have a pointer to a contiguous data buffer.
In Python (list) you have a pointer to a contiguous buffer of pointers, each of which points to a python object which has references to its data.
This make python more expensive in terms of storage and access time.

member
Activity: 96
Merit: 15
February 08, 2018, 06:55:58 AM
#4
Python is used a lot of programming apps as it's easier to program and is a bit more forgiving syntax wise than other programming languages are.

There are some useful code snippets on github depending on what specifically you're trying to program for? If you want to look into basic stuff, there's a Python module called Bitcoin-tools that might be helpful if you don't want to code from scratch.
Thank you for a cool tip! Will definitely check github out. I'm not that good at Python but it's interesting to see what people came up with. Thanks again!  Cheesy
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
February 08, 2018, 06:51:45 AM
#3
Python is used a lot of programming apps as it's easier to program and is a bit more forgiving syntax wise than other programming languages are.

There are some useful code snippets on github depending on what specifically you're trying to program for? If you want to look into basic stuff, there's a Python module called Bitcoin-tools that might be helpful if you don't want to code from scratch.

As an extra note, Python is quite slow as a language to run (not entirely sure why) so you can't make really complex stuff using it, for that you'd turn to C/C#/C++.
legendary
Activity: 1624
Merit: 2481
February 08, 2018, 06:50:08 AM
#2
I want know, Is Python good for bitcoin apps?

Depends on what you mean with "apps".
Python is a scripting language.
You won't be able to comfortably code "big" software using python

For small scripts, sure.. python is awesome IMO.



I want to try make easy bitcoin app and heard that Python is best for coding blockchain..
Is it really?

There is no "best for coding blockchain".
Blockchain is a technology. Bitcoin utilizes blockchain.

The best programming language to code scripts/programs is the one you are most comfortable with!

If you are just starting to program and you don't want to code a wallet like electrum from scratch i would say Python is pretty good to get started.
Its straight forward and lets you pretty much "do whatever you want" without having to worry about memory allocation, etc.. too much



What language you use for coding?

I personally use either C, Java or Python.
Most preferably i use python because.. well.. its basically like writing pseudo code.
Additionally you can basically modify strings/data in python any way you want without having to write 100's of lines just for a simple modifying function.
sr. member
Activity: 1330
Merit: 258
February 08, 2018, 04:28:42 AM
#1
Hi,

I want know, Is Python good for bitcoin apps?

I want to try make easy bitcoin app and heard that Python is best for coding blockchain..
Is it really? (I choose new stack for code)

or best stack MEAN?

What language you use for coding?

Thanks.
Jump to: