Interview with Magnus Madsen about the Flix Programming Language

Interview with Magnus Madsen about the Flix Programming Language

Flix, an open-source programming language inspired by many programming languages, enables developers to write code in a functional, imperative or logic style. Flix looks like Scala, uses a type system based on Hindley-Milner and a concurrency model inspired by Go. The JVM language supports unique features such as the polymorphic effect system and Datalog constraints.

Flix programs are compiled to JVM bytecode and developers can use the Flix Visual Studio Code extension or evaluate the language by using the online playground.

The community develops the language based on a set of principles such as: no null value, private by default, no reflection, separation of pure and impure code, correctness over performance and no global state.

The following main function is considered impure as the println function has a side effect. The Flix compiler keeps track of the purity of each expression and guarantees that a pure expression doesn’t have side effects.


def main(_args: Array[String]): Int32 & Impure =
    println("Hello world!");
    0 // exit code

The Flix language supports Polymorphic Effects making it possible to distinguish between pure functional programs and programs with side effects. Functions are pure by default, or can explicitly be marked as pure:


def add(x: Int32, y: Int32): Int32 & Pure  = 
    x + y;

Functions with side effects can be marked explicitly as impure:


def main(_args: Array[String]): Int32 & Impure =
println(add(21, 21));
0 // exit code

The compiler displays an error Impure function declared as pure whenever side effects are used in an explicitly marked Pure function:


def add(x: Int32, y: Int32): Int32 & Pure  = 
    x + y;
    println("Hello")

The separation of pure and impure code allows developers to reason about pure functions as if they are mathematical functions without side effects.

Datalog, a declarative logic programming language, may be seen as a query language such as SQL, but more advanced. Flix supports Datalog as a first-class citizen making it possible to use Datalog constraints as function arguments, returned from functions and stored in data structures. Flix may be used with Datalog to express fixpoint problems such as determining the ancestors:


def getParents(): # r  = #
    ParentOf("Mother", "GrandMother").
    ParentOf("Granddaughter", "Mother").
    ParentOf("Grandson", "Mother").


def withAncestors(): # ParentOf(String, String), 
                        AncestorOf(String, String)  = #
    AncestorOf(x, y) :- ParentOf(x, y).
    AncestorOf(x, z) :- AncestorOf(x, y), AncestorOf(y, z).


def main(_args: Array[String]): Int32 & Impure =
    query getParents(), withAncestors() 
        select (x, y) from AncestorOf(x, y) |> println;
    0

This displays the following results:


[(Granddaughter, GrandMother), (Granddaughter, Mother), 
    (Grandson, GrandMother), (Grandson, Mother), (Mother, GrandMother)]

Flix provides built-in support for tuples and records as well as algebraic data types and pattern matching:


enum Shape 
    case Circle(Int32),          // circle radius
    case Square(Int32),          // side length
    case Rectangle(Int32, Int32) // height and width


def area(s: Shape): Int32 = match s 
    case Circle(r)       => 3 * (r * r)
    case Square(w)       => w * w
    case Rectangle(h, w) => h * 
Read More

World’s smallest battery can ability a personal computer the size of a grain of dust

World’s smallest battery can ability a personal computer the size of a grain of dust
World's smallest battery can power computer with the size of a grain of dust
The world’s smallest battery is lesser than a grain of salt and can be produced in huge portions on a wafer surface. Credit rating: TU Chemnitz/Leibniz IFW Dresden

Desktops are receiving lesser and smaller, just as present cell phones supply computing electricity very similar to that of a notebook. And the development toward miniaturization continues. Intelligent dust apps (very small microelectronic equipment), this sort of as biocompatible sensor methods in the overall body, demand from customers computers and batteries lesser than a dust mote. So significantly, this improvement has been hindered by two primary aspects: absence of on-chip electrical power sources for operation whenever and anywhere and complications in creating integrable microbatteries.

