Giter Site home page Giter Site logo

holochain / docs-pages Goto Github PK

View Code? Open in Web Editor NEW
96.0 19.0 27.0 166.86 MB

The hosted static files for the Holochain developer documentation

Home Page: https://developer.holochain.org

License: GNU General Public License v3.0

JavaScript 10.08% CSS 11.43% TypeScript 4.64% Nunjucks 43.59% SCSS 30.26%

docs-pages's Issues

Catalina

I'm opening this issue to investigate getting nix-shell to work on catalina. So far I can't find a working solution. It's not working for @dhtnetwork

Suggesting Edit: Hello Me Tutorial

Page URL: http://developer.holochain.org/docs/tutorials/coreconcepts/hello_me/

Running into some strange compile errors while trying to follow on with this tutorial
CleanShot 2019-11-15 at 22 03 25@2x

And code:

#![feature(proc_macro_hygiene)]
#[macro_use]
extern crate hdk;
extern crate hdk_proc_macros;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
#[macro_use]
extern crate holochain_json_derive;

use hdk::holochain_core_types::{dna::entry_types::Sharing, entry::Entry};
use hdk::holochain_json_api::{error::JsonError, json::JsonString};
use hdk::{entry_definition::ValidatingEntryType, error::ZomeApiResult};
use hdk::holochain_persistence_api::{cas::content::Address};
use hdk_proc_macros::zome;

// see https://developer.holochain.org/api/latest/hdk/ for info on using the hdk library

#[derive(Serialize, Deserialize, Debug, DefaultJson, Clone)]
pub struct Person {
    name: String,
}

#[zome]
mod hello_zome {
    #[init]
    fn init() {
        Ok(())
    }

    #[validate_agent]
    pub fn validate_agent(validation_data: EntryValidationData<AgentId>) {
        Ok(())
    }

    #[zome_fn("hc_public")]
    fn hello_holo() -> ZomeApiResult<String> {
        Ok("Hello Holo".into())
    }

    #[entry_def]
    fn person_entry_def() -> ValidatingEntryType {
        entry!(
            name: "person",
            description: "Person to say hello to",
            sharing: Sharing::Private,
            validation_package: || {
                hdk::ValidationPackageDefinition::Entry
            },
            validation: | _validation_data: hdk::EntryValidationData<Person> {
                Ok(())
            }
        )
    }
    #[zome_fn("hc_public")]
    pub fn create_person(person: Person) -> ZomeApiResult<Address> {
        let entry = Entry::App("person".into(), person.into());
        let address = hdk::commit_entry(&entry)?
        Ok(address)
    }
}

Can we add instructions on how to install a specific versions/releases of "hc" and "holochain"

What is the URL of the page with the issue?

https://developer.holochain.org/start.html - under heading: "Permanently install holochain tools (optional)"

What specific instruction was incorrect, or did not work for you?

As the holochain team releases new versions this creates breaking changes, during the devcamps we will choose to stick to a specific version of holochain and hc and would like this the ability to install specific versions via nix-env

What are the details of your platform?

N/A

Can we modify the holochain install documentation to what is suggested in the image below?
2019-07-24_22-25-00

Confusing explanations about `native_type` in first_steps

What is the URL of the page with the issue?

https://developer.holochain.org/guide/latest/first_steps.html#adding-some-entries

What specific instruction was incorrect, or did not work for you?

Take note of the native_type field of the macro which gives which Rust struct represents the entry type.
(see source)

The example above this line does not contain any native_type field, so I'm very confused and not sure what I should take note of.

Probably the code code updated and not the text or vis-versa?

Suggesting Edit: Install Holochain

Page URL: http://developer.holochain.org/docs/install/
After running the script in Linux, it says:
"Installation finished! To ensure that the necessary environment
variables are set, either log in again, or type

~/.nix-profile/etc/profile.d/nix.sh"

However, nix.sh in this location is not an executable.. the script should chmod +x nix.sh first. And presumably the daemon version also in that directory.

Suggesting Edit: Install Holochain

Page URL: http://developer.holochain.org/docs/install/

Note that if you will be running nix-shell https://holochain.love frequently, you may wish to set an alias, e.g. as instructed on this page.

