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

Stability AI lays off roughly 10 percent of its workforce

1 Share
Photo illustration of a brain on a circuitboard in red.
Illustration by Cath Virginia / The Verge | Photos from Getty Images

Stability AI laid off 20 employees just a day after announcing the expansion of access to its new flagship model. This comes after weeks of upheaval that saw its founding CEO leave the company.

CNBC reports that the layoffs at the UK-based AI company, which runs the Stable Diffusion text-to-image model, represent roughly 10 percent of its workforce. In a memo to staff, interim CEOs Shan Shan Wong and Christian LaForte say the decision to let go of employees is part of a “strategic plan to reduce our cost-base, strengthen support with our investors and partners, and enable teams to continue developing and releasing innovative products.”

The company did not say which departments were affected by layoffs, according to reports.

Stability...

Continue reading…

Read the whole story
alvinashcraft
54 minutes ago
reply
West Grove, PA
Share this story
Delete

Google is combining its Android and hardware teams — and it’s all about AI

1 Share
Google logo with colorful shapes
Illustration: The Verge

AI is taking over at Google, and the company is changing in big ways to try to make it happen even faster. Google CEO Sundar Pichai announced substantial internal reorganizations on Thursday, including the creation of a new team called “Platforms and Devices” that will oversee all of Google’s Pixel products, all of Android, Chrome, ChromeOS, Photos, and more. The team will be run by Rick Osterloh, who was previously the SVP of devices and services, overseeing all of Google’s hardware efforts. Hiroshi Lockheimer, the longtime head of Android, Chrome, and ChromeOS, will be taking on other projects inside of Google and Alphabet.

This is a huge change for Google, and it likely won’t be the last one. There’s only one reason for all of it,...

Continue reading…

Read the whole story
alvinashcraft
54 minutes ago
reply
West Grove, PA
Share this story
Delete

ChatGPT is coming to Nothing’s earbuds

1 Share
A photo of new earbuds from Nothing.
Photo by Chris Welch / The Verge

Nothing has announced that it plans to more deeply integrate ChatGPT with its smartphones and earbuds. The move will give the company’s customers quicker access to the service. “Through the new integration, users with the latest Nothing OS and ChatGPT installed on their Nothing phones will be able to pinch-to-speak to the most popular consumer AI tool in the world directly from Nothing earbuds,” the company wrote in a blog post. And yes, the new Nothing Ear and Ear (a) are both supported.

Spokesperson Jane Nho told me by email that “gradual rollout of the integration will commence on April 18th with Phone 2 followed by Phone 1 and Phone 2A in the coming weeks.” Once the update lands, you’ll be able to query ChatGPT using the company’s...

Continue reading…

Read the whole story
alvinashcraft
54 minutes ago
reply
West Grove, PA
Share this story
Delete

Did Signals Just Land in React?

1 Share
Did Signals just land in React?

Last week, Daishi Kato (creator of Waku) released use-signals, an experimental React hook for TC39 signals, which aims to demonstrate how Signals can work in React.

Screenshot of Tweet from Daishi announcing use-signals

What Are Signals?

Signals have been in development for around 10 years and are used by JavaScript frameworks such as Angular, Vue, SolidJS, Qwik and Preact, (amongst others), and are used to manage client-side state. Signals are variables that auto-track where they’ve been used. When a change to a Signal occurs, its value is invalidated — which causes the UI state to update / re-render.

For example, here’s a Signal named counter which holds a value of 0.

View the code on Gist.

Signals are fundamentally different from React’s useState. useState is a hook provided by React for managing state within functional components and allows you to declare a state variable and a function to update that variable.

Signals are event listeners, or observers for handling asynchronous events or changes in data that occur outside of the component’s immediate control. As such, you’ll notice that there’s no “setter” function defined in the Signal declaration. Whereas, with React, there is. For example here’s how the above Signal would be declared in React.

View the code on Gist.

The reason Signals are an interesting concept is that React’s model of “top down” means that whenever a state value changes, all descendants of the component tree are re-rendered and any relevant changes to the UI are made — thus keeping the DOM / UI in sync with the application state.

Using a Signal to manage state, however, allows for more fine-grained control over what parts of a UI are “re-rendered.” That’s not to say that Signals are any more performant than the React approach, but they are fundamentally different from one another.

Signals Under the Hood

As shown above, a Signal can be declared using the new constructor E.g.:

View the code on Gist.

Then, to “get” the value of a Signal you can use the .get() method; and to “set” or update a Signal, you can use the .set() method. E.g.:

View the code on Gist.

What Are Signals in React?

Contrary to my above notes relating to how Signals work, that’s not how they work in React. To bypass React’s diffing would go against React’s core principles of declarative programming. So Signals in React will still use the VDOM and will still cause re-renders the same way a change to useState would.

