
Truffle: Ethereum Dapp Development Framework - xwvvvvwx
http://truffleframework.com/
======
increment_i
I recently got pretty pumped about exploring developing for the Ethereum
network and spent an entire weekend reading everything I could about the
protocol, the development ecosystem, language and anything else I could find -
blog posts, tutorials, experiences from other developers.

I came away with my initial enthusiasm completely dashed. I can't for the life
of me imagine why any sane developer would ever want to work within the
constraints of Ethereum. It just doesn't seem to me anywhere near ready for
any kind of serious development, or even trivial development for that matter.

I'd love to hear rebuttals to this. Is anyone out there doing anything
interesting with this platform?

~~~
malux85
I’m a pretty experienced solidly / ethereum developer, and a developer with 13
years experience in vast array of systems and languages (from embedded C on
ppc to high performance c++ and now deep learning and scientific computing in
python). I completely agree with you, that there’s some very odd language
choices in solidity, seemingly rookie mistakes, and the tooling is very poor.
But! It’s the 1.0 of crypto. Early C stuff was poor, early html development
was poor, early OpenGL development was poor, it’s just new.

I see it as a lot of room for opportunity, but I could also see how it could
be frustrating to some more senior people - but I have found part of growing
old and seeing things constantly get re-invented but slightly different are
windows of opportunity - so I get excited

~~~
quickthrower2
There was a semi-joke post on HN a while back where someone created a
'pyramid' lispy language using Racket, which complied to solidity.

But in seriousness, a Haskell -> solidity compiler, might make it bearable.

~~~
remcob
Solidity is a complex moving target with limitations such as max 16 local
variables, missing optimizations and only partial support for dynamic
allocation.

You might want to compile directly to EVM instead of through Solidity. The EVM
is very simple, as far as virtual machines go. It's fully documented in [the
yellow
paper]([https://ethereum.github.io/yellowpaper/paper.pdf](https://ethereum.github.io/yellowpaper/paper.pdf))
and only changes with hardforks (and then only incrementally in a backwards
compatible way).

Smart contract development feels like embedded systems development. Every
instruction has a significant cost associated to it. There are different
memory spaces like a Harvard architecture (code, memory, storage, input,
output, other peoples code). Like embedded systems, you need to be absolutely
sure your code is correct before you deploy, as updates are impossible and a
lot of economic value depends on correctness.

But contrary to embedded systems it has 256 bit registers, 256 bit address
space and SHA3 as a cheap instruction. This means that if you pick a 'random'
hash, you can safely assume it's free! Hashtables in Solidity are implemented
like this.

Recently I've been doing some combined Solidity/EVM-assembly that I wrote
about [here]([https://medium.com/wicketh/mathemagic-chinese-remainder-
theo...](https://medium.com/wicketh/mathemagic-chinese-remainder-
theorem-a5604dfd96b0)). I'll post more this month doing some advanced tricks
in Solidity/EVM.

~~~
wrinkl3
This is a genuinely great insight. What would you say are the biggest features
absent from the language right now?

------
akerro
Another confusing name, it has nothing to do with Truffle - part of Graal Java
compiler...
[https://github.com/graalvm/graal/tree/master/truffle](https://github.com/graalvm/graal/tree/master/truffle)

It's not as bad as "Riot" (at least 3 projects with this name), but seriously,
are we running out of words to name projects?

~~~
net4all
Do people not Google their potential names or what?

~~~
toomanybeersies
Apparently not.

Jade/Pug comes to mind. Pug (the HTML templating language) was originally
called Jade.

Jade is already a programming language (well, whole environment) made by Jade
Software in New Zealand. They literally took the name of another programming
language.

------
impostervt
Anyone who is interested in getting started in Ethereum coding may want to
start with this:

[https://cryptozombies.io/](https://cryptozombies.io/)

~~~
QML
Do you know if there’s anyway to create integration tests via Solidity /
without learning JavaScript?

~~~
haldora
You can use web3.py
([https://github.com/ethereum/web3.py](https://github.com/ethereum/web3.py))
to interact with Solidity contracts using Python. I'm looking into using it
instead of truffle/web3.js so I can stick with a Python stack.

------
coolspot
I tried truffle for one project, but found Embark [777] more flexible and
better designed.

[777] [https://github.com/iurimatias/embark-
framework](https://github.com/iurimatias/embark-framework)

~~~
xwvvvvwx
What did you like better about embark?

~~~
coolspot
* plugin system

* console & web console

* dealing with testrpc and tests is much easier in embark

* better documented and more configurable

* embark CLI more powerful and has help, while truffle almost doesn’t

* truffle has so many trivial bugs that are unresolved for months, usually no even word in reply from developers. Embark developers seem to fix bugs faster.

* integration with IPFS, Whisper OOB.

* probably forgot something else important. Overall experience is so much better with Embark.

------
GeoffreySteven
It is a great framework to develop on, but we had some challenges using
MetaMask with it. Lots of room for growth, has serious potential.

------
webjunkie01
I also tried to develop with Truffle but after a few hours I decided to avoid
it and really start learning all the internals without a framework. To this
day I haven't had the need to use Truffle at all to develop the majority of my
projects.

~~~
guiomie
How do you do unit testing?

