Content Developer II at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
122569 stories
·
29 followers

Announcing Dart 3.4

1 Share

Dart 3.4 is out today! This release showcases the joint efforts of Dart and Flutter together in the Flutter 3.22 / Dart 3.4 / IO24 post, so make sure to get the full scoop there. This post introduces our support for WebAssembly, and then details one of the major roadmap items for the Dart language this year: macros.

WebAssembly updates

Today, we’re delighted to announce complete support for WebAssembly (Wasm) is available for Flutter Web apps with the latest Flutter 3.22 stable release!

This has been a multi-year investment across Dart & Flutter. If you’ve been following the developments, you’ve seen our incremental developments:

  • Standardizing the WasmGC proposal,
  • Adding a brand new Dart compiler backend to generate WasmGC code, and
  • Revamping our web and JavaScript interop offerings to best support Wasm.

We’ll continue to invest in WebAssembly. Our next effort will enable full support for Wasm in pure Dart apps, and completing a few missing features (e.g. deferred loading). The end-to-end tooling for Wasm compilation in Dart is still under development, but you can try the preview in stable now with some temporary steps. Later, we also hope to support Wasm in Dart outside of JS-environments, such as standard Wasm run-times like wasmtime and wasmer.

Dart macros: Raising the development abstraction level

We’ve invested many years into designing the Dart macros system. To improve the development experience in Dart, macros provide a metaprogramming solution, like code generation. This solution is built into the Dart language to give developers maximum performance, efficiency, and productivity. Now, we’re ready to offer a preview of this experience!

A long standing pain point for Dart developers has been the trivial yet tedious pattern of serializing and deserializing JSON data. Crafting a reusable, sufficiently powerful solution is a challenge in Dart, as it doesn’t support runtime reflection for performance reasons. As an alternative, we’ve relied on code generation solutions like JsonSerializable. These depend on external tools that run before the code itself, complicating the developer experience.

Today, we’re announcing a preview of a radical new approach for JSON serialization and deserialization: the JsonCodable macro.

A macro is a type of code that generates more code through introspecting other code at compile time. For example, here’s a Dart class Vehicle with the new JsonCodable macro applied:

@JsonCodable()
class Vehicle {
final String description;
final int wheels;
Vehicle(this.description, this.wheels);
}
void main() {
final jsonString = Vehicle('bicycle', 2).toJson();
print('Vehicle serialized: $jsonString');
}

So, how does it work? Where did the toJson() method (and the companion fromJson() constructor) come from? This is an experimental implementation of our new macro system designed to simplify developer experience. When the Dart compiler sees the @JsonCodable() annotation, it immediately locates the definition of the JsonCodable macro in real time and starts executing it. This causes the macro to:

  1. Create a new “augmentation class”; a new language construct which enables adding new declarations to existing classes.
  2. Read the developer’s definition of the Vehicle class to determine it has two fields, description and wheels.
  3. Add a new toJson method signature to the augmentation class.
  4. Fill in the body of the toJson method to handle the serialization of the description and wheels fields.

All this happens without delay. The integrated experience supports our existing developer workflows, such as hot reload, as this screencast illustrates:

Screencast showing the experience of using a macro: Initially no toJson code completion exists, but after adding @JsonCodable to the class, the toJson code completion shows up immediately.

Long term macro goals

The eventual goal is to enable the community to create their own macros. This raises the abstraction level of Dart programming. Take data classes, for example, the highest voted Dart language feature. We looked at adding built-in support for data classes in Dart, but learned that the opinions varied significantly on what such a construct should support to set a standard ourselves. Should the fields be immutable? Should it support equals? What about hashCode? Maybe toString too? We concluded that supporting a macro system would be the better approach. The community can create their own kinds of abstractions, allowing for more scalable experimentation and variety.

Designing and implementing such a powerful macro system is a substantial undertaking. We’re determined to do it in a way that doesn’t have a detrimental performance impact on core Dart developer use cases, such as code assistance and completions, code analysis, and hot reload. With that in mind, we’re taking a staged approach:

  • In today’s release, we’re making a preview of a single macro, JsonCodable, available so users can start familiarizing themselves with the developer experience of using a macro.
  • If the roll-out of this macro goes well, then we hope to graduate the JSON macro to stable in a later release.
  • Concurrently, we’re working on completing the design and implementation of the underlying macro system. Once we feel confident in its performance and stability, the eventual goal will be to enable the Dart developer community to define their own macros.

