Difference between revisions of "CodingNight1"

From Fixme.ch
Jump to: navigation, search
(Result)
 
(9 intermediate revisions by 3 users not shown)
Line 7: Line 7:
  
 
* Merge patches and release new version of wiki2beamer
 
* Merge patches and release new version of wiki2beamer
* Pastebin application like sprung but based on flask
+
* Pastebin application like http://sprunge.us/ but based on flask
 
* Adding patch to xchat otr.
 
* Adding patch to xchat otr.
 
* Soundcloud plugin for mpd, should similar to the lastFM plugin.
 
* Soundcloud plugin for mpd, should similar to the lastFM plugin.
Line 26: Line 26:
 
= Result =
 
= Result =
 
* A pastebin app which has the following component
 
* A pastebin app which has the following component
 +
** Runs with python3
 
** a [[http://fallabs.com/kyotocabinet/|kyoto cabinet]] database.
 
** a [[http://fallabs.com/kyotocabinet/|kyoto cabinet]] database.
 
** a api that can be easily adapted for quite any databases.
 
** 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 webinterface (rest and html) using bottle.py
 
** A very raw socket interface with direct access trough telnet.
 
** A very raw socket interface with direct access trough telnet.
  
Line 41: Line 42:
 
*** Summary: although we didn't produce any production ready code, we never the less came up with multiple proof of concepts
 
*** Summary: although we didn't produce any production ready code, we never the less came up with multiple proof of concepts
 
*** Success: ✓
 
*** Success: ✓
 
 
** gcmalloc
 
** gcmalloc
 
*** Easy merging for git branches.
 
*** Easy merging for git branches.
Line 48: Line 48:
 
*** A new way to check my code trough pylint.
 
*** A new way to check my code trough pylint.
 
*** Definition of the project and definition of a simple api.
 
*** Definition of the project and definition of a simple api.
 
 
** Rorist
 
** Rorist
 
*** Python 3 library still hard to find, some changes are kind of tricky (strings/bytes)
 
*** 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)
 
*** 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
 
*** 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
 
*** ...
 
*** ...
 +
** nico_nico
 +
*** zsh arcana
 +
*** Python 3 for web programming. bottle.py works but no support for WSGI: http://www.wsgi.org/en/latest/python3.html
 +
*** etherpad. Works really well for a lot of things: collecting ideas and feature lists, drafting apis
 +
*** Very little friction plugging everybody's code together.
 +
*** Everybody loves netcat, curl, debian and arch, tiling window managers.
 +
*** Back to irc after 15 year hiatus
 +
*** The idiom 'nerd-snipe'
 +
*** Nobody can resist strange japanese projects with cool names (see 'nerd-snipe').
 +
*** Choosing python which everybody knew well together with new frameworks and tools helped learn new things while still staying productive.
 +
*** The 'alpha technologies' and 'debian stable' requirement were completely opposite. We ended-up doing 'alpha technologies'
 +
*** Always wash hands between eating hamburger and coding. Keyboard now smells of onions.
 +
 +
=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>

Latest revision as of 11:35, 12 February 2012

Projects Proposition

The proposed projects are:

  • Merge patches and release new version of wiki2beamer
  • Pastebin application like http://sprunge.us/ 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
    • Runs with python3
    • a [cabinet] database.
    • a api that can be easily adapted for quite any databases.
    • A webinterface (rest and html) using bottle.py
    • 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
      • ...
    • nico_nico
      • zsh arcana
      • Python 3 for web programming. bottle.py works but no support for WSGI: http://www.wsgi.org/en/latest/python3.html
      • etherpad. Works really well for a lot of things: collecting ideas and feature lists, drafting apis
      • Very little friction plugging everybody's code together.
      • Everybody loves netcat, curl, debian and arch, tiling window managers.
      • Back to irc after 15 year hiatus
      • The idiom 'nerd-snipe'
      • Nobody can resist strange japanese projects with cool names (see 'nerd-snipe').
      • Choosing python which everybody knew well together with new frameworks and tools helped learn new things while still staying productive.
      • The 'alpha technologies' and 'debian stable' requirement were completely opposite. We ended-up doing 'alpha technologies'
      • Always wash hands between eating hamburger and coding. Keyboard now smells of onions.

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>