Successfully reported this slideshow.
“Los programadores de C++
somos los peores en reutilización
de código”

(said by) Bjarne Stroustrup
(in talk in) Carlos II...
OpenCV

www.biicode.com Nov-13
The CImg Library

www.biicode.com Nov-13
Box2D, Google GTest

www.biicode.com Nov-13
Win, Linux, Mac…

www.biicode.com Nov-13
using std::cpp

Univ. Carlos III, 26-Nov-13
6

www.biicode.com Nov-13
Biicode setup
• CMake:
– Visual, Eclipse
– VC, Mingw, gcc

www.biicode.com Nov-13
Hello Bii!
(jdaniel)

$ bii new hello

jdaniel/hello/main.cpp
#include “hello.h”
main(){
hello();
}

jdaniel/hello/hello.h...
Dependencies Graph
jdaniel/hello/hello.h
void hello();

#include “hello.h”
main(){
hello();
}

#include “hello.h”
void hel...
Automate Build
CMakeLists.txt

jdaniel/hello/hello.h

ADD_EXECUTABLE(jdaniel_hello
main.cpp
hello.cpp)

void hello();

#in...
Publish
$ bii publish
tag: STABLE
msg: my hello

No empaquetado
No binarios
No librerias
No configuration
www.biicode.com ...
Reuse & Play
lguerrero/chat/chat.h
(lguerrero)

$ bii new chat

