# Free Binary Options Signals - 2020's Best Signal Services

• Free Binary Options Signals - 2020's Best Signal Services
• Free Binary Winner Indicator – 5binaryoptions
• The Best Binary Options Signals Providers for 2020 • Benzinga
• Online trading platform for binary options on forex, stock ...
• Best Binary Options Signals and Software Binary Today
• 100% FREE Binary Options Signals That Simply Work
• Binary Options JTFX
• Free Secret Binary Software and Strategy Binary Today
• Binary Options Robot 2020 - Best Auto Trading Software
##### An introduction to Linux through Windows Subsystem for Linux

I'm working as an Undergraduate Learning Assistant and wrote this guide to help out students who were in the same boat I was in when I first took my university's intro to computer science course. It provides an overview of how to get started using Linux, guides you through setting up Windows Subsystem for Linux to run smoothly on Windows 10, and provides a very basic introduction to Linux. Students seemed to dig it, so I figured it'd help some people in here as well. I've never posted here before, so apologies if I'm unknowingly violating subreddit rules.

# An introduction to Linux through Windows Subsystem for Linux

## Introduction and motivation

So you're thinking of installing a Linux distribution, and are unsure where to start. Or you're an unfortunate soul using Windows 10 in CPSC 201. Either way, this guide is for you. In this section I'll give a very basic intro to some of options you've got at your disposal, and explain why I chose Windows Subsystem for Linux among them. All of these have plenty of documentation online so Google if in doubt.
• Dual-booting with Windows and a Linux distro
• Will basically involve partitioning your drive and installing Linux from an external bootable USB through your computer's boot menu. You'll get the full Linux experience.
• Lots of Linux flavors to choose from. For beginners, Ubuntu and Linux Mint are generally recommended. I have Ubuntu 18.04 LTS, I'd recommend Ubuntu 20.04 LTS since it's newer, but it's all up to you.
• However, it can be a pain to constantly be switching between operating systems. Maybe you wanna make the full jump to Linux, maybe you don't.
• Life pro tip: if you go down this route, disable Window 10's Fast Startup feature as it will get very screwy with a dual-boot. I've also included a helpful guide in Appendix B.
• Using a virtual machine (VM) to run Linux
• Devours RAM and is generally pretty slow, would not recommend.
• Using terminal emulators
• These provide commands and functionality similar to a Linux terminal, but are still running on Windows architecture.
• These days, the most commonly-used Linux terminal is called bash. bash stands for Bourne Again Shell (no, Bourne is not a typo), and is likely what you'll be using as well.
• Terminal emulators generally don't include a package manager, i.e. you can't download new bash programs, so pretty limited for general usage. BUT you can install a package manager externally, kind of hacky but can work.
• Examples of terminal emulators include PuTTY, Git Bash, msys2 and mingw.
• Using Windows Subsystem for Linux (either WSL 1 or WSL 2)
• WSL provides a compatibility layer for running GNU/Linux programs natively on Windows 10. It has integration features certain Windows 10 development apps (notably Visual Studio Code) as well.
• You've got two options, WSL 1 and WSL 2. WSL 2 was recently released and features a real Linux kernel, as opposed to an simulated kernel in WSL. This means WSL 2 offers significant performance advantages, but still lacks some of WSL 1's features.
• WSL 1 is what I currently use, and thus what I'll be talking about in this guide. I'm not necessarily recommending it, frankly I regret not doing a dual-boot sooner and ditching Windows, but a dual-boot isn't for everyone and takes a lot of time you might not have right now.
• Getting WSL initially setup is easy, but making it run smoothly requires some effort, and some features (like audio playback or displaying GUIs) require workarounds you can research if interested. WSL will also not work properly with low-level system tools.
With that out of the way, let's get started with setting up WSL 1 on your Windows 10 machine.

## Setting up WSL

So if you've read this far I've convinced you to use WSL. Let's get started with setting it up. The very basics are outlined in Microsoft's guide here, I'll be covering what they talk about and diving into some other stuff.

### 1. Installing WSL

Press the Windows key (henceforth Winkey) and type in PowerShell. Right-click the icon and select run as administrator. Next, paste in this command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Now you'll want to perform a hard shutdown on your computer. This can become unecessarily complicated because of Window's fast startup feature, but here we go. First try pressing the Winkey, clicking on the power icon, and selecting Shut Down while holding down the shift key. Let go of the shift key and the mouse, and let it shutdown. Great! Now open up Command Prompt and type in
wsl --help
If you get a large text output, WSL has been successfully enabled on your machine. If nothing happens, your computer failed at performing a hard shutdown, in which case you can try the age-old technique of just holding down your computer's power button until the computer turns itself off. Make sure you don't have any unsaved documents open when you do this.

### 2. Installing Ubuntu

