Giter Site home page Giter Site logo

urbit-ob's Introduction

Urbit

Urbit is a personal server stack built from scratch. It has an identity layer (Azimuth), virtual machine (Vere), and operating system (Arvo).

A running Urbit "ship" is designed to operate with other ships peer-to-peer. Urbit is a general-purpose, peer-to-peer computer and network.

This repository contains the Arvo Kernel

For the Runtime, see Vere. For more on the identity layer, see Azimuth. To manage your Urbit identity, use Bridge.

Install

To install and run Urbit, please follow the instructions at urbit.org/getting-started. You'll be on the live network in a few minutes.

Contributing

Contributions of any form are more than welcome! Please take a look at our contributing guidelines for details on our git practices, coding styles, and how we manage issues.

You might also be interested in joining the urbit-dev mailing list.

Release

For details about our release process, see the maintainers guidelines

urbit-ob's People

Contributors

dependabot[bot] avatar evening avatar fang- avatar g-a-v-i-n avatar jtobin avatar matildepark avatar vvisigoth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

urbit-ob's Issues

patp(null) hangs and crashes

I discovered this on a web app that was hanging badly, I did the following in both node 10 and 12:

$ node
> u = require('urbit-ob')
> u.patp(null)

<--- Last few GCs --->

[7749:0x3a0a870]    16842 ms: Mark-sweep 1397.4 (1425.9) -> 1397.5 (1430.4) MB, 1075.6 / 0.0 ms  (+ 0.1 ms in 361 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1132 ms) (average mu = 0.201, current mu = 0.083) allocati[7749:0x3a0a870]
 17953 ms: Mark-sweep 1403.4 (1430.4) -> 1403.4 (1435.9) MB, 1107.6 / 0.0 ms  (average mu = 0.112, current mu = 0.003) allocation failure scavenge might not succeed


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x2a687155be1d]
    1: StubFrame [pc: 0x2a687155d1df]
Security context: 0x10c72d49e6e9 <JSObject>
    2: toString [0x3c462b5391] [/<redacted>/node_modules/bn.js/lib/bn.js:~429] [pc=0x2a6871561feb](this=0x0576c2217fc9 <BN map = 0x3df1406661d1>,base=10,padding=1)
    3: arguments adaptor frame: 0->2
    4: InternalFrame [pc: 0x2a687150ee75]
    5: EntryFrame [pc: 0x2a68715092c1]
    6: ExitFrame [pc: 0x2a6...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x8dc510 node::Abort() [node]
 2: 0x8dc55c  [node]
 3: 0xad9b5e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xad9d94 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xec7bf2  [node]
 6: 0xec7cf8 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [node]
 7: 0xed3dd2 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
 8: 0xed4704 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xed7371 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [node]
10: 0xea07f4 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [node]
11: 0x114018e v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [node]
12: 0x2a687155be1d
Aborted (core dumped)

Also:

> u.patp(NaN)
'~zod'
> u.patp(undefined)
'~zod'

patq produces a normal error:

> u.patq(undefined)
'~zod'
> u.patq(NaN)
'~zod'
> u.patq(null)
TypeError: Cannot read property '-1' of null

Utility functions (clan, sein) don't support numbers as arguments

TypeError: name.replace is not a function
    at patp2syls (/urbit-ob/src/internal/co.js:56:8)
    at isValidPat (/urbit-ob/src/internal/co.js:366:16)
    at patp2hex (/urbit-ob/src/internal/co.js:144:7)
    at patp2bn (/urbit-ob/src/internal/co.js:181:10)
    at clan (/urbit-ob/src/internal/co.js:318:16)
    at Object.sein (/urbit-ob/src/internal/co.js:338:15)

I might just dive in and patch this up myself tomorrow, but @jtobin might not want me kicking up dirt all over his codebase. (;

Publish 4.0.0 to npm

Going to wait until arvo catches up to ensure this doesn't need any more changes.

@p -> bn.js

We support bn.js -> patp, but it would also be nice to have the inverse too.

It's not an immediately pressing requirement because patp can obviously be decoded in Hoon. But nonetheless, nice to have -- even if just for testing purposes.

(Edited so as to stop tagging the poor fellow with GitHub username 'p').

Better error reporting

We do a lot of throwing, but less catching. Errors could be made more useful by doing that.

Misc maintenance

This library has more or less become a collection of assorted name-conversion utilities -- certainly beyond that found in ++ob -- and could stand to be restructured, probably renamed, and polished up more generally.

Not exactly high priority, but something to do when there's a moment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.