--- Log opened Tue May 17 00:00:23 2011
--- Day changed Tue May 17 2011
00:00 < Tonnerre> uriel: hum, where?  I didn't find any; just the hint that
there's a Go patch for libthrift
00:02 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
00:02 < uriel> hmmm...  you might be right, I can't find any after looking
around for a second :/
00:02 < uriel> so maybe libthrift is the way to go :)
00:02 -!- boscop_ [~boscop@f055241211.adsl.alicedsl.de] has joined #go-nuts
00:05 -!- boscop [~boscop@g226231178.adsl.alicedsl.de] has quit [Ping timeout: 246
seconds]
00:06 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
00:12 -!- dfr|bohconf
[~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net] has quit [Remote
host closed the connection]
00:13 -!- genbattle [~nick@203-114-137-9.wir.sta.inspire.net.nz] has joined
#go-nuts
00:17 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has joined
#go-nuts
00:19 < rael_wiki> hello, I guess it's quite OS-dependent but since
goroutines are essentially threads do they get executed by different cores even
though they belong to the same process?
00:22 < genbattle> the go runtime allows you to specify how many threads and
processes your program uses i think
00:22 < genbattle> i've only ever played around with the threads value
though
00:22 < genbattle> http://golang.org/pkg/runtime/#GOMAXPROCS
00:24 < rael_wiki> genbattle: so depending on the value I set there the
compiler decides whether to build a new process or a new thread as a goroutine?
00:24 < genbattle> it's not controlled in the compiler, it's controlled by
the runtime
00:25 < genbattle> golang has a chunk of code called the runtime that it
shops with all applications that controls aspects of the application such as the
garbage collection and process/thread management
00:25 < genbattle> *ships
00:25 < genbattle> it compiles it right into the binary executables
00:26 < mjard> which is why applications start out at about a meg
00:26 < rael_wiki> interesting....
00:28 -!- danilo04 [~danilo04@rm2348358874.student.rit.edu] has joined #go-nuts
00:31 -!- moraes [~moraes@189.103.179.31] has joined #go-nuts
00:33 -!- AmourDeZombi [~jphillips@c-68-41-9-175.hsd1.mi.comcast.net] has joined
#go-nuts
00:36 -!- AmourDeZombi [~jphillips@c-68-41-9-175.hsd1.mi.comcast.net] has quit
[Client Quit]
00:37 -!- twopoint718 [~chris@fsf/member/twopoint718] has joined #go-nuts
00:38 -!- AmourDeZombi [~jphillips@c-68-41-9-175.hsd1.mi.comcast.net] has joined
#go-nuts
00:47 < kevlar> mjard: actually, that's because everything that you use is
statically linked.  The runtime is a very tiny part of the executable.
00:49 < mjard> ok, runtime + standard library
00:51 < kevlar> mjard: not really even the standard library; only what you
use.
00:51 < mjard> right
00:53 < mjard> no imports: -rwxrwxr-x 1 mjard mjard 224K May 16 17:56 6.out
00:53 < kevlar> now, as soon as you import "fmt" your exe goes from 224K to
1M, lol
00:53 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
00:53 < kevlar> (an empty C executable is something like 10-15k)
00:54 -!- boscop_ [~boscop@f055241211.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
00:54 -!- gmilleramilar1 [~gmiller@cpe-67-247-23-50.nyc.res.rr.com] has joined
#go-nuts
00:55 < gmilleramilar1> does gotest look for packages in GOPATH?
00:55 -!- boscop_ [~boscop@f055196092.adsl.alicedsl.de] has joined #go-nuts
01:01 -!- genbattle [~nick@203-114-137-9.wir.sta.inspire.net.nz] has quit [Quit:
Leaving]
01:03 < rael_wiki> um...  now I have another question.  As far as I have
understood the runtime environment decides whether to create a new process or a
new thread for each goroutine, right?
01:03 < kevlar> no
01:03 < kevlar> goroutines are completely decoupled from OS threads
01:03 < kevlar> and the runtime never creates new processes
01:04 < rael_wiki> kevlar: um...  then what's going on when I start a
goroutine?
01:04 < kevlar> depending on the number processors in GOMAXPROCS, the
runtime will schedule any unblocked goroutine on any available processor (read:
thread) whenever that processor's goroutine yields control.
01:05 < rael_wiki> ok
01:06 < kevlar> !gofaq goroutines
01:06 < GoBIR_> kevlar: Q. goroutines -
http://golang.org/doc/go_faq.html#goroutines
01:06 < GoBIR_> kevlar: Q. closures and goroutines -
http://golang.org/doc/go_faq.html#closures_and_goroutines
01:06 < rael_wiki> kevlar: um...  scheduling on available processors isn't
an OS task?
01:06 < rael_wiki> ok now I check the links
01:07 < kevlar> There are also some caveats to be aware of when using
GOMAXPROCS > 1:
01:07 < kevlar> !gofaq concurrency
01:07 < GoBIR_> kevlar: Q. Concurrency -
http://golang.org/doc/go_faq.html#Concurrency
01:08 < kevlar> rael_wiki: Scheduling on multiple processors uses OS
tasks/threads, yes, but a goroutine is not a thread.  Goroutines can move between
threads and share an address space with any other goroutine that has, will, or is
executing on that thread.
01:10 < kevlar> (I might also point out that, at present, Go on AppEngine
only supports one thread of execution.)
01:12 < rael_wiki> kevlar: ok, I'm following you but I don't get how the
runtime can decide about the scheduling of the routines, which should be decided
by the OS scheduler
01:12 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
joined #go-nuts
01:12 -!- GoBIR_ [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
quit [Read error: Connection reset by peer]
01:14 -!- dju__ [dju@fsf/member/dju] has quit [Read error: Connection reset by
peer]
01:14 -!- dju_ [dju@fsf/member/dju] has joined #go-nuts
01:15 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
01:16 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Remote
host closed the connection]
01:18 < kevlar> rael_wiki: the OS scheduler handles scheduling threads.  The
Go runtime handles multiplexing all of your goroutines onto the OS threads.
01:18 < kevlar> For instance, if you have a goroutine that's waiting for the
disk to spin up, the runtime can schedule another routine that's sending something
over the network while it's waiting
01:19 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
01:19 < kevlar> or, commonly, if you have a goroutine that's waiting on a
read from a channel, the runtime can schedule another goroutine (possibly the one
who's going to write to that channel) to run while it waits
01:20 -!- gmilleramilar1 [~gmiller@cpe-67-247-23-50.nyc.res.rr.com] has left
#go-nuts []
01:21 < rael_wiki> kevlar: ok, now I got how it's done, I still have a doubt
anyway: as far as I know (but maybe it's OS-dependent) different processes can use
different cores but the threads of a single process will always be run on the same
core of the process they belong, right?
01:22 -!- boscop_ [~boscop@f055196092.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
01:23 < rael_wiki> I mean: if my program creates 2 goroutines that don't get
blocked theese two goroutines will execute on the same proc core, there's no way
for them to execute on different cores, right?
01:25 -!- boscop_ [~boscop@g227144043.adsl.alicedsl.de] has joined #go-nuts
01:26 -!- achoo [~achoo@host-134-71-204-221.allocated.csupomona.edu] has quit
[Quit: achoo]
01:30 -!- aho [~nya@fuld-590c644d.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
01:38 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
01:40 -!- AmourDeZombi [~jphillips@c-68-41-9-175.hsd1.mi.comcast.net] has left
#go-nuts ["sleep"]
01:43 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
01:51 < kevlar> rael_wiki: rael_wiki no, goroutines are COMPLETELY decoupled
from the OS thread
01:52 < kevlar> You can lock them on a core if you want, but that's
abnormal.
01:53 -!- achoo [~achoo@host-134-71-203-246.allocated.csupomona.edu] has joined
#go-nuts
01:53 < kevlar> rael_wiki: any goroutine that can execute will execute on
whatever thread the runtime can schedule it on.
01:53 < kevlar> Just start writing programs and see how it all works.  I
think you'll find that the runtime is a lot better than you might worry.
01:55 < rael_wiki> kevlar: ok, thank you for the explanations
02:01 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has quit [Quit:
ChatZilla 0.9.86.1 [Iceweasel 3.5.19/20110430164311]]
02:04 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has quit [Ping timeout: 240
seconds]
02:06 -!- bthomson [~bthomson@pool-71-114-64-197.washdc.dsl-w.verizon.net] has
quit [Quit: WeeChat 0.3.3-dev]
02:10 -!- ab3 [~abe@83.101.90.66] has quit [Ping timeout: 276 seconds]
02:18 -!- twopoint718 [~chris@fsf/member/twopoint718] has quit [Ping timeout: 250
seconds]
02:23 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has joined #go-nuts
02:23 -!- ab3 [~abe@83.101.90.66] has joined #go-nuts
02:35 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
02:54 -!- kr [~Keith@204.14.152.118] has quit [Ping timeout: 246 seconds]
03:03 -!- achoo [~achoo@host-134-71-203-246.allocated.csupomona.edu] has quit
[Quit: achoo]
03:04 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Read
error: Connection reset by peer]
03:04 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
03:12 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 263 seconds]
03:15 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
03:21 -!- allengeorge_ [~allengeor@c-24-7-17-50.hsd1.ca.comcast.net] has joined
#go-nuts
03:24 -!- danilo04 [~danilo04@rm2348358874.student.rit.edu] has quit [Ping
timeout: 240 seconds]
03:25 -!- allengeorge [~allengeor@c-24-7-17-50.hsd1.ca.comcast.net] has quit [Ping
timeout: 260 seconds]
03:26 -!- achoo [~achoo@71-80-179-102.dhcp.wsco.ca.charter.com] has joined
#go-nuts
03:31 -!- achoo [~achoo@71-80-179-102.dhcp.wsco.ca.charter.com] has quit [Client
Quit]
03:33 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has quit [Ping timeout: 246
seconds]
03:37 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
03:58 -!- danilo04 [~danilo04@rm2348358874.student.rit.edu] has joined #go-nuts
03:59 -!- alc [~arx@222.128.150.92] has joined #go-nuts
04:01 -!- dfr|bohconf
[~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net] has joined
#go-nuts
04:11 -!- danilo04 [~danilo04@rm2348358874.student.rit.edu] has quit [Quit:
Saliendo]
04:13 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:15 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:15 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:17 -!- gaxxx [~woo@219.143.166.16] has quit [Ping timeout: 260 seconds]
04:18 -!- gaxxx [~woo@li119-190.members.linode.com] has joined #go-nuts
04:18 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Leaving...]
04:24 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
04:33 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
04:39 -!- alc [~arx@222.128.150.92] has quit [Read error: Connection reset by
peer]
04:39 -!- alc [~arx@222.128.150.92] has joined #go-nuts
04:40 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #go-nuts
04:41 -!- CodeWar [~KRTsdfsd@c-24-23-206-137.hsd1.ca.comcast.net] has joined
#go-nuts
04:45 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has quit
[Quit: gtaylor]
04:58 -!- keithcascio [~keithcasc@nat/google/x-ctkgrgeplirnptth] has quit [Quit:
Leaving]
05:02 -!- virtualsue [~chatzilla@nat/cisco/x-huaqqowbnjuknful] has quit [Ping
timeout: 264 seconds]
05:10 -!- dfr|bohconf
[~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net] has quit [Remote
host closed the connection]
05:14 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has left #go-nuts
["Leaving"]
05:18 -!- CodeWar [~KRTsdfsd@c-24-23-206-137.hsd1.ca.comcast.net] has quit [Quit:
Leaving]
05:25 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has joined #go-nuts
05:27 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 246
seconds]
05:30 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
05:49 -!- photron [~photron@port-92-201-222-15.dynamic.qsc.de] has joined #go-nuts
05:58 -!- monsieur_max [~monsieur_@212.234.251.58] has joined #go-nuts
06:09 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
06:12 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
06:17 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
06:26 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:34 -!- wrtp [~rog@92.17.93.207] has joined #go-nuts
06:44 -!- kris928 [~kris928@c-71-202-36-215.hsd1.ca.comcast.net] has joined
#go-nuts
06:52 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
06:55 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
06:59 -!- Project_2501 [~Marvin@82.84.80.208] has joined #go-nuts
07:04 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
07:04 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Remote
host closed the connection]
07:04 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
07:06 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
07:06 -!- nictuku [~yvesj@unaffiliated/nictuku] has quit [Ping timeout: 240
seconds]
07:11 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
07:19 -!- slav0nic [~o@pdpc/supporter/student/slav0nic] has joined #go-nuts
07:19 -!- slav0nic [~o@pdpc/supporter/student/slav0nic] has left #go-nuts
["Ухожу"]
07:27 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 260 seconds]
07:31 -!- randfur [~androirc@58.145.148.114] has joined #go-nuts
07:37 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Quit: Lost
terminal]
07:38 -!- Ekspluati [5b9c45fc@gateway/web/freenode/ip.91.156.69.252] has joined
#go-nuts
07:42 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
07:48 -!- kris928 [~kris928@c-71-202-36-215.hsd1.ca.comcast.net] has quit [Remote
host closed the connection]
07:50 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Read
error: Operation timed out]
07:54 -!- randfur [~androirc@58.145.148.114] has quit [Ping timeout: 240 seconds]
07:59 -!- moraes [~moraes@189.103.179.31] has quit [Ping timeout: 260 seconds]
08:04 -!- gaxxx [~woo@li119-190.members.linode.com] has quit [Ping timeout: 246
seconds]
08:07 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
08:18 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:21 -!- chowmeined [~chow@unaffiliated/chowmeined] has quit [Ping timeout: 248
seconds]
08:22 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
08:23 -!- chowmeined [~chow@unaffiliated/chowmeined] has joined #go-nuts
08:25 -!- gaxxx [~woo@219.143.166.16] has joined #go-nuts
08:32 -!- gregschlom [~quassel@187.118.210.62.te-dns.org] has joined #go-nuts
08:38 < tav> hmz
08:38 < tav> anyone around ?
08:38 < str1ngs> hello tav
08:38 < tav> hey str1ngs!
08:38 < tav> thanks again for the github poke btw
08:38 < str1ngs> np
08:40 < Ekspluati> How can I use cgo on Winodws?
08:45 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 248 seconds]
08:49 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
08:49 < ww> tav!
08:49 < wrtp> Ekspluati: i don't think cgo works on Windows
08:49 < tav> hey ww...
08:49 < tav> apologies, have we met?
08:50 < ww> briefly passed by your place in london a year or more ago with
zool
08:50 < ww> actually...  maybe that was two or three years ago...
08:50 * ww remembers something vague about nutella
08:50 < tav> ah
08:51 < tav> hehe
08:51 < tav> hey =)
08:51 < tav> you have a good memory!
08:51 < tav> how is zool nowadays?  haven't seen her in ages!
08:52 < ww> she's quite well
08:52 < ww> rewriting plex (?) in go?
08:52 < tav> well, it's called "ampify" now, and yes =)
08:52 < wrtp> you guys london based?
08:53 < tav> wrtp: aye, you?
08:53 < ww> edinburgh, me
08:53 < wrtp> newcastle, not far :-)
08:53 < tav> perhaps we should do a golang uk get-together?
08:53 < wrtp> i think that's a great idea
08:53 < wrtp> there will be at least three of us!
08:53 < tav> mid-summer maybe?  when there's nothing else happening
08:54 < wrtp> this summer's totally mad for me
08:54 < tav> oh?
08:54 < wrtp> not a chance until at least sept
08:54 < tav> !!
08:54 < wrtp> going away, getting married, possible new job...
08:55 < tav> oooh, congrats man!
08:55 < wrtp> ta
08:55 < tav> major life changes
08:55 < wrtp> i still think a uk golang get-together is a great idea
08:56 < tav> yup, we should do it
08:56 < tav> when's good for you?
08:56 < tav> mid-sept?
08:56 * ww suggests somewhere south of me and north of tav
08:57 < wrtp> newcastle?  :-)
08:57 < tav> wait, there is no north of the M25 ;p
08:57 < wrtp> infinity or not-a-number?
08:58 < wrtp> i'll have to hold off any commitment until certain things are
sorted out
08:58 < wrtp> october is probably a better bet.  yeah i know it's ages away.
08:58 < tav> heh!
08:59 < tav> and then in the winter of 2012, the golang gathering finally
took place =)
09:00 < ww> might be worthwhile to send a note to the list to find out if
there are any more of us on this little island
09:01 < wrtp> good idea
09:01 < tav> aye
09:02 < tav> did any of you follow the nosql summer thing last year?
09:02 < tav> was an interesting experience
09:03 < wrtp> haven't heard of it
09:03 < wrtp> link?
09:03 < tav> http://nosqlsummer.org/
09:04 < wrtp> interesting.  i haven't encountered nosql as a term before
09:05 < wrtp> no newcastle or edinburgh there :-)
09:05 < tav> it was useful a few years ago — unfortunately, it's so overused
by now to mean pretty much anything and has thus lost all meaning
09:06 < ww> graph databases are popular at ed.ac.uk these days
09:06 < tav> ever play with the one that the microsoft dudes worked on?
09:06 < tav> it actually looked quite interesting, but never managed to get
round to checking it out
09:06 < tav> http://research.microsoft.com/en-us/projects/trinity/
09:07 < ww> no, i generally can't or won't run microsoft things
09:07 < tav> sure, but this one did look interesting and microsoft research
is quite a different beast to big daddy
09:09 < wrtp>
ThreadPool.QueueUserWorkItem(newWaitCallback(PassActionScript), tp));
09:09 < wrtp> snippet from some of the C# code on that site
09:10 < wrtp> how to do c <- x in C#
09:10 < tav> hehe
09:11 < Namegduf> Seems as elegant as doing anything in a Java-derived
language
09:16 < uriel> 08:49 < wrtp> Ekspluati: i don't think cgo works on
Windows
09:16 < uriel> wrtp: cgo does work on windows, damn it
09:19 -!- akiwiguy [~akiwiguy@ip-118-90-137-188.xdsl.xnet.co.nz] has joined
#go-nuts
09:19 < wrtp> uriel: ok, good.  i'm probably misremembering some comment
from ages ago.  go develops so quickly!
09:28 -!- napsy [~luka@193.2.66.6] has quit [Quit: leaving]
09:29 < str1ngs> uriel: thanks for adding gur to cat-v I had some other
things you might want to add.  not my stuff but package related things for
archlinux
09:29 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 240 seconds]
09:30 < uriel> str1ngs: just send me an email and I will check them out when
I have time :)
09:31 < str1ngs> uriel: ok thanks
09:31 < uriel> thank to you for doing the work :)
09:31 < str1ngs> ah np.  not I could just get them to take my patch to fix
godoc in the gc package
09:32 < str1ngs> now*
09:32 < ww> is this the godoc symlink patch or something else?
09:32 < ww> (did that ever go in?)
09:32 < str1ngs> for archlinux?
09:33 < ww> well...  anywhere...  i think that was in the context of a
debian or ubuntu bug report...  but made the patch for by freebsd development host
because i like to ln -s ~/src/foo ~/go/src/pkg/foo
09:34 < ww> probably you're talking about something different
09:34 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
09:34 < str1ngs> ya might not be related.  but my guess is ubuntu and debian
have simular issue packaging
09:35 < str1ngs> anyways the archlinux package godoc does not work at all.
and it could in theory work just not very FHS friendly
09:35 < ww> actually that was rejected f(before the patch was submitted) or
imo dumb reasons: http://code.google.com/p/go/issues/detail?id=1540
09:36 -!- TheMue_ [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined
#go-nuts
09:38 < str1ngs> https://bugs.archlinux.org/task/19730
09:38 < str1ngs> only been a year :(
09:39 -!- milkline [~chatzilla@218.240.155.99] has joined #go-nuts
09:39 -!- moraes [~moraes@189.103.179.31] has joined #go-nuts
09:41 < milkline> hello everybody, I'm new here
09:42 < milkline> can you tell me how can i get the 5g and 5l command on a
i386 machine?
09:42 < Tonnerre> GOARCH=
09:42 < milkline> of cause i set this GOARCH=arm
09:43 < milkline> but i still got 8g 8l
09:44 -!- virtualsue [~chatzilla@nat/cisco/x-vmotawhaonvhahyl] has joined #go-nuts
09:44 < milkline> anybody can help me on this?
09:45 -!- rovieJR [~rovie@cpe-98-30-33-49.woh.res.rr.com] has joined #go-nuts
09:47 -!- rovieJR [~rovie@cpe-98-30-33-49.woh.res.rr.com] has left #go-nuts
["Ex-Chat"]
09:49 < jnwhiteh> milkline: I just ran GOARCH=arm ./make.bash and it build
5g/5l
09:49 < jnwhiteh> its very likely you didn't set the environment variable
properly
09:50 < str1ngs> milkline: did you export it?
09:52 < milkline> but I set this like you did
09:53 < jnwhiteh> run set | grep GOARCH
09:54 < jnwhiteh> if you didn't do that it wasn't properly exported.  You
can do "export GOARCH=arm" and it should show up
09:54 < milkline> you mean before or after ./all.bash?
09:54 < jnwhiteh> until you get it working, I'd just do ./make.bash instead
of ./all.bash
09:54 < jnwhiteh> to avoid all the testing/etc.
09:54 < jnwhiteh> so run export GOARCH=arm
09:54 < jnwhiteh> and then ./make.bash
09:55 < milkline> ok,i see, i'll try this
09:55 < milkline> thank you
09:56 < milkline> and if i want both 8g and 5g, i set twice,right?
09:56 < jnwhiteh> no
09:56 < jnwhiteh> you'd have to both of those twice
09:56 < jnwhiteh> for each architecture you want
09:57 < jnwhiteh> err, you need to export GOARCH and then run make.bash for
each architecture you'd want.
09:57 -!- snearch [~snearch@f053006158.adsl.alicedsl.de] has joined #go-nuts
09:57 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
09:57 < milkline> yes, i meaned what you said,:)
09:57 < milkline> thank you
09:57 < Tonnerre> meant
09:57 < milkline> ok
09:57 < milkline> sorry
09:58 < Tonnerre> No reason to get apologetic :)
09:58 < milkline> for my bad english
09:59 < milkline> btw, do i need do these as root or user?
10:00 < jnwhiteh> don't see why you would need to do them as root
10:00 < jnwhiteh> that depends on where your GOBIN/GOROOT is set to
10:00 < jnwhiteh> if the user can write to both of those, then user is fine.
10:01 < milkline> ok, but i compiled fail
10:02 < jnwhiteh> what error message are you getting?
10:03 -!- shvntr [~shvntr@116.26.128.56] has joined #go-nuts
10:03 < milkline> "/home/milkline/go/src/cmd/5l/asm.c:292:6: error: variable
'strtabsize' set but not used [-Werror=unused-but-set-variable]
10:03 < milkline> /home/milkline/go/src/cmd/5l/asm.c:291:17: error: variable
'w' set but not used [-Werror=unused-but-set-variable]
10:03 < milkline> /home/milkline/go/src/cmd/5l/asm.c:291:9: error: variable
'va' set but not used [-Werror=unused-but-set-variable]
10:03 < milkline> cc1: all warnings being treated as errors
10:03 < milkline> make[1]: *** [asm.o] Error 1
10:03 < milkline> make[1]: Leaving directory `/home/milkline/go/src/cmd/5l'
10:03 < jnwhiteh> whoa.
10:03 < milkline> make: *** [5l.install] Error 2
10:04 < milkline> make: *** Waiting for unfinished jobs...."
10:04 < jnwhiteh> please don't paste them here..
10:04 < jnwhiteh> use a pastey site like pastebin.ca and friends
10:04 < jnwhiteh> I'm not sure why you are getting those errors
10:05 < milkline> anyway, i'll try it tommorrow.  thank you all
10:06 < milkline> i‘m getting off work and go back home
10:06 < milkline> see you
10:06 -!- milkline [~chatzilla@218.240.155.99] has quit [Quit: ChatZilla 0.9.86.1
[Firefox 4.0.1/20110429133311]]
10:07 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined #go-nuts
10:07 -!- TheMue_ [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
10:16 < jnwhiteh> is a map ever compacted if elements are removed?
10:17 -!- akiwiguy [~akiwiguy@ip-118-90-137-188.xdsl.xnet.co.nz] has quit [Ping
timeout: 240 seconds]
10:21 -!- ctimmerm [~ctimmerm@83.150.80.193] has joined #go-nuts
10:22 -!- alehorst [~alehorst@189.114.234.79.dynamic.adsl.gvt.net.br] has joined
#go-nuts
10:27 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
10:29 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Client Quit]
10:37 < manveru> jnwhiteh: doesn't look like...
10:37 < jnwhiteh> ah well, I'll deal with that for now, thanks =)
10:37 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
10:37 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined #go-nuts
10:38 < wrtp> jnwhiteh: the code's in runtime/hashmap.c.  at first glance it
doesn't look like it does, as manveru says
10:38 < manveru> my C might be horribly off...
10:38 < jnwhiteh> thanks, I didn't know if anyone knew off the top of their
head.  Sorry for being lazy =)
11:07 -!- TheMue_ [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined
#go-nuts
11:07 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
11:13 -!- Fish- [~Fish@coss6.exosec.net] has quit [Quit: So Long, and Thanks for
All the Fish]
11:13 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
11:19 -!- alehorst [~alehorst@189.114.234.79.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 246 seconds]
11:20 < taruti> Is there a way to get uintptr with 8c without includes?
11:22 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
11:23 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Client Quit]
11:23 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
11:24 -!- hernan43 [~ray@dev.reslife.msu.edu] has quit [Quit: Ex-Chat]
11:29 -!- alehorst [~alehorst@201.47.22.33.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:38 -!- tncardoso [~thiago@189.59.181.197.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:38 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
11:38 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined #go-nuts
11:38 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
11:39 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has joined #go-nuts
11:39 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
11:40 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Client
Quit]
11:41 -!- alehorst [~alehorst@201.47.22.33.dynamic.adsl.gvt.net.br] has quit [Ping
timeout: 246 seconds]
11:47 -!- tncardoso [~thiago@189.59.181.197.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 246 seconds]
11:56 -!- alehorst [~alehorst@189.114.239.84.dynamic.adsl.gvt.net.br] has joined
#go-nuts
12:00 -!- tncardoso [~thiago@189.115.131.65] has joined #go-nuts
12:04 -!- cw [~anticw@parsec.stupidest.org] has quit [Ping timeout: 240 seconds]
12:05 -!- cw [~anticw@parsec.stupidest.org] has joined #go-nuts
12:08 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
#go-nuts
12:08 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
12:08 < hallas> greets
12:08 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined #go-nuts
12:11 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
12:11 < taruti> Is there a better way to allocate N bytes than
unsafe.NewArray(byte(0), N) ?
12:12 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
12:13 < wrtp> taruti: make([]byte, N) ?
12:13 < taruti> wrtp: thanks.  need more coffee :(
12:13 < wrtp> np
12:14 < hallas> taruti: an odd question indeed
12:14 -!- dfr|bohconf
[~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net] has joined
#go-nuts
12:14 < hallas> taruti: you looking at the unsafe package before reading the
documentation?
12:23 -!- gaxxx [~woo@219.143.166.16] has quit [Read error: Connection reset by
peer]
12:24 < wrtp> hallas: taruti is currently obsessed with cache efficiency :-)
12:31 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
12:34 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
12:37 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
12:39 -!- TheMue_ [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined
#go-nuts
12:39 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
12:41 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
12:43 -!- frW [~frW@smartit.se] has joined #go-nuts
12:43 -!- frW [~frW@smartit.se] has left #go-nuts []
12:46 < electro> I have a bigEndian in the form of a bytearray [0 0 4 210]
(=1234), how would i go about parsing that and getting a int out of it?
12:47 < electro> imageSize := fmt.Sprintf("%s",bytesFileSize)
12:47 < electro> imageSizeInt64, err := strconv.Atoi64(imageSize)
12:47 < electro> is not working too well
12:47 -!- dfr|bohconf
[~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net] has quit [Remote
host closed the connection]
12:48 < wrtp> electro: binary.BigEndian.Uint32(bytes)
12:48 < wrtp> (from the encoding/binary package)
12:49 < hallas> yes that package is godsend
12:54 < hallas> If you're reading that BigEndian bytearray from a network
stream, you might aswell use the binary package to read aswell.
12:54 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
12:55 < electro> wrtp: that fixed that problem, thank you.  Need to fix some
more errors before i can try it
12:55 < electro> hallas: yes i might do just that
12:55 -!- sebastianskejoe [~sebastian@95.142.159.29] has joined #go-nuts
12:56 -!- Tasser [~freak@subtle/contributor/Tass] has left #go-nuts ["WeeChat
0.3.5-dev"]
12:58 < electro> wrtp: yes that very much solved that particular problem
12:59 < electro> thank you, very helpful answers as usual
12:59 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has joined #go-nuts
12:59 < electro> and now than im employed as a Go coder, perhaps i'll be
able to answer some questions here eventually...
13:03 < Fib> Cool, which company?
13:04 < hallas> electro: damn lucker :-)
13:04 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
13:05 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
13:09 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
13:09 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined #go-nuts
13:10 < exch> getting paid to write Go code?  nice
13:11 < wrtp> electro: nice
13:14 < electro> Fib: rather small swedish company
13:14 < electro> hallas: thank you
13:14 < electro> exch: yeah im very happy
13:14 < electro> wrtp: thank you
13:15 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 276 seconds]
13:15 -!- sunfmin [~sunfmin@115.197.37.44] has joined #go-nuts
13:15 < sunfmin> Hi
13:16 < sunfmin> How Can I convert Vector to Slice?
13:19 < exch> sunfmin: A vector is already a slice.  If you have a
StringVector, just use a type case: myslice := []string(myvector).  If it's a
Vector of interface{} values that you want to turn into a slice of type T, you
will have to manually allocate a new slice and copy the values over with the
appropriate type assertion
13:19 < exch> s/case/cast/
13:20 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
13:20 < sunfmin> Thank you very much
13:20 < wrtp> electro: np
13:21 < wrtp> sunfmin: in general, unless you want to use it to satisfy an
interface, it's not usually worth using Vector
13:21 < hallas> Not since append was added
13:23 < sunfmin> For example I wanted to load a list of Record from a
database table, I usually define a type that has field of columns of table
13:23 < sunfmin> And I want to load a list of result from a table
13:23 < sunfmin> That's easy to do with a Slice?  not a vector?
13:23 < wrtp> sunfmin: yeah
13:24 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Quit:
leaving]
13:24 < exch> vectors should really be considered deprecated imho.  There's
no real reason for them to exist anymore
13:24 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
13:24 < hallas> A vector is a slice, anything you can with a vector, you can
do with a slice
13:25 < hallas> Essentially :P
13:26 < wrtp> exch: a vector is useful because you can sort it, use it as a
heap etc
13:26 < exch> you can do that with a slice to
13:26 < wrtp> (without defining Len, Swap etc methods on it)
13:26 < sunfmin> Is that typically do like this?
https://gist.github.com/976466
13:27 < sunfmin> Or some kind of framework I can use?
13:28 < wrtp> func (v *Video) Subtitles() []Subtitle {
13:28 < wrtp> var result []Subtitle
13:28 < wrtp> result = append(result, myrow)
13:28 < sunfmin> ohh, cool
13:28 < wrtp> and bob's yer uncle
13:29 -!- snearch [~snearch@f053006158.adsl.alicedsl.de] has quit [Quit:
Verlassend]
13:29 < sunfmin> I saw somewhere it says added `append` method, but didn't
connect it to Slice, ;-)
13:31 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
13:31 < sunfmin> Does my code common in Go world, Or nobody uses MySQL if
with Go?
13:32 < sunfmin> I still trying to find something like ActiveRecord, But is
that the Go way?
13:32 < wrtp> i haven't used sql from go
13:33 < sunfmin> whats typically used?  Mongo?
13:33 < aiju> the Go way is not to use databases ;P
13:33 < exch> Ive only used sqlite in one project
13:33 < hallas> I havent used any sql yet
13:33 < fzzbt> is activerecord ORM?
13:33 < hallas> or mongo for that matter
13:34 < exch> I doubt there is anything typical.  it just depends on what
yuo need/want
13:34 -!- sebastianskejoe [~sebastian@95.142.159.29] has quit [Ping timeout: 240
seconds]
13:35 < sunfmin> yeah, I am talking about the ActiveRecord in Rails / ruby
13:35 < sunfmin> Since I am from that background.
13:38 < fzzbt> there's "gouda", but i think it's dead now.  also some other
project too whose name i cant remember
13:39 -!- TheMue_ [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined
#go-nuts
13:39 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
13:43 -!- iant [~iant@67.218.110.18] has joined #go-nuts
13:43 -!- mode/#go-nuts [+v iant] by ChanServ
13:43 < electro> sunfmin: we use mongo for our project
13:44 < sunfmin> So just use the Mongo Driver is fine?  did you abstract
some kind of library?
13:44 < fzzbt> yeah
13:44 < fzzbt> sunfmin: niemayer's driver is probably the best
13:45 -!- gtaylor [~gtaylor@99-126-136-139.lightspeed.gnvlsc.sbcglobal.net] has
joined #go-nuts
13:45 < electro> we use Garyburds driver for mongoDB, havent used niemayer
so cannot say anything about that
13:45 -!- musicMonster [~musicMons@c-98-247-221-98.hsd1.wa.comcast.net] has joined
#go-nuts
13:46 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Remote
host closed the connection]
13:46 < fzzbt> yeah, it's fairly new, but developing very quickly.
13:47 < sunfmin> One more question, Do I have to check the `err` after every
sentence I wrote?
13:47 < electro> if you dont want to check it, use _ instead of err
13:48 < electro> like:
13:48 < electro> someVar, _ := someFunc()
13:48 < sunfmin> But if something is wrong, it continue
13:48 < sunfmin> with invalid value.
13:48 <+iant> yes, checking err is a good idea
13:48 <+iant> for exactly that reason
13:48 < sunfmin> Is that too much code for err checking?
13:49 -!- shvntr [~shvntr@116.26.128.56] has quit [Quit: leaving]
13:49 <+iant> depends; the easy way is to write a check function which takes
a value of type os.Error and calls panic if the value is not nil
13:49 -!- jyxent [~jyxent@129.128.191.96] has quit [Read error: Operation timed
out]
13:49 <+iant> then you have one line per call to a function which returns an
error value
13:50 <+iant> it's hard to see a better approach overall
13:50 < sunfmin> won't be nice if it's a default behaviour?
13:50 <+iant> having every function panic on error can't be the right answer
in general
13:50 < sunfmin> ohh, right.
13:51 -!- bomboozal [~bombuzal@cpc5-newc14-2-0-cust836.gate.cable.virginmedia.com]
has joined #go-nuts
13:52 < sunfmin> It would be nice if you do: someVar, _ := someFunc(), It
doesn't panic
13:52 < sunfmin> But If you do:
13:52 < sunfmin> someVar := someFunc()
13:52 < sunfmin> It panic
13:52 < aiju> if err != nil { return err }
13:52 < aiju> is it that much?
13:52 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
13:52 < sunfmin> it's after almost every line of code right?
13:53 < aiju> no
13:53 < aiju> almost only I/O
13:53 < sunfmin> ok, So I/O is the thing make it complicated.
13:53 < jnwhiteh> you can do something like the checkerror() function that
Andrew/Russ use in their Real World Go examples if it bothers you that much =)
13:54 -!- bombuzal [~bombuzal@unaffiliated/bombuzal] has quit [Ping timeout: 246
seconds]
13:54 < sunfmin> then, checkerror() after every line of code, :-)
13:54 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 250 seconds]
13:54 < sunfmin> (every line of I/O code, ;-)
13:55 < jnwhiteh> well, shouldn't you check whether or not your program is
in an error state?
13:55 < jnwhiteh> I'm not sure why people always want to avoid that =)
13:58 < hallas> sunfmin: thing is, I/O code is error prone, in fact, thats
just life
13:58 -!- bombuzal [~bombuzal@unaffiliated/bombuzal] has joined #go-nuts
13:58 < sunfmin> yeah, lazy to decide specifically on each line of code.
13:58 < hallas> sunfmin: Code that doesnt check after every I/O state change
is bad and shouldnt be used, you need to handle those cases.  I think that
handling errors can be done in a pretty pattern none the less.
13:59 < aiju> sunfmin: so you want exceptions or something?
13:59 < aiju> what are you trying to tell us?
13:59 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts
14:00 < sunfmin> kind of get used to exception.
14:00 < sunfmin> So trying to find that.
14:00 -!- bomboozal [~bombuzal@cpc5-newc14-2-0-cust836.gate.cable.virginmedia.com]
has quit [Ping timeout: 246 seconds]
14:01 < sunfmin> Anyway, trying to learn here, not trying to argue anything.
14:02 < sunfmin> The reason that Go don't have Exception is that it's cost
too much?  for the performance reason right?
14:02 < aiju> no
14:02 -!- r_linux [~r_linux@smtp.mandique.com.br] has joined #go-nuts
14:02 < wrtp> sunfmin: the reason is that ubiquitous use of exceptions makes
for code that is hard to understand
14:03 < aiju> exception handling and concurrency don't go well with each
other
14:03 < aiju> where would an exception go if it hit the top of a goroutine?
14:03 < sunfmin> the end of goroutine?
14:03 < sunfmin> Actually I don't know.
14:04 < aiju> also, it's google coding style not to use exceptions
14:04 -!- dfr|bohconf [~dfr|work@host-12-159-175-242.bccexpo.com] has joined
#go-nuts
14:04 < aiju>
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Exceptions
14:05 < sunfmin> that's interesting, In Google's Java code also?
14:05 < aiju> no clue
14:05 < musicMonster> hi
14:08 < musicMonster> i am trying to install go, when i cd go/src terminal
returns no such file or directory, does this mean i did not fetch the repository
correctly?
14:08 < aiju> it means you are in the wrong directory ;P
14:09 < musicMonster> ok lol thanks
14:09 -!- nighty__ [~nighty@x122091.ppp.asahi-net.or.jp] has joined #go-nuts
14:09 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
14:09 -!- tncardoso [~thiago@189.115.131.65] has quit [Ping timeout: 246 seconds]
14:09 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined #go-nuts
14:10 -!- tncardoso [~thiago@189.59.160.82] has joined #go-nuts
14:12 -!- alc [~arx@222.128.150.92] has quit [Remote host closed the connection]
14:13 < musicMonster> ok this is gonna sound real dumb im sure, but do you
know which directory im supposed to be in?  The install page does not seem to
clarify.  http://golang.org/doc/install.html#install
14:13 < hallas> go into the src folder
14:13 < hallas> in the go folder that you fetched with mercurial
14:14 < hallas> musicMonster: and nothing is dumb
14:14 <+iant> following the instructions precisely should work, so look
carefully at anything you might have done differently
14:14 < musicMonster> hallas: thank you good sir
14:16 -!- Ekspluati [5b9c45fc@gateway/web/freenode/ip.91.156.69.252] has quit
[Quit: Page closed]
14:20 -!- dfr|bohconf [~dfr|work@host-12-159-175-242.bccexpo.com] has quit [Remote
host closed the connection]
14:21 -!- dfr|bohconf [~dfr|work@host-12-159-175-242.bccexpo.com] has joined
#go-nuts
14:27 -!- moraes [~moraes@189.103.179.31] has quit [Ping timeout: 240 seconds]
14:27 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Connection reset by
peer]
14:28 < mpl> so I'm having a problem with detecting an error.  I'm creating
a symlink and it can happen that this symlink already exists, in which case it's
fine and I just want to go on.  so I've done something like if err != nil && err
!= os.EEXIST { exit only in that case} ...  but I'm still tripping on the error.
I get the "file exists" error string.  any idea?
14:31 < Rennex> perhaps try (err != nil) && (err != os.EEXIST)
14:31 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
14:31 < Rennex> at least with some languages there's a gotcha regarding the
operator precedence of == and && || (or was it & | )
14:32 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
14:32 <+iant> Rennex: that is not a problem in Go, though
14:32 < Rennex> other than that, err is then probably something else than
os.EEXIST :)
14:32 < mpl> lol, thx, figured as much.
14:33 < mpl> (especially since EEXIST is supposed to be "file already
exists" not "file exists"
14:33 <+iant> mpl: os.Symlink returns a LinkError, so you need to do
something like err.Error == os.EEXIST
14:33 < gmilleramilar> mpl: I ran into this.  os.EEXIST and the return value
from Fstat or whatever are different types
14:33 < gmilleramilar> you're allowed to compare them because they both
implement os.Error.
14:34 < musicMonster> am i supposed to download go?  so i can enter go's src
folder to build it.  cause i dont see where go was downloaded.  did i not fetch
the repository correctly?
14:34 < mpl> iant, gmilleramilar kthx, trying.
14:34 <+iant> musicMonster: we don't know what you did
14:34 < Rennex> iant: it's the same problem in Go
14:34 <+iant> mpl: http://golang.org/pkg/os/#LinkError
14:35 < mpl> aah embedded error, thx.
14:35 <+iant> Rennex: the precedence of == is higher than the precedence of
&& in Go
14:35 <+iant> which is as it should be
14:35 < sunfmin> another question: https://gist.github.com/976466
14:36 < Rennex> iant: yeah but lower than & and |, so that can be a gotcha?
well i'm not sure, i don't remember the problematic cases :)
14:36 < sunfmin> FeliMac:perapera sunfmin$ make
14:36 < sunfmin> 6g -o _go_.6 perapera.go
14:36 < sunfmin> perapera.go:72: append(result, myrow) not used
14:36 < sunfmin> make: *** [_go_.6] Error 1
14:36 <+iant> Rennex: the problematic case is C, in which the precedence of
& and | is lower than ==
14:36 < mpl> yeah I don't know my precedences well, but I was pretty sure I
could get away without parens for that one.
14:36 <+iant> that is surprising for many people
14:36 < prudhvi> goes go has some imap package or something?
14:37 < Rennex> iant: hmm.  oh, righty, so & and | being too low was the
problem :)
14:37 -!- GeertJohan [~Squarc@clal-0-227.eduroam.inholland.nl] has joined #go-nuts
14:37 < sunfmin> Why it says append not called in 34 line of the code?
14:37 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
14:37 < wrtp> the only reason for that in C AFAIK is that & and | were once
used as logical operators in C, before && and || existed
14:37 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
14:37 < aiju> wrtp: no, B
14:37 < aiju> C always had && and ||
14:38 < wrtp> ok
14:38 <+iant> sunfmin: you probably want result = append(result, myrow)
14:38 < aiju> wrtp: in fact, they were used for both ..  depending on the
context :)
14:38 < musicMonster> awesome forgot to sudo lol
14:39 < wrtp> aiju: not quite...  "Rapid changes continued after the
language had been named, for example the introduction of the && and || operators."
14:39 < wrtp> but you're right in essence.
14:39 -!- moraes [~moraes@189.103.179.31] has joined #go-nuts
14:39 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
14:40 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined #go-nuts
14:41 < aiju> wrtp: very very early C
14:42 < fzzbt> how did they live without && and ||
14:42 < aiju> fzzbt: & and |
14:42 < aiju> compiler hack
14:49 < wrtp> aiju: not really - short circuiting is a feature that other
languages survived without (pascal for example AFAIR)
14:50 < wrtp> and the BASIC i started with
14:50 <+iant> wrtp: but short-circuiting was on Kernighan's famous list of
problems with Pascal
14:51 < wrtp> yup, i'm not saying it was *pleasant*, just that it wasn't a
compiler hack
14:51 < aiju> what are you talking aout
14:51 < aiju> *about
14:51 < aiju> & and | were a compiler hack
14:51 <+iant> nothing that has anything to do with Go....
14:51 < aiju> they were context dependent
14:51 -!- aho [~nya@fuld-590c7b71.pool.mediaWays.net] has joined #go-nuts
14:52 < aiju> & had entirely different meanings in "if(1 & 2)" and "x = 1 &
2;"
14:52 < wrtp> really?
14:53 < wrtp> oh yeah, cool
14:53 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
14:53 < wrtp> because B did actually have short circuiting
14:55 < Soultaker> why did it have different meanings?
14:55 < Soultaker> ah wait, I see your point for | at least.
14:56 < Soultaker> and I guess due to side-effects for & too
14:56 < prudhvi> yes, why does it have different meanings?
14:56 < wrtp> Soultaker: see http://cm.bell-labs.com/who/dmr/chist.html
14:56 < wrtp> search for Neonatal C
14:56 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
15:00 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit []
15:00 -!- nighty__ [~nighty@x122091.ppp.asahi-net.or.jp] has quit [Ping timeout:
264 seconds]
15:00 -!- iant [~iant@67.218.110.18] has quit [Quit: Leaving.]
15:00 < aiju> wrtp: i'm not talking about short circuiting at all
15:00 < wrtp> aiju: no?
15:01 < wrtp> it sounds from the description like that's what was happening
15:01 < wrtp> but what were you talking about?
15:02 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has quit [Quit: ucasano]
15:03 < aiju> wrtp: i'm talking about context dependentness of the &
operator
15:03 -!- Ekspluati [5b9c45fc@gateway/web/freenode/ip.91.156.69.252] has joined
#go-nuts
15:03 < aiju> short circuiting plays a role in this, yeah
15:03 < wrtp> aiju: that's the reason for it
15:03 < aiju> not quite
15:04 < aiju> the C expressions 1 & 2 and 1 && 2 have different values
15:04 < aiju> (well, it's both a reason)
15:04 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
15:04 < aiju> e.g.  if(a & b == 2) was common for "if a is non-zero and b is
equal to 2"
15:04 < wrtp> maybe they used ~0 as true previously
15:04 < aiju> doesn't matter
15:04 < aiju> 1 & 2 is zero
15:04 < skelterjohn> freaking dinosaurs
15:05 < wrtp> :-
15:05 < wrtp> )
15:06 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
15:07 -!- rcrowley [~rcrowley@ip67-90-234-94.z234-90-67.customer.algx.net] has
joined #go-nuts
15:10 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
15:10 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined #go-nuts
15:13 -!- tncardoso [~thiago@189.59.160.82] has quit [Quit: bye]
15:14 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
15:14 < Soultaker> wrtp: thanks, that looks interesting!
15:15 -!- jarbox [~rovie@cpe-98-30-33-49.woh.res.rr.com] has joined #go-nuts
15:16 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 240 seconds]
15:17 -!- jarbox [~rovie@cpe-98-30-33-49.woh.res.rr.com] has left #go-nuts
["Ex-Chat"]
15:19 -!- virtualsue [~chatzilla@nat/cisco/x-vmotawhaonvhahyl] has quit [Ping
timeout: 246 seconds]
15:21 -!- allengeorge_ [~allengeor@c-24-7-17-50.hsd1.ca.comcast.net] has joined
#go-nuts
15:22 -!- dfr|bohconf [~dfr|work@host-12-159-175-242.bccexpo.com] has quit [Remote
host closed the connection]
15:22 -!- dfr|bohconf [~dfr|work@nat/google/x-djxpzydffdzuayhq] has joined
#go-nuts
15:23 -!- allengeorge [~allengeor@c-24-7-17-50.hsd1.ca.comcast.net] has quit [Ping
timeout: 258 seconds]
15:23 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
15:23 -!- jarbox [~rovie@cpe-98-30-33-49.woh.res.rr.com] has joined #go-nuts
15:25 < sunfmin> Does go have a MVC framework?
15:27 < skelterjohn> sure - the V is http, the M is one of the sql packages,
and then you write the C
15:27 < TheMue> sunfmin: http://golang.org/pkg/
15:27 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
15:28 < TheMue> skelterjohn: You also can take any nosql package for M.
*smile*
15:28 < skelterjohn> did you write one?  O:-)
15:28 < TheMue> skelterjohn: And C is http (the handlers) while V is
template.
15:29 < skelterjohn> sunfmin: probably in a more direct answer to your
question - MVC is not something that should be provided for you.  it serves best
as a guideline for writing your own components and helping you decide where to
draw lines of functionality
15:29 < TheMue> skelterjohn: Eh, hm, hmmpf, eeh ...  yop!
15:29 < sunfmin> ok, thanks.
15:29 < Namegduf> Design patterns are distinguished from designs in that
they are ideas for how to go about making a design, not a design in and of
themselves.
15:29 -!- wrtp [~rog@92.17.93.207] has quit [Quit: wrtp]
15:29 < sunfmin> why there are lots of MVC framework in other language
15:29 < sunfmin> like Java
15:29 < skelterjohn> because lots of people have lots of time on their hand
15:30 < skelterjohn> hands
15:30 < skelterjohn> and they think they're helping
15:30 < Namegduf> Because they simplify certain other things, depending on
the task
15:30 < Namegduf> As a side effect
15:31 < Namegduf> It is better to look for things making the specific stuff
you want to do simpler.
15:31 < musicMonster> is anyone using goclipse on linux?
15:31 < Namegduf> I don't know exactly what they do, so I couldn't advise on
how to replace them.
15:31 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
15:31 < hallas> musicMonster: nope, using vim :-)))9
15:32 < Namegduf> They could provide a template and a toolkit for building
certain kinds of application in an MVC way, but I don't really know.
15:32 < TheMue> ah, vim, the pure one and only
15:32 < hallas> simply the best
15:32 < hallas> :D
15:33 < musicMonster> so to set my environment variables is that in
/etc/environment?
15:33 < hallas> for Goclipse you should go to the preferences for the plugin
it self
15:33 < hallas> It is so you can compile with eclipse, no?
15:33 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
15:34 < musicMonster> yes but i dont believe they have a build for it yet.
its in the git hub
15:34 < jeremy_c> Anyone know how to get the pointer to a C function into a
go variable?  When I do things like v := C.strcpy (dumb example), the compiler
says I must call C.strcpy
15:36 < musicMonster> i added PATH="/home/go/bin" to /etc/environment/ but
does not allow me to use godoc.  any thoughts?
15:36 * uriel is quite convinced that MVC has become completely devoid of meaning
by now
15:36 < uriel> just as "Object Oriented"
15:37 < uriel> people have used and abused the term so much, that it is hard
to know what anyone means when they use it, other than that they want to tick a
certain checkbox to make ignorant people happy
15:37 -!- snearch [~snearch@f053006158.adsl.alicedsl.de] has joined #go-nuts
15:38 -!- virtualsue [~chatzilla@nat/cisco/x-uqglrezequnacvzf] has joined #go-nuts
15:38 * Namegduf is dubious of design patterns at the best of times
15:40 < uriel> at best "design patterns" are a sign of defficiencies in the
language
15:40 -!- TheMue [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
15:40 -!- TheMue_ [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has joined
#go-nuts
15:40 -!- gregschlom [~quassel@187.118.210.62.te-dns.org] has quit [Read error:
Connection reset by peer]
15:43 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
15:45 -!- krutcha [~krutcha@remote.icron.com] has joined #go-nuts
15:45 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Remote host closed the
connection]
15:46 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
15:49 -!- ctimmerm [~ctimmerm@83.150.80.193] has quit [Ping timeout: 240 seconds]
15:49 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
15:51 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
15:51 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
15:53 -!- rcrowley [~rcrowley@ip67-90-234-94.z234-90-67.customer.algx.net] has
quit [Quit: Computer has gone to sleep.]
15:54 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
15:54 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
15:57 -!- musicMonster [~musicMons@c-98-247-221-98.hsd1.wa.comcast.net] has quit
[Quit: #go-nuts]
15:57 -!- monsieur_max [~monsieur_@212.234.251.58] has quit [Quit: Leaving.]
16:06 -!- TheMue_ [~TheMue@wlan-hotspot-019.ewe-ip-backbone.de] has quit [Quit:
TheMue_]
16:10 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
16:11 -!- iant [~iant@nat/google/x-ilxwbbkzkefdjald] has joined #go-nuts
16:11 -!- mode/#go-nuts [+v iant] by ChanServ
16:12 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Client Quit]
16:12 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
16:16 < sunfmin> Hi again
16:16 < sunfmin> How Can I clone a type struct?
16:16 < sunfmin> I mean I have a value &Subtitle{}, I want to clone it
16:17 -!- tobier_ [~tobier@c-1e9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
16:18 -!- tncardoso [~thiago@150.164.2.20] has joined #go-nuts
16:18 -!- danilo04 [~danilo04@129.21.40.28] has joined #go-nuts
16:18 < Namegduf> There's no easy way to do a "deep copy".
16:22 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
16:22 < ebering> other than write it yourself
16:23 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
16:26 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
16:26 < sunfmin> ok, thanks.
16:26 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-148-158.clienti.tiscali.it] has
joined #go-nuts
16:27 < sunfmin> What's this mean?
16:27 < sunfmin> throw: init rescheduling
16:27 < sunfmin> I had a init like this:
16:28 < sunfmin> var db *mysql.Client
16:28 < sunfmin> func init() {
16:28 < sunfmin> db, _ = mysql.DialTCP("localhost", "root", "",
"lingotv_dev")
16:28 < sunfmin> panic(err)
16:28 < sunfmin> }
16:28 < sunfmin> */
16:28 < sunfmin> }
16:29 -!- ctimmerm [~ctimmerm@cs181050011.pp.htv.fi] has joined #go-nuts
16:29 < delinka> please use a pastebin
16:29 -!- Project_2501 [~Marvin@82.84.80.208] has quit [Ping timeout: 258 seconds]
16:31 < sunfmin> sorry, here: https://gist.github.com/976466
16:32 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Quit: leaving]
16:32 < sunfmin> https://gist.github.com/976466, Pasted the error there too
16:33 < exch> Just guessing here, but there a possible race condition
somewhere.  Trying to initialize a new connection in an init() function might
preceed the execution of necessary init()s in the mysql lib.  Put that code in
main() instead.
16:33 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
16:34 < gmilleramilar> is there any way to make gotest and goinstall play
nicely.
16:34 < gmilleramilar> ?
16:34 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
16:34 < gmilleramilar> that is gotest doesn't appear to respect GOPATH
16:35 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
16:35 < sunfmin> exch: thanks, that does solve the problem
16:36 < sunfmin> thank you guys, go to sleep now.  bye.
16:38 -!- sunfmin [~sunfmin@115.197.37.44] has quit [Quit: sunfmin]
16:39 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:39 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Remote host closed the
connection]
16:40 -!- danilo04 [~danilo04@129.21.40.28] has quit [Quit: Saliendo]
16:41 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 260 seconds]
16:42 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
16:45 -!- Ekspluati [5b9c45fc@gateway/web/freenode/ip.91.156.69.252] has quit
[Ping timeout: 252 seconds]
16:55 -!- rcrowley [~rcrowley@ip67-90-234-94.z234-90-67.customer.algx.net] has
joined #go-nuts
16:55 -!- zaero [~eclark@2001:470:1f11:b82:697f:fb72:fe0a:4828] has joined
#go-nuts
16:56 < skelterjohn> afternoon
16:57 < niemeyer> skelterjohn: yo
16:58 -!- welterde [welterde@thinkbase.srv.welterde.de] has quit [Quit: WeeChat
0.3.5-dev]
17:01 -!- monsieur_max [~maxime@ip-78.net-89-2-171.rev.numericable.fr] has joined
#go-nuts
17:05 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
17:06 -!- welterde [welterde@thinkbase.srv.welterde.de] has joined #go-nuts
17:07 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has joined
#go-nuts
17:10 < jeremy_c> Anyone with an idea to shorten up the
creation/setting/calling of a callback?
https://github.com/jcowgar/go-iup/blob/master/iup/callback.go ...  Right now I 1.
Create an extern statement for the Go func, 2.  Create a C callback that will then
call the Go func.  3.  Create a Go func that handles the disbatching to the real
Go func, 4.  Create a Go func to allow the setting of the callback.
17:10 < jeremy_c> Seems it could be trimmed somehow, just not sure where
yet.
17:10 < skelterjohn> it's not convenient right now, that's for sure
17:14 -!- Ekspluati [5b9c45fc@gateway/web/freenode/ip.91.156.69.252] has joined
#go-nuts
17:15 -!- Venom_lnch [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
quit [Quit: Venom_lnch]
17:15 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Remote host closed the
connection]
17:16 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
17:19 -!- twopoint718 [~chris@fsf/member/twopoint718] has joined #go-nuts
17:20 < skelterjohn> jeremy_c: what i'm about to suggest may be exactly what
you described - i'm having a bit of trouble following it
17:20 < skelterjohn> but what i'd do is set up an exported go function "func
DoCallback(unsafe.Pointer callback, param1 type1, param2 type2)"
17:21 < skelterjohn> foo := *(*func (param1 type1, param2 type2))(callback)
17:21 < skelterjohn> foo(param1, param2)
17:22 < skelterjohn> you'd also have to make a type for that callback so you
can wrap it in an unsafe.Pointer
17:22 < skelterjohn> since i don't think you can wrap things with anonymous
types (all top level functions) in unsafe.Pointers
17:23 -!- dfr|bohconf [~dfr|work@nat/google/x-djxpzydffdzuayhq] has quit [Remote
host closed the connection]
17:24 -!- hogst [~kvirc@blfd-4d0839e9.pool.mediaWays.net] has joined #go-nuts
17:26 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has quit [Remote host
closed the connection]
17:27 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
17:29 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:29 -!- tobier [~tobier@c-ae9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
17:30 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
17:32 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has joined #go-nuts
17:37 -!- hogst [~kvirc@blfd-4d0839e9.pool.mediaWays.net] has quit [Ping timeout:
276 seconds]
17:38 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:38 -!- danilo04 [~danilo04@rm2348358874.student.rit.edu] has joined #go-nuts
17:46 -!- tncardoso [~thiago@150.164.2.20] has quit [Quit: bye]
17:46 -!- tncardoso [~thiago@150.164.2.20] has joined #go-nuts
17:56 -!- hogst [~kvirc@blfd-4d0839e9.pool.mediaWays.net] has joined #go-nuts
17:57 -!- dfr|bohconf [~dfr|work@host-12-159-175-242.bccexpo.com] has joined
#go-nuts
17:58 -!- hogst [~kvirc@blfd-4d0839e9.pool.mediaWays.net] has quit [Client Quit]
18:00 -!- huin [~huin@91.85.171.238] has joined #go-nuts
18:02 -!- keithgcascio [~keithcasc@nat/google/x-trubcwgemlmfdsqd] has joined
#go-nuts
18:03 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
18:03 < jeremy_c> skelterjohn: here's what I do, this is everything needed
for 1 callback.  https://gist.github.com/977007
18:04 < jeremy_c> widget := iup.Button(); widget.SetMapFunc(myMapFunc);
18:04 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
18:09 -!- kr [~Keith@204.14.152.118] has joined #go-nuts
18:10 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has joined #go-nuts
18:16 -!- krutcha [~krutcha@remote.icron.com] has quit [Quit: Leaving]
18:22 -!- allengeorge [~allengeor@c-24-7-17-50.hsd1.ca.comcast.net] has quit
[Quit: allengeorge]
18:25 -!- homa_rano [~ede@30-51-251.dynamic.csail.mit.edu] has quit [Quit:
Changing server]
18:27 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
18:28 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 240
seconds]
18:29 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
18:32 -!- homa_rano [~ede@30-51-251.dynamic.csail.mit.edu] has joined #go-nuts
18:34 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has quit [Read
error: Connection reset by peer]
18:37 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
18:39 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:6126:f8f:d994:c0e1] has joined
#go-nuts
18:40 -!- GeertJohan [~Squarc@clal-0-227.eduroam.inholland.nl] has quit [Quit:
Leaving.]
18:44 -!- tux21b [~tux21b@chello213047047175.3.graz.surfer.at] has joined #go-nuts
18:45 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
18:46 -!- tobier [~tobier@c-ae9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
18:50 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 260 seconds]
18:51 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
18:52 < exch> nice.  that bit of code you pasted helped me sort out
callbacks for libglfw
18:53 < exch> @ jeremy_c
18:53 < jeremy_c> exch: great!
18:53 < exch> ya
18:54 < jeremy_c> Just hope it's a good pattern to follow :-D
18:54 < exch> I went with a slightly different approach, more suitable to my
needs.  But it works :)
18:55 < jeremy_c> exch: anywhere I can take a peek?
18:55 < exch> Not yet.  Just cleaning some stuff up and then i'll commit it
to github
18:55 < jeremy_c> k
18:55 < exch> i'll let you know when it's there
18:55 < jeremy_c> thanks.  I didn't find too many exampls on how to do this
and mine seems a bit convoluted.
18:56 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
18:56 < exch> Mine isn't any less convoluted I'm afraid :p
18:57 < jeremy_c> well, I guess for now it gets the job done.  For the end
user it's easy enough to use, so if a better way comes about as long as the API
for the user is good to start with...
19:01 < Venom_X> Hi, is there a way to typecast an int to a float64?
19:01 <+iant> Venom_X: float64(i)
19:03 -!- virtualsue [~chatzilla@nat/cisco/x-uqglrezequnacvzf] has quit [Ping
timeout: 240 seconds]
19:04 < Venom_X> iant: well, it's a bit more complex than that, I guess.
I'm getting a result from mongodb, that I had thought was going to be float64s,
however there are some ints in there.  I'm adding the results up, and my
unmarshalled result is of type bson.M which is an interface{}.  So, I get: "panic:
interface conversion: interface is int, not float64" when I try: "tally +=
float64(result["weight"].(float64))".  Any ideas?
19:05 < chomp> you could use a type switch
19:05 < hallas> Venom_X: that is code ugly code
19:06 < hallas> First of all, it looks your you're type asserting something
and then type casting it to the same type float64?
19:06 < hallas> try
19:06 < Venom_X> hallas: it is.  I had a struct before, but getting the
mongo result into a property of type float64 was problematic
19:06 < Namegduf> Venom_X: You have to still use .(int) to take the value of
the interface
19:07 < Venom_X> right.  If I don't type assert, it says I have to type
assert
19:07 < Namegduf> Because it's an int type inside the interface
19:07 < Namegduf> ANd then convert that int type to float64
19:07 < Namegduf> The type assert and type conversion are separate
operations- get the int out, then convert it.
19:07 < Namegduf> If it's clearer, you could split them onto separate lines.
19:07 < hallas> Venom_X: what namegduf says, hes a fast typer
19:07 < hallas> :-)
19:08 < chomp> switch r := result["weight"]; r.(type) { case *int: tally +=
float64(r.(int)); case *float64: tally += r.(float64) }
19:08 < Venom_X> that's what I was looking for, awesome!
19:08 < Venom_X> thanks chomp
19:08 < chomp> that may not be the best way to do it, but as a scrub go
noob, that's my offering :)
19:09 < hallas> if myint, ok := result["weight"].(float64); ok { tally +=
19:09 < hallas> woops
19:09 < hallas> Accidently pressed enter ;-)
19:09 -!- gregschlom [~quassel@187.118.210.62.te-dns.org] has joined #go-nuts
19:10 < chomp> ah yeah, forgot type assertions are multivalue and all that
19:10 < hallas> if myint, ok := result["weight"].(int); ok { tally +=
float64(myint); }
19:10 < hallas> Should do it
19:10 < chomp> ^ much nicer :)
19:10 < Venom_X> ah, hallas thanks.  I see the difference
19:10 < chomp> however that doesn't cover the case where weight is already a
float64
19:11 < chomp> assuming there are cases where it is, if i understood the
question correctly
19:11 < Venom_X> yes, there are cases where it's a float64
19:11 < hallas> Venom_X: its really odd though, if an interface{} can assert
to and int
19:11 < hallas> and not a float64
19:11 < hallas> I mean
19:12 < hallas> asserting directly with my code, to float64, should work for
ints and floats
19:12 < Namegduf> Asserts are not conversions.
19:12 < chomp> why?  you can assert an int to float64?  hat would seem
broken.
19:12 < chomp> that*
19:12 < Namegduf> Asserts assert that the type inside the interface already
is the given type
19:13 < Namegduf> And takes it out of the interface for you.
19:13 < Namegduf> It does not do any type conversion, and does not make
anything a type it wasn't before.
19:13 < Namegduf> Type conversions are completely orthagonal.
19:13 < hallas> An assert figures out if the thing inside the interface can
become what you want it to be
19:13 < Namegduf> No, it doesn't.
19:13 < hallas> ie.  satisfies interfaces etc
19:14 < hallas> Like asserting from a net.Conn to at net.TCPConn
19:14 < Namegduf> Asserting an interface is kinda special.  In general, no,
it doesn't assert if it can "become" something.
19:14 < Namegduf> It asserts if it "is" something.
19:14 < hallas> Yes that what I mean, im not expressing it well enough
19:14 < Namegduf> It meeting an interface is consider as "being" it.  But it
is not considered as being it if it is a different concrete type to the type
you're asking for.
19:15 < hallas> Namegduf: it comes down to how the compiler treats "it"
19:15 < Namegduf> More to do with how it treats "is".
19:15 < Namegduf> But yes.  And not so much the compiler as the spec.
19:16 < hallas> But then
19:16 < Namegduf> In this case, if you ask for a concrete type you will
never have it meet it if it does not contain literally that concrete type.
19:16 < Namegduf> If you ask for an interface, you will get it if the type
inside meets that interface.
19:16 < hallas> An int and a float64 wrapped in a interface{} should be able
to be asserted to a float64 with the same piece of code
19:16 < Namegduf> No, they can't.
19:16 < hallas> Ok :-(
19:17 < Namegduf> They are different types and an instance of one is not an
instance of the other.
19:17 < Namegduf> The only case the thing you pointed out is true for is
interfaces; it will NEVER work for a concrete type.
19:18 < hallas> I dont want to sound like what i am saying is fact btw :P Im
just asking qusetions sorry :P
19:18 < hallas> I was a bit uncertain how assertions worked, seems its very
low level
19:19 < Namegduf> They're fairly simple.  Ignoring interfaces, assertions
check if the type in question is inside the interface, and if it is, returns it to
you.
19:19 < Namegduf> No conversions, no magic.
19:19 < Namegduf> Pretty much what you'd expect in a strictly-typed
language.
19:22 < hallas> Ineed
19:22 < hallas> Indeed*
19:22 < hallas> It does make sense of course
19:23 < hallas> Do you know if the same thing applies for int16, int32 etc?
19:23 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 264 seconds]
19:24 -!- Ekspluati [5b9c45fc@gateway/web/freenode/ip.91.156.69.252] has quit
[Ping timeout: 252 seconds]
19:24 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
19:24 < hallas> I dont really know what sort of level of abstraction there
is regarded those types
19:24 < Namegduf> It applies to every distinct type.
19:25 < Namegduf> Those are distinct types.
19:27 < chomp> int16 is not int32.  therefore type-asserting int16 on an
int32 will fail.  there are no real subtleties or gotchas to be aware of.  a type
is a type is a type.
19:28 < chomp> even if you were to do something like: type foo int16; func
main() { var i interface{} = int16(3); i.(foo) } it would fail
19:28 < chomp> because a foo is not an int16.
19:28 < hallas> Hmm what?
19:30 -!- alehorst [~alehorst@189.114.239.84.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 246 seconds]
19:30 -!- alehorst [~alehorst@189.114.239.84.dynamic.adsl.gvt.net.br] has joined
#go-nuts
19:31 < chomp> didn't mean to confuse be bringing type declarations into the
mix :p what specifically don't you get about it
19:31 < Namegduf> If you make your own type based on an existing type
19:31 < chomp> confuse by* bringing.  augh.
19:31 < Namegduf> It is still a distinct type.
19:32 < hallas> So, its all about interfaces then :D ?
19:32 < chomp> no, it's all about types
19:32 < hallas> yes but assertion between them
19:33 < Namegduf> Assertion between interfaces is different, yes.
19:33 < chomp> a value has a concrete type.  type assertion asserts whether
or not that concrete type is a specific one.
19:33 < Namegduf> It asserts that the type meets that interface, rather than
being that interface type.
19:33 < hallas> Yes exactly
19:34 < Namegduf> Interfaces are different from concrete types there.
19:34 < chomp> i think i would prefer the two assertions to use some
differing syntax
19:35 < exch> jeremy_c: Here's how I did it
https://github.com/jteeuwen/glfw/blob/master/callback.go
19:35 < Namegduf> I think it's okay as is
19:35 < Namegduf> The assertion asserts that it meets an interface or a
specific type
19:35 < exch> In my case, the callback handlers are global to the glfw
library.  That simplifies things a bit
19:35 < chomp> surely a real dynamic type assertion can be useful for
interface types, and interface assertion could be useful for non-interface types
(e.g.  fooint.(Numeric) or somesuch)
19:35 < Namegduf> No, it'd be wrong.
19:35 < Namegduf> Interface assertion is at runtime.
19:35 < chomp> actually i retract the first part, indeed
19:36 < Namegduf> Whether a type meets an interface or not is determined at
compile-time
19:36 < Namegduf> And can be "asserted" by the type conversion, which will
fail at compile-time if it can't work, like all other type conversions.
19:37 < exch> skelterjohn: https://github.com/jteeuwen/glfw this should now
actually be useful, now that callbacks are working :)
19:38 < hallas> So how does it check?  By looking at the underlying value,
and simply sees if its fits the type to be asserted to?
19:38 < hallas> does that differ from type assertion to interface assertion?
19:38 < Namegduf> An interface is two bits.
19:38 < Namegduf> A pointer to the value, or the value if it fits in
something the same size as a pointer
19:39 < Namegduf> And a pointer to an "itable"
19:39 < Namegduf> Which contains a table of pointers to the functions
provided by the interface for that type
19:39 < Namegduf> And a pointer to a type structure
19:39 < Namegduf> Which says which type it is.
19:39 < Namegduf> This is set whenever something is stored in an interface.
19:39 < hallas> two bytes?
19:39 < Namegduf> Two words.
19:40 < Namegduf> Four bytes each on x86.
19:40 < hallas> yes yes
19:40 < Namegduf> By "bits" I meant "pieces", not bit bits.
19:40 < Namegduf> Sorry.
19:41 < hallas> ;) I figured, must be careful thoug
19:41 < hallas> though ^
19:41 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
19:41 < Namegduf> The code storing something in an interface knows what type
it was originally, it's typed in that context
19:42 < Namegduf> And so the compiler can emit code that sets the interface
appropriately.
19:42 < Namegduf> An interface assertion will likely look up the type, then
try to construct a new interface value for that type in the given interface and
say it fails if it fails.
19:42 < Namegduf> I'm guessing a bit there.
19:43 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-161-107.clienti.tiscali.it]
has joined #go-nuts
19:44 < hallas> Just to understand you perfectly, an interface{} value has a
type pointer so to speak?
19:44 < Namegduf> Yes.
19:44 < hallas> Alright
19:44 < Namegduf> It's a pointer to a structure which has a type pointer and
the function pointers
19:44 < Namegduf> But yeah.
19:44 < hallas> makes sense
19:45 < Namegduf> The structure is shared between all interfaces of the same
interface type storing the same real type.
19:45 < Namegduf> The type structure is the same for all references to that
real type.
19:46 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-148-158.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
19:47 < hallas> How about int32 then, does it have a pointer that says im to
be treated as an int32, and a pointer thats says, im really an int32?
19:47 < Namegduf> No.
19:47 < Namegduf> An int32 is not an interface type.
19:48 < Namegduf> It's just four bytes.
19:48 < Namegduf> The compiler always knows at compile time what type it is
19:48 < Namegduf> And has no reason to store it at runtime
19:49 < hallas> So if something of interface{} is really an int32, what does
it point to, in order to know this?
19:49 < Namegduf> A type structure.
19:49 < Namegduf> An interface{} is two words; the value, and a pointer to
the itable, which points to the type structure.
19:49 < Namegduf> Actually
19:49 < Namegduf> An interface{} is just the value and a pointer to the type
structure
19:50 < Namegduf> Since it has no functions, it can skip the itable.
19:50 -!- gregschlom [~quassel@187.118.210.62.te-dns.org] has quit [Ping timeout:
240 seconds]
19:50 < Namegduf> Since the compiler knows at compile-time when an interface
is an interface{}, it can generate code to handle that right.
19:50 < Namegduf> But that's an optimisation.
19:50 -!- rcrowley [~rcrowley@ip67-90-234-94.z234-90-67.customer.algx.net] has
quit [Quit: Computer has gone to sleep.]
19:52 < hallas> Alright
19:53 < hallas> I understand perfectly know
19:53 < hallas> now
19:54 < hallas> Namegduf: thanks alot
19:56 -!- tncardoso [~thiago@150.164.2.20] has quit [Quit: bye]
19:57 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has joined
#go-nuts
20:07 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
20:16 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
20:17 -!- alehorst [~alehorst@189.114.239.84.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
20:19 -!- alehorst [~alehorst@189.114.239.84.dynamic.adsl.gvt.net.br] has joined
#go-nuts
20:27 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
20:27 -!- huin [~huin@91.85.171.238] has quit [Quit: leaving]
20:29 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
20:29 -!- snearch [~snearch@f053006158.adsl.alicedsl.de] has quit [Quit:
Verlassend]
20:34 -!- monsieur_max [~maxime@ip-78.net-89-2-171.rev.numericable.fr] has quit
[Quit: Leaving.]
20:36 -!- Ekspluati [5b9c45fc@gateway/web/freenode/ip.91.156.69.252] has joined
#go-nuts
20:39 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has quit [Quit: ~]
20:44 < Ekspluati> What could be better than changing hundreds of "i = 0"s
to "int i = 0" to get a project to compile?
20:45 < Namegduf> Not writing hundreds before trying to compile the first
time.
20:45 < Namegduf> Also i := 0 is pretty
20:45 < Namegduf> Also it's var i int = 0 in Go.
20:45 < skelterjohn> you should probably compile more often, yes
20:45 < Namegduf> Not int i
20:45 < Namegduf> That's C.
20:46 < Ekspluati> Wanted a "LOL C++?!?!" answer.
20:46 < Namegduf> I wanted a pony.
20:46 < Namegduf> Then I got one.
20:46 < Namegduf> It was the happiest day of my life until I got bored with
it.
20:47 < hallas> true story
20:47 < Ekspluati> It's a C++ project from 1999 or something.  I understand
now why my friend asked me to get it working on a more recent compiler.
20:48 < Namegduf> Are you billing them for the time?
20:48 < skelterjohn> what old version of C++ allowed you to say "i = 0"
without declaring i somewhere?
20:48 < aiju> 22:49 < Ekspluati> What could be better than changing
hundreds of "i = 0"s to "int i = 0" to get a project to compile?
20:48 < Ekspluati> VS 2003, in for loops
20:48 < aiju> ed is your friend
20:48 < Namegduf> Oh god
20:48 < skelterjohn> that's not C++'s fault
20:48 < skelterjohn> that is MS's faut
20:48 < skelterjohn> fault
20:48 < aiju> everything is MS' fault
20:48 < Ekspluati> "for( i = 0; balhblah) {"
20:48 < aiju> when in doubt, blame MS
20:49 < aiju> Ekspluati: ,s/for\( i = 0/for(int i = 0/g
20:49 < aiju> or something
20:49 < Namegduf> Linux would have no problems if MS wasn't deliberately
sabotaging the market against it, thus turning large amounts of developer
resources away
20:49 < aiju> haha
20:49 < KirkMcDonald> Namegduf: Nonsense, it is the year of the Linux
desktop.
20:50 < Namegduf> KirkMcDonald: I just decided the year of the Linux desktop
was when I used Linux
20:50 < Namegduf> On my desktop, most of the time.
20:50 < Namegduf> Because I realised I don't actually *care* about lusers
20:50 < skelterjohn> it's always the year of the linux desktop
20:50 < aiju> every year is the year of the Plan 9 desktop
20:51 < jeremy_c> skelterjohn: would go-gb help any in building optional
modules?  For example, with go-iup you may not wish to build iup/pplot or
iup/glcanvas because you don't have supporting libs and don't desire that
functionality.
20:51 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
20:51 < Namegduf> Optional modules are tricky
20:51 < Namegduf> You have to write backwards and optionally build files.
20:51 < skelterjohn> jeremy_c: you can put a file called target.gb with the
only contents being a "-"
20:51 < Namegduf> By "write backwards" I mean have the optional things call
into the required things
20:51 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has joined
#go-nuts
20:51 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has quit
[Changing host]
20:51 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts
20:51 < skelterjohn> and it will ignore that directory
20:51 < Namegduf> Using init() to "hook" stuff
20:52 < Namegduf> Or set an interface somewhere to reference them, or a
block of function pointers, or blah.
20:52 < skelterjohn> or it was a pretty gb specific question :)
20:52 < Namegduf> ...that true.
20:52 < skelterjohn> i think he just means "don't run the compiler on some
particular source"
20:52 < Namegduf> *too
20:53 < Namegduf> I should look at go-gb.
20:53 < jeremy_c> right now you need quite a few libraries to build iup.  I
am hoping to split it up into logical parts and reduce the entry barrier.
20:53 < Namegduf> My plan was to write my own mini-tool for my own project.
20:53 < skelterjohn> that's what gb started as
20:53 < Namegduf> What's its licence?
20:53 < skelterjohn> which is why the source is a bit awkward
20:53 < skelterjohn> i forget
20:53 < skelterjohn> something convenient
20:53 < Namegduf> I could just mutilate it.
20:53 < jeremy_c> ha!
20:53 < skelterjohn> and normal
20:53 < skelterjohn> feel free
20:54 < skelterjohn> you have my blessing to fork/mutilate
20:55 < Namegduf> It'll sadly be a while before I have more time, but
thanks.
20:55 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
20:56 -!- tvw [~tv@e176008032.adsl.alicedsl.de] has joined #go-nuts
20:57 -!- tvw [~tv@e176008032.adsl.alicedsl.de] has quit [Remote host closed the
connection]
20:58 -!- tvw [~tv@e176008032.adsl.alicedsl.de] has joined #go-nuts
20:58 < jeremy_c> Namegduf: I was thinking they would just be seperate
packages.  import "iup", import "iup/glcanvas", ...
20:59 < jeremy_c> the would all rely on "iup" -- core
20:59 < skelterjohn> oh you mean you want to provide all the source, but
have gb only compile based on what libraries are available?
20:59 < skelterjohn> that is not something gb can do
20:59 -!- rcrowley [~rcrowley@ip67-90-234-94.z234-90-67.customer.algx.net] has
joined #go-nuts
20:59 < skelterjohn> unless you had some script insert the target.gb files
before hand
20:59 < jeremy_c> or what the user says to build?  gb iup iup/glcanvas ?
21:00 < skelterjohn> if you spec a dir on the command line, it builds that
dir and all its subdirs
21:00 < skelterjohn> use -e for exclusive
21:00 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
21:00 < skelterjohn> actually - that may not do it
21:00 < skelterjohn> hrm
21:01 < skelterjohn> -e just doesn't follow deps
21:01 < skelterjohn> *shrug*
21:01 < skelterjohn> :)
21:03 < Tonnerre> Hm, wasn't there a a lis tof people who packaged Go?
21:04 -!- dju__ [dju@fsf/member/dju] has joined #go-nuts
21:05 < skelterjohn> you mean the contributors list?
21:05 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:6126:f8f:d994:c0e1] has quit
[Quit: Leaving.]
21:05 < skelterjohn> $GOROOT/CONTRIBUTORS
21:05 < skelterjohn> and $GOROOT/AUTHORS
21:07 -!- dju_ [dju@fsf/member/dju] has quit [Ping timeout: 276 seconds]
21:11 -!- jarbox [~rovie@cpe-98-30-33-49.woh.res.rr.com] has quit [Remote host
closed the connection]
21:14 < skelterjohn> usually when you draw a point at coord 0, 0 onto a
rastered window, it's at the top left, right?
21:14 < skelterjohn> top left, correct?
21:14 * jeremy_c is graphically challenged.
21:15 -!- dfr|bohconf [~dfr|work@host-12-159-175-242.bccexpo.com] has quit [Remote
host closed the connection]
21:15 < exch> opengl's coordinate system is a bit topsy-turvy
21:15 < exch> 0,0 is bottom-left
21:15 < hallas> skelterjohn: yes usually
21:16 < skelterjohn> exch: with opengl it depends completely on your
projection matrix
21:16 < skelterjohn> so saying 0, 0 is bottom-left doesn't mean much
21:16 < hallas> in the html5 canvas its top left thats 0,0
21:16 < skelterjohn> but mac's coordinate system has 0, 0 at the bottom left
21:17 -!- photron [~photron@port-92-201-222-15.dynamic.qsc.de] has quit [Ping
timeout: 260 seconds]
21:17 < skelterjohn> but i'm just deciding where to put the origin for my
mac impl of exp/draw
21:18 < skelterjohn> which is mostly working except for events i don't
forward and for window resizing screwing up the draw buffer
21:18 < ww> i can't remember...  can you give an arbitrary (e.g.  affine)
transformation matrix to opengl?
21:18 < skelterjohn> affine means not necessarily centered at the origin,
right?
21:18 < skelterjohn> that word has always been a bit of a mystery to me
21:19 < ww> i think it means with basis vectors that are not necessarily
orthogonal
21:19 -!- twopoint718 [~chris@fsf/member/twopoint718] has quit [Quit: Leaving]
21:19 < skelterjohn> oh
21:19 < skelterjohn> the transformation matrix can be composed of
translations, rotations and scalings
21:20 < skelterjohn> i don't know if that leaves room for non-orthogonality
or not
21:20 < skelterjohn> i'm not an expert at such things
21:20 < skelterjohn> but intuitively i think they remain orthogonal
21:20 < ww> no i don't think it does
21:23 < ww> if it had them you could play funny perspective games i guess...
not sure how useful that would be...  which is probably why it wasn't included...
21:23 < kamaji> Weiiiird...  i'm getting "Permission denied" when I compile
go programs now
21:23 < hallas> kamaji: do you have permission to the source files youre
trying to compile :-)?
21:24 < kamaji> er
21:24 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
21:24 < kamaji> I mean run
21:24 < kamaji> it compiles fine and produces an executable
21:24 < hallas> Same question then :D
21:24 < kamaji> yes :p
21:25 < hallas> try chmod +x <yourfile>
21:25 < kamaji> I did, doesn't work
21:25 < kamaji> even as root
21:25 < kamaji> what did I do 0_o
21:25 < skelterjohn> what's it say in "ls -l"
21:25 < hallas> No other error than the "permission denied" thing ?
21:25 < kamaji> -rw-r--r-- for source
21:25 < skelterjohn> for the executable
21:25 < kamaji> zsh: permission denied: ./scb
21:25 < kamaji> -rwxr-xr-x
21:26 < skelterjohn> bizarre
21:26 < hallas> very :o
21:26 < kamaji> I know :|
21:26 < skelterjohn> remove it, try again
21:26 < skelterjohn> when in doubt, clean-build
21:26 < kamaji> tried that a few times :P
21:26 < kamaji> i moved the directory everything was in
21:26 < kamaji> now it works
21:26 < ww> actually, i'm on crack.  affine is the wrong word for what i
mean
21:26 < kamaji> what.  the.  fuck.
21:26 < skelterjohn> i meant your whole computer
21:26 < kamaji> lol
21:26 < hallas> ww: affine its that transformation invertibility propery
right?
21:27 < hallas> property*
21:27 < skelterjohn> i think it's my origin property
21:27 < skelterjohn> an affine transformation is a linear transformation
plus an offset
21:28 < ww> according to wikipedia...  yes, exactly
21:28 < mpl> iant: re: the symlink error, do I need to make a type
assertion?  because when I try to compare err.Error it tells me that err doesn't
have an Error member.  (because it is of type os.Error, not os.LinkError).
21:29 <+iant> yes, you need a type assertion there to get back to Linkerror
21:29 < ww> what i was particularly thinking about was scaling the axes
independently though
21:29 < skelterjohn> you can do that
21:30 < skelterjohn> that doesn't make them non orthogonal, though
21:30 < ww> of course, that was just my mind wandering
21:30 < skelterjohn> ah
21:32 < mpl> uhm
21:32 < mpl> impossible type assertion: err (type os.Error) cannot have
dynamic type os.LinkError (missing String method)
21:32 < Namegduf> mpl: Does LinkError's string method have a different
signature?
21:33 < ww> so you can do special relativity then (where v gets treated as
constant per rendered frame)
21:33 <+iant> mpl: os.LinkError definitely has a String method
21:33 < mpl> func (e *LinkError) String() string {
21:34 < Namegduf> Aha.
21:34 < Namegduf> No, os.LinkError does not have a String method
21:34 <+iant> but you want *os.LinkError
21:34 < Namegduf> *os.LinkError does
21:34 < Namegduf> Yeah.
21:34 <+iant> sorry
21:34 < Namegduf> That'll be it.
21:34 < mpl> ah damn
21:34 < mpl> thx
21:35 * Namegduf didn't mean to say it was wrong as a statement, just to point out
the technicality.
21:35 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has quit [Quit: leaving]
21:36 < mpl> iant: all good now, thanks.
21:38 -!- tux21b [~tux21b@chello213047047175.3.graz.surfer.at] has quit [Ping
timeout: 246 seconds]
21:47 -!- Venom_X_ [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
21:49 < hallas> How do you guys handle your foo, err := func() stuff?  check
if err is nil after each call or is there a smarter way?
21:50 < hallas> cleaner way
21:50 < hallas> dynamic way
21:50 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 246 seconds]
21:53 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Ping timeout: 276
seconds]
21:54 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
21:56 -!- alehorst [~alehorst@189.114.239.84.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
22:00 -!- dju__ [dju@fsf/member/dju] has quit [Read error: Connection reset by
peer]
22:01 -!- dju__ [dju@fsf/member/dju] has joined #go-nuts
22:04 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
22:08 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
22:09 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Remote
host closed the connection]
22:10 -!- krutcha [~krutcha@remote.icron.com] has joined #go-nuts
22:11 < str1ngs> check(err) :P
22:11 < str1ngs> but that is not always the best way
22:12 < skelterjohn> hallas: if the function params and returns are all
different, then i'll do "if err != nil { return }" after each
22:12 < skelterjohn> and err will be a named return value for the function
22:14 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
22:15 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
22:18 -!- gtaylor [~gtaylor@99-126-136-139.lightspeed.gnvlsc.sbcglobal.net] has
quit [Quit: gtaylor]
22:18 -!- krutcha [~krutcha@remote.icron.com] has quit [Read error: Connection
reset by peer]
22:19 -!- r_linux [~r_linux@smtp.mandique.com.br] has quit [Quit: Lost terminal]
22:20 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
22:20 -!- elephants [~elephants@76.9.192.146] has quit [Remote host closed the
connection]
22:21 -!- tncardoso [~thiago@189.59.160.82] has joined #go-nuts
22:22 < jeremy_c> Splitting go-iup isn't working too well.  Every widget has
a type of *Ihandle.  Outside of the package where Ihandle is defined, it cannot be
used as a receiver...  That leaves me in a real pickle.
22:23 < exch> Cant you create a type for it in your lib?  like: type Handle
*IHandle
22:24 < jeremy_c> How then would I pass the resulting new type to the 80 or
so functions in the core lib as an Ihandle?
22:24 < exch> That'll require some extra covnersion code in the lib itself,
but it makes the whole thing accessible outside
22:24 < exch> cast it to back to the appropriate type
22:24 < jeremy_c> make the user of the lib cast it back?
22:25 < hallas> How do I use the image package to actually draw say an
image.Rect on an image?
22:25 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-161-107.clienti.tiscali.it]
has quit [Quit: E se abbasso questa leva che succ...]
22:25 -!- xash [~xash@d003120.adsl.hansenet.de] has joined #go-nuts
22:25 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:25 < exch> no, your lib should do that internally..  anyone outside just
uses the Handle type
22:25 < exch> I'm just poking in the dark here though.  I may just
misunderstand your issue
22:26 < jeremy_c> exch: no, I think you understand it, just not too excited
about the solution :-/
22:26 < exch>
https://github.com/jteeuwen/go-pkg-libvlc/blob/master/libvlc/media.go#L112 here's
an example of what I mean
22:26 < exch> Media and *Media are the types the user of this lib works with
22:26 < exch> (*C.libvlc_media_t)(this) is what gets passed to the C code
22:27 < exch> Media basically just aliases C.libvlc_media_t
22:28 < jeremy_c> I think our two problems are slightly different.
22:28 < exch> do you have some example code?
22:28 < jeremy_c> I have a package "iup" that defines type Ihandle.  There
are ~80 functions that work on Ihandle as the receiver.
22:29 < exch> ok
22:30 < jeremy_c> So, now I want to make a package "iup/pplot" which is the
plotting widget.  I want it to be seperate so that one could compile/use it if
they want or not if they don't.
22:30 < jeremy_c> i.e.  lib dependencies on pplot.
22:30 < exch> ah ok
22:31 < jeremy_c> Those ~80 functions in "iup" should also work on
"iup/pplot", but in iup/pplot I have methods also that are pplot specific that
should work on it, but in iup/pplot I cannot define: func (ih *iup.Ihandle)
DoSomething()
22:31 < exch> right, I see what you mean
22:32 < exch> the only way around that is to 'alias' IHandle inside the
pplot package
22:32 < Namegduf> Two options:
22:32 < Namegduf> 1) Make iup/pplot define its own type, which embeds
IHandle.
22:32 < Namegduf> 2) Make them functions.
22:32 < exch> or that
22:32 < Namegduf> Aliasing it will not work because then code outside the
package can't use it as an IHandle
22:33 < exch> not without casting anyways
22:33 < jeremy_c> If I create a specific type, type PPlot Ihandle, that'll
allow me to add new methods to PPlot, but how then can a user take the result of a
PPlot and send it via a receiver to a method iup.Abc() ...
22:33 < Namegduf> Does the base IHandle have actual data?
22:34 < jeremy_c> Right now it does, it has "H *C.Ihandle" ...  I was
thinking I'd need more data, but now I don't think I will.
22:34 < jeremy_c> type Ihandle struct { H *C.Ihandle }
22:34 < Namegduf> Hmm.
22:34 < Namegduf> And a C.Ihandle is?
22:34 < hallas> Sorry to ask again but,
22:34 < jeremy_c> a void * basically
22:34 < hallas>
http://www.lostgarden.com/2007/05/dancs-miraculously-flexible-game.html
22:34 < hallas> Argfg
22:34 < hallas> Sorry
22:34 < hallas> That was a bad copy paste
22:34 < hallas> Ignore that link
22:34 < str1ngs> jeremy_c: that's what I've been doing wrapping them in go
structs
22:34 < Namegduf> Pointing to one of the iup implementations?
22:35 < jeremy_c> yes, that I never access, nor need to nor should.  It's
contents is all internal to iup
22:35 < str1ngs> jeremy_c: not sure about voids though.
22:35 < Namegduf> Make everything operating on Ihandle take an interface.
22:35 < Namegduf> And turn them into functions.
22:36 < Namegduf> Have the implementations implement concrete types that the
main package's functions will operate on.
22:36 < jeremy_c> dlg.Show() just seems so much nicer than iup.Show(dlg)
22:36 < Namegduf> In general, methods are per-implementation, functions are
not.
22:36 < Namegduf> Yes, but you're getting into nasty design stuff to get a
tiny bit of syntactic sugar.
22:36 < Namegduf> And it's not idiomatic in Go.
22:36 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit [Read
error: Operation timed out]
22:37 < Namegduf> Go has functions as well as methods and you should use
them for stuff not attached to a specific implementation.
22:37 < Namegduf> It's much better than the design hackery you have to do,
which tends to involve type embedding.
22:38 < Namegduf> (You would emebed the base type in the extended types, not
visa versa, and it would work.  But don't do that just so it's a method, not a
function, that's ew.)
22:38 < jeremy_c> dlg := iup.Dialog(child).Attrs("abc", "xyz") vs.
iup.Attrs(iup.Dialog(child)) .Attrs() is something familiar to those using iup.
22:38 < Namegduf> Go bindings should be idiomatic Go.
22:38 < Namegduf> Not idiomatic something else.
22:38 < Namegduf> Wrapping the external API to be more Go-like is a *good*
thing, not a bad thing.
22:38 < str1ngs> easier said then done
22:39 < Namegduf> Neither is particularly idiomatic as code goes, but making
things methods instead of functions just to do that isn't.
22:39 < jeremy_c> hm.  that's gonna take a good deal of time to change.  I
guess if that is what has to be done.
22:40 < Namegduf> It's a matter of orthagonality.
22:41 < Namegduf> It's nicer to cleanly say "this is
implementation-dependent" and "this isn't" and not need multiple layered
implementations of things, one of which does nothing but have methods.
22:42 < jeremy_c> well, I think I'm gonna take a break before tackling this.
22:44 < str1ngs> jeremy_c: take a look at the gtk bindings maybe that will
help
22:45 < exch> Or drive you completely insane
22:45 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has joined #go-nuts
22:47 -!- ctimmerm [~ctimmerm@cs181050011.pp.htv.fi] has quit [Ping timeout: 276
seconds]
22:53 -!- jbooth1 [~jay@209.249.216.2] has quit [Quit: Leaving.]
22:56 -!- iant [~iant@nat/google/x-ilxwbbkzkefdjald] has quit [Ping timeout: 240
seconds]
23:01 < jeremy_c> Is there a best practice for directory structure of a lib
that contains multiple packages and demo programs?  I look around and see many
different styles.
23:02 < exch> Not that I am aware of.  I'm guessing people just use what
they deem apropriate
23:08 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Venom_X]
23:11 < chomp> my preference is examples/ and src/package1 src/package2,
etc.  but it's just a preference
23:11 < Namegduf> src always makes me a little annoyed, even though I use it
23:11 < Namegduf> Because it makes godoc do wrong things
23:11 < chomp> yeah it's not my favorite, but it feels right to have some
grouping of all library source paths
23:11 < Namegduf> I agree.
23:12 < Namegduf> Eventually I just renamed my packages to include the src/
23:12 < chomp> plus, old habits...  i've been brainwashed by unix
23:12 < Namegduf> But that's only because there's also a lib/ and modules/
23:12 < Namegduf> I might merge the last and the first at some point.
23:12 < ab3> where can i find a practical example of the json
Encoder/Decoder types, i am trying to filter a json by decoding it and only
selecten a select set of attributes and then encode it back into a Buffer.  How do
I add a array to the encoder without knowing the elements I have to filter first
23:15 < str1ngs> ab3: you can use http://golang.org/pkg/json/#RawMessage for
your field types to skip marshal is that what you mean?
23:19 -!- tmk [~TMKCodes@unaffiliated/tmkcodes] has quit [Ping timeout: 246
seconds]
23:22 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has quit [Quit:
Leaving.]
23:32 -!- iant [~iant@67.218.110.18] has joined #go-nuts
23:32 -!- mode/#go-nuts [+v iant] by ChanServ
23:32 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
23:34 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 246
seconds]
23:35 -!- dfr|bohconf [~dfr|work@host-12-159-175-242.bccexpo.com] has joined
#go-nuts
23:39 -!- tvw [~tv@e176008032.adsl.alicedsl.de] has quit [Remote host closed the
connection]
23:41 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts
23:48 -!- rcrowley [~rcrowley@ip67-90-234-94.z234-90-67.customer.algx.net] has
quit [Quit: Computer has gone to sleep.]
23:50 < Tonnerre> Is there some kind of debugger for Go and friends?
23:55 < hallas> How can I paint an entire picture black?  I dont understand
how to use the image.Image resource to paint anything.
23:55 < Namegduf> Tonnerre: gdb works.
23:56 < Tonnerre> Well, cgo crashes and gdb tells me there's no stack frame
but well
23:56 -!- twopoint718 [~chris@fsf/member/twopoint718] has joined #go-nuts
--- Log closed Wed May 18 00:00:50 2011