Difference between revisions of "CodingNight1"

From Fixme.ch
Jump to: navigation, search
(dump etherpad)
(formatting for dump)
Line 56: Line 56:
  
 
=Etherpad Dump=
 
=Etherpad Dump=
1Goal  
+
<verbatim>
Developing an easy to install and maintain distributed server for pasting contents.
+
1Goal  
GRADING:
+
Developing an easy to install and maintain distributed server for pasting contents.
1 to 3  
+
GRADING:
Rate features 1-3: 3 is must, 2 is nice to have, 1 is meh
+
1 to 3  
2Interfaces
+
Rate features 1-3: 3 is must, 2 is nice to have, 1 is meh
111231- Irc hook, irc bot
+
2Interfaces
3233333 - Put paste with curl, retrieve them with netcat or curl , possibility to retrieve metadata with the paste.
+
111231- Irc hook, irc bot
2312203 - Nice webinterface
+
3233333 - Put paste with curl, retrieve them with netcat or curl , possibility to retrieve metadata with the paste.
3Features
+
2312203 - Nice webinterface
111331- FUCKING ALPHA TECHNOLOGIES !! (languages: D, lua, bash, haskell; storage: rdf; constraints: single source-file)
+
3Features
333333- KISS
+
111331- FUCKING ALPHA TECHNOLOGIES !! (languages: D, lua, bash, haskell; storage: rdf; constraints: single source-file)
333333- Simple installation
+
333333- KISS
333333- Simple configuration, and maintenance.
+
333333- Simple installation
121111- expandable with modules ?
+
333333- Simple configuration, and maintenance.
3333333- utf-8 for the crowd for !!!!  
+
121111- expandable with modules ?
232333- Write once pastes (no future modifications) with expiration
+
3333333- utf-8 for the crowd for !!!!  
132331- Metadata, link paste to each other
+
232333- Write once pastes (no future modifications) with expiration
1112011- General Data storage (Image Vids ...)
+
132331- Metadata, link paste to each other
311111- Programming language detection
+
1112011- General Data storage (Image Vids ...)
3113121- Searchable pastebin
+
311111- Programming language detection
2323323- Simple API
+
3113121- Searchable pastebin
112121- Easy remembered paste
+
2323323- Simple API
133033- Named paste
+
112121- Easy remembered paste
12202- Private material (protected to a range of user)
+
133033- Named paste
2332323- One time access pastebin
+
12202- Private material (protected to a range of user)
3333333 - No guarantees on data
+
2332323- One time access pastebin
333313 - default expiration time
+
3333333 - No guarantees on data
111121 - General stats
+
333313 - default expiration time
1131 - Similarity detection
+
111121 - General stats
1212023 - Automatic and easy testing (Jenkins)
+
1131 - Similarity detection
Counting Votes Script
+
1212023 - Automatic and easy testing (Jenkins)
http://sprunge.us/agCI
+
Counting Votes Script
http://sprunge.us/ejMV
+
http://sprunge.us/agCI
Api :
+
http://sprunge.us/ejMV
Git repository:
+
Api :
git clone ssh://gitolite@foo.fixme.ch:1337/pastebin
+
Git repository:
PASTEBINLIB:
+
git clone ssh://gitolite@foo.fixme.ch:1337/pastebin
api
+
PASTEBINLIB:
// Option 1 (with soft meta)
+
api
retrieve(uid[, with_metadata]) -> content, [meta]
+
// Option 1 (with soft meta)
post(utf8-text, [[timeout], **meta_dict]) -> uid
+
retrieve(uid[, with_metadata]) -> content, [meta]
make_paste_link(uid_list[, meta_dict]) -> meta_dict
+
post(utf8-text, [[timeout], **meta_dict]) -> uid
// Alternative (no soft meta)
+
make_paste_link(uid_list[, meta_dict]) -> meta_dict
post(utf8-text, [**expiry_policy], [**timeout], [**prefered_uid], [**linked_uid_list]) -> uid
+
// Alternative (no soft meta)
'(expiry_policy is one of NEVER, AFTER_READ)
+
post(utf8-text, [**expiry_policy], [**timeout], [**prefered_uid], [**linked_uid_list]) -> uid
Example: post("def foo(): print 'hello'", expriry_policy=AFTER_READ, timeout=5, prefered_uid="foo", linked_uid_list=["bar", "baz"])
+
'(expiry_policy is one of NEVER, AFTER_READ)
retrieve(uid) -> utf8-text
+
Example: post("def foo(): print 'hello'", expriry_policy=AFTER_READ, timeout=5, prefered_uid="foo", linked_uid_list=["bar", "baz"])
get_creation_timestamp(uid) -> timestamp
+
retrieve(uid) -> utf8-text
get_linked(uid) -> uids
+
get_creation_timestamp(uid) -> timestamp
web client
+
get_linked(uid) -> uids
- WSGI is a apparently a nogo with Python 3, spec is ready but not implemented
+
web client
Syntax rule
+
- WSGI is a apparently a nogo with Python 3, spec is ready but not implemented
module name all lower case, no underscore all appended
+
Syntax rule
example  
+
module name all lower case, no underscore all appended
in  
+
example  
caca.py
+
in  
class GrosCacaca(Process): #camel  
+
caca.py
 
