Which clouds are supported by winglang?
Show HN: Winglang – A new cloud-oriented programming language
41–50 of 72 posts
Re: Show HN: Winglang – A new cloud-oriented programming language
#42This is pretty cool! I've had my eye on Wing for a while, as a avid fan of Pulumi. I was fortunate enough to have the freedom to use Pulumi in a past role, and it revolutionized the way I thought about infrastructure. My current org has been slow to adopt IaC, and Bicep has been all for which I've managed to drum up appetite. I was surprised somewhat to enjoy the simplicity, but eventually I think we'll outgrow it. M…
Re: Show HN: Winglang – A new cloud-oriented programming language
#43Earlier quoted context omitted.
(engineer on the Winglang team here) Your observation is partially correct. The language does make a distinction when you're defining new functions: you must use the "inflight" keyword annotation to define an inflight function, and most un-annotated functions are assumed to be "preflight". (The top-level scope of every Wing program has a preflight phase). But at _call sites_ no distinction is made. We don't have have…
> In existing languages, where there is no way to distinguish between multiple execution phases, it is impossible to naturally represent this idea that an object has methods that can only be executed from within a specific execution phase. I'm sure I'm getting the wrong end of the stick but isn't this possible to ensure using typing? Very simple dependent typing/phantom types/bog standard normal types?
let bucket = new cloud.Bucket();
let api = new cloud.Api();
// api.get is a preflight method - it generates cloud infrastructure
api.post("/hello", inflight (req) => {
// bucket.put is an inflight method - it performs data plane operations, at "runtime"
bucket.put("data.txt", req.body ?? "empty");
});
Importantly, if you try calling bucket.put() outside of one of these "inflight" scopes or try calling api.get() inside one of these "inflight" scopes, you'll get compilation errors - not runtime errors.Could this style of API be achieved in an existing language? I think it's an open ended question - I'm not sure. But I reckon it gets into complex framework territory (or may require injecting modifications into existing compilers, which presents other challenges). But I'd love to see more exploration into this direction.
Re: Show HN: Winglang – A new cloud-oriented programming language
#44It's a coincidence I just went through the getting started guide yesterday. It would be nice to have a two-way sync between the simulator diagram and the generated code. I'm also curious how Winglang handles existing infrastructure and what it looks like to introduce Winglang to a project that already uses CF or TF. I've used CF, and TF and was an early adopter of CDK. I'm curious how this compares with Pulumi (never…
[I'm on the Wing team] Nice coincidence :) There is no plan currently to add a two-way sync between the simulator diagram and the code, and there could be technical difficulties to do it since the code is not generated but written by developers (only the JS + TF compilation artifacts are generated). But you are welcome to open an issue about it and it and it will be prioritized if it gets enough votes. Since Winglang…
My question about how to integrate with existing code is more of a curiosity rather than a specific use case. It seems like adoption will be an uphill battle because you're asking devs to learn a new language AND port all existing infrastructure code to Wing.
One other thought: It would be cool to see Wing shine by demoing a full-blown distributed system. Perhaps with a couple of microservices and some supporting infrastructure.
Re: Show HN: Winglang – A new cloud-oriented programming language
#45Why a whole language rather than a library that could just as well abstract the cloudy infrastructure and expose its data structures as "first class citizens" ?
"Very cool, but what here cannot be done by a library or compiler extension?
In existing languages, where there is no way to distinguish between multiple execution phases, it is impossible to naturally represent this idea that an object has methods that can only be executed from within a specific execution phase (or within certain scopes of the program). You are welcome to read more about it here (including code samples that show the same app built in Wing vs. other solutions)."
https://github.com/winglang/wing#very-cool-but-what-here-can...
Re: Show HN: Winglang – A new cloud-oriented programming language
#46Earlier quoted context omitted.
> In existing languages, where there is no way to distinguish between multiple execution phases, it is impossible to naturally represent this idea that an object has methods that can only be executed from within a specific execution phase. I'm sure I'm getting the wrong end of the stick but isn't this possible to ensure using typing? Very simple dependent typing/phantom types/bog standard normal types?
The current type system is designed around the experience of writing code like the example below where objects can have two kinds of methods: let bucket = new cloud.Bucket(); let api = new cloud.Api(); // api.get is a preflight method - it generates cloud infrastructure api.post("/hello", inflight (req) => { // bucket.put is an inflight method - it performs data plane operations, at "runtime" bucket.put("data.txt", r…
I can try and put something together in C# but not right now I'm afraid (it would be a good exercise for me as I've only read up on these, not actually use them personally, although I plan to start very soon for my own personal work). There was some examples going round here https://old.reddit.com/r/programming/comments/zm7f9/phantom_... which may help.
Again, I may be misunderstanding your domain completely, so bear it in mind please.
Re: Show HN: Winglang – A new cloud-oriented programming language
#47Re: Show HN: Winglang – A new cloud-oriented programming language
#48I am interested, but when I look at the comparison with Pulumi - https://www.winglang.io/docs/faq/why-a-language, they have 4 lines of code in Wing, but the long Pulumi example sets up permissions. So how did the permissions get set up in Wing? The great thing about Pulumi is if you are trying to comply with company security policies which in turn are for SOC2 etc. then this explicit setup as code is great. I think Pulumi also has a policy system but I haven't explored it yet.
So what I am saying is more code != bad (think of the raison d'etre of the Go programming langauge) but I am not saying Wing is bad ... I am saying I would like to know more.
I find it hard to believe that there is a semantic deficiency in JS/Go/C# etc. that means you need a new languages. And if you use Typescript, OCaml or Haskell (most likely Typescript for popularity) you can probably make the Type system do as much static heavy lifting as possible. Of course some checks need the current state so need runtime. But happy to be persuaded we need a new language.
Re: Show HN: Winglang – A new cloud-oriented programming language
#49Earlier quoted context omitted.
> In existing languages, where there is no way to distinguish between multiple execution phases, it is impossible to naturally represent this idea that an object has methods that can only be executed from within a specific execution phase. I'm sure I'm getting the wrong end of the stick but isn't this possible to ensure using typing? Very simple dependent typing/phantom types/bog standard normal types?
The current type system is designed around the experience of writing code like the example below where objects can have two kinds of methods: let bucket = new cloud.Bucket(); let api = new cloud.Api(); // api.get is a preflight method - it generates cloud infrastructure api.post("/hello", inflight (req) => { // bucket.put is an inflight method - it performs data plane operations, at "runtime" bucket.put("data.txt", r…
Yes, it can be done by either building the contents of the lambda in some truly horrid way (you'd effectively be building an AST at runtime). The alternative is to get hold of the AST/parse tree at runtime (which I believe.NET can do if you ask it nicely, but that is very specifically .NET) which you can then analyse.
The first way is utterly vile though workable and language agnostic, the second way is definitely tied to one platform. If there's third way I can't think of it ATM.
Re: Show HN: Winglang – A new cloud-oriented programming language
#50Show me making it more complex and what that costs.
Show me the performance benchmarks.
Syntax is cool but the older I get the more I care about productivity and speed.