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

--- Log opened Thu Jul 29 00:00:06 2010
00:08 -!- kingdon [~kingdon@129.21.78.102] has joined #go-nuts
00:08 < artefon> how do i write files with go?
00:09 < exch> import "io/ioutil"; ...  err := ioutil.WriteFile("filename",
byteslicewithdata, 0600)
00:09 < exch> that's the easy way :)
00:10 < exch> ioutil.ReadFile() does the opposite obviously
00:10 < exch> The hard way would be to use os.Open() and manually copy stuff
00:10 < kingdon> you could also use an instance of FileWriter
00:10 < kingdon> yeah
00:10 < kingdon> Open will give you a Writer if you ask for it
00:11 < jokerwww> exch: so you mentioned a pointer always had size 8, and I
didn't even question it, but kept getting segfaults....  it has size 8 on x64, I'm
on x86 where it has size 4, =)
00:11 < exch> ah good catch.  I'll have to fix my own code to then
00:11 < jokerwww> is there anyway to get at runtime the size of a pointer(or
the arch)?
00:12 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
Leaving]
00:12 -!- willdye [~willdye@fern.dsndata.com] has left #go-nuts []
00:13 -!- nickaugust [~nickaugus@114.232.121.70.cfl.res.rr.com] has quit [Quit:
WeeChat 0.2.6]
00:14 < exch> the only way to get the runtime size would be to add your own
C function to the cgo glue that calculates it for you
00:14 < kingdon> who knows a good tutorial on cgo?
00:15 < kingdon> what's a good library to start with (something you can't
already do in Go using internal libs, obviously)
00:15 < artefon> exch: thanks
00:15 < drhodes> kingdon: I was looking for that myself, the best I found
was studing the SDL wrappers from banthar
00:16 < exch> jokerwww: syscall.Utsname() will give you a struct that has
the arch
00:16 < jokerwww> exch: you can use unsafe.Sizeof(pointer)
00:16 < jokerwww> =)
00:16 < exch> oh ofcourse ><
00:16 < exch> it's time for coffee
00:17 < drhodes> kingdon: http://github.com/banthar/Go-SDL , is the one I
mean.
00:18 < artefon> exch: how do ii print one error message?
00:18 < jokerwww> artefon: panic()
00:18 < jokerwww> well, that prints and exits
00:19 < exch> fmt.Fprintf(os.Stderr, "ohnoes: %v\n", err) prints to stderr..
Or you can use log.Stderrf("ohnoes: %v", err) if you don't want to crash the app
00:20 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
00:21 -!- ilovefairuz [~ilovefair@unaffiliated/violinappren] has quit
[Disconnected by services]
00:23 -!- photron [~photron@port-92-201-230-90.dynamic.qsc.de] has quit [Read
error: Operation timed out]
00:23 -!- ilovefairuz [~ilovefair@unaffiliated/violinappren] has joined #go-nuts
00:25 < artefon> exch: im trying to write a png
00:25 < artefon> exch: i oppened a file with file, _ := os.Open("file.png",
os.O_CREATE, 0) and encoded with err := png.Encode(file,world.outputImage) but i
got
00:26 < artefon> exch: panic: invalid argument
00:27 < artefon> exch: o no sorry
00:27 < artefon> exch: the problem was when i tryed to open the file
00:28 < saracen> What about if you pass os.O_RDWR|os.O_CREATE?
00:28 < artefon> saracen: ill try
00:29 < artefon> saracen: same problem :( panic: open file.png: permission
denied
00:29 < saracen> That's a different panic.  Sounds like what it says, you
dont have write permission on that directory
00:29 -!- upmauro [~upmauro@189-015-234-089.xd-dynamic.ctbcnetsuper.com.br] has
joined #go-nuts
00:30 < artefon> saracen: but i have, it creates the file
00:30 < artefon> saracen: but it is an invalid png
00:30 -!- nickaugust [~nickaugus@114.232.121.70.cfl.res.rr.com] has joined
#go-nuts
00:30 < artefon> saracen: now it worked
00:30 < artefon> saracen: i set the chmod parameter
00:30 < artefon> saracen: thanks for your help :)
00:30 < upmauro> please, help-me ..  how i execute external binary and get
console output ..  using go ?
00:30 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
00:31 < saracen> artefon: np :)
00:31 < upmauro> for example ..  "cat"
00:32 -!- b00m_chef [~watr@S0106001cdf7f4bb8.vc.shawcable.net] has joined #go-nuts
00:34 -!- upmauro [~upmauro@189-015-234-089.xd-dynamic.ctbcnetsuper.com.br] has
quit [Quit: Ex-Chat]
00:35 -!- upmauro [~upmauro@189-015-234-089.xd-dynamic.ctbcnetsuper.com.br] has
joined #go-nuts
00:36 < saracen> upmauro: Check exec.Run
00:36 < saracen> http://golang.org/src/pkg/exec/exec.go
00:36 < upmauro> saracen, thanks
00:41 -!- jokerwww [~jokerwww@187.106.16.17] has quit [Remote host closed the
connection]
00:43 -!- b00m_chef__ [~watr@S0106001cdf7f4bb8.vc.shawcable.net] has joined
#go-nuts
00:47 -!- b00m_chef [~watr@S0106001cdf7f4bb8.vc.shawcable.net] has quit [Ping
timeout: 240 seconds]
00:49 -!- b00m_chef [~watr@S0106001cdf7f4bb8.vc.shawcable.net] has joined #go-nuts
00:50 -!- b00m_chef__ [~watr@S0106001cdf7f4bb8.vc.shawcable.net] has quit [Ping
timeout: 260 seconds]
00:50 -!- b00m_chef__ [~watr@S0106001cdf7f4bb8.vc.shawcable.net] has joined
#go-nuts
00:52 -!- mat__ [~mat@mx3.absolight.net] has joined #go-nuts
00:54 -!- mat_ [~mat@mx3.absolight.net] has quit [Ping timeout: 248 seconds]
00:54 -!- b00m_chef [~watr@S0106001cdf7f4bb8.vc.shawcable.net] has quit [Ping
timeout: 264 seconds]
00:56 -!- artefon [~thiago@189.107.178.3] has quit [Quit: bye]
00:57 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
01:01 -!- b00m_chef__ [~watr@S0106001cdf7f4bb8.vc.shawcable.net] has quit [Ping
timeout: 260 seconds]
01:04 -!- mikespook1 [~mikespook@219.137.75.249] has joined #go-nuts
01:04 -!- mikespook [~mikespook@219.137.72.122] has quit [Read error: Connection
reset by peer]
01:14 < upmauro> how i convert bytes.Buffer to string ?
01:15 < exch> buf.String()
01:15 -!- boscop [~boscop@f055210009.adsl.alicedsl.de] has quit [Read error:
Connection reset by peer]
01:15 -!- boscop [~boscop@f055210009.adsl.alicedsl.de] has joined #go-nuts
01:16 < upmauro> thanks
01:18 < ilovefairuz> now it makes a bit more sense why a type declaration
has to be prefixed with 'type'.  If it was only, say, 'SomeInt int' it would have
been kind of ambiguous where this is a variable declaration or not (thankfully it
also requires 'var' if the type is to be specified)
01:20 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
01:27 -!- Bombe [~droden@freenet/developer/Bombe] has quit [Excess Flood]
01:28 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
01:30 < upmauro> ls , err := exec.Run("/usr/bin/ls", []string{""},
os.Environ(), "", exec.Pipe, exec.Pipe, exec.Pipe);
01:30 < upmauro> var buf bytes.Buffer;
01:30 < upmauro> io.Copy(&buf,ls.Stdout);
01:31 < plexdev> http://is.gd/dPLgY by [Fazlul Shahriar] in 2 subdirs of
go/src/pkg/ -- http: add https client support
01:31 < plexdev> http://is.gd/dPLh6 by [Russ Cox] in 2 subdirs of go/ -- gc:
fix SIGBUS
01:31 < plexdev> http://is.gd/dPLhn by [Vinu Rajashekhar] in go/test/ --
test/sigchld.go: use syscall.Kill instead of a combination
01:31 < upmauro> but ..  buff.String() cause invalid memory address or nil
pointer dereference
01:32 < exch> did you initialize the buffer?  var data []byte; buf :=
bytes.NewBuffer(data);
01:33 < upmauro> omg, thanks
01:35 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts
01:36 -!- ilovefairuz [~ilovefair@unaffiliated/violinappren] has quit [Quit:
Leaving.]
01:46 < upmauro> lol, golang is hard !
01:49 -!- nickaugust [~nickaugus@114.232.121.70.cfl.res.rr.com] has left #go-nuts
["WeeChat 0.2.6"]
01:50 < skelterjohn> heh
01:50 < skelterjohn> i feel like that particular problem is not unique to go
01:59 < exch> getting to know the package api will take time, regardless of
the language :)
02:11 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Ping timeout: 240
seconds]
02:14 -!- nomono [~nomono@c-69-136-241-18.hsd1.nj.comcast.net] has joined #go-nuts
02:14 -!- nomono [~nomono@c-69-136-241-18.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
02:16 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 264 seconds]
02:19 -!- tumdum [~iubdwe@att186.neoplus.adsl.tpnet.pl] has joined #go-nuts
02:20 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat
0.3.2]
02:30 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
02:37 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
02:38 -!- gid [~gid@220-253-150-39.VIC.netspace.net.au] has joined #go-nuts
02:38 -!- gid [~gid@220-253-150-39.VIC.netspace.net.au] has quit [Client Quit]
02:39 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
02:40 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
02:40 -!- tumdum [~iubdwe@att186.neoplus.adsl.tpnet.pl] has quit [Changing host]
02:40 -!- tumdum [~iubdwe@unaffiliated/tumdum] has joined #go-nuts
02:42 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge]
02:46 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
02:46 -!- jokerwww [~jokerwww@187.106.16.17] has joined #go-nuts
02:47 < jokerwww> how do I get the equivalent of C++'s virtual methods in
Go?
02:50 < tensorpudding> what does a virtual method in C++ do?
02:51 < araujo> jokerwww, you mean, to get late binding?
02:51 < jokerwww> it is a method whose behavior can be overridden by a child
class.
02:51 < araujo> mm..  but that is not particular of a virtual method
02:51 < skelterjohn> go doesn't have classes
02:52 < skelterjohn> so you can't do that
02:52 < skelterjohn> but the tutorial shows you how to do similar things
02:52 < jokerwww> I have a method in struct "a" and I want it to call a
method of struct that co
02:52 < jokerwww> I have a method in struct "a" and I want it to call a
method of struct "b" that contains "a"
02:53 < jokerwww> I'm thinking this wrong?  should I be taking a different
approach altogether?
02:53 -!- aho [~nya@fuld-4d00d407.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
02:53 < skelterjohn> if you have a type A
02:53 < skelterjohn> and a method with receiver type A
02:53 < skelterjohn> then if you have a type B struct { A; other fields }
02:53 < skelterjohn> you can use that first method from A
02:53 < skelterjohn> or redefine it for B
02:54 < skelterjohn> interfaces are the way to do runtime method lookup for
arbitrary types
02:56 < jokerwww> skelterjohn: http://pastebin.com/5xj4Mm5H
02:56 < jokerwww> I'm not sure how I can use interfaces to do that
02:56 < skelterjohn> b.foo()
02:56 < skelterjohn> instead of b.A.foo()
02:57 < skelterjohn> oh - you never had a foo that does "something else"
02:57 < skelterjohn> you can have an interface "type Fooer interface { foo()
}"
02:57 < skelterjohn> var f Fooer = anA // or aB
02:57 < skelterjohn> f.foo()
02:58 < skelterjohn> oh wait - didn't read all of your code
02:58 < skelterjohn> hmm
02:59 < skelterjohn> so, you can't do exactly what you want, there
03:00 < skelterjohn> when you call a method on something that isn't an
interface, it knows at compile time what method will be called
03:00 < skelterjohn> unless you have a field that happens to be a function,
but that is a wonky way of doing it
03:00 < skelterjohn> the thing to remember is that go doesn't actually have
classes, so trying to write a program as if it did is pounding a square peg into a
round hole
03:01 < jokerwww> skelterjohn: yes, the problem is after many years of
thinking in terms of classes, I sometimes don't know what is the Go way of solving
certain problems
03:02 < skelterjohn> this irc channel is a good place to start :)
03:03 < skelterjohn> the go-way of doing that might be to split it up into
three parts
03:03 < skelterjohn> you have the base-part, which is now just a struct.  it
knows about something of type interface { foo() }
03:04 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:04 -!- nighty__ [~nighty@210.188.173.245] has joined #go-nuts
03:04 < skelterjohn> it could be that your type A is a Fooer
03:04 < skelterjohn> as is your type B
03:04 < skelterjohn> if foo() needs data from the base
03:06 -!- bjarneh [~bjarneh@1x-193-157-193-186.uio.no] has left #go-nuts []
03:09 < jokerwww> skelterjohn: please continue
03:11 < skelterjohn> i meant that to be the end.  the "then" for that "if"
was the previous two lines :)
03:12 < jokerwww> oh, ok, =)
03:12 < skelterjohn> one of the biggest wastes of time in OO programming is
coming up with class hierarchies
03:12 < skelterjohn> with go, just write code that has functionality
03:12 < skelterjohn> sometimes it needs specific data to perform the
functionality, so you put it in a struct
03:14 < smw> skelterjohn, does go have less overhead because it does not
have classes?
03:14 < smw> or is the overhead so small it does not matter
03:15 < skelterjohn> are you talking code overhead or runtime overhead
03:15 <+danderson> I'm assuming you mean the overhead of the indirection
through vtables
03:15 < smw> runtime
03:15 < smw> yeah
03:15 <+danderson> that overhead is too small to matter in 99% of all
programs
03:15 < skelterjohn> i can only make educated guess
03:15 < skelterjohn> es
03:16 <+danderson> because the algorithm the program implements dominates
the time it takes to do vtable lookups
03:16 < skelterjohn> danderson is definitely a better source than me
03:16 < smw> danderson, ok, thanks
03:16 < skelterjohn> danderson: how about for very small functions...  the
equivalent of "getters" and "setters" from OOP
03:16 <+danderson> I've only seen one program so far where extra
virtualization might affect performance
03:16 < smw> and does anyone know if there is a libcurl binding?
03:16 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has quit
[Quit: derferman]
03:16 < skelterjohn> if you have, for instance, a matrix with 1000000
elements and you want to loop through and increment all of them
03:17 < skelterjohn> i feel that the vtable lookup might be a significant
portion of that time
03:17 <+danderson> and that program had the crap optimized out of it for 3
years before it got to that point
03:17 <+danderson> "depends"
03:17 <+danderson> maybe, maybe not.
03:18 <+danderson> but yes, if you're looping millions of times performing
an operation whose cost is on the order of a pointer deref, then virtualization is
significant
03:18 <+danderson> ...  how often do you do this?
03:18 <+danderson> yeah, I thought so :)
03:18 < skelterjohn> :)
03:19 < skelterjohn> speculating, of course
03:19 < skelterjohn> i don't see this as any kind of actual problem
03:19 <+danderson> it's good to be aware of vtables and the cost of the
indirection
03:19 -!- ckennelly [~ckennelly@neon.caltech.edu] has quit [Quit: Leaving.]
03:19 <+danderson> but unless your profiler reveals that this is a problem,
don't worry about it.
03:19 < smw> as for code overhead.  I think it makes the code readable :-P
03:20 -!- tumdum [~iubdwe@unaffiliated/tumdum] has quit [Ping timeout: 264
seconds]
03:20 <+danderson> in almost all cases, the higher level algorithm your code
implements will be the contention point
03:20 -!- upmauro [~upmauro@189-015-234-089.xd-dynamic.ctbcnetsuper.com.br] has
quit [Remote host closed the connection]
03:20 < smw> danderson, yeah, probably :-)
03:21 < skelterjohn> well, not unreasonable for someone to multiply two big
matrices by each other, for instance
03:21 < skelterjohn> but if they do, and they use gomatrix, using the Matrix
interface instead of one of the matrix structs is clearly a bad idea
03:22 < smw> anyone made libcurl bindings?
03:22 < smw> I want to learn cgo
03:22 < smw> are their any tutorials on cgo?
03:22 < skelterjohn> i think i saw something in the project list
03:22 <+danderson> skelterjohn: danger: does this "clearly" derive from
profiling?
03:22 < skelterjohn> either on cat-v or dashboard
03:23 <+danderson> if not, its possibly be a bad idea.  Until the profiler
shows significant performance loss, it's not clearly a bad idea
03:23 < skelterjohn> danderson: no...i'm inferring it from the fact that the
matrix structs will do multiplication in a way that takes advantage of the way the
data is stored
03:24 < smw> is there a cgo tutorial?
03:24 < skelterjohn> well actually, they do a type assert to check if it's
in one of the structs first, so, kinda moot
03:24 <+danderson> seriously, given the optimizations that compilers can
perform these days, combined with the optimizations that processor hardware does
03:25 <+danderson> the beliefs of developers on what will be fast/slow are
very often completely wrong these days
03:25 < skelterjohn> fair enough
03:25 < jokerwww> smw: I've searched and haven't found, I did learn some
stuff looking at banthar
03:25 < jokerwww> smw: I've searched and haven't found, I did learn some
stuff looking at banthar's Go-SDL
03:25 <+danderson> (not saying that you're wrong in this particular case,
just pontificating on generalities - that's what I do at 5:30am)
03:25 < skelterjohn> not to worry - i certainly took no offense either way
03:26 < skelterjohn> hard to optimize away a vtable lookup, though
03:27 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 260 seconds]
03:43 -!- Boney_ [~paul@124-168-222-206.dyn.iinet.net.au] has joined #go-nuts
03:43 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
03:44 -!- Boney [~paul@210-84-63-248.dyn.iinet.net.au] has quit [Read error:
Operation timed out]
03:51 -!- jokerwww [~jokerwww@187.106.16.17] has quit [Remote host closed the
connection]
03:54 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
Leaving]
04:00 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
04:12 -!- cbeck [ckolbeck@chandra.cs.pdx.edu] has joined #go-nuts
04:16 < cbeck> Can anyone who's messed with netchan advise on something?  I
wrote an echo server to play around, but in order to establish the connection the
server has to know its own IP/address, using 127.0.0.1/localhost causes connection
refused when the client attempts to connect
04:17 < cbeck> Grabbing the IP from the environment isn't terribly
difficult, but it still seems kludgey to need it at all
04:17 < cbeck> Tips?
04:20 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode]
04:22 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
04:31 < jessta> cbeck: you can use 0.0.0.0
04:32 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
04:34 < cbeck> jessta: Ah, thank you very much
04:37 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
04:41 -!- Tiger_ [~chatzilla@118.126.12.53] has joined #go-nuts
04:41 -!- ckennelly [~ckennelly@neon.caltech.edu] has joined #go-nuts
04:58 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
04:59 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Client
Quit]
05:01 < smw> can you use callback functions with cgo?
05:01 < Namegduf> No.
05:01 < smw> so it is impossible to use a lib that needs it?
05:03 -!- scm [justme@d071079.adsl.hansenet.de] has quit [Ping timeout: 248
seconds]
05:05 < plexdev> http://is.gd/dQ4jx by [Wei Guangjing] in 2 subdirs of
go/src/pkg/ -- net: implement windows version of LookupHost/Port/SRV
05:05 -!- scm [justme@d070052.adsl.hansenet.de] has joined #go-nuts
05:09 < jessta> smw: there are ways to get around it, I think the gtk
bindings do something
05:10 < smw> I have never gotten the gtk bindings to compile :-\
05:10 < kingdon> there are gtk bindings in go?
05:10 < kingdon> cool
05:10 -!- ghiu [~gu@93-32-175-181.ip34.fastwebnet.it] has joined #go-nuts
05:11 < smw> kingdon, yes, but I have never been able to get them to
compile.  I think it does not work with my version of gtk or something
05:11 < kingdon> smw: well what kind of system are you running?
05:12 < kingdon> if it's debian, i can show you how to use cdebootstrap to
get any version of anything
05:12 < smw> kingdon, nope sorry.  Archlinux
05:12 < smw> kingdon, I just decided it was not worth the effort
05:12 < kingdon> do you know how to do xen on there?
05:12 < smw> as in virtual machine?
05:12 < kingdon> i guess it's not that important
05:13 < kingdon> as in without virtualbox
05:13 < kingdon> or any level of system mongery for testing purposes
05:13 < kingdon> i always make a chroot system
05:13 < kingdon> when i want some exotic software
05:13 * araujo goes building the Sort interface for one type and see how it works
05:14 < kingdon> i should hang out here more often
05:14 < kingdon> i got a couple good links tonight
05:14 -!- path[l]_ [UPP@120.138.102.50] has joined #go-nuts
05:15 < kingdon> SDL-go and Go-GTK
05:15 -!- path[l] [UPP@120.138.102.50] has quit [Read error: Connection reset by
peer]
05:15 < araujo> :)
05:15 < araujo> this channel is nice yeah
05:16 * araujo has not tried the gtk bindings yet ..  but he eventually will
05:17 -!- ghiu [~gu@93-32-175-181.ip34.fastwebnet.it] has quit [Quit: ghiu]
05:18 < kingdon> i'll try all of these things
05:18 < kingdon> i'm almost out of work :D
05:18 -!- clintonc [~clintonc@ool-18bdec73.dyn.optonline.net] has quit [Quit: Lost
terminal]
05:18 < kingdon> in 3 weeks I won't have to take Physics classes anymore
05:19 < kingdon> time to go to bed
05:25 -!- Tiger_ [~chatzilla@118.126.12.53] has quit [Ping timeout: 260 seconds]
05:38 -!- prip [~foo@host97-130-dynamic.36-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 264 seconds]
05:46 -!- prip [~foo@host97-130-dynamic.36-79-r.retail.telecomitalia.it] has
joined #go-nuts
05:53 < araujo> mmm
05:54 * araujo trying to use the Sort() interface but doesn't seem to sort the
elements
05:56 < smw> so, how do you work with libraries that require callbacks?
05:56 < smw> in cgo
05:58 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
06:01 < araujo> smw, ?, what is exactly your question?
06:02 < smw> araujo, how do you get around the fact that you can't use
callbacks in cgo
06:04 < araujo> smw, but you can ....  go-gtk has plenty of examples for
that I think
06:04 < smw> I remember that it did not work at one point and when I asked
if it did today people said it didn't :-\
06:05 < smw> so they do work?
06:05 < araujo> smw, I have not really tested it yet, I have just poked at
the code
06:05 -!- Sacho [~sacho@79-100-169-151.btc-net.bg] has quit [Remote host closed
the connection]
06:06 < smw> ok
06:06 < smw> I guess I will test it later
06:32 -!- Slix` [~slix@c-76-29-94-243.hsd1.il.comcast.net] has joined #go-nuts
06:32 < Slix`> Hi.
06:32 < Slix`> This language looks pretty useful..
06:34 < jessta> yes!  it is!
06:35 -!- justindp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has joined #go-nuts
06:35 < araujo> has anyone worked here with the sort.Interface ?
06:35 < araujo> here Sort() doesn't seem to correctly sort the elements...
06:36 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has quit [Disconnected by
services]
06:38 -!- ronnyy [~quassel@p4FF1D7B2.dip.t-dialin.net] has joined #go-nuts
06:41 < nsf> I've worked, works correctly
06:41 -!- Slix` [~slix@c-76-29-94-243.hsd1.il.comcast.net] has quit [Read error:
Connection reset by peer]
06:42 < cbeck> araujo: Are you certain your Swap and Less functions are
correct?
06:42 < araujo> cbeck, mmm...  yeah yeh...
06:42 < araujo> cbeck, would you mind to take a look?
06:43 < cbeck> Sure
06:43 < araujo> ok, hold
06:45 < araujo> http://pastebin.com/BfuZkdFA
06:45 < araujo> very simple type
06:45 -!- Sacho [~sacho@213.91.244.15] has joined #go-nuts
06:45 < araujo> I am trying to sort based on the second IntVector element
06:46 < jessta> araujo: sorting a map?
06:47 < jessta> you can't sort a map
06:47 < araujo> jessta, mm..  invalid?
06:47 < jessta> maps are unordered
06:47 < araujo> really??  well, here the map "change" , it just doesn't give
the right order
06:47 < araujo> mm ok, I see
06:47 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
06:48 < araujo> that makes sense ..  it is a hash, so should I probably wrap
it?
06:48 < cbeck> jessta: True, but with int keys you can have an order
relative to the keys
06:48 < araujo> I thought so cbeck
06:48 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts
06:48 < jessta> but you shouldn't depend on that order
06:48 < jessta> araujo: why not use a vector?
06:48 < araujo> though internally I kno a map is just an unordered hash ..
I thought using int as keys would make it
06:49 < cbeck> Right, for instance iterating over key value pairs would not
happen in predictable order
06:49 < jessta> araujo: you can make a vector of the keys and sort that
06:49 < cbeck> with range, that is
06:49 -!- justindp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has quit []
06:49 < araujo> cbeck, right
06:50 < araujo> jessta, mm that would work too i guess
06:50 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 245 seconds]
06:53 * araujo mis-interpreted maps with collections
06:53 < araujo> though I think the function is actually sorting the values
correctly, they just get into the map unordered yeah :P
06:57 < smw> araujo, are you still having issues with sort?  I have used it
06:57 < smw> nm, just red last line XD
06:57 < smw> read*
07:07 -!- ilovefairuz [~ilovefair@unaffiliated/violinappren] has joined #go-nuts
07:08 < plexdev> http://is.gd/dQeEi by [Alex Brainman] in
go/src/pkg/runtime/windows/ -- runtime: fix bug introduced in revision
4a01b8d28570
07:12 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 240 seconds]
07:17 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts
07:22 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
07:26 -!- iant [~iant@74.125.118.2] has joined #go-nuts
07:26 -!- mode/#go-nuts [+v iant] by ChanServ
07:35 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
07:36 -!- ikaros [~ikaros@drms-4d0151ba.pool.mediaWays.net] has joined #go-nuts
07:40 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 248
seconds]
07:41 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
#go-nuts
07:42 -!- iant [~iant@74.125.118.2] has quit [Ping timeout: 248 seconds]
07:42 -!- iant [~iant@nat/google/x-vjyzfzwfwgosmuxi] has joined #go-nuts
07:42 -!- mode/#go-nuts [+v iant] by ChanServ
08:08 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
608 seconds]
08:10 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
08:11 -!- ville- [~ville@a107.ath.cx] has quit [Ping timeout: 246 seconds]
08:12 -!- hokapoka [~hokapoka@hoka.hokapoka.com] has quit [Ping timeout: 246
seconds]
08:16 -!- ville- [~ville@a107.ath.cx] has joined #go-nuts
08:16 -!- path[l] [UPP@120.138.102.50] has quit [Quit: path[l]]
08:17 -!- hokapoka [~hokapoka@hoka.hokapoka.com] has joined #go-nuts
08:21 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
08:22 -!- mikespook1 [~mikespook@219.137.75.249] has quit [Quit: Leaving.]
08:25 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche]
08:25 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Read error: Connection reset by peer]
08:34 -!- ronnyy [~quassel@p4FF1D7B2.dip.t-dialin.net] has quit [Remote host
closed the connection]
08:39 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
08:44 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Read
error: Operation timed out]
08:56 -!- path[l] [~path@59.162.86.164] has quit [Read error: Connection reset by
peer]
08:57 -!- path[l] [~path@122.182.0.38] has joined #go-nuts
09:01 -!- nsz [nsz@morecp.net] has quit [Ping timeout: 240 seconds]
09:04 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
09:06 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Ping timeout: 245 seconds]
09:07 -!- i__ [~none@unaffiliated/i--/x-3618442] has quit [Ping timeout: 245
seconds]
09:07 -!- anticw [~anticw@c-67-169-41-113.hsd1.ca.comcast.net] has quit [Ping
timeout: 265 seconds]
09:08 -!- i__ [~none@nkvd.ath.cx] has joined #go-nuts
09:09 -!- ikaros [~ikaros@drms-4d0151ba.pool.mediaWays.net] has quit [Quit: Leave
the magic to Houdini]
09:12 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
#go-nuts
09:17 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving]
09:21 -!- photron [~photron@port-92-201-147-162.dynamic.qsc.de] has joined
#go-nuts
09:22 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts
09:26 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts
09:28 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 260 seconds]
09:32 -!- visof [~visof@unaffiliated/visof] has quit [Read error: Connection reset
by peer]
09:33 -!- nf [~nf@124-168-155-100.dyn.iinet.net.au] has quit [Ping timeout: 252
seconds]
09:33 -!- visof [~visof@41.233.108.113] has joined #go-nuts
09:33 -!- visof [~visof@41.233.108.113] has quit [Changing host]
09:33 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts
09:35 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Read error: Connection
reset by peer]
09:37 -!- nf [~nf@124-171-6-238.dyn.iinet.net.au] has joined #go-nuts
09:39 -!- anticw [~anticw@c-67-169-41-113.hsd1.ca.comcast.net] has joined #go-nuts
09:49 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
09:51 -!- mlip [~mlip@85-127-151-185.dynamic.xdsl-line.inode.at] has joined
#go-nuts
09:59 -!- path[l] [~path@122.182.0.38] has quit [Quit: path[l]]
10:01 < mlip> hej , anyone knows if gccgo can be built without building gcc
itself (--enable-languages=go) ?
10:02 -!- ukai [~ukai@nat/google/x-oduyeobywiusdwxs] has quit [Ping timeout: 245
seconds]
10:03 < bartbes> you mean like only compiling the go part?
10:03 < mlip> yes
10:03 < bartbes> I suspect not, but I know nothing about gccgo
10:04 < bartbes> (or gcc's internals, for that matter)
10:04 < nsf> afaik by default it bootstraps, it means it builds g++ and then
compiles Go frontend (which was written in C++) with that
10:04 < nsf> and if you will turn that off
10:04 < nsf> all you need is go and C
10:04 < nsf> for some reason
10:05 < nsf> iant knows that reason better probably :)
10:05 < mlip> but why does it need another gcc if i have one installed ?
10:05 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
615 seconds]
10:06 <+iant> the default build for gcc will do a bootstrap, meaning that it
will build gcc and then use the newly built gcc to build itself again
10:06 -!- path[l] [~path@122.182.0.38] has joined #go-nuts
10:06 <+iant> you can turn that off by using --disable-bootstrap when you
run configure
10:06 <+iant> then you can build just a Go compiler
10:07 <+iant> well, it will still build a C compiler
10:07 <+iant> it doesn't help much, since the frontends are much smaller
than the middle-end and backend of gcc, which have to be built in any case
10:07 < mlip> iant: i just need a way to install it parallel (or as parallel
as possible) on my gentoo box
10:07 <+iant> use --prefix when you run configure
10:07 <+iant> --prefix=/my/private/gccgo
10:07 <+iant> then it will be installed there and will not disturb your
existing install
10:08 < bartbes> then it will be installed on your privates
10:08 < bartbes> (sorry for disturbing this serious conversation)
10:08 < mlip> i will try so
10:09 < mlip> i hope i can build it after checking out the latest version
10:10 < visof> is go written in C or c++ ?
10:10 < visof> or with go itself ?
10:10 < visof> like c
10:10 < nsf> Go is a language
10:10 < nsf> it has different implementations
10:10 < nsf> two currently
10:10 <+iant> the 6g compiler is written in C
10:10 < nsf> one is C, based on plan9 tool set
10:10 <+iant> the gccgo compiler is written in C++
10:10 < nsf> yes :)
10:11 < mlip> iant: since it is the casual gcc backend it should be possible
to fool with the runtime and link it against shared objects?
10:11 < visof> why isn't gccgo written in c too ?
10:11 <+iant> mlip: yes, gccgo links with shared objects
10:11 < visof> and isn't C is better than C++ in writing a compilers ?
10:11 <+iant> visof: I find C++ more productive than C (though of course I
then find Go more productive than either)
10:12 < mlip> iant: very nice; I tried altering the runtime of gc, but it is
really hard because everything has to be self-hosting ...
10:12 <+iant> I don't know of any reason why C would be better than C++ for
a compiler
10:12 <+iant> many compilers are written in C++
10:12 < visof> is there a book for go or just some tutorials?
10:12 <+iant> I think I saw a book mentioned on the list but I have not seen
the book itself
10:13 <+iant> it was not by one of the core contributors but it could still
be good
10:13 < smw> visof, there is an official tutorial on the website
10:13 <+iant> the language still changes from time to time so online
resources are likely to be more up to date
10:13 < visof> well, if i want to learn C and Go , which one should i start
learning ?, and should i learn both ?
10:14 < Tonnerre> I'd say learn C first, all the basics, make sure you
understand why everything is the way it is, then go for go
10:14 < Tonnerre> But well
10:14 < Tonnerre> Then again I'm me
10:14 <+iant> visof: it kind of depends
10:14 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
10:15 < visof> is there a pointers in Go ?
10:15 < exch> Knowing C will likely give you a solid foundation from which
to work with other languages and understand what is going on under the hood
10:15 < nsf> visof: do you have experience in other programming languages?
10:15 < napsy> yes
10:15 < visof> is go faster than C++ ?
10:15 < smw> visof, there are pointers, you can not manipulate them without
importing unsafe
10:16 < smw> visof, not enough to matter.
10:16 < nsf> language cannot be faster than other language :) you can
semicompare implementations of both languages
10:16 < visof> nsf what do you mean ?
10:16 < napsy> visof: go is work in progress, the current most complete
implementation is GC and it's not optimized yet.  But It looks promising
10:16 < bartbes> nsf: what if all operators are slower?
10:16 < smw> visof, gcc c++ probably has better optimizations
10:16 < visof> isn't C is faster than a lot of programming languages?
10:16 < smw> visof, plan9 go is too new
10:16 < nsf> visof: I mean that this statement is incorrect
10:17 < nsf> the language is a specification
10:17 < nsf> it's not a compiler
10:17 < nsf> nor a compiled program
10:17 < visof> ah
10:17 < bartbes> one exception I'd like to make
10:17 < bartbes> in any case
10:17 < bartbes> java is slow
10:17 < bartbes> :P
10:17 < smw> visof, C can not be faster, implementations can beat other
implementations (sometimes).
10:17 * bartbes trolls some more
10:17 < visof> so that depend on how the compiler work
10:17 < smw> bartbes, maybe compiled java would run faster ;-)
10:17 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
10:18 < bartbes> lies, it's still java
10:18 < visof> and Haskell too
10:18 -!- nighty__ [~nighty@210.188.173.245] has quit [Quit: Disappears in a puff
of smoke]
10:18 < visof> Haskell compiler is very fast
10:18 < smw> visof, gcc C, gcc C++, etc will probably be faster (resources
wise)
10:18 < visof> well, why the people don't make a good compiler for something
like ruby to run faster ?
10:19 < exch> they are trying
10:19 < nsf> visof: because it's hard
10:19 < smw> visof, ruby is an interpreted lang
10:19 < nsf> :)
10:19 < visof> i know
10:19 < smw> visof, and of course, it is hard, very hard :-P
10:19 < visof> it's hard to write a compiler ?
10:19 < nsf> there are few interesting projects with that goal in mind
10:19 < nsf> like pypy
10:19 < rsaarelm> Some languages are harder to compile into efficient code
than others.
10:19 < exch> It took a while for Lua as well, but now they have the LuaJIT
which significantly improves it's runtime performance.  Just takes time to and
skill to do
10:20 < smw> unladen swallow made improvements to make python much faster
10:20 < nsf> I'd say you simply can't compile some languages into a fast
code
10:20 < nsf> you need to JIT compile them
10:20 < nsf> using runtime information
10:20 < visof> what are the things make compiled C code faster than other ?
10:20 < visof> and why C is still alive ?
10:21 < nsf> because it closely reflects the underlying hardware
10:21 < visof> and will it die someday ?
10:21 < nsf> frankly it's the only language that do so
10:21 < exch> it's a relatively simple language with a lot of power and a
very optimized compiler.  Because it's so old people have had alot of time to
tweak and improve it
10:21 < nsf> but still gives a portable abstraction
10:21 < smw> visof, it may one day die.  But I expect it to stick around for
at least most of my life (I am 17)
10:22 < visof> haha
10:22 < nsf> it will die when x86 will die
10:22 < ampleyfly> nah, it's used for embedded stuff on arm
10:22 < visof> the world move to parallelism, sequential compilation won't
be good
10:22 < visof> we need functional style
10:23 < visof> so Haskell will be one of the future language
10:23 < visof> languages
10:23 * nsf will never learn Haskell
10:23 < smw> visof, don't say that.  You will be wrong :-P
10:23 < nsf> I promise :)
10:23 < ampleyfly> nsf: but why?  =)
10:23 < bartbes> I refuse to believe in a world without forth :P
10:23 < visof> smw why ?
10:23 < nsf> ampleyfly: I don't understand it :)
10:24 < nsf> I mean in general..  conceptually
10:24 < visof> intel at 2011 will produce 64 core , how can you program that
?
10:24 < napsy> functional languages are not goot at systems programming
10:24 < bartbes> using visual basic
10:24 < nsf> I'm not a fan of functional programming
10:24 < smw> visof, you named a technology and said that is going to be the
future.  99.99999% of the time you are wrong
10:24 < napsy> but are good for solving problems
10:24 < ampleyfly> nsf: ok, too bad, I like it =)
10:24 < rsaarelm> Haskell is neat, but it's a bit tricky for systems
programming as it's separated from the underlying hardware by a big chunk of
pretty opaque language machinery.
10:24 < visof> smw if i'm wrong , are you right ?
10:25 < Tonnerre> At some point it just becomes hard to actually use the
ressources physically…
10:25 < rsaarelm> You can't hug the iron like you can with C.
10:25 < smw> visof, Haskell has been around for quite a while.  I doubt it
will all of a sudden pick up
10:25 < bartbes> and
10:25 < bartbes> abstracted languages
10:25 < ampleyfly> clojure is aspiring to be the language for concurrency
10:25 < bartbes> what do they use for their abstraction?
10:25 < nsf> I think the most important thing in programming is actually a
resources management (who owns who, how data relates to other data, etc.)
10:26 < nsf> and I can't see how functional languages solve that problem
10:26 < ampleyfly> but it is closely coupled with java
10:26 < Tonnerre> Java – builtin contention
10:26 < bartbes> don't you need a low-level language to build a high-level
language?
10:26 < rsaarelm> The stuff Alan Kay's been recently involved with does seem
interesting.  They have a research agenda for developing a concise core language
which would allow scaling up from bare metal programming to high level
abstraction, all in the same language system.
10:26 < Tonnerre> Nah
10:26 < bartbes> unless you make some weird processor
10:26 < Tonnerre> bartbes, look at jruby
10:27 < Tonnerre> Which is actually amazingly fast for the fact that it runs
Ruby in Java
10:27 < Tonnerre> Or Jython, which is faster than Python, but then again,
what isn't
10:27 < nsf> better look at pypy
10:27 -!- wrtp [~rog@92.17.51.177] has quit [Quit: wrtp]
10:27 < nsf> the fastest python implementation that is written in python
10:28 < nsf> s/that/which/
10:28 < smw> wait, the java python is faster than the C one?
10:28 < rsaarelm> This stuff:
http://en.wikipedia.org/wiki/COLA_(software_architecture) I just don't think the
research project has advanced very much.
10:28 < nsf> or luajit2, for the amusing power of low level hacking
10:28 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 265 seconds]
10:30 -!- saschpe [~saschpe@mgdb-4d0cfc11.pool.mediaWays.net] has joined #go-nuts
10:30 < Tonnerre> smw, yes
10:30 < smw> and what does the python python run on?
10:30 < smw> at some point it needs to get to machine code
10:30 < Tonnerre> nsf, or pawn
10:31 < Tonnerre> pawn is a damn tiny scripting language actually
10:31 < Tonnerre> But not nearly as useful as lua
10:31 < jessta> smw: pypy uses llvm
10:31 < nsf> smw: pypy is a jit compiler/interpretator generator framework
:)
10:31 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
10:31 < nsf> jessta: not it's not
10:31 < nsf> no*
10:31 < smw> so pypy is the fastest python?
10:32 < nsf> smw: see speed.pypy.org
10:32 < nsf> it runs quite fast
10:32 < jessta> nsf: it doesn't?
10:32 < nsf> jessta: yes, they have dropped LLVM long time ago
10:32 < nsf> because it was buggy
10:33 < Tonnerre> So they reinvented it?
10:33 < jessta> oh, I see
10:33 < nsf> Tonnerre: kind of :)
10:33 < Tonnerre> Way to go
10:33 < nsf> I agree that probably it's a wrong way to go
10:33 < jessta> smw: the C version of python is slow because it was written
by a language designer not a platform designer
10:34 < nsf> but they are quite successful
10:34 < Tonnerre> nsf, yeah, it's so much better than fixing bugs
10:34 < smw> jessta, that makes sense :-)
10:34 < nsf> jessta: it isn't really true, CPython implementation is quite
fast :) it just doesn't have any kind of JIT compiling technology in it
10:34 < nsf> it is simply an interpreter
10:34 < nsf> nicely tuned over years
10:35 < smw> what is JIT?
10:35 < nsf> just-in-time
10:35 < nsf> for dynamic languages the most popular way to gain a speed up
is to use a runtime information
10:35 < nsf> and based on that information generate optimized code paths
10:35 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts
10:35 < nsf> at runtime obviously
10:36 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
#go-nuts
10:36 < nsf> so called "tracing JIT"
10:37 < smw> nsf, well, it does not matter to me anyways.  I have never made
a program where the slowest link was the CPU
10:37 < nsf> smw: lucky you :)
10:38 < smw> nsf, I mostly do network stuff and small data processing and
normalizing.
10:38 < smw> CPU is not really an issue ;-)
10:38 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
10:38 < nsf> well in future the CPU will not be an issue and effecient data
communication will be
10:39 < nsf> because of many cores
10:39 < nsf> imho
10:39 < nsf> so, if someone is worried about whether Go is faster than C++,
he is probably wasting his time
10:39 < smw> nsf, we are already at that point in for alot of applications
10:40 < smw> nsf, of course the photoshops of the world will always prove me
wrong
10:40 < nsf> :)
10:44 < jessta> nsf: CPU will actually be more of an issue, so as to reduce
the need to communicate between cores
10:44 < jessta> since the CPUs aren't getting faster
10:45 < nsf> well you can't reduce that need forever
10:45 < nsf> you can run each process in your OS on a separate core
10:45 < jessta> and things can only be as parallel as the problem allows
10:45 < nsf> but at some point you will have a lot of cores :)
10:46 < nsf> and yes
10:46 < nsf> that what the real issue is
10:46 < nsf> the design of algorithms
10:46 < nsf> will have to imply the notion of data
10:46 < nsf> and its transfering capabilities
10:46 < nsf> as much more important
10:46 < nsf> than they were before
10:47 < ckennelly> nsf: algorithms already take these notions into account
10:47 < nsf> ckennelly: probably, yes, I'm just too far from computer
science :)
10:48 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 260 seconds]
10:48 < ckennelly> it's a lot nicer assuming all accesses are uniform, but
we've already tackled issues like CPU caching in order to improve performance...
this just adds another layer to the data hierarchy
10:48 < nsf> yes, sadly :)
10:49 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
10:56 -!- Fish-Work [~Fish@86.65.182.207] has quit [Remote host closed the
connection]
10:56 -!- Fish-Work [~Fish@86.65.182.207] has joined #go-nuts
11:02 < ilovefairuz> i think Go has the potential to stretch from metal to
"enterprise" applications
11:06 < nsf> I don't think that the Go is really close to "metal", but the
current implementation have shown pretty good performance (I'd say "good enough").
And the Go itself has few other important qualities: fast compilation, clean
syntax, "pythonic" feel when typing, etc.
11:06 < nsf> After working with Go for some time, I really don't want to
return to my C++ Qt apps
11:06 < nsf> I hate to see how slow they are at compilation :)
11:07 < nsf> actually I didn't even realize before how important fast
compilation can be
11:08 < nsf> although I preferred C over C++ few times exactly for that
reason )
11:09 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error:
Connection reset by peer]
11:09 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
11:10 -!- iant [~iant@nat/google/x-vjyzfzwfwgosmuxi] has quit [Quit: Leaving.]
11:11 < ampleyfly> nsf: I work with qt c++, and agree..
11:11 < nsf> another sad conclusion :)
11:13 < nsf> I wish there were more Go jobs out there (zero currently?  :D)
11:16 < boscop> do the built-in types (e.g.  int) 'implement' the empty
interface or do you have to box them?
11:17 < nsf> yes they do
11:18 < nsf> and afaik they are not even getting boxed with current
implementation (if the size of a type is small enough)
11:18 < boscop> can you type switch on the elements of an []interface{} to
find out the actual type?
11:19 < nsf> sure, why not
11:19 -!- mattn___ [~mattn___@180-144-148-195.eonet.ne.jp] has joined #go-nuts
11:19 < nsf> you can type switch on any interface type
11:23 -!- ilovefairuz [~ilovefair@unaffiliated/violinappren] has quit [Quit:
Leaving.]
11:32 < rsaarelm> nsf: Pretty sure there are Go jobs at Google.  Though I'm
not sure how easy it's to get hired for one.
11:33 < nsf> hehe
11:40 -!- gid [~gid@220-253-150-39.VIC.netspace.net.au] has joined #go-nuts
11:41 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
11:45 < taruti> Is there a port of Go to Plan9?
11:46 < nsf> afaik there isn't
11:46 < taruti> :(
11:52 < tensorpudding> it's probably conceivable that it could be ported
11:53 < tensorpudding> an issue would be the dependence on gnu tools
11:56 < taruti> gnu tools *can* work on plan9 ;)
11:56 < tensorpudding> the go compilers are based on lib9 and the plan 9 c
compilers
11:56 < tensorpudding> has gnu make, bison and gcc been ported?
11:58 < tensorpudding> it's possible they'll compile under the plan 9 c
compilers, and using plan 9's yacc and the makefiles could be recast for mk
12:02 < nsf> I think porting tools isn't a big problem
12:03 < nsf> but the standard library should be fully ported too
12:03 < taruti> tensorpudding: yes, they work (with some issues on plan9)
12:05 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 248 seconds]
12:05 < tensorpudding> plan9 has a posix layer doesn't it?
12:06 < taruti> more like emulation
12:06 < tensorpudding> i mean to get plan 9 working in a vm, but my previous
attempts failed badly
12:07 -!- artefon [~thiago@189.107.178.3] has joined #go-nuts
12:09 -!- atsampson [~ats@ishman.kent.ac.uk] has quit [Quit: leaving Kent...]
12:15 -!- Tiger__ [~chatzilla@118.126.12.54] has joined #go-nuts
12:27 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
12:31 -!- tumdum [~iubdwe@att186.neoplus.adsl.tpnet.pl] has joined #go-nuts
12:32 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
12:54 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 264 seconds]
12:55 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
13:09 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat
0.3.2]
13:19 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has joined
#go-nuts
13:21 < jlouis> is x := range c canonical (where c is a channel)?
13:21 < jlouis> or is there another way to write that which is more
idiomatic?
13:25 -!- gnuvince_ [~vince@64.235.207.135] has quit [Quit: What the fruit is
goin' on here!?]
13:32 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 248 seconds]
13:32 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
13:38 -!- Tiger__ [~chatzilla@118.126.12.54] has quit [Ping timeout: 276 seconds]
13:41 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
13:43 -!- roop [~roop@122.167.55.226] has joined #go-nuts
13:52 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
13:56 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds]
13:57 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
13:59 -!- path[l] [~path@122.182.0.38] has quit [Quit: path[l]]
14:00 -!- emmanueloga [~emmanuelo@190.247.41.202] has quit [Quit: WeeChat
0.3.3-dev]
14:01 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
14:01 -!- gid [~gid@220-253-150-39.VIC.netspace.net.au] has quit [Quit: Leaving.]
14:01 -!- kanru [~kanru@118-168-235-195.dynamic.hinet.net] has joined #go-nuts
14:04 -!- tash [~sf@2001:638:204:6:21f:16ff:fe28:b064] has joined #go-nuts
14:04 -!- path[l] [~path@59.162.86.164] has quit [Client Quit]
14:05 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
14:05 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
14:06 -!- path[l] [~path@59.162.86.164] has quit [Client Quit]
14:06 -!- tash [~sf@2001:638:204:6:21f:16ff:fe28:b064] has left #go-nuts []
14:06 -!- tash [~sf@2001:638:204:6:21f:16ff:fe28:b064] has joined #go-nuts
14:07 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
14:09 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
14:12 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
14:15 -!- stalled [~stalled@unaffiliated/stalled] has quit [Quit: ...]
14:26 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
14:27 -!- kanru [~kanru@118-168-235-195.dynamic.hinet.net] has quit [Quit: WeeChat
0.3.2]
14:31 -!- kanru [~kanru@118-168-235-195.dynamic.hinet.net] has joined #go-nuts
14:34 -!- artefon [~thiago@189.107.178.3] has quit [Quit: bye]
14:39 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
14:44 -!- i__ [~none@nkvd.ath.cx] has quit [Changing host]
14:44 -!- i__ [~none@unaffiliated/i--/x-3618442] has joined #go-nuts
14:46 -!- visof [~visof@unaffiliated/visof] has quit [Quit: Leaving]
14:48 < exch> jlouis: the range use is fine on a channel
14:50 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
14:58 -!- RobertLJ_ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
14:58 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping
timeout: 258 seconds]
15:00 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
15:02 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
15:03 -!- kanru [~kanru@118-168-235-195.dynamic.hinet.net] has quit [Ping timeout:
246 seconds]
15:10 -!- mattn___ [~mattn___@180-144-148-195.eonet.ne.jp] has left #go-nuts []
15:11 -!- wobsite [~wobsite@68-112-244-225.dhcp.oxfr.ma.charter.com] has joined
#go-nuts
15:11 -!- Guest13130 [~luka@212.235.174.112] has quit [Ping timeout: 246 seconds]
15:17 -!- roop [~roop@122.167.55.226] has quit [Ping timeout: 260 seconds]
15:17 < jlouis> exch: ok, thanks
15:17 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]]
15:19 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Operation timed
out]
15:26 -!- tash [~sf@2001:638:204:6:21f:16ff:fe28:b064] has quit [Quit: Leaving.]
15:32 < nsf> hm..  I have a []byte containing a lot of strings, what's
faster: convert []byte to string and then strings.Split, or bytes.Split and then
convert each sub array to string?
15:33 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
15:33 < exch> probably the bytes.split approach
15:33 < nsf> I'll try :)
15:34 < exch> string manipulation is very slow because they are immutable
15:34 < nsf> thanks
15:34 < nsf> yep, just removed string concat in sort.Interface Less function
15:34 < nsf> -40ms for a request
15:34 < nsf> out of total 120ms
15:34 < nsf> :P
15:34 < exch> My postscript parser did string manipulation at first..  I
later changed it all to work directly with byte slices and performance went up by
70-80%
15:35 < nsf> yes, strings for some reason are very slow (
15:35 < exch> they have to be copied/recreated everytime you do something
like "foo" + "bar"
15:35 < jnwhiteh> nsf: gocode is great, thank you =)
15:35 < jnwhiteh> anyone have a good list of golang folks on twitter?
15:35 < nsf> jnwhiteh: I saw your tweet :)
15:36 < jnwhiteh> ah, stalker =)
15:36 < nsf> glad you liked it
15:39 < nsf> also what about string <-> []byte conversions
15:39 < nsf> they do allocations right?
15:40 < exch> Not sure how expensive that is tbh.  Probably worth testing
15:40 < exch> As a rule I try to avoid it as much as possible.  If I can
have funciton operate on []byte instead of strings, I will
15:43 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
15:44 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
15:46 -!- Venom_X [~pjacobs@adsl-99-3-159-249.dsl.hstntx.sbcglobal.net] has joined
#go-nuts
15:47 < nsf> nope, bytes.Split and then converting to strings is slower
15:47 < nsf> than converting to a string and then strings.Split
15:48 < exch> hmm
15:48 < nsf> difference is very small though
15:48 < nsf> like 5-10ms :)
15:48 < exch> seems the bottleneck is in the []byte -> string conversion
then
15:49 < nsf> I don't think it's a bottleneck
15:49 < nsf> it's just an allocation
15:49 < exch> in the second case you have one of those..  although I don't
know what strings.Split does internally
15:49 -!- roop [~roop@122.167.55.226] has joined #go-nuts
15:49 * exch looks
15:50 < nsf> in the second case I have many []byte -> string conversions
15:50 < nsf> and if it involves allocs
15:50 < nsf> it can be slower a little bit
15:50 < nsf> than allocating one big string and slicing it
15:52 -!- photron [~photron@port-92-201-147-162.dynamic.qsc.de] has quit [Ping
timeout: 260 seconds]
15:52 -!- gid [~gid@220-253-150-39.VIC.netspace.net.au] has joined #go-nuts
15:55 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
15:55 < exch> It seems that strings.Split does multiple allocations, but
that would depend o what exactly happens in this situation: s := "foobar"; t :=
s[0:3]; <- is that a copy?
15:56 < nsf> no it doesn't
15:56 < nsf> at least it shouldn't
15:56 < nsf> you can slice strings the same way as arrays and slices
15:56 < nsf> and it doesn't involve copy
15:56 -!- babusri [~Babu@122.166.164.251] has joined #go-nuts
15:57 < nsf> strings actually should be more lightweight than slices
15:57 < nsf> because it just a constant sized immutable chunk of memory
15:57 < nsf> s/it/it's/
15:57 < exch> So if you then do t[0] = ' ', s will be updated as well?  If
the assignment to t is just a slice pointing to the same underlying data, it
should
15:57 < nsf> no, you can't do it at all
15:58 < nsf> string type will not allow you
15:58 < exch> ah right.  forgot about that
15:58 < exch> immutable and all
15:58 < nsf> yes
15:59 < exch> In essence a Split() call when then simply return multiple
slices into the same original string/patch of memory.
15:59 < exch> nice
16:00 < nsf> yes
16:00 < nsf> both bytes.Split and strings.Split should perform more or less
the same
16:00 < nsf> and they do
16:00 < nsf> :)
16:03 < jlouis> hmm, can you implement a tagged union in Go via interfaces
(or the equivalent)?  I need an algebraic datatype, but I can't squeeze that out
of an interface
16:04 < jlouis> A simpler question is perhaps: How can I get a map to
contain both strings and integers at the same time
16:04 < jlouis> map[keyT] interface{} was my guess, but I can't see how to
coerce an int to interface{} then
16:05 -!- mattn___ [~mattn___@180-144-148-195.eonet.ne.jp] has joined #go-nuts
16:05 < exch> you cna just assign the int as-is.  it will satisfy the
interface{} type by default.  You have to do a manual type assertion to get the
int back out though
16:06 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Disconnected by
services]
16:06 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts
16:07 < nsf> integers are small why bother making them in a union
16:07 < nsf> just make a type IntStringPair struct { i int; s string }
16:07 < nsf> and then map[keyT]IntStringPair
16:08 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
16:08 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 248 seconds]
16:09 -!- RobertLJ_ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit
[Remote host closed the connection]
16:09 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
16:09 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
16:10 < jlouis> nsf: unfortunately that only works for a type as simple as
what you propose.  I don't really know why ADTs were not added to go.  I guess it
is the authors history which left them out
16:11 < nsf> well you've asked about simple type, I've proposed a solution
for that :)
16:11 < nsf> I think the main reason why unions are missing is that they
require good GC support
16:12 < nsf> or something else, I don't know
16:13 < jlouis> I am talked about tagged unions, not unions :)
16:13 < jlouis> and yes, one way to implement them is to keep the tag in the
GC header
16:14 < nsf> well, unions are a space optimization and having a tag is not
exactly a good thing for space optimization :)
16:15 < nsf> also you can store int in interface{} just fine
16:15 < nsf> but it stores a copy probably
16:15 < nsf> not a pointer
16:16 < jlouis> nsf: well, if the tag is in the GC header you are paying for
it anyway
16:17 < jlouis> and I have come to the realization that there is something
subtle about interfaces I do not grok..  :)
16:18 -!- rlab_ [~Miranda@91.200.158.34] has quit [Ping timeout: 276 seconds]
16:18 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
16:18 < nsf> frankly I haven't used them much
16:18 < jlouis> suppose you have: type Render interface { Render(writer
*bufio.Writer) } which is a simple unmarshalling service.  Now why can't I do func
(s string) Render(w *bufio.Writer) { ...  } ?
16:19 < nsf> because you can't add a method to an existing type
16:19 < jlouis> The error message says that string is not defined here, and
of course it is not
16:19 < nsf> you should define your own type
16:19 < nsf> type MyString string
16:19 < nsf> and add method to it
16:19 < jlouis> so, I should define type MyString string ...
16:19 < nsf> yes
16:19 < nsf> but you can use any string with it
16:19 < jlouis> right
16:19 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
16:20 < nsf> like: s := "my string"; MyString(s).Render()
16:20 < jlouis> Of course it beautifully circumvents some monkey-patching
business I think
16:20 < jlouis> thank you!
16:21 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
16:21 < nsf> I don't know it depends how you will use MyString type :)
16:21 < nsf> Go type system is quite simple
16:21 < nsf> it doesn't have implicit type conversions
16:23 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
16:24 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 276 seconds]
16:26 < jlouis> nsf: which is good!  strong typing beats weak typing in my
book
16:26 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:27 < nsf> well good or bad is just an opinion, I think it's good too, for
writing tools and compilers and maybe it makes code more readable, but it's
annoying sometimes
16:27 -!- rlab_ [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
16:28 < jlouis> I think it is a question between choices: An annoyance or a
subtle bug
16:29 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
16:29 < nsf> Go went a simple way, for example D 2.0 has this notion of
polysemous type
16:30 < nsf> it's interesting and very complex solution to a problem :)
16:31 < nsf> and what's better, I don't know..  time will tell
16:33 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
16:36 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts
16:41 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
16:42 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
16:50 -!- boscop [~boscop@f055210009.adsl.alicedsl.de] has quit [Read error:
Connection reset by peer]
16:51 -!- boscop [~boscop@f055210009.adsl.alicedsl.de] has joined #go-nuts
16:52 -!- mfoemmel [~mfoemmel@chml01.drwholdings.com] has quit [Remote host closed
the connection]
16:53 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
16:53 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Quit: (◣_◢)
BigBrowser is watching ⓎⓄⓊ]
16:57 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 260 seconds]
16:59 < skelterjohn> the only thing i don't like about the lack of implicit
conversions is when i do something like "a := 0.0; float64TakingFunction(a)"
17:02 -!- boscop_ [~boscop@g226255238.adsl.alicedsl.de] has joined #go-nuts
17:03 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
17:04 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
17:04 -!- tumdum [~iubdwe@att186.neoplus.adsl.tpnet.pl] has quit [Ping timeout:
260 seconds]
17:05 -!- boscop [~boscop@f055210009.adsl.alicedsl.de] has quit [Ping timeout: 265
seconds]
17:05 -!- boscop_ [~boscop@g226255238.adsl.alicedsl.de] has left #go-nuts []
17:05 -!- boscop [~boscop@g226255238.adsl.alicedsl.de] has joined #go-nuts
17:08 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
17:11 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 276 seconds]
17:13 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
slashus2]
17:14 -!- carllerche [~carllerch@99.13.242.166] has joined #go-nuts
17:24 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
17:28 -!- gnuvince_ [~vince@x-132-204-33-211.xtpr.umontreal.ca] has joined
#go-nuts
17:32 -!- mattn___ [~mattn___@180-144-148-195.eonet.ne.jp] has left #go-nuts []
17:44 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined
#go-nuts
17:50 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
18:04 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Read error: Connection
reset by peer]
18:04 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts
18:09 -!- carllerche [~carllerch@99.13.242.166] has quit [Quit: carllerche]
18:12 -!- Xenith [~xenith@xenith-2-pt.tunnel.tserv3.fmt2.ipv6.he.net] has quit
[Ping timeout: 252 seconds]
18:12 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 245 seconds]
18:18 -!- Xenith [~xenith@xenith-2-pt.tunnel.tserv3.fmt2.ipv6.he.net] has joined
#go-nuts
18:21 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
18:22 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has joined
#go-nuts
18:24 -!- tumdum [~iubdwe@att186.neoplus.adsl.tpnet.pl] has joined #go-nuts
18:37 -!- Sacho [~sacho@213.91.244.15] has quit [Ping timeout: 258 seconds]
18:38 -!- HollyRain [~HollyRain@87.223.127.89] has joined #go-nuts
18:39 -!- tumdum [~iubdwe@att186.neoplus.adsl.tpnet.pl] has quit [Changing host]
18:39 -!- tumdum [~iubdwe@unaffiliated/tumdum] has joined #go-nuts
18:42 < HollyRain> what does it have better performance to send a variable
to a function?  using a variable at package-level or to passing the variable to
the function?
18:46 -!- marsu [~marsu@93.12.57.227] has joined #go-nuts
18:52 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
18:52 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
18:54 -!- saschpe [~saschpe@mgdb-4d0cfc11.pool.mediaWays.net] has quit [Remote
host closed the connection]
19:02 -!- ckennelly [~ckennelly@neon.caltech.edu] has quit [Quit: Leaving.]
19:02 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:03 -!- wobsite [~wobsite@68-112-244-225.dhcp.oxfr.ma.charter.com] has left
#go-nuts []
19:04 < skelterjohn> HollyRain: I imagine the performance difference would
be negligible, if detectable at all.  however, it is difficult to write modular
code that uses lots of global variables and I advise against it
19:04 -!- ckennelly [~ckennelly@beryllium.caltech.edu] has joined #go-nuts
19:04 -!- roop [~roop@122.167.55.226] has quit [Ping timeout: 260 seconds]
19:04 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
19:04 < HollyRain> skelterjohn: ok, thanks
19:12 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
19:13 -!- ender2070 [~ender2070@bas22-toronto12-2925102709.dsl.bell.ca] has joined
#go-nuts
19:14 -!- gnuvince_ [~vince@x-132-204-33-211.xtpr.umontreal.ca] has quit [Read
error: Connection reset by peer]
19:14 -!- gnuvince_ [~vince@x-132-204-33-211.xtpr.umontreal.ca] has joined
#go-nuts
19:15 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit:
Leaving]
19:18 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
19:19 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving]
19:22 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
19:31 -!- chewbranca [~chewbranc@c-76-104-190-152.hsd1.wa.comcast.net] has joined
#go-nuts
19:39 -!- HollyRain [~HollyRain@87.223.127.89] has left #go-nuts []
19:49 -!- bjarneh [~bjarneh@135.80-203-19.nextgentel.com] has joined #go-nuts
19:52 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
20:10 -!- tumdum_ [~iubdwe@ats201.neoplus.adsl.tpnet.pl] has joined #go-nuts
20:13 -!- tumdum [~iubdwe@unaffiliated/tumdum] has quit [Ping timeout: 276
seconds]
20:15 -!- gnuvince_ [~vince@x-132-204-33-211.xtpr.umontreal.ca] has quit [Quit:
What the fruit is goin' on here!?]
20:26 -!- mlip [~mlip@85-127-151-185.dynamic.xdsl-line.inode.at] has left #go-nuts
[]
20:30 -!- aho [~nya@fuld-4d00d072.pool.mediaWays.net] has joined #go-nuts
20:33 -!- Venom_X [~pjacobs@adsl-99-3-159-249.dsl.hstntx.sbcglobal.net] has quit
[Quit: Venom_X]
20:53 -!- babusri [~Babu@122.166.164.251] has quit [Ping timeout: 265 seconds]
21:01 -!- tvw [~tv@e176002251.adsl.alicedsl.de] has joined #go-nuts
21:02 -!- gnuvince_ [~vince@64.235.207.135] has joined #go-nuts
21:04 < hokapoka> How do I make a regexp case insensitive?
21:06 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:06 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 260 seconds]
21:06 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 245 seconds]
21:07 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode]
21:07 < exch> For matching of alpha characters [a-zA-Z]+ should work
21:09 -!- tumdum_ [~iubdwe@ats201.neoplus.adsl.tpnet.pl] has quit [Ping timeout:
264 seconds]
21:09 < hokapoka> yeah, I'm trying to mach an actualy string value
21:09 < hokapoka> like /fobar/ig
21:10 < exch> go regexp package doesn't have options like that (yet)
21:10 < exch> It's a very simple implementation
21:10 < hokapoka> Right, that'll be why I've not found it yet.  ;)
21:12 < exch> If you really need it, your best bet is to use some bindings
for an external regex lib, or call sed through exec.Run()
21:12 < hokapoka> okay, thanks.  I'm trying to send the expression to
mongoDB, there's implymentaion for passing RexExp's in the gomongo package.  I'll
just send a vannilla string and change the BSOB parser.
21:12 < hokapoka> s/BSOB/BSON
21:12 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
21:14 -!- bjarneh [~bjarneh@135.80-203-19.nextgentel.com] has quit [Remote host
closed the connection]
21:15 -!- bjarneh [~bjarneh@135.80-203-19.nextgentel.com] has joined #go-nuts
21:17 -!- marsu [~marsu@93.12.57.227] has quit [Ping timeout: 248 seconds]
21:20 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:27 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
615 seconds]
21:27 -!- marsu [~marsu@93.12.57.227] has joined #go-nuts
21:28 -!- bjarneh [~bjarneh@135.80-203-19.nextgentel.com] has quit [Quit: bjarneh]
21:32 -!- ender2070 [~ender2070@bas22-toronto12-2925102709.dsl.bell.ca] has quit
[Remote host closed the connection]
21:33 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
21:44 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
21:47 < exch> I still cant get go-SDL to build.  I'm confus.  I
updated/rebuilt go a few times in the last couple of days.  Latest version of
go-sdl.  Tripple checked I had all sdl/gl -dev packages installed
21:55 < exch> doh.  founds ze bug
21:56 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
21:58 -!- photron [~photron@port-92-201-147-162.dynamic.qsc.de] has joined
#go-nuts
22:10 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
22:17 -!- ronnyy [~quassel@p4FF1D7B2.dip.t-dialin.net] has joined #go-nuts
22:19 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
22:32 < araujo> mmm..
22:33 < araujo> import "./file" // shouldn't import the file package located
in the current directory?
22:33 < exch> it should
22:34 < araujo> can't find import ./types
22:34 < araujo> the file name is types.go
22:35 < araujo> mmm ok nvm, think i get it
22:35 < exch> the package needs to be compiled first
22:38 < araujo> yeah that was it :)
22:38 < araujo> also, I notice Go encourages some kind of syntax in an
interesting way
22:40 < araujo> for example, a single function with a return value and
if-else statement
22:41 -!- ronnyy [~quassel@p4FF1D7B2.dip.t-dialin.net] has quit [Remote host
closed the connection]
22:43 -!- jchico [~jchico@cpe-98-14-12-209.nyc.res.rr.com] has joined #go-nuts
22:47 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
22:52 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 276 seconds]
23:01 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts
23:03 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
23:04 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
23:10 -!- kanru [~kanru@118-168-235-195.dynamic.hinet.net] has joined #go-nuts
23:11 -!- ender2070 [~ender2070@bas22-toronto12-2925102709.dsl.bell.ca] has joined
#go-nuts
23:12 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Operation timed
out]
23:14 -!- marsu [~marsu@93.12.57.227] has quit [Quit: Leaving]
23:18 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
23:18 -!- g0bl1n [~pr0kter@188.140.75.244] has joined #go-nuts
23:23 -!- tvw [~tv@e176002251.adsl.alicedsl.de] has quit [Remote host closed the
connection]
23:23 -!- franksalim [~frank@adsl-76-221-200-239.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
23:27 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
skelterjohn]
23:29 -!- jchico [~jchico@cpe-98-14-12-209.nyc.res.rr.com] has quit [Quit:
Leaving]
23:33 -!- g0bl1n [~pr0kter@188.140.75.244] has quit [Quit: I haz a dreamz...]
23:35 -!- artefon [~thiago@189.107.202.101] has joined #go-nuts
23:42 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
23:46 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has quit
[Quit: Page closed]
23:49 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
--- Log closed Fri Jul 30 00:00:05 2010