--- Log opened Fri Feb 26 00:00:16 2010
00:02 -!- b00m_chef__ [~watr@173.183.31.245] has joined #go-nuts
00:03 -!- wuehlmaus [~wuehlmaus@p4FCC7F0C.dip.t-dialin.net] has quit [Ping
timeout: 256 seconds]
00:03 -!- idea_squirrel [idea_squir@77-21-31-106-dynip.superkabel.de] has quit
[Quit: what would a pirate do?]
00:03 -!- wuehlmaus [~wuehlmaus@p4FCC4EEE.dip.t-dialin.net] has joined #go-nuts
00:07 -!- amacleod [amacleod@c-75-69-45-62.hsd1.ma.comcast.net] has quit [Quit:
Bye Bye]
00:08 -!- vdrab [~vdrab@cap015-191.kcn.ne.jp] has joined #go-nuts
00:11 -!- vdrab [~vdrab@cap015-191.kcn.ne.jp] has left #go-nuts []
00:14 -!- nettok [~netto@proxy.galileo.edu] has quit [Quit: Ex-Chat]
00:15 < plexdev> http://is.gd/9c7Zy by [Robert Griesemer] in 8 subdirs of
go/src/ -- go/printer, gofmt: align comments in multi-line expression lists
00:18 -!- b00m_chef__ [~watr@173.183.31.245] has quit [Ping timeout: 265 seconds]
00:19 -!- nettok [~netto@proxy.galileo.edu] has joined #go-nuts
00:21 -!- sudi [~chatzilla@dslb-084-056-015-010.pools.arcor-ip.net] has joined
#go-nuts
00:26 -!- quixoten [~Devin_Chr@c-67-177-8-48.hsd1.ut.comcast.net] has joined
#go-nuts
00:27 -!- quixoten [~Devin_Chr@c-67-177-8-48.hsd1.ut.comcast.net] has quit [Client
Quit]
00:29 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
00:33 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
00:37 -!- Wiz126 [Wiz126@72.20.221.118] has quit [Ping timeout: 265 seconds]
00:39 -!- _ejb [~ejb@unaffiliated/ejb] has quit [Ping timeout: 276 seconds]
00:43 -!- Wiz126 [Wiz126@72.20.219.71] has joined #go-nuts
00:47 < plexdev> http://is.gd/9ceFQ by [Russ Cox] in 4 subdirs of
go/src/pkg/ -- use []byte("abc") in place of []byte{'a', 'b', 'c'}
00:49 < smw> []byte("abc") works now?  It never worked for me...
00:49 <+iant> it was just added
00:49 < smw> I just saw [18:17] <plexdev> http://is.gd/9bTY6 by [Russ
Cox] in 3 subdirs of go/ -- gc: implement []int(string) and []byte(string)
00:50 < smw> iant: does that mean strings.Bytes is depreciated?
00:50 <+iant> I assume so
00:50 -!- Xera^ [~brit@87-194-208-246.bethere.co.uk] has quit [Read error:
Connection reset by peer]
00:52 -!- nettok [~netto@proxy.galileo.edu] has quit [Quit: Ex-Chat]
00:53 -!- monty_hall [~sprague_r@adsl-99-40-250-203.dsl.sfldmi.sbcglobal.net] has
joined #go-nuts
00:54 -!- _ejb [~ejb@unaffiliated/ejb] has joined #go-nuts
01:14 -!- monty_hall [~sprague_r@adsl-99-40-250-203.dsl.sfldmi.sbcglobal.net] has
quit [Quit: Leaving.]
01:27 -!- sudi [~chatzilla@dslb-084-056-015-010.pools.arcor-ip.net] has quit
[Quit: ChatZilla 0.9.86 [Firefox 3.5.8/20100214235958]]
01:39 -!- bhungy [~bhungy@unaffiliated/bhungy] has joined #go-nuts
01:49 -!- sjbrown_ [~sjbrown@dsl081-072-059.sfo1.dsl.speakeasy.net] has quit
[Quit: Leaving]
01:50 -!- d3xter [~sinz@93-82-126-126.adsl.highway.telekom.at] has quit [Ping
timeout: 252 seconds]
01:52 -!- Associat0r [~Associat0@h163153.upc-h.chello.nl] has joined #go-nuts
01:55 -!- carllerche_ [~carllerch@enginey-9.border1.sfo002.pnap.net] has joined
#go-nuts
01:55 -!- monty_hall [~sprague_r@99.40.250.203] has joined #go-nuts
01:59 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit [Ping
timeout: 265 seconds]
01:59 -!- monty_hall [~sprague_r@99.40.250.203] has quit [Client Quit]
01:59 -!- monty_hall [~sprague_r@adsl-99-40-250-203.dsl.sfldmi.sbcglobal.net] has
joined #go-nuts
02:01 -!- nutate [~rseymour@cacsag4.usc.edu] has quit [Quit: I'm outta heee-eere]
02:08 -!- Amaranth [~travis@ubuntu/member/Amaranth] has quit [Ping timeout: 268
seconds]
02:09 -!- Amaranth [~travis@ubuntu/member/Amaranth] has joined #go-nuts
02:15 -!- rhelmer [~rhelmer@adsl-69-107-87-1.dsl.pltn13.pacbell.net] has quit
[Quit: rhelmer]
02:15 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit
[Quit: carllerche]
02:16 -!- Venom_X [~pjacobs@cpe-67-9-131-167.austin.res.rr.com] has quit [Quit:
Venom_X]
02:18 -!- rhelmer [~rhelmer@adsl-69-107-87-1.dsl.pltn13.pacbell.net] has joined
#go-nuts
02:21 -!- MarkBao [~MarkBao@64.134.96.99] has quit [Ping timeout: 258 seconds]
02:25 -!- Amaranth [~travis@ubuntu/member/Amaranth] has quit [Ping timeout: 268
seconds]
02:31 -!- Amaranth [~travis@ubuntu/member/Amaranth] has joined #go-nuts
02:38 -!- MarkBao [~MarkBao@pool-173-76-27-66.bstnma.fios.verizon.net] has joined
#go-nuts
02:45 -!- yatoo [~marcus@host86-153-224-40.range86-153.btcentralplus.com] has quit
[Ping timeout: 245 seconds]
02:49 -!- rhelmer [~rhelmer@adsl-69-107-87-1.dsl.pltn13.pacbell.net] has quit
[Quit: rhelmer]
02:52 -!- x-ip [~sakura@unaffiliated/x-ip] has joined #go-nuts
02:53 -!- tux21b [~christoph@90.146.60.30] has quit [Ping timeout: 265 seconds]
03:16 -!- defectiv [~clays@c-24-5-65-40.hsd1.ca.comcast.net] has joined #go-nuts
03:16 -!- Associat0r [~Associat0@h163153.upc-h.chello.nl] has quit [Quit:
Associat0r]
03:17 -!- millertimek1a2m3 [~adam@rrcs-67-79-54-130.sw.biz.rr.com] has joined
#go-nuts
03:20 -!- carllerche [~carllerch@c-69-181-129-204.hsd1.ca.comcast.net] has joined
#go-nuts
03:21 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving]
03:25 -!- rhelmer [~rhelmer@adsl-69-107-87-1.dsl.pltn13.pacbell.net] has joined
#go-nuts
03:39 -!- millertimek1a2m3 [~adam@rrcs-67-79-54-130.sw.biz.rr.com] has quit [Quit:
Ex-Chat]
03:50 -!- adu [~ajr@pool-71-191-173-96.washdc.fios.verizon.net] has joined
#go-nuts
04:04 -!- Gracenotes [~person@wikipedia/Gracenotes] has joined #go-nuts
04:05 < plexdev> http://is.gd/9cTQa by [Christopher Wedgwood] in
go/doc/progs/ -- doc: Use byte("...") over byte{...}
04:17 -!- nettok [~netto@200.119.151.7] has joined #go-nuts
04:17 -!- hornjef [~hornjef@216.217.69.67] has joined #go-nuts
04:17 -!- hstimer [~hstimer@c-98-234-25-125.hsd1.ca.comcast.net] has joined
#go-nuts
04:17 < hstimer> what does the ...interface mean?
04:18 < hstimer> func Stdout(v ...interface{})
04:18 <+iant> hstimer: any number of arguments of any type
04:19 <+iant> ...T where T is a type means any number of arguments, each of
which must be assignment compatible with T
04:20 -!- GabydeWilde_ [~gabydewil@84-104-135-141.cable.quicknet.nl] has quit
[Ping timeout: 240 seconds]
04:28 < hstimer> iant: what is the representation of an interface?  it
appears to be a vtable kind of thing based on how it is used
04:29 <+iant> an empty interface is two words: a pointer to a type
descriptor, and a value
04:29 * hstimer fixed size?
04:29 <+iant> an interface with methods is three words: a pointer to a type
descriptor, a value, and a pointer to a table of function pointers
04:29 <+iant> fixed size, yes
04:29 <+iant> if the value is too large, it is stored as a pointer
04:30 < hstimer> so if you pass an int to something that wants an interface
the int gets boxed?
04:30 < smw> yep
04:30 <+iant> no, an int is small enough that it fits directly into the
interface
04:30 < hstimer> ah....  now it makes much more sense
04:30 <+iant> that is, if you assign an int value to an interface, the int
is just stored in the interface value
04:31 <+iant> of course if you assign a pointer to an int to an interface,
then the interface will store a pointer
04:32 <+iant> and if you assign a large struct value to an interface, the
struct value will get boxed
04:32 < hstimer> thank you
04:42 -!- pdusen [~pdusen@crob4-55.flint.umich.edu] has quit [Ping timeout: 260
seconds]
04:42 -!- hornjef [~hornjef@216.217.69.67] has left #go-nuts []
04:44 < hstimer> iant: so instead of hauling around a type descriptor all
the time, it can be created on the fly when needed...  nice
04:45 < hstimer> like a stout beer but with no calories....  :)
04:47 -!- OpenSpace [~ja@109.93.231.99] has quit [Ping timeout: 265 seconds]
04:50 -!- OpenSpace [~ja@109.93.231.99] has joined #go-nuts
04:52 -!- tav [~tav@92.24.47.76] has quit [Quit: tav]
05:02 -!- hstimer [~hstimer@c-98-234-25-125.hsd1.ca.comcast.net] has quit [Quit:
hstimer]
05:03 -!- robot12 [~robot12@szhilkin.broker.freenet6.net] has joined #go-nuts
05:03 -!- hstimer [~hstimer@2002:62ea:197d:0:226:bbff:fe05:dd9b] has joined
#go-nuts
05:10 -!- unistd [~play@123.133.134.208] has joined #go-nuts
05:13 -!- defectiv [~clays@c-24-5-65-40.hsd1.ca.comcast.net] has quit [Quit: This
computer has gone to sleep]
05:15 -!- divoxx [~divoxx@208.87.58.193] has quit [Ping timeout: 265 seconds]
05:16 -!- drhodes [~none@209-20-72-61.slicehost.net] has quit [Read error:
Operation timed out]
05:16 -!- vomjom [~vomjom@99-157-248-71.lightspeed.stlsmo.sbcglobal.net] has quit
[Ping timeout: 265 seconds]
05:17 -!- unistd [~play@123.133.134.208] has quit [Quit: Ex-Chat]
05:17 -!- vomjom [~vomjom@99-157-248-71.lightspeed.stlsmo.sbcglobal.net] has
joined #go-nuts
05:19 -!- drhodes [~none@209-20-72-61.slicehost.net] has joined #go-nuts
05:22 -!- jbauer [~jbauer@adsl-99-69-161-43.dsl.lsan03.sbcglobal.net] has joined
#go-nuts
05:27 -!- rhelmer [~rhelmer@adsl-69-107-87-1.dsl.pltn13.pacbell.net] has quit
[Ping timeout: 264 seconds]
05:27 -!- smcq_ [~smcq@smcq.net] has quit [Ping timeout: 264 seconds]
05:27 -!- smcq_ [~smcq@smcq.net] has joined #go-nuts
05:29 -!- Archwyrm [~archwyrm@66.249.8.146] has quit [Ping timeout: 260 seconds]
05:29 -!- Archwyrm [~archwyrm@66.249.8.146] has joined #go-nuts
05:30 -!- Associat0r [~Associat0@h163153.upc-h.chello.nl] has joined #go-nuts
05:33 -!- defectiv [~clays@c-24-5-65-40.hsd1.ca.comcast.net] has joined #go-nuts
05:42 -!- defectiv [~clays@c-24-5-65-40.hsd1.ca.comcast.net] has quit [Quit: This
computer has gone to sleep]
05:45 -!- smw_ [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has joined
#go-nuts
05:48 -!- smw [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has quit [Ping
timeout: 245 seconds]
05:49 -!- defectiv [~clays@c-24-5-65-40.hsd1.ca.comcast.net] has joined #go-nuts
05:49 -!- nettok [~netto@200.119.151.7] has quit [Quit: Ex-Chat]
05:55 -!- droid001 [~g1@p4FDCACA5.dip.t-dialin.net] has quit [Ping timeout: 265
seconds]
05:58 -!- defectiv [~clays@c-24-5-65-40.hsd1.ca.comcast.net] has quit [Quit: This
computer has gone to sleep]
06:08 -!- toni_ [~toni@87-93-37-160.bb.dnainternet.fi] has quit [Ping timeout: 260
seconds]
06:19 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
600 seconds]
06:27 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
06:32 -!- GabydeWilde_ [~gabydewil@84-104-135-141.cable.quicknet.nl] has joined
#go-nuts
06:34 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
06:36 -!- ollins [~ollins@84-73-206-133.dclient.hispeed.ch] has joined #go-nuts
06:38 -!- Cyprien_ [Cyprien@151-142.78-83.cust.bluewin.ch] has quit [Ping timeout:
264 seconds]
06:39 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 246
seconds]
06:40 -!- taruti [taruti@aoi.yi.org] has quit [Ping timeout: 265 seconds]
06:40 -!- hhg [~hhg@hhg.to] has quit [Ping timeout: 246 seconds]
06:40 -!- hhg [~hhg@hhg.to] has joined #go-nuts
06:43 -!- adu_ [~ajr@pool-173-66-14-213.washdc.fios.verizon.net] has joined
#go-nuts
06:44 -!- mssm [~mssm@ip-95-221-66-70.bb.netbynet.ru] has joined #go-nuts
06:44 -!- _ejb [~ejb@unaffiliated/ejb] has quit [Ping timeout: 260 seconds]
06:44 < anticw> iant: do you know if the compiler/runtime can optimize "1" +
"2" + "3" + "4" to generate only one object or are intermediates formed?
06:44 < anticw> ie.  "12" "123" "1234" (then the first two get collected
eventually)
06:45 -!- adu [~ajr@pool-71-191-173-96.washdc.fios.verizon.net] has quit [Ping
timeout: 265 seconds]
06:51 -!- adu_ [~ajr@pool-173-66-14-213.washdc.fios.verizon.net] has quit [Quit:
adu_]
06:52 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
06:53 -!- taruti [taruti@aoi.yi.org] has joined #go-nuts
06:54 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
06:55 -!- KillerX [~anant@145-116-234-40.uilenstede.casema.nl] has joined #go-nuts
06:55 -!- KillerX [~anant@145-116-234-40.uilenstede.casema.nl] has quit [Changing
host]
06:55 -!- KillerX [~anant@gentoo/developer/KillerX] has joined #go-nuts
06:59 -!- Luixsia [~Luixsia@AToulouse-254-1-43-69.w81-250.abo.wanadoo.fr] has
joined #go-nuts
07:01 -!- robot12 [~robot12@szhilkin.broker.freenet6.net] has left #go-nuts []
07:01 -!- KillerX [~anant@gentoo/developer/KillerX] has quit [Quit: Leaving.]
07:03 -!- Xurix [~Luixsia@AToulouse-254-1-43-69.w81-250.abo.wanadoo.fr] has quit
[Ping timeout: 256 seconds]
07:07 -!- defectiv [~clays@c-24-5-65-40.hsd1.ca.comcast.net] has joined #go-nuts
07:09 -!- defectiv [~clays@c-24-5-65-40.hsd1.ca.comcast.net] has quit [Client
Quit]
07:13 -!- droid001 [~g1@p4FDC9F61.dip.t-dialin.net] has joined #go-nuts
07:14 -!- idea_squirrel [~ct2rips@77-21-31-45-dynip.superkabel.de] has joined
#go-nuts
07:17 -!- Macpunk [~macpunk@2002:48b1:1add:0:eee:e6ff:fec7:7eaa] has joined
#go-nuts
07:19 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:a974:9249:3588:cf8e] has joined
#go-nuts
07:28 -!- trickie [~trickie@94.100.112.225] has joined #go-nuts
07:29 -!- wayneeseguin [~wayneeseg@rrcs-72-45-208-165.nys.biz.rr.com] has quit
[Ping timeout: 246 seconds]
07:31 -!- wayneeseguin [~wayneeseg@rrcs-72-45-208-165.nys.biz.rr.com] has joined
#go-nuts
07:36 -!- mssm [~mssm@ip-95-221-66-70.bb.netbynet.ru] has quit [Ping timeout: 256
seconds]
07:40 -!- ollins [~ollins@84-73-206-133.dclient.hispeed.ch] has quit [Remote host
closed the connection]
07:48 -!- x-ip [~sakura@unaffiliated/x-ip] has quit [Ping timeout: 265 seconds]
07:48 -!- wrtp [~rog@89.242.205.202] has joined #go-nuts
07:58 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has quit [Ping timeout:
246 seconds]
07:59 -!- monty_hall [~sprague_r@adsl-99-40-250-203.dsl.sfldmi.sbcglobal.net] has
quit [Ping timeout: 240 seconds]
08:02 -!- asmo [~asmo@c83-248-32-75.bredband.comhem.se] has joined #go-nuts
08:03 -!- Beoran [~9dc1cb2f@gateway/web/freenode/x-jlqmkuvlzlfevgki] has joined
#go-nuts
08:09 -!- Cyprien_ [~Cyprien@pub1.heig-vd.ch] has joined #go-nuts
08:10 -!- Beoran [~9dc1cb2f@gateway/web/freenode/x-jlqmkuvlzlfevgki] has left
#go-nuts []
08:10 -!- Beorann [~9dc1cb2f@gateway/web/freenode/x-jlqmkuvlzlfevgki] has joined
#go-nuts
08:11 < Beorann> how do I specify a constant in hexadecimal notation?  const
( ...  FOO = 0x01 ...  ) doesn't seem to work?
08:11 -!- carllerche [~carllerch@c-69-181-129-204.hsd1.ca.comcast.net] has quit
[Quit: carllerche]
08:12 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
08:13 < anticw> iant: nm, -S shows me it does indeed not optimize that
08:13 < Beorann> whoops, the constant name stanted with an umber, nevermind
08:14 < Beorann> (I'm wrapping OpenCV and using some automatically generated
constant list)
08:15 < anticw> interesting...  i played with OpenCV a while ago for face
locating
08:15 < anticw> i found it very slow
08:17 -!- ct529 [~quassel@biolpc1758.york.ac.uk] has joined #go-nuts
08:18 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 276 seconds]
08:31 < Beorann> anticw: what open source alternative do you sugest?  :)
08:32 < Beorann> I do think it'sa bit strange you can't define new methods
on existing built in types...  would be very useful for custom string functions.
08:33 < Beorann> like, say converting them to a c string : func (self
string) cstr() (* C.char) { ...  }
08:34 < Beorann> you can call this "moneky patching", but it's very handy
08:36 -!- kaigan|work
[~kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has joined #go-nuts
08:38 -!- Wiz126 [Wiz126@72.20.219.71] has left #go-nuts []
08:55 < Macpunk> Can't you give the type a name and use them
interchangeably?
08:56 < rsaarelm> Yeah, you can do a type alias for your own methods.
08:56 < rsaarelm> type MonkeyString = string; func (self MonkeyString)
MonkeyMethod() { ...  }
08:56 < rsaarelm> Then do MonkeyString("foo").MonkeyMethod()
08:57 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
08:59 < Macpunk> ah, you have to typecast
09:00 < anticw> Beorann: oh, i dont have an alternative, i wish there was
one
09:00 < anticw> Beorann: i got it working easily enough, as a toy, but i was
a bit bummed at how poorly it worked in some cases and how very slow it is
09:00 < Macpunk> So, out of curiosity, why can't you define methods on the
built in types?
09:02 < Beorann> Macpunk: the compiler seems to balk at it
09:02 < anticw> i think that would be hard to make work
09:02 < anticw> like, what would the scoping rules be?
09:02 < Beorann> why?
09:02 < anticw> what if you have more than one definition in more than one
package?
09:03 < Macpunk> Beorann, well it's stated in Effective Go that you have to
define methods on built in types by giving them names.
09:03 < Macpunk> Ah, that makes sense.
09:03 < Beorann> Macpunk: how so?
09:03 < Beorann> how would I go at it?
09:03 < anticw> type fooname int
09:03 < Beorann> oh
09:04 < Macpunk> yar, what he said
09:04 < Beorann> let me give that a try
09:05 < Macpunk> http://pastebin.com/PEaattJZ
09:05 < Macpunk> There's a silly example.
09:15 < Beorann> hmmm it works for string bu it's not too useful becase if I
say type mystring string; strings aren't compatible with mystring
09:20 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
09:27 < Beorann> oh, and is gotest broken?  it complains it can't find my
Test([^a-z].*) functions while I do have them
09:28 < Beorann> I even set LC_ALL=C
09:29 < anticw> gotest shouldn't be affected (directly) by locales
09:30 < Beorann> this is the right rsignature for tests?  func TestLoad(t
*testing.T)
09:30 < Beorann> in a opencv_test.go file
09:34 -!- Beorann [~9dc1cb2f@gateway/web/freenode/x-jlqmkuvlzlfevgki] has quit
[Ping timeout: 252 seconds]
09:35 < Macpunk> damn, just missed him
09:37 -!- c0nfl|ct [~tiago@83.240.134.68] has joined #go-nuts
09:38 -!- Beorann [~9dc1cb2f@gateway/web/freenode/x-vmfobmlzafhgwdkh] has joined
#go-nuts
09:38 < Beorann> I got cut off :p
09:38 -!- hstimer [~hstimer@2002:62ea:197d:0:226:bbff:fe05:dd9b] has quit [Ping
timeout: 268 seconds]
09:42 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has quit [Ping
timeout: 268 seconds]
09:46 < Beorann> how would I define a type for function pointer for a
callback (yes I know I could use a channel, perhaps) ?
09:47 < Beorann> type Callback func (...) (result interface{}) doesn't seem
to work
09:49 < Beorann> oh, it does
09:49 < Beorann> but there's no ternary operator ?
09:50 -!- merlin83 [~merlin83@unaffiliated/merlin83] has quit [Ping timeout: 240
seconds]
09:51 < Beorann> as for operator overloading...  it would be easily enough
to allow it based upon the type of the first argument like in Ruby
09:52 < Beorann> something like oper (self * Mymatrix) + (other * Mymatrix)
(result * Mymatrix) {
09:52 < Beorann> no overloading or anything needed
09:52 < Macpunk> http://golang.org/doc/go_lang_faq.html#overloading
09:52 < Beorann> I read that
09:52 < Macpunk> figured you did :P
09:52 < Beorann> tyhis is my reply to it
09:53 < Macpunk> I see
09:53 < Beorann> it's much simpler tahn C++ operator overloading
09:53 < Beorann> and only works for homogenous types (or interfaces)
09:53 < Beorann> but it's very ncice for math-like or buffer like objects
09:54 < Beorann> or arrays, etc
09:54 < Beorann> it has the disadvantage that a + b ma ydo domethinge else
than b + a, but that's only minor, really.  Not really a problem in ruby either.
09:56 < Beorann> it may even make sense for things like << for
buffers.  foo << 1 may make sense , and 1 << foo not
09:56 -!- merlin83 [~merlin83@cm18.delta246.maxonline.com.sg] has joined #go-nuts
09:56 -!- merlin83 [~merlin83@cm18.delta246.maxonline.com.sg] has quit [Changing
host]
09:56 -!- merlin83 [~merlin83@unaffiliated/merlin83] has joined #go-nuts
09:59 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
10:08 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has joined #go-nuts
10:08 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Disconnected by
services]
10:09 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts
10:14 < rsaarelm>
http://groups.google.com/group/golang-nuts/browse_thread/thread/891ecf8a9fa1bed4
There's discussion about that on the mailing list.
10:16 < rsaarelm> Or actually it's talking about some kind of inlining
syntax.
10:18 < rsaarelm> I was recalling that there was some problem with operator
overloading suggestions in that they would make parsing the code require a symbol
table.  That thread is talking about that.
10:39 -!- c0nfl|ct [~tiago@83.240.134.68] has quit [Ping timeout: 245 seconds]
10:48 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
10:51 -!- c0nfl|ct [~tiago@83.240.134.68] has joined #go-nuts
10:52 -!- Macpunk [~macpunk@2002:48b1:1add:0:eee:e6ff:fec7:7eaa] has quit [Ping
timeout: 248 seconds]
10:56 -!- mkn [~7c7cdbfa@gateway/web/freenode/x-njlvxmwlttszsalo] has joined
#go-nuts
10:56 -!- analogue [~analogue@toulouse.jfg-networks.net] has quit []
10:59 -!- Demp [~Demp@bzq-79-178-26-107.red.bezeqint.net] has quit [Remote host
closed the connection]
10:59 < Beorann> rsaarelm: if that's the problem, then it could be decided
that simple predifined method names are used in stead of the operators, like Lua
does it
10:59 -!- Demp [~Demp@bzq-79-178-26-107.red.bezeqint.net] has joined #go-nuts
11:01 < Beorann> so, for example -> func (self * Vector) OpAdd(other *
Vector) (* Vector) {} and then whenever you do v1 + v2 it becomes v1.OpAdd(v2)
11:01 < Beorann> (Lua uses __add__, but that name would not be exported by
fedault in Go)
11:05 -!- ioricloud [~henrique@unaffiliated/ioricloud] has joined #go-nuts
11:07 -!- analogue [~analogue@toulouse.jfg-networks.net] has joined #go-nuts
11:12 < Beorann> it would only make the compiler marginally more
complicated, and the run time speed would not be affected at all
11:13 < rsaarelm> That's pretty much how I envision operator overloading
could work, in a way that wouldn't require function overloading.
11:14 < jA_cOp> Beorann, it's __add
11:14 < jA_cOp> :P
11:14 < jA_cOp> That's exactly how it's done in D anyway, v1.opAdd(v2)
11:15 < jA_cOp> which is a better reference because Lua uses a seperate
object for metamethods
11:15 -!- mssm [~mssm@ip-95-221-68-117.bb.netbynet.ru] has joined #go-nuts
11:15 -!- General1337 [~support@71-84-247-187.dhcp.gldl.ca.charter.com] has joined
#go-nuts
11:16 < uriel> there are plenty of ways to implement op overloading, but
just because something can be implemented it doesn't mean that it is a good idea
11:20 -!- General13372 [~support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Ping timeout: 276 seconds]
11:20 < rsaarelm> Is there any consensus on a way that might be a non-bad
idea?
11:21 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat
0.3.1.1]
11:21 -!- ikke [~ikkibr@unaffiliated/ikkebr] has joined #go-nuts
11:21 < Beorann> jA_cOp: thanks for the hint on D, and yes it's better than
Lua
11:22 -!- path[l] [~path@122.182.0.38] has joined #go-nuts
11:22 < Beorann> uriel: why is it a bad idea?
11:22 < Beorann> uriel: I though Go was about speed but also about
programmer convenience
11:22 -!- monty_hall [~sprague_r@99.40.250.203] has joined #go-nuts
11:23 < Beorann> operator-like methods are very convenient, certainlt for
math-like objects and array-like ones
11:23 -!- monty_hall [~sprague_r@99.40.250.203] has quit [Remote host closed the
connection]
11:23 -!- monty_hall [~sprague_r@adsl-99-40-250-203.dsl.sfldmi.sbcglobal.net] has
joined #go-nuts
11:24 < Beorann> and on another note, if you have a method function that
takes no arguments, but froget to call it, you get a syntax error.  If would be
fun to have some sugar there too.  You get instant accessor methods.
11:24 < wrtp> Beorann: currently there is nothing in the language that
associates a built-in operator with a user-defined method
11:25 < Beorann> wrtp: sure , but what is not can yet be :)
11:25 < wrtp> yup - but the threshold is higher
11:26 < Beorann> wrtp: Ruby also has changed a bit since it's inception.
11:26 < Beorann> I do think that Go is , as of now, the most convenient low
level programming language I know . Ruby is the most conenient high level one.
11:26 < wrtp> also there are issues, like: if i define func (X) Add(i int)
X, then can i do 5 + x, where x is an X?
11:27 < Beorann> wrtp, no of course not
11:27 < wrtp> but then addition isn't commuative
11:27 < Beorann> you have to say X+ 5
11:27 < Beorann> sure
11:27 < Beorann> no problem
11:27 < wrtp> it is now
11:27 < Beorann> addition isn't commutative
11:27 < Beorann> for many things,
11:27 < wrtp> python has radd, or something similar
11:27 -!- yatoo [~marcus@host86-153-224-40.range86-153.btcentralplus.com] has
joined #go-nuts
11:27 < wrtp> to solve that issue
11:27 < wrtp> but it seems pretty clunky to me
11:28 < Beorann> wrtp: in Ruby there is a coerce
11:28 < Beorann> that gets called in this case on 5
11:28 < Beorann> IIRC
11:28 < wrtp> for which things is addition not commutative?
11:28 < rsaarelm> Strings :)
11:28 -!- jhnx [~bd732145@gateway/web/freenode/x-pqwimlcudkbtudsc] has joined
#go-nuts
11:28 < Beorann> wrtp: for anything but numbers, really
11:28 < wrtp> ok :-)
11:28 < Beorann> wrtp: and sets, maybe
11:29 < wrtp> in go, addition is only defined on numbers (well, and
strings!)
11:29 < Beorann> wrtp: arrays -> no , maps -> maybe
11:29 < rsaarelm> Vector addition, matrix addition seem pretty commutative
to me...
11:29 < Beorann> rsaarelm: yes, but there the problem doesn't arise
11:30 < Beorann> I don't mind scrificing cimommutativity
11:30 < Beorann> I don't mind scarificing commutativity
11:30 < rsaarelm> One might ask if you should even be making +-functions
which take arguments of different types.
11:31 < wrtp> there is that
11:31 < Beorann> rsaarelm: you can do (v *Vector) add (v2 *Vector) (*vector)
now
11:31 < wrtp> i don't think that it's so bad having to write out the method
names
11:31 < Beorann> func (v *Vector) add (v2 *Vector) (*Vector) {} I mean
11:31 < Beorann> well, yes, you can do v1.add(v2)
11:32 < Beorann> it's "not so bad", yes
11:32 < wrtp> at least that's in the same order as v1 + v2
11:32 < Beorann> but v1 + v2 being translated automartically to v1.add(v2)
is a very sweet and convenient sugar
11:33 < wrtp> i think there's a reluctance amongst the language designers to
start going down the "operators map to user-defined methods" route
11:33 < wrtp> partly, i think, because the properties of built-in operators
are well known
11:33 < Beorann> wrtp: I understand that, but operator overloading is also a
very often requested feature of GO
11:34 < wrtp> there are many oft-requested features of go :-)
11:34 < Beorann> sure
11:34 < Beorann> the thing is that there is a good reason to be against
something anda bad reason
11:34 < wrtp> currently if i see a "+" i know that it can't be doing
anything too involved
11:35 < Beorann> wrtp: that's true.  It will do simple math, or gibve a
compile error
11:35 < wrtp> with language design, there's always a balance of priorities.
11:35 < wrtp> there's no absolute good or bad
11:35 < Beorann> wrtp: again that's true.
11:35 < Beorann> wrtp: I am arguing on the side of convenience
11:36 < wrtp> convenience is not always a winning argument
11:36 -!- mkn [~7c7cdbfa@gateway/web/freenode/x-njlvxmwlttszsalo] has left
#go-nuts []
11:36 < Beorann> yes, but isn't convenience one of the 3 things go is about?
11:36 < wrtp> moreover: something that it convenient to write might not be
convenient to read
11:36 < wrtp> s/it/is/
11:37 < Beorann> wrtp: sure, but do you know Ruby
11:37 < Beorann> we're doing things like buf << str and everyone knows
what it means
11:37 < rsaarelm> The people wanting operator overloading are doing numeric
computation, and numeric computation sounds like something that should fall into
Go's niche of efficient compiled code and concurrency support.
11:37 < wrtp> not really.  i've used python a reasonable amount, and i'm
familiar with the langage space that ruby inhabits
11:37 < Beorann> rsaarelm: yes, that too
11:38 < Beorann> rsaarelm: I'm also looking into Go as a game programming
language
11:38 < wrtp> what does buf << str mean?
11:38 < Beorann> same as it does in C++
11:38 -!- path[l] [~path@122.182.0.38] has quit [Ping timeout: 240 seconds]
11:38 < wrtp> append str to buf?
11:38 < Beorann> indeed
11:38 < rsaarelm> Write it there.
11:38 < wrtp> why not buf + str?
11:38 < rsaarelm> Because write to stream != append.
11:39 < wrtp> is it really better than buf.Append(str) ?
11:39 < Beorann> buf = buf + str also wiorks in Ruby, yes
11:39 < wrtp> i always thought that C++'s overloading of << to mean IO
was a dreadful pun
11:39 < Beorann> foor example, if you have a sprite, it's easy to represent
it's position using a 2D vector when you have
11:39 < rsaarelm> A lot of people think that.  They might not be wrong.
11:40 < Beorann> rsaarelm: sure, it's a mediocre pun.  But in ruby bute
shifts are rarely used
11:40 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has quit [Quit:
leaving]
11:40 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has joined #go-nuts
11:40 < Beorann> and, yes, you can even do buf.append(str) in ruby as well,
I think
11:40 < wrtp> also, an infix operator shouldn't have side effects
11:41 < Beorann> wrtp: that's an argument I can sympathise with
11:41 < wrtp> the go way means that you're guaranteed that
11:42 < Beorann> but v.add doesn't guarantee that
11:42 < Beorann> is there a way to make immutable types in Go?
11:42 < wrtp> indeed, and it's obvious when you read it that you need to
take that possibility into account
11:42 < wrtp> Beorann: yes, just pass 'em by value
11:43 < Beorann> so something like this?
11:43 < wrtp> e.g func (x Vector)Add(y Vector) Vector
11:43 < Beorann> like that?
11:43 < wrtp> rather than a pointer method
11:43 < Beorann> ah
11:43 < Beorann> then, the problem is not so severe, right?
11:44 < Beorann> you could require that the types are immutable
11:44 < wrtp> e.g.  the Point type here: http://golang.org/pkg/exp/draw/
11:44 < wrtp> an immutable type doesn't mean no side effects
11:44 < wrtp> the immutable type might point to mutable members, for example
11:45 < Beorann> wrtp: true, though that seems contrived
11:45 < wrtp> or it might update a global data structure
11:46 < wrtp> or send on a channel
11:46 < Beorann> wrtp: ok, those two last examples make sense
11:47 < Beorann> how to say, it's an example of a balance between
convenience and simplicity
11:47 < wrtp> yup
11:47 < Beorann> no operator overloading is simpler but less convenient
11:48 < wrtp> simpler, and also more transparent, which isn't necessarily
the same thing
11:48 < Beorann> I don't know if transparenty is that important though
11:49 < Beorann> for example, in Ruby, al array-mike types ahve a method
.last and .first
11:49 < wrtp> i think it's a very important property when maintaining s/w
11:49 < Beorann> some (Java-) peoplecomplained about this becauuse they say
you could also do a[0] and a[len(a)-1]
11:50 < Beorann> however, this exposes the implementation
11:50 < Beorann> an example of how transpareny may be unwanted
11:50 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has quit [Quit:
leaving]
11:50 < wrtp> i'm not sure that's transparency.  that's just choosing
appropriate abstractions.
11:50 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has joined #go-nuts
11:51 < Beorann> wrtp: then you will hae to tell me what you understand by
transpareny, I fear :)
11:51 < wrtp> transparency is having a reasonably model of what's going on
in a piece of code without having to know all the types and what's going on in all
the functions & methods that are being called in it
11:51 < wrtp> s/reasonably/reasonable/
11:52 < wrtp> with go, i know that if i see an operator, i know not to worry
too much.  i can locally rearrange code without complete understanding of what's
going on.
11:53 < wrtp> local code transformation is crucial
11:53 < Beorann> so, you mean, "if io read these few lines of code I should
be able to largely understand what they're doing"
11:53 < wrtp> yup
11:53 < wrtp> or at any rate, i know where the magic may be happening
11:54 < wrtp> and i know which bits are straightforward.
11:54 < Beorann> but , wit such simple operator methdos, the magic, for a
type will happen in it's package only
11:54 < wrtp> sure.  but it's still magic.
11:54 < wrtp> if i'm looking at someone else's package, currently i can
glance at a piece of code and know that it's trivial (or not)
11:54 < Beorann> hmmm...  it's a two edged sword again
11:55 < wrtp> yup
11:55 -!- DerHorst [~Horst@e176119043.adsl.alicedsl.de] has joined #go-nuts
11:55 < Beorann> I daresay "technology that is distinguishable from magic is
not sufficiently advanced"
11:55 < wrtp> that's why the answer isn't obviously "yes" when you ask them
to put in operator-overloading...
11:56 < wrtp> we're still in the dark ages
11:56 < Beorann> wrtp: sure, I understand your arguments well
11:56 < wrtp> always will be, when it comes to computers - turing complete
runs deep
11:57 -!- path[l] [~path@122.182.0.38] has joined #go-nuts
11:57 < Beorann> wrtp: I have seen a research paper that states that AI can
be more proerful than a turing machine
11:57 < wrtp> oh yeah?
11:57 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Ping
timeout: 256 seconds]
11:57 < wrtp> you talking 'bout oracles?
11:57 < Beorann> if you use a machine that uses complete real numbers on
it's "strip"
11:57 < Beorann> not really
11:58 < wrtp> the universe doesn't contain complete real numbers
11:58 < Beorann> that is the catch
11:58 < wrtp> planck constant an' all
11:58 < Beorann> our brain, though, uses levels of pules that are close to
real numbers
11:59 < Beorann> how to say , that approcximate real numbers to the planck
constant
11:59 < wrtp> it's more than a catch.  it's like: we can do time travel...
if we can travel faster than light
11:59 < Beorann> so, to do real AI that is as goodd as our brains ,we need a
similar approximation
11:59 < wrtp> close is infinitely far away
12:00 < wrtp> you mean we need larger computers
12:00 < wrtp> ?
12:00 < wrtp> sure
12:00 < wrtp> the brain's more powerful than we give it credit for
12:00 < Beorann> yes, and we will need to model parameters with someting
like Bignum in Ruby (aritrary precision math)
12:01 < wrtp> i don't think so
12:01 -!- c0nfl|ct [~tiago@83.240.134.68] has quit [Ping timeout: 248 seconds]
12:01 < wrtp> 2^x gets big fast
12:01 < Beorann> yes, but there are a lot of prteins in a mole :)
12:01 < wrtp> 10^35 isn't that big
12:02 < Beorann> the amont of atioms in the brain?
12:02 < wrtp> the number of planck constants in a metre
12:02 < wrtp> although i've got the units wrong...
12:03 < Beorann> the avogadro constant, 1 mole is 12 g of carbon
12:03 < wrtp> i'm not sure avogadro's constant is relevant here
12:04 < Beorann> 6 * 10^ 23
12:04 < Beorann> you have to model every atom
12:04 -!- tux21b [~christoph@90.146.60.30] has joined #go-nuts
12:04 < wrtp> it's just good for calculating concentrations of gases etc
12:05 < wrtp> but anyway, we're just talking big computers.  but you never
escape turing
12:05 -!- path[l] [~path@122.182.0.38] has quit [Ping timeout: 265 seconds]
12:05 < wrtp> by the time you get to computers that big, we won't be able to
program them directly.
12:06 < Beorann> wrtp: well, you areable to do so, but the programs will not
be interesting :)
12:06 -!- jbauer [~jbauer@adsl-99-69-161-43.dsl.lsan03.sbcglobal.net] has quit
[Remote host closed the connection]
12:06 < wrtp> it'll be more like physics, but with a non-physical substrate
12:06 < Beorann> in essence, we need to program a basic program that can
leearn new things
12:06 < wrtp> we can do that already, in some domains
12:06 < Beorann> yes
12:07 -!- Kashia [~Kashia@port-92-200-133-127.dynamic.qsc.de] has quit [Quit: This
computer has gone to sleep]
12:07 < wrtp> the question is: what language do you use to write the basic
program?
12:07 < Beorann> wrtp: it's irrelevant isn't it :)
12:07 < wrtp> totally not
12:07 < Beorann> because of turting, any will do
12:08 < wrtp> because of humans, it matters very much
12:08 < Beorann> wrtp convenience :)
12:08 < wrtp> ...  and understandability, reliability, maintainability...
12:09 < Beorann> each of which must be balanced against one another
12:09 < wrtp> sure
12:09 < Beorann> different language designs give different balances
12:09 < wrtp> totally
12:09 < Beorann> I like my language convenient, though :)
12:09 < wrtp> haskell, go, ruby, C, lisp
12:10 -!- tametick [~chatzilla@chello084114134061.3.15.vie.surfer.at] has joined
#go-nuts
12:10 < Beorann> But, as I said before, amongst the compilable languages I
know, Go is one the most convenient so far.
12:10 < wrtp> i agree, but i'm prepared to make the necessary sacrifices for
maintainability
12:10 < wrtp> i've discarded too many lines of code
12:11 < Beorann> well, Ruby takes the opposite approach.  it lets you do all
sorts of convenient things.  it's up to the programmer not to abuse that power
12:11 < wrtp> yeah.  but it's also really slow.
12:11 < Beorann> wrtp: it's getting faster as of lately
12:12 < Beorann> still interpreted though, like python, etc
12:12 < Beorann> although JRuby is compiled nowadays to JVM
12:12 -!- Demp [~Demp@bzq-79-178-26-107.red.bezeqint.net] has quit [Ping timeout:
268 seconds]
12:12 < tametick> python is actually compiled to bytecode these days :p
12:12 < Beorann> tametick: So is Ruby, nowadays :)
12:12 -!- DerHorst [~Horst@e176119043.adsl.alicedsl.de] has quit [Quit:
Verlassend]
12:12 < wrtp> bytecode or machine code?
12:12 < tametick> i don't mean jython
12:12 < tametick> the actual cpython
12:13 < Beorann> sure
12:13 -!- Demp [~Demp@bzq-79-183-1-239.red.bezeqint.net] has joined #go-nuts
12:13 < Beorann> Ruby 1.9.1 uses a VM 'Rite' and bytecode for that
12:13 < wrtp> but the fundamentally dynamic design needs to be paid for,
either in code space or time space
12:13 < tametick> interesting
12:13 < Beorann> wrtp: sure, like in Objective C or in Smalltalk
12:13 < wrtp> yup
12:14 < wrtp> or lisp
12:14 < Beorann> But I don't mind
12:14 < wrtp> others do
12:14 < Beorann> I think I'll try to implement a Ruby-like .send in Go :)
12:14 < wrtp> what's .send ?
12:14 < Beorann> method sicpatch of Rubvy all passes though .send
12:15 < Beorann> object.send("methodname", ...)
12:15 < wrtp> each object implements its own .send methods?
12:15 < Beorann> no, it's inherited
12:15 < wrtp> s/methods/method/
12:15 < Beorann> but you can override it
12:15 < wrtp> sure
12:15 < wrtp> same deal in python
12:16 < Beorann> same in Objective C or Smalltalk
12:16 < Beorann> the only "primitive" in sucha language really is send
12:16 < wrtp> sure
12:16 < Beorann> and this does a hash lookup and then calls the found
function
12:16 < wrtp> that means that it's easy to write stuff that looks the same,
but is really slow, 'cos it's doing too much dynamic dispatch
12:17 < wrtp> it's a fundamentally different attitude to language design
12:17 < wrtp> and good for DSL
12:17 < Beorann> wrtp: sure, but the flexibility is very useful, expecially
for GUI programming
12:17 < Beorann> yes, good for DSL also :)
12:17 < wrtp> yeah, i see it both ways
12:18 -!- tametick [~chatzilla@chello084114134061.3.15.vie.surfer.at] has left
#go-nuts []
12:18 < wrtp> if i want a language that's good for DSLs, i'll use lisp
12:18 < Beorann> Also, I'm sure I can embed ruby in Go :)
12:18 < Beorann> wrtp: go's (lack of) syntax is not so convenient
12:19 < wrtp> ...  but it does mean that the compiler can do a good job
without having to be too clever at run time
12:19 < wrtp> that's the trade off
12:19 < Beorann> wrtp: actually, /syntax/ doesn't change runtime efficiency.
/semantics/ do
12:20 < wrtp> sure
12:20 < wrtp> so what did you mean be lack of syntax?
12:20 < Beorann> Ruby's syntax is very convenient for SDL's
12:20 -!- jalmeida [~jalmeida@c9340a2e.virtua.com.br] has joined #go-nuts
12:20 < wrtp> go has about as much syntax as ruby, AFAICS
12:20 < Beorann> in lisp yo have to (use (lots-of (brackets)))
12:20 < wrtp> *shrug*
12:20 < Beorann> Is syntax unimportant?
12:21 < wrtp> no, a balanced syntax is crucial
12:21 -!- Demp [~Demp@bzq-79-183-1-239.red.bezeqint.net] has quit [Ping timeout:
240 seconds]
12:21 -!- yatoo [~marcus@host86-153-224-40.range86-153.btcentralplus.com] has quit
[Ping timeout: 248 seconds]
12:21 < wrtp> but you said "go's (lack of) syntax is not so convenient"
12:21 < Beorann> Exactly!  I think it's the inteface tho the semantics of
the language.  So it matters just as much as the semantics.
12:21 < wrtp> sure
12:21 < Beorann> wrtp: oops!
12:22 < Beorann> I meant lisp(s (lack of syntax)
12:22 < wrtp> ah, i see
12:22 < wrtp> lisp's lack of syntax is crucial to the way it works
12:22 < Beorann> go could use a bit more sugar, IMO, but it's miles ahead of
C, C+, D, Vala, etc
12:22 < wrtp> there's no other language that makes it so easy to work at
meta level
12:23 < Beorann> yes, lisp sacrifices syntax for semantical reasons
12:23 < wrtp> the backquoting rules work amazingly well
12:23 < Beorann> I don't know lisp metaprogramming, but I did a lot of
Rubymetaprogramming and it's also relatively easy
12:24 < wrtp> but couldn't work with any syntax more complex, i think.
12:24 -!- Demp [~Demp@109.67.43.51] has joined #go-nuts
12:24 < wrtp> the point is: in lisp, the meta-level looks *exactly* the same
as the level itself
12:24 < wrtp> syntactically
12:24 < rsaarelm> Yeah, it's the homoiconic property.
12:25 < wrtp> yeah.  and that's why lisp is such an important language
12:25 < rsaarelm> The language and the representation look the same.
12:25 < rsaarelm> Factor's got pretty much the same btw.
12:25 < wrtp> i don't know about Factor
12:25 < sladegen> it's basically forth.
12:26 < wrtp> i have a fundamental disagreement with stack-based languages
12:26 < rsaarelm> Yeah.  The programs are word strings, and it can
manipulate word-strings.
12:26 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
12:26 < Beorann> it's interestingg, but also sort of academical.  I struggle
even with a Gimp macro (in scheme).  :p
12:26 < wrtp> too much postscript debugging
12:26 -!- yatoo [~marcus@host86-160-77-91.range86-160.btcentralplus.com] has
joined #go-nuts
12:26 < rsaarelm> Factor was fun, it'd take me hours to come up with a
three-line function.
12:26 < rsaarelm> For some values of fun.
12:26 < sladegen> turing tar-pits...
12:27 < wrtp> sladegen: good phrase.  yes.
12:27 < Beorann> ah, the joys of postscript
12:27 < Beorann> I defined some meta stuff that let me write it in a normal
way
12:28 < wrtp> by "normal", you mean not reversed-polish ?
12:28 -!- Demp [~Demp@109.67.43.51] has quit [Read error: Connection reset by
peer]
12:29 -!- expate98 [~user@pool-74-105-215-60.nwrknj.fios.verizon.net] has joined
#go-nuts
12:29 -!- Demp [~Demp@bzq-109-67-43-51.red.bezeqint.net] has joined #go-nuts
12:30 -!- afurlan [~afurlan@scorpion.mps.com.br] has joined #go-nuts
12:31 < Beorann> yes
12:32 < Beorann> I was just taking a look at it
12:32 < Beorann> forgot how it worked , though
12:32 < Beorann> :)
12:33 < Beorann> ah, oh, but a Go-related question
12:33 < Beorann> can an interface be a function type?
12:34 < Beorann> Umm, I mean, how would I say that any function func
foo(...) is fine
12:35 < Beorann> just type callback foo(...) (int)?
12:35 < Beorann> just type callback func foo(...) (int)?
12:35 < Beorann> I mean, ..  could that also be specified as an interface
somehow?
12:36 -!- Demp [~Demp@bzq-109-67-43-51.red.bezeqint.net] has quit [Ping timeout:
245 seconds]
12:37 -!- Demp [~Demp@bzq-79-181-3-18.red.bezeqint.net] has joined #go-nuts
12:42 < rsaarelm> If you're asking whether you can write an interface whose
value you can use like a callback function, no, I don't think so.
12:44 < rsaarelm> You can make function types define an interface though,
which is neat: "type FuncWriter func(out io.Writer); func (self FuncWriter)
Write(out io.Writer) { self(out) }"
12:45 -!- cmarcelo [~cmarcelo@200.184.118.130] has joined #go-nuts
12:45 -!- cmarcelo [~cmarcelo@200.184.118.130] has quit [Changing host]
12:45 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined
#go-nuts
12:45 < rsaarelm> (If I understood correctly, this is the exact opposite of
what you were asking...)
12:49 < Beorann> rsaarelm: thanks, very interesting
12:52 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
12:55 -!- nanoo [~nano@95-89-189-46-dynip.superkabel.de] has joined #go-nuts
13:01 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
13:08 -!- expate98 [~user@pool-74-105-215-60.nwrknj.fios.verizon.net] has left
#go-nuts []
13:16 -!- Xera^ [~brit@87-194-208-246.bethere.co.uk] has joined #go-nuts
13:16 < Beorann> if you have a foo which is struct Foo {} and a bar wich is
struct Bar { Foo ; other string } and a func (Foo) Frob() {} ; is there a way to
convert Foo back into Bar if you call bar.Frob() ?
13:16 < Beorann> inside Frob
13:24 -!- powerje [~powerje@2002:4b3c:d6ac:0:213:e8ff:feaa:ae2b] has quit [Ping
timeout: 268 seconds]
13:24 -!- tibshoot [~tibshoot@linagora-230-146.pr0.nerim.net] has joined #go-nuts
13:24 -!- MarkBao [~MarkBao@pool-173-76-27-66.bstnma.fios.verizon.net] has quit
[Ping timeout: 265 seconds]
13:30 -!- Demp [~Demp@bzq-79-181-3-18.red.bezeqint.net] has quit [Ping timeout:
264 seconds]
13:32 -!- powerje [~powerje@2002:4b3c:d6ac:0:213:e8ff:feaa:ae2b] has joined
#go-nuts
13:34 < rsaarelm> The methods for the embedded type get the embedded type's
value as caller.  I don't think there's an easy way, I'm guessing straight casting
isn't going to work since the outer type has a different structure.
13:36 < rsaarelm> You could do something seriously dirty and foul with
unsafe, I suppose.
13:37 -!- asmo [~asmo@c83-248-32-75.bredband.comhem.se] has quit [Remote host
closed the connection]
13:37 < Beorann> rsaarelm: I see...
13:39 < rsaarelm> "tmp := new(Bar); ptrDelta := unsafe.Pointer(&tmp.Foo) -
unsafe.Pointer(tmp); barVal := (*Bar)(unsafe.Pointer(fooVal) - ptrDelta)"
Something like that?
13:39 < rsaarelm> Which you probably shouldn't do.
13:40 < rsaarelm> (The pointer arithmetic syntax and the pointer referencing
is probably wrong, but hopefully the idea can be seen)
13:42 -!- mssm [~mssm@ip-95-221-68-117.bb.netbynet.ru] has quit [Read error:
Operation timed out]
13:43 < rsaarelm> One problem is that in the method you don't know if you're
dealing with an embedded or standalone Foo, and if you pull that fuckery on a
standalone Foo, you've just ran into memory corruption country.
13:48 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
13:48 < Beorann> rsaarelm: OK. Alternatively, how would I define a type that
is a method func?  type func (self * Foo) M (...) (* Foo) doesn't seem to work?
13:50 < rsaarelm> Do you have an use for that that you can't do with a
single-method interface?
13:51 < Beorann> I'm trying to see how far I can push the limits :)
13:52 -!- oal [~olav@5.79-160-122.customer.lyse.net] has joined #go-nuts
13:52 < Beorann> Suppose I wanted to implement a lisp / ruby interpreter ;)
13:52 < Beorann> I find I learn more if I try such things.
13:55 < rsaarelm> Well there are method expressions, which the compilers
don't support yet.
13:55 * araujo thinks a lisp interpreter could be interesting thing to try indeed
:)
13:55 < rsaarelm> If Foo has method M(Bar), the corresponding method
expression should be Foo.M(Foo, Bar).
13:56 < rsaarelm> So you could have a regular function type, which you could
plug a method of type Foo in.
13:57 < rsaarelm> Reading the language spec cover to cover might be a good
idea if you want a handle on where the expressive limits are.
13:58 -!- mssm [~mssm@ip-95-221-112-62.bb.netbynet.ru] has joined #go-nuts
13:58 < Beorann> rsaarelm: that sunds very useful though
13:58 < Beorann> too bad it's not implemented yet
13:59 < Beorann> I think I could put them to good use.
14:04 -!- ioricloud [~henrique@unaffiliated/ioricloud] has left #go-nuts
["Leaving"]
14:13 -!- mssm [~mssm@ip-95-221-112-62.bb.netbynet.ru] has quit [Ping timeout: 276
seconds]
14:17 < bortzmeyer> undefined: strings.Bytes
14:17 < bortzmeyer> but Bytes still exist, according to
http://golang.org/pkg/strings/
14:18 < bortzmeyer> The Web site is late?  (Indeed, Bytes seem to have been
deleted from ./src/pkg/strings/strings.go)
14:20 -!- smw_ [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has quit
[Ping timeout: 265 seconds]
14:23 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has quit [Ping
timeout: 276 seconds]
14:23 < rsaarelm> There was a patch today where strings.Bytes was replaced
with a cast, []byte(str) or something.
14:26 < bortzmeyer> And someone forgot to type "make web" :-)
14:26 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
14:33 -!- mssm [~mssm@ip-95-221-80-106.bb.netbynet.ru] has joined #go-nuts
14:42 < bortzmeyer> []byte(str) seems to work (to replace strings.Bytes)
14:46 -!- powerje [~powerje@2002:4b3c:d6ac:0:213:e8ff:feaa:ae2b] has quit [Quit:
exit]
14:52 -!- trickie [~trickie@94.100.112.225] has quit [Quit: Computer has gone to
sleep]
14:52 -!- trickie [~trickie@94.100.112.225] has joined #go-nuts
14:54 -!- trickie [~trickie@94.100.112.225] has quit [Client Quit]
14:55 -!- trickie [~trickie@94.100.112.225] has joined #go-nuts
14:58 -!- KB1JWQ [~KB1JWQ@freenode/staff/kb1jwq] has quit [Quit: leaving]
14:59 -!- KB1JWQ [~KB1JWQ@freenode/staff/kb1jwq] has joined #go-nuts
15:15 -!- Demp [~Demp@bzq-79-183-34-59.red.bezeqint.net] has joined #go-nuts
15:16 -!- c0nfl|ct [~tiago@83.240.134.68] has joined #go-nuts
15:28 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
15:29 -!- mode/#go-nuts [+v iant] by ChanServ
15:34 -!- Demp [~Demp@bzq-79-183-34-59.red.bezeqint.net] has quit [Read error:
Connection reset by peer]
15:35 -!- Demp [~Demp@bzq-79-183-34-59.red.bezeqint.net] has joined #go-nuts
15:37 -!- Cyprien_ [~Cyprien@pub1.heig-vd.ch] has quit [Ping timeout: 276 seconds]
15:40 -!- smw [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has joined
#go-nuts
15:42 -!- Venom_X [~pjacobs@cpe-67-9-131-167.austin.res.rr.com] has joined
#go-nuts
15:43 -!- monty_hall [~sprague_r@adsl-99-40-250-203.dsl.sfldmi.sbcglobal.net] has
quit [Ping timeout: 276 seconds]
15:46 -!- monty_hall [~sprague_r@adsl-99-40-250-203.dsl.sfldmi.sbcglobal.net] has
joined #go-nuts
15:46 -!- ct529 [~quassel@biolpc1758.york.ac.uk] has quit [Remote host closed the
connection]
15:57 -!- grahame [~grahame@billy.angrygoats.net] has quit [Ping timeout: 256
seconds]
15:58 -!- grahame [~grahame@billy.angrygoats.net] has joined #go-nuts
16:01 -!- smw [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has quit [Ping
timeout: 256 seconds]
16:09 -!- ct529 [~quassel@biolpc1758.york.ac.uk] has joined #go-nuts
16:25 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Quit:
ChatZilla 0.9.86 [Firefox 3.6/20100115144158]]
16:27 -!- gzmask [~ray@corwin.cat.uregina.ca] has joined #go-nuts
16:27 -!- asmo [~asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
16:30 -!- g0bl1n [~anonymous@a213-22-237-221.cpe.netcabo.pt] has joined #go-nuts
16:30 -!- kaigan|work
[~kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has quit [Quit:
kaigan|work]
16:32 -!- ilsanto [~max@unaffiliated/ilsanto] has joined #go-nuts
16:32 -!- Demp [~Demp@bzq-79-183-34-59.red.bezeqint.net] has quit [Read error:
Connection reset by peer]
16:35 -!- Demp [~Demp@bzq-79-183-34-59.red.bezeqint.net] has joined #go-nuts
16:35 -!- nanoo [~nano@95-89-189-46-dynip.superkabel.de] has quit [Quit: Leaving]
16:41 -!- Venom_X [~pjacobs@cpe-67-9-131-167.austin.res.rr.com] has quit [Quit:
Venom_X]
16:44 -!- jalmeida [~jalmeida@c9340a2e.virtua.com.br] has quit [Remote host closed
the connection]
16:45 -!- b00m_chef__ [~watr@d64-180-45-230.bchsia.telus.net] has joined #go-nuts
16:48 -!- TMKCodes [~toni@87-95-123-98.bb.dnainternet.fi] has joined #go-nuts
16:49 -!- tav [~tav@92.24.47.76] has joined #go-nuts
16:51 -!- trickie [~trickie@94.100.112.225] has quit [Quit: outty]
16:51 -!- jalmeida [~jalmeida@c9340a2e.virtua.com.br] has joined #go-nuts
16:55 -!- tux21b [~christoph@90.146.60.30] has quit [Quit: Ex-Chat]
16:56 -!- toni_ [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has joined #go-nuts
16:57 -!- TMKCodes [~toni@87-95-123-98.bb.dnainternet.fi] has quit [Ping timeout:
245 seconds]
16:58 < c0nfl|ct> bom fim de semana...
16:58 -!- c0nfl|ct [~tiago@83.240.134.68] has quit [Read error: Connection reset
by peer]
17:02 < plexdev> http://is.gd/9fD9U by [Rob Pike] in go/ -- add
micah.stetson to C&A
17:02 < plexdev> http://is.gd/9fDau by [Micah Stetson] in
go/src/pkg/template/ -- Fix a couple of bugs referencing data values in template.
17:06 -!- g0bl1n [~anonymous@a213-22-237-221.cpe.netcabo.pt] has quit [Quit:
g0bl1n]
17:10 -!- ct529 [~quassel@biolpc1758.york.ac.uk] has quit [Remote host closed the
connection]
17:21 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-171-141.clienti.tiscali.it] has
joined #go-nuts
17:22 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:a974:9249:3588:cf8e] has quit
[Quit: Leaving.]
17:36 -!- tibshoot [~tibshoot@linagora-230-146.pr0.nerim.net] has quit [Quit:
Quitte]
17:43 -!- Venom_X [~pjacobs@rrcs-71-41-4-194.sw.biz.rr.com] has joined #go-nuts
17:43 -!- smw_ [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has joined
#go-nuts
17:47 -!- wrtp [~rog@89.242.205.202] has quit [Quit: wrtp]
17:48 -!- wrtp [~rog@89.242.205.202] has joined #go-nuts
17:48 -!- sudi [~chatzilla@dslb-084-056-015-010.pools.arcor-ip.net] has joined
#go-nuts
17:49 -!- Venom_X [~pjacobs@rrcs-71-41-4-194.sw.biz.rr.com] has quit [Quit:
Venom_X]
17:50 -!- Daminvar [~Daminvar@129.21.121.107] has joined #go-nuts
17:56 -!- Venom_X [~pjacobs@cpe-72-177-102-160.austin.res.rr.com] has joined
#go-nuts
17:59 -!- GeoBSD [~geobsd@lns-bzn-27-82-248-63-252.adsl.proxad.net] has joined
#go-nuts
18:04 -!- keeto [~keeto@121.54.92.149] has quit [Read error: Connection reset by
peer]
18:05 -!- g0bl1n [~anonymous@a213-22-237-221.cpe.netcabo.pt] has joined #go-nuts
18:05 -!- keeto [~keeto@121.54.92.149] has joined #go-nuts
18:06 -!- Venom_X [~pjacobs@cpe-72-177-102-160.austin.res.rr.com] has quit [Quit:
Venom_X]
18:08 -!- Venom_X [~pjacobs@rrcs-71-41-4-194.sw.biz.rr.com] has joined #go-nuts
18:09 -!- oal [~olav@5.79-160-122.customer.lyse.net] has quit [Read error:
Connection reset by peer]
18:09 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving]
18:29 -!- itrekkie [~itrekkie@ip72-200-104-177.tc.ph.cox.net] has joined #go-nuts
18:39 -!- alm [~alm@wnpgmb0516w-ad03-175-222.dynamic.mts.net] has quit [Ping
timeout: 240 seconds]
18:49 -!- aho [~nya@f051087135.adsl.alicedsl.de] has joined #go-nuts
18:52 -!- Cyprien_ [Cyprien@181-39.3-85.cust.bluewin.ch] has joined #go-nuts
19:04 < smw> if Read() is given a byte slice that has 0 size, will it expand
it up to capacity?
19:06 -!- path[l] [~path@122.167.241.122] has joined #go-nuts
19:09 -!- path[l] [~path@122.167.241.122] has quit [Read error: Connection reset
by peer]
19:09 -!- path[l] [~path@122.167.241.122] has joined #go-nuts
19:17 -!- ako [~nya@g227091159.adsl.alicedsl.de] has joined #go-nuts
19:19 < plexdev> http://is.gd/9gk4h by [Robert Griesemer] in
go/src/pkg/go/scanner/ -- go/scanner: the position of '\n's chars must be the last
position of the current line
19:21 -!- aho [~nya@f051087135.adsl.alicedsl.de] has quit [Ping timeout: 264
seconds]
19:25 -!- pure_x01 [~pure@c83-248-3-188.bredband.comhem.se] has joined #go-nuts
19:25 <+iant> smw: no, it will just read up to the length of the slice, not
the capacity
19:28 -!- EthanG [~EthanG@sourcemage/guru/eekee] has joined #go-nuts
19:28 -!- EthanG [~EthanG@sourcemage/guru/eekee] has left #go-nuts []
19:33 -!- nanoo [~nano@95-89-189-46-dynip.superkabel.de] has joined #go-nuts
19:37 -!- pure_x01 [~pure@c83-248-3-188.bredband.comhem.se] has quit [Quit:
Leaving]
19:38 < gzmask> the slice is just a buffer
19:38 < gzmask> so if it's 0 size you reads nothing
19:39 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:39 -!- pure_x01 [~pure@c83-248-3-188.bredband.comhem.se] has joined #go-nuts
19:41 -!- Venom_X [~pjacobs@rrcs-71-41-4-194.sw.biz.rr.com] has quit [Quit:
Venom_X]
19:50 -!- g0bl1n [~anonymous@a213-22-237-221.cpe.netcabo.pt] has quit [Quit:
g0bl1n]
19:52 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has joined
#go-nuts
19:58 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-171-141.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
20:01 -!- jhnx [~bd732145@gateway/web/freenode/x-pqwimlcudkbtudsc] has quit [Ping
timeout: 252 seconds]
20:07 -!- path[l] [~path@122.167.241.122] has quit [Ping timeout: 246 seconds]
20:10 -!- XenoPhoenix
[27f8bae00d@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com] has quit [Ping
timeout: 260 seconds]
20:14 -!- path[l] [~path@122.167.241.122] has joined #go-nuts
20:17 -!- XenoPhoenix
[1814aa0e92@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com] has joined #go-nuts
20:23 -!- pure_x01 [~pure@c83-248-3-188.bredband.comhem.se] has quit [Quit:
Leaving]
20:25 -!- afurlan [~afurlan@scorpion.mps.com.br] has quit [Remote host closed the
connection]
20:25 -!- pure_x01 [~53f803bc@gateway/web/freenode/x-tflbbpwsmwzghjul] has joined
#go-nuts
20:26 -!- gzmask [~ray@corwin.cat.uregina.ca] has left #go-nuts []
20:27 -!- geocalc [~geobsd@lns-bzn-32-82-254-3-213.adsl.proxad.net] has joined
#go-nuts
20:27 -!- Ortzman [~ortzinato@cpe-065-191-006-129.nc.res.rr.com] has quit [Quit: (
www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
20:29 -!- GeoBSD [~geobsd@lns-bzn-27-82-248-63-252.adsl.proxad.net] has quit [Read
error: Operation timed out]
20:37 -!- KinOfCain [~KinOfCain@rrcs-64-183-61-2.west.biz.rr.com] has joined
#go-nuts
20:49 -!- jalmeida [~jalmeida@c9340a2e.virtua.com.br] has quit [Quit: Fui embora]
20:49 -!- Ortzinator [~ortzinato@cpe-065-191-006-129.nc.res.rr.com] has joined
#go-nuts
20:49 -!- Ortzinator [~ortzinato@cpe-065-191-006-129.nc.res.rr.com] has quit
[Changing host]
20:49 -!- Ortzinator [~ortzinato@unaffiliated/ortzinator] has joined #go-nuts
20:51 -!- pure_x01 [~53f803bc@gateway/web/freenode/x-tflbbpwsmwzghjul] has quit
[Quit: Page closed]
20:51 -!- ikke [~ikkibr@unaffiliated/ikkebr] has quit [Ping timeout: 240 seconds]
20:52 -!- Venom_X [~pjacobs@75-27-130-192.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
20:55 -!- ikke [~ikkibr@unaffiliated/ikkebr] has joined #go-nuts
20:56 -!- nanooo [~nano@95-89-189-46-dynip.superkabel.de] has joined #go-nuts
20:59 -!- nanoo [~nano@95-89-189-46-dynip.superkabel.de] has quit [Ping timeout:
260 seconds]
21:14 -!- Venom_X [~pjacobs@75-27-130-192.lightspeed.austtx.sbcglobal.net] has
quit [Quit: Venom_X]
21:21 < plexdev> http://is.gd/9gNoB by [Russ Cox] in 2 subdirs of go/ -- 8g:
make a[byte(x)] truncate x
21:29 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Quit:
leaving]
21:29 -!- ikke [~ikkibr@unaffiliated/ikkebr] has quit []
21:30 -!- asmo [~asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
quit [Remote host closed the connection]
21:31 -!- Ortzinator [~ortzinato@unaffiliated/ortzinator] has quit [Read error:
Connection reset by peer]
21:31 -!- asmo [~asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
21:34 -!- keeto [~keeto@121.54.92.149] has quit [Read error: Connection reset by
peer]
21:35 -!- keeto [~keeto@121.54.92.149] has joined #go-nuts
21:41 -!- stalled [~411@unaffiliated/stalled] has quit [Ping timeout: 260 seconds]
21:44 -!- stalled [~411@unaffiliated/stalled] has joined #go-nuts
21:47 -!- geocalc [~geobsd@lns-bzn-32-82-254-3-213.adsl.proxad.net] has quit
[Remote host closed the connection]
21:58 -!- nanoo [~nano@95-89-189-46-dynip.superkabel.de] has joined #go-nuts
22:00 -!- nanooo [~nano@95-89-189-46-dynip.superkabel.de] has quit [Ping timeout:
264 seconds]
22:04 -!- asmo [~asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
quit [Remote host closed the connection]
22:06 -!- Mopman [~mopman@29.16.be.static.xlhost.com] has quit [Quit: leaving]
22:08 < plexdev> http://is.gd/9gYjF by [Ian Lance Taylor] in 3 subdirs of
go/src/cmd/ -- Add -r option to 6l/8l/5l.
22:09 -!- Ortzinator [~ortzinato@cpe-065-191-006-129.nc.res.rr.com] has joined
#go-nuts
22:09 -!- Ortzinator [~ortzinato@cpe-065-191-006-129.nc.res.rr.com] has quit
[Changing host]
22:09 -!- Ortzinator [~ortzinato@unaffiliated/ortzinator] has joined #go-nuts
22:13 -!- scm [justme@c178003.adsl.hansenet.de] has quit [Ping timeout: 245
seconds]
22:15 -!- scm [~svencm@c190200.adsl.hansenet.de] has joined #go-nuts
22:17 -!- g0bl1n [~anonymous@a213-22-237-221.cpe.netcabo.pt] has joined #go-nuts
22:24 < plexdev> http://is.gd/9h27Q by [Russ Cox] in go/src/cmd/8g/ -- 8g:
fix out of register bug in byte(x) code
22:28 -!- idea_squirrel [~ct2rips@77-21-31-45-dynip.superkabel.de] has quit [Read
error: Connection reset by peer]
22:47 < smw> can someone tell me how to compare two byte slices?  I tried
buf == []byte("250") but I got: invalid operation: (buf[0:3]) == (slice literal)
(type []uint8 == []uint8)
22:49 < sladegen> smw: bytes.Equal?
22:50 -!- nanoo [~nano@95-89-189-46-dynip.superkabel.de] has quit [Quit: Leaving]
22:51 < smw> sladegen: thanks.  What is it that you can do string == string
but not []uint8 == []uint8
22:51 < smw> ?
22:52 < smw> why is it*
22:52 < sladegen> generic undecidedness?
22:53 < smw> what does that mean?
22:54 < sladegen> some things are built into the language as generics...
some are not.
22:55 < smw> hm...
22:55 * sladegen hmms: static typing begets partial generics...
22:56 < plexdev> http://is.gd/9h8O5 by [Robert Griesemer] in
go/src/pkg/go/parser/ -- go/parser cleanup: remove some state by writing more
functional code
22:56 < plexdev> http://is.gd/9h8Om by [Russ Cox] in go/ -- A+C: add Raif S.
Naffah (individual CLA)
23:01 -!- fwiffo [~fwiffo@unaffiliated/fwiffo] has joined #go-nuts
23:02 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
23:03 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Remote
host closed the connection]
23:05 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has joined #go-nuts
23:08 -!- Daminvar [~Daminvar@129.21.121.107] has quit [Quit: Leaving]
23:14 -!- newsham [~chat@thenewsh.com] has joined #go-nuts
23:15 < newsham> does golang have any of these?  1) multi-precision numbers
(bignums), 2) secure random number generators, 3) openssl bindings (particular for
those earlier two) ?
23:15 < smw> I know it has #1
23:15 -!- General13372 [~support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
23:15 < newsham> is #1 a builtin?  or a library?
23:15 < smw> number 2 I know nothing about
23:15 < smw> bignum lib
23:16 < smw> but the lib comes with the compiler
23:16 < newsham> so standard library.
23:16 < smw> yeah
23:16 < smw> number 3 is probably in a std lib
23:16 -!- Venom_X [~pjacobs@cpe-67-9-131-167.austin.res.rr.com] has joined
#go-nuts
23:17 < smw> newsham: http://golang.org/pkg/crypto/
23:17 < smw> newsham: it has a "rand" and "bignum" package
23:17 < smw> http://golang.org/pkg/
23:18 < newsham> crypto doesnt seem to have secure rand lib that i see
23:18 < smw> is rand secure?
23:19 < smw> I do not know enough about what a "secure" random lib is
23:19 < smw> http://golang.org/pkg/rand
23:19 < newsham> if it doesnt say it is, it probably isnt.
23:19 < newsham> description says pseudo-random
23:19 < newsham> doesnt mention security guarantees
23:19 < newsham> but there's rsa in the crypto lib, which would require some
secre random values
23:19 -!- General1337 [~support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Ping timeout: 265 seconds]
23:20 < smw> pseudo-random does not mean anything.  Any random num generator
(even if it is "secure") is pseudo-random
23:20 < newsham> "rand io.Reader" is parameter to many rsa functions
23:20 < newsham> hmmm
23:21 < newsham> smw: not entirely.  secure random number generators often
mix in real randomness
23:21 < newsham> as measured by physical devices
23:21 < smw> newsham: but that would require certain devices
23:21 < smw> and you could use that as the seed
23:22 < smw> my guess is that it is a copy of whatever the C random number
generator does
23:22 < newsham> there is no secure standard C random number generator.
23:22 < newsham> libraries like openssl have functions for it, though.
23:23 < newsham> that make use of platform-specific features, like
/dev/random or mouse, process table, keyboard, etc..
23:23 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
23:23 < newsham> I wonder what crypto.rsa clients usually use to pass in to
the "rand io.Reader"
23:24 < smw> newsham: /dev/random?
23:24 < smw> newsham: is that "secure"?
23:24 < newsham> /dev/random and /dev/urandom on several platforms gives you
access to numbers generated in the kernel where they can mix in lots of
platform-specific sources of randomness (interupts, network traffic, keyboard,
etc)
23:24 < newsham> its designed to be, yah.
23:25 < newsham> wether it is or not is an impl detail :)
23:25 < smw> ok
23:25 < smw> lol
23:25 < smw> newsham: so...  is it secure enough for you?  :-P
23:26 < newsham> but they do things like measure stuff, hash measurements,
put it into an entropy pool, and generate random values by doing crypto operations
(ie.  rc4) on that pool
23:26 < newsham> yah, i'd be fine with that..  but I would prefer librar/api
that is portable across platforms
23:26 < newsham> I cant rely on something like /dev/random existing
23:27 < smw> ok, then make one :-P.
23:27 < newsham> well, if there are openssl bindings then i might not have
to
23:27 < smw> I will look quickly
23:27 < newsham> also, I'm not using golang right now..  asking as part of
me figuring out if i should
23:28 < sladegen> ask users to relax and bang on the keyboard like a
monkey...
23:28 < plexdev> http://is.gd/9hg6O by [Raif S. Naffah] in 2 subdirs of
go/src/pkg/ -- crypto/blowfish: new package
23:28 < newsham> :)
23:29 < smw> I think there are openssl bindings.  sladegen, where is the
page that has the list of bindings?
23:29 < smw> found it
23:29 < smw> http://go-lang.cat-v.org/library-bindings
23:30 < smw> guess not :-\
23:30 < newsham> eek, tls library is using currentTime to seed randomness.
http://golang.org/src/pkg/crypto/tls/handshake_server.go?h=random
23:31 < smw> wow
23:31 < smw> Even I know that is bad...
23:31 < newsham> oh, they're augmenting it with other stuff
23:31 < smw> ok
23:31 < newsham> wherever config.Rand comes from
23:33 < newsham> which comes from the "rand" package in the test cases
23:33 < newsham> hrmmm :(
23:33 * smw goes back to trying to make a smtp client library
23:33 < newsham> so basically library punts the problem to library clients
23:34 < smw> newsham: what would you do?
23:35 < smw> what would be your source of randomness?
23:35 < newsham> I just think there should be a library for that stuff that
is adjusted for each platform.
23:35 < newsham> like how openssl does it
23:35 < smw> ok
23:35 < newsham> so that the library clients dont have to worry about it
themselves
23:36 < smw> so it would use /dev/random on linux, and something else on
windows?
23:36 < newsham> ie.  on platforms that have it, just open and read
/dev/random or /dev/urandom
23:36 < newsham> on other platforms, measure some stuff and mix it into an
entropy pool occasionally
23:36 < smw> what is the diff between random and urandom?
23:37 < newsham> one will give you numbers even if new entropy hasnt been
added to the system
23:37 < newsham> the other will block until sufficient entropy is available
23:37 < newsham> thats platform-specific stuff
23:39 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Read
error: Connection reset by peer]
23:40 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
23:40 < newsham> http://en.wikipedia.org/wiki//dev/random
23:50 -!- Venom_X [~pjacobs@cpe-67-9-131-167.austin.res.rr.com] has quit [Quit:
Venom_X]
23:52 -!- g0bl1n [~anonymous@a213-22-237-221.cpe.netcabo.pt] has quit [Quit:
g0bl1n]
--- Log closed Sat Feb 27 00:00:18 2010