Skip to content

Instantly share code, notes, and snippets.

View davidbegin's full-sized avatar

Begin davidbegin

View GitHub Profile
noremap ,g :!go run ./%<cr>
noremap ,t :!make test<cr>
setlocal omnifunc=v:lua.vim.lsp.omnifunc
compiler go
nnoremap <buffer> <space> :silent make <bar> redraw!<CR>
" noremap ,G :w!\|!go run --gcflags "-m=2" ./%<cr>
" noremap <localleader>g :w!\|!go run ./%<cr>
" noremap ,g :w!\|!go build; ./main<cr>
noremap ,g :!go run ./%<cr>
noremap ,t :!make test<cr>
setlocal omnifunc=v:lua.vim.lsp.omnifunc
compiler go
nnoremap <buffer> <space> :silent make <bar> redraw!<CR>
" noremap ,G :w!\|!go run --gcflags "-m=2" ./%<cr>
" noremap <localleader>g :w!\|!go run ./%<cr>
" noremap ,g :w!\|!go build; ./main<cr>
noremap ,g :!go run ./%<cr>
noremap ,t :!make test<cr>
setlocal omnifunc=v:lua.vim.lsp.omnifunc
compiler go
nnoremap <buffer> <space> :silent make <bar> redraw!<CR>
" noremap ,G :w!\|!go run --gcflags "-m=2" ./%<cr>
" noremap <localleader>g :w!\|!go run ./%<cr>
" noremap ,g :w!\|!go build; ./main<cr>
noremap ,g :!go run ./%<cr>
noremap ,t :!make test<cr>
setlocal omnifunc=v:lua.vim.lsp.omnifunc
compiler go
nnoremap <buffer> <space> :silent make <bar> redraw!<CR>
" noremap ,G :w!\|!go run --gcflags "-m=2" ./%<cr>
" noremap <localleader>g :w!\|!go run ./%<cr>
" noremap ,g :w!\|!go build; ./main<cr>
noremap ,g :!go run ./%<cr>
noremap ,t :!make test<cr>
setlocal omnifunc=v:lua.vim.lsp.omnifunc
compiler go
nnoremap <buffer> <space> :silent make <bar> redraw!<CR>
" noremap ,G :w!\|!go run --gcflags "-m=2" ./%<cr>
" noremap <localleader>g :w!\|!go run ./%<cr>
" noremap ,g :w!\|!go build; ./main<cr>
noremap ,g :!go run ./%<cr>
noremap ,t :!make test<cr>
setlocal omnifunc=v:lua.vim.lsp.omnifunc
compiler go
nnoremap <buffer> <space> :silent make <bar> redraw!<CR>
" noremap ,G :w!\|!go run --gcflags "-m=2" ./%<cr>
" noremap <localleader>g :w!\|!go run ./%<cr>
" noremap ,g :w!\|!go build; ./main<cr>
noremap ,g :!go run ./%<cr>
noremap ,t :!make test<cr>
setlocal omnifunc=v:lua.vim.lsp.omnifunc
compiler go
nnoremap <buffer> <space> :silent make <bar> redraw!<CR>
" noremap ,G :w!\|!go run --gcflags "-m=2" ./%<cr>
" noremap <localleader>g :w!\|!go run ./%<cr>
" noremap ,g :w!\|!go build; ./main<cr>
# Teaching Interfaces to an ADHD monster
domalix: hate is a strong word!
domalix: im doing great :) how about you?
domalix: I don't think generic interfaces are the wrong thing to do necessarily, the linked list library uses empty interfaces to store the data
domalix: and i guess you'd have to type assert once you get the data back
domalix: I think the interface stuff i golang is the hardest stuff to learn, someday I'll understand it too... maybe...
domalix: maybe look at the linked list library for inspiration?
domalix: container/list
domalix: type Element struct { // The value stored with this element. Value interface{} // contains filtered or unexported fields } thats how the linked list stores its values in go
from tkinter import *
window = Tk()
# window.geometry("400x400")
window.title("TEST")
# scroll=Scrollbar(window)
# scroll.pack(side=RIGHT, fill=Y)
# listbox=Listbox(window, yscrollcommand = scroll.set)
# Big Newbie Problem
Problem: I Don't Know What To Code?
Bad Solution: Someone says code this
Real Solution: Start learning how to figure out what you want code, what can be
coded. The goal is learning how to identify problems that can be solved with
code.
Someone has already done it?
Mine won't be the best?