--- Log opened Tue Mar 15 00:00:55 2011
00:05 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 252 seconds]
00:06 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
00:08 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
00:10 -!- crazy2be [~crazy2be@d209-89-248-73.abhsia.telus.net] has joined #go-nuts
00:15 < steven> reflect has got to be my favorite package so far
00:16 -!- crazy2be [~crazy2be@d209-89-248-73.abhsia.telus.net] has quit [Remote
host closed the connection]
00:16 -!- crazy2be [~crazy2be@d209-89-248-73.abhsia.telus.net] has joined #go-nuts
00:19 -!- Wiz126 [Wiz@h187.120.232.68.ip.windstream.net] has quit [Quit: EOF
reached]
00:21 -!- Wiz126 [Wiz@h187.120.232.68.ip.windstream.net] has joined #go-nuts
00:22 -!- shvntr [~shvntr@123.89.205.185] has joined #go-nuts
00:22 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
00:23 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
00:30 -!- slashus2 [~slashus2@74-141-110-130.dhcp.insightbb.com] has joined
#go-nuts
00:30 -!- crazy2be [~crazy2be@d209-89-248-73.abhsia.telus.net] has quit [Remote
host closed the connection]
00:31 -!- nettok [~quassel@200.119.152.137] has joined #go-nuts
00:33 -!- boscop [~boscop@f055157219.adsl.alicedsl.de] has quit [Ping timeout: 255
seconds]
00:51 -!- shvntr [~shvntr@123.89.205.185] has quit [Ping timeout: 260 seconds]
00:53 -!- shvntr [~shvntr@116.26.131.6] has joined #go-nuts
01:01 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts
01:11 -!- tvw [~tv@e176006137.adsl.alicedsl.de] has quit [Remote host closed the
connection]
01:16 < steven> awwww
01:16 < steven> we cant pass *[]int where *[]inteface{} is expected?
01:16 < steven> daaaaang
01:18 < KirkMcDonald> steven: Could that function then assign a string to an
element of that slice?
01:19 < steven> oh touche.
01:19 < steven> hey KirkMcDonald i saw you in the python channel a while
back..  how do you like Go compared to python?
01:19 < KirkMcDonald> Go has some compelling features.
01:20 < steven> did you ever try ruby btw?
01:20 < KirkMcDonald> Not really.
01:20 < steven> ah
01:21 < steven> KirkMcDonald: btw what do you think of this?
https://github.com/sdegutis/gorm
01:22 < KirkMcDonald> I am not over-fond of ORMs, as a rule.
01:23 < steven> this one is lightweight :)
01:23 < steven> more of a sqlite-struct automapper
01:23 < steven> sqlite-to-struct
01:27 < KirkMcDonald> Go does have the advantage of not having inheritance.
01:27 < steven> but you can fake it :)
01:28 < KirkMcDonald> steven: Are you familiar with this?
http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx
01:28 < steven> no
01:29 < KirkMcDonald> It enumerates the most important criticisms of ORMs
01:29 < KirkMcDonald> .
01:30 < KirkMcDonald> Also:
http://www.codinghorror.com/blog/2006/06/object-relational-mapping-is-the-vietnam-of-computer-science.html
01:30 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 252 seconds]
01:30 < KirkMcDonald> (For summary/commentary.)
01:47 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 276 seconds]
01:47 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
01:47 -!- mode/#go-nuts [+v iant] by ChanServ
01:50 -!- border [~border@114.246.93.45] has joined #go-nuts
02:06 < niemeyer> Is Evan Shaw around?
02:08 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
#go-nuts
02:18 -!- schmrkc [~marcus@sxemacs/devel/schme] has quit [Ping timeout: 240
seconds]
02:19 -!- schmrkc [~marcus@c83-254-196-92.bredband.comhem.se] has joined #go-nuts
02:19 -!- schmrkc [~marcus@c83-254-196-92.bredband.comhem.se] has quit [Changing
host]
02:19 -!- schmrkc [~marcus@sxemacs/devel/schme] has joined #go-nuts
02:20 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
02:20 -!- tav [~tav@92.7.141.101] has quit [Read error: Connection reset by peer]
02:21 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
#go-nuts
02:24 -!- schmrkc [~marcus@sxemacs/devel/schme] has quit [Ping timeout: 250
seconds]
02:37 -!- tav [~tav@92.7.141.101] has joined #go-nuts
02:44 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
02:53 < steven> whats the difference between &MyStruct{} and new(MyStruct) ?
02:54 < steven> is there absolutely no difference?  or is there a slight
difference under the hood?  or what?
02:54 -!- aho [~nya@fuld-4d00d681.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
02:56 <@adg> steven: no difference
03:07 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has joined
#go-nuts
03:07 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has quit [Client
Quit]
03:09 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
03:27 < steven> k
03:27 < steven> how would you guys run a webserver written in go as a
daemon?
03:28 < exch> Not particularly Go related, but some might find this
interesting none the less
http://stackoverflow.com/questions/4568645/printing-1-to-1000-without-loop-or-conditionals/4583502#4583502
03:28 < exch> steven: Go doesn't do the daemon thing unfortunately.  Just
run the binary and fork it to the background: ./myapp &
03:28 < steven> exch: lemme guess, recursion?
03:29 < steven> exch: what daemon thing?
03:29 < exch> The way daemons generally operate under <insert OS of
choice>
03:29 < steven> how do they normally work in unix?
03:29 < steven> i thought ./myapp & was the normal way
03:29 < exch> I have no idea
03:30 < exch> never had a need to know, as 'app &' works just fine for me
03:31 < steven> would you ever need a "cluster" of go webapps?
03:31 < steven> kind of like how sometimes other webapps run in clusters, so
that if one dies, the other ones can still serve, and also to carry the burden of
heavy traffic loads?
03:31 <@adg> of course
03:32 <@adg> if you want reliability, you can't have a single point of
failure
03:32 <@adg> http://nf.id.au/deploying-go-web-services-behind-nginx-under
03:32 <@adg> http://nf.id.au/my-golang-talk-fosdem-2011-practical-go-progr
03:33 <@adg> the former describes running a go web server behind nginx
03:33 < steven> nice.
03:33 <@adg> the latter is a presentation which discusses a design for a
slave/master configuration with multiple front-ends
03:35 < exch> first link, second paragraph: "the repsonsible netizen"
03:35 < steven> ive been wanting to write a rails-like framework in Go,
because Go seems faster and lighter weight than ruby in a lot of ways while still
maintaining a lot of the dynamic feel,
03:36 < steven> but the problem is that rails works so well because of its
highly dynamic nature..  ie creating classes at runtime, allowing the execution of
missing methods, etc
03:36 <@adg> exch: good catch.  funny, you're the first of some 37,000
people who loaded that page to tell me about it :)
03:36 < steven> granted, thats the kind of stuff that i HATE about rails,
and the reason i want to rewrite it in a staticly typed language like Go,
03:36 < exch> hehe
03:36 < exch> adg: those kind of things somehow jump out at me.  Not sure
why really
03:37 <@adg> exch: some people have that talent
03:37 < exch> Yet I still manage to make abysmal amounts of spelling errors
myself
03:37 <@adg> (fixed)
03:37 < steven> so i want to write a rails-like framework in Go, but things
like migrations and dynamic configuration and whatnot, im just not sure how to
execute.
03:37 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection
reset by peer]
03:38 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts
03:38 <@adg> steven: for how long have you been using Go?
03:38 < steven> few days now.
03:38 <@adg> okay, well a couple of things:
03:39 <@adg> it's going to be hard for you to write an idiomatic web
framework for Go if you're not well-versed in writing Go code
03:39 < steven> for example, i like the approach of looking for view files
based on class names and method names because it saves on typing, and its a
convention thats easy to pick up..  but on the other hand, it seems too "magic"
and raises the learning curve
03:39 < steven> i think im pretty well-versed so far.
03:39 <@adg> and, rails originated as a result of Basecamp.  They built
Basecamp and then pulled the framework parts out,a nd that became Rails
03:40 < steven> did you check this out?  https://github.com/sdegutis/gorm
03:40 <@adg> i think the best approach to tackling this problem is to try
writing a real Go web application of a significant size, and see what patterns
emerge
03:40 < steven> Go isnt hard to pick up..  having known C and C++ and ObjC
and Python and Ruby beforehand, and having read most of the docs, i think i get
how to use it.
03:40 < steven> ahh, i dig your idea.
03:40 <@adg> rather than trying to do things like Rails.  Ruby is a very
different language to Go, as you point out
03:40 < steven> a lot.
03:41 < steven> which reminds me, thats actually why i started asking
questions about how you might run a daemon in Go,
03:41 <@adg> i think if you take this approach you'll not waste time on
things that turn out to be unimportant
03:41 < steven> because im considering just writing a webapp and running it,
and figuring out al the pieces from there.
03:41 < steven> right.
03:41 < steven> <3
03:42 <@adg> well check the first blog post i wrote, that describes setting
up go as a system service on debiant
03:42 <@adg> debian
03:42 < steven> like, i started to need a layer to fetch/save data from a
DB, so i wrote GoRM.
03:42 < steven> right
03:43 <@adg> GoRM looks cool
03:43 < steven> thanks
03:43 < steven> then i started to think, ill need templating, so i looked
into `template` and it seems sufficient.
03:43 <@adg> i'd actually use that
03:44 < steven> problem with GoRM is, when you write a migration, you have
to duplicate that effort by (1) writing the migration itself in some configration
file to be run locally and on the production machine, and (2) you have to edit
your Go structs to reflect the changes.
03:44 < steven> whereas in Rails #2 is done behind the scenes for you.
03:44 < steven> and at work we end up writing migrations at least once a
week, with how requirements change.
03:45 -!- ildorn1 [~ildorn@dslb-188-105-122-086.pools.arcor-ip.net] has joined
#go-nuts
03:45 < steven> and relationships are gonna be *hell* in GoRM
03:46 -!- ildorn [~ildorn@dslb-188-105-112-158.pools.arcor-ip.net] has quit [Ping
timeout: 240 seconds]
03:46 <@adg> i tend to get annoyed by ORMs for anything complex
03:46 < steven> still not sure how the API should look.  something like type
Person struct { Brothers []Person }..  but the problem there is, when do you cache
the actual brothers into that array?
03:46 <@adg> i get annoyed by databases
03:47 <@adg> yeah, it's all a bit gross
03:47 < exch> You quickly resort to inventing a query language for objects
which basically turns out to relpicate the underlying SQL -- consequently
eliminating the whole point of the ORM layer :p
03:47 < steven> i mean, you cant just automatically always cache all of
Brothers into memory, via the slice..  that could be a huge array.
03:47 < steven> exch: we went through that already..  it aint gonna happen
in GoRM
03:47 < exch> good :)
03:48 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping
timeout: 276 seconds]
03:48 < steven> although doing so has a purpose: to unify all databases so
you can easily switch between sqlite to postgres to couchdb to whatever, on the
fly.
03:48 < steven> err, to make a unified db layer abstraction
03:48 < steven> or someting
03:49 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined
#go-nuts
03:49 < exch> That did appeal to me to at some point.  But then I realized
that in a company you rarely, if ever switch to a different backend.  Might be
different for you though
03:49 < steven> nah we used PG the whole time i think
03:50 < steven> anyway if you guys have ideas on how the relationship API of
GoRM should work, im all ears
03:51 < steven> i want to do something like, db.Fetch(&person, "brothers",
"name = ?', "john")
03:51 < steven> but i dont like having to pass around strings..  that seems
more fragile
03:52 < steven> not to mention, would that fill person.Brothers entirely?
it shouldnt, i dont think..
03:52 -!- nettok [~quassel@200.119.152.137] has quit [Ping timeout: 264 seconds]
03:52 < steven> no wait thats stupid.  im being stupid.
03:53 < steven> i should take adg's advice and stop trying to fix problems
until i run into them.
03:53 < steven> because this isnt an actual problem i would encounter, that
i cna think of.
03:56 < steven> right now, we can already do "select * from comments where
post_id = 1;" with this: var comments []Comment; db.FetchAll(&comments, "post_id =
?", 1)
03:57 < steven> i just think it could be more automatic than that.
03:58 -!- gogogrrl_ [~max@p5DE8E1EB.dip.t-dialin.net] has joined #go-nuts
03:59 -!- gogogrrl [~max@p5DE8E2E6.dip.t-dialin.net] has quit [Read error:
Operation timed out]
04:01 -!- steven [~steven@pidsley.praxxium.com] has quit [Changing host]
04:01 -!- steven [~steven@unaffiliated/steven] has joined #go-nuts
04:02 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
04:15 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts
04:15 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host]
04:15 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
04:15 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds]
04:17 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 255 seconds]
04:17 -!- iant [~iant@216.239.45.130] has joined #go-nuts
04:17 -!- mode/#go-nuts [+v iant] by ChanServ
04:42 -!- niemeyer [~niemeyer@201-11-241-43.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 255 seconds]
04:49 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has joined
#go-nuts
04:54 -!- slashus2 [~slashus2@74-141-110-130.dhcp.insightbb.com] has quit [Quit:
slashus2]
05:04 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
05:09 -!- kizzo [~kizzo@c-24-130-55-180.hsd1.ca.comcast.net] has joined #go-nuts
05:09 < kizzo> "operator < not defined on struct"
05:12 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts
05:29 -!- mikespook1 [~mikespook@116.21.153.120] has quit [Read error: No route to
host]
05:31 -!- mikespook [~mikespook@116.21.153.120] has joined #go-nuts
05:37 -!- lmoura [~lauromour@187.113.66.148] has quit [Ping timeout: 255 seconds]
05:38 -!- lmoura [~lauromour@187.113.66.148] has joined #go-nuts
05:45 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts
05:53 -!- schmrkc [~marcus@c83-254-205-76.bredband.comhem.se] has joined #go-nuts
05:53 -!- schmrkc [~marcus@c83-254-205-76.bredband.comhem.se] has quit [Changing
host]
05:53 -!- schmrkc [~marcus@sxemacs/devel/schme] has joined #go-nuts
05:59 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-177-194.clienti.tiscali.it] has
joined #go-nuts
06:10 -!- tsykoduk [~tsykoduk@2001:470:1f04:671:20d:93ff:fe77:1dc4] has left
#go-nuts []
06:12 -!- arvindht [c2ed8e11@gateway/web/freenode/ip.194.237.142.17] has joined
#go-nuts
06:15 -!- boscop [~boscop@f055157219.adsl.alicedsl.de] has joined #go-nuts
06:18 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed
the connection]
06:26 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has joined #go-nuts
06:30 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Quit:
Leaving]
06:37 -!- dfc [~dfc@sydfibre2.atlassian.com] has quit [Ping timeout: 252 seconds]
06:38 -!- Natch [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
06:40 -!- snearch [~snearch@f053012185.adsl.alicedsl.de] has joined #go-nuts
06:41 -!- Natch| [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Ping timeout: 246 seconds]
07:04 -!- wrtp [~rog@92.17.3.222] has joined #go-nuts
07:12 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Read error: Operation
timed out]
07:12 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has quit [Read
error: Operation timed out]
07:13 -!- pjm0616 [~user@sigfpe-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has quit
[Read error: Operation timed out]
07:13 -!- comex [comex@c-67-188-10-190.hsd1.ca.comcast.net] has quit [Ping
timeout: 246 seconds]
07:13 -!- brett [~brett@rdnzl.net] has quit [Read error: Operation timed out]
07:14 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has quit [Ping
timeout: 260 seconds]
07:14 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
07:15 -!- l00t [~i-i3id3r_@189.105.53.156] has quit [Ping timeout: 246 seconds]
07:15 -!- emjayess [~emjayess@pix1.i29.net] has quit [Ping timeout: 246 seconds]
07:15 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has joined
#go-nuts
07:15 -!- comex [comex@c-67-188-10-190.hsd1.ca.comcast.net] has joined #go-nuts
07:16 -!- Fish [~Fish@coss6.exosec.net] has quit [Ping timeout: 246 seconds]
07:16 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
quit [Ping timeout: 246 seconds]
07:16 -!- suiside [tajnyman@unaffiliated/suiside] has quit [Ping timeout: 246
seconds]
07:16 -!- brett [~brett@rdnzl.net] has joined #go-nuts
07:16 -!- clip9 [~clip9@er.en.svarteper.com] has quit [Ping timeout: 246 seconds]
07:16 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has joined
#go-nuts
07:16 -!- suiside [tajnyman@unaffiliated/suiside] has joined #go-nuts
07:17 -!- pjm0616 [~user@sigfpe-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has joined
#go-nuts
07:17 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has quit [Ping timeout: 246
seconds]
07:17 -!- tokuhiro__ [~tokuhirom@s230.GtokyoFL21.vectant.ne.jp] has quit [Ping
timeout: 246 seconds]
07:17 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
joined #go-nuts
07:24 -!- tsykoduk [~tsykoduk@2001:470:1f04:671:20d:93ff:fe77:1dc4] has joined
#go-nuts
07:25 -!- clip9 [clip9@er.en.svarteper.com] has joined #go-nuts
07:26 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
07:28 -!- l00t [~i-i3id3r_@189.105.53.156] has joined #go-nuts
07:28 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
07:29 -!- emjayess [~emjayess@pix1.i29.net] has joined #go-nuts
07:29 -!- tokuhiro__ [~tokuhirom@s230.GtokyoFL21.vectant.ne.jp] has joined
#go-nuts
07:38 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:50 -!- zimsim [~simon@87.72.77.195] has quit [Ping timeout: 248 seconds]
07:51 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
07:58 -!- ildorn1 [~ildorn@dslb-188-105-122-086.pools.arcor-ip.net] has quit
[Quit: Leaving.]
08:04 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
08:15 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
08:16 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-151-2.clienti.tiscali.it] has
joined #go-nuts
08:19 -!- Project_NAP [~Marvin@dynamic-adsl-94-36-177-194.clienti.tiscali.it] has
quit [Ping timeout: 248 seconds]
08:21 -!- bXi [bluepunk@irssi.co.uk] has quit [Read error: Operation timed out]
08:21 -!- bXi [bluepunk@irssi.co.uk] has joined #go-nuts
08:33 -!- ronnyy [~quassel@p4FF1C53D.dip0.t-ipconnect.de] has joined #go-nuts
08:37 -!- mikespook [~mikespook@116.21.153.120] has quit [Quit: Leaving.]
08:37 -!- mikespook [~mikespook@116.21.153.120] has joined #go-nuts
08:43 -!- tsykoduk [~tsykoduk@2001:470:1f04:671:20d:93ff:fe77:1dc4] has left
#go-nuts []
08:51 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
08:54 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
08:54 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection
reset by peer]
08:55 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts
09:03 -!- visof [~visof@41.233.121.162] has joined #go-nuts
09:03 -!- visof [~visof@41.233.121.162] has quit [Changing host]
09:03 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts
09:03 -!- shvntr [~shvntr@116.26.131.6] has quit [Ping timeout: 264 seconds]
09:04 -!- shvntr [~shvntr@116.26.131.6] has joined #go-nuts
09:16 -!- virtualsue [~chatzilla@nat/cisco/x-gialhrwrxjwbooad] has joined #go-nuts
09:20 -!- foocraft [~dsc@dyn-86-36-42-59.wv.qatar.cmu.edu] has joined #go-nuts
09:31 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
09:41 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
#go-nuts
09:42 -!- foocraft [~dsc@dyn-86-36-42-59.wv.qatar.cmu.edu] has quit [Remote host
closed the connection]
09:50 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
09:57 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
09:57 -!- TheColonial [~oj@115-64-213-55.static.tpgi.com.au] has joined #go-nuts
09:59 < TheColonial> Evening all.  Could someone please confirm that it's a
rule that you have to use tabs in go source files?
09:59 < nsf> TheColonial: Go spec doesn't require that
10:00 < nsf> but gofmt uses tabs for formatting
10:00 < nsf> so, it's a convention for Go compiler/lib code base
10:00 < TheColonial> nsf ok thanks.  as a noob to go, is gofmt just a tool
used to consistently format code for sharing with others?
10:00 < TheColonial> pardon the rudimentary questions.
10:00 < nsf> it's just a code formatter, yes
10:01 < nsf> again, Go compiler/lib policy is that all committed code is
formatted using gofmt
10:01 < nsf> you're free to write your code whatever way you like
10:01 < TheColonial> ok, so if i prefer to use my typical 4 spaces instead
of a tab, go won't have any issues (I'm currently installing it, which is why I am
yet to try it)
10:01 < TheColonial> fantastic.  many thanks for your time.
10:01 < jnwhiteh> you can also supply switches to gofmt
10:01 < jnwhiteh> to use spaces instead of tabs, and specify the tab-width
10:02 < nsf> 4 spaces are ok
10:02 < TheColonial> jnwhiteh: Right, I see (Just browsing the docs).  So as
long as I "release" stuff after formatting with gofmt, I'm ok to go with my own
preference.
10:02 < jnwhiteh> its just convention
10:02 < nsf> not necessary
10:02 < jnwhiteh> you can release your source regardless
10:02 < jnwhiteh> gofmt just helps if you're contributing to Go
10:02 < nsf> yeah
10:04 < TheColonial> excellent.  I get it.  thanks again.
10:05 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection
reset by peer]
10:11 -!- foocraft [~dsc@dyn-86-36-42-59.wv.qatar.cmu.edu] has joined #go-nuts
10:16 -!- ronnyy [~quassel@p4FF1C53D.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
10:22 < kamaji> Aw, I use 2 spaces
10:23 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts
10:24 -!- Fish- [~Fish@coss6.exosec.net] has joined #go-nuts
10:27 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Ping timeout: 260 seconds]
10:30 * nsf hates Xorg
10:30 < nsf> after update for some reason my:
10:30 < nsf> xmodmap -e "remove lock = Caps_Lock" && xmodmap -e "add control
= Caps_Lock"
10:31 < nsf> stopped working :(
10:38 -!- border [~border@114.246.93.45] has quit [Ping timeout: 250 seconds]
10:47 -!- tensorpudding [~user@99.148.205.193] has quit [Read error: Connection
reset by peer]
10:52 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
10:53 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
10:54 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
10:58 -!- sacho [~sacho@46.10.16.35] has quit [Ping timeout: 255 seconds]
10:59 -!- TheColonial [~oj@115-64-213-55.static.tpgi.com.au] has quit [Ping
timeout: 260 seconds]
11:18 < zimsim> nsf: In /etc/X11/xorg.conf.d/10-evdev.conf under keyboard
you can add 'Option "XkbOptions" "ctrl:nocaps"'
11:18 < nsf> zimsim: yeah, I did it in my xorg.conf
11:18 < nsf> but thanks for the tip :)
11:19 < zimsim> I used to use xmodmap myself before, but switched to just
setting it in Xorg.conf
11:20 < nsf> xorg guys do that a lot..  deprecate one stuff in favor of
another, not sure if it's the case, but whatever..  ctrl:nocaps works :)
11:20 < zimsim> Another option is to simply replace the keyboard layout,
which would make it work without X running.
11:22 < nsf> I don't use my linux machine much without xorg :)
11:23 < zimsim> Nah, not many do, except for Stallman I guess
11:23 < nsf> :D
11:24 < zimsim> http://richard.stallman.usesthis.com/
11:25 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
11:29 < wrtp> i can't believe any ever uses caps lock anyway
11:29 < wrtp> s/any/anyone
11:30 -!- snearch [~snearch@f053012185.adsl.alicedsl.de] has quit [Quit:
Verlassend]
11:35 -!- niemeyer [~niemeyer@201-11-241-43.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
11:39 -!- artefon [~thiago@dhcp16.usuarios.dcc.ufmg.br] has joined #go-nuts
11:52 -!- erus_ [50b135f2@gateway/web/freenode/ip.80.177.53.242] has joined
#go-nuts
11:54 < mpl> wrtp: BLASPHEMY111 CAPS LOCK IS CRUISE CONTROL FOR COOLNESS
11:54 -!- leczb [~leczb@nat/google/x-wzrvljivkpmxlbof] has quit [Read error: No
route to host]
11:55 < wrtp> way to go
11:57 < mpl> ;)
11:57 -!- leczb [~leczb@nat/google/x-mnirqgoeamktmhxx] has joined #go-nuts
11:59 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 260 seconds]
11:59 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts
12:01 < erus_> can i import at runtime?
12:02 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net]
has joined #go-nuts
12:03 < jessta> erus_: nope
12:07 -!- buzl [~buzl@p57A34E2E.dip.t-dialin.net] has joined #go-nuts
12:08 < gogogrrl_> I know some guys, the have caps in their heart
12:14 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
12:17 -!- PortatoreSanoDiI [~Marvin@82.84.79.223] has joined #go-nuts
12:18 < erus_> somone in this channel made a scripting language in go that
looked like asm
12:18 -!- aho [~nya@fuld-590c762f.pool.mediaWays.net] has joined #go-nuts
12:18 < erus_> and i remember him using stuff liek fmt.Println in his script
12:18 < erus_> but i wonder how he imported functions at run time
12:20 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-151-2.clienti.tiscali.it] has
quit [Ping timeout: 250 seconds]
12:25 < wrtp> erus_: maybe he didn't
12:25 < erus_> yeah i found it
12:25 < erus_> he didnt import at runtime :(
12:25 < erus_> there go my hopes and dreams
12:26 < gogogrrl_> erus_: I think you want something like commin lisp
12:26 < gogogrrl_> common*
12:26 < erus_> i could load them like modules
12:26 < erus_> like compile a module for each package
12:27 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 255 seconds]
12:27 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts
12:31 -!- mikespook [~mikespook@116.21.153.120] has quit [Quit: Leaving.]
12:32 < erus_> can i get a function from its name (string) ?
12:32 < erus_> im looking in reflection
12:41 -!- buzl [~buzl@p57A34E2E.dip.t-dialin.net] has quit [Quit: buzl]
12:42 -!- buzl [~buzl@p57A34E2E.dip.t-dialin.net] has joined #go-nuts
12:49 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts
12:49 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has joined #go-nuts
12:58 -!- buzl_ [~buzl@p57A36C66.dip.t-dialin.net] has joined #go-nuts
12:58 < wrtp> erus_: no, you can't
12:58 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 252 seconds]
12:58 < wrtp> because functions that are never referred to are left out of
the executable
12:58 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts
12:59 < wrtp> you can get methods from their names though
12:59 < wrtp> erus_: what do you want to do?
12:59 -!- arvindht [c2ed8e11@gateway/web/freenode/ip.194.237.142.17] has quit
[Quit: Page closed]
13:00 -!- buzl [~buzl@p57A34E2E.dip.t-dialin.net] has quit [Ping timeout: 246
seconds]
13:01 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
13:01 < erus_> callFunction("fmt", "Println");
13:02 < erus_> im not sure go is the best language to implement my scripting
language in
13:05 < nsf> it's the worst language
13:06 < nsf> :)
13:06 < nsf> kidding
13:10 -!- karpar [~user@112.96.254.17] has joined #go-nuts
13:10 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
13:21 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 264 seconds]
13:21 -!- foocraft [~dsc@dyn-86-36-42-59.wv.qatar.cmu.edu] has quit [Remote host
closed the connection]
13:22 -!- karpar [~user@112.96.254.17] has quit [Quit: ERC Version 5.3 (IRC client
for Emacs)]
13:23 -!- karpar [~user@112.96.254.17] has joined #go-nuts
13:24 -!- karpar [~user@112.96.254.17] has quit [Client Quit]
13:27 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
13:30 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 250 seconds]
13:30 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
13:30 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
13:37 -!- kizzo [~kizzo@c-24-130-55-180.hsd1.ca.comcast.net] has left #go-nuts []
13:42 -!- b0rder [b0rder@119.80.58.50] has joined #go-nuts
13:44 -!- erus_ [50b135f2@gateway/web/freenode/ip.80.177.53.242] has quit [Ping
timeout: 252 seconds]
13:53 -!- n____ [~alouca@91.184.192.148] has joined #go-nuts
13:53 < n____> Hi, is there an easy way to determine if x is a member of
array/slice y?
13:55 < niemeyer> n____: for _, xi := range y { if x == xi { found = true;
break } }
13:59 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts
14:01 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
14:03 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:07 -!- iant [~iant@67.218.107.6] has joined #go-nuts
14:07 -!- mode/#go-nuts [+v iant] by ChanServ
14:09 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
14:14 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
14:17 -!- unofficialmvp1 [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
14:17 -!- unofficialmvp1 [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
14:19 -!- Natch| [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Ping timeout: 276 seconds]
14:24 < steven> great for testing daemonizer: "package main; func main()
{for{}}"
14:27 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has quit [Quit: mnoel]
14:28 -!- ako [~nya@fuld-590c7bbc.pool.mediaWays.net] has joined #go-nuts
14:29 -!- aho [~nya@fuld-590c762f.pool.mediaWays.net] has quit [Disconnected by
services]
14:29 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed
the connection]
14:29 < skelterjohn> steven: maybe toss in a time.Sleep(), too :)
14:29 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
14:31 -!- Project-2501 [~Marvin@82.84.77.132] has joined #go-nuts
14:32 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 276 seconds]
14:34 -!- shvntr [~shvntr@116.26.131.6] has quit [Read error: Connection reset by
peer]
14:35 -!- PortatoreSanoDiI [~Marvin@82.84.79.223] has quit [Ping timeout: 260
seconds]
14:46 -!- visof [~visof@unaffiliated/visof] has quit [Read error: Connection reset
by peer]
14:49 -!- n____ [~alouca@91.184.192.148] has quit [Quit: n____]
14:51 -!- napsy [~luka@193.2.66.6] has quit [Quit: leaving]
14:59 -!- iant [~iant@67.218.107.6] has quit [Quit: Leaving.]
15:06 < steven> unfortunately sending SIGINT to just a for{} loop doesnt
kill it if its running in the background
15:07 < steven> have to catch sigint via os/signal and explicitly quit
15:07 < steven> which is fine, since thats what i would do anyway
15:07 < steven> in order to clean up the connections safely and not drop any
connections harshly
15:07 < steven> win
15:07 -!- saschpe_ [~quassel@opensuse/member/saschpe] has joined #go-nuts
15:12 -!- shvntr [~shvntr@113.84.144.183] has joined #go-nuts
15:12 -!- saschpe_ [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
15:14 -!- boscop_ [~boscop@f055163136.adsl.alicedsl.de] has joined #go-nuts
15:17 -!- boscop [~boscop@f055157219.adsl.alicedsl.de] has quit [Ping timeout: 255
seconds]
15:22 -!- serbaut [~joakims@88.80.182.68] has joined #go-nuts
15:23 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
15:26 -!- b0rder [b0rder@119.80.58.50] has quit []
15:29 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
15:31 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has joined #go-nuts
15:40 -!- sauerbraten [~sauerbrat@p508CB507.dip.t-dialin.net] has joined #go-nuts
15:45 -!- shvntr [~shvntr@113.84.144.183] has quit [Ping timeout: 255 seconds]
15:46 -!- camnaes [~cm@c-76-100-200-8.hsd1.md.comcast.net] has joined #go-nuts
15:56 < steven> guys, whats a clean way to stop http.ListenAndServe()?
15:58 < camnaes> hi nsf, hope you get pinged by these.  gocode panics when I
use autocomplete within vim.  here is the panic log: http://pastie.org/1674851
15:59 < exch> steven: Just exit the app afaik
15:59 < steven> exch: that will kill connections dead, without letting them
finish, though
15:59 < steven> wont it?
15:59 < steven> *existing connections
15:59 < exch> probably
15:59 < steven> no way to avoid that?
15:59 < nsf> camnaes: update go compiler to the latest release version,
update gocode to the latest git version and it will work
15:59 < nsf> I hope
15:59 < exch> Not that I am aware of.  You'd have to look at the code for
the http bits
15:59 < steven> to let them come down cleanly, refusing new connections, and
notify me when all are down clean?
16:00 < nsf> camnaes: or if you have the latest versions already, I'll see
what I can do
16:00 < camnaes> i've got your latest version of gocode, there were 5 file
diffs from my last go update
16:01 < nsf> hm..
16:01 < nsf> can you give me a short source example where it fails?
16:02 < camnaes> fails on as basic as i can get it ...  import "fmt" func
main() { fmt.PANIC }
16:03 < nsf> well, yeah..  it is not gocode's fault clearly
16:03 -!- virtualsue [~chatzilla@nat/cisco/x-gialhrwrxjwbooad] has quit [Ping
timeout: 255 seconds]
16:03 < nsf> uhm..  when libraries are messed up in the compiler tree
16:04 < nsf> it happens
16:05 < nsf> or something else, I don't know
16:05 < nsf> but I've seen such a behaviour
16:05 < camnaes> ok
16:05 < nsf> but can't remember what was wrong
16:06 < camnaes> i'll keep digging, thanks.
16:06 < nsf> I'll take a look at logs, maybe I'll find something too
16:09 < steven> i figured out a way to run a Go process in the background,
with its pid stored somewhere, so kill -s INT cna be sent to it later on :)
16:09 < steven> essentially, it gives me a way to do this: `./manageproc
start $PORT` and later `./manageproc stop $PORT`
16:10 < steven> which means i can have several instances of a single webapp
running on several ports all behind a balancer like nginx..  all serving html!
16:11 < steven> go provides good templating, and i have a slightly-okay
sqlite wrapper..  which means, at the very least, i can now serve up read-only
data from a sqlite db
16:11 < steven> although i think writing a wrapper around postgresql instead
might be more worth the effort.
16:11 < steven> all thats left is configuration management..  ie,
development vs staging vs production
16:14 < steven> which i think usually only specifies databases and
log-information..  and tahts probably all i would care about
16:16 < nsf> camnaes: can't find it :( but something like making sure that
everything in its correct place and rebuilding everything with 'make clean && make
install' should help
16:16 < nsf> I think the reason why it happens
16:17 < nsf> that at some point (december 2010)
16:17 < nsf> the go/parser lib was broken
16:17 < nsf> and you're updating your Go tree in a wrong way
16:17 < nsf> e.g.  not updating at all or something
16:17 < camnaes> hg pull / update, src/all.bash
16:18 < nsf> hm..
16:18 < nsf> well, and do hg update -r release
16:18 < nsf> I simply don't know what's on the tip version of go compiler
16:18 < nsf> maybe something is broken here
16:19 -!- iant [~iant@nat/google/x-ifpbwxheunrxptjp] has joined #go-nuts
16:19 -!- mode/#go-nuts [+v iant] by ChanServ
16:20 < camnaes> it's permissions!
16:20 < nsf> uhm?
16:20 < wrtp> nsf: the go parsing packages have changed significantly in the
current tip
16:20 < camnaes> i ran gocode as root and it works fine
16:20 < nsf> camnaes: strange
16:20 < camnaes> my permissions are messed up somewhere
16:20 < nsf> or PATH
16:21 < nsf> wrtp: well, it will cause compilation failure of the gocode
16:21 < nsf> most likely
16:21 < camnaes> good call i'll check both
16:22 < nsf> camnaes: gocode fails to parse a library not read it or
something..  so, most likely something like old gocode binary on your user's PATH
overrides a new one
16:22 < nsf> or you have GOROOT with an old library
16:22 < nsf> something like that
16:24 < nsf> 'which gocode'
16:24 < nsf> try that for root and for user
16:24 -!- binarypie [~binarypie@adsl-99-35-135-146.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
16:25 < camnaes> same
16:25 < nsf> ah, I know one more potential reason
16:25 < nsf> gocode GOBIN default location was changed from ~/bin to
GOROOT/bin
16:25 < nsf> at some point
16:25 < nsf> therefore it installs gocode to GOROOT/bin by default now
16:26 < nsf> or maybe you're building gocode and not installing it
16:26 < nsf> but that's unlikely
16:26 < nsf> ls -l `which gocode` $GOROOT/bin/gocode
16:26 < nsf> one more option to try
16:27 < nsf> ls -l `which gocode` $GOROOT/bin/gocode $GOBIN/gocode
16:27 < nsf> or even like that
16:28 < kimelto> is a libgo.so beeing worked on?  or is it planned at least?
16:28 < nsf> anyways, that's the potential reasons
16:28 < nsf> kimelto: you mean shared library support in 6g/8g?
16:28 < kimelto> yes
16:28 < nsf> there is a libgo.so in gccgo
16:28 < nsf> I think there will be no support for that in 6g/8g
16:29 < nsf> at least that was true some time ago
16:29 < nsf> plus some of go devs don't like shared libraries :)
16:30 -!- Natch| [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
16:31 < kimelto> so they will be able to say "you know I *can* use shared
lib, but I dont like 'em so I link statically".  now there is no honnor doing so
because you dont have the choice!
16:31 < kimelto> anyway, choice is good!
16:31 < nsf> kimelto: you have a choice to implement support for shared
libraries by yourself
16:31 < nsf> :)
16:32 < kimelto> or I prefer to complain and watch
16:32 < kimelto> lazyness :)
16:32 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Quit:
leaving]
16:32 < nsf> :D
16:38 -!- imsplitbit [~imsplitbi@64.39.4.132] has joined #go-nuts
16:39 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
16:39 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined
#go-nuts
16:46 -!- artefon [~thiago@dhcp16.usuarios.dcc.ufmg.br] has quit [Quit: bye]
16:48 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
16:55 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has quit [Read
error: Connection reset by peer]
16:56 -!- buzl [~buzl@p57A36C66.dip.t-dialin.net] has quit [Quit: buzl]
16:58 -!- m4dh4tt3r
[~Adium@75.144.24.109-BusName-walnutcreek.ca.hfc.comcastbusiness.net] has joined
#go-nuts
17:04 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
17:08 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
17:15 -!- jyxent [~jyxent@129.128.191.96] has quit [Read error: Connection reset
by peer]
17:17 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts
17:24 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
17:35 -!- niemeyer [~niemeyer@201-11-241-43.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 248 seconds]
17:36 -!- cdsgf [~cds@69.55.231.142] has quit [Remote host closed the connection]
17:36 -!- niemeyer [~niemeyer@201-11-241-43.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
17:36 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts
17:49 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
17:52 -!- rm445 [rm445@pip.srcf.societies.cam.ac.uk] has joined #go-nuts
17:55 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
18:19 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
18:22 -!- nutate [~rseymour@204.140.131.18] has joined #go-nuts
18:22 -!- nutate [~rseymour@204.140.131.18] has quit [Read error: Connection reset
by peer]
18:23 -!- nutate [~rseymour@204.140.131.18] has joined #go-nuts
18:26 < nsf> http://ompldr.org/vN3RzNA/2011-03-15-232752_820x382_scrot.png
18:26 < nsf> clang-style error messages :)
18:26 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has joined #go-nuts
18:31 < nsf> what's really cool about clang is that when you've misspelled
member of a struct it will try to find similar name and say: did you mean that?
18:31 < nsf> very cool :)
18:32 -!- wrtp [~rog@92.17.3.222] has quit [Quit: wrtp]
18:32 < nsf> btw, it's a good contribution idea for Go
18:32 < nsf> making interface more user friendly is always a nice idea imho
18:34 -!- Venom_X_ [~pjacobs@66.54.185.131] has joined #go-nuts
18:35 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 276 seconds]
18:37 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
18:44 -!- TheMue [~TheMue@p5DDF5639.dip.t-dialin.net] has joined #go-nuts
18:47 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has quit [Quit:
Leaving]
18:54 -!- PortatoreSanoDiI [~Marvin@82.84.72.169] has joined #go-nuts
18:56 -!- Project-2501 [~Marvin@82.84.77.132] has quit [Read error: Operation
timed out]
18:58 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has quit [Quit: Leaving]
19:06 -!- zimsim [~simon@87.72.77.195] has quit [Ping timeout: 250 seconds]
19:08 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
19:15 < nsf> trying to find a nice C++ string formatting library
19:15 < nsf> candidates are scary :(
19:15 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
19:17 < nsf> seriously this world lacks nice libraries
19:21 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: sudo rm -R /]
19:21 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
19:23 < zozoR> nsf, tried python?  :D
19:23 < nsf> nope
19:24 < nsf> it's a bit too late for a language change
19:24 < Namegduf> s/this world/C++/
19:24 < Namegduf> :P
19:25 < nsf> but C++ crowd suggests me to use boost.format
19:25 < nsf> kthxbye
19:25 < nsf> :(
19:26 < exch> boost kills kittens :<
19:26 < steven> zozoR: bahh python
19:26 < steven> nsf: dont trust ##c++
19:27 < nsf> I'm not even there
19:27 < steven> ok
19:27 < nsf> but I know what they will suggest
19:27 < nsf> :)
19:27 < steven> C++ have said "lets take this slightly dumb idea and go 10
miles with it to make it much worse"
19:27 < steven> thus, boost.
19:27 < Namegduf> Boost: Because C++ didn't have enough features.
19:27 < steven> whereas they might have invented something like Go instead.
19:28 < Namegduf> Boost: Because every problem with a feature can be solved
with another.
19:28 < nsf> I don't care about boost, I just need a
string_printf(std::string &out, const char *fmt, ...);
19:28 < steven> sprintf
19:28 < steven> drop down to C :)
19:28 < Namegduf> Yeah, that already exists.
19:28 < nsf> I know that vsnprintf will work
19:28 < nsf> but..
19:29 < nsf> in order to do what I want it needs to be c99 compliant
19:29 < nsf> well, I guess glibc's is
19:29 < nsf> then I'll write it by myself
19:29 < nsf> ugh..
19:29 < nsf> 20 years..  and no good string formatting library
19:29 < nsf> std::ostringstream?  seriously?
19:29 < steven> use Go ;)
19:29 < steven> ha, i remember ostringstream
19:30 < steven> from when i learned c== in college
19:30 < nsf> steven: it's too late
19:30 < nsf> and I use lemon parser generator
19:30 < Namegduf> Too late.
19:30 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has joined #go-nuts
19:30 < nsf> it works best for C
19:30 < Namegduf> His soul has been devoured by the OO beast
19:30 < Namegduf> Can't turn back now.
19:30 < rm445> c== sounds like a good language
19:31 < nsf> I'm making a good language
19:31 < nsf> but the compiler is in C++ (
19:31 < nsf> haha
19:32 < exch> there is hope still.  I was once a fervant OO fanboi myself,
but I changed my ways.  It was not easy, but not impossible.
19:32 < nsf> although I'm starting to understand that 70% of a good language
is a good library collection
19:32 < nsf> oh..  don't worry about me becoming OO addict
19:33 < nsf> it is impossible
19:34 < nsf> http://pastie.org/1675677
19:34 < nsf> my C++ is quite brutal
19:36 -!- lmoura [~lauromour@187.113.66.148] has quit [Read error: Connection
reset by peer]
19:37 -!- lmoura [~lauromour@187.113.104.86] has joined #go-nuts
19:38 -!- j3parker [j3parker@artificial-flavours.csclub.uwaterloo.ca] has quit
[Ping timeout: 250 seconds]
19:39 -!- PJ_Robins [~finn@174-20-67-7.mpls.qwest.net] has joined #go-nuts
19:50 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has joined #go-nuts
19:52 < zozoR> what are the features of your good language?  :P
19:52 < zozoR> nsf :D
19:53 < nsf> zozoR: it's like Go
19:53 < nsf> but like C
19:53 < nsf> :)
19:53 < nsf> (*khm*with templates*khm*)
19:54 < nsf> regarding C++ string formatting: http://pastie.org/1675754
19:54 < nsf> and that's fucking it
19:54 < nsf> 8 lines of code
19:54 < zozoR> what is wrong with go?
19:54 < nsf> zozoR: garbage collection and goroutines abstraction
19:55 < zozoR> you want go with manually freed memory and another kind of
goroutine?
19:55 < nsf> no, I want a C with Go syntax
19:55 < nsf> + few other minor features
19:55 < skelterjohn> i'd like the ability to do manual memory management,
off by default
19:55 < skelterjohn> then you could fine tune your code once you got it
working
19:56 < nsf> like methods/interfaces, maybe lambdas, templates in a form of
AST macros (always inlined)
19:56 < zozoR> isnt it easier to just, make a parser in python, that
converts go syntax to C synta
19:56 < zozoR> x
19:56 < nsf> that's what I'm doing
19:56 < zozoR> oh
19:56 < zozoR> :D
19:56 < nsf> in C++
19:56 < zozoR> but in C++, of all languages :P
19:56 < skelterjohn> he wanted to write funky macros
19:56 < nsf> well, eventually converting Go syntax to C won't work
19:57 < nsf> because it will be slow
19:57 < nsf> (you still need to compile C afterwards)
19:57 < nsf> but that's a first step and then I hope I will rewrite compiler
in this programming language
19:57 < nsf> with two backends
19:57 < nsf> llvm and C
19:57 < nsf> C for bootstrapping
19:58 < zozoR> ^^
19:58 < nsf> also I have plans to support direct C header import
19:58 < nsf> will use libclang for that
19:58 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-181-129.clienti.tiscali.it] has
joined #go-nuts
19:58 < zozoR> a big project indeed
19:58 < nsf> yes
19:58 -!- artefon [~thiago@189.59.162.202] has joined #go-nuts
19:59 < nsf> I've finished a parser prototype (enough for starting code
generation)
19:59 < nsf> and I'm working on a codegen right now :)
19:59 * skelterjohn wonders what nsf's day job is
19:59 < nsf> I'm jobless student at the moment )
19:59 < nsf> lots of free time
19:59 < skelterjohn> undergrad or grad?
19:59 < nsf> uhm..
20:00 < nsf> I don't know )
20:00 < skelterjohn> do you have a degree?
20:00 < nsf> nope
20:00 < skelterjohn> are you working towards a bachelors?
20:00 < nsf> in russia there is a bit different system
20:01 < nsf> anyways, it doesn't matter
20:01 -!- j3parker [j3parker@artificial-flavours.csclub.uwaterloo.ca] has joined
#go-nuts
20:01 < skelterjohn> i'm just curious
20:01 < nsf> I'm not studying CS or even math
20:01 -!- PortatoreSanoDiI [~Marvin@82.84.72.169] has quit [Ping timeout: 255
seconds]
20:01 < zozoR> just hanging around?  :o
20:01 < nsf> it's economics and finances :\
20:01 < skelterjohn> what else is there?
20:02 < skelterjohn> why
20:02 < skelterjohn> *shudder*
20:02 < nsf> to have a lot of free time, lol
20:02 < skelterjohn> lol
20:03 < zozoR> you gain one internet for that :D
20:04 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Quit:
Caught signal 15, Terminated]
20:06 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined
#go-nuts
20:09 -!- slashus2 [~slashus2@74-141-110-130.dhcp.insightbb.com] has joined
#go-nuts
20:11 -!- nutate [~rseymour@204.140.131.18] has quit [Quit: nutate]
20:18 < str1ngs> how do I wait for a channel signal without blocking ie in a
for loop?
20:20 < skelterjohn> select
20:20 < skelterjohn> select { x := <- ch: //some stuff \n default: //now
you won't block }
20:21 < str1ngs> ok let me try that
20:21 < skelterjohn> i might be off on the syntax, but select is definitely
what you want ot use
20:21 < str1ngs> no worries atleast I know where to look
20:22 < skelterjohn> :)
20:26 < str1ngs> grr this is not a easy as I was hoping lol
20:26 < skelterjohn> do you have to do more than what i wrote?
20:27 < skelterjohn> i mean, it's not a one liner, so you can't put it in a
for condition without wrapping it in a function
20:27 < skelterjohn> but...  you can still wrap it in a function :)
20:28 < str1ngs> https://gist.github.com/871405
20:28 < str1ngs> this is what I have now.  which is fine.  but I want to
have print("#") while exec is running
20:29 < skelterjohn> i don't understand
20:29 < skelterjohn> like, print a hash every second?
20:30 < skelterjohn> or print a hash once?
20:30 < skelterjohn> print a hash only if exec hasn't finished yet?  :)
20:30 < str1ngs> right.  I"ll have to sleep every second or something of
course
20:31 -!- imsplitbit [~imsplitbi@64.39.4.132] has quit [Quit: Bye!]
20:31 < skelterjohn> are you making a build tool?
20:31 < str1ngs> yes something like that
20:33 < str1ngs> right now the way it works if you define a plan and a
attach a preset download,build function.  ideally I should use interfaces but
thats aways off yet.
20:37 < steven> how do we know what version of Go we're using?
20:37 < skelterjohn> 6g -V
20:37 < steven> so far as i can see, there is no version displayed on the
website anywhere, nor do any of the commands seem to be the definitive *command*
to check
20:37 < skelterjohn> 6l -V and 6g -V should agree
20:37 < steven> wow thats a weird version number
20:37 < skelterjohn> if not, you've got an issue
20:38 < steven> so its more like C than ruby/python in terms of versioning?
20:38 < skelterjohn> i have no idea
20:38 < steven> wierdo
20:38 < skelterjohn> it's not something i think about very much
20:39 < str1ngs> git branch or tag thats how I find out :P.  not sure you
how you do that with hg.
20:41 < skelterjohn> hg identify
20:48 -!- iant [~iant@nat/google/x-ifpbwxheunrxptjp] has quit [Quit: Leaving.]
20:50 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has joined
#go-nuts
20:55 -!- iant [~iant@nat/google/x-ozepxblketpxztrx] has joined #go-nuts
20:56 -!- mode/#go-nuts [+v iant] by ChanServ
20:57 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has quit [Ping
timeout: 255 seconds]
20:58 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
21:04 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has joined
#go-nuts
21:04 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has quit [Ping timeout:
255 seconds]
21:04 < steven> guys,
21:04 < steven> how can you modify a Makefile to install your binary in a
different place?
21:05 -!- sauerbraten [~sauerbrat@p508CB507.dip.t-dialin.net] has quit [Remote
host closed the connection]
21:05 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has quit [Quit:
Leaving]
21:06 < skelterjohn> make a new rule - the binary will be installed to
$(TARG)
21:06 < skelterjohn> so you can have a rule like so
21:06 < skelterjohn> newplace/$(TARG): $(TARG)
21:06 < skelterjohn> <tab> mkdir -p newplace; cp $(TARG) newplace
21:07 -!- artefon [~thiago@189.59.162.202] has quit [Read error: Connection reset
by peer]
21:07 < nsf> I think binary is installed to GOBIN dir
21:07 < nsf> you can simply do:
21:07 < nsf> GOBIN=...  make install
21:08 < skelterjohn> has potential side effects, but also works
21:08 -!- tav [~tav@92.7.141.101] has quit [Read error: Connection reset by peer]
21:08 < steven> skelterjohn: i like your idea
21:09 < skelterjohn> gb will put built binaries in your workspace's bin
directory
21:09 < skelterjohn> also, generates makefiles that do the same
21:10 -!- tav [~tav@92.7.141.101] has joined #go-nuts
21:10 < steven> can i just "override" something like install, and make it do
something different?
21:11 < skelterjohn> redefining targets makes warnings happen, i think
21:11 < skelterjohn> but if you put your own target at the top of the file,
it will be default
21:11 < nsf> yeah, but you can safely add dependencies
21:12 < steven> which means i should just suck it up and use "sd/install:
install"?
21:12 < nsf> no
21:12 < nsf> install: <something>
21:12 < skelterjohn> that doesn't make sense to me
21:12 < nsf> it will add a dependency to the install target
21:12 < skelterjohn> oh, sd/install is a target
21:12 < skelterjohn> but adding a dep to install will not stop install from
putting it in $GOBIN
21:13 < nsf> yes
21:13 < nsf> also
21:13 < str1ngs> GOBIN= easiest thing I think
21:13 < nsf> if you know make well
21:13 < nsf> or want to learn
21:13 < nsf> there is a collection of templates
21:13 < nsf> which are more flexible than Go ones
21:13 < nsf> https://github.com/nsf/goal
21:13 < skelterjohn> everyone should use gb =p
21:13 < nsf> but, they are not maintained
21:14 < nsf>
https://github.com/nsf/goal/blob/master/examples/ordinary_cmd/Makefile
21:14 < nsf> take a look for example
21:14 < nsf> TEMPLATE_GO_COMMAND defines $(targ)/install
21:14 < nsf> instead of a global install
21:14 < nsf> and you are free to use it
21:14 < str1ngs> skelterjohn: what the heck is gb?
21:14 < nsf> or not
21:14 < skelterjohn> go-gb.googlecode.com
21:15 < nsf> you can actually have two or more TARGs in one makefile
21:15 < skelterjohn> (disclaimer, i created it, so me thinking everyone
should use it like a mother saying her son is the handsomest kid ever)
21:15 < nsf> and specify dependencies between them
21:15 < nsf> etc.
21:15 -!- mulander [mulander@078088239019.lubin.vectranet.pl] has joined #go-nuts
21:15 < nsf> but..  the whole system is hardcore make stuff
21:16 < nsf> without understanding it
21:16 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
21:16 < nsf> there will be "side effects"
21:16 < nsf> :)
21:16 < skelterjohn> building shouldn't be complicated.
21:16 < nsf> it's not
21:16 < nsf> but it requires understanding
21:16 < nsf> like linux
21:16 < nsf> it's simple if you understand everything
21:17 < skelterjohn> gb allows you to be configuration-free.  like goinstall
will, once it actually clones all of gb's behaviors
21:17 < nsf> it's GNOME style
21:17 < nsf> and well
21:17 < aiju> click a nice button and watch it crash?
21:17 < nsf> I think your gb builds only Go
21:17 < str1ngs> skelterjohn: so it handles goinstall packages to I see?
21:17 < nsf> when this template system simply integrates to a usual makefile
21:17 < skelterjohn> nsf: yes - it only builds go projects
21:18 < skelterjohn> nsf: certainly a plus for your templates
21:18 < skelterjohn> str1ngs: yes - it will run goinstall where appropriate
21:18 < nsf> skelterjohn: anyways, I don't want to fight with you )
21:18 < skelterjohn> but only if you give it -g or -G
21:18 < steven> how can you specify where the object files go?
21:18 < steven> like _go_.6 etc
21:18 < nsf> probably for Go gb is a better choice actually
21:18 < nsf> at least it's maintained
21:18 < skelterjohn> steven: the makefiles will put them next to Makefile
21:18 < nsf> so far
21:18 < steven> no matter what?
21:18 < skelterjohn> unless you mess with the makefiles
21:19 < steven> awww
21:19 < steven> wish that wasnt true.
21:19 < skelterjohn> where do you want them to be?
21:19 < steven> my makefile is in my root project directroy
21:19 < str1ngs> skelterjohn: ya but make files can be more flexiable
21:19 < str1ngs> ie https://gist.github.com/871511
21:19 < skelterjohn> str1ngs: flexibility is not always good
21:19 < skelterjohn> just lets people be confusing
21:20 < skelterjohn> gb will run gofmt :)
21:20 < skelterjohn> and i'm thinking of allowing it to run a pre-build
script
21:20 < str1ngs> but it wont build a C lib :P
21:20 < skelterjohn> for code generation, etc
21:20 < nsf> ah, the only thing that my templates don't do
21:20 < skelterjohn> that's right, at the moment it won't
21:20 < nsf> is dependencies detection
21:20 < nsf> you have to do it manually
21:20 < skelterjohn> gb's raison d'etre is dep detections
21:20 < uriel> Residents of the western province of British Columbia have
been ignoring the advice of local health authorities and emptied pharmacies in
Vancouver and Victoria of anti-radiation medicines such as potassium iodide, the
AFP news agency reports.
21:21 < uriel> how fucking RETARDED can people be?
21:21 < nsf> uriel: lol, radioactive wind from Japan is scary
21:21 < skelterjohn> sometimes the authorities are wrong *shrug*
21:21 < uriel> fuck, I should start selling homepathic anti-radiation
medicine
21:21 < shakesoda> extremely
21:22 < str1ngs> uriel: lol I live in western BC.
21:22 < uriel> skelterjohn: the authorities bit in what I quoted is the
least relevant
21:22 < uriel> skelterjohn: I'm amazed the health authorities managed to get
this right, the amazing is how fucking isnane everyone else is
21:22 < skelterjohn> you think that anti-radiation medicines don't do
anything?
21:22 < nsf> we're living in an illusion of a civilization
21:22 < uriel> skelterjohn: I have no clue, but I'm sure they make money for
somebody
21:22 < uriel> wish it were me
21:23 < nsf> basically things are the same as they were in stone age
21:23 < uriel> str1ngs: hey, did yout ake your meds then?  ;P
21:23 < nsf> just a different form
21:23 < str1ngs> uriel: nope.  I think its common sense we dont need them
21:23 < uriel> nsf: you are more right than most people would think
21:23 < shakesoda> a) rock salt, b) tell people that if placed on the eyes
it will save them from radiation
21:24 < |Craig|> iodide is a good choice.  Radio active iodine ends up in
your thyroid gland.  It is the one thing that makes sense to get.
21:24 < uriel> shakesoda: sounds like a good plan to get rich fast
21:24 < shakesoda> ;)
21:24 < uriel> shakesoda: sell it for 50$ per gram
21:24 < str1ngs> I'm now buying whole sale iodide.
21:25 < shakesoda> uriel: $50/gram + patented rock salt on eyes machine (a
slingshot)
21:25 < shakesoda> ;)
21:25 < |Craig|> sell table salt, it is iodized, and will auctually help
21:25 < shakesoda> warning, ;)'s in close proximity
21:26 < str1ngs> |Craig|: great the only people left alive with be the fast
food freaks :(
21:26 < str1ngs> s/with/will
21:31 < skelterjohn> i can change
21:31 < skelterjohn> i can become a fast food freak
21:33 < |Craig|> 2.4 liters of iodized salt...  better not go for that
approach.  An Potassium iodide tablet is a better approach...
21:33 < skelterjohn> yeah but uriel said we can't buy that
21:37 < |Craig|> I would expect the government to have some on hand.  Its a
counter to nuclear melt down, nuclear bombs, and dirty bombs.  Even the soviets
had some for Chernobyl.
21:37 < Namegduf> I think they do, yes.
21:38 -!- TheMue [~TheMue@p5DDF5639.dip.t-dialin.net] has quit [Quit: TheMue]
21:38 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has quit [Ping
timeout: 252 seconds]
21:43 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed
the connection]
21:45 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has joined
#go-nuts
21:45 -!- m4dh4tt3r
[~Adium@75.144.24.109-BusName-walnutcreek.ca.hfc.comcastbusiness.net] has quit
[Quit: Leaving.]
21:45 -!- m4dh4tt3r
[~Adium@75.144.24.109-BusName-walnutcreek.ca.hfc.comcastbusiness.net] has joined
#go-nuts
21:46 -!- ymasory [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has joined
#go-nuts
21:53 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has quit [Ping
timeout: 252 seconds]
21:57 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 260 seconds]
21:59 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has joined
#go-nuts
22:00 < steven> does it seem like a bad idea to kill-9 a go webserver in
production?
22:03 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
22:04 < skelterjohn> a soft shutdown is always nice
22:04 < skelterjohn> especially if it is in the middle of writing a response
22:04 < str1ngs> skelterjohn: I dont think select will work.  or I need two
channels ..  I think
22:05 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has quit [Ping
timeout: 240 seconds]
22:06 < str1ngs> also I think print blocks.  but println doesnt
22:07 < skelterjohn> str1ngs: http://pastebin.com/yW3H1Une
22:07 < skelterjohn> what do you mean, println doesn't block
22:07 < skelterjohn> it will write something to stderr, and then return
22:07 < skelterjohn> same as print
22:08 < skelterjohn> println(s) = print(s+"\n")
22:08 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
22:09 < str1ngs> https://gist.github.com/871616
22:10 < str1ngs> this is what I have
22:10 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has quit [Remote host
closed the connection]
22:11 < skelterjohn> and what happens
22:11 < str1ngs> endless loop
22:11 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
22:11 < skelterjohn> infinite hashes or it hangs
22:11 < skelterjohn> because it looks like it hangs
22:12 < skelterjohn> one issue - invoking println does not yield to the
scheduler
22:12 < str1ngs> infinite hashes
22:12 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has joined
#go-nuts
22:12 < str1ngs> if I use print I get no hashes but thats another issue
22:12 < skelterjohn> so it might just be running the hash goroutine forever,
if GOMAXPROCS is one
22:12 < skelterjohn> if you use fmt.Println
22:12 < skelterjohn> or call runtime.Gosched()
22:12 < skelterjohn> it will yield to the other goroutine
22:12 < skelterjohn> i also suggest a time delay between hashes
22:13 < skelterjohn> time.Sleep(1e9) <- delay of 1 sce
22:13 < str1ngs> I will time delay
22:14 < skelterjohn> and once that is working, your function will hang :)
22:14 < skelterjohn> the break in your select statement will break out of
select, not the for (i think)
22:14 < skelterjohn> you can put a label on the for loop and break to that
label
22:15 < skelterjohn> also, only one value is every put onto that chan, when
the execs finish
22:15 < str1ngs> ah ok that makes sense now
22:15 < skelterjohn> but you read from it twice
22:15 < skelterjohn> the 2nd read will never come back
22:15 < str1ngs> ya that last read is not needed
22:15 < skelterjohn> that too
22:16 < str1ngs> ok so how do I label the for to break out of it?
22:17 < skelterjohn> MyLabel: for {...  etc
22:17 < skelterjohn> just put the label, followed by a colon, at the
beginning of the line
22:17 < skelterjohn> or on the line preceeding
22:17 < str1ngs> ok then say break MyLabel ?
22:17 < skelterjohn> yes
22:17 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
22:17 < skelterjohn> if your label doesn't immediately preceed the for, or
some other construct that can be broken out of by your break statement, i'm not
sure what happens
22:18 < skelterjohn> might just be like a goto
22:18 < str1ngs> yes!  it worked
22:18 < skelterjohn> :)
22:19 < skelterjohn> now if i can only get my stuff to work
22:19 < str1ngs> jesh I had it right the whole time.  but I should have
checked it break works in the select scope
22:20 < str1ngs> hmm now I just have to figure out why print doesnt flush
22:20 < str1ngs> I assume print and println are just keywords to fmt ?
22:20 -!- sacho [~sacho@46.10.16.35] has joined #go-nuts
22:21 < skelterjohn> they don't call fmt.Println, etc
22:21 < skelterjohn> you should use fmt.Println instead
22:21 < skelterjohn> i think print() is just like C's puts()
22:22 < str1ngs> I'll read the spec on them been bugging me what the
actually do . I use them sometimes for debugging . mainly I use fmt
22:22 < skelterjohn> as in, i think it just calls C's puts() immediately for
each param
22:22 < skelterjohn> one thing that might not be obvious is that
print/println write to stderr
22:22 < skelterjohn> which is helpful for debugging
22:23 < vpit3833> hi, I did cd ~/go/src/ && hg pull && hg update &&
./all.bash and it ends with cmd.go:163: undefined: proc.ForkExec Error 1
22:23 < vpit3833> what am I doing wrong?
22:24 < str1ngs> vpit3833: should clean first .
22:24 < str1ngs> may not fix your problem though
22:24 -!- jbooth1 [~jay@209.249.216.2] has quit [Quit: Leaving.]
22:24 < skelterjohn> that always helps, though i don't think it should be
necessary
22:24 < skelterjohn> but, when in doubt, clean
22:25 < skelterjohn> vpit3833: what does it say when you run > which 6g
22:25 < skelterjohn> sometimes people have old copies of 6g in their PATH
22:25 < skelterjohn> they need to be nuked
22:25 < vpit3833> skelterjohn: shows /home/venk/go/bin/6g
22:25 < skelterjohn> ok, that's not the problem
22:25 < skelterjohn> let us know what happens when you run src/clean.bash
first
22:26 < skelterjohn> and if it still doesn't work, put the entire output in
pastebin.com
22:27 < str1ngs> skelterjohn: lol I just read the spec on print and
println..  pretty much so sum them up.  dont use them.
22:27 < skelterjohn> yes :)
22:27 < str1ngs> derp
22:28 -!- sjbrown [~sjbrown@dsl081-072-059.sfo1.dsl.speakeasy.net] has joined
#go-nuts
22:29 < str1ngs> fmt.Printf("foo\n") flushes but fmt.Printf("foo") wont
22:29 < vpit3833> skelterjohn: which part of the output should I paste?  I
did ./clean.bash && ./all.bash from ~/go/src and the error I reported still
reappears
22:30 < skelterjohn> the last 50 lines or so
22:30 < skelterjohn> that's all i'd look at anyway :)
22:32 < vpit3833> I pasted at http://pastie.org/1676339
22:32 -!- sjbrown [~sjbrown@dsl081-072-059.sfo1.dsl.speakeasy.net] has quit [Ping
timeout: 240 seconds]
22:33 < vpit3833> I run a Debian testing system which I did upgrade before
updating the Go sources..  could it have done something?
22:35 -!- slashus2 [~slashus2@74-141-110-130.dhcp.insightbb.com] has quit [Quit:
slashus2]
22:37 < str1ngs> ah exp/ogle
22:37 < str1ngs> exp is experimental
22:37 < str1ngs> iirc
22:38 < str1ngs> vpit3833: have you tried with release?
22:38 -!- kingfishr [~kingfishr@c-98-207-87-183.hsd1.ca.comcast.net] has quit
[Ping timeout: 255 seconds]
22:38 < vpit3833> I just did, it is still building
22:38 < str1ngs> kk
22:39 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
22:43 < vpit3833> str1ngs: release passed, the other branch never gave
error, so I almost forgot about the release :)
22:44 < skelterjohn> aha, there you go
22:44 < skelterjohn> however, it might be worth reporting this as an issue
22:45 -!- kingfishr [~kingfishr@c-98-207-87-183.hsd1.ca.comcast.net] has joined
#go-nuts
22:46 < vpit3833> reporting?  on the mailing list you mean?
22:47 < skelterjohn> no - on the issue tracker
22:47 < skelterjohn> go.googlecode.com
22:47 < skelterjohn> url is in the topic
22:49 < skelterjohn> fwiw ogle builds fine on my machine, darwin_amd64
22:53 < vpit3833> hm, so there is a chance something in the Debian upgrade
could have caused the error?
22:54 -!- iant [~iant@nat/google/x-ozepxblketpxztrx] has quit [Quit: Leaving.]
22:54 < skelterjohn> no idea what would have caused it
22:55 < skelterjohn> well, that's not entirely true
22:55 < skelterjohn> ForkExec was removed recently
22:55 < skelterjohn> :)
22:55 < skelterjohn> report and issue
22:55 < skelterjohn> s/and/an/
22:56 < vpit3833> sure
22:56 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has quit [Ping
timeout: 248 seconds]
22:59 < steven> skelterjohn: but how would you do a soft shutdown?
23:00 < skelterjohn> there are a number of ways.  i don't write many web
servers, so i don't know what the standard is
23:00 < skelterjohn> maybe catching the signal from ^c
23:00 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
23:00 < skelterjohn> maybe type a special message on stdin
23:00 < skelterjohn> *shrug*
23:02 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has joined
#go-nuts
23:04 -!- kingfishr [~kingfishr@c-98-207-87-183.hsd1.ca.comcast.net] has quit
[Ping timeout: 255 seconds]
23:05 < str1ngs> hmm this is really strange.  even if I write to /dev/stderr
it wont flush even if I sync it
23:05 -!- kingfishr [~kingfishr@c-98-207-87-183.hsd1.ca.comcast.net] has joined
#go-nuts
23:05 < str1ngs> only if I use \n will it flush
23:05 < skelterjohn> how do you "sync" it?
23:05 < str1ngs> f.Sync()
23:05 < skelterjohn> no idea :)
23:07 < steven> thats not what i mean
23:07 < steven> i know i can catch sigint
23:07 < steven> i mean, ow would one go about telling a net.Conn object to
stop listening but not cancel current connections, vai the http package?
23:08 < skelterjohn> oh - i was suggesting not canceling current connections
23:08 < skelterjohn> just stop listening for new ones, and wait for the
current ones to finish
23:08 < skelterjohn> if they're hung for some reason, then do a hard kill
23:08 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
23:08 < skelterjohn> duh - reading comprehension
23:08 < skelterjohn> sorry
23:08 < skelterjohn> one sec
23:09 < skelterjohn> you can call Close() on the listener
23:09 < skelterjohn> which is what you're passing to http.Serve
23:10 < steven> ah.
23:10 < steven> i was using http.ListenAndServe hehe
23:11 < skelterjohn> :)
23:13 < steven> hmm i wonder how godoc dos it
23:13 < steven> after all, it runs golang.org
23:13 -!- mulander [mulander@078088239019.lubin.vectranet.pl] has left #go-nuts []
23:15 -!- iant [~iant@nat/google/x-fehhwdfzpfntbacu] has joined #go-nuts
23:15 -!- mode/#go-nuts [+v iant] by ChanServ
23:16 < steven> huh..  godoc just uses ListenAndServe also
23:16 < steven> they dont seem to catch any signals or anything
23:17 < skelterjohn> not surprised
23:17 < steven> hey iant how would you gracefully stop a server being run
with http package so that existing connections get to finish their jobs before the
app quits?
23:18 < exch> probably too much of a hassle for an edge case like that
23:18 < exch> How often do you quit a webserver in a live environment?
23:18 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Remote
host closed the connection]
23:19 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
23:19 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Client
Quit]
23:19 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
23:20 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Quit: Venom_X]
23:22 < steven> every time you deploy.
23:23 < steven> every month at my job.
23:24 -!- shakesoda [~colby@c-24-19-215-56.hsd1.wa.comcast.net] has quit [Quit:
shakesoda]
23:24 -!- rlab_ [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
23:25 -!- m4dh4tt3r
[~Adium@75.144.24.109-BusName-walnutcreek.ca.hfc.comcastbusiness.net] has quit
[Quit: Leaving.]
23:27 < skelterjohn> rails doesn't do fancy dynamic loading?
23:30 -!- iant [~iant@nat/google/x-fehhwdfzpfntbacu] has quit [Quit: Leaving.]
23:30 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
23:33 < str1ngs> steven: what you are deploying though?  new go packages?
23:33 -!- iant [~iant@67.218.107.6] has joined #go-nuts
23:33 -!- mode/#go-nuts [+v iant] by ChanServ
23:34 < str1ngs> anyways best way to do this imo is to reverse proxy your go
apps.  deploy the new apps and then move the proxy over.  and let the front
webserver handle it
23:35 -!- zimsim [~simon@87.72.77.195] has quit [Remote host closed the
connection]
23:36 -!- m4dh4tt3r [~Adium@154.sub-75-208-216.myvzw.com] has joined #go-nuts
23:36 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
23:38 < steven> str1ngs: websites.
23:42 -!- iant [~iant@67.218.107.6] has quit [Quit: Leaving.]
23:42 -!- iant [~iant@67.218.107.6] has joined #go-nuts
23:42 -!- mode/#go-nuts [+v iant] by ChanServ
23:44 < str1ngs> steven: so just static contect through ListenAndServe?
23:44 < str1ngs> content*
23:45 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net]
has quit [Ping timeout: 240 seconds]
23:48 -!- shakesoda [~colby@c-67-168-136-89.hsd1.wa.comcast.net] has joined
#go-nuts
23:50 -!- camnaes [~cm@c-76-100-200-8.hsd1.md.comcast.net] has quit [Quit: ]
23:53 < steven> str1ngs: no.
23:54 < steven> dyanamic apps like rails.
23:58 -!- nixness [~dsc@78.100.168.186] has quit [Quit: Leaving]
--- Log closed Wed Mar 16 00:00:55 2011