mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 07:26:51 +03:00
Merge branch 'test' of github.com:urbit/urbit into test
This commit is contained in:
commit
f61925009f
14
Makefile
14
Makefile
@ -327,9 +327,6 @@ V_OFILES=\
|
||||
MAIN_FILE =\
|
||||
vere/main.o
|
||||
|
||||
MEME_FILE =\
|
||||
tests/test.o
|
||||
|
||||
VERE_OFILES=\
|
||||
$(CRE2_OFILES) \
|
||||
$(OUT_OFILES) \
|
||||
@ -337,12 +334,6 @@ VERE_OFILES=\
|
||||
$(MAIN_FILE) \
|
||||
$(V_OFILES)
|
||||
|
||||
MEME_OFILES=\
|
||||
$(CRE2_OFILES) \
|
||||
$(OUT_OFILES) \
|
||||
$(BASE_OFILES) \
|
||||
$(MEME_FILE)
|
||||
|
||||
VERE_DFILES=$(VERE_OFILES:%.o=.d/%.d)
|
||||
|
||||
-include $(VERE_DFILES)
|
||||
@ -388,7 +379,6 @@ all: urbit
|
||||
@echo "# Set custom configuration here, please!" > ".make.conf"
|
||||
|
||||
urbit: $(BIN)/urbit
|
||||
meme: $(BIN)/meme
|
||||
|
||||
$(LIBUV_MAKEFILE) $(LIBUV_MAKEFILE2):
|
||||
cd outside/libuv_0.11 ; sh autogen.sh ; ./configure --disable-dtrace
|
||||
@ -445,10 +435,6 @@ $(BIN)/urbit: $(LIBCRE) $(LIBCOMMONMARK) $(VERE_OFILES) $(LIBUV) $(LIBRE2) $(LIB
|
||||
@$(CLD) $(CLDOSFLAGS) -o $(BIN)/urbit $(VERE_OFILES) $(LIBUV) $(LIBCRE) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT) $(LIBSOFTFLOAT)
|
||||
endif
|
||||
|
||||
$(BIN)/meme: $(LIBCRE) $(LIBCOMMONMARK) $(MEME_OFILES) $(LIBUV) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT) $(LIBSOFTFLOAT)
|
||||
mkdir -p $(BIN)
|
||||
$(CLD) $(CLDOSFLAGS) -o $(BIN)/meme $(MEME_OFILES) $(LIBUV) $(LIBCRE) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT) $(LIBSOFTFLOAT)
|
||||
|
||||
tags:
|
||||
ctags -R -f .tags --exclude=root
|
||||
|
||||
|
59
README.md
59
README.md
@ -1,11 +1,15 @@
|
||||
urbit
|
||||
=====
|
||||
|
||||
urbit is a new programming and execution environment designed from
|
||||
scratch.
|
||||
Urbit is a new computing environment designed from scratch.
|
||||
|
||||
At present urbit is under heavy development. If you're interested in
|
||||
keeping in touch or following the project you can:
|
||||
At present urbit is under heavy development. It's not useful for
|
||||
any external purpose. Documentation is completely inadequate.
|
||||
Anyone can use the interpreter, of course, but the network is
|
||||
invitation-only.
|
||||
|
||||
If you're interested in keeping in touch or following the project
|
||||
you can:
|
||||
|
||||
- Enter your email address at [urbit.org](http://urbit.org).
|
||||
- Subscribe to the
|
||||
@ -14,22 +18,19 @@ keeping in touch or following the project you can:
|
||||
- Follow [@urbit_](https://twitter.com/urbit\_) on Twitter.
|
||||
- Get in touch with us via email, <urbit@urbit.org>
|
||||
|
||||
All of the source code is distributed under the MIT license, but is for
|
||||
all intents and purposes in the public domain.
|
||||
All of the source code is distributed under the MIT license.
|
||||
|
||||
Pacakges
|
||||
Packages
|
||||
--------
|
||||
|
||||
#### Ubuntu or Debian
|
||||
|
||||
Third-party pacakge files are maintained at https://github.com/yebyen/urbit-deb. Urbit is only supported on Jessie onward.
|
||||
Third-party package files are maintained at https://github.com/yebyen/urbit-deb. Urbit is only supported on Jessie onward.
|
||||
|
||||
#### OS X - Homebrew
|
||||
|
||||
brew install --HEAD homebrew/head-only/urbit
|
||||
|
||||
If this succeeds, proceed to the [Run section](#run). Otherwise, the build must be done manually:
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
urbit depends on:
|
||||
@ -95,27 +96,29 @@ Just run `make`:
|
||||
|
||||
(On FreeBSD, use `gmake` instead.)
|
||||
|
||||
Run <a id="run"/>
|
||||
Run (with a network invitation)
|
||||
---
|
||||
|
||||
Inside of the `urbit` directory run
|
||||
If you have a planet named `~fintud-macrep` and a ticket
|
||||
`~fortyv-tombyt-tabsen-sonres`, run
|
||||
|
||||
bin/urbit -c pier
|
||||
bin/urbit -w fintud-macrep -t fortyv-tombyt-tabsen-sonres
|
||||
|
||||
where `pier` is a directory that does not exist.
|
||||
Your pier (all Urbit state, log and checkpoint) will be in
|
||||
`./fintud-macrep`. To restart Urbit:
|
||||
|
||||
All your state (an append-only log and a memory checkpoint) will live in
|
||||
this directory. The name of your pier doesn't matter and is not visible
|
||||
internally.
|
||||
bin/urbit fintud-macrep
|
||||
|
||||
Begin
|
||||
-----
|
||||
Run (without a network invitation)
|
||||
---
|
||||
|
||||
To begin a 32-bit planet use
|
||||
Run
|
||||
|
||||
|begin
|
||||
bin/urbit -c mypier
|
||||
|
||||
which will guide you through the setup process.
|
||||
Urbit will create a comet in `mypier`. To restart:
|
||||
|
||||
bin/urbit mypier
|
||||
|
||||
Basics
|
||||
------
|
||||
@ -137,6 +140,8 @@ turned it off.
|
||||
Talk
|
||||
----
|
||||
|
||||
If you're on the network, you can use its most basic application, `talk`.
|
||||
|
||||
If `talk` is not running, start it with `*talk` from the task manager.
|
||||
|
||||
Use `^x` to switch to the `talk` prompt and then run
|
||||
@ -145,16 +150,12 @@ Use `^x` to switch to the `talk` prompt and then run
|
||||
|
||||
to join the `urbit-meta` channel. People in there are helpful.
|
||||
|
||||
There are four main `talk` commands:
|
||||
There are three main `talk` commands:
|
||||
|
||||
;join ~urbit-name/channel
|
||||
|
||||
`;join` subscribes your main feed to a remote channel.
|
||||
|
||||
;create channel %name 'description'
|
||||
|
||||
`;create` creates a channel on your urbit.
|
||||
|
||||
;<number>
|
||||
|
||||
`;<number>` activates a previous message number, like a URL that got
|
||||
@ -168,7 +169,7 @@ for a private message.
|
||||
Filesystem Sync
|
||||
---------------
|
||||
|
||||
Our filesystem, `%clay` does not automatically sync to unix. If you want
|
||||
Our filesystem, `%clay`, does not automatically sync to unix. If you want
|
||||
to get files in and out of urbit, you'll need to setup a mount point.
|
||||
Since each mount point is always watching for changes you may also want
|
||||
to unmount from time to time.
|
||||
@ -199,7 +200,7 @@ your urbit and:
|
||||
where pier is the name of your pier.
|
||||
|
||||
While the network is still young from time to time we reboot the entire
|
||||
thing. We call this a 'continuity breach' since we're breaking the
|
||||
universe. We call this a 'continuity breach' since we're breaking the
|
||||
continuity of our crypto.
|
||||
|
||||
When this happens you'll need to back up your data and start a fresh
|
||||
|
48
jets/e/fl.c
48
jets/e/fl.c
@ -89,7 +89,8 @@
|
||||
u3r_mp(a->expWidth, h);
|
||||
|
||||
if ( !(_(u3a_is_cat(d)) && _(u3a_is_cat(e))) ) {
|
||||
mpz_clears(a->minExp, a->expWidth, 0);
|
||||
mpz_clear(a->minExp);
|
||||
mpz_clear(a->expWidth);
|
||||
u3m_bail(c3__exit);
|
||||
}
|
||||
a->rMode = d;
|
||||
@ -160,12 +161,14 @@
|
||||
_noun_to_ea(&c, a);
|
||||
_noun_to_flOptions(&d, b);
|
||||
if ( mpz_sgn(c.a) == 0 ) {
|
||||
mpz_clears(d.minExp, d.expWidth, c.a, c.e, 0);
|
||||
mpz_clear(d.minExp); mpz_clear(d.expWidth);
|
||||
mpz_clear(c.a); mpz_clear(c.e);
|
||||
return u3m_bail(c3__exit);
|
||||
}
|
||||
size_t m = mpz_sizeinbase(c.a, 2);
|
||||
if ( !_(j) && (m <= d.precision) ) {
|
||||
mpz_clears(d.minExp, d.expWidth, c.a, c.e, 0);
|
||||
mpz_clear(d.minExp); mpz_clear(d.expWidth);
|
||||
mpz_clear(c.a); mpz_clear(c.e);
|
||||
return u3m_bail(c3__exit);
|
||||
}
|
||||
c3_w q = 0;
|
||||
@ -175,7 +178,9 @@
|
||||
(mpz_cmp(c.e, d.minExp) < 0) ) {
|
||||
mpz_sub(g, d.minExp, c.e);
|
||||
if ( !mpz_fits_uint_p(g) ) {
|
||||
mpz_clears(g, d.minExp, d.expWidth, c.a, c.e, 0);
|
||||
mpz_clear(g);
|
||||
mpz_clear(d.minExp); mpz_clear(d.expWidth);
|
||||
mpz_clear(c.a); mpz_clear(c.e);
|
||||
return u3m_bail(c3__exit);
|
||||
}
|
||||
q = mpz_get_ui(g);
|
||||
@ -192,19 +197,21 @@
|
||||
c3_t y;
|
||||
switch ( i ) {
|
||||
default:
|
||||
mpz_clears(v, h, g, d.minExp, d.expWidth, c.a, c.e, 0);
|
||||
mpz_clear(v); mpz_clear(h); mpz_clear(g);
|
||||
mpz_clear(d.minExp); mpz_clear(d.expWidth);
|
||||
mpz_clear(c.a); mpz_clear(c.e);
|
||||
return u3m_bail(c3__exit);
|
||||
case c3__fl:
|
||||
case c3__sm:
|
||||
mpz_set_ui(c.a, 0);
|
||||
mpz_set_ui(c.e, 0);
|
||||
mpz_clears(v, h, g, 0);
|
||||
mpz_clear(v); mpz_clear(h); mpz_clear(g);
|
||||
break;
|
||||
case c3__ce:
|
||||
case c3__lg:
|
||||
mpz_set_ui(c.a, 1);
|
||||
mpz_set(c.e, d.minExp);
|
||||
mpz_clears(v, h, g, 0);
|
||||
mpz_clear(v); mpz_clear(h); mpz_clear(g);
|
||||
break;
|
||||
case c3__ne:
|
||||
case c3__nt:
|
||||
@ -217,12 +224,11 @@
|
||||
if ( y ) {
|
||||
mpz_set_ui(c.a, 0);
|
||||
mpz_set_ui(c.e, 0);
|
||||
mpz_clears(v, h, g, 0);
|
||||
} else {
|
||||
mpz_set_ui(c.a, 1);
|
||||
mpz_set(c.e, d.minExp);
|
||||
mpz_clears(v, h, g, 0);
|
||||
}
|
||||
mpz_clear(v); mpz_clear(h); mpz_clear(g);
|
||||
break;
|
||||
}
|
||||
goto end;
|
||||
@ -231,7 +237,9 @@
|
||||
switch ( i ) {
|
||||
c3_ws x;
|
||||
default:
|
||||
mpz_clears(v, h, g, d.minExp, d.expWidth, c.a, c.e, 0);
|
||||
mpz_clear(v); mpz_clear(h); mpz_clear(g);
|
||||
mpz_clear(d.minExp); mpz_clear(d.expWidth);
|
||||
mpz_clear(c.a); mpz_clear(c.e);
|
||||
return u3m_bail(c3__exit);
|
||||
case c3__fl:
|
||||
break;
|
||||
@ -288,16 +296,18 @@
|
||||
}
|
||||
if ( mpz_sgn(c.a) == 0 ) {
|
||||
mpz_set_ui(c.e, 0);
|
||||
mpz_clears(v, h, g, 0);
|
||||
mpz_clear(v); mpz_clear(h); mpz_clear(g);
|
||||
goto end;
|
||||
}
|
||||
mpz_set(g, d.minExp);
|
||||
mpz_add(g, g, d.expWidth);
|
||||
if ( (d.eMode != c3__i) && (mpz_cmp(g, c.e) < 0) ) {
|
||||
mpz_clears(v, h, g, d.minExp, d.expWidth, c.a, c.e, 0);
|
||||
mpz_clear(v); mpz_clear(h); mpz_clear(g);
|
||||
mpz_clear(d.minExp); mpz_clear(d.expWidth);
|
||||
mpz_clear(c.a); mpz_clear(c.e);
|
||||
return u3nc(c3__i, c3y);
|
||||
}
|
||||
mpz_clears(v, h, g, 0);
|
||||
mpz_clear(v); mpz_clear(h); mpz_clear(g);
|
||||
|
||||
// all mpz except in c, d structures cleared; c contains result
|
||||
end:
|
||||
@ -308,7 +318,7 @@
|
||||
}
|
||||
}
|
||||
u3_noun ret = u3nq(c3__f, c3y, u3k(_mp_to_satom(c.e)), u3k(u3i_mp(c.a)));
|
||||
mpz_clears(d.minExp, d.expWidth, 0);
|
||||
mpz_clear(d.minExp); mpz_clear(d.expWidth);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -332,12 +342,14 @@
|
||||
_noun_to_ea(&c, a);
|
||||
_noun_to_flOptions(&d, b);
|
||||
if ( mpz_sgn(c.a) == 0 ) {
|
||||
mpz_clears(d.minExp, d.expWidth, c.a, c.e, 0);
|
||||
mpz_clear(d.minExp); mpz_clear(d.expWidth);
|
||||
mpz_clear(c.a); mpz_clear(c.e);
|
||||
u3m_bail(c3__exit);
|
||||
}
|
||||
_xpd(&c, &d);
|
||||
if ( !mpz_fits_sint_p(c.e) ) {
|
||||
mpz_clears(d.minExp, d.expWidth, c.a, c.e, 0);
|
||||
mpz_clear(d.minExp); mpz_clear(d.expWidth);
|
||||
mpz_clear(c.a); mpz_clear(c.e);
|
||||
u3m_bail(c3__exit);
|
||||
}
|
||||
mpz_t r, s, m, i, j, u, o;
|
||||
@ -398,7 +410,9 @@
|
||||
mpz_add(o, o, u);
|
||||
}
|
||||
mpz_set(c.a, o);
|
||||
mpz_clears(r, s, m, i, j, u, o, d.minExp, d.expWidth, 0);
|
||||
mpz_clear(r); mpz_clear(s); mpz_clear(m);
|
||||
mpz_clear(i); mpz_clear(j); mpz_clear(u);
|
||||
mpz_clear(o); mpz_clear(d.minExp); mpz_clear(d.expWidth);
|
||||
|
||||
return _ea_to_noun(&c);
|
||||
}
|
||||
|
15
vere/main.c
15
vere/main.c
@ -163,6 +163,13 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
return c3n;
|
||||
}
|
||||
|
||||
if ( u3_Host.ops_u.tic_c == 0 && u3_Host.ops_u.who_c != 0 ) {
|
||||
c3_c tic_c[29];
|
||||
printf("your ticket: ~");
|
||||
scanf("%28s",tic_c);
|
||||
u3_Host.ops_u.tic_c = _main_presig(tic_c);
|
||||
}
|
||||
|
||||
if ( c3y == u3_Host.ops_u.bat ) {
|
||||
u3_Host.ops_u.dem = c3y;
|
||||
u3_Host.ops_u.nuu = c3y;
|
||||
@ -315,6 +322,14 @@ main(c3_i argc,
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( c3y == u3_Host.ops_u.nuu ) {
|
||||
struct stat s;
|
||||
if ( !stat(u3_Host.dir_c, &s) ) {
|
||||
fprintf(stderr, "used -c but %s already exists\n", u3_Host.dir_c);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
u3_ve_sysopt();
|
||||
|
||||
printf("~\n");
|
||||
|
@ -359,7 +359,10 @@ _unix_scan_mount_point(u3_umon* mon_u)
|
||||
else {
|
||||
if ( '.' != out_u->d_name[len_w]
|
||||
|| '\0' == out_u->d_name[len_w + 1]
|
||||
|| '~' == out_u->d_name[strlen(out_u->d_name) - 1] ) {
|
||||
|| '~' == out_u->d_name[strlen(out_u->d_name) - 1]
|
||||
|| ('#' == out_u->d_name[0] &&
|
||||
'#' == out_u->d_name[strlen(out_u->d_name) - 1])
|
||||
) {
|
||||
free(pax_c);
|
||||
continue;
|
||||
}
|
||||
@ -895,6 +898,8 @@ _unix_update_dir(u3_udir* dir_u)
|
||||
if ( !S_ISDIR(buf_u.st_mode) ) {
|
||||
if ( !strchr(out_u->d_name,'.')
|
||||
|| '~' == out_u->d_name[strlen(out_u->d_name) - 1]
|
||||
|| ('#' == out_u->d_name[0] &&
|
||||
'#' == out_u->d_name[strlen(out_u->d_name) - 1])
|
||||
) {
|
||||
free(pax_c);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user