Note that if you will be running `nix-shell https://holochain.love` frequently, you may wish to set an alias, e.g. as instructed on [this page](https://www.hostingadvice.com/how-to/set-command-aliases-linuxubuntudebian/).

Update Windows Installation Instructions

  • Need to correct in Step 5 for windows: replace: %HOME%/hc with %HOME%\hc

also, to address issues with installing zmq; here's what I did that worked:

Doing this created a error when running "hc --version" in cmd that said, "libzmq-v140-mt-4_2_0.dll not found" This file is found in the above reference directory in the "bin" folder.

So, I moved libzmq-v140-mt-4_2_0.dll to the same folder where hc.exe lives --> and huzzah! It now works.

Things I don't know:

  • are the other zmq files still required? meaning, is it just libzmq-v140-mt-4_2_0.dll that's needed?
  • I did follow the process for building the zmq libraries using visual studio 2017 (per the instructions sort of given on http://zeromq.org/intro:get-the-software#toc10 ) -- however, while this did build successfully in VS17, my cmd was still throwing the error mentioned above. I haven't tested doing this installation from scratch with just the above method.

Suggesting Edit: Install Holochain

Page URL: http://developer.holochain.org/docs/install/

As per holochain/holochain-rust#1760, this page needs a couple of updates IMO.

Firstly, on my computer with Manjaro Linux, I need to pipe curl https://nixos.org/nix/install with a shell command, otherwise it doesn't work (see the above issue for details). E.g., as I use zsh by default, I ran curl https://nixos.org/nix/install | zsh, other common ones would be piped with bash or sh.

Secondly, I got:

[jr@lm ~]$ nix-env --versioncopy
error: no operation specified
[jr@lm ~]$ nix-env --version
nix-env (Nix) 2.3.1

So LTM like it needs to be updated to nix-env --version.

Suggesting Edit: Hello Holo Tutorial

Page URL: http://developer.holochain.org/docs/tutorials/coreconcepts/hello_holo/

There is an issue compiling with 'hc package' in the 'Generate a Zome' section.
The config.toml file errors.
I found it works when I update the dependencies like this:

[dependencies]
serde = "=1.0.89"
serde_json = { version = "=1.0.39", features = ["preserve_order"] }
serde_derive = "=1.0.89"
hdk = { git = "https://github.com/holochain/holochain-rust", tag = "v0.0.34-alpha1" }
holochain_wasm_utils = { git = "https://github.com/holochain/holochain-rust", tag = "v0.0.34-alpha1" }
holochain_json_derive = "=0.0.17"

"Method not found". I'm doing "app/zome/method" format calls. All the doc pages regarding frontend interfaces are blank

Jimmy, [20 Jan 2019 19:28:50]:
...just dropped into the MatterMost chat, so we'll see there. Basically did the hc-rust todo list tutorial, got it running on a websocket server, but every call I make to it aside from "info/instances" returns "Method not found". I'm doing "app/zome/method" format calls.

and I was curious if any webhook RPC calls are documented anywhere aside from info/instances.

All the doc pages regarding frontend interfaces are blank

Though I know it's early in the process. I just assume they haven't been written yet.

Very early in the process myself, but so far it's not bad. It somewhat stinks that they changed to Rust/WebAssembly recently and invalidated most of the existing tutorials/sample apps in the process, but I understand the move, and ultimately it'll provide greater flexibility in the future. So I'm simultaneously having to learn Rust compared to other widely used languages. Though I think the design of the HC and the use of sharded DHTs and app specific crypto chains is a very cool concept.

Update links on holochain.org website

Holochain.org home page
Change Request: Update links from Holochain proto to Holochain rust on the Holochain.org home page.

  1. Holochain.org home page / Resources
    Update link from proto to rust
  2. Holochain.org home page / Drop down menu
    Update Readme link from proto to rust

Suggesting Edit: Hello Test Tutorial

Page URL: http://developer.holochain.org/docs/tutorials/coreconcepts/hello_test/

Remove the following section:

orchestrator.registerScenario("description of example test", async (s, t) => { const {alice, bob} = await s.players({alice: conductorConfig, bob: conductorConfig}) // Make a call to a Zome function // indicating the function, and passing it an input const addr = await alice.call("myInstanceName", "my_zome", "create_my_entry", {"entry" : {"content":"sample content"}}) // Wait for all network activity to await s.consistency() const result = await alice.call("myInstanceName", "my_zome", "get_my_entry", {"address": addr.Ok}) // check for equality of the actual and expected results t.deepEqual(result, { Ok: { App: [ 'my_entry', '{"content":"sample content"}' ] } }) })

This section mismatches what I've arrived to so far!

My code says this:
orchestrator.registerScenario('Test hello holo', async (s, t) => { const {alice, bob} = await s.players({alice: config, bob: config}, true); const result = await alice.call('cc_tuts', 'hello', 'hello_holo', {}); t.ok(result.Ok); t.deepEqual(result, { Ok: 'Hello Holo' })

Suggesting Edit: Hello Me Tutorial - Check your code discrepancies in another box

Page URL: http://developer.holochain.org/docs/tutorials/coreconcepts/hello_me/

The Check your Code box after the definition of show_person is also wrong (seperate box from the error reported in #154

Specifically - the show_output in the code constructed line by line is ...

function show_output(result, id) {
  var el = document.getElementById(id);
  var output = JSON.parse(result);
  el.textContent = ' ' + output.Ok;
}

But in the "Check your code box" its

// Render functions
function show_output(result, id) {
  var el = document.getElementById(id);
  var output = JSON.parse(result);
  if (output.Ok) {
    el.textContent = ' ' + output.Ok;
  } else {
    alert(output.Err.Internal);
  }
}

With extra error checking ...

Suggesting Edit: Install Holochain

Page URL: http://developer.holochain.org/docs/install/

After the curl command (the next command) requires an update to the environment. The command line says this can be done by running ~/.nix-profile/etc/profile.d/nix.sh, except after the install this file needs to be chmod +x first. And this doesn't do it; you need to force the exports, the simplest way is to logout and log in again.

Suggesting Edit: Hello Me Tutorial - test fails in Firefox, works in Chrome

Page URL: http://developer.holochain.org/docs/tutorials/coreconcepts/hello_me/
Using the code from the latter hello.js Check-your-code
In Firefox, the result of

var address = document.getElementById('address_in').value;

is
" Address: QmaijZvaP2BKj5r14KLTaB2yF4V1hukkSg7cJG6nLtNFSL"
While in Chrome its
"QmaijZvaP2BKj5r14KLTaB2yF4V1hukkSg7cJG6nLtNFSL"

In Firefox it of course fails to retrieve that, while Chrome works fine.

I don't understand why Firefox behaves like this ... as the DOM looks like

<div>Address: <span id="address_output"> QmaijZvaP2BKj5r14KLTaB2yF4V1hukkSg7cJG6nLtNFSL</span></div>

But its 100% repeatable and will leave you to debug it ....

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.