#include “jdaniel/hello/hello.h”
void chat(){
hello();
hel...
Find & Get

DEP

SRC
#include “jdaniel/hello/hello.h”
void chat(){
hello();
hello();
}

lguerrero/chat/chat.h
#include “ch...
CMakeLists.txt

Build

ADD_LIBRARY(jdaniel_hello
hello.cpp)
ADD_EXECUTABLE(lguerrero_chat
main.cpp)
TARGET_LINK_LIBRARIES(...
Publish
$ bii publish

www.biicode.com Nov-13
Reuse & Play
(mark)

$ bii new faisbuk

$ bii find
$ bii cpp:run
HelloBii!
HelloBii!

#include “lguerrero/chat/chat.h”
mai...
More sleep

#include <google/gtest/gtest.h>
www.biicode.com Nov-13
DRY (but not CtrlC, CtrlV)

www.biicode.com Nov-13
Dep Versions
0

1

$ bii publish
tag: STABLE
msg: wow!
jdaniel/hello
#include “hello.h”
void hello(){
cout<<“Bii rocks!”<<...
Update
(lguerrero)

$ cd chat

$ bii find --update
$ bii cpp:run
Bii rocks!
Bii rocks!
www.biicode.com Nov-13
Find (rules)
default:
- block: .
- [branch.name == "master" and branch.user ==
block.user, tag==STABLE, 1]

- tag>=ALPHA
-...
Compatibility (file level)
jdaniel/hello

0

0

1

0
diego/bot

lguerrero/chat

www.biicode.com Nov-13
CSP (combinatory)

M1
Mngr.h
(0)

M2
Mngr.h
(1)

#include “Mngr.h”

M3
Mngr.h
(2)

B1
G

Pang.h (0)

Ball.h
(0)

B2
Ball.h...
Data Files
$ bii new hello
(src/jdaniel/hello)

jdaniel/hello/main.cpp
#include “hello.h”
main(){
hello();
}

jdaniel/hell...
Build Rules
$ bii new hello
(src/jdaniel/hello)

jdaniel/hello/main.cpp
#include “hello.h”
main(){
hello();
}

jdaniel/hel...
Config Rules
$ bii new hello
(src/jdaniel/hello)

jdaniel/hello/nix/hello.cpp
#include “hello.h”
void hello(){
cout<< “Hel...
Collaborate
(lguerrero)

$ cd chat
$ bii open jdaniel/hello

jdaniel/hello/hello.cpp

#include “hello.h”
void hello(){
cou...
The Web

www.biicode.com Nov-13
Real Use Accounting

www.biicode.com Nov-13
Current status

www.biicode.com Nov-13
Beta 1 month

www.biicode.com Nov-13
Roadmap
• Private
• Accounting
• Other languages (Python, Node, Fortran)
– “Its kind of loony tunes that PyPI, RubyGems, C...
Community Beta
• YES:
– Zlib, box2d, little_cms, crypto, freeglut, eigen, csparse, gtest, gmock

• NO:
– Boost (binary ong...
Why Biicode?
• SOLVE PROBLEMS
– 3 hours => 0s for
the whole world
– Every single file
counts

• Opportunity to
lead the ch...
Biicode gives back!
REVENUE SPLIT

$
FREE USERS
OPEN SOURCE

€
$
PREMIUM USERS
PROPRIETARY CODE

www.biicode.com Nov-13
THANK YOU!

www.biicode.com
36

www.biicode.com Nov-13
Upcoming SlideShare
Loading in …5
×

C++ code reuse with biicode

951 views

Published on

Biicode is a new tool that allows to easily reuse source code in your projects

Published in: Technology
  • Be the first to comment

C++ code reuse with biicode

  1. 1. “Los programadores de C++ somos los peores en reutilización de código” (said by) Bjarne Stroustrup (in talk in) Carlos III 1 www.biicode.com Nov-13
  2. 2. OpenCV www.biicode.com Nov-13
  3. 3. The CImg Library www.biicode.com Nov-13
  4. 4. Box2D, Google GTest www.biicode.com Nov-13
  5. 5. Win, Linux, Mac… www.biicode.com Nov-13
  6. 6. using std::cpp Univ. Carlos III, 26-Nov-13 6 www.biicode.com Nov-13
  7. 7. Biicode setup • CMake: – Visual, Eclipse – VC, Mingw, gcc www.biicode.com Nov-13
  8. 8. Hello Bii! (jdaniel) $ bii new hello jdaniel/hello/main.cpp #include “hello.h” main(){ hello(); } jdaniel/hello/hello.h void hello(); jdaniel/hello/hello.cpp $ bii cpp:run HelloBii! #include “hello.h” void hello(){ cout<<“HelloBii!”<<endl; } www.biicode.com Nov-13
  9. 9. Dependencies Graph jdaniel/hello/hello.h void hello(); #include “hello.h” main(){ hello(); } #include “hello.h” void hello(){ cout<<“HelloBii!”<<endl; } jdaniel/hello/main.cpp jdaniel/hello/hello.cpp www.biicode.com Nov-13
  10. 10. Automate Build CMakeLists.txt jdaniel/hello/hello.h ADD_EXECUTABLE(jdaniel_hello main.cpp hello.cpp) void hello(); #include “hello.h” main(){ hello(); } #include “hello.h” void hello(){ cout<<“HelloBii!”<<endl; } jdaniel/hello/main.cpp jdaniel/hello/hello.cpp www.biicode.com Nov-13
  11. 11. Publish $ bii publish tag: STABLE msg: my hello No empaquetado No binarios No librerias No configuration www.biicode.com Nov-13
  12. 12. Reuse & Play lguerrero/chat/chat.h (lguerrero) $ bii new chat #include “jdaniel/hello/hello.h” void chat(){ hello(); hello(); } lguerrero/chat/main.cpp $ bii find $ bii cpp:run HelloBii! HelloBii! #include “chat.h” main(){ chat(); } www.biicode.com Nov-13
  13. 13. Find & Get DEP SRC #include “jdaniel/hello/hello.h” void chat(){ hello(); hello(); } lguerrero/chat/chat.h #include “chat.h” main(){ chat(); } jdaniel/hello/hello.h void hello(); #include “hello.h” void hello(){ cout<<“HelloBii!”<<endl; } jdaniel/hello/hello.cpp lguerrero/chat/main.cpp www.biicode.com Nov-13
  14. 14. CMakeLists.txt Build ADD_LIBRARY(jdaniel_hello hello.cpp) ADD_EXECUTABLE(lguerrero_chat main.cpp) TARGET_LINK_LIBRARIES(lguerrero_chat jdaniel_hello) DEP SRC #include “jdaniel/hello/hello.h” void chat(){ hello(); hello(); } lguerrero/chat/chat.h #include “chat.h” main(){ chat(); } jdaniel/hello/hello.h void hello(); #include “hello.h” void hello(){ cout<<“HelloBii!”<<endl; } jdaniel/hello/hello.cpp lguerrero/chat/main.cpp www.biicode.com Nov-13
  15. 15. Publish $ bii publish www.biicode.com Nov-13
  16. 16. Reuse & Play (mark) $ bii new faisbuk $ bii find $ bii cpp:run HelloBii! HelloBii! #include “lguerrero/chat/chat.h” main(){ chat(); } mark/faisbuk/main.cpp www.biicode.com Nov-13
  17. 17. More sleep #include <google/gtest/gtest.h> www.biicode.com Nov-13
  18. 18. DRY (but not CtrlC, CtrlV) www.biicode.com Nov-13
  19. 19. Dep Versions 0 1 $ bii publish tag: STABLE msg: wow! jdaniel/hello #include “hello.h” void hello(){ cout<<“Bii rocks!”<<endl; } jdaniel/hello/hello.cpp www.biicode.com Nov-13
  20. 20. Update (lguerrero) $ cd chat $ bii find --update $ bii cpp:run Bii rocks! Bii rocks! www.biicode.com Nov-13
  21. 21. Find (rules) default: - block: . - [branch.name == "master" and branch.user == block.user, tag==STABLE, 1] - tag>=ALPHA - v>3 and v<8 - block: “jdaniel/hello” www.biicode.com Nov-13
  22. 22. Compatibility (file level) jdaniel/hello 0 0 1 0 diego/bot lguerrero/chat www.biicode.com Nov-13
  23. 23. CSP (combinatory) M1 Mngr.h (0) M2 Mngr.h (1) #include “Mngr.h” M3 Mngr.h (2) B1 G Pang.h (0) Ball.h (0) B2 Ball.h (1) #include “Ball.h” www.biicode.com Nov-13
  24. 24. Data Files $ bii new hello (src/jdaniel/hello) jdaniel/hello/main.cpp #include “hello.h” main(){ hello(); } jdaniel/hello/hello.h void hello(); jdaniel/hello/hello.txt Hello Bii! jdaniel/hello/hello.cpp $ bii cpp:run > HelloBii! #include “hello.h” //bii://jdaniel/hello/hello.txt void hello(){ f(“jdaniel/hello/hello.txt”)>>msg; cout<<msg<<endl; } www.biicode.com Nov-13
  25. 25. Build Rules $ bii new hello (src/jdaniel/hello) jdaniel/hello/main.cpp #include “hello.h” main(){ hello(); } jdaniel/hello/hello.h void hello(); jdaniel/hello/cpp_rules.bii target.std=“c++11” jdaniel/hello/hello.cpp $ bii cpp:run > HelloBii! #include “hello.h” //bii://jdaniel/hello/cpp_rules.bii void hello(){ auto msg = “HelloBii!”; cout<<msg<<endl; } www.biicode.com Nov-13
  26. 26. Config Rules $ bii new hello (src/jdaniel/hello) jdaniel/hello/nix/hello.cpp #include “hello.h” void hello(){ cout<< “HelloBii *nix!”<<endl; } jdaniel/hello/bii/virtual.bii if os.family != “Windows”: return nix else: return win jdaniel/hello/win/hello.cpp $ bii cpp:run > HelloBii win! #include “hello.h” void hello(){ cout<< “HelloBii win!”<<endl; } www.biicode.com Nov-13
  27. 27. Collaborate (lguerrero) $ cd chat $ bii open jdaniel/hello jdaniel/hello/hello.cpp #include “hello.h” void hello(){ cout<<“Bii super rocks!”<<endl; } $ bii cpp:run Bii super rocks! Bii super rocks! $ bii publish hello branch: newMsg jdaniel/hello (jdaniel/master): #1 ( /master): jdaniel/hello (lguerrero/newmsg): #0 lguerrero/chat www.biicode.com Nov-13
  28. 28. The Web www.biicode.com Nov-13
  29. 29. Real Use Accounting www.biicode.com Nov-13
  30. 30. Current status www.biicode.com Nov-13
  31. 31. Beta 1 month www.biicode.com Nov-13
  32. 32. Roadmap • Private • Accounting • Other languages (Python, Node, Fortran) – “Its kind of loony tunes that PyPI, RubyGems, CPAN, NPM are all separate systems” A. Gaynor (yesterday) • RaspberryPI • Other languages integration(python + c) • Challenges: – Scalability, robustness, security www.biicode.com Nov-13
  33. 33. Community Beta • YES: – Zlib, box2d, little_cms, crypto, freeglut, eigen, csparse, gtest, gmock • NO: – Boost (binary ongoing, git?) – OpenCV (src ongoing) – WxWidgets (binary experimental, src ongoing) • FEW: – Docs, tutorials – Google help – Usability • EXPERIMENTAL: – Merge – Git www.biicode.com Nov-13
  34. 34. Why Biicode? • SOLVE PROBLEMS – 3 hours => 0s for the whole world – Every single file counts • Opportunity to lead the change www.biicode.com Nov-13
  35. 35. Biicode gives back! REVENUE SPLIT $ FREE USERS OPEN SOURCE € $ PREMIUM USERS PROPRIETARY CODE www.biicode.com Nov-13
  36. 36. THANK YOU! www.biicode.com 36 www.biicode.com Nov-13

×