<commit_before>
* Development

This section discuss the internals of fnx, intended for developers.

** History management

*** What we want

**** Browser back button should works as expected

For example navigating in a ns, and then going back should bring the previous ns.

**** Bookmarking a namespace

For example: 
- Navigate to the ns =foo/bar/= 
- Bookmark it
- Then when opening a new page with the bookmark should display the
  content of =foo/bar/=.

**** Bookmarking functions

Same as below but with functions.

**** Bookmarking functions with arguments

For example: 
- Navigate to a fn
- Fill the parameter
- Bookmark the page
- Open a new page with the bookmark
- Then the page should display the function form with the fields
  populated with the same values than when bookmarking

**** Bookmarking functions with partially filled arguments

Same as below, but should also works with partially filled arguments.

*Implementation details:* Could be implemented by listening to the
=blur= event of text fields and updating the URL accordingly.

**** Bookmarking functions calls

For example: 
- Navigate to the fn =foo/bar/hello-world=, which is a function that
  takes a single parameter =name=.
- Fill the =name= field with =john=.
- Hit the =run= button: The result of the function is displayed:
  =Hello, john=.
- Bookmark the page
- Then when opening a new page with the bookmark should display
  "Hello, john=, as well at the form of the function with the field
  =name= populated with the value =john=.

*** Solution

All the functionalities described below could be implemented by using
the history management capability of ClojureScript One.

That is using the web browser address bar to save the state that we
want to restore later.

**** Informations to serialize


The app could be in the following "states" (activities): 
- navigating ns: =ns-navigating=
- display fn form: =fn-form-displaying=
- run fn: =fn-running=

| state              | necessary additionnal informations |
|--------------------+------------------------------------|
| ns-navigating      | current-ns                         |
| fn-form-displaying | current-fn, fn-args                |
| fn-running         | current-fn, fn-args                |
| fn-result-showing  | fn-result                          |

**** Summary of the state of the app

| state                      | key        | values              | in URL? |
|----------------------------+------------+---------------------+---------|
|                            | state      | ns-navigating,      | yes     |
|                            |            | fn-form-displaying, |         |
|                            |            | fn-running,         |         |
|                            |            | fn-result-showing   |         |
|----------------------------+------------+---------------------+---------|
|                            | current-ns | ns                  | yes     |
|----------------------------+------------+---------------------+---------|
|                            | current-fn | fn                  | yes     |
|----------------------------+------------+---------------------+---------|
|                            | fn-args    | fn args             |         |
|                            |            | (could be           |         |
|                            |            | incomplete)         | yes     |
|----------------------------+------------+---------------------+---------|
|                            | fn-result  | any data clj        |no       |
|                            |            | datastructure       |         |
|----------------------------+------------+---------------------+---------|
| hierarchy of all ns and fn | all-ns     | a map of ns/fn      | no      |
|----------------------------+------------+---------------------+---------|



* notes [%]

** TODO common prefix may be possible if 2 jar start with the same prefix ns
<commit_msg>Add a running development part to show our progress.<commit_after>;; -*- org -*-

* Development
This section discuss the internals of fnx, intended for developers.

** History management
*** What we want

**** Browser back button should works as expected

For example navigating in a ns, and then going back should bring the previous ns.

**** Bookmarking a namespace

For example: 
- Navigate to the ns =foo/bar/= 
- Bookmark it
- Then when opening a new page with the bookmark should display the
  content of =foo/bar/=.

**** Bookmarking functions

Same as below but with functions.

**** Bookmarking functions with arguments

For example: 
- Navigate to a fn
- Fill the parameter
- Bookmark the page
- Open a new page with the bookmark
- Then the page should display the function form with the fields
  populated with the same values than when bookmarking

**** Bookmarking functions with partially filled arguments

Same as below, but should also works with partially filled arguments.

*Implementation details:* Could be implemented by listening to the
=blur= event of text fields and updating the URL accordingly.

**** Bookmarking functions calls