In the existing challenge of Advanced Electrical power Elements, Prof. Dr. Oliver G. Schmidt, head of the Professorship for Materials Techniques of Nanoelectronics and Scientific Director of the Center for Materials, Architectures and Integration of Nanomembranes (Major) at Chemnitz College of Technological know-how, Dr. Minshen Zhu, who has been doing the job in Prof. Schmidt’s team at the Analysis Heart Principal considering the fact that February 2022, and scientists from Leibniz Institute for Reliable Condition and Supplies Study (IFW) Dresden and Changchun Institute of Used Chemistry present a remedy to these worries. They discuss how battery-powered intelligent dust applications can be realized in the sub-millimeter-scale and present the world’s smallest battery by much as an software-oriented prototype.

“Our success present encouraging strength storage efficiency at the sub-sq.-millimeter scale,” says Dr. Minshen Zhu, and Prof. Oliver Schmidt provides: “There is however a substantial optimization probable for this technology, and we can expect much more powerful microbatteries in the potential.”

Further than the boundaries of miniaturization

The electricity to operate small sub-millimeter-scale computers can be provided by producing acceptable batteries or “harvesting” solutions to crank out electric power.

In the area of “harvesting,” micro-thermoelectric turbines, for example, convert warmth to electrical power, but their output electrical power is way too minimal to drive dust-sized chips. Mechanical vibrations are another supply of electrical power for powering tiny-scale equipment. Compact photovoltaic cells that transform light into electrical vitality on small chips are also promising.

On the other hand, light and vibrations are not available at all moments and in all destinations, earning on need operation difficult in a lot of environments. This is also the scenario, for example, in the human overall body, where small sensors and actuators demand a constant ability provide. Effective small batteries would remedy this difficulty.

Having said that, the generation of tiny batteries is extremely unique from their every day counterparts. For illustration, compact batteries with higher vitality density, button cells for occasion, are produced utilizing soaked chemistry. Electrode products and additives (carbon resources and binders) are processed into a slurry and coated on to a metallic foil. On-chip microbatteries produced employing these kinds of common technologies can provide good electricity and electricity density but have a footprint of considerably a lot more than just one square millimeter.

Shrinking Tesla technological innovation: Swiss-roll system permits on-chip

Read More

The 20 ideal tech merchandise of 2022

The 20 ideal tech merchandise of 2022

Amazon genuinely is the just one-stop-store for all of your browsing requires. No matter if you are hunting for the most effective property decor, the latest TikTok trending product or a wide variety of promotions, the on-line retailer has you lined.

But just one of our absolute most loved sections on Amazon.com is none other than the electronics classification.

From AirPods and iPads to TVs and speakers, Amazon has it all.

While, owing to the higher volume of solution choices Amazon properties, it can be challenging to know what is definitely well worth your buck. Fortunately, we did the exploration for you.

Beneath, obtain 20 of the finest electronics at present on Amazon. They all aspect stellar reviews and higher scores.

Black Alexa voice control remote
Amazon

You haven’t seasoned the pleasure of Alexa until finally you try out it out for on your own. Now you can with Amazon’s Fireplace Television set Adhere with Alexa voice handle. Far better however, take pleasure in reside Tv set and accessibility to over 200,000 cost-free moves and episodes.


Black kindle with a book page on the front
Amazon

Now you can retail outlet all of your guides in one particular slim device. The new Kindle Paperwhite options a 6.8″ display with thinner boarders than ahead of. It also adjusts to warm light and offers up to 10 months of battery lifestyle. Wager of all, avid visitors can take pleasure in 20% more quickly page turns.


White JBL speaker
Amazon

Fill your house with seem with the assist of this JBL portable bluetooth speaker. It comes in a selection of shades though providing superior-top quality seem.


Black round robot vacuum
Amazon

Choose the problem out of cleansing with this iRobot Roomba vacuum. It lifts grime, dust and particles absent even though functioning on your ideal routine. You can even established a comprehensive suite of superior sensors to make positive it cleans you want and leaves what you do not.


Black jbl in ear headphones
Amazon

Amazon is bringing down the dwelling with these impeccable in-ears. With deep bass, 32 several hours of battery life and impartial ear buds for equally calls and audio, you will not be dissatisfied. Ideal of all, they are now 50% off.


Black and blue echo dot 3
Amazon

This is hands down the very best speaker for compact areas. It’s compact, enables for voice management and offers you with Alexa intelligent-capabilities.


Acer laptop with program opened
Amazon

Looking for a highly effective laptop designed to conquer the hardest projects? Then the Acer Aspire 5 is for you.

You can glance ahead to maximized visuals, a backlit keyboard, a fingerprint visitors, voice technological innovation and so a great deal extra.


Black fire tablet with apps
Amazon

There is nothing at all like a Fireplace Pill to get the creative imagination flowing. This type comes in 4 many shade selections and is both of those fast and responsive. The battery daily life is also long-long lasting, so you can delight in your applications these kinds of as Netflix, TikTok and Hulu with out get worried.


9. Apple Pencil, $89, authentic price

Read More

Dragon Age 4 government producer has still left BioWare

Dragon Age 4 government producer has still left BioWare

BioWare suggests development of the up coming Dragon Age match is coming alongside properly, but has also lost a major leadership figure. Christian Dailey, who took in excess of as executive producer subsequent the departure of Mark Darrah in December 2020, has remaining the studio.

“As we keep on our journey, we preferred to wish Christian Dailey a heartfelt farewell from BioWare,” BioWare common supervisor Gary McKay wrote. “Christian began with us again in 2018 and has been a large impact on our video games and leadership staff, most a short while ago as Government Producer about Dragon Age’s advancement. The video games market is at any time-altering even though and sometimes folks want to go and try new things—we recognize, but we will miss him as a buddy and as a colleague.”

Prior to getting the reins on Dragon Age, Dailey was the franchise advancement director for Anthem live companies, and then the studio director at BioWare Austin. He confirmed his departure from BioWare on Twitter, saying that he is “looking ahead to cheering on the group and actively playing as a enthusiast.”

See additional

Dailey said he does not at present have any potential options to share, even though he hinted—perhaps jokingly—that he could possibly be fascinated in subsequent in Darrah’s footsteps as a streamer. He didn’t reveal his reasons for leaving BioWare, but did strongly imply that it was an amicable split.

“I want to reiterate that the Dragon Age group is killing it and the game is in remarkable hands,” he tweeted. “Will not drop for the detest. Tons of positivity, can not wait around for when they can share more.”

The new Dragon Age job is now “in the middle of creation,” McKay wrote in the update. “Our blueprint was accomplished last yr, so we’re now concentrated on making out our vision: creating wonderful environments, deep characters, potent gameplay, impactful creating, psychological cinematics—and significantly additional. The blueprint for the sport is effectively recognized and the crew is focused.”

Dailey’s departure will come just a few months right after the reduction of Dragon Age 4 senior inventive director Matt Goldman, but McKay reported the challenge continues to be headed up by “a sturdy leadership crew of sector and Dragon Age veterans.” That consists of generation director Mac Walters, a BioWare veteran who beforehand directed the Mass Result: Legendary Version longtime Electronic Arts employee Corrine Busche as match director and Benoit Houle, who has credits on every single Dragon Age match considering that Origins (and most Mass Effect video games as well), as director of product or service growth.

McKay reported BioWare

Read More

PCC adding far more in-man or woman group progress programming

PCC adding far more in-man or woman group progress programming

WINTERVILLE, N.C. (PCC) — After two several years of programming limitations and largely digital instruction owing to COVID-19, Pitt Neighborhood College is getting back to its roots with regard to impending Community Enhancement classes. 

   Like most everything due to the fact March 2020, the pandemic has adversely impacted PCC’s skill to present in-human being Local community Growth lessons. But this spring, the faculty has now scheduled particular enrichment courses that meet up with encounter-to-experience and will start registering youngsters for Take a look at Summer months Camps that element palms-on activities in a little far more than a month. 

   “We did a good job of optimizing our academic programming nearly, but there’s no substitute for the arms-on instruction PCC excels at supplying,” explained Dr. Dan Mayo, PCC Dean of General public Providers and Wonderful Arts. “We’re enthusiastic about the return of far more individual instruction in the classic format so lots of take pleasure in.” 

   For people today wanting to boost their culinary capabilities, Pitt is featuring a “Springtime Desserts” class to instruct them how to make anything from baked goods to cold/no-bake desserts and very simple pies. The initially chance to consider the class will be March 22-31. It will meet up with Tuesdays and Thursdays, from 6 p.m. to 8 p.m. A 2nd portion is set for April 19-28 and meets the exact same times of the 7 days at the very same instances. 

   PCC Community Progress Plans Coordinator Lisa Webb explained the “Springtime Desserts” class will acquire position on PCC’s primary campus. The charge is $39.55, she claimed, incorporating that participants ought to give their possess substances. 

   “Those who finish the ‘Springtime Desserts’ class will have the abilities to prepare delectable desserts that are selected to impress anybody who tries them,” Webb claimed. “Not only will they be delicious, they’ll be as vibrant as a spring flower back garden.” 

   Associates of the group intrigued in discovering how to line dance will have the option to do so in April. The March course is currently crammed to capability, but an additional portion operates April 5-26 at the Ayden Group Theatre. 

   Beginning March 28, children ages 7 to 18 many years outdated can commence signing up for summer months camps that get underway in June. Webb claims camps will be available on a first-arrive, to start with-served basis and led by skilled instructors, which includes Pitt County Colleges academics, PCC school and pros from the community. 

   “After two many years of COVID, we’re energized to after yet again give summer time camps,” Webb claimed. “We have some exciting things to do and opportunities planned for June by August, and we’re looking ahead to seeing the children experiencing by themselves as they produce new abilities and satisfy others from the community who share the similar passions.” 

   The 2022 Discover Camp lineup features a assortment of systems dealing with science, technologies, engineering, the arts and arithmetic. Topics range from photo voltaic ovens, drip paintings and edible automobiles to Snapkits, flight and

Read More

In a Hybrid Globe, Your Tech Defines Worker Encounter

In a Hybrid Globe, Your Tech Defines Worker Encounter

About the earlier fifty percent 10 years, executives and leaders have thrown all around the phrase “every enterprise is a tech enterprise.” In 2022, this assertion hits even nearer to house as the electronic employee practical experience gets just as essential as the actual physical a person with the pandemic putting more stress on factors of operate like properly-currently being, society and instruction, at a time when the competition for talent is fierce.

Very last 12 months, The Good Reshuffle arrived into focus and put the employee experience at the leading of many corporate priorities this calendar year. In January, the Labor Division shared that workers stop at a file amount in November 2021. They are now seeking for the correct career at the right business with no hurry to go back. Contrast this from additional than 10 million occupation openings, and it’s apparent that companies will need to position more emphasis on tradition and personnel working experience.

One of the huge concerns a lot of leaders are struggling with now is: how can we meaningfully connect, collaborate, and join in a hybrid (or distant) atmosphere?

These new requires are driving the generation of new technology types to aid staff — that go past the movie contact. And although know-how isn’t the only answer, it will have an crucial job to perform as providers search for new ways to win the level of competition for talent and produce a office wherever very well-currently being and tradition prosper.

This technological transition will have to have a mindset change for IT and enterprise leaders alike — to take into consideration how current and rising know-how can be employed to rebuild lifestyle in a remote and hybrid world.

Know-how Defines the Staff Knowledge

As hybrid get the job done results in being much more widespread, and staff grow to be much less physically centralized, the conventional emphasis put on in-place of work perks is rapidly diminishing. This dynamic is reshaping how firms operate. Microsoft’s 2021 Work Craze Index found that 46% of the workforce is relocating mainly because they can now function remotely. And staff members come to feel so strongly about remote get the job done that Qualtrics investigation has demonstrated that 35% of employees would be additional very likely to research for a new position if they were being essential to return to the business entire-time — even further putting stress on businesses to adapt appropriately.

As this trend persists, the know-how activities that businesses deliver will much more or significantly less determine the personnel working experience — technological know-how and office resources are, for all intents and functions, the new place of work. As these kinds of, they are becoming central in attracting and retaining new expertise, fostering place of work tradition, creating productiveness, and a lot more.

However, a lot of staff are underwhelmed by their current technological innovation and distant function encounters. Qualtrics exploration identified only 30% of personnel say their knowledge with their company’s technology exceeds their

Read More