omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / apps / interplane-forge / store / moving.om
| 1 | note store/moving.om: the one answer of the addresses whose part the store build composes out while |
| 2 | note it moves to the new Interplane store (salvage, community, open, trending; store/mvsalvage.om, |
| 3 | note store/mvcommunity.om, store/mvopen.om, store/mvgrowth.om, composed by run.sh in place of |
| 4 | note server/no<part>.om when FORGE_STORE is set). Status 503 with no Retry-After (no time is promised), |
| 5 | note title "Moving" and the text "This part is moving to the new Interplane store and is not |
| 6 | note available yet." (server/pages.om ferrti, ferrmsg); a JSON request (a .json name, or Accept JSON) |
| 7 | note gets the forge/error/1 document with "reason":"moving" (server/jsonp.om fyerr). The request flag |
| 8 | note fmvng (server/util.om, reset by fresetr) is what tells those words apart from every other 503. |
| 9 | text tmvjs ".json" |
| 10 | note mvans: answer this request as moving; any method |
| 11 | fn mvans to long |
| 12 | put fmvng 0 1 |
| 13 | put fretry 0 0 |
| 14 | if mvjsnm |
| 15 | fyerr 503 |
| 16 | end |
| 17 | ret 503 |
| 18 | end |
| 19 | note mvjsnm: the path ends with ".json" (a JSON name needs no Accept header) |
| 20 | fn mvjsnm to bool |
| 21 | n = get fpathl 0 |
| 22 | m = len tmvjs |
| 23 | if lt n m |
| 24 | ret false |
| 25 | end |
| 26 | for i ulong m |
| 27 | if ne get fpath add sub n m i get tmvjs i |
| 28 | ret false |
| 29 | end |
| 30 | end |
| 31 | ret true |
| 32 | end |
| 33 | note mvunder t: the path is t, or t then "/" and anything |
| 34 | fn mvunder t view uchar * to bool |
| 35 | if not fpre t |
| 36 | ret false |
| 37 | end |
| 38 | if eq get fpathl 0 len t |
| 39 | ret true |
| 40 | end |
| 41 | ret eq get fpath len t 47 |
| 42 | end |