Is it fair to say that this question is a little bit like the fate
of Schrödinger's cat? You can't tell when any variable has been set (or
perhaps messed up) until you access the variable and that is just that act
that causes its multiple possible "messed-up" states to collapse to the
right value.
e:
>
> Almost, https://play.golang.org/p/6Zl_EKqFqT
> But thanks a lot! It's significantly shorter/better than my initial
> version.
>
> On Tue, Sep 5, 2017 at 6:18 PM, Michael Jones
> wrote:
>
>> Like this?
>>
>> https://play.golang.org/p/OIE8jdWVGB
>>
...Go is not perfect. But there is subtle magic in this error business.
Developers should look closely at errors. Imagine handling them as if you
were a doctor and the error was a child's symptom or a test result. Choices:
1. Ask them how they feel, ignore it. Do a test, ignore it. Effectively you
Like this?
https://play.golang.org/p/OIE8jdWVGB
On Tue, Sep 5, 2017 at 12:33 PM, Tong Sun wrote:
>
> I'll be religiously avoiding "*unicode.IsUpper*()" as something mystery
> happened in the past:
> https://groups.google.com/d/msg/golang-nuts/714WQs85H3w/KEqKgmAqAAAJ
>
> BTW, *for my case*, I d
you know when it' is avalable.
>
> Peter
>
> On Friday, September 1, 2017 at 3:50:29 AM UTC-4, Sebastien Binet wrote:
>>
>> Hi,
>>
>> I'd also be very interested in looking at 'bytconv'. And most probably
>> should use it in ange
By the way, if we're willing to do it all...we can take it down a little
more:
https://play.golang.org/p/DNxQT01vy9
read 100 26.174853ms
sort 100 180.17782ms
On Thu, Aug 31, 2017 at 11:28 AM, Michael Jones
wrote:
> Nice! Is "bytconv" shared somewhere?
>
> On Th
bytconv instead of strconv.
>>
>> bytconv:
>> read 100 98.517584ms
>> sort 100 481.994354ms
>>
>> strconv:
>> read 100 174.720883ms
>> sort 100 479.437831ms
>>
>> bytconv is the missing Go standard library package. bytconv i
olang.org/p/tMyipz6sYU
> 954.543351ms
> 166.710399ms
>
> So this is about 6 times slower. My guess is this is due to the use of
> reflection in fmt.Fscanf. But that is just a guess; I don't really have any
> evidence to back it up.
>
> On Wed, Aug 30, 2017 at 1:33 P
This can be much simpler...
https://play.golang.org/p/tMyipz6sYU
On Wed, Aug 30, 2017 at 7:55 AM, Nilsocket wrote:
>
> Can you provide example code for how you read the input?
>>
>
> Both of them were given same input size is:100, (i.e., 1 million)
>
> https://play.golang.org/p/grB-muK7hw
>
oops! that's actually a**1024 ...was rushing and typed the Printf legend
too quickly.
On Mon, Aug 28, 2017 at 5:14 PM, Michael Jones
wrote:
> I use it frequently / constantly / 24/7 :-)
>
> it's purpose is to enable integer, rational, and real arithmetic at chosen
> preci
I use it frequently / constantly / 24/7 :-)
it's purpose is to enable integer, rational, and real arithmetic at chosen
precisions greater than the hardware's native CPU arithmetic.
One property of such thousand or million digit numbers is that they cannot
be moved around the way '5' and '3' are i
I don't think it's about language. I got downvotes immediately for my
comments over the weekend.
https://github.com/golang/go/issues/19623
Whatever the circumstances, any proposal will often have its detractors as
the most immediate and vocal responders. Support may come later.
Agree that openmin
Jimmy, thank you for the tip! i went there and added my modest suggestions
to the proposal.
https://github.com/golang/go/issues/19623
Tamás, you make a very important point. It is one that GRI did a very good
job of in big.Float. The question of how to specify precision for
variable-precision floa
I would REALLY like to see big types as normal declarations and syntax. The
SSA framework seems suitable to automatically manage the temporaries.
On Sat, Aug 19, 2017 at 7:14 AM, roger peppe wrote:
> Constructive reals in Go, anyone? :-)
>
> On 18 Aug 2017 17:50, "Michael
John Souvestre - New Orleans LA
>
>
>
> *From:* golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com]
> *On Behalf Of *Michael Jones
> *Sent:* 2017 August 18, Fri 11:50
> *To:* golang-nuts
> *Subject:* [go-nuts] multiply and divide
>
>
>
> Here is a minor musing f
Here is a minor musing from something that came up yesterday.
Sometimes we see a real number expression as simple as...
x*y/z
...and knowing from basic algebra that...
(x*y)/z == x*(y/z)
...we might not expect much difference between the two in our code. Alas,
computer floating point does no
yes... everything is good for what it is designed for and less-good for
what it is not designed for.
mutex-protected counters are good
channels for data communication are good
neither is a perfect stand in for the other. nothin wrong with channels.
On Fri, Aug 18, 2017 at 4:38 AM, Tamás Gulácsi
As a curiosity, is an ordered map really a hashtable or is it a different
kind of self-organizing search structure? I would look to LLRB trees if
order is an issue... (do a Google search for "Sedgewick LLRB") or start
here:
https://www.cs.princeton.edu/~rs/talks/LLRB/RedBlack.pdf
On Tue, Aug 15,
snmed,
My disappointment with that blog post is that it does not address the
larger issue, which some people here have clarified, but to be clear on the
larger issue and the various points raised about channels:
SMALL BENCHMARKS ARE HARD
Benchmarking is harder than it seems, because computers si
I remember a segmented wheel of Aitkin implementation. Maybe you can start
with that.
here are a few: https://golanglibs.com/top?q=sieve
On Tue, Aug 8, 2017 at 3:31 PM, Pierpaolo Bernardi
wrote:
> Hello,
>
> > Here's a link to read and download the paper:
> >
> > https://www.scribd.com/doc/228
The Four Horsemen of the Apocalypse, surely! It would be tempting fate to
shade them or step on their brand.
On Tue, Aug 8, 2017 at 5:54 AM, wrote:
> 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 i
i have the same. Like HAKMEM, just not as smart.
On Mon, Aug 7, 2017 at 8:22 AM, Shawn Milochik wrote:
> I like *idea* of that idea, but I suspect that the implementation
> wouldn't work out.
>
> As the Go Proverb says: "A little copying is better than a little
> dependency."
>
> I have a simila
Great. Hope it helps. I had a typo in power 0 (which is never called.
Change the return to 1.0.
On Sat, Aug 5, 2017 at 6:50 PM wrote:
> Thanks, Michael.
>
> I've created a tiny project with those files here:
> https://github.com/cpmech/go-fast-math-experiments
>
> The output of go test -run=XXX
Dorival,
There is a great deal to learn from this issue. Some interesting issues:
Exponentiation by arbitrary real or complex powers is a little complicated
to evaluate quickly with accuracy. Other than special cases, you're forced
toward x**y ==> Exp(y*Log(x)), where each of Exp() and Log() are
the complex power function is a difficult (time consuming) general
computation.
are you saying that you actually have a program that uses boolean gaussian
integers and needs to do lots of power operations?
if so, i highly recommend that you special case this for your own use.
if this is common t
t;right" I mean the simplest tool which gets you the right result.
>
> Fortunately, that doesn't happen all the time, but sometimes Go doesn't
> give gou that simplest tool, and in that case I severely regret I wasn't
> trusted enough so that they let me choose tha
I've often found it helpful to consider extreme limit cases.
In solo/school/hobby programming, you code and test more than you debug and
you understand intent implicitly because you are coding it as you go. As a
professional at work, as part of a team, in a code review regime, using
third-party li
I understand you now.
On Sat, Jul 29, 2017 at 10:36 AM wrote:
> Sorry to repeat myself, but I think I wasn't clear enough, as many people
> on this forum still don't understand my point at all.
>
> Google, as ANY company, MUST force its employees to use exactly the same
> standards.
>
> I've don
Ecstatic, based on what you said here (*"some people will never be forced
to change"* and *"because Google engineers have decided"*), I believe there
are a few ideas you may profitably consider about the formatting
topic--ideas that you probably have not yet considered and which may ease
your conce
The nat->string code allows any base -- or at least it did -- but it was
not exposed in the Int APIs. Maybe you'll want to access the sources.
On Sun, Jul 23, 2017 at 8:34 PM, me wrote:
>
>
> On Saturday, July 22, 2017 at 9:37:16 AM UTC-6, Rémy Oudompheng wrote:
>>
>>
>> The most annoying issue
...and...because that is how computers work so the understanding will
itself be interesting and useful. It can be nice to see how things work
"under the hood."
On Sat, Jul 22, 2017 at 9:40 PM, Egon wrote:
> Generally when you ask that question you probably won't need to use them.
>
> The main re
Oh no! I wrote some of that code. Maybe I should revisit.
On Sat, Jul 22, 2017 at 10:54 AM Hugh S. Myers wrote:
> Ah! Excellent solution. I wrote one of the early multiple precision
> packages for the C users group in the 80's and I typically wrote in C
> first, then disassembled and reduced the
, July 21, 2017 at 12:03:03 PM UTC-4, Michael Jones wrote:
>>
>> Maybe not news, and certainly not big news, but I just filed a patent
>> that uses Go source code to illustrate logical methods claimed in the
>> invention. So if it was not already the case, Go has now been u
Maybe not news, and certainly not big news, but I just filed a patent that
uses Go source code to illustrate logical methods claimed in the invention.
So if it was not already the case, Go has now been used in patent filings.
--
Michael T. Jones
michael.jo...@gmail.com
--
You received this mess
I get about 3 million channel send/receive pairs per second. If you
actually do work inbeteeen (database access, computation, etc.) the limit
is difficult to reach.
On Mon, Jul 17, 2017 at 10:22 AM Jesper Louis Andersen <
jesper.louis.ander...@gmail.com> wrote:
> Your benchmarks are not really *d
Find a way to use comments for your ""big space"
On Fri, Jun 30, 2017 at 8:12 PM wrote:
> I have a few such bug bears, so, my trick is to 'fix' fmt's helpful
> services when I check a file out, and only run fmt automatically when the
> file is committed to the repository.
>
> This keeps my fugly
using the io.ReadWriter (Read() would take all
> the time) , so the problem is, this library
> cannot be used for duplex communications: if you use the Read() method,
> then you will not be able to do Write(), because the read will not allow
> the frame
> to go into the interface normal
FYI: https://godoc.org/github.com/google/gopacket
On Sat, Jun 17, 2017 at 9:00 AM, Michael Jones
wrote:
> Sorry to say that I don't have a direct answer for you.
>
> However, I happen to be doing some packet analysis at the moment--focused
> first in the analysis part--and have
Sorry to say that I don't have a direct answer for you.
However, I happen to be doing some packet analysis at the moment--focused
first in the analysis part--and have recently started looking for helpful
frameworks/libraries into which my code can be embedded. What I found so
far is:
https://gith
Atom: Horizontally Scaling Strong Anonymity
"To evaluate Atom, *we implemented an Atom prototype*
*in Go*, and tested it on a network of 1,024 Amazon EC2
machines. Our result shows that Atom can support more
than one million users sending microblogging messages with
28 minutes of latency. using 1,
sometimes you can write the simple one in terms of the advanced one. when
you can do that, it makes them better and also educational.
On Tue, Jun 6, 2017 at 7:09 PM, peterGo wrote:
> M2,
>
> The Go strconv package (https://golang.org/pkg/strconv/) contains the
> simple forms Atoi and Itoa and th
...as always, a pragmatic and informed response. Thanks.
On Mon, May 22, 2017 at 5:59 PM, Ian Lance Taylor wrote:
> On Mon, May 22, 2017 at 5:49 PM, Michael Jones
> wrote:
> >
> > On Mon, May 22, 2017 at 5:19 PM, Ian Lance Taylor
> wrote:
> >>
> >> Rej
On Mon, May 22, 2017 at 5:19 PM, Ian Lance Taylor wrote:
> Rejecting an unsigned comparison with zero would be a
> language change.
>
yes, but it is not just a comparison with zero, it is a "is it less than
zero, which it cannot possibly be since it is unsigned" so therefore it
would be enforcin
The file IO routines are good examples of go factoring/structuring. In
particular, the blend of real and direct actions and the
abstracted/indirect use of readers/writers makes for a good IO feature set
with high reuse, efficiency, natural extensibility, and testability. On the
downside, it grew wi
must not be zero:
>
> 3.14 / 0.0 // illegal: division by zero
>
>
>
> On Tuesday, May 9, 2017 at 9:48:53 AM UTC+8, Michael Jones wrote:
>
>> This is the definition of that division.
>>
>> What result would you prefer?
>>
> On Mon, May 8,
This is the definition of that division.
What result would you prefer?
On Mon, May 8, 2017 at 6:45 PM Van Hu wrote:
> Hi, my colleague found this strange behavior in Go today, seems like a bug?
>
> package main
>
> import (
> "fmt"
> )
>
> func main() {
> var a float64 = 0.0
> fmt.Println(1.0 /
gt; >> On 5 May 2017 at 14:11, Michael Jones wrote:
> >>> Just so. One cannot do boolean arithmetic with boolean variables.
> >>>
> >>> We have:
> >>> EQUIVALENCE ("==")
> >>> XOR ("!=")
> >>> NOT (&
openness to including them.
Michael
* Understand the reason...allowing future implementation of packed boolean
arrays.
On Fri, May 5, 2017 at 5:35 AM, Ian Lance Taylor wrote:
> On Fri, May 5, 2017 at 12:51 AM, roger peppe wrote:
> > On 4 May 2017 at 20:48, Michael Jones wrote:
> >
What is *actually* missing is boolean operators for boolean types.
On Thu, May 4, 2017 at 12:43 PM, Ian Lance Taylor wrote:
> On Thu, May 4, 2017 at 9:42 AM, wrote:
> >
> > One apparently random omission in C, which was fixed in Perl, is &&= and
> > ||=:
> >
> > a &&= b
> > a = a && b
> >
Ram,
Here is another example, a slightly modified version of ojucie's program:
https://play.golang.org/p/uLsyW6oxz7
The difference here is to show the idea of making a custom type this is
simply for the purpose of defining extra behaviors, such as those needed
by Sort.
On Tue, May 2, 2017 at 1
On Sun, Apr 30, 2017 at 7:14 AM, wrote:
> A satisfying solution, imho, involves a more in depth change,
> which won t happen for reasons cited previously.
>
Don't be too sure about that. No reason why "generate" could not be
changed/made redundant/more real/keyworded/etc. as part of the open and
[NOTE: an unofficial answer on Rob Pike's behalf]
...no, not organic growth, not oversight, not antique JCL inflexibility,
rather, a design choice. Use of the "//tag:stuff" structure comes as a
benefit vs cost optimization:
The benefit is that it hides within the existing comment structure and ad
Great!
On Fri, Apr 28, 2017 at 6:14 PM, Vikas Kumar wrote:
> Thanks again Michael and Ishan. My git-hook is completed now, running
> perfectly :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop re
Sure. Here's a slightly expanded example.
https://play.golang.org/p/bfKFrATI0q
On Tue, Apr 25, 2017 at 5:20 AM, Vikas Kumar wrote:
> Thanks a ton Michael and Ishan. Let me understand the code and use this in
> my program.
>
> Cheers,
> Vikas
>
> --
> You received this message because you are sub
...or if you copy the strings.Contains() comparison to the test, it echoes
the program with six and each of the patterns removed.
On Sun, Apr 23, 2017 at 7:57 AM, Michael Jones
wrote:
> Another example:
> https://play.golang.org/p/hDKQtwHo6M
>
> In this case, just copy the pro
Another example:
https://play.golang.org/p/hDKQtwHo6M
In this case, just copy the program to your machine and build it.
i called it lines.go
when i run it as:
lines < lines.go
it echos the program with the line "six" removed
On Sun, Apr 23, 2017 at 12:47 AM, Ishan Jain wrote:
> You can do it
It would be natural if real(c) and imag(c) were lvalues
On Thu, Apr 20, 2017 at 1:21 PM 'Thomas Bushnell, BSG' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> The other way is to add the c to its conjugate and then add the imaginary
> part, using cmplx.Conj. But that really amounts to wh
On Thu, Apr 20, 2017 at 8:27 AM, wrote:
> If I can't format my programs the way I want, and I much prefer putting
> operators at the beginning of continuation lines for reasons mentioned on
> this page, and "Perl Best Practices", I simply won't use the language - at
> least not without implementi
The good news is that Dave Cheney moves at that same rapid clip.
:-)
On Tue, Apr 18, 2017 at 6:57 AM, Dave Cheney wrote:
> > Apparently Dave Cheney says to prefer "go install" over "go build"[3],
> except when cross-compiling [4]. However, many of these posts are older,
> and Golang moves at suc
It is not crazy in any way to use the special NaN payload--it was designed
just for you. Dr. Kahan and others provided the broad set of NaNs in '754
for just this purpose, for example, to encode missing data values and N/A
data values separately for statistical processing, or to allow great
freedom
I get about 3 million channel transfers per second on my computer.
If each transfer is a single byte, that's 3 MB/sec. If transfers are
pointers to buffers of a kilobyte, then that's 3 GB/sec...which is about as
many bytes/sec as a CPU could possibly touch. If those buffers are 25kb
then you're at
Thank you for this thoughtful response. It helpful and inspires new
thoughts.
When I was a boy learning C (1976 or 1977, UNIX 6th Edition at Bell Labs
via "learn") the definition of qsort() was a new idea for me. The exposure
of base and stride so nakedly (after BASIC and FORTRAN and LISP and SAIL
In one of the many threads about this (five years ago!) I mentioned Mike
Colinshaw's excellent work:
http://speleotrove.com/decimal/
This is an excellent and correct library. I can be inspiration for a native
Go implementation.
On Wed, Apr 5, 2017 at 4:51 PM, Mandolyte wrote:
> Doesn't help wi
yes
On Fri, Mar 31, 2017 at 12:30 PM, Ian Davis wrote:
> On Fri, 31 Mar 2017, at 05:19 PM, Michael Jones wrote:
>
> There is part of the topic that has always been slightly beyond my grasp.
> (Maybe I do understand...but just lack absolute certainty.) Maybe others
> know the ans
There is part of the topic that has always been slightly beyond my grasp.
(Maybe I do understand...but just lack absolute certainty.) Maybe others
know the answer...
In a template system (which is what I prefer but that's not the point of
this email) we have the notion of the TYPE(s) being a forma
Good advice for Go as well. Maybe that should be the last line of a panic
crash:
[image: Inline image 1]
On Thu, Mar 30, 2017 at 7:56 PM, Rob Pike wrote:
> With the new "Smallcaps" font you can feel nostalgic by pretending you're
> working on a TI Silent 700.
>
> -rob
>
>
> On Wed, Mar 29, 201
Hard to do better than KML. :-)
On Thu, Mar 30, 2017 at 11:41 AM, Constantine Vassilev
wrote:
> Hi Tom,
>
> It worked perfectly. Thank you!
>
> --Constantine
>
> On Monday, March 27, 2017 at 11:14:48 AM UTC-7, Tom Payne wrote:
>>
>> Here's an example:
>>
>> 8<
>> package main
>>
>> impor
Another dimension is "intellectual complexity." Where that is smaller,
everything else is better for coding, documenting, debugging, testing,
reading, using, and maintaining.
It is a critical measure for maintaining the 'Go' of Go.
On Sun, Mar 26, 2017 at 11:40 PM Egon wrote:
> On Monday, 27 Ma
This is just what I dream of. (Well, not dream really as I do it already
with a macro processor, but I dream of it being integrated and robust.)
On Sat, Mar 25, 2017 at 8:30 PM Will Faught wrote:
> Generics is polymorphism, though; actually, it's a kind of polymorphism
> called parametric polymo
I think I was saying that what I seem to want personally is the "simple,
weak, slight" thing that you likely see as failure.
The opposite end of that--where everything is a list and can be composed
without special regard (lisp) or everything is an object that can receive
any message (smalltalk) ar
Type-based generally is all that I ever seem to want...making a macro-like
LLRB heap concrete to handle objects of my own type and with my own
comparison function. I believe this is what Rob speaks of. I've personally
never needed to sort or order a bunch of unknown "things"
On Fri, Mar 24, 2017
In general is not not so much "will crash" but "will not run"
On Sun, Mar 19, 2017 at 12:52 AM, T L wrote:
>
>
> On Sunday, March 19, 2017 at 3:03:21 AM UTC+8, T L wrote:
>>
>> At the end of sync/atomic package docs, it says
>>
>> On x86-32, the 64-bit functions use instructions unavailable befo
Yes, there are cases for integer domain wraparound just as there are cases
for exception at the limits.
The argument FOR is that "computers work that way." Since ENIAC, there have
been overflow condition flags, but there have rarely been
overflow/underflow panic traps. (Either no support, or suppo
You could also capture a (p)random stream as a test data vector and use it
in lieu of the PRNG during tests. This is the same as seeding iff and only
iff the PRNG is never changed, Should that change, then so will the tests
unless you capture a test vector now. (For example, if you have a timing
be
Very nice! Just the kind of use that comes up for me.
The one complexity I had when I did this for the standard sort was dealing
with the float32 and float64 types, where comparison was more complicated
and elaborate in the presence of NaN values. Still, this kind of
compile-time type templating i
Nothing wrong with it, and nothing wrong with doing it for min and max
either. (Though it was a delight to see that animated editing sequence, so
for entertainment value that's the way!)
I did code generation for my version of Sort and it is 3x-5x faster. It
takes intel more than 10 years to make
This is a popular point of view in general (programming tools serve
programmers) and the natural and most free spirit of free-form programming
languages.
It turns out that there is a good argument--an evidence-based theory of
software development--that you might want to think about as you form you
2 AM, Axel Wagner
wrote:
> There would be a way to add them without adding a new keyword:
>
> {
>// stuff
> } for condition
>
> I'm not saying I want it, or that it's a good idea, just that "we can't
> add a new keyword" doesn't seem a good argum
I asked for this early...long before it was too late. (Existing valid
programs ma have variables named 'do' so it is a non starter in that form.
Rob's objection was wise and thoughtful. He wanted Go to be friendly to
program transformation and he felt that a single uniform iteration
construct woul
Indeed... the pattern language book is excellent and its topic being
different is helpful to teach deep ideas away from language/programming
context.
On Wed, Mar 30, 2016 at 10:46 AM Egon wrote:
> On Wednesday, 30 March 2016 00:49:59 UTC+3, Staven wrote:
>
> On Tue, Mar 29, 2016 at 08:26:31AM -0
I get them too. Cruelly, I just presumed that Yahoo! was broken in some as
yet undiagnosed way.
On Thu, Mar 2, 2017 at 11:56 PM, Ian Lance Taylor wrote:
> On Thu, Mar 2, 2017 at 12:32 PM, Nyah Check wrote:
> >
> > Has anyone noticed there might be some bots subscribed to this mailing
> list
> >
Go deserves a keyword to "make love objects."
On Thu, Mar 2, 2017 at 9:47 AM Dave Cheney wrote:
> Your spinning goroutine is block the garbage collector which needs to
> stop, temporarily, all the running goroutines to make love objects.
>
> --
> You received this message because you are subscri
Functionally similar...i use a time/memory tradeoff that makes factoring
much faster but uses more memory. Other than that, very similar.
On Sun, Feb 26, 2017 at 10:34 PM, Michael Jones
wrote:
> Maybe so. I'll look. The gain inside my v1 and v2 versions comes from
> avoidable allocat
milar our approaches happen to be.
I think there is still room for significant improvement in mine.
On Sun, Feb 26, 2017 at 10:11 PM Éric Jacoboni
wrote:
>
>
> Le dimanche 26 février 2017 19:05:38 UTC+1, Michael Jones a écrit :
>
> Back on the ground for a bit with speedup news. My fi
Back on the ground for a bit with speedup news. My first ever performance
tuning over Iran turned out well, the 100 case formerly...
real 0m1.282s
user 0m1.324s
sys 0m0.027s
...is now down to
real 0m0.868s
user 0m0.858s
sys 0m0.006s
on the same MacBook Pro. I also changed the code to take a
I just coded up a quick amicable/perfect finder (using an expensive inner
mechanism) and still it runs in 1.3 seconds in single processor mode. The
times are not comparable because the techniques may not be the same, but I
don't think it is fair to judge Go as slow.
babar:amicable mtj$ time amicab
yes.
https://en.wikipedia.org/wiki/Two's_complement
On Sat, Feb 25, 2017 at 10:21 PM, Felix Sun wrote:
> https://play.golang.org/p/TmxMmltHGH
>
> package main
>
> import (
> "fmt"
> )
>
> func main() {
> var f int = -1
> fmt.Println("become huge number:", uint(f))
> fmt.Println("this panic", uin
...and it is also always the question of your intent--do you want to be
good in a computer programming job or do you want to be a good computer
scientist?
If the latter, then every step of the way from Babylonian computation
through Egyptian knot-tying ("trigonometry") the EDVAC and Konrad Zuse to
no. not only is there no guarantee, there is in fact a promise that you are
mistaken to count on any order between the two.
also, in an extreme case where func1 and func2 did not produce output (like
a channel) consumed by someone who waits for them...in which case neither
of them may run at all!
good.
On Sat, Feb 18, 2017 at 11:08 PM, wrote:
> After some testing I just decided to instead round the numbers to 2
> decimals instead. Thank you for the heads up though.
>
> On Sunday, February 19, 2017 at 5:42:15 PM UTC+11, Michael Jones wrote:
>>
>> This feels unlike
This feels unlikely.
You might want to verify that the calculation matches your expectations
exactly at many values. Ian's representation argument applies at every word
size it may be that you just hit a "lucky" happenstance.
On Sat, Feb 18, 2017 at 11:59 PM wrote:
> Thank you for your help. I
wrote:
> Thanks to all who answered; I got explanation I needed.
>
> @"Michael Jones": yes, your solution also works - "i := i" overshadows the
> i defined as part of the for-loop and that was also explained in one of the
> Go-blogs.
>
> Anyways, as I have
These answers are all correct.
Here is another way to see the problem and address it. Not as clear to the
next reader perhaps so not the recommendation, but a good example to
contemplate. "Precisely what does this extra statement do?"
package main
import "fmt"
import "log"
func main() {
for i :
Me too. What else could it be?
On Tue, Feb 7, 2017 at 7:41 AM, Ian Davis wrote:
> On Tue, 7 Feb 2017, at 03:36 PM, Tomi Häsä wrote:
>
> Is it normal to get 45 in the Flow Control example?
>
> https://tour.golang.org/flowcontrol/1
>
> package main
>
> import "fmt"
>
> func main() {
> sum := 0
> f
...and there is a nice story on this one.
http://mathcentral.uregina.ca/qq/database/qq.02.06/jo1.html
On Tue, Feb 7, 2017 at 9:21 AM, Michael Jones
wrote:
> Me too. What else could it be?
>
> On Tue, Feb 7, 2017 at 7:41 AM, Ian Davis wrote:
>
>> On Tue, 7 Feb 2017, at 0
ver time and newbies can have a correct expectation of the
> cost.
>
> Chris
>
>
> On Thu, Feb 2, 2017 at 3:26 PM, Michael Jones
> wrote:
>
>> Insight here feels tenuous.
>>
>> It is rare that a well-written "real" program would be measurably
>>
Insight here feels tenuous.
It is rare that a well-written "real" program would be measurably
influenced by something this small. As it happens, I often write such rare
programs (where a 2x faster math.Log() really might make the whole program
run 1.9x faster). Even as a poster child for it, I thi
array contents are not immutable, just their size.
On Wed, Feb 1, 2017 at 4:13 PM, Néstor Flórez wrote:
> The below code sorts an array but it does it an by creating a slice,
> correct?
> What happened to the original array?
> Arrays are inmutable
>
> ---
"endeavor to"
"anticipate"
"allow for"
"prepare for"
"encourage"
"facilitate"
...good
"ensure" / "force" / "guarantee" (not in your control)
"reclaim" / "recycle" / "release" (too absolute)
...bad
On Sun, Jan 29, 2017 at 4:51 PM, Val wrote:
> Hello Jesper
> if I understand this thread cor
Wow!
On Sat, Jan 21, 2017 at 9:58 AM, wrote:
> Hi,
>
> I have been working on a package to compile go templates to regular go
> code.
> Today i can announce an early release of it.
>
> Find it here
> https://github.com/mh-cbon/template-compiler
>
> There is still have a lot to test and comment,
401 - 500 of 597 matches
Mail list logo