For example: 
- Navigate to the fn =foo/bar/hello-world=, which is a function that
  takes a single parameter =name=.
- Fill the =name= field with =john=.
- Hit the =run= button: The result of the function is displayed:
  =Hello, john=.
- Bookmark the page
- Then when opening a new page with the bookmark should display
  "Hello, john=, as well at the form of the function with the field
  =name= populated with the value =john=.

*** Solution

All the functionalities described below could be implemented by using
the history management capability of ClojureScript One.

That is using the web browser address bar to save the state that we
want to restore later.

**** Informations to serialize


The app could be in the following "states" (activities): 
- navigating ns: =ns-navigating=
- display fn form: =fn-form-displaying=
- run fn: =fn-running=

| state              | necessary additionnal informations |
|--------------------+------------------------------------|
| ns-navigating      | current-ns                         |
| fn-form-displaying | current-fn, fn-args                |
| fn-running         | current-fn, fn-args                |
| fn-result-showing  | fn-result                          |

**** Summary of the state of the app

| state                      | key        | values              | in URL? |
|----------------------------+------------+---------------------+---------|
|                            | state      | ns-navigating,      | yes     |
|                            |            | fn-form-displaying, |         |
|                            |            | fn-running,         |         |
|                            |            | fn-result-showing   |         |
|----------------------------+------------+---------------------+---------|
|                            | current-ns | ns                  | yes     |
|----------------------------+------------+---------------------+---------|
|                            | current-fn | fn                  | yes     |
|----------------------------+------------+---------------------+---------|
|                            | fn-args    | fn args             |         |
|                            |            | (could be           |         |
|                            |            | incomplete)         | yes     |
|----------------------------+------------+---------------------+---------|
|                            | fn-result  | any data clj        |no       |
|                            |            | datastructure       |         |
|----------------------------+------------+---------------------+---------|
| hierarchy of all ns and fn | all-ns     | a map of ns/fn      | no      |
|----------------------------+------------+---------------------+---------|


* Running development [33%]
** TODO Client side [83%]
*** DONE Learn the inner working of one
CLOSED: [2012-03-31 sam. 20:48]
*** DONE Checkout one
CLOSED: [2012-03-31 sam. 20:48]
*** DONE Init view
CLOSED: [2012-03-31 sam. 20:49]
*** DONE Init model
CLOSED: [2012-03-31 sam. 20:49]
*** DONE Display the list of first level namespaces
CLOSED: [2012-03-31 sam. 20:49]
*** DONE Navigate through namespaces
CLOSED: [2012-03-31 sam. 20:49]
*** DONE Navigate to the upper level of the current namespace
CLOSED: [2012-03-31 sam. 20:49]
*** DONE Display the namespaces and the functions
CLOSED: [2012-03-31 sam. 20:50]
*** DONE Retrieve the metadata of the function and display them via forms (arity)
CLOSED: [2012-03-31 sam. 20:50]
*** DONE Run the function basically
CLOSED: [2012-03-31 sam. 20:52]
*** TODO Beware the order of the argument of the function
*** TODO Edge cases
** TODO Design [0%]
*** TODO Improve css
*** TODO Improve ui
*** TODO Add animations
*** TODO Improve spinner
** DONE Server side [100%]
CLOSED: [2012-03-31 sam. 20:48]
*** DONE Expose functions
CLOSED: [2012-03-31 sam. 20:48]
*** DONE Execute functions
CLOSED: [2012-03-31 sam. 20:48]
*** DONE Extract metadata functions
CLOSED: [2012-03-31 sam. 20:48]

* notes [%]

** TODO common prefix may be possible if 2 jar start with the same prefix ns

{'fraction_non_alphanumeric': 0.2019314236111111, 'fraction_numerical': 0.019314236111111112, 'mean_word_length': 1.3590990529818274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '588503', 'n_tokens_mistral': 2402, 'n_tokens_neox': 2212, 'n_words': 899}