So what’s the point of Signals in React? This was my first thought too, and Daishi has even written about it: Why You Don’t Need Signals in React. So let’s dive a little deeper into the world of Signals.

TC39 Proposal

If the TC39 proposal is successful and Signals become natively available in JavaScript, we’ll be able to use Signals outside of frameworks. More than that, framework authors should — in theory — be able to implement Signals in a standardized way. Any advancements to Signals should benefit all frameworks that have implemented the standardized approach. Currently, many of the frameworks that use Signals have all approached it in slightly different ways.

On April 11, Rob Eisenberg announced that the TC39 proposal has advanced to stage 1. This officially means the proposal is now under ECMAScript consideration; and whilst there is a lot of work still to do, the proposal appears to be moving in the right direction.

Screenshot of Tweet from Rob announcing Signal progressing to stage 1

If you’re curious to know more, here’s a link to the slide deck: Developing Signals (For Stage 1). Also, here’s a summary of the meeting notes: Updates from the 101th TC39 meeting.

The TC39 proposal also mentions the importance of developing the API in such a way as to allow for framework-specific requirements to be implemented. This is somewhat the case with use-signals because it uses the (proposed) Signals API but still honors React’s core principles.

Whether or not the React team would opt to adopt Signals is a different matter, but use-signals goes some way towards showing that Signals would work in React.

Signal Utils Proposal

Signals at the moment only support primitives, but there are additional signal-utils proposals in progress that could bring Object and Array to Signals. For example:

Object

View the code on Gist.

Array

View the code on Gist.

Signals in React Example

With all that said, let’s have a look at how use-signals would look in React. The React code I’ll be showing works in the context of Waku, which is server-side rendered by default but does support the 'use client' directive for client-only components.

Unlike useState, with Signals a new Signal declaration is declared outside of the component. In the below snippet, it’s the const named counter. This is used to store the initial value and can be passed on to the useSignal hook.

The count const exposes both the .set() and .get() methods, which can be used inside the event handler function, handleInc.

Changes to the Signal value will cause the DOM to update and the new count value to be displayed in the UI.

What’s interesting here is that in the returned Jsx you don’t need to use .get() to access and display the value within the HTML <div /> element. Instead, the count value can be accessed directly. This is slightly different to Qwik’s implementation, which would require you to access the value from the counter, E.g. counter.value.

View the code on Gist.

useState Component

And just for good measure, here’s the same logic but written using React’s useState hook. As you can see, there’s little difference between the two.

View the code on Gist.

Mixed Signals

So there you go, Signals in React — they are possible, and while it might take some time before Signals make it into native JavaScript, I do really love the thirst this thriving community has for developing new ideas. If you’d like to get involved, head over to the GitHub repository: dai-shi/use-signals.

The post Did Signals Just Land in React? appeared first on The New Stack.

Read the whole story
alvinashcraft
55 minutes ago
reply
West Grove, PA
Share this story
Delete

10 Fleet Shortcuts to Boost Your Productivity

1 Share

Do you like shortcuts? So do we! Fleet, like every JetBrains IDE, provides a multitude of shortcuts which boost your speed and productivity for your most used actions. We highly recommend checking out the default keymap reference card to get started.

If you have been working with Fleet and its shortcuts, you might have noticed that some shortcuts are different from what you are used to in IntelliJ IDEs. These choices weren’t made arbitrarily – the Fleet team put a lot of thought and effort into Fleet’s keymap to provide an experience that is aligned with today’s common standards.

Do I have to know every Fleet shortcut to be efficient?

We don’t expect you to memorize every shortcut available in Fleet. That would be impractical, although I’m certain there are people out there who have this superpower. Please leave a comment below if you are one of them.

If you don’t have this superpower, don’t worry. With a little practice, you can learn the most essential shortcuts. Let’s ignore the mouse for a moment and get started with the following 10 shortcuts that will boost your productivity.

Goto Popup: ⌘K / Ctrl+K

If there is one Fleet shortcut you should have at your fingertips, it’s ⌘K / Ctrl+K. This shortcut opens the Goto popup, which is the place for everything related to searching in your project. It allows you to search files, classes, functions, and symbols. When you invoke this command, you will see recently visited items. Start typing to narrow down the search.

Fleet shortcut command k

Show Quick Fixes: ⌥↵ / Alt+Enter

Another shortcut worth remembering is ⌥↵ / Alt+Enter. Its purpose is right there in the name – this shortcut will help you to fix whatever needs fixing. It also shows the list of intention actions, which run the whole gamut from warnings to suggested code changes. Press ⌥↵ / Alt+Enter to access Fleet’s suggested actions in the current context.

Fleet shortcut option enter

Go to Actions: ⇧⌘K / Ctrl+Shift+K

