Changes

Jump to: navigation, search

CodingNight1

3,640 bytes added, 10:35, 12 February 2012
/* Result */
* Merge patches and release new version of wiki2beamer
* Pastebin application like sprung http://sprunge.us/ but based on flask
* Adding patch to xchat otr.
* Soundcloud plugin for mpd, should similar to the lastFM plugin.
= Result =
* A pastebin app which has the following component
** Runs with python3
** a [[http://fallabs.com/kyotocabinet/|kyoto cabinet]] database.
** a api that can be easily adapted for quite any databases.
** A webinterface using flask (python 2.7rest and html), and another using the httpbottle.server modulepy
** A very raw socket interface with direct access trough telnet.
*** 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)
*** 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>
6
edits