길가다 타일 박스에 모르는 단어가 나와서 찾아보니
유리화라는.의미
glassify 가 아니라 왜 저런(?) 아려운 단어가..
'개소리 왈왈' 카테고리의 다른 글
| JWST L2 안착 (0) | 2022.01.25 |
|---|---|
| 18650 3.7V 배터리 쓰는 선풍기 분해 (0) | 2018.04.21 |
| 세상에 나쁜 개는 없다 - 차우차우 편 (0) | 2018.04.05 |
| 네이트온 불안정 (0) | 2018.03.12 |
| 와 신천지 (0) | 2018.02.03 |
길가다 타일 박스에 모르는 단어가 나와서 찾아보니
유리화라는.의미
glassify 가 아니라 왜 저런(?) 아려운 단어가..
| JWST L2 안착 (0) | 2022.01.25 |
|---|---|
| 18650 3.7V 배터리 쓰는 선풍기 분해 (0) | 2018.04.21 |
| 세상에 나쁜 개는 없다 - 차우차우 편 (0) | 2018.04.05 |
| 네이트온 불안정 (0) | 2018.03.12 |
| 와 신천지 (0) | 2018.02.03 |
한번 분해해보니 LED 앞 렌즈쪽이 완전 검게 변해서
줌 해서 보면 완전 검게 나온다.
검으니까 열 더 받고 그러니 더 빠르게 손상되는 악순환인듯
[ : http://itempage3.auction.co.kr/DetailView.aspx?itemno=B334990433] 18650 <<
[ : http://itempage3.auction.co.kr/DetailView.aspx?itemno=B246112501] 18650
[ : http://itempage3.auction.co.kr/DetailView.aspx?itemno=D325367917] 21700
[ : http://itempage3.auction.co.kr/DetailView.aspx?itemno=C622940479] 26650
| 서울 자전거 대행진 신청 (0) | 2024.04.01 |
|---|---|
| 간만에 자전거 (0) | 2024.02.17 |
| 이런.. 자전거대행진 신청 실패 (0) | 2021.11.09 |
| 라이트 청소 (0) | 2021.10.26 |
| 붕어가 되었군 -_ㅠ (0) | 2021.06.06 |
| rust visibility and privacy (0) | 2023.05.25 |
|---|---|
| rust 소유권 (0) | 2023.05.25 |
| c에서 rust 호출하기 (0) | 2023.05.11 |
| rust 실행파일 (0) | 2023.05.11 |
| rust if문 (0) | 2023.05.11 |
유튜브에서 노마드 코더의 추천영상에 webGPU라는게 떠서 찾아보니
겁나 따끈한(고작 8일 지난..) 표준이다.
| WebGPU W3C Working Draft, 10 May 2023 |
[링크 : https://www.w3.org/TR/webgpu/]
[링크 : https://codelabs.developers.google.com/your-first-webgpu-app?hl=ko#0]
크롬94 베타 부터 webgpu 지원이 시작되었다는데(일단 글은 2021.09.11)
[링크 : https://www.clien.net/service/board/park/16489505]
webGL을 물리치고 대세가 될지 아니면 병행하게 될지 미래가 궁금해진다.
윈10 + 크롬 버전 113.0.5672.93(공식 빌드) (64비트)

ubuntu 18.04 + 버전 113.0.5672.126(공식 빌드) (64비트)

[링크 : https://webgpu.github.io/webgpu-samples/samples/shadowMapping]
+
리눅스에서는 webGPU가 disable인데.. 이걸 어떻게 켤 수 있으려나?
chrome://gpu/![]() |
[링크 : https://discourse.threejs.org/t/webgpu-example-not-working-in-ubuntu-20-04/40484]
| javascript 배열을파일로 저장하기 (0) | 2023.08.02 |
|---|---|
| Canvas2D: Multiple readback operations using getImageData (0) | 2023.07.24 |
| chart.js log 스케일 (0) | 2023.03.31 |
| chatGPT님 가라사대 Server-Sent Events (SSE) (0) | 2023.03.15 |
| JWT 로그인 예제 (0) | 2022.08.24 |
기사들이 폭주중
| 윤 대통령의 '바보같은 짓'... 벌써 외국서 신호가 오네요 |
[링크 : https://v.daum.net/v/20230517045400939]
| ‘RE100’ 맞대응으로 원전 등 ‘CF100’ 내세운 정부, 안방용 우려도 |
[링크 : https://v.daum.net/v/20230517143507778]
| 전 정부 탓, 다음 정부에 떠넘기기... 어처구니없는 기후위기 해법 |
[링크 : https://v.daum.net/v/20230516045110685]
+
그나저나 댓글에 보이는 외교선물로 개목걸이라...
외교선물은 아무렇게 고르는게 아니라 의미가 있는걸 텐데...
| 블링컨 국무장관은 윤 대통령 부부에게 퀸(보헤미안 랩소디)과 돈 맥클린(아메리칸 파이)의 레코드판으로 워싱턴과 서울의 전경을 형상화한 액자와 함께, 윤 대통령 부부의 반려견인 써니·새롬이·토리·나래·마리의 영문 이름이 새겨진 산책 줄을 선물했다. |
| 도둑놈 심뽀? (0) | 2023.06.15 |
|---|---|
| 미사일 발사관련 새벽 재난문자 (0) | 2023.05.31 |
| 전기, 가스 요금 인상 (0) | 2023.05.15 |
| 망했어요 (0) | 2023.04.26 |
| 윤대통령 "100년전 일로 무조건 무릎꿇어라 하는건 못받아들여" (0) | 2023.04.24 |
| # cat /sys/class/net/eth0/operstate up # macb e000b000.ethernet eth0: Link is Down # cat operstate down # macb e000b000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off # cat operstate up |
| .bashrc 설정 history (0) | 2023.08.08 |
|---|---|
| lvmcache bcache (0) | 2023.07.27 |
| 리눅스 커맨드 라인에서 몇줄씩 건너뛰고 출력하기 (0) | 2023.03.30 |
| bash completion (0) | 2023.03.27 |
| 리눅스 키보드로 강제 종료하기 (0) | 2023.03.10 |
채널의 경우 1개로 해두면 하나가 들어갈 때 까지 해당 위치에서 블로킹 된다.
아래 예제는 받는 부분을 삭제했는데 그렇기에 채널을 통해 전송은 되지만 수신하지 않아 비워지지 않기 때문에
one을 출력하지 못하고 멈춰있는 것을 확인할 수 있다.
| package main import ( f "fmt" "time" ) func main() { f.Println("select") c1 := make(chan string) c2 := make(chan string) go func() { time.Sleep(time.Second * 1) f.Println("---") c1 <- "one" f.Println("one") c1 <- "two" f.Println("two") c1 <- "three" f.Println("three") c1 <- "four" f.Println("four") }() go func() { time.Sleep(time.Second * 2) c2 <- "fifth" }() for i := 0; i < 10000000000; i++ { time.Sleep(time.Second) } } |
$ go run go.go select --- ^Csignal: interrupt |
다만, make를 통해 채널 버퍼를 n개로 만들어 두면, 넣을 수 있는 동안은 넣고 블로킹 되지 않고 넘어갈 수 있다.
| package main import ( f "fmt" "time" ) func main() { f.Println("select") c1 := make(chan string, 4) c2 := make(chan string) go func() { time.Sleep(time.Second * 1) f.Println("---") c1 <- "one" f.Println("one") c1 <- "two" f.Println("two") c1 <- "three" f.Println("three") c1 <- "four" f.Println("four") }() go func() { time.Sleep(time.Second * 2) c2 <- "fifth" }() for i := 0; i < 10000000000; i++ { time.Sleep(time.Second) } } |
$ go run go.go select --- one two three four ^Csignal: interrupt |
| golang echo server middleware (0) | 2023.05.24 |
|---|---|
| golang 동시성 (0) | 2023.05.24 |
| golang switch, select (0) | 2023.05.16 |
| golang uds (0) | 2023.05.16 |
| golang mutex (sync) (0) | 2023.05.16 |
커널에서 xilinx uartlite 쓰도록 해주고
device tree에서 axi 주소 추가해주고
vivado block design에서 axi와 PS로 uartlite 블록을 연결해주면 되는건가?
[링크 : https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842249/Uartlite+Driver]
| zynq fsbl (0) | 2023.07.07 |
|---|---|
| zynq w/o ps (0) | 2023.06.30 |
| xilinx vivado uart ip (0) | 2023.05.12 |
| xilinx bram uram (0) | 2023.05.12 |
| xilinx - partial bitstream (0) | 2023.04.24 |
golang switch는 신형 언어에 확장되서 그런가 꽤나 만능이다.
특이하게 조건식도 가능하고, 케이스 리스트도 된다.(c#에서 얼핏 봤던 느낌..)
| package main import ( "fmt" "time" ) func main() { t := time.Now() switch { case t.Hour() < 12: fmt.Println("Good morning!") case t.Hour() < 17: fmt.Println("Good afternoon.") default: fmt.Println("Good evening.") } } |
[링크 :https://go.dev/tour/flowcontrol/11]
| func WhiteSpace(c rune) bool { switch c { case ' ', '\t', '\n', '\f', '\r': return true } return false } |
[링크 : https://hamait.tistory.com/1017]
아무튼 select는 channel 처리에 좀더 특화된 구문으로 생긴것 자체는 switch - case와 동일하게 작성된다.
다만, 동시에 여러개가 들어왔을 경우 랜덤하게 실행된다고 한다.
(생각이 꼬였는지 동시에 들어오면 가장 위에꺼 부터 실행되어야 하는거 아냐? 싶은데 동시성이니까 랜덤하게 처리되는건가..)
| The select statement lets a goroutine wait on multiple communication operations. A select blocks until one of its cases can run, then it executes that case. It chooses one at random if multiple are ready. |
| package main import "fmt" func fibonacci(c, quit chan int) { x, y := 0, 1 for { select { case c <- x: x, y = y, x+y case <-quit: fmt.Println("quit") return } } } func main() { c := make(chan int) quit := make(chan int) go func() { for i := 0; i < 10; i++ { fmt.Println(<-c) } quit <- 0 }() fibonacci(c, quit) } |
[링크 : https://go.dev/tour/concurrency/5]
[링크 : https://edu.goorm.io/learn/lecture/2010/한-눈에-끝내는-고랭-기초/lesson/382961/채널-select문]
| golang 동시성 (0) | 2023.05.24 |
|---|---|
| golang 고루틴과 채널 (0) | 2023.05.16 |
| golang uds (0) | 2023.05.16 |
| golang mutex (sync) (0) | 2023.05.16 |
| go 포맷터 (0) | 2023.05.11 |
쓸만하려나?
| server | client |
| package main import ( "fmt" "log" "os" "path/filepath" "time" "github.com/google/uuid" "github.com/johnsiilver/golib/ipc/uds" ) func main() { socketAddr := filepath.Join(os.TempDir(), uuid.New().String()) cred, _, err := uds.Current() if err != nil { panic(err) } // This will set the socket file to have a uid and gid of whatever the // current user is. 0770 will be set for the file permissions (though on some // systems the sticky bit gets set, resulting in 1770. serv, err := uds.NewServer(socketAddr, cred.UID.Int(), cred.GID.Int(), 0770) if err != nil { panic(err) } fmt.Println("Listening on socket: ", socketAddr) // This listens for a client connecting and returns the connection object. for conn := range serv.Conn() { conn := conn // We spinoff handling of this connection to its own goroutine and // go back to listening for another connection. go func() { // We are checking the client's user ID to make sure its the same // user ID or we reject it. Cred objects give you the user's // uid/gid/pid for filtering. if conn.Cred.UID.Int() != cred.UID.Int() { log.Printf("unauthorized user uid %d attempted a connection", conn.Cred.UID.Int()) conn.Close() return } // Write to the stream every 10 seconds until the connection closes. for { if _, err := conn.Write([]byte(fmt.Sprintf("%s\n", time.Now().UTC()))); err != nil { conn.Close() } time.Sleep(10 * time.Second) } }() } } |
package main import ( "flag" "fmt" "io" "os" "github.com/johnsiilver/golib/ipc/uds" ) var ( addr = flag.String("addr", "", "The path to the unix socket to dial") ) func main() { flag.Parse() if *addr == "" { fmt.Println("did not pass --addr") os.Exit(1) } cred, _, err := uds.Current() if err != nil { panic(err) } // Connects to the server at socketAddr that must have the file uid/gid of // our current user and one of the os.FileMode specified. client, err := uds.NewClient(*addr, cred.UID.Int(), cred.GID.Int(), []os.FileMode{0770, 1770}) if err != nil { fmt.Println(err) os.Exit(1) } // client implements io.ReadWriteCloser and this will print to the screen // whatever the server sends until the connection is closed. io.Copy(os.Stdout, client) } |
[링크 : https://github.com/johnsiilver/golib/blob/v1.1.2/ipc/uds/example/server/server.go]
[링크 : https://github.com/johnsiilver/golib/blob/v1.1.2/ipc/uds/example/client/client.go]
[링크 : https://pkg.go.dev/github.com/johnsiilver/golib/ipc/uds]
| golang 고루틴과 채널 (0) | 2023.05.16 |
|---|---|
| golang switch, select (0) | 2023.05.16 |
| golang mutex (sync) (0) | 2023.05.16 |
| go 포맷터 (0) | 2023.05.11 |
| golang echo directory listing (0) | 2023.05.08 |