This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module KappaOne | |
## I want the value of 'test' to be memoized & available in class KappaOneOne and KappaOneTwo | |
def test | |
@test ||= some_timetaking_method | |
end | |
class KappaOneOne | |
def initialize | |
@val = test.to_s | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✗ pry | |
[1] pry(main)> module Kappa | |
[1] pry(main)* def Kappa.parser | |
[1] pry(main)* if ! @name | |
[1] pry(main)* sleep(5) | |
[1] pry(main)* @name = 'John' | |
[1] pry(main)* end | |
[1] pry(main)* @name | |
[1] pry(main)* end | |
[1] pry(main)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ xgo git:(master) ✗ ./xgo -x -v --targets=windows/amd64 ~/Code/go/src/git.3lab.re/marahin/artsh_helper_11 | |
Checking docker installation... | |
Client: | |
Version: 17.06.0-ce | |
API version: 1.30 | |
Go version: go1.8.3 | |
Git commit: 02c1d87 | |
Built: Fri Jun 23 21:31:53 2017 | |
OS/Arch: darwin/amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ xgo git:(master) ✗ ./xgo -x -v --deps=https://downloads.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz\?r\=\&ts\=1500380157\&use_mirror\=netcologne\ https://dropbox.gimb.us/b/eafaa5ae36898da07a3dac1ad08f8ecc.gz --targets=windows/amd64 ~/Code/go/src/git.3lab.re/marahin/artsh_helper_11 | |
Checking docker installation... | |
Client: | |
Version: 17.06.0-ce | |
API version: 1.30 | |
Go version: go1.8.3 | |
Git commit: 02c1d87 | |
Built: Fri Jun 23 21:31:53 2017 | |
OS/Arch: darwin/amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ xgo git:(master) ✗ docker build -t xgo-pngzlib . | |
Sending build context to Docker daemon 1.006MB | |
Step 1/2 : FROM karalabe/xgo-latest | |
---> 84e22b5b5304 | |
Step 2/2 : RUN apt install -y libpng-dev zlib1g-dev | |
---> Using cache | |
---> 06ff979c622d | |
Successfully built 06ff979c622d | |
Successfully tagged xgo-pngzlib:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# golang.org/x/sys/unix | |
../src/golang.org/x/sys/unix/dirent.go:68: undefined: direntReclen | |
../src/golang.org/x/sys/unix/dirent.go:74: undefined: direntIno | |
../src/golang.org/x/sys/unix/dirent.go:82: undefined: direntNamlen | |
../src/golang.org/x/sys/unix/syscall_linux.go:825: ParseDirent redeclared in this block | |
previous declaration at ../src/golang.org/x/sys/unix/dirent.go:64 | |
../src/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:13: gettimeofday redeclared in this block | |
previous declaration at ../src/golang.org/x/sys/unix/syscall_linux_amd64.go:67 | |
../src/golang.org/x/sys/unix/syscall_unix_gc.go:12: Syscall redeclared in this block | |
previous declaration at ../src/golang.org/x/sys/unix/syscall_unix.go:52 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ artsh_helper git:(master) go env | |
GOARCH="amd64" | |
GOBIN="" | |
GOEXE="" | |
GOHOSTARCH="amd64" | |
GOHOSTOS="linux" | |
GOOS="linux" | |
GOPATH="/home/marahin/Code/go" | |
GORACE="" | |
GOROOT="/opt/go" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~ pry | |
[1] pry(main)> 76561198173573574.0 == 76561198173573570.0 | |
=> true | |
[2] pry(main)> 76_561_198_173_573_574 == 76561198173573570.0 | |
=> false | |
[3] pry(main)> 76_561_198_173_573_574 == 76_561_198_173_573_570 | |
=> false | |
[4] pry(main)> 76_561_198_173_573_574 == 76_561_198_173_573_574 | |
=> true | |
[5] pry(main)> puts "#{76_561_198_173_573_574}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep '^[[:blank:]]*[^[:blank:]#;]' file.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1] pry(main)> A = 1 | |
=> 1 | |
[2] pry(main)> A = 2 | |
(pry):2: warning: already initialized constant A | |
(pry):1: warning: previous definition of A was here | |
=> 2 | |
[3] pry(main)> A | |
=> 2 |