--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog
-- I'm not absolutely sure of anything.
Go is a good programming language so far, I discovered. But there are two things, really not good about it, it may take some more time and gets better possibly if some one is working on it. Or it is good and you can suggest me the better source of it,>> The database management: No one can start with go right away writing a big web server or something. Go is really good in that though. But if one is writing a small web application in go for then the database interaction is really bad in go, there is no 5- 10 lines of code to get the data from some table. There are some third party (beta version) opensource drivers but does not have good documentations/examples. If there are please let me know.
>> All go documents written out there, are for high level programmers like some one should already know c, or c++ to understand some of those docs. It should be like any one who is working in html/JS/Flash/php or something can understand it.
On Wed, Mar 28, 2012 at 16:46, Amitabh Arya <amitab...@gmail.com> wrote:
>>> The database management: No one can start with go right away writing a
>>> big web server or something. Go is really good in that though. But if one
>>> is writing a small web application in go for then the database interaction
>>> is really bad in go, there is no 5- 10 lines of code to get the data from
>>> some table. There are some third party (beta version) opensource drivers
>>> but does not have good documentations/examples. If there are please let me
>>> know.
It's true. The database support is weak right now.
We worked hard to get the database/sql API defined and working
in a form we were willing to commit to, but the drivers for it are still
rough. Now that the sql package exists, though, I think the drivers
will come along nicely. If you say what database you are using,
people here might be able to suggest a good driver. Eventually I think
we will have a subrepository with recommended drivers.
>>> All go documents written out there, are for high level programmers like
>>> some one should already know c, or c++ to understand some of those docs. It
>>> should be like any one who is working in html/JS/Flash/php or something can
>>> understand it.
That's also true. The main reason is simply that you don't have to write
nearly as much if you assume that people have already learned the
concepts of programming and just need to learn the new language.
I think that Go is a great language to use to learn how to program,
though, and if we stick around long enough I'm sure there will be books
targeted at that. We're a small team and don't have the bandwidth to
do that ourselves. http://tour.golang.org/ is a step in that direction,
and if someone wanted to develop a different tour for people who have
never programmed before, I think we'd be happy to support that effort.
Thanks again for your comments.
Russ
I only find http://code.google.com/p/go-wiki/wiki/SQLDrivers this
. Is there anything else and better.. with example and docs.
>> The database management: No one can start with go right away writing a big web server or something. Go is really good in that though. But if one is writing a small web application in go for then the database interaction is really bad in go, there is no 5- 10 lines of code to get the data from some table. There are some third party (beta version) opensource drivers but does not have good documentations/examples. If there are please let me know.
>> All go documents written out there, are for high level programmers like some one should already know c, or c++ to understand some of those docs. It should be like any one who is working in html/JS/Flash/php or something can understand it.
If you say what database you are using,
people here might be able to suggest a good driver. Eventually I think
we will have a subrepository with recommended drivers.
If you say what database you are using,
people here might be able to suggest a good driver. Eventually I think
we will have a subrepository with recommended drivers.I would like you (community) to recommend me the best (usability/performance) SQLite driver you have tested. I have tested some:
The link to the recommended drivers earlier in this thread contains this one:... and it passes the go-sql-test test suite, too. That's what I would use.I don't know about the others. If they pass the test suite I'd love to hear it / have them added.
How do I get pkg-config installed?
>> All go documents written out there, are for high level programmers like some one should already know c, or c++ to understand some of those docs. It should be like any one who is working in html/JS/Flash/php or something can understand it.
I saw this one too, but I didn't use it because it needs pkg-config# pkg-config --cflags sqlite3exec: "pkg-config": executable file not found in %PATH%
updated README.
How about this.This is simple pkg-config implementation.
That was my pull request; sorry for breaking the Windows build :/
I think the crux of the issue is that we're either not using cgo in a
portable way, or cgo isn't yet that portable. I'm not familiar at all
with Windows so I'm not sure how the cgo works there (e.g., does it
require MinGW/Cygwin, or is it standalone?). On the *nix side, you can
have multiple versions of a library installed (albeit, this
configuration is uncommon); pkg-config will select the correct one.
Even if multiple versions aren't installed, there are very many places
a library might be installed (arguably, too many to enumerate). What
we need is a platform-independent way to tell cgo which libs to link
in without explicitly relying on having pkg-config.
So, my questions to the list are --
1. Does cgo already have this functionality built in? If so, how can
we leverage it?
2. If pkg-config doesn't exist, is it safe to assume the
library/headers are already in the configured search paths?
3. If it doesn't, can we add a fallthrough option that checks first
for the pkg-config tool, then falls through to manually-configured
LDFLAGS? e.g.
#cgo pkg-config: sqlite3 || LDFLAGS: -lsqlite3
(or something more syntactically elegant)
(this may deserve a separate thread)
I didn't read the book but the topic list looks very good and could be
a great help for those new to Go or programming in general.
--
André Moraes
http://andredevchannel.blogspot.com/
在 2012-3-29 上午6:22,"André Paquet" <andre....@gmail.com>写道:
>
> I think Go's documentation is very good, but my background is C++ so there goes my point. Sometimes the best documentation is code. I find myself reading the std library code when I have trouble understanding something. It reads really well.
>
No, code is not documentation. If someone found he must reading source code to understanding something, it means that the documentation is very bad.
--
by Liigo, http://blog.csdn.net/liigo/
Google+ https://plus.google.com/105597640837742873343/
-1.
Good code is the best documentation.
> No, code is not documentation. If someone found he must reading source code
> to understanding something, it means that the documentation is very bad.
The documentation need not be "very bad", just imperfect or not in the
reader's native ear or at a different technical level to that of the reader
or just plain unnecessary, given that the code is sitting Right There.
Different people understand things in different ways.
Chris
--
Chris "allusive" Dollin
Code is the best documentation because documentation can only vaguely
describe what the code does, where as the code can describe everything
in great detail.
--
=====================
http://jessta.id.au
I don't understand what you mean, the current godoc does exactly that.
--
Aram Hăvărneanu
Good code is the best documentation.
We still have
http://gopkgdoc.appspot.com/
M;
What functionality is available in the excellent gopkgdoc that's not
available in the current godoc but was available in a previous godoc?
--
Aram Hăvărneanu
Godoc still does that...
godoc -http=:6060 -path=. in my GOPATH and everything is fully visible
through the web interface.
Or am I missing what you're saying?
- Jim
Yes, that's precisely what I mean. It's pretty simple:
mkdir /tmp/gopath
cd /tmp/gopath
git clone https://github.com/jnwhiteh/go-luapatterns src
godoc -http :6060 -path . &
When I visit http://localhost:6060 I can see all of the documentation
and source for that package.
What isn't visible there is any of the standard library documentation.
It also doesn't auto-detect GOPATH and include that as an additional
path.
It's a bit rough around the edges, but the behaviour has only changed
a tiny bit (it used to show your packages AND std libs).
- Jim
mkdir /tmp/gopath
cd /tmp/gopath
git clone https://github.com/jnwhiteh/go-luapatterns src
godoc -http :6060 -path . &
When I visit http://localhost:6060 I can see all of the documentation
and source for that package.
What isn't visible there is any of the standard library documentation.
It also doesn't auto-detect GOPATH and include that as an additional
path.
It's a bit rough around the edges, but the behaviour has only changed
a tiny bit (it used to show your packages AND std libs).
It's possible that my GOPATH wasn't set correctly, but I was just
trying to show that it did seem to do what he was asking for,
regardless =)
On Mar 29, 10:37 pm, kortschak wrote:
> It's almost like the designers intended that the source be part of the
> documentation ;)
Oh, the code is excellently readable, but documentation provides the
higher-order view.