--- Log opened Thu Aug 18 00:00:20 2011
00:01 -!- jmil [~jmil@pool-173-59-72-58.phlapa.east.verizon.net] has quit [Quit:
jmil]
00:03 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
00:08 -!- tvw [~tv@e176000185.adsl.alicedsl.de] has quit [Ping timeout: 250
seconds]
00:09 -!- nekoh [~nekoh@dslb-178-004-020-104.pools.arcor-ip.net] has quit [Quit:
nekoh]
00:12 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has quit [Read
error: Connection reset by peer]
00:15 -!- xash [~xash@d045107.adsl.hansenet.de] has quit [Quit: Lost terminal]
00:19 -!- chadkouse [~Adium@24.123.67.50] has quit [Quit: Leaving.]
00:19 -!- chadkouse [~Adium@24.123.67.50] has joined #go-nuts
00:21 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has quit [Read
error: Connection reset by peer]
00:22 -!- qrush [u1528@gateway/web/irccloud.com/x-cpswbwcohvshstqh] has joined
#go-nuts
00:28 * f2f wishes he could be skiing now :)
00:30 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
00:34 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
00:35 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
00:39 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
00:40 -!- wobsite [~ian@pool-173-48-104-84.bstnma.fios.verizon.net] has quit [Read
error: No route to host]
00:40 -!- wrtp [~rog@host-92-23-138-50.as13285.net] has quit [Quit: wrtp]
00:41 -!- czapkofan [4dfe8d3d@gateway/web/freenode/ip.77.254.141.61] has quit
[Quit: Page closed]
00:46 -!- qeed_ [~qeed@adsl-98-85-43-108.mco.bellsouth.net] has quit [Ping
timeout: 264 seconds]
01:01 -!- qeed_ [~qeed@adsl-98-85-43-108.mco.bellsouth.net] has joined #go-nuts
01:02 -!- Project_2501 [~Marvin@82.84.93.237] has quit [Quit: E se abbasso questa
leva che succ...]
01:10 -!- shvntr [~shvntr@113.84.91.221] has joined #go-nuts
01:11 -!- jmil [~jmil@pool-173-59-72-58.phlapa.east.verizon.net] has joined
#go-nuts
01:14 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
01:14 -!- chadkouse [~Adium@24.123.67.50] has quit [Quit: Leaving.]
01:15 -!- moraes [~moraes@189.103.177.124] has quit [Quit: Leaving]
01:18 -!- nicka [~nicka@unaffiliated/nicka] has quit [Quit: Leaving]
01:19 -!- BrentRitterbeck [~BrentRitt@d199-74-53-98.nap.wideopenwest.com] has
joined #go-nuts
01:23 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
01:29 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
01:30 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
01:39 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has quit [Quit:
Leaving.]
01:39 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
01:42 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has joined #go-nuts
01:42 -!- jmil [~jmil@pool-173-59-72-58.phlapa.east.verizon.net] has quit [Quit:
jmil]
01:47 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
02:05 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 252 seconds]
02:08 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has joined #go-nuts
02:10 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
02:10 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
02:10 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
02:16 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit:
Leaving...]
02:21 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
02:40 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
[]
02:56 -!- smw [~stephen@unaffiliated/smw] has quit [Remote host closed the
connection]
03:01 -!- qeed_ [~qeed@adsl-98-85-43-108.mco.bellsouth.net] has quit [Quit:
Leaving]
03:15 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
03:16 -!- odoacre [~antonio@218.241.169.34] has joined #go-nuts
03:20 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
03:39 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
03:39 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
03:50 -!- BrentRitterbeck [~BrentRitt@d199-74-53-98.nap.wideopenwest.com] has quit
[Remote host closed the connection]
03:51 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
03:51 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has quit [Quit: jmil]
03:57 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has joined #go-nuts
04:10 < s|k> if I add a flag
04:10 < s|k> is help supposed to work automatically?
04:10 < s|k> er -help
04:11 < s|k> because ./6.out -help gives me nothing and neither does ./6.out
-help 1
04:11 * s|k rereads flag package documentation
04:12 < f2f> -h
04:16 < s|k> hrm
04:19 < s|k> http://goo.gl/IGW7E
04:19 < s|k> if I compile that ./6.out -h does nothing
04:20 < s|k> and any value for -test is ignored
04:20 < s|k> hrmmmm
04:20 < s|k> I must be missing something
04:20 < f2f> you're missing flag.Parse()
04:21 < s|k> thanks.
04:21 < f2f> np
04:22 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has left #go-nuts []
04:28 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit:
Leaving...]
04:36 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
04:42 -!- shvntr [~shvntr@113.84.91.221] has quit [Quit: leaving]
04:48 < s|k> reading the package source helps
04:48 < s|k> when I run into problems
04:48 -!- bjarneh [~bjarneh@1x-193-157-207-107.uio.no] has joined #go-nuts
04:48 < s|k> go leads to such readable code
04:53 -!- vmil86 [~vmil86@88.118.36.96] has joined #go-nuts
04:55 -!- niemeyer [~niemeyer@200-102-220-163.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
05:01 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
05:01 -!- meling [~meling@134.81-167-41.customer.lyse.net] has quit [Remote host
closed the connection]
05:08 < f2f> i think it's the other way around, s|k.  the people who
developed Go tend to be high-quality programmers who write clear, understandable
code.  witness for example Plan9's source code, which, although written in C, is
just as clean as Go code, having been written by the same people largely
05:11 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
05:12 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has quit [Quit: Tv__]
05:14 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
05:16 -!- c00w [~colin@c-67-183-138-2.hsd1.wa.comcast.net] has quit [Quit:
Ex-Chat]
05:16 < str1ngs> f2f: I kinda agree with s|k with gofmt and go syntax go
does kind lead to readable code
05:16 < str1ngs> that wont stop all programmer from messing it up of course
:P
05:17 < str1ngs> also if you use go best practice of handling each and every
err.  its even saner
05:20 < f2f> gofmt is a bonus, sure.  it works really well in practice.  you
wish you had it on those other systems, and i think that's the point -- the people
who developed go understood the need for it (whether from previous experience or
just because it seemed like a good idea at the time) and put it in.  my point is
that it's the people behind go that make it so clear and readable.
05:23 < str1ngs> ah sorry I did misread what you said.
05:23 -!- arun [~arun@unaffiliated/sindian] has quit [Ping timeout: 260 seconds]
05:26 < f2f> with time and widespread acceptance i'm sure the quality of go
code will decrease and bloat will increase.  this isn't something plan9 had to
deal with ;)
05:36 -!- djbrown [~djbrown@unaffiliated/djbrown] has quit [Ping timeout: 260
seconds]
05:37 < str1ngs> does not everyone use plan9 :P
05:38 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
05:42 < s|k> I am happy that the go packages are so easy to read
05:42 < s|k> whatever reason that may be
05:42 < s|k> I will write go code like in those packages
05:45 < f2f> that's a good goal.  i aspire to it too.
06:07 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
06:07 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
06:11 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
06:18 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout:
240 seconds]
06:21 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has quit
[Remote host closed the connection]
06:21 -!- squeese [~squeese@244.14.213.193.static.cust.telenor.com] has joined
#go-nuts
06:24 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:28 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
06:57 -!- firwen [~firwen@adevlaptop.cern.ch] has joined #go-nuts
07:00 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
07:07 -!- wrtp [~rog@host-92-23-138-50.as13285.net] has joined #go-nuts
07:08 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
07:12 -!- alehorst [~alehorst@201.47.19.25.dynamic.adsl.gvt.net.br] has quit [Ping
timeout: 250 seconds]
07:13 -!- squeese_ [~squeese@244.14.213.193.static.cust.telenor.com] has joined
#go-nuts
07:14 -!- Soak [~Mangano@92-89-15-217.reverse.alphalink.fr] has joined #go-nuts
07:14 -!- alehorst [~alehorst@189.58.28.55.dynamic.adsl.gvt.net.br] has joined
#go-nuts
07:15 -!- squeese [~squeese@244.14.213.193.static.cust.telenor.com] has quit [Read
error: Connection reset by peer]
07:24 -!- photron [~photron@port-92-201-25-38.dynamic.qsc.de] has joined #go-nuts
07:29 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
07:38 -!- itsPhilip [u2979@gateway/web/irccloud.com/x-algfxqbezqundpac] has joined
#go-nuts
07:43 -!- meling [~meling@pico.ux.uis.no] has joined #go-nuts
07:44 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 258 seconds]
07:45 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
07:48 -!- odoacre_ [~antonio@218.241.169.34] has joined #go-nuts
07:52 -!- wrtp [~rog@host-92-23-138-50.as13285.net] has quit [Quit: wrtp]
07:54 -!- pyrhho [~pyrhho@027e80ed.bb.sky.com] has joined #go-nuts
08:06 < Soak> hello, I learn the language and I try to rand a number between
0 and 36
08:06 < Soak> but I don't find how :$
08:07 < zozoR> use rand package
08:08 < Soak> yes I do
08:08 < Soak> but I don't know what function use :s
08:09 < str1ngs> godoc rand Intn
08:10 -!- odoacre_ [~antonio@218.241.169.34] has quit [Quit: Leaving]
08:11 < str1ngs> Soak: rand.Intn(36) will return a random number between 0
and 36
08:12 < Soak> oh!  nice :)
08:12 < Soak> thank you
08:16 < str1ngs> np
08:19 -!- oal [~olav@5.79-160-122.customer.lyse.net] has joined #go-nuts
08:19 < oal> Are there any general benchmarks for go "back then" when google
released it compared to now?
08:20 < str1ngs> yes, but not probably in the sense that you mean.
08:20 < str1ngs> there are bench marks that get recorded for certain aspect
of go.  but I'll have to fish for it
08:21 < str1ngs> might be the build bot waterfall but I"m not sure.
08:21 < oal> Ok, not that important, just curious if there was something
easily available
08:21 -!- squeese_ [~squeese@244.14.213.193.static.cust.telenor.com] has quit
[Remote host closed the connection]
08:24 < xyproto> oal:
http://stackoverflow.com/questions/1724680/go-language-benchmarks
08:24 < str1ngs>
http://code.google.com/p/go/source/browse/test/bench/timing.log
08:24 < str1ngs> oal: found the log
08:24 < oal> Thanks!  :)
08:25 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
08:28 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
#go-nuts
08:29 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Excess
Flood]
08:32 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
08:38 -!- deepfuture [~liuxing@218.75.249.184] has joined #go-nuts
08:39 < Soak> str1ngs: it's normal I need to compile again for generate
other numbers?
08:39 -!- ncopa [~ncopa@3.203.202.84.customer.cdi.no] has joined #go-nuts
08:40 < Soak> in fact, even if I compile again, the number stay the same..
strange
08:43 < str1ngs> are you sure about that?
08:45 < str1ngs> ah you might need to seed
08:46 < str1ngs> use rand.Seed(time.Seconds())
08:47 < str1ngs> but please be if you are using this for secure crypto or
something use something with better entropy like /dev/urandom
08:47 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
08:49 < Soak> no, it's just for tests
08:49 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
08:49 < str1ngs> rand.Seed(time.Seconds()) should be enough
08:49 < str1ngs> you only need to call it once.
08:49 < str1ngs> func init() might be a good spot.
08:51 < Soak> http://k.min.us/icL5BHosI.jpg
08:51 < Soak> this is my code and output right now
08:51 < Soak> I will try with your code
08:54 < str1ngs> https://gist.github.com/2c622684c1fda13d3969
08:54 < str1ngs> if you are not sure what func init is I can explain
08:54 -!- jlilly [justinlill@70.32.34.100] has joined #go-nuts
08:56 < Soak> yes, please explain :)
08:58 < str1ngs> init is a special func like main.  however it will be
called before main
08:58 < str1ngs> you can also us it in packages unlike main
08:58 < str1ngs> in this case we use it to setup rand
08:59 < ncopa> hi, im trying to build gccgo on alpine linux (which uses
PIC/PIE)
08:59 < ncopa> i got this error: http://sprunge.us/KUQg
08:59 < str1ngs> alpine linux iirc uses uclibc
09:00 < ncopa> correct
09:00 < Soak> ok thank you
09:00 < str1ngs> not sure how well suported uclibc is with go
09:00 < str1ngs> let me see the error though
09:00 < ncopa> the sprunge link above ^^^
09:00 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
09:01 < str1ngs> ya sorry ment I was going to look at the link
09:01 < str1ngs> does gcc 4.6.1 build without errors..  minus go language?
09:01 < ncopa> correct
09:01 < str1ngs> ok
09:01 < str1ngs> ok let me look more
09:02 < str1ngs> hmm ncopa are you a maintainer for alpine?
09:02 < ncopa> i wonder if its the PIC that cuases this, which needs the ebx
register
09:02 < ncopa> yes
09:02 < str1ngs> ah thats where I remember your name from them
09:02 < str1ngs> I did some work on uarch..  do you recall that?
09:03 < str1ngs> this would be a couple of years back now.
09:03 < ncopa> wow, yes i remember
09:03 < ncopa> what happened with uarch?
09:04 < str1ngs> at the time I got busy with work.  but now I'm using my own
build system and eglibc
09:05 < str1ngs> the only embedded hardware I have is my android tablet so
thats all I build for right now
09:06 < ncopa> alpine linux has turned into a more general purpose linux
distro based on uclibc
09:06 < str1ngs> I noticed that.  I've used it on and off in passing.  some
good work
09:06 < str1ngs> only issue I have is uclibc mainly binary compatibility
09:06 < ncopa> yeah
09:06 < str1ngs> but great for the stuff you are using it for.
09:07 < ncopa> its great as long as you dont need closed source binaries
09:07 < str1ngs> still look at this error
09:08 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Read error:
Connection reset by peer]
09:08 < str1ngs> yes but when you need to tweak an option that something
need you need to rebuild so much
09:08 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
09:08 < str1ngs> granted a full blown uclibc config is still better the
glibc
09:08 < str1ngs> in terms of footprint
09:08 < ncopa> yup
09:09 < ncopa> would be nice with go now...
09:09 < str1ngs> my guess you probably use a defall or darn close to it
09:09 < ncopa> thats true
09:10 < ncopa> i think its mostly things thats marked as obsolete thats
disabled
09:10 < str1ngs> I'm still looking at this seeing if something stands out
09:11 < ncopa> but obviously, gccgo -c works otherwise
09:11 < ncopa> various other .go files were compiled
09:12 < str1ngs> you add -fPIC to your flags?
09:12 < ncopa> i wonder if its related to ebx registry not beeing available
09:12 < ncopa> yes
09:12 < ncopa> well its coded into gcc specs i think
09:12 < str1ngs> and without that does it build?
09:12 < ncopa> i dont know
09:12 < str1ngs> hmm
09:12 < str1ngs> you gcc specs are vanilla?
09:12 < ncopa> no, i use from hardened gentoo
09:13 < str1ngs> one sec
09:15 < str1ngs> ls $(dirname $(gcc -print-libgcc-file-name))/specs
09:15 < str1ngs> is there a spec file in there?
09:15 < ncopa> ls: /usr/lib/gcc/i486-alpine-linux-uclibc/4.6.1/specs: No
such file or directory
09:16 < ncopa> no
09:16 < str1ngs> ok gcc -dumpspec | grep PIC
09:16 < str1ngs> err dumpspecs
09:17 < ncopa>
%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r:
%{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}
09:17 < ncopa> %{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE:
%{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: %{!shared: %{!nostdlib:
%{!nostartfiles:-fPIE}} } }}}} }}}} }
09:17 < str1ngs> hmm they much adjust gcc start up files ore PIC is uclibc
related
09:17 < str1ngs> hust*
09:17 < str1ngs> must* sorry late here :(
09:17 < str1ngs> ok need to find out what PIC does
09:18 < ncopa> its the gentoo hardened patches
09:18 < ncopa> and not really related uclibc
09:18 < ncopa> PIC is position independent code
09:19 < ncopa> http://www.gentoo.org/proj/en/hardened/pic-internals.xml
09:20 < str1ngs> ya seems to adjust function descriptors my guess make it
more secure
09:20 < ncopa> for memory randomization i think
09:20 -!- deepfuture [~liuxing@218.75.249.184] has quit [Read error: Connection
reset by peer]
09:20 -!- deepfuture [~liuxing@218.75.249.184] has joined #go-nuts
09:21 < str1ngs> wonder if you can turn that off just for this build
09:22 < str1ngs> but..  I've learned more the I can help you.  I'll give you
the google group for gccgo iant will know
09:23 < ncopa> i had to disable PIE for go1 to get this far
09:24 < str1ngs> http://groups.google.com/group/gofrontend-dev
09:25 < ncopa> thanks!
09:25 < str1ngs> one sec that might not be the best group
09:25 < str1ngs> btw does go gc build with uclibc?
09:25 < ncopa> whats the name of object file?
09:26 < str1ngs> for go?
09:26 < str1ngs> .a
09:26 < str1ngs> ar format
09:26 < str1ngs> but for gccgo they are .o
09:26 < ncopa> i meant the go gc
09:26 < str1ngs> go gc is another implimentation of go
09:26 < ncopa> ah
09:26 < str1ngs> actually kinda the main one that most people use
09:27 < str1ngs> either way that list might be wrong but post to it anyways
09:27 < ncopa> the plan9 one?
09:27 < str1ngs> right
09:27 < ncopa> i havent tried
09:27 < str1ngs> its actually easier to use like 40s to build kinda thing
09:28 < str1ngs> http://golang.org/doc/install.html#fetch
09:28 < str1ngs> but gccgo is good also so still post to the mailing list
could be a bug
09:30 < ncopa> i think more its the hardened patch that does it
09:30 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
09:31 < str1ngs> have you run into this in the past?
09:31 < str1ngs> if so how did you get around it?
09:31 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-164-185.clienti.tiscali.it] has
joined #go-nuts
09:31 < ncopa> the error appears to come from go compiler.  i have no
experience with go compiler
09:32 < ncopa> but i have been into PIC problems with inline asm
09:32 < str1ngs> the problem is go has entry functions
09:32 < str1ngs> I can not explain how they work.  just my impression of
what I've read
09:32 < str1ngs> iant would know better or one of the developers
09:32 < str1ngs> my guess is this makes them incompatible with PIC
09:33 < ncopa> with asm PIC problem the solution is to fix code not to touch
ebx registry
09:33 < Electro^> im having some trouble with interfaces again.  please
check this code: http://pastebin.com/zyj4bvLA
09:33 < Electro^> Here the input 'i' can be one of several structs, and is
mostly (but not always) a slice.
09:33 < Electro^> normally json.Marshal(i) handles all different cases
perfectly fine but now i find myself needing to access and modify the input before
sending it to json.Marshal() which has brought myself to this code.
09:33 < Electro^> i would like to be able to run a method on everything
contained in the slice, though i cannot figure it out...
09:35 < str1ngs> Electro^: i interface{} are thes types you have created?
09:36 < str1ngs> ie these are know types ?
09:36 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 264 seconds]
09:36 < Electro^> yes these i have created and are known
09:37 < str1ngs> imo it might be better to attach a ToJson method to those
type and have them selves return json representaions
09:37 < str1ngs> ie ToJson() byte
09:37 < str1ngs> byte[] sorry
09:38 < str1ngs> then you can create a interface with ToJson will make
tesing what can marshal and not marshal easier
09:40 < Electro^> they already have a 'func (image Image) MarshalJSON()
([]byte, os.Error) {' which json.Marshal(i) uses
09:40 -!- Solak [~stijnw@cthia.xs4all.nl] has joined #go-nuts
09:40 < str1ngs> ah ok one step ahead
09:40 < str1ngs> ok so now instead of having default test for the json
interface instead
09:40 < Electro^> problem is that i need to Marshal in two different ways
09:41 < str1ngs> and have default: error for unknown types
09:41 < str1ngs> did that make sense?
09:41 < Electro^> not really, can the caseswitch check for the existance of
a function?
09:42 < str1ngs> have deafault: error if you reach default the type is
unknown
09:42 < str1ngs> case for Marshaler
09:43 < str1ngs> if its a Marshaler then you know you can unmarshal it
09:44 < str1ngs> double check that type that come through with
fmt.Printf("%s",v) iirc that should work you might need %T
09:45 < str1ngs> Electro^: wait why do you have to marshal in two ways?
09:46 < Electro^> Since extJS is retarded and reqires JSON in a certain way
09:46 < Electro^> so i need JSON formatted for extJS and JSON for...  well
the rest of the world
09:46 -!- firwen [~firwen@adevlaptop.cern.ch] has quit [Read error: Operation
timed out]
09:46 < str1ngs> extJS is like json call back?
09:47 < Electro^> extJS is a javascript framework we use for our admin tools
09:47 -!- arun__ [~arun@skeletor.few.vu.nl] has joined #go-nuts
09:47 < str1ngs> ok either way it needs to be formatted different
09:47 < Electro^> yeah
09:47 < str1ngs> but MarshalJSON() can that not handle it?
09:48 < Electro^> i can marshal either way fine, but i need to be able to
decide which way during runtime
09:49 < Electro^> and json.Marshal calls MarshalJSON() so i need to be able
to extract the structs from ' i interface{}' before passing it into json.Marshal
09:49 -!- arun__ [~arun@skeletor.few.vu.nl] has quit [Changing host]
09:49 -!- arun__ [~arun@unaffiliated/sindian] has joined #go-nuts
09:49 < Electro^> sorry if i explain badly
09:49 < str1ngs> no worries
09:49 < str1ngs> what type does v print out?
09:50 < str1ngs> hmm actually it wont matter.
09:50 -!- prip [~foo@host36-124-dynamic.11-87-r.retail.telecomitalia.it] has
joined #go-nuts
09:50 < str1ngs> do all types have extJson format or just some?
09:51 < str1ngs> I would think you have extJson format and Json fromat for
all depending on the client?
09:51 < Electro^> the client asks for data formatted either as JSON or extJS
yes,
09:51 < Electro^> and all data needs to be able to format either way
09:52 < str1ngs> ok then I would have another view for this
09:52 < str1ngs> guessing or handler
09:52 < str1ngs> ie /my/cards/json
09:52 < str1ngs> /my/cards/extJson
09:53 < str1ngs> basically I think you need another handler
09:53 < str1ngs> one handler for json and one for extJson
09:54 < Electro^> yeah been thinking about that aswell, but that would
destroy alot of generality and code maintainability
09:54 < str1ngs> I thought that you might say that.  but only you know that
09:55 < str1ngs> so the common denominator as I see it is the bytes
09:55 < str1ngs> as in json in byte[]
09:56 < Electro^> Then its too late and already marshalled
09:56 < str1ngs> yes but its a common return type
09:56 < Electro^> if i could run methods on 'i interface{}' this would be a
rather easy fix
09:56 < Electro^> cant figure out a way to do that though
09:56 < str1ngs> meh hard to say without see the bigger picture
09:57 < Electro^> cant send much more code than that im afraid
09:57 < str1ngs> thats oke
09:57 < str1ngs> umm you want something like foo.(Bar).ExtJson()
09:58 < Electro^> fmt.Printf("test:%v\n", i.(*[]ivbs.Image)[0])
09:58 < Electro^> something like that yes
09:58 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has
joined #go-nuts
09:58 < Electro^> but this code fails with invalid operation:
i.(*[]ivbs.Image)[0] (index of type *[]ivbs.Image)
09:58 -!- deepfuture [~liuxing@218.75.249.184] has quit [Quit: Leaving.]
09:59 < str1ngs> what does v print out?
09:59 < Electro^> not compiling so nothing
09:59 < str1ngs> I cant remember if v prints interface types or not
09:59 < str1ngs> or comment out that case
09:59 < str1ngs> and just use default.  and have it print out v
09:59 < Electro^> but the 'v' in the switch prints all data in the interface
10:00 < str1ngs> with fmt.Println("%s",v) ?
10:00 < str1ngs> I just want to know if it prints the interface type or the
type
10:01 < Electro^> "test:&[{ObjectIdHex("4e4beca6e5d97b2d4400001e") Imag
....."
10:01 < Electro^> it prints the data, with both '%s' and '%v'
10:01 < str1ngs> and %T ?
10:02 < Electro^> test:*[]ivbs.Image
10:03 < str1ngs> ok does that seem right to you then?
10:03 < Electro^> thats its type alright, but still cant figure out how to
run methods attached to ivbs.Image
10:03 < Electro^> or to iterate over it
10:03 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
joined #go-nuts
10:04 < str1ngs> ivbs.Image is a struct or interface?
10:04 < Electro^> struct
10:04 < str1ngs> see the problem here?
10:04 < Electro^> hmm, not exactly?
10:05 < str1ngs> pass things as there interface
10:05 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has quit [Quit:
Leaving.]
10:05 < str1ngs> then you can call there methods
10:05 < str1ngs> also you can then type asert the interface
10:05 < Electro^> ..and how would i do that?
10:07 < str1ngs> let me make an example
10:07 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
quit [Client Quit]
10:08 < str1ngs> you probably dont even need i interface{} this way
10:08 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
joined #go-nuts
10:08 < Electro^> well i need to pass other structs aswell
10:13 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has quit
[Remote host closed the connection]
10:14 < str1ngs> https://gist.github.com/9747b981481f1392614f
10:14 < str1ngs> notice you can pass them as Person which mean you can all
there interface methods
10:14 < str1ngs> which means you probably wont need interface{}
10:15 < str1ngs> you can pass ImageMarshall
10:16 < Electro^> oh...  yes that work for me
10:16 < str1ngs> make sense?
10:16 < Electro^> thank you for the example
10:16 < Electro^> yeah i understand what you mean
10:16 < str1ngs> so know you understand why I say you dont need interface?
10:16 < Electro^> yep
10:16 < str1ngs> interface{] sorry
10:17 < str1ngs> also embedding might work..
10:17 < Electro^> i need to test this for a bit
10:17 < Electro^> and also eat lunch which started 20mins ago
10:17 < str1ngs> lol
10:17 < Electro^> i thank you kindly for your help :)
10:17 < str1ngs> np
10:18 < Electro^> hopefully, in time, i'll be able to help people here
aswell
10:18 < str1ngs> you helped me just as much :P
10:38 -!- Argue [~Argue@112.198.78.93] has joined #go-nuts
10:47 -!- rand11235 [477b8618@gateway/web/freenode/ip.71.123.134.24] has joined
#go-nuts
10:58 -!- Soak [~Mangano@92-89-15-217.reverse.alphalink.fr] has quit []
11:08 -!- xash [~xash@d025151.adsl.hansenet.de] has joined #go-nuts
11:08 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
11:14 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-150-230.clienti.tiscali.it] has
joined #go-nuts
11:17 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-164-185.clienti.tiscali.it] has
quit [Ping timeout: 250 seconds]
11:18 -!- tncardoso [~thiago@20158117127.user.veloxzone.com.br] has joined
#go-nuts
11:20 < ncopa> i managed to compile gccgo on alpine linux
11:20 < ncopa> but it does not work
11:21 < ncopa> fails to compile hello world
11:21 < ncopa> http://sprunge.us/fJEK
11:22 -!- Argue [~Argue@112.198.78.93] has quit [Read error: Connection reset by
peer]
11:26 < str1ngs> can you paste your compile line
11:27 < str1ngs> ie are you using gccgo -c foo.go ?
11:27 < ncopa> no
11:27 < ncopa> that works
11:27 < ncopa> its during linking i suppose
11:28 < ncopa> the line is: gccgo hello.go
11:28 < ncopa> 'gccgo -c hello.go' works
11:28 < str1ngs> gcc test.c would work no?
11:28 < ncopa> another alpine dev says that func is special for PIC builds
11:29 < ncopa> i pretty much assme it does since gcc built gccgo...
11:29 < str1ngs> no what I meant is gccgo syntax is the same as gcc
11:30 < str1ngs> just trying to figure out why gccgo -c foo.go works but
gccog foo.go doesnt
11:30 < ncopa> gcc hello.c works
11:30 < ncopa> i think its because gccgo has no support for PIC so the
__i686.get_pc_thunk.bx is never defined
11:31 < ncopa> note that its libgcc that asks for it
11:31 < str1ngs> right but why does gccgo -c hello.go work then?
11:31 < ncopa> because then the linker is never called
11:32 < str1ngs> ah and when you link?
11:32 < ncopa> appears to be the -fsplit-stack feature
11:32 < ncopa> gcc -fsplit-stack hello.c fails too
11:32 < str1ngs> ya I'm pretty sure PIC is not going to work with gccgo
11:33 < ncopa> it should.  PIC is a backend feature
11:33 < ncopa> gccgo is just a frontend
11:33 < ncopa> but i think this is fixed in trunk
11:33 < str1ngs> post to the mailing list iant is the only person that I
know of that can help you
11:34 < str1ngs> I was going to say have you tried with a snapshot ie 4.7
11:34 < ncopa> nope
11:34 < ncopa> im aiming for 4.6 for next stable alpine linux release
11:34 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
11:35 < ncopa> this thing is not gccgo related really
11:35 < str1ngs> are you using go?  or this ist so you have a complete gcc
distro?
11:35 < ncopa> not using go yet
11:36 < ncopa> i have a gcc package for alpine linux and i wanted add gccgo
11:36 < str1ngs> post to the mailing list iant can help you
11:36 < str1ngs> iant is the author of gccgo and binutils gold . he'll know
:P
11:37 < str1ngs> but imo if you are not actually useing gccgo wait till 4.7
. but..  post this issue
11:38 -!- Solak [~stijnw@cthia.xs4all.nl] has quit [Remote host closed the
connection]
11:40 < str1ngs> you can also post to gcc-general he's on that list as well
if you think its only gcc related.
11:41 < str1ngs> also PIC seems more hastle then its worth?
11:41 < ncopa> ASLR is more hastle than its worth ;)
11:42 < ncopa> i mean, even windows 7 has that nowdays
11:42 < str1ngs> aslr?
11:42 < ncopa> ASRL
11:42 < ncopa>
http://en.wikipedia.org/wiki/Address_space_layout_randomization
11:43 < ncopa>
http://en.wikipedia.org/wiki/Address_space_layout_randomization#Linux
11:43 < str1ngs> meh
11:43 < ncopa> note that alpine linux is mentioned there ;)
11:43 < str1ngs> pax kernel?
11:43 < ncopa> yup
11:44 < str1ngs> I know the reasoning behind it atleast I have idea with
alpine
11:44 < str1ngs> but might be over kill..  not sure
11:48 < str1ngs> ncopa: offtopic how hard would it be to reuse apkg with
another build system?
11:48 < ncopa> not too hard
11:48 < str1ngs> hmm I might look into it
11:48 < ncopa> the .apk is basically a tar.gz with .PKGINFO at the beginning
11:49 < ncopa> + some signing info
11:49 < str1ngs> you embed signing.  not a detached sig?
11:49 -!- nekoh [~nekoh@dslb-088-069-138-175.pools.arcor-ip.net] has joined
#go-nuts
11:49 < ncopa> embed
11:49 < str1ngs> pgp?  or ssl?
11:49 < ncopa> ssl
11:49 < str1ngs> :(
11:50 < ncopa> feel frr to join #alpine-devel
11:50 < str1ngs> I may do , just cant right now
11:50 < ncopa> you know where to find us ;)
11:51 < str1ngs> right now I'm using bash but thats limited
11:51 < str1ngs> eventually I need a real package manager.  was actually
think of writing it in go
11:51 < str1ngs> go has everthing built into the run time you would need
11:52 < str1ngs> openpgp tar/bzip/gz etc
11:52 < ncopa> i noticed libgo is 6MB
11:52 < ncopa> if I'd do a package manager today I'd do it in lua probably
11:52 < str1ngs> libgo is actually not bad
11:52 < str1ngs> static go binaries are usually 3M
11:53 < ncopa> big
11:53 < str1ngs> so for embedded this might not be the best
11:53 < ncopa> yeah
11:53 < ncopa> but go is a very very interesting language
11:53 < ncopa> i see a lot potensial
11:53 < str1ngs> personally though if you use a package and one binary you
would still be ahead over lua
11:54 < str1ngs> you could not get the features that are in go.  without
libarchive openssl pgpme etc
11:54 < str1ngs> substitute alternate lib C variant :P
11:54 < ncopa> true
11:55 < str1ngs> oh and curl
11:55 < str1ngs> what do you use for fetching?  libfetc?
11:55 < str1ngs> libfetch*
11:55 < str1ngs> or curl?
11:55 < ncopa> fork(); pipe(); exec("wget -O -");
11:56 < str1ngs> oh wow really?
11:56 < ncopa> yup
11:56 < ncopa> we talked about make a libcurl implementation
11:56 < ncopa> but never got to there
11:56 < str1ngs> well I use curl in my bash prototype
11:56 < str1ngs> libcurl is acutually pretty easy to work with
11:56 < ncopa> i'd do that to if i'd used bash i think
11:56 < ncopa> btw
11:57 < str1ngs> however..  go is way better :P
11:57 < ncopa> first implementation of apk-tools was in shell
11:57 < ncopa> http://apk-tools.sourceforge.net/
11:57 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has
joined #go-nuts
11:57 < ncopa> a package manager written in Go would be interesting yes
11:58 < ncopa> unless saving space is a goal
11:58 < str1ngs> yes but even then you could say use libgo
11:58 < str1ngs> and space is not such an issue with embedded like it use to
be.
11:59 < str1ngs> https://github.com/str1ngs/gurl/blob/master/pkg/gurl.go
11:59 < str1ngs> I write a curl like go package.  with progress callbacks
12:00 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has quit
[Remote host closed the connection]
12:01 < ncopa> cool
12:01 < ncopa> but yes
12:01 < str1ngs> and goarchive.
12:02 < ncopa> go sounds like the right tool to making a package manager
12:02 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
12:02 < str1ngs> so the pieces I have mapped out just need to put it
together
12:02 < str1ngs> and and gzipped json meta data
12:02 < ncopa> you need a dependency resolver
12:02 < ncopa> which is the hard part i think
12:02 < str1ngs> I do my automatically
12:03 < str1ngs> ie my meta data does not require you to provide depends
12:03 -!- nicka [~nicka@142.176.0.21] has joined #go-nuts
12:03 -!- nicka [~nicka@142.176.0.21] has quit [Changing host]
12:03 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
12:03 < str1ngs> right now I use objdump but I plan on rewriting it in go
12:04 < str1ngs> http://golang.org/pkg/debug/elf/
12:04 < str1ngs> debug/elf can reald elf headers.  and I get get NEEDED from
taht
12:05 < ncopa> i use scanelf for that
12:05 < ncopa> cool
12:05 < str1ngs> scanelf might be better mine hasnt been optimized.
actually just a place holder for the go stuff
12:06 < str1ngs> because I can compress and resolve NEEDED in one shot
12:06 < str1ngs> but slightly offtopic from your depend resolver
12:12 -!- mkb218 [~mkb@pool-96-233-4-238.bstnma.east.verizon.net] has quit [Quit:
gotta shut this mutha down]
12:13 < str1ngs> so far though the build system can build i686 x86_64 and
arm
12:14 < Electro^> another question then, this time possibly much easier: how
do i correctly index this: "m := make([]map[string] interface{}, 30)"
12:14 < Electro^> m[i]["Name"] = image.Name
12:14 < Electro^> compiles but stacktraces
12:15 < str1ngs> ncopa: would you think about go for a package manger.  or
not practical for uclibc based systems?
12:16 < str1ngs> Electro^: you sure you want a slice of maps?
12:16 < Electro^> quite
12:17 < Electro^> i have a slice of structs, each struct goes into a map,
thus a slice of maps
12:18 < str1ngs> that does not compute for me
12:18 < str1ngs> would not map[string]interface{} not provide what you need?
12:19 < str1ngs> I didnt even know you could have a slice of maps..  I need
to test that
12:19 < Electro^> im quite certain i did it a while ago, lost the code
though
12:19 -!- ancientlore [~ancientlo@ip68-110-238-176.dc.dc.cox.net] has joined
#go-nuts
12:19 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
12:20 < ncopa> str1ngs: i would prefer Go for a package manager over perl,
python or even c++.  But I'd probably personllay would perfer Lua and C
12:20 < ncopa> but yes, Go sure make sense for a package manager
12:21 < str1ngs> yes but what you gain in a larger binary is not much.
compared to the C libs needed so in theory you get more with go
12:21 < str1ngs> go = libc libpthread
12:21 < str1ngs> lua C = libarchive yajl, libfetch, curl, etc etc
12:22 < str1ngs> go has 0 run times depends short of libc and libpthread
12:22 -!- ancientlore [~ancientlo@ip68-110-238-176.dc.dc.cox.net] has quit [Client
Quit]
12:23 < str1ngs> oh an cross compiling is a breeze
12:23 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Client Quit]
12:23 < ncopa> apk-tools has its own libtar implementation
12:24 < str1ngs> I'm just talking theory here.  not try to say suggest you
replace apk-tools with go
12:24 < ncopa> understand
12:25 < str1ngs> lua is nice and all.  but the biggest problem Is its
limited runtime.  which is fine but then you are very dependant on 3rd party libs
alot of the C libc
12:25 < str1ngs> libs8
12:25 < ncopa> i'm ok with using shared libs
12:25 < ncopa> openssl will be needed anyways most likely
12:26 < str1ngs> yes but then you get chicken egg senerios
12:26 < fabled> str1ngs, Go roll out is still in infancy.  and package
manager is quite critical...  especially in Alpine since, the initramfs contains
apk-tools and uses it to do complete install of system to tmpfs.
12:26 < fabled> but yes, it's an interesting option later on.
12:26 < fabled> to use Go instead
12:26 < str1ngs> fabled: go is very stable, and I'm talking theory not
suggesting you actually change what you have in place
12:26 -!- franciscosouza [~francisco@187.105.21.97] has quit [Quit:
franciscosouza]
12:26 < ncopa> i think using Go for a package manager might be a good idea
12:27 < ncopa> and as i said, i would prefer it over python or perl
12:27 < fabled> str1ngs, yes, i understand.  and yes, Go is an interesting
option in future...
12:27 -!- PortatoreSanoDiI [~Marvin@82.84.75.149] has joined #go-nuts
12:28 < jlaffaye> str1ngs: Im writing a package manager for FreeBSD.  I'd
love to write it in Go but I need to have a lib and Go cant provide that,
unfortunatly.
12:28 < str1ngs> fabled: I havent just come up with idea, there is back
story here.
12:28 < jlaffaye> for instance, a PackageKit client should only be a wrapper
of lib
12:28 < jlaffaye> but we cant call Go code from C :(
12:28 < str1ngs> jlaffaye: shared libs are done with packages I do it all
the time.
12:28 < str1ngs> you can call go code from C with libffi iirc
12:28 < erus`> who is on unix?
12:29 < erus`> *nix?
12:29 < str1ngs> but..  not a good idea imo
12:29 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
12:29 < erus`> can your unix terminal display extended ascii characters?
like 177 errr 0xB0 i think
12:29 < str1ngs> jlaffaye: you just have to think outside the shlib box
12:29 < Electro^> str1ngs: worked around it by using append, pasting code to
pastebin
12:30 -!- Gertm [~Gertm@dD576D33F.access.telenet.be] has joined #go-nuts
12:30 < Electro^> http://pastebin.com/CARCVWgd
12:30 < Electro^> ugly as hell though
12:30 < str1ngs> Electro^: I was wonder if you were haveing out of bounds
maybe?
12:30 < Electro^> but it works and wont mess up any existing code
12:30 < str1ngs> what you might want to do is a ok check
12:30 < Electro^> and now...  im off for some coffee
12:30 < Electro^> and a banana
12:30 < Electro^> and chocolate
12:31 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-150-230.clienti.tiscali.it] has
quit [Ping timeout: 250 seconds]
12:31 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
12:31 < str1ngs> jlaffaye: what is your package manager written in now?
12:33 < jlaffaye> C :)
12:33 < str1ngs> ya not my idea of fun :P
12:34 < jlaffaye> lots of boiler code, struct hidding, ...  definitely not
fun
12:34 < xyproto> I have an *sdl.Surface and I wish to define a new method,
say func (s *sdl.Surface) DrawJaggedLine().  How can this be done?  By wrapping
sdl.Surface with a struct?  By defining a new type?
12:34 < str1ngs> but then right now mine is writtin in bash so I should not
say much hehe
12:34 < jlaffaye> when you write wrapper to hide the use of queue(3) you
feel bored
12:34 < str1ngs> xyproto: make a new struct and embed the type
12:35 < xyproto> str1ngs: ok, thank you
12:35 < jlaffaye> especially whem slices would do the job :)
12:35 < str1ngs> xyproto: but..  there might be limitations if something
expects that type.  check the embed section in effective go
12:36 < str1ngs> jlaffaye: I'm telling you a go package manager would be
awesome.
12:36 < str1ngs> jlaffaye: the only thing that I'm blocked on is it might
need to run on hurd.  so I need to check hurd/go progress :(
12:37 < str1ngs> gohurd!
12:38 < str1ngs> xyproto: sorry you would use an interface not a type
12:38 < str1ngs> xyproto: see
http://golang.org/doc/effective_go.html#embedding
12:39 < str1ngs> err not a struct
12:39 -!- xcombelle [~xcombelle@AToulouse-551-1-12-108.w86-196.abo.wanadoo.fr] has
joined #go-nuts
12:39 < jlaffaye> you cant register a go function in Lua, can you?
12:39 < str1ngs> doubt it
12:39 < jlaffaye> or that will mean the we can call go from C :)
12:42 < str1ngs> http://golang.org/doc/gccgo_install.html#C_Interoperability
12:43 -!- moraes [~moraes@189.103.177.124] has joined #go-nuts
12:43 < str1ngs> extern int go_function(int) __asm__
("myprefix.mypackage.Function");
12:44 < str1ngs> trying to figure out that paragraph let me know if it makes
sense to you :P
12:44 < str1ngs> The name of Go functions accessed from C is subject to
change.  At present the name of a Go function that does not have a receiver is
prefix.package.Functionname.  The prefix is set by the -fgo-prefix option used
when the package is compiled; if the option is not used, the default is simply go.
To call the function from C you must set the name using a gcc extension similar to
the gccgo extension.
12:45 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
12:45 < str1ngs> jlaffaye: so..  if I read this right you can call go from C
12:45 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
joined #go-nuts
12:46 < jlaffaye> sounds hack'ish :)
12:46 < str1ngs> its C what do you expect :P
12:47 < ww> i guess you can do it like this:
12:47 < ww> embed a lua in go...
12:47 < str1ngs> imo why would you want to call go from C. when you can just
write it in go
12:47 < ww> write a little C wrapper helper thing...
12:47 < ww> use your helper to register a go function...
12:48 < jlaffaye> str1ngs: for people who want to use my package from C
code?
12:48 < jlaffaye> for instance PackageKit?
12:48 < str1ngs> packagekit really?
12:48 < str1ngs> how many people use that other then rpm and apt
12:48 < str1ngs> have you seen the libaplm variant of that/
12:48 < str1ngs> ?
12:49 < jlaffaye> nop
12:49 < jlaffaye> I dont want to write a GUI, packagekit looks like a good
cheap solution :p
12:50 -!- zaero [~eclark@servo.m.signedint.com] has quit [Ping timeout: 260
seconds]
12:50 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
12:50 < str1ngs> actually I would go so far as to say.  if C and shlibs was
not such a pain in the ass.  we'd hardly need package managers :P
12:50 < str1ngs> so no fixing it with C imo it not the answer
12:50 < str1ngs> personally we need more people that write native packages
in go
12:50 < jnwhiteh> can you do a type assertion (to ensure it implements a
given interface) without requiring an allocation?
12:51 < str1ngs> jnwhiteh: I think you can with switch i.(type)
12:51 < ww> str1ngs: i agree, but that's a tradeoff...  which is
counterproductive because cgo works so well
12:52 < jnwhiteh> str1ngs: I'm talking about var _ SomeInterface =
SomeType{}
12:52 < ww> ...  i mean spend a couple of hours making a wrapper for a c
library
12:52 < jnwhiteh> but without the allocation
12:52 < ww> ...  or a couple of weeks figuring out what the c library does
and reimplementing it...
12:52 < jnwhiteh> if its a pointer type, you can do this with SomeType(nil)
12:52 < str1ngs> ww: I agree calling C is more practical then calling go
from C
12:52 < str1ngs> ww: and I'm not even a C programmer and writing C wrappers
is way easier then any other language I've used.  IMO
12:53 -!- zaero [~eclark@servo.m.signedint.com] has joined #go-nuts
12:53 < jlaffaye> so all in all, if you expect that your code will be used
by many users, its better to go with C, sadly
12:54 < jlaffaye> you can make bindings to every language to a C lib, which
is nice (python, ruby,whatever)
12:54 < jlaffaye> and Go of course :p
12:55 < str1ngs> yes but what you are forgetting is these "other" languages
can not do what C does.  however go "can" do these things sometimes better
12:55 < jlaffaye> some people would make a daemon and the RPC would be the
API but that is just _wrong_ :)
12:55 < str1ngs> sort of extreme cases of hardware, or overrated performance
12:55 < str1ngs> go is on par with C. python and ruby are not on par
12:55 < jlaffaye> maybe I am optimistic but I hope I will not be the only
consumer of my lib :)
12:56 < str1ngs> large portions are ruby and python's stdlib are written in
C. with go the whole stdlib is go
12:56 < str1ngs> short of some of the bits of the runtime
12:57 < str1ngs> meh I sound like a go fan boi
12:59 -!- TimKack [~tkack@213.208.236.186] has joined #go-nuts
13:00 < moraes> almost weekend!  i'll play with go again!
13:01 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
quit [Ping timeout: 250 seconds]
13:01 < jlaffaye> I _am_ a Go fan boy but Go was not the right tool for my
needs.  Again, sadly.
13:01 < str1ngs> jlaffaye: however I do see apoint the one flaw is that go
is not accessible via other languages
13:01 < jlaffaye> exactly :_
13:01 < str1ngs> which means your only option is go
13:01 < str1ngs> hmmm
13:02 < str1ngs> jlaffaye: write your package manager in go make a web
interface :P
13:02 < moraes> there's one python implementation written entirely in
python.
13:03 < str1ngs> moraes: sorry I should have mentioned some implimentions
vary
13:03 < str1ngs> but they suffer for it
13:03 < xyproto> What do you think of interface{} like in your head when you
write code?  "anything"?  "a duck"?
13:04 < str1ngs> I also think..  "avoid"
13:04 < moraes> they suffer from lack of static typing!
13:04 < str1ngs> rare I use it
13:04 < moraes> xyproto, i think "contract"
13:05 * moraes <3 interfaces
13:05 -!- robteix [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has
joined #go-nuts
13:05 < moraes> i wish python had interfaces
13:05 < jlaffaye> str1ngs: that will never be accepted by old FreeBSD guys
:p
13:05 < xyproto> moraes: nice one, I think of it a bit like "requirements" I
think
13:06 < uriel> I wish python had no inhertiance, and absolutely no
metaclasses
13:06 < str1ngs> jlaffaye: tell them 1972 called they want there C back
13:06 < xyproto> moraes: I like interfaces in Go as well.  I think it would
be nice if empty interfaces could be written in a more friendly way, though, but
one only has to define a type, which is marvellous :)
13:06 < moraes> uriel, you need to see my go oo code!
13:06 < str1ngs> jlaffaye: or come use hurd, or my crazy linux distro :P
13:07 < moraes> since i use go with a object oriented mind, i use goo!
13:07 < uriel> moraes: hahaha
13:07 < xyproto> uriel: I agree.  The depth of the syntax in Python is
structurization-overkill
13:08 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has joined #go-nuts
13:09 < xyproto> I really like Python, though.  I think it should go hand in
hand with Go, as it's so nice for writing sloppy prototype-like and one-off
code...
13:09 < moraes> interfaces could have attributes.  i wonder why they don't.
13:09 < moraes> i mean, not only methods.
13:09 < xyproto> moraes: what kind of attributes?
13:10 < moraes> go interfaces can only have functions
13:10 < xyproto> moraes: other types of requirements than "this and this and
this method is needed?"
13:10 < moraes> like vars
13:10 < moraes> easy to workaround.  makes convoluted code.
13:10 < xyproto> moraes: ah, that would be something.  However, you can
emulate it with functions?  :P
13:10 < moraes> you can.  it becomes convoluted when simple attributes would
do.
13:11 < moraes> go followed java in terms of setters/getters!  take that,
fanboys.
13:11 < moraes> :P
13:11 < knowmercy> sweet, templates are no longer exp/templates in the
weekly!
13:11 < str1ngs> not intentionally :P
13:11 < xyproto> moraes: but, having a get and a set function in place of a
variable tightens up the code somewhat, as you sometimes only wish to expose the
"get", and it makes it easier to add guards for the values
13:11 < knowmercy> now if those blasted openbsd syscalls would get finished!
13:12 < moraes> xyproto, i see the value of that.
13:12 < xyproto> knowmercy: what are they for?  For programming for OpenBSD
with Go?
13:12 -!- BrentRitterbeck [~brent@d199-74-53-98.nap.wideopenwest.com] has joined
#go-nuts
13:13 < str1ngs> xyproto: more like porting go to openbsd
13:13 < xyproto> moraes: so, again, Go is a relatively strict mistress, but
the end result can be pleasurable...
13:13 < str1ngs> twss
13:13 < xyproto> str1ngs: ;)
13:14 * jnwhiteh hugs gofmt -w -r
13:14 < aiju> 15:12 < knowmercy> now if those blasted openbsd syscalls
would get finished!
13:14 < aiju> i don't think you can ever finish them
13:14 < moraes> knowmercy, and exp/regexp too?
13:14 < aiju> aren't there more openbsd syscalls than people on this planet
by now?
13:14 < xyproto> str1ngs: having Go on OpenBSD would be nice, I guess.  I
would personally rather see it ported to Haiku OS, though, to have a real reason
to use it ;)
13:14 -!- Solak [~stijnw@cthia.xs4all.nl] has joined #go-nuts
13:14 < uriel> 13:09 < moraes> interfaces could have attributes.  i
wonder why they don't.
13:15 < str1ngs> xyproto: I'm more worried about hurd
13:15 < uriel> moraes: this has been discussed
13:15 < knowmercy> xyproto: so I can compile and run go on openbsd :)
13:15 < aiju> 15:15 < str1ngs> xyproto: I'm more worried about hurd
13:15 < aiju> hahahahahahaha
13:15 < uriel> moraes: search mailing list archives, (although it might be
hard to find, sorry I don't have any hints on how to find this discussion)
13:15 < moraes> uriel, i've rea one
13:15 < moraes> *read
13:15 < knowmercy> aiju: I dont know, don't we just copy the freebsd ones?
:P
13:16 -!- tncardoso [~thiago@20158117127.user.veloxzone.com.br] has quit [Remote
host closed the connection]
13:16 < str1ngs> aiju: perfection takes time ok?
13:16 -!- tncardoso [~thiago@20158117127.user.veloxzone.com.br] has joined
#go-nuts
13:17 < aiju> how many million lines of code is HURD already?
13:17 -!- gobeginner [~nwood@84.92.0.53] has joined #go-nuts
13:17 < str1ngs> actually its not as much as you would think
13:17 < str1ngs> mach is rather small
13:17 < uriel> they keep writting the same lines over and over
13:17 < uriel> str1ngs: MACH might be many things, small is not one of them
13:17 < aiju> the size of the OS is not the size of the kernel
13:18 < uriel> aiju: that implies the HURD could be considered an OS
13:18 < uriel> that is very dubious
13:18 < aiju> uriel: to some extent i would consider DOS an OS, so the
requirements are pretty low
13:18 < str1ngs> aiju: http://git.savannah.gnu.org/cgit/hurd
13:19 < aiju> ah ait
13:19 < aiju> *wait
13:19 < aiju> doesn't Hurd use GLIBC?
13:19 < str1ngs> yes
13:19 < aiju> SMALL and GLIBC
13:19 < str1ngs> and coreutils etc etc
13:19 < aiju> sorry
13:19 < uriel> moraes: is your workaround for no members in interfaces to
use getters and setters?  because I think a workaround could be embedding of a
struct that has the attriutes you want
13:19 < aiju> hahahahaha
13:19 < aiju> coreutils is already as big as the Plan 9 kernel
13:20 < str1ngs> oh here we go plan9 vs world :P
13:21 < moraes> uriel, that works.  that is not an interface though.
anyway, getters/setters is good to initialize values and overload behavior.
13:22 -!- tncardoso [~thiago@20158117127.user.veloxzone.com.br] has quit [Remote
host closed the connection]
13:22 < moraes> probably the best reason is that if you need an interface,
you probably also want getters/setters.
13:22 -!- ccc1 [~Adium@114-45-80-100.dynamic.hinet.net] has joined #go-nuts
13:23 * uriel isn't so sure, but I guess this is all too subjective and dependeant
on the situation
13:23 -!- mikespook [~mikespook@116.21.46.104] has joined #go-nuts
13:23 -!- tncardoso [~thiago@20158117127.user.veloxzone.com.br] has joined
#go-nuts
13:23 < aiju> i feel like people are abusing interface waaaaay too much
13:24 < aiju> *interfaces
13:24 < uriel> aiju: maybe, but interfaces are harder to abuse than most
features in other languages
13:24 < aiju> interfaces don't replace function pointers, the supplement
them
13:24 < aiju> *they
13:26 < uriel> I'm not so sure, callbacks are greatly overused
13:26 < uriel> certainly more than interfaces
13:27 * moraes is not overusing interfaces
13:27 < str1ngs> I'm logging off aiju made me all depressed about hurd :(
13:27 < aiju> i said ab-used, not over-used
13:28 < uriel> I'm not sure abusing interfaces is that easy, or that harmful
13:28 < uriel> callbacks on the other hand, yuck
13:29 < moraes> things like sorting an array or finding an index.  each one
implements their own?
13:29 < uriel> just because Go has closures, and closures are awesome,
doesn't mean you have to program like this is Javascript and callbacks are the
only way to do anything
13:29 < aiju> uriel: what the fuck are you talking about, i'm not talking
about async i/o
13:29 < uriel> moraes: finding an index seems easy enough
13:30 < uriel> aiju: heh
13:30 < jnwhiteh> no, you're just having a parallel/concurrent bitchfest :P
13:30 < jnwhiteh> how appropriate!
13:30 < str1ngs> jnwhiteh: just need generics to top it off :P
13:30 < jnwhiteh> spawn a new thread of discussion :P
13:31 < moraes> uriel, yeah i know.  some cases using a binary search etc
would be better.  just wondering if someone wrote some helper library.
13:31 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
13:31 -!- Slant [~scott@124-170-47-239.dyn.iinet.net.au] has joined #go-nuts
13:31 < uriel> moraes: http://golang.org/pkg/sort/
13:32 < Slant> How can I convince net.ListenPacket to pick an arbitrary UDP
socket to listen on?
13:32 < moraes> uriel, ah that exists :P
13:32 < foocraft> Persuation skills.
13:32 < str1ngs> Slant: define arbitrary
13:32 < jnwhiteh> aye
13:33 < Slant> str1ngs: "Please listen on a UDP port, I don't care which
one."
13:33 < str1ngs> Slant: rand?
13:33 < Slant> str1ngs: "Please listen on an *open* UDP port, I don't care
which one." ;-)
13:33 < str1ngs> Slant: have a client check first?  still probably not good
design
13:34 < Slant> In short: pick a port, Slant.  And add a "-p" option to your
program.
13:34 -!- bjarneh [~bjarneh@1x-193-157-207-107.uio.no] has quit [Quit: leaving]
13:34 < str1ngs> yep
13:34 < foocraft> Who is asking for help here?
13:35 < gobeginner> "(02:32:39 PM) Slant: How can I convince
net.ListenPacket to pick an arbitrary UDP socket to listen on?"
13:35 < foocraft> Slant: Did you satisfy yourself, by your answer?
13:36 < Slant> foocraft: Are you being snarky, or genuinely asking?
13:36 < foocraft> Genuinely asking, of course.
13:36 < str1ngs> Slant: he can obviously follow a simple thread.
13:36 < str1ngs> not*
13:37 < Slant> foocraft: No?
13:38 < foocraft> Good?  Come again next time?  :)
13:38 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
13:38 < str1ngs> where these idiots come from
13:38 < str1ngs> foocraft: seriously get lost
13:39 < str1ngs> Slant: just ignore him
13:39 < Slant> str1ngs: Already done.
13:39 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
13:39 < str1ngs> Slant: he didnt get that when I said still probably not
good design.  that prompted you to realize you should use a set port
13:40 -!- qeed [~qeed@adsl-98-85-39-193.mco.bellsouth.net] has joined #go-nuts
13:40 < leterip> it looked like a friendly joke to me.
13:41 < Slant> str1ngs: I've been using a set port.  However, I'm
instrumenting some tests to ensure the clients are connecting to different ports…
so that means having listeners on different ports.  Kinda hoped there would be an
easier way than just iterating up from a random high int16.  :-)
13:41 < Slant> str1ngs: I was being lazy.
13:42 < str1ngs> Slant: ya no big deal.  not sure why these foocraft guy
came for left field for
13:42 < str1ngs> from*
13:42 < Slant> str1ngs: IRC, man.  Sometimes it brings out the best.
13:43 < str1ngs> Slant: yep
13:44 < ncopa> \o/
13:44 < foocraft> Hahaha okay.  I've learned that you guys *actually* got
offended somehow.  Sorry, Slant.
13:44 < ncopa> gccgo works
13:44 < ncopa> got it working on alpine linux
13:44 < foocraft> ncopa: Are the binaries any faster than 8c?
13:45 < str1ngs> foocraft: the problem is if you are joking just say you are
joking.  because sarcasm does not translate well over irc
13:45 < aiju> everyone
13:45 < aiju> no sarcasm
13:45 < str1ngs> ncopa: nice
13:45 < foocraft> Alright, noted, str1ngs.
13:45 < Slant> str1ngs: Is he still going?
13:45 < foocraft> hahahaha aiju.
13:45 < ncopa> foocraft: i have no idea.  This is first go at all for alpine
linux
13:45 < ncopa> and it atleast compiles and runs hello.go
13:45 < aiju> wait
13:45 < aiju> wasn't str1ngs the same guy said that "people hind behind
their anonymity on the internet"?
13:46 < str1ngs> is this where you some how relate it to plan9?
13:47 < aiju> yeah, i'm always trolling by using actual software as an
example
13:47 < foocraft> I need bullshit, aiju.
13:47 < aiju> everyone knows that doesn't count
13:47 < foocraft> I need it.
13:47 < aiju> foocraft: then run hurd
13:47 < foocraft> bullshit is a very nice program.
13:47 < aiju> ah you mean that one
13:48 < foocraft> :)
13:48 < str1ngs> aiju: but by all means defend random idiots who troll
people that ask legitimate questions
13:48 < aiju> i'm not defending him
13:48 < aiju> stop assuming utter crap
13:49 < str1ngs> looks that way to me
13:49 < gobeginner> Quick poll: How many of the folks actually developing in
go are using it to talk to a database and do more than key pair lookups on it?
13:49 < Slant> Hey str1ngs and aiju, you're letting some random troll get
you at each other.  /ignore and move on.
13:49 < aiju> Slant: no need for some random troll
13:50 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
13:50 < jnwhiteh> gobeginner: I am not using it to talk to a database at
all, so put my answer down as such, I guess =)
13:50 < leterip> aiju is right no sarcasm ever imo.
13:50 < foocraft> Listen, str1ngs, I'm sorry.  Tell Slant that, too.  You
obviously need to understand lots of things about life.  I'm not trolling.
Consider it friendly advice.
13:50 < Slant> aiju: OK, not a random troll?  I just did join the channel.
But, I asked if he was being genuine and then he explicitly wasn't.
13:50 < knowmercy> gobeginner: I'm using it to talk to a database that has
actual data in it
13:50 < Slant> (she?  I donno.  I'm being presumptuous.)
13:51 < aiju> Slant: hell, this shit doesn't matter at all
13:51 < foocraft> I was being explicit, Slant.
13:51 < aiju> Slant: have you tried passing an empty port to ListenPacket?
13:51 < Slant> aiju: I have.  And nil.
13:51 < Slant> And 0.
13:51 < aiju> errors out?
13:51 < Slant> Yup.
13:51 < str1ngs> Slant: this happens all the time, someone asks a quest then
some jerk jumps all over him.
13:52 < Slant> Hmm.  Actually.
13:52 < aiju> and then people hind behind their anonymity
13:52 < Slant> Huh.  Maybe I misran my test cases.
13:52 < aiju> and use sarcasm
13:52 < Slant> Because it seems ":0" works just fine.
13:52 < Slant> Neat.
13:52 < Slant> Well.  That was fun.
13:52 < Slant> aiju: Thanks for prompting me to double-check my tests.  :-D
13:52 < Slant> Now I am satisfied.  Haha!
13:53 < str1ngs> lol
13:54 < str1ngs> foocraft: oh yes, I dont recall asking for your advice so
please dont give it
13:54 < foocraft> Okay.  You WIN chat.
13:55 < mpl> foocraft: you could always win by invoking hitler though.
13:55 < leterip> actually mpl i think that means you win
13:55 < mpl> yay
13:55 < foocraft> If only Hitler wanted to burn all the strings.  Ah I wish.
13:58 -!- guilty_spark [jsawczuk@ec2-184-73-19-135.compute-1.amazonaws.com] has
quit [Quit: Leaving]
13:59 -!- guilty_spark [jsawczuk@ec2-184-73-19-135.compute-1.amazonaws.com] has
joined #go-nuts
13:59 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
14:01 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
14:01 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
14:01 < str1ngs> /ignore's getting a workout today :P
14:09 -!- maragato [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has
joined #go-nuts
14:12 -!- robteix [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has quit
[Ping timeout: 276 seconds]
14:12 -!- meling [~meling@pico.ux.uis.no] has quit [Remote host closed the
connection]
14:12 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
14:12 -!- meling [~meling@152.94.120.233] has joined #go-nuts
14:13 -!- mau [~mau@110.159.94.86] has joined #go-nuts
14:17 -!- meling [~meling@152.94.120.233] has quit [Ping timeout: 260 seconds]
14:18 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
14:19 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
14:19 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 246 seconds]
14:20 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
14:29 -!- BrentRitterbeck [~brent@d199-74-53-98.nap.wideopenwest.com] has quit
[Quit: Leaving]
14:30 -!- niemeyer [~niemeyer@200-102-220-163.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
14:33 -!- cron_ [cron@190.121.72.21] has joined #go-nuts
14:33 -!- mikespook [~mikespook@116.21.46.104] has quit [Quit: Leaving.]
14:40 -!- cron_ [cron@190.121.72.21] has quit [Quit: Leaving]
14:43 < xash> I finally managed to login with my own MSNlib ..  go is fun
and Microsoft did really a mess
14:44 < hokapoka> niemeyer: you about?  I've got a question relating to mgo
& anno types.
14:44 < niemeyer> hokapoka: Yo
14:44 < hokapoka> hey
14:45 < niemeyer> hokapoka: How're things going there
14:45 < hokapoka> Sweet, mgo is working a treat.
14:45 < niemeyer> hokapoka: Nice to hear!
14:46 < hokapoka> I'm thinking about using schema.org's types and I was
concidering using Go's anonymouse types to handle, say, Place
(http://schema.org/Place) that's decendant from Thing.
14:47 < hokapoka> So I'd have type Thing struct { Description string; ....
} and type Place struct { Thing; Address PostalAddress; ...  }
14:49 < hokapoka> This is all find in go, but if I were to write a Place to
mongo, as you'd expect, it would create a doc that's place : { "thing": {
"description":"...", ...  }, "address":{ ...  }, "faxnumber":"+44...", ...  } }
etc.
14:50 < hokapoka> not a great example, the point I'm getting at is Place
will be stored so that Place.Description will actually need to be referenced as
"place.thing.description"
14:52 < hokapoka> Actually,
db.places.findOne({"thing.description":"foobar"});
14:52 < niemeyer> hokapoka: Indeed
14:53 < hokapoka> Whereas if I wanted to sue
db.posts.findOne({"description":"foobar"}) that way I don't have to remember what
prop is comming form which anonymouse type.
14:53 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
14:53 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
14:54 < hokapoka> I guess my best option, if I wanted to store the data in
mongo is this way, would be to explicitly define each type and without anonymouse
types.
14:54 < hokapoka> Or have you got another suggestion?
14:55 < hokapoka> s/define/define the properties/
14:56 < niemeyer> hokapoka: Hmm
14:56 < niemeyer> hokapoka: It sounds like a half-good idea
14:56 -!- ancientlore [~ancientlo@12.54.6.218] has joined #go-nuts
14:56 < niemeyer> hokapoka: The half that isn't so great is unmarshalling
14:57 < niemeyer> hokapoka: If you have a type with several sub-types, each
with a Description field, how do we sort out where "description" goes?
14:57 < jnwhiteh> hokapoka: are you interesting in a more informal meet-up
at some point of the Oxford go-phers?  Are there just the three ofu s?
14:57 < hokapoka> No, I mean don't have a type thing at all.  just inc.  all
the props from thing into Place.  and skip any kinda anonymouse types all
together.
14:57 -!- ancientlore [~ancientlo@12.54.6.218] has left #go-nuts []
14:58 < hokapoka> jnwhiteh: Aye only 3 of us ATM.  I was planning on email
you and the others later.  I'm not abbout this w/e and you're off to Stockholm
next week, for how long?
14:58 < niemeyer> hokapoka: Sorry, I think I'm missing it..
14:59 < niemeyer> hokapoka: "So I'd have type Thing struct"
14:59 < jnwhiteh> For a week, starting a week from Saturday
14:59 < niemeyer> hokapoka: That's what you said above..
14:59 < niemeyer> hokapoka: Let me try to explain the problem again
15:00 < niemeyer> hokapoka: Or rather..  I guess I'd like to understand
better what you're trying to do
15:00 < niemeyer> hokapoka: I may be missing it still
15:01 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
15:01 < niemeyer> hokapoka: You don't want to have a Thing type?
15:01 < hokapoka> niemeyer: right, I see 2 options.  1 - with type Thing
struct { Description string; ..  } and type Place struct { Thing; FaxNumber
string;...  } and 2 - type Place struct { Description string; FaxNumber string;
...  }
15:01 < hokapoka> Where 2 I don't create the sub-type Thing at all.
15:02 < hokapoka> I wondered if you had anyother suggestions, where I could
have subtypes, but not record the sub-type structure in mongo.
15:02 < niemeyer> hokapoka: I see
15:02 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts
15:03 < hokapoka> If not no big deal, I'll have to go with flat Types, to
make the monog life easier.
15:03 < niemeyer> hokapoka: Well..  that sounds like the opposite
15:03 < niemeyer> hokapoka: On one and you have flat in Go, and nested in
Mongo..
15:03 < niemeyer> hokapoka: On the latter suggestion you'd have nested in Go
and flat in Mongo
15:04 < niemeyer> hokapoka: What is the actual case you're trying to have?
15:04 < jnwhiteh> hokapoka: I'm here until Saturday 27th, and back on the
4th.
15:04 < hokapoka> niemeyer: sorry.  I'd like it nested in Go and flat in
Mongo
15:05 < hokapoka> jnwhiteh: okay, I'll fire off an email & create a google
calender for it see when we're all free.  Wher do you fancy meeting?  Personally I
like the Living Room, near the castle.
15:05 < niemeyer> hokapoka: Ok..  that's what I thought at first.  This is a
bit complicated..  multiple nested types can have the same field names
15:06 < niemeyer> hokapoka: When unmarshalling, there's no obvious way to
tell where a given field should go
15:06 < jnwhiteh> hokapoka: I'm in Jericho, just past St. Antony's on
Woodstock, but that sounds fine to me.  I don't think I've been there before.
15:06 < hokapoka> niemeyer: yeah that's what I thought, wasn't sure it was
really feasible, hence why I wanted your direction on it.
15:06 -!- nekoh [~nekoh@dslb-088-069-138-175.pools.arcor-ip.net] has quit [Ping
timeout: 276 seconds]
15:07 -!- ncopa [~ncopa@3.203.202.84.customer.cdi.no] has quit [Quit: Leaving]
15:07 < hokapoka> jnwhiteh: oh, I like jericho, we're trying to find a place
up the northend either there or Summertown.
15:07 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
15:08 < hokapoka> niemeyer: in these cases, the sub-types will only contain
properties that are not in the hight level types.
15:09 -!- jmil [~jmil@2001:468:1802:e148:223:32ff:feb1:9dfc] has joined #go-nuts
15:10 < niemeyer> hokapoka: Let me put some thought on it..  maybe I can
implement in a reliable way
15:10 < hokapoka> niemeyer: Place is relativly easy to handle if it's nested
in mongo, "thing.description" is simple.  But when you start to take say
http://schema.org/Dentist it's decendancy is multi level.  For example to
reference description here it would be :
15:11 < hokapoka>
db.densist.findOne({"localbusiness.organization.place.thing.description"})
15:11 < niemeyer> hokapoka: I see..  and in that case you sort of have a
guarantee they won't be duplicated from the spec
15:11 < hokapoka> correct
15:12 < niemeyer> hokapoka: Cool
15:12 < niemeyer> hokapoka: Can't look at that right now, but will get back
to you on this
15:12 < niemeyer> hokapoka: What's your email again?
15:13 < hokapoka> Of course for dentist you could have type Dentist struct {
Thing; Place; Organization; LocalBusiness; CurrenciesAccepted string; ...  }
15:13 < hokapoka> sweet, hokapoka.com@gmail.com
15:13 -!- samuell [~samuel@pc2-samuel.uppmax.uu.se] has joined #go-nuts
15:15 < niemeyer> hokapoka: Thanks..  if there's nothing I'm missing, the
next version should have that
15:15 < hokapoka> I think for now I'll go with defining all of the
properties on each type.
15:15 < hokapoka> niemeyer: oh wow, thats superb many thanks.
15:16 < hokapoka> niemeyer: there is one thing that might be an issue.
15:16 < niemeyer> hokapoka: Oh?
15:16 -!- nekoh [~nekoh@dslb-188-107-193-129.pools.arcor-ip.net] has joined
#go-nuts
15:16 < hokapoka> Take another look at Dentist.
15:17 < hokapoka> It has a property "branchOf" that's type is Organisation.
I guess it's not anonymouse.
15:18 -!- Guest38166 [~mau@110.159.94.86] has quit [Read error: Connection reset
by peer]
15:18 < hokapoka> niemeyer: or at least won't be anonymouse.  So it would be
a propperly nested value, whereas the actauly anonymouse type for "Organisation"
would need tobe stored flat in mongo.
15:19 -!- TimKack [~tkack@213.208.236.186] has quit [Quit: TimKack]
15:20 < niemeyer> hokapoka: Yeah, sounds fine..
15:21 < niemeyer> hokapoka: You'll be inlining LocalBusiness..  not
everything LocalBusiness contains
15:22 -!- djbrown [~djbrown@h236n2-g-va-a12.ias.bredband.telia.com] has joined
#go-nuts
15:22 -!- djbrown [~djbrown@h236n2-g-va-a12.ias.bredband.telia.com] has quit
[Changing host]
15:22 -!- djbrown [~djbrown@unaffiliated/djbrown] has joined #go-nuts
15:23 < hokapoka> niemeyer: Yep.  fantastic, thanks so much for your work on
mgo, must apprecated :).
15:24 < hokapoka> s/must/much
15:25 -!- qeed [~qeed@adsl-98-85-39-193.mco.bellsouth.net] has quit [Read error:
Connection reset by peer]
15:26 < niemeyer> hokapoka: My pleasure
15:27 < mpl> I haven't had the chance to try mongodb yet.  what's the
advantage or specific use case where it fits well over other common dbs like
mysql, postgres, etc?
15:28 < hokapoka> mpl: http://www.mongodb.org/display/DOCS/Use+Cases
15:30 < mpl> thx
15:31 < jnwhiteh> is there a way to make godoc show unexported
fields/methods?
15:32 < niemeyer> mpl: That may be better asked on #mongodb
15:32 < niemeyer> mpl: Otherwise we may take over the channel ;)
15:33 < niemeyer> hokapoka: That's a nice page I hadn't seen
15:33 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Remote host
closed the connection]
15:33 < niemeyer> jnwhiteh: Some people talked about that, but I don't think
anyone is working on it atm
15:34 < jnwhiteh> ah okay
15:34 < mpl> niemeyer: yeah.  I'll switch to over there if/when I have more
specific questions.  unfortunately I don't have any work project where I could use
it atm, nor the time to play with yet another thing.
15:34 < jnwhiteh> it would be super useful for local development =)
15:34 -!- miker2 [~miker2@64.55.31.190] has joined #go-nuts
15:35 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
15:36 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 260 seconds]
15:36 < hokapoka> mpl: so far I've found there's little I can't achive
succesfully, and easily, with it.
15:38 < niemeyer> jnwhiteh: True
15:38 < niemeyer> hokapoka: +1
15:39 < jnwhiteh> I don't see any low-hanging fruit in the source, but I can
look more later
15:40 -!- ccc1 [~Adium@114-45-80-100.dynamic.hinet.net] has quit [Quit: Leaving.]
15:41 -!- qeed [~qeed@adsl-98-85-60-193.mco.bellsouth.net] has joined #go-nuts
15:41 -!- moraes [~moraes@189.103.177.124] has quit [Ping timeout: 260 seconds]
15:41 -!- samuell [~samuel@pc2-samuel.uppmax.uu.se] has quit [Quit: Ex-Chat]
15:42 -!- ccc1 [~Adium@114-45-80-100.dynamic.hinet.net] has joined #go-nuts
15:47 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
15:50 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout:
246 seconds]
15:59 -!- vsmatck [~smack@64-142-40-6.dsl.static.sonic.net] has quit [Ping
timeout: 250 seconds]
16:01 -!- qeed [~qeed@adsl-98-85-60-193.mco.bellsouth.net] has quit [Ping timeout:
264 seconds]
16:03 -!- Solak [~stijnw@cthia.xs4all.nl] has quit [Remote host closed the
connection]
16:05 -!- GoBIR_ [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
joined #go-nuts
16:05 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
quit [Read error: Connection reset by peer]
16:10 < kevlar_work> hmm, anyone around who understands
http://codereview.appspot.com/4901052/ ?
16:13 < kevlar_work> oh, nvm, tests came in a later CL.
16:18 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has joined #go-nuts
16:21 < kevlar_work> <3 "runtime: simplify stack traces"
http://codereview.appspot.com/4907048/
16:23 < s|k> I like that gofmt finds errors
16:29 -!- tncardoso [~thiago@20158117127.user.veloxzone.com.br] has quit [Ping
timeout: 250 seconds]
16:33 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
16:34 -!- Slant [~scott@124-170-47-239.dyn.iinet.net.au] has quit [Quit: Slant]
16:36 < leterip> lol
16:39 -!- ccc1 [~Adium@114-45-80-100.dynamic.hinet.net] has quit [Quit: Leaving.]
16:42 -!- nekoh [~nekoh@dslb-188-107-193-129.pools.arcor-ip.net] has quit [Ping
timeout: 264 seconds]
16:43 -!- tncardoso [~thiago@20158097018.user.veloxzone.com.br] has joined
#go-nuts
16:46 -!- nekoh [~nekoh@dslb-088-068-007-154.pools.arcor-ip.net] has joined
#go-nuts
16:55 -!- GeertJohan [~Squarc@clal-5-212.eduroam.inholland.nl] has joined #go-nuts
16:57 -!- aho [~nya@fuld-590c7204.pool.mediaWays.net] has joined #go-nuts
17:00 -!- xcombelle [~xcombelle@AToulouse-551-1-12-108.w86-196.abo.wanadoo.fr] has
quit [Remote host closed the connection]
17:02 -!- meling [~meling@134.81-167-41.customer.lyse.net] has joined #go-nuts
17:03 -!- pyrhho [~pyrhho@027e80ed.bb.sky.com] has quit [Quit: pyrhho]
17:05 -!- artefon [~thiago@189.12.231.185] has joined #go-nuts
17:06 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
17:06 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
17:06 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
17:08 -!- tncardoso [~thiago@20158097018.user.veloxzone.com.br] has quit [Ping
timeout: 268 seconds]
17:10 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:12 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
17:18 -!- TheMue [~FMueller@p5DDF782A.dip.t-dialin.net] has joined #go-nuts
17:22 -!- artefon [~thiago@189.12.231.185] has quit [Ping timeout: 250 seconds]
17:32 -!- qeed [~qeed@adsl-98-85-61-241.mco.bellsouth.net] has joined #go-nuts
17:34 -!- yogib [~yogib@131.234.59.64] has quit [Read error: Operation timed out]
17:35 -!- artefon [~thiago@20158048249.user.veloxzone.com.br] has joined #go-nuts
17:35 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:44 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
17:53 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
17:53 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has joined #go-nuts
17:54 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
17:59 -!- moraes [~moraes@189.103.177.124] has joined #go-nuts
18:05 -!- rand11235 [477b8618@gateway/web/freenode/ip.71.123.134.24] has quit
[Ping timeout: 252 seconds]
18:08 -!- yogib [~yogib@dslb-178-009-023-182.pools.arcor-ip.net] has joined
#go-nuts
18:37 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 258 seconds]
18:38 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
18:39 -!- xash [~xash@d025151.adsl.hansenet.de] has quit [Quit: Lost terminal]
18:41 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has quit [Quit: TimKack]
18:45 -!- Solak [~stijnw@cthia.xs4all.nl] has joined #go-nuts
18:50 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has
joined #go-nuts
18:52 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has joined #go-nuts
18:54 -!- artefon [~thiago@20158048249.user.veloxzone.com.br] has quit [Quit: bye]
18:58 -!- cron_ [cron@190.121.72.21] has joined #go-nuts
18:59 -!- cron_ [cron@190.121.72.21] has quit [Read error: Connection reset by
peer]
19:00 -!- gobeginner [~nwood@84.92.0.53] has left #go-nuts []
19:00 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
19:04 -!- nekoh [~nekoh@dslb-088-068-007-154.pools.arcor-ip.net] has quit [Ping
timeout: 240 seconds]
19:06 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Quit: "Wait...  what?!"]
19:06 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
19:07 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
19:08 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
19:13 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 276 seconds]
19:13 -!- derpp [~nicka@142.176.0.21] has joined #go-nuts
19:15 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 260 seconds]
19:17 -!- Project_2501 [~Marvin@82.84.66.108] has joined #go-nuts
19:17 -!- GeertJohan [~Squarc@clal-5-212.eduroam.inholland.nl] has quit [Quit:
Leaving.]
19:20 -!- PortatoreSanoDiI [~Marvin@82.84.75.149] has quit [Ping timeout: 260
seconds]
19:31 -!- maragato [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has quit
[Remote host closed the connection]
19:31 -!- huin [~huin@91.85.139.164] has joined #go-nuts
19:33 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has joined
#go-nuts
19:43 -!- alexMocanu [~alexandru@87-194-16-137.bethere.co.uk] has joined #go-nuts
19:48 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-178-94.clienti.tiscali.it] has
joined #go-nuts
19:51 -!- Project_2501 [~Marvin@82.84.66.108] has quit [Ping timeout: 240 seconds]
19:57 -!- pyrhho [~pyrhho@027e80ed.bb.sky.com] has joined #go-nuts
19:58 -!- alehorst [~alehorst@189.58.28.55.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
20:00 -!- lmnop [~amie@50-44-67-1.bltn.il.frontiernet.net] has quit [Quit:
Leaving.]
20:00 -!- lmnop [~amie@50-44-67-1.bltn.il.frontiernet.net] has joined #go-nuts
20:01 -!- nekoh [~nekoh@dslb-188-107-172-189.pools.arcor-ip.net] has joined
#go-nuts
20:02 < pyrhho> what's a good example for the exp/template package?
20:05 < derpp> there are tons of them, but I can't actually comment on
quality
20:06 < derpp> the codewalk stuff uses it
20:06 < pyrhho> does it?  ok cool will start there
20:06 < pyrhho> thanks
20:06 < derpp> oh sorry, exp/template I'm not sure
20:07 < derpp> but the /new/ codewalk is using it, but it's not available
afaik
20:08 < pyrhho> oh
20:09 -!- tvw [~tv@e176001102.adsl.alicedsl.de] has joined #go-nuts
20:09 -!- tvw [~tv@e176001102.adsl.alicedsl.de] has quit [Read error: Connection
reset by peer]
20:09 -!- tvw [~tv@e176001102.adsl.alicedsl.de] has joined #go-nuts
20:10 -!- tncardoso [~thiago@187.114.32.244] has joined #go-nuts
20:10 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
20:12 -!- photron [~photron@port-92-201-25-38.dynamic.qsc.de] has quit [Read
error: Operation timed out]
20:12 -!- alexMocanu [~alexandru@87-194-16-137.bethere.co.uk] has quit [Quit:
Leaving]
20:12 < derpp>
http://groups.google.com/group/golang-nuts/msg/003bb3f84c7d6e21 godoc?
20:12 < derpp> The next weekly references has been released
20:14 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
20:16 < pyrhho> derpp: awesome.  that's exactly what I was looking for.
thanks :)
20:22 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
20:24 -!- nicka [~nicka@blk-222-42-163.eastlink.ca] has joined #go-nuts
20:24 -!- nicka [~nicka@blk-222-42-163.eastlink.ca] has quit [Changing host]
20:24 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
20:25 -!- nicka1 [~nicka@142.176.0.21] has quit [Ping timeout: 246 seconds]
20:33 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 250 seconds]
20:36 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
20:45 -!- _nil [~ct@c-67-189-251-116.hsd1.ct.comcast.net] has quit [Remote host
closed the connection]
20:45 -!- huin [~huin@91.85.139.164] has quit [Quit: leaving]
20:52 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
20:56 -!- TheMue [~FMueller@p5DDF782A.dip.t-dialin.net] has quit [Quit: leaving]
21:00 -!- miker2 [~miker2@64.55.31.190] has quit [Ping timeout: 252 seconds]
21:00 < moraes> do you believe there was no project named "gorilla" on
google code?
21:01 < moraes> "i do."
21:01 < moraes> ok.  just checking.
21:06 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
21:10 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
21:10 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
21:11 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
21:14 -!- oal [~olav@5.79-160-122.customer.lyse.net] has quit [Remote host closed
the connection]
21:20 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has quit [Quit: TimKack]
21:26 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
21:27 -!- pyrhho [~pyrhho@027e80ed.bb.sky.com] has quit [Ping timeout: 260
seconds]
21:30 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
21:31 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
21:34 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has quit
[Remote host closed the connection]
21:48 -!- yogib [~yogib@dslb-178-009-023-182.pools.arcor-ip.net] has quit [Quit:
yogib]
21:54 < anticw> niemeyer: i was looking to make a web-forum with template
...  it occurs to me r' aside you're probably the best person to ask for pointers
21:55 < anticw> niemeyer: you don't know off hand a good source of examples
tailored to producing html gunk?
21:56 < niemeyer> anticw: Hey
21:56 < niemeyer> anticw: html gunk?
21:57 < niemeyer> anticw: You mean an example of exp/template usage?
21:59 < prudhvi> Hi, while running an RPC Server as described here.
http://golang.org/pkg/rpc/#HandleHTTP I cannot use the `go http.Serve` goroutine
call.  How can i make it so that it gets executed
22:00 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 250 seconds]
22:00 < leterip> why cant you?
22:02 < f2f> because main quits?  :)
22:02 < leterip> then skip the goroutine :)
22:03 -!- vmil86 [~vmil86@88.118.36.96] has quit [Remote host closed the
connection]
22:07 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
22:08 < prudhvi> leterip: but, using goroutine is suggested
22:09 < leterip> they say "typically"
22:09 < prudhvi> i can't see any other use-case
22:09 < anticw> niemeyer: yeah, something to show how i would (for example)
file a table (or siliar) from []someStruct
22:09 < leterip> meaning you'd do other stuff while its serving the http rpc
22:09 < leterip> you dont need to run it in a goroutine if you dont have any
need to do that
22:09 < anticw> so one row per slice element, and then the syntax to extract
a given member
22:10 -!- odoacre [~antonio@218.241.169.34] has quit [Read error: Connection reset
by peer]
22:11 < niemeyer> anticw: The docs for exp/template are probably the best
source
22:11 < niemeyer> anticw: http://tip.goneat.org/pkg/exp/template
22:11 < niemeyer> anticw: Sorry
22:11 < niemeyer> anticw: It's been moved already:
22:11 < niemeyer> anticw: http://tip.goneat.org/pkg/template/
22:12 < niemeyer> anticw: For a slice, you can do something like this:
22:12 < anticw> i had a quick scan of the docs, i think i was too impatient
perhaps
22:12 < niemeyer> anticw: {{range .SliceField}} {{.SliceElementField}}
{{end}}
22:13 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:13 < niemeyer> anticw: The dot (.) contains the current context at all
times
22:13 < niemeyer> anticw: The initial current context is the thing you pass
as the data argument in Execute()
22:13 < niemeyer> anticw: This is really the foundation for the whole thing
22:13 < niemeyer> anticw: The docs should help now, but if you have specific
questions, fire and someone here can try to help you
22:14 < anticw> actually, that looks like enough to get me going
22:14 < anticw> thanks
22:14 < niemeyer> anticw: No problem
22:14 < niemeyer> anticw: {{.}} works too, btw, in case you're iterating
over a slice of, say, strings
22:19 -!- idobi [~stan.stee@8.18.115.2] has joined #go-nuts
22:20 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has
joined #go-nuts
22:20 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Quit: Lost terminal]
22:23 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
22:23 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
22:32 -!- moraes [~moraes@189.103.177.124] has quit [Ping timeout: 268 seconds]
22:33 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
22:34 -!- Solak [~stijnw@cthia.xs4all.nl] has quit [Remote host closed the
connection]
22:37 -!- idobi [~stan.stee@8.18.115.2] has left #go-nuts []
22:40 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Quit: Computer has gone to sleep.]
22:49 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-178-94.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
22:52 -!- black_rez [~black_rez@house.calculating-god.com] has quit [Excess Flood]
22:56 -!- black_rez [~black_rez@house.calculating-god.com] has joined #go-nuts
22:57 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has joined #go-nuts
23:06 -!- nicka [~nicka@unaffiliated/nicka] has quit [Quit: Leaving.]
23:06 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
23:08 < prudhvi> Using, rpc and http packages i get rpc on HTTP.  But, how
could i do the same with json-rpc on HTTP
23:09 < prudhvi> The api doesn't seem to have any way to make this possible.
23:15 -!- clr_ [~colin@c-67-183-138-2.hsd1.wa.comcast.net] has joined #go-nuts
23:15 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has left #go-nuts []
23:16 < leterip> you want to use the json line encoding instead of gob?
23:21 -!- moraes [~moraes@189.103.177.124] has joined #go-nuts
23:21 < prudhvi> leterip: is gob better?.  I never used it before.
23:22 < prudhvi> Also, i am looking for a simple rpc style service and
thought json-rpc over http a good idea.
23:22 < leterip> i dont have any idea really, but i would try creating my
own type that embeds an rpc.Server and overriding the ServeConn method to use the
jsonrpc encoder instead of the gob one.
23:22 < leterip> it might not be that hard.
23:22 < prudhvi> ok, i`ll look into it now.
23:22 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
joined #go-nuts
23:22 < knowmercy> evening
23:23 < leterip> func (server *MyServer) ServeConn(conn io.ReadWriteCloser)
{ server.ServeCodec(jsonrpc.NewServerCodec(conn)) }
23:23 < leterip> something like that
23:23 < leterip> of course you'll probably have to make your own client too
23:24 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
23:24 < leterip> oh theres a NewClientWithCodec that makes that easy
23:24 < leterip> so that might work
23:25 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Quit:
Leaving.]
23:25 < prudhvi> yes
23:25 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
23:25 < leterip> well, it looks like you'd have to reimplement DialHTTP or
DialHTTPPath to make it call NewClientWithCodec
23:26 < leterip> and that would be it
23:26 < prudhvi> leterip: yes, thanks this makes sense
23:26 < leterip> im not sure you gain anything other than using json :)
23:26 < leterip> might be useful for debugging or something.  i dunno
23:27 < prudhvi> leterip: using json, helps me to use the service thats
already running.  I can hook this to an another HTTP Server an not have to deal
with IT anymore :)
23:27 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has quit [Ping timeout: 252
seconds]
23:28 < leterip> cool
23:28 < leterip> its too bad theres no way to change the codec on a Client
after it's been made.
23:28 < leterip> so you have to reimplement DialHTTP*
23:37 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 276 seconds]
23:42 -!- tvw [~tv@e176001102.adsl.alicedsl.de] has quit [Remote host closed the
connection]
23:45 -!- qeed [~qeed@adsl-98-85-61-241.mco.bellsouth.net] has quit [Ping timeout:
264 seconds]
23:49 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
23:55 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 268 seconds]
23:56 -!- ccc [~macroron@c-76-26-54-186.hsd1.fl.comcast.net] has joined #go-nuts
23:57 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Quit:
Leaving.]
23:58 -!- qeed [~qeed@adsl-74-235-213-94.mco.bellsouth.net] has joined #go-nuts
--- Log closed Fri Aug 19 00:00:20 2011