Seems most people are just developing API clients so far which is a needed building block but hopefully we can spread into more apps in the near future. Although I have one or two I am working on, my real apps can’t get going until threemorerfcs are implemented.
[…]safeclient.js/examples/js/simple_read_write.js:3
const safe = require(‘…/…/lib/src/index’)
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
sorry that i didn’t even get further than the second line of code xD … i don’t know anything about JS so …
Yeah for sure, last year I spend a few months reading up on different technologies/languages nodejs/javascript, python,java. Eventually I found a good advise from an old programmer online. He/she basically said, pick one language,platform and slowly build experience around it over a period of months, years.
It will eventually make learning something else easier and quicker as you have deep programming experience built. So choose one, maybe something that you can use elsewhere e.g. scripting at work.
Nice job @cretz. Was just building out a low-level api myself in vanilla javascript (not TypeScript), as I needed it for my separate high-level api I posted previously. I’ll see if I should use this or just complete the one I started, as I’m not far from finishing.
Send me a DM if you ever want to work together on something!
oooooh publishing this library was evil of you! … i just played with it for an hour to understand how nodejs/js works and how i can use it instead of working on my thesis -.-" …
@cretz, thank you very much for your work! I have been playing around with the library and successfully ran the test application against the safe launcher. I’m pretty new to javascript, and before going through this project was the first time I have ran into ‘arrow functions’ and am having some difficulty in understanding the underscore. From your example you show some code that looks like this, promise.then(_ => {}). Could you or anyone else explain what the underscore means?
The underscore is not necessarily defined in the ES6 arrow function spec or anything, it’s just convention for “I know there’s a parameter here and I don’t care about it”. In many cases I could use an empty parameter set. I do them by convention from my FP/ML days.
playing around with this and so far liking it a lot. Thanks for putting it together for us that are just learning some new languages. Its a huge help. I do have one question though, why dont these files show up under the “private files” in the demo app? Now can I put files in a folder called “private” because it doesn’t exist until I create it. I would just like to have some continuity between the two and I’m not sure what I’m missing.
edit: Or is every app segmented into their own “partition” if you will? In which case, can I grant access?
The demo app only has files that it has created itself. Maidsafe explicitly chose the design to have non-shared (not to be confused with “private”) files be app-specific. You can spoof yourself as the demo app (same ID, vendor, etc) and you’ll see them. I have asked them below to change how they were doing it w/ the /public stuff:
But it has unfortunately gone unresponded-to. You should be able to use “shared” files to see files across apps, but the demo app does not do this. Unfortunately the differences between public, private, shared, and non-shared are woefully underdocumented.