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

--- Log opened Mon Nov 22 00:00:18 2010
00:01 < creack> I have a little question
00:01 < creack> I am trying to get go-opencv working
00:01 < creack> but since the project is 6 month old, there is some changes
00:02 < creack> anyway, I don't understand, I am using cgo, I have a
fonction that return a ptr
00:02 < creack> and cgo tells me it is type *[0]uint8 and don't want to
convert it in anything
00:02 < creack> someone have an idea?
00:03 < creack> cannot use _Cfunc_cvCaptureFromCAM(_Ctype_int(index)) (type
*[0]uint8) as type *CvCapture in assignment
00:03 -!- kanru [~kanru@61-228-153-104.dynamic.hinet.net] has quit [Ping timeout:
245 seconds]
00:05 -!- dho [~dho@onager.omniti.com] has joined #go-nuts
00:05 < creack> there is : type CvCapture C.CvCapture
00:05 < dho> Since I haven't used go in forever, I'm totally rusty.
00:05 < creack> and it does not want to convert *C.CvCapture to *CvCapture
00:06 < dho> I've got a map of cookies to websockets.  So,
map[string]*websocket.Conn
00:06 < exch> creack: what is CvCapture defined as?  (should be in
gotypes.go)
00:06 < exch> It's possible you to exlpicitely cast the result to *CvCapture
00:06 < creack> CvCapture is just a bind to C.CvCapture
00:06 < creack> it is just a typedef
00:07 < creack> or I misunderstood somemthing
00:07 < creack> type CvCapture C.CvCapture
00:07 < exch> ok.  what happens if you cast the result of the function call?
00:07 < dho> But the strings are all coming from []byte, so I have to do
mapvar[string(bytevar)].  But I must be missing something, because mapvar["1"]
returns false, where that's clearly what I had in there.  I'm guessing it has to
do with string immutability.
00:08 < creack> Hum exch sorry, I don't get what you mean
00:09 < exch> creack: return
(*CvCapture)(_Cfunc_cvCaptureFromCAM(_Ctype_int(index)))
00:11 < creack> it seems to work :)
00:11 < exch> goodie :)
00:11 < creack> but it does not when I assign it before...
00:11 < creack> thank you
00:13 -!- Scorchin [~Scorchin@host86-163-124-29.range86-163.btcentralplus.com] has
quit [Quit: Scorchin]
00:17 < nictuku> I'll stop saying that Go programming is very productive.  I
just lost hours debugging third-party library issues.  I can't blame the language,
but the environment currently isn't great.</rant>
00:18 < exch> The fast development pace doesn't make using third party stuff
easy.  Specially if it hasn't bene updated in a while.  That won't be a problem
anymore when Go reaches a more stable phase though
00:20 -!- sacho [~sacho@90.154.194.70] has quit [Ping timeout: 245 seconds]
00:26 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 265
seconds]
00:28 < creack> humm, I finally get it to compile
00:28 < creack> but when I try
00:28 < creack> I got this :
00:28 < creack> dyld: Library not loaded: c-wrap.so
00:29 < creack> I googled it...
00:29 < creack> Not very succefully
00:29 < creack> any idea?
00:29 < exch> is it part of the lib you are trying to bind?
00:29 < exch> I haven't used cgo bits in a while, but it doesn't suond like
something go would need by itself
00:30 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
00:30 < exch> Your makefile will have to define some linker flags to tell
GCC where to find the shared libs though
00:30 < creack> the cgo part is done
00:31 < creack> I get this when I try to launch a program using the new
package
00:32 < exch> When I wrap a C lib, I add this to the makefile: CGO_LDFLAGS =
`pkg-config --libs libfoobar`
00:32 < exch> where libfoobar is obviously the lib you are binding.  it
should yield references to all the libs required
00:37 < creack> It was indeed just a mistake about this...  sorry
00:39 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
00:47 -!- jdp [~justin@24.238.32.162.res-cmts.segr.ptd.net] has quit [Remote host
closed the connection]
00:49 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
00:55 -!- albertito [~nil@unaffiliated/alb] has joined #go-nuts
00:59 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
01:00 < albertito> hi!  I'm implementing a simple cat and there is something
that I don't quite understand.  bufio.ReadString() takes a byte as its only
parameter.  Why doesn't the compiler complains when I give it a character literal
like 'ñ', which is represented by more than a single byte?
01:02 -!- bmizerany [~bmizerany@adsl-99-62-185-100.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
01:02 -!- tvw [~tv@e176002069.adsl.alicedsl.de] has quit [Ping timeout: 245
seconds]
01:02 -!- zaemis [~zaemis@pool-72-90-90-171.syrcny.fios.verizon.net] has joined
#go-nuts
01:04 < zaemis> Is there a package for working with arrays/slices in a
"functional" manner in Go, specifically like sum, reduce, and filter?  They're
easy enough to write but was wondering if they were already there.
01:05 < cbeck> I don't believe so
01:06 < zaemis> k thanks.  Maybe I'll write them and put them in a package
or something.
01:07 < cbeck> I issue is the current lack of generics, I think
01:07 < dho> Any tips on that earlier asdf map issue?
01:07 < dho> whoops
01:10 < zaemis> true, I find that obnoxiously annoying...  I wrote a shuffle
function.  I re-assign by int indexes, it doesn't matter what the members are.
And yet I had to write multiple suffle variants
01:12 -!- zaemis [~zaemis@pool-72-90-90-171.syrcny.fios.verizon.net] has left
#go-nuts []
01:12 -!- zaemis [~zaemis@pool-72-90-90-171.syrcny.fios.verizon.net] has joined
#go-nuts
01:13 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has left
#go-nuts []
01:23 < nictuku> albertito, not true.  'ñ' is ASCII char # 164, so 1 byte
suffices
01:23 < nictuku> try with other unicode characters
01:26 < albertito> nictuku: you're right, thanks!
01:29 -!- jochang [~identd@223.136.106.184] has quit [Ping timeout: 260 seconds]
01:29 < KirkMcDonald> I'm going to be pedantic and point out that 164 is not
an ASCII value.
01:29 < KirkMcDonald> If the file is encoded in UTF-8, for instance, that
byte probably won't be the delimiter you want.
01:30 -!- mjbrooks [~mjbrooks@c-67-169-2-183.hsd1.ca.comcast.net] has joined
#go-nuts
01:31 < KirkMcDonald> Though it believe it is a valid UTF-8 code unit.
01:31 < KirkMcDonald> s/it/I/
01:32 < krutcha> is there a reason flag.Parse can't be called on a generic
string?  I could easily make use of it to simplify some tokenizing of user
commands
01:33 < KirkMcDonald> krutcha: The process doesn't receive a string, for
starters.
01:34 < krutcha> ParseForTesting seems to?  though intentionally
non-functional
01:34 < cbeck> krutcha:
https://code.google.com/p/go-fightclub/source/browse/#hg/src/flags
01:34 < KirkMcDonald> krutcha: ParseForTested gets a slice of strings.
01:34 < KirkMcDonald> Testing*
01:34 < cbeck> Class project ran into a similar issue, reworked flag code to
take arbitrary string slices
01:35 < krutcha> I could provide a slice of strings just as easily by
tokenizing on " "
01:35 < zaemis> how does one write a function signature for a function that
accepts and array (not slice) of indeterminate size?  I can't write func foo(arr
[]int) because that's a slice, and I can't write func foo(arr [...]int) (cannot
use [...] outside of array literal)
01:35 < KirkMcDonald> zaemis: What's wrong with a slice?
01:36 < KirkMcDonald> zaemis: Because as a rule, that's exactly what a slice
*is*: An array whose size you onlu know at runtime.
01:36 < zaemis> the potential for modifying the referenced element values.
At least with copy by value you're not going to affect the original array.
01:36 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
01:36 < KirkMcDonald> only*
01:36 < zaemis> my understanding was array = value, slice = reference to
section of array.
01:37 < zaemis> arrays are passed by val, slices by ref
01:37 < KirkMcDonald> Slices are passed by value, but the value is a
reference.
01:37 < zaemis> eh, true enough.  :)
01:38 < SirPsychoS> slices are basically {*[cap]type, len}
01:38 < krutcha> cbeck: think that code would make it into pkg.flag?  seems
useful to me
01:38 < KirkMcDonald> zaemis: Short answer, the size of an array is part of
the type.
01:38 < cbeck> I don't see that happening
01:38 < KirkMcDonald> zaemis: If you don't know that size, how can it be
passed by value?
01:38 < zaemis> good points.
01:39 < zaemis> So, is there a protection mechanism like const in c that
will prevent accidental modification of the referenced values?
01:39 < KirkMcDonald> zaemis: No.
01:39 < KirkMcDonald> zaemis: You can copy-on-write.  That is about it.
01:39 < krutcha> bummer, I reworked my server to handle multiple connections
(like IRC for example), so instead of ./myprog args, I now have a prompt and a
/connect args input.  With that it would have been almost cut/paste haha
01:40 < zaemis> copy on write?
01:40 < KirkMcDonald> zaemis: Whenever you write to the slice, make a copy
first.
01:41 < KirkMcDonald> zaemis: But you can't proactively protect against
users of your API mutating your slices.
01:41 < KirkMcDonald> zaemis: Just, you know, trust them to not be idiots.
01:41 < zaemis> ah ha ha ha ha!!  :)
01:42 < KirkMcDonald> I am entirely serious!  But then I am primarily a
Python programmer.
01:42 < zaemis> ah.  I
01:42 < zaemis> I'm primarily PHP and C, and work with PHP, C, and Perl
programmers.  I see some pretty stupid things.
01:43 < zaemis> thanks, KirkMcDonald :)
01:43 < SirPsychoS> grr, gocode's installation script overwrote my vim
ftplugin for go, and I don't remember what was in it :/
01:44 -!- albertito [~nil@unaffiliated/alb] has left #go-nuts []
01:46 < mjbrooks> Perhaps I'm not looking in the correct place...  is
creating an https client possible?  I need to access data via a secure channel
01:49 -!- jochang [~identd@58-114-203-35.cable.dynamic.giga.net.tw] has joined
#go-nuts
01:49 < krutcha> mjbrooks: look in here
http://golang.org/pkg/http/#ListenAndServeTLS
01:51 < mjbrooks> krutcha, thanks, but that seems to be to server up https,
I need it to go the other way
01:53 < krutcha> oop, right try here: http://golang.org/pkg/crypto/tls/#Dial
I was pointed to these earlier and currently procrastinating on figuring them out
myself
01:53 < krutcha> it was suggested that to figure out crypto.tls, the http
package could be used for an example..  but I haven't looked yet
01:55 < krutcha> possibly
http://golang.org/pkg/http/#ClientConn.NewClientConn ?
01:56 -!- jochang [~identd@58-114-203-35.cable.dynamic.giga.net.tw] has quit [Ping
timeout: 240 seconds]
01:58 < mjbrooks> hnnn
01:58 < mjbrooks> hmmm
01:58 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Read
error: Connection reset by peer]
01:58 -!- iant1 [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined
#go-nuts
02:00 < mjbrooks> krutcha, Might be some hints in doing it at
https://github.com/alloy-d/goauth
02:06 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
02:09 < mjbrooks> wow...  it seems much simpler than I thought it would be
02:11 -!- zaero [~eclark@valkyrie.buick455.com] has quit [Read error: Connection
reset by peer]
02:22 -!- bmizerany [~bmizerany@adsl-99-62-185-100.dsl.pltn13.sbcglobal.net] has
quit [Remote host closed the connection]
02:55 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has joined #go-nuts
03:00 -!- watr_ [~watr@66.183.108.186] has joined #go-nuts
03:04 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has quit [Remote
host closed the connection]
03:14 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has quit [Ping timeout: 276
seconds]
03:52 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
04:04 -!- htoothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has joined
#go-nuts
04:09 -!- zaemis [~zaemis@pool-72-90-90-171.syrcny.fios.verizon.net] has quit
[Quit: ~ Trillian Astra - www.trillian.im ~]
04:16 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit:
Leaving]
04:31 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
04:42 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 245
seconds]
05:05 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts
05:27 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
05:34 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts
05:47 -!- sacho [~sacho@46.10.19.137] has joined #go-nuts
05:48 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 276
seconds]
05:58 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
06:05 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 252 seconds]
06:06 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:08 -!- bmizerany [~bmizerany@c-76-21-40-207.hsd1.ca.comcast.net] has joined
#go-nuts
06:13 -!- bmizerany [~bmizerany@c-76-21-40-207.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
06:19 -!- sacho [~sacho@46.10.19.137] has quit [Ping timeout: 255 seconds]
06:22 -!- watr_ [~watr@66.183.108.186] has quit [Quit: Leaving]
06:33 -!- sacho [~sacho@46.10.23.29] has joined #go-nuts
06:44 < anticw> iant1: up?
06:55 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has joined
#go-nuts
07:11 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 264 seconds]
07:13 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
07:18 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has quit [Ping
timeout: 245 seconds]
07:24 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
07:41 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping
timeout: 245 seconds]
08:03 -!- photron_ [~photron@port-92-201-106-37.dynamic.qsc.de] has joined
#go-nuts
08:06 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
08:22 -!- awidegreen [~quassel@p5DF1FBF7.dip.t-dialin.net] has joined #go-nuts
08:29 -!- wrtp [~rog@92.17.4.83] has joined #go-nuts
08:30 -!- tensorpudding [~user@99.148.202.191] has quit [Remote host closed the
connection]
08:34 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
08:45 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:58 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
09:01 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
09:18 -!- ShadowIce`
[pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
09:18 -!- ShadowIce`
[pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit [Changing
host]
09:18 -!- ShadowIce` [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
09:18 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Read error:
Connection reset by peer]
09:20 -!- napsy [~napsy@193.2.66.101] has joined #go-nuts
09:38 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
#go-nuts
09:39 < mpl> hey.  how do I check for the existence of a map entry?  what
does map[key] return if key doesn't exist?
09:40 < nsf> mpl: value, ok := map[key]
09:41 < nsf> ok will be false if key/value pair doesn't exist
09:41 < nsf> or, better:
09:41 < mpl> ah yes of course.  thanks.
09:41 < nsf> _, exists := map[key]
09:42 < mpl> actually I want the value if it exists so the former is better,
but the latter is good to know, thanks again.
09:42 < nsf> well, it depends, sometimes you need to get a value if it
exists, yes :)
09:43 < mpl> the spec really needs some more cross referencing.  I would
have found that info in the Indexes section, but it would be handy to find it
linked in the maps type section.
09:45 < nsf> maybe
09:53 -!- tg [irc@tgbit.net] has left #go-nuts []
10:11 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
10:15 -!- matti___ [~mumboww@c-98-207-108-218.hsd1.ca.comcast.net] has quit [Ping
timeout: 245 seconds]
10:18 -!- virtualsue [~chatzilla@nat/cisco/x-pexfaxetyxzucwat] has joined #go-nuts
10:22 -!- matti___ [~mumboww@c-98-207-108-218.hsd1.ca.comcast.net] has joined
#go-nuts
10:24 -!- virtualsue [~chatzilla@nat/cisco/x-pexfaxetyxzucwat] has quit [Quit:
Reconnecting…]
10:25 -!- virtualsue [~chatzilla@nat/cisco/x-wxtgiguhpzbtourt] has joined #go-nuts
10:34 -!- artefon [~thiago@189.59.183.25.dynamic.adsl.gvt.net.br] has joined
#go-nuts
10:36 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has quit [Ping timeout: 265
seconds]
10:44 -!- noam [~noam@IGLD-84-229-71-149.inter.net.il] has joined #go-nuts
10:47 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts
11:03 -!- noam [~noam@IGLD-84-229-71-149.inter.net.il] has quit [Ping timeout: 265
seconds]
11:08 < Archwyrm> mpl: 'val, ok' is idiomatic of a lot of operations, such
as the following to give another example: val, ok := foo.(SomeInterface)
11:11 < Archwyrm> Speaking of which..  I've found that gofmt breaks stuff
like that with an '; if ok {' into two lines, which is quite annoying.
11:11 < Archwyrm> val, ok := map[key]; if ok {
11:11 < Archwyrm> (to be clear)
11:11 < nsf> use:
11:12 < nsf> if val, ok := map[key]; ok {
11:12 < Namegduf> Unless you need val for a while after, and want to check
for !ok and abort
11:13 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has joined #go-nuts
11:13 < nsf> also if you need val outside an if statement, you can do: var
val Type; if val, ok := map[key]; ok {
11:13 -!- boscop [~boscop@g225218073.adsl.alicedsl.de] has joined #go-nuts
11:14 < Archwyrm> nsf: Ah ha..  Thanks!
11:17 -!- niemeyer [~niemeyer@189-10-175-46.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
11:20 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
11:32 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
11:32 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
11:33 < wrtp> nsf: no you can't!
11:33 < nsf> uhm..  why?
11:33 < nsf> ah, yes
11:34 < nsf> if statement is in its own block
11:34 < nsf> it will redefine val
11:34 < wrtp> because that declares val inside the if statement and doesn't
affect the val outside the block
11:34 < nsf> var val Type; var ok bool;
11:34 < wrtp> yup
11:34 < nsf> if val, ok = map[key]; ok {
11:34 < wrtp> yes
11:34 < nsf> my bad, sorry
11:35 < wrtp> np - just i'd prevent you misleading the innocent :-)
11:35 < wrtp> s/just/just thought/
11:36 < nsf> hehe, I'm writing C code right now
11:36 < nsf> and all these off_t, size_t, uint32_t
11:36 < nsf> I feel so stupid
11:36 < Archwyrm> I actually saw that but I figured the compiler would just
yell at you for 'misusing' := (as it often does to me).  I didn't realize it would
redefine it inside the if block.
11:36 < nsf> :(
11:36 < wrtp> the if-declared variables are available in the else clause too
11:36 < Archwyrm> :o
11:37 < Archwyrm> Hmm..  I suppose that is normal though?
11:37 < Archwyrm> I can't immediately think of a situation that that is
useful.
11:38 < wrtp> yeah, i don't think i've ever actually used that property
11:38 < Archwyrm> Well, I guess declaring variables in an if is not normal.
11:38 < nsf> personally I don't like that if form at all
11:38 < Archwyrm> Unless you are writing C++ if(var = foo())
11:38 < nsf> I don't do that in C++
11:38 < Archwyrm> It can be bad.  :)
11:39 < Archwyrm> I don't do it either.
11:39 < wrtp> it's particularly useful when you're doing type conversions.
if v, ok := v.(someType); ok { ...  }
11:39 < wrtp> because it means you don't have to think of a new name for v
11:39 < Archwyrm> wrtp: Good point.
11:39 < nsf> people are so lazy
11:40 < nsf> the don't want to think at all
11:40 < nsf> yet, programming requires that
11:40 < wrtp> thinking of good names is hard
11:40 < wrtp> the less names, the less cognitive load for the reader
11:40 < wrtp> so it's not just laziness
11:40 < nsf> well, I agree there is something like that
11:40 < Archwyrm> If all you use the first variable for is converting it
into the second..
11:40 < nsf> Go reads suprisingly easy
11:41 < wrtp> i think so too.  it's mainly because each operation is
semantically well defined
11:41 < wrtp> i think
11:42 < wrtp> Archwyrm: v is often an argument to a function, or a result of
a multiple-valued function
11:42 < wrtp> e.g.  n, err := f.Read(buf)
11:43 < Archwyrm> wrtp: I'm not quite following you.
11:43 < wrtp> if err, ok := err.(os.Errno); ok { ...  }
11:44 < wrtp> i.e.  you can't type-assert the err declaration immediately
it's returned from Read, but there's no need to invent a new name other than "err"
11:44 < Archwyrm> Ah, right.
11:45 < Archwyrm> Most of the type assertions that I have done have been to
get a struct type that was passed as an interface.
11:51 < nsf> damn, again..
11:51 * nsf wants C with Go syntax
11:51 < nsf> I can't write C.. I feel stupid
11:51 < nsf> size_t size;
11:51 < nsf> :\
11:56 -!- lmoura [~lauromour@187.113.114.206] has joined #go-nuts
12:10 -!- rboyd [~rboyd@69-29-69-78.dyn.centurytel.net] has joined #go-nuts
12:15 < wrtp> nsf: i have that problem too
12:15 < wrtp> remembering semicolons
12:15 < nsf> semicolons are ok
12:15 < nsf> but when I write: size_t size = fread(...);
12:15 < nsf> instead of: size := fread(...);
12:15 < nsf> I feel stupid for some reason
12:16 < wrtp> let alone: size t size;\nsize = ....;\n
12:16 < nsf> it's even worse
12:19 < nsf> wrtp: http://tibleiz.net/zinc <- this guy I guess dislikes
C's syntax as well
12:19 < nsf> he ended up writing his own language :)
12:20 < wrtp> i like identifiers i can double-click on to get the whole
thing...
12:20 < nsf> I like pointers syntax in zinc
12:20 < nsf> ->Type
12:20 < nsf> very intuitive :)
12:23 < wrtp> yeah, that works ok.  except he uses it for function returns
too.
12:23 < nsf> yeah, it's a bit weird
12:23 < nsf> but still an interesting language amongst unknown ones
12:27 < wrtp> it's not clear if it's type safe
12:29 < nsf> it doesn't have implicit type conversions
12:29 < nsf> but I don't know whether it is type safe or not
12:29 < nsf> probably not
12:29 < nsf> and it's certainly is not memory safe
12:30 < nsf> it's not necessary for a C clone
12:37 -!- g0bl1n [~g0blin@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
12:40 -!- jochang [~identd@nat/google/x-yhontnhkboucesro] has joined #go-nuts
12:44 -!- jochang [~identd@nat/google/x-yhontnhkboucesro] has quit [Ping timeout:
240 seconds]
12:47 -!- jochang [~identd@111.70.91.159] has joined #go-nuts
12:52 -!- napsy [~napsy@193.2.66.101] has quit [Quit: leaving]
12:58 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts
13:00 -!- artefon [~thiago@189.59.183.25.dynamic.adsl.gvt.net.br] has quit [Remote
host closed the connection]
13:02 -!- sxs_ [~sxs@HSI-KBW-078-042-201-030.hsi3.kabel-badenwuerttemberg.de] has
joined #go-nuts
13:02 < sxs_> hi
13:02 < sxs_> what is the reason that 'goto' was added do golang?
13:03 < nsf> because one of its authors is Ken Thompson
13:03 < nsf> :)
13:03 < Namegduf> Because it is a flexible thing usable in any instance
where more structured things fail.
13:03 < nsf> also goto simplifies few code generation ideas, like that one:
http://www.complang.org/ragel/
13:04 < sxs_> everybody told me the last decaeds: goto is evil
13:05 < Namegduf> That's nice.
13:05 -!- plainhao [~plainhao@208.75.85.237] has joined #go-nuts
13:05 < nsf> I guess it was the same people who told you: OOP is good
13:06 < nsf> were*
13:06 < sxs_> different people
13:06 < Namegduf> Constructs using structured stuff is certainly more
maintainable than goto, but that doesn't mean there aren't justifiable uses for
the more basic construct.
13:06 < Namegduf> *basic operation
13:06 < nsf> well, you know, all people have different opinions
13:06 < sxs_> first i read it in the KR book about C
13:06 < sxs_> they said there are only a few reasons to use a goto.  most
time you should avoid it
13:07 < Namegduf> Right.
13:07 < nsf> they were right
13:07 < Namegduf> That's a few reasons to include it in the language.
13:08 < nsf> e.g.  don't use goto, unless you know why do you need to use it
13:08 < sxs_> its a temptetaion :( i thought there are new apoaches in go
lang, so that you will never need a goto
13:08 < nsf> goto isn't old
13:09 < nsf> it still reflects the same machine instruction in our CPUs
13:09 < sxs_> yes, branching.  i guess a very old construct
13:09 < Namegduf> "you thought wrong"?
13:09 < sxs_> anyway.
13:09 < nsf> it's not old
13:10 < Namegduf> Go has a lot of new stuff, but none of it has ever been
described as making you "never need a goto"
13:10 < nsf> it's just too level for some people
13:10 < Namegduf> It reduces the need with labeled breaks.
13:10 < nsf> low level*
13:12 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
13:13 < sxs_> other question: i studie the pkg scanner and i saw go/scanner.
whats the reason for both?  as far as i can see go/scanner does not use scanner,
right?
13:17 -!- bjarneh [~bjarneh@232.80-203-20.nextgentel.com] has joined #go-nuts
13:24 -!- jochang [~identd@111.70.91.159] has quit [Ping timeout: 240 seconds]
13:37 -!- rsaarelm [~rsaarelm@cs181128175.pp.htv.fi] has joined #go-nuts
13:37 -!- rsaarelm [~rsaarelm@cs181128175.pp.htv.fi] has left #go-nuts []
13:40 < wrtp> sxs_: go/scanner is specifically for scanning go programs.
scanner is for scanning anything, with a bias towards go-like tokens.
13:41 -!- Wild_Cat [~mnoel@93.29.33.100] has joined #go-nuts
13:42 < sxs_> thx
13:42 -!- sxs_ [~sxs@HSI-KBW-078-042-201-030.hsi3.kabel-badenwuerttemberg.de] has
quit [Quit: sxs_]
13:54 -!- nighty^ [~nighty@x122091.ppp.asahi-net.or.jp] has quit [Quit: Disappears
in a puff of smoke]
13:54 -!- nighty^ [~nighty@x122091.ppp.asahi-net.or.jp] has joined #go-nuts
13:55 -!- Wild_Cat [~mnoel@93.29.33.100] has left #go-nuts ["Leaving"]
13:57 -!- Ccod [~peter@c-76-18-5-93.hsd1.fl.comcast.net] has joined #go-nuts
14:07 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #go-nuts
14:07 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
265 seconds]
14:12 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 252
seconds]
14:13 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has quit [Quit:
Leaving.]
14:14 -!- skejoe [~skejoe@188.114.142.231] has quit [Quit: Lost terminal]
14:19 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has joined #go-nuts
14:24 -!- zzz_ [3a72cb23@gateway/web/freenode/ip.58.114.203.35] has joined
#go-nuts
14:28 -!- sauerbraten [~sauerbrat@p508CFB98.dip.t-dialin.net] has joined #go-nuts
14:37 -!- adu [~ajr@pool-173-66-11-168.washdc.fios.verizon.net] has joined
#go-nuts
14:46 -!- xash [~xash@d074118.adsl.hansenet.de] has joined #go-nuts
14:51 -!- artefon [~thiago@dhcp34.usuarios.dcc.ufmg.br] has joined #go-nuts
14:51 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts
14:55 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 240
seconds]
14:58 -!- peterdn [~peterdn@dhcp-110-228.new.ox.ac.uk] has joined #go-nuts
14:58 -!- rboyd [~rboyd@69-29-69-78.dyn.centurytel.net] has quit [Quit: rboyd]
15:00 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
15:07 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts
15:08 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
15:10 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has joined #go-nuts
15:11 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 276 seconds]
15:16 -!- jessta [~jessta@li7-205.members.linode.com] has joined #go-nuts
15:27 -!- devrim [~Adium@160.79.7.234] has quit [Quit: Leaving.]
15:28 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts
15:30 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
15:32 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
15:42 -!- ymasory [~ymasory@SEAS396.wlan.seas.upenn.edu] has joined #go-nuts
15:42 -!- TheSaint [~thesaint@166.205.10.111] has joined #go-nuts
15:49 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has quit [Ping timeout: 245
seconds]
15:51 -!- ios_ [~ios@180.191.133.235] has joined #go-nuts
15:58 -!- rboyd [~rboyd@69-29-69-78.dyn.centurytel.net] has joined #go-nuts
16:00 -!- Genosh [~Genosh@79.155.31.56] has joined #go-nuts
16:01 < Genosh> Hi, i've seen there are builds of gccgo for windows in the
wiki.  May i ask: how mature are them?  does everything work?  (goroutines,
garbage collector...)
16:01 < plexdev> http://is.gd/hATtL by [Anthony Martin] in go/src/cmd/gc/ --
gc: better error message for bad type in channel send
16:01 < plexdev> http://is.gd/hATtV by [Wei Guangjing] in 2 subdirs of
go/src/pkg/ -- net: add ReadFrom and WriteTo windows version.
16:02 -!- DrHennessy [~alex@2002:180a:dda5:1234:223:6cff:fe7f:7ef2] has joined
#go-nuts
16:03 < uriel> Genosh: gccgo for windows?  no clue
16:04 < uriel> Genosh: but gc for windows should pretty much work, except
some bits of the standard libs that are not quite finished, but for the most part,
all the runtime stuff is there
16:04 < uriel> there is also the erGo ocmpiler for windows, but I have not
tried either
16:04 -!- adu [~ajr@pool-173-66-11-168.washdc.fios.verizon.net] has quit [Quit:
adu]
16:05 < Genosh> I'm looking for an alternative to Java or C# that has
garbage collection, so it seems Go would be fit.
16:05 < Genosh> (D isn't a choice for me)
16:06 < Genosh> erGo looks nice but it's commercial/closed so gccgo is what
i'm downloading.
16:10 -!- virtualsue [~chatzilla@nat/cisco/x-wxtgiguhpzbtourt] has quit [Ping
timeout: 245 seconds]
16:15 -!- adu [~ajr@pool-173-66-11-168.washdc.fios.verizon.net] has joined
#go-nuts
16:17 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
16:20 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
16:24 -!- Venom_X [~pjacobs@99-8-218-190.lightspeed.hstntx.sbcglobal.net] has
joined #go-nuts
16:29 -!- cde [~cde@unaffiliated/cde] has joined #go-nuts
16:29 < cde> hello
16:30 < uriel> Genosh: I think you are confused, gccgo and gc are two
different Go implementations
16:30 < uriel> (both from Google)
16:30 < uriel> gc is the main implementation, and works fine on windows, I
don't see why one would want to use gccgo on windows (nothing wrong with gccgo, it
is nice that it exists)
16:31 -!- adu [~ajr@pool-173-66-11-168.washdc.fios.verizon.net] has quit [Quit:
adu]
16:32 -!- TheSaint [~thesaint@166.205.10.111] has quit [Quit: Colloquy for iPhone
- http://colloquy.mobi]
16:32 < Genosh> uriel: 'gc' is this one?  http://code.google.com/p/gomingw/
16:32 < Genosh> Sorry for the confusion, I'm still reading through the
documentation and configuring the environment.
16:35 -!- sauerbraten [~sauerbrat@p508CFB98.dip.t-dialin.net] has quit [Read
error: Connection timed out]
16:36 -!- sauerbraten [~sauerbrat@p508CFB98.dip.t-dialin.net] has joined #go-nuts
16:36 < uriel> yes, that is gc, not gccgo AFAIK
16:41 -!- Venom_X [~pjacobs@99-8-218-190.lightspeed.hstntx.sbcglobal.net] has quit
[Quit: Venom_X]
16:44 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
16:44 -!- xash [~xash@d074118.adsl.hansenet.de] has quit [Quit: Lost terminal]
16:46 -!- tdnrad [~tdnrad@D62A6.WPA.Dal.Ca] has joined #go-nuts
16:47 < iant> I would be surprised if gccgo works on Windows today; it would
certainly require cygwin
16:48 < iant> although adding Windows support would probably be
straightforward though tedious
16:48 -!- xash [~xash@d074118.adsl.hansenet.de] has joined #go-nuts
16:49 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has quit [Ping timeout: 240
seconds]
16:50 < Genosh> Mmm, shouldn't this program run forever?  (provided the
garbage collector works)
16:50 < Genosh> http://pastebin.com/raw.php?i=mgSqZ9p3
16:50 -!- ymasory [~ymasory@SEAS396.wlan.seas.upenn.edu] has quit [Ping timeout:
252 seconds]
16:51 < Genosh> Well, not forever but the 1000000 iterations of the for
loop.
16:51 < wrtp> Genosh: what happens for you?
16:52 < Genosh> It consumes up to about 130 mb of ram, then crashes.
16:52 -!- bjarneh [~bjarneh@232.80-203-20.nextgentel.com] has quit [Quit: Lost
terminal]
16:53 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has joined #go-nuts
16:53 < Genosh> I'm trying the gc and gc1.go programs on /test and
everything related to the garbage collector, but i must be doing something wrong i
can't get it to work.
16:53 < wrtp> how does it crash?
16:54 < Genosh> The usual gc.exe has stopped working windows APPCRASH.
16:54 -!- DerHorst [~Horst@e176107006.adsl.alicedsl.de] has joined #go-nuts
16:54 < Genosh> (Windows 7, 32bit)
16:54 < wrtp> i'd file it as an issue.
16:55 < wrtp> the windows port isn't entirely stable yet, AFAIK
16:57 -!- zzz_ [3a72cb23@gateway/web/freenode/ip.58.114.203.35] has left #go-nuts
[]
16:58 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
16:58 < uriel> still should work, see the dashboard:
http://godashboard.appspot.com/
16:59 -!- aconran_ [~aconran@adsl-76-199-140-78.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
17:04 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
17:12 -!- mssm [~mssm@ip-95-221-86-196.bb.netbynet.ru] has joined #go-nuts
17:16 -!- serbaut1 [~joakims@88.80.182.68] has quit [Quit: Leaving.]
17:16 < Genosh> uriel: I can't find related issues, should i file it here?
http://code.google.com/p/go/issues/list
17:18 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
17:20 -!- fabled [~fabled@mail.fi.jw.org] has quit [Quit: Ex-Chat]
17:28 -!- rejb [~rejb@unaffiliated/rejb] has quit [Quit: .]
17:31 < wrtp> Genosh: i think you should.
17:31 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
17:32 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Quit: (◣_◢)
BigBrowser is watching ⓎⓄⓊ]
17:33 < Genosh> The smallest sample code I got:
http://pastebin.com/raw.php?i=5yPduScb
17:33 -!- awidegreen_ [~quassel@p5DF1CD32.dip.t-dialin.net] has joined #go-nuts
17:33 < Genosh> The original file just did 10 iterations so no problems with
it arise.
17:33 < Genosh> Thanks for the help, I'll file it.
17:34 -!- awidegreen [~quassel@p5DF1FBF7.dip.t-dialin.net] has quit [Ping timeout:
240 seconds]
17:38 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Quit:
Leaving]
17:41 -!- DrHennessy [~alex@2002:180a:dda5:1234:223:6cff:fe7f:7ef2] has quit
[Quit: DrHennessy]
17:43 -!- ios_ [~ios@180.191.133.235] has quit [Quit: Leaving]
17:51 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has quit [Read error:
Connection reset by peer]
17:51 -!- SirPsychoS [~sp@c-24-13-132-255.hsd1.il.comcast.net] has quit [Ping
timeout: 240 seconds]
17:52 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has joined #go-nuts
17:53 -!- DerHorst [~Horst@e176107006.adsl.alicedsl.de] has quit [Ping timeout:
245 seconds]
18:04 -!- Genosh [~Genosh@79.155.31.56] has quit [Ping timeout: 240 seconds]
18:04 -!- Ccod [~peter@c-76-18-5-93.hsd1.fl.comcast.net] has left #go-nuts []
18:05 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
18:09 < dho> hey iant
18:09 < iant> dho: you
18:09 < iant> yo
18:10 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has quit [Read error:
Connection reset by peer]
18:11 < dho> not really a whole lot of go udp stuff written
18:12 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has joined #go-nuts
18:12 < iant> probably most of it is for DNS
18:15 < dho> been considering writing a netflow collector in go
18:16 < iant> cool
18:17 -!- devrim [~Adium@160.79.7.234] has quit [Ping timeout: 245 seconds]
18:17 < dho> it's either that or make this C one thread safe (and figure out
how to thread it in the first place)
18:18 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 272
seconds]
18:21 -!- stalled [~stalled@unaffiliated/stalled] has quit [Quit: ...]
18:23 -!- tdnrad [~tdnrad@D62A6.WPA.Dal.Ca] has quit [Quit: Leaving]
18:24 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts
18:35 -!- TheMue [~TheMue@p5DDF4BAE.dip.t-dialin.net] has joined #go-nuts
18:42 -!- caffeineborg
[~caffeineb@75-145-116-116-Colorado.hfc.comcastbusiness.net] has joined #go-nuts
18:43 -!- devrim [~Adium@160.79.7.234] has quit [Quit: Leaving.]
18:43 -!- TheMue [~TheMue@p5DDF4BAE.dip.t-dialin.net] has quit [Quit: TheMue]
18:44 -!- TheMue [~TheMue@p5DDF4BAE.dip.t-dialin.net] has joined #go-nuts
18:44 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has quit [Quit: ucasano]
18:52 -!- Tv [~tv@gige.bur.digisynd.com] has joined #go-nuts
18:59 -!- tensorpudding [~user@99.148.202.191] has joined #go-nuts
19:05 -!- artefon [~thiago@dhcp34.usuarios.dcc.ufmg.br] has quit [Quit: bye]
19:05 -!- anticw [~anticw@c-67-169-68-180.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
19:05 -!- anticw [~anticw@c-67-169-68-180.hsd1.ca.comcast.net] has joined #go-nuts
19:11 -!- xash [~xash@d074118.adsl.hansenet.de] has quit [Quit: Lost terminal]
19:15 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts
19:25 -!- devrim [~Adium@160.79.7.234] has quit [Ping timeout: 260 seconds]
19:31 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts
19:44 -!- Scorchin [~Scorchin@host86-162-0-121.range86-162.btcentralplus.com] has
joined #go-nuts
19:48 < KirkMcDonald> Hah.  I just noticed that Go has overtaken D on the
(oh-so-scientific) TIOBE index.
19:49 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
19:50 < nsf> I don't know should I happy about it or not
19:50 < nsf> because it means that a lot of people search stuff about Go,
but it doesn't mean they use it
19:50 < Namegduf> It doesn't seem fair to mock an incomplete language.
19:52 < nsf> of course they are curious about technology with such a big
company and big people underneath it
19:52 < nsf> but then they are like: "oh..  no templates..  oh..  no
<name your feature X>, I won't use it and I will write some crap in my blog
about it"
19:52 < nsf> :D
19:52 -!- rboyd [~rboyd@69-29-69-78.dyn.centurytel.net] has quit [Read error: No
route to host]
19:53 -!- rboyd [~rboyd@69-29-69-78.dyn.centurytel.net] has joined #go-nuts
19:53 < Namegduf> "I love simplicity, but can I have 50 more features with
that?"
19:53 < nsf> yeah
19:53 < Namegduf> Eurgh, bloggers.
19:53 < Namegduf> Tech bloggers especially.
19:54 < nsf> there are very nice tech bloggers out there actually
19:54 < nsf> Russ Cox and iant
19:54 < nsf> I like reading their blog
19:54 < nsf> mostly no judgement, purely technical stuff
19:54 < nsf> more like a serious article
19:55 < nsf> their blogs*
19:56 < Namegduf> Fair point.  I've never found one written by someone who
wasn't actually employed that I cared to read, though.
19:56 < Namegduf> Including the "journalists" at TechDirt and Ars.
19:58 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts
19:58 < nsf> btw, D isn't that bad, but I hate one special thing about it..
it has no valid spec
19:59 < nsf> it's not even a language but an implementation
19:59 < nsf> of course it's ok to have just an implementation, but sooner or
later there have to be a spec
19:59 < nsf> asking Walter everytime to know whether it is a bug or not is a
very bad idea
20:00 < nsf> and Go impressed me, because with the first public release, the
spec is here
20:00 < nsf> and it is correct
20:00 < nsf> and I can read it and learn Go
20:00 -!- artefon [~thiago@189.59.183.25.dynamic.adsl.gvt.net.br] has joined
#go-nuts
20:00 < Tv> nsf: write two other implementations that behave like you want,
claim consensus is on your side ;)
20:00 < Namegduf> A spec that is actually readable, understandable, and
reasonably short is good.
20:00 < Tv> nsf: (for D that is)
20:01 < nsf> frankly I don't care whether it is short or not, but it should
be complete
20:01 < nsf> D's is..  missing parts
20:01 < KirkMcDonald> Once upon a time, D had fewer features and a
reasonable-ish spec.
20:01 < Tv> the previous time i actually learned a language from the spec
was with Eiffel
20:01 < nsf> can't work with that kind of language
20:01 < Tv> i liked the way that book was written a lot
20:01 < Namegduf> A short spec means a small set of language rules, means a
simple language.
20:01 < KirkMcDonald> I learned D by reading the spec, and did so in a
single sitting.
20:01 < nsf> KirkMcDonald: well, it can be true for D 1.0
20:01 < KirkMcDonald> But additional features have gradually accrued.
20:02 < nsf> I want to learn D 2.0 :)
20:02 < nsf> and I can't :(
20:02 < KirkMcDonald> I was still following D quite closely when 2.0 first
came out.
20:02 < KirkMcDonald> But that was a while ago.
20:02 < KirkMcDonald> And it has accrued features and changed keywords since
then.
20:03 < KirkMcDonald> ("invariant" became "immutable", for instance.)
20:03 < nsf> yeah, that makes everything even worse
20:03 < nsf> because if there is no central place where you can read about
up-to-date language features (aka spec)
20:03 < nsf> you start lurking around the net
20:03 < KirkMcDonald> nsf: There *is* a spec.
20:04 < KirkMcDonald> http://digitalmars.com/d/2.0/lex.html
20:04 < nsf> and there are different stuff with different meanings
20:04 < KirkMcDonald> It's just huge.
20:04 < nsf> KirkMcDonald: it is incomplete
20:04 < nsf> and incorrect
20:04 < KirkMcDonald> That, too.
20:04 < KirkMcDonald> And the compiler has been notoriously bugg.y
20:04 < KirkMcDonald> buggy*
20:04 < KirkMcDonald> I'm looking at you, obscure template symbol resolution
errors.
20:05 < nsf> and yeah, it feels too complex at the moment
20:05 < nsf> maybe it isn't
20:05 < KirkMcDonald> I still maintain that D's take on templates is
generally excellent.
20:06 < KirkMcDonald> Or at the very least it is a huge step up from C++.
20:06 < nsf> well, maybe
20:06 < nsf> I don't like one thing about C++'s templates and I don't about
that in D
20:06 < nsf> implicit instantiation
20:07 < nsf> it should be explicit
20:07 < nsf> imho
20:09 < Namegduf> I don't like C++ build times
20:09 < Namegduf> D is better, so...
20:09 < nsf> btw, it will stop template metaprogramming in C++
20:09 < nsf> (explicit instantiation)
20:10 < nsf> therefore it will stop the whole metaprogramming abuse in C++
20:10 < nsf> D has CTFE
20:10 < nsf> which is nice
20:10 < nsf> imho
20:11 < nsf> although I'm pretty sure it will never be implemented in Go
20:12 < nsf> "they have a language interpreter built-in in the compiler, oh
no!  it's horrible"
20:12 < nsf> I don't think it's horrible
20:12 < nsf> some people disagree
20:18 -!- Tv [~tv@gige.bur.digisynd.com] has quit [Ping timeout: 245 seconds]
20:19 -!- DrHennessy [~alex@eng-4-104.hotspot.utah.edu] has joined #go-nuts
20:22 -!- DrHennessy [~alex@eng-4-104.hotspot.utah.edu] has quit [Client Quit]
20:23 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 240 seconds]
20:24 -!- matti___ [~mumboww@c-98-207-108-218.hsd1.ca.comcast.net] has left
#go-nuts []
20:24 -!- DrHennessy [~alex@eng-4-104.hotspot.utah.edu] has joined #go-nuts
20:24 -!- iant [~iant@216.239.45.130] has joined #go-nuts
20:24 -!- mode/#go-nuts [+v iant] by ChanServ
20:24 -!- DrHennessy [~alex@eng-4-104.hotspot.utah.edu] has quit [Client Quit]
20:25 -!- plainhao [~plainhao@208.75.85.237] has quit [Quit: plainhao]
20:28 < uriel> nsf: it is not horrible, it is beyond insane
20:28 < uriel> I'd like to know that when I start a compile job, it will end
20:28 < uriel> and not have to kill it wondering if I have a bug in my code
or there is a bug in the compiler
20:29 < uriel> (debugging an infinite loop in the compiler's interpreter is
going to be *fun*, specially on a big project)
20:29 < nsf> :)
20:29 < nsf> I don't think it's a big problem
20:30 < nsf> you see in D CTFE is restricted with pure functions
20:30 < uriel> if you want to precalculate something, be explicit, and write
a program that precalculates stuff, and build and run it like you would run any
other program
20:30 < nsf> it should be pretty easy to debug a pure function
20:30 < nsf> with no side effects and no global state
20:31 < uriel> I don't think defining a 'pure function' is that easy, and
again, debugging an infinite loop somewhere in there is going to be *fun*,
specially when you will pretty much have no way to know if the bug is in your code
or where in your code it might be
20:31 < nsf> maybe
20:32 < uriel> if you take a strict line regarding what a 'pure function'
is, you are limiting the kind of shit you can do with the whole approach too,
which shows how it is a retarded way to go about things
20:32 < nsf> well what can I say, I've never used that kind of feature, but
I had written a dozen of code generators
20:33 < nsf> I just though it would be useful to a have an integrated code
generator
20:33 < nsf> in the compiler itself
20:34 < nsf> which is weird of course
20:34 < nsf> :D
20:34 -!- Tv [~tv@gige.bur.digisynd.com] has joined #go-nuts
20:36 < nsf> btw, ternary if operator is evil
20:36 < nsf> that's all I think about the ongoing discussion in the ML :)
20:37 < KirkMcDonald> Python mostly added its ternary operator because all
of the hacks that people were coming up with (e.g.  and/or) were even worse.
20:38 < nsf> didn't know that it exists in python :D
20:38 < nsf> I know that ruby has a ternary op
20:38 < KirkMcDonald> nsf: So in C you have: A ? B : C
20:38 < KirkMcDonald> nsf: In Python you have: B if A else C
20:38 < nsf> ah, i see
20:38 < nsf> didn't know that
20:38 < KirkMcDonald> Python 2.5 and newer.
20:39 < nsf> although it looks like post condition expression
20:39 < nsf> like in perl and ruby
20:39 < nsf> <stmt> if <cond>
20:39 < KirkMcDonald> Before that, people usually used the and/or trick,
which is actually pretty awful.
20:41 -!- tav [~tav@92.7.97.179] has quit [Ping timeout: 245 seconds]
20:44 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 245 seconds]
20:45 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
20:46 -!- tav [~tav@92.7.145.125] has joined #go-nuts
20:51 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
20:56 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has quit [Ping timeout: 265
seconds]
21:00 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has joined #go-nuts
21:01 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts
21:01 < Gertm> I've had a discussion today at work about if statements too.
Whether one line clauses need curlies or not.
21:02 < Gertm> Personally I hate it when people do that.  I always write
curlies.  (C/C++ talking here)
21:03 < uriel> blah, the 'if' thread in gonuts is such a huge fucking
bikeshed
21:04 < uriel> Gertm: I hate the braces when they are not needed (in C, or
any other language that doesn't require them)
21:04 < uriel> but I'm fine with Go requiring them
21:04 < uriel> in the end, consistency is way more important than wasting
time discussing such trivialities
21:04 < Gertm> uriel: I hate it when people don't use them because it's so
easy to make mistaces and because it's inconsistent
21:05 < Gertm> but as long as I don't have to touch that code, it's fine
with me.  If I have to touch it, I change it usually.
21:05 < Gertm> but it's true, they are huge space wasters on single line
if's
21:06 < Gertm> but in Go it's different, since the syntax requires to put
the opening curlies on the same line
21:06 < Gertm> I'm using a lot of but's here :/
21:08 < Namegduf> The if thread is dumb rehashing.
21:08 < Namegduf> It's already been discussed.
21:10 < Gertm> woah, some people on the ML are really getting worked up
about it.
21:10 < dho> I hate when people don't use them because there's inevitably a
bug and I need to insert a logging statement there at some point to debug
21:11 < Namegduf> For every it in the set of possible things to discuss,
yes.
21:12 < TheSeeker> the only white space that should ever exist before
statements are tabs!  *agrfbrgl!1*
21:12 < TheSeeker> or somesuch?
21:12 < Gertm> Now you just need to post that to the ML in a serious-looking
kind of mail.
21:13 < Namegduf> More "Go should permit me to use a mixture of whitespace
and tabs that looks good on precisely one configuration
21:13 < Namegduf> You know, something there's already been three discussions
of
21:13 -!- rboyd [~rboyd@69-29-69-78.dyn.centurytel.net] has quit [Quit: rboyd]
21:13 < Gertm> semicolons!  generics!
21:14 < Namegduf> God, generics.
21:14 < Namegduf> "I think Go should have generics but have no proposal for
them because generics are good"#
21:14 < kimelto> TheSeeker: and everybody knows that a tab is 8 spaces long!
21:14 < TheSeeker> I run at super-high resolution, so my tabs equal 15
spaces...  this is the only proper configuration!
21:14 < dho> I THINK GO NEEDS LESS GO AND MORE [INSERT OTHER LANGUAGE I
WOULD RATHER USE INSTEAD HERE]
21:14 < Gertm> I use a netbook, tabs should be 2 spaces!
21:14 < Namegduf> I LIKE GO'S SIMPLICITY BUT WANT IT TO BE MORE LIKE C++
21:15 < Gertm> I'm using [RANDOMLANG]'s feature which doesn't exist in Go.
<WHINE>
21:15 < TheSeeker> Hey, how about we just use tabs, and let the editor
expand to N spaces isntead?  :P
21:15 < exch> ^
21:15 < TheSeeker> "But Editor X that's 40 years old doesn't support that
feature!"
21:15 < Namegduf> I recently was given some C code which used tabs for
alignment
21:16 < exch> This is why I love gofmt.  All code looks the same.  You can
make your editor decide how it actually looks to you.  Which is really where these
sort of issues belong
21:16 < Gertm> TheSeeker: don't you go blaming my editor!
21:16 < exch> Not in the language
21:16 < Namegduf> Except there was no tab width that everything actually
aligned for.
21:16 < Namegduf> I think they were just using a single tab for "alignment"
everywhere, which usually didn't work
21:17 < Namegduf> Even at a tab width of eight
21:17 < dho> 16:17 < Gertm> Now you just need to post that to the ML
in a serious-looking kind of mail.
21:17 < Namegduf> I wanted to kill the guy but he ran away.
21:17 < dho> I just did it in a very NOT serious email.
21:18 < kimelto> I like FreeBSD's style(9) which use default tabstop value
(8), but, heh, that's too long so we indent with a tab, next level is a
tab+4spaces, next level 2tabs and so on.  silly :)
21:18 < Namegduf> Ew.
21:18 < Namegduf> That looks wrong in every tabstop but 8.
21:18 < Namegduf> I actually use different tabstops depending on device and
code.
21:19 < Namegduf> I use 8 on my main system but my little netbook usually
uses 4.
21:19 < dho> The problem with style(9) is that you have to assume a tabstop
value of 8 for wrapping
21:20 < dho> So if you set your ts to 4, your code will inadvertantly bleed
past 80 characters per line.
21:21 < Namegduf> I think it's reasonable to say that it shouldn't bleed
past for a fixed tabstop, without excluding larger tabstops on devices with larger
widths.
21:21 < Namegduf> I'd set the standard at 4 for that, though, in my code.
21:21 < Namegduf> Go leaves that unspecified.
21:21 < dho> Right, but it's not 4.  It's 8 (in this case)
21:21 < dho> Still, the fact that there is style(9) is good.
21:21 < Namegduf> We need some kind of automated system, also, to make a
single post covering "People will abuse it" and "People will abuse every feature"
for every mailing list suggestion
21:22 < Namegduf> Because there are so goddamn many
21:22 < dho> Namegduf: I just posted one
21:22 < Gertm> dho: thank you.
21:22 < dho> hehe
21:22 < photron_> kimelto: just think of it as indenting with 4 spaces per
level and then replace consecutive sequences of 8 spaces with a tab.  i hate that
style because it reads really bad when you use 4 spaces per tab
21:30 -!- sauerbraten [~sauerbrat@p508CFB98.dip.t-dialin.net] has quit [Remote
host closed the connection]
21:30 < Namegduf> dho: Haha.
21:30 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Read error: Connection
reset by peer]
21:31 -!- TheMue [~TheMue@p5DDF4BAE.dip.t-dialin.net] has quit [Quit: TheMue]
21:38 -!- boscop [~boscop@g225218073.adsl.alicedsl.de] has quit [Read error:
Connection reset by peer]
21:39 -!- boscop [~boscop@g227120164.adsl.alicedsl.de] has joined #go-nuts
21:44 -!- mssm [~mssm@ip-95-221-86-196.bb.netbynet.ru] has quit [Ping timeout: 265
seconds]
21:47 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined
#go-nuts
21:53 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Quit: Venom_X]
21:57 -!- mssm [~mssm@ip-95-221-93-96.bb.netbynet.ru] has joined #go-nuts
21:57 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
21:58 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
22:01 -!- bmizerany [~bmizerany@208.66.27.62] has joined #go-nuts
22:02 -!- ymasory [~ymasory@SEAS083.wlan.seas.upenn.edu] has joined #go-nuts
22:06 -!- tdnrad [~tdnrad@DF039.VPN.Dal.Ca] has joined #go-nuts
22:07 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
22:13 -!- htoothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has quit [Ping
timeout: 240 seconds]
22:13 -!- ymasory [~ymasory@SEAS083.wlan.seas.upenn.edu] has quit [Ping timeout:
240 seconds]
22:13 -!- \toothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has joined
#go-nuts
22:16 -!- siyb [~siyb@83.216.216.131] has quit [Read error: Connection reset by
peer]
22:16 -!- siyb [~siyb@83.216.216.131] has joined #go-nuts
22:17 < fenicks> hello
22:18 -!- tvw [~tv@e176004242.adsl.alicedsl.de] has joined #go-nuts
22:18 -!- siyb [~siyb@83.216.216.131] has quit [Read error: No route to host]
22:18 -!- saerith [~saerith@pool-173-64-3-134.bflony.fios.verizon.net] has joined
#go-nuts
22:21 -!- siyb [~siyb@83.216.216.131] has joined #go-nuts
22:26 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
22:28 -!- photron_ [~photron@port-92-201-106-37.dynamic.qsc.de] has quit [Ping
timeout: 272 seconds]
22:30 -!- g0bl1n [~g0blin@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: g0bl1n]
22:37 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
22:40 < wrtp> fenicks: hi
22:44 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has quit [Ping timeout: 245 seconds]
22:46 -!- krutcha [~krutcha@remote.icron.com] has joined #go-nuts
22:46 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has joined #go-nuts
22:47 -!- DrHennessy [~alex@eng-4-104.hotspot.utah.edu] has joined #go-nuts
22:49 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
22:57 -!- DrHennessy [~alex@eng-4-104.hotspot.utah.edu] has quit [Quit:
DrHennessy]
22:58 -!- DrHennessy [~alex@eng-4-104.hotspot.utah.edu] has joined #go-nuts
23:00 -!- cbeck [cbeck@firefly.cat.pdx.edu] has quit [Quit: leaving]
23:03 -!- DrHennessy [~alex@eng-4-104.hotspot.utah.edu] has quit [Quit:
DrHennessy]
23:14 -!- ShadowIce` [pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
23:19 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has joined #go-nuts
23:20 -!- saerith [~saerith@pool-173-64-3-134.bflony.fios.verizon.net] has quit
[Quit: Leaving]
23:21 -!- bmizerany [~bmizerany@208.66.27.62] has quit [Remote host closed the
connection]
23:23 -!- bmizerany [~bmizerany@208.66.27.62] has joined #go-nuts
23:25 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
23:29 -!- krutcha [~krutcha@remote.icron.com] has quit [Quit: Leaving]
23:41 -!- SirPsychoS [~sp@c-24-13-132-255.hsd1.il.comcast.net] has joined #go-nuts
23:47 < uriel> 21:14 < Namegduf> I LIKE GO'S SIMPLICITY BUT WANT IT TO
BE MORE LIKE C++
23:47 < uriel> Namegduf: hahaha!  *amen*
23:49 < nsf> :)
23:49 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
23:51 < plexdev> http://is.gd/hC1Hh by [Yves Junqueira] in go/doc/ --
Documentation: how to write Makefiles for commands.
23:51 < plexdev> http://is.gd/hC1Ho by [Yves Junqueira] in go/doc/ -- doc:
add link to codewalks.
23:52 -!- tensorpudding [~user@99.148.202.191] has quit [Quit: ERC Version 5.3
(IRC client for Emacs)]
23:52 -!- tensorpudding [~user@99.148.202.191] has joined #go-nuts
23:54 -!- wrtp [~rog@92.17.4.83] has quit [Quit: wrtp]
23:55 -!- wrtp [~rog@92.17.4.83] has joined #go-nuts
23:56 -!- awidegreen_ [~quassel@p5DF1CD32.dip.t-dialin.net] has quit [Remote host
closed the connection]
23:56 -!- wrtp [~rog@92.17.4.83] has quit [Client Quit]
--- Log closed Tue Nov 23 00:00:19 2010