Sometimes you might not even know where to look for something. Use ⇧⌘K / Ctrl+Shift+K to search for any action in Fleet. In the dropdown menu, you will find available actions as well as their respective shortcuts. Many actions have aliases, which removes the need to remember their exact name. Just enter a keyword that is close enough and select from the actions matching your request.

Fleet shortcut command shift k

Go to Tool: ⌘T / Ctrl+T

All Fleet tools are organized in panels. Whenever you need to use a tool (for example, the terminal or debugger), you can open it on the left, bottom, or right panel. Just press ⌘T / Ctrl+T to open the Tools popup. Start typing the name of the tool to narrow down the search. To toggle between panels, press ⌘1, ⌘2, ⌘3 / Alt+1, Alt+2, Alt+3.

Fleet shortcut command t

Go to File: ⌘P / Ctrl+P

By default, ⌘K / Ctrl+K searches for files and top-level symbols. Use ⌘P / Ctrl+P to narrow the search to files and open your file directly from there.

Fleet shortcut command p

Find in Files: ⇧⌘F / Ctrl+Shift+F

If you want to search through your entire project for file content (⇧⌘F / Ctrl+Shift+F), the Text search dialog is the tool you’re looking for. ⇧⌘F / Ctrl+Shift+F also works for advanced queries. It has several matching options and allows you to use regular expressions. Once your query has been found, you can open it in a separate editor tab, or you can edit it right from the preview.

Fleet shortcut command shift f

Reformat Code: ⌥⇧F / Alt+Shift+F

Fleet allows you to manage code style settings for each individual set of files with EditorConfig. Whenever you want Fleet to format the current file, you can use ⌥⇧F / Alt+Shift+F and Fleet will format the current file according to the code style settings. You can choose to only reformat parts of your file. If you don’t select specific parts to reformat, Fleet will reformat the whole file.

Fleet shortcut option shift f

Toggle Line Comment: ⌘/ / Ctrl+/

Comments are very useful when explaining code intent, providing context, and clarifying complex parts of your source code. Simply use ⌘/ / Ctrl+/ anywhere on a line to comment on or comment out this line of code. Pressing the same shortcut again will un-comment the line. Select multiple lines to comment out the whole selection of lines.

Fleet shortcut command slash

Generate Code with AI: ⌘. / Ctrl+.

AI Assistant in Fleet provides AI-powered features for software development. To generate arbitrary code at the caret, press ⌘. / Ctrl+. , type your request, and press Enter.

Fleet shortcut command dot

Git Pull: ⌃G⌃U / Ctrl+Shift+G Ctrl+Shift+U

You can use git pull to update your current local working branch, including all of the remote tracking branches. We recommend running git pull frequently on the branches you are working on locally. Fleet automatically saves your uncommitted changes by stashing them before executing git pull. Go to the Branches menu to choose the branch you want to update and then press ⌃G⌃U / Ctrl+Shift+G Ctrl+Shift+U.

Fleet shortcut git pull

More information

If you’d like to use another predefined keymap or customize your keymap, you can easily do this by accessing the settings. You can also download and print the default keymap to have all shortcuts handy while you’re coding.

Try it out yourself and see how the essential shortcuts for Fleet help you to be a more productive and efficient software developer.

What are your favorite Fleet shortcuts you can’t live without?

Read the whole story
alvinashcraft
55 minutes ago
reply
West Grove, PA
Share this story
Delete

Tell us your thoughts at the Microsoft 365 Community Conference and earn a $20 gift card

1 Share
Are you attending the Microsoft 365 Community Conference this year (Orlando, FL | April 30 - May 2, 2024)? Do you want to help shape the direction of some of Microsoft’s most important products by providing your feedback? If you answered yes to both questions, then you might be interested in joining the Microsoft User Researcher team for some fun, hands-on in-person sessions during the conference.
 
The Microsoft User Researcher team is offering several group sessions that will focus on Copilot, Loop, Mesh, OneDrive, SharePoint, Teams, and Viva. These 60–75-minute sessions will give you an opportunity to learn about some of our product ideas and provide your own ideas and feedback.
 
To participate, you must complete this survey and sign a Non-Disclosure Agreement (NDA). The survey includes a brief description of the different session topics available and will take 10-15 minutes to complete. You can choose the sessions that interest you the most and fit your schedule. As a thank you, you will receive a $20 Starbucks card for each session you participate in!
 
Spots are limited and will fill up quickly, so please sign up today! Don’t miss this chance to be part of the Microsoft User Research community and to make a difference in the future of Microsoft 365. We hope to see you at the Microsoft 365 Community Conference and at the Microsoft User Research sessions. Thank you for your interest and your feedback!
 
Read the whole story
alvinashcraft
56 minutes ago
reply
West Grove, PA
Share this story
Delete
Next Page of Stories