Go Language Resources Go, golang, go... NOTE: This page ceased updating in October, 2012

--- Log opened Fri Jan 14 00:00:03 2011
00:01 -!- tor8 [~tor@host-90-236-79-58.mobileonline.telia.com] has quit [Read
error: Connection reset by peer]
00:02 -!- tor8 [~tor@host-90-236-79-58.mobileonline.telia.com] has joined #go-nuts
00:02 -!- Scorchin [~Scorchin@host109-154-188-108.range109-154.btcentralplus.com]
has quit [Quit: Scorchin]
00:02 -!- cafesofie [~cafesofie@dhcp-140-254-204-143.osuwireless.ohio-state.edu]
has joined #go-nuts
00:11 < teejae> hey, is there a shortcut for declaring using a constant as a
variable and then taking it's address?
00:11 < teejae> like
00:12 < teejae> a *int = &5
00:12 < teejae> or some form like that
00:12 < teejae> or do i always need 2 statements?
00:13 < teejae> b := 5; a = &b
00:13 -!- tor8_ [~tor@c-ad7471d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
00:14 -!- barkmore [~textual@216.243.14.9] has quit [Remote host closed the
connection]
00:16 -!- tor8 [~tor@host-90-236-79-58.mobileonline.telia.com] has quit [Ping
timeout: 240 seconds]
00:25 < exch> You can't do '&5'
00:29 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit:
DarthShrine]
00:32 < teejae> exch: nope
00:34 -!- dsal [~Adium@208.185.212.98] has quit [Quit: Leaving.]
00:39 -!- ExtraSpice [~XtraSpice@88.118.33.48] has quit [Read error: Connection
reset by peer]
00:39 < KirkMcDonald> teejae: Constants don't have an address.
00:40 < teejae> KirkMcDonald:
00:40 < teejae> KirkMcDonald: right, that i understand
00:40 < teejae> is there a 1-liner
00:40 < KirkMcDonald> teejae: a := new(int); *a = 5
00:41 < KirkMcDonald> I wonder if the syntax &int{5} works...
00:41 < teejae> ok, so no 1-ilner
00:41 < teejae> ooh
00:41 < KirkMcDonald> It would be a *little* silly if it did.
00:41 < teejae> it doesn't
00:42 < KirkMcDonald> "The LiteralType must be a struct, array, slice, or
map type..."
00:42 < KirkMcDonald> Yeah.
00:42 < teejae> ok
00:42 < KirkMcDonald> But new(int) is probably better than declaring an
otherwise-unused variable.
00:42 < teejae> right
00:42 < teejae> ok
00:43 < teejae> KirkMcDonald: appreciate your help on that
00:52 -!- tor8 [~tor@c-ad7471d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[Ping timeout: 255 seconds]
00:54 -!- tor8 [~tor@c-ad7471d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
00:58 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has joined #go-nuts
00:58 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has quit [Changing host]
00:58 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined
#go-nuts
01:00 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
01:01 -!- tor8 [~tor@c-ad7471d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[Ping timeout: 276 seconds]
01:01 < exch> yay.  Go code completion in gedit
01:02 -!- tor8 [~tor@c-ad7471d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
01:04 < exch> This saves me having to load up the package docs all the time.
Nice
01:05 < m4dh4tt3r> i just keep the pkg docs open in another window for
reference . . .
01:05 < exch> I used to do that as well.  But now I don't have to anymore :p
01:05 < m4dh4tt3r> fair enough.  :-)
01:05 < m4dh4tt3r> different coding practices, i guess.  ;-)
01:06 < exch> Besides, I don't use the docs that often anymore.  Got much of
it committed to memory.  it's just those functions you rarely ever use
01:06 < m4dh4tt3r> personally, i don't really like code completion
01:06 < m4dh4tt3r> just personal preference, though
01:06 < exch> ya
01:08 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has quit [Ping
timeout: 240 seconds]
01:09 < skelterjohn> I certainly wouldn't mind a little list of
possibilities popping up when i type <pkg>.
01:19 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has joined
#go-nuts
01:28 < skelterjohn> anyone know how to make hg use emacs instead of vim for
commits?
01:35 < cbeck> edit your .hgrc
01:35 < skelterjohn> yeah...  i was wondering what change to .hgrc i might
make
01:36 < cbeck> add "editor=emacs" to the ui section
01:36 < skelterjohn> thanks
01:38 -!- niemeyer_ [~niemeyer@201-40-152-161.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
01:45 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
01:50 -!- g0bl1n_ [~pr0kter@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
01:50 < g0bl1n_> .
01:56 -!- g0bl1n_ [~pr0kter@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: I haz a
dreamz...]
01:56 -!- g0bl1n [~pr0kter@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
01:58 -!- g0bl1n [~pr0kter@a213-22-18-58.cpe.netcabo.pt] has quit [Client Quit]
01:59 -!- cafesofie [~cafesofie@dhcp-140-254-204-143.osuwireless.ohio-state.edu]
has quit [Remote host closed the connection]
02:00 -!- g0bl1n [~pr0kter@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
02:02 -!- g0bl1n [~pr0kter@a213-22-18-58.cpe.netcabo.pt] has quit [Client Quit]
02:02 -!- cafesofie [~cafesofie@dhcp-140-254-204-143.osuwireless.ohio-state.edu]
has joined #go-nuts
02:13 -!- g0bl1n [~pr0kter@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
02:14 -!- boscop [~boscop@g227007229.adsl.alicedsl.de] has quit [Ping timeout: 240
seconds]
02:24 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
02:39 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
02:40 -!- tor8 [~tor@c-ad7471d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[Quit: tor8]
02:40 -!- sav [~lsd@189001130056.usr.predialnet.com.br] has joined #go-nuts
02:40 -!- g0bl1n [~pr0kter@a213-22-18-58.cpe.netcabo.pt] has quit [Changing host]
02:40 -!- g0bl1n [~pr0kter@unaffiliated/g0bl1n] has joined #go-nuts
02:43 < chaos95> doesn't hg use $EDITOR?
02:46 -!- binarypie [~binarypie@adsl-99-37-224-209.dsl.pltn13.sbcglobal.net] has
quit [Remote host closed the connection]
02:48 -!- g0bl1n [~pr0kter@unaffiliated/g0bl1n] has quit [Quit: I haz a dreamz...]
02:48 -!- g0bl1n [~pr0kter@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
02:48 -!- g0bl1n [~pr0kter@a213-22-18-58.cpe.netcabo.pt] has quit [Changing host]
02:48 -!- g0bl1n [~pr0kter@unaffiliated/g0bl1n] has joined #go-nuts
02:49 -!- cafesofie [~cafesofie@dhcp-140-254-204-143.osuwireless.ohio-state.edu]
has quit [Remote host closed the connection]
02:49 -!- m4dh4tt3r [~Adium@adsl-75-61-193-22.dsl.pltn13.sbcglobal.net] has quit
[Quit: Leaving.]
02:54 -!- g0bl1n [~pr0kter@unaffiliated/g0bl1n] has quit [Quit: I haz a dreamz...]
02:56 -!- m4dh4tt3r [~Adium@adsl-76-205-57-182.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
02:56 < skelterjohn> prefer not to pollute the env if i can help it
02:59 -!- sav [~lsd@189001130056.usr.predialnet.com.br] has quit [Quit: Leaving]
03:03 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has joined
#go-nuts
03:16 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
03:16 -!- dforsyth [~dforsyth@c-76-21-40-117.hsd1.ca.comcast.net] has joined
#go-nuts
03:17 < drd> hmm, so i know how to go from a Go string to a C string, but
how do i go from a C string to a Go string?
03:20 <@adg> drd: C.GoString(char *p) ?
03:21 < drd> adg: oh, that's ..  easy
03:22 < drd> tx
03:22 -!- quantumelixir [~chillu@203.110.240.41] has quit [Ping timeout: 240
seconds]
03:25 <@adg> drd: np
03:25 -!- m4dh4tt3r1 [~Adium@adsl-76-205-57-182.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
03:26 -!- m4dh4tt3r [~Adium@adsl-76-205-57-182.dsl.pltn13.sbcglobal.net] has quit
[Read error: Connection reset by peer]
03:27 -!- keithgcascio [~keithcasc@nat/google/x-wfzkkhgvxptstzcr] has quit [Quit:
Leaving]
03:28 -!- Venom_a [~pjacobs@75.92.43.21] has quit [Quit: Venom_a]
03:34 -!- quantumelixir [~chillu@203.110.240.41] has joined #go-nuts
03:48 -!- smw [~stephen@pool-70-104-128-58.nycmny.fios.verizon.net] has joined
#go-nuts
03:52 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 276
seconds]
03:53 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 240 seconds]
04:00 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
04:02 -!- tav [~tav@92.7.83.241] has joined #go-nuts
04:08 -!- m4dh4tt3r [~Adium@234.sub-75-208-95.myvzw.com] has joined #go-nuts
04:09 < plexdev> http://is.gd/pnkGCL by [Ian Lance Taylor] in go/src/cmd/ld/
-- ld: Permit an ELF symbol to be exported in the dynamic symbol table.
04:09 < plexdev> http://is.gd/FFHbVv by [Andrew Gerrand] in 2 subdirs of go/
-- release.2011-01-06
04:09 < plexdev> http://is.gd/BQKp8v by [Andrew Gerrand] in go/ -- tag
release.2011-01-06
04:10 < plexdev> http://is.gd/03T5mW by [Adam Langley] in
go/src/pkg/crypto/block/ -- crypto/block: mark as deprecated.
04:10 -!- m4dh4tt3r1 [~Adium@adsl-76-205-57-182.dsl.pltn13.sbcglobal.net] has quit
[Ping timeout: 272 seconds]
04:10 < plexdev> http://is.gd/Taak4Z by [Robert Griesemer] in
go/src/cmd/gofmt/ -- gofmt: rewriter matches apply to expressions only
04:10 < plexdev> http://is.gd/LBVMlt by [Rob Pike] in go/src/pkg/bytes/ --
bytes.Buffer: Fix bug in UnreadByte.
04:10 < plexdev> http://is.gd/5c3k25 by [Rob Pike] in go/src/pkg/time/ --
time.NewTicker: panic for intervals <= 0.
04:10 < plexdev> http://is.gd/z4Rnoh by [Robert Griesemer] in
go/src/cmd/gofmt/ -- gofmt: don't attempt certain illegal rewrites
04:10 < plexdev> http://is.gd/yWc7dI by [Rob Pike] in go/src/pkg/syscall/ --
arm: fix build
04:10 < plexdev> http://is.gd/Wwttmp by [Ken Thompson] in go/src/cmd/5g/ --
initial cut at arm optimizer
04:10 < plexdev> http://is.gd/vUlxsk by [Ken Thompson] in go/src/cmd/5g/ --
add peep
04:10 < plexdev> http://is.gd/LQnXZc by [Adam Langley] in 2 subdirs of
go/src/pkg/ -- encoding/line: add
04:10 < plexdev> http://is.gd/C2LC6N by [Ian Lance Taylor] in
go/src/pkg/runtime/ -- runtime: Restore scheduler stack position if cgo callback
panics.
04:10 < plexdev> http://is.gd/jsJMLs by [Peter Mundy] in go/doc/ -- doc:
contribution copyright year 2011
04:10 < plexdev> http://is.gd/4NsK1K by [Eoghan Sherry] in go/src/pkg/time/
-- time: fix tick accuracy when using multiple Tickers
04:10 < plexdev> http://is.gd/v9CAlo by [Peter Mundy] in go/src/pkg/bytes/
-- bytes: fix TrimSpace typo
04:10 < plexdev> http://is.gd/STBFXq by [Robert Griesemer] in 3 subdirs of
go/src/pkg/go/ -- go/ast: correct end position for Index and TypeAssert
expressions
04:10 < plexdev> http://is.gd/NZR2hf by [Roger Peppe] in go/src/pkg/time/ --
time: add AfterFunc to call a function after a given duration.
04:11 < plexdev> http://is.gd/fglux4 by [Ken Thompson] in go/src/cmd/5g/ --
arm optimizer bug fixes
04:11 < plexdev> http://is.gd/dn1ULH by [Robert Griesemer] in go/doc/ -- go
spec: remove Maxalign from spec
04:11 < plexdev> http://is.gd/h6oCGy by [Robert Griesemer] in 3 subdirs of
go/ -- godoc: support for regular expression full text search
04:11 < plexdev> http://is.gd/cyqrSk by [Gustavo Niemeyer] in
go/src/cmd/cgo/ -- cgo: fix enum const conflict
04:11 < plexdev> http://is.gd/KXzA76 by [Gustavo Niemeyer] in
go/src/cmd/cgo/ -- cgo: output alignment fix
04:11 < plexdev> http://is.gd/2k1L1N by [Gustavo Niemeyer] in
go/src/cmd/cgo/ -- cgo: export unsafe.Pointer as void*
04:11 < plexdev> http://is.gd/5FxOBB by [Russ Cox] in go/src/cmd/godefs/ --
godefs: better handling of enums
04:11 < plexdev> http://is.gd/JjZ42u by [Ian Lance Taylor] in
go/src/pkg/runtime/cgo/ -- runtime/cgo: Add callbacks to support SWIG.
04:11 < plexdev> http://is.gd/Z5RsFW by [Rob Pike] in go/src/pkg/log/ --
log: add methods for exit and panic
04:11 < plexdev> http://is.gd/zGvhLo by [Gustavo Niemeyer] in
go/src/cmd/goinstall/ -- goinstall: preliminary support for cgo packages
04:11 < plexdev> http://is.gd/vfK3IU by [Ian Lance Taylor] in go/src/cmd/ld/
-- ld: Permit an Mach-O symbol to be exported in the dynamic symbol table.
04:11 < plexdev> http://is.gd/cAtcjE by [Anthony Martin] in
go/src/pkg/syscall/ -- syscall: fix mksysnum_linux.sh
04:11 < plexdev> http://is.gd/edRtJd by [Rob Pike] in go/src/pkg/netchan/ --
netchan: make fields public for pending gob change
04:11 < plexdev> http://is.gd/871FDe by [Rob Pike] in go/src/pkg/gob/ --
gob: do not encode or decode unexported fields
04:12 < plexdev> http://is.gd/gGTB6j by [Ian Lance Taylor] in 2 subdirs of
go/src/cmd/ -- ld: Fix exported dynamic symbols on Mach-O.
04:12 < plexdev> http://is.gd/Qp8pHr by [Russ Cox] in go/src/pkg/http/ --
http: fix text displayed in Redirect
04:12 < plexdev> http://is.gd/0Lmnd8 by [Ian Lance Taylor] in go/src/cmd/8l/
-- ld: Fix exported dynamic symbols on 386 Mach-O.
04:12 < plexdev> http://is.gd/9mQJjB by [Rob Pike] in go/src/pkg/template/
-- template: allow accesses only to exported fields and methods
04:12 < plexdev> http://is.gd/HpMo5B by [Andrew Gerrand] in 2 subdirs of
go/src/pkg/ -- os: add Sync to *File, wraps syscall.Fsync
04:12 < plexdev> http://is.gd/vhlnow by [Alex Brainman] in 8 subdirs of
go/src/pkg/ -- runtime: revert 6974:1f3c3696babb
04:12 < plexdev> http://is.gd/aV9MxP by [Andrew Gerrand] in go/src/pkg/json/
-- json: do not Marshal unexported struct fields
04:12 < plexdev> http://is.gd/JfE4aL by [Ken Thompson] in go/src/cmd/5g/ --
turn off peep half of optimizer for release
04:12 < plexdev> http://is.gd/fVJHon by [Berengar Lehr] in 3 subdirs of go/
-- crypto: add twofish package
04:12 < plexdev> http://is.gd/o7RFZf by [Adam Langley] in 2 subdirs of
go/src/pkg/crypto/openpgp/ -- crypto/openpgp: add error and armor
04:12 < plexdev> http://is.gd/7NiOZ5 by [Rob Pike] in go/src/pkg/gob/ --
gob: make (en|dec)code(Ui|I)nt methods rather than functions.
04:12 < plexdev> http://is.gd/pZJRo6 by [Alex Brainman] in 2 subdirs of
go/src/pkg/ -- net: use closesocket api instead of CloseHandle on Windows
04:12 < plexdev> http://is.gd/xJ4pfY by [Nigel Tao] in go/ -- hg: add
cgo/_cgo_* to .hgignore.
04:13 < plexdev> http://is.gd/lOEnX1 by [Robert Griesemer] in
go/src/cmd/godoc/ -- godoc: remove TODO (bug257.go can now be indexed)
04:13 < plexdev> http://is.gd/wIDHeF by [Rob Pike] in go/ -- C&A for Eric
Eisner
04:13 < plexdev> http://is.gd/E7Damy by [Eric Eisner] in
go/src/pkg/index/suffixarray/ -- suffixarray: faster creation algorithm
04:13 < plexdev> http://is.gd/d3G2zW by [Rob Pike] in go/src/pkg/template/
-- template: give "unexported" error when accessing an unexported field.
04:13 < plexdev> http://is.gd/0vBmqK by [Rob Pike] in
go/src/pkg/encoding/line/ -- encoding/line: fix error call (missing argument)
04:13 < plexdev> http://is.gd/UMLyYP by [Gustavo Niemeyer] in
go/src/cmd/goinstall/ -- goinstall: Fix template to use exported fields
04:13 < plexdev> http://is.gd/zTT49A by [Rob Pike] in go/src/pkg/rpc/ --
rpc: export names in debug service so it works with template changes
04:13 < plexdev> http://is.gd/kRyQSl by [Rob Pike] in go/src/cmd/5g/ --
disable arm registifier for the moment
04:13 -!- teejae [~teejae@softbank219185095092.bbtec.net] has quit [Quit: teejae]
04:13 < plexdev> http://is.gd/bXMR0b by [Andrew Gerrand] in 2 subdirs of go/
-- release.2011-01-12
04:13 < plexdev> http://is.gd/QPDFr4 by [Andrew Gerrand] in go/ -- tag
release.2011-01-12
04:13 < plexdev> http://is.gd/n5xZvd by [Robert Griesemer] in
go/src/cmd/godoc/ -- godoc: peephole optimization for generated HTML
04:13 < plexdev> http://is.gd/8P1EZz by [Robert Griesemer] in go/doc/ --
go_spec: specify that int and uint have the same size
04:13 < plexdev> http://is.gd/qcqlW5 by [Russ Cox] in go/src/pkg/http/ --
http: handle HEAD requests correctly
04:13 < plexdev> http://is.gd/f8x1ko by [Robert Griesemer] in
go/src/cmd/godoc/ -- godoc: don't double HTML-escape search result snippets
04:13 < plexdev> http://is.gd/BIABr4 by [Brad Fitzpatrick] in
go/src/pkg/http/ -- http: fix scheme-relative URL parsing; add ParseRequestURL
04:13 < plexdev> http://is.gd/ts8P6V by [Andrew Gerrand] in go/ --
CONTRIBUTORS: add bradfitz@golang.org
04:14 < plexdev> http://is.gd/SxkRt3 by [Andrew Gerrand] in go/ --
CONTRIBUTORS: fix bradfitz entry
04:14 < plexdev> http://is.gd/xrv5Ux by [Ken Thompson] in 2 subdirs of
go/src/cmd/ -- add TST op code
04:14 < plexdev> http://is.gd/NLkf4N by [Rob Pike] in go/src/pkg/cmath/ --
cmath test: fix format (%g does not print booleans)
04:14 < plexdev> http://is.gd/pv4FHN by [Robert Griesemer] in 5 subdirs of
go/src/ -- go/scanner: Make Init take a *token.File instead of a *token.FileSet.
04:14 < plexdev> http://is.gd/QSTR6P by [Robert Griesemer] in
go/src/pkg/go/parser/ -- fix build (submitted a modified parser.go file by
mistake)
04:14 < plexdev> http://is.gd/KbgI0I by [Robert Griesemer] in 2 subdirs of
go/src/pkg/ -- fix build (this time for real): adjust typechecker test, ogle
04:14 < plexdev> http://is.gd/r4paMF by [Robert Griesemer] in go/lib/godoc/
-- godoc: remove tab before <pre>-formatted section
04:16 <@adg> wow, what a busy day!
04:17 < Namegduf> XD
04:17 < m4dh4tt3r> busy day indeed!
04:18 < m4dh4tt3r> looks like a lot of good stuff went in today
04:18 < adu> really?  that looks like a release tag to me
04:19 < m4dh4tt3r> adu: well, you might be right.  just seemed like there
were some good fixes that happened.  :-)
04:20 < adu> "disable arm registifier for the moment" doesn't sound like a
good fix
04:21 < m4dh4tt3r> that seems to be a work in progress that was disabled for
the release.
04:26 < adu> my new year's resolution: to blog more
04:27 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
04:28 < plexdev> http://is.gd/RNz8tm by [Ken Thompson] in 2 subdirs of
go/src/cmd/ -- fix tst instruction on arm to set overflow bit
04:28 < homa_rano> plexdev seems to be catching up from being behind
04:29 < homa_rano> has anyone had any problems with testing.B?
04:29 < homa_rano> on some machines it is recording 0ns for an obvious long
operation
04:33 -!- Facefoxdotcom [~machine4@pool-74-111-197-200.lsanca.fios.verizon.net]
has quit [Quit: www.FaceFox.com]
04:36 -!- lmoura_ [~lauromour@186.212.117.111] has quit [Ping timeout: 240
seconds]
04:49 -!- lmoura_ [~lauromour@187.59.245.160] has joined #go-nuts
05:01 -!- cafesofie [~cafesofie@rnwifi-164-107-92-6.resnet.ohio-state.edu] has
joined #go-nuts
05:01 -!- gits [~gits@77.94.219.158] has joined #go-nuts
05:06 -!- gits [~gits@77.94.219.158] has quit [Ping timeout: 260 seconds]
05:09 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
05:10 -!- crazy2be [~justin@d75-152-162-237.abhsia.telus.net] has joined #go-nuts
05:11 < crazy2be> anyone know of a pastebin that supports go?
05:13 < nsf> pastie.org
05:14 < nsf> gist.github.com
05:14 < nsf> paste.pocoo.org
05:14 < crazy2be> ah, pastbin.com used to support it i think
05:14 < crazy2be> and it's listed in the topic
05:14 < nsf> as far as I know, no
05:14 < crazy2be> should be one of the others in the topic
05:15 < nsf> indeed
05:19 -!- adg changed the topic of #go-nuts to: Go: http://golang.org | Bug
tracker: http://code.google.com/p/go/issues/list | Please use a pastebin (like
pastie.org) and include all context when reporting issues | don't ask to ask -
just ask
05:19 < nsf> yay!
05:19 < nsf> :P
05:20 < crazy2be> haha
05:21 < nsf> irc mantra should be: don't ask to ask - just ask, don't ask
and leave - just ask and wait
05:21 < nsf> :P
05:21 < crazy2be> we used to call them "drive-by IRCers"
05:22 < crazy2be> come, ask a quesiton, and then leave 5 minutes (or less!)
later
05:22 <@adg> * foo joins
05:22 <@adg> <foo> Hi, how does the lambda calculus work?
05:22 <@adg> <foo> anyone?
05:22 <@adg> * foo leaves
05:22 < crazy2be> how does the lambda calculus work?
05:23 < crazy2be> does that even make sence?
05:23 <@adg> crazy2be: it was supposed to be a question that is highly
ambiguous
05:23 < crazy2be> haha
05:23 < nsf> I want to send guys like this to past in time, when men were
writing letters each other
05:23 <@adg> hahaha
05:23 < crazy2be> can you take the derivative of a lambda function?
05:24 < crazy2be> heh
05:24 < m4dh4tt3r> heh
05:37 -!- cafesofie [~cafesofie@rnwifi-164-107-92-6.resnet.ohio-state.edu] has
quit [Remote host closed the connection]
05:42 < Maxdamantus> crazy2be: you're thinking of differential calculus.
05:42 < Maxdamantus> crazy2be: lambda calculus is another kind of calculus,
and a calculus is really just a system for manipulating expressions at a symbolic
level.
05:43 < Maxdamantus> (due to popularily of two calculi though, "calculus"
often refers to those: integral, differential)
05:44 -!- cafesofie [~cafesofie@rnwifi-164-107-92-6.resnet.ohio-state.edu] has
joined #go-nuts
05:46 * Maxdamantus realised that was probably a sarcastic/rhetolrical question.
05:49 -!- tav [~tav@92.7.83.241] has quit [Quit: tav]
05:51 < nsf> :)
05:52 <@adg> rhetololrical
05:53 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 240 seconds]
05:57 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 240
seconds]
05:59 < crazy2be> wait, lambda calculus actually exists?
05:59 < crazy2be> oh cool
06:00 < crazy2be> i'll add it to my to-read list on wikipedia
06:00 < crazy2be> for now, it is bedtime
06:00 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 260 seconds]
06:06 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
06:10 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
06:10 -!- mode/#go-nuts [+v iant] by ChanServ
06:18 -!- crazy2be [~justin@d75-152-162-237.abhsia.telus.net] has quit [Remote
host closed the connection]
06:34 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has quit [Quit:
adu]
06:40 -!- vpit3833 [~user@203.111.33.203] has quit [Quit: ERC Version 5.3 (IRC
client for Emacs)]
06:55 -!- m4dh4tt3r [~Adium@234.sub-75-208-95.myvzw.com] has quit [Ping timeout:
255 seconds]
06:55 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
07:02 -!- quantumelixir [~chillu@203.110.240.41] has quit [Ping timeout: 240
seconds]
07:09 -!- quantumelixir [~chillu@203.110.240.41] has joined #go-nuts
07:12 < quantumelixir> How do you type unicode characters in vim?
07:12 < quantumelixir> Greek alphabets for instance..
07:14 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-eglrrbovxahgbbkz]
has quit [Ping timeout: 265 seconds]
07:15 < jesusaurus> set up a compose key?
07:15 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-mbxjmacjmudigmaz]
has joined #go-nuts
07:16 < quantumelixir> jesusaurus: can you explain how?
07:18 < jesusaurus> https://help.ubuntu.com/community/ComposeKey
07:18 < jesusaurus> http://www.hermit.org/Linux/ComposeKeys.html
07:20 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-mbxjmacjmudigmaz]
has quit [Ping timeout: 250 seconds]
07:22 < quantumelixir> :help digraphs in vim seems useful
07:22 < quantumelixir> For reference,
http://www.alecjacobson.com/weblog/?p=443, tells how to input Greek alphabets
07:22 < Namegduf> Sounds like something that should really be handled at a
level above vim
07:23 < Namegduf> In your terminal emulator or above that.
07:23 < Namegduf> Ctrl+Shift+U followed by the character's value seems
common at the DE level (I think that's where it's implemented?)
07:23 < quantumelixir> Very intuitive in vim: ^KS* prints capital Sigma
07:24 < quantumelixir> Go vim!  ;)
07:26 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-lhxfusbsuuwhztvk]
has joined #go-nuts
07:44 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
07:52 < Maxdamantus> I think terminals usually use a separate input system.
07:52 < Maxdamantus> So unless they specifically used C-U
07:53 < Maxdamantus> urxvt has ctrl-shift hold while you enter in a unicode
in hex
07:55 < Maxdamantus> (it happens at an application level, but for
applications using eg, Gtk+ it will probably work with C-U for input boxes.
07:55 < Maxdamantus> )
07:57 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
07:59 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Excess
Flood]
08:03 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
08:19 -!- quantumelixir [~chillu@203.110.240.41] has quit [Ping timeout: 240
seconds]
08:25 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
08:25 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
08:28 -!- karshan [~karshan@122.163.96.34] has joined #go-nuts
08:30 -!- tvw [~tv@e176000238.adsl.alicedsl.de] has joined #go-nuts
08:42 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
08:44 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
08:47 -!- wrtp [~rog@92.17.51.154] has joined #go-nuts
08:55 -!- SRabbelier [~SRabbelie@188.142.63.148] has quit [Quit: Leaving.]
08:57 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-148-187.clienti.tiscali.it] has
joined #go-nuts
08:57 -!- SRabbelier [~SRabbelie@188.142.63.148] has joined #go-nuts
09:04 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
09:06 -!- piranha [~piranha@94-248-73-228.dynamic.peoplenet.ua] has joined
#go-nuts
09:07 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit
[Ping timeout: 240 seconds]
09:09 -!- piranha_ [~piranha@94-248-73-228.dynamic.peoplenet.ua] has joined
#go-nuts
09:09 -!- piranha [~piranha@94-248-73-228.dynamic.peoplenet.ua] has quit [Read
error: Connection reset by peer]
09:19 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
09:23 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has joined #go-nuts
09:24 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
09:25 -!- cafesofie [~cafesofie@rnwifi-164-107-92-6.resnet.ohio-state.edu] has
quit [Remote host closed the connection]
09:26 < zozoR> i sometimes wish that someone made a urllib like the one i
python for go, so i dont have to learn everythin about http
09:26 < zozoR> :D
09:31 -!- cafesofie [~cafesofie@rnwifi-164-107-92-6.resnet.ohio-state.edu] has
joined #go-nuts
09:31 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
09:34 -!- grouzen [~grouzen@ip22-159.200.109.crimea.com] has quit [Ping timeout:
250 seconds]
09:34 -!- karshan [~karshan@122.163.96.34] has quit [Ping timeout: 265 seconds]
09:42 < zozoR> if i ever find out a way to connect to a server i will
convince myself to make one -.-
09:46 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts
10:00 -!- nettok [~quassel@200.119.163.249] has quit [Ping timeout: 264 seconds]
10:02 -!- rbraley [~rbraley@ip72-222-134-229.ph.ph.cox.net] has quit [Ping
timeout: 276 seconds]
10:03 -!- wrtp [~rog@92.17.51.154] has quit [Ping timeout: 240 seconds]
10:04 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
10:06 -!- karshan [~karshan@122.163.96.34] has joined #go-nuts
10:09 -!- jkakar [~jkakar@91.189.88.12] has joined #go-nuts
10:10 -!- wrtp [~rog@92.17.51.154] has joined #go-nuts
10:11 -!- Kashia [~Kashia@port-92-200-73-52.dynamic.qsc.de] has quit [Quit: This
computer has gone to sleep]
10:15 -!- rbraley [~rbraley@ip72-222-134-229.ph.ph.cox.net] has joined #go-nuts
10:20 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Ping timeout: 255
seconds]
10:22 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
10:24 -!- aconran__ [~aconran-o@adsl-67-119-205-150.dsl.pltn13.pacbell.net] has
joined #go-nuts
10:24 -!- aconran [~aconran-o@adsl-67-119-205-150.dsl.pltn13.pacbell.net] has quit
[Remote host closed the connection]
10:28 -!- petrux_ [~petrux@host16-224-static.53-82-b.business.telecomitalia.it]
has joined #go-nuts
10:30 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Ping timeout: 255 seconds]
10:36 -!- g0bl1n [~g0blin@unaffiliated/g0bl1n] has joined #go-nuts
10:38 -!- artefon [~thiago@189.59.196.3] has joined #go-nuts
10:41 -!- g0bl1n [~g0blin@unaffiliated/g0bl1n] has quit [Client Quit]
10:41 -!- karshan [~karshan@122.163.96.34] has quit [Ping timeout: 260 seconds]
10:43 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
10:55 -!- virtualsue [~chatzilla@nat/cisco/x-tnydnulkfkvdccrn] has joined #go-nuts
11:00 -!- tor8 [~tor@c-ad7471d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
11:02 -!- dforsyth [~dforsyth@c-76-21-40-117.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
11:04 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
11:07 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Ping timeout: 255
seconds]
11:09 -!- georgekollias [~georgekol@nor75-7-81-57-48-111.fbx.proxad.net] has
joined #go-nuts
11:12 -!- wtfness [~dsc@78.101.112.199] has joined #go-nuts
11:13 -!- foocraft [~dsc@89.211.217.79] has quit [Ping timeout: 240 seconds]
11:16 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
11:19 -!- niemeyer_ [~niemeyer@201-40-152-161.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
11:20 < hokapoka> Whats the regexp switch for NOT?
11:22 < hokapoka> For example I want to replace all none Alphas, Numerics &
Spaces so : rexp := regexp.MustCompile(`[a-zA-Z0-9 ]`) works, but I need the
inverse of the range.
11:25 < hokapoka> arh, I mustn't have tested it properly
11:26 < hokapoka> [^a-zA-Z0-9] does it
11:28 -!- smw [~stephen@pool-70-104-128-58.nycmny.fios.verizon.net] has quit [Read
error: Connection reset by peer]
11:33 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has quit [Quit: "Wait...  what?!"]
11:33 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has joined #go-nuts
11:38 -!- artefon [~thiago@189.59.196.3] has quit [Read error: Connection reset by
peer]
11:45 < jnwhiteh> hokapoka: pattern.Replace(sourceString, "[%a%d%s"], "")
using https://github.com/jnwhiteh/go-luapatterns =)
11:46 < jnwhiteh> err, you'd want %A%D%S or ^%a%d%s if you're inverting :P
11:53 -!- artefon [~thiago@189.59.196.3] has joined #go-nuts
12:04 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has quit [Ping
timeout: 240 seconds]
12:09 -!- shvntr [~shvntr@113.84.151.33] has joined #go-nuts
12:17 -!- jkakar [~jkakar@91.189.88.12] has quit [Ping timeout: 260 seconds]
12:18 < nsf> omg, NaCl works through gecko plugin API
12:18 < nsf> oh no..
12:18 < nsf> >_<
12:19 < taruti> ?
12:19 < nsf> it's horrible
12:26 -!- boscop [~boscop@f055151188.adsl.alicedsl.de] has joined #go-nuts
12:29 -!- jkakar [~jkakar@91.189.88.12] has joined #go-nuts
12:30 -!- jumzi [~jumzi@c-89-233-234-125.cust.bredband2.com] has quit [Read error:
Operation timed out]
12:30 < wrtp> nsf: the API or the GUI ?
12:30 < nsf> api
12:30 < nsf> https://developer.mozilla.org/en/NPClass
12:30 < nsf> basically you define this in nacl app
12:31 < nsf> which kind of reminds me COM
12:32 < nsf> anyway, I'm making myself familiar with nacl right now, let's
see what will happen :D
12:32 < nsf> I think it's very cool though, despite that sad fact
12:32 < nsf> (gecko plugin API usage)
12:37 < nsf> well, the proper name for this thing actually is NPAPI
12:37 < nsf> netscape plugin API, but it turns out these days it'a cross
browser plugin API :(
12:37 < nsf> it's a*
12:39 -!- vomjom [~vomjom@99-162-150-88.lightspeed.sntcca.sbcglobal.net] has
joined #go-nuts
12:44 -!- snearch [~snearch@f053002083.adsl.alicedsl.de] has joined #go-nuts
12:47 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has joined
#go-nuts
12:47 -!- cafesofie [~cafesofie@rnwifi-164-107-92-6.resnet.ohio-state.edu] has
quit [Remote host closed the connection]
12:51 -!- jkakar [~jkakar@91.189.88.12] has quit [Ping timeout: 246 seconds]
12:52 -!- quantumelixir [~chillu@203.110.240.41] has joined #go-nuts
13:00 -!- jumzi [~jumzi@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts
13:03 -!- tor8_ [~tor@c-ad7471d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
13:04 -!- tor8 [~tor@c-ad7471d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[Ping timeout: 265 seconds]
13:15 -!- tvw [~tv@e176000238.adsl.alicedsl.de] has quit [Remote host closed the
connection]
13:17 < KBme> can anyone give a pointer as to how to install gtk bindings
and the like?
13:17 < KBme> i want to try tabby :)
13:17 -!- ment [thement@ibawizard.net] has joined #go-nuts
13:19 -!- tvw [~tv@e176000238.adsl.alicedsl.de] has joined #go-nuts
13:21 -!- niemeyer__ [~niemeyer@189.30.51.233] has joined #go-nuts
13:23 -!- niemeyer_ [~niemeyer@201-40-152-161.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
13:26 < quantumelixir> I'm trying to use goplay.  I just built and ran it
but when I access localhost:3999 my browser (Chrome) says, webpage not available.
13:26 -!- outworlder [~stephen@189.90.170.251] has joined #go-nuts
13:31 < quantumelixir> Do I have to supply any extra command line args?
13:31 < quantumelixir> oops, nevermind -- I had to give the architecture
13:34 -!- piranha_ [~piranha@94-248-73-228.dynamic.peoplenet.ua] has quit [Quit:
Computer has gone to sleep.]
13:44 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
13:49 -!- tvw [~tv@e176000238.adsl.alicedsl.de] has quit [Remote host closed the
connection]
13:54 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error:
Connection reset by peer]
13:55 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
13:56 -!- tensorpudding [~user@99.23.127.179] has quit [Read error: Connection
reset by peer]
13:59 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit:
DarthShrine]
14:02 -!- wrtp [~rog@92.17.51.154] has quit [Quit: wrtp]
14:04 -!- wrtp [~rog@92.17.51.154] has joined #go-nuts
14:10 < quantumelixir> Has anyone tried linking goplay with a vim?  It would
be nice to have the output/errors displayed in the quickfix-window each time the
source is saved.
14:16 -!- gmilleramilar [~gmiller@184-106-207-119.static.cloud-ips.com] has quit
[Remote host closed the connection]
14:18 -!- siyb [~siyb@83.216.216.131] has quit [Quit: leaving]
14:23 -!- tor8 [~tor@c-ad7471d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[Quit: tor8]
14:28 -!- jkakar [~jkakar@91.189.88.12] has joined #go-nuts
14:28 < artefon> i forgot, how can i use switch to read from one of the
given channels?
14:29 < uriel> artefon: select
14:31 < artefon> uriel: oo yes!  thanks!!
14:34 -!- wrtp [~rog@92.17.51.154] has quit [Ping timeout: 250 seconds]
14:35 -!- dforsyth [~dforsyth@c-76-21-40-117.hsd1.ca.comcast.net] has joined
#go-nuts
14:36 -!- outworlder [~stephen@189.90.170.251] has quit [Remote host closed the
connection]
14:37 -!- outworlder [~stephen@189.90.170.251] has joined #go-nuts
14:38 -!- outworlder1 [~stephen@189.90.170.251] has joined #go-nuts
14:38 -!- wrtp [~rog@92.17.51.154] has joined #go-nuts
14:41 -!- outworlder [~stephen@189.90.170.251] has quit [Ping timeout: 260
seconds]
14:42 -!- mikejs [~mike@enki.sunlightfoundation.com] has joined #go-nuts
14:45 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:45 -!- rboyd [~rboyd@72-161-50-105.dyn.centurytel.net] has joined #go-nuts
14:45 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
14:46 -!- dforsyth [~dforsyth@c-76-21-40-117.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
14:50 -!- qjcg [~qjcg@208.88.110.46] has joined #go-nuts
15:00 -!- dforsyth [~dforsyth@c-76-21-40-117.hsd1.ca.comcast.net] has joined
#go-nuts
15:06 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
15:07 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
15:08 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
peace in teh middle east]
15:09 -!- artefon [~thiago@189.59.196.3] has quit [Quit: bye]
15:17 -!- tor8 [~tor@host-90-236-198-102.mobileonline.telia.com] has joined
#go-nuts
15:19 -!- plainhao [~plainhao@208.75.85.237] has joined #go-nuts
15:19 -!- wrtp [~rog@92.17.51.154] has quit [Quit: wrtp]
15:25 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Ping timeout: 276
seconds]
15:25 -!- shvntr [~shvntr@113.84.151.33] has quit [Ping timeout: 250 seconds]
15:27 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
15:28 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
15:30 -!- tor8 [~tor@host-90-236-198-102.mobileonline.telia.com] has quit [Ping
timeout: 246 seconds]
15:31 -!- wrtp [~rog@92.17.51.154] has joined #go-nuts
15:33 -!- femtoo [~femto@95-89-196-241-dynip.superkabel.de] has joined #go-nuts
15:34 < uriel> slightly offtopic, but this is so sad:
http://news.ycombinator.com/item?id=2101210
15:35 < nsf> knuth hates multicore processors
15:35 < aiju> uriel: it's sad that people use async?
15:36 < aiju> or that people are serious about JS? :D
15:36 < nsf> and what async means anyway?
15:36 < nsf> it presumes some kind of an event model
15:36 < aiju> asynchronous, i.e.  event driven, I/O
15:36 < nsf> exactly
15:37 < aiju> actually the way how I/O works on the low level
15:37 < nsf> the first async stuff was in cooperative multitasking
15:37 < nsf> that was fun
15:38 < nsf> but it turns out, cooperative multitasking doesn't work for OS
and here we have preemptive one
15:38 < nsf> I can only see one bad side of "async"
15:38 < nsf> lack of fairness, no scheduler
15:38 < nsf> other than that it's a very simple approach
15:39 < nsf> aside from that, I think most of todays "programming
techniques", "models" are complete bullshit
15:39 < nsf> :D
15:40 < nsf> (even goroutines, sorry)
15:40 -!- willdye [~willdye@fern.dsndata.com] has left #go-nuts []
15:40 < aiju> "modern programming" is scam
15:40 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Remote host closed the
connection]
15:41 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
15:41 < nsf> basically we stuck with current hardware
15:41 -!- tor8 [~tor@host-90-236-120-70.mobileonline.telia.com] has joined
#go-nuts
15:41 < nsf> and we can't reliably imagine something we want, because it
won't work
15:41 < aiju> current hardware is fucking awesome
15:41 -!- tor8 [~tor@host-90-236-120-70.mobileonline.telia.com] has quit [Client
Quit]
15:41 < nsf>
http://cellperformance.beyond3d.com/articles/2008/03/three-big-lies.html
15:41 < nsf> Mike Acton has this nice blog post
15:42 < nsf> see #1
15:42 < nsf> software cannot be a platform
15:42 < rboyd> still waiting for lanier's phenotropic software to save the
day
15:42 < aiju> haha Big-O notation
15:42 -!- nettok [~quassel@200.119.168.231] has joined #go-nuts
15:43 < taruti> Is there a good way to do case-insensitive regexp matches in
Go?
15:45 < aiju> yes
15:45 < aiju> convert the string to lower case
15:46 -!- tor8 [~tor@host-90-236-120-70.mobileonline.telia.com] has joined
#go-nuts
15:46 < taruti> aiju: that is nontrivial in unicode
15:47 < taruti> unicode package just notes that it is unimplemented
15:47 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
15:47 < aiju> wtf?
15:47 < taruti> "Bugs: Provide a mechanism for full case folding (those that
involve multiple runes in the input or output)."
15:47 < aiju> unicode is such a fucking mess
15:48 < zozoR> fzzbt: i cant get code completion with gocode in gedit to
work : |
15:48 < aiju> taruti: just use ToLower and hope for them to fix it
15:48 < cco3-hampster> I'm writing a library that needs some initialization
work done...is there any way to do this without requiring the caller to make a
call to an initialization function
15:48 < zozoR> it looks like its thinking about something, then nothing
happens, also ctrl+j is a horrible hotkey :s
15:49 < aiju> cco3-hampster: init()
15:49 < cco3-hampster> aiju: It's a magic function name?
15:49 < aiju> yeah
15:49 < cco3-hampster> cool
15:49 < jumzi> in GO, everything is magic
15:49 -!- sauerbraten [~sauerbrat@p508CC17A.dip.t-dialin.net] has joined #go-nuts
15:50 < aiju> cco3-hampster: you can use as many init() as you want
15:51 < zozoR> fzzbt: ERROR: gocode input was invalid.
15:51 < uriel> 15:36 < nsf> and what async means anyway?
15:51 < uriel> nsf: sadly this days async==callbacks (==hell)
15:52 < aiju> SIGIO!
15:52 < aiju> (haha)
15:57 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
15:58 -!- wrtp [~rog@92.17.51.154] has quit [Quit: wrtp]
15:59 -!- willdye [~willdye@fern.dsndata.com] has joined #go-nuts
15:59 -!- willdye [~willdye@fern.dsndata.com] has quit [Client Quit]
16:00 < quantumelixir> Does for have an else construct?
16:00 < aiju> for?
16:00 < quantumelixir> "for"
16:01 < quantumelixir> loop
16:01 < aiju> why should for have an else construct?
16:01 < quantumelixir> i.e.  when the for exits through a break
16:01 -!- tor8 [~tor@host-90-236-120-70.mobileonline.telia.com] has quit [Ping
timeout: 272 seconds]
16:01 < aiju> there is goto for that
16:01 < taruti> Has someone written notmuch bindings in Go?
16:02 -!- dRbiG [p@irc.kaer.tk] has quit [Quit: maintenance break]
16:08 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
16:08 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
16:08 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:16 < exch> zozoR: Is gocode working properly for you?  The gedit plugin
is working fine here.  Although I agree on the ctrl-j.  I already modified the key
in the plugin source.
16:16 < aiju> wtf?  6g complains about unmatched PUSH/POP?  wtf?
16:17 < cco3-hampster> wow...I wasn't expecting conversion from float to int
to round
16:18 -!- binarypie [~binarypie@adsl-99-37-224-209.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
16:19 -!- foocraft [~dsc@78.101.112.199] has joined #go-nuts
16:24 < zozoR> exch: i tried to modify it to space, but " " or
"<Space>" didnt work ..
16:25 < zozoR> and gocode works fine in eclipse :o
16:26 -!- petrux_ [~petrux@host16-224-static.53-82-b.business.telecomitalia.it]
has quit [Quit: leaving]
16:27 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
16:30 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
16:30 -!- femtoo [~femto@95-89-196-241-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
16:32 < hokapoka> in a for { } should "continue" skip the rest of the for
block and move onto the next item?
16:33 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
16:34 -!- jkakar [~jkakar@91.189.88.12] has quit [Quit: Ex-Chat]
16:34 < hokapoka> eg: for i:=0; i<10; i++{ if i == 5 { continue }
fmt.Printf("i = %d"); } would output : i = 1, i= 2...  and skip i = 5?
16:34 < exch> zozoR: Yea, I found that it has to be a key not already bound
by gedit itself.  Alt-z works for me now.  They are easily reachable and less of a
hassle than ctrl-j
16:35 -!- nekoh [~nekoh@p4FD880B2.dip0.t-ipconnect.de] has joined #go-nuts
16:35 < taruti> hokapoka: yes.  try it out if you are unsure :)
16:35 < hokapoka> I just thought that I should
16:35 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
16:35 < hokapoka> oh, the playground good for that
16:36 -!- AndyP [~andyp@ubuntu/member/andyp] has joined #go-nuts
16:37 < hokapoka> taruti: I thanks.  I must have some issue with the len()
or something in that case.  As it does work how I expected.
16:37 < hokapoka> s/or/of
16:39 < hokapoka> oh no, it's just the shear usage.  worked exactally as it
should have.
16:40 -!- rboyd [~rboyd@72-161-50-105.dyn.centurytel.net] has quit [Quit: rboyd]
16:44 -!- rboyd [~rboyd@72-161-50-105.dyn.centurytel.net] has joined #go-nuts
16:45 -!- rboyd [~rboyd@72-161-50-105.dyn.centurytel.net] has quit [Client Quit]
16:45 -!- Kashia [~Kashia@port-92-200-73-52.dynamic.qsc.de] has joined #go-nuts
16:49 -!- tvw [~tv@212.79.9.150] has quit [Read error: Connection reset by peer]
16:57 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
17:00 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 240 seconds]
17:00 -!- napsy [~luka@88.200.96.18] has quit [Quit: leaving]
17:01 -!- iant [~iant@216.239.45.130] has joined #go-nuts
17:01 -!- mode/#go-nuts [+v iant] by ChanServ
17:02 -!- teejae [~teejae@softbank219185095092.bbtec.net] has joined #go-nuts
17:11 -!- dsal [~Adium@208.185.212.98] has joined #go-nuts
17:16 -!- nekoh [~nekoh@p4FD880B2.dip0.t-ipconnect.de] has quit []
17:16 -!- photron [~photron@port-92-201-104-26.dynamic.qsc.de] has joined #go-nuts
17:18 -!- karshan [~karshan@122.163.96.34] has joined #go-nuts
17:22 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
17:29 < quantumelixir> In the increment portion of the for loop, how do I
give multiple statements like so: i++, j++?
17:29 < quantumelixir> Compiler complains of an unexpected comma
17:29 < aiju> i,j=i+1,j+1 is the only way afaik
17:29 < nsf> yes
17:29 < quantumelixir> oh!
17:29 < quantumelixir> keep forgetting that
17:29 < aiju> such for loops are usually better rewritten into two imho
17:35 -!- outworlder1 [~stephen@189.90.170.251] has quit [Quit: Leaving.]
17:35 -!- outworlder [~stephen@189.90.170.251] has joined #go-nuts
17:38 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
17:43 -!- dsal [~Adium@208.185.212.98] has left #go-nuts []
17:46 < GilJ> adg: I saw the speaker announcement for fosdem and I was
wondering if your practical go talk would be any different from the one on
golang.org ( http://osdc.blip.tv/file/4432146/ )
17:54 -!- kashia_ [~Kashia@port-92-200-110-182.dynamic.qsc.de] has joined #go-nuts
17:58 -!- Kashia [~Kashia@port-92-200-73-52.dynamic.qsc.de] has quit [Ping
timeout: 260 seconds]
18:01 < skelterjohn> aiju: a doubly nested for loop is not the same as one
with i++,j++
18:01 < aiju> how so?
18:01 < skelterjohn> one runs i*j things in the inner loop
18:02 < skelterjohn> one runs i things in the inner loop
18:02 < aiju> oh sorry
18:02 < aiju> it should be rewritten anyway imho
18:05 -!- Scorchin [~Scorchin@host86-186-244-3.range86-186.btcentralplus.com] has
joined #go-nuts
18:06 < quantumelixir> What's the dynamicalliy allocated version of var grid
[5][5]int
18:06 < quantumelixir> like make([][]int, 5) or something
18:07 -!- virtualsue [~chatzilla@nat/cisco/x-tnydnulkfkvdccrn] has quit [Ping
timeout: 276 seconds]
18:07 < nsf> make([]int, 5*5)
18:07 < nsf> multidimensional arrays are linear in memory anyway
18:07 < quantumelixir> Will grid[2][3] type accesses work?
18:07 < nsf> no
18:07 < nsf> [2*5+3]
18:08 < quantumelixir> hmm..  I didn't want to rewrite all the accesses
18:08 < nsf> you can make slice of slices
18:08 < nsf> but it's a waste
18:09 < karshan> what about make([]int*, 5) and then a loop to set [i] to a
(make []int,5)
18:09 < Namegduf> The problem is that a slice of slices doesnt form a single
block in memory.
18:09 < quantumelixir> why is slices of slices a waste?
18:09 < nsf> and one of the slices is a slice of pointers basically
18:09 < nsf> which is a waste of space
18:09 < Namegduf> An array forms a solid block in memory, right?
18:09 < Namegduf> A slice points into one.
18:09 < nsf> yes
18:10 < quantumelixir> I'd like to have a solid block of memory (so slices
are out?) and I want [][] kind of access
18:10 < Namegduf> A slice containing slices is a single array containing
pointers into a bunch of separate arrays.
18:10 < Namegduf> You can't.
18:10 < quantumelixir> oh wait what I said doesn't make sense
18:10 < quantumelixir> it doesn't even happen like that in C
18:10 < Namegduf> Right
18:10 < quantumelixir> ok..  so closest is slices of slices
18:11 < Namegduf> It could be done but it would require extending what
slices can do.
18:11 < quantumelixir> thanks Namegduf karshan
18:11 < Namegduf> Slice of slices will have different performance and
representation in memory
18:11 < Namegduf> If you're not going crazy optimising it doesn't matter,
though.
18:11 < quantumelixir> not doing evil optimizations :)
18:12 < Namegduf> In that case you want the loop idea.
18:12 < quantumelixir> yup
18:17 < quantumelixir> this doesn't work: http://dpaste.com/317059/
18:17 < Namegduf> Line 1 should be [][]int, not []*int
18:17 -!- Venom_X [~pjacobs@75.92.43.21] has joined #go-nuts
18:17 < quantumelixir> ah ok
18:17 < Namegduf> While slices are reference types that contain a pointer
into the array, they aren't the same as pointers.
18:18 < Namegduf> They have a length and cap associated.
18:22 -!- artefon [~thiago@189.59.196.3] has joined #go-nuts
18:23 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
18:30 < skelterjohn> is there an easy way to, in one line, run something
from another directory without changing your cwd?
18:30 < skelterjohn> like
18:30 < skelterjohn> CWD=Dir1 make
18:31 < taruti> like (cd foobar && somecommand ) ?
18:31 < skelterjohn> but then automatically pop back up
18:31 < skelterjohn> to where yo uwere
18:33 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined
#go-nuts
18:35 -!- keithgcascio [~keithcasc@nat/google/x-xfxoattkubgcjogl] has joined
#go-nuts
18:35 < quantumelixir> cd foobar && somecommand && cd -
18:36 < quantumelixir> skelterjohn: cd - returns to your previous directory
18:36 < skelterjohn> oh very interesting
18:36 < skelterjohn> thanks
18:37 < quantumelixir> you're welcome!
18:39 < quantumelixir> finally my spiral printer works!
http://www.ideone.com/2CDWy
18:40 < skelterjohn> what is a spiral printer?
18:40 < quantumelixir> although I'm kind of unhappy with the fact that lines
23-31 and 35-43 are exactly the same
18:41 < quantumelixir> skelterjohn: It prints the numbers 1, 2, 3, ...  in a
clockwise spiral
18:41 < quantumelixir> starting from the middle
18:41 -!- qjcg [~qjcg@208.88.110.46] has quit [Quit: qjcg]
18:41 < skelterjohn> what you should do, then, is have it only print primes
18:41 < skelterjohn> interesting pattern
18:41 < skelterjohn> leave blank spaces for the non-primes
18:41 < quantumelixir> Ulam spiral
18:42 < quantumelixir> or something like that I think
18:42 < quantumelixir> have any ideas to remove that bit of redundancy?
18:42 < quantumelixir> the 9 lines of repeated code?
18:43 < quantumelixir> some goto hack I'm sure
18:43 < exch> Put them in a function or closure?
18:44 < quantumelixir> let's see how many local vars I have to export for
the context
18:44 < quantumelixir> maybe func is the solution
18:44 -!- Natch [~natch@c-2bcfe155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
18:45 < exch> a closure can reference variables outside of it's scope.  If
possible, predefine them before the closure and just use them in there.
18:45 < quantumelixir> oh, I'll see what a closure is first
18:46 < exch> myfunc := func(a, b int) int { return a + b }; myfunc(1,2)
18:46 -!- Natch| [~natch@c-2bcfe155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
18:46 < exch> you don't have to pass a,b as parameters
18:47 < exch> if they are define in the parent scope, the a + b bit should
work just as well
18:47 < exch> s/define/defined/
18:47 < quantumelixir> ah interesting
18:48 < exch> I'm unsure what code this results in in the runtime though.
If it is at all optimal performance wise.  Some tests should make that clear soon
enough I guess
18:48 -!- teejae [~teejae@softbank219185095092.bbtec.net] has quit [Quit: teejae]
18:51 < skelterjohn> exch: in this case you don't have to pass the
parameters, but you should be careful here.  if each of those for loops had
defined their own "x", for instance, the func might behave strangely
18:51 < skelterjohn> passing the value as a parameter is a good habit to get
into
18:52 < exch> true
18:52 < skelterjohn> (especially if you are using go foo(a, b))
18:52 -!- Natch [~natch@c-2bcfe155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
18:52 < exch> yes, that could cause some headaches
18:53 -!- Natch| [~natch@c-2bcfe155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
18:59 < quantumelixir> Why can't I receive an argument a and return the same
argument from the function?
19:00 < quantumelixir> compiler complains when I declare something like fun
foo(a int, b int) (a int, b int) { }
19:00 < quantumelixir> saying a is being redeclared
19:00 < aiju> well, it is
19:00 < quantumelixir> ok so I'll just omit a int
19:00 < quantumelixir> and write int
19:00 < exch> You should consider those named return values as being
explicit var declarations
19:01 < quantumelixir> ok..
19:01 -!- jramnani [~jramnani@chml01.drwholdings.com] has joined #go-nuts
19:02 < exch> make sense really.  'a = a' <- ambiguous if both the
parameter and return val are called 'a'
19:02 < quantumelixir> so the /correct/ way to update a value and notify the
caller of the change is: func foo(a int) (int) { /* */ }
19:04 < skelterjohn> you could have: foo(a, b int) (ret_a, ret_b int) {...}
19:04 < quantumelixir> what's the coding style?  to/not to omit the variable
name?
19:04 < skelterjohn> i always name my return values
19:05 < skelterjohn> except with functions that return just bool, actually
19:05 < skelterjohn> since with them, the meaning of the returned value is
apparent in the function name
19:05 < exch> It depends on what happens in my function.  If the return
statement is the result of another function call, I generally find there is no
need to name them
19:06 < Namegduf> I name them if I have a use for using them as a variable
19:06 < Namegduf> And don't if I don't.
19:07 < skelterjohn> i made some fun updates to go-gb.googlecode.com ....
now you can generate makefiles and a build script that will properly link
everything together, if you want to distribute to someone who hasn't installed gb
19:07 < skelterjohn> which is pretty much everyone
19:07 < quantumelixir> see..  fancy!
19:07 < skelterjohn> except me
19:13 < quantumelixir> ah..  much better!  http://www.ideone.com/jKazl
19:13 < quantumelixir> reworked the loops
19:15 < skelterjohn> seems to be a nice solution
19:16 < quantumelixir> thanks!  :)
19:17 < artefon> does the http package can make https connections?  (it can
serve tls, but can it connect to https?)
19:17 -!- dRbiG [p@irc.kaer.tk] has joined #go-nuts
19:20 < cco3-hampster> Is it possible to have a channel with multiple types,
or do I have to create a struct for that?
19:20 < aiju> you can use interface{}
19:21 < skelterjohn> do you mean multiple values being sent at once, or do
you mean a channel with the ability to send different kinds of things?
19:21 < cco3-hampster> skelterjohn: the former
19:21 < cco3-hampster> sorry
19:21 < skelterjohn> then you have to create a struct for that
19:22 < cco3-hampster> ok, thanks....I was hoping I could just put the types
in parens (like you can for func return types)
19:23 < skelterjohn> if your struct is very small, you can do something like
"chan struct {x, y, z int}"
19:23 < skelterjohn> and "theChan <- struct{x,y,z int}{1,2,3}", "val :=
<- theChan; foo(val.x, val.y, val.z)"
19:23 < skelterjohn> but that is a bit cumbersome
19:24 < cco3-hampster> ok, thanks for the tip...I think it will be too
cumbersome
19:24 < artefon> can the http package make https connections?  (it can serve
tls, but can it connect to https?) If not, there is another way to do it?
19:26 < skelterjohn> artefon: I have no idea.
19:26 < skelterjohn> i see stuff about client connections and server
connections
19:26 < skelterjohn> maybe try experimenting with them?
19:28 -!- tvw [~tv@e176000238.adsl.alicedsl.de] has joined #go-nuts
19:34 < artefon> skelterjohn: thanks :)
19:34 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
19:35 -!- georgekollias [~georgekol@nor75-7-81-57-48-111.fbx.proxad.net] has quit
[Read error: Operation timed out]
19:39 -!- fzzbt [~fuzzybyte@77.79.7.8] has quit [Ping timeout: 240 seconds]
19:52 < artefon> skelterjohn: i searched a bit
19:52 < artefon> and tried some stuff
19:53 < artefon> i couldnt make the https connection
19:53 < artefon> i am using ClientConn using Write passing a Request struct
19:54 < exch> artefon: http.Get and Post handle https connections just fine
19:54 < artefon> humm
19:55 < artefon> exch: thank
19:55 < artefon> exch: thanks
19:56 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:56 < aiju> are defined types implicitly converted?  e.g.  "type foo int"
19:57 -!- illya77 [~illya77@78-252-133-95.pool.ukrtel.net] has joined #go-nuts
19:58 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
19:58 < exch> Nope
19:59 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has left #go-nuts []
20:00 < skelterjohn> no - and there is a good reason, too.  int and foo can
both (ok not int here, but if it was type A and B) have some function with the
same name
20:00 < skelterjohn> and if you pass an A to something that wants a B, and
it converted it, you might expect A's function to be called
20:00 < skelterjohn> when really B's function will be called
20:00 < skelterjohn> having to pass B(theA) makes it clear
20:02 < quantumelixir> skelterjohn: the demo/Makefile in your gomatrix
project needs some updating (demo2.go is missing)
20:02 -!- fzzbt [~fuzzybyte@77.79.7.8] has joined #go-nuts
20:02 < skelterjohn> thanks for the note
20:02 < skelterjohn> try using gb :)
20:03 < quantumelixir> did you benchmark your lib against blas, atlas and
the like?
20:03 < skelterjohn> no
20:03 < quantumelixir> just curious about Go's perf
20:03 < skelterjohn> it will perform poorly compared to them
20:03 < skelterjohn> and i am not the right person to optimize it - i don't
know enough math
20:04 < skelterjohn> i just needed a linear algebra library to do other
things
20:04 -!- qjcg [~qjcg@208.88.110.46] has joined #go-nuts
20:04 < skelterjohn> and i couldn't find one.  so i made it
20:04 < quantumelixir> I think gccgo will make faster executables
20:04 < skelterjohn> i pushed demo2.go in there
20:04 < Namegduf> Assuming goroutines aren't used heavily, yes
20:04 < quantumelixir> and, shouldn't you be able to link (from within go)
to blas/atlas
20:04 < skelterjohn> Namegduf: they aren't, unless you fool around with the
ParallelMultiply stuff
20:05 < skelterjohn> quantumelixir: sure, if you want.  i don't like mixing
languages
20:05 < skelterjohn> but i wouldn't mind at all if someone added that
20:05 < skelterjohn> at the moment, though, you can goinstall gomatrix and
use it on any platform that has go
20:06 < skelterjohn> wouldn't be so easy with blas etc
20:06 < quantumelixir> hmm..  it won't be easy..  blas has some oddities
that I can't get aroud
20:06 < quantumelixir> I think they are written in fortran and have C
bindings or something like that
20:06 -!- binarypie [~binarypie@adsl-99-37-224-209.dsl.pltn13.sbcglobal.net] has
quit [Ping timeout: 240 seconds]
20:08 < skelterjohn> something like that
20:08 < skelterjohn> a rabbit hole i don't intend to dive down alone
20:09 < quantumelixir> exactly
20:09 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has joined #go-nuts
20:09 < quantumelixir> I hate fighting with compilers
20:10 < quantumelixir> Unsurprisingly, I am not a big fan of C++
20:12 < exch> Anyone who claims to be is just a sucker for massochism
20:13 -!- binarypie [~binarypie@adsl-99-37-224-209.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
20:13 < quantumelixir> or gets paid for putting with it
20:14 < quantumelixir> *putting up
20:14 -!- illya77 [~illya77@78-252-133-95.pool.ukrtel.net] has quit [Ping timeout:
240 seconds]
20:27 -!- dju_ [dju@fsf/member/dju] has quit [Quit: Quitte]
20:27 < skelterjohn> quantumelixir: fixed the issue with gomatrix
20:28 < quantumelixir> neat
20:29 < quantumelixir> pulling changes
20:30 -!- TheMue [~TheMue@p5DDF7A54.dip.t-dialin.net] has joined #go-nuts
20:31 * quantumelixir goes to bed
20:31 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
20:32 -!- plainhao [~plainhao@208.75.85.237] has quit [Quit: plainhao]
20:33 < aiju> cur[0], cur[1], cur[2], cur[3], prev[0], prev[1], prev[2],
prev[3] = prev[0], prev[1], prev[2], prev[3], cur[0], cur[1], cur[2], cur[3]
20:33 < aiju> most ugly line of Go i wrote so far
20:35 < Namegduf> Does a slice resized down to 0 become nil?
20:35 < Namegduf> Or equal to nil, rather?
20:35 < Namegduf> I'd assume not but I want to be sure.
20:36 < skelterjohn> no - resizing a slice doesn't get rid of the memory
20:36 < skelterjohn> and if it became nil, it would forget about that memory
20:40 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
20:43 < aiju> shouldn't go check array bounds?
20:43 < Namegduf> It does.
20:45 < Namegduf> Hmm.
20:45 < aiju> i always have to import a package to call a function from it,
right?
20:45 < Namegduf> Yes.
20:52 < Namegduf> Hmm.
20:53 < aiju> heh my error function failed after the bounds checking failed
20:55 -!- Kashia [~Kashia@port-92-200-61-19.dynamic.qsc.de] has joined #go-nuts
20:55 -!- kashia_ [~Kashia@port-92-200-110-182.dynamic.qsc.de] has quit [Ping
timeout: 246 seconds]
20:59 -!- artefon [~thiago@189.59.196.3] has quit [Quit: bye]
21:00 < aiju> [][4]uint64 would that point to a contiguous region in memory?
21:01 < Namegduf> No
21:01 < Namegduf> Well, hmm.
21:01 < Namegduf> Yes, actually.
21:01 < aiju> i'm manually initializing it via reflct
21:01 < aiju> *reflect
21:04 -!- tobel [~tobel@pD9E8BC67.dip.t-dialin.net] has joined #go-nuts
21:05 -!- tobel [~tobel@pD9E8BC67.dip.t-dialin.net] has quit [Client Quit]
21:06 -!- karshan [~karshan@122.163.96.34] has quit [Ping timeout: 246 seconds]
21:09 -!- sav1o [~savio@67.18.186.81] has joined #go-nuts
21:19 -!- Venom_X [~pjacobs@75.92.43.21] has quit [Quit: Venom_X]
21:22 < cco3-hampster> I want to create something analogous to an abstract
class.  I have one method that uses another method that will be specific to type
implementations.  How do I do this?  Is it possible?
21:23 < KirkMcDonald> Via trickery.
21:23 < cco3-hampster> KirkMcDonald: care to elaborate?
21:23 < KirkMcDonald> And composition, and an interface.
21:24 < Namegduf> I would suggest refactoring.
21:24 < KirkMcDonald> Refactoring is a fine idea, as well.
21:24 < cco3-hampster> composition?  Is that a keyword?
21:24 < KirkMcDonald> cco3-hampster: No.
21:24 < Namegduf> It's not idiomatic in Go to use industrial quantities of
the word "abstract" in designs.
21:24 < Namegduf> :P
21:24 < Namegduf> What are you actually trying to do?
21:25 < aiju> s/not idiomatic/a criminal offence/
21:25 < KirkMcDonald> cco3-hampster: In this context I am using
"composition" as a code word for an anonymous field.
21:26 < cco3-hampster> I have a matrix, and I want it to have an
"ApplyToVector" method, which I can implement now, that will use getElement and
getWidth methods that will be specific to implementations
21:26 < Namegduf> In general, just write implementations
21:26 < cco3-hampster> s/matrix/Matrix type
21:26 < cco3-hampster> but then I would have to write ApplyToVector twice
21:26 < Namegduf> Sounds far less complicated and messy than what you're
asking to do would require.
21:27 < Namegduf> If you only want one, though, I'd suggest having
package-level functions, not methods, that do it.
21:27 < Namegduf> And an interface representing the parts of an
implementation they need.
21:28 < Namegduf> That scales upwards and is used in the stdlib in various
places.
21:28 < Namegduf> (At least one or two)
21:28 -!- outworlder [~stephen@189.90.170.251] has quit [Quit: Leaving.]
21:28 < cco3-hampster> that's what I currently have, but I really don't like
it...
21:29 < Namegduf> Why not?
21:29 < cco3-hampster> to give more details, I'm trying to represent a
quantum gate, and I'd like the caller to be able to say
gate.ApplyTo(quantum_register)
21:29 < cco3-hampster> not ApplyGateToQReg(gate, qreg)
21:30 < Namegduf> Hold up, problem here.
21:30 < cco3-hampster> maybe it's no better, I don't know
21:30 < Namegduf> Can ApplyTo/ApplyGate operate on all the types, or does it
need to be rewritten for each type?
21:31 < Namegduf> If it can operate on all the types, why does it need to be
ApplyGateToQReg?  If it can't, then you're rewriting it per type anyway...  so
making it a non-abstract method has no cost.
21:32 < cco3-hampster> The core part of Apply will always be the same - it's
just matrix multiplication, how the matrix in the gate is stored is different
21:33 < cco3-hampster> I could have an internal Matrix interface to the
gate, but it seems silly to need that many levels of types (I just want a gate, I
don't want a gate that wraps a matrix)
21:33 < Namegduf> There's no levels of types in Go.
21:33 < cco3-hampster> s/to the gate/stored in the gate
21:33 < cco3-hampster> Namegduf: I know, that's why I used parens to clarify
what I meant
21:33 < Namegduf> I'm still trying to understand roughly what the problem
is.
21:34 < Namegduf> You have a concrete implementation of a gate, which has
certain logic specific to it, which it provides via methods.
21:34 < Namegduf> You then have certain logic which is not.
21:34 < cco3-hampster> correct
21:35 < Namegduf> You can't have a function taking an interface for the
methods it needs, providing the latter, at the package level, because...
21:36 < cco3-hampster> because it seems more like something that should be a
method of Gate
21:36 < Namegduf> But it isn't specific to Gate.
21:37 < cco3-hampster> Apply is specific to Gate
21:37 < cco3-hampster> I want to say Gate.ApplyToQReg(qreg)
21:37 < Namegduf> If Gate's an interface, it doesn't have methods
21:37 < cco3-hampster> right, I know, that's my problem
21:37 < aiju> is there some linker symbol for the highest address?
21:38 < cco3-hampster> I want to be able to give multiple types the same
method
21:38 < Namegduf> Just use a function
21:38 < Namegduf> Methods are type-specific, functions taking interfaces
aren't.
21:39 < Namegduf> There's cases where you really can have good reasons to
use clever stuff, but preferring x.f() notation isn't really one.
21:39 < cco3-hampster> Two types cannot share a method?
21:39 < Namegduf> No.
21:40 < Namegduf> The best you could do is give them both separate methods
which called a function with themselves, but really you should just use
pkg.Func(x, y)
21:41 < cco3-hampster> type Square struct{Rectangle} // Doesn't square here
share the methods of rectangle?
21:42 < Namegduf> Yes, but the methods of Rectangle cannot refer to anything
in Square
21:43 < Namegduf> There's no dynamic dispatch there.
21:43 < cco3-hampster> hmmm...well that's rough
21:43 < Namegduf> Not being able to use x.y syntactical sugar isn't that
rough
21:44 < Namegduf> Abstract types are often a bad way to approach design in
general.
21:45 < Namegduf> Interfaces let you contain just the pieces of
functionality that a specific thing needs in the interface it takes.
21:49 -!- TheMue [~TheMue@p5DDF7A54.dip.t-dialin.net] has quit [Quit: TheMue]
21:50 < aiju> something rather annoying about Go
21:50 < aiju> you can't do foo & ^bar with unsigned types
21:50 < aiju> you can't even force it to using casts
21:51 < Namegduf> Hmm.
21:52 < Namegduf> Does &^ work?
21:52 < Namegduf> "and not"
22:03 < quantumelixir> what's the difference between t := new(T) and t :=
make(T)?  why are there two ways of allocating memory?
22:04 < Namegduf> They work on different type.
22:04 < Namegduf> *types
22:04 < Namegduf> So there's only one way for a given type.
22:04 < quantumelixir> why is this so?
22:04 < quantumelixir> Why can't some types use the other allocation method?
22:05 < Namegduf> There are actually about three allocation methods.
22:05 < Namegduf> new(T), make(T), and pkg.NewT()
22:05 < Namegduf> new(T) returns a pointer to a new, zeroed T.
22:05 < Namegduf> The second two return an *initialised* T. The second one
is basically the third one for built-ins.
22:06 < Namegduf> NewT typically returns a pointer, and make(T) is special
in that it does not return a pointer (but instead returns a reference type)
22:06 < quantumelixir> Doesn't zeroing out count as initialization?
22:06 < Namegduf> For most types, yes.
22:06 < Namegduf> Not for all.
22:06 < Namegduf> A zero map is not initialised.
22:07 < quantumelixir> I still don't see the difference between make and new
other than the fact that we can use only one with a given type.  The distinction
to me seems arbitrary
22:07 < Namegduf> A zero slice IS valid- but using make() lets you get a
backing array allocated dynamically, which you can't get otherwise.
22:07 < Namegduf> new(T) is always valid
22:07 < Namegduf> It just won't work right if a zeroed T isn't valid
22:08 < quantumelixir> so if I do m := make(map[int]string) what happens?
22:08 < quantumelixir> sorry
22:08 < quantumelixir> new(map[int]string)
22:08 < Namegduf> You get a pointer to a map which will crash when you try
to use it because it's not initialised
22:08 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has quit [Quit: Skola]
22:08 < quantumelixir> ah
22:09 < Namegduf> This isn't limited to builtins- sometimes types defined by
packages are not valid zeroed.
22:09 < Namegduf> It's idiomatic to avoid it as far as possible, but
sometimes it isn't.
22:09 < quantumelixir> excellent!  so I'll use make when the type actually
requires more specialized initialiation
22:10 < Namegduf> In general, you need to use pkg.NewT() or make(T, ...)
when you want an initialised thing, and new(T) when it isn't special and needs
one.
22:10 < Namegduf> make() only works for builtins, unfortunately.
22:10 < Namegduf> But yes, that's when you use it with them.
22:10 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
22:10 < quantumelixir> oh, we can't "extend" make(..) for user types?
22:10 < Namegduf> No.
22:10 < quantumelixir> so that's what pkg.NewT(..) does
22:10 < quantumelixir> ?
22:11 < Namegduf> Yeah, that's the general pattern.
22:11 < quantumelixir> thanks for telling me all about it!
22:11 < Namegduf> If you need an initialisation/creation function, the
package defining the type provides one.
22:11 < Namegduf> It's relatively unusual and I've never hit a case where I
didn't realise ahead of time.
22:12 < Namegduf> make() is "special" in another way; as I said, it's the
only one of the three which returns the type itself, not a pointer to it.  Those
specific builtins are reference types already.
22:13 < Namegduf> There's been proposals to have make(*T) return a pointer
to a newly allocated T, and get rid of new()
22:13 < Namegduf> But it hasn't happened.
22:14 < quantumelixir> It would help if there's a uniformity in allocation
22:14 < Namegduf> The underlying problem is that some types need
initialisation and some do not
22:15 < Namegduf> new() vs make() with built-ins is the same as new() vs
<some constructor function> for user type
22:15 < Namegduf> *types
22:15 < quantumelixir> What does Go do differently compared to other
languages like say, Java/C++, that necessitates two different allocation
mechanisms?
22:15 < Namegduf> Even if the first two were combined it wouldn't really
solve the underlying issue, that you need to remember what they need.
22:16 < Namegduf> Go does not have constructors.
22:16 < quantumelixir> oh
22:16 < quantumelixir> So make(..) calls the functions that serve as
constructors?
22:16 < Namegduf> Right, for builtins.
22:17 < Namegduf> For user types, you provide your own function to build a
new T.
22:17 < quantumelixir> Only pointers?  What about references to user types?
22:17 -!- tensorpudding [~user@99.23.127.179] has joined #go-nuts
22:17 < Namegduf> Go does not have references.
22:18 < Namegduf> It has "reference types" which are basically types that
contain pointers
22:18 < Namegduf> So a simple copy doesn't copy the underlying data.
22:18 < Namegduf> Slices, maps, channels are all like that.
22:18 < quantumelixir> Right!
22:18 < Namegduf> User types can be like that.
22:19 < Namegduf> The only thing with user types is that you can't copy a
user type if it has any non-exported methods, so you don't have the horrible
shallow-vs-deep copy issues.
22:20 < Namegduf> Which means you can't return them to stuff outside the
package directly.  You have to return a pointer.
22:21 < quantumelixir> Don't follow -- a deep copy is required when the type
contains a pointer that can potentially point to another one of it's own type and
so on right?
22:22 < Namegduf> A shallow copy is when you copy a type, just copying the
value of the pointers inside.  A deep copy is when you copy it, and everything it
points at, typically recursively.
22:22 <@adg> GilJ: yeah, it'll be different
22:23 < Namegduf> If you have a type whose contents is not visible, what
should x = y do?
22:23 < quantumelixir> right.  makes sense
22:23 < Namegduf> C++ has all kinds of magic for it- Go just makes it
illegal.
22:23 < quantumelixir> haha
22:23 < quantumelixir> I don't know what C++ does
22:23 < KirkMcDonald> C++ permits you do define operator=.
22:23 < KirkMcDonald> s/do/to/
22:24 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
22:24 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
22:24 < quantumelixir> ahh
22:24 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
22:24 < Namegduf> In general in Go, you return a pointer, and external code
passes that around
22:24 * quantumelixir remembers something about copy semantics
22:24 < jesusaurus> Namegduf: what does go make illegal?
22:24 < Namegduf> This obviously always behaves as a shallow copy when
copied
22:24 < Namegduf> jesusaurus: Copying a type with unexported members
22:24 < jesusaurus> oh
22:24 < Namegduf> If you want your type referenced by a pointer to be
copyable
22:25 < Namegduf> You can give it a Copy() method
22:25 < Namegduf> Which does the right thing for your type, whatever it is
22:25 < Namegduf> And returns a new pointer to the copy.
22:25 < quantumelixir> yep
22:25 < KirkMcDonald> C++ distinguishes between copy assignment and copy
construction, which is...  certainly a thing.
22:25 < quantumelixir> haha
22:26 < Namegduf> This means that you can modify your unexported internals
however you like later, breaking how copy works and whether it needs to be deep or
shallow or deep in this bit but copy that shallowly
22:26 < quantumelixir> When I heard stuff about move semantics, I knew it
was time I quit already.
22:26 < Namegduf> And just update your method.
22:26 < Namegduf> And external code is dumb
22:26 <@adg> KirkMcDonald: lol
22:26 < Namegduf> I don't know what Java does.
22:27 < KirkMcDonald> Java has reference semantics for its classes.
22:27 < Namegduf> So everything is a shallow copy?
22:27 < KirkMcDonald> No such thing as copying by value.
22:27 < Namegduf> Or, hmm.
22:27 < Namegduf> I think it can do deep copies but I don't remember how.
22:27 < KirkMcDonald> Java is actually fairly reasonable in this regard.
22:27 < Namegduf> I'm thinking it has something to do with an abstract
method.
22:28 < Namegduf> Ah.
22:28 < Namegduf> You call clone()
22:28 < quantumelixir> Namegduf: Thanks for being incredibly helpful!
22:28 < Namegduf> And override clone() on all your types
22:28 < Namegduf> To do deep copies as and when required
22:28 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
22:28 < Namegduf> No problem, thanks.
22:28 <@adg> it's kinda annoying in java, though, how an Integer is
pass-by-ref and an int is pass-by-value
22:29 < Namegduf> Haha.
22:29 < KirkMcDonald> adg: That is an entirely different issue, really.
22:29 < Namegduf> Yeah, I could see that.
22:29 <@adg> i mean it's easy to understand, but the inconsistency is sad
22:30 <@adg> KirkMcDonald: yeah i'm not sure what the issue is, i've just
started reading the conversaion
22:31 < KirkMcDonald> adg: We started by talking about how you can't copy
structs with unexported fields by value (in Go).
22:31 < KirkMcDonald> And the conversation drifted from there.
22:33 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
22:34 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
22:35 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
22:39 < zozoR> playing around with the http package, connecting to server,
write request, read response, and return a []byte of the response.body
22:39 < zozoR> now, reading the body is where the actual download is taking
place
22:39 < zozoR> is it possible to make a report hook of some sort, so i can
see how long i am in this process?
22:40 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping
timeout: 272 seconds]
22:40 < quantumelixir> Are there examples of distributed computing using Go?
Like deploying code on a bunch of computers that collaboratively try to find the
digits of pi or a mersenne prime etc.?
22:41 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
22:41 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
22:41 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
22:41 < GilJ> adg: Cool, thanks =]
22:42 < zozoR> i thought about reading 1000 bytes, then do something, and
then continue for 1000 more bytes
22:42 < zozoR> but that cant be done for some reason : |
22:42 <@adg> GilJ: it may have some similar content, but i hope it's better
22:42 < zozoR> nother peculiar thing is i noticed that just using Read() on
the body, it doesnt read all of it only a part of it
22:44 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has joined #go-nuts
22:44 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has quit [Changing host]
22:44 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined
#go-nuts
22:45 <@adg> zozoR: you want to call Read until it returns os.EOF
22:45 < zozoR> oh
22:46 < zozoR> i suppose it knows where to put itself in the byte then?
22:46 < zozoR> or do i have to concanate them myself?
22:48 <@adg> you re-use the []byte argument, it's a buffer
22:48 <@adg> what do you want to do with the data?
22:49 <@adg> if you just want to collect it all in memory, use a
bytes.Buffer and Write to it
22:49 <@adg> so you Read from the Body, and Write to the Buffer
22:50 < plexdev> http://is.gd/b0ml7G by [Robert Griesemer] in 2 subdirs of
go/src/pkg/go/printer/ -- gofmt, go/printer: do not insert extra linebreaks where
they may break the code
22:50 < plexdev> http://is.gd/Xq61VO by [Ian Lance Taylor] in
go/src/pkg/syscall/ -- syscall: Correct length of SockaddrUnix.
22:50 < plexdev> http://is.gd/psNACw by [Ian Lance Taylor] in
go/src/pkg/runtime/cgo/ -- runtime/cgo: Don't define crosscall2 in dummy
_cgo_main.c.
22:51 < plexdev> http://is.gd/q4KsWS by [Ian Lance Taylor] in
go/src/cmd/cgo/ -- cgo: In _cgo_main.c define all provided symbols as functions.
22:51 < plexdev> http://is.gd/MgMdry by [Russ Cox] in 6 subdirs of go/src/
-- runtime: fix arm reflect.call boundary case
22:52 < zozoR> thanks adg ill try it out
22:53 -!- tav [~tav@92.7.83.241] has joined #go-nuts
22:55 -!- mikejs [~mike@enki.sunlightfoundation.com] has quit [Ping timeout: 276
seconds]
22:59 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
22:59 -!- cafesofie [~cafesofie@rnwifi-164-107-92-3.resnet.ohio-state.edu] has
joined #go-nuts
23:01 -!- photron [~photron@port-92-201-104-26.dynamic.qsc.de] has quit [Ping
timeout: 265 seconds]
23:02 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout:
240 seconds]
23:04 -!- sauerbraten [~sauerbrat@p508CC17A.dip.t-dialin.net] has quit [Remote
host closed the connection]
23:07 -!- temoto [~temoto@81.19.91.15] has quit [Ping timeout: 250 seconds]
23:07 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
23:08 -!- georgekollias [~georgekol@men75-1-81-57-41-176.fbx.proxad.net] has
joined #go-nuts
23:15 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
23:19 -!- qjcg [~qjcg@208.88.110.46] has quit [Quit: qjcg]
23:20 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
23:28 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
23:32 -!- dju [dju@at.dmz.me] has joined #go-nuts
23:32 -!- dju [dju@at.dmz.me] has quit [Changing host]
23:32 -!- dju [dju@fsf/member/dju] has joined #go-nuts
23:33 -!- snearch [~snearch@f053002083.adsl.alicedsl.de] has quit [Remote host
closed the connection]
23:35 -!- niemeyer__ [~niemeyer@189.30.51.233] has quit [Ping timeout: 240
seconds]
23:48 -!- Scorchin [~Scorchin@host86-186-244-3.range86-186.btcentralplus.com] has
quit [Quit: Scorchin]
23:48 -!- cafesofie [~cafesofie@rnwifi-164-107-92-3.resnet.ohio-state.edu] has
quit [Remote host closed the connection]
23:55 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
--- Log closed Sat Jan 15 00:00:03 2011