--- Log opened Thu Jul 07 00:00:54 2011
00:01 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 276 seconds]
00:02 -!- bugQ [~bug@c-71-195-207-34.hsd1.ut.comcast.net] has joined #go-nuts
00:07 -!- sav [~lsd@peirce.xored.org] has quit [Read error: Connection reset by
peer]
00:09 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
00:12 -!- sav [~lsd@peirce.xored.org] has quit [Read error: Connection reset by
peer]
00:12 < magn3ts> Wow.
00:12 < magn3ts> I thought the email was harsh
00:12 -!- opt [~opt@174.3.227.184] has joined #go-nuts
00:12 < magn3ts> But your reddit rage is a bit out of whack.
00:14 < Namegduf> Not really.
00:14 < magn3ts> did you even click on the link?  There are no comments on
reddit.
00:14 < magn3ts> That was just an article that *got* submitted to the golang
subreddit.
00:14 < Namegduf> I wasn't talking about that link.
00:15 < magn3ts> o_0
00:15 < Namegduf> The Go subreddit is relatively sensible because barely
anyone uses it outside the Go community
00:15 < Namegduf> Which is relatively expected, I think.
00:16 < magn3ts> sure, and many of the large subreddits are full of enough
people that its floated far back towards the median internet
intelligence/maturity, but comparing it to any other news site seems unfair,
especially given the amount of control you have over what you see.
00:16 < Namegduf> What, suggesting that it's comparable to the rest of the
Internet is "unfair"?
00:17 < magn3ts> ""basically news website commenters with better spelling
and vastly overinflated egos, for the most part.  Why does anyone, ever mention
their views?""
00:17 < magn3ts> yes.  I think that's a categorically unfair dismissal.
00:17 < Namegduf> And I think that's thinking they're better than they are.
00:17 < Namegduf> Did you see what I said about the rating system?
00:18 -!- franciscosouza [~francisco@187.105.22.148] has joined #go-nuts
00:18 < Namegduf> Often the worst posts, in terms of factual accuracy, are
the highly rated ones.
00:18 -!- iant [~iant@67.218.104.187] has quit [Ping timeout: 255 seconds]
00:18 < Namegduf> Or at least they aren't a lot better.
00:18 < magn3ts> Don't subscribe to those subreddits then, or accept that
you have to filter a bit on top of it?
00:19 < Namegduf> I don't use Reddit, period.  It pisses me off every time I
get linked to a thread there.
00:19 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
00:19 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Ping timeout: 255
seconds]
00:19 < magn3ts> Yeah, I can tell.
00:19 < Namegduf> I read through and find nothing but uninformed gibbering,
with particularly detailed uninformed posts getting higher ratings.
00:20 < magn3ts> Usually the more angry people are about reddit, the more I
assume that they only get linked there or subscribe only to the default
subreddits, or don't view comment threads by "best" where they usually correct
inaccuracies, etc
00:20 < magn3ts> LOL
00:21 -!- brad_ [~brad@cpe-098-026-120-155.nc.res.rr.com] has quit [Ping timeout:
255 seconds]
00:21 < Namegduf> At any rate, no, I don't think considering Reddit posts in
general the same as any other news site, but generally thinking more of
themselves, incorrect.
00:22 -!- sav [~lsd@peirce.xored.org] has quit [Read error: Connection reset by
peer]
00:22 < magn3ts> The simple presence of voting and threading and sorting
comments by different criteria make the entire atmosphere different than news
sites comment systems.
00:22 < Namegduf> Different, yes, better, no.
00:22 < magn3ts> They naturally encourage conversation that allows for back
and forth and resolution in ways that threadless comments can't.
00:22 < Namegduf> Threading is nice, yes.
00:23 < magn3ts> reddit's average worst post is as bad as the average good
post on a news site.  I can say that easily.  I know when I see an article on
reddit, the comments will give me a wide range of differing opinions with people
calling out facts or making their own assertions.  I think reddit does themselves
a disservice by selecting "top" as the comment sort rather than "best".  I hear
these complaints a lot before people change their sort prefernce.
00:24 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
00:25 < magn3ts> Anyway, I'll just say that a small amount of effort (desub
from the big reddits, sub to smaller more focused ones) can improve the
experience, and I've yet to find a good replacement for it.  I've discovered
artists, other sharing sites, deals, programming tips and lots of other things
that I don't know where else I'd have seen them.
00:25 < magn3ts> I don't need to be some awkward reddit advocate off topic
in a channel where I like a relaxed friendly atmosphere.  I'm just sad your
experiences have been poor.  :[
00:27 -!- sav [~lsd@peirce.xored.org] has quit [Read error: Connection reset by
peer]
00:28 < skelterjohn> it's a direct reaction to the (silly, in my opinion)
go-bashing lately
00:29 < skelterjohn> i think this is the case in general - whenever (insert
wide-field aggregator here) has a thread on (something you know a lot about), the
results are disappointing
00:29 < skelterjohn> whenever there is a machine learning thread on slashdot
- beware
00:29 < skelterjohn> 95% of the comments are drivel
00:29 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
00:29 < skelterjohn> and i'm not even counting the "i for one welcome our
skynet overlords" stuff
00:29 < Namegduf> I stopped following there a good while ago, the comments
just stopped being interesting.
00:30 < skelterjohn> but things that masquerade as informed
00:30 < Namegduf> Especially threads mentioning Google, Apple, Sony, Oracle,
Microsoft, Nintendo, or, well, let's say "any company of recent news interest".
00:30 < Namegduf> Yeah, that.
00:31 < magn3ts> I guess I don't mind the noise, I brush through it quickly.
00:32 < skelterjohn> when it's not something you care about, it's easy to
ignore noise :)
00:32 < skelterjohn> but when these doofuses talk about go, it's tougher
00:32 < uriel>
http://www.reddit.com/r/programming/comments/ii3yb/now_we_get_to_the_annoying_aspects_of_go/c23zxk4?context=3
00:32 < Namegduf> Noise I can ignore, but things claiming to be informed,
highly rated as informed, and utterly wrong annoy me, and after hitting a few and
going through the effort of reading them I quickly get tired of trying to find
anything of value.  Also too annoyed to be interested anymore.
00:32 < uriel> -5 already?  *sigh*
00:32 -!- sav [~lsd@peirce.xored.org] has quit [Read error: Connection reset by
peer]
00:33 < skelterjohn> heh, yeah
00:33 < skelterjohn> i don't recall being offensive, off-topic or misleading
00:33 < Namegduf> "In every other language with objects"
00:33 < Namegduf> Stop right there, dude
00:33 < Namegduf> Man, see, this is the kind of crap that annoys me
00:33 < magn3ts> Oh wow.
00:34 < Namegduf> The basic *premise* is wrong from the first *clause* of
the first sentence
00:34 < magn3ts> I hadn't seen these comments, last time I looked there were
0.
00:34 < skelterjohn> but it's bikeshed garbage
00:34 < Namegduf> ANd it has 34 goddamn points
00:34 < magn3ts> comment karma will drive you insane.
00:34 < skelterjohn> i don't care about poor karma, but now my post is
hidden by defaul
00:34 < skelterjohn> t
00:34 < magn3ts> I could deliver a new phone to someone in /r/Android and
people would still find a reason to crucify me.
00:35 < magn3ts> skelterjohn, I forget that, I have mine set as low as it
lets me for hiding.
00:35 -!- brad_ [~brad@cpe-098-026-120-155.nc.res.rr.com] has joined #go-nuts
00:35 -!- iant [~iant@216.239.45.130] has joined #go-nuts
00:35 -!- mode/#go-nuts [+v iant] by ChanServ
00:35 < skelterjohn> Namegduf: I felt that merely quoting "every other
language with objects" would be enough to make him seem silly, but I forgot about
the rule regarding "subtlety" and "the internet"
00:37 < Namegduf> You assumed that the reader would know what they were
reading about, but as demonstrated by the guy's rating...
00:37 < skelterjohn> i made a number of poor assumptions :)
00:38 < magn3ts> I wonder if this in particular had anything to do with the
Google-association
00:38 < Namegduf> I've seen a lot of that.
00:38 < magn3ts> people like to hate big things or think they're smart
enough to get to call Google "incompetent"
00:38 < skelterjohn> both good and bad things came from that
00:38 < Namegduf> Good: PR
00:38 < skelterjohn> for instance, i would never have noticed if it weren't
a google product
00:39 * magn3ts nods
00:39 < str1ngs> magn3ts: yes people confuse go authors with google .
00:39 < skelterjohn> whether you consider that a good thing or a bad thing
is up for grabs!
00:39 < Namegduf> Bad: People think it's an attempt to steal their credit
card details
00:39 < Namegduf> For, well
00:39 < Namegduf> Some reason
00:39 < magn3ts> Yes, I have read 4 or 5 incoherent ramblings about why
Google+ is evil because Google offers a wide range of products.
00:40 < magn3ts> Mind that it's up to the user to choose to or not to use
them.  Or that they have generally easy ways of exporting and deleting said data.
00:40 < Namegduf> Or the noticable lack of vendor lock-in.
00:40 < Namegduf> Or, well, the point of comparison.
00:40 < Namegduf> I mean it's Facebook.  Facebook.
00:40 < KirkMcDonald> I for one welcome our Google+ overlords.
00:41 < KirkMcDonald> (Do you see what I did there.)
00:41 < Namegduf> (No, please explain.)
00:41 < Namegduf> (:P)
00:41 < magn3ts> I can't tell if you're serious, heh.
00:41 < Namegduf> I'm not.
00:41 < bmizerany> has anyone successfully gotten syscall.Select working on
a network fd?
00:42 < Namegduf> bmizerany: Just to check: You know that if you block a
goroutine on a read/write using the net package, it will only keep one blocked
thread, using epoll() or the OS-specific equivalent behind the scenes for you?
00:43 < Namegduf> (I can't help with your specific issue)
00:45 < bmizerany> Namegduf: I'm aware.  I'm working with jbarham's pgsql.go
wrapper.  I've added LISTEN/NOTIFY support.  To to PQnotifies() correctly, you
call PQconsumeinput() when there is data ready on the socket.  I have the fd but
am unsuccessful at getting select() working to know when the right time to call
consumeinput is.
00:45 < Namegduf> Ah, okay.  I just figured I'd check.
00:46 < bmizerany> Namegduf: yeah.  np.  thx for asking.  I didn't make that
clear.
00:47 < bmizerany> I really only care about darwin and linux.  I think the
only blocker is not having FD_SET/FD_ZERO.  I've googled around but can't find
their implementations for either.
00:49 < magn3ts> I'm worried that I won't be able to use winpcap in windows
with go, but I don't know enough to know if I can or not.
00:58 < kevlar_work> magn3ts, I would hazard a guess that even if you can,
it won't be easy.
00:58 < magn3ts> :[
00:59 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
01:01 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
01:01 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 240 seconds]
01:03 -!- kinofcain [~KinOfCain@h-64-105-141-42.snvacaid.static.covad.net] has
quit [Quit: kinofcain]
01:04 -!- franciscosouza [~francisco@187.105.22.148] has quit [Read error:
Connection reset by peer]
01:05 -!- franciscosouza [~francisco@187.105.22.148] has joined #go-nuts
01:08 -!- |Craig| [~|Craig|@71-217-17-63.tukw.qwest.net] has joined #go-nuts
01:08 -!- |Craig| [~|Craig|@71-217-17-63.tukw.qwest.net] has quit [Changing host]
01:08 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
01:13 -!- franciscosouza [~francisco@187.105.22.148] has quit [Read error:
Connection reset by peer]
01:14 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 240
seconds]
01:14 -!- franciscosouza [~francisco@187.105.22.148] has joined #go-nuts
01:15 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
01:16 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Read
error: Operation timed out]
01:22 -!- kaichenxyz [~kaichenxy@115.196.136.71] has joined #go-nuts
01:22 -!- kaichenxyz [~kaichenxy@115.196.136.71] has quit [Remote host closed the
connection]
01:22 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has joined #go-nuts
01:32 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
01:38 -!- squeese_ [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote
host closed the connection]
01:39 -!- xash [~xash@d064106.adsl.hansenet.de] has joined #go-nuts
01:41 -!- sav [~lsd@peirce.xored.org] has quit [Read error: Connection reset by
peer]
01:44 -!- Boney [~paul@124-148-153-94.dyn.iinet.net.au] has quit [Quit: leaving]
01:44 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
01:45 -!- Boney [~paul@124-148-153-94.dyn.iinet.net.au] has joined #go-nuts
01:45 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
01:55 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #go-nuts
01:56 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
01:59 -!- dlowe1 [~dlowe@c-66-30-116-162.hsd1.ma.comcast.net] has joined #go-nuts
02:00 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
02:03 -!- _andre [~andre@186.215.9.60] has joined #go-nuts
02:04 < _andre> hi
02:04 < _andre> is there a way to cast an unsafe.Pointer to []byte?
02:04 < Namegduf> Only to *[]byte
02:05 < Namegduf> An unsafe.Pointer is a thing the size of a pointer
02:05 < Namegduf> []byte is bigger than a pointer
02:05 < Namegduf> Such a cast makes little sense
02:06 < Namegduf> I guess you could cast a *unsafe.Pointer to a []byte, of
course, it just wouldn't work very well.
02:06 < Namegduf> Er, to a *[]byte
02:06 < Namegduf> And thus access an unsafe.Pointer's address as if it was
the address of a []byte
02:06 < Namegduf> It just would, well, crash.
02:09 < _andre> so i guess you can do C-style things like write(fd,
&somestruct, len)
02:09 < _andre> i'd have to create a []byte from somestruct manually
02:10 -!- kergoth` [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
02:10 < _andre> right?
02:11 < _andre> erm
02:12 < _andre> you can't do*
02:12 < nteon> well []byte is a slice, if you want an array it has to be
sized, right?
02:12 < nteon> i put that statement forth as a question :)
02:14 < _andre> well in C write(2) accepts a void* as the second argument so
you can give it the address of anything and it'll be treated as an array of bytes
02:15 < _andre> i was wondering if there's a way in go to cast a value of
any type (or its address) to a byte slice so that i could pass it to, say,
syscall.Write directly
02:19 < nteon> _andre: right, but a slice isn't a pointer to an array of
bytes.  its a struct with 3 fields: a pointer to the array, a size and a capacity
02:20 < nteon> _andre: beyond that, I'm not sure.  I haven't played with Cgo
yet
02:26 -!- dfr|mac [~dfr|work@nat/google/x-ircbqfhpnfaabole] has quit [Remote host
closed the connection]
02:35 < dforsyth> _andre: encoding/binary?
02:35 < dforsyth> func Write(w io.Writer, order ByteOrder, data interface{})
os.Error
02:37 < dforsyth> it might not be powerful enough, though?  you could also
try encoding it gob or json, though
02:37 < Namegduf> _andre: You can
02:37 < Namegduf> It's terribly illadvised, thoguh
02:37 < Namegduf> *though
02:37 -!- niemeyer__ [~niemeyer@201.25.35.2] has quit [Ping timeout: 240 seconds]
02:38 < Namegduf> encoding/binary is a MUCH better idea and will handle
endianness issues for you, along with struct padding issues.
02:38 < Namegduf> If you want to, what you need to do is create an area the
size of a []byte, put the appropriate data in it, including a pointer to the data
to write, its size, and so forth
02:38 < Namegduf> And then take a pointer to that block, and convert it to a
pointer to []byte.
02:39 < Namegduf> But really, encoding/binary is a much better idea.
02:39 < _andre> oh
02:39 < _andre> i wasn't aware of that
02:39 < Namegduf> A []byte isn't a block of bytes, or a pointer to one; it's
a little struct which CONTAINS such a pointer alongside size information
02:39 < _andre> of encoding/binary, i mean
02:40 < _andre> i was doing all the bit-shifting myself :|
02:41 -!- xash [~xash@d064106.adsl.hansenet.de] has quit [Read error: Operation
timed out]
02:42 -!- dlowe1 [~dlowe@c-66-30-116-162.hsd1.ma.comcast.net] has quit [Quit:
*poof*]
02:45 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 252 seconds]
02:54 -!- hsoj [~josh@66.54.185.139] has quit [Read error: Operation timed out]
02:56 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
02:57 -!- icey [u2593@gateway/web/irccloud.com/x-apkzldlslrypswjs] has left
#go-nuts []
03:02 -!- bugQ [~bug@c-71-195-207-34.hsd1.ut.comcast.net] has quit [Remote host
closed the connection]
03:13 < skelterjohn> if you want to turn a slice into a C-style array, pass
the address of the first element
03:18 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
03:20 < _andre> i got it to work with encoding/binary
03:20 < _andre> though i wish there was a way to actually return the byte
slice instead of use the writer interface
03:22 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Quit:
http://quassel-irc.org - Chat comfortably.  Anywhere.]
03:25 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
03:30 -!- foocraft [~ewanas@89.211.175.239] has joined #go-nuts
03:41 < nteon> is there a contains function for slices?  func
contains([]interface{}, interface{}) bool
03:41 < nteon> its not hard to implement...
03:48 -!- keithcascio [~keithcasc@nat/google/x-ynmnhukbgbqmgtls] has quit [Quit:
Leaving]
04:01 < |Craig|> nteon: that won't run on slices of anything but interface{}
if you implement it
04:05 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:05 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:08 -!- _andre [~andre@186.215.9.60] has quit [Quit: leaving]
04:11 -!- shvntr [~shvntr@113.84.94.185] has joined #go-nuts
04:22 -!- sav [~lsd@peirce.xored.org] has quit [Read error: Connection reset by
peer]
04:28 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit:
Computer has gone to sleep.]
04:28 -!- shvntr [~shvntr@113.84.94.185] has quit [Ping timeout: 260 seconds]
04:30 -!- shvntr [~shvntr@113.84.94.185] has joined #go-nuts
04:32 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
04:33 -!- wallerdev [~wallerdev@72.44.102.30] has quit [Quit: wallerdev]
04:37 -!- grai [~grai@38.70.70.115.static.exetel.com.au] has joined #go-nuts
04:41 -!- Skola [~bas@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has joined #go-nuts
04:48 -!- foocraft [~ewanas@89.211.175.239] has quit [Quit: if you're going....to
san.  fran.  cisco!!!]
04:50 -!- markcol [~markcol@74.125.59.1] has quit [Quit: markcol]
04:54 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:f548:ebf4:72f4:826e] has joined
#go-nuts
04:56 -!- shvntr [~shvntr@113.84.94.185] has quit [Quit: leaving]
04:57 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 276 seconds]
05:00 < jessta> nteon: that code tells me that you've incorrectly understood
interfaces in Go. I recommend you re-read the spec.
05:02 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 246 seconds]
05:02 < magn3ts> Is it at all possible to write a "generic" contains for
slices?
05:03 < magn3ts> well, not in the style of append(), as it's built in and
compiler supported.  :/
05:11 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
05:17 < jessta> magn3ts: sure, func contains(interface{},interface{})
05:18 < jessta> umm...func contains(slice interface{}, element interface{})
05:18 < magn3ts> I understand that a slice also implements the empty
interface, but I don't understand why taking a slice of empty interfaces would be
wrong.
05:19 < jessta> it's not wrong, it's just not want you actually want to do
if you want a generic slice
05:19 < jessta> because it's not a generic slice, it's a slice of
interface{}
05:20 -!- vmil86 [~vmil86@88.118.37.245] has joined #go-nuts
05:20 < magn3ts> so the meaning of "interface{}" becomes more, explicit or
rigid when expressed as part of a slice type?
05:20 < jessta> nope, it's the same as it's always been
05:21 < jessta> but you can't pass a []int to a function expecting a
[]interface{}
05:22 < magn3ts> The way I'm thinking about this is, they're both slices,
OK. The function expects the slice to contain interface{}.  int implements
interface{} so it must be okay.
05:23 < jessta> and that's the common confusion that comes from
misunderstanding interfaces
05:23 * magn3ts is reading the go_spec#Interface_types
05:24 < jessta> interface{} is a completely different data structure to int
05:24 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
05:24 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Excess Flood]
05:25 < magn3ts> sure
05:26 < jessta> the confusion is created because Go doesn't require you to
explcitly convert to an interface type
05:26 < magn3ts> "Two slice types are identical if they have identical
element types."
05:27 < jessta> yep, and int is not an interface{}
05:27 < magn3ts> jessta, :s yes that is part of my confusion.
05:27 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
05:27 < magn3ts> I see.
05:27 < jessta> but int can be converted to an interface{}
05:28 < magn3ts> but not automatically when comparing slice-types for
function calling
05:28 < jessta> it's easy,cheap and predictable with one type, but with a
slice you'd need to allocate
05:29 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
05:29 -!- mode/#go-nuts [+v iant] by ChanServ
05:30 < jessta> imagine you're passing an []int with len() = 10000 to a func
that takes a []interface and it automatically converted for you
05:30 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
05:32 < jessta> that would be an allocate of 80KB and a complete copy of the
array just to make that function call.
05:32 < magn3ts> I hadn't considered that.
05:33 < jessta> and then you'd probably have to copy it back for the results
to be useful anyway
05:33 < magn3ts> Yeah.  Thanks for talking through that, I appreciate it.
Thinking about the allocation and the automatic flexibility of interfaces makes a
lot more sense as I ponder it more now
05:34 < jessta> magn3ts:
http://research.swtch.com/2009/12/go-data-structures-interfaces.html
05:34 < magn3ts> Oooh.  Oh my.  Thanks.
05:41 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
05:47 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
05:48 -!- photron [~photron@port-92-201-67-130.dynamic.qsc.de] has joined #go-nuts
05:52 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
05:58 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-167-112.clienti.tiscali.it] has
joined #go-nuts
05:59 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 240 seconds]
06:00 -!- iant [~iant@216.239.45.130] has joined #go-nuts
06:00 -!- mode/#go-nuts [+v iant] by ChanServ
06:03 -!- squeese [~squeese@244.14.213.193.static.cust.telenor.com] has joined
#go-nuts
06:15 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 276 seconds]
06:20 -!- madari [madari@idm.irc-galleria.net] has quit [Quit: leaving]
06:21 -!- madari [madari@idm.irc-galleria.net] has joined #go-nuts
06:23 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:f548:ebf4:72f4:826e] has quit
[Remote host closed the connection]
06:23 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:f548:ebf4:72f4:826e] has joined
#go-nuts
06:26 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
06:27 < nteon> heh, I missed that discussion it seems
06:30 < nteon> jessta: I understand that function wont work with []int, but
my immediate need was for []string
06:30 < nteon> for a generic contains() the language would need generics
06:30 < nteon> or compile time support like append
06:30 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:31 < zozoR> Is there any blogs or docs lying around the net that
critizises go (and knows what he/she is talking about) ?
06:31 < zozoR> are there any*
06:31 < zozoR> or is it is ..
06:35 < jessta> nteon: you can do it with reflection
06:36 < jessta> it just won't be compile time type safe
06:38 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has quit [Quit:
kaichenxyz]
06:39 < nteon> jessta: good point
06:39 < nteon> compile-time safety is one of the things I love about go
06:45 -!- squeese [~squeese@244.14.213.193.static.cust.telenor.com] has quit
[Remote host closed the connection]
06:50 -!- kytibe [~kytibe@212.174.109.55] has quit [Read error: Connection reset
by peer]
06:51 -!- GS [~gsv@108-61-238-49.southernonline.net] has joined #go-nuts
06:51 -!- kytibe [~kytibe@212.174.109.55] has joined #go-nuts
06:55 -!- grai [~grai@38.70.70.115.static.exetel.com.au] has quit [Read error:
Connection reset by peer]
07:00 -!- grai [~grai@38.70.70.115.static.exetel.com.au] has joined #go-nuts
07:03 -!- neshaug [~oyvind@213.239.108.5] has quit [Quit: leaving]
07:04 -!- neshaug [~oyvind@213.239.108.5] has joined #go-nuts
07:05 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
07:19 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:20 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has joined #go-nuts
07:21 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
07:21 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Quit:
leaving]
07:23 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has joined #go-nuts
07:24 -!- Gertm [~Gertm@178-119-230-147.access.telenet.be] has left #go-nuts ["C-x
C-k"]
07:30 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has quit [Read
error: Connection reset by peer]
07:31 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has joined
#go-nuts
07:35 -!- Slant [~scott@124-168-94-71.dyn.iinet.net.au] has joined #go-nuts
07:38 -!- Kahvi [~Kahvi@a91-152-177-58.elisa-laajakaista.fi] has joined #go-nuts
07:38 -!- mikespook [~mikespook@119.131.233.11] has joined #go-nuts
07:47 -!- Kahvi [~Kahvi@a91-152-177-58.elisa-laajakaista.fi] has quit [Quit:
Lähdössä]
07:52 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 264 seconds]
07:54 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
07:54 < zozoR> lol, a guy with PhD in computer science says that the
different use of new and make is the most horrible thing in go
07:54 < zozoR> :D
07:57 < str1ngs> who cares
07:58 < zozoR> i just like how the most horrific part of go for him, is
kinda lame
07:58 < jessta> zozoR: lol, like how c++ has new and malloc()
07:58 -!- message144 [~message14@cpe-75-83-155-145.socal.res.rr.com] has quit
[Remote host closed the connection]
07:58 < zozoR> and then he whines about the missing generics..  who needs
them
08:00 < jessta> generics would be nice, if they can be done in a way that
doesn't make code impossible to read
08:03 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
08:04 < erus`> Can I unmarshal a map[string] interface{} into a struct?
08:05 < zozoR> dunno, try?
08:06 < str1ngs> erus`: does it really have to be an interface?  I'm
assuming yes but best to ask.
08:07 < erus`> str1ngs: first I unmarshal some json
08:07 < erus`> but the fields are dynamic
08:07 < erus`> so i have to unmarshal into interface {}
08:07 < str1ngs> dynamic in they change or they dont always exist?
08:08 < erus`> dynamic types :(
08:08 < str1ngs> are the types the same though?  like Person Animals kinda
thing?
08:08 < erus`> like "error" could be nil or an object with members
08:09 < erus`> well nil or a map
08:09 < str1ngs> hmm
08:10 < str1ngs> I think you can only do this using reflection
08:11 < erus`> is there no built in way to read a map[string] interface{}
into a struct?
08:11 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
08:12 < str1ngs> that I know, but I question the json
08:12 < str1ngs> normally you have a good idea what you are getting so you
just make a struct that matches the json
08:17 < erus`> the bitcoin json rpc protocol returns a { responce: object
error: object }
08:18 < erus`> and the responce will be nil if an error
08:18 < erus`> or the error will be nil if not an error
08:18 -!- Slant [~scott@124-168-94-71.dyn.iinet.net.au] has quit [Quit: Slant]
08:19 < str1ngs> it alwasy returns like that?
08:20 < str1ngs> erus`: it might be easier if you paste service the json.
ie io.Copy(os.Stderr,res.Body)
08:20 < str1ngs> assumeing its a body closer
08:20 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
08:21 < erus`> whats a paste service?
08:21 < str1ngs> see /topic
08:21 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 276 seconds]
08:21 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
08:22 -!- vmil86 [~vmil86@88.118.37.245] has quit [Ping timeout: 276 seconds]
08:22 < erus`> oh paste bin
08:23 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
08:24 < erus`> str1ngs: the problem is that the "result" is nested in the
json
08:25 < erus`> and i will not know it until i read the first level
08:25 < erus`> then it gets really messy with losts of different structs for
each type of result
08:26 < str1ngs> yes but I'm sure the Call is not the same
08:26 < str1ngs> or Get
08:27 < str1ngs> GetFoo is going to return a Foo object
08:28 < str1ngs> also Decode can handle nested json if you provide the types
for them
08:28 < erus`> oh i forgot to mential i cannot use any rpc package
08:29 < erus`> i have to send http requests myself
08:29 < str1ngs> yes which is a Get
08:29 < erus`> so i read the body and try to parse the json from that
08:29 < str1ngs> yes paste the Json from one get
08:30 < erus`> ok
08:30 < erus`> an error or no error?
08:30 < str1ngs> should not matter
08:30 < str1ngs> since you can provide fields for both and test them.
08:30 < str1ngs> you just need to match them though
08:31 < erus`> {"result":null,"error":{"code":-32601,"message":"Method not
found"},"id":""}
08:31 < str1ngs> ok so make a struct like this
08:32 < str1ngs> type Foo struct { Error jError }
08:32 < str1ngs> the make a jError struct with Code int Message string
08:32 < str1ngs> you can add Id string to Foo
08:33 < erus`> str1ngs: yeah i have that
08:33 < str1ngs> Result we'll have to figure out
08:33 < erus`> the issue is when i have 20 or so different formats for
results
08:33 < str1ngs> right but the Methods should dictate the result
08:33 < erus`> i have to make 20 structs for results AND 20 structs for the
{ result, error } base struct
08:34 < str1ngs> ie GetUsers Result user
08:34 < str1ngs> erus`: no you just need to 20 structs
08:34 < erus`> you have two there
08:35 < erus`> for reading 1 case
08:35 < str1ngs> no Error is common to all
08:35 < str1ngs> result changes but thats based on the method.  and you want
structs either way
08:36 < erus`> ah i dont need my base one then
08:36 < erus`> i can just check error
08:36 < erus`> that works :D
08:36 < str1ngs> right because Error is common
08:36 -!- vmil86 [~vmil86@78.57.227.12] has joined #go-nuts
08:36 < str1ngs> anyways odds are you wont need them all.  I like to cherry
pick
08:37 < str1ngs> either Methods or Fields
08:41 < str1ngs> erus`:
https://github.com/str1ngs/go-bitly/blob/master/bitly.go here's also better
example of nested json
08:55 -!- genbattle [~nick@203-173-255-36.dsl.dyn.ihug.co.nz] has joined #go-nuts
08:56 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
08:58 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
08:58 < GeertJohan> good morning ;)
09:01 -!- tylerl [~tylerl@unaffiliated/tylerl] has joined #go-nuts
09:02 < tylerl> whats the current version number for 6g?
09:03 < str1ngs> r58
09:03 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
09:03 < tylerl> OK. so I've got "6g version release.r58 7666" -- that's
should be pretty up-to-date, rigth?
09:04 < str1ngs> for the most part yes
09:04 < tylerl> Hm. I'm getting "not enough arguments in call to os.Open"
when i try to compile https://github.com/miekg/godns
09:05 < tylerl> i presumed install was out-of-date
09:05 < str1ngs> might be the other way round
09:05 < vsmatck> Open got changed semi-recently.
09:05 < str1ngs> can you paste the line in question?
09:05 < tylerl> file, err := os.Open(conf)
09:06 < tylerl> where conf is string
09:06 < str1ngs> seems right
09:06 -!- GilJ [~GilJ@zeus.ugent.be] has quit [Quit: leaving]
09:06 < str1ngs> $ which 6g <- run that
09:06 -!- GilJ [~GilJ@zeus.ugent.be] has joined #go-nuts
09:06 < tylerl> ~/go/bin/6g <-- seems right
09:07 < str1ngs> godoc os Open
09:07 < str1ngs> func Open(name string) (file *File, err Error)
09:07 < str1ngs> should look like that
09:07 < tylerl> func Open(name string, flag int, perm uint32) (file *File,
err Error)
09:07 < tylerl> soo...  newer, or older?
09:08 < str1ngs> thats older
09:08 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
09:08 < tylerl> i ran hg pull to update, then make.bash and "make.bash
install"
09:08 < tylerl> is there another step?
09:09 < str1ngs> hg pull -u
09:09 < str1ngs> or hg pull; hg update
09:10 < str1ngs> 6g version release.r58 7666 seems like a bug
09:11 < tylerl> now it's 6g version weekly.2011-06-23 9006
09:11 < tylerl> grr.  now I get goto BadType jumps into block starting at
msg.go:295
09:12 < str1ngs> hg check out release
09:12 < str1ngs> err hg checkout release
09:13 < tylerl> and then hg update?
09:13 < tylerl> (hg isn't my strong suit)
09:13 < str1ngs> I dont think you need update with checkout
09:13 < str1ngs> its not mine either :P
09:13 < str1ngs> 580 files updated, 0 files merged, 13 files removed, 0
files unresolved
09:14 < tylerl> 6g version release.r58 8731
09:14 < str1ngs> always read the status line.  I find it helps
09:14 < tylerl> which status line?
09:14 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
09:14 < str1ngs> on checkout pull update
09:14 < tylerl> build works now.  thanks
09:14 < str1ngs> np
09:16 < tylerl> and time for bed.  night
09:17 < str1ngs> tylerl: ...  goto bed
09:18 -!- tylerl [~tylerl@unaffiliated/tylerl] has quit [Quit: leaving]
09:19 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 255 seconds]
09:20 -!- virtualsue [~chatzilla@nat/cisco/x-zqdxkrrxifishasi] has joined #go-nuts
09:26 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
09:26 -!- zippoxer [~zippoxer@109.67.202.163] has joined #go-nuts
09:27 < zippoxer> If anyone has good answer to give:
http://stackoverflow.com/questions/6605051/performance-focused-desktop-program-ruby-or-go
09:28 < zippoxer> not my question, but people there don't understand few
important things.
09:31 < str1ngs> the answer is try it
09:32 < str1ngs> asking for opinions is never good on the internet.
09:32 < str1ngs> if performance is #1 issue.  he should not even think about
ruby
09:33 < str1ngs> but that just my opinion :P
09:37 < zozoR> anyone in here who works on the go-sdl project?
09:40 < erus`> can someone try this for me please
09:40 < erus`> https://github.com/tm1rbrt/bitcoinrpc
09:40 < erus`> just run the example
09:41 -!- Slant [~scott@124-168-94-71.dyn.iinet.net.au] has joined #go-nuts
09:53 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
09:56 < erus`> does EOF mean socket closed?
09:56 < str1ngs> could be ya
09:57 < str1ngs> erus`: you probably dont even need all of that
09:58 -!- rlab [~Miranda@238-89-95-178.pool.ukrtel.net] has joined #go-nuts
09:58 < str1ngs> ie client = new(http.Client); res,_ :=
client.Get("http://foo.com"); io.Copy(os.Stderr,res.Body)
09:59 < str1ngs> I would probably not use raw connections.  because the
client does a better job of it
10:00 < str1ngs> The Client's Transport typically has internal state (cached
10:00 < str1ngs> TCP connections), so Clients should be reused instead of
created as
10:00 < str1ngs> needed.  Clients are safe for concurrent use by multiple
goroutines.
10:01 < str1ngs> ie I tend to use a client that is global scope.  since it
caches like that and you can use keep-alive
10:13 -!- foocraft [~ewanas@89.211.210.198] has joined #go-nuts
10:14 -!- vmil86 [~vmil86@78.57.227.12] has quit [Remote host closed the
connection]
10:32 -!- Slant [~scott@124-168-94-71.dyn.iinet.net.au] has quit [Quit: Slant]
10:37 < erus`> i cant use client.Get
10:37 < erus`> i need authentication
10:39 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 246 seconds]
10:39 < erus`> and its a POST
10:40 -!- hcatlin [~hcatlin@host86-163-247-252.range86-163.btcentralplus.com] has
joined #go-nuts
10:40 -!- hcatlin [~hcatlin@host86-163-247-252.range86-163.btcentralplus.com] has
quit [Changing host]
10:40 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
10:43 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
10:44 -!- genbattle [~nick@203-173-255-36.dsl.dyn.ihug.co.nz] has quit [Quit:
Leaving]
10:54 < zozoR> is there a way of contacting a user on Github without
registering?
10:54 < zozoR> I made some new bindings to go-sdl and i kinda want the main
guy to have it
10:55 < str1ngs> must github fols work with pull requests
10:55 < str1ngs> most*
10:55 < str1ngs> does not take much to register
10:55 -!- rlab [~Miranda@238-89-95-178.pool.ukrtel.net] has quit [Read error:
Connection timed out]
10:55 < zozoR> i am 100% new to these hg, github, svn thingies
10:56 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
10:56 < zozoR> well, might as well sign up
10:56 < str1ngs> the other option is look for ML ..  maybe post patches
10:58 < zozoR> ^^
10:58 < zozoR> im just gonna read all the help stuff then
10:59 < str1ngs> if you are working with a github project easy to fork and
go from there.
11:00 < zozoR> i'd rather he put my code in his work so i doesnt get all
forky :P
11:00 < zozoR> thats my first thought atleast
11:00 < str1ngs> if you are new to git http://progit.org/
11:01 < zozoR> thanks
11:02 < str1ngs> and man git of course
11:02 < str1ngs> sorry I dont have resources for hg etc
11:02 < zozoR> well i dont care for hg right now
11:02 < zozoR> just want to add my stuff and maybe put my game on git for
the hell of it
11:02 < str1ngs> hg is still good, dont count it out.  probably easier to
start with
11:04 < str1ngs> zozoR: I'm not sure why the call them forks on github.
they are actually clones
11:04 < str1ngs> I guess they thought fork sounded cool or something
11:04 < zozoR> i think it will make sense when im done reading the help page
11:05 -!- vmil86 [~vmil86@78.57.227.12] has joined #go-nuts
11:05 < str1ngs> ya dont confuse fork with hey I'm forking your project, and
doing my own thing
11:05 < str1ngs> it has a different context on github
11:08 < zozoR> there is a guy who forked the sdl library, and kinda made his
own version of it :
11:08 < zozoR> :P
11:10 < str1ngs> it happens sometimes for the betters.  xorg ..  cough
11:10 < zozoR> :3
11:11 < zozoR> it looks rather complicated to get started using these
subversion systems >.<
11:13 < str1ngs> hg and git are comparable.  subversion not so much
11:26 -!- gnuvince|work [8e544424@gateway/web/freenode/ip.142.84.68.36] has joined
#go-nuts
11:29 -!- rlab [~Miranda@238-89-95-178.pool.ukrtel.net] has joined #go-nuts
11:40 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
11:44 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
11:56 -!- dforsyth [~dforsyth@ec2-50-18-22-230.us-west-1.compute.amazonaws.com]
has quit [Ping timeout: 250 seconds]
12:00 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has joined #go-nuts
12:01 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 276 seconds]
12:12 -!- vikstrom [~vikstrom@stockholm.ardendo.se] has joined #go-nuts
12:12 -!- franciscosouza [~francisco@187.105.22.148] has quit [Quit:
franciscosouza]
12:18 -!- rlab [~Miranda@238-89-95-178.pool.ukrtel.net] has quit [Read error:
Connection timed out]
12:19 -!- ccc1 [~Adium@114-45-84-113.dynamic.hinet.net] has joined #go-nuts
12:20 -!- ccc1 [~Adium@114-45-84-113.dynamic.hinet.net] has quit [Client Quit]
12:23 -!- Alpha_Cluster [~quassel@thief-pool2-121-125.mncable.net] has quit [Ping
timeout: 240 seconds]
12:34 -!- foocraft [~ewanas@89.211.210.198] has quit [Ping timeout: 276 seconds]
12:37 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
12:39 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
12:40 -!- Adys_ [~Adys@unaffiliated/adys] has joined #go-nuts
12:40 < zozoR> a while back unsafe.SizeOf was changed so it returned uintptr
instead of int
12:41 < zozoR> but in my godoc unsafe i see it returns int
12:41 < zozoR> am i doing something wrong : |
12:41 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 240 seconds]
12:42 < zozoR> i run r58 release btw
12:42 < zozoR> gc
12:42 < zozoR> :3
12:43 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 258 seconds]
12:56 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Quit: "Wait...  what?!"]
12:56 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
12:57 -!- dlowe1 [~dlowe@c-66-30-116-162.hsd1.ma.comcast.net] has joined #go-nuts
12:58 -!- foocraft [~ewanas@89.211.209.117] has joined #go-nuts
12:59 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has joined #go-nuts
12:59 < skelterjohn> zozoR: file an issue
12:59 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Client Quit]
12:59 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has joined #go-nuts
13:02 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
13:03 < skelterjohn> and yeah - the way you contribute to a project on
github is to fork, fix, and pull-request
13:03 -!- Slant [~scott@ppp118-209-153-219.lns20.mel6.internode.on.net] has joined
#go-nuts
13:04 -!- Slant [~scott@ppp118-209-153-219.lns20.mel6.internode.on.net] has quit
[Client Quit]
13:04 -!- niemeyer [~niemeyer@201-25-35-2.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
13:05 < zozoR> :)
13:05 < zozoR> well, after i forked it, i could not get it work
13:05 -!- bthomson [~bthomson@c-68-33-5-232.hsd1.va.comcast.net] has quit [Read
error: Operation timed out]
13:05 < zozoR> so i updated my compiler
13:05 < zozoR> and nothing works again :D
13:08 -!- robteix [~robteix@192.55.54.36] has joined #go-nuts
13:10 -!- Slant [~scott@ppp118-209-153-219.lns20.mel6.internode.on.net] has joined
#go-nuts
13:12 < zozoR> jesus now nothing works : |
13:13 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
13:14 -!- rlab [~Miranda@238-89-95-178.pool.ukrtel.net] has joined #go-nuts
13:20 < gmilleramilar> This is not a troll: why does the language need the
new operator when it appears to cause confusion and there are alternatives like
&Foo{}.  In my ~30000 lines of code, I don't use it at all...
13:21 < Namegduf> &Foo{} is a "convenience hack", Pike says.
13:21 < gmilleramilar> ah.
13:21 < Namegduf> If you want a strict, why is it unavoidable, answer, then
it is "&Foo{} only works for composite types"
13:22 < Namegduf> But in general &Foo{} is a shortcut for initialisation and
new() is the basic memory allocation function.
13:22 < gmilleramilar> but they do the same thing, right?
13:23 < Namegduf> Yes.
13:23 < Namegduf> &Foo{} is limited to composite types, though.
13:24 < gmilleramilar> right, but you can take the address of any variable
and it will do an allocation.
13:24 < Namegduf> These are most of the things you want to create a pointer
to an initialised one of, though.
13:24 < Namegduf> No.
13:24 < Namegduf> If you create a variable, it will do an allocation.
13:24 < gmilleramilar> s/an allocation/a heap allocation/
13:24 < Namegduf> If an address is taken anywhere, the place the variable is
created will be on the heap.
13:24 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Read
error: Connection reset by peer]
13:25 < Namegduf> The allocation will always only happen once, at the place
the variable is declared.
13:25 -!- franciscosouza [~francisco@201.19.106.131] has joined #go-nuts
13:25 < Namegduf> Taking an address somewhere else just sets how the
compiler allocates it at that point.
13:25 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
13:25 < gmilleramilar> I don't think that means my statement is wrong
13:26 < Namegduf> Well, if you take the address of something in an inner
loop, that's not an allocation.
13:26 < Namegduf> Performance implications and whatnot.  Also relevant to
where the goroutine can yield.
13:26 < Namegduf> You can take the address of an arbitrart variable, yes.
13:27 < gmilleramilar> agreed, but I don't think I said that.  regardless,
my initial point stands: there are other ways to do these things, and 'new' causes
confusion.
13:28 < Namegduf> The confusion exists just as much for these "other ways".
13:28 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
13:28 < Namegduf> They're equivalent.
13:28 -!- bthomson [~bthomson@c-68-33-5-232.hsd1.va.comcast.net] has joined
#go-nuts
13:28 < Namegduf> And it isn't caused by new existing, it's caused by people
not being aware of things they need to be aware of.
13:28 < gmilleramilar> I don't think that's true, because &Foo{} (for
example) means nothing to C coders.
13:29 < Namegduf> Neither does "new".
13:29 < Namegduf> You may be thinking C++.
13:29 < gmilleramilar> s/C/C++/
13:29 < Namegduf> That's not the bulk of any real confusion.  It's just a
point used by silly people to complain.
13:29 < Namegduf> When they're looking for complaints.
13:30 < gmilleramilar> I agree these people are silly, but they are still
confused
13:30 < Namegduf> No, not usually.
13:30 < Namegduf> There are confused people, who are confused about
something else, and there are people writing Why Go Sucks posts, who are just
looking for complaints.
13:30 < Namegduf> The latter are the group who complain about new().
13:30 < Namegduf> It's not a real problem in writing Go code.
13:32 < exch> complaints and rants get better ratings
13:32 < Namegduf> I find it far more confusing to have allocation be solely
via two separate forms of literal syntax, depending on the type, due to a lack of
an explicit allocation function.
13:32 -!- leterip [~textual@ip72-218-115-129.hr.hr.cox.net] has joined #go-nuts
13:33 < gmilleramilar> Namegduf: so you use new frequently?
13:33 < Namegduf> Yes.  I use it in preference to &Foo{}
13:33 < leterip> hey guys.  say i have a TCPConn in another goroutine.  is
there a way to block until that TCPConn is closed without using another
synchronization thing like a channel?
13:33 < leterip> also i have a reference to it
13:34 -!- ccc1 [~Adium@114-45-84-113.dynamic.hinet.net] has joined #go-nuts
13:35 < Namegduf> The stdlib also uses "new" a lot
13:35 < Namegduf> Based on a quick grep
13:36 < gmilleramilar> yeah, I'm not saying that it's not used, but I guess
we'll agree to disagree on whether it causes confusion for newbs.
13:36 < gmilleramilar> thanks for the chat, gotta go work.
13:36 < leterip> an example of my question: http://pastie.org/2177611
13:37 < zippoxer> but using &Foo{} you can specify values for Foo's
variables.
13:38 < Namegduf> Yes, that's what it's for.
13:39 < zippoxer> and array elements and map items
13:39 * Namegduf simply doesn't share the opinion that things would be friendly
for newbies if the only explanation of memory allocation in the spec was "Taking
the address of a composite literal (§Address operators) generates a pointer to a
unique instance of the literal's value."
13:40 < Namegduf> Somewhere in the middle of "Composite literals"
13:40 < gmilleramilar> I didn't actually say that, but if you want the last
word, it's yours.
13:40 < Namegduf> I wasn't talking to you
13:40 -!- bthomson [~bthomson@c-68-33-5-232.hsd1.va.comcast.net] has quit [Ping
timeout: 240 seconds]
13:41 < zippoxer> but you are now.
13:41 < zippoxer> kidding ;)
13:42 -!- rlab [~Miranda@238-89-95-178.pool.ukrtel.net] has quit [Read error:
Connection timed out]
13:43 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
13:44 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
13:44 -!- ancientlore [~ancientlo@63.76.22.10] has joined #go-nuts
13:49 -!- markcol [~markcol@c-71-231-198-105.hsd1.wa.comcast.net] has joined
#go-nuts
13:49 -!- bthomson [~bthomson@c-68-33-5-232.hsd1.va.comcast.net] has joined
#go-nuts
13:50 < GS> I am writing to a file using gob.  On reading the file iam
getting a nill Rec object .see http://pastie.org/2177670.
13:50 < GS> any help?
13:55 -!- markcol [~markcol@c-71-231-198-105.hsd1.wa.comcast.net] has quit [Remote
host closed the connection]
13:55 -!- markcol [~markcol@216.239.45.130] has joined #go-nuts
13:57 -!- hsoj [~Adium@96.47.210.2] has joined #go-nuts
13:57 -!- Project-2501 [~Marvin@82.84.69.10] has joined #go-nuts
13:57 < hsoj> any reason I would be getting "can't find import: C"?
13:58 < hsoj> google isn't returning anything pointing me in the right
direction
13:58 < exch> hsoj: Any file that has 'import "C"' should be ompiled by cgo,
not by the regular go compilers.
13:58 < hsoj> ah
13:58 < exch> add it to the the CGOFILES var in the Makefile instead of
GOFILES
13:59 < exch> "C" is not an actual package.  it's a special case name
recognized by cgo
13:59 < hsoj> gotcha
13:59 < hsoj> makes sense
13:59 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-167-112.clienti.tiscali.it] has
quit [Read error: Operation timed out]
14:00 < hsoj> ty for saving me the time for hunting that one =)
14:00 < exch> heh np
14:02 -!- wjlroe [u1877@gateway/web/irccloud.com/x-nennfrfnglfonejy] has left
#go-nuts []
14:07 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
14:08 -!- JimPeak [~lejimpeak@modemcable213.208-160-184.mc.videotron.ca] has
joined #go-nuts
14:10 -!- molto_alfredo [~molto_alf@142.176.0.21] has joined #go-nuts
14:11 -!- markcol [~markcol@216.239.45.130] has quit [Quit: markcol]
14:12 -!- franciscosouza [~francisco@201.19.106.131] has quit [Quit:
franciscosouza]
14:13 < skelterjohn|work> wow - the make/new thread exploded
14:14 < nicka1> Can I get the link?
14:14 < Namegduf> Rabble rabble rabble.
14:14 < Namegduf> And yes, it did.
14:14 < Namegduf> Usually I stay out of them but I think the word
"inconsistency" gets to me too much.
14:15 < skelterjohn|work> what's your google groups name?
14:16 < skelterjohn|work> nicka1:
https://groups.google.com/d/topic/golang-nuts/sn7xrYBr16c/discussion
14:17 < pharris> See also:
http://code.google.com/p/go/source/detail?r=8818ac606e92
14:17 < nicka1> Thanks
14:17 < skelterjohn|work> haha :)
14:18 < Namegduf> skelterjohn|work: namegduf@gmail.com
14:18 < skelterjohn|work> you post to the go-nuts group under that?
14:18 < skelterjohn|work> i don't htink i've seen it
14:19 < Namegduf> On occasion.
14:19 < Namegduf> On this case it was to complain about people complaining
about reference types in the built-ins
14:19 < Namegduf> By pointing out that reference types exist amongst
user-defined types, and knowing whether a type is one or not is a general problem
shared in all languages.
14:20 -!- hsoj_ [~josh@66.54.185.139] has joined #go-nuts
14:20 < skelterjohn|work> -10 on my redit post
14:22 -!- franciscosouza [~francisco@201.19.106.131] has joined #go-nuts
14:24 -!- _nil [~ct@c-67-189-251-116.hsd1.ct.comcast.net] has joined #go-nuts
14:25 -!- _nil [~ct@c-67-189-251-116.hsd1.ct.comcast.net] has quit [Client Quit]
14:25 -!- ct_ [~ct@c-67-189-251-116.hsd1.ct.comcast.net] has joined #go-nuts
14:27 -!- franciscosouza [~francisco@201.19.106.131] has quit [Quit:
franciscosouza]
14:28 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
14:36 < kergoth_> skelterjohn|work: <3 gb
14:36 < skelterjohn|work> :)
14:38 < JimPeak> About gb: I have 4 directories.  1 is a package compiled to
.a, the 3 others meant to be executables, although they're compiled to .a library
files.  Each of the three dirs contains a single Go source file containing a main
function, referring (successfully) to the first dir target.  Does the packages
have to be named 'main' to be recognized as runnable by gb?  Or did I miss
something ?
14:39 < Namegduf> I think it does in general.
14:39 < Namegduf> I'm prety sure the way Go works is to invoke main.main()
14:39 < Namegduf> *pretty
14:40 < skelterjohn|work> yes to everything said
14:40 < JimPeak> Ok, thanks a lot
14:41 < JimPeak> and great tool btw
14:41 < skelterjohn|work> gb will treat a source directory as a runnable
target if all source files within have package main
14:41 < skelterjohn|work> thanks
14:41 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts
14:41 < skelterjohn|work> if the package has one source file that isn't
main, it will treat it as a package and ignore those other sources - sometimes
people put in little example programs that should be ignored
14:42 < skelterjohn|work> also gb ignores the package "documentation"
14:42 < skelterjohn|work> i had to learn all sorts of conventions that i
have no use for outside writing gb
14:43 -!- foocraft_ [~ewanas@89.211.136.69] has joined #go-nuts
14:43 -!- Project_2501 [~Marvin@82.84.89.83] has joined #go-nuts
14:44 < zippoxer> you wrote gb firstly for yourself?
14:44 < skelterjohn|work> yes
14:45 < skelterjohn|work> i have a set of about 20 packages that work
together for my research, with interdependencies, and i had a build.sh script to
invoke the makefiles in order
14:45 < skelterjohn|work> to make sure it linked properly
14:45 < skelterjohn|work> took forever
14:46 < JimPeak> time saver for makefile idiot like me, after years of .net
14:46 -!- Project-2501 [~Marvin@82.84.69.10] has quit [Ping timeout: 258 seconds]
14:46 < skelterjohn|work> goinstall can do similar things these days (it
couldn't when i wrote gb), but i find gb easier to use
14:46 -!- foocraft [~ewanas@89.211.209.117] has quit [Ping timeout: 240 seconds]
14:46 < kergoth_> i'm a buildsystem guy, actually, live and breathe
makefiles and stuff, but its still a time saver not having to keep a template
package around.  just get straight to the code
14:47 < skelterjohn|work> i'm biased, obviously
14:47 < zippoxer> i guess cgo support made gb so complicated?
14:47 < skelterjohn|work> is gb that complicated?  what do you mean?
14:47 < zippoxer> i mean big :P
14:47 < zippoxer> the code is not just few lines
14:47 < zippoxer> as i once tought a build tool should be.
14:48 < zippoxer> thought*
14:48 < skelterjohn|work> gb does a lot of extra stuff that you probably
don't need
14:48 < skelterjohn|work> each of those extra bits needs some source
14:48 < skelterjohn|work> the cgo part wasn't that bad
14:48 < zippoxer> oh
14:48 < skelterjohn|work> just cgo.go
14:49 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
14:49 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Quit:
Leaving.]
14:50 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
14:53 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
14:54 -!- Project-2501 [~Marvin@82.84.68.158] has joined #go-nuts
14:54 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
14:55 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
14:56 -!- franciscosouza [~francisco@201.19.106.131] has joined #go-nuts
14:57 -!- Project_2501 [~Marvin@82.84.89.83] has quit [Read error: Operation timed
out]
14:59 -!- Slant [~scott@ppp118-209-153-219.lns20.mel6.internode.on.net] has quit
[Quit: Slant]
15:00 -!- Project_2501 [~Marvin@82.84.71.4] has joined #go-nuts
15:02 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has joined #go-nuts
15:03 -!- Project-2501 [~Marvin@82.84.68.158] has quit [Ping timeout: 240 seconds]
15:05 < jnwhiteh> skelterjohn|work: got my tool working:
http://paste.pocoo.org/show/432326/
15:05 < skelterjohn|work> remind me what you were doing?
15:05 < skelterjohn|work> something about finding everything of the right
type
15:06 -!- Project-2501 [~Marvin@82.84.88.64] has joined #go-nuts
15:07 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout:
240 seconds]
15:08 -!- pjacobs [~pjacobs@66.54.185.133] has joined #go-nuts
15:09 -!- hargettp_ [~hargettp_@dhcp-161.mirrorimage.net] has joined #go-nuts
15:09 -!- hargettp_ [~hargettp_@dhcp-161.mirrorimage.net] has left #go-nuts []
15:09 -!- leterip [~textual@ip72-218-115-129.hr.hr.cox.net] has quit [Read error:
Operation timed out]
15:09 -!- Project_2501 [~Marvin@82.84.71.4] has quit [Ping timeout: 240 seconds]
15:10 < jnwhiteh> skelterjohn|work: yeah
15:10 < jnwhiteh> so that's given me all instances where I touch a
Superblock type
15:11 -!- sacho [~sacho@87-126-7-117.btc-net.bg] has quit [Ping timeout: 240
seconds]
15:11 < skelterjohn|work> oh and it's to do with your genetic programming
stuff, right?
15:12 -!- Natch [~natch@178.73.217.178] has joined #go-nuts
15:12 -!- Natch| [~natch@178.73.220.205] has quit [Ping timeout: 260 seconds]
15:12 < jnwhiteh> no, actually, has to do with verifying mutexes
15:12 -!- hsoj [~Adium@96.47.210.2] has left #go-nuts []
15:13 < skelterjohn|work> oh interesting
15:13 < kergoth_> minixfs?
15:13 < kergoth_> ah, right
15:13 < skelterjohn|work> at a recent conference I spoke to a guy whose lab
did stuff to verify that race conditions wouldn't occur
15:14 < skelterjohn|work> basically, trying to order mutex operations in
such a way that behavior became undefined
15:15 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-174-75.clienti.tiscali.it] has
joined #go-nuts
15:15 -!- AndyP [~andyp@ubuntu/member/andyp] has quit [Quit: leaving]
15:17 -!- sacho [~sacho@87.126.39.0] has joined #go-nuts
15:17 -!- Project-2501 [~Marvin@82.84.88.64] has quit [Ping timeout: 240 seconds]
15:19 -!- rlab [~Miranda@238-89-95-178.pool.ukrtel.net] has joined #go-nuts
15:19 -!- ccc1 [~Adium@114-45-84-113.dynamic.hinet.net] has quit [Quit: Leaving.]
15:24 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-163-171.clienti.tiscali.it] has
joined #go-nuts
15:25 -!- franciscosouza [~francisco@201.19.106.131] has quit [Quit:
franciscosouza]
15:26 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
15:26 -!- leterip [~textual@ip72-218-115-129.hr.hr.cox.net] has joined #go-nuts
15:26 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
15:27 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-174-75.clienti.tiscali.it] has
quit [Read error: Operation timed out]
15:28 < erus`> https://github.com/tm1rbrt/bitcoinrpc :D
15:28 < erus`> how do i tell go not to put a semi colon at the end of a
line?
15:30 < skelterjohn|work> you make it not end with an identifier
15:30 < skelterjohn|work> or some other things - i don't remember the rule
exactly
15:30 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-166-119.clienti.tiscali.it]
has joined #go-nuts
15:30 < erus`> a := \n b
15:30 < skelterjohn|work> don't do that
15:30 < erus`> i want that to work
15:30 < skelterjohn|work> i don't think there is a way to do that
15:30 < leterip> dont fight gofmt
15:31 < erus`> one of my lines goes over 80 chars :'(
15:31 < kergoth_> so?
15:31 < skelterjohn|work> there are places to split it other than after the
=
15:31 < leterip> this isnt python
15:31 < kergoth_> there are people who care about the 80 char boundary
nowadays?
15:31 < kergoth_> i can't remember the last time i used a window less than
112 chars wide, myself
15:31 < erus`> yeah i like more than one window horizontaly
15:31 < kergoth_> so do i
15:32 < skelterjohn|work> erus`: pastebin the line that's too long
15:32 < erus`> really...
15:32 < erus`> pastebin one line
15:32 < skelterjohn|work> it's really long
15:32 < skelterjohn|work> apparently
15:32 < erus`> 82 chars
15:32 < erus`> well 85
15:32 < skelterjohn|work> use your judgement
15:32 < erus`> blankTestRequest := `{"jsonrpc": "1.0", "id":"", "method":
"help", "params": [] }`
15:32 -!- dforsyth [~dforsyth@ec2-50-18-22-230.us-west-1.compute.amazonaws.com]
has joined #go-nuts
15:33 < skelterjohn|work> oh it's a string
15:33 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-163-171.clienti.tiscali.it] has
quit [Ping timeout: 246 seconds]
15:33 < skelterjohn|work> http://pastebin.com/eKLk2rhP
15:34 < erus`> thanks skelterjohn.  also the other day i had a function that
was longer than 80 lines
15:34 < erus`> char*
15:34 < skelterjohn|work> or http://pastebin.com/1r7k9PsN
15:34 < skelterjohn|work> that seems like a poorly named function
15:36 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-154-131.clienti.tiscali.it] has
joined #go-nuts
15:36 < erus`> it was the arguements and return type
15:37 < erus`> and i couldnt split them across lines
15:38 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Quit:
ChatZilla 0.9.87 [Firefox 5.0/20110615151330]]
15:39 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has joined
#go-nuts
15:39 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-166-119.clienti.tiscali.it]
has quit [Ping timeout: 264 seconds]
15:44 < rael_wiki> hello everybody
15:44 < skelterjohn|work> hi
15:45 < zippoxer> hello
15:45 < rael_wiki> is there anywhere a deeper description of the netchan
package?  I read this one http://golang.org/pkg/netchan/ but I just don't know
where to start.  A rapid google search didn't lead me anywhere...
15:46 < skelterjohn|work> what's going wrong?
15:46 < skelterjohn|work> are you trying to figure out how to use it, or do
you want a better understanding of how its implemented?
15:47 < rael_wiki> mainly I want to figure out how to use it
15:47 -!- Project_2501 [~Marvin@82.84.99.160] has joined #go-nuts
15:47 < rael_wiki> then I may be interested in the implementation too
15:47 < skelterjohn|work> i bet there are some _test.go files in the netchan
package that you can take a look at
15:48 < kergoth_> there was a thread on the mailing list just like last week
with someone asking for an example
15:48 < kergoth_> which someone provided
15:48 < kergoth_> search the google group
15:49 < rael_wiki> skelterjohn|work: where can I find the _test.go files?
15:49 < zippoxer> http://golang.org/src/pkg/netchan/
15:49 < rael_wiki> kergoth_: thanks I'm going to check it
15:49 < rael_wiki> zippoxer: thanks
15:50 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
15:50 < zippoxer> np
15:50 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-154-131.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
15:51 -!- Skola [~bas@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has quit [Ping timeout:
260 seconds]
15:51 < kergoth_> rael_wiki:
https://groups.google.com/forum/#!topic/golang-nuts/DohxeVIP5M4 is the thread i
mentioned
15:51 * kergoth_ should really use google groups more, the new interface is lovely
15:51 < skelterjohn|work> has it switched to be the default, now?
15:51 < skelterjohn|work> i've been using it for a while
15:52 < rael_wiki> kergoth_: thanks a lot
15:52 < kergoth_> not sure, i switched to it the other day
15:52 < kergoth_> rael_wiki: np
15:53 -!- Skola [~bas@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has joined #go-nuts
15:53 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
15:53 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-148-201.clienti.tiscali.it] has
joined #go-nuts
15:54 -!- rlab [~Miranda@238-89-95-178.pool.ukrtel.net] has quit [Ping timeout:
240 seconds]
15:55 -!- yogib [~yogib@131.234.59.64] has quit [Quit: yogib]
15:55 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
15:56 < Skola> anybody know a published other than pragprog that let's you
buy programming-related ebooks with paypal?
15:57 < Skola> publisher*
15:57 -!- Project_2501 [~Marvin@82.84.99.160] has quit [Ping timeout: 276 seconds]
15:58 < zippoxer> stupidest stackoverflow answer i've ever seen:
http://stackoverflow.com/questions/6605051/performance-focused-desktop-program-ruby-or-go/6609376#6609376
15:58 < zippoxer> how stupid one can be?
15:58 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
15:59 < Skola> what is stupid about it?
16:00 < Skola> to me not the idea of comparing go with ruby for performance
16:00 < Skola> but for wanting to do image manip with ruby
16:00 < zippoxer> "A desktop program should be written in Python." - that's
just a taste of stupidness.
16:00 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
16:00 < zippoxer> ohh and more: "I can't imagine how writing it in C or Go
will make it visibly faster given that all your GUI libraries will be in C
anyway."
16:01 < Skola> lol
16:01 < Skola> yeah that's hilarious
16:01 < zippoxer> and the man understands in the programming area, that's
the sad part.
16:01 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-148-201.clienti.tiscali.it] has
quit [Ping timeout: 250 seconds]
16:02 < Skola> he's interested in system programming, or so it says in his
bio
16:03 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Read
error: Connection reset by peer]
16:03 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
16:04 -!- photron [~photron@port-92-201-67-130.dynamic.qsc.de] has quit [Ping
timeout: 240 seconds]
16:05 < zozoR> well i can agree to some point, that most desktop programs
might as well be written in python
16:06 < zippoxer> he said "should".
16:06 < zozoR> GUI is like, import gui gui.PleaseDoThisForMe()
16:06 < zozoR> and then you have nice gui
16:06 < zippoxer> and most desktop programs are written in C++ :\
16:06 < zippoxer> yeah pretty much the same in most langs if you use a
designer.
16:07 < zozoR> true :P
16:07 < zozoR> itll be awesome when go can wrap C++ stuff :D
16:07 < zippoxer> can't it?  :P
16:07 < zozoR> nope
16:07 < zozoR> only c
16:07 < zippoxer> omg?  :\
16:08 < zippoxer> i thought cgo is..
16:08 < zozoR> is C
16:08 < zozoR> >.>
16:08 < zippoxer> :\
16:08 < zozoR> D:
16:08 < zozoR> why would people make GTK library instead of Qt? because GTK
is in C and Qt C++ :P
16:08 < Namegduf> Go can wrap C++ stuff
16:08 < Namegduf> Using SWIG
16:08 < zippoxer> lol so you have to write a C wrapper to C++ or what?
16:08 < Namegduf> I believe so, anyway.
16:09 < Namegduf> Go to C to C++ can also work, yeah.
16:09 -!- cmike_ [~mcrosby@adsl-99-75-50-144.dsl.bltnin.sbcglobal.net] has joined
#go-nuts
16:09 < zozoR> roflcopter
16:09 * Namegduf doesn't like Qt for the startup times.
16:10 < Namegduf> A guy who knows more about Qt than me blames the Linux
linker for not being able to handle the massive number of symbols their use of
templates generates
16:10 < Namegduf> (At speed)
16:10 < zozoR> why cant it all be loaded into the ram and no startup time
16:10 < Namegduf> Dynamic linking requires runtime linking
16:10 < Namegduf> Well, linking at startup.
16:11 < Namegduf> 's just the way it works.
16:11 < kergoth_> Linkers & Loaders by John R. Levine is a pretty good book
on the subject
16:11 < Namegduf> Thanks for the recommendation.
16:12 * Namegduf doesn't know much about the area, really
16:12 < zozoR> :/ dynamic linking is bad xD
16:12 < kergoth_> not particularly
16:13 < Namegduf> I agree, really.  The introduction of errors is really
unusual nowadays
16:13 < Namegduf> Due to package management and whatnot
16:13 < kergoth_> we've seen the perils of excessive static linking when
zlib had its security problems, linux distros had to scramble
16:13 < kergoth_> heh
16:13 < Namegduf> kergoth_: I don't think "have to issue a rebuild, update
many packages" is that much more onerous than "update the zlib package"
16:14 < Namegduf> I mean, obviously there's an advantage there, but I don't
think it's worth the complexity of dynamic linking in a system.
16:14 -!- cmike_ [~mcrosby@adsl-99-75-50-144.dsl.bltnin.sbcglobal.net] has quit
[Quit: cmike_]
16:14 < Namegduf> Even without sending only changes rather than whole new
packages, which is something package management right now is bad at.
16:14 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
16:15 < Namegduf> I wouldn't call it a peril, anyway.
16:15 < kergoth_> first, not all distro buildsystems are as capable as i
think you hope they are :
16:15 < Namegduf> The current processes are optimised for dynamic linking,
yes.
16:15 < Namegduf> I don't think it's fair to factor that into the
comparison.  They can change.
16:16 < kergoth_> space is a concern as well, particularly in embedded
systems
16:16 < Namegduf> Ehh.
16:16 * kergoth_ lives and breathes embedded linux
16:16 < Namegduf> I'll take your word for it, then, that it's significant
there.
16:16 < Namegduf> I'm not convinced it's that big a win on typical machines,
though.
16:17 < Namegduf> There's been lots of comparisons of little utility
programs proving similar.
16:17 < Namegduf> And busybox seems to like static, although building
everything into one binary is sort of cheating
16:17 < kergoth_> a typical embedded linux system needs a hell of a lot more
than busybox nowadays
16:17 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
16:17 < kergoth_> particularly ones with displays
16:21 -!- GS [~gsv@108-61-238-49.southernonline.net] has quit [Remote host closed
the connection]
16:28 -!- dlowe1 [~dlowe@c-66-30-116-162.hsd1.ma.comcast.net] has quit [Quit:
*poof*]
16:29 -!- erus` [~chatzilla@host86-162-245-90.range86-162.btcentralplus.com] has
joined #go-nuts
16:30 -!- virtualsue [~chatzilla@nat/cisco/x-zqdxkrrxifishasi] has quit [Quit:
ChatZilla 0.9.87 [Firefox 4.0.1/20110413222027]]
16:32 -!- chanwit [~chanwit@49.48.84.3] has joined #go-nuts
16:32 -!- yogib [~kaiser@dslb-188-100-015-022.pools.arcor-ip.net] has joined
#go-nuts
16:34 -!- erus` [~chatzilla@host86-162-245-90.range86-162.btcentralplus.com] has
quit [Quit: ChatZilla 0.9.87 [Firefox 5.0/20110615151330]]
16:34 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
16:34 -!- erus` [~chatzilla@host86-162-245-90.range86-162.btcentralplus.com] has
joined #go-nuts
16:35 -!- chanwit [~chanwit@49.48.84.3] has quit [Client Quit]
16:36 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:37 -!- chanwit [~chanwit@49.48.84.3] has joined #go-nuts
16:42 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
16:43 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Remote host closed the connection]
16:44 -!- tncardoso [~thiagon@150.164.2.20] has quit [Quit: Leaving]
16:44 -!- cmike_ [~mcrosby@99.75.50.144] has joined #go-nuts
16:50 -!- rlab [~Miranda@147-6-113-92.pool.ukrtel.net] has joined #go-nuts
17:00 -!- meling [~meling@cse-dhcp-10-91.ucsd.edu] has joined #go-nuts
17:00 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
17:01 < jessta> kergoth_: dynamically linked libraries tend to be large to
avoid the overhead of loading multiple small libraries at run time.  This means
that a program is unlikely to use all the functionality of a library it's linking
to.
17:02 < kergoth_> true.  you can get around that on systems with fixed
content through tools that analyze what's used and trim the shared libraries to
match, though
17:03 < skelterjohn|work> sounds complicated
17:03 < kergoth_> not really that different from what the linker can do at
build time, just after the fact.  agreed, though :)
17:03 < jessta> kergoth_: since you're doing that you could also create
static binries to match
17:04 < kergoth_> you could, but it depends on the use case.  using shared
libraries, i could use the same binary packages to construct multiple filesystems
without rebuilding, one of which is fixed, one of which is not, and supports
installation of further packages down the line
17:05 < kergoth_> build times get far from trivial when you're building
entire linux distributions, unfortunately
17:05 < jessta> which is the ideal case for dynamic linking to function as
advertised
17:08 -!- chanwit [~chanwit@49.48.84.3] has quit [Quit: Leaving.]
17:09 < jessta> if you build everything yourself and know what programs work
with what version of what libraries and ship that then it will work
17:09 < kergoth_> if you break abi compatibility, bump the minor version,
and therefore the soname.  not that difficult.  some upstreams, admittedly, don't
know a damn thing about proper versioning, unfortunately
17:10 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Quit:
pyrhho]
17:13 -!- photron [~photron@port-92-201-67-130.dynamic.qsc.de] has joined #go-nuts
17:13 -!- photron_ [~photron@port-92-201-67-130.dynamic.qsc.de] has joined
#go-nuts
17:13 -!- photron_ [~photron@port-92-201-67-130.dynamic.qsc.de] has quit [Remote
host closed the connection]
17:14 < jessta> yeah, and that's the problem.  Once you start having to deal
with other projects they eventually screw it up breaking things unexpectedly and
causing support nightmares
17:15 -!- robteix [~robteix@192.55.54.36] has quit [Quit: Leaving]
17:16 < jessta> which is why commerical software tends to ship it's own
version the std libs
17:16 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:f548:ebf4:72f4:826e] has quit
[Ping timeout: 255 seconds]
17:17 < kergoth_> yeah, true.  trying to ship portable binaries is a
gigantic pain in the ass
17:17 < skelterjohn|work> except with go
17:17 < kergoth_> the lsb tools are supposed to help with that, but the
tools suck
17:17 * kergoth_ nods
17:17 < jessta> especially in the case of Go where the std lib is changing
constantly
17:17 * kergoth_ has pretty much given up on linux machines as desktops, only uses
them for development
17:17 -!- franciscosouza [~francisco@201.19.106.131] has joined #go-nuts
17:18 < jessta> imagine dynamically linking to a library under constant dev
17:18 < leterip> is there a way to block until a net.TCPConn is closed?
http://pastie.org/2177611 is what im trying to achieve
17:18 < leterip> i guess i could pass in a channel too but i'd like to not
have to do that
17:18 < jessta> leterip: you could read from it
17:19 < leterip> jessta but i can't risk SomeHelper not getting all the data
from it
17:19 < leterip> it reads too
17:19 < jessta> so why have a goroutine
17:19 < jessta> ?
17:19 < pharris> You could SomeHelper (without go) and then go // maybe more
stuff after you conn.Close.
17:20 < leterip> its a contrived example
17:20 < jessta> ok, use a channel
17:20 < leterip> id just like to have the functionality of blocking until a
TCPConn is closed or finished or whatever
17:21 < skelterjohn|work> put something in between the connection and the
helper
17:21 < skelterjohn|work> whenever the something reads, it passes the data
along.  when it finds the EOF, it sends a message to whatever is listening
17:21 -!- tav [~tav@2.99.78.223] has joined #go-nuts
17:21 < leterip> yeah theres easy ways to do it with channels and stuff
17:22 < leterip> i guess thats really the only way to go about it
17:22 < skelterjohn|work> communication between goroutines is best done with
channels
17:22 < skelterjohn|work> it's simple that way
17:23 < leterip> it's surprising that net.TCPConn's dont have some function
to check if the connection is still active though
17:23 < leterip> there has to be some api
17:23 < leterip> i guess i should look at the internals to see what happens
when you try to Write() after it's Close()'d
17:24 -!- rlab [~Miranda@147-6-113-92.pool.ukrtel.net] has quit [Read error:
Connection reset by peer]
17:25 < leterip> it just checks to make sure it != nil and it.fd != nil,
both of which are internal :(
17:26 < erus`> anyone using bitcoin in here?
17:26 < leterip> jessta you could be correct.  i can try to read into an
empty slice and if it returns os.EINVAL it's closed
17:26 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has joined #go-nuts
17:28 < jessta> leterip: I don't think you can actually tell anything about
a file descripter unless you try to interact with it
17:29 < leterip> yeah but the way TCPConn wraps the file descriptor lets me
do that.  it seems terribly hackish so im probably just going to refractor
somewhere instead
17:30 -!- dgnorton [~dgnorton@97.65.135.112] has joined #go-nuts
17:30 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:10c2:ac95:cd31:168d] has joined
#go-nuts
17:31 -!- Skola [~bas@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has quit [Ping timeout:
258 seconds]
17:32 -!- franciscosouza [~francisco@201.19.106.131] has quit [Quit:
franciscosouza]
17:35 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
17:35 < dgnorton> Is there a way to set the console cursor position in go?
17:35 < aiju> yes
17:35 < aiju> but why would you do that
17:35 -!- franciscosouza [~francisco@201.19.106.131] has joined #go-nuts
17:35 < kergoth_> heh, probably just want a curses library if you're messing
with that sort of thing
17:35 < dgnorton> aiju: to update the same line?
17:36 < aiju> dgnorton: you can use \r to go back to the beginning of the
line
17:36 < kergoth_> couldn't you just emit a \r?
17:36 < kergoth_> aiju: :)
17:37 < dgnorton> is there a curses lib for go?
17:37 < aiju> probably
17:38 < skelterjohn|work> godashboard.appspot.com/project
17:38 < skelterjohn|work> most 3rd party go libraries are listed there
17:38 < skelterjohn|work> if one isn't, it's the author's fault
17:38 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:39 < dgnorton> thanks
17:44 -!- robteix [~robteix@nat/intel/x-mtouxqyafanodbya] has joined #go-nuts
17:50 -!- Skola [~bas@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has joined #go-nuts
17:51 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
17:57 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
17:57 -!- Project_2501 [~Marvin@82.84.65.60] has joined #go-nuts
18:05 -!- tav [~tav@2.99.78.223] has quit [Ping timeout: 255 seconds]
18:05 < kergoth_> i always forget where to put the ...
18:06 < kergoth_> keep having to check the docs
18:06 < kergoth_> someday it'll sink in, i hope
18:06 < aiju> write it on your hand
18:06 < kergoth_> hehe
18:06 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has quit [Quit:
ChatZilla 0.9.87 [Firefox 7.0a1/20110705030811]]
18:06 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
18:07 -!- slicslak [~slicslack@S010600212966ae5b.ed.shawcable.net] has quit [Quit:
Leaving]
18:09 -!- rlab [~Miranda@95-210-95-178.pool.ukrtel.net] has joined #go-nuts
18:10 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has joined #go-nuts
18:11 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
18:18 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
18:21 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts
18:25 -!- tav [~tav@92.20.95.247] has joined #go-nuts
18:35 < zozoR> kergoth_, ...T input T...  output :D remember it like that
18:36 < kergoth_> thanks, that might help :)
18:36 -!- leterip [~textual@ip72-218-115-129.hr.hr.cox.net] has quit [Quit:
Leaving...]
18:39 < skelterjohn|work> ...Type, or Value...
18:39 < zozoR> ...T...  schizophrenia
18:42 < aiju> just guess
18:42 < aiju> you'll be right 50% of the time
18:45 < Namegduf> Type follows name, ...  is in place of a name.  operators
on a value follow the value, ...  sort-of operates on a value.
18:45 < Namegduf> That's the way I remember it, anyway.
18:48 < skelterjohn|work> i'm not much for mnemonics
18:48 < skelterjohn|work> i just do it wrong until i do it right
18:51 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Remote host
closed the connection]
18:52 -!- unit3 [~Unit3@76.77.91.41] has joined #go-nuts
18:53 -!- ronnyy [~quassel@p4FF1C5F3.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
18:53 -!- Barbarossa [~max@rfc2324.org] has quit [Ping timeout: 246 seconds]
18:54 < unit3> Hey, does flag support alternate short and long forms for
flags like other languages' option parsers do?  or is there a more powerful option
parser that people recommend?
18:54 < aiju> thank god no
18:54 -!- keithcascio [~keithcasc@nat/google/x-hludphcsactpneag] has joined
#go-nuts
18:56 -!- franciscosouza [~francisco@201.19.106.131] has quit [Quit:
franciscosouza]
18:56 < unit3> errr...  I find that response confusing.  Care to elaborate?
:)
18:57 < kevlar_work> unit3, "flag" only supports [-]-option[[=][value]]
18:58 < kevlar_work> goopt supports getopt-like flags if you need that, but
you probably don't.
18:58 < aiju> i don't see the point in complicating your flag syntax to the
point of it doing turing complete
18:58 < skelterjohn|work> try goargcfg.googlecode.com
18:59 < unit3> aiju: I'm not looking for that.  Just sometimes it's nice to
have both a short and long form of a flag.  that's really all I'm after.
18:59 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 246 seconds]
18:59 < skelterjohn|work> though, goargcfg is probably not what you want
18:59 < aiju> well, i don't see the point
18:59 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
18:59 < kevlar_work> unit3, it turns out that it's often best to have common
options be short and easy-to-remember and other arguments be long and clear
18:59 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has quit [Ping timeout:
250 seconds]
19:00 < unit3> kevlar_work: that's fair.  I was mostly just curious if I'd
missed something obvious in the flag package.
19:01 < unit3> I've seen situations where the obvious short flag for
different options ends up being the same letter, so having more descriptive long
options in addition ends up being helpful.  however, I'm not nearly at that point
yet.  ;)
19:01 < kevlar_work> you'll find that the stdlib packages are mercifully
terse and relatively inflexible in- and of themselves
19:02 < kevlar_work> but they tend to provide you with what you need to
build up more complicated functionality with a minimum of headache.
19:02 < unit3> Yeah, I'm seeing that.  It definitely makes it easier to
learn and use the standard libs though, so I generally appreciate it.
19:02 < unit3> for sure.
19:02 < aiju> the stdlib is nice, simple and sane
19:02 < kevlar_work> the easiest way to do aliases is to, before you call
flag.Parse, edit os.Args and switch "-s" to "--silent"
19:02 < aiju> that's how i'd phrase it
19:03 < kevlar_work> but caveat emptor; that can cause some unexpected
things to happen.
19:03 < unit3> kevlar_work: oh yeah, that's simple and sensible.  good
suggestion.  like I said, I don't need it yet, but I was curious.
19:04 < skelterjohn|work> you can tell the flag package to parse an
arbitrary []string, can't you?
19:04 < kevlar_work> one thing I love about the flag package is that any
package compiled into your program can define command-line flags :D
19:04 < skelterjohn|work> so you can make a copy, do your replacements, and
not screw anything else up
19:04 < aiju> kevlar_work: good grief
19:04 < aiju> kevlar_work: this sounds like an invitation to Xlib insanity
19:04 < skelterjohn|work> yeah i'm gonna go out on a limb and *not* like
that :)
19:04 < kevlar_work> hehehehe.
19:04 < aiju> i think kdelib does it to
19:04 < aiju> *too
19:05 < kevlar_work> sarcasm in text works so well.
19:05 < aiju> life is too short to know all X11 options
19:05 < kevlar_work> rofl.
19:05 < kevlar_work> but in all honesty, I do like that I can define flags
in global scope in each file of my main package if necessary
19:06 < kevlar_work> I don't typically leave them there if they go live, but
it's nice for one-off flags during debugging and for if e.g.  you want to include
cpu profiling flags in a separate file and just remove that file in the makefile
when you build for deployment.
19:07 < unit3> My other question is, what about flags like -v, where you
don't want an argument, you just want it to do something internally when the flag
is set.  Is that something else that's not really handled by the flag package?
19:07 < aiju> kevlar_work: i'm not criticising the feature, even
19:07 < aiju> kevlar_work: sure sounds handy
19:07 < unit3> or am I just missing the obvious way to do it?  :)
19:07 < skelterjohn|work> flag.Args() will skip the flags and just give you
the args
19:07 < aiju> unit3: boolean flag
19:08 < skelterjohn|work> oh
19:08 < skelterjohn|work> yes
19:08 < skelterjohn|work> if you want an answer to your actual "question"
19:08 < unit3> haha
19:08 < aiju> he might want an answer to his questions
19:08 < aiju> amazing.
19:09 < unit3> meh, a lot of this is just curiosity, I'm enjoying the
discussion too.  ;)
19:09 < skelterjohn|work> generally i feel that people will be better off
listening to what i have to say than to what they want to hear :)
19:09 < unit3> so, do you just do flag.Bool("v", false, "verbosity), and
then it'll set it to true if flag is present?
19:09 < skelterjohn|work> yes
19:09 < unit3> perfect.
19:12 -!- rlab [~Miranda@95-210-95-178.pool.ukrtel.net] has quit [Read error:
Connection reset by peer]
19:13 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Read error:
Connection reset by peer]
19:13 -!- tncardoso [~thiago@189.59.128.192.dynamic.adsl.gvt.net.br] has joined
#go-nuts
19:14 -!- gnuvince|work [8e544424@gateway/web/freenode/ip.142.84.68.36] has quit
[Quit: Page closed]
19:20 -!- Adys_ [~Adys@unaffiliated/adys] has quit [Ping timeout: 240 seconds]
19:21 < kergoth_> hmm, okay, if a type has non-public members, callers from
other packages have to refer to them only via pointers, correct?  otherwise it
tries to construct it implicitly and yells loudly
19:22 < skelterjohn|work> yes
19:22 < kergoth_> okay, figured that was the case after some
experimentation, but wanted to be certain.  thanks
19:24 < zozoR> oh didnt know that, neat
19:26 -!- serverhorror [~martin@krlh-5f721ee4.pool.mediaWays.net] has joined
#go-nuts
19:27 < nicka1> Are there any docs/books for Go other than the documentation
on go-lang.org?
19:28 < nicka1> I didn't know about that little gotcha either
19:28 < serverhorror>
http://www.amazon.com/Go-Programming-John-P-Baugh/dp/1453636676
19:29 < skelterjohn|work> unfortunately any book about go is bound to be
outdated by the time you finish reading it
19:30 < aiju> i haven't seen a good go book yet
19:30 < nicka1> That is what I read, just curious
19:31 < skelterjohn|work> the reviews for that book on amazon are pretty
harsh
19:32 < serverhorror> are there any packages that will let me use some
messaging middleware.  I've seen discussions about AMQP on the mailing list but I
haven't found a nice combination of "install server and don't care
anymore"+"install package and just use it".  I don't really care about the kind of
messaging I just want to be able to receive message with other languages...hence
AMQP is the first that comes to my mind
19:32 < aiju> messaging middleware as in dbus?
19:32 < serverhorror> yes but networked.  dbus is for a single host only
afaik
19:34 < jessta> dbus has networking, but nobody seems to use it
19:35 < uriel> dbus has everything
19:35 < uriel> and does nothing
19:36 < jessta> serverhorror: there are zeromq bindings
19:36 -!- Kahvi [~Kahvi@a91-152-177-58.elisa-laajakaista.fi] has joined #go-nuts
19:38 < serverhorror> I'm looking at github.com/alecthomas/gozmq now
19:41 < zozoR> when people critisize Go, what are they attacking?
19:42 < aiju> not enough OOP bloat
19:42 < aiju> no generics
19:42 < skelterjohn|work> their own fallibility
19:42 < KirkMcDonald> No exceptions.
19:42 < aiju> garbage collection
19:42 < skelterjohn|work> people want it to be the language they're used to
using with different syntax
19:42 < skelterjohn|work> instead of a different language
19:42 < KirkMcDonald> And the consequent manual error handling.
19:42 < aiju> too fast compile times
19:42 < aiju> no time to play doom during compiles
19:43 < nicka1> Don't they usually complain about new and make?
19:43 < aiju> hahahaha
19:43 < zozoR> seriously, who whines about that
19:43 < aiju> i thought serious complaints
19:43 < zozoR> i should slap them
19:43 < skelterjohn|work> heh
19:43 -!- dfr|mac [~dfr|work@nat/google/x-qlirzrxzzxyknpki] has joined #go-nuts
19:43 < serverhorror> you can't load stuff at runtime so a plugin system
isn't possible where you just drop stuff in some directory
19:43 < skelterjohn|work> (yet)
19:43 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
19:43 < zozoR> why the yet?
19:43 < skelterjohn|work> because it may happen one day?
19:43 -!- dfr|mac [~dfr|work@nat/google/x-qlirzrxzzxyknpki] has quit [Remote host
closed the connection]
19:43 < jessta> skelterjohn|work: they want the same syntax too, but they
want their language to be new and from Google
19:44 < smw> jessta, they want it to be just like [insert language here]
except compiled, really fast, and magically concurrent.
19:45 < zozoR> so basicly: no methodoverloading/polymorphisme, no generics,
garbage collection and no runtime loading of stuff -- that is what the dont like?
19:45 < aiju> favourite languages: python, ruby
19:45 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has left #go-nuts []
19:45 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
19:45 < aiju> zozoR: and the syntax
19:45 < zozoR> what, the syntax is awesome?
19:45 < aiju> well
19:45 < exch> They all love Go, except the bits that are like Go
19:45 < aiju> people complain about it
19:45 < jessta> people don't like {}
19:46 < aiju> people don't like Go being reversed to C
19:46 < smw> aiju, what does that mean?
19:46 < aiju> var i int
19:46 < aiju> as opposed to int i;
19:46 < Namegduf> Pascal-style variable declarations
19:46 < smw> aiju, oh yea, stuff like that still ticks me off
19:46 < Namegduf> Not something that matters as a metric of language quality
19:46 < skelterjohn|work> "go being reversed to C" does not mean that, fyi
19:46 < skelterjohn|work> maybe a german-ism
19:46 < smw> aiju, there are too many things they do that it looks like they
did just to be different...
19:47 < dlowe> I'd be more interested in what you have to complain about Go,
aiju
19:47 < aiju> skelterjohn|work: not really
19:47 < aiju> hhaa
19:47 < Namegduf> smw: There's a decent explanation of why they did variable
declarations that way.
19:47 < zozoR> the C spiral
19:47 < zozoR> :D
19:47 < dlowe> unless it's a perfect gem of flawless quality
19:47 < serverhorror> If I had one thing to choose, I'd like the pkg docs to
be more linked, like "interface foo this is implemented by: bar, baz" (and the
other way around, mentioning all the interfaces something implements)
19:47 < smw> Namegduf, interesting.  I would love to here it :-).
19:47 < skelterjohn|work> serverhorror: that has come up - but it would be
misleading
19:47 < Namegduf> smw: In short, declarations in C are supposed to look like
the way variables are used.  This is utterly mad for complex types.
19:48 < Namegduf> Especially function pointers and whatnot.
19:48 < Namegduf> The C spiral and whatnot in how to read them.
19:48 < aiju> the most complex C type i've ever used in a real program was
19:48 -!- cmike_ [~mcrosby@99.75.50.144] has quit [Quit: cmike_]
19:48 < aiju> void (*array[10])();
19:48 < Namegduf> smw: Go, instead, didn't try for that.
19:49 < skelterjohn|work> aiju: function pointers?
19:49 < aiju> skelterjohn|work: yeah
19:49 < skelterjohn|work> oh wait, that's a function pointer?
19:49 < serverhorror> skelterjohn: how is that misleading?
19:49 < skelterjohn|work> i was saying that a funciton pointer might look
more complicated
19:49 < aiju> it's an array of ten function pointers
19:49 < skelterjohn|work> lol
19:49 < aiju> [10]func() in Go
19:49 < skelterjohn|work> serverhorror: because something can satisfy an
interface without meaning to
19:50 < skelterjohn|work> and using it where that interface is expected
would be wrong
19:50 < zozoR> (which is awesome)
19:50 -!- pjacobs [~pjacobs@66.54.185.133] has quit [Read error: Connection reset
by peer]
19:50 < Namegduf> smw: The Go rules are nice and simple and easy to read for
even composite types, while C's...  are pretty awful.
19:50 -!- pjacobs [~pjacobs@66.54.185.133] has joined #go-nuts
19:51 < smw> Namegduf, ok.  One thing I really like go is that I can read
the spec :-)
19:51 < Namegduf> Go's also handle pointers more sensibly
19:51 < serverhorror> skelterjohn: hmmm isn't implementing an interface "by
accident" a feature of go -- of course by accident shouldn't be the rule but if it
does the API is out there anyway so people will use it
19:52 < Namegduf> In C, the * goes before the variable name, so int* x, y;
won't do what you expect.
19:52 < smw> Namegduf, right, it handles pointers by hiding them
19:52 < Namegduf> ...no?
19:52 < Namegduf> Go doesn't hide pointers at all.
19:52 < aiju> Go pointers are nice
19:52 < smw> It hides them in unsafe...
19:52 < aiju> not as powerful as C pointers
19:52 < Namegduf> No, it doesn't.
19:52 < aiju> and not as fucking retarded as C# references
19:52 < zozoR> xD
19:52 < Namegduf> Pointers are a first-class, perfectly normal, quite
commonly used type of types.
19:52 < smw> ok
19:52 < Namegduf> Unsafe is just the only way to convert one pointer to
another.
19:52 < Namegduf> Unsafely.
19:52 < smw> got it
19:53 < aiju> i miss C pointer arithmetic, but it's not something i can
seriously criticize
19:53 < Namegduf> In Go, "var x, y *int" will do what it looks like
19:53 -!- JimPeak [~lejimpeak@modemcable213.208-160-184.mc.videotron.ca] has left
#go-nuts []
19:53 < Namegduf> In C, "int* x, y;" will not, because part of the type is
specified in how each identifier is written.
19:53 < Namegduf> And * is one of those parts.
19:53 < zozoR> why isnt the start part of the int in C
19:54 < aiju> Namegduf: tbh i make use of that quite often
19:54 < skelterjohn|work> type A B; aBPointer = (*B)(anAPointer) works fine,
doesn't it?
19:54 < aiju> char c, *p;
19:54 < Namegduf> skelterjohn|work: No
19:54 < Namegduf> Oh, wait.
19:54 < Namegduf> That might.
19:54 < skelterjohn|work> :)
19:55 < exch> it will
19:55 < skelterjohn|work> but if it were type A { B } i think that would not
work
19:55 < Namegduf> smw: Can I suggest trying out writing some Go programs if
you want to learn about the language?
19:55 < aiju> is type A { B } even valid syntax
19:55 < Namegduf> Yes
19:55 < skelterjohn|work> +struct
19:55 < Namegduf> Er, with that added, yeah.
19:56 < aiju> there should be a newsletter
19:56 < aiju> with all changes to the go spec
19:56 < smw> Namegduf, I have made small stuff.  Still have not come up with
a project :-P
19:56 < zozoR> smw, do eulerprojects, the first 10 problems with go
19:56 < zozoR> and concurrency
19:56 < zozoR> then you can do the basics :D
19:57 < smw> I can do the basics
19:57 < smw> well, maybe not with concurrency :-P
19:57 < aiju> concurrency is difficult to master
19:57 < smw> yes
19:58 < zozoR> i wish i could figure out concurrency
19:58 < skelterjohn|work> helps you get currency
19:59 < zozoR> yeah -.-
19:59 * Namegduf is still trying to wrap his head around distributed system design
19:59 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
19:59 < kevlar_work> I've been writing Go for over a year and I still find
better ways to do concurrency.
20:00 < zozoR> then channels?
20:00 < zozoR> than*
20:00 < Namegduf> I think he means "design patterns"
20:00 < Namegduf> With channels.
20:00 < zozoR> meh, i dont get it for now
20:00 < kevlar_work> yeah, better and better design patterns, better and
better ways to design programs to be concurrent and readable, etc
20:00 < aiju> "design patterns"
20:01 < smw> I found python concurrency easier to get my head around than go
:-P.  Of course, that was only for simple job queues, nothing major.
20:01 < aiju> "design patterns" are concepts used by people who can't learn
by any method except memorization, so in place of actual programming ability, they
memorize "patterns" and throw each one in sequence at a problem until it works
20:01 < aiju> — Dark_Shikari
20:01 < smw> aiju, I completely disagree.
20:01 < skelterjohn|work> let's all make factories.
20:02 < aiju> no, factory factory interface creators
20:02 < smw> aiju, design patterns make code more readable...  sometimes
20:02 < aiju> don't you mean idioms?
20:02 < smw> aiju, aren't design patterns just idioms on a larger scale?
20:03 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Read error:
Connection reset by peer]
20:03 < jnwhiteh> kevlar_work: such as?
20:05 < smw> aiju, I expect a program which does NNTP and one which does
SMTP to have approximately the same API, correct?
20:05 < smw> aiju, there may be small differences, but you would expect
connecting + authentication to work about the same way
20:05 < aiju> this is an entirely different issue
20:05 < Namegduf> That doesn't relate to design patterns, which are classes
of approaches to implementation, not API.
20:05 < smw> ok
20:05 < Namegduf> And the answer is "only if one of the two authors saw the
other's work"
20:06 < smw> I meant you would want that to be the case :-).  Not that you
would expect it.
20:07 < aiju> i get my news via UUCP over a 28.8k modem line
20:07 < aiju> no clue what you mean
20:09 < Namegduf> Design patterns are loose ideas about how to make certain
categories of thing, second order tools typically gotten from experience in
solving problems.  I think that they shouldn't be treated as either solutions or
building blocks to solutions outright, and most people who are fans of using them
to solve problems typically abuse them as such.
20:09 < Namegduf> Many things published as "design patterns" are designed to
be used that way.
20:09 < skelterjohn|work> a class I TA'd seemed to treat them like that
20:09 < skelterjohn|work> it was very frustrating
20:10 < skelterjohn|work> i didn't really know how to teach it in a
meaningful way
20:10 < Namegduf> The result is needlessly pointlessly overcomplex systems
due to generic designs glued together and built into a huge thing to do the job
instead of a single, sensible design.
20:10 < aiju> most of design patterns seems to be OOP crap
20:10 < aiju> like "abstract factories"
20:10 < aiju> or "singletons" (hahahaha)
20:10 < Namegduf> Ick, I'd forgotten that class of design pattern.
20:10 < skelterjohn|work> the only problem with the "singleton" pattern is
someone thought it needed a name and an explanation
20:11 -!- huin [~huin@91.85.188.1] has joined #go-nuts
20:11 < Namegduf> Design "patterns" which are actually just suggestions on
how to work around a problem in a bigger design
20:11 < Namegduf> Via adding more design on top.
20:11 < aiju> skelterjohn|work: no, the pattern is idiotic
20:11 < Namegduf> i.e.  factories.
20:11 < aiju> global variables are evil
20:11 < skelterjohn|work> you never want to have exactly one shared instance
of something?
20:11 < aiju> just take a class and make all that shit static inside
20:11 < Namegduf> They CAN be right, usually they aren't.
20:11 < aiju> perfect!
20:11 < aiju> skelterjohn|work: that's not a singleton
20:12 < skelterjohn|work> that's what i thought a singleton was
20:12 < aiju> int x; // EVIL GLOBAL VARIABLE
20:12 < aiju> class Foo { static int x; } // GOOD SINGLETON
20:12 < skelterjohn|work> that is a caricature of a poor way to implement
singletons
20:12 < ment> i made up my own design patterns
20:12 < ment> my favorite is "steal someone else's code" pattern
20:12 < aiju> well, that's how they thought it to me
20:12 < Namegduf> aiju has a point
20:12 < aiju> *taught
20:13 < skelterjohn|work> your school sucks
20:13 < Namegduf> Singletons share all the typical negative qualities of
global variables
20:13 < aiju> skelterjohn|work: haha
20:13 < Namegduf> It's just that global variables used in a controlled way
are not that evil
20:13 < aiju> skelterjohn|work: read it on wikipedia
20:13 < aiju> IT'S EVEN WORSE THERE
20:13 < smw> ment, not very original.  Not even a new name :-P
20:13 < skelterjohn|work> wikipedia is not a good resource for programming
advice
20:13 < aiju> you have a private instance of a class
20:13 < aiju> and then have a static method
20:13 < crunge> global variables ~= goto
20:13 < aiju> to get an instance of it
20:13 < Namegduf> That sounds about right.
20:14 < aiju> global variables are okay in small programs
20:14 < crunge> to the processor, all variables are global and all jumps are
goto
20:14 < aiju> crunge: bs
20:14 < Namegduf> To the processor, variables don't exist.
20:14 < crunge> the problem is when developers don't understand what the
processor is doing
20:14 < skelterjohn|work> aiju: then presumably you could pass it to
something that needs an interface it implements
20:14 -!- pjacobs [~pjacobs@66.54.185.133] has quit [Quit: Leaving]
20:14 < skelterjohn|work> which you couldn't do it if were a bunch of
global/static var/methods
20:14 < crunge> variable/value in/referenced by a register
20:15 < Namegduf> Or by a location in memory
20:16 < Namegduf> I think the comparison isn't too interesting anyway,
because they're both so entirely different the problems of each don't really
connect.
20:16 < aiju> or by adding a value to a register
20:16 < aiju> and taking that as an address
20:16 < Namegduf> Any similarity in the results of their use is purely
coincidental.
20:16 < aiju> don't try to put processor addressing modes into a scheme
20:17 < crunge> what they share is the notion that they're inherently wrong
and that developers are incapable of using them correctly
20:17 < aiju> global variables aren't inherently wrong
20:17 < unit3> well, there are some things that, statistically, people seem
incapable of using correctly.  at least if buffer overflow attacks against
"modern" c/c++ apps are any indication.  ;)
20:18 < unit3> but yet, global variables are fine, IMO.
20:18 -!- fenicks [~fenicks@log77-3-82-243-254-112.fbx.proxad.net] has joined
#go-nuts
20:18 < unit3> erm s/yet/yes/, rather.
20:18 < aiju> tiny programs i write have shitloads of global variables
20:18 < aiju> if you design programs that they may eventually reach 1
million lines
20:18 < crunge> unit3: kind of a poor example.  How many times do you hear
about an application not being vulnerable to buffer overflows?
20:18 < aiju> you will end up with an overcomplicated design
20:18 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
20:18 < skelterjohn|work> crunge: when it's written in go
20:19 < unit3> heh
20:19 < unit3> exactly.
20:19 < unit3> sometimes language safety features are a good idea.
20:19 < aiju> unit3: cat(1) has no buffer overflow vulnerability
20:19 < skelterjohn|work> haha
20:19 < skelterjohn|work> i'd hope not
20:19 < unit3> hahaha
20:19 < aiju> i'm tired of program nowadays meaning 1 billion line
overcomplicated mess
20:19 < aiju> what happened to UNIX style?
20:19 < crunge> I'm totally with you.  And doesn't go give you the ability
with unsafe?
20:19 < skelterjohn|work> aiju: floods the $PATH space
20:19 < aiju> crunge: terreo unsafe et donas ferrentem
20:19 < crunge> aiju: they don't teach that in java classes
20:20 < skelterjohn|work> crunge: you can do anything with unsafe, including
buffer overflow stuff
20:20 < skelterjohn|work> but at least you have to try
20:20 < unit3> indeed.
20:20 < unit3> I like safe by default, force it if you know what you're
doing.
20:20 < skelterjohn|work> aiju: translation?
20:20 < aiju> grep unsafe *.go && echo "you're fired" | mail programmer
20:20 < aiju> skelterjohn|work: "i fear unsafe even if it brings presents"
20:21 < skelterjohn|work> ok...
20:21 < crunge> Yes.  That's the unix way.  Require a -f to delete
unwritable files, but give you the option to do so
20:21 < skelterjohn|work> fun saying
20:21 < skelterjohn|work> ?
20:21 < aiju> parody of "terreo danaos et donas ferrentes"
20:21 < skelterjohn|work> what's danaos?
20:21 < aiju> "i fear the greeks even if they bring presents"
20:21 < skelterjohn|work> ah
20:21 -!- zcram [~zcram@77-233-85-18.cdma.dyn.kou.ee] has joined #go-nuts
20:21 < aiju> reference to the trojan war
20:21 < skelterjohn|work> i got that
20:21 < skelterjohn|work> just not the ..  latin?
20:22 < crunge> we're all saying the same thing.  Certain things are easy to
screw up and it's a good idea to discourage those things but important to permit
them.
20:22 < unit3> indeed.
20:23 < skelterjohn|work> i bet it's hard to write buffer overflow bugs with
java, too
20:23 -!- pjacobs [~pjacobs@66.54.185.130] has joined #go-nuts
20:23 < unit3> it is.  but then you have to write java.
20:23 < skelterjohn|work> downsides to everything
20:23 < unit3> heheheh
20:23 < aiju> i haven't found a buffer overflow in my code yet
20:24 < aiju> but i'm probably not exercising heavy enough, lol
20:24 < skelterjohn|work> i wrote java for a long while...  it's a relief to
not have to create so much boilerplate for everything...  or to be able to code
outside of an IDE
20:24 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Remote host
closed the connection]
20:24 < unit3> for sure.
20:24 < erus`> reminds me of haskell
20:24 < unit3> especially with many other languages getting a lot better at
being cross platform, java is way down on my list of choices these days.
20:25 < aiju> java is not good at cross platform
20:25 < unit3> no.  it's not.
20:25 < aiju> java portability is a motherfucking joke
20:25 < erus`> aiju: not really
20:26 < erus`> look at minecraft
20:26 < erus`> one codebase
20:26 < aiju> it runs on how many operating systems
20:26 < aiju> three?
20:26 < aiju> oh wait four, solaris
20:26 < erus`> yeah
20:26 < unit3> so the four people care about then.  ;)
20:26 < aiju> it runs on how many architectures?
20:26 < erus`> 2
20:26 < skelterjohn|work> this is the server or the client?
20:26 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
20:26 < erus`> aiju: the vm is opensource
20:26 < aiju> i meant java
20:26 < erus`> people are free to port it
20:26 < aiju> haha
20:26 < skelterjohn|work> that sort of defeats the purpose
20:27 < aiju> i can compile plain ANSI C on virtually any machine in
existence
20:27 < skelterjohn|work> java, in theory, should be able to be compiled
once and then run on all the different platforms
20:27 < erus`> not on windows
20:27 < skelterjohn|work> since it runs in a VM
20:27 < erus`> without cygwin
20:27 < aiju> Dis code runs on a variety of architectures and systems
20:27 < aiju> erus`: uh huh?
20:27 -!- pjacobs [~pjacobs@66.54.185.130] has quit [Ping timeout: 255 seconds]
20:27 < aiju> erus`: i said ANSI, not POSIX
20:28 < erus`> yeah but how do you ship your C code?
20:28 < unit3> you can, but it doesn't behave exactly the same across
platforms, and ANSI C by itself is almost useless.
20:28 < erus`> with makefiles?
20:28 < zozoR> crosscompiling :3
20:28 < erus`> and then fill them with posix stuff like everyone else
20:28 < aiju> i have written C code which runs on the same architectures as
minecraft and it was not particularly annoying
20:29 < Husio> is strings.SplitN new function or it's gone in hg version?
20:29 < unit3> heh, I'd find it annoying, but I find C annoying in general.
20:29 < aiju> and still
20:29 < skelterjohn|work> Husio: new as of a few weeks ago
20:29 < aiju> 22:33 < aiju> Dis code runs on a variety of
architectures and systems
20:29 < crunge> graphics and sound are what make it a bear
20:29 < Husio> skelterjohn|work: thanks
20:29 < aiju> java is way beyond its potential
20:29 < aiju> crunge: SDL
20:30 < skelterjohn|work> Husio: SplitN does what Split used to do, Split
now is like calling SplitN with -1 as the max (meaning as many as possible)
20:30 < crunge> aiju: anecdotal, but why don't people use it for everything?
20:30 < skelterjohn|work> SDL has problems
20:31 < skelterjohn|work> #define main _SDL_MAIN
20:31 < skelterjohn|work> for one
20:31 < aiju> SDL is a mess, yes
20:31 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
20:31 < aiju> but it does its job
20:31 < crunge> s/SDL/Java/
20:31 < unit3> heheh
20:31 < aiju> except that java doesn't work
20:31 < erus`> try building sdl on windows
20:31 < skelterjohn|work> no thanks
20:32 < aiju> erus`: it's not much worse than using eclipse
20:32 < skelterjohn|work> that's an odd comparison
20:32 < skelterjohn|work> "building SDL on windows is like using eclipse"
20:32 < crunge> "it's at least sligthly better than concious amputation"
20:32 < erus`> both painful i guess...
20:32 < erus`> thats why i like haskell and go
20:33 < erus`> but some librarys still use make and stuff :(
20:33 < aiju> what's wrong with make
20:33 < crunge> Java has a very specific and very important domain
20:33 < erus`> i like C++ but linking and stuff is such a pain
20:33 < aiju> hahahahaha
20:33 < aiju> erus`: which 10% of it?
20:33 < erus`> do you use windows ever?
20:33 < aiju> erus`: at work
20:33 < aiju> and to play games
20:34 < erus`> 99% of open source C/C++ uses makefiles fill of uname and
other *nix only stuff
20:34 < erus`> cmake is crap
20:34 < molto_alfredo> what is a build system that is not crap
20:34 < erus`> visual studio...  dont even get me started
20:34 < aiju> make
20:35 < aiju> most stuff can be compiled with
20:35 < erus`> after building boost for mingw you get
boost-system_mingw_20123123.a
20:35 < aiju> gcc -DSOMEFLAGS *.c
20:35 < erus`> so you have to make a makefile for every different setup
20:35 < aiju> erus`: boost is a fucking gigantic messy clusterfuck
20:35 < crunge> programming is hard :(
20:35 < erus`> modules are nicer
20:36 < aiju> it takes HOURS to compile 2000 lines of boost code on a
machine of mine
20:36 < skelterjohn|work> molto_alfredo: gb
20:36 < erus`> programming is the easy bit :P
20:36 < aiju> and i'm not even exaggerating
20:36 < aiju> C++ compilers are one of the few programs which make the
machine look 1000 times slower
20:36 < erus`> aiju: it took me all day to build boost at work
20:36 < erus`> i was sword fighting on chairs
20:36 < aiju> hahaha
20:36 < erus`> im not even a programmer by trade
20:36 < aiju> i troll on IRC during compile times
20:37 < zozoR> Go reduces your troll time then :D
20:37 < aiju> hahaha
20:37 < aiju> zozoR: i'd be finished after half a day
20:37 < aiju> it would largely increase it
20:37 < zozoR> true
20:37 < zozoR> : |
20:38 < aiju> i have some C# code which should be fast
20:38 < aiju> but is slow as fuck
20:38 < aiju> and i can't use a profiler because the MSVS profiler requires
at least premium
20:38 < aiju> tomorrow will be fun
20:38 < zozoR> lol
20:38 < aiju> i suspect C# list faggotry, i'll just reintroduce good ol'
manual doubly linked lists
20:39 < zozoR> use slices!  :D
20:39 < aiju> but C# references are so fucking AAARGH
20:39 < zozoR> why?  arent they just..  references?
20:39 < aiju> they are implicit, which annoys the fuck out of a C programmer
like me
20:39 < zozoR> ah
20:39 < erus`> aiju: explain
20:39 < zozoR> yea, it is kinda annoyting
20:40 < aiju> erus`: there are no objects, only pointers to objects,
basically
20:40 < aiju> so for something ridiculously simple like a pair of numbers
20:40 < aiju> you have to write annoying boilerplate Clone() methods
20:40 < zozoR> xD
20:40 < erus`> well yeah
20:40 < erus`> its just like java
20:40 < aiju> you can't return multiple values
20:41 -!- pjacobs [~pjacobs@66.54.185.133] has joined #go-nuts
20:41 < erus`> try f# though i've heard good thing
20:41 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has joined
#go-nuts
20:41 < skelterjohn|work> isn't there a keyword to make something a value
rather than a reference?
20:41 < aiju> there are no fucking pointers
20:41 < aiju> skelterjohn|work: cool, i hope so
20:41 < skelterjohn|work> i forget what it was - i did a game project using
C# about a year ago
20:41 < skelterjohn|work> and for the collision stuff i had to do this
20:41 < skelterjohn|work> to make it not retarded
20:41 < aiju> erus`: i'm not touching .NET voluntarily
20:42 < zozoR> why dont you have a job as a C programmer instead
20:42 < aiju> erus`: F# looks like microsoft haskell
20:43 < erus`> its ocaml.net
20:43 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:10c2:ac95:cd31:168d] has quit
[Quit: Leaving.]
20:43 < zozoR> i'd want to hit aiju if i sat next to him at work while he
was coding C#
20:43 < zozoR> : |
20:43 < erus`> but with built in async stuff
20:43 < aiju> zozoR: haha
20:43 < aiju> zozoR: it's just for three weeks
20:44 < zozoR> i imagin you to be like that unreal tournament kid
20:44 < aiju> hahahahha
20:44 < erus`> lol
20:44 < zozoR> "I JUST WANT A FUCKING POINT!?=!" xD
20:44 < aiju> no, i'm restraining myself
20:44 < zozoR> pointer*
20:44 < aiju> i'm not even complaining about it
20:44 < zozoR> lies, what do you call this :P
20:44 < skelterjohn|work> informing you of his misgivings
20:44 < aiju> zozoR: IRC and RL are two pairs of shoes
20:44 < zozoR> :3
20:45 < zozoR> i dont mind, i love when you bash languages
20:45 < aiju> haha
20:47 < aiju> actually, the worst thing i'm dealing with is drawing shit
using CSS
20:47 < zozoR> why are you doing that
20:47 < zozoR> programmers cant draw
20:47 < skelterjohn|work> artists can't draw using CSS
20:47 < zozoR> "webdesigners" can
20:48 < skelterjohn|work> don't know why you'd want to...
20:48 < skelterjohn|work> CSS is a clusterfuck that i briefly tried to
learn, but i gave up
20:48 < skelterjohn|work> i am just not meant to work on web front-ends
20:48 < skelterjohn|work> back-ends, maybe if i need the money
20:48 < erus`> skelterjohn just keep it simple
20:48 < skelterjohn|work> front-end, i'm hopeless
20:48 < skelterjohn|work> i was trying SO HARD to keep it simple
20:48 < erus`> nice faded logo in the bottom right
20:48 < erus`> some curves
20:48 < erus`> job done
20:49 < skelterjohn|work> but what i wanted was inherently complex
20:49 < skelterjohn|work> i was trying to make a web-based go IDE
20:49 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
20:49 < aiju> working on web shit is fucking annoying
20:49 < aiju> i pity anyone who does this for prolonged amounts of time
20:49 < erus`> aiju: it can be very rewarding
20:50 < skelterjohn|work> i honestly feel that CSS is the worst possible way
to specify layouts
20:50 < erus`> people have instant access to your work
20:50 < skelterjohn|work> i don't think i could come up with a worse way on
purpose
20:50 < aiju> skelterjohn|work: yeah, CSS is a horrible unorthogonal mess
which every browsers interprets differentlz
20:50 < aiju> *y
20:50 < aiju> basically you keep throwing attributes until it works
20:50 < zozoR> to do web, you'd have to know javascript, css, html and some
backend language
20:51 < skelterjohn|work> that's what i ended up doing
20:51 < skelterjohn|work> and i gave up
20:51 < zozoR> is frustrating
20:51 < aiju> http://aiju.de/up/Capture.PNG
20:51 < aiju> my results
20:51 < aiju> includes shitloads of hacks
20:51 < skelterjohn|work> i have no idea what that is
20:51 < zozoR> what is that?
20:51 < aiju> queue at an airport
20:52 < zozoR> : |
20:52 < erus`> you should do traffic lights next
20:52 < aiju> haha
20:53 < erus`> anyway we have canvas now
20:54 < erus`> webpages are gonna be big annoying fullscreen canvases like
back when people used to make websites in flash
20:55 < skelterjohn|work> *whimper*
20:55 < zozoR> wouldnt crying be more apropriate?
20:55 < skelterjohn|work> i'm a man
20:55 < skelterjohn|work> i don't cry
20:55 < skelterjohn|work> i just whimper and moan pathetically
20:55 < skelterjohn|work> i hate flash sites
20:55 < zozoR> flash sites hate you too
20:56 < skelterjohn|work> flash sites hate your face
20:56 < brandini> swf to html5
20:57 < zozoR> no difference..
20:57 < skelterjohn|work> it's not the tech that bothers me - it's the
result
20:57 < zozoR> exactly
20:57 < brandini> games on computers are pure win!
20:58 < zozoR> compared to?
20:58 < zozoR> board games?
20:58 < aiju> websites in flash are generally not worth visiting
20:58 < erus`> chess is the best game :)
21:00 -!- robteix [~robteix@nat/intel/x-mtouxqyafanodbya] has quit [Ping timeout:
255 seconds]
21:01 < zozoR> is it normal to have meaningless encapsulation in java?
21:01 < skelterjohn|work> yes
21:01 < skelterjohn|work> you can forget the "in java" part
21:01 < brandini> any object you create will extend some other object
21:01 < brandini> whether you need to or not :)
21:02 < zozoR> is just, i am reading about boilerplate coding on wikipedia
21:02 < zozoR> and it notes under some code
21:02 < zozoR> "see, if we made these two variables public, we didnt have to
have 4 methods on this class, BUT THAT WOULD BREAK ENCAPSULATION!"
21:03 < zozoR> and i think, are people seriously doing that out in the real
world?
21:03 < zozoR> why??
21:04 < erus`> in the real world people fuck stuff up
21:04 < erus`> thats why each time that handles part of a system will make
it as hard as possible to break their part
21:04 < erus`> so they dont get in shit
21:04 < erus`> hence getter, setters etc etc
21:05 < erus`> where time = team
21:05 < zozoR> that makes no sense
21:05 < zozoR> they code 40% more lines of code..  to make sure they dont
fuck up?  thats just stupid
21:05 < unit3> that's corporate "best practices".
21:05 < crunge> That's the niche Java fills
21:06 < erus`> to make sure the people interfacing with their code cant use
it in a way that they didnt foresee
21:06 < skelterjohn|work> it's more like you add more code to make sure
other people don't fuck up
21:06 < skelterjohn|work> i don't see this as a bad thing
21:06 < zcram> people fuck up.  always.
21:06 < crunge> it helps reduce the damage caused by hiring the cheapest
programmers you could find.
21:06 < zozoR> it makes sense if you are to validate your data
21:07 < skelterjohn|work> also, an inadvertently exposed part of your system
might be used by someone from the outside - you change it (without changing the
actual API) and they start complaining cause their shit stopped work
21:07 < zozoR> but if you only set and get (without anything else), why not
just use public instead of private
21:07 < skelterjohn|work> working
21:07 < skelterjohn|work> this used to happen a lot with OSes
21:07 < skelterjohn|work> probably still does
21:07 < zozoR> :/
21:08 < zozoR> well i suppose it has its good points then
21:10 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Quit: Lost terminal]
21:11 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
21:13 -!- unit3 [~Unit3@76.77.91.41] has left #go-nuts ["Leaving"]
21:14 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
21:15 < |Craig|> forcing access through accessor methods allows you to
change how the data is stored (recomputed when requested) in the future, and
possibly take action when it changes.  The lack of ability to do those things
without changing the API if you use public properties directly could be considered
a language deficiency (its not an issue in all languages)
21:16 -!- Kumul [~Kumul@adsl-207-204-167-196.prtc.net] has joined #go-nuts
21:16 < skelterjohn|work> C#, objC have standard ways to do it
21:16 -!- mkb218 [~mkb@pool-96-233-4-238.bstnma.east.verizon.net] has quit [Read
error: Operation timed out]
21:16 < skelterjohn|work> for example
21:16 < skelterjohn|work> i feel that go is lower level than those languages
are, though, and writing out the methods is fine
21:18 -!- mkb218 [~mkb@pool-96-233-4-238.bstnma.east.verizon.net] has joined
#go-nuts
21:26 -!- foocraft [~ewanas@89.211.136.69] has quit [Quit: if you're going....to
san.  fran.  cisco!!!]
21:34 -!- kritic [~kritic@dynamic-216-211-120-165.tbaytel.net] has joined #go-nuts
21:35 < erus`> well go exposes interfaces for this stuff right
21:35 -!- jsj [~johan@78-70-253-105-no149.tbcn.telia.com] has joined #go-nuts
21:35 -!- huin [~huin@91.85.188.1] has quit [Quit: bedtime]
21:37 -!- photron [~photron@port-92-201-67-130.dynamic.qsc.de] has quit [Read
error: Operation timed out]
21:38 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
21:40 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Ping timeout: 260
seconds]
21:47 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
21:49 < Namegduf> I think it's less of an issue with larger modules, as seen
in Go
21:50 < Namegduf> Usually when modules are package-sized, not class sized,
accessors and setters become requests and setting of abstract properties, rather
than an obvious single field, and don't exist in too large numbers.
21:50 < Namegduf> That's what I think, anyway.
21:52 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:57 -!- tncardoso [~thiago@189.59.128.192.dynamic.adsl.gvt.net.br] has quit
[Quit: bye]
21:57 -!- erus`_ [~chatzilla@host86-162-228-176.range86-162.btcentralplus.com] has
joined #go-nuts
21:58 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
21:59 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
21:59 -!- erus` [~chatzilla@host86-162-245-90.range86-162.btcentralplus.com] has
quit [Ping timeout: 250 seconds]
22:00 < angasule> hi, is there a better way of initialising a bool array to
true than doing: for pos := range arrayVar { arrayVar[pos] = true } ?
22:01 < exch> nope.  bools are always initialized to false
22:02 < angasule> oh, ok, just wondering :-)
22:02 < kevlar_work> agh, reflect.DeepEqual is giving me headaches
22:02 < kevlar_work> param["obj"] = map[string] interface { }{"k":"v",
"n":42}, want map[string] interface { }{"k":"v", "n":42}
22:02 < kevlar_work> wtf.
22:03 < kevlar_work> looks pretty dang DeepEqual to me.
22:04 < kevlar_work> oh psh, it's because json decodes {"n":42} as
{"n":float64(42)}
22:08 < angasule> I grabbed a D example I found somewhere and translated
into Go, if anyone cares to take a look (it's a short program, 27 lines)
http://pastebin.com/zEA9mNbT
22:08 -!- dorzey [~dorzey@host109-149-2-36.range109-149.btcentralplus.com] has
joined #go-nuts
22:10 -!- nicka1 [~lerp@142.176.0.21] has quit [Quit: Leaving.]
22:11 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 255 seconds]
22:16 -!- meling [~meling@cse-dhcp-10-91.ucsd.edu] has quit [Remote host closed
the connection]
22:17 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
22:19 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
22:21 -!- Skola [~bas@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has quit [Ping timeout:
240 seconds]
22:21 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 240 seconds]
22:26 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 260 seconds]
22:28 -!- Kahvi [~Kahvi@a91-152-177-58.elisa-laajakaista.fi] has quit [Ping
timeout: 276 seconds]
22:28 -!- Kahvi [~Kahvi@a91-152-177-58.elisa-laajakaista.fi] has joined #go-nuts
22:37 -!- dorzey [~dorzey@host109-149-2-36.range109-149.btcentralplus.com] has
quit [Quit: Leaving.]
22:37 -!- Project_2501 [~Marvin@82.84.65.60] has quit [Quit: E se abbasso questa
leva che succ...]
22:39 -!- jbooth1 [~jay@209.249.216.2] has left #go-nuts []
22:40 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
22:46 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 258 seconds]
22:52 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has quit [Ping
timeout: 258 seconds]
22:53 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has joined
#go-nuts
22:55 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
22:55 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
22:58 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has quit [Ping timeout: 276
seconds]
22:58 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
23:03 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has joined
#go-nuts
23:07 -!- lechienkitu [~lechienki@80.214.8.9] has joined #go-nuts
23:08 -!- Kahvi [~Kahvi@a91-152-177-58.elisa-laajakaista.fi] has quit [Quit:
Lähdössä]
23:09 -!- lechienkitu [~lechienki@80.214.8.9] has left #go-nuts ["Where go I ?"]
23:11 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
23:11 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has quit [Quit:
twolfe18]
23:13 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has joined
#go-nuts
23:25 -!- lurcio_ [~lurcio_@itsnotnormal.plus.com] has joined #go-nuts
23:29 -!- lurcio_ [~lurcio_@itsnotnormal.plus.com] has quit [Client Quit]
23:34 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 276 seconds]
23:37 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
23:38 -!- kingless [~kingless@108-65-61-54.lightspeed.rlghnc.sbcglobal.net] has
joined #go-nuts
23:39 -!- l00t [~i-i3id3r_@189.105.5.37] has quit [Remote host closed the
connection]
23:40 -!- kritic [~kritic@dynamic-216-211-120-165.tbaytel.net] has quit [Quit:
WeeChat 0.3.5]
23:42 -!- ancientlore [~ancientlo@63.76.22.10] has quit [Quit: ~ Trillian Astra -
www.trillian.im ~]
23:48 -!- vmil86 [~vmil86@78.57.227.12] has quit [Remote host closed the
connection]
23:49 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has quit [Quit:
twolfe18]
23:51 -!- pjacobs [~pjacobs@66.54.185.133] has quit [Quit: Leaving]
23:51 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
23:56 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error:
Connection reset by peer]
23:57 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
--- Log closed Fri Jul 08 00:00:44 2011