A lot of work remains to complete these stages. In the meantime, you can read the documentation to learn more about the Dart macro system, and try out a preview of the JsonCodable macro today.

Other improvements

As always, this release contains all of the continuous developments that go into providing the best version of Dart possible. In this release, we made the following improvements:

  • Resolved over 50% of analyzer code completion bugs. (Please keep filing issues!)
  • Improved the alignment of the type analysis of conditional expressions, if-null expressions, and switch expressions with the language spec (changelog).
  • Removed incomplete and inconsistent tooling from the dart:cli library to pay down technical debt in the Dart VM.
  • Addressed a handful of inadequacies to improve the new dart:js_interop library.

Check out the Changelog for the full story! Don’t forget to read the joint Dart and Flutter blog post for this release for the full story of our joint efforts!


Announcing Dart 3.4 was originally published in Dart on Medium, where people are continuing the conversation by highlighting and responding to this story.

Read the whole story
alvinashcraft
2 hours ago
reply
West Grove, PA
Share this story
Delete

Daily Reading List – May 14, 2024 (#318)

1 Share

Whew. Today was an excellent day at Google I/O and I left inspired and exhausted. Between Cloud Next and now I/O, I need a conference break. But I’ll tell you, I wouldn’t exchange platforms or potential with any other cloud right now. We’re in a terrific spot.

[blog] Google I/O 2024 recap: Making AI accessible and helpful for every developer. We announced and/or released many new things today, and this is worth a skim if you care about modern apps.

[article] Amazon Web Services CEO Adam Selipsky steps down; senior exec Matt Garman named AWS CEO. Wow, big change for our friends at AWS. Corey thinks its a good move. Maybe! I sure like having a product-thinker and engineering mind leading Google Cloud. Also, OpenAI’s co-founder and chief scientist moves on. Lots of musical chairs today!

[blog] Machine Learning on GCP: From Notebooks to Pipelines. This author says that too many folks think AI can be purely addressed with notebooks instead of proper real ML pipelines.

[blog] 4 Rituals To Keep You Happy All The Time. I’m pretty chipper, but even I’m not happy all the time. Nonetheless, Eric offers a few ways to re-program yourself to bias towards happiness.

[blog] Strategy as a Series of Beliefs. The answer to ‘what is strategy?” won’t be the same if you ask two “experts” in the domain. I like how Dave broke down this way of thinking.

[article] How Do You Measure Developer Experience? Generic guidance on dev productivity or experience doesn’t really land with me. Rather, I want to see it grounded in a real-life scenario. That’s what you’ll find here.

[article] 100X Scaling: How Figma Scaled its Databases. Learn how Figma sharded their database and the benefits they saw as a result.

##

Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below:



Read the whole story
alvinashcraft
2 hours ago
reply
West Grove, PA
Share this story
Delete

OpenAI's Chief Scientist and Co-Founder Is Leaving the Company

1 Share
OpenAI's co-founder and Chief Scientist, Ilya Sutskever, is leaving the company to work on "something personally meaningful," wrote CEO Sam Altman in a post on X. "This is very sad to me; Ilya is easily one of the greatest minds of our generation, a guiding light of our field, and a dear friend. [...] I am forever grateful for what he did here and committed to finishing the mission we started together." He will be replaced by OpenAI researcher Jakub Pachocki. Here's Altman's full X post announcing the departure: Ilya and OpenAI are going to part ways. This is very sad to me; Ilya is easily one of the greatest minds of our generation, a guiding light of our field, and a dear friend. His brilliance and vision are well known; his warmth and compassion are less well known but no less important. OpenAI would not be what it is without him. Although he has something personally meaningful he is going to go work on, I am forever grateful for what he did here and committed to finishing the mission we started together. I am happy that for so long I got to be close to such genuinely remarkable genius, and someone so focused on getting to the best future for humanity. Jakub is going to be our new Chief Scientist. Jakub is also easily one of the greatest minds of our generation; I am thrilled he is taking the baton here. He has run many of our most important projects, and I am very confident he will lead us to make rapid and safe progress towards our mission of ensuring that AGI benefits everyone. The New York Times notes that Ilya joined three other board members to force out Altman in a chaotic weekend last November. Ultimately, Altman returned as CEO five days later. Ilya said he regretted the move.

Read more of this story at Slashdot.

Read the whole story
alvinashcraft
4 hours ago
reply
West Grove, PA
Share this story
Delete

Introducing Firebase App Hosting

1 Share
Read the whole story
alvinashcraft
4 hours ago
reply
West Grove, PA
Share this story
Delete

What's new in Firebase at I/O 2024

1 Share
Read the whole story
alvinashcraft
4 hours ago
reply
West Grove, PA
Share this story
Delete

Microsoft will require MFA for all Azure users

1 Share

This July, Azure teams will begin rolling out additional tenant-level security measures to require multi-factor authentication (MFA). Establishing this security baseline at the tenant level puts in place additional security to protect your cloud investments and company. 

MFA is a security method commonly required among cloud service providers and requires users to provide two or more pieces of evidence to verify their identity before accessing a service or a resource. It adds an extra layer of protection to the standard username and password authentication.

 

The roll-out of this requirement will be gradual and methodical to minimize impact on your use cases. The blog post below provides helpful information from the Azure product team to assist you in getting ready to MFA-enable your access to Azure services.  Going forward, the team will provide communications to you about your specific roll-out dates through direct emails and Azure Portal notifications. Expect these in the coming months.  

 

Read on to learn why and how MFA is important to securing customers on Azure and your workloads, environments, and users.

 

If you do not wait to wait for the roll-out, set up MFA now with the MFA wizard for Microsoft Entra.

 

- Erin

 

How MFA works

Multi-factor authentication (MFA) is a security method that requires users to provide two or more pieces of evidence to verify their identity before accessing a service or a resource. The evidence can be something the user knows (such as a password or a PIN), something the user has (such as a phone or a token), or something the user is (such as a fingerprint or a face scan).

 

MFA adds an extra layer of protection to the standard username and password authentication, making it harder for attackers to compromise accounts and steal data. MFA can also help prevent unauthorized access due to phishing, credential stuffing, brute force, or password reuse attacks.

 

Entra ID supports various MFA methods, such as Microsoft Authenticator app, SMS, voice call, and hardware tokens. Users can choose the method that suits their preferences and needs.  Admins can also use Entra ID Conditional Access policies to tune when MFA is required based on signals such as the user’s location, device, role, or risk level.

 

Why MFA is important for Azure tenant security

The need for MFA is more important than ever, as cyberattacks are becoming more frequent, sophisticated, and damaging. According to a report by Microsoft, 99.9% of compromised accounts did not use MFA. The report also found that MFA can block more than 99.2% of account compromise attacks, making it one of the most effective security measures available. As noted in the report, MFA can block more than 99.9% of account compromise attacks, making it one of the most effective security measures available.

 

The rise of the hybrid workforce and accelerated digital transformation of businesses by the COVID-19 pandemic expanded risk scenarios for employees and companies. Today, more people work outside of the office and access data and applications from various devices and locations. All of this has increased the attack surface and the potential for unauthorized access, as users may use unsecured networks, devices, or passwords. MFA can help mitigate these risks by adding an extra verification step and preventing access from unknown or suspicious sources.

 

MFA is also a key component of identity and access management, which involves ensuring that only authorized and authenticated users can access the services and resources. One of the three areas of engineering advancements within Microsoft’s Secure Future Initiative focuses on implementing new identity protections and MFA at the tenant level helps you with identity protections. MFA not only reduces the risk of account compromise and data breach, but it also helps you comply with various security standards and regulations, such as PCI DSS, HIPAA, GDPR, and NIST.

 

Don’t wait to set up MFA

To help you keep users and data safe, MFA is now available and free for you to enable at the tenant level. You can set up MFA today with the MFA wizard for Microsoft Entra.

 

If you have additional questions, please review the MFA FAQ on Microsoft Learn for more information and learn more about the Secure Future Initiative and Microsoft’s built-in security features here.

Read the whole story
alvinashcraft
4 hours ago
reply
West Grove, PA
Share this story
Delete
Next Page of Stories