teleren/devto huggingface dataset:
New year goal (2019) done: Complete a side project
Tags: reactnative, android, marketing, showdev
Published: 2019-12-21 01:20:23

---
title: New year goal (2019) done: Complete a side project
published: true
description: Published a ReactNative app
tags: reactnative, android, marketing, showdev
---

Hello, devs,

Usman here. I'm pleased to share a side project I've been working on since the beginning of the year. It's probably the only new year (2019) goal I've completed. 😇
Anyway, the project is named [Schdlr](https://play.google.com/store/apps/details?id=com.schdlr), pronounced "Scheduler", It's a mobile application designed to share events (schedules) with family, friends, and colleagues. A schedule in this context could be a meetup group, calendar, timetable, etc. It works both offline and online.

###Some of the features include:
* Follow schedules of interest
* Event offline reminders
* Create recurring events
* Real-time updates on events
* Communicate with event participants

I built it completely with ReactNative and AWS, and one of the challenges I faced was learning AWS, Yeah it has a somewhat steep learning curve for someone with zero AWS knowledge but everything starts to make sense after a month or so, especially while having great community support (thanks @dabit3). One of my main objectives was following industry standard and I have to say, some days I feel like a big fraud and question my career choice. Overall I'm happy with this project and I look forward to 2020.

Please give it a try and tell me what you think. It's currently available only on Android,😞 IOS version will be coming soon. Thank you!

[![Schdlr](https://thepracticaldev.s3.amazonaws.com/i/1wde2gdt93xojqcs3ebu.png)](https://play.google.com/store/apps/details?id=com.schdlr)

###Known issues:
* No notification sound in some devices. Not sure if it's an android or module problem.
* Sometimes AdMob delivers the wrong banner size. Still trying to figure it out. I try to keep Ads very minimal and unobtrusive.
* I'm still new to AWS pricing, so I've limited file upload size to 8mb.

![events](https://thepracticaldev.s3.amazonaws.com/i/83v874g76fo9edhckzba.png#left)
![schedules](https://thepracticaldev.s3.amazonaws.com/i/7m5uuqvlewbtqchbrh7l.png#center)
![follow](https://thepracticaldev.s3.amazonaws.com/i/mc1r5kj1y2h2bnl2grkc.png#right)
laravel 6 flash message example
Published: 2019-12-27 12:28:12

---
title: laravel 6 flash message example
published: true
date: 2019-12-21 00:00:00 UTC
tags: 
canonical_url: 
---

Hi GuysToday I will show you how to use redirect with flash messages without any package in Laravel application In this example i am not use flash messages packageFlash messages is required in laravel application because that way we can give alter with what progress complete success wa
upload multiple images in laravel 6
Published: 2019-12-23 10:02:34

---
title: upload multiple images in laravel 6
published: true
date: 2019-12-21 00:00:00 UTC
tags: 
canonical_url: 
---

Hi GuysIn this tutoriali will explain multiple file upload with validation in laravel 6 how you can easily upload multiple files into MySQL database and folder with laravel validation rules with exampleThe basic requirement of any laravel project is uploading files or images in the data
Creating a new programming language
Tags: showdev, discuss, opensource
Published: 2019-12-20 22:53:17

In 2019, I've been working on a compiler in my spare time(I think I spent like 2 working weeks on it!) called `rumi`. It is a general-purpose language, with ideas that I got from Johnatan Blow's compiler videos. It's been a wonderful experience for me, and I occasionally streamed coding this compiler in my native language (Farsi).

Now the compiler has reached a state where I can actually write programs in it, but it is still way off from what I plan to do. Here is a program showcasing most of what we can do:

```go
/*
Comments and /*nested*/ comments are a thing
*/

ptinf(T: string, c: ... any) -> int; // We just declare the signature, it is implemented in a c file

MyStruct: Struct{
  id: int;
  age: u8;
}

main := ()-> int{
  a : int;
  a =1;

  b: int = 2;
  
  c := a + b;

  printf("The value of c is %d\n", c); // 3

  arr : int[10];
  mys : MyStruct;
  mys.id = 2;
  arr[0] = mys.id;

  printf("The id is %d, and the 0th element is %d\n", mys.id, arr[0]); // 2, 2

  // We also have pointers:

  p : *int;
  p = &c;
  
  *p = 2;
  
  printf("The value of c is %d\n", c); // 2

  return 0;
}
```

As you can see, it is really basic at this stage, but I have plans to implement something that I would use day-to-day. The program uses an llvm-backend which allows me to link it together with C files, either calling C functions or provide functions for C (or any other language that can use C) to call.

Now, I'm looking for contributors or suggestions as things to include in this language. Here is the repo:

{% github mcsh/rumi %}

And you can also comment your ideas on this post! If you guys are interested, I can even showcase the compiler structure in an English YouTube video (or a live video or a blog post) and even implement some new functionalities to it. 

Let me know if you have any suggestions or questions!
Struggling to learn the fundamentals 
Tags: support, beginners, firstpost
Published: 2019-12-20 21:55:29

---
title: Struggling to learn the fundamentals 
published: true
description: In a recursive rut
tags: support, beginner, first post
---

So, having been a Sysadmin for 10 years, it dawned on me - I don't really know how to code and it frustrates me. I have dabbled in a little bit of Python and BASH. I have bodged together some scripts. However, when I sit down to learn a scripting language, like Python, I seem to fail because most tutorials concentrate the first few chapters from 'Hello World' to mathematics which I can never be bothered with. It all seems repetitive and I loose interest very quickly. I have never been an academic. I have always learnt what is necessary to do a job. Also, time is not on my hands - I have two small children and a full time job.

If I am honest with myself I should probably not worry about it too much and just learn enough code to do the job in hand, though I don't really do this either... I find example code and alter it. I can do some guess work though 50% of my scripts - I have never been able to complete due to a lack of fundamental knowledge. 

This kind of gets recursive. I was wondering if anyone else has been in similar situations and how you overcame them.
Go: counting semaphores
Tags: go, semaphore, channels, buffered
Published: 2019-12-20 21:45:29

---
title: Go: counting semaphores
published: true
description: Limiting parallelism in Go using buffered channels
tags: go, semaphore, channels, buffered
canonical_url: https://fodor.org/blog/go-counting-semaphores/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/hju45rtnnm1fqjoipdth.jpg
---

# Goroutines

One of the main features of the Go programming languages is the goroutine. Executing a function as a goroutine lets us run things in parallel which can greatly improve the performance of our application. But you can take parallelism only so far before it actually starts making things slower.


# Unlimited parallelism

Your code might be calling a function called `doInParallel()` as a goroutine in this fashion:

```go
func main() {
  wg := sync.WaitGroup{}
  defer wg.Wait()
  for n := range []int{0,1,2,3,4,5,6,7,8,9} {
    wg.Add(1)
    go doInParallel(&wg, n)
  }
}

func doInParallel(wg* sync.WaitGroup, n int) {
  fmt.Println(n)
  time.Sleep(1000 * time.Millisecond)
  defer wg.Done()
}

```
Repl: [https://repl.it/@dorin131/goroutine](https://repl.it/@dorin131/goroutine)

In this example we are just taking an element of an array, printing it and waiting for one second. All the numbers will be printed immediately and at the same time.


# Limited parallelism with counting semaphores

But how do we limit how many instances of the `doInParallel()` we are executing at the same time?
The example below will do that using a concurrency primitive called a **counting semaphore** which is implemented using a buffered channel.


```go
var tokens = make(chan struct{}, 3) // allowing up to three elements in the buffer

func main() {
  wg := sync.WaitGroup{}
  defer wg.Wait()
  for n := range []int{0,1,2,3,4,5,6,7,8,9} {
    wg.Add(1)
    go doInParallel(&wg, n)
  }
}

func doInParallel(wg* sync.WaitGroup, n int) {
  tokens <- struct{}{} // adding an element on the channel
  fmt.Println(n)
  time.Sleep(1000 * time.Millisecond)
  <- tokens // discarding one element from the channel
  defer wg.Done()
}

```
Repl: [https://repl.it/@dorin131/counting-semaphore](https://repl.it/@dorin131/counting-semaphore)

By adding an element just before our I/O operation and discarding one right after, we are essentially blocking the program once the channel buffer is full. Then after one second the buffer will be emptied and it continues.

If you run the second snippet, you will see that the numbers are printed three at a time with a pause of one second in-between.

# Conclusion

Choosing how many threads you want to spawn at the same time will depend on the task you're performing and the machine it is running on. Once you have calculated an approximate number, it is worth trying out the code with higher or lower values to see what works best.

Also, just to make sure this was not misinterpreted. The limitation comes from the operation that you are performing in parallel and not the goroutines in themselves, as you can run many thousands without any issue.

# Video version
{% youtube sGkV5ol3K_k %}
In Need of Advice: How Do You Manage A Large Backlog of Tasks? 
Tags: productivity, beginners, discuss
Published: 2019-12-20 21:44:34

#Background 

In July I started my first job outside of college in the software world. The company I am working for is pretty small and focuses on building web applications for different clients. We have a limited number of human resources when it comes to filling roles required for each of these projects. When I first joined I was put onto a project underneath a single individual who took on the roles of Senior Backend Developer and Project Manager. There was also another guy working solely as the Front End Developer. 

After one month of learning the ropes and getting the hang of working on the project both of my project members quit. It was good timing for them because we were between phases and not much important work was taking place. Very quickly the burden of the other two was shifted to me and the company's Chief Technical Officer. For the first couple of months, I was flying to meet with clients, thoroughly testing the first phase of work, and implementing necessary bug fixes. I discovered the majority of the phase one work had not been tested, was not working, and needed to be refactored. After many long sleepless nights, I was able to fix the majority of issues. During the middle of this, the client decided to move into phase two of the project. 

#Project Status Today

* We hired two new people who are now working under me; a Front End Developer and a Data Engineer. 
* There is a growing backlog of items from phase one as well as the new phase two items. 
* I am having to function as a "Scrum master?", project manager, and software engineer/developer. 
* The client is growing more and more unhappy as time goes on. 
* My time is split between managing our TFS stories, training the two new individuals, organizing meetings between three separate teams, and working on the backlog of tasks. 

Is there any advice from people who have experience managing projects while also working as a developer? I have 0 experience when it comes to this so it feels like the world is on fire around me. I am naturally a follower type so taking charge is very foreign to me. 

# My questions: 

1. Are there any cloud platforms for filesharing, knowledge transfer, and task management in one? 
2. From a Scrum point of view what are the most important exersises to keep on top of tasks. 
3. How do you prioritize tasks when you have different people/teams demanding their things get done first? 
4. How do you estimate delivery dates? 
5. Considering my lack of experience is it too soon to ask for a pay raise?
IPFS on Hackage
Tags: ipfs, haskell, hackage
Published: 2019-12-27 08:35:04

---
title: IPFS on Hackage
published: true
date: 2019-12-20 21:27:05 UTC
tags: IPFS,Haskell,Hackage
canonical_url: https://blog.fission.codes/ipfs-on-hackage/
cover_image: https://s3.fission.codes/2019/12/ipfs-haskell-long.png
---

_Authored by [Daniel](https://blog.fission.codes/author/daniel/)_

We just published version `1.0.0` of our IPFS package on [Hackage](https://hackage.haskell.org/package/ipfs-1.0.0) 🎉

This library offers a high level API for interacting with IPFS nodes. Most of the functionality was refactored out of our [Web API](https://github.com/fission-suite/web-api%5C), which provides a convenient HTTP interface for accessing the IPFS network.

The library can communicate with IPFS nodes in two different ways:

- Locally: This is done by shelling out to an IPFS daemon that is running on the same machine. This would be the equivalent of running an IPFS command in your terminal.
- Remotely: This is done by communicating with a node's HTTP interface. This could either be a node running on the same machine or on another machine.

The package is not currently fully featured, but the base functionality is present: `add`, `get`, `pin`, and `dag put` (for building IPLD structures). The existing code provides helpful building blocks for adding additional functionality.

Check out [the code on GitHub](https://github.com/fission-suite/ipfs-haskell). Let us know what features would be helpful for you and any issues that you might run into along the way!

When you're ready to start building, head over to [Hackage](https://hackage.haskell.org/package/ipfs) and grab the library.
Looking for beta testers for open-source email alias service
Tags: contributorswanted
Published: 2019-12-20 21:22:14

Hi all!

We are building the first open-source email alias and identity provider service, called [SimpleLogin](https://simplelogin.io)

It works in a similar way to other email alias solution (spamex, mailcare, e4ward, etc) with Postfix as MTA and Python script to handle  the email forwarding AND **backwarding** (we don't know how to call it yet, any idea here?): basically an alias can both receive and send emails.

The code source for both the server and clients (libraries, browser extension) is available on our Github at https://github.com/simple-login/, feel free to check it out! We spent quite some time on the self-hosting instructions, if you have your own server, would really appreciate if you can try it!

Please let us know if you have any questions/feedbacks/critics. 
Thanks!
Show DEV: Run - Easily manage and invoke small scripts and wrappers (Written in Golang)
Tags: showdev, go, tools
Published: 2019-12-20 21:12:37


# Introduction

Do you find yourself using tools like `make` to manage non build-related scripts?

Build tools are great, but they are not optimized for general script management.

Introducing Run:

 GitHub : https://github.com/TekWizely/run

Run aims to be better at managing small scripts and wrappers, while incorporating a familiar make-like syntax.

# Features

Here are a few of Run's features:

* Terse, make-like syntax
* Manage multiple script types: Bash, Python, Ruby, etc.
* Automatic help text generation
* Command scripts are executed in a single sub-shell, not like make's (default) behavior of executing each line of a recipe in a separate sub-shell.
* Define cli options and have the values passed to your scripts as environment variables.

# Runfile

Where make has the ubiquitous Makefile, run has the cleverly-named `"Runfile"`

By default, run will look for a file named `"Runfile"` in the current directory, exiting with error if not found.

See the project README for details on specifying alternative runfiles, as well as other special modes you might find useful.

# Hello World Example

The project's README starts with a much simpler example and walks through the various features, but I thought I would share a more fleshed out example to demonstrate several of the features together:

_Runfile_
```
##
# Hello world example.
# Prints "Hello, <name>".
# OPTION NAME -n,--name <name> Name to say hello to
hello:
  echo "Hello, ${NAME:-World}"
```

_list commands_
```
$ run list

Commands:
  list     (builtin) List available commands
  help     (builtin) Show Help for a command
  hello    Hello world example.
Usage:
       run [-r runfile] help <command>
          (show help for <command>)
  or   run [-r runfile] <command> [option ...]
          (run <command>)
```

_show help for hello command_

```
$ run help hello

hello:
  Hello world example.
  Prints "Hello, <name>".
Options:
  -h, --help
        Show full help screen
  -n, --name <name>
        Name to say hello to
```

_invoke hello command with no options_
```
$ run hello

Hello, World
```

_invoke hello command with options_
```
$ run hello --name=Newman
$ run hello -n Newman

Hello, Newman
```

# Installing

Currently, installing requires using `go get`, but there is an active PR for a `brew` formula and I'm also working on a `PKGBUILD` file.

# Conclusion

If you're at all interested in managing task runners and scripts, I hope you will give my project a try.

I am happy to answer any questions you might have.

Thank you for your time and Happy Holidays!

-TekWizely ( https://github.com/TekWizely )

[edit] Typos
Running Linux Bash Shell in Windows 🤯
Tags: linux, ubuntu, bash, todayilearned
Published: 2019-12-20 21:08:36


## Linux on Windows is a reality 🎉🎊
![](https://media3.giphy.com/media/Is1O1TWV0LEJi/giphy.gif?cid=790b761127b12de5758d75175f0dfe975a682333c10cefb2&rid=giphy.gif)

The Windows 10 anniversary upgrade is here and now you can easily get Bash on Windows. 
## Let's talk about the steps 😋
### First Step: Enable “Windows Subsystem for Linux”  🤔
The first thing you need to do is to enable Windows Subsyetm for Linux feature from  [PowerShell](https://itsfoss.com/microsoft-open-sources-powershell/).

Go to the Start menu and search for PowerShell. 

Run it as administrator:
![](https://social.msdn.microsoft.com/Forums/getfile/1408293)

Once you have the PowerShell running, use the command below to enable Bash in Windows 10.

```bash
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
```
Confirm your choice. 
Type **Y** or **press enter**:
![](https://i1.wp.com/itsfoss.com/wp-content/uploads/2016/08/Powershell-Ubuntu-install-2.jpeg?w=799&ssl=1)

Now you should be asked to reboot your computer. 
Even if you are not asked to, you must restart your system.

### Second Step: Download a Linux system from the Windows store 🤓

Once your system has rebooted, go to the Windows Store and search for “Linux.”

![](https://docs.microsoft.com/pt-br/windows/wsl/media/store.png)

For default I selected Ubuntu, because I have more familiarity with Ubuntu than another Linux distributions.

![](https://i0.wp.com/itsfoss.com/wp-content/uploads/2016/08/install-ubuntu-windows-10-linux-subsystem-7.jpeg?w=800&ssl=1)

### Last Step: Run Linux inside Windows 10 👨‍💻

You are almost there. 
Once you have installed Linux, it’s time to see how to access Bash in Windows 10.

Just search for the Linux distribution you installed in the previous step. In my case it was Ubuntu. 
You’ll see that it runs like a normal Windows application.

It will take some time installing and then you’ll have to set up the username and password.

After all you'll see this beautiful console image:

![](https://i1.wp.com/itsfoss.com/wp-content/uploads/2016/08/install-ubuntu-windows-10-linux-subsystem-10.jpeg?w=800&ssl=1)

Don’t worry, it’s just for the first run. 
Bash shell will be available for use directly from the next time onwards.

Now enjoy Linux inside Windows 10.

![](https://media1.giphy.com/media/Yp8GKgfytxQVq/giphy.gif?cid=790b7611f040f9b018779fb48ceb6806bfa2e0cbca874f4e&rid=giphy.gif)
What's TypeScript in 10 Tweets? (Twitter Long Thread)
Tags: typescript, beginners, javascript, career
Published: 2019-12-20 20:38:35

So here it is :
{% twitter 1208103224370221056 %}
{% twitter 1208103226282774528 %}
{% twitter 1208103229994733568 %}
{% twitter 1208103233937383424 %}
{% twitter 1208103235942322177 %}
{% twitter 1208103237976498178 %}
{% twitter 1208103239973056514 %}
{% twitter 1208104749154865153 %}
{% twitter 1208104755744169984 %}
{% twitter 1208104758361436169 %}
{% twitter 1208105450421522432 %}

Follow me on Twitter : [@justaashir](twitter.com/justaashir)
Thoughts on bringing over an old(er) blog?
Tags: discuss, help
Published: 2019-12-20 20:34:32

I have a wordpress blog that I started while going through a bootcamp and then continued through my first year on the job. I haven't updated it in almost 2 years, but I do think it has helpful articles. I'd like to drop the hosting service and just push the articles to this platform, probably manually.

First question: is there a more efficient way to bring over already-formatted wordpress blog posts? (I've dug around, but haven't found anything)

Second question: is it _weird_ to basically re-post old blog postings? I do genuinely think they could be helpful to people, but I don't know if there are unsaid rules or practices when doing something like this? 

I'm open to any and all feedback, thank you!
X1 Carbon: 5th Gen (2017) versus 7th Gen (2019)
Tags: laptops
Published: 2019-12-20 20:14:22

---
title: X1 Carbon: 5th Gen (2017) versus 7th Gen (2019)
published: true
description: A comparison between two models of X1 Carbon
tags: laptops
cover_image: https://live.staticflickr.com/5508/10774135593_3ab6219b95_h.jpg
---

I've been using an X1 Carbon for almost 3 years and recently switched to the latest model. I figured a comparison between these two could be useful for someone out there trying to decide whether to update or not. The model I got is the one with 14 inches and the following specs:
- Intel i7-8565U
- 16GB RAM
- 512GB SSD M.2


![photo of both models next to each other](https://i.imgur.com/LhoOf8V.png)



### Keyboard
Nothing really changed and that is certainly good news. Remains, in my opinion, one of the bests in the market.
### Battery life
With almost all of the power savings enabled on Linux (see tools like `powertop`) I get around 6-7 hours on the 7th Gen while I would get 4 hours max on the 5th Gen.

### Performance
This is one of the aspects that impressed me the most due to the nature of what I do for work. One of the build steps for a Node.js project that used to take 2 minutes on the 5th Gen model now **runs on 50s on the 7th Gen!** 
If you will be only browsing the web I'm not very confident that you will notice any difference from that.

### Disk
Without running specific benchmarks on what is shipped on the new model I can only say that the boot times and for my daily use the SSD seems to be pretty much unchanged.

### Screen
I choose the 300nit configuration (WQHD, 2560 x 1440) for the new and it's about the same quality than the previous model I had.

### Build quality
I was very happy with the quality of the X1 5th Gen, with only a bit of paint wearing off on one of the edges (if you squinch you can notice it on the photo above). I will say that the 7th Gen looks a bit more sturdy and somewhat more durable. YMMV.


### Miscellaneous
With the 7th Gen version I noticed a problem with the touchpad I didn't had before on Linux which would make the touchpad unresponsive **only when initiating the OS after suspension**. After googling for solutions I finally found something that would work for my case which was creating a file `/lib/systemd/system-sleep/touchpad-fix.sh` with the following:

```bash
if [ "$1" = "post" ]; then
	echo 'fixing touchpad...'
        rmmod i2c_hid ; modprobe i2c_hid
fi
```



Did you experienced other problems? Let me know in the comments!