Great! Now that you've got WSL installed, let's download a Linux distro. Press the Winkey and type in Microsoft Store. Now use the store's search icon and type in Ubuntu. Ubuntu is a Debian-based Linux distribution, and seems to have the best integration with WSL, so that's what we'll be going for. If you want to be quirky, here are some other options. Once you type in Ubuntu three options should pop up: Ubuntu, Ubuntu 20.04 LTS, and Ubuntu 18.04 LTS.
![Windows Store](https://theshepord.github.io/intro-to-WSL/docs/images/winstore.png) Installing plain-old "Ubuntu" will mean the app updates whenever a new major Ubuntu distribution is released. The current version (as of 09/02/2020) is Ubuntu 20.04.1 LTS. The other two are older distributions of Ubuntu. For most use-cases, i.e. unless you're running some software that will break when upgrading, you'll want to pick the regular Ubuntu option. That's what I did.
Once that's done installing, again hit Winkey and open up Ubuntu. A console window should open up, asking you to wait a minute or two for files to de-compress and be stored on your PC. All future launches should take less than a second. It'll then prompt you to create a username and password. I'd recommend sticking to whatever your Windows username and password is so that you don't have to juggle around two different usepassword combinations, but up to you.
sudo apt-get update
And then
sudo apt-get upgrade
apt-get is the Ubuntu package manager, this is what you'll be using to install additional programs on WSL.

### 3. Making things nice and crispy: an introduction to UNIX-based filesystems

The two above steps are technically all you need for running WSL on your system. However, you may notice that whenever you open up the Ubuntu app your current folder seems to be completely random. If you type in pwd (for Print Working Directory, 'directory' is synonymous with 'folder') inside Ubuntu and hit enter, you'll likely get some output akin to /home/. Where is this folder? Is it my home folder? Type in ls (for LiSt) to see what files are in this folder. Probably you won't get any output, because surprise surprise this folder is not your Windows home folder and is in fact empty (okay it's actually not empty, which we'll see in a bit. If you type in ls -a, a for All, you'll see other files but notice they have a period in front of them. This is a convention for specifying files that should be hidden by default, and ls, as well as most other commands, will honor this convention. Anyways).
So where is my Windows home folder? Is WSL completely separate from Windows? Nope! This is Windows Subsystem for Linux after all. Notice how, when you typed pwd earlier, the address you got was /home/. Notice that forward-slash right before home. That forward-slash indicates the root directory (not to be confused with the /root directory), which is the directory at the top of the directory hierarchy and contains all other directories in your system. So if we type ls /, you'll see what are the top-most directories in your system. Okay, great. They have a bunch of seemingly random names. Except, shocker, they aren't random. I've provided a quick run-down in Appendix A.
For now, though, we'll focus on /mnt, which stands for mount. This is where your C drive, which contains all your Windows stuff, is mounted. So if you type ls /mnt/c, you'll begin to notice some familiar folders. Type in ls /mnt/c/Users, and voilà, there's your Windows home folder. Remember this filepath, /mnt/c/Users/. When we open up Ubuntu, we don't want it tossing us in this random /home/ directory, we want our Windows home folder. Let's change that!

### 4. Changing your default home folder

Type in sudo vim /etc/passwd. You'll likely be prompted for your Ubuntu's password. sudo is a command that gives you root privileges in bash (akin to Windows's right-click then selecting 'Run as administrator'). vim is a command-line text-editing tool, which out-of-the-box functions kind of like a crummy Notepad (you can customize it infinitely though, and some people have insane vim setups. Appendix B has more info). /etc/passwd is a plaintext file that historically was used to store passwords back when encryption wasn't a big deal, but now instead stores essential user info used every time you open up WSL.
Anyway, once you've typed that in, your shell should look something like this: ![vim /etc/passwd](https://theshepord.github.io/intro-to-WSL/docs/images/vim-etc-passwd.png)
Using arrow-keys, find the entry that begins with your Ubuntu username. It should be towards the bottom of the file. In my case, the line looks like
theshep:x:1000:1000:,,,:/home/pizzatron3000:/bin/bash
See that cringy, crummy /home/pizzatron3000? Not only do I regret that username to this day, it's also not where we want our home directory. Let's change that! Press i to initiate vim's -- INSERT -- mode. Use arrow-keys to navigate to that section, and delete /home/ by holding down backspace. Remember that filepath I asked you to remember? /mnt/c/Users/. Type that in. For me, the line now looks like
theshep:x:1000:1000:,,,:/mnt/c/Users/lucas:/bin/bash
Next, press esc to exit insert mode, then type in the following:
:wq
The : tells vim you're inputting a command, w means write, and q means quit. If you've screwed up any of the above sections, you can also type in :q! to exit vim without saving the file. Just remember to exit insert mode by pressing esc before inputting commands, else you'll instead be writing to the file.
Great! If you now open up a new terminal and type in pwd, you should be in your Window's home folder! However, things seem to be lacking their usual color...

### 5. Importing your configuration files into the new home directory

Your home folder contains all your Ubuntu and bash configuration files. However, since we just changed the home folder to your Window's home folder, we've lost these configuration files. Let's bring them back! These configuration files are hidden inside /home/, and they all start with a . in front of the filename. So let's copy them over into your new home directory! Type in the following:
cp -r /home//. ~
cp stands for CoPy, -r stands for recursive (i.e. descend into directories), the . at the end is cp-specific syntax that lets it copy anything, including hidden files, and the ~ is a quick way of writing your home directory's filepath (which would be /mnt/c/Users/) without having to type all that in again. Once you've run this, all your configuration files should now be present in your new home directory. Configuration files like .bashrc, .profile, and .bash_profile essentially provide commands that are run whenever you open a new shell. So now, if you open a new shell, everything should be working normally. Amazing. We're done!

### 6. Tips & tricks

Here are two handy commands you can add to your .profile file. Run vim ~/.profile, then, type these in at the top of the .profile file, one per line, using the commands we discussed previously (i to enter insert mode, esc to exit insert mode, :wq to save and quit).
alias rm='rm -i' makes it so that the rm command will always ask for confirmation when you're deleting a file. rm, for ReMove, is like a Windows delete except literally permanent and you will lose that data for good, so it's nice to have this extra safeguard. You can type rm -f to bypass. Linux can be super powerful, but with great power comes great responsibility. NEVER NEVER NEVER type in rm -rf /, this is saying 'delete literally everything and don't ask for confirmation', your computer will die. Newer versions of rm fail when you type this in, but don't push your luck. You've been warned. Be careful.
export DISPLAY=:0 if you install XLaunch VcXsrv, this line allows you to open graphical interfaces through Ubuntu. The export sets the environment variable DISPLAY, and the :0 tells Ubuntu that it should use the localhost display.

## Appendix A: brief intro to top-level UNIX directories

tl;dr only mess with /mnt, /home, and maybe maybe /usr. Don't touch anything else.
• bin: binaries, contains Ubuntu binary (aka executable) files that are used in bash. Here you'll find the binaries that execute commands like ls and pwd. Similar to /usbin, but bin gets loaded earlier in the booting process so it contains the most important commands.
• boot: contains information for operating system booting. Empty in WSL, because WSL isn't an operating system.
• dev: devices, provides files that allow Ubuntu to communicate with I/O devices. One useful file here is /dev/null, which is basically an information black hole that automatically deletes any data you pass it.
• etc: no idea why it's called etc, but it contains system-wide configuration files
• home: equivalent to Window's C:/Users folder, contains home folders for the different users. In an Ubuntu system, under /home/ you'd find the Documents folder, Downloads folder, etc.
• lib: libraries used by the system
• lib64 64-bit libraries used by the system
• mnt: mount, where your drives are located
• opt: third-party applications that (usually) don't have any dependencies outside the scope of their own package
• proc: process information, contains runtime information about your system (e.g. memory, mounted devices, hardware configurations, etc)
• run: directory for programs to store runtime information.
• srv: server folder, holds data to be served in protocols like ftp, www, cvs, and others
• sys: system, provides information about different I/O devices to the Linux Kernel. If dev files allows you to access I/O devices, sys files tells you information about these devices.
• tmp: temporary, these are system runtime files that are (in most Linux distros) cleared out after every reboot. It's also sort of deprecated for security reasons, and programs will generally prefer to use run.
• usr: contains additional UNIX commands, header files for compiling C programs, among other things. Kind of like bin but for less important programs. Most of everything you install using apt-get ends up here.
• var: variable, contains variable data such as logs, databases, e-mail etc, but that persist across different boots.
Also keep in mind that all of this is just convention. No Linux distribution needs to follow this file structure, and in fact almost all will deviate from what I just described. Hell, you could make your own Linux fork where /mnt/c information is stored in tmp.

## Appendix B: random resources

EDIT: implemented various changes suggested in the comments. Thanks all!

##### An introduction to Linux through Windows Subsystem for Linux

I'm working as an Undergraduate Learning Assistant and wrote this guide to help out students who were in the same boat I was in when I first took my university's intro to computer science course. It provides an overview of how to get started using Linux, guides you through setting up Windows Subsystem for Linux to run smoothly on Windows 10, and provides a very basic introduction to Linux. Students seemed to dig it, so I figured it'd help some people in here as well. I've never posted here before, so apologies if I'm unknowingly violating subreddit rules.

# Getting Windows Subsystem for Linux running smoothly on Windows 10

## Introduction and motivation

So you're thinking of installing a Linux distribution, and are unsure where to start. Or you're an unfortunate soul using Windows 10 in CPSC 201. Either way, this guide is for you. In this section I'll give a very basic intro to some of options you've got at your disposal, and explain why I chose Windows Subsystem for Linux among them. All of these have plenty of documentation online so Google if in doubt.
• Dual-booting with Windows and a Linux distro
• Will basically involve partitioning your drive and installing Linux from an external bootable USB through your computer's boot menu. You'll get the full Linux experience.
• Lots of Linux flavors to choose from. For beginners, Ubuntu and Linux Mint are generally recommended. I have Ubuntu 18.04 LTS, I'd recommend Ubuntu 20.04 LTS since it's newer, but it's all up to you.
• However, it's a pain to setup and to constantly be switching between operating systems, so up to you. Maybe you wanna make the full jump to Linux, maybe you don't.
• Life pro tip: if you go this route, disable Window 10's Fast Startup feature as it will get very screwy with a dual-boot.
• Using a virtual machine (VM) to run Linux
• Devours RAM and is generally pretty slow, would not recommend.
• Using bash emulation software, like Putty or Git Bash
• bash stands for Bourne Again Shell (no, Bourne is not a typo), it's the most commonly used Linux shell these days
• bash emulators generally don't include a package manager, i.e. you can't download new bash programs, so pretty limited for general usage. BUT you can install a package manager externally, kind of hacky but can work.
• Using Windows Subsystem for Linux (either WSL 1 or WSL 2)
• WSL provides a compatibility layer for running Linux natively on Windows 10. It has integration features certain Windows 10 development apps (notably Visual Studio Code) as well.
• You've got two options, WSL 1 and WSL 2. WSL 2 was recently released and features a real Linux kernel, as opposed to an simulated kernel in WSL. This means WSL 2 offers significant performance advantages, but still lacks some of WSL 1's features.
• WSL 1 is what I currently use, and thus what I'll be talking about in this guide. I'm not necessarily recommending it, frankly I regret not doing a dual-boot sooner and ditching Windows, but a dual-boot isn't for everyone and takes a lot of time you might not have right now.
• Getting WSL initially setup is easy, but making it run smoothly requires some effort, and some features (like audio playback or displaying GUIs) require workarounds you can research if interested.
With that out of the way, let's get started with setting up WSL 1 on your Windows 10 machine.

## Setting up WSL

So if you've read this far I've convinced you to use WSL. Let's get started with setting it up. The very basics are outlined in Microsoft's guide here, I'll be covering what they talk about and diving into some other stuff.

### 1. Installing WSL

Press the Windows key (henceforth Winkey) and type in PowerShell. Right-click the icon and select run as administrator. Next, paste in this command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Now you'll want to perform a hard shutdown on your computer. This can become unecessarily complicated because of Window's fast startup feature, but here we go. First try pressing the Winkey, clicking on the power icon, and selecting Shut Down while holding down the shift key. Let go of the shift key and the mouse, and let it shutdown. Great! Now open up Command Prompt and type in
wsl --help
If you get a large text output, WSL has been successfully enabled on your machine. If nothing happens, your computer failed at performing a hard shutdown, in which case you can try the age-old technique of just holding down your computer's power button until the computer turns itself off. Make sure you don't have any unsaved documents open when you do this.

### 2. Installing Ubuntu

Great! Now that you've got WSL installed, let's download a Linux distro. Press the Winkey and type in Microsoft Store. Now use the store's search icon and type in Ubuntu. Ubuntu is a Debian-based Linux distribution, and seems to have the best integration with WSL, so that's what we'll be going for. If you want to be quirky, here are some other options. Once you type in Ubuntu three options should pop up: Ubuntu, Ubuntu 20.04 LTS, and Ubuntu 18.04 LTS.
![Windows Store](https://theshepord.github.io/intro-to-WSL/docs/images/winstore.png) Installing plain-old "Ubuntu" will mean the app updates whenever a new major Ubuntu distribution is released. The current version (as of 09/02/2020) is Ubuntu 20.04.1 LTS. The other two are older distributions of Ubuntu. For most use-cases, i.e. unless you're running some software that will break when upgrading, you'll want to pick the regular Ubuntu option. That's what I did.
Once that's done installing, again hit Winkey and open up Ubuntu. A console window should open up, asking you to wait a minute or two for files to de-compress and be stored on your PC. All future launches should take less than a second. It'll then prompt you to create a username and password. I'd recommend sticking to whatever your Windows username and password is so that you don't have to juggle around two different usepassword combinations, but up to you.
sudo apt-get update
And then
sudo apt-get upgrade
apt-get is the Ubuntu package manager, this is what you'll be using to install additional programs on WSL.

### 3. Making things nice and crispy: an introduction to UNIX-based filesystems

The two above steps are technically all you need for running WSL on your system. However, you may notice that whenever you open up the Ubuntu app your current folder seems to be completely random. If you type in pwd (for Present Working Directory, 'directory' is synonymous with 'folder') inside Ubuntu and hit enter, you'll likely get some output akin to /home/. Where is this folder? Is it my home folder? Type in ls (for LiSt) to see what files are in this folder. Probably you won't get any output, because surprise surprise this folder is not your Windows home folder and is in fact empty (okay it's actually not empty, which we'll see in a bit. If you type in ls -a, a for All, you'll see other files but notice they have a period in front of them, which tells bash that they should be hidden by default. Anyways).
So where is my Windows home folder? Is WSL completely separate from Windows? Nope! This is Windows Subsystem for Linux after all. Notice how, when you typed pwd earlier, the address you got was /home/. Notice that forward-slash right before home. That forward-slash indicates the root directory (not to be confused with the /root directory), which is the directory at the top of the directory hierarchy and contains all other directories in your system. So if we type ls /, you'll see what are the top-most directories in your system. Okay, great. They have a bunch of seemingly random names. Except, shocker, they aren't random. I've provided a quick run-down in Appendix A.
For now, though, we'll focus on /mnt, which stands for mount. This is where your C drive, which contains all your Windows stuff, is mounted. So if you type ls /mnt/c, you'll begin to notice some familiar folders. Type in ls /mnt/c/Users, and voilà, there's your Windows home folder. Remember this filepath, /mnt/c/Users/. When we open up Ubuntu, we don't want it tossing us in this random /home/ directory, we want our Windows home folder. Let's change that!

### 4. Changing your default home folder

Type in sudo vim /etc/passwd. You'll likely be prompted for your Ubuntu's password. sudo is a command that gives you root privileges in bash (akin to Windows's right-click then selecting 'Run as administrator'). vim is a command-line text-editing tool, kinda like an even crummier Notepad, which is a pain to use at first but bear with me and we can pull through. /etc/passwd is a plaintext file that does not store passwords, as the name would suggest, but rather stores essential user info used every time you open up WSL.
Anyway, once you've typed that in, your shell should look something like this: ![vim /etc/passwd](https://theshepord.github.io/intro-to-WSL/docs/images/vim-etc-passwd.png)
Using arrow-keys, find the entry that begins with your Ubuntu username. It should be towards the bottom of the file. In my case, the line looks like
theshep:x:1000:1000:,,,:/home/pizzatron3000:/bin/bash
See that cringy, crummy /home/pizzatron3000? Not only do I regret that username to this day, it's also not where we want our home directory. Let's change that! Press i to initiate vim's -- INSERT -- mode. Use arrow-keys to navigate to that section, and delete /home/ by holding down backspace. Remember that filepath I asked you to remember? /mnt/c/Users/. Type that in. For me, the line now looks like
theshep:x:1000:1000:,,,:/mnt/c/Users/lucas:/bin/bash
Next, press esc to exit insert mode, then type in the following:
:wq
The : tells vim you're inputting a command, w means write, and q means quit. If you've screwed up any of the above sections, you can also type in :q! to exit vim without saving the file. Just remember to exit insert mode by pressing esc before inputting commands, else you'll instead be writing to the file.
Great! If you now open up a new terminal and type in pwd, you should be in your Window's home folder! However, things seem to be lacking their usual color...

### 5. Importing your configuration files into the new home directory

Your home folder contains all your Ubuntu and bash configuration files. However, since we just changed the home folder to your Window's home folder, we've lost these configuration files. Let's bring them back! These configuration files are hidden inside /home/, and they all start with a . in front of the filename. So let's copy them over into your new home directory! Type in the following:
cp -r /home//* ~
cp stands for CoPy, -r stands for recursive (i.e. descend into directories), the * is a Kleene Star and means "grab everything that's here", and the ~ is a quick way of writing your home directory's filepath (which would be /mnt/c/Users/) without having to type all that in again. Once you've run this, all your configuration files should now be present in your new home directory. Configuration files like .bashrc, .profile, and .bash_profile essentially provides commands that are run whenever you open a new shell. So now, if you open a new shell, everything should be working normally. Amazing. We're done!

### 6. Tips & tricks

Here are two handy commands you can add to your .profile file. Run vim ~/.profile, then, type these in at the top of the .profile file, one per line, using the commands we discussed previously (i to enter insert mode, esc to exit insert mode, :wq to save and quit).
alias rm='rm -i' makes it so that the rm command will always ask for confirmation when you're deleting a file. rm, for ReMove, is like a Windows delete except literally permanent and you will lose that data for good, so it's nice to have this extra safeguard. You can type rm -f to bypass. Linux can be super powerful, but with great power comes great responsibility. NEVER NEVER NEVER type in rm -rf /, this is saying 'delete literally everything and don't ask for confirmation', your computer will die. You've been warned. Be careful.
export DISPLAY=:0 if you install XLaunch VcXsrv, this line allows you to open graphical interfaces through Ubuntu. The export sets the environment variable DISPLAY, and the :0 tells Ubuntu that it should use the localhost display.

## Appendix A: overview of top-level UNIX directories

tl;dr only mess with /mnt, /home, and maybe maybe /usr. Don't touch anything else.
• bin: binaries, contains Ubuntu binary (aka executable) files that are used in bash. Here you'll find the binaries that execute commands like ls and pwd. Similar to /usbin, but bin gets loaded earlier in the booting process so it contains the most important commands.
• boot: contains information for operating system booting. Empty in WSL, because WSL isn't an operating system.
• dev: devices, contains information for Ubuntu to communicate with I/O devices. One useful file here is /dev/null, which is basically an information black hole that automatically deletes any data you pass it.
• etc: no idea why it's called etc, but it contains system-wide configuration files
• home: equivalent to Window's C:/Users folder, contains home folders for the different users. In an Ubuntu system, under /home/ you'd find the Documents folder, Downloads folder, etc.
• lib: libraries used by the system
• lib64 64-bit libraries used by the system
• mnt: mount, where your drives are located
• opt: third-party applications that don't have any dependencies outside the scope of their own package
• proc: process information, contains details about your Linux system, kind of like Windows's C:/Windows folder
• run: directory for programs to store runtime information. Similarly to /bin vs /usbin, run has the same function as /varun, but gets loaded sooner in the boot process.
• srv: server folder, holds data to be served in protocols like ftp, www, cvs, and others
• sys: system, used by the Linux kernel to set or obtain information about the host system
• tmp: temporary, runtime files that are cleared out after every reboot. Kinda like RAM in that way.
• usr: contains additional UNIX commands, header files for compiling C programs, among other things. Most of everything you install using apt-get ends up here.
• var: variable, contains variable data such as logs, databases, e-mail etc, but that persist across different boots.

## glimpse into the future of Roblox

Our vision to bring the world together through play has never been more relevant than it is now. As our founder and CEO, David Baszucki (a.k.a. Builderman), mentioned in his keynote, more and more people are using Roblox to stay connected with their friends and loved ones. He hinted at a future where, with our automatic machine translation technology, Roblox will one day act as a universal translator, enabling people from different cultures and backgrounds to connect and learn from each other.
During his keynote, Builderman also elaborated upon our vision to build the Metaverse; the future of avatar creation on the platform (infinitely customizable avatars that allow any body, any clothing, and any animation to come together seamlessly); more personalized game discovery; and simulating large social gatherings (like concerts, graduations, conferences, etc.) with tens of thousands of participants all in one server. We’re still very early on in this journey, but if these past five months have shown us anything, it’s clear that there is a growing need for human co-experience platforms like Roblox that allow people to play, create, learn, work, and share experiences together in a safe, civil 3D immersive space.
Up next, our VP of Developer Relations, Matt Curtis (a.k.a. m4rrh3w), shared an update on all the things we’re doing to continue empowering developers to create innovative and exciting content through collaboration, support, and expertise. He also highlighted some of the impressive milestones our creator community has achieved since last year’s RDC. Here are a few key takeaways:
• Adopt Me! now has over 10 billion plays and surpassed 1.6 million concurrent users.
• Piggy, launched in January 2020, has close to 5 billion visits in just over six months.
• Developers are on track to earn over $250 million in 2020. • In June 2020, developers earned nearly$2 million from Premium Payouts, which rewards them based on the amount of engagement time Premium subscribers spend in their games.
• There are now 345,000 developers on the platform who are monetizing their games.
And lastly, our VP of Engineering, Technology, Adam Miller (a.k.a. rbadam), unveiled a myriad of cool and upcoming features developers will someday be able to sink their teeth into. We saw a glimpse of procedural skies, skinned meshes, more high-quality materials, new terrain types, more fonts in Studio, a new asset type for in-game videos, haptic feedback on mobile, real-time CSG operations, and many more awesome tools that will unlock the potential for even bigger, more immersive experiences on Roblox.

## Vibin’

Despite the virtual setting, RDC just wouldn’t have been the same without any fun party activities and networking opportunities. So, we invited special guests DJ Hyper Potions and cyber mentalist Colin Cloud for some truly awesome, truly mind-bending entertainment. Yoga instructor Erin Gilmore also swung by to inspire attendees to get out of their chair and get their body moving. And of course, we even had virtual rooms dedicated to karaoke and head-to-head social games, like trivia and Pictionary.
Over on the networking side, Team Adopt Me, Red Manta, StyLiS Studios, and Summit Studios hosted a virtual booth for attendees to ask questions, submit resumes, and more. We also had a networking session where three participants would be randomly grouped together to get to know each other.

## What does Roblox mean to you?

We all know how talented the Roblox community is from your creations. We’ve heard plenty of stories over the years about how Roblox has touched your lives, how you’ve made friendships, learned new skills, or simply found a place where you can be yourself. We wanted to hear more. So, we asked attendees: What does Roblox mean to you? How has Roblox connected you? How has Roblox changed your life? Then, over the course of RDC, we incorporated your responses into this awesome mural.
📷
Created by Alece Birnbach at Graphic Recording Studio

## Knowledge is power

This year’s breakout sessions included presentations from Roblox developers and staff members on the latest game development strategies, a deep dive into the Roblox engine, learning how to animate with Blender, tools for working together in teams, building performant game worlds, and the new Creator Dashboard. Dr. Michael Rich, Associate Professor at Harvard Medical School and Physician at Boston Children’s Hospital, also led attendees through a discussion on mental health and how to best take care of you and your friends’ emotional well-being, especially now during these challenging times.
📷
Making the Dream Work with Teamwork (presented by Roblox developer Myzta)
In addition to our traditional Q&A panel with top product and engineering leaders at Roblox, we also held a special session with Builderman himself to answer the community’s biggest questions.
📷
Roblox Product and Engineering Q&A Panel

## 2020 Game Jam

The Game Jam is always one of our favorite events of RDC. It’s a chance for folks to come together, flex their development skills, and come up with wildly inventive game ideas that really push the boundaries of what’s possible on Roblox. We had over 60 submissions this year—a new RDC record.
Once again, teams of up to six people from around the world had less than 24 hours to conceptualize, design, and publish a game based on the theme “2020 Vision,” all while working remotely no less! To achieve such a feat is nothing short of awe-inspiring, but as always, our dev community was more than up for the challenge. I’ve got to say, these were some of the finest creations we’ve seen.
WINNERS
Best in Show: Shapescape Created By: GhettoMilkMan, dayzeedog, maplestick, theloudscream, Brick_man, ilyannna You awaken in a strange laboratory, seemingly with no way out. Using a pair of special glasses, players must solve a series of anamorphic puzzles and optical illusions to make their escape.
Excellence in Visual Art: agn●sia Created By: boatbomber, thisfall, Elttob An obby experience unlike any other, this game is all about seeing the world through a different lens. Reveal platforms by switching between different colored lenses and make your way to the end.
Most Creative Gameplay: Visions of a perspective reality Created By: Noble_Draconian and Spathi Sometimes all it takes is a change in perspective to solve challenges. By switching between 2D and 3D perspectives, players can maneuver around obstacles or find new ways to reach the end of each level.
Outstanding Use of Tech: The Eyes of Providence Created By: Quenty, Arch_Mage, AlgyLacey, xJennyBeanx, Zomebody, Crykee This action/strategy game comes with a unique VR twist. While teams fight to construct the superior monument, two VR players can support their minions by collecting resources and manipulating the map.
Best Use of Theme: Sticker Situation Created By: dragonfrosting and Yozoh Set in a mysterious art gallery, players must solve puzzles by manipulating the environment using a magic camera and stickers. Snap a photograph, place down a sticker, and see how it changes the world.
OTHER TOP PICKS
HONORABLE MENTIONS
For the rest of the 2020 Game Jam submissions, check out the list below:
20-20 Vision | 20/20 Vision | 2020 Vision, A Crazy Perspective | 2020 Vision: Nyon | A Wild Trip! | Acuity | Best Year Ever | Better Half | Bloxlabs | Climb Stairs to 2021 | Double Vision (Team hey apple) | Eyebrawl | Eyeworm Exam | FIRE 2020 | HACKED | Hyperspective | Lucid Scream | Mystery Mansion | New Years at the Museum | New Year’s Bash | Poor Vision | Predict 2020 | RBC News | Retrovertigo | Second Wave | see no evil | Sight Fight | Sight Stealers | Spectacles Struggle | Specter Spectrum | Survive 2020 | The Lost Chicken Leg | The Outbreak | The Spyglass | Time Heist | Tunnel Vision | Virtual RDC – The Story | Vision (Team Freepunk) | Vision (Team VIP People ####) | Vision Developers Conference 2020 | Vision Is Key | Vision Perspective | Vision Racer | Visions | Zepto
And last but not least, we wanted to give a special shout out to Starboard Studios. Though they didn’t quite make it on time for our judges, we just had to include Dave’s Vision for good measure. 📷
Thanks to everyone who participated in the Game Jam, and congrats to all those who took home the dub in each of our categories this year. As the winners of Best in Show, the developers of Shapescape will have their names forever engraved on the RDC Game Jam trophy back at Roblox HQ. Great work!

## ‘Til next year

And that about wraps up our coverage of the first-ever digital RDC. Thanks to all who attended! Before we go, we wanted to share a special “behind the scenes” video from the 2020 RDC photoshoot.
Check it out:
It was absolutely bonkers. Getting 350 of us all in one server was so much fun and really brought back the feeling of being together with everyone again. That being said, we can’t wait to see you all—for real this time—at RDC next year. It’s going to be well worth the wait. ‘Til we meet again, my friends.

# Improving Simulation and Performance with an Advanced Physics Solver

## 05, 2020

by chefdeletat
PRODUCT & TECH
📷In mid-2015, Roblox unveiled a major upgrade to its physics engine: the Projected Gauss-Seidel (PGS) physics solver. For the first year, the new solver was optional and provided improved fidelity and greater performance compared to the previously used spring solver.
In 2016, we added support for a diverse set of new physics constraints, incentivizing developers to migrate to the new solver and extending the creative capabilities of the physics engine. Any new places used the PGS solver by default, with the option of reverting back to the classic solver.
We ironed out some stability issues associated with high mass differences and complex mechanisms by the introduction of the hybrid LDL-PGS solver in mid-2018. This made the old solver obsolete, and it was completely disabled in 2019, automatically migrating all places to the PGS.
In 2019, the performance was further improved using multi-threading that splits the simulation into jobs consisting of connected islands of simulating parts. We still had performance issues related to the LDL that we finally resolved in early 2020.
The physics engine is still being improved and optimized for performance, and we plan on adding new features for the foreseeable future.

## Implementing the Laws of Physics

📷
The main objective of a physics engine is to simulate the motion of bodies in a virtual environment. In our physics engine, we care about bodies that are rigid, that collide and have constraints with each other.
A physics engine is organized into two phases: collision detection and solving. Collision detection finds intersections between geometries associated with the rigid bodies, generating appropriate collision information such as collision points, normals and penetration depths. Then a solver updates the motion of rigid bodies under the influence of the collisions that were detected and constraints that were provided by the user.
📷
The motion is the result of the solver interpreting the laws of physics, such as conservation of energy and momentum. But doing this 100% accurately is prohibitively expensive, and the trick to simulating it in real-time is to approximate to increase performance, as long as the result is physically realistic. As long as the basic laws of motion are maintained within a reasonable tolerance, this tradeoff is completely acceptable for a computer game simulation.

## Taking Small Steps

The main idea of the physics engine is to discretize the motion using time-stepping. The equations of motion of constrained and unconstrained rigid bodies are very difficult to integrate directly and accurately. The discretization subdivides the motion into small time increments, where the equations are simplified and linearized making it possible to solve them approximately. This means that during each time step the motion of the relevant parts of rigid bodies that are involved in a constraint is linearly approximated.
📷📷
Although a linearized problem is easier to solve, it produces drift in a simulation containing non-linear behaviors, like rotational motion. Later we’ll see mitigation methods that help reduce the drift and make the simulation more plausible.

## Solving

📷
Having linearized the equations of motion for a time step, we end up needing to solve a linear system or linear complementarity problem (LCP). These systems can be arbitrarily large and can still be quite expensive to solve exactly. Again the trick is to find an approximate solution using a faster method. A modern method to approximately solve an LCP with good convergence properties is the Projected Gauss-Seidel (PGS). It is an iterative method, meaning that with each iteration the approximate solution is brought closer to the true solution, and its final accuracy depends on the number of iterations.
📷
This animation shows how a PGS solver changes the positions of the bodies at each step of the iteration process, the objective being to find the positions that respect the ball and socket constraints while preserving the center of mass at each step (this is a type of positional solver used by the IK dragger). Although this example has a simple analytical solution, it’s a good demonstration of the idea behind the PGS. At each step, the solver fixes one of the constraints and lets the other be violated. After a few iterations, the bodies are very close to their correct positions. A characteristic of this method is how some rigid bodies seem to vibrate around their final position, especially when coupling interactions with heavier bodies. If we don’t do enough iterations, the yellow part might be left in a visibly invalid state where one of its two constraints is dramatically violated. This is called the high mass ratio problem, and it has been the bane of physics engines as it causes instabilities and explosions. If we do too many iterations, the solver becomes too slow, if we don’t it becomes unstable. Balancing the two sides has been a painful and long process.

## Mitigation Strategies

📷A solver has two major sources of inaccuracies: time-stepping and iterative solving (there is also floating point drift but it’s minor compared to the first two). These inaccuracies introduce errors in the simulation causing it to drift from the correct path. Some of this drift is tolerable like slightly different velocities or energy loss, but some are not like instabilities, large energy gains or dislocated constraints.
Therefore a lot of the complexity in the solver comes from the implementation of methods to minimize the impact of computational inaccuracies. Our final implementation uses some traditional and some novel mitigation strategies:
1. Warm starting: starting with the solution from a previous time-step to increase the convergence rate of the iterative solver
2. Post-stabilization: reprojecting the system back to the constraint manifold to prevent constraint drift
3. Regularization: adding compliance to the constraints ensuring a solution exists and is unique
4. Pre-conditioning: using an exact solution to a linear subsystem, improving the stability of complex mechanisms
Strategies 1, 2 and 3 are pretty traditional, but 3 has been improved and perfected by us. Also, although 4 is not unheard of, we haven’t seen any practical implementation of it. We use an original factorization method for large sparse constraint matrices and a new efficient way of combining it with the PGS. The resulting implementation is only slightly slower compared to pure PGS but ensures that the linear system coming from equality constraints is solved exactly. Consequently, the equality constraints suffer only from drift coming from the time discretization. Details on our methods are contained in my GDC 2020 presentation. Currently, we are investigating direct methods applied to inequality constraints and collisions.

## Getting More Details

Traditionally there are two mathematical models for articulated mechanisms: there are reduced coordinate methods spearheaded by Featherstone, that parametrize the degrees of freedom at each joint, and there are full coordinate methods that use a Lagrangian formulation.
We use the second formulation as it is less restrictive and requires much simpler mathematics and implementation.
The Roblox engine uses analytical methods to compute the dynamic response of constraints, as opposed to penalty methods that were used before. Analytics methods were initially introduced in Baraff 1989, where they are used to treat both equality and non-equality constraints in a consistent manner. Baraff observed that the contact model can be formulated using quadratic programming, and he provided a heuristic solution method (which is not the method we use in our solver).
Instead of using force-based formulation, we use an impulse-based formulation in velocity space, originally introduced by Mirtich-Canny 1995 and further improved by Stewart-Trinkle 1996, which unifies the treatment of different contact types and guarantees the existence of a solution for contacts with friction. At each timestep, the constraints and collisions are maintained by applying instantaneous changes in velocities due to constraint impulses. An excellent explanation of why impulse-based simulation is superior is contained in the GDC presentation of Catto 2014.
The frictionless contacts are modeled using a linear complementarity problem (LCP) as described in Baraff 1994. Friction is added as a non-linear projection onto the friction cone, interleaved with the iterations of the Projected Gauss-Seidel.
The numerical drift that introduces positional errors in the constraints is resolved using a post-stabilization technique using pseudo-velocities introduced by Cline-Pai 2003. It involves solving a second LCP in the position space, which projects the system back to the constraint manifold.
The LCPs are solved using a PGS / Impulse Solver popularized by Catto 2005 (also see Catto 2009). This method is iterative and considers each individual constraints in sequence and resolves it independently. Over many iterations, and in ideal conditions, the system converges to a global solution.
Additionally, high mass ratio issues in equality constraints are ironed out by preconditioning the PGS using the sparse LDL decomposition of the constraint matrix of equality constraints. Dense submatrices of the constraint matrix are sparsified using a method we call Body Splitting. This is similar to the LDL decomposition used in Baraff 1996, but allows more general mechanical systems, and solves the system in constraint space. For more information, you can see my GDC 2020 presentation.
The architecture of our solver follows the idea of Guendelman-Bridson-Fedkiw, where the velocity and position stepping are separated by the constraint resolution. Our time sequencing is:
2. Constraint resolution in velocity space and position space
This scheme has the advantage of integrating only valid velocities, and limiting latency in external force application but allowing a small amount of perceived constraint violation due to numerical drift.
An excellent reference for rigid body simulation is the book Erleben 2005 that was recently made freely available. You can find online lectures about physics-based animation, a blog by Nilson Souto on building a physics engine, a very good GDC presentation by Erin Catto on modern solver methods, and forums like the Bullet Physics Forum and GameDev which are excellent places to ask questions.

## In Conclusion

The field of game physics simulation presents many interesting problems that are both exciting and challenging. There are opportunities to learn a substantial amount of cool mathematics and physics and to use modern optimizations techniques. It’s an area of game development that tightly marries mathematics, physics and software engineering.
Even if Roblox has a good rigid body physics engine, there are areas where it can be improved and optimized. Also, we are working on exciting new projects like fracturing, deformation, softbody, cloth, aerodynamics and water simulation.
Neither Roblox Corporation nor this blog endorses or supports any company or service. Also, no guarantees or promises are made regarding the accuracy, reliability or completeness of the information contained in this blog.
This blog post was originally published on the Roblox Tech Blog.

# Using Clang to Minimize Global Variable Use

## 23, 2020

by RandomTruffle
PRODUCT & TECH
Every non-trivial program has at least some amount of global state, but too much can be a bad thing. In C++ (which constitutes close to 100% of Roblox’s engine code) this global state is initialized before main() and destroyed after returning from main(), and this happens in a mostly non-deterministic order. In addition to leading to confusing startup and shutdown semantics that are difficult to reason about (or change), it can also lead to severe instability.
Roblox code also creates a lot of long-running detached threads (threads which are never joined and just run until they decide to stop, which might be never). These two things together have a very serious negative interaction on shutdown, because long-running threads continue accessing the global state that is being destroyed. This can lead to elevated crash rates, test suite flakiness, and just general instability.
The first step to digging yourself out of a mess like this is to understand the extent of the problem, so in this post I’m going to talk about one technique you can use to gain visibility into your global startup flow. I’m also going to discuss how we are using this to improve stability across the entire Roblox game engine platform by decreasing our use of global variables.

## Introducing -finstrument-functions

Nothing excites me more than learning about a new obscure compiler option that I’ve never had a use for before, so I was pretty happy when a colleague pointed me to this option in the Clang Command Line Reference. I’d never used it before, but it sounded very cool. The idea being that if we could get the compiler to tell us every time it entered and exited a function, we could filter this information through a symbolizer of some kind and generate a report of functions that a) occur before main(), and b) are the very first function in the call-stack (indicating it’s a global).
Unfortunately, the documentation basically just tells you that the option exists with no mention of how to use it or if it even actually does what it sounds like it does. There’s also two different options that sound similar to each other (-finstrument-functions and -finstrument-functions-after-inlining), and I still wasn’t entirely sure what the difference was. So I decided to throw up a quick sample on godbolt to see what happened, which you can see here. Note there are two assembly outputs for the same source listing. One uses the first option and the other uses the second option, and we can compare the assembly output to understand the differences. We can gather a few takeaways from this sample:
1. The compiler is injecting calls to __cyg_profile_func_enter and __cyg_profile_func_exit inside of every function, inline or not.
2. The only difference between the two options occurs at the call-site of an inline function.
3. With -finstrument-functions, the instrumentation for the inlined function is inserted at the call-site, whereas with -finstrument-functions-after-inlining we only have instrumentation for the outer function. This means that when using-finstrument-functions-after-inlining you won’t be able to determine which functions are inlined and where.
Of course, this sounds exactly like what the documentation said it did, but sometimes you just need to look under the hood to convince yourself.
To put all of this another way, if we want to know about calls to inline functions in this trace we need to use -finstrument-functions because otherwise their instrumentation is silently removed by the compiler. Sadly, I was never able to get -finstrument-functions to work on a real example. I would always end up with linker errors deep in the Standard C++ Library which I was unable to figure out. My best guess is that inlining is often a heuristic, and this can somehow lead to subtle ODR (one-definition rule) violations when the optimizer makes different inlining decisions from different translation units. Luckily global constructors (which is what we care about) cannot possibly be inlined anyway, so this wasn’t a problem.
I suppose I should also mention that I still got tons of linker errors with -finstrument-functions-after-inlining as well, but I did figure those out. As best as I can tell, this option seems to imply –whole-archive linker semantics. Discussion of –whole-archive is outside the scope of this blog post, but suffice it to say that I fixed it by using linker groups (e.g. -Wl,–start-group and -Wl,–end-group) on the compiler command line. I was a bit surprised that we didn’t get these same linker errors without this option and still don’t totally understand why. If you happen to know why this option would change linker semantics, please let me know in the comments!

## Implementing the Callback Hooks

If you’re astute, you may be wondering what in the world __cyg_profile_func_enter and __cyg_profile_func_exit are and why the program is even successfully linking in the first without giving undefined symbol reference errors, since the compiler is apparently trying to call some function we’ve never defined. Luckily, there are some options that allow us to see inside the linker’s algorithm so we can find out where it’s getting this symbol from to begin with. Specifically, -y should tell us how the linker is resolving . We’ll try it with a dummy program first and a symbol that we’ve defined ourselves, then we’ll try it with __cyg_profile_func_enter .
[email protected]:~/src/sandbox$cat instr.cpp int main() {} [email protected]:~/src/sandbox$ clang++-9 -fuse-ld=lld -Wl,-y -Wl,main instr.cpp /usbin/../lib/gcc/x86_64-linux-gnu/crt1.o: reference to main /tmp/instr-5b6c60.o: definition of main
No surprises here. The C Runtime Library references main(), and our object file defines it. Now let’s see what happens with __cyg_profile_func_enter and -finstrument-functions-after-inlining.
[email protected]:~/src/sandbox$clang++-9 -fuse-ld=lld -finstrument-functions-after-inlining -Wl,-y -Wl,__cyg_profile_func_enter instr.cpp /tmp/instr-8157b3.o: reference to __cyg_profile_func_enter /lib/x86_64-linux-gnu/libc.so.6: shared definition of __cyg_profile_func_enter Now, we see that libc provides the definition, and our object file references it. Linking works a bit differently on Unix-y platforms than it does on Windows, but basically this means that if we define this function ourselves in our cpp file, the linker will just automatically prefer it over the shared library version. Working godbolt link without runtime output is here. So now you can kind of see where this is going, however there are still a couple of problems left to solve. 1. We don’t want to do this for a full run of the program. We want to stop as soon as we reach main. 2. We need a way to symbolize this trace. The first problem is easy to solve. All we need to do is compare the address of the function being called to the address of main, and set a flag indicating we should stop tracing henceforth. (Note that taking the address of main is undefined behavior[1], but for our purposes it gets the job done, and we aren’t shipping this code, so ¯\_(ツ)_/¯). The second problem probably deserves a little more discussion though. ## Symbolizing the Traces In order to symbolize these traces, we need two things. First, we need to store the trace somewhere on persistent storage. We can’t expect to symbolize in real time with any kind of reasonable performance. You can write some C code to save the trace to some magic filename, or you can do what I did and just write it to stderr (this way you can pipe stderr to some file when you run it). Second, and perhaps more importantly, for every address we need to write out the full path to the module the address belongs to. Your program loads many shared libraries, and in order to translate an address into a symbol, we have to know which shared library or executable the address actually belongs to. In addition, we have to be careful to write out the address of the symbol in the file on disk. When your program is running, the operating system could have loaded it anywhere in memory. And if we’re going to symbolize it after the fact we need to make sure we can still reference it after the information about where it was loaded in memory is lost. The linux function dladdr() gives us both pieces of information we need. A working godbolt sample with the exact implementation of our instrumentation hooks as they appear in our codebase can be found here. ## Putting it All Together Now that we have a file in this format saved on disk, all we need to do is symbolize the addresses. addr2line is one option, but I went with llvm-symbolizer as I find it more robust. I wrote a Python script to parse the file and symbolize each address, then print it in the same “visual” hierarchical format that the original output file is in. There are various options for filtering the resulting symbol list so that you can clean up the output to include only things that are interesting for your case. For example, I filtered out any globals that have boost:: in their name, because I can’t exactly go rewrite boost to not use global variables. The script isn’t as simple as you would think, because simply crawling each line and symbolizing it would be unacceptably slow (when I tried this, it took over 2 hours before I finally killed the process). This is because the same address might appear thousands of times, and there’s no reason to run llvm-symbolizer against the same address multiple times. So there’s a lot of smarts in there to pre-process the address list and eliminate duplicates. I won’t discuss the implementation in more detail because it isn’t super interesting. But I’ll do even better and provide the source! So after all of this, we can run any one of our internal targets to get the call tree, run it through the script, and then get output like this (actual output from a Roblox process, source file information removed): excluded_symbols = [‘.\boost.*’]* excluded_modules = [‘/usr.\’]* /uslib/x86_64-linux-gnu/libLLVM-9.so.1: 140 unique addresses InterestingRobloxProcess: 38928 unique addresses /uslib/x86_64-linux-gnu/libstdc++.so.6: 1 unique addresses /uslib/x86_64-linux-gnu/libc++.so.1: 3 unique addresses Printing call tree with depth 2 for 29276 global variables. __cxx_global_var_init.5 (InterestingFile1.cpp:418:22) RBX::InterestingRobloxClass2::InterestingRobloxClass2() (InterestingFile2.cpp.:415:0) __cxx_global_var_init.19 (InterestingFile2.cpp:183:34) (anonymous namespace)::InterestingRobloxClass2::InterestingRobloxClass2() (InterestingFile2.cpp:171:0) __cxx_global_var_init.274 (InterestingFile3.cpp:2364:33) RBX::InterestingRobloxClass3::InterestingRobloxClass3() So there you have it: the first half of the battle is over. I can run this script on every platform, compare results to understand what order our globals are actually initialized in in practice, then slowly migrate this code out of global initializers and into main where it can be deterministic and explicit. ## Future Work It occurred to me sometime after implementing this that we could make a general purpose profiling hook that exposed some public symbols (dllexport’ed if you speak Windows), and allowed a plugin module to hook into this dynamically. This plugin module could filter addresses using whatever arbitrary logic that it was interested in. One interesting use case I came up for this is that it could look up the debug information, check if the current address maps to the constructor of a function local static, and write out the address if so. This effectively allows us to gain a deeper understanding of the order in which our lazy statics are initialized. The possibilities are endless here. ## Further Reading If you’re interested in this kind of thing, I’ve collected a couple of my favorite references for this kind of topic. 1. Various: The C++ Language Standard 2. Matt Godbolt: The Bits Between the Bits: How We Get to main() 3. Ryan O’Neill: Learning Linux Binary Analysis 4. Linkers and Loaders: John R. Levine 5. https://eel.is/c++draft/basic.exec#basic.start.main-3 Neither Roblox Corporation nor this blog endorses or supports any company or service. Also, no guarantees or promises are made regarding the accuracy, reliability or completeness of the information contained in this blog. submitted by jaydenweez to u/jaydenweez [link] [comments] ##### System Programming Language Ideas I am an embedded electronics guy who has several years of experience in the industry, mainly with writing embedded software in C at the high level and the low level. My goal is to start fresh with some projects in terms of software platforms, so I have been looking at whether to use existing programming languages. I want my electronics / software to be open, but therein lies part of the problem. I have experience using and evaluating many compilers during my experience such as the proprietary stuff (IAR) and open source stuff (clang , gcc, etc.). I have nothing against the open source stuff; however, the companies I have worked for (and I) always come crawling back to IAR. Why? Its not a matter of the compiler believe it or not! Its a matter of the linker. I took a cursory look at the latest gnu / clang linkers and I do not think that have fixed the major issue we always had with these linkers: memory flood fill. Specifying where each object or section is in the memory is fine for small projects or very small teams (1 to 2 people). However, when you have a bigger team (> 2) and you are using microcontrollers with segmented memory (all memory blocks are not contiguous), memory flood fill becomes a requirement of the linker. Often is the case that the MCUs I and others work on do not have megabytes of memory, but kilobytes. The MCU is chosen for the project and if we are lucky to get one with lots of memory, then you know why such a chip was chosen - there is a large memory requirement in the software.. we would not choose a large memory part if we did not need it due to cost. Imagine a developer is writing a library or piece of code whose memory requirement is going to change by single or tens kilobytes each (added or subtracted) commit. Now imagine having to have this developer manually manage the linker script for their particular dev station each time to make sure the linker doesn't cough based on what everybody else has put it in there. On top of that, they need to manually manage the script if it needs to be changed when they commit and hope that nobody else needed to change it as well for whatever they were developing. For even a small amount of developers, manually managing the script has way too many moving parts to be efficient. Memory flood fill solves this problem. IAR (in addition to a few other linkers like Segger's) allow me to just say: "Here are the ten memory blocks on the device. I have a .text section. You figure out how to spread out all the data across those blocks." No manual script modifications required by each developer for their current dev or requirement to sync at the end when committing. It just works. Now.. what's the next problem? I don't want to use IAR (or Segger)! Why? If my stuff is going to be open to the public on my repositories.. don't you think it sends the wrong message if I say: "Well, here is the source code everybody! But Oh sorry, you need to get a seat of IAR if you want to build it the way I am or figure out how to build it yourself with your own tool chain". In addition, let's say that we go with Segger's free stuff to get by the linker problem. Well, what if I want to make a sellable product based on the open software? Still need to buy a seat, because Segger only allows non commercial usage of their free stuff. This leaves me with using an open compiler. To me, memory flood fill for the linker is a requirement. I will not use a C tool chain that does not have this feature. My compiler options are clang, gcc, etc. I can either implement a linker script generator or a linker itself. Since I do not need to support dynamic link libraries or any complicated virtual memory stuff in the linker, I think implementing a linker is easily doable. The linker script generator is the simple option, but its a hack and therefore I would not want to partake in it. Basically before the linker (LD / LLD) is invoked, I would go into all the object files and analyze all of their memory requirements and generate a linker script that implements the flood fill as a pre step. Breaking open ELF files and analyzing them is pretty easy - I have done it in the past. The pre step would have my own linker script format that includes provisions for memory flood fill. Since this is like invoking the linker twice.. its a hack and speed detriment for something that I think should have been a feature of LD / LLD decades ago. "Everybody is using gnu / clang with LD / LLD! Why do you think you need flood fill?" To that I respond with: "People who are using gnu / clang and LD / LLD are either on small teams (embedded) OR they are working with systems that have contiguous memory and don't have to worry about segmented memory. Case and point Phones, Laptops, Desktops, anything with external RAM" Pick one reason. I am sure there are other reasons beyond those two in which segmented memory is not an issue. Maybe the segmented memory blocks are so large that you can ignore most of them for one program - early Visual GDB had this issue.. you would go into the linker scripts to find that for chips like the old NXP 4000 series that they were only choosing a single RAM block for data memory because of the linker limitation. This actually horrendously turned off my company from using gnu / clang at the time. In embedded systems where MCUs are chosen based on cost, the amount of memory is specifically chosen to meet that cost. You can't just "ignore" a memory block due to linker limitations. This would require either to buy a different chip or more expensive chip that meets the memory requirements. ANYWAYS.. long winded prelude to what has led me to looking at making my own programming language. TLDR: I want my software to be open.. I want people to be able to easily build it without shelling out an arm and a leg, and I am a person who is not fond of hacks because of, what I believe, are oversights in the design of existing software. Why not use Rust, Nim, Go, Zig, any of those languages? No. Period. No. I work with small embedded systems running with small memory microcontrollers as well as a massive number of other companies / developers. Small embedded systems are what make most of the world turn. I want a systems programming language that is as simple as C with certain modern developer "niceties". This does not mean adding the kitchen sink.. generics, closures, classes ................ 50 other things because the rest of the software industry has been using these for years on higher level languages. It is my opinion that the reason that nothing has (or will) displace C in the past, present, or near future is because C is stupid simple. Its basically structures, functions, and pointers... that's it! Does it have its problems? Sure! However, at the end of the day developers can pick up a C program and go without a huge hassle. Why can't we have a language that sticks to this small subset or "core" functionality instead of trying to add the kitchen sink with all these features of other languages? Just give me my functions and structures, and iterate on that. Let's fix some of the developer productivity issues while we are at it.. and no I don't mean by adding generics and classes. I mean more of getting rid of header files and allowing CTFE. "D is what you want." No.. no it's not. That is a prime example of kitchen sink and the kitchen sink of 50 large corporations across the the block. What are the problems I think need to be solved in a C replacement? 1. Header files. 2. Implementation hiding. Don't know the size of that structure without having to manually manage the size of that structure in a header or exposing all the fields of that structure in a header. Every change of the library containing that structure causes a recompile all the way up the chain on all dependencies. 3. CTFE (compile time function execution). I want to be able to assign type safe constants to things on initialization. 4. Pointers replaced with references? I am on the fence with this one. I love the power of pointers, but I realize after research where the industry is trying to go. These are the things I think that need to be solved. Make my life easier as a developer, but also give me something as stupid simple as C. I have some ideas of how to solve some of these problems. Disclaimer: some things may be hypocritical based on the prelude discussion; however, as often is the case, not 'every' discussion point is black and white. 1. Header Files Replace with a module / package system. There exists a project folder wherein there lies a .build script. The compiler runs the build script and builds the project. Building is part of the language / compiler, but dependency and versioning is not. People will be on both sides of the camp.. for or against this. However, it appears that most module type languages require specifying all of the input files up front instead of being able to "dumb compile" like C / C++ due to the fact that all source files are "truly" dumbly independent. Such a module build system would be harder to make parallel due to module dependencies; however, in total, required build "computation" (not necessarily time) is less. This is because the compiler knows everything up front that makes a library and doesn't have to spawn a million processes (each taking its own time) for each source file. 1. Implementation hiding What if it was possible to make a custom library format for the language? Libraries use this custom format and contain "deferrals" for a lot of things that need to be resolved. During packaging time, the final output stage, link time, whatever you want to call it (the executable output), the build tool resolves all of the deferrals because it now knows all parts of input "source" objects. What this means is that the last stage of the build process will most likely take the longest because it is also the stage that generates the code. What is a deferral? Libraries are built with type information and IR like code for each of the functions. The IR code is a representation that can be either executed by interpreter (for CTFE) or converted to binary instructions at the last output stage. A deferral is a node within the library that requires to be resolved at the last stage. Think of it like an unresolved symbol but for mostly constants and structures. Inside my library A I have a structure that has a bunch of fields. Those fields may be public or private. Another library B wants to derive from that structure. It knows the structure type exists and it has these public fields. The library can make usage of those public fields. Now at the link stage the size of the structure and all derivative structures and fields are resolved. A year down the road library A changes to add a private field to the structure. Library B doesn't care as long as the type name of the structure or its public members that it is using are not changed. Pull in the new library into the link stage and everything is resolved at that time. I am an advocate for just having plain old C structures but having the ability to "derive" sub structures. Structures would act the same exact way as in C. Let's say you have one structure and then in a second structure you put the first field as the "base" field. This is what I want to have the ability to do in a language.. but built in support for it through derivation and implementation hiding. Memory layout would be exactly like in C. The structures are not classes or anything else. I have an array of I2C ports in a library; however, I have no idea how many I2C ports there should be until link time. What to do!? I define a deferred constant for the size of the array that needs to be resolved at link time. At link time the build file passes the constant into the library. Or it gets passed as a command line argument. What this also allows me to do is to provide a single library that can be built using any architecture at link time. 1. CTFE Having safe type checked ways to define constants or whatever, filled in by the compiler, I think is a very good mechanism. Since all of the code in libraries is some sort of IR, it can be interpreted at link time to fill in all the blanks. The compiler would have a massive emphasis on analyzing which things are constants in the source code and can be filled in at link time. There would exist "conditional compilation" in that all of the code exists in the library; however, at link time the conditional compilation is evaluated and only the areas that are "true" are included in the final output. 1. Pointers & References & Type safety I like pointers, but I can see the industry trend to move away from them in newer languages. Newer languages seem to kneecap them compared to what you can do in C. I have an idea of a potential fix. Pointers or some way is needed to be able to access hardware registers. What if the language had support for references and pointers, but pointers are limited to constants that are filled in by the build system? For example, I know hardware registers A, B, and C are at these locations (maybe filled in by CTFE) so I can declare them as constants. Their values can never be changed at runtime; however, what a pointer does is indicate to the compiler to access a piece of memory using indirection. There would be no way to convert a pointer to a reference or vise versa. There is no way to assign a pointer to a different value or have it point anything that exists (variables, byte arrays, etc..). Then how do we perform a UART write with a block of data? I said there would be no way to convert a reference ( a byte array for example) to a pointer, but I did not say you could not take the address of a reference! I can take the address of a reference (which points to a block of variable memory) and convert to it to an integer. You can perform any math you want with that integer but you can't actually convert that integer back into a reference! As far as the compiler is concerned, the address of a reference is just integer data. Now I can pass that integer into a module that contains a pointer and write data to memory using indirection. As far as the compiler is concerned, pointers are just a way to tell the compiler to indirectly read and write memory. It would treat pointers as a way to read and write integer data to memory by using indirection. There exists no mechanism to convert a pointer to a reference. Since pointers are essentially constants, and we have deferrals and CTFE, the compiler knows what all those pointers are and where they point to. Therefore it can assure that no variables are ever in a "pointed to range". Additionally, for functions that use pointers - let's say I have a block of memory where you write to each 1K boundary and it acts as a FIFO - the compiler could check to make sure you are not performing any funny business by trying to write outside a range of memory. What are references? References are variables that consist of say 8 bytes of data. The first 4 bytes are an address and the next 4 bytes is type information. There exists a reference type (any) that be used for assigning any type to it (think void*). The compiler will determine if casts are safe via the type information and for casts it can't determine at build time, it will insert code to check the cast using the type information. Functions would take parameters as ByVal or ByRef. For example DoSomething(ByRef ref uint8 val, uint8 val2, uint8[] arr). The first parameter is passing by reference a reference to a uint8 (think double pointer). Assigning to val assigns to the reference. The second parameter is passed by value. The third parameter (array type) is passed by reference implicitly. 1. Other Notes This is not an exhaustive list of all features I am thinking of. For example visibility modifiers - public, private, module for variables, constants, and functions. Additionally, things could have attributes like in C# to tell the compiler what to do with a function or structure. For example, a structure or field could have a volatile attribute. I want integration into the language for inline assembly for the architecture. So you could place a function attribute like [Assembly(armv7)]. This could tell the compiler that the function is all armv7 assembly and the compiler will verify it. Having assembly integrated also allows all the language features to be available to the assembly like constants. Does this go against having an IR representation of the library? No. functions have weak or strong linkage. Additionally, there could be a function attribute to tell the compiler: "Hey when the link stage is using an armv7 target, build this function in". There could also be a mechanism for inline assembly and intrinsics. Please keep in mind that my hope is not to see another C systems language for larger systems (desktop, phones, laptops, etc.) Its solely to see it for small embedded systems and microcontrollers. I think this is why many of the newer languages (Go, Nim, Zig, etc..) have not been adopted in embedded - they started large and certain things were tacked on to "maybe" support smaller devices. I also don't want to have a runtime with my embedded microcontroller; however, I am not averse to the compiler putting bounds checks and casting checks into the assembly when it needs to. For example, if a cast fails, the compiler could just trap in a "hook" defined by the user that includes the module and line number of where the cast failed. It doesn't even matter that the system hangs or locks up as long as I know where to look to fix the bug. I can't tell you how many times something like this would be invaluable for debugging. In embedded, many of us say that its better for the system to crash hard than limp along because of an array out of bounds or whatever. Maybe it would be possible to restart the system in the event of such a crash or do "something" (like for a cruise missile :)). This is intended to be a discussion and not so much a religious war or to state I am doing this or that. I just wanted to "blurt out" some stuff I have had on my mind for awhile. submitted by LostTime77 to ProgrammingLanguages [link] [comments] ##### more related issues more related issues in the conversion of old and new systems, the most difficult one is uuuuuuuuuuuuuuu. 1. Among the following options, the one that does not belong to the combination of two parameters, one change and three combinations: the form control that can accept numerical data input is. Internal gateway protocol is divided into: distance vector routing protocol, and hybrid routing protocol. Firewall can prevent the transmission of infected software or files among the following coupling types, the lowest coupling degree is (). The () property of the Navigator object returns the platform and version information of the browser. What are the main benefits of dividing IP subnets? () if users want to log in to the remote server and become a simulation terminal of the remote server temporarily, they can use the [26-255] software life cycle provided by the remote host, which means that most operating systems, such as DOS, windows, UNIX, etc., adopt tree structureFolder structure. An array is a group of memory locations related by the fact that they all have __________ name and __________ Type. in Windows XP, none of the characters in the following () symbol set can form a file name. [2008 vocational college] among the following options, the ones that do not belong to the characteristics of computer viruses are: in the excel 2010 cell Format dialog box, the nonexistent tab is the boys___ The teacher talked to are from class one. for an ordered table with length of 18, if the binary search is used, the length of the search for the 15th element is (). SRAM memory is______ Memory. () is a website with certain complementary advantages. It places the logo or website name of the other party's website on its own website, and sets the hyperlink of each other's website, so that users can find their own website from the cooperative website and achieve the purpose of mutual promotion. 1. Accounting qualification is managed by information technology () which of the following devices can forward the communication between different VLANs? The default port number of HTTP hypertext transfer protocol is: forIn the development method of object, () will be the dominant standard modeling language in the field of object-oriented technology. When you visit a website, what is the first page you see? File D:\\ city.txt The content is as follows: Beijing Tianjin Shanghai Chongqing writes the following event process: privatesub form_ click() Dim InD Open \d:\\ city.txt \For input as ? 1 do while not EOF (1) line input ? 1, Ind loop close 1 print ind End Sub run the program, click the form, and the output result is. When users use dial-up telephone lines to access the Internet, the most commonly used protocol is. In the I2C system, the main device is usually taken by the MCU with I2C bus interface, and the slave device must have I2C bus interface. The basic types of market research include () the function of the following program is: output all integers within 100 that can be divisible by 3 and have single digits of 6. What should be filled in the underline is (). 56b33287e4b0e85354c031b5. PNG the infringement of the scope of intellectual property rights is: multimedia system is a computer that can process sound and image interactivelySystem. In order to allow files of different users to have the same file name, () is usually used in the file system. The following () effects are not included in PowerPoint 2010 animation effects. Macro virus can infect________ Documents. The compiled Java program can be executed directly. In PowerPoint, when adding text to a slide with AutoShape, how to indicate that text can be edited on the image when an AutoShape is selected () organizational units can put users, groups, computers and other units into the container of the active directory. Ethernet in LAN adopts the combination technology of packet switching and circuit switching. () interaction designers need to design information architecture and interface details. In the process of domain name resolution, the local domain name server queries the root domain name server by using the search method. What stage of e-commerce system development life cycle does data collection and processing preparation belong to? Use the "ellipse" tool on the Drawing toolbar of word, press the () key and drag the mouse to draw a circle. The proportion of a country's reserve position in the IMF, including the convertible currency part of the share subscribed by Member States to the IMF, and the portion that can be paid in domestic currency, respectively. 1. When installing Windows 7 operating system, the system disk partition must be in format before installation. High rise buildings, public places of entertainment and other decoration, in order to prevent fire should be used____。 () with regard to the concept of area in OSPF protocol, what is wrong in the following statements is () suppose that the channel bandwidth is 4000Hz and the modulation is 256 different symbols. According to the Nyquist theorem, the data rate of the ideal channel is () which of the following is the original IEEE WLAN standard ()? What is correct about data structure is: the key deficiency of waterfall model is that (). The software development mode with almost no product plan, schedule and formal development process is in the following description of computers, the correct one is ﹥ Because human eyes are sensitive to chroma signal, the sampling frequency of luminance signal can be lower than that of chroma signal when video signal is digitized, so as to reduce the amount of digital video data. [47-464] what is correct in the following statements is ISO / IEC WG17 is responsible for the specific drafting, discussion, amendment, formulation, voting and publication of the final ISO international standards for iso14443, iso15693 and iso15693 contactless smart lock manufacturers smart card standards. Examples of off - balance - sheet activities include _________ The correct description of microcomputer is (). Business accident refers to the accident caused by the failure of operation mechanism of tourism service department. It can be divided into (). IGMP Network AssociationWhat is the function of the discussion? Using MIPS as the unit to measure the performance of the computer, it refers to the computer______ In the excel workbook, after executing the following code, the value of cell A3 of sheet 1 is________ Sub test1() dim I as integer for I = 1 to 5 Sheet1. Range (\ \ a \ \ & I) = I next inend sub What are the characteristics of electronic payment compared with traditional payment? When the analog signal is encoded by linear PCM, the sampling frequency is 8kHz, and the code energy control unit is 8 bits, then the information transmission rate is () 1. The incorrect discussion about the force condition of diesel engine connecting rod is. Software testing can be endless. The game software running on the windows platform of PC is sent to the mobile phone of Android system and can run normally. The following is not true about the video. The way to retain the data in the scope of request is () distribution provides the basis and support for the development of e-commerce. 1. Which of the following belong to the content of quality control in the analysis 1. During the operation of a program, the CNC system appears "soft limit switch overrun", which belongs to 2. The wrong description of the gas pipe is () 3. The following statement is wrong: () the TCP / IP protocol structure includes () layer. Add the records in table a to table B, and keep the original records in table B. the query that should be used is. For additives with product anti-counterfeiting certification mark, after confirming that the product is in conformity with the factory quality certificate and the real object, one copy () shall be taken and pasted on the ex factory quality certificate of the product and filed together. () accounts are disabled by default. A concept of the device to monitor a person's bioparameters is that it should. 1. For the cephalic vein, the wrong description is an image with a resolution of 16 pixels × 16 pixels and a color depth of 8 bits, with the data capacity of at least______ Bytes. (0.3 points) 2. What are the requirements for the power cord of hand-held electric tools? In the basic mode of electronic payment, credit card belongs to () payment system. The triode has three working states: amplification, saturation and cut-off. In the digital circuit, when the transistor is used as a switch, it works in two states of saturation or cut-off. Read the attached article and answer the following: compared with today's music, those of the past () refers to the subjective conditions necessary for the successful completion of an activity. In the OSI reference model, what is above the network layer is_______ 。 The decision tree corresponding to binary search is not only a binary search tree, but also an ideal balanced binary tree. In order to guide the interconnection, interoperability and interoperability of computer networks, ISO has issued the OSI reference model, and its basic structure is divided into 26_______ It belongs to the information system operation document. In C ? language, the following operators have the highest priority___ ? the full Chinese name of BPR is () please read the following procedures: dmain() {int a = 5, B = 0, C = 0; if (a = B + C) printf (\ * * ＼ n \); else printf (\$$n \);} the above programs () software is not a common tool for web page making. When a sends a message to B, in order to achieve security, a needs to encrypt the message with (). The Linux exchange partition is used to save the visited web page files. 1. Materials consumed by the basic workshop may be included in the () cost item. The coverage of LAN is larger than that of Wan. Regarding the IEEE754 standard of real number storage, the wrong description is______ Task 4: convert decimal number to binary, octal and hexadecimal number [Topic 1] (1134.84375) 10 = () 2=（）8 = () 16 the purpose of image data compression is to () in IE browser, to view the frequently visited sites that have been saved, you need to click. 1. When several companies jointly write a document, the document number of each company should be quoted in the header at the same time. () assuming that the highest frequency of analog signal is 10MHz, and the sampling frequency must be greater than (), then the sample signal can not be distorted. The incredible performing artist from Toronto. in access, the relationship between a table and a database is. In word 2010, the following statement about the initial drop is correct. Interrupt service sub function does not need to be called in the program, but after applying for interrupt, the CPU automatically finds the corresponding program according to the interrupt number. Normal view mode is the default view mode for word documents. A common variable is defined as follows: Union data {int a; int b; float C;} data; how much memory space does the variable data occupy in VC6.0? ______ It is not a relational database management system. In the basic model of decision support system, what is in the core position is: among the following key factors of software outsourcing projects, () is the factor that affects the final product quality and production efficiency of software outsourcing. Word Chinese textThe shortcut for copying is (). submitted by Amanda2020-jumi to u/Amanda2020-jumi [link] [comments] ##### Mega Unpopular Opinion: Take-home projects can be great! Ah, I have been debating whether or not I wanted to write this for a while now, but after seeing a few recent threads with 10-50 comments unanimously hating on take-home projects, I figured I would share my opinion. Some of you may not read until the end, so let me preface this by saying not all take-home projects are great. I am on your side in that you should not complete a take-home project if any of the following are true: • The take-home project is the first step of the interview process or if you have not spoken to a hiring manager / technical invidivdual • You do not really want this job / wouldn't be super excited if you landed the position • You already have a job that you are content with and actually don't have the time • And last-but-not-least, and this should really go without saying, if it is OBVIOUS that the company is using you for free labor ... • And a bonus one for the few employers / hiring managers who may be reading this, DO NOT GIVE A TAKE HOME TEST AND GHOST THE CANDIDATE. You should be providing constructive feedback, or at the very least, a formal rejection email / phone call. Shame on you if you ask a candidate to contribute this much time and don't even give them a measly response. With that being said, I will now move on to why I think take-home projects can be great. For starters, it weeds out sooooo much of the competition. If you look at some job postings on LinkedIn, they can have 200+ applicants in 24 hours, and that is not even accounting for people who find the job via other means (i.e. other job boards, company website, etc). Thats a lot of applicants. Now, I know better than to assume that this subreddit is representative of the whole software industry, but clearly a take-home project potentially gets candidates TO WEED THEMSELVES OUT. So 200 candidates may have applied, but now you're competing with a significantly smaller percentage of people who actually wanted to take the time and do the take-home project. Your odds are much better now. Now, I know exactly what you're thinking. You don't want to spend the 8-12 hours it would take to complete this take-home project, and you'd rather spend your time casting your net farther and shotgunning your resume out to more companies, but WHY NOT BOTH? You're the one looking for a job, and you are really not in the position to weed yourself out of potential employment. Some of you people have been on the hunt for a job for months and still won't stoop down to the level of giving a company that much time without being guaranteed another interview / a job. New-flash, doing a project increases your chance of getting a job, just like shotgunning your resume AND you get to practice / show off your programming skills (who knows, maybe mess around a make a project you can put on your GitHub as a sample of your work for other employers to see). On top of this, if you are someone with a lot of free-time - I'm looking at you new grads - and don't have a family/responsibilities that you need to take care of, then you really can't complain about time. Let's face it, instead of doing this project, you're watching Silicon Valley on HBO for the third time "to relax" after a "long day" of filling out the same Workday application forms. Come on, searching for a full time job should be a 40hwk job in and of itself. My next point is that these take home projects sometimes substitute final/on-site interviews. Yea, those 5 hours interviews where you meet every hiring manager and their mother and get grilled round after round because you can't find the optimal solution for sorting a reverse binary search tree that is upside down, flipped, and cooked well done while someone is staring at you, asking questions, and forbidding you from using any resources you would have at your disposable in (almost) any given real world scenario. Yea, those are the real stress-inducing woes of the software interview process, and I would think people would want to avoid those at all costs. Anecdotally, the company that I started working for 3 months ago gave me the choice of a 4 1/2 zoom interview consisting of 4 one hour technical interviews with different hiring managers, or a take-home project that would take 6-10 hours with a 1 1/2 hour follow up discussing my project. The decision was so obvious - stress study an entire week before the interview (hint, this alone probably would take up more time than the take-home project, but on the other hand does prepare you for future interviews) and then endure the torture that is 4+ hours on a zoom call / in an office coding on a whiteboard, or spend about 1-2 hours a day for a week, with access to all resources, leisurely coding up a project, that if done correctly, increases your chance of getting a job astronomically. Not to mention, this option is becoming much more popular with COVID and WFH and the lack of being able to get candidates into the office. All in all, I really wish more companies offered take-home projects as at least an option for their interview process. In my opinion, they are more informative for both parties, as it represents the work you will be doing if you were to get the job, and it is indicative of the level of effort and knowledge you possess in context of the position they are seeking to fill. I really wish everyone on here would stop spreading their hatred for take-home projects, especially to new grads who have never even done them. And for the love of god stop saying to bill the company for making you do a take-home project, that is just the silliest thing I have ever heard, and I DOUBT any company ever would reply to that kind of an invoice. If you really have that much adversity to them, just don't bother. TL;DR: I believe some take-home projects are worth doing ¯\_(ツ)_/¯ submitted by Kixstander to cscareerquestions [link] [comments] ##### Reddcoin (RDD) 02/20 Progress Report - Core Wallet v3.1 Evolution & PoSV v2 - Commits & More Commits to v3.1! (Bitcoin Core 0.10, MacOS Catalina, QT Enhanced Speed and Security and more!) Reddcoin (RDD) Core Dev Team Informal Progress Report, Feb 2020 - As any blockchain or software expert will confirm, the hardest part of making successful progress in blockchain and crypto is invisible to most users. As developers, the Reddcoin Core team relies on internal experts like John Nash, contributors offering their own code improvements to our repos (which we would love to see more of!) and especially upstream commits from experts working on open source projects like Bitcoin itself. We'd like tothank each and everyone who's hard work has contributed to this progress. As part of Reddcoin's evolution, and in order to include required security fixes, speed improvements that are long overdue, the team has up to this point incorporated the following code commits since our last v3.0.1 public release. In attempting to solve the relatively minor font display issue with MacOS Catalina, we uncovered a complicated interweaving of updates between Reddcoin Core, QT software, MacOS SDK, Bitcoin Core and related libraries and dependencies that mandated we take a holistic approach to both solve the Catalina display problem, but in doing so, prepare a more streamlined overall build and test system, allowing the team to roll out more frequent and more secure updates in the future. And also to include some badly needed fixes in the current version of Core, which we have tentatively labeled Reddcoin Core Wallet v3.1. Note: As indicated below, v3.1 is NOT YET AVAILABLE FOR DOWNLOAD BY PUBLIC. We wil advise when it is. The new v3.1 version should be ready for internal QA and build testing by the end of this week, with luck, and will be turned over to the public shortly thereafter once testing has proven no unexpected issues have been introduced. We know the delay has been a bit extended for our ReddHead MacOS Catalina stakers, and we hope to have them all aboard soon. We have moved with all possible speed while attempting to incorproate all the required work, testing, and ensuring security and safety for our ReddHeads. Which leads us to: PoSV v2 activation and the supermajority on Mainnet at the time of this writing has reached 5625/9000 blocks or 62.5%. We have progressed quite well and without any reported user issues since release, but we need all of the community to participate! This activation, much like the funding mechanisms currently being debated by BCH and others, and employed by DASH, will mean not only a catalyst for Reddcoin but ensure it's future by providing funding for the dev team. As a personal plea from the team, please help us support the PoSV v2 activation by staking your RDD, no matter how large or small your amount of stake. Every block and every RDD counts, and if you don't know how, we'll teach you! Live chat is fun as well as providing tech support you can trust from devs and community ReddHead members. Join us today in staking and online and collect some RDD "rain" from users and devs alike! If you're holding Reddcoin and not staking, or you haven't upgraded your v2.x wallet to v3.0.1 (current release), we need you to help achieve consensus and activate PoSV v2! For details, see the pinned message here or our website or medium channel. Upgrade is simple and takes moments; if you're nervous or unsure, we're here to help live in Telegram or Discord, as well as other chat programs. See our website for links. Look for more updates shortly as our long-anticipated Reddcoin Payment Gateway and Merchant Services API come online with point-of-sale support, as we announce the cross-crypto-project Aussie firefighter fundraiser program, as well as a comprehensive update to our development roadmap and more. Work has restarted on ReddID and multiple initiatives are underway to begin educating and sharing information about ReddID, what it is, and how to use it, as we approach a releasable ReddID product. We enthusiastically encourage anyone interested in working to bring these efforts to life, whether writers, UX/UI experts, big data analysts, graphic artists, coders, front-end, back-end, AI, DevOps, the Reddcoin Core dev team is growing, and there's more opportunity and work than ever! Bring your talents to a community and dev team that truly appreciates it, and share the Reddcoin Love! And now, lots of commits. As v3.1 is not yet quite ready for public release, these commits have not been pushed publicly, but in the interests of sharing progress transparently, and including our ReddHead community in the process, see below for mind-numbing technical detail of work accomplished. e5c143404 - - 2014-08-07 - Ross Nicoll - Changed LevelDB cursors to use scoped pointers to ensure destruction when going out of scope. *99a7dba2e - - 2014-08-15 - Cory Fields - tests: fix test-runner for osx. Closes ##4708 *8c667f1be - - 2014-08-15 - Cory Fields - build: add funcs.mk to the list of meta-depends *bcc1b2b2f - - 2014-08-15 - Cory Fields - depends: fix shasum on osx < 10.9 *54dac77d1 - - 2014-08-18 - Cory Fields - build: add option for reducing exports (v2) *6fb9611c0 - - 2014-08-16 - randy-waterhouse - build : fix CPPFLAGS for libbitcoin_cli *9958cc923 - - 2014-08-16 - randy-waterhouse - build: Add --with-utils (bitcoin-cli and bitcoin-tx, default=yes). Help string consistency tweaks. Target sanity check fix. *342aa98ea - - 2014-08-07 - Cory Fields - build: fix automake warnings about the use of INCLUDES *46db8ad51 - - 2020-02-18 - John Nash - build: add build.h to the correct target *a24de1e4c - - 2014-11-26 - Pavel Janík - Use complete path to include bitcoin-config.h. *fd8f506e5 - - 2014-08-04 - Wladimir J. van der Laan - qt: Demote ReportInvalidCertificate message to qDebug *f12aaf3b1 - - 2020-02-17 - John Nash - build: QT5 compiled with fPIC require fPIC to be enabled, fPIE is not enough *7a991b37e - - 2014-08-12 - Wladimir J. van der Laan - build: check for sys/prctl.h in the proper way *2cfa63a48 - - 2014-08-11 - Wladimir J. van der Laan - build: Add mention of --disable-wallet to bdb48 error messages *9aa580f04 - - 2014-07-23 - Cory Fields - depends: add shared dependency builder *8853d4645 - - 2014-08-08 - Philip Kaufmann - [Qt] move SubstituteFonts() above ToolTipToRichTextFilter *0c98e21db - - 2014-08-02 - Ross Nicoll - URLs containing a / after the address no longer cause parsing errors. *7baa77731 - - 2014-08-07 - ntrgn - Fixes ignored qt 4.8 codecs path on windows when configuring with --with-qt-libdir *2a3df4617 - - 2014-08-06 - Cory Fields - qt: fix unicode character display on osx when building with 10.7 sdk *71a36303d - - 2014-08-04 - Cory Fields - build: fix race in 'make deploy' for windows *077295498 - - 2014-08-04 - Cory Fields - build: Fix 'make deploy' when binaries haven't been built yet *ffdcc4d7d - - 2014-08-04 - Cory Fields - build: hook up qt translations for static osx packaging *25a7e9c90 - - 2014-08-04 - Cory Fields - build: add --with-qt-translationdir to configure for use with static qt *11cfcef37 - - 2014-08-04 - Cory Fields - build: teach macdeploy the -translations-dir argument, for use with static qt *4c4ae35b1 - - 2014-07-23 - Cory Fields - build: Find the proper xcb/pcre dependencies *942e77dd2 - - 2014-08-06 - Cory Fields - build: silence mingw fpic warning spew *e73e2b834 - - 2014-06-27 - Huang Le - Use async name resolving to improve net thread responsiveness *c88e76e8e - - 2014-07-23 - Cory Fields - build: don't let libtool insert rpath into binaries *18e14e11c - - 2014-08-05 - ntrgn - build: Fix windows configure when using --with-qt-libdir *bb92d65c4 - - 2014-07-31 - Cory Fields - test: don't let the port number exceed the legal range *62b95290a - - 2014-06-18 - Cory Fields - test: redirect comparison tool output to stdout *cefe447e9 - - 2014-07-22 - Cory Fields - gitian: remove unneeded option after last commit *9347402ca - - 2014-07-21 - Cory Fields - build: fix broken boost chrono check on some platforms *c9ed039cf - - 2014-06-03 - Cory Fields - build: fix whitespace in pkg-config variable *3bcc5ad37 - - 2014-06-03 - Cory Fields - build: allow linux and osx to build against static qt5 *01a44ba90 - - 2014-07-17 - Cory Fields - build: silence false errors during make clean *d1fbf7ba2 - - 2014-07-08 - Cory Fields - build: fix win32 static linking after libtool merge *005ae2fa4 - - 2014-07-08 - Cory Fields - build: re-add AM_LDFLAGS where it's overridden *37043076d - - 2014-07-02 - Wladimir J. van der Laan - Fix the Qt5 build after d95ba75 *f3b4bbf40 - - 2014-07-01 - Wladimir J. van der Laan - qt: Change serious messages from qDebug to qWarning *f4706f753 - - 2014-07-01 - Wladimir J. van der Laan - qt: Log messages with type>QtDebugMsg as non-debug *98e85fa1f - - 2014-06-06 - Pieter Wuille - libsecp256k1 integration *5f1f2e226 - - 2020-02-17 - John Nash - Merge branch 'switch_verification_code' into Build *1f30416c9 - - 2014-02-07 - Pieter Wuille - Also switch the (unused) verification code to low-s instead of even-s. *1c093d55e - - 2014-06-06 - Cory Fields - secp256k1: Add build-side changes for libsecp256k1 *7f3114484 - - 2014-06-06 - Cory Fields - secp256k1: add libtool as a dependency *2531f9299 - - 2020-02-17 - John Nash - Move network-time related functions to timedata.cpp/h *d003e4c57 - - 2020-02-16 - John Nash - build: fix build weirdness after 54372482. *7035f5034 - - 2020-02-16 - John Nash - Add ::OUTPUT_SIZE *2a864c4d8 - - 2014-06-09 - Cory Fields - crypto: create a separate lib for crypto functions *03a4e4c70 - - 2014-06-09 - Cory Fields - crypto: explicitly check for byte read/write functions *a78462a2a - - 2014-06-09 - Cory Fields - build: move bitcoin-config.h to its own directory *a885721c4 - - 2014-05-31 - Pieter Wuille - Extend and move all crypto tests to crypto_tests.cpp *5f308f528 - - 2014-05-03 - Pieter Wuille - Move {Read,Write}{LE,BE}{32,64} to common.h and use builtins if possible *0161cc426 - - 2014-05-01 - Pieter Wuille - Add built-in RIPEMD-160 implementation *deefc27c0 - - 2014-04-28 - Pieter Wuille - Move crypto implementations to src/crypto/ *d6a12182b - - 2014-04-28 - Pieter Wuille - Add built-in SHA-1 implementation. *c3c4f9f2e - - 2014-04-27 - Pieter Wuille - Switch miner.cpp to use sha2 instead of OpenSSL. *b6ed6def9 - - 2014-04-28 - Pieter Wuille - Remove getwork() RPC call *0a09c1c60 - - 2014-04-26 - Pieter Wuille - Switch script.cpp and hash.cpp to use sha2.cpp instead of OpenSSL. *8ed091692 - - 2014-04-20 - Pieter Wuille - Add a built-in SHA256/SHA512 implementation. *0c4c99b3f - - 2014-06-21 - Philip Kaufmann - small cleanup in src/compat .h and .cpp *ab1369745 - - 2014-06-13 - Cory Fields - sanity: hook up sanity checks *f598c67e0 - - 2014-06-13 - Cory Fields - sanity: add libc/stdlib sanity checks *b241b3e13 - - 2014-06-13 - Cory Fields - sanity: autoconf check for sys/select.h *cad980a4f - - 2019-07-03 - John Nash - build: Add a top-level forwarding target for src/ objects *f4533ee1c - - 2019-07-03 - John Nash - build: qt: split locale resources. Fixes non-deterministic distcheck *4a0e46e76 - - 2019-06-29 - John Nash - build: fix version dependency *2f61699d9 - - 2019-06-29 - John Nash - build: quit abusing AMCPPFLAGS *99b60ba49 - - 2019-06-29 - John Nash - build: avoid the use of top and abs_ dir paths *c8f673d5d - - 2019-06-29 - John Nash - build: Tidy up file generation output *5318bce57 - - 2019-06-29 - John Nash - build: nuke Makefile.include from orbit *672a25349 - - 2019-06-29 - John Nash - build: add stub makefiles for easier subdir builds *562b7c5a6 - - 2020-02-08 - John Nash - build: delete old Makefile.am's *066120079 - - 2020-02-08 - John Nash - build: Switch to non-recursive make Whew! No wonder it's taken the dev team a while! :) TL;DR: Trying to fix MacOS Catalina font display led to requiring all kinds of work to migrate and evolve the Reddcoin Core software with Apple, Bitcoin and QT components. Lots of work done, v3.1 public release soon. Also other exciting things and ReddID back under active dev effort. submitted by TechAdept to reddCoin [link] [comments] ##### boolean # Boolean data type From Wikipedia, the free encyclopedia Jump to navigation Jump to search In computer science, the Boolean data type is a data type that has one of two possible values (usually denoted true and false) which is intended to represent the two truth values of logic and Boolean algebra. It is named after George Boole, who first defined an algebraic system of logic in the mid 19th century. The Boolean data type is primarily associated with conditional) statements, which allow different actions by changing control flow depending on whether a programmer-specified Boolean condition evaluates to true or false. It is a special case of a more general logical data type (see probabilistic logic)—logic doesn't always need to be Boolean. ## Contents ## Generalities In programming languages with a built-in Boolean data type, such as Pascal) and Java), the comparison operators such as > and ≠ are usually defined to return a Boolean value. Conditional and iterative commands may be defined to test Boolean-valued expressions. Languages with no explicit Boolean data type, like C90 and Lisp), may still represent truth values by some other data type. Common Lisp uses an empty list for false, and any other value for true. The C programming language uses an integer) type, where relational expressions like i > j and logical expressions connected by && and || are defined to have value 1 if true and 0 if false, whereas the test parts of if , while , for , etc., treat any non-zero value as true.[1][2] Indeed, a Boolean variable may be regarded (and implemented) as a numerical variable with one binary digit (bit), which can store only two values. The implementation of Booleans in computers are most likely represented as a full word), rather than a bit; this is usually due to the ways computers transfer blocks of information. Most programming languages, even those with no explicit Boolean type, have support for Boolean algebraic operations such as conjunction (AND , & , * ), disjunction (OR , | , + ), equivalence (EQV , = , == ), exclusive or/non-equivalence (XOR , NEQV , ^ , != ), and negation (NOT , ~ , ! ). In some languages, like Ruby), Smalltalk, and Alice) the true and false values belong to separate classes), i.e., True and False , respectively, so there is no one Boolean type. In SQL, which uses a three-valued logic for explicit comparisons because of its special treatment of Nulls), the Boolean data type (introduced in SQL:1999) is also defined to include more than two truth values, so that SQL Booleans can store all logical values resulting from the evaluation of predicates in SQL. A column of Boolean type can also be restricted to just TRUE and FALSE though. ## ALGOL and the built-in boolean type One of the earliest programming languages to provide an explicit boolean data type is ALGOL 60 (1960) with values true and false and logical operators denoted by symbols ' ∧ {\displaystyle \wedge } 📷' (and), ' ∨ {\displaystyle \vee } 📷' (or), ' ⊃ {\displaystyle \supset } 📷' (implies), ' ≡ {\displaystyle \equiv } 📷' (equivalence), and ' ¬ {\displaystyle \neg } 📷' (not). Due to input device and character set limits on many computers of the time, however, most compilers used alternative representations for many of the operators, such as AND or 'AND' . This approach with boolean as a built-in (either primitive or otherwise predefined) data type was adopted by many later programming languages, such as Simula 67 (1967), ALGOL 68 (1970),[3] Pascal) (1970), Ada) (1980), Java) (1995), and C#) (2000), among others. ## Fortran The first version of FORTRAN (1957) and its successor FORTRAN II (1958) have no logical values or operations; even the conditional IF statement takes an arithmetic expression and branches to one of three locations according to its sign; see arithmetic IF. FORTRAN IV (1962), however, follows the ALGOL 60 example by providing a Boolean data type (LOGICAL ), truth literals (.TRUE. and .FALSE. ), Boolean-valued numeric comparison operators (.EQ. , .GT. , etc.), and logical operators (.NOT. , .AND. , .OR. ). In FORMAT statements, a specific format descriptor ('L ') is provided for the parsing or formatting of logical values.[4] ## Lisp and Scheme The language Lisp) (1958) never had a built-in Boolean data type. Instead, conditional constructs like cond assume that the logical value false is represented by the empty list () , which is defined to be the same as the special atom nil or NIL ; whereas any other s-expression is interpreted as true. For convenience, most modern dialects of Lisp predefine the atom t to have value t , so that t can be used as a mnemonic notation for true. This approach (any value can be used as a Boolean value) was retained in most Lisp dialects (Common Lisp, Scheme), Emacs Lisp), and similar models were adopted by many scripting languages, even ones having a distinct Boolean type or Boolean values; although which values are interpreted as false and which are true vary from language to language. In Scheme, for example, the false value is an atom distinct from the empty list, so the latter is interpreted as true. ## Pascal, Ada, and Haskell The language Pascal) (1970) introduced the concept of programmer-defined enumerated types. A built-in Boolean data type was then provided as a predefined enumerated type with values FALSE and TRUE . By definition, all comparisons, logical operations, and conditional statements applied to and/or yielded Boolean values. Otherwise, the Boolean type had all the facilities which were available for enumerated types in general, such as ordering and use as indices. In contrast, converting between Boolean s and integers (or any other types) still required explicit tests or function calls, as in ALGOL 60. This approach (Boolean is an enumerated type) was adopted by most later languages which had enumerated types, such as Modula, Ada), and Haskell). ## C, C++, Objective-C, AWK Initial implementations of the language C) (1972) provided no Boolean type, and to this day Boolean values are commonly represented by integers (int s) in C programs. The comparison operators (> , == , etc.) are defined to return a signed integer (int ) result, either 0 (for false) or 1 (for true). Logical operators (&& , || , ! , etc.) and condition-testing statements (if , while ) assume that zero is false and all other values are true. After enumerated types (enum s) were added to the American National Standards Institute version of C, ANSI C (1989), many C programmers got used to defining their own Boolean types as such, for readability reasons. However, enumerated types are equivalent to integers according to the language standards; so the effective identity between Booleans and integers is still valid for C programs. Standard C) (since C99) provides a boolean type, called _Bool . By including the header stdbool.h , one can use the more intuitive name bool and the constants true and false . The language guarantees that any two true values will compare equal (which was impossible to achieve before the introduction of the type). Boolean values still behave as integers, can be stored in integer variables, and used anywhere integers would be valid, including in indexing, arithmetic, parsing, and formatting. This approach (Boolean values are just integers) has been retained in all later versions of C. Note, that this does not mean that any integer value can be stored in a boolean variable. C++ has a separate Boolean data type bool , but with automatic conversions from scalar and pointer values that are very similar to those of C. This approach was adopted also by many later languages, especially by some scripting languages such as AWK. Objective-C also has a separate Boolean data type BOOL , with possible values being YES or NO , equivalents of true and false respectively.[5] Also, in Objective-C compilers that support C99, C's _Bool type can be used, since Objective-C is a superset of C. ## Perl and Lua Perl has no boolean data type. Instead, any value can behave as boolean in boolean context (condition of if or while statement, argument of && or || , etc.). The number 0 , the strings "0" and "" , the empty list () , and the special value undef evaluate to false.[6] All else evaluates to true. Lua) has a boolean data type, but non-boolean values can also behave as booleans. The non-value nil evaluates to false, whereas every other data type always evaluates to true, regardless of value. ## Tcl Tcl has no separate Boolean type. Like in C, the integers 0 (false) and 1 (true - in fact any nonzero integer) are used.[7] Examples of coding: set v 1 if {$v } { puts "V is 1 or true" }
The above will show "V is 1 or true" since the expression evaluates to '1'