cenario which I haven't found a way to implement with the Go
> channels and select statement while it's no problem to do it with the
> select()/poll() functions. The scenario is as follows.
>
> Let me use a Go-like pseudo-code to demonstrate the idea. There is a
> sourc
Probably because UUIDv4 is the most common type and is trivial to
approximate. For other requirements, there are non-RFC conformant
implementations that achieve the desired properties
https://github.com/segmentio/ksuid
On Wednesday, February 7, 2018 at 5:43:08 PM UTC-8, 高橋誠二 wrote:
>
> Recentl
filepath.Walk).
On Friday, February 2, 2018 at 9:03:54 AM UTC-8, matthe...@gmail.com wrote:
>
> I’m looking at patterns summarized on Wikipedia from “Design Patterns:
> Elements of Reusable Object-Oriented Software” and writing out a few as the
> equivalent in Go.
>
> Visitor:
a language associated with academia (it's more practical and
less theoretical)
- There is a chance you will be paying someone to rewrite or port the
Python version into a Go version later*
*I speak from experience as someone who does this for C#, Python, C++ -->
Go. Your mileage will vary
Transitive property abused for emphasis.
On Saturday, December 2, 2017 at 7:06:15 PM UTC-8, hsmyers wrote:
>
> err…wouldn't that be "C an Bell product…" Bell Labs and all.
>
> On Sat, Dec 2, 2017 at 7:12 PM, as > wrote:
>
>> Calling Go a Google product m
Calling Go a Google product makes as much sense as calling C a Nokia
product.
On Friday, November 24, 2017 at 7:23:06 PM UTC-8, Hugh Aguilar wrote:
>
> I invented a chess variation called: Elphaba Chess
> This is just like International Chess except that the queen can't
;> return
>> }
>> fmt.Println("reply from server:", rAddr.String(), string(buf[0:n]))
>> n, err = conn.Read(buf[0:])
>> if err != nil {
>> return
>> }
>> conn.Close()
>> os.Exit(0)
>> }
>> }
>> func checkError(err error)
Shouldn't vet complain about this? I see this type of thing mostly in
closed-source code
https://play.golang.org/p/zl3gYi7QlE
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send
I made a code generator for this, but I consider it an unmaintained
experiment at best.
http://github.com/as/wire9
It can read a comment in the form //wire9 bstr n[4] data[n] and generate
the type along with a binary codec for it type
On Sunday, October 29, 2017 at 11:40:36 PM UTC-7, hui
I tested it with another font, and it definitely doesn't handle it. I'll
have to fix that.
https://github.com/as/frame/issues/26
On Tuesday, October 10, 2017 at 8:30:22 PM UTC-7, as wrote:
>
> For those of you who miss the Plan9 editable text boxes, here's a Go
> p
ly, the worst answer is maybe it does and I just forgot about it.
On Wednesday, October 11, 2017 at 7:17:01 PM UTC-7, Nigel Tao wrote:
>
> On Wed, Oct 11, 2017 at 2:30 PM, as wrote:
> > https://github.com/as/frame
>
> Nice!
>
Thanks!
On Wednesday, October 11, 2017 at 11:5
>which puts a keycap symbol around the previous character
Something about this sentence disturbs me.
On Wednesday, October 11, 2017 at 3:36:16 AM UTC-7, Ian Davis wrote:
>
>
> On Wed, 11 Oct 2017, at 11:16 AM, Gianguido Sorà wrote:
>
> Uhm, so the Replacer sees it as two sepa
A Go project is organized as a file system. The directory your go source
files reside in indicate the name of the executable created with go build.
On Tuesday, October 10, 2017 at 10:04:28 PM UTC-7, Pat Farrell wrote:
>
> I've installed the go 1.9 binary distribution on my window
For those of you who miss the Plan9 editable text boxes, here's a Go
package that approximates them:
https://github.com/as/frame
It's not a c2go conversion, but the functionality is almost identical at
the API level.
A few extra things added
- Raw ASCII bytes
- Elastic tabstops
Take the loop and put it inside the function call. Don't make function
calls in the body of a hot loop, take advantage of the loop optimizations
in the runtime and your cpu cache.
On Sunday, October 8, 2017 at 3:57:04 AM UTC-7, Zack Scholl wrote:
>
> Why is it that when I a method on an struct p
Thanks for clarifying that
On Wednesday, October 4, 2017 at 11:13:25 PM UTC-7, Nigel Tao wrote:
>
> On Sun, Oct 1, 2017 at 8:50 AM, as >
> wrote:
> > The official go fonts contain two identical copyright notices inside the
> TTF
> > data slice. One in UTF-8 and one
y the data, but there other several ways to see it,
like look for /Copyright/ in the resulting binary or TTF data.
package main
import (
"golang.org/x/image/font/gofont/gomono"
"github.com/as/edit"
"github.com/as/text"
)
func main(){
There's always a way to write confusing code in any language.
var a,b int = 10,20
for a&b != 0 {
do_something()
}
On Monday, September 11, 2017 at 5:07:48 PM UTC-7, Jon Jenkins wrote:
>
> I am a C developer and am trying to pick up Go.
>
> My question is this. C doesn't "care" about truthful
If your field names match the JSON field names, you don't have to
explicitly tag them.
On Monday, September 18, 2017 at 6:10:46 AM UTC-7, Anil wrote:
>
> Thanks alot!!
>
> On Monday, 18 September 2017 18:38:49 UTC+5:30, Shawn Milochik wrote:
>>
>> Your struct has all unexported fields. So the jso
Strings are immutable, slices arent. Doesnt this make a string the optimal read
only data structure for storing and passing around a run of bytes?
If there is performance data, please share.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To u
d port <https://github.com/as/frame>
of plan 9's libframe, which is currently missing utf-8 support, but
provides an editable text widget with a bitmap cache
- Font drawing: An official Go package exists for that too. The frame
port has a font cache of questionable utility
auth.IsReferrer(
http.HandlerFunc(
lh.AddReferrerHandler))
On Wednesday, September 6, 2017 at 9:10:43 PM UTC-7, Sankar wrote:
>
> Hi
>
> Are there any tools available for golang to split lon
ditor
firsthand (and I really need my nul bytes to remain uneaten).
https://github.com/as/a
I've tested it on Windows and Linux, and am happy enough with it to use it
for editing Go along with some other languages, hopefully it will be of use
to someone else as well.
--
You received th
Once something is buffered, it can not be unbuffered. That is, the latency
of the I/O operations permanently increase with respect to the properties
of the buffering done underneath. Go does not buffer things by default
because not everyone wants to buffer things by default. This is also why
Na
ms, because computers since the IBM
> 360/85 (1969), the DEC PDP-11/70 (1975), and a others before have memory
> caches. They can also have multiple CPUs, multiple levels of memory cache,
> and since 1964's CDC 6000, multiple threads active in a single CPU (the
> basis of the f
For loops are not your enemy. Cyclomatic complexity in cute_loop_functions is.
The for loop tells you something is happening. Your contains loop is always
running for the entire length of the slice.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" gro
Thanks for suggesting the Reader(q0, q1 int64) io.RuneReader. I accidentally
replied off list.
I wasn't aware of up to four horsemen being involved. The man pages didn't
prepare me for this.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
lopers. Because I just used go for a couple of months
> for my private web projects and rarely get in touch with channels.
>
> By the way, that article is not a rant and the author likes go very much
> as far as I can conclude from the article.
>
> Cheers snmed
>
--
You receiv
I'm sure this has been done already, but I thought I'd share my
implementation of this here for anyone interested in using structural
regular expressions in Go. It doesn't cover 100% of what Edit does in Acme,
but its close enough that I can use the example program
<https://
channels as conduits.
If I could wish for an idiom taken from operating systems, TLS/GLS wouldn't be
my first choice. I see namespaces serving a similar role on Plan9. The ability
to share a namespace with the child or parent process. Namespaces include the
environment and allow the calle
I also dont want to see context everywhere. At the same time, I don't want it
to be obfuscated in a confusing way.
ctx is an unfortunate initialism and context.Context package stuttering doesn't
help.
I suppose you could stuff a pointer on the stack pointing to a potential
context and then p
I'm hesitant to accept generics due to the fear of *overloaded operators *being
the next big deal*. *C# even has *properties (user-defined methods
dispatched upon an assignment operation)*.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To un
This information is actually stored in the git commits themselves. There is
a zlib'd field that contains the author's name and email address for each
commit in the repo. A complete transcript for every commit can be
reconstructed from a git repo in this manner.
On Saturday, July 15, 2017 at 5:5
. I've not used the
widgets much, and ended up porting/reimplementing
<http://github.com/as/frame> Plan 9's libframe due to my inability to
understand how to get editable text on the screen. This was over a year
ago, so things may have changed. I agree with the general consensus,
, hui zhang wrote:
>
> Disadvantage of Go
> 1 No Generic For Now
> That make user coding repeat code many times, even for basic type such as
> int float bool
> It is not easy , even to make a generic min function.
> using interface will always check type casting.
> and for
tps://godoc.org/github.com/as/ms/win
On Saturday, January 14, 2017 at 8:47:17 AM UTC-8, kty...@gmail.com wrote:
>
> How do I get the position for a mouse.Event in shiny using
> golang.org/x/mobile/event.mouse?
>
> The position returned is the global position on the screen, which changes
I don't use the site, nor understand how any immediate conflicts of interest
can manifest based on the CEO's actions that justify removing the subreddit or
locking it down.
Why not add a community to the official golang.org site and let the subreddit
die of natural causes? It would be a favorab
It's shorter, but it's harder for me to grasp what it does as easily as the
first example.
On Wednesday, August 10, 2016 at 2:09:58 AM UTC-7, Anmol Sethi wrote:
>
> You can shorten that by 6 lines
>
> package main
>
> import "net/http"
>
> func ma
This is just a guess based on the origins of the language, but the design
decision probably stems from a dim view of symbolic links. They are seen as
ugly hacks that carry persistent state on the filesystem instead of a
higher control plane such as a per-process namespace. The path variable
>
> https://blog.golang.org/slices specifically mentions that arrays and
> slices are not similar. The spec does as well. Currently, slices do NOT
> compare. I am simply arguing that they could very logically.
>
> The "==" operator is only overloaded in the case of
iptor of an aggregate.
3. A struct can resemble a slice
4. If a slice can be compared as a struct holding a descriptor, then maps
can have slices as keys
5. Because it benefits this use case, it is a good feature to add to the
language
Enumerating the drawbacks of this feature is more useful
y was borne. And also
> because you didn't really answer the question as I asked (by quoting the
> spec) which I found funny.
>
> Alas, I guess we couldn't see eye to eye.
>
> But chill a little bit. I have given all the hardcoded proofs and people
> have just given m
e work...
> Otherwise, the behaviour of maps, slices and funcs cannot be fully
> explained.
>
> On Sunday, July 3, 2016 at 7:25:31 AM UTC+2, as@gmail.com wrote:
>>
>> Go does not have reference types. As far as I know, the word was
>> purposefully removed f
Go does not have reference types. As far as I know, the word was purposefully
removed from the spec to remove the ambiguity surrounding the word.
https://groups.google.com/forum/m/#!topic/golang-dev/926npffb6lA
--
You received this message because you are subscribed to the Google Groups
An IV is not a key, it just changes the state of the block chain and must
the same size as the block. The key can be a different size than the block,
the IV can not in this case. Your program complains because you are reusing
the key as an IV, and this key-IV happens to be a different size than
Most systems don't support this functionality without a kernel patch or
debugger trick. You can manipulate the file descriptor before the process is
born, everything afterwards is luck or system specific. In Go, you have a lot
more power:
os.Stdout, os. Stderr = os.Stderr, os.Stdout
fmt.Prin
I wasn't referring to concurrency within package scope, but data crossing
package boundaries (the earlier post says libraries' are responsible to
ensure data passed *to* them is safe). The map type reveals an
implementation detail by documenting that it isn't safe for parallel use.
On Friday,
of
the operations its used for.
There's an illusion of safety in languages that advertise all-encompassing
abstractions, in my experience the problem becomes the language or library
itself, as the underpinnings acquire code bloat to cover all use-cases. If
this happens, the user mus
Security has little to do with this. It's a "legal" problem:
Unfortunately, this code has to be removed due to legal concerns. We
> apologize for any inconvenience this causes you.
https://lists.stg.fedoraproject.org/archives/list/gol...@lists.fedoraproject.org/thread/RDAHDK4RKN477G2ZDSX4DZT5ED
Go should not encourage distribution builder shenanigans. The effective
way to solve this problem is by submitting it as an issue to the
appropriate community it affects. A high search rank will accumulate based
on the popularity of this issue, and the feedback (blame) will flow to the
If the distribution builders can take it out, what is preventing them from
adding their own documentation?
On Monday, June 20, 2016 at 9:06:26 PM UTC-7, Joshua Chase wrote:
>
> Yep, that's exactly what I'm saying.
>
>
> https://lists.stg.fedoraproject.org/archives/list/gol...@lists.fedoraproject.
That's because you are mirroring the compiler's internal ssa package.
Sharing it as compile/ssa would probably remove this unintuitive name
clash.
On Thursday, June 16, 2016 at 1:52:31 AM UTC-7, JW Bell wrote:
>
> I've used golang.org/x/tools/go/ssa, it doesn't have
Have you tried to *go get golang.org/x/tools/go/ssa *?
On Wednesday, June 15, 2016 at 10:54:05 AM UTC-7, JW Bell wrote:
>
> >>I have to say that I don't see a big benefit to mirroring a github
> repo on github itself.
> There isn't another way to use the ssa package.
>
> On Tuesday, June 14, 201
How exactly do you propose this be fixed? Windows has a crippled shell that
thinks programs should process and interpret their own asterisk characters.
This turns into a major inconsistency across windows CLI tools. I dont think Go
should tailor itself to badly designed plumbing.
--
You recei
secrecy should rely
solely on the key.
If you don't like passwords, you can store the key on a flash drive as a
file or even write it directly to the underlying block device.
On Monday, June 13, 2016 at 10:12:25 PM UTC-7, Haddock wrote:
>
> Thanks for all the useful answers. A
Thanks!
On Monday, June 13, 2016 at 3:27:51 AM UTC-7, Jesper Louis Andersen wrote:
>
>
> On Mon, Jun 13, 2016 at 1:58 AM, > wrote:
>
>> What research or other literature can you recommend on the topic of type
>> theory?
>
>
> Benjamin C. Pierce's "Types and Programming Languages", often abbreviat
This is a key distribution problem, if you store the key in the executable
you should assume everyone already has access to the key. This is a
different problem than "can someone get the key out of running memory". If
you store the key in the executable, then an existential compromise of this
k
57 matches
Mail list logo