I hereby claim:
- I am milleniumbug on github.
- I am milleniumbug (https://keybase.io/milleniumbug) on keybase.
- I have a public key whose fingerprint is 61BE F024 E95B CDFC FFE0 354A E069 867F CF5D 84EA
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import collections, csv, itertools | |
| recipes = collections.defaultdict(set) | |
| tolerance = 0 | |
| with open('rec.csv') as csvfile: | |
| reader = csv.reader(csvfile) | |
| for row in reader: | |
| recipes[row[0]].add(row[1]) |
| {-# LANGUAGE OverloadedStrings #-} | |
| import qualified Data.Aeson as JS | |
| import qualified Data.Aeson.Types as JST | |
| import Data.Maybe (maybeToList) | |
| import Data.Aeson ((.:), (.:?), (.=)) | |
| import qualified Data.Text.Lazy as T | |
| import Data.Text.Lazy.Encoding as E | |
| import qualified Control.Monad as M | |
| import qualified Data.JsonStream.Parser as JSPar |
| #!/bin/bash | |
| PREMAKE=$PWD/../premake/bin/release/premake4 | |
| $PREMAKE --llvm-path=$PWD/../llvm gmake | |
| cd Wide | |
| make -j `nproc` config=release64 | |
| cd .. |
| param( | |
| [string]$url | |
| ) | |
| yt-dlp ` | |
| $url ` | |
| --quiet ` | |
| --extract-audio ` | |
| --audio-format mp3 ` | |
| --audio-quality 3 ` |
| Let's start with: Java is a language that one would create when looking at the state of C++ in early 90's and thinking how can I make it "better" in terms of being error prone. | |
| But this was only an evolution instead of a revolution STL introduced as a way of programming | |
| (sure, they weren't first, but I'd say they were the first to introduce it to masses) | |
| The rest is a consequence of being backward | |
| Problem with null pointers? Still there | |
| Speaking of pointers in Java, I like how Java fans continuously say "they're not pointers, they're references" | |
| But guess what happens when you access a null reference? A NullPointerException is thrown | |
| So what I don't like? | |
| Collections API. Just terrible. | |
| The "unmodifiable" lists are your regular lists that throw exceptions on modifications |
Note: PowerShell is object based, as opposed to byte stream based Unix utilities. This means text operations aren't that common, and also means many idioms aren't directly translateable.
var=text -> $var = objectcat file1 file2 file3 > target -> gc -Encoding Byte file1,file2,file3 | sc -Encoding Byte target (binary concatenation, with text files you can specify different encoding or let it guess)curl -> iwr (Invoke-WebRequest)date -> date (Get-Date)man command-name -> help command-name (Get-Help)