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

--- Log opened Wed Aug 18 00:00:05 2010
00:06 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has quit [Quit:
skelterjohn]
00:06 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
00:10 < plexdev> http://is.gd/emm3X by [Russ Cox] in go/src/pkg/http/ --
http: parse query string always, not just in GET
00:12 -!- nighty__ [~nighty@210.188.173.245] has joined #go-nuts
00:19 < uriel> dr
00:22 -!- artefon [~thiago@vpn-228.dcc.ufmg.br] has quit [Quit: bye]
00:24 -!- jessta [~jessta@124-168-116-223.dyn.iinet.net.au] has quit [Ping
timeout: 260 seconds]
00:26 -!- bragin_ [~bragin@95.167.98.250] has joined #go-nuts
00:30 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode]
00:34 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
00:39 -!- py3k [~Py3k@219.134.63.121] has quit [Quit: Lost terminal]
00:46 -!- flyfish [~flyfish@74-130-61-106.dhcp.insightbb.com] has joined #go-nuts
00:46 -!- tav [~tav@2001:0:53aa:64c:0:fbfb:a3f8:75d3] has quit [Ping timeout: 260
seconds]
00:47 -!- flyfish [~flyfish@74-130-61-106.dhcp.insightbb.com] has quit [Client
Quit]
00:47 -!- flyfish [~flyfish@74-130-61-106.dhcp.insightbb.com] has joined #go-nuts
00:48 -!- aho [~nya@fuld-4d00d37d.pool.mediaWays.net] has joined #go-nuts
00:56 -!- flyfish [~flyfish@74-130-61-106.dhcp.insightbb.com] has quit [Quit:
flyfish]
00:57 -!- itrekkie [~itrekkie@ip72-200-109-106.tc.ph.cox.net] has joined #go-nuts
00:58 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
00:59 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
00:59 -!- mikespook1 [~mikespook@219.137.50.140] has quit [Ping timeout: 265
seconds]
01:05 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has joined
#go-nuts
01:09 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche]
01:11 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has quit [Quit:
skelterjohn]
01:16 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has joined
#go-nuts
01:22 < skelterjohn> interesting - proposal to drop new(T) in favor of
make(*T) for getting pointers to allocated data
01:22 -!- mikespook [~mikespook@219.137.50.140] has joined #go-nuts
01:23 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Ping
timeout: 240 seconds]
01:24 < exch> people are still falling over the apparent duplicity of having
new() and make(), eventhough they are entirely different?  :p
01:25 * exch reads
01:26 < skelterjohn> the issue is that new has some baggage from whence it
came
01:26 < skelterjohn> and make(*T) without new(T) would have one less
built-in function and one less thing for people to expect to happen because it
happens elsewhere
01:26 < exch> true
01:27 < exch> more simplicity is always a good thing as far as I'm concerned
01:27 < skelterjohn> as i posted in the ML, i think it's a good idea except
for the code breakage
01:27 < skelterjohn> but better to break code sooner rather than later
01:27 < exch> aye
01:27 < Namegduf> I don't understand people who say they "always do &Type{}"
01:27 < Namegduf> Why would you do that
01:27 < exch> same goes for the environment variable dependency removal in
russ's patch
01:27 < skelterjohn> well, it's not always possible for one
01:28 < skelterjohn> can you do &Type{} if Type has fields to fill?
01:28 < exch> yes
01:28 < skelterjohn> oh
01:28 < skelterjohn> well then.
01:28 < exch> t := &Type{}; t.foo = blah; works
01:28 < Namegduf> Is there some perspective that makes &Type{} cleaner than
new(Type) that I'm missing?
01:28 < skelterjohn> learn something new every day
01:28 < skelterjohn> fewer characters
01:28 < Namegduf> Or more obvious?
01:29 < skelterjohn> ?
01:29 < skelterjohn> i didn't even know you could do it, so i clearly don't
have the answer
01:29 < exch> I think there was something about heap allocation that occurs
with &T{} form
01:29 < exch> and not with new()
01:29 < skelterjohn> ??
01:29 < Namegduf> I don't believe that's true.
01:29 < Namegduf> At present.
01:29 < skelterjohn> i can't imagine why it would be...
01:29 < Namegduf> I suppose &T{} might not heap allocate once Go is changed
to not heap allocate everything you get the address of.
01:30 < skelterjohn> the current rule being if its address is ever taken, it
is allocated on the heap
01:30 < exch> dunno.  tbh, i'm a bit confused about all that myself
01:31 < skelterjohn> though i do figure go will eventually have to get
smarter about that...if you can prove that something never leaves the function
then putting it on the stack will be nicer to the garbage collector
01:31 * Namegduf would like a way to produce less garbage.
01:31 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has quit [Ping timeout:
260 seconds]
01:31 < Namegduf> Right now, my program produces massive amounts, quickly.
01:31 < skelterjohn> doing that analysis would make the compiler slower
though :)
01:32 < Namegduf> Eh.
01:32 < Namegduf> /perceptively/ slower, though?
01:32 < skelterjohn> but it's something that very smart people spend lots of
time thinking about
01:32 < Namegduf> I don't think so
01:32 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has joined #go-nuts
01:32 < Namegduf> I think it's just not been looked at yet.
01:32 -!- itrekkie [~itrekkie@ip72-200-109-106.tc.ph.cox.net] has quit [Quit:
itrekkie]
01:33 < skelterjohn> i think the problem is decidedly in P, so it wouldn't
be too horrendous
01:33 < skelterjohn> but i don't know enough about it or even compilers in
general to answer your question on how much slower
01:37 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat
0.3.2]
01:38 -!- tav [~tav@2001:0:53aa:64c:0:3ffe:a3f8:9d51] has joined #go-nuts
01:39 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has quit [Quit:
skelterjohn]
01:43 < nickaugust> is there a hex type?  im trying to figure out what type
to use for a UUID field ie: 8847f702-a3c6-4f3d-a769-90c46e776c01
01:43 < Namegduf> hex is a way of representing numbers in ASCII.
01:43 < Namegduf> So you either want to store it as the number, or as the
string, in hex.
01:44 < nickaugust> so that converts to an ascii number?
01:44 < Namegduf> ...no.
01:44 < Namegduf> That IS ASCII.
01:44 < Namegduf> That's a string.
01:44 < nickaugust> right
01:44 < Namegduf> It converts to a regular number.
01:45 < Namegduf> 3d, for example, is equvalent to...  62.
01:45 < nickaugust> ah...
01:45 < Namegduf> Hex is base 16.
01:45 < nickaugust> so I can convert to and from regular numbers?
01:45 < Namegduf> Yes.
01:45 < nickaugust> it would be better to store in memory as a regular
number than as a string, no?
01:46 < Tonnerre> Depends, better for what?
01:46 < Namegduf> I would normally think so, but even the individual parts
of that string are really large numbers.
01:46 < Namegduf> That said, still smaller than storing their base 16
encoding, just possibly more annoying.
01:47 < Tonnerre> Namegduf, I think the whole thing is just 128 bit, right?
01:47 < nickaugust> well im indexing a few thousand files that are all save
with UUIDs as filenames..  so im building a tree index using the UUID as the id
01:47 < Namegduf> Ah.
01:47 -!- napsy [~luka@212.235.174.112] has quit [Read error: Operation timed out]
01:47 < nickaugust> so it seems like a waste to use strings..  maybe byte
array?
01:48 < MizardX> [2]uint64{0x8847f702a3c6,0x4f3da76990c46e776c01}
01:48 < MizardX> wait...two bytes in the wrong number
01:48 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
01:48 < Tonnerre> mattikus, are you sure you ordered the poor little endians
right?  ;)
01:49 < MizardX> byte array would work too
01:49 < Tonnerre> Err, MizardX
01:49 < nickaugust> so 32 digits and 4 hyphens...  is that [36]byte ??
01:50 < Namegduf> That's storing it as a string.
01:50 < Namegduf> Numbers stored in a binary representation do not have
digits.  Or hyphens.
01:50 < nickaugust> right but only using the exact amount of memory it needs
01:50 < nickaugust> how much space does a string take up?
01:51 < Namegduf> Using a string will do that anyway.
01:51 < MizardX>
[16]byte{0x88,0x47,0xf7,0x02,0xa3,0xc6,0x4f,0x3d,0xa7,0x69,0x90,0xc4,0x6e,0x77,0x6c,0x01}
01:51 < Namegduf> The same thing.
01:51 < Namegduf> A string is an immutable byte array.
01:51 < Namegduf> By convention, containing data in UTF-8 encoding, but
that's just vague convention.
01:51 < nickaugust> oh maybe its simpler to just use a string then
01:53 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
01:55 < nickaugust> what method is called on a type when running string() on
it?
01:56 < nickaugust> ah String() :)
02:03 < nickaugust> wait...  hmm...  http://sprunge.us/DWcd the LessThan
function is giving me this error: cannot "convert item (type TreeItem) to type
string" even though it has a String method
02:03 < nickaugust> am i doing something wrong there?
02:07 -!- jhawk28 [~jhawk28@c-75-69-37-150.hsd1.vt.comcast.net] has quit [Remote
host closed the connection]
02:09 -!- alc [~arx@114.245.252.86] has joined #go-nuts
02:11 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has quit
[Quit: derferman]
02:14 -!- Xenith [~xenith@kiwi.he.net] has quit [Ping timeout: 260 seconds]
02:17 < exch> the string() method is only called by things like fmt.Printf()
when you specify the %s option for an object
02:17 < exch> you can't cast any type to a string like that
02:17 < exch> You also don't have to do string(item.word) or
string(item.UUID) in the String() method.  Those fields are already strings
02:19 < exch> if you want to compare both as a string, do something like:
return a.String() < (other.(TreeItem)).String()
02:21 < nickaugust> ok...  using my String()?  or get rid of my String()
02:21 < exch> using your string()
02:22 < nbjoerg> does go have an equivalent of pthread_once?
02:23 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
02:24 -!- matt444 [601c2542@gateway/web/freenode/ip.96.28.37.66] has joined
#go-nuts
02:25 < exch> is that supposed to run something exactly once?
02:25 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
#go-nuts
02:25 < falconindy> sync.Once() should be similar
02:25 < nickaugust> exch: now the line "return item.String() <
other.(TreeItem).String()" gives me runtime "panic: interface conversion:
interface is *main.TreeItem, not main.TreeItem"
02:25 < falconindy> er, nix the ()
02:25 < exch> there's a once.Do() function
02:25 < exch> not sure if that's the same thing
02:26 < falconindy> looks the same to me, as long as the Once object is
defined outside the context of the goroutines
02:27 < exch> nickaugust: ok, then make sure you don't pass a pointer into
lessThan(), or change both functions to have *TreeItem as receiver instead of
TreeItem.
02:27 < exch> and change other.(TreeItem).String() to
other.(*TreeItem).String()
02:27 -!- navigator [~navigator@p54897A22.dip.t-dialin.net] has quit [Read error:
Operation timed out]
02:27 < matt444> What is wrong with this code?  First func won't compile,
second causes a panic.  http://go.pastie.org/1099089
02:28 < nickaugust> exch: ok sweet man i'll try that.  thanks :)
02:28 -!- navigator [~navigator@p54897A25.dip.t-dialin.net] has joined #go-nuts
02:31 < nickaugust> matt444: i think they need to be something like "func
GetFoo() (f Foo, os.Error) {"
02:31 < nickaugust> with a name for the return value
02:31 < falconindy> you don't have to name return values
02:31 < nickaugust> nevermind :)
02:31 < falconindy> if you're trying to manipulate the nil pointer on the
return, then yeah...  you'll hit a panic
02:32 < matt444> if not there shouldn't be a panic?
02:32 -!- alc [~arx@114.245.252.86] has quit [Ping timeout: 258 seconds]
02:33 < falconindy> no, there shouldn't be.  returning nil for a pointer
value is valid.
02:33 < matt444> ok
02:33 < matt444> that's what i wanted to confirm
02:33 < falconindy> your first example....  nil can't describe an empty
struct
02:33 < matt444> is that standard practice when you want to return an Error?
02:33 < matt444> to make the first variable nil?
02:33 < falconindy> it's typically what i do.  and then check the error for
nil
02:34 < falconindy> if the error isn't nil, you can assume that you're able
to play with the data in the other return value
02:34 < matt444> falconindy: i know first func was incorrect, couldn't
figure out the second
02:34 < matt444> good, that's the way i've been doing it to
02:34 < matt444> i'm getting panics, but i can find out why
02:34 < falconindy> Foo{} describes an empty Foo struct, if you wanted to do
it that way
02:35 < falconindy> can you post the rest of your code?
02:35 < matt444> well that was just a simplified example?
02:36 < matt444> not a question :)
02:37 < matt444> i'm just glad that i'm doing it the "standard" way
02:37 < nickaugust> exch: things are working nicely now.  thanks for youre
help!
02:37 < exch> np
02:38 < nickaugust> what do you call the (TreeItem) part in the middle in of
"other.(TreeItem).String()"..  is that part of interfacing?  first time ive seen
that
02:38 -!- alc [~arx@114.245.252.86] has joined #go-nuts
02:39 < exch> that's a type assertion
02:40 < exch> it forces 'other' to be of type TreeItem, so you can call it's
methods.  That will oanic() if 'other' is not actually a TreeItem.  But youve seen
that happen already :)
02:40 < exch> *panic
02:40 < nickaugust> yes i have :) ok that makes sense.  thanks again exch
02:41 < exch> incidentally, I played around with your UUID issue to see what
is smallest, memory wise.  A struct with appropriate integer fields is by far the
smallest.  I am not entirely sure I got the bytesize calculations for the other
types correct though: http://pastebin.com/1Xw2y8n9
02:42 < exch> as a string, you don't only have the actual string bytes, but
also the addition size of the string object containing the pointer to the byte
data
02:43 < exch> that goes for all the others as well
02:43 < exch> the slice of strings is by far the worst
02:51 < nickaugust> interesting
02:51 * nickaugust switches to UUID struct
02:51 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
02:51 < nickaugust> thanks exch!
02:52 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
02:52 < exch> Namegduf, skelterjohn: Russ Cox explained what the &T{} bit
does as far as heap allocation goes:
http://groups.google.com/group/golang-nuts/browse_thread/thread/9165d853de57374e
02:54 < Namegduf> So there's no magic I didn't know about.
02:54 < exch> aye
03:03 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
03:03 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:03 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
03:04 < matt444> no, please don't remove new()
03:06 < nickaugust> how do I go from the string to the uint32 value?  im
trying this f := strings.Split(val.Name, "-", -1); u := &UUID{uint32(f[0]),
uint16(f[1]), uint16(f[2]), uint16(f[3]), uint64(f[4])};
03:07 < nickaugust> but it cannot convert string to uint32
03:07 < nickaugust> im getting tired and dumb :/
03:07 < exch> use the appropriate functions in the strconv package
03:07 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
03:08 < exch> strconv.Btou64(f[i], 16) will convert the string to a 64 bit
uint.  You can then do uint32(val)
03:09 < exch> You'll need that particular function, because the UUID string
has hexadecimal number representations
03:10 < nickaugust> ok thanks again man.  im going to finish this up and get
some sleep.  should have more intelligent questions for you tomorrow.  ;)
03:11 < exch> I could use some myself..  tis 5am :s
03:23 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has joined #go-nuts
03:23 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has left #go-nuts []
03:30 < nickaugust> Btoui64*
03:31 < nickaugust> well the index takes up less memory now (yay!) but it
runs a bit slower having to convert the UUID to the other types
03:33 < matt444> string to io.Reader ???
03:33 < nickaugust> hm?
03:44 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has joined #go-nuts
03:49 -!- matt444 [601c2542@gateway/web/freenode/ip.96.28.37.66] has quit [Quit:
Page closed]
03:50 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has quit [Read error: Connection
reset by peer]
03:53 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Read error:
Connection reset by peer]
03:53 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
04:00 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Read error:
Connection reset by peer]
04:00 -!- mattikus [~mattikus@24.250.73.154] has joined #go-nuts
04:01 -!- mattikus [~mattikus@24.250.73.154] has quit [Excess Flood]
04:01 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
04:03 -!- jessta [~jessta@home.nelix.id.au] has joined #go-nuts
04:17 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Connection reset by
peer]
04:29 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
04:31 -!- mikespook [~mikespook@219.137.50.140] has quit [Ping timeout: 265
seconds]
04:33 -!- mattikus_ [~mattikus@ip68-11-218-31.br.br.cox.net] has joined #go-nuts
04:33 -!- mattikus_ [~mattikus@ip68-11-218-31.br.br.cox.net] has quit [Excess
Flood]
04:33 -!- mattikus_ [~mattikus@ip68-11-218-31.br.br.cox.net] has joined #go-nuts
04:34 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Ping
timeout: 240 seconds]
04:38 -!- mattikus_ [~mattikus@ip68-11-218-31.br.br.cox.net] has quit [Ping
timeout: 255 seconds]
04:39 -!- Nick_B_ [ca318819@gateway/web/freenode/ip.202.49.136.25] has joined
#go-nuts
04:41 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
04:46 -!- alc [~arx@114.245.252.86] has quit [Ping timeout: 252 seconds]
04:48 -!- napsy [~luka@212.235.174.112] has quit [Read error: Operation timed out]
04:54 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined
#go-nuts
05:00 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
05:02 -!- scm [justme@d070229.adsl.hansenet.de] has quit [Ping timeout: 265
seconds]
05:03 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
05:03 -!- mode/#go-nuts [+v iant] by ChanServ
05:04 -!- scm [justme@d039015.adsl.hansenet.de] has joined #go-nuts
05:11 -!- jessta [~jessta@home.nelix.id.au] has quit [Ping timeout: 252 seconds]
05:13 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has joined #go-nuts
05:16 -!- vegai [vegai@archlinux/developer/vegai] has left #go-nuts []
05:17 -!- jcao2191 [~Jimmy_Cao@12.238.42.2] has joined #go-nuts
05:17 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has quit [Disconnected by services]
05:17 -!- alc [~arx@222.128.141.231] has joined #go-nuts
05:33 -!- Xenith [~xenith@173-228-72-4.dsl.static.sonic.net] has joined #go-nuts
05:37 -!- glewis [~glewis@cpe-76-168-189-117.socal.res.rr.com] has joined #go-nuts
05:39 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit:
Morten.  Desu~]
05:40 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined
#go-nuts
05:42 < glewis> Given this: mymap := make(map[int] int); how do I iterate
over the key, value pairs sorted by value?  "for k, v := range mymap" is in random
order...  do I need to make another structure to sort it?
05:42 < Namegduf> Yes.
05:42 < Namegduf> Map entries are not in any particular order.
05:43 < glewis> Would this be a common idiom?  Would you recommend another
map or maybe a vector for this?
05:43 < jcao219> in python until verison 3 dicts aren't sorted either
05:44 < jcao219> it's common i guess
05:44 < glewis> in python, I can say mydict.sort(key=lambda k: k[1]) or
something like that
05:45 < jcao219> there's no builtin go equivalent i think
05:45 < Namegduf> If performance mattered at all, you would use another data
structure and not touch a map at all.
05:46 < Namegduf> You could range over the map, copy it into a vector,
perhaps, then sort it, if it doesn't.
05:46 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has quit [Ping timeout:
240 seconds]
05:47 < glewis> ok, thanks...  I'll look into the vector sorting
05:47 -!- mikespook [~mikespook@219.137.234.62] has joined #go-nuts
05:51 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
05:54 -!- sacho [~sacho@95-42-124-149.btc-net.bg] has quit [Ping timeout: 265
seconds]
06:03 -!- jcao2191 [~Jimmy_Cao@12.238.42.2] has joined #go-nuts
06:03 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has quit [Disconnected by services]
06:04 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
06:10 -!- glewis [~glewis@cpe-76-168-189-117.socal.res.rr.com] has quit [Quit:
glewis]
06:11 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has quit [Ping timeout: 265 seconds]
06:13 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
06:18 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
06:21 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
slashus2]
06:25 -!- Nick_B_ [ca318819@gateway/web/freenode/ip.202.49.136.25] has quit [Ping
timeout: 252 seconds]
06:29 -!- aho [~nya@fuld-4d00d37d.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
06:30 < homa_rano> hmm, if only I could key a map with a fixed-size array
06:31 -!- crazy2be [~justin@S0106001ac401d400.cg.shawcable.net] has left #go-nuts
[]
06:31 < rsaarelm> With value or reference semantics?
06:31 < rsaarelm> Value I guess.
06:32 < rsaarelm> You can always encode the array into a string and back.
06:32 < rsaarelm> (If you want to use references to anything, you can always
key maps with their uintptrs.)
06:47 -!- mafs [~maikeru@24-107-56-173.dhcp.stls.mo.charter.com] has joined
#go-nuts
06:47 -!- mafs [~maikeru@24-107-56-173.dhcp.stls.mo.charter.com] has quit
[Changing host]
06:47 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has joined #go-nuts
06:50 -!- sacho [~sacho@213.91.244.15] has joined #go-nuts
07:01 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 245 seconds]
07:03 -!- DJCapelis [~djc@blender/coder/DJCapelis] has quit [Ping timeout: 240
seconds]
07:04 -!- DJCapelis [~djc@capelis.dj] has joined #go-nuts
07:04 -!- DJCapelis [~djc@capelis.dj] has quit [Changing host]
07:04 -!- DJCapelis [~djc@blender/coder/DJCapelis] has joined #go-nuts
07:06 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
07:08 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has joined #go-nuts
07:18 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit:
Morten.  Desu~]
07:25 -!- leimy` [~user@h-68-166-215-82.sttnwaho.static.covad.net] has joined
#go-nuts
07:27 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has quit [Ping timeout: 260 seconds]
07:29 -!- leimy [~user@h-68-166-215-82.sttnwaho.static.covad.net] has quit [Ping
timeout: 246 seconds]
07:51 -!- photron [~photron@port-92-201-61-111.dynamic.qsc.de] has joined #go-nuts
07:54 -!- Fish-Work [~Fish@86.65.182.207] has quit [Ping timeout: 276 seconds]
07:56 -!- Fish-Work [~Fish@86.65.182.207] has joined #go-nuts
08:00 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
08:00 -!- alc [~arx@222.128.141.231] has quit [Ping timeout: 264 seconds]
08:00 -!- virtualsue [~chatzilla@nat/cisco/x-xtqjdgdijhrwcgab] has joined #go-nuts
08:02 -!- alc [~arx@222.128.141.231] has joined #go-nuts
08:02 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has joined #go-nuts
08:02 -!- ikaros [~ikaros@dslb-084-059-076-150.pools.arcor-ip.net] has joined
#go-nuts
08:08 -!- Xenith [~xenith@173-228-72-4.dsl.static.sonic.net] has quit [Ping
timeout: 265 seconds]
08:14 -!- ronnyy [~quassel@p4FF1CD48.dip.t-dialin.net] has joined #go-nuts
08:17 -!- boscop [~boscop@f055155183.adsl.alicedsl.de] has quit [Ping timeout: 265
seconds]
08:19 -!- boscop [~boscop@f055154125.adsl.alicedsl.de] has joined #go-nuts
08:20 -!- jcao2191 [~Jimmy_Cao@12.238.42.2] has joined #go-nuts
08:20 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has quit [Disconnected by services]
08:26 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts
08:37 -!- napsy [~luka@212.235.174.112] has quit [Quit: Lost terminal]
08:46 -!- kaktuspalme [~chatzilla@213.196.180.37] has joined #go-nuts
08:47 -!- jcao2191 [~Jimmy_Cao@12.238.42.2] has quit [Read error: Connection reset
by peer]
08:47 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has joined #go-nuts
08:57 -!- lmoura__ [~lauromour@187.112.0.55] has joined #go-nuts
08:57 -!- mikespook [~mikespook@219.137.234.62] has quit [Ping timeout: 248
seconds]
08:57 -!- lmoura_ [~lauromour@187.113.68.29] has quit [Ping timeout: 276 seconds]
09:03 -!- ikaros [~ikaros@dslb-084-059-076-150.pools.arcor-ip.net] has quit [Quit:
Leave the magic to Houdini]
09:04 -!- mikespook [~mikespook@219.137.234.62] has joined #go-nuts
09:06 -!- jcao2191 [~Jimmy_Cao@68.65.134.123] has joined #go-nuts
09:06 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has quit [Disconnected by services]
09:29 -!- Project_2501 [~Marvin@82.84.92.43] has joined #go-nuts
09:40 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts
09:41 -!- mikespook [~mikespook@219.137.234.62] has quit [Remote host closed the
connection]
09:43 -!- ronnyy [~quassel@p4FF1CD48.dip.t-dialin.net] has quit [Remote host
closed the connection]
09:56 -!- jcao2191 [~Jimmy_Cao@12.238.42.2] has joined #go-nuts
09:56 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has quit [Disconnected by services]
09:59 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has quit [Ping timeout:
240 seconds]
10:04 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has joined #go-nuts
10:04 -!- jcao219 [~Jimmy_Cao@12.238.42.2] has quit [Quit: Leaving.]
10:09 -!- nighty__ [~nighty@210.188.173.245] has quit [Remote host closed the
connection]
10:17 -!- lmoura__ [~lauromour@187.112.0.55] has quit [Read error: Connection
reset by peer]
10:18 -!- lmoura__ [~lauromour@187.59.247.194] has joined #go-nuts
10:21 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
10:21 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has joined #go-nuts
10:33 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
10:35 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Read error: Operation timed out]
10:38 -!- noch [d4494a1c@gateway/web/freenode/ip.212.73.74.28] has joined #go-nuts
10:44 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has quit [Quit: Leaving.]
10:57 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has joined #go-nuts
10:59 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
11:08 -!- KirkMcDonald [~Kirk@pysoy/developer/KirkMcDonald] has quit [Ping
timeout: 276 seconds]
11:10 -!- lmoura__ [~lauromour@187.59.247.194] has left #go-nuts []
11:11 -!- lmoura [~lauromour@187.59.247.194] has joined #go-nuts
11:18 < rickard2> how can you do something like (char)32 in C, which for
example would represent a space character, in go?
11:18 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has quit [Quit: Leaving.]
11:18 < rickard2> i need to replace a really wierd character, ascii 0x150
(336) in a string
11:19 < taruti> there is no ascii 0x150
11:19 < taruti> strings are utf-8
11:21 -!- diegoviola [~diego@190.23.52.64] has joined #go-nuts
11:22 < rickard2> well
11:22 < rickard2> I'm downloading a html document for parsing
11:22 -!- XenoPhoenix [xenophoeni@silenceisdefeat.com] has quit [Ping timeout: 276
seconds]
11:22 < rickard2> and there's a character in there which is displayed
incorrect
11:23 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has quit
[Read error: Connection reset by peer]
11:23 < rickard2> 54ï92
11:23 < rickard2> should be 54-92
11:23 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has
joined #go-nuts
11:23 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has quit
[Read error: Connection reset by peer]
11:23 < rickard2> but if I try to replace that character with
strings.Replace() the compiler says
11:23 < rickard2> lunchguiden.go:218: illegal UTF-8 sequence ef 22 2c
11:24 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has
joined #go-nuts
11:24 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has joined #go-nuts
11:24 -!- sacho [~sacho@213.91.244.15] has quit [Ping timeout: 240 seconds]
11:27 -!- KirkMcDonald [~Kirk@pysoy/developer/KirkMcDonald] has joined #go-nuts
11:27 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has joined #go-nuts
11:28 -!- yuriy_ [~yuriy@213.243.93.194] has joined #go-nuts
11:28 < nbjoerg> fun.  so I hunted down issues with my lock/note
implementation to find that the usage in proc.c has race conditions...
11:31 -!- yuriy_ [~yuriy@213.243.93.194] has left #go-nuts []
11:31 -!- youROCK [~yuriy@213.243.93.194] has joined #go-nuts
11:31 -!- m0mchil [~Miranda@79.124.62.82] has joined #go-nuts
11:36 < youROCK> Hello
11:36 < youROCK> pastebin.com does not yet support Go syntax highlight :(.
Do you know any analogues that do?
11:36 < diegoviola> what kind of paradigm is Go? functional, procedural, OO?
11:36 < youROCK> stock go :)
11:37 < diegoviola> i currently know Ruby and while it's a great language,
I'd like to learn another language, maybe a different paradigm other than OO
11:38 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has quit
[Read error: Connection reset by peer]
11:38 < diegoviola> can't decide which one yet
11:38 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has
joined #go-nuts
11:39 -!- artefon [~thiago@189.107.155.106] has joined #go-nuts
11:39 < nbjoerg> diegoviola: procedural with type interference
11:39 < youROCK> diegoviola, Go is object-oriented without objects
themselves, IMHO :)
11:39 < diegoviola> nice
11:40 -!- kvarley [~vitium@unaffiliated/kvarley] has joined #go-nuts
11:40 < diegoviola> I like Ruby and I learned OO with it, but I'd like to
try something else where I could write simple procedural or functional and use OO
just if I need it to.
11:40 < youROCK> By the way, I do not fully understand why http package does
not yet handle multipart/form-data
11:40 < diegoviola> and not OO for everything
11:41 < youROCK> I have written the implementation that parses
multipart/form-data (without files) in an hour...
11:41 < diegoviola> something "ligther" maybe
11:41 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
11:42 < nbjoerg> youROCK: because noone cared so far?
11:42 -!- jessta [~jessta@124-168-116-223.dyn.iinet.net.au] has joined #go-nuts
11:42 < youROCK> nbjoerg: why did developers write mime/multipart then?
11:42 < nbjoerg> to parse the inbox :)
11:43 -!- mimustafa [~steve@92.62.125.249] has joined #go-nuts
11:46 < youROCK> I wonder if anyone experienced problems with performance of
UTF-8 under Linux i386?
11:47 -!- mimustafa [~steve@92.62.125.249] has left #go-nuts []
11:48 -!- alc [~arx@222.128.141.231] has quit [Ping timeout: 252 seconds]
11:49 < youROCK> essentially the same operations of decoding the URL-encoded
string take about 5 times less than in pure PHP implementation on Linux i386 (the
difference is about 20 times under my 64-bit Mac OS X...)
11:49 < nbjoerg> sounds like you are doing something suboptimal...
11:50 -!- Simon_Wang [~linfves@111.167.217.94] has joined #go-nuts
11:50 < nbjoerg> like forcing malloc per byte or so
11:50 < MaybeSo> youROCK: are you iterating through byte sequences or
attempting to implement the decoder using higher level stuff like the suboptimal
regex package?
11:50 < youROCK> I always allocate big chunks of data
11:51 < youROCK> MaybeSo: I'm iterating through byte sequences
11:51 -!- kvarley [~vitium@unaffiliated/kvarley] has left #go-nuts []
11:53 < youROCK> The problem is that the standard http.parseQuery() also
does it slowly!
11:53 < taruti> write a faster implementation ;)
11:54 < MaybeSo> So how large a query string are you parsing and how long is
it taking compared to your PHP version?
11:54 < youROCK> actually I'm preprocessing the url-encoded string,
replacing %uXXXX to a number of %XX, that parseQuery() understands, and then I use
parseQuery()
11:54 < youROCK> I have tried a lot of sizes, it is about 5 times slower on
strings about 100k
11:55 < MaybeSo> and you're finding both steps are taking longer than you'd
expect?
11:55 < youROCK> (e.g.  0.01 sec vs.  0.05 sec)
11:55 < youROCK> Yes, both steps take much longer time that I expect from Go
11:56 -!- jcao219 [~Jimmy_Cao@68.65.134.123] has quit [Ping timeout: 240 seconds]
11:56 < taruti> are using a Buffer instead of catenating strings?
11:56 < youROCK> new_buf_sz := bytes.Count(buf,
[]byte("%u"))*(utf8.UTFMax*3-6) + len(buf)
11:56 < youROCK> reescaped_buf := make([]byte, new_buf_sz)
11:56 < youROCK> That is what I use to allocate the re-escaped string
11:58 < youROCK> To be short, I first allocate the []byte buffer enough to
contain the re-encoded string, and then write there without string catenation at
all
11:59 -!- sacho [~sacho@213.91.244.15] has joined #go-nuts
12:02 < youROCK> Also, linker works not very fast on i386 Linux also
12:02 < MaybeSo> well, all I can say is that I haven't found Go to
noticeably slow for dealing with bytes and strings, but I haven't been sitting
down and running comparisions against other languages.  If you want to post some
code to http://paste.pocoo.org/ or something people might be able to spot changes
you could make to speed things up
12:03 < MaybeSo> I notice that the urlUnescape function called by
http.ParseQuery does walk through the string twice
12:03 < MaybeSo> s/does/can/
12:04 < youROCK> It just unescapes key first and value second...
12:05 < youROCK> key, e = URLUnescape(kvPair[0])
12:05 < youROCK> if e == nil && len(kvPair) > 1 {
12:05 < youROCK> value, e = URLUnescape(kvPair[1])
12:05 < youROCK> }
12:07 < MaybeSo> I'm talking about urlUnescape, which URLUnescape is
basically a wrapper function for
12:07 < MaybeSo> it walks through the string and counts the number of % it
sees, and checks that its valid hexadecimal, then it walks through again and
actually performs the decoding
12:08 < youROCK> Yes, I would be surprised if it did this in some other way
:)
12:08 < MaybeSo> often implementations will walk through *once* and perform
checking and conversion in the same loop
12:09 < youROCK> Still, urlUnescape does not support %uXXXX format, which is
produced by javascript escape() function
12:10 < youROCK> You should also say, that bytes.split() walks through a
string
12:10 < youROCK> And split() is used at least twice
12:10 < MaybeSo> btw, you mention .05 seconds earlier -- how much data are
you talking about which takes that amount of time to run?  and are you actually
timing a portition of the code or is that from running time(1) on your executable
?
12:11 < youROCK> MaybeSo: 0.05 sec is for about 50Kb
12:12 < youROCK> And, yes, it is O(n)
12:12 < youROCK> I am using time.Nanoseconds() to measure time
12:13 < youROCK> On my machine (Mac OS X 64bit) it takes about 0.05 sec for
processing 250Kb
12:13 < youROCK> the same program, and processor is about 2 times faster
12:18 -!- Simon_Wang [~linfves@111.167.217.94] has quit [Quit: Leaving]
12:20 < youROCK> Ok, I will suppose that this happens because i386 compiler
does not have optimizations (which is clearly said in the documentation to 8g)
12:22 < MaybeSo> Hrm.  A little test I ran shows it takes my mac about .021
seconds to parse a 50 K XML file (w/o needing to do a lot of fancy decoding)
during which time it fires off about 500 messages to a channel which runs a file
stat operation
12:22 < MaybeSo> so yeah, I guess I'd be surprised at 0.05 seconds to decode
a string
12:23 < MaybeSo> (I'm using the amd64 compiler)
12:24 -!- atsampson [~ats@212.183.140.34] has quit [Ping timeout: 240 seconds]
12:25 < MaybeSo> anyway, the folks on the gonuts list are usually happy to
look at small code samples and tell you if they think it can be sped up, or if
there is indeed a problem in certain areas of the optimizer
12:25 < MaybeSo> good luck
12:26 -!- atsampson [~ats@212.183.140.102] has joined #go-nuts
12:27 < youROCK> The thing is that the problem with performance arises only
on i386 arch
12:27 < youROCK> For which no optimizer is present
12:28 < youROCK> Thanks anyway
12:34 -!- visof [~visof@unaffiliated/visof] has quit [Quit: Leaving]
12:35 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts
12:43 -!- napsy [~luka@212.235.174.112] has quit [Read error: Operation timed out]
12:50 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
#go-nuts
12:51 -!- visof [~visof@unaffiliated/visof] has quit [Read error: Connection reset
by peer]
12:52 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts
12:53 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
12:54 -!- bjarneh [~bjarneh@1x-193-157-196-202.uio.no] has joined #go-nuts
13:02 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
13:03 -!- wrtp [~rog@92.17.10.249] has joined #go-nuts
13:07 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has quit [Quit: Shyde]
13:26 -!- scm [justme@d039015.adsl.hansenet.de] has quit [Ping timeout: 265
seconds]
13:27 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit:
Leaving.]
13:27 -!- aho [~nya@fuld-4d00d2a3.pool.mediaWays.net] has joined #go-nuts
13:27 -!- scm [justme@c132036.adsl.hansenet.de] has joined #go-nuts
13:35 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 252
seconds]
13:40 -!- wrtp [~rog@92.17.10.249] has quit [Ping timeout: 276 seconds]
13:40 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
13:42 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has quit [Ping timeout:
240 seconds]
13:44 -!- XenoPhoenix [xenophoeni@silenceisdefeat.com] has joined #go-nuts
13:46 -!- wrtp [~rog@92.17.10.249] has joined #go-nuts
13:46 -!- XenoPhoenix [xenophoeni@silenceisdefeat.com] has quit [Client Quit]
13:46 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
13:46 -!- XenoPhoenix [xenophoeni@silenceisdefeat.com] has joined #go-nuts
13:46 -!- XenoPhoenix [xenophoeni@silenceisdefeat.com] has quit [Client Quit]
13:47 -!- XenoPhoenix [xenophoeni@silenceisdefeat.com] has joined #go-nuts
13:48 -!- iant [~iant@66.109.103.22] has joined #go-nuts
13:48 -!- mode/#go-nuts [+v iant] by ChanServ
13:51 -!- femtoo [~femto@95-89-198-154-dynip.superkabel.de] has joined #go-nuts
13:54 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has joined #go-nuts
14:00 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has quit [Ping timeout:
240 seconds]
14:01 -!- welterde [~welterde@not.welterde.de] has quit [Ping timeout: 252
seconds]
14:08 -!- navigator [~navigator@p54897A25.dip.t-dialin.net] has quit [Ping
timeout: 255 seconds]
14:09 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
14:09 < plexdev> http://is.gd/eniFm by [Russ Cox] in go/src/cmd/cgo/ -- cgo:
fix build: use $GCC, not $CC
14:13 -!- m0mchil [~Miranda@79.124.62.82] has left #go-nuts []
14:15 -!- welterde [~welterde@not.welterde.de] has joined #go-nuts
14:15 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined
#go-nuts
14:16 -!- youROCK [~yuriy@213.243.93.194] has quit [Quit: youROCK]
14:20 -!- TR2N [email@89.180.198.16] has quit [Quit: Time left until the
Epochalypse: 27yrs 21wks 6days 18hrs 52mins 7secs]
14:23 -!- visof [~visof@unaffiliated/visof] has quit [Remote host closed the
connection]
14:25 -!- jcao219 [~Jimmy_Cao@pool-173-71-1-120.dllstx.fios.verizon.net] has
joined #go-nuts
14:25 -!- Project_2501 [~Marvin@82.84.92.43] has quit [Quit: E se abbasso questa
leva che succ...]
14:26 < plexdev> http://is.gd/enjNo by [Russ Cox] in 137 subdirs of go/ --
build: no required environment variables
14:26 < plexdev> http://is.gd/enjNu by [Russ Cox] in go/src/ -- run.bash:
fix freebsd build (i hope)
14:26 -!- YazzY [~yazzy@unaffiliated/yazzy] has joined #go-nuts
14:28 -!- jcao219 [~Jimmy_Cao@pool-173-71-1-120.dllstx.fios.verizon.net] has quit
[Read error: Connection reset by peer]
14:31 -!- jcao219 [~Jimmy_Cao@pool-173-71-1-120.dllstx.fios.verizon.net] has
joined #go-nuts
14:33 < YazzY> is there any book about programming go?
14:33 -!- jcao219 [~Jimmy_Cao@pool-173-71-1-120.dllstx.fios.verizon.net] has quit
[Read error: Connection reset by peer]
14:34 < YazzY> oh, i found one on amazon, sweet
14:34 -!- jcao219 [~Jimmy_Cao@pool-173-71-1-120.dllstx.fios.verizon.net] has
joined #go-nuts
14:36 -!- artefon [~thiago@189.107.155.106] has quit [Quit: bye]
14:46 < MizardX> YazzY: You could always print the tutorial and "Effective
Go" from the website.  :)
14:46 < exch> hmm.  the strings package has some confusion overlapping
functions.  'ToTitle() and ToUpper()' give the same result, but 'Title()' is
different.
14:46 < exch> *confusing
14:46 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
14:47 -!- jcao219 [~Jimmy_Cao@pool-173-71-1-120.dllstx.fios.verizon.net] has quit
[Quit: Leaving.]
14:47 <+iant> Unicode has this concept of "title" case
14:47 <+iant> In English there is no distinction between upper case and
title case
14:47 <+iant> in Greek, there is
14:48 < exch> isn't that what the ToUpperSpecial and friends are for?
14:49 <+iant> No, that is for cases like Turkish which have special rules
for converting from lower to upper case
14:49 < bartbes> hehe
14:49 < exch> doh
14:50 < bartbes> languages are easy, aren't they?  :P
14:50 < exch> gotta love natural languages -.-
14:50 < bartbes> let's all speak esperanto then
14:50 <+iant> yeah, these functions are reflecting the underlying complexity
of Unicode
14:51 < exch> If we're all going to speak a single world language, i'd go
for either lojban or binary :) At leats with binary there is little room for
confusion
14:51 <+iant> big or little endian?
14:51 < exch> oh bugger :p
14:52 < skelterjohn> our words need not be separated into bytes
14:52 < skelterjohn> and binary is an alphabet, not a language
14:54 -!- wrtp [~rog@92.17.10.249] has quit [Ping timeout: 252 seconds]
14:57 -!- iant [~iant@66.109.103.22] has quit [Quit: Leaving.]
14:58 < plexdev> http://is.gd/enm4E by [Luuk van Dijk] in 2 subdirs of
go/src/cmd/ -- Dwarf output for 6l.
14:58 -!- DerHorst [~Horst@e176102175.adsl.alicedsl.de] has joined #go-nuts
14:59 -!- diegoviola [~diego@190.23.52.64] has quit [Ping timeout: 258 seconds]
15:00 -!- wrtp [~rog@92.17.10.249] has joined #go-nuts
15:05 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
15:09 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Quit: derferman]
15:15 -!- iant [~iant@216.239.45.19] has joined #go-nuts
15:15 -!- mode/#go-nuts [+v iant] by ChanServ
15:15 -!- Venom_X [~pjacobs@74.61.90.217] has joined #go-nuts
15:17 -!- prudhvi [~nobody@nullpointer.in] has joined #go-nuts
15:21 -!- iant [~iant@216.239.45.19] has quit [Ping timeout: 276 seconds]
15:23 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has joined #go-nuts
15:23 -!- kaktuspalme [~chatzilla@213.196.180.37] has quit [Quit: ChatZilla 0.9.86
[Firefox 3.6.8/20100722155716]]
15:26 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has quit
[Quit: slackstation]
15:27 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
15:29 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has quit [Ping timeout:
265 seconds]
15:29 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has
joined #go-nuts
15:32 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts
15:34 -!- tvw [~tv@e176005216.adsl.alicedsl.de] has joined #go-nuts
15:37 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving]
15:39 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
15:40 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
15:41 -!- iant [~iant@nat/google/x-lsxosbwbgqchkknq] has joined #go-nuts
15:41 -!- mode/#go-nuts [+v iant] by ChanServ
15:44 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds]
15:45 -!- leimy` [~user@h-68-166-215-82.sttnwaho.static.covad.net] has left
#go-nuts []
15:46 -!- leimy [~user@h-68-166-215-82.sttnwaho.static.covad.net] has joined
#go-nuts
15:47 -!- femtoo [~femto@95-89-198-154-dynip.superkabel.de] has quit [Quit:
Leaving]
15:48 -!- ikaros [~ikaros@dslb-084-059-076-150.pools.arcor-ip.net] has joined
#go-nuts
15:52 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts
16:02 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
16:04 -!- nickaugust [~nick@li181-40.members.linode.com] has quit [Quit: WeeChat
0.2.6]
16:04 -!- Venom_X [~pjacobs@74.61.90.217] has quit [Quit: Venom_X]
16:13 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
16:14 -!- tvw [~tv@e176005216.adsl.alicedsl.de] has quit [Remote host closed the
connection]
16:14 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
16:15 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
16:18 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
16:20 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:23 -!- Venom_X [~pjacobs@adsl-99-20-147-171.dsl.aus2tx.sbcglobal.net] has
joined #go-nuts
16:30 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts
16:31 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Disconnected by
services]
16:31 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts
16:35 < leimy> oh
16:36 -!- leczb [~leczb@nat/google/x-vjjzlxmzjmnmfpie] has joined #go-nuts
16:37 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Quit: derferman]
16:38 -!- bjarneh [~bjarneh@1x-193-157-196-202.uio.no] has quit [Ping timeout: 240
seconds]
16:39 < wrtp> leimy: oh?
16:39 < leimy> Oh I was in the wrong screen when I typed "oh".  I need focus
follows eye.
16:41 < wrtp> oh
16:41 < wrtp> :-)
16:41 < skelterjohn> huh.  that's actually a conceivable piece of software
that would be crazy useful
16:42 -!- dho [~devon@onager.omniti.com] has left #go-nuts []
16:42 -!- dho [~devon@onager.omniti.com] has joined #go-nuts
16:42 < dho> hm
16:42 < dho> stupid.
16:42 < skelterjohn> i hear that dho is a beiber fan
16:42 < dho> I would love to have that software
16:42 < skelterjohn> bieber
16:42 < dho> haha
16:42 < exch> or crazy annoying if you are like me and look at 6 things
simultaneously while doingsomething else :p
16:43 < dho> i'm pretty sure they already have eye tracking "mice"
16:43 < skelterjohn> maybe a keyboard shortcut to eye-grab focus
16:43 < dho> plus sloppy focus
16:43 -!- sacho [~sacho@213.91.244.15] has quit [Remote host closed the
connection]
16:44 < skelterjohn> it could also not change focus while you're typing
16:44 < skelterjohn> require a second or so of no activity to change
16:44 < skelterjohn> so if you're, for instance, copying on window into
another
16:44 < skelterjohn> or reading documentation while coding, etc
16:44 < skelterjohn> it could handle it
16:44 < skelterjohn> in any case, i feel like any kinks could be worked out
16:44 < skelterjohn> someone go do it
16:45 < dho> http://www.naturalpoint.com/
16:46 < skelterjohn> i feel like they're overdoing it
16:46 < dho> i wonder if it works with multiple monitors
16:46 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
16:46 < skelterjohn> my mac already has a camera
16:46 < skelterjohn> and windows that you type into are pretty big - don't
need a lot of accuracy to pick out the right one
16:46 < dho> my desktop at work where i don't have a camera
16:46 < skelterjohn> you're out, then
16:47 < skelterjohn> stone age
16:47 < skelterjohn> luddite
16:47 < dho> find me a laptop with >8gb ram and >4 cores
16:47 < dho> and more screen space
16:47 < dho> :P
16:47 < dho> i do need to perf test code at work
16:48 < skelterjohn> thin clients, my friend.  thin clients
16:49 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
16:49 < dho> not horribly useful when I have 10 other colleagues trying to
do the same thing.
16:49 < exch> are you calling my client fat??  :p
16:50 < skelterjohn> i'm not saying through out that desktop
16:50 < skelterjohn> i'm saying get rid of its monitor and replace it with a
laptop :)
16:51 < dho> there are 2
16:51 < skelterjohn> get rid of the two monitors
16:51 < dho> I like having 3840x1080 of space
16:52 < skelterjohn> i'm being contrary, forgive me =p
16:52 < dho> much more productive
16:52 < dho> I have nothing better to do so I'm arguing back :)
16:52 < dho> well, that's false, but I need to talk to a coworker who is at
lunch
16:52 < skelterjohn> yeah in my lab here there is a nice 4 core machine with
8gb of ram and 2 monitors
16:52 < skelterjohn> nice to have terminals on one monitor, code on another
16:53 < dho> yeah.
16:53 < skelterjohn> actually i find that i don't need that much screen
space to be happy when writing go code, unlike java
16:54 < skelterjohn> i've only ever written go code on my 12" laptop
16:54 < dho> ah.  I find it insanely useful for my PHP code
16:54 < dho> I haven't written any Go (or under the hood) in some months now
16:54 < homa_rano> I've only ever written go code on my 9" netbook
16:55 < skelterjohn> "(or under the hood)"?
16:55 < dho> yes, like porting the runtime to more plac
16:55 < dho> es
16:55 < dho> I also keep forgetting to update the freebsd ports port heh
16:55 -!- Venom_X [~pjacobs@adsl-99-20-147-171.dsl.aus2tx.sbcglobal.net] has quit
[Quit: Venom_X]
16:59 -!- ampleyfly [~ampleyfly@h-149-143.A163.priv.bahnhof.se] has quit [Quit:
leaving]
17:00 -!- virtualsue [~chatzilla@nat/cisco/x-xtqjdgdijhrwcgab] has quit [Ping
timeout: 265 seconds]
17:01 -!- aho [~nya@fuld-4d00d2a3.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
17:03 -!- youROCK [~yuriy@81.5.98.187] has joined #go-nuts
17:04 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
17:05 -!- carllerche [~carllerch@99.13.242.166] has joined #go-nuts
17:05 -!- Project_2501 [~Marvin@82.84.92.43] has joined #go-nuts
17:05 -!- youROCK [~yuriy@81.5.98.187] has left #go-nuts []
17:06 -!- youROCK1 [~yuriy@81.5.98.187] has joined #go-nuts
17:07 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
17:13 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit:
Morten.  Desu~]
17:16 -!- Agon-laptop
[~marcel@HSI-KBW-095-208-003-128.hsi5.kabel-badenwuerttemberg.de] has joined
#go-nuts
17:18 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
17:20 < drhodes> has anyone gotten Tianyi's cgo patch (
http://groups.google.com/group/golang-nuts/browse_thread/thread/23e02ccf9d0c17f5 )
to apply?
17:21 < drhodes> the mailing list formatting seems to have mangled newlines.
I've given a go at demangling the new line breaks in the diff, but ran out of
bandaids for my eyeballs.
17:22 -!- carllerche [~carllerch@99.13.242.166] has quit [Quit: carllerche]
17:29 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
17:31 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
17:34 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Quit:
Updating Textual - http://www.codeux.com/textual/]
17:35 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
17:35 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Excess
Flood]
17:36 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
17:36 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Excess
Flood]
17:36 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
17:36 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Excess
Flood]
17:37 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
17:41 -!- sacho [~sacho@95-42-124-149.btc-net.bg] has joined #go-nuts
17:41 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
17:47 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined
#go-nuts
17:49 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 258 seconds]
17:50 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has quit
[Client Quit]
17:52 -!- Xenith [~xenith@173-228-72-4.dsl.static.sonic.net] has joined #go-nuts
17:58 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined
#go-nuts
18:00 -!- belkiss [~belkiss@drn13-1-78-235-168-105.fbx.proxad.net] has joined
#go-nuts
18:01 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
18:03 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
18:05 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit:
Leaving]
18:07 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Quit: Leaving]
18:08 < YazzY> ad
18:12 -!- jcao219 [~jcao219@pool-173-71-1-120.dllstx.fios.verizon.net] has joined
#go-nuts
18:23 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has joined #go-nuts
18:35 < dho> wow YazzY exists
18:35 < dho> skelterjohn: apparently there are a couple projects to do this
18:36 < dho> skelterjohn: i know squat about image recognition though so i
have no clue how one would do it to manipulate a mouse pointer
18:43 -!- Agon-laptop
[~marcel@HSI-KBW-095-208-003-128.hsi5.kabel-badenwuerttemberg.de] has quit [Remote
host closed the connection]
18:48 < nbjoerg> \o/
18:48 < nbjoerg> with only one hack, the normal regression tests pass
18:50 -!- Xenith [~xenith@173-228-72-4.dsl.static.sonic.net] has quit [Ping
timeout: 260 seconds]
18:54 -!- youROCK1 [~yuriy@81.5.98.187] has quit [Quit: youROCK1]
18:55 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
18:56 -!- jcao2191 [~Jimmy_Cao@pool-173-71-1-120.dllstx.fios.verizon.net] has
joined #go-nuts
18:56 -!- jcao219 [~jcao219@pool-173-71-1-120.dllstx.fios.verizon.net] has quit
[Disconnected by services]
18:56 -!- jcao219 [~jcao219@pool-173-71-1-120.dllstx.fios.verizon.net] has joined
#go-nuts
18:56 -!- jcao2191 [~Jimmy_Cao@pool-173-71-1-120.dllstx.fios.verizon.net] has quit
[Client Quit]
18:56 < nbjoerg> what's a good name for low-level stuff shared between
freebsd and darwin?
18:56 -!- jcao219 [~jcao219@pool-173-71-1-120.dllstx.fios.verizon.net] has quit
[Read error: Connection reset by peer]
18:57 < nbjoerg> but which doesn't apply to NetBSD and OpenBSD
18:58 -!- jcao219 [~jcao219@pool-173-71-1-120.dllstx.fios.verizon.net] has joined
#go-nuts
19:02 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 265 seconds]
19:07 -!- DerHorst [~Horst@e176102175.adsl.alicedsl.de] has quit [Remote host
closed the connection]
19:10 < wrtp> nbjoerg: freebsd and darwin (copy and paste) :-)
19:10 < nbjoerg> I would prefer to avoid C&P
19:10 < nbjoerg> C&P of non-trivial functions is evil
19:13 < bartbes> don't you dare create identical functions when they are 1
line!
19:32 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has quit
[Excess Flood]
19:33 -!- Altercation [~Altercati@ogygia.ethanschoonover.com] has joined #go-nuts
19:33 -!- Altercation [~Altercati@ogygia.ethanschoonover.com] has quit [Changing
host]
19:33 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has joined
#go-nuts
19:37 -!- Eridius [~kevin@69.170.160.74] has joined #go-nuts
19:37 -!- Eridius [~kevin@69.170.160.74] has quit [Changing host]
19:37 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:40 -!- wrtp [~rog@92.17.10.249] has quit [Ping timeout: 265 seconds]
19:45 -!- wrtp [~rog@92.17.10.249] has joined #go-nuts
19:48 -!- belkiss [~belkiss@drn13-1-78-235-168-105.fbx.proxad.net] has quit [Quit:
KVIrc Equilibrium 4.1.1, revision: 4892, sources date: 20100810, built on:
2010-08-18 11:44:21 UTC http://www.kvirc.net/]
19:48 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Quit: brb graphics
update]
19:53 -!- artefon [~thiagon@150.164.2.20] has quit [Ping timeout: 276 seconds]
19:53 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
19:54 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:56 -!- Venom_X [~pjacobs@adsl-99-20-147-171.dsl.aus2tx.sbcglobal.net] has
joined #go-nuts
19:58 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts
20:03 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
20:03 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
20:12 < falconindy> drhodes: did you ever get the patch to apply?
20:12 < dho> nbjoerg: ohello
20:13 < nbjoerg> hi devon
20:13 * dho did the fbsd port ;)
20:13 < drhodes> falconindy: nope, sorry.
20:13 * dho reads up
20:13 < falconindy> drhodes: ive got it working if you'd like me to mail it
to you as an attachment
20:13 < dho> nbjoerg: what stuff specifically?  I don't like how os/syscall
was done to merge the syscall stuff for bsds personally
20:14 < drhodes> cool, that's be great, can I PM you?
20:14 < falconindy> drhodes: certainly
20:14 < nbjoerg> dho: the sysctl name2mib stuff
20:14 < dho> and for pkg/runtime, there shouldn't be shared stuff anyway
20:14 < nbjoerg> some parts are currently shared
20:15 < nbjoerg> I plan to work on a smarter syscall builder before
submitting my port
20:15 < nbjoerg> that should kill quite a bit of the manual code
20:15 < nbjoerg> dho: can you try my patch for v6only btw?
20:15 < nbjoerg> dho: it's in the issue tracker
20:16 < dho> generic patch or is it bsd-specific because atm I only have
Linux because my go build box that I"ve been meaning to set up for like 5 months
still doesn't have the hard drives i bought put in it
20:17 < nbjoerg> generic patch
20:17 < dho> ok
20:18 < dho> my suggestion is to not do the smarter syscall builder before
submitting the port
20:18 < dho> make that a separate CL
20:18 < nbjoerg> it would also mean less depending on the "shard" stuff :)
20:18 < dho> yeah
20:18 < dho> but russ / rob are less likely to want to pull that in
20:18 < nbjoerg> and I have a more involved code to build the sysnum table
already
20:18 < dho> i was initially planning on doing that
20:19 < nbjoerg> so it doesn't matter too mcuh
20:19 < dho> but was suggested to do it separately
20:19 < dho> and then i hit enotime
20:21 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving]
20:23 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
20:24 -!- Project_2501 [~Marvin@82.84.92.43] has quit [Quit: E se abbasso questa
leva che succ...]
20:28 -!- lmoura [~lauromour@187.59.247.194] has quit [Ping timeout: 245 seconds]
20:28 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
615 seconds]
20:29 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Ping timeout: 265
seconds]
20:36 -!- vorotemn [~quassel@c-5a89e555.020-59-6c6b7013.cust.bredbandsbolaget.se]
has joined #go-nuts
20:36 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
20:40 -!- vorotemn [~quassel@c-5a89e555.020-59-6c6b7013.cust.bredbandsbolaget.se]
has quit [Remote host closed the connection]
20:48 -!- Nick_B_ [ca318819@gateway/web/freenode/ip.202.49.136.25] has joined
#go-nuts
20:56 -!- artefon [~thiago@189.107.155.106] has joined #go-nuts
20:56 -!- DJCapeli1 [~djc@capelis.dj] has joined #go-nuts
20:56 -!- DJCapeli1 [~djc@capelis.dj] has quit [Changing host]
20:56 -!- DJCapeli1 [~djc@blender/coder/DJCapelis] has joined #go-nuts
20:56 -!- buffi_ [~buffi@94-247-169-107-static.serverhotell.net] has joined
#go-nuts
20:56 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit []
20:56 -!- cco3-hampster [~conleyo@nat/google/x-pwnzzqhlwnxqsaed] has quit [Read
error: Operation timed out]
20:56 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Read error: Operation
timed out]
20:56 -!- GoBIR [~gobir@DHCP-159-138.caltech.edu] has quit [Ping timeout: 252
seconds]
20:56 -!- htoothrot [~mux@71-8-117-228.dhcp.ftwo.tx.charter.com] has quit [Ping
timeout: 252 seconds]
20:56 -!- buffi [~buffi@94-247-169-107-static.serverhotell.net] has quit [Read
error: Operation timed out]
20:56 -!- DJCapelis [~djc@blender/coder/DJCapelis] has quit [Read error: Operation
timed out]
20:56 -!- welterde [~welterde@not.welterde.de] has quit [Ping timeout: 252
seconds]
20:56 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
20:57 -!- GoBIR [~gobir@DHCP-159-138.caltech.edu] has joined #go-nuts
20:58 -!- htoothrot [~mux@71-8-117-228.dhcp.ftwo.tx.charter.com] has joined
#go-nuts
20:59 -!- cco3-hampster [~conleyo@nat/google/x-rdbjilbtnxalowwm] has joined
#go-nuts
21:00 -!- yiyus [~124271242@67.202.106.57] has joined #go-nuts
21:06 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
21:07 -!- leimy [~user@h-68-166-215-82.sttnwaho.static.covad.net] has left
#go-nuts ["ERC Version 5.3 (IRC client for Emacs)"]
21:08 -!- wrtp [~rog@92.17.10.249] has quit [Quit: wrtp]
21:09 -!- welterde [~welterde@not.welterde.de] has joined #go-nuts
21:19 -!- rusua [~Ru@88.103.71.96] has joined #go-nuts
21:22 -!- lmoura [~lauromour@187.59.247.194] has joined #go-nuts
21:27 -!- nickaugust [~nick@li181-40.members.linode.com] has joined #go-nuts
21:33 -!- rusua [~Ru@88.103.71.96] has quit [Quit: rusua]
21:41 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche]
21:50 -!- Xenith [~xenith@173-228-72-4.dsl.static.sonic.net] has joined #go-nuts
22:02 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 258 seconds]
22:02 -!- allengeorge [~allengeor@74.12.150.7] has quit [Ping timeout: 258
seconds]
22:04 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts
22:05 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
22:07 < nickaugust> when i do a &T{} does that return a pointer?
22:08 < exch> yes
22:09 < Namegduf> The & is an "address-of" operator.
22:09 < Namegduf> So yeah.
22:11 < nickaugust> so suppose t := &T{} but then i call tree.Insert(*t) to
put in in my index tree ...  then when i pull it out it looks like this:
(0xb76307a0,0xb739d690)
22:11 < nickaugust> is that (0xb76307a0,0xb739d690) the pointer?
22:11 < Namegduf> No.
22:11 < Namegduf> * is the dereferencing operator.
22:11 < Namegduf> You're getting the value of what the pointer points at.
22:12 < nickaugust> so its the object itself
22:12 < Namegduf> Yes.
22:12 < nickaugust> yeah thats what i thought..  ok something else is
buggered then...
22:13 < jessta> that depends on what tree.Insert() takes
22:13 < jessta> and how you pull it out again
22:14 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
22:15 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
22:21 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
22:21 -!- ikaros [~ikaros@dslb-084-059-076-150.pools.arcor-ip.net] has quit [Quit:
Leave the magic to Houdini]
22:22 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
22:24 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:33 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
22:33 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:36 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 240 seconds]
22:37 < nbjoerg> stupid question, is there a short cut for "6g foo.go && 6l
foo.6"?
22:37 < exch> yes, make
22:37 < exch> :)
22:38 < nbjoerg> without having to write a makefile
22:38 < exch> in that case, nope
22:38 < nbjoerg> like cc foo.c does
22:39 < exch> you could make a shell alias
22:39 < nbjoerg> yeah
22:43 < nickaugust> i have shell script i run that compiles links and then
runs the program im working on...  saves some typing
22:44 < exch> that's what makefiles are for :)
22:47 -!- tsykoduk [~tsykoduk@c-71-231-155-70.hsd1.wa.comcast.net] has quit [Ping
timeout: 240 seconds]
22:48 < KirkMcDonald> The first Go program I wrote was basically just that.
22:48 < KirkMcDonald> I called it "go".
22:49 < Namegduf> I wish Go considered # as a comment.
22:50 < Namegduf> So I could write a short shell script to build and run a
go program, and include a shebang line at the top.
22:50 < KirkMcDonald> Namegduf: You want a shbang line?
22:50 < Namegduf> Yep.
22:50 < KirkMcDonald> D supports this, heh.
22:50 < nickaugust> what is that shbang for anyway?
22:50 < KirkMcDonald> dmd has a -run flag for this express purpose.
22:50 -!- tsykoduk [~tsykoduk@184.78.195.79] has joined #go-nuts
22:50 < KirkMcDonald> #!/usr/local/bin/dmd -run
22:50 < KirkMcDonald> Or whatever.
22:50 < Namegduf> "/usr/local" in a shebang line is the least portable thing
ever
22:51 < Namegduf> But yes.
22:51 < KirkMcDonald> Sadly, "#!/usr/bin/env dmd -run" won't work
everywhere.
22:51 < Namegduf> nickaugust: It tells the kernel that the file in question
is not actually an executable, but a script to be fed to the program in question.
22:51 < exch> nickaugust: the first line of a file is checkec for something
like that line.  It determines filetype and allows you just 'run' the script.  the
path in that line tells the shell which program to execute and pass the textfile
as a parameter
22:52 < exch> :p
22:52 < Namegduf> I don't believe the shell is responsible for that, but
yes.
22:52 < KirkMcDonald> Indeed, I'm pretty sure this is the domain of the
kernel.
22:52 < exch> oh well.  the result is the same :)
22:52 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
22:53 < Namegduf> I need 6prof working, I need to decide whether I should
switch to mutexes or not.
22:53 < nickaugust> hmm i never put shbangs in mine..  i just chmod +x and
they run...  although i dont do anything complicated
22:53 < Namegduf> Amongst other things.
22:54 < KirkMcDonald> nickaugust: In your what?  Shell scripts?
22:54 * Namegduf knows stuff is unoptimised, needs to know where is in the
greatest need of attention.
22:54 < KirkMcDonald> nickaugust: Interpreting the file as a shell script is
the default, if there is no shbang line.
22:54 < yiyus> tcc suppots shebangs in c files too
22:54 < KirkMcDonald> Which leads to amusing results if you (say) forget the
shbang line in your Python script.
22:54 < yiyus> you could write a script anyway, just use sed 1d >
22:55 < KirkMcDonald> Since "import" is usually a valid command...
22:55 < Namegduf> Heh, true.
22:55 < Namegduf> I wish Go could ignore a shebang line at the start, even
if # was invalid everywhere else.
22:55 < nickaugust> KirkMcDonald: yeah shell scripts...  oh so i could
shbang a py file and I wouldnt have to run it as python myfile.py i could just
execute myfile.py?
22:55 < Namegduf> Right.
22:55 < KirkMcDonald> nickaugust: Yup.
22:55 < KirkMcDonald> #!/usr/bin/env python
22:55 < nickaugust> is that what youre getting at....  aaaaahhh...  gotcha
22:55 < nickaugust> well shit that does sound handy :)
23:01 < yiyus> KirkMcDonald: is your go program available anywhere?
23:01 < KirkMcDonald> yiyus: Nah, it's just on my hard drive.  Let me cram
it somewhere...
23:02 < KirkMcDonald> Hah, it doesn't even compile anymore.
23:02 < MaybeSo> that potentially sounds painful
23:02 < KirkMcDonald> One moment while I figure it out.
23:02 < KirkMcDonald> (This code is old enough that it still uses
semicolons.)
23:03 < yiyus> i was just curious if it would be easy to modify it so that
it removes the first line of the .go file, then you could use it with #!
23:03 < KirkMcDonald> It would be trivial to modify the compiler in this
way.
23:03 < nbjoerg> should be trivial, but I don't think it will really make
you happy
23:03 < yiyus> of course, you would need a temp file then
23:03 < KirkMcDonald> "Ignore first line if it starts with '#!'."
23:04 < KirkMcDonald> I have reservations about anything which would
resemble a preprocessor.
23:05 -!- artefon [~thiago@189.107.155.106] has quit [Quit: bye]
23:07 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
23:10 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
23:10 < exch> if we start on that road, soon we'll have full blown C macros
D:
23:10 * exch shivers
23:11 < yiyus> you can probably use c macros already
23:12 < yiyus> i don't think there is anything preventing you from running
the c preprocessor in go files
23:12 < yiyus> except that it would be the worst idea ever
23:12 < KirkMcDonald> Here we are, my very first go program:
http://paste.pocoo.org/show/251837/
23:12 < KirkMcDonald> Note that it only compiles the thing, it doesn't run
it.
23:15 < yiyus> meh, i can see the fun of writing it as a first exercise, but
does it have any advantage over a shell script?  (not afaict)
23:16 * nbjoerg expects that rsc will not like this code
23:16 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds]
23:17 < KirkMcDonald> yiyus: Nope, probably not.
23:17 -!- artefon [~thiago@189.107.155.106] has joined #go-nuts
23:18 < KirkMcDonald> Hell, I don't think I like that code.
23:18 < nbjoerg> not your code
23:18 < nbjoerg> what I am writing
23:18 < KirkMcDonald> hah
23:19 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
23:19 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
23:26 -!- kanru [~kanru@118-160-162-233.dynamic.hinet.net] has joined #go-nuts
23:27 < nbjoerg> can I use _ in structs?
23:28 < nbjoerg> e.g.  there should be something here, but I don't care how
it is called?
23:28 < exch> nbjoerg: yes
23:29 < exch> type T struct { _ int; A string; B int; } It's useful if you
need padding
23:30 < nbjoerg> right
23:30 -!- iant [~iant@nat/google/x-lsxosbwbgqchkknq] has quit [Ping timeout: 248
seconds]
23:31 < nbjoerg> any way to do compile time assertions?
23:31 < jessta> nbjoerg: nope
23:32 < nbjoerg> too bad
23:32 < cw> for some interface issues yes
23:32 < cw> but generically no
23:32 < jessta> nbjoerg: specifically and intentional left out
23:32 < Namegduf> He said compile-time
23:32 < Namegduf> assert() is runtime
23:32 < Namegduf> But no, there isn't.
23:32 < nbjoerg> things like "ensure that this structure has this size"
23:33 < cw> no
23:33 < Namegduf> No. If you care about size, use fixed-size variables.
23:33 < nbjoerg> Namegduf: I'm matching up a system structure that godefs
doesn't grock
23:34 < Namegduf> nbjoerg: It won't work.
23:34 < Namegduf> Structure alignment differs between platforms.
23:34 < Namegduf> I think you can use a byte array of the appropriate size.
23:34 < nbjoerg> that's even less useful
23:34 < cw> i use godefs pretty heavily for structs for some fs ioctl goop
23:35 < cw> so far the alignments work out well, you can't always be sure of
that but if it does fall apart some of the syscall stuff will break
23:35 < nbjoerg> cw: *nod*
23:35 < cw> so whilst you can't really bet your life on it, in reality it's
fairly usable
23:35 -!- iant [~iant@66.109.103.22] has joined #go-nuts
23:35 -!- mode/#go-nuts [+v iant] by ChanServ
23:35 < nbjoerg> and I don't really care if the structure definition has to
be redone for other platforms
23:35 < cw> nbjoerg: one suggestion is make your ugly checks as init
fucntions
23:36 < nbjoerg> it is still a lot saner than the alternatives
23:36 < cw> so when the code first runs it blows up then
23:36 < nbjoerg> yeah, thought about that too
23:37 < Namegduf> I'm not quite sure why Go would include a weird
size-assertion thing but not the ability to create packed structs
23:37 < cw> you could also have an external tool that wrapped your code/pkgs
and used reflect to expose the sizes and check those after a bulid
23:37 < Namegduf> As it is, though, it has neither.
23:38 < cw> packed structs are hard on some platforms
23:38 < cw> x86 has liberal alignement access rules, not everything does
though
23:38 < nbjoerg> packed structs are mostly useful when dealing with idiots
23:38 < nbjoerg> like hardware designers
23:38 < cw> or networking people
23:38 < nbjoerg> networking people generally do get alignments right
23:38 < nbjoerg> at least the proper ones
23:38 < cw> or basically anything that's a stain on the blue dress of
reality
23:40 < nbjoerg> http://golang.org/doc/effective_go.html#panic
23:40 -!- Venom_X [~pjacobs@adsl-99-20-147-171.dsl.aus2tx.sbcglobal.net] has quit
[Quit: Venom_X]
23:40 < nbjoerg> isn't that missing a ) in the panic line?
23:43 < cw> yes
23:43 < cw> i can submit a CL if you want or do it yourself
23:43 < nbjoerg> can someone fix it?
23:43 < cw> sure
23:43 < cw> sec
23:48 -!- photron [~photron@port-92-201-61-111.dynamic.qsc.de] has quit [Ping
timeout: 248 seconds]
23:48 -!- jackman_mobile [~jackman@c-76-115-243-246.hsd1.wa.comcast.net] has
joined #go-nuts
--- Log closed Thu Aug 19 00:00:05 2010