--- Log opened Fri May 13 00:00:47 2011
--- Day changed Fri May 13 2011
00:00 < fheller> KirkMcDonald: Yeah, I get that.  I've seen other examples
where this works well, though.  NSLocalizedString(...) from Apple in my experience
was very nice to use
00:03 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
00:03 < fheller> KirkMcDonald: If the user is logged in, I want to tweak
some colors slightly in a header--how do I express that change with a template?
00:04 < KirkMcDonald> I'm not a web designer.  But in a more simplistic
templating language, you might conditionally choose one css class vs.  another.
00:05 < KirkMcDonald> (Based on a variable passed in to the template.)
00:06 < fheller> For me, it's much more simple to use a Go variable and a Go
statement and not involve any other language.
00:08 -!- tncardoso [~thiago@189.59.134.202] has quit [Quit: bye]
00:08 < fheller> Also, I like interpreting my models directly with less
indirection.  I guess template languages were made for people who aren't so lazy
like me.
00:09 < fheller> I think I should tweak this so just the needed data and
conditionals are involved in my...thing
00:15 < fheller> Anyway, has anyone used Go for serious web apps?  What was
your server setup (built-in, fcgi, ...)?
00:15 -!- rphillips [~rphillips@unaffiliated/rphillips] has quit [Quit: ZNC -
http://znc.sourceforge.net]
00:16 < skelterjohn> golang.org is a go web app
00:17 < fheller> And they use the built-in server, which is comforting
00:17 < skelterjohn> a lot of people like web.go
00:20 < fheller> And that's interesting to me.  web.go seems to provide its
own stuff like Request and Response and I was wondering if that was necessary as
Go has built-in variants.
00:21 -!- rphillips [~rphillips@unaffiliated/rphillips] has joined #go-nuts
00:21 < fheller> And I don't mean passive-aggressive "wondering" as in "I'm
wondering why x duplicated functionality"--I mean as in "oh man, I don't know a
lot about Go and I hope the built-in stuff is all I need--but I really do wonder
since someone made web.go and something else"
00:21 -!- genbattle [~nick@203-114-137-9.wir.sta.inspire.net.nz] has joined
#go-nuts
00:25 -!- xb95 [~xb95@dreamwidth/staff/mark] has quit [Read error: Operation timed
out]
00:25 -!- xb95 [~xb95@qq.is] has joined #go-nuts
00:25 -!- xb95 [~xb95@qq.is] has quit [Changing host]
00:25 -!- xb95 [~xb95@dreamwidth/staff/mark] has joined #go-nuts
00:27 -!- zanget [~zanget@hurf.durf.me] has quit [Ping timeout: 260 seconds]
00:27 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
00:27 -!- kkress [~kkress@2001:470:1:41::403e:ad36] has quit [Ping timeout: 248
seconds]
00:27 -!- kkress [~kkress@2001:470:1:41::403e:ad36] has joined #go-nuts
00:27 -!- zanget [~zanget@hurf.durf.me] has joined #go-nuts
00:31 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
00:32 < jeremy_c> Anyone know of something like MongoDB but as an embedded
database?  i.e.  no server, like sqlite.
00:34 -!- tvw [~tv@e176003041.adsl.alicedsl.de] has quit [Ping timeout: 246
seconds]
00:35 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
00:46 < dforsyth> i want to write one that uses gobs ;_;
00:46 < dforsyth> or wrap level
00:46 < dforsyth> leveldb*
00:47 < drhodes> jeremy_c: I found a stackoverflow question that addresses
that question: http://goo.gl/lBOsY, I haven't used any of them though :)
00:52 < jhawk28> jeremy_c here is a partially implemented one:
http://code.google.com/p/gocask/
00:54 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Remote
host closed the connection]
00:57 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
00:58 -!- mikespook [~mikespook@219.137.49.242] has joined #go-nuts
00:59 -!- vpit3833 [~chatzilla@203.111.33.203] has joined #go-nuts
01:04 -!- brtk [~brtk@c83-248-35-158.bredband.comhem.se] has quit [Ping timeout:
260 seconds]
01:04 -!- iant [~iant@66.109.105.72] has quit [Quit: Leaving.]
01:05 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Venom_X]
01:05 -!- brtk [~brtk@c83-248-35-158.bredband.comhem.se] has joined #go-nuts
01:07 -!- niemeyer [~niemeyer@business-89-133-214-120.business.broadband.hu] has
quit [Read error: Connection reset by peer]
01:08 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 240 seconds]
01:09 < jeremy_c> drhodes: jhawk28 thanks
01:10 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
01:17 -!- krutcha_ [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit:
Leaving]
01:20 -!- genbattle [~nick@203-114-137-9.wir.sta.inspire.net.nz] has quit [Ping
timeout: 240 seconds]
01:34 -!- achoo [~achoo@host-134-71-204-178.allocated.csupomona.edu] has joined
#go-nuts
01:35 -!- gaxxx [~woo@219.143.166.16] has joined #go-nuts
01:37 -!- moraes_ [~moraes@189.103.176.38] has joined #go-nuts
01:40 -!- benjack [~benjack@bb220-255-251-155.singnet.com.sg] has joined #go-nuts
01:41 -!- moraes [~moraes@189.103.176.38] has quit [Ping timeout: 264 seconds]
01:41 -!- achoo [~achoo@host-134-71-204-178.allocated.csupomona.edu] has quit
[Quit: achoo]
01:43 -!- achoo [~achoo@host-134-71-204-178.allocated.csupomona.edu] has joined
#go-nuts
01:44 < jeremy_c> are #cgo commands documented anywhere?  i.e.  /* #cgo
LDFLAGS: ....  */ ?
01:44 < jeremy_c> I need to specify a different LDFLAGS line when
GOOS=windows vs.  GOOS=linux
01:45 < Kafo> // #cgo linux CFLAGS: -DLINUX=1
01:45 < Kafo> http://golang.org/cmd/cgo/
01:46 < jeremy_c> Kafo: great, thanks!  I'm still learning my way around
some of the docs.  I remember reading something about it, then went back to find
it and couldn't.
01:46 < Kafo> So "// #cgo windows LDFLAGS: -lwindowslibrary" and "// #cgo
linux LDFLAGS: -llinuxlibrary"
01:54 < Kafo> Bed time for me
01:54 < Kafo> It's almost 5 o'clock.
01:54 < Kafo> Too much information to absorb on internet.
01:55 < jeremy_c> Kafo: give it another day or so and you'll have it all...
:-)
01:56 < jeremy_c> go-iup now installs cleanly from goinstall!  Yay!
01:56 < Kafo> Maybe :)
01:56 < Kafo> Nice :)
01:57 < Kafo> I hate how my main interests are stuff like compilers and
operating systems and the learning curve isn't the most fun part.
01:57 < fheller> Kafo: Go embedded
01:59 < Kafo> I actually was thinking about making a compiler that generates
gameboy binaries.  :)
02:00 < Kafo> But now it's sleepytime
02:03 -!- Kafo [~Kafo@a91-152-189-15.elisa-laajakaista.fi] has quit [Remote host
closed the connection]
02:06 -!- tvw [~tv@e176004054.adsl.alicedsl.de] has joined #go-nuts
02:14 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Linkinus - http://linkinus.com]
02:15 < fzzbt> how do i do a reverse regexp "match"?  ie.  i have a regexp
and some content, and i would like to generate a string by inserting that content
to what i would normally try to match.  eg.  i have regexp "^foo(.*)$" and content
string "bar" then i would i should get string "foobar" generated
02:17 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has joined #go-nuts
02:18 -!- achoo [~achoo@host-134-71-204-178.allocated.csupomona.edu] has quit
[Quit: achoo]
02:19 < chomp> searching the interwebs has proven unproductive, so does
anyone know if there's any work being done on a PAM wrapper package for go?
02:26 < fheller> fzzbt: So I have a string "kitties foo puppies" and after
your operation I would have "kitties foobar puppies"?
02:26 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
02:27 < fzzbt> uhm..  noo
02:30 < fzzbt> basically, i have regexps for different URL patterns which
are linked to different URL handlers.  this works okay, but now I want to do the
reverse: given a URL handler and some string parameters, i want to generate an URL
addres from the regexp that is linked with the given URL handler.
02:33 -!- qwp [debian-tor@gateway/tor-sasl/qwp] has joined #go-nuts
02:33 -!- kr [~Keith@204.14.152.118] has quit [Ping timeout: 264 seconds]
02:33 -!- qwp [debian-tor@gateway/tor-sasl/qwp] has left #go-nuts []
02:34 < fheller> So the input is regex: "^/view/[^/]+/[^/]+$" (matches
view/kitties/1), and then entity="puppies" id="2".  From this, your program would
generate /view/puppies/2?  If I'm still not getting, don't bother explaining again
(I will still fail to understand)
02:36 < fzzbt> fheller: yeah exactly
02:36 < fheller> I have no idea how you would do that without parsing the
regex.
02:38 < fheller> I'm lazy, so I would have the regex and some other data
structure that knows how to handle parameter insertion
02:41 < fzzbt> python/django had special regexp format for this, eg.
"^/view/(?P<pet>[^/]+)/(?P<id>[^/]+/$" after which you could generate
the url with something like reverse("my_handler", kwargs={pet:"puppies", id:2}).
go regexp doesn't seem to support anything like this
02:42 < fheller> fzzbt: I'm brand new to Go (day #2) so I wouldn't be able
to confirm or deny the existence of such a thing in Go.
02:42 < fzzbt> :)
02:44 < fzzbt> maybe i should just hardcode my url for now.  too lazy
02:45 < fzzbt> even web.go doesn't do this yet
02:45 < fheller> Of course, earlier today two other people in this chat-room
poo-poo'd my using Go as a template language:
http://www.weirdspaceadventures.com/go/test.goh turns into
http://www.weirdspaceadventures.com/go/test.go
02:46 < fzzbt> look like php, hah
02:46 < fheller> Rob Pike and Andrew G. gave a talk on using Go to build Web
Apps at Google I/O, but it's not online yet.
02:47 -!- fmoo [~Adium@66.220.144.74] has quit [Quit: Leaving.]
02:47 < fheller> It's true: one thing the PHP community learned was to stop
inventing template languages because PHP was a template language.  I don't know if
you were apart of that.
02:47 < fzzbt> i don't think it is a good idea to mix Go code and HTML code
02:47 < fzzbt> :D
02:49 < fheller> So this is definitely not a hit with the Go-ers.  I, for
one, love it because I don't have to parse a template and if I am using MVC, I can
keep my M in Go.
02:53 < fzzbt> i thought the whole idea of MVC was to cleanly separate the
different application layers, not mix them together in one big pasta.
02:53 < fheller> I should not have posted that code as the example usage.
brb
02:54 < fzzbt> maybe i was taught wrrong.  never understood why php is so
great.  but hey, it must be, because everyone is using it.
02:54 < fheller> PHP is great because the hosting costs are dirt cheap.
02:57 < vsmatck> quote, "...languages that people complain about, and
languages that people don't use..."
03:03 -!- benjack [~benjack@bb220-255-251-155.singnet.com.sg] has quit [Quit:
Leaving.]
03:10 -!- boscop_ [~boscop@g225207191.adsl.alicedsl.de] has joined #go-nuts
03:11 < fheller> fzzbt: I would love to show you my sweet example of
displaying the Kitty model but I can't get Go to find my package
03:12 < fzzbt> :|
03:12 < fheller> fzzbt: Oh no, I'm not giving up yet.  It's happening
03:13 -!- boscop [~boscop@f055115018.adsl.alicedsl.de] has quit [Ping timeout: 248
seconds]
03:26 < fheller> fzzbt: Here's what I mean:
http://www.weirdspaceadventures.com/go/test.goh
03:26 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has joined #go-nuts
03:27 < fheller> Which then goes to
http://www.weirdspaceadventures.com/go/test.go
03:27 < fheller> Which, when viewed, looks like
http://www.weirdspaceadventures.com/go/test.html
03:28 < fheller> Here is the bootstrap:
http://www.weirdspaceadventures.com/go/bootstrap.go
03:31 < fheller> Although there is a huge downside of writing to the
ResponseWriter: it can return an error.  I will have to look at ResponseWriter to
see if the I/O is buffered
03:31 < gaiusp> new to golang, does go have pattern matching syntax?
03:32 < gaiusp> similar to haskell or erlang.  instead of relying on regex
only.
03:33 -!- photron_ [~photron@port-92-201-36-47.dynamic.qsc.de] has joined #go-nuts
03:33 < fheller> gaiusp: I don't think so--I certainly haven't seen any.
Waiting for a Go expert...
03:35 < gaiusp> fheller: ok.  thanks.  but will be great to add in.
nonetheless golang looks interesting.
03:36 -!- galf [~quassel@221.194.177.30] has joined #go-nuts
03:39 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
03:50 -!- pjm0616 [~user@110.8.235.86] has quit [Ping timeout: 258 seconds]
03:52 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has left #go-nuts []
03:53 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
03:54 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
03:56 < fzzbt> only regexp, afaik.
03:57 -!- l00t [~i-i3id3r_@189.105.66.232] has quit [Quit: Leaving]
03:59 -!- keithcascio [~keithcasc@nat/google/x-atdmpogrsgpwaobj] has quit [Quit:
Leaving]
04:02 -!- pjm0616 [~user@110.8.235.86] has joined #go-nuts
04:10 -!- gaxxx [~woo@219.143.166.16] has quit [Ping timeout: 276 seconds]
04:11 -!- gaxxx [~woo@li119-190.members.linode.com] has joined #go-nuts
04:13 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
04:15 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:15 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:19 -!- dshep [~dshep@c-76-103-91-143.hsd1.ca.comcast.net] has joined #go-nuts
04:25 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
04:25 -!- mode/#go-nuts [+v iant] by ChanServ
04:35 -!- vpit3833 [~chatzilla@203.111.33.203] has quit [Quit: ChatZilla 0.9.86.1
[SeaMonkey 2.1b3/20110408111019]]
04:37 -!- gaxxx [~woo@li119-190.members.linode.com] has quit [Ping timeout: 246
seconds]
04:38 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has quit [Ping timeout: 246
seconds]
04:39 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
04:41 -!- galf [~quassel@221.194.177.30] has quit [Remote host closed the
connection]
04:47 -!- krutcha_ [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
#go-nuts
04:51 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 264 seconds]
04:54 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 240 seconds]
05:02 -!- fheller [~hellerf@c-24-9-120-132.hsd1.co.comcast.net] has left #go-nuts
[]
05:03 -!- gaxxx [~woo@219.143.166.16] has joined #go-nuts
05:04 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
05:08 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
05:10 -!- krutcha_ [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit:
Leaving]
05:12 -!- ExtraSpice [XtraSpice@88.118.35.153] has joined #go-nuts
05:12 -!- gaxxx [~woo@219.143.166.16] has quit [Read error: Connection reset by
peer]
05:13 -!- gaxxx [~woo@219.143.166.16] has joined #go-nuts
05:15 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
05:19 -!- gaxxx [~woo@219.143.166.16] has quit [Ping timeout: 260 seconds]
05:20 -!- gaxxx [~woo@li119-190.members.linode.com] has joined #go-nuts
05:24 -!- Bigbear11 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
05:31 -!- gaxxx [~woo@li119-190.members.linode.com] has quit [Ping timeout: 250
seconds]
05:39 -!- aho [~nya@fuld-590c68db.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
05:45 -!- benjack [~benjack@bb220-255-251-155.singnet.com.sg] has joined #go-nuts
05:50 -!- mikespook [~mikespook@219.137.49.242] has quit [Ping timeout: 264
seconds]
05:51 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
05:52 -!- gaxxx [~woo@219.143.166.16] has joined #go-nuts
05:56 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has quit [Quit: WeeChat
0.3.4]
05:58 -!- mikespook [~mikespook@219.137.48.64] has joined #go-nuts
05:59 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has joined #go-nuts
06:00 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
06:01 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has joined #go-nuts
06:03 -!- mikespook [~mikespook@219.137.48.64] has quit [Ping timeout: 264
seconds]
06:05 -!- Bigbear11 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
06:05 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
06:18 -!- mikespook [~mikespook@219.137.48.64] has joined #go-nuts
06:20 -!- monsieur_max [~monsieur_@212.234.251.58] has joined #go-nuts
06:27 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:38 < str1ngs> jeremy_c: you moved iup!
06:38 < str1ngs> jeremy_c: I found it thouh :P
06:39 < hallas> Gooood morning
06:39 < str1ngs> hello
06:40 -!- sacho [~sacho@87-126-43-168.btc-net.bg] has joined #go-nuts
06:40 -!- Project_2501 [~Marvin@82.84.65.245] has joined #go-nuts
06:45 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
07:00 -!- wrtp [~rog@92.17.93.207] has joined #go-nuts
07:04 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
07:06 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:11 -!- benjack [~benjack@bb220-255-251-155.singnet.com.sg] has quit [Ping
timeout: 250 seconds]
07:11 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Ping
timeout: 246 seconds]
07:14 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-ufwrjycmytemtxrd]
has joined #go-nuts
07:15 -!- benjack [~benjack@bb116-15-127-27.singnet.com.sg] has joined #go-nuts
07:23 -!- randfur [~androirc@58.145.148.114] has joined #go-nuts
07:29 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 260 seconds]
07:34 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
07:35 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
07:43 -!- mikespook [~mikespook@219.137.48.64] has quit [Read error: Connection
reset by peer]
07:47 -!- shvntr [~shvntr@113.84.148.155] has joined #go-nuts
07:55 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Quit: ZNC -
http://znc.sourceforge.net]
07:58 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
08:02 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has joined
#go-nuts
08:03 -!- Kafo [~Kafo@a91-152-189-15.elisa-laajakaista.fi] has joined #go-nuts
08:07 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
08:10 -!- randfur [~androirc@58.145.148.114] has quit [Quit: AndroIRC]
08:11 -!- benjack [~benjack@bb116-15-127-27.singnet.com.sg] has quit [Quit:
Leaving.]
08:14 -!- mikespook [~mikespook@219.137.48.64] has joined #go-nuts
08:16 -!- mikespook [~mikespook@219.137.48.64] has quit [Read error: Connection
reset by peer]
08:18 -!- mikespook [~mikespook@219.137.48.64] has joined #go-nuts
08:39 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
08:39 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has joined #go-nuts
09:04 -!- Project-2501 [~Marvin@82.84.88.136] has joined #go-nuts
09:08 -!- Project_2501 [~Marvin@82.84.65.245] has quit [Ping timeout: 260 seconds]
09:10 -!- saracen [~saracen@81-5-140-201.dsl.eclipse.net.uk] has quit [Read error:
Operation timed out]
09:10 -!- dshep [~dshep@c-76-103-91-143.hsd1.ca.comcast.net] has quit [Quit:
leaving]
09:11 -!- saracen [~saracen@81-5-140-201.dsl.eclipse.net.uk] has joined #go-nuts
09:12 -!- tvw [~tv@e176004054.adsl.alicedsl.de] has quit [Read error: Connection
reset by peer]
09:15 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has quit [Quit:
Leaving.]
09:17 -!- photron_ [~photron@port-92-201-36-47.dynamic.qsc.de] has quit [Ping
timeout: 264 seconds]
09:18 -!- virtualsue [~chatzilla@nat/cisco/x-ffcnoocgbmsavyym] has joined #go-nuts
09:27 -!- virtualsue [~chatzilla@nat/cisco/x-ffcnoocgbmsavyym] has quit [Ping
timeout: 240 seconds]
09:28 -!- metatagg [~anton@h50n2fls34o933.telia.com] has joined #go-nuts
09:29 -!- virtualsue [~chatzilla@nat/cisco/x-acdgzoshbntuptjy] has joined #go-nuts
09:34 -!- metatagg [~anton@h50n2fls34o933.telia.com] has quit [Quit: WeeChat
0.3.4]
09:38 -!- mtrichardson [~mtrichard@li22-133.members.linode.com] has quit [Ping
timeout: 276 seconds]
09:39 -!- mtrichardson [~mtrichard@li22-133.members.linode.com] has joined
#go-nuts
09:43 < wrtp> cool, i never realised you could have struct fields named _
09:47 < xyproto> wrtp: the anonymous struct fields?
09:47 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
09:48 < wrtp> xyproto: no, e.g.  struct {x int; _ string; _ float64}
09:49 < wrtp> they're not anonymous but unnamed...  a subtle difference.
09:49 < wrtp> i have a cunning (ab)use for them...  as type parameters.
09:50 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
09:53 < niemeyer> wrtp: Hmm..  having a different idea now, which actually
feels better for a number of ways.
09:53 < niemeyer> s/ways/reasons
09:53 < niemeyer> wrtp: {|filter}content{.end}
09:55 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-ufwrjycmytemtxrd]
has quit [Quit: Leaving]
09:55 < wrtp> interesting
09:55 < wrtp> i'm not entirely sure actually
09:56 < wrtp> one of the ways i envisaged using string params was to
parameterise filters on data fields
09:57 < wrtp> e.g.  {foo "%2.5g"|printf}
09:57 < wrtp> i think they're both useful actually
09:57 < wrtp> oops, you've gone :-)
09:59 < xyproto> wrtp: when fields are unnamed, but have a type, what would
be the use, as to compared to named fields?  Some sort of padding?  More clarity
of code (since they don't have dummy names)?
09:59 < wrtp> xyproto: padding is one use, yes
10:00 < xyproto> wrtp: I see.
10:02 < wrtp> for my somewhat dodgy use, i have a data structure that is
basically a parameterised type, only you can express that in go.  i'm going to use
unnamed fields so that a reflection operation can find out the type parameter...
10:02 < wrtp> s/can express/can't express/
10:03 < wrtp> DSLs the Go way :-)
10:05 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-nmtvqfdzguamsmpp]
has joined #go-nuts
10:06 -!- tvw [~tv@212.79.9.150] has quit [Ping timeout: 240 seconds]
10:06 < niemeyer> wrtp: Sorry, got disconnected
10:06 -!- tvw [~tv@89.204.137.248] has joined #go-nuts
10:07 < niemeyer> wrtp: Yeah, agreed with your comment
10:08 < niemeyer> wrtp: printf is a pretty a neat filter, actually
10:08 < niemeyer> wrtp: I'll try harder :-)
10:09 < wrtp> i still think your idea of filtering an entire block is a nice
one
10:10 < niemeyer> wrtp: Yeah, I can see pretty neat uses for it too
10:10 < niemeyer> wrtp: E.g.  {|escape}...  code ...{.end}
10:10 < niemeyer> wrtp: I'll push that as the next CL after thi sone
10:11 -!- tvw [~tv@89.204.137.248] has quit [Ping timeout: 250 seconds]
10:12 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
10:12 < niemeyer> wrtp: Haven't been having much time lately..  UDS is
taking me the entire day + night.
10:12 < wrtp> niemeyer: i wonder if the syntax might be better as
{[field...] | formatter [field...] ...}
10:12 < wrtp> where field could be a string
10:13 < wrtp> then you could do {foo | escape | printf "%5.2g"}
10:14 < wrtp> not a good example!
10:14 < niemeyer> wrtp: Yeah, but I get your point..  perhaps
10:14 < wrtp> {foo | escape | printf "%x"} might be better
10:14 < niemeyer> wrtp: It increases a bit the syntax weight, though..
10:14 < wrtp> the output from the previous filter would be arg 0 to the next
filter, other args following
10:14 < niemeyer> wrtp: Not a good one too..  the output of escape is a
string
10:15 < wrtp> you can format strings as hex
10:15 < niemeyer> wrtp: Yeah, that sounds reasonable
10:15 < niemeyer> Oh, really?
10:15 < wrtp> % gotry fmt 'Sprintf("%x", "hello")'
10:15 < wrtp> Sprintf("%x", "hello") = "68656c6c6f"
10:16 < niemeyer> wrtp: Crazy..  :)
10:16 < wrtp> given that you can do it with []byte, it seems logical
10:17 < wrtp> anyway, given the above syntax, the section filtering works
naturally
10:17 < niemeyer> wrtp: Agreed
10:17 -!- GeertJohan [~Squarc@clal-0-227.eduroam.inholland.nl] has joined #go-nuts
10:17 < wrtp> {| printf "%20s"}some text{.end}
10:18 < wrtp> i quite like that actually
10:18 < wrtp> although it's true it does make the syntax a little heavier
10:19 < wrtp> another possibility is to use a special character to signify
the contents of the section, e.g.  <
10:20 < wrtp> {< | printf "%20s"}some text{.end}
10:21 < niemeyer> wrtp: Looks unnecessary
10:21 < wrtp> yeah maybe
10:21 < wrtp> it means you can include the contents of the section later in
the pipeline
10:21 < niemeyer> wrtp: Although we'll likely have to disambiguate with an
empty list passed to a filter
10:21 -!- GeertJohan [~Squarc@clal-0-227.eduroam.inholland.nl] has quit [Client
Quit]
10:22 < wrtp> is there any ambiguity?
10:23 < niemeyer> wrtp: Not sure..  I haven't really had time to think about
all the ins and outs yet..  there might be a use case for an empty argument list
for a formatter which generates content
10:23 < wrtp> { import "foo" | annotate < } some annotation stuff {.end}
10:23 < wrtp> that's true
10:24 < wrtp> that's a reason for having something to unambiguously specify
the section contents
10:24 < wrtp> < or $ or whatever
10:24 < niemeyer> wrtp: {.pipe | printf "%x"} ...  {.end}
10:24 < niemeyer> wrtp: Likely more inline with the existing syntax
10:25 < wrtp> yeah, although i do quite like the flexibility of being able
to put the contents anywhere in a formatter's argument list
10:25 < wrtp> it might be too much though
10:25 < niemeyer> wrtp: Yeah, feels like going overboard..  one would have
to stare at the line for 30 seconds to understand what it does
10:25 < wrtp> we've already got @
10:26 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-157-230.clienti.tiscali.it] has
joined #go-nuts
10:26 < wrtp> i dunno.  i think it would read pretty well actually.
10:27 < wrtp> just like a unix pipeline, ls | wc | tee `{cat}
10:28 < wrtp> i wonder how many multi-argument formatters there are
currently
10:28 -!- virtualsue [~chatzilla@nat/cisco/x-acdgzoshbntuptjy] has quit [Quit:
ChatZilla 0.9.86.1 [Firefox 4.0.1/20110413222027]]
10:29 -!- Project-2501 [~Marvin@82.84.88.136] has quit [Ping timeout: 248 seconds]
10:29 -!- moraes [~moraes@189.103.176.38] has quit [Ping timeout: 248 seconds]
10:35 < niemeyer> wrtp: Yeah, maybe it'd be a good approach
10:37 < niemeyer> wrtp: ! might be a better char for that
10:37 < niemeyer> wrtp: {<|foo} feels like relating to what's on the left
hand side
10:37 < wrtp> yeah, i had that thought too
10:37 -!- a2800276 [~a2800276@88.128.80.195] has joined #go-nuts
10:38 < wrtp> although it is kinda mnemonic
10:38 < wrtp> not sure about !
10:38 < niemeyer> wrtp: As a special case, we could interpret {!import} as
{!|import}
10:39 < wrtp> i don't think there's a need for the special case
10:39 < niemeyer> {!import}template{.end}
10:39 < niemeyer> wrtp: It just looks/feels nicer
10:39 < wrtp> i think ! is too visually similar to |
10:39 < niemeyer> wrtp: {!escape}foo{.end}
10:39 < wrtp> % ?
10:40 < wrtp> that has some precedent
10:40 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
10:40 < wrtp> (e.g.  name of current filename in vi)
10:40 < niemeyer> wrtp: $?
10:40 < niemeyer> Nah..  nevermind
10:40 < niemeyer> That would be extremely confusing
10:40 < wrtp> $ is more often used as a modifier, yeah
10:40 < niemeyer> % looks reasonable
10:41 < wrtp> i think i prefer {% | escape} as the model remains clear
10:42 < wrtp> and {%|import}templatefile{.end} isn't too arduous
10:42 < niemeyer> {.include template} looks pretty good in comparison ;-)
10:43 < wrtp> {|import "template"}
10:43 < wrtp> oh
10:43 < wrtp> hmm
10:44 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
10:44 < wrtp> this means that whether you need a {.end} or not depends on
whether there's a % in the args
10:44 < wrtp> i'm not sure i'm that happy about that
10:44 < niemeyer> Yep
10:45 < niemeyer> Can't be like that
10:45 -!- moraes [~moraes@189.103.176.38] has joined #go-nuts
10:45 < wrtp> .pipe would be better
10:45 < wrtp> {.pipe | import}
10:45 < wrtp> {.end}
10:46 < niemeyer> Much better
10:46 < niemeyer> Very aligned with the existing syntax, readable
10:46 < niemeyer> .end with .something also felt weird
10:46 < niemeyer> Erm
10:46 < niemeyer> .end without .something also felt weird
10:46 < wrtp> i think this is orthogonal to the string literal thing
10:47 < niemeyer> wrtp: Yeah, think so too
10:47 < wrtp> (which is the more important issue i think - this is just a
"hey, we could do this!" thing)
10:47 < niemeyer> printf still requires it
10:49 < wrtp> yeah
10:49 < wrtp> i think it works ok
10:52 < niemeyer> So three CLs..  string literals, .pipe, and multi-argument
formatters
10:52 < niemeyer> I'll push this forward
10:52 < wrtp> niemeyer: i think string literals go with multi-argument
formatters
10:53 < niemeyer> wrtp: They can be approved/rejected individually, so I'd
rather have them split out in separate CLs
10:53 < wrtp> i think you'll have to rework the tokeniser to do them, and it
would be easier to both at the same time
10:53 < wrtp> ok
10:53 < niemeyer> wrtp: Yeah, I had a quick look at it and looks pretty
simple actually.  I'll see if I find some time later today to push the first one
10:53 < wrtp> maybe we could post a little proposal on golang-dev?
10:54 < niemeyer> wrtp: I'd rather just push a branch..  we already
bikeshedded enough about it over go-nuts
10:54 < wrtp> ok
10:55 < wrtp> sgtm
10:55 < niemeyer> wrtp: Awesome, thanks for helping to evolve those ideas..
looks much better now
10:56 < niemeyer> Heading to lunch..  back online later
10:57 < wrtp> np.  i hope the others like it!
10:57 * mpl is eagerly waiting for those improvements
10:58 < mpl> they will probably help me with my website.
10:59 -!- gaxxx [~woo@219.143.166.16] has quit [Ping timeout: 276 seconds]
11:00 -!- alehorst [~alehorst@189.114.182.82.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:02 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-nmtvqfdzguamsmpp]
has quit [Ping timeout: 240 seconds]
11:07 -!- Kafo [~Kafo@a91-152-189-15.elisa-laajakaista.fi] has quit [Remote host
closed the connection]
11:15 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
11:15 -!- brtk [~brtk@c83-248-35-158.bredband.comhem.se] has quit [Ping timeout:
240 seconds]
11:18 -!- madari [madari@idm.irc-galleria.net] has quit [Read error: Operation
timed out]
11:18 -!- madari [madari@idm.irc-galleria.net] has joined #go-nuts
11:26 -!- brtk [~brtk@c83-248-35-158.bredband.comhem.se] has joined #go-nuts
11:35 -!- brtk [~brtk@c83-248-35-158.bredband.comhem.se] has quit [Ping timeout:
260 seconds]
11:41 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has joined #go-nuts
11:45 -!- monsieur_max [~monsieur_@212.234.251.58] has quit [Ping timeout: 246
seconds]
11:48 < vegai> anyone know if those Go mascot plush toys can be bought...
so cuddly
11:50 < mpl> vegai: they're probably like the t-shirts, very limited
edition.
11:59 -!- sacho [~sacho@87-126-43-168.btc-net.bg] has quit [Ping timeout: 246
seconds]
12:00 -!- mikespook [~mikespook@219.137.48.64] has quit [Quit: Leaving.]
12:12 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has quit [Read
error: Operation timed out]
12:15 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Read error:
Operation timed out]
12:16 -!- monsieur_max [~monsieur_@212.234.251.58] has joined #go-nuts
12:19 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
12:19 -!- brtk [~brtk@dhcp-074156.eduroam.chalmers.se] has joined #go-nuts
12:21 * wrtp finds the new reflect interface much more convenient to use
12:24 -!- xyproto [~alexander@77.40.159.131] has quit [Read error: No route to
host]
12:24 -!- tncardoso [~thiago@150.164.2.20] has joined #go-nuts
12:25 < jnwhiteh> wrtp: looks much nicer!
12:27 < wrtp> far fewer type conversions needed
12:32 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
12:36 -!- eiro [~marc@phear.org] has quit [Remote host closed the connection]
12:38 < skelterjohn> morning
12:38 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Quit: leaving]
12:43 < hallas> good afternoon
12:44 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has joined
#go-nuts
12:45 -!- GeertJohan [~Squarc@clal-0-227.eduroam.inholland.nl] has joined #go-nuts
12:47 < jeremy_c> Who is the maintainer of godashboard.appspot.com/project?
I submitted go-iup but it came back with a python stack trace stating Permission
Denied...  I figured I'd try it again and then report the error.  Trying again I
got a project already exists message.
12:47 -!- GeertJohan [~Squarc@clal-0-227.eduroam.inholland.nl] has quit [Client
Quit]
12:47 < skelterjohn> adg is
12:48 < skelterjohn> the confirmation screen bugs sometimes, but he still
gets the message
12:48 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts
12:48 < jeremy_c> skelterjohn: ok, that was my main concern.
12:48 < skelterjohn> he's in australia (read, probably asleep)
12:48 < skelterjohn> but i bet it will appear sooner or later
12:49 < skelterjohn> so go-iup is working?
12:49 < jeremy_c> skelterjohn: yup.
12:49 < skelterjohn> what's it do, again?
12:49 < jeremy_c> There are a few non-essential functions not yet wrapped,
but for 95% of apps it's fully functional.
12:49 < skelterjohn> and will it work on my mac?
12:50 < jeremy_c> It is a cross platform GUI toolkit that uses native
controls, i.e.  on Windows it uses windows controls, on Linux it uses Gtk or Motif
(if you want).
12:50 < skelterjohn> and on mac it uses...nothin
12:50 < skelterjohn> g
12:50 < skelterjohn> booty.
12:50 < jeremy_c> skelterjohn: not really, not yet.  Iup has unofficial
support for OS/X but it is not well tested and not at all official.
12:51 < jeremy_c> Some have had problems building it, others report it works
fine.  The OS/X portion hasn't had a commit in a few months now...  The official
guys (guys who make Lua) don't seem to interested in picking up OS/X support
themselves.
12:56 -!- xyproto [~alexander@77.40.159.131] has joined #go-nuts
12:56 < jeremy_c> skelterjohn: hm, seems like a year, not a couple of months
:-/ https://github.com/phasis68/iup_mac ...  can you tell if it uses Coca or
Carbon?
12:56 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
12:57 < skelterjohn> if there are only .c files and no .m files, it's carbon
12:58 < jeremy_c> yup, seems to be .c files but I see things like #import
<Cocoa/Cocoa.h>
12:58 < jeremy_c>
https://github.com/phasis68/iup_mac/blob/master/src/mac/iupmac_messagedlg.c ...
huh, that's Obj-C.  [alert setInformativeText: [NSString....]]
13:03 < skelterjohn> #import is an objc thing
13:03 < skelterjohn> bizarre
13:03 < jeremy_c> Anyway, to answer your question, go-iup doesn't support
OS/X right now but when it becomes part of the core Iup, it'll support it
automatically.  I'd love to have OS/X support for my Iup apps, but know nothing of
Carbon/Cocoa development so that's something for those experienced in those areas.
13:09 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit:
Leaving.]
13:10 < wrtp> does anyone else find the fact that this panics slightly odd?
(os.Error(nil)).(os.Error)
13:11 < skelterjohn> not really...
13:11 < skelterjohn> you're asking if the os.Error interface contains an
os.Error
13:11 < skelterjohn> it doesn't
13:11 < skelterjohn> i mean, it seems a bit odd to put an interface in an
interface
13:11 < skelterjohn> i can't think of how to do that w/out reflect...
13:12 < wrtp> i'm asking if a variable of type os.Error satisfies
os.Error...
13:12 < skelterjohn> i don't think that's what you're doing!
13:13 < skelterjohn> nil doesn't satisfy os.Error
13:13 < wrtp> it kinda does, because i can assign nil to an os.Error
value...
13:14 < skelterjohn> if you do that and then type assert, what happens?
13:14 < wrtp> it fails - that's what i'm doing above
13:14 < skelterjohn> i meant with =
13:15 < skelterjohn> same thing happens, though
13:15 < skelterjohn> just wanted to check that everything was consistent
13:15 < wrtp> i came across this in reflect - it seems reasonable to do
v.Call(...)[0].Interface().(T) where T is the known return type of the function in
v.
13:15 < wrtp> but this fails when the function returns nil.
13:15 < wrtp> i think that's awkward
13:16 < skelterjohn> does it usually make sense to type assert to an
interface?  i don't think i've done that
13:16 < wrtp> yeah, it totally does
13:16 < wrtp> it's very useful too
13:16 < wrtp> it will work if the underlying type implements that interface
13:17 < wrtp> you can use interface types in type switches too
13:17 < skelterjohn> then i don't think your code should panic
13:18 < skelterjohn> since os.Error is clearly assignable to nil :)
13:18 < skelterjohn> or is it the other way around...
13:19 < wrtp> the other way around
13:20 < wrtp> but it would affect type switches.  currently if you do a type
switch and an interface case is selected, you know that the value is non-nil
13:21 < skelterjohn> a nil case would be useful
13:21 < skelterjohn> but for regular asserts, lots of nil pointer panics
would start happening
13:22 < skelterjohn> the spec says that a type assert "asserts that x is not
nil and that the value stored in x is of type T."
13:22 < skelterjohn> so it's not a mistake
13:22 < wrtp> sure
13:22 < wrtp> there's a nil case already
13:23 < wrtp> you'd just have to use it more often
13:23 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-157-230.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
13:30 * wrtp is always suspicious when code works first time
13:36 -!- shvntr [~shvntr@113.84.148.155] has quit [Read error: Connection reset
by peer]
13:39 -!- iant [~iant@67.218.109.241] has joined #go-nuts
13:39 -!- mode/#go-nuts [+v iant] by ChanServ
13:40 -!- brtk [~brtk@dhcp-074156.eduroam.chalmers.se] has quit [Ping timeout: 246
seconds]
13:46 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
13:46 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Remote host closed the
connection]
13:47 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
13:50 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Client Quit]
13:53 < str1ngs> yay go-git milestone https://gist.github.com/970558
13:55 < jeremy_c> str1ngs: cool!
13:56 < str1ngs> jeremy_c: that code helped thanks.  got me over the commit
hump
13:56 < jeremy_c> str1ngs: thanks wrtp not me.  I just did what he said :-)
13:57 < str1ngs> luckly I had less work I just need to make a pointer and
not arrays
13:58 < wrtp> str1ngs: nice
14:02 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
14:03 -!- brtk [~brtk@dhcp-078100.eduroam.chalmers.se] has joined #go-nuts
14:06 -!- zerosanity [~josh@8.20.178.82] has joined #go-nuts
14:06 -!- root___ [~root@122.11.55.144] has joined #go-nuts
14:07 < root___> q
14:07 < root___> exit
14:07 < root___> ;
14:07 < root___> aaaaaaaaa
14:08 < root___> exit;
14:08 < jeremy_c> root___: /quit
14:08 < root___> thanks
14:08 -!- root___ [~root@122.11.55.144] has quit [Client Quit]
14:08 < jeremy_c> :-/
14:13 < delinka> Does LinkedListNode implement ListNode?  I ask because
Next() returns *LinkedListNode (which I think should be a ListNode...)
http://pastie.org/1896919
14:14 < hallas> It does
14:14 < hallas> I mean
14:14 < hallas> you're correct
14:14 < str1ngs> delinka: you want a double link list?
14:14 < delinka> not here.  in another file perhaps.  ;-)
14:14 < skelterjohn> no - it'd have to return ListNode
14:15 < skelterjohn> duck typing doesn't happen in signatures
14:16 < str1ngs> delinka: http://golang.org/pkg/container/ some containers
14:16 < str1ngs> just a FYI you might know this already
14:16 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-spkjulowboiwiwkj]
has joined #go-nuts
14:17 < delinka> I'm more concerned with learning the nuances of the syntax
at the moment, but thanks, str1ngs
14:17 < str1ngs> no problem, sorry to change the subject
14:18 < delinka> skelterjohn: ok, thanks
14:18 < skelterjohn> it would be nice if that kind of thing worked, though,
i agree
14:18 < skelterjohn> but the function returns something of a potentially
different size (and definitely a different type) than the thing you want
14:23 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Quit: Lost
terminal]
14:25 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
14:37 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
14:37 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 264 seconds]
14:43 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
14:45 -!- foocraft_ [~ewanas@78.101.80.210] has joined #go-nuts
14:48 < jeremy_c> How do I initialize a struct with Items []interface{}?
type Testing struct { Name string\n Items []interface{} }..  Say I want a
resulting structure { Name: "John Doe", Items: { "Jim", 18, "Jane" } }
14:49 < skelterjohn> items : []interface{}{ i1, i2, i3 }
14:50 < jeremy_c> Oh...  I forgot the {}, I had []interface{i1, i2, i3} ...
duh!
14:51 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
14:54 -!- brtk [~brtk@dhcp-078100.eduroam.chalmers.se] has quit [Ping timeout: 240
seconds]
14:55 -!- iant [~iant@67.218.109.241] has quit [Quit: Leaving.]
14:58 < steven> guys
14:59 < steven> does Go require mercurial, or is it just downloading it from
https://go.googlecode.com/hg/ that only requires mercurial?
14:59 < wrtp> jeremy_c: i've done that too many times
14:59 < skelterjohn> keeping in sync with the hg repository requires hg
14:59 < skelterjohn> and goinstall for hg projects
14:59 < skelterjohn> that's all that comes to mind
15:00 < steven> ok so ./all.bash doesnt?
15:00 < steven> sweet.
15:00 < skelterjohn> no, it doesn't
15:01 < steven> thanks
15:02 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-spkjulowboiwiwkj]
has quit [Ping timeout: 240 seconds]
15:09 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 240 seconds]
15:12 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
15:13 -!- brtk [~brtk@dhcp-074030.eduroam.chalmers.se] has joined #go-nuts
15:15 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts
15:19 -!- brtk [~brtk@dhcp-074030.eduroam.chalmers.se] has quit [Ping timeout: 260
seconds]
15:23 -!- Venom_X_ [~pjacobs@66.54.185.131] has joined #go-nuts
15:25 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 260 seconds]
15:33 -!- tux21b [~tux21b@pyhost.srv.tux21b.org] has quit [Ping timeout: 276
seconds]
15:34 -!- iant [~iant@nat/google/x-aehgjsgxqvqofgch] has joined #go-nuts
15:34 -!- mode/#go-nuts [+v iant] by ChanServ
15:39 -!- a2800276 [~a2800276@88.128.80.195] has quit [Ping timeout: 276 seconds]
15:42 -!- foocraft_ [~ewanas@78.101.80.210] has quit [Quit: if you're going....to
san.  fran.  cisco!!!]
15:44 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 240 seconds]
15:48 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
15:52 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has left #go-nuts []
15:55 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
16:04 -!- monsieur_max [~monsieur_@212.234.251.58] has quit [Quit: Leaving.]
16:07 -!- exch [~exch@c74149.upc-c.chello.nl] has quit [Quit: Lost terminal]
16:09 -!- exch [~exch@c74149.upc-c.chello.nl] has joined #go-nuts
16:13 -!- tobym [~tobym@75-139-118-127.dhcp.mant.nc.charter.com] has joined
#go-nuts
16:15 -!- keithgcascio [~keithcasc@nat/google/x-bvkwdbykupllpdkn] has joined
#go-nuts
16:20 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:22 -!- tvw [~tv@e176004054.adsl.alicedsl.de] has joined #go-nuts
16:23 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
16:23 -!- aimxhaisse [~mxs@buffout.org] has quit [Ping timeout: 276 seconds]
16:31 -!- alehorst [~alehorst@189.114.182.82.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 246 seconds]
16:32 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #go-nuts
16:38 < steven> is cygwin the only way to get Go running on windows?
16:38 < uriel> steven: no
16:38 < steven> how else?
16:38 < skelterjohn> some people use gb to compile go code without cygwin or
make
16:38 < steven> and are there instructions for other ways?
16:39 < uriel> steven: http://code.google.com/p/go/wiki/WindowsPort
16:41 < str1ngs> steven: there is also mingw
16:41 < steven> but either way, its still a unix-like environment?
16:42 < jeremy_c> skelterjohn: I use msys, is that required with gb?
16:42 < str1ngs> I'm not sure go even builds in cygwin
16:42 < skelterjohn> i don't know what msys is
16:42 < skelterjohn> or what it means for gb to require it
16:42 < str1ngs> msys is native windows
16:42 < str1ngs> iirc
16:42 < pharris> msys is a fork of an older version of cygwin.
16:42 < str1ngs> ah sorry I was wrong :P
16:42 < steven> im just basing my question on this:
16:43 < steven> http://golang.org/doc/install.html ->
http://code.google.com/p/go/wiki/WindowsPort ->
http://code.google.com/p/gomingw/downloads/list
16:43 < skelterjohn> gb and windows is not specifically a sure thing - i
don't have a windows machine to test, but i do try to fix things when it goes
wrong on windows
16:43 < skelterjohn> when people file issues, etc
16:43 < pharris> I use gb on windows to avoid having to install msys or
cygwin.
16:43 < skelterjohn> talk to pharris :)
16:43 < steven> which i guess is just using mingw
16:43 < skelterjohn> he knows what's going on, i do not.
16:43 < pharris> (I do have msys and cygwin on some boxes, but I find them
awkward at best)
16:44 < jeremy_c> pharris: so mingw is just in your normal %PATH% then and
gb just works?
16:44 < pharris> Once you install
http://code.google.com/p/gomingw/downloads/list all you need is gb.
16:44 < pharris> There is no mingw in my PATH.
16:44 < steven> guys
16:44 < steven> im not installing it myself
16:44 < steven> i told a bunch of windows users to install Go
16:44 < jeremy_c> oh.  I use msys quite a bit for cgo.
16:44 < steven> and im trying to guess the most likely way they have it
installed and running
16:44 < pharris> I had to compile gb by hand (I had to pretend I was make),
but everything else is automagically figured out for me by gb.
16:45 < jeremy_c> er, mingw I mean.
16:45 < skelterjohn> pharris: the install.js didn't work?
16:45 < pharris> Something like "8g *.go; 8l 8.out" IIRC.
16:45 < pharris> install.js?  There's an install.js now?  Is that recent, or
did I just miss it?
16:45 < skelterjohn> few months old
16:45 < steven> so how do you think "normals" will install Go on windows?
16:46 -!- alehorst [~alehorst@201.47.27.203.dynamic.adsl.gvt.net.br] has joined
#go-nuts
16:46 < skelterjohn> steven: do you mean non-devs?
16:46 < steven> no, devs
16:46 < pharris> "normals" won't.  Normals will just run the .exe you give
them.  (Unless you mean normal programmers?  is there such a thing?)
16:46 < steven> but ones who arent gonna be able to take your advice
16:46 < steven> ie, they wont know anythign about gb or whatever
16:46 < steven> ok lemme rephrase
16:47 < skelterjohn> i have no idea, since i don't know how *I* would
install go on windows
16:47 < steven> if i tell a dev to install Go on windows, is it safe to
assume they will probably end up with mingw?
16:47 < skelterjohn> how could anyone answer that question?
16:47 < steven> i dont know man
16:47 < steven> i dont have windows
16:47 < skelterjohn> i guess the only reasonable answer is "no"
16:47 < skelterjohn> it's not "safe"
16:47 < skelterjohn> to assume that
16:48 < steven> so i dont know how mingw works or if its sufficient to run
go
16:48 < steven> (programs)
16:48 < jeremy_c> mingw is not required to compile go code.  It is required
to compile C code or any cgo.
16:48 < pharris> They'll probably end up with
http://code.google.com/p/gomingw/downloads/list , which is just 8g and the rest.
16:48 < jeremy_c> mingw is gcc for windows.
16:48 < steven> nevermind.  just nevermind.
16:48 -!- brtk [~brtk@dhcp-074030.eduroam.chalmers.se] has joined #go-nuts
16:48 < steven> oh ok.
16:48 < jeremy_c> msys is a unix like environment (bash shell and basic
utilities) for windows.
16:48 < steven> does mingw include make?
16:49 -!- sjbrown [~sjbrown@adsl-99-189-162-6.dsl.pltn13.sbcglobal.net] has joined
#go-nuts
16:49 < jeremy_c> I think it's optional.  I've just been copying my existing
mingw/msys install for too long, sorry.
16:49 < skelterjohn> i know it's optional for cygwin
16:49 < steven> so, if i tell them to install Go on windows and they end up
at that link, can i assume they're running it in a unix-like environment that
pretty much works like mine does?
16:49 < skelterjohn> more unanswerable questions :)
16:51 < steven> k
16:51 < steven> i guess i just have to buy windows and install it all myself
16:51 < steven> so i can know what to expect
16:51 < steven> sigh.
16:52 < skelterjohn> are you leading a group of devs?
16:52 < skelterjohn> most of whom use windows?
16:52 -!- sjbrown [~sjbrown@adsl-99-189-162-6.dsl.pltn13.sbcglobal.net] has left
#go-nuts []
16:53 -!- tvw [~tv@e176004054.adsl.alicedsl.de] has quit [Remote host closed the
connection]
16:54 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
17:00 -!- tncardoso [~thiago@150.164.2.20] has quit [Quit: bye]
17:02 -!- moraes [~moraes@189.103.176.38] has quit [Ping timeout: 260 seconds]
17:03 -!- monsieur_max [~maxime@ip-78.net-89-2-171.rev.numericable.fr] has joined
#go-nuts
17:06 -!- moraes [~moraes@189.103.176.38] has joined #go-nuts
17:10 < str1ngs> steven: do you just need to build go binaries for windows?
17:23 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Ping
timeout: 260 seconds]
17:24 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
17:33 -!- monsieur_max [~maxime@ip-78.net-89-2-171.rev.numericable.fr] has quit
[Quit: Leaving.]
17:49 -!- KingPhilroy [~kingphilr@shc-nat-newhall.stonehill.edu] has joined
#go-nuts
17:50 -!- achoo [~achoo@host-134-71-203-186.allocated.csupomona.edu] has joined
#go-nuts
17:52 < nteon> has anyone compiled binaries that use go-gtk for windows?  I
was going to play around with that this weekend I think
18:04 -!- melter [~Melter@2001:4930:116:0:21c:c0ff:feef:eaf5] has quit [Ping
timeout: 248 seconds]
18:05 -!- melter [~Melter@2001:4930:116:0:21c:c0ff:feef:eaf5] has joined #go-nuts
18:07 -!- rcrowley [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
18:08 -!- iant [~iant@nat/google/x-aehgjsgxqvqofgch] has quit [Ping timeout: 264
seconds]
18:13 < uriel> nteon: I'm not sure, you might want to try walk instead
18:13 < uriel> (to write native windows apps)
18:14 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-155-34.clienti.tiscali.it] has
joined #go-nuts
18:23 -!- iant [~iant@nat/google/x-yaagonzwgtmuznds] has joined #go-nuts
18:23 -!- mode/#go-nuts [+v iant] by ChanServ
18:31 -!- rcrowley_ [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
18:31 -!- rcrowley [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
quit [Read error: Connection reset by peer]
18:31 -!- melter [~Melter@2001:4930:116:0:21c:c0ff:feef:eaf5] has quit [Ping
timeout: 248 seconds]
18:32 -!- achoo [~achoo@host-134-71-203-186.allocated.csupomona.edu] has quit
[Quit: achoo]
18:40 < str1ngs> hmm how do I get terminal width in go?
18:40 < aiju> curses?
18:40 < aiju> horrible measures have to be taken to figure out this stuff on
*nix ...
18:41 < dlowe> the COLUMNS environment variable
18:41 < dlowe> yes.  horrible measures.
18:41 < aiju> dlowe: and that's guaranteed to be right because ...?
18:41 -!- melter [~Melter@2001:4930:116:0:21c:c0ff:feef:eaf5] has joined #go-nuts
18:41 < str1ngs> columns is good I think
18:42 < dlowe> aiju: there's no guaranteed way.  You could have a tty that
doesn't even know how to relay that information.
18:43 < str1ngs> hmm COLUMNS is not export so I doubt I can see that I think
18:43 < dlowe> there is, however, a good enough way
18:43 < str1ngs> I can probably fork a call to tputs
18:44 < str1ngs> let me try COLUMNS first
18:46 < str1ngs> ya COLUMNS is not exported so I cant see that
18:49 < nteon> uriel: hmm.  I guess since all i want my application to be is
an embedded web frame and a few buttons it might make sense to just make a GTK app
for lin and a wlak one for win
18:57 -!- aimxhaisse [~mxs@buffout.org] has joined #go-nuts
18:57 < nteon> are there any go bindings for cocoa on the mac?
18:59 < ebering> nteon: not that I am aware of
18:59 < skelterjohn> wrtp and i are working (in parallel) on something
pretty basic
18:59 < skelterjohn> just something that satisfies exp/draw
19:00 < skelterjohn> but not for the whole widget library, etc
19:00 -!- ekipan [4b1379b2@gateway/web/freenode/ip.75.19.121.178] has joined
#go-nuts
19:01 < ekipan> Is there anyone present with authority to edit the Go spec?
I noticed an (extremely minor and nitpicky) error in the spec itself.
19:01 < ekipan> To wit:
19:01 < skelterjohn> file an issue
19:02 < skelterjohn> no one can just *edit* it
19:02 < skelterjohn> everything goes through an approval process
19:02 < ekipan> The EmptyStmt production has an empty body, which isn't
permitted in the Production metaproduction in the Notation section.
19:03 < ekipan> Which could be fixed by changing Production to read:
19:03 < ekipan> Production = production_name "=" [ Expression ] "." .
19:03 -!- achoo [~achoo@host-134-71-204-143.allocated.csupomona.edu] has joined
#go-nuts
19:03 < ekipan> I'll file it
19:05 -!- achoo [~achoo@host-134-71-204-143.allocated.csupomona.edu] has quit
[Client Quit]
19:06 -!- brtk [~brtk@dhcp-074030.eduroam.chalmers.se] has quit [Ping timeout: 240
seconds]
19:07 -!- Project-2501 [~Marvin@82.84.71.157] has joined #go-nuts
19:10 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-155-34.clienti.tiscali.it] has
quit [Ping timeout: 246 seconds]
19:11 < ebering> I've read the golang-nuts discussions on operator
overloading and how allowing it in general is anti go.  However, I really really
really wish there were a way to extend the numeric types at least in the case
where + really means + and * really means * (i.e.  something satisfying the ring
axioms (well maybe not associativity thanks to floating point))
19:11 < ebering> will this ever be possible in go or should I just suck it
up and use .Add
19:11 < aiju> ebering: unlikely
19:12 < aiju> ebering: operator overloading is nice for three cases and is
abused in all the others
19:12 < aiju> go read some C++ code ;P
19:12 < ebering> aiju: I've seen.  I've suffered at its hands
19:13 < ebering> but I am much more often in the case where it is nice:
using a numeric type that isn't in the language's type system
19:13 < aiju> but yeah, would make bigint and vectors nicer
19:13 * aiju would be in favour of just adding vector math to the language
19:14 < aiju> ebering: the Plan 9 C compiler (also used for the Go runtime
parts written in C) does have operator overloading
19:14 < aiju> undocumented and not widely used though
19:15 < ebering> aiju: but then I'm writing in C again
19:15 < aiju> well, i just meant to say that Ken has implemented in a
language
19:15 < aiju> not really suggesting it for actual use
19:16 < ebering> ah
19:16 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:b43f:ec11:f591:236b] has joined
#go-nuts
19:16 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-164-16.clienti.tiscali.it] has
joined #go-nuts
19:17 < ebering> also, while vector math would help, it wouldn't get
everything.  People working with finite fields or exactly numbers of the form
a+b*sqrt(2) for a,b integers would still be out in the cold
19:17 < aiju> ebering: yeah sure
19:17 < aiju> or just bigint
19:17 < aiju> i'm well aware of that
19:18 < aiju> vector math is the one usable fortran feature other languages
miss
19:19 < vegai> factor has it...  sort of
19:19 -!- Project-2501 [~Marvin@82.84.71.157] has quit [Ping timeout: 263 seconds]
19:20 < vegai> "sort of" since almost everything in factor is in a library
19:20 -!- jamesmiller5 [b811694a@gateway/web/freenode/ip.184.17.105.74] has joined
#go-nuts
19:21 < aiju> not having operators makes operator overloading easy
19:21 -!- zerosanity [~josh@8.20.178.82] has quit [Remote host closed the
connection]
19:22 -!- Venom_X_ [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
19:24 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 250 seconds]
19:28 -!- jamesmiller5 [b811694a@gateway/web/freenode/ip.184.17.105.74] has quit
[Quit: Page closed]
19:28 -!- jamesmiller5_ [~jamesmill@184.17.105.74] has joined #go-nuts
19:36 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
19:38 -!- Kissaki [~Kissaki@tango076.server4you.de] has joined #go-nuts
19:39 < Kissaki> I'm nuts for Go!
19:39 < ekipan> I could go for some nuts.
19:39 < Kissaki> Don't touch my nuts!
19:39 < dlowe> I'm glad we're all professionals here.
19:40 < nictuku> 202 people in the channel, is that a record?
19:40 < skelterjohn> no
19:40 < skelterjohn> was mid 200s for a while
19:40 < nictuku> nah, 212
http://irc.netsplit.de/channels/details.php?room=%23go-nuts&net=freenode
19:41 < Kissaki> that's almost mid-200s
19:41 < skelterjohn> i remember specifically commenting on the fact that it
was 256 once
19:41 < nictuku> that's only 2 weeks also
19:41 < skelterjohn> that was maybe a year ago
19:41 < Kissaki> ^^
19:42 < str1ngs> record is 212/
19:42 < str1ngs> ?
19:42 < Kissaki> are there job openings for go-dev yet?
19:42 < nictuku> 212 was the max only for the past two weeks
19:42 < str1ngs> ah ok
19:43 < str1ngs> we need less people imo.  less mouths to feed :P
19:43 < skelterjohn> i'm struggling to connect that metaphor to the success
of go
19:43 < jeremy_c> spend helping newbies with things that they (I) should
read for themselves in the manual :-)
19:44 < jeremy_c> time
19:46 < str1ngs> skelterjohn: attraction rather then promotion
19:49 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
19:54 -!- Project-2501 [~Marvin@82.84.68.164] has joined #go-nuts
19:57 -!- roo [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout: 624
seconds]
19:57 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-164-16.clienti.tiscali.it] has
quit [Ping timeout: 250 seconds]
20:10 -!- m4dh4tt3r1 [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
20:10 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
20:11 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
20:11 -!- m4dh4tt3r1 [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
20:13 -!- m4dh4tt3r1 [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
20:14 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
20:14 -!- m4dh4tt3r1 [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
20:14 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
20:15 -!- foocraft [~ewanas@78.100.213.28] has joined #go-nuts
20:17 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
20:17 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
20:19 -!- ekipan [4b1379b2@gateway/web/freenode/ip.75.19.121.178] has left
#go-nuts []
20:21 < ebering> if I am using container/ring and I would like to guarantee
that it is a Ring of some type T is there a better way than r.Do(func (x
interface{}){ x.(T) }) ?
20:21 -ww:#go-nuts- es ist immer sechs urh
20:21 < ebering> erm.  a Ring where every Value field is of some type T
20:21 -ww:#go-nuts- es ist immer sechs uhr
20:26 < skelterjohn> you can wrap it
20:26 < skelterjohn> make a class that composites Ring, but add types to the
methods
20:26 < ww> embed it in your own type, and use a setter/getter that enforces
type?
20:27 < ww> i'm not sure i like this Value interface{} part of ring
20:27 < skelterjohn> ?
20:28 < ww> maybe it mixes up ring behaviour with third party data
20:28 < ww> maybe if you were to have ring without Value, and use it by
embedding...
20:28 < ww> maybe not
20:29 * ww shrugs.  sechs uhr.  time for ginnan tonix
20:32 < ebering> ww: I think so, since the embed a ring and make a new value
field is the way I'm going to do it?
20:37 < ww> is tabwriter new?
20:37 < skelterjohn> nope
20:38 -!- pamera [~Pam@c-76-102-255-99.hsd1.ca.comcast.net] has left #go-nuts []
20:40 < str1ngs> ww: nope but its awesome!
20:42 * ww new discovery
20:44 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
20:48 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has joined #go-nuts
20:48 -!- rcrowley_ [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
quit [Ping timeout: 246 seconds]
20:49 -!- rcrowley [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
20:53 < ww> is there a canned package that glues log to syslog or do you
have to wire it up yourself?
20:53 < taruti> Does anyone know what is the license of
https://github.com/blynn/nex ?
20:55 -!- alehorst [~alehorst@201.47.27.203.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
21:01 -!- rcrowley_ [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
21:01 -!- rcrowley [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
quit [Read error: Connection reset by peer]
21:08 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has quit [Quit:
Leaving]
21:09 < ebering> ww: as currently written ring.Do does not play nice with
embedding
21:13 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
21:16 -!- rcrowley [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
21:17 < ww> Value = self?
21:17 < ww> kludge
21:18 -!- rcrowley_ [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
quit [Read error: Connection reset by peer]
21:18 < ebering> also ugh.  == is not like plt scheme's (equal)
21:19 < justinlilly> what is == ?
21:19 < justinlilly> oh, are you talking about the lisp = vs eq vs equal?
21:19 < ebering> yes
21:20 < ebering> I am working with 2d shapes over a weird number system.
Writing .Equal all the way down is an annoyance
21:21 -!- wrtp [~rog@92.17.93.207] has quit [Quit: wrtp]
21:21 < justinlilly> what do you mean all the way down?
21:21 < justinlilly> code snippet?
21:21 < str1ngs> ww: http://golang.org/pkg/syslog/
21:22 < str1ngs> ww: I guess log to that writer
21:22 < ww> str1ngs: s/that writer/those writers/
21:23 < ww> yes, a pretty straightforward bit of wiring...  but one so
common that i wondered if it mightn't already be done in some default way
21:23 < ebering> justinlilly: http://pastebin.ca/2058580
21:23 < str1ngs> ww: I only see one writer in syslog
21:23 < ww> writers for each log level...
21:24 < ww> you call Dial, it gives you a new writer
21:24 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
21:24 < str1ngs> ok but you get the idea no?
21:24 < justinlilly> ebering: ahh.  meaning you don't want ot have to write
a .Equal method for each of the structs.  Gotcha.
21:24 < ww> you'd typically Dial(INFO), Dial(DEBUG), Dial(WARN), Dial(ERR)
21:25 < ww> str1ngs: yes i know how it works, just that its a bunch of silly
housekeeping that i would have thought would be defaulted
21:26 < ww> i mean i can use syslog from C or Python without a dozen lines
of initialistaion
21:26 < skelterjohn> ebering: you can make ring.Do work - you just have to
create an intermediate function
21:26 < str1ngs> syslog.Info("hello")
21:27 < ww> str1ngs: yes, but then i lose the wiring to the standard logger.
which is important because when you are writing daemons you almost always want a
do-not-fork-log-to-console-mode
21:27 < str1ngs> ww: see New
21:28 < str1ngs> which returns a Writer
21:28 < ww> yes, which i have to wire up to a bunch of log.Loggers which is
what i'm griping about
21:28 < str1ngs> you may have to create a logger for each Priority though
21:28 * ww gripes
21:29 < str1ngs> might be a better way I agree
21:29 -!- wjlroe [~will@212.13.195.250] has joined #go-nuts
21:30 < wjlroe> How can you compile a case-insensitive regexp in Go?
21:31 < str1ngs> ww: http://golang.org/pkg/syslog/#NewLogger
21:31 < str1ngs> ww: :)
21:32 * ww is blind argh
21:33 < str1ngs> ww: All messages are logged with priority p.  worries me
though.  but I'll let you find out
21:33 < ebering> justinlilly: yes, esp.  since things will be built on top
of them that may need deep equality as well
21:34 < ww> yes, you still need one for each but that's fine
21:34 < nictuku> ww, no you don't
21:34 < ww> i'd go further and make Debug.Print(), Info.Print() etc
21:34 < ww> but...
21:35 < nictuku> I wrote the syslog package.
21:35 < nictuku> the new logger would have that priority as default
21:35 < ebering> oh hey.  reflect.DeepEqual exists
21:36 * ebering went to look at reflect because it would be the place to start
writing such a thing
21:36 < ww> nictuku: and you change it how?
21:36 < nictuku> ww, but then you can call a different method
21:36 < skelterjohn> the deep equal problem is NP-hard.
21:36 < ww> well, i htink main goes and puts Debug = default_logger or Debug
= syslog_debug_logger depending on command line flag
21:37 < ww> that way the rest of the program doesn't have to know what the
difference is
21:37 < ebering> skelterjohn: not for rings of points
21:38 < skelterjohn> no, not for a ring of points
21:38 < ww> ebering: you could (ab)use Complex for 2d
21:39 < skelterjohn> can't you == a struct {x, y float64}?
21:39 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Venom_X]
21:39 < ebering> skelterjohn: maybe in the implementation?  spec says ==
doesn't work on arrays and structs, period.
21:39 < skelterjohn> nope
21:40 < skelterjohn> right, it doesn't
21:40 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
21:40 < ebering> ww: I'm using numbers of the form a+b*sqrt(2) where a,b are
int64s, and I need a plane of them
21:41 < skelterjohn> i don't think it's really that necessary to bend syntax
around this problem
21:41 < skelterjohn> just write some .Equals() methods
21:41 < skelterjohn> takes less time than this conversation
21:41 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
21:42 < ebering> skelterjohn: I'm more just sad that syntax didn't work as I
had hoped coming from scheme land
21:43 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:b43f:ec11:f591:236b] has quit
[Quit: Leaving.]
21:45 * ww wonders if looking at some google i/o talks live counts as live
television for the purposes of the tv license...
21:47 -!- rcrowley_ [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
21:47 -!- rcrowley [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
quit [Read error: Connection reset by peer]
21:54 -!- l00t [~i-i3id3r_@189.105.66.232] has joined #go-nuts
21:59 -!- bthomson [~bthomson@pool-71-114-64-197.washdc.dsl-w.verizon.net] has
joined #go-nuts
22:00 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
22:01 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
22:01 < Tonnerre> Hm
22:02 < Tonnerre> Is there a nice library to do Go RPCs from C code?
22:02 < Tonnerre> Or the other way around?
22:02 < Tonnerre> (e.g.  a Go SUNRPC library)
22:03 < Tonnerre> Or will I have to resort to C bindings?
22:03 < str1ngs> Tonnerre: you want to call go code from C?
22:03 < ww> Protobuf?
22:03 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
22:03 < Tonnerre> str1ngs: over the network
22:04 < Tonnerre> Either I teach the C server to export a Go RPC API or I
call SUNRPC stuff from Go
22:04 < Tonnerre> Those are my choices
22:04 < ww> or the jsob rpc
22:04 < Tonnerre> JSON?  No way
22:05 < ww> protobuf then
22:05 < str1ngs> Tonnerre: what do you mean by go rpc?
22:05 < str1ngs> Tonnerre: there are more then one rpc implimentation in the
stdlib
22:06 < str1ngs> http://golang.org/pkg/rpc/ I assume?
22:08 < Tonnerre> str1ngs: not sure; that was not the jsonrpc thing, right?
22:08 < str1ngs> Tonnerre: no jsonrpc uses it though
22:09 < Tonnerre> str1ngs: it was $something over HTTP?
22:09 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
22:09 < str1ngs> it can be yes
22:09 < str1ngs> generally thats how it is used
22:12 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has quit
[Remote host closed the connection]
22:13 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
22:14 < ebering> 2
22:14 < Tonnerre> str1ngs: but is there a C interface for it?
22:16 < str1ngs> Tonnerre: not in the way you think.  why protobuf would be
better..  I assume there is a C api for it
22:17 < str1ngs>
http://code.google.com/apis/protocolbuffers/docs/overview.html
22:17 < str1ngs> meh why does it need to be C?
22:17 < str1ngs> just use go on both ends imo
22:18 < Tonnerre> That's not possible
22:18 < Tonnerre> I'm trying to interface with existing C code
22:18 < Tonnerre> Which cannot be ported either
22:18 < str1ngs> there is gccgo
22:19 < Tonnerre> Also, the C code is running on other servers
22:19 < str1ngs> where you can in theory call go code with.  but I have not
tried it
22:20 < Tonnerre> I just want to send RPCs to it somehow
22:21 -!- Project-2501 [~Marvin@82.84.68.164] has quit [Quit: E se abbasso questa
leva che succ...]
22:22 < str1ngs> it seems you cannot modify the C code?
22:22 < Tonnerre> Maybe I could, but I really just want to contact it over
the net like the other users
22:23 < str1ngs> then maybe write sunrpc for go?
22:23 < str1ngs> seems it understands that?
22:23 < Tonnerre> I guess that's my best shot then
22:24 < Tonnerre> Is there something for the opposite direction?
22:25 < str1ngs> in go you mean I doubt it you would have to write it
22:25 < str1ngs> but ask on the ML about this
22:25 < jamesmiller5_> why not us json?  there are lots of C bindings for
json.  It's better than writing your own rpc protocol
22:26 < Tonnerre> jamesmiller5_: for one because I don't have unlimited
network bandwidth
22:26 < jamesmiller5_> you can compress it as well
22:26 < str1ngs> you can compress
22:26 < str1ngs> grr sorry redundant
22:28 < jamesmiller5_> Tonnerre: imho i would solve one problem at a time,
writing your own rpc protocol and debugging that sounds like more trouble that its
worth
22:28 < Tonnerre> jamesmiller5_: it's not exactly «my own protocol»
22:28 < Tonnerre> It's the same thing people have been using for the last 30
years
22:28 < jamesmiller5_> Tonnerre: your own *implementation*
22:30 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds]
22:30 -!- vzx [~ryan@74-129-201-27.dhcp.insightbb.com] has quit [Ping timeout: 240
seconds]
22:32 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:48 -!- brtk [~brtk@c83-254-37-183.bredband.comhem.se] has joined #go-nuts
22:57 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
23:02 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
23:05 -!- KingPhil_ [~kingphilr@shc-nat-newhall.stonehill.edu] has joined #go-nuts
23:06 -!- KingPhilroy [~kingphilr@shc-nat-newhall.stonehill.edu] has quit [Read
error: Connection reset by peer]
23:22 -!- iant [~iant@nat/google/x-yaagonzwgtmuznds] has quit [Ping timeout: 260
seconds]
23:24 -!- NBGuest [~adium@unaffiliated/nbguest] has quit [Ping timeout: 240
seconds]
23:25 -!- NBGuest [~adium@unaffiliated/nbguest] has joined #go-nuts
23:28 -!- brtk [~brtk@c83-254-37-183.bredband.comhem.se] has quit [Ping timeout:
248 seconds]
23:30 -!- rcrowley_ [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
quit [Ping timeout: 240 seconds]
23:32 -!- rcrowley [~rcrowley@173-164-219-53-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
23:33 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
23:33 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has quit [Read
error: Connection reset by peer]
23:33 -!- iant [~iant@66.109.105.72] has joined #go-nuts
23:33 -!- mode/#go-nuts [+v iant] by ChanServ
23:35 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
23:49 -!- jamesmiller5_ [~jamesmill@184.17.105.74] has quit [Quit: Leaving]
23:49 -!- achoo [~achoo@71-80-179-102.dhcp.wsco.ca.charter.com] has joined
#go-nuts
23:51 -!- aho [~nya@fuld-590c780f.pool.mediaWays.net] has joined #go-nuts
--- Log closed Sat May 14 00:00:46 2011