+
class GrosCacaca(Process): #camel  
    def __init__(self): #4 space indentation all lowercase
+
 
+
    def __init__(self): #4 space indentation all lowercase
    #all variable are lowercase
+
 
+
    #all variable are lowercase
    self.kaka = "I love string anyway" #string should be as the C defined it '
+
 
+
    self.kaka = "I love string anyway" #string should be as the C defined it '
    def _poo(self, today=True): #defined as private method (no obligation to do this)
+
 
+
    def _poo(self, today=True): #defined as private method (no obligation to do this)
    pass
+
 +
    pass
 +
</verbatim>

Revision as of 19:07, 11 February 2012

Projects Proposition

The proposed projects are:

  • Merge patches and release new version of wiki2beamer
  • Pastebin application like sprung but based on flask
  • Adding patch to xchat otr.
  • Soundcloud plugin for mpd, should similar to the lastFM plugin.
  • Android app:
    • Record time slept.
    • Ssh remote (multimedia key, slide remote)
    • read only for etherpad formats
    • LDAP search
  • little game:
    • little to no graphic at all (sound driven game, or touch driven game)
    • platform game with open source sprite

Goal

  • Create a minimal pastebin

Result

  • A pastebin app which has the following component
    • a [cabinet] database.
    • a api that can be easily adapted for quite any databases.
    • A webinterface using flask (python 2.7), and another using the http.server module
    • A very raw socket interface with direct access trough telnet.
  • We learnt alot about:
    • esc
      • Python3 -- How to target this platform, available libraries and frameworks
      • Crazy high-performance Japanese database applications
      • Raw socket programming
      • Web-frameworks programming
      • Group dynamics during a coding-night
      • Also, adding more french vocab to my arsenal
      • Summary: although we didn't produce any production ready code, we never the less came up with multiple proof of concepts
      • Success: ✓
    • gcmalloc
      • Easy merging for git branches.
      • Two japanese brothers with funny names.
      • Refreshing my socket programming fu.
      • A new way to check my code trough pylint.
      • Definition of the project and definition of a simple api.
    • Rorist
      • Python 3 library still hard to find, some changes are kind of tricky (strings/bytes)
      • It's hard to incorporate everyone in the coding process with different level of programming (Oliv felt a little bit left over)
      • We had very good ideas, but we should have limited our self to the basics
      • I'm a slow thinker, sometimes hard to follow speedy gcmalloc and esc :)
      • Met a nice guy (coming from techup.ch) who had nice ideas and acted as some sort of complement project manager
      • ...

Etherpad Dump

<verbatim>
1Goal 
Developing an easy to install and maintain distributed server for pasting contents.
GRADING:
1 to 3 
Rate features 1-3: 3 is must, 2 is nice to have, 1 is meh
2Interfaces
111231- Irc hook, irc bot
3233333 - Put paste with curl, retrieve them with netcat or curl , possibility to retrieve metadata with the paste.
2312203 - Nice webinterface
3Features
111331- FUCKING ALPHA TECHNOLOGIES !! (languages: D, lua, bash, haskell; storage: rdf; constraints: single source-file)
333333- KISS
333333- Simple installation
333333- Simple configuration, and maintenance.
121111- expandable with modules ?
3333333- utf-8 for the crowd for !!!! 
232333- Write once pastes (no future modifications) with expiration
132331- Metadata, link paste to each other
1112011- General Data storage (Image Vids ...)
311111- Programming language detection
3113121- Searchable pastebin
2323323- Simple API
112121- Easy remembered paste
133033- Named paste
12202- Private material (protected to a range of user)
2332323- One time access pastebin
3333333 - No guarantees on data
333313 - default expiration time
111121 - General stats
1131 - Similarity detection
1212023 - Automatic and easy testing (Jenkins)
Counting Votes Script
http://sprunge.us/agCI
http://sprunge.us/ejMV
Api :
Git repository:
git clone ssh://gitolite@foo.fixme.ch:1337/pastebin
PASTEBINLIB:
api
// Option 1 (with soft meta)
retrieve(uid[, with_metadata]) -> content, [meta]
post(utf8-text, [[timeout], **meta_dict]) -> uid
make_paste_link(uid_list[, meta_dict]) -> meta_dict
// Alternative (no soft meta)
post(utf8-text, [**expiry_policy], [**timeout], [**prefered_uid], [**linked_uid_list]) -> uid
'(expiry_policy is one of NEVER, AFTER_READ)
Example: post("def foo(): print 'hello'", expriry_policy=AFTER_READ, timeout=5, prefered_uid="foo", linked_uid_list=["bar", "baz"])
retrieve(uid) -> utf8-text
get_creation_timestamp(uid) -> timestamp
get_linked(uid) -> uids
web client
- WSGI is a apparently a nogo with Python 3, spec is ready but not implemented
Syntax rule
module name all lower case, no underscore all appended
example 
in 
caca.py
class GrosCacaca(Process): #camel 

    def __init__(self): #4 space indentation all lowercase

    #all variable are lowercase

    self.kaka = "I love string anyway" #string should be as the C defined it '

    def _poo(self, today=True): #defined as private method (no obligation to do this)

    pass
</verbatim>