Houston  Sipes

Houston Sipes

1604152800

Bonjour V!

V is a brand new programming language_ that’s been making quite a few waves in the programming community._

I stumbled upon it a few months back when I read this article.

While V is still in its infancy as of this writing (there are only sixquestions about it on SO), it is gaining popularity (it has around **15.9K **stars on GitHub).

And it’s also under active development (as evidenced by the recent commits in its GitHub repo).

So, I thought, why not give it a try. After all, what’s the harm in being an early adopter, right?

So, let’s get started!

Step 1. Install V on your local machine

You can install V using prebuilt binaries (such as this one), or you can directly compile its source code.

Since I use a MacBook Air (13-inch, 2007) running m_acOS Catalina_ (version 10.15.3), I downloaded this prebuilt binary for macOS.

I extracted its contents and fired up the macOS Terminal_. _Then,I navigated to the directory where I’d extracted the prebuilt binary and fired the following command in the Terminal:

./v version

It’s supposed to display V’s current version, something like below:

V 0.1.24 0d93eeb

But instead, the following prompt popped up on the screen:

A warning prompt from macOS stating that macOS is unable to verify app (https://support.apple.com/en-us/HT202491)

https://support.apple.com/en-us/HT202491

You see, macOS blocks the execution of apps that haven’t been notarized_ (meaning, apple can’t verify the origins of the app, and as a result, can’t guarantee that the application isn’t malicious)._

So, what do we do now? Give up?

Absolutely not!

There’s a workaround: We can tell macOS to make an exception for such _unnotarized _apps by navigating to _System Preferences > Security & Privacy _and click the “Allow Anyway” button. Take a peek at the _gif _below to get a better idea:

Image for post

Now that we’ve told the bouncer (macOS 😀) to let the guest in, we should be able to start the party, right? (run V via the Terminal without any issue)

But no! 😯 That’s not what happens. When we execute the ./v version on the Terminal again, the following screen pops up:

macOS blocks the execution of the app yet again, but this time, there’s an “Open” button, which empowers the user to “run” it

macOS blocks the execution of the app yet again, but this time, there’s an “Open” button, which empowers the user to “run” the app.

This is the same pop-up that we encountered a while back, but this time, macOS has provided us with the “Open” button. Let’s click it and see what happens:

V prints its version number on the Terminal

#v-programming-language #new-programming-language #hello-world #coding #programming

What is GEEK

Buddha Community

Bonjour V!
Houston  Sipes

Houston Sipes

1604152800

Bonjour V!

V is a brand new programming language_ that’s been making quite a few waves in the programming community._

I stumbled upon it a few months back when I read this article.

While V is still in its infancy as of this writing (there are only sixquestions about it on SO), it is gaining popularity (it has around **15.9K **stars on GitHub).

And it’s also under active development (as evidenced by the recent commits in its GitHub repo).

So, I thought, why not give it a try. After all, what’s the harm in being an early adopter, right?

So, let’s get started!

Step 1. Install V on your local machine

You can install V using prebuilt binaries (such as this one), or you can directly compile its source code.

Since I use a MacBook Air (13-inch, 2007) running m_acOS Catalina_ (version 10.15.3), I downloaded this prebuilt binary for macOS.

I extracted its contents and fired up the macOS Terminal_. _Then,I navigated to the directory where I’d extracted the prebuilt binary and fired the following command in the Terminal:

./v version

It’s supposed to display V’s current version, something like below:

V 0.1.24 0d93eeb

But instead, the following prompt popped up on the screen:

A warning prompt from macOS stating that macOS is unable to verify app (https://support.apple.com/en-us/HT202491)

https://support.apple.com/en-us/HT202491

You see, macOS blocks the execution of apps that haven’t been notarized_ (meaning, apple can’t verify the origins of the app, and as a result, can’t guarantee that the application isn’t malicious)._

So, what do we do now? Give up?

Absolutely not!

There’s a workaround: We can tell macOS to make an exception for such _unnotarized _apps by navigating to _System Preferences > Security & Privacy _and click the “Allow Anyway” button. Take a peek at the _gif _below to get a better idea:

Image for post

Now that we’ve told the bouncer (macOS 😀) to let the guest in, we should be able to start the party, right? (run V via the Terminal without any issue)

But no! 😯 That’s not what happens. When we execute the ./v version on the Terminal again, the following screen pops up:

macOS blocks the execution of the app yet again, but this time, there’s an “Open” button, which empowers the user to “run” it

macOS blocks the execution of the app yet again, but this time, there’s an “Open” button, which empowers the user to “run” the app.

This is the same pop-up that we encountered a while back, but this time, macOS has provided us with the “Open” button. Let’s click it and see what happens:

V prints its version number on the Terminal

#v-programming-language #new-programming-language #hello-world #coding #programming

Bonjour: Share data across devices without a backend.

Recently I found myself trying to achieve something different than what I normally do. I needed to share some information between iOS devices but I didn’t want to develop a backend to be able to achieve it. And so began the search for an alternative.

After a few hours of looking around and thinking that probably Bluetooth might be the obvious solution, I came to a sudden realization:

The iPhones are also connected to my home network, why not take advantage of that?

Sounds straightforward enough. All I need is to figure out how to make the devices see each other and establish communication between them. Easy right? Well, it depends because on paper it sounds pretty painless:

  1. Figure out the IP of the device receiving the data.
  2. Establish a connection with it.
  3. Send data.

Ok, that’s the gist of it if you will. 3 easy simple-sounding steps. However, I don’t know about you but I’ve never worked with network protocols before. Nor have I ever read about how one begins to approach this situation on iOS. Most of the apps I normally use and develop rely on a server to pass information between instances of the app on different devices.

But hey! We have a roadmap we know we need to follow so let’s tackle it one step at a time.

Image for post

1. Figure out the IP of the device receiving the data

Since the goal is to have the devices talk between each other while being on the same local network, aka my home wifi, I came up with 2 ways to approach this: either by having the IP shown on the one device and manually inputting that value on the sending device or, try to scan the network for all the available devices and pick the correct one from the list.

The first option is simple enough but I feel the user experience would be very subpar. No one should have the need to deal with IP numbers. And the second option while it does take away some of the bad experience from the first it also introduces the problem of having a list of possible devices that could be the receiving one. Yes, you could resolve the hostname and that could help narrow it down, but still, why show more info than needed to the user? Having a list of devices to choose from when you really only need to find the one shouldn’t be the way to go.

There has to be a way that’s user-friendly and developer-friendly. Because scanning a network for devices is not a fun thing to do.

But you know what’s fun? ZeroConf. After narrowing down my new needs my search became more specific I found the existence of this technology. To save you a trip to Wikipedia:

Zero-configuration networking (zeroconf) is a set of technologies that automatically creates a usable computer network based on the Internet Protocol Suite. It does not require manual operator intervention or special configuration servers.

But what’s the difference between this and scanning for devices? You may ask. Well, the main difference is that this is automatic. We don’t need to go an look for all the devices, we just need to look for the devices that want to be found by us and establish the connection.

The concepts behind ZeroConf are complicated enough as it is for me to try to explain them. However, I can try to oversimplify it a bit. Think of ZeroConf as one device using a special sort of Google to get a list of available devices registered to a service with which we can communicate. Well, this sounds more like Tinder than Google… The main point is it allows clients and hosts to be listed and found without much hassle or special configuration.

#zeroconf #bonjour #ios #network #swift

Web Code

1609281660

V-If V-Else V-Else-If V-Show In Vue JS

How you can use conditional rendering with the directive v-if, v-else, v-else-if and v-show in vue js. I explain to you step by step these important key features in vue js. After this tutorial you understand how you can use conditional rendering in vue js, to interact better with your template.

❖ Subscribe : https://www.youtube.com/channel/UCVI6tv5boZ62bSsd8k9eM7Q

#vue #vuejs

Wilford  Pagac

Wilford Pagac

1602716400

Form input elements and v-model in VueJS slots

In this article, I’ll share with you the solutions I’ve found to a small issue I’ve encountered: using form input elements and the v-model attribute, in scoped slots.

_Also available _in french

Scoped slots and v-model

VueJS provides a pretty useful feature to make your code DRY ( Don’t repeat yourself): slots. If you are not aware of what slots are, I’ll give you an example. Dialog box is a good one. A dialog box always behaves the same way. When you open it, it creates a view appearing above the current view. This new view usually has a title, content, and some buttons. And the content could be anything! Some raw text, a form, a picture, a combination of those things, some other things… In this case, would you develop a new dialog box for each sort of content? The answer better be “Hell no!”. And slots would be your tool for the job. You’d create the “frame” component, which would take care of displaying a view over the previous one, and use a slot for the content.

But you probably already know all of that. What this article will be about, is one particular case I’ve had to handle: input elements in slots. Form input elements is a very interesting case because VueJS provides a particular attribute for them: v-model. An input field using v-model will keep in sync the value displayed in it and the variable it is linked to in your JavaScript.

v-model can’t work that way

The example I’ll use for this article is a custom dynamic form. Let’s say we want to build a form with input elements like <input> and <textarea> (which are eligible for v-model). And with each of these control, we want to display a warning if it is empty. One option would be to create two new components based on <input> for one and <textarea> for the other, adding this new feature, and then use those two new components in a form. One better option would be to create only one new component, let’s call it FormElement, which would implement this new feature, and would have a slot for the form input element.

#slot #javascript #vuejs #web-development #v-model

Abdul  Larson

Abdul Larson

1592497020

Node.js (v.14): 2 Things to Know.

Node.js version 14 is here!

As per the official site, Node.js 14 replaces Node.js 13 on 21st April 2020 as a current release.
This article will highlight 2 new JavaScript features included in version 14.
So, Let’s dive deep and check each one.

#node #node.js #v.14