11 ms·
Motoko, a programming language for building directly on the internet
- marta_morena_25 6y agoThat sounds more like clickbait. Just as if someone took the latest marketing buzzwords and somehow tried to make a product out of it. If there was any meat to this, they would lead with the use case and say "Hey here: This is the problem the world has. Here is how we solved it". But anything blockchain related already went more like "Uhh look, here is a blockchain. Enjoy". This is worse... This seems to be just like Ethereum without the blockchain. What does "building directly on the internet" even mean? What do I ever need distributed, cryptographic consensus for? The use-case escapes me completely, this even seems more useless than Ethereum, where I can see at least some applications thanks to the blockchain. But that thing without the blockchain just doesn't make any sense. But hey, it got WASM, so must be cool.
- mpfundstein 6y agothe fact that you call Ethereum useless shows that you are way too ignorant to voice such a strong opinion. educate yourself and try again. i work with bchains since 2013 and ethereum is a major driver for a lot of innovation and real life applications. i've built an energy trading platform on top of it that allows local business to localize their energy management. its deployed and working, granted , in a small poc here in Adam. but still. also what do you think powers 99% of all altcoins?
- gverrilla 6y agois there a hub of some sort to follow ethereum projects? last time I checked (few months I believe) cryptocats was the app with more activity. also I'm curious about your project, if there's anything you're willing to share
- intotheabyss 6y agoJust search for DeFi (decentralized finance).
- SkyMarshal 6y ago> What do I ever need distributed, cryptographic consensus for? The use-case escapes me completely, Generally the use case for decentralized systems is if you want to disintermediate an existing middle-man who has proven untrustworthy, expensive, or problematic in some way. Or, you want to enable a group of parties to coordinate their activities in ways not previously possible without a (currently non-existing) trusted intermediary. The middle-man function is automated and federated. That’s it. Any business model dependent on a middle-man is potentially a business model for decentralized systems, if the economics, risks and feature requirements compare favorably. Bitcoin addressed arguably the most impactful one - money - but there may be others. >this even seems more useless than Ethereum, where I can see at least some applications thanks to the blockchain. DFINITY is a “blockchain” in the general meaning of the word, aka a public decentralized computing platform with a native currency and attendent economic incentives. It may use other data structures under the hood than most current blockchains, but the use cases are mostly the same as Ethereum.
- whateveracct 6y agoThe programming model seems nice (orthogonal persistence especially), but the fact that it's running decentralized is a big cost. Maybe someone will provide the same developer niceness in a traditional cloud way. The only people who would prefer DFINITY at that point are people who really care about decentralization (which is fewer than the marketing hype suggests imo.)
- RcouF1uZ4gsC 6y ago> Instead, the Internet Computer implements orthogonal persistence—yet another old idea where a program has the illusion of running “forever” and its memory staying alive (at least until it is explicitly taken down). In Motoko, this means that developers do not have to worry about explicitly saving their data or bother with files or an external database: whatever values or data structures are stored in program variables will still be there when the next message arrives, even if that is months later. My guess is that storage persistence is the Godzilla of all leaky abstractions. There are huge tradeoffs in regards to consistency, durability, random access, performance, and cost. In addition, there are huge issues with lock-in. If I can save my data to sqlite or postgress or even S3, I know that I will be able to migrate the data to other languages and systems pretty easily. But if all my data is in a abstract "Internet Computer persistence pod", that is a huge issue.
- pavlov 6y agoThis model also seems to ignore data deletion, which is a huge concern for any serious business of any size. You can’t have users’ personal data lingering in a soup of opaque cloud continuations for months. There needs to be a way to strongly commit deletions and audit that the data is gone. And once you build that on top of the “Internet Computer”, my guess is that it will look disappointingly like a very slow ordinary database.
- foxes 6y agoSounds a bit like Ethereum but without a cryptocurrency?
- tempsolution 6y agoYou mean "useless on steroids"? I concur. I really wonder what people think when creating something like this and also where the money comes from. It was already difficult to find a use-case for crypto currencies, and now all they did was to create the slowest possible distributed programming language. Just what the world needed. But there are enough marketing buzzwords in there that probably some crowd is gonna pick it up, which is sad.
- classified 6y agoYou mean, a "solution" in search of a problem, and unsuitable for anything touching privacy or security?
- SkyMarshal 6y agoIt’s more like Solidity done right, by a team of expert language designers. It’s the scripting language for DFINITY, so it does actually have a token, fwiw.
- intotheabyss 6y agoYou can't build something like Ethereum without a cryptocurrency
- dgellow 6y agoNo code examples in the entire article?
- jmull 6y agoI was thinking it might be AI-generated, and while it could string together these common concepts very impressively, it could not generate code samples. But I suppose it’s probably actually the kind of article the AI engines digest in order to be able to generate similar ones.
- Kinrany 6y agoMakes me think we're close to the stage where different languages can be easily combined in the same project, and therefore can be created willy-nilly as easily as DSLs in Lisps.
- lukevp 6y agoThis already exists on the JVM or the .NET CLR. The concept of an intermediate language is also old. It’s easy to call between languages as well. The “innovation” is really the true OO nature of everything being message passing, and no real persistence mechanism.
- Hazae41 6y agohttps://xkcd.com/927/ https://xkcd.com/927/
- deleted 6y ago[deleted]
- rainpain 6y agoI think the guy who made the internet is also trying to fix the worst bits rather than reinventing it. I'm backing Mr Berners-Lee. https://en.m.wikipedia.org/wiki/Solid_(web_decentralization_project) https://en.m.wikipedia.org/wiki/Solid_(web_decentralization_...
- deleted 6y ago[deleted]
- historyremade 6y agoScam. Scam. Spot on. Scam. Stay away. Decentralization is biggest myth in the world.
- browsergap 6y agoGhost in the shell reference? Motoko Kusanagi
- wonks 6y agoAh, I was wondering which anime they were referring to with this...
- miki123211 6y agoIMO, the next step for distributed programming, and one web assembly could finally enable, will be communicating with code, not messages. Imagine you're building an app that lets users of a music streaming service see how much time they spent listening to particular genres of music. The way you would do this with REST, SOAP or similar could roughly be: 1. Retrieve the user's whole listen history. 2. For each track, send a request to get the track info, which includes album and duration. 3. For each album, retrieve the album info, which contains the genre. 4. Tabulate the returned data. That's thousands of requests, and a lot of network bandwidth wasted. GraphQL is a bit better, you only receive what you need, and you send just one request, but you still get a whole lot of track objects, which need to go through the network and be processed on your side. With my proposed approach, you would send a piece of wasm code, a bit similar to a Lambda function, which would run on the streaming service's API cloud. Such a function could use fine-grained API calls to retrieve what it needs. It would be executing on the service's network, so round trips would be either short or nonexistent. After tabulating the data, it would send back a simple JSON with the genres and time spent. This approach would allow developers to extend any service in ways the original developers have never imagined. We could also re-think the way backends and frontends communicate, giving frontend devs a way to do even more, without changing the back end.
- mwcampbell 6y agoOn the Windows accessibility team where I work, we've done something like this for the UI Automation API, not using WebAssembly but using our own bytecode. We call it Remote Operations. The idea is that certain parts of the UI Automation API require a very large number of cross-process requests (i.e. from the assistive technology to the application process) to do anything non-trivial. So with Remote Operations, the client (assistive technology) sends a little program to the provider (application) to do the API calls. This feature hasn't yet made it into a stable Windows release, but it's available in Insider builds, and the high-level client libraries and accompanying tests are on GitHub here: https://github.com/microsoft/microsoft-ui-uiautomation https://github.com/microsoft/microsoft-ui-uiautomation Disclaimer: Remote Operations is still a work in progress. There's no public documentation yet aside from the README in the GitHub repo, and the client libraries aren't yet packaged for easy consumption. Moreover, this is not an official Microsoft announcement; I'm just bringing it up on this thread because it's relevant and I'm proud of this feature that I helped develop.
- vorpalhex 6y ago> and of course it has a flexible type system that is actually sound, ... No holes! And this is where I went from "good faith reading" to actually not believing the article. Every general language that has made this claim has had holes - and those holes are usually patchable, but to claim a language with almost no adoption is leak proof is foolhardy at best. Just because you haven't discovered how your particular abstraction is broken doesn't mean it isn't.
- norswap 6y agoCopy/pasted from google search: > A sound type system means you can never get into a state where an expression evaluates to a value that doesn't match the expression's static type. It's not actually that hard to make a provably sound type system. The claim can only strain belief if it includes some type-level feature that makes this difficult. Of course, it should also be proved. e.g. Java's type system is not sound even though there is no good design reason while it shouldn't be (to be fair - it only happens in cases so intricately twisted that nobody will ever stumble on them by accident).
- CJefferson 6y agoIf you had gotten a bit further, you would have seen the type system is so amazing it stops you "misinterpreting data". Truely the future has arrived.
- vmchale 6y agoSoundness has a technical meaning. Point is, the type system at least isn't a shaky foundation.
- qazpot 6y agoSo, this is Erlang.
- tines 6y agoLooks cool. One thing though, the page says > Actors are a great model for concurrent programming because they automatically prevent race conditions (thanks to atomicity and encapsulated state) and deadlocks (because execution never blocks) This isn't really true afaik. You can still have logical race conditions if you don't synchronize messages (but they won't be architectural races), and you can still have deadlocks if two actors wait on messages from each other at the same time. I feel like people often treat race conditions and deadlocks as small, computer-architecture ideas when really they're quite broad concepts. You may be able to prevent them automatically at certain scales, like say a single uint64, but when you try to treat two uint64s as a single uint128 then suddenly race conditions are possible again, despite the guarantees your language has made on the smaller scale.
- kjeetgill 6y agoI agree completely! And this shows up in just about any language because of that — however — I kinda get where the author is coming from. When a certain amount of state is encapsulated within a single actor (or a single message for that matter) you can act on all of it sorta transactionally since no other actor has access. This is probably more power/control than some programers have had in other languages or paradigms. Your full program state dosn't retain this property once it spans actors but what can ya do.
- daxfohl 6y agoI keep seeing that wasm is safe and secure. But to my understanding wasm is just a bytecode spec. The interpreters are what have to be judged secure. If an interpreter has a hole then the sandbox is escapable. As you add jits and various cpu optimizations and other options, the more likely there's a bug there somewhere someone can exploit. I don't understand. Is there a mathematical way to verify that a wasm interpreter is secure?
- IncRnd 6y agoYes, there is, but you need to define what it should be secure against. Then, a proof can be constructed, given particular assumptions. I doubt this will ever be done for wasm.
- tlack 6y agoCode sample: Actor model with explicit synchronicity and access scoping: actor Counter { var value = 0; public func inc() : async Nat { value += 1; return value; }; } Types and specificity: type Tree<T> = { #leaf : T; #branch : {left : Tree<T>; right : Tree<T>}; }; func iterTree<T>(tree : Tree<T>, f : T -> ()) { switch (tree) { case (#leaf(x)) { f(x) }; case (#branch{left; right}) { iterTree<T>(left, f); iterTree<T>(right, f); }; } } Source: https://sdk.dfinity.org/docs/language-guide/motoko.html https://sdk.dfinity.org/docs/language-guide/motoko.html Not to my taste personally.
- smabie 6y agoLooks like Scala, but uglier.
- anentropic 6y agoan impressive feat in itself
- DarkWiiPlayer 6y agoToo many curly braces, too many abbreviations, and worst of all, templates with <>-syntax. You couldn't build an uglier language if you tried.
- sventhereturned 6y agoDisclosure: I work at DFINITY, but not on this team. I can probably answer most questions folks may have...
- sonofgod 6y ago* What are the usecases where this [the Internet Computer and/or Motoko] shines? * Can you expand on Orthogonal Persistence -- is this a "per actor" persistence, or from the references to blockchain is it some sort of shared state between actors? * How does the internet look/feel/work different once this exists?
- sventhereturned 6y agoHi there! Diego from DFINITY here... 1. Compared to other forms of DECENTRALIZED compute, IC + Motoko shines in making web apps with User experience comparable to centralized providers (AWS, GCP, Azure). Example: You can build simple react web social network and expect quick reads (in milliseconds) and writes (1-3 seconds). Note I did not say "blocks" or "finalization." I deliberately trying not to have a leaky abstraction from the POV of the app developer. Compared to CENTRALIZED compute, you can create "open internet services" like an open version of TikTok where the control of the app and its features can be be done by (in simple terms) voting. Example: https://www.youtube.com/watch?v=_MkRszZw7hU https://www.youtube.com/watch?v=_MkRszZw7hU More broadly, one of the things that is surprising (it was to me when I joined, and it still is), how much of the cloud stack that developers or compute providers create is not necessary when you have protocol-based compute. As a developer, some things like firewalls, databases, seem less important in enforcing the security and scalability of my apps. I realize as I type this can sound a bit naive AND esoteric... and I think the only way to really show this is by action and folks just playing with it. Few words will really convey this as much as people playing with it directly, I get that. 2. Our compute model are "canisters" which (if you are familiar with actor model) are actors that contain both their code and their state. Actors communicate by sending messages to each other (as actor model implies). Example: I could create a twitter canister. Orthogonal persistance means its state can grow without me spinning up DBs or worrying about replication and consistency. https://sdk.dfinity.org/docs/language-guide/motoko.html#_orthogonal_persistence https://sdk.dfinity.org/docs/language-guide/motoko.html#_ort... 3. Oh boy thats a big question... I don't think I can do better than our founder Dom: https://www.youtube.com/watch?v=dALucsAgAwE https://www.youtube.com/watch?v=dALucsAgAwE Was that a helpful set of answers?
- M0T0K0 6y agoPerhaps I should learn this? ;) Idk web assembly yet though, scanning to figure out how this could be useful for an amateur web-dev.
- lukevp 6y agoDon’t learn this or web assembly, learn TypeScript and then Rust. TS will teach you a lot about type systems, classes, modules, interfaces, async/await, etc. Rust will teach you about memory management, filter expressions, futures, (im)mutability, etc. They are both mature languages that are usable in your web dev context and that you’ll be able to find resources to learn. No one is writing WebAssembly manually, it’s even lower level than regular assembly. It would be super painful to write directly, it’s meant as a virtual architecture that can be efficiently executed.