Go Language Resources Go, golang, go... NOTE: This page ceased updating in October, 2012

--- Log opened Wed Jun 08 00:00:02 2011
--- Day changed Wed Jun 08 2011
00:00 < TheCritic> but I think I am missing something (or 3)
00:01 -!- shvntr [~shvntr@119.121.26.150] has joined #go-nuts
00:03 -!- mgray [~mgray@li226-224.members.linode.com] has quit [Quit: Lost
terminal]
00:04 < TheCritic> holy crap
00:04 < TheCritic> I think I figured this out...
00:07 < nsf> http://pastie.org/2035228
00:07 < TheCritic> Do you see any obvious errors in this?
http://pastebin.com/27jyWmyX
00:07 < nsf> oops
00:07 < nsf> wrong channel :)
00:07 < TheCritic> :)
00:08 < nsf> sorry
00:08 -!- shvntr [~shvntr@119.121.26.150] has quit [Quit: leaving]
00:08 < nsf> TheCritic: looks fine
00:08 < nsf> what's wrong with it?
00:08 < TheCritic> nice!
00:08 < TheCritic> nothing
00:08 < TheCritic> looks like it works
00:09 < nsf> it prints the number though
00:09 < TheCritic> the number is the crc64 for the file, correct?
00:09 < nsf> right
00:09 < nsf> ah, I guess it's some different language
00:10 < nsf> where hash class had two Sum methods
00:10 < nsf> one for nice hex strings and the other for numbers :)
00:10 -!- Sisten [~Sisten@s213-103-208-147.cust.tele2.se] has quit [Read error:
Connection reset by peer]
00:10 < TheCritic> ah
00:11 -!- Sisten [~Sisten@s213-103-208-147.cust.tele2.se] has joined #go-nuts
00:12 < TheCritic> this must be wrong
00:12 < TheCritic> it always prints the same number
00:12 < TheCritic> :(
00:12 < TheCritic> wait..  nevermind
00:14 <@adg> nsf: wtf is with that import block!?
00:14 < nsf> adg: it's not Go :)
00:14 <@adg> what is it?
00:14 < nsf> adg: crawl, a programming language I'm working on..  it's more
like C with Go syntax
00:15 < nsf> it can import C headers directly
00:15 <@adg> nsf: nice!  got a web site?
00:15 < nsf> adg: https://github.com/nsf/crawlc
00:15 < nsf> there is some stuff
00:15 < nsf> but it's far from useful
00:16 < nsf> http://home.nosmileface.ru/typesystem.html <- also this doc
00:16 < nsf> it reflect recent changes in the type system
00:16 < nsf> reflects*
00:17 < nsf> adg: in other words, it's all largely WIP
00:17 <@adg> cool, seems interesting
00:17 < nsf> it's like a low level Go's brother :D
00:17 <@adg> :)
00:19 -!- TheCritic_ [~TheCritic@c-24-30-34-40.hsd1.ga.comcast.net] has joined
#go-nuts
00:19 -!- robteix [~robteix@201-213-183-45.net.prima.net.ar] has quit [Ping
timeout: 276 seconds]
00:20 -!- TheCritic [~TheCritic@c-24-30-34-40.hsd1.ga.comcast.net] has quit [Ping
timeout: 250 seconds]
00:20 < TheCritic> writing data to disk....  like a ini, csv, yaml,
sqlite....  something and easy in go...  recomendations?
00:21 < TheCritic> trying to serialize my file/crc64 list
00:21 < nsf> do you want it readable?  or just a way to
serialize/deserialize?
00:22 < nsf> http://golang.org/pkg/gob/
00:22 < nsf> there is this package
00:22 < TheCritic> nice
00:22 < TheCritic> ill read it
00:22 < nsf> but it's binary
00:22 < nsf> the format I mean
00:22 < TheCritic> yeah, binary is prefered
00:22 < TheCritic> no need for humans to read it
00:23 <@adg> TheCritic: gob or json
00:24 <@adg> TheCritic: gob is great
00:24 < TheCritic> I like gob, looking for gob persist examples now :)
00:24 < TheCritic> well, the 90 seconds I have read anyway
00:29 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
00:31 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Client Quit]
00:34 -!- rputikar [~240182H@203-206-21-179.dyn.iinet.net.au] has joined #go-nuts
00:36 -!- kr [~Keith@204.14.152.118] has quit [Ping timeout: 246 seconds]
00:36 -!- Sisten [~Sisten@s213-103-208-147.cust.tele2.se] has quit [Quit: Lämnar]
00:36 -!- Tv [~Tv@ip-66-33-206-8.dreamhost.com] has quit [Ping timeout: 252
seconds]
00:39 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
00:39 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
00:40 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
00:41 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Ping
timeout: 260 seconds]
00:46 -!- rputikar [~240182H@203-206-21-179.dyn.iinet.net.au] has quit [Quit:
rputikar]
00:48 -!- sebastianskejoe [~sebastian@89.249.0.154] has quit [Quit: Lost terminal]
00:49 -!- tgall_out [~tgall@linaro/tgall-foo] has quit [Ping timeout: 244 seconds]
00:52 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
00:52 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
00:57 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
00:59 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
01:04 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
01:04 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
01:11 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
01:12 -!- iant [~iant@67.218.103.62] has quit [Quit: Leaving.]
01:17 -!- robteix [~robteix@host16.190-230-219.telecom.net.ar] has joined #go-nuts
01:19 -!- franciscosouza [~francisco@187.105.21.125] has joined #go-nuts
01:21 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
01:21 -!- robteix [~robteix@host16.190-230-219.telecom.net.ar] has quit [Client
Quit]
01:21 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
01:23 < TheCritic> ok, so I have a struct that defines a "filerecord".  I
want to make one and add it to a list...
01:25 < skelterjohn> what's the hang-up?
01:26 -!- jsj [~johan@78-70-255-20-no149.tbcn.telia.com] has joined #go-nuts
01:28 < TheCritic> http://pastebin.com/Xc7p5DWv
01:28 < TheCritic> this is a bit of the code extracted
01:30 < TheCritic> oops, this is better
01:30 < TheCritic> http://pastebin.com/iRDxjQFq
01:30 < TheCritic> I am particularly confused about this bit: fr :=
FileRecord "/", 0, 0
01:32 < skelterjohn> doesn't look like it compiles
01:32 < TheCritic> nope
01:32 < skelterjohn> you're missing {}
01:32 < skelterjohn> FileRecord{ "/", 0, 0 }
01:32 < skelterjohn> is one way to initialize a struct
01:32 < skelterjohn> you have to fill every element, in order
01:32 < TheCritic> nice
01:32 < skelterjohn> you can also do FileRecord{path:"/"; crc64:0} etc
01:32 < TheCritic> that worked
01:32 < TheCritic> cool
01:33 < TheCritic> thanks
01:33 < skelterjohn> my pleasure
01:34 < TheCritic> ok, I am storing these in a list
01:34 < TheCritic> so it comes out as an element
01:35 < TheCritic> do I need to coax it back into a FileRecord to access the
path?
01:37 < skelterjohn> theList[i].path
01:37 < skelterjohn> is that what you're talking about?
01:37 < skelterjohn> i'm not really sure what you're saying, to be honest :)
01:38 < TheCritic> ah, just needed a type assertion...
01:38 < TheCritic> I am almost leaning this thing....  fun fun fun
01:38 < TheCritic> learning
01:38 < skelterjohn> oh i see - you're using container/list and it has
interface{} as its type
01:38 < TheCritic> yup
01:39 < skelterjohn> just so you know, regular slices can be used as
expandable java or C++ style vectors
01:39 < skelterjohn> container/list is only useful if you specifically want
a linked list
01:39 < TheCritic> nice
01:39 < skelterjohn> someSlice = append(someSlice, someItem)
01:39 < TheCritic> now I need to persist mi list....  looking at a glob ....
01:39 < skelterjohn> will add something to a slice
01:40 < TheCritic> nice
01:40 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
01:42 < TheCritic> ok, here is my code so far....
01:42 -!- nannto [~nanto@pee5b70.tokyff01.ap.so-net.ne.jp] has joined #go-nuts
01:42 < TheCritic> http://pastebin.com/Dxb5hNLf
01:42 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
01:43 < TheCritic> I am unsure if a list is the right way to go
01:43 < TheCritic> maybe just an array...  but I couldn't figure that one
out....
01:43 < skelterjohn> probably not - from what i see in that code you just
want a slice
01:43 < skelterjohn> which is like an array but a reference type
01:43 < skelterjohn> var filerecords []FileRecord
01:44 < skelterjohn> instead of PushFront, filerecords = append(filerecords,
fr)
01:44 < TheCritic> ok, you didnt dimension it....
01:44 < skelterjohn> that's right - if i had it would be an array
01:44 < TheCritic> nice
01:44 < TheCritic> that is so much earier
01:45 < TheCritic> thanks!
01:45 < skelterjohn> instead of line 63, "for _, e := range filerecords { "
01:48 < TheCritic> wow, that seems faster
01:48 < TheCritic> ok
01:48 < TheCritic> for _, e := range filerecords {
01:48 < TheCritic> what does the _ represent?
01:49 < TheCritic> ah
01:49 < TheCritic> nevermind
01:49 < TheCritic> range returns 2 values
01:49 < TheCritic> and _ lets you throw it away
01:49 < TheCritic> correct?
01:50 < vsmatck> yup
01:50 < TheCritic> nice
01:51 -!- bjarneh [~bjarneh@1x-193-157-202-30.uio.no] has joined #go-nuts
01:52 < skelterjohn> the first one is the index counter for whichever one
you're on
01:52 < skelterjohn> and in your case it looked like you didn't need it
01:53 < TheCritic> later I would like to reference the data by using a key
01:53 < skelterjohn> is it ok if that key is the array index?
01:54 < skelterjohn> :)
01:54 < skelterjohn> otherwise you should learn about map types
01:54 < TheCritic> filerecords("/Users/bshuler/code/pcp/ocr.tgz").crc64
01:54 < skelterjohn> ah
01:54 < TheCritic> the file path will be the kep
01:54 < TheCritic> key
01:54 < skelterjohn> yes - a map type is what you need
01:54 < TheCritic> so, reading map types now
01:54 < TheCritic> cool, thx
01:56 < TheCritic> make(map[string] FileRecord )
01:57 < skelterjohn> looks right
01:57 < TheCritic> nice
01:58 < TheCritic> so, to declare filerecords as a map instead of a slice...
01:58 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
01:59 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
02:06 -!- Netsplit *.net <-> *.split quits: Natch|, aslakr_, apexo, exch,
preflex, madari, Boney, Archwyrm, ekontsevoy, scoeri, (+10 more, use /NETSPLIT to
show all of them)
02:06 -!- aslakr [~aslak@static.42.114.40.188.clients.your-server.de] has joined
#go-nuts
02:06 -!- Netsplit over, joins: kkress, Archwyrm
02:06 -!- Netsplit over, joins: Xenith
02:06 -!- Netsplit over, joins: TheSeeker
02:06 -!- Netsplit over, joins: schilly
02:06 -!- mkrautz [~mkrautz@enchantment.sasquash.dk] has joined #go-nuts
02:06 -!- keithcascio [~keithcasc@nat/google/x-tywqhpulmjyohxky] has joined
#go-nuts
02:06 -!- Netsplit over, joins: madari
02:06 -!- Netsplit over, joins: Boney
02:06 -!- scoeri [~jdekoste@progftp.vub.ac.be] has joined #go-nuts
02:06 < TheCritic> is there a cool append type method for maps?
02:07 -!- Netsplit over, joins: yiyus, ekontsevoy, exch, yugui_zzz, apexo
02:07 -!- Netsplit over, joins: Natch|
02:08 -!- Netsplit over, joins: kanru
02:08 < KirkMcDonald> TheCritic: What would it do?
02:08 < TheCritic> ah, ok
02:08 < askhader> This call to Fprint produces the accompanied error.  Any
ideas why this may be?  http://pastebin.com/Jmwz56MN
02:09 < TheCritic> so, I have declared my map
02:09 < TheCritic> now I want to fill it dynamically
02:09 < KirkMcDonald> TheCritic: And made it with make()?
02:09 < KirkMcDonald> TheCritic: Then just assign to the keys.
02:09 < KirkMcDonald> m[k] = v
02:09 < TheCritic> that easy
02:10 < TheCritic> seriously?
02:10 < TheCritic> cool
02:10 < askhader> Oh I can see what is happening here
02:11 < TheCritic> if v is a struct?
02:11 -!- keithcascio [~keithcasc@nat/google/x-tywqhpulmjyohxky] has quit [Client
Quit]
02:11 -!- Rennex [rennex@giraf.fi] has joined #go-nuts
02:11 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
02:11 < KirkMcDonald> TheCritic: It must be assignable.
02:11 < KirkMcDonald> Just like any other assignment.
02:12 < TheCritic> ok
02:13 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
02:17 < TheCritic> any ideas?  http://pastebin.com/8Y0UbXvT
02:18 < TheCritic> I trying to convert my slice to a map...
02:19 -!- GoTest [~gotest@rrcs-97-79-174-130.sw.biz.rr.com] has joined #go-nuts
02:19 -!- GoTest [~gotest@rrcs-97-79-174-130.sw.biz.rr.com] has quit [Remote host
closed the connection]
02:22 -!- bmizerany [~bmizerany@c-76-21-40-53.hsd1.ca.comcast.net] has joined
#go-nuts
02:23 < Tv> TheCritic: what you have is a datatype not a value, yet you are
trying to assign it
02:23 < Tv> TheCritic: take out the =
02:24 < Tv> TheCritic: though you'll probably be happier if you create a
type Foo struct {..} and then map[string]Foo
02:24 -!- franciscosouza [~francisco@187.105.21.125] has quit [Read error:
Connection reset by peer]
02:24 < TheCritic> cool
02:25 < TheCritic> thanks, I will try that!
02:26 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #go-nuts
02:31 < TheCritic> Tv: so given this: http://pastebin.com/NfhiS5DT
02:31 < TheCritic> This part is giving me a bit of trouble..
filerecords["/"] = 0, 0
02:33 -!- franciscosouza [~francisco@187.105.21.125] has joined #go-nuts
02:35 < TheCritic> ah
02:35 < TheCritic> needed {}
02:35 < TheCritic> figured it ....  fun fun fun
02:38 < kuroneko> ...  is there a preferred idiom for select with 'timeout'?
02:39 < kuroneko> or is the standard approach to just create another
goroutine with a sleep in it that writes to a channel that you select on as a
timeout action
02:48 < kuroneko> s/channel/buffered channel/
02:49 < vsmatck> yeah that's the standard way.
02:52 -!- jsj [~johan@78-70-255-20-no149.tbcn.telia.com] has quit [Remote host
closed the connection]
03:06 < Namegduf> hokapoka: Have one of the cases be <-time.After()
03:07 < Namegduf> And have that case handle a timeout.
03:07 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 244 seconds]
03:07 < Namegduf> After takes the desired timeout time.
03:10 -!- Nisstyre [~nisstyre@109.74.204.224] has joined #go-nuts
03:10 < Namegduf> That is basically the same thing, but time's package only
uses a single (or, well, few as it can) goroutine.
03:11 < vsmatck> ^ forgot about time.After().
03:12 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has quit [Ping timeout: 276
seconds]
03:16 < TheCritic> I am losing my mind
03:16 < TheCritic> what am I missing here?
03:16 < TheCritic> http://pastebin.com/qq4BHGnq
03:18 < vsmatck> Go doesn't allow unused variables.
03:18 < TheCritic> yes
03:18 < TheCritic> agreed
03:19 < nteon> TheCritic: so after Create(), add f.Stat()
03:19 < TheCritic> but I am also getting this on compile
03:19 < nteon> or some other such
03:19 < nteon> that allows it to compile forme
03:19 < TheCritic> write_file.go:7: undefined: os.Create
03:19 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
03:19 -!- mode/#go-nuts [+v iant] by ChanServ
03:20 < TheCritic> so there is something wrong with my go
03:20 < nteon> TheCritic: yup :)
03:20 < TheCritic> my go wont go
03:20 < TheCritic> wow, that is enough agrivation for one night
03:20 < nteon> TheCritic: I suggest rebuilding & running the unit tests
03:21 < nteon> all.bash
03:21 < vsmatck> TheCritic =
http://images.wikia.com/memoryalpha/en/images/b/bf/Grebnedlog.jpg
03:21 < nsf> :D
03:21 < vsmatck> I'm just joking.  I can tell he's just frustrated.
03:21 < TheCritic> :)
03:21 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
03:22 < TheCritic> ok, nite all, I'll rebuild go tomorrow....
03:22 -!- TheCritic [~TheCritic@c-24-30-34-40.hsd1.ga.comcast.net] has quit [Quit:
TheCritic]
03:23 < vsmatck> I find sleep is good when frustrated and not making
progress.
03:23 < vsmatck> Come at it with a fresh mind.
03:23 -!- icey [~user@ip68-104-183-151.ph.ph.cox.net] has joined #go-nuts
03:35 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
03:36 < nteon> I may have asked this before, but is the rule for a struct
that it is heap allocated if its scope escapes the function or method it was
defined in?
03:37 < nteon> and stack allocated otherwise?
03:39 -!- niemeyer [~niemeyer@201-40-174-53.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 263 seconds]
03:41 < kuroneko> ah
03:41 < kuroneko> thanks for the time.After() suggestion.
03:45 < nteon> more relevant question, why is |= not defined for bool?
03:46 < nteon> someBool |= someOtherBool gives me a compiler error
03:50 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has joined #go-nuts
03:51 -!- danilo04 [~danilo04@66.44.228.140] has joined #go-nuts
03:51 < _nil> adg: got your mail, will repsond tomorrow, dicking around with
camlistore atm
03:52 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 276 seconds]
03:54 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
04:01 -!- danilo04 [~danilo04@66.44.228.140] has quit [Ping timeout: 268 seconds]
04:04 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
04:05 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has joined #go-nuts
04:10 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:11 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:19 -!- bmizerany [~bmizerany@c-76-21-40-53.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
04:24 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
04:31 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:36 -!- boscop_ [~boscop@f055129094.adsl.alicedsl.de] has joined #go-nuts
04:38 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 255
seconds]
04:39 < jessta_> nteon: I think currently anything you take the address of
will be heap allocated, escape analysis isn't great at the moment
04:40 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
04:41 < jessta_> nteon: bitwising bools doesn't make much sense because
bools have no specific bit representation
04:41 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
04:43 < jessta_> nteon: someBool = someOtherBool || someBool
04:45 -!- franciscosouza [~francisco@187.105.21.125] has quit [Quit:
franciscosouza]
04:48 -!- Loonacy [~loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has quit [Quit:
Leaving]
04:49 -!- Loonacy [~zephyros@Loonacy.broker.freenet6.net] has joined #go-nuts
04:52 -!- meatmanek_ [~meatmanek@70-36-143-95.dsl.dynamic.sonic.net] has joined
#go-nuts
04:54 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 260
seconds]
04:56 -!- meatmanek [~meatmanek@70-36-143-178.dsl.dynamic.sonic.net] has quit
[Ping timeout: 276 seconds]
05:02 -!- mav_ [~mav@c-98-245-125-65.hsd1.co.comcast.net] has joined #go-nuts
05:07 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has quit [Ping
timeout: 246 seconds]
05:07 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has joined
#go-nuts
05:08 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has joined #go-nuts
05:09 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
05:22 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
05:25 < nteon> jessta_: yea, I mean what I really wanted was '||=', but go
doesn't have that operator.  so I just changed someBool's type to int, because I'm
just calling a bunch of functions in a row and want to know if any return true
05:34 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
05:47 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
05:51 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
05:52 -!- Count_Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts
05:53 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Quit:
Geek insinde®]
05:53 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has quit [Read error:
Connection reset by peer]
05:53 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has joined #go-nuts
05:54 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has quit [Client Quit]
05:56 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Ping timeout: 250
seconds]
06:02 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping
timeout: 246 seconds]
06:04 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined
#go-nuts
06:05 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 255
seconds]
06:06 -!- jemeshsu [~jemeshsu@bb220-255-88-127.singnet.com.sg] has joined #go-nuts
06:07 -!- jsj [~johan@78-70-255-20-no149.tbcn.telia.com] has joined #go-nuts
06:08 -!- meatmanek_ [~meatmanek@70-36-143-33.dsl.dynamic.sonic.net] has joined
#go-nuts
06:12 -!- meatmanek [~meatmanek@70-36-143-95.dsl.dynamic.sonic.net] has quit [Ping
timeout: 276 seconds]
06:23 -!- noodles775 [~michael@g225068104.adsl.alicedsl.de] has joined #go-nuts
06:23 -!- noodles775 [~michael@g225068104.adsl.alicedsl.de] has quit [Changing
host]
06:23 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:29 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
06:41 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 240 seconds]
06:41 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:41 -!- ronnyy [~quassel@p4FF1C592.dip0.t-ipconnect.de] has joined #go-nuts
06:48 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
06:49 -!- mav_ [~mav@c-98-245-125-65.hsd1.co.comcast.net] has quit [Remote host
closed the connection]
06:53 < vegai> hi
06:54 < vegai> http://discord.fi/go_proposal_const_function.txt
06:54 < vegai> I'd like to ask y'all whether this is completely insane and
against what everyone wants for go
06:54 < vegai> before I edit it a bit more and put it in the mailing list
06:57 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has joined #go-nuts
06:57 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has quit [Remote
host closed the connection]
06:58 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has joined #go-nuts
07:00 < KirkMcDonald> vegai: What of reference types?
07:00 < KirkMcDonald> vegai: Maps, slices, interfaces...
07:01 < KirkMcDonald> Basically you seem to be getting at "no side effects."
07:02 < vegai> good question
07:02 < vegai> yes, that's the point
07:02 < dforsyth> is something like func fn(p structT) *structT { return &p
} safe?
07:04 < vegai> yeah, it seems like pointers to newly created data would be
ok as a pure function.  There wouldn't be referential transparency, though
07:04 < vegai> not "ok as a pure function" obviously, but as a const
function perhaps
07:05 < vegai> oh wait, that doesn't create data
07:06 < vegai> dforsyth: yes, I would say that's ok
07:09 < vegai> KirkMcDonald: the data under reference types can change at
any time, right?
07:09 < vegai> at least for slices
07:09 < KirkMcDonald> For any reference type.
07:09 < vegai> right
07:10 < KirkMcDonald> Unless it's a reference to something immutable, which
I don't think exists in Go.
07:10 < |Craig|> vegai: another corner case to cover: can not be passed non
constant functions
07:10 < KirkMcDonald> Well, aside from strings.
07:10 < vegai> KirkMcDonald: they would have to be prohibited along side
with pointers, then, I'm afraid
07:10 < vegai> |Craig|: thanks
07:11 < KirkMcDonald> vegai: What, strings would?
07:11 < KirkMcDonald> vegai: They're immutable.  They'd be fine.
07:11 < vegai> reference types
07:11 < KirkMcDonald> Oh, yes.
07:11 < |Craig|> vegai: also consider the restrictions on what types of
closures are valid inside const functions
07:12 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
07:12 < |Craig|> vegai: and if the goal it to allow optimizing the call to
the function out when its results are unused, what about exceptions?
07:15 < vegai> hmm
07:15 < |Craig|> and you can allow "go SomeConstFunction()" I guess
07:15 < vegai> perhaps a function call where the return value is not used
could be an error
07:15 < vegai> like it is currently for unused variables
07:19 < |Craig|> vegai: personally I think it would be more useful (and
easier to get accepted) to have and option/addon to goDoc to detect const
functions and mark them than add a language change to support them
07:23 < vegai> can function purity be deferred automatically?
07:23 < vegai> it smells like a non-halting problem, but I'm not sure
07:25 < vegai> gotta go back to work now and let this brew for a while
07:25 < vegai> thanks, everybody
07:25 < |Craig|> vegai: if it can be a compiler error if non constant, you
can check them all
07:26 < vegai> hmm?
07:26 < vegai> in my proposal, all functions without the "const" keyword
would be non-const
07:27 < |Craig|> if you can make a compiler that will raise an error if you
do something non const in a const function, why cant you mark them all const, and
unmark the ones that throw the error until it compiles, thus finding all const
functions
07:28 < |Craig|> sure, it could be slow, but if your proposal is possible,
it could be used to detect it automatically
07:29 < Namegduf> What's more, if the proposal isn't possible, you can still
do partial optimisations on proven-const functions
07:29 < Namegduf> If you can only prove some are const
07:29 < Namegduf> Which is...  where we are now, I think.
07:31 < |Craig|> there is still the exception issue.  To get the real
optimization benifits, you need to either know or assume no panic will occur
07:31 < vegai> oh, right.  Yes, I suppose you could do that.
07:32 < |Craig|> const could mean assume I won't panic when optimizing, but
that would be strange...
07:32 < vegai> my personal interest is more in safety instead of
optimization
07:32 < vegai> but the whole thing is obviously more complex than it seemed
at first
07:33 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 276
seconds]
07:36 -!- franciscosouza [~francisco@187.105.21.125] has joined #go-nuts
07:37 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 255 seconds]
07:37 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Ping
timeout: 252 seconds]
07:39 -!- fvbommel [~fvbommel_@131.155.71.85] has joined #go-nuts
07:39 < uriel> humm:: http://news.ycombinator.com/item?id=2631964
07:46 -!- bjarneh [~bjarneh@1x-193-157-202-30.uio.no] has quit [Quit: leaving]
07:49 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
07:51 < jessta_> vegai: why would you need to declare a function as const if
those restrictions are on it
07:51 < jessta_> a program could just generate that information
07:53 < jessta_> how would you call a const function?
07:53 < jessta_> it would have to be different to a non-const function
otherwise it could be modified to not be const and the callers wouldn't know
07:56 -!- ronnyy [~quassel@p4FF1C592.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
07:57 -!- rputikar [~240182H@203-206-21-179.dyn.iinet.net.au] has joined #go-nuts
07:59 -!- mikespook1 [~mikespook@219.137.255.110] has joined #go-nuts
08:00 -!- mikespook [~mikespook@119.131.232.191] has quit [Ping timeout: 276
seconds]
08:15 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
08:23 -!- fvbommel [~fvbommel_@131.155.71.85] has quit [Ping timeout: 276 seconds]
08:33 -!- Project-2501 [~Marvin@82.84.78.8] has joined #go-nuts
08:34 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
08:37 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:37 -!- fvbommel [~fvbommel_@131.155.245.204] has joined #go-nuts
08:39 -!- bobody [~alexc@ppp121-45-218-72.lns20.cbr1.internode.on.net] has joined
#go-nuts
08:39 -!- bobody [~alexc@ppp121-45-218-72.lns20.cbr1.internode.on.net] has quit
[Changing host]
08:39 -!- bobody [~alexc@unaffiliated/alexc] has joined #go-nuts
08:52 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Read error:
Operation timed out]
08:58 -!- bobody [~alexc@unaffiliated/alexc] has quit [Quit: WeeChat 0.3.4]
09:08 -!- marko_ [~marko@2a00:1620:c0:50:66b9:e8ff:feca:1812] has joined #go-nuts
09:15 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
09:20 -!- virtualsue [~chatzilla@nat/cisco/x-fpwhxouuexajgxjl] has joined #go-nuts
09:25 -!- PortatoreSanoDiI [~Marvin@82.84.89.46] has joined #go-nuts
09:28 -!- Project-2501 [~Marvin@82.84.78.8] has quit [Ping timeout: 260 seconds]
09:36 -!- wrtp [~rog@92.23.127.186] has joined #go-nuts
09:38 < mpl> I don't understand those ppl repeating the same questions on
the ML until someone just gives them all the code on a platter.  where's the fun
in that?  :(
09:39 -!- bobody [~alexc@unaffiliated/alexc] has joined #go-nuts
09:42 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
#go-nuts
09:43 -!- rputikar [~240182H@203-206-21-179.dyn.iinet.net.au] has quit [Quit:
rputikar]
09:51 -!- fvbommel [~fvbommel_@131.155.245.204] has quit [Ping timeout: 276
seconds]
09:53 -!- richard_iii [~richard_i@76.5.150.78] has quit [Ping timeout: 276
seconds]
09:54 -!- shvntr [~shvntr@119.121.26.150] has joined #go-nuts
10:03 -!- marko_ [~marko@2a00:1620:c0:50:66b9:e8ff:feca:1812] has quit [Ping
timeout: 255 seconds]
10:05 -!- fvbommel [~fvbommel_@131.155.71.82] has joined #go-nuts
10:06 -!- marko_ [~marko@2a00:1620:c0:50:66b9:e8ff:feca:1812] has joined #go-nuts
10:24 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has quit [Ping timeout: 240
seconds]
10:28 < xyproto> mpl: dunno, maybe this?  ;)
http://ubuntuforums.org/archive/index.php/t-1018506.html
10:47 < jessta_> starting arguments is often a good way to obtain
information
10:48 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has joined #go-nuts
10:48 < mpl> xyproto: it's not the same.  I'd understand an end user just
wants the answer because he wants things to just work.  but when it comes to
coding, the guy will have to eventually learn to do things by himself, he can't
expect ppl to do his homework/job for him all the time...
10:48 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has joined #go-nuts
10:55 -!- alehorst [~alehorst@187.58.246.160] has joined #go-nuts
11:02 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
11:10 -!- shvntr [~shvntr@119.121.26.150] has quit [Ping timeout: 276 seconds]
11:12 -!- shvntr [~shvntr@119.121.31.56] has joined #go-nuts
11:15 -!- dfc [~dfc@124-149-49-45.dyn.iinet.net.au] has joined #go-nuts
11:20 -!- shvntr [~shvntr@119.121.31.56] has quit [Quit: leaving]
11:30 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Read error:
Operation timed out]
11:32 -!- virtualsue [~chatzilla@nat/cisco/x-fpwhxouuexajgxjl] has quit [Ping
timeout: 260 seconds]
11:33 -!- tncardoso [~thiago@189.115.131.114] has joined #go-nuts
11:35 -!- virtualsue [~chatzilla@nat/cisco/x-dotzlgppvkuolspz] has joined #go-nuts
11:36 < xyproto> mpl: perhaps it's the lack of code samples on the web that
leads people to wanting to see more code on the ML? Perhaps they are afraid to
display their ignorance.
11:36 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
11:37 -!- tncardoso [~thiago@189.115.131.114] has quit [Ping timeout: 255 seconds]
11:38 -!- angasule_ [~angasule@190.2.33.49] has joined #go-nuts
11:43 -!- ronnyy [~quassel@p4FF1C592.dip0.t-ipconnect.de] has joined #go-nuts
11:44 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
11:46 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
11:49 -!- tncardoso [~thiago@189.115.131.71] has joined #go-nuts
11:49 -!- bobody [~alexc@unaffiliated/alexc] has quit [Quit: WeeChat 0.3.4]
11:51 < xyproto> What's a nice crossplatform GUI lib for Go? Does GTK work
on Windows?
11:51 < xyproto> wx?
11:51 < Tonnerre> There is GTK for Windows
11:52 -!- rputikar [~240182H@203-206-21-179.dyn.iinet.net.au] has joined #go-nuts
11:57 < xyproto> Tonnerre: I cloned go-gtk from github and installed Go from
http://code.google.com/p/gomingw/downloads/list (which is the only Go-compiler for
Windows I've seen working properly).  However, I see that go-gtk requires both
make and gomake and neither comes with the go compiler installation.  What's
standard routine for this situation?  Install make from gnuwin32?
11:57 < xyproto> (For the record, I run Windows in VirtualBox) ;)
11:59 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
12:00 -!- sungji [~unknown@drz-cadpig.inf.ethz.ch] has joined #go-nuts
12:02 -!- nannto__ [~nanto@pee5b70.tokyff01.ap.so-net.ne.jp] has joined #go-nuts
12:03 -!- nannto [~nanto@pee5b70.tokyff01.ap.so-net.ne.jp] has quit [Ping timeout:
240 seconds]
12:03 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
[]
12:04 < vegai> 10:58 <jessta_> it would have to be different to a
non-const function otherwise it could be modified to not be const and the callers
wouldn't know
12:04 < vegai> when would this be a problem?
12:08 < jessta_> if it's not a problem than what is the point of const
functions?
12:10 < vegai> I mean, why wouldn't the caller know?
12:12 < vegai> ah, because of the compile model that doesn't have any
dependency analysis etc
12:13 < vegai> or that it?
12:14 < jessta_> func sum(a, b int) const int {}
12:14 < jessta_> a := sum(2,5)
12:15 < jessta_> ah, I see what you mean
12:16 < jessta_> you mean const at compile time, not const as in immutable?
12:16 < vegai> and I think the compile model won't harm either
12:16 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
12:17 -!- TheCritic [~TheCritic@c-24-30-34-40.hsd1.ga.comcast.net] has joined
#go-nuts
12:17 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
12:18 < jessta_> vegai: I don't like the idea that my code may never compile
12:19 < TheCritic> http://pastebin.com/SF6cwTcn I expected this code to
persist my filerecords to a file called filedir ...  it compiles and runs fine,
but no file filedir is ever created...  any ideas?
12:20 < jessta_> TheCritic: perhaps the error you're ignoring might hold the
key
12:20 < xyproto> TheCritic: does the errors returned from the functions
reveal anything?
12:21 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
12:21 < TheCritic> ha, look at the errors :) who would have thought...
12:22 < TheCritic> thanks guy, will do
12:22 -!- LambdaSundae [5ab817bb@gateway/web/freenode/ip.90.184.23.187] has joined
#go-nuts
12:23 -!- cinch [~cinch@78.46.138.149] has joined #go-nuts
12:23 < TheCritic> So what is your feeling?  will go fully support windows
in the near future?  I am asking because I am interested in my code running on
windows :) and I am wondering if in learning go I am just waisting time :)
12:24 < vegai> jessta_: may never?
12:24 < jessta_> vegai: recursive calls, endless loops
12:24 < xyproto> TheCritic: I tried this compiler, an hour ago, and it
worked very well: http://code.google.com/p/gomingw/downloads/list
12:25 < TheCritic> xyproto: Nice, thanks!
12:25 < jessta_> TheCritic: Go even has some support for windows GUI
12:25 < vegai> sadly, I'm not familiar with the compiler's inner workings
12:25 < vegai> but it would seem to me that the only thing the compiler has
to check at compile time is the calling function's signature
12:26 < vegai> if it has const in the return type, it's ok to call it
12:27 < TheCritic> ah, another question for the experts :) so each lang has
a way of setting a callback to get triggered when a file is modified...  does go
have some kind of functionality as this?  Otherwise I am stuck with polling for
file changes :(
12:27 < exch> http://www.syntax-k.de/projekte/go-review
12:28 < jessta_> vegai: func sum(a,b int) const int {return sum(a,b)}
12:28 < jessta_> vegai: that would never compile
12:28 < vegai> huh, why?
12:29 -!- nekoh [~nekoh@dslb-178-004-066-171.pools.arcor-ip.net] has joined
#go-nuts
12:29 < vegai> I would think that it does compile
12:30 < vegai> ah, you thought that all const functions would be computed at
compile-time.  Now I get it
12:30 < vegai> no, that wasn't my idea.
12:30 < vegai> 15:21 <jessta_> you mean const at compile time, not
const as in immutable?
12:30 < vegai> so yes, "const as immutable" is the idea
12:32 < jessta_> vegai: ok, so if a function that was previously const and
changed to be no const anyone calling that function would want to know that it
changed
12:32 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 252
seconds]
12:34 < vegai> I suppose they would the next time a compile was issued?
12:35 < jessta_> TheCritic: os/inotify
12:35 -!- foocraft [~ewanas@89.211.225.198] has joined #go-nuts
12:35 < jessta_> vegai: that's my question, how would they know?
12:37 < vegai> so function f is a const and it calls function g that is
const
12:37 < vegai> function g is changed to non-const, so its signature changes
12:37 -!- Sisten [~Sisten@s213-103-208-147.cust.tele2.se] has joined #go-nuts
12:38 < vegai> the next time function f is compiled, it sees that the
signature is non-const
12:38 < vegai> granted, I don't know the insides of go compiler.  Perhaps
this is not reasonable to do in it
12:38 < TheCritic> jessta_: nice.  Ill read that next!
12:38 < vegai> but I would imagine it's roughly the same problem when the
signature would change in any other way
12:38 < vegai> say, the number of parameters changes
12:38 < vegai> or the return value
12:39 < jessta_> so, function f is not-const and it calls function g that is
const
12:39 < jessta_> function g is changed to non-const, how does function f
know this?
12:39 < vegai> from inspecting the signature of g at compile time
12:40 < vegai> it's the same thing if g's parameter list changed, isn't it?
12:40 < vegai> func f() { g(1) }
12:40 < jessta_> how does the compiler know that function f expects function
g to be const?
12:40 < vegai> func g(x int) {...} => func g(x, y int) {...}
12:40 < vegai> because function f is const itself
12:41 < jessta_> what if function f isn't const
12:41 < vegai> then g doesn't have to be either
12:41 < jessta_> vegai: what makes const functions useful?
12:44 < vegai> that's a fine question.  I suppose I take them for granted
from my long stay in Haskell land
12:44 < vegai> referential transparency (if they're defined strongly enough)
12:44 < vegai> that would mean that I'm guaranteed the same response every
time I call the function with the same parameters
12:45 < vegai> makes the function a bit more safe to use especially in a
concurrent environment
12:45 < elimisteve> vegai: you mean safe in a non-technical sense, yes?
12:46 < vegai> as opposed to?
12:46 < elimisteve> As opposed to "safe" in the technical sense used
frequently when talking about Go
12:47 < vegai> thread safety?
12:47 < wrtp> vegai: so could a const function have a loop in it?
12:47 < jessta_> vegai: so, if I was calling a const function then I would
expect that it had referential transparency?
12:47 < vegai> wrtp: yes
12:47 < elimisteve> or type safety
12:47 < vegai> elimisteve: well, it would be "effects safety"
12:47 -!- jsj [~johan@78-70-255-20-no149.tbcn.telia.com] has quit [Read error:
Connection reset by peer]
12:48 -!- LambdaSundae [5ab817bb@gateway/web/freenode/ip.90.184.23.187] has quit
[Quit: Page closed]
12:48 < wrtp> vegai: what about references to global variables?
12:48 < elimisteve> I think people often mean you can't get a pointer to
just any old memory location
12:48 < vegai> wrtp: no, those would be prohibited
12:48 < wrtp> vegai: goroutines?
12:48 -!- jsj [~johan@78-70-255-20-no149.tbcn.telia.com] has joined #go-nuts
12:48 < vegai> wrtp: I've been thinking about those
12:48 < jessta_> vegai: if a function I expected to have referential
transparency didn't, do you think this would be a problem?
12:48 < vegai> perhaps channels would be ok, but not launching goroutines
from inside const functions
12:49 < wrtp> vegai: i don't think you could allow channels
12:49 < vegai> jessta_: yes, I suppose it would
12:49 < wrtp> vegai: what about pointers?
12:49 < vegai> pointers are right out too :)
12:50 < wrtp> so in fact you can't do much...
12:50 < wrtp> i'm not sure i see the point
12:50 < wrtp> convention should be ok here
12:50 < wrtp> and the compiler can figure out genuine const functions and
inline them or whatever
12:51 < vegai> is there a convention?
12:51 < jessta_> vegai: so how do I know when a const function changes to
being a not const function?
12:51 < wrtp> by "convention" i mean for example the convention that, say,
strings.Fields will always return the same result given the same input
12:52 < wrtp> i don't think there's a need for a compiler annotation there.
12:52 < wrtp> if you have a compiler annotation, you'll get "const
poisoning"
12:53 -!- robteix [~robteix@nat/intel/x-dsjudjagvojypfqa] has joined #go-nuts
12:53 < wrtp> i.e.  anything that might be const must be marked as const
12:53 < wrtp> jessta_: presumably because the compiler refuses to compile it
12:53 < wrtp> because it breaks the const rules
12:55 < vegai> jessta_: by the compile error
12:56 < vegai> wait, no, sorry.
12:56 < vegai> you mean if where you're calling it from is also in a
non-const context
12:56 < vegai> indeed, you wouldn't know this
12:57 < vegai> and indeed, that does seem to make most of the benefits
disappear
13:00 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
13:05 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has
quit [Remote host closed the connection]
13:05 < jessta_> vegai: indeed
13:14 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Quit: WeeChat 0.3.5]
13:17 -!- niemeyer [~niemeyer@201-40-174-53.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
13:25 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit:
Leaving.]
13:29 -!- robteix [~robteix@nat/intel/x-dsjudjagvojypfqa] has quit [Ping timeout:
255 seconds]
13:30 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
13:31 -!- virtualsue [~chatzilla@nat/cisco/x-dotzlgppvkuolspz] has quit [Read
error: Operation timed out]
13:31 -!- jsj [~johan@78-70-255-20-no149.tbcn.telia.com] has quit [Read error:
Connection reset by peer]
13:31 -!- jsj_ [~johan@78-70-255-20-no149.tbcn.telia.com] has joined #go-nuts
13:32 < skelterjohn|work> morning
13:34 -!- Project_2501 [~Marvin@82.84.85.17] has joined #go-nuts
13:35 -!- chressie [~chressie@217.10.9.24] has joined #go-nuts
13:36 -!- PortatoreSanoDiI [~Marvin@82.84.89.46] has quit [Read error: Operation
timed out]
13:37 -!- virtualsue [~chatzilla@nat/cisco/x-dteenhaehonlhywj] has joined #go-nuts
13:37 -!- dj2 [~dj2@216.16.242.254] has joined #go-nuts
13:39 -!- iant [~iant@67.218.103.62] has joined #go-nuts
13:39 -!- mode/#go-nuts [+v iant] by ChanServ
13:39 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
13:42 < xyproto> skelterjohn|work: good afternoon
13:43 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-163-187.clienti.tiscali.it] has
joined #go-nuts
13:47 -!- Project_2501 [~Marvin@82.84.85.17] has quit [Ping timeout: 276 seconds]
13:47 -!- iant [~iant@67.218.103.62] has quit [Ping timeout: 240 seconds]
13:48 -!- iant [~iant@216.239.45.130] has joined #go-nuts
13:48 -!- mode/#go-nuts [+v iant] by ChanServ
13:48 -!- PortatoreSanoDiI [~Marvin@82.84.82.53] has joined #go-nuts
13:52 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-163-187.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
13:54 -!- angasule_ [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
13:55 -!- Project_2501 [~Marvin@82.84.91.43] has joined #go-nuts
13:56 -!- napsy [~luka@193.2.66.6] has quit [Ping timeout: 260 seconds]
13:56 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
13:57 -!- PortatoreSanoDiI [~Marvin@82.84.82.53] has quit [Ping timeout: 244
seconds]
13:59 -!- tncardoso [~thiago@189.115.131.71] has quit [Read error: Connection
reset by peer]
14:01 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-179-17.clienti.tiscali.it] has
joined #go-nuts
14:04 -!- Project_2501 [~Marvin@82.84.91.43] has quit [Ping timeout: 276 seconds]
14:07 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-163-55.clienti.tiscali.it] has
joined #go-nuts
14:07 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 240 seconds]
14:09 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-179-17.clienti.tiscali.it] has
quit [Read error: Operation timed out]
14:11 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
14:12 -!- Project-2501 [~Marvin@82.84.97.86] has joined #go-nuts
14:13 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Quit: leaving]
14:13 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
14:14 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
14:15 -!- gtaylor [~gtaylor@97-89-184-26.static.gnvl.sc.charter.com] has joined
#go-nuts
14:16 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-163-55.clienti.tiscali.it] has
quit [Ping timeout: 255 seconds]
14:19 -!- Project_2501 [~Marvin@82.84.80.238] has joined #go-nuts
14:22 -!- Project-2501 [~Marvin@82.84.97.86] has quit [Ping timeout: 260 seconds]
14:30 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-176-173.clienti.tiscali.it] has
joined #go-nuts
14:30 < skelterjohn|work> anyone use the new exec stuff lately?
14:30 < skelterjohn|work> i'm having trouble with Cmd.StderrPipe()
14:31 < skelterjohn|work> i can use the stdout pipe fine - when i copy from
it to another writer there is no problem
14:31 < skelterjohn|work> but when i try to do the same with stderr it borks
"read |0: bad file descriptor"
14:31 < skelterjohn|work> but i get no error when calling
theCmd.StderrPipe()
14:32 < skelterjohn|work> (i'm just trying to pass the cmd's stdout and
stderr through to the host's stdout and stderr)
14:32 -!- fvbommel [~fvbommel_@131.155.71.82] has quit [Ping timeout: 276 seconds]
14:33 < skelterjohn|work> guess i could try theCmd.Stderr = os.Stderr...
14:33 -!- Project_2501 [~Marvin@82.84.80.238] has quit [Ping timeout: 252 seconds]
14:33 < skelterjohn|work> that worked
14:34 < skelterjohn|work> i must be abusing the pipe stuff, since there was
a much easier way to do what i wanted
14:34 -!- gtaylor [~gtaylor@97-89-184-26.static.gnvl.sc.charter.com] has quit
[Read error: Connection reset by peer]
14:34 -!- gtaylor [~gtaylor@97-89-184-26.static.gnvl.sc.charter.com] has joined
#go-nuts
14:35 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has joined #go-nuts
14:37 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Quit:
Leaving.]
14:39 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-176-173.clienti.tiscali.it] has
quit [Ping timeout: 255 seconds]
14:41 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
14:41 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 246 seconds]
14:42 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
14:45 -!- foocraft [~ewanas@89.211.225.198] has quit [Quit: Leaving]
14:56 < wrtp> skelterjohn|work: StderrPipe works fine for me
14:57 < skelterjohn|work> well, i don't know what the issue was
14:57 < wrtp> skelterjohn|work: e.g.  http://pastebin.com/N2H8e2kg
14:57 < wrtp> maybe you were getting the args to io.Copy the wrong way
around?
14:58 < skelterjohn|work> that seems functionally equivalent to what i was
doing
14:58 < skelterjohn|work> no - same way
14:58 < skelterjohn|work> i had io.Copy(os.Stderr, theErrPipe)
14:58 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 252 seconds]
14:58 < wrtp> that's the wrong way around
14:58 < wrtp> oh no
14:58 < skelterjohn|work> then your code doesn't work =p
14:58 < wrtp> it isn't :-)(
14:58 < skelterjohn|work> :)
14:59 < wrtp> does my code work on your system?
15:00 < skelterjohn|work> yes
15:01 < wrtp> ah, so i guess you were doing something wrong...  did you call
StderrPipe *before* starting the command?
15:01 < skelterjohn|work> when i called it after, the error message was
descriptive :)
15:01 < wrtp> ah
15:01 < wrtp> if you wanna paste some code that fails, i could have a look
15:01 < skelterjohn|work> i'd have to rewrite it :)
15:02 < skelterjohn|work> and then there is the danger that it would work
15:03 -!- noam [noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 260
seconds]
15:03 < skelterjohn|work> hmm - does goinstall keep a list of packages it
has downloaded somewhere?
15:04 < skelterjohn|work> goinstall -a is downloading something i'm
specifically deleting in order to keep it from trying to compile it
15:04 < xyproto> I wrote this go-related question on stackoverflow:
http://stackoverflow.com/questions/6130621/algorithm-for-finding-the-color-between-two-others-in-the-colorspace-of-painted
After finding a working answer, I was happy, but there's a strange thing in the
code I ended up with that I don't have an explanation for.  Here is the code:
http://go.pastie.org/1976031 The question is why using math.Pi changes the
15:04 < xyproto> result so much, compared to using 3.1415.  Why is that?
15:05 < skelterjohn|work> math.Pi != 3.1415?
15:05 < wrtp> not by some way
15:05 < skelterjohn|work> (looking at the code)
15:05 < xyproto> skelterjohn|work: no, math.Pi has better accuracy
15:05 < skelterjohn|work> sorry, i meant that as a rhetorical question
15:05 < skelterjohn|work> i was suggesting that the difference in numbers
caused the difference in output
15:06 -!- iant [~iant@nat/google/x-npccmahlpjfebygo] has joined #go-nuts
15:06 -!- mode/#go-nuts [+v iant] by ChanServ
15:06 < wrtp> xyproto: are you saying that using Pi gives a worse answer?
15:06 < xyproto> skelterjohn|work: yes, but the output is completely
different, when the formulas are supposed to follow the same principle.  Using
math.Pi gives a worse answer.
15:06 < xyproto> wrtp: yes
15:06 < skelterjohn|work> that code is too long/dense to grok what's going
on quickly
15:07 < xyproto> skelterjohn|work: yeah, sorry if't overwhelming, but it's
been bothering me in the back of my mind for weeks now ;)
15:07 -!- iant [~iant@nat/google/x-npccmahlpjfebygo] has quit [Client Quit]
15:07 -!- iant [~iant@nat/google/x-gssusafkllooluen] has joined #go-nuts
15:07 -!- mode/#go-nuts [+v iant] by ChanServ
15:07 -!- franciscosouza [~francisco@187.105.21.125] has quit [Quit:
franciscosouza]
15:07 < xyproto> oh well, no big deal, I guess I was hoping for something
like "oh, but don't you see, it's obvious, it's because of blahblah" ;)
15:07 < skelterjohn|work> is paintmix the only function i'd need to look at?
15:07 -!- mehalelal [~mehalelal@76.103.175.11] has joined #go-nuts
15:08 < xyproto> skelterjohn|work: yes, I think so.  Not 100% certain,
though
15:08 < xyproto> skelterjohn|work: and you don't have to :D
15:08 < wrtp> xyproto: how do you judge "better" or "worse"?
15:08 < xyproto> wrtp: the color mix between yellow and blue becomes less
green and more black
15:08 < xyproto> wrtp: the higher the accuracy of pi
15:08 -!- gtaylor [~gtaylor@97-89-184-26.static.gnvl.sc.charter.com] has quit
[Quit: gtaylor]
15:09 < wrtp> xyproto: so if it's exactly pi, the colour is fully black?
15:09 < xyproto> skelterjohn|work: even though it's appreciated :)
15:09 -!- noam [noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
15:09 < xyproto> wrtp: yes, as I understand
15:10 < skelterjohn|work> what is hls?
15:10 < wrtp> doesn't look black to me - there's no red component
15:10 < wrtp> the colour #00FEFF
15:11 -!- franciscosouza [~francisco@187.105.21.125] has joined #go-nuts
15:11 < xyproto> skelterjohn|work: hue lightness saturation
15:14 < xyproto> wrtp: hm, you're right, it does not approach black.  But,
it moves away from green.
15:14 -!- purplegrape [~baalsoffi@cm133.gamma204.maxonline.com.sg] has joined
#go-nuts
15:14 < xyproto> Oh well.  Thanks for looking at it guys.  :)
15:15 < skelterjohn|work> i don't know enough about color to begin to answer
15:16 < aiju> are you relating pie to colours?
15:16 < skelterjohn|work> cherry pie is red, etc
15:16 -!- franciscosouza [~francisco@187.105.21.125] has quit [Quit:
franciscosouza]
15:17 < xyproto> aiju: yes, somehow
15:18 < skelterjohn|work> as best i can tell, pi is used in the form of
cos(2*pi*x)
15:18 < skelterjohn|work> and x ranges from 0 to 1
15:18 < skelterjohn|work> so the cos will range from -1 to 1
15:18 < skelterjohn|work> why this is being done, i cannot tell you
15:19 < skelterjohn|work> though now that i think of it, the HLS figures I
see usually involve a point on a circle
15:19 < skelterjohn|work> so maybe that point is described in radial
coordinates
15:19 < skelterjohn|work> and the angle has real meaning *shrug*
15:20 < xyproto> skelterjohn|work: I think that's a pretty good analysis.
It just beats me why more pi makes the color more red.
15:20 < skelterjohn|work> like i said - cherries
15:20 < xyproto> skelterjohn|work: yeah...  ;)
15:21 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
15:22 < xyproto> next topic, the color of e ?
15:22 < aiju> octarin
15:22 < xyproto> of course
15:23 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
15:23 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
15:23 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
15:23 -!- user67643434 [~br@adsl-89-132-57-178.monradsl.monornet.hu] has joined
#go-nuts
15:24 < wrtp> making the value of pi inaccurate can not make the algorithm
better
15:24 < wrtp> i can only assume there's a bug in the algorithm
15:25 < xyproto> wrtp: I think you're right.
15:26 -!- virtualsue [~chatzilla@nat/cisco/x-dteenhaehonlhywj] has quit [Ping
timeout: 240 seconds]
15:26 < aiju> 17:27 < xyproto> of course
15:26 < aiju> thinking about it, octarin is the colour of i
15:29 < ww> could use taylor series to approximate cos(x) to arbitrary
accuracy but that might be a bit of an overkill, eh/
15:29 < ww> wouldn't need π then
15:29 < aiju> what are you talking about?
15:29 < aiju> you'd still need pi
15:30 < mpl> I know I need pie.  but pi...
15:30 < skelterjohn|work> i don't think you need pi to find a taylor series
approx to cosine
15:30 < aiju> but you need it for the argument
15:31 < skelterjohn|work> oh, yeah
15:32 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
15:32 < mehalelal> How accurate do you need pi?  And for your problem is it
necessary to use a trig function to calculate it?
15:35 -!- jsj_ [~johan@78-70-255-20-no149.tbcn.telia.com] has quit [Read error:
Connection reset by peer]
15:35 -!- jsj [~johan@78-70-255-20-no149.tbcn.telia.com] has joined #go-nuts
15:35 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has quit [Quit:
Computer has gone to sleep.]
15:35 -!- angasule_ [~angasule@190.2.33.49] has joined #go-nuts
15:38 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-169-99.clienti.tiscali.it] has
joined #go-nuts
15:40 < xyproto> ww: taylor series are tempting, if I need a lot of suits
http://instantrimshot.com/classic/?sound=rimshot
15:41 < xyproto> aiju: I agree, i is more suitable to octarin.
15:44 -!- gmilleramilar [~gmiller@pool-74-101-133-165.nycmny.fios.verizon.net] has
joined #go-nuts
15:47 < wrtp> xyproto: i haven't fixed your problem, but i've rearrange the
code to do the colour conversion in a more idiomatic way, using color models:
http://go.pastie.org/2038207
15:48 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
15:48 < gmilleramilar> I may be misunderstanding bufio.Read (
http://golang.org/src/pkg/bufio/bufio.go?s=3281:3334#L124 ), but isn't it the case
that if the buffer is empty (b.w == b.r) and a previous read has resulted in an
error (b.err != nil) that it will never again issue a Read to the underlying
reader.
15:49 < wrtp> gmilleramilar: yes, that's right
15:49 < wrtp> errors are sticky
15:49 < gmilleramilar> isn't that a problem if the error is temporary, like
an EAGAIN from a socket?
15:50 < wrtp> gmilleramilar: yeah, it could be
15:51 < wrtp> i've suggested adding a ResetError (or something similar) in
the past
15:51 < gmilleramilar> what was the response?
15:52 < wrtp> not sure there was one
15:54 < gmilleramilar> i'm going to file a bug...
15:54 -!- iant [~iant@nat/google/x-gssusafkllooluen] has quit [Ping timeout: 240
seconds]
15:54 < aiju> 17:54 < gmilleramilar> isn't that a problem if the error
is temporary, like an EAGAIN from a socket?
15:55 < aiju> isn't EGAIN used only for non-blocking I/O?
15:56 < wrtp> xyproto: i'm not sure that HSV or HLS or whatever is the right
solution for you.
15:57 < gmilleramilar> isnt that what Read([]byte) does?
15:57 < wrtp> xyproto: i don't think there's any connection between the hue
parameter and colour mixing
15:57 < wrtp> you can get a temporary error if you're doing timeouts on
sockets
15:58 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
16:00 < wrtp> xyproto: looks like you might want to convert into CIE space,
but that's not easy
16:06 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Quit: Lost
terminal]
16:07 -!- virtualsue [~chatzilla@nat/cisco/x-xitjgynunggfrork] has joined #go-nuts
16:13 -!- angasule_ [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
16:16 -!- alehorst [~alehorst@187.58.246.160] has quit [Remote host closed the
connection]
16:16 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
16:23 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
16:24 -!- alehorst [~alehorst@187.58.246.160] has joined #go-nuts
16:25 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Remote
host closed the connection]
16:26 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
16:32 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
16:33 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
16:37 -!- sungji [~unknown@drz-cadpig.inf.ethz.ch] has quit [Ping timeout: 260
seconds]
16:37 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
16:45 < homa_rano> I can't get the fmt.*scan* functions to work
16:47 < homa_rano> specifically scanf borks on newlines
16:48 < hallas> Pastebin some code homa_rano :-)
16:49 < homa_rano> working on some short example
16:49 -!- Tv [~Tv@ip-66-33-206-8.dreamhost.com] has joined #go-nuts
16:51 < homa_rano> http://pastebin.com/PrcEUZXt
16:51 < homa_rano> it does different things with or without a \n in the
format string
16:51 < homa_rano> both are wrong
16:51 < homa_rano> you can shove that into the playground
16:53 < hallas> On my screen its prints the pairs and then lots of zero
pairs
16:53 < homa_rano> yeah I didn't bother to tell it to stop
16:53 < hallas> You dont want it to print the pairs?
16:53 < hallas> 1,2 3,4 5,6 ?
16:53 < homa_rano> without the format there are zero pairs between the real
pairs
16:53 < hallas> ah
16:54 < hallas> So you just need to matc the newline
16:54 < homa_rano> weirder things happen with the newline
16:55 < homa_rano> I can fake it, but I'm clearly using scan wrong
16:55 < hallas> well
16:55 < hallas> it prints the 5 pairs of 0,0 when trying to match newline,
because thats the amount of chars inbetween those two pairs
16:55 < hallas> on which matching failes
16:55 < homa_rano> ah
16:56 < homa_rano> so why does it fail the first time?
16:56 < jessta_> homa_rano: the returned err would tell you that
16:56 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
quit [Quit: once more into the breach]
16:56 < homa_rano> I was looking at the err, but it says it doesn't match
16:56 < homa_rano> which is unhelpful
16:56 < hallas> homa_rano: use Fscanln perhaps?
16:57 < homa_rano> that doesnt let me get the parens
16:58 < hallas> Well, I think newlines are treated as spaces, I read that
somewhere, perhaps in the fmt documentation
16:59 -!- adu [~ajr@64.134.96.52] has joined #go-nuts
17:00 < wrtp> homa_rano: part of the problem is that you're using
strings.NewReader
17:00 -!- ronnyy [~quassel@p4FF1C592.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
17:00 < homa_rano> it would make sense if scanf could parse a printf of the
same format string
17:00 < skelterjohn|work> can't
17:00 < wrtp> homa_rano: it can
17:00 < skelterjohn|work> \n is an issue
17:00 < wrtp> ish
17:00 < skelterjohn|work> and strings can't have spaces
17:01 < hallas> homa_rano: try this format: (%d,%d)-
17:01 < skelterjohn|work> the format is ambiguous
17:01 < wrtp> from the documentation: Scanln, Fscanln and Sscanln stop
scanning at a newline and require that the items be followed by one; Sscanf,
Fscanf and Sscanf require newlines in the input to match newlines in the format;
the other routines treat newlines as spaces.
17:01 < skelterjohn|work> how does "%s %s" match "hi there you"?
17:01 < skelterjohn|work> two ways
17:01 < skelterjohn|work> it chooses one, certainly
17:01 < skelterjohn|work> but either could come out of a printf
17:02 < wrtp> homa_rano: use "(%d,%d)\n" for the format
17:02 < wrtp> homa_rano: and use bytes.NewBuffer(...) as the reader
17:02 < homa_rano> wrtp: doesnt work, try it
17:02 < wrtp> (or update to tip, which adds UnreadRune to strings.Reader
17:02 < wrtp> )
17:02 < wrtp> homa_rano: it does work if you're using bytes.Buffer
17:03 -!- chressie [~chressie@217.10.9.24] has quit [Quit: WeeChat 0.3.5]
17:03 < wrtp> (or at least, it did for me, but i've gone and erased my go
playground code)
17:03 < homa_rano> what's the difference?  just unreadrune?
17:04 < hallas> homa_rano: tried (%d,%d)- ?
17:04 < kevlar_work> or, you know, use io.ReadAll and regexp.MatchAllString
17:04 < homa_rano> my actual code was using bufio
17:04 -!- hpvincent [~zig@nap13-11-83-156-121-34.fbx.proxad.net] has quit [Ping
timeout: 240 seconds]
17:04 < wrtp> homa_rano: try this: http://bit.ly/lThcYp
17:05 < wrtp> hallas: why would that work?
17:05 < kevlar_work> the scan functions, even in C, are really, really NOT
meant for reading in formatted input
17:05 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
17:05 < wrtp> kevlar_work: they work ok actually
17:05 < kevlar_work> wrtp, because people have added various features over
time, but they still are really not meant for it.
17:05 -!- tncardoso [~thiagon@150.164.2.20] has quit [Quit: Leaving]
17:06 < wrtp> kevlar_work: what are they meant for then?
17:06 < kevlar_work> They require extremely controlled input, and they do
not degrade or fail nicely
17:06 < kevlar_work> wrtp, reading in sequences of space delimited values
17:06 < kevlar_work> usually from the console or a pipe
17:06 < wrtp> simple formatted input can work ok too
17:06 < wrtp> obviously it's not a full parser
17:07 < wrtp> but fmt.Scan* is a lot nicer than C's scanf
17:07 < kevlar_work> wrtp, simple things like a + before a number or a \t
instead of a space can completely throw off your scanning
17:07 < wrtp> kevlar_work: not in Go's scan
17:07 < kevlar_work> wrtp, I said "things like"
17:08 < kevlar_work> sure those cases might've been addressed, but a lot
more hasn't.
17:08 < wrtp> for example?
17:08 < kevlar_work> another fun one is reading a %d when the input suddenly
has a decimal
17:08 < homa_rano> I'm using it to parse something I've printf'd, so
invertibility is all I want
17:08 < kevlar_work> homa_rano, why not printf it in a more friendly format?
lol
17:09 < kevlar_work> normally people printf and scanf when they want humans
involved
17:09 < kevlar_work> which is a recipe for disaster.
17:09 < wrtp> kevlar_work: an unexpected decimal is also a problem if you're
writing your own lexer
17:09 < wrtp> i think scan is just fine for simple input with a modicum of
flexibility
17:10 < homa_rano> I'd also like it to be human readable, which parens
accomplish nicely
17:10 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:10 < kevlar_work> wrtp, but pretty much everything gives you better error
messages than scanf, which iirc always says "wanted int" or whatever
17:10 < wrtp> kevlar_work: that's all a lexer would print
17:11 < kevlar_work> I think they fixed this recently, but for a long time
the scan functions also didn't handle EOF nicely.
17:11 < wrtp> kevlar_work: a decent error message has to be generated at a
higher level
17:11 < wrtp> it's true that "input does not match format" isn't very
informative :-)
17:11 < kevlar_work> wrtp, most lexers I've used would allow you to say
something like "in rule DECIMAL got token DOT, wanted SPACE or EOL"
17:12 < kevlar_work> er, well, not the lexer I guess, but the lexer doesn't
care, it just outputs symbols; the parser says that.
17:13 < wrtp> actually, the scan functions could produce better error
messages
17:13 < kevlar_work> speaking of which, did ebnf finally get a parser?  or
is it still just a grammar expression
17:13 < kevlar_work> (the package)
17:14 < wrtp> it could say "expected digit, got '.'"
17:14 < skelterjohn|work> i used fmt.Scan to write a lexer last week
17:14 < skelterjohn|work> works fine
17:14 < skelterjohn|work> very simple and regular input though
17:14 < wrtp> skelterjohn|work: yeah, i've done the same
17:14 < skelterjohn|work> machine generated, in fact
17:14 < kevlar_work> skelterjohn|work, that's called a tokenizer, lol
17:14 < skelterjohn|work> tokenizer, sure
17:14 < wrtp> kevlar_work: same difference
17:14 < skelterjohn|work> what's a lexer then?
17:14 < wrtp> a tokeniser
17:14 < wrtp> :-)
17:14 < skelterjohn|work> i see, an s instead of a z
17:15 < wrtp> lol
17:15 < kevlar_work> no, it has to do with the delimiters
17:15 < wrtp> kevlar_work: do you mean something that turns the ebnf into an
actual parser?
17:15 < kevlar_work> a lexer can process arbitrarily undelimited input into
symbols, a tokenizer splits regular, delimited input into tokens
17:15 < kevlar_work> wrtp, yeah.
17:16 -!- iant [~iant@nat/google/x-ufstdfpwmtryqspf] has joined #go-nuts
17:16 -!- mode/#go-nuts [+v iant] by ChanServ
17:16 < wrtp> kevlar_work: we've got goyacc
17:16 < kevlar_work> wrtp, there's a built-in package called ebnf; I was
just curious if it got its parser yet.
17:16 < wrtp> kevlar_work: by that definition it sounds like
skelterjohn|work's thing is a lexer
17:17 < wrtp> kevlar_work: it's there just to check the go grammar for
consistency
17:17 < skelterjohn|work> my tokens were all delimited by some kind of white
space
17:17 < wrtp> that grammar is ambiguous as written
17:17 < skelterjohn|work> i just had repeated calls to fmt.Scanf(in, "%s",
&astring)
17:18 < wrtp> ok, well that's delimited.  but it doesn't need to be.
17:18 < skelterjohn|work> don't follow
17:18 < skelterjohn|work> but that's ok
17:19 -!- dfr|mac [~dfr|work@nat/google/x-fnnkgpfrszdgftrb] has joined #go-nuts
17:19 < skelterjohn|work> it's simple, it works
17:19 < skelterjohn|work> best kind of working, and the best kind of simple
17:19 < kevlar_work> wrtp, what if my input is 1.23341112.2155.121 and I
want to read three decimals out of there with three digits of precision each?
17:20 < skelterjohn|work> don't use scan?
17:20 < kevlar_work> skelterjohn|work, exactly.
17:20 < skelterjohn|work> he didn't say it was the end-all-be-all of lexers
17:20 -!- hpvincent [~zig@nap13-11-83-156-121-34.fbx.proxad.net] has joined
#go-nuts
17:20 < kevlar_work> skelterjohn|work, his argument was that it didn't need
to be delimited
17:21 -!- dfr|mac [~dfr|work@nat/google/x-fnnkgpfrszdgftrb] has quit [Remote host
closed the connection]
17:21 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
joined #go-nuts
17:21 < skelterjohn|work> what "it" was he referring to?  that wasn't clear
ot me
17:21 < kevlar_work> I think scanf may actually be able to do that
particular case because I think our scanf uses format specifiers, though I'm not
sure.
17:21 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-169-99.clienti.tiscali.it] has
quit [Ping timeout: 252 seconds]
17:21 < kevlar_work> skelterjohn|work, "it" - the input
17:21 < skelterjohn|work> which input
17:21 < kevlar_work> to scanf.
17:22 < skelterjohn|work> not clear to me that that is what he meant
17:22 < skelterjohn|work> thought he might have been referring to my
specific input
17:22 -!- marko_ [~marko@2a00:1620:c0:50:66b9:e8ff:feca:1812] has quit [Ping
timeout: 255 seconds]
17:24 < kevlar_work> *shrug*.  "my tokens were all delimited." "okay...  but
it doesn't need to be." Perhaps I misinterpreted.
17:24 < wrtp> kevlar_work: if you wanted to do that, you could, but it's a
bit of a silly format
17:25 -!- gtaylor [~gtaylor@99-126-136-139.lightspeed.gnvlsc.sbcglobal.net] has
joined #go-nuts
17:25 < skelterjohn|work> saves some space while still being ascii
17:25 < kevlar_work> wrtp, only if you want humans to read it.  if you're a
scientific instrument using the keyboard usb driver, it works fine.
17:25 < wrtp> not really - it's highly error prone
17:26 -!- gtaylor [~gtaylor@99-126-136-139.lightspeed.gnvlsc.sbcglobal.net] has
quit [Client Quit]
17:26 < wrtp> if you're doing that, you may as well use binary
17:26 < kevlar_work> wrtp, with a keyboard driver, you're limited to the 104
standard keys on the keyboard.
17:26 < skelterjohn|work> "using the keyboard usb driver" means you can only
send stuff that could be typed, right?
17:26 < kevlar_work> yep.
17:27 < wrtp> yeah, well then you'd use \n or a space as a delimited
17:27 < wrtp> s/d/r
17:27 < kevlar_work> wrtp, you could, sure, but you don't need to.
17:27 < wrtp> i've done lots and lots of machine readable ascii in my time
and i would never make a format like that
17:27 < skelterjohn|work> probably if you need to use fmt.Scan to tokenize
you'd want to
17:27 < kevlar_work> if you're sending #.### most of the time, adding a \n
slows you down by 20%.
17:29 < kevlar_work> my point is, there are plenty of very simple formats
that scanf can't do, and there are plenty of times where input needn't be
delimited to be useful.  I'm clearly not going to convince you if I haven't
already, so let's not bore everyone else ;-).
17:30 < wrtp> you could do it with %d.%c%c%c
17:31 < wrtp> if you really wanted to
17:32 < wrtp> and a custom Scanner to make it reusable
17:33 < wrtp> fmt.Scan* is all about the easy "middle way", somewhere
between strings.Fields and a custom parser
17:33 < wrtp> it doesn't need to do everything, but that doesn't mean it's
not useful in its domain
17:34 < wrtp> and this statement is really not justified: "the scan
functions, even in C, are really, really NOT meant for reading in formatted
input"...
17:34 < wrtp> 'cos they really really are!
17:35 -!- tncardoso [~thiago@189.115.131.71] has joined #go-nuts
17:36 < skelterjohn|work> instead of that, you could just use a whitespace
delimiter, skip the decimal point, and pretend it's at the right place
17:37 -!- virtualsue [~chatzilla@nat/cisco/x-xitjgynunggfrork] has quit [Read
error: Connection reset by peer]
17:37 -!- nekoh [~nekoh@dslb-178-004-066-171.pools.arcor-ip.net] has quit [Ping
timeout: 276 seconds]
17:39 < wrtp> really?
17:40 < skelterjohn|work> for the pretend input spec we're talking about
17:40 < skelterjohn|work> if there are three numbers after the decimal every
time, then we don't need to see the decimal to know where it is
17:41 < wrtp> you do if there's a variable number of digits *before* the
decimal
17:43 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 240 seconds]
17:43 < kevlar_work> wrtp, nope, he's talking about fixed point, and that
would be a perfect solution.
17:43 -!- user67643434 [~br@adsl-89-132-57-178.monradsl.monornet.hu] has quit
[Quit: quiting]
17:43 -!- Venom_X [~pjacobs@66.54.185.130] has joined #go-nuts
17:44 -!- virtualsue [~chatzilla@nat/cisco/x-pjycjjfbzddsqfby] has joined #go-nuts
17:45 < skelterjohn|work> if the token i got is 12345, then i turn it into
12.345.  if it was 123456, i turn it into 123.456
17:46 < kevlar_work> it would be more efficient in the sub-1 case, as 45
would be .045 and wouldn't need the extra two characters.
17:46 < skelterjohn|work> what's a good code editor for linux?
17:46 < skelterjohn|work> what i want is something that is kind of like
eclipse, but without all the garbage
17:46 < kevlar_work> skelterjohn|work, don't ask me, I use screen + vim ^_^
17:47 < skelterjohn|work> that is, i want a part of the window to be
directory hierarchy
17:47 < kevlar_work> (note, vim has code completion and split screens)
17:47 < skelterjohn|work> and the rest to be whichever file i click on
17:47 < kevlar_work> vim can do that.
17:47 < skelterjohn|work> right now i'm using emacs
17:47 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:47 < kevlar_work> I figure emacs can doo.
17:47 < skelterjohn|work> i'm not going to use vim
17:47 < skelterjohn|work> i don't really like things that are entirely
terminal based
17:48 < kevlar_work> so, you use xemacs then
17:48 < skelterjohn|work> i'm considering using eclipse - this machine can
space the 1/2 gig of ram
17:48 < kevlar_work> you could try code::blocks
17:48 < skelterjohn|work> i am using xemacs, but if it displays directory
hierarchies it will be ugly
17:48 < kevlar_work> there is also liteide, which I think is written in Go.
17:48 < skelterjohn|work> it's mostly written in C++
17:49 < skelterjohn|work> and it enforces some sillyness
17:49 < kevlar_work> all editors enforce some sillyness, no?
17:49 < kevlar_work> especially IDEs.
17:49 < kevlar_work> this is why I like vim; minimal sillyness, and what is
silly is configurable.
17:49 < skelterjohn|work> yes, but some sillyness is sillier than others
17:50 < skelterjohn|work> i'll take a look at code::blocks
17:50 < skelterjohn|work> but the name makes me think of C++
17:50 < kevlar_work> yep.
17:50 < skelterjohn|work> i suppose that isn't a bad thing by itself
17:50 < kevlar_work> it's a lighter-weight editor than eclipse.
17:51 < kevlar_work> I don't know if it does Go, but I seem to recall it
being really easy to add your own syntax.
17:51 < skelterjohn|work> cool, i'll report back if anyone is interested
17:51 -!- jsj [~johan@78-70-255-20-no149.tbcn.telia.com] has quit [Read error:
Connection reset by peer]
17:51 < skelterjohn|work> ah, there is an apt-get package for it :)
17:51 < skelterjohn|work> ubuntu's eclipse apt-get package doesn't work
17:51 -!- jsj [~johan@78-70-255-20-no149.tbcn.telia.com] has joined #go-nuts
17:52 -!- mehalelal [~mehalelal@76.103.175.11] has quit [Quit: Leaving]
17:53 < wrtp> yeah, implying the decimal point would be easy, but that would
be delimited and avoid the point i guess
17:55 < skelterjohn|work> yes
17:55 < skelterjohn|work> there are things scan can't do...i doubt you could
use it to tokenize go code, for instance
17:55 < skelterjohn|work> but there are things it can do, like parse gdsii
files (what i use it for)
17:56 < skelterjohn|work> code::blocks seems poorly suited for non-C++
17:57 < aiju> ed is the standard text editor
17:57 -!- justinlilly [justinlill@70.32.34.100] has quit [Remote host closed the
connection]
17:59 < skelterjohn|work> not the most user friendly thing i've ever
interacted with
18:00 -!- justinlilly [justinlill@70.32.34.100] has joined #go-nuts
18:02 -!- virtualsue [~chatzilla@nat/cisco/x-pjycjjfbzddsqfby] has quit [Quit:
ChatZilla 0.9.87 [Firefox 4.0.1/20110413222027]]
18:03 -!- gtaylor [~gtaylor@99-126-136-139.lightspeed.gnvlsc.sbcglobal.net] has
joined #go-nuts
18:03 < skelterjohn|work> kate seems pretty nice
18:06 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Remote
host closed the connection]
18:07 < TheCritic> is there a go version of Data::Dumper ?
18:07 < skelterjohn|work> what does Data::Dumper do?
18:08 < mdxi> it pretty-prints datastructures, and is largely unneccessary
with Go
18:08 < TheCritic> it exposes a function Dump....  print Dump($MyVariable)
will give you a readable version of the data
18:08 < mdxi> TheCritic: just print whatever you want to see.  it should be
handled fairly well by default.
18:08 < TheCritic> cool
18:08 < TheCritic> I will try that
18:09 < skelterjohn|work> use fmt.Print
18:09 < skelterjohn|work> rather than println
18:09 < TheCritic> so far, the vast majority of my problems are because I
expect go to be harder than it is....
18:09 < skelterjohn|work> fmt.Print* functions will (in many cases) look for
.String() methods
18:09 < TheCritic> I am trying to print a map
18:09 -!- delinka [~delinka@pidsley.praxxium.com] has left #go-nuts []
18:09 < skelterjohn|work> fmt.Printf("%v", theMap)
18:09 < TheCritic> I used gob decode, but I suspect I am doing it wrong
18:10 < TheCritic> :) thanks
18:10 < skelterjohn|work> gob is for making packed binary representations of
data, not for printing it
18:10 < TheCritic> yeah, I used gob to persist my map
18:10 < TheCritic> and now when I "thaw" it, I am not getting what I
expect....  probably my fault
18:11 -!- MaL0 [~ircd@unaffiliated/mal0] has joined #go-nuts
18:11 < MaL0> hi
18:11 < skelterjohn|work> hi
18:12 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
18:12 < skelterjohn|work> looks like kate is exactly what i want
18:12 < TheCritic> ha!  looks like I need to decode until EOF or something
:) I just got one value :)
18:12 < skelterjohn|work> once i figure out how to make it load the pattern
file included with go
18:12 < skelterjohn|work> TheCritic: you should need to decode as many
values as you encoded
18:13 < TheCritic> hrmm, then this is odd
18:13 < skelterjohn|work> maybe you are appending to a file?
18:13 < skelterjohn|work> without first truncating it
18:14 < TheCritic> this is my snippit...  anything jump out at you?
http://pastebin.com/hBXDK3Y4
18:15 -!- mgray [~mgray@li226-224.members.linode.com] has joined #go-nuts
18:16 < chomp> you're only decoding one value
18:16 -!- wrtp [~rog@92.23.127.186] has quit [Quit: wrtp]
18:16 < chomp> one call to Decode = one value decoded
18:16 < TheCritic> yeah, that one value I expect to be the fully loaded map
I encoded....
18:16 < skelterjohn|work> he is also encoding one value, it looks like
18:17 < chomp> oh, sorry.  i missed the part where the map is not complete
18:17 < skelterjohn|work> i haven't used gob, but that looks like how i'd
expect it to be used
18:20 < TheCritic> map is not complete?
18:20 < TheCritic> What does that mean?
18:20 < TheCritic> Sorry for the simple questions...  I am very new.
18:21 < chomp> oh hey i got it
18:21 < chomp> Decode wants the address of filerecords
18:22 < jessta_> TheCritic: you really should check error
18:22 < chomp> correct usage: http://pastie.org/2038908
18:22 < chomp> minus the part where i also ignore errors, which yes is bad
18:23 < TheCritic> reading
18:23 < TheCritic> ...
18:24 < TheCritic> wow
18:24 < chomp> the only difference is that i give Decode the address of its
destination
18:24 < TheCritic> just needed a &
18:24 < jessta_> TheCritic: Decode() needs to take a pointer, the error
would have told you that
18:25 < TheCritic> really
18:25 < TheCritic> cool, Ill write a quick check
18:25 < TheCritic> thanks jessta_
18:25 -!- TheMue [~TheMue@p5DDF4B91.dip.t-dialin.net] has joined #go-nuts
18:25 < jessta_> TheCritic: always check for error returns, it will save you
a lot of time
18:26 < chomp> pfft just write perfect code instead!
18:26 -!- foocraft [~ewanas@89.211.225.198] has joined #go-nuts
18:26 < TheCritic> the error object looks like if e != nil
{fmt.Print(e.String()) ; exit}
18:26 < TheCritic> or something like that
18:27 -!- rputikar [~240182H@203-206-21-179.dyn.iinet.net.au] has quit [Quit:
rputikar]
18:27 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has quit [Quit:
Leaving.]
18:27 < chomp> yes, the error returned is nil iff there is no error
18:27 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Read
error: Connection reset by peer]
18:28 < TheCritic> "gob: attempt to decode into a non-pointer"
18:28 < TheCritic> nice
18:29 < TheCritic> ok, new rule, never ever throw away an error....
18:30 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
18:30 < TheCritic> there must be a way of writing one error routine and
making it default for everything until I figure a reason to differentiate...
18:31 < skelterjohn|work> if err != nil { return }
18:31 < skelterjohn|work> and, at the top, defer func() { if err != nil {
fmt.Println(err) } }()
18:31 -!- exch [~blbl@87.209.181.34] has quit [Read error: Operation timed out]
18:32 -!- awidegreen [~quassel@85.24.170.226] has joined #go-nuts
18:32 < skelterjohn|work> i'd like it if we had exceptions for those kinds
of things
18:33 < jessta_> func chkerr(e os.Error){if e != nil{panic(e.String())}}
18:33 < skelterjohn|work> I think you can just do panic(e), can't you?
18:33 < aiju> no
18:33 < skelterjohn|work> well then
18:36 < jessta_> you can if your os.Error happens to be a string
18:37 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
18:38 < fvbommel> According to the spec, panic() takes an interface{}.  You
can pass whatever you want to it.
18:39 < skelterjohn|work> since os.Error has a String() method, it will use
it
18:40 < skelterjohn|work> yeah you can give any Stringer() to panic and it
will work as expected
18:43 -!- angasule_ [~angasule@190.2.33.49] has joined #go-nuts
18:47 -!- nebusoft
[~nebusoft@216-15-65-73.c3-0.drf-ubr2.atw-drf.pa.static.cable.rcn.com] has joined
#go-nuts
18:48 -!- Project-2501 [~Marvin@82.84.82.112] has joined #go-nuts
18:56 < TheCritic> gob *seems* to be dropping the second part of my struct
.....  code here: http://pastebin.com/3pxqCB3K output here:
http://pastebin.com/L1eHSnxy
18:57 < TheCritic> This is the line in the output that is whacked: BEFORE
map[two:{20 0} three:{30 0} one:{10 0}]
18:58 < skelterjohn|work> weird
18:58 -!- rutkowski [~adrian@078088210047.walbrzych.vectranet.pl] has joined
#go-nuts
18:59 < TheCritic> yeah
18:59 < aiju> TheCritic of pure reason
18:59 < TheCritic> I just compiled latest and it passes all tests
18:59 < skelterjohn|work> i do notice that you ignore an error value
19:00 < TheCritic> aiju: funny
19:00 < TheCritic> skelterjohn|work: crap, better fix that
19:00 < skelterjohn|work> the error is nil, though
19:00 < TheCritic> the e.Encode(filerecords) line?
19:01 < skelterjohn|work> oh, there's that one too
19:02 < skelterjohn|work> i meant os.Create
19:02 < TheCritic> ah
19:02 < TheCritic> ill fix that too
19:03 < TheCritic> yup, still weird
19:04 < TheCritic> so in my real code, that second param is a crc64 for each
file scanned...  and it keeps dropping it..  so I condensed it to this test to see
if i was being crazy...
19:05 < skelterjohn|work> try encoding to a bytes.Buffer, and then
immediately decoding from it
19:05 < skelterjohn|work> also, try using a different type for crc64
19:05 < skelterjohn|work> to see if that's an issue
19:06 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has joined #go-nuts
19:06 < TheCritic> changed type to int64 ...  no joy
19:06 < TheCritic> checking bytes.Buffer
19:09 < skelterjohn|work> i added a third element to the struct - and it
gets decoded properly, but crc64 still misses out
19:10 < skelterjohn|work> figured it out
19:10 < skelterjohn|work> crc64 is not exported
19:10 < skelterjohn|work> so gob can't read its value
19:10 < skelterjohn|work> if you change it to Crc64, it works
19:12 -!- Urmel| [~11087Urme@82-136-196-44.ip.telfort.nl] has quit [Read error:
Connection reset by peer]
19:12 < TheCritic> seriously?
19:13 < skelterjohn|work> yes
19:13 < TheCritic> the case?
19:13 < TheCritic> wow
19:13 < skelterjohn|work> that is how go determines what fields are exported
19:13 < skelterjohn|work> the case of the first letter
19:13 -!- SrTroll [~SrTroll@209.189.232.132] has joined #go-nuts
19:13 -!- SrTroll [~SrTroll@209.189.232.132] has left #go-nuts []
19:14 < TheCritic> wow
19:15 < TheCritic> go is looking more like perl every day :)
19:15 < TheCritic> which is good, bc I like perl :)
19:15 -!- nebusoft
[~nebusoft@216-15-65-73.c3-0.drf-ubr2.atw-drf.pa.static.cable.rcn.com] has quit
[Quit: Leaving]
19:16 < skelterjohn|work> does perl have a similar rule?
19:17 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
19:17 < chomp> no
19:17 < chomp> and go looks nothing like perl, thank the heavens
19:17 < chomp> err unless perl 6 has something like that, i dunno
19:18 < skelterjohn|work> i've only ever written one perl program
19:18 < skelterjohn|work> back in double-ought-two
19:18 < chomp> exec("/bin/rm /usr/bin/perl") ?
19:18 < skelterjohn|work> it contained a regular expression that spanned
three 80-char lines
19:19 < chomp> nice.
19:19 < skelterjohn|work> i was both proud and disgusted
19:19 < skelterjohn|work> i used it to remove XML tags
19:19 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
19:19 < chomp> is that even possible to do (perfectly) with a regex?
19:20 < chomp> i guess so
19:21 < skelterjohn|work> find and remove <X>.*</X>
19:21 < skelterjohn|work> and it would never be nested within itself
19:21 < chomp> ah
19:21 < skelterjohn|work> because of the particular doc structure
19:21 < skelterjohn|work> of course, this was a while ago, so i might not
remember it perfectly
19:22 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
19:23 -!- wrtp [~rog@92.23.127.186] has joined #go-nuts
19:24 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
19:28 < TheCritic> ah, I meant that perl has plenty of magic that isn't
intuitive....  using case to denote if an item in a struct is exportable or not is
not exactly common practice in computer languages :)
19:29 < TheCritic> perl is easy to pick on...  but I like it.
19:34 < chomp> i would agree that case-based visibility is a bit unintuitive
19:34 < chomp> i like it, but one thing i wonder is how 'case' is determined
19:34 < skelterjohn|work> unicode definition
19:34 < chomp> ah
19:35 < skelterjohn|work> there is a character class called "upper case" for
unicode
19:35 < chomp> so it is at least sane in that regard :
19:35 < skelterjohn|work> you can have upper case greek, chinese letters,
etc
19:35 < chomp> yeah, didn't know if it was lazy or well defined
19:35 < chomp> good to know
19:35 < aiju> skelterjohn|work: there are no upper case chinese letters
19:35 < skelterjohn|work> shows how much you know
19:35 < aiju> it's not possible to export names like that
19:35 < aiju> it's in the FAQ
19:35 < skelterjohn|work> which is more than me, when it comes to chinese
19:36 < skelterjohn|work> if by "like that" you mean chinese, i believe you
19:36 < skelterjohn|work> but you can certainly export names with only greek
letters
19:36 < aiju> sure
19:36 < aiju> or cyrillic
19:37 < chomp> so i can export Σ double?
19:37 < skelterjohn|work> yes
19:37 < chomp> i think from now on all of my code will use greek and
cyrillic symbols
19:37 < aiju> var Водка int
19:37 < skelterjohn|work> gostat exports the greek letter for capital gamma,
for the gamma function
19:37 < skelterjohn|work> but that was actually kind of a silly choice in
retrospect
19:37 < chomp> I like it
19:37 < skelterjohn|work> hard to type
19:38 < chomp> yes, but i blame editors for that fact :)
19:38 < skelterjohn|work> it's the world we live in
19:38 < aiju> i blame children
19:38 < chomp> we must bring the world into the future
19:38 < chomp> where typing capital gamma is a breeze!
19:38 < aiju> it's easy here
19:38 < aiju> altgr + shift + g: Γ!
19:38 < skelterjohn|work> altgr?
19:39 < chomp> silly euro keyboard
19:39 < skelterjohn|work> you have a key for alt-greek?
19:39 < aiju> skelterjohn|work: hahaha
19:39 < aiju> no
19:39 < aiju> alternative graphics :)
19:39 < aiju> it's a key on german keyboards
19:39 < skelterjohn|work> ah
19:39 < aiju> i call right alt like that
19:39 < aiju> and map it accordingly
19:39 < aiju> (i prefer US keyboards)
19:39 < skelterjohn|work> on my mac i set it up so cmd-opt-space switches to
the greek keyboard
19:39 < chomp> ah, never considered actually remapping my keyboard to be
more useful
19:39 < aiju> i also have SCIM set up for 日本語
19:40 < aiju> hahaha i just noticed
19:40 < aiju> 語 is pronounced go
19:40 < aiju> and means "language"
19:40 < chomp> slick
19:40 < aiju> now we know the true reason Go is called the way it is
19:41 < skelterjohn|work> what do they call the game go in chinese?
19:41 < chomp> wiki says "weiqi"
19:41 < skelterjohn|work> i wonder where "go" came from
19:41 < chomp> omg wikipedia is named after go!
19:42 < skelterjohn|work> uh
19:42 < skelterjohn|work> oh, weiqipedia
19:42 < aiju> skelterjohn|work: from japanese
19:42 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
19:43 < aiju> 囲碁 (igo) is the game
19:44 < aiju> the japanese just took the chinese letters and pronounced them
as they would pronounce them
19:44 -!- huin [~huin@82.153.193.223] has joined #go-nuts
19:45 < chomp> logically the next step is to know how 語 is pronounced in
japanese
19:46 < aiju> chomp: Go
19:46 < aiju> 日本語 is japanese and means ..  japanese
19:46 < aiju> ("japan language")
19:46 < chomp> ah, then in chinese?  same?
19:46 < aiju> no clue
19:46 < chomp> ah ok.
19:46 < skelterjohn|work> so the game and "language" are spoken the same?
19:47 < aiju> skelterjohn|work: the game is "igo"
19:47 < chomp> sounds like 語 in chinese is pronounced "yu"
19:47 < aiju> chomp: dict.leo.org says "yu"
19:47 < aiju> yeah
19:47 < chomp> nice
19:47 < chomp> yulang it is!
19:47 < Tv> do note that chinese is a tonal language; there might be
multiple words you think of as "go"
19:48 < aiju> Tv: japanese is not
19:48 < Tv> yeah japanese pronounciation is way easier
19:48 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
19:48 < aiju> japanese is just terribly ambiguous in exchange
20:00 -!- robteix [~robteix@nat/intel/x-hnkgrgpjbrnftsjn] has joined #go-nuts
20:03 -!- keithcascio [~keithcasc@nat/google/x-odmhkbsnufsnzddl] has joined
#go-nuts
20:05 -!- micrypt [~micrypt@02ddac93.bb.sky.com] has joined #go-nuts
20:05 < micrypt> Negative slices.  Possible?
20:06 < Tv> nope
20:06 < Tv> or, well, depending on what exactly you mean
20:06 * micrypt spoilt Python brat crawls back into his corner.
20:06 < Tv> s[:-1] is doable iirc
20:06 <+iant> no, it's not
20:06 <+iant> sorry
20:06 < Tv> as in meaning s[:len(s)-1]
20:07 <+iant> nope, you have to write out the expression as you just did
20:07 < Tv> ok i misremember
20:07 < Tv> but that's "negative indices" in my mind
20:07 <+iant> it's a Python thing
20:07 < micrypt> Fair enough.  Thanks.
20:07 < Tv> negative slices sounds like an array that expands in both
directions from 0, which is definitely not in core go
20:08 < skelterjohn|work> whats the difference between negative slices and
negative indices?
20:08 < skelterjohn|work> they both have stuff before zero
20:09 < Tv> one would "wrap around", one would extend below zero
20:09 < Tv> like in c you could say foo[-42] and point at something
20:10 -!- dj2_ [~dj2@216.16.242.254] has joined #go-nuts
20:11 -!- dj2 [~dj2@216.16.242.254] has quit [Ping timeout: 260 seconds]
20:15 -!- tncardoso [~thiago@189.115.131.71] has quit [Ping timeout: 255 seconds]
20:18 < micrypt> When would you use a type assertion?
20:20 < skelterjohn|work> when you want to convert from an interface type to
a grounded type
20:23 < wrtp> AnotherBraggart: or from an interface to another interface
type
20:27 -!- rutkowski [~adrian@078088210047.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
20:27 < wrtp> micrypt: negative slice indices obscure errors that should be
fatal
20:28 -!- tncardoso [~thiago@189.59.160.5] has joined #go-nuts
20:29 < chomp> how so?
20:30 < aiju> because the index is negative?
20:30 < aiju> and probably wasn't supposed to be
20:30 < chomp> but out of bounds is out of bounds
20:30 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-151-192.clienti.tiscali.it]
has joined #go-nuts
20:31 < aiju> with the thing micrypt suggested -1 would be in bounds
20:31 < chomp> if the index is too large and not supposed to be, does the
language obscure those errors?
20:31 < aiju> yeah
20:31 < aiju> currently it will trap all negative or too large indices
20:31 < chomp> a[-1] would be in bounds iff len(a) >= 1
20:31 < chomp> just like a[1] is in bounds iff len(a) > 1
20:32 < chomp> i know how it works, and i'm not even arguing that it should
be treated like python.  but error obscurity doesn't seem like a valid reason
20:32 < aiju> the thing is with variables which accidentally got negative
20:33 -!- Project-2501 [~Marvin@82.84.82.112] has quit [Ping timeout: 244 seconds]
20:35 -!- mgray [~mgray@li226-224.members.linode.com] has quit [Quit: Lost
terminal]
20:42 < skelterjohn|work> theSlice[base-someOffset()]
20:42 < skelterjohn|work> a bug causes someOffset() to be larger than base
20:42 < skelterjohn|work> which shouldn't happen
20:43 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has quit [Quit: leaving]
20:44 -!- TheMue [~TheMue@p5DDF4B91.dip.t-dialin.net] has quit [Quit: TheMue]
20:46 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Quit:
Geek insinde®]
20:48 < chomp> sure but consider theSlice[base+someOffset()]
20:48 -!- xash [~xash@d025196.adsl.hansenet.de] has joined #go-nuts
20:49 < chomp> i don't see how a bug causing (base+someOffset()) to be
larger than len(theSlice) is much different
20:49 < chomp> obviously different, but the significance of the distinction
seems arbitrary
20:50 -!- alehorst [~alehorst@187.58.246.160] has quit [Quit: Leaving.]
20:51 < chomp> of course i think simplicity is a perfectly legitimate reason
for indexing to be strictly positive :) not necessarily a fan of hidden magic.
20:51 -!- message144 [~message14@pool-98-112-179-26.lsanca.fios.verizon.net] has
joined #go-nuts
20:52 < message144> Is there a git tracking repo for gccgo ?
20:53 -!- dfr|mac [~dfr|work@nat/google/x-bbmrieuzzuwhjksw] has joined #go-nuts
20:54 -!- alehorst [~alehorst@187.58.246.160] has joined #go-nuts
20:54 < skelterjohn|work> chomp, they're similar bugs - both cause a panic
right now
20:54 < skelterjohn|work> but if we had negative indices, the -someOffset()
case would not panic
20:55 < chomp> but in that case a -someOffset() might not be an error
20:55 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-151-192.clienti.tiscali.it]
has quit [Quit: E se abbasso questa leva che succ...]
20:55 < chomp> shrug
20:55 < pharris> message144: http://gcc.gnu.org/wiki/GitMirror
20:55 < message144> pharris, thanks
20:55 < skelterjohn|work> it's an error that would be hard to find, if it
was the actual problem.  that, and the "no new features" dogma, is why it isn't a
feature
20:55 < skelterjohn|work> of course there are times when it'd be nice,
otherwise python wouldn't have added it
20:56 < skelterjohn|work> using str[-3:] is a very convenient way to get a 3
char suffix
20:58 -!- dfr|mac [~dfr|work@nat/google/x-bbmrieuzzuwhjksw] has quit [Remote host
closed the connection]
20:58 -!- dj2_ [~dj2@216.16.242.254] has quit [Remote host closed the connection]
20:58 < chomp> indeed.  i like negative indices but don't see them being
useful enough to justify the new feature
20:58 -!- dfr|mac [~dfr|work@nat/google/x-rtktvmyowroghaxm] has joined #go-nuts
20:59 < wrtp> it would be better if the compiler could tell statically when
you intend to use an index from the end
20:59 < wrtp> e.g.  str[$-3:]
21:00 < wrtp> where '$' stands for len(str)
21:00 < wrtp> but i don't think it's worth the complexity
21:00 < chomp> nah
21:00 < chomp> len(str)-3 just isn't hard enough to type for any of this to
be worth it :p
21:00 < skelterjohn|work> giveMeBackAString()[-3:]
21:01 < skelterjohn|work> have to make an intermediate var to do that
21:01 < skelterjohn|work> which is one of those inconveniences that often
makes code more readable
21:02 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has quit [Quit: Leaving.]
21:04 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
21:04 < uriel> yay, new regexp package is coming!
http://codereview.appspot.com/4538123/
21:05 < dforsyth> nice
21:05 < kevlar_work> I'm excited
21:06 < kevlar_work> its got a ways to go though
21:07 < kevlar_work> I think, currently, only the parser is implemented
(though since we have a regexp package already, the internals behind the parser
may be similar)
21:08 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
21:10 < dforsyth> anyone interested in a snappy package?
21:12 < skelterjohn|work> what's a snappy package
21:12 -!- jsj [~johan@78-70-255-20-no149.tbcn.telia.com] has quit [Read error:
Connection reset by peer]
21:16 < uriel> kevlar_work: more that only the parser has been posted for
review ;) I'm sure russ is hard at work on th einternals (which I somhow doubt
will be the same as the current somewhat simplistic regexp package)
21:16 < uriel> in any case, quite exciting news
21:17 -!- gtaylor [~gtaylor@99-126-136-139.lightspeed.gnvlsc.sbcglobal.net] has
quit [Quit: gtaylor]
21:17 < skelterjohn|work> i'd be more excited by progress into making go
code invokable from C, or go shared objects
21:18 -!- huin [~huin@82.153.193.223] has quit [Quit: leaving]
21:18 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
21:18 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 255
seconds]
21:19 < skelterjohn|work> or if someone coded up the algorithm for
triangularization of a concave polygon that is going to be my day tomorrow
21:21 < message144> Is it possible for 6l to output a shared object file?
21:22 < Tonnerre> In theory yes but it's not implemented?
21:24 < chomp> skelterjohn|work, just one polygon?
21:25 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has quit [Ping
timeout: 255 seconds]
21:25 < skelterjohn|work> yes
21:26 < jnwhiteh> Does anyone know why https://github.com/tav/go is no
longer being updated?
21:26 < skelterjohn|work> found a paper that claims to have the optimal alg
21:26 < skelterjohn|work> gonna read it tomorrow
21:26 < uriel> message144: basically no
21:26 < uriel> message144: gccgo can do it, 6l probably will be able some
day, but I wouldn't hold my breath
21:27 < message144> uriel, ok...  thats what i was afraid of..  having
trouble installing gccgo, so i guess im out of luck for now
21:27 < Tonnerre> When is golang for llvm due?  ;)
21:27 < aiju> never!
21:27 < uriel> message144: why do you need that?
21:27 < message144> uriel, shared objects?
21:27 < uriel> Tonnerre: when somebody plugs the Go frontend used for gcc,
have not heard of anyone trying so far, bu supposedly shouldn't be hard
21:28 < uriel> message144: again, why?
21:28 < Tonnerre> uriel: hm ok
21:28 < message144> uriel, i want to access it from python ctypes...  really
just for fun more than anything else
21:30 < chomp> i kinda like the inability to dynamically link
21:30 < Tonnerre> Heh
21:30 * uriel agrees with chomp
21:30 < message144> uriel, for performance reasons i do a lot of ctypes
linking from python to C...  but ive been looking for an excuse to try something
other than C for this
21:30 < message144> chomp, why?
21:31 < uriel> message144: why not give using Go directly a try?  in many
ways it is nicler, cleaner and simpler than Python
21:31 < chomp> it has its drawbacks, but the complete lack of binary
dependency outside of OS/arch itself is awfully nice
21:32 < message144> uriel, well, ive got a huge project in place, but there
are some pieces which need much better performance which python cannot offer
21:33 < message144> uriel, rewriting the entire thing is not an option, but
i thought linking to go would be kind of fun for this
21:33 -!- wrtp [~rog@92.23.127.186] has quit [Quit: wrtp]
21:33 < |Craig|> I wonder if its possible to do anything with Cython+cgo
21:33 < uriel> aha, I understand, well, it is always better to start with a
new language that is not too tied to an existing project (specially one mostly
written in another language)
21:33 < uriel> IMHO
21:34 < message144> |Craig|, that would be fun
21:34 < uriel> there is the campher stuff brad did for perl too
21:34 < uriel> wonder if a similar thing could be done for python
21:34 < uriel> still I'm not sure that would work for what you want
21:35 < message144> uriel, yeah that makes sense...  although, in this case,
i would be getting paid to learn go :)
21:35 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
21:36 < |Craig|> message144: depending on your needs, you might be able to
just launch and communicate with a go application from python
21:36 < message144> maybe one day when i have the patience, ill try to get
gccgo working
21:36 < message144> |Craig|, well yeah i was thinking about named pipes or
unix sockets or shared memory
21:37 < message144> there are some options there..  but i thought directly
accessing it via ctypes would have been ultra sexy
21:37 < |Craig|> use a network socket and call its ability to use a remote
server for heavy processing a feature :)
21:37 < |Craig|> it really depends on how much communication you need
21:38 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
21:38 < message144> In my head i was thinking "finally, an excuse to ditch C
for all our clustering algorithms"
21:38 < Tonnerre> Heh
21:38 < message144> but, to justify it, it would have to be somewhat elegant
and sensible
21:39 < message144> oh well..  ill revisit this in a few months i suppose :)
21:39 < message144> but i think ill get started learning the language in the
mean time
21:39 -!- awidegreen [~quassel@85.24.170.226] has quit [Remote host closed the
connection]
21:40 -!- cenuij [~cenuij@103.184.122.78.rev.sfr.net] has joined #go-nuts
21:40 -!- cenuij [~cenuij@103.184.122.78.rev.sfr.net] has quit [Changing host]
21:40 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
21:42 < uriel> json over a pipe should be quite nice
21:42 < uriel> or you could use the C implementation of gobs
21:43 < uriel> but tha is more low-level
21:43 -!- dfc [~dfc@124-149-49-45.dyn.iinet.net.au] has quit [Quit: dfc]
21:44 < message144> uriel, heh yeah i actually did that same thing for
python <-> php
21:46 -!- tncardoso [~thiago@189.59.160.5] has quit [Quit: bye]
21:47 < Venom_X> message144, what about thrift?
21:48 < message144> Venom_X, oh yeah good idea
21:48 -!- pothos_ [~pothos@111-240-174-124.dynamic.hinet.net] has joined #go-nuts
21:48 < Venom_X> pretty sure there's thrift implementations in the languages
you've mentioned
21:49 * uriel would stick to json unless there are clear performance reasons
21:49 -!- pothos [~pothos@111-240-170-45.dynamic.hinet.net] has quit [Ping
timeout: 246 seconds]
21:51 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
21:53 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
21:55 -!- jbooth1 [~jay@209.249.216.2] has left #go-nuts []
21:57 -!- iant [~iant@nat/google/x-ufstdfpwmtryqspf] has quit [Ping timeout: 268
seconds]
22:11 -!- iant [~iant@nat/google/x-ygenzifktjiaijzt] has joined #go-nuts
22:11 -!- mode/#go-nuts [+v iant] by ChanServ
22:11 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:11 -!- foocraft_ [~ewanas@89.211.214.224] has joined #go-nuts
22:11 -!- foocraft [~ewanas@89.211.225.198] has quit [Ping timeout: 252 seconds]
22:17 -!- dfr|mac [~dfr|work@nat/google/x-rtktvmyowroghaxm] has quit [Ping
timeout: 255 seconds]
22:19 -!- pjjw [klang@68.64.241.250] has joined #go-nuts
22:23 -!- tncardoso [~thiago@189.59.160.5] has joined #go-nuts
22:25 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
22:27 -!- tvw [~tv@e176006185.adsl.alicedsl.de] has joined #go-nuts
22:31 -!- iant [~iant@nat/google/x-ygenzifktjiaijzt] has quit [Ping timeout: 252
seconds]
22:35 -!- tncardoso [~thiago@189.59.160.5] has quit [Quit: bye]
22:35 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
22:35 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
22:37 -!- Venom_X [~pjacobs@66.54.185.130] has quit [Quit: Leaving]
22:38 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has quit [Read
error: Connection reset by peer]
22:39 -!- xQuasar [xQuasar@123-243-2-159.static.tpgi.com.au] has joined #go-nuts
22:40 < xQuasar> Upon first glance, Go seems like a mesh of syntax from c++
and java
22:42 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 268 seconds]
22:44 -!- iant [~iant@nat/google/x-osuqkusmddmqytan] has joined #go-nuts
22:44 -!- mode/#go-nuts [+v iant] by ChanServ
22:46 -!- xQuasar [xQuasar@123-243-2-159.static.tpgi.com.au] has quit []
22:47 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
22:49 < whitespacechar> (testing)
22:49 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
left #go-nuts []
22:50 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
22:50 < whitespacechar> (testing)
22:50 -!- robteix [~robteix@nat/intel/x-hnkgrgpjbrnftsjn] has quit [Ping timeout:
255 seconds]
22:53 -!- angasule_ [~angasule@190.2.33.49] has quit [Ping timeout: 255 seconds]
22:53 -!- shvntr [~shvntr@119.121.31.56] has joined #go-nuts
22:53 -!- Sisten [~Sisten@s213-103-208-147.cust.tele2.se] has quit [Read error:
Connection reset by peer]
22:55 < str1ngs> whitespacechar: ping
22:56 < whitespacechar> hello.
22:56 < str1ngs> hello
22:56 < whitespacechar> does anyone know of an existing Go http rest client
library?
22:59 < str1ngs> whitespacechar: there is
http://code.google.com/p/tideland-rwf/
22:59 < str1ngs> but not sure how far developed it is I have not used it
myself
22:59 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 250 seconds]
22:59 -!- bytbox [~s@96.26.105.154] has joined #go-nuts
23:00 < str1ngs> ah client . think that is a server
23:00 < whitespacechar> yes, it looks like.
23:00 < whitespacechar> thanks for checking, though.
23:00 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
23:01 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
23:01 < str1ngs> would not be hard to make your own though.  at least
tailored to the api you need services from
23:02 < micrypt> whitespacechar: What are your needs?  The built in http
lib's fairly decent.
23:02 < whitespacechar> sure.  sometimes it's nice to hide a few of the
details.
23:03 < micrypt> True, I've found myself rewriting elements and wrapping
stuff one more than one occasion.
23:03 < micrypt> s/one more/on more
23:06 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
23:07 -!- angasule_ [~angasule@190.2.33.49] has joined #go-nuts
23:08 < dforsyth> sorry when i brought up a snappy package earlier i was
talking about googles compression lib
23:10 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
23:11 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 260
seconds]
23:14 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has quit [Quit: Computer
has gone to sleep.]
23:15 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
23:18 -!- adu [~ajr@64.134.96.52] has quit [Quit: adu]
23:19 -!- iant [~iant@nat/google/x-osuqkusmddmqytan] has quit [Quit: Leaving.]
23:24 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
23:27 -!- Semmy [~Semy@sunner.semmy.ru] has joined #go-nuts
23:28 < Semmy> hello.  it's my first programm on go.  just "Hello, world!"
I've copied from golang.org.  and I've got an error:
23:28 < Semmy> % 8g hello.go
23:28 < Semmy> hello.go:3: syntax error: unexpected literal, expecting name
23:29 < Semmy> in line: import "fmt"
23:29 < Semmy> can you give a hint?
23:29 < Rennex> weird old version of the compiler?
23:30 < Semmy> GOOS=freebsd
23:30 < Semmy> GOARCH=386
23:30 < Semmy> GOROOT=/usr/local/lib/go
23:30 < Semmy> from freebsd ports: go-20110515
23:30 < Semmy> not so old
23:30 < xash> What's in line 1 and 2?
23:31 -!- iant [~iant@67.218.107.72] has joined #go-nuts
23:31 -!- mode/#go-nuts [+v iant] by ChanServ
23:31 < xash> Oh, wait, I see ..  copied ..  uhrm
23:32 < Semmy> package main
23:32 < Semmy> <empty string>
23:32 < Semmy> looks like a buggy freebsd port
23:32 < dforsyth> freebsd port is good last time i checked
23:33 < Rennex> Semmy: you copied text that has chinese characters in it
-> sounds like a charset problem (invisible utf BOM at the start and the
compiler doesn't understand it?)
23:34 < Semmy> well, a complete list:
23:34 < Semmy> % cat hello.go
23:34 < Semmy> package main
23:34 < Semmy> import "fmt"
23:34 < Semmy> func main() {
23:34 < Semmy> fmt.Printf("hello, world\n")
23:34 < Semmy> }
23:35 < Semmy> I'v just build go from hg sources and the problem gone
23:36 -!- Semmy [~Semy@sunner.semmy.ru] has left #go-nuts []
23:38 -!- franciscosouza [~francisco@187.105.21.125] has joined #go-nuts
23:42 -!- robteix [~robteix@host16.190-230-219.telecom.net.ar] has joined #go-nuts
23:46 -!- rcrowley [~rcrowley@208.106.28.36] has joined #go-nuts
23:52 <@adg> yeah, don't use ports
23:52 <@adg> *sigh*
23:52 <@adg> how many times have i asked people NOT to package Go for
distributions yet?
23:53 < str1ngs> hmm I did not know that
23:53 < str1ngs> what about gccgo
23:54 <@adg> gccgo is a bit different
23:57 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
--- Log closed Thu Jun 09 00:00:53 2011