Sorry to revive this, but I'd like to add to conversation (without weighing
in on correctness of the nil check) that it appears the CodeReview comments
on interfaces ( https://go.dev/wiki/CodeReviewComments#interfaces ) and the
FAQ nil error https://go.dev/doc/faq#nil_error give mutually exclus
> On Sep 2, 2024, at 8:40 PM, Ian Lance Taylor wrote:
>
> On Sun, Sep 1, 2024 at 1:08 AM Mike Schinkel wrote:
>>
>> Ian — if you are reading this — does this rise enough to the level of a bug
>> — checking imports on a `go fmt` — that I should submit as an issue
> On Aug 31, 2024, at 9:45 AM, Axel Wagner
> wrote:
>
> On Sat, 31 Aug 2024 at 14:22, Mike Schinkel <mailto:m...@newclarity.net>> wrote:
> Hi Alex & Peter,
>
> Thank you both for your replies.
>
>> On Aug 30, 2024, at 2:43 AM, Axel Wagner > <m
> On Aug 31, 2024, at 8:29 AM, Jan Mercl <0xj...@gmail.com> wrote:
>
> On Sat, Aug 31, 2024 at 2:22 PM Mike Schinkel wrote:
>
>> go fmt ./tools.go
>
> 'go fmt' is not gofmt.
They are different? Well that is positively confusing.
Thank you for po
Hi Alex & Peter,
Thank you both for your replies.
> On Aug 30, 2024, at 2:43 AM, Axel Wagner
> wrote:
> I don't think that error message comes from gofmt. As far as I am aware,
> gofmt only parses source code, it does not even do type-checking.
As you sure about that? Running this:
go fmt .
really want to ensure no errors are generated unless
they are errors I really need to fix. Otherwise I will likely get complacent
and accidentally commit a real error.
Is there any way to get gofmt to ignore code based on build tags, e.g. `tools`
in this case?
-Mike
--
You received this message
I for one would really like to see Go or TinyGo find a way to target eBPF
similar to how it can target WASM.
-Mike
> On Aug 14, 2024, at 4:40 PM, twp...@gmail.com wrote:
>
> For eBPF support in Go, see https://github.com/cilium/ebpf.
>
> AFAIK at the moment you can't com
hat is, you can define your type as
> type MyBuilder struct {
> strings.Builder
> }
> and then add methods to that which use `unsafe` to do what you want. Though
> that will, of course, also be dangerous and should be guarded with build tags
> for the used Go version, at the
formant string builder,
especially for larger strings:
https://github.com/golang/go/commit/132fae93b789ce512068ff4300c665b40635b74e
<https://github.com/golang/go/commit/132fae93b789ce512068ff4300c665b40635b74e>
Any insight into `bytealg.MakeNoZero()` would be appreciated.
-Mike
--
You rec
Hi Axel,
Thank you for that link. I had not seen it before, but it is rather
insightful.
-Mike
On Wednesday, March 20, 2024 at 10:29:20 AM UTC-4 Axel Wagner wrote:
FWIW I believe (as Brian sort of points out) this proposal is fully
subsumed under #57644 <https://github.com/golang/go/iss
using interfaces as type constraints
would address the concern.
And as discussed, probably not.
But it is an interesting thought exercise. If an interface-based solution
could be found, it would address the concern without turning us effectively
into Rust programmers. ¯\_(ツ)_/¯
-Mike
--
On Wednesday, March 20, 2024 at 5:31:08 AM UTC-4 Brian Candler wrote:
It's in the very first post that opened this thread, under the heading "##
Summary".
I did in-fact miss it. Thank you for pointing to it.
-Mike
--
You received this message because you are subscribe
uot;unset"* state for scalars.
Or maybe I misread? Maybe the best thing to do is let him tell us what he
was thinking?
-Mike
On Wednesday 20 March 2024 at 07:34:10 UTC Mike Schinkel wrote:
On Mar 19, 2024, at 2:43 PM, Daniel Lepage wrote:
I'm not proposing that *any* value be m
objectives you are seeking, or not? And if not, why not?
Finally, for the Go team, if that would be meet his objectives, would extending
type constraints in this manner be a viable potential?
-Mike
--
You received this message because you are subscribed to the Google Groups
"golang-nuts
nd in Go that
something is often an interface. As stated though, interfaces in Go do not work
with covariance types. #fwiw
Lastly, a suggestion on naming. My understanding is that it would be more
idiomatic to name `b.GetChilder` as `b.ChildGetter()` and `b.GetDataer` as
`b.DataGetter()`;
my answer, and then explicitly attack me and
my participation on this list when I posted a follow up showing the sanity
checking I had done. I guess in your world, the only replies to this list
that are reasonable are the ones you think are reasonable, and all others
deserve a condescending response
this thread — except when you replied
to my ask for clarification — was unnecessary as you had already made your
only point.
If there was trolling here, your reply to my first reply on the thread was
the start of that trolling.
-Mike
P.S. The types of replies you've made on this thread is
at the performance of JSON parsing made indeed by one of
the reasons she is seeing a difference.
Pragya, it would be really nice if you could follow up to close the loop
and let us know what the actual bottleneck was and how you ended up solving
it.
-Mike
On Friday, March 8, 2024 at 9:58:26 PM
if so would
prefer to know rather than wrongly assume.
-Mike
On Friday, March 8, 2024 at 8:28:38 PM UTC-5 Robert Engels wrote:
> Just to be clear for others - from a raw cpu performance perspective when
> looking at a typical application in whole - there is very little
> performanc
https://kokizzu.blogspot.com/2022/12/map-to-struct-and-struct-to-map-golang.html
Hope this helps.
-Mike
On Friday, March 8, 2024 at 4:15:25 PM UTC-5 Robert Engels wrote:
> It is highly unlikely that the Go marshaling is the cause. I’m guessing
> you are probably not using a b
s of `struct` and `[...]array` are assignable to a
`const`, and
2. Casting a literal to a `struct` `[...]array` type would instantiate the type
and assign the literal's value to the first element or property.
https://goplay.tools/snippet/xuGipbUVlKz
<https://goplay.tools/snippet/xuGipbUVlK
> On Mar 4, 2024, at 12:18 PM, Jeremy French wrote:
>
> More, to prevent PrintMonth(14) which the function would have to check for
> and either return an error or panic, since there is no meaningful output. ...
> I was more just answering Mike Schinkel's question a
ank you in advance to whoever helps me understand why enums are such as
burning desire for so many developers.
-Mike
> On Mar 3, 2024, at 12:25 AM, Nicolas Serna
> wrote:
>
> Hello, gophers. Lately I've been working quite a bit with enums as I'm moving
> a C program I
Is there no `cmd/migrations/go.mod`?
Have you not tried debugging with Delve?
-Mike
On Tuesday, February 20, 2024 at 5:29:19 AM UTC-5 Peter Bočan wrote:
> That seems to work on the repo/go.mod level, if I am not mistaken. I would
> need something finer on the binary/compilation unit
nal/testscript for
testing complete application behaviour.
These both are really the essential answer to your question. I just did
not think of it when I first replied.
-Mike
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscr
rious.
If you prefer to put more in `main()` then AFAIK there are no real issues
with it other than lacking package reusability, so if it works for you,
knock yourself out. #jmtcw
-Mike
On Wednesday, February 14, 2024 at 6:12:49 AM UTC-5 Jerry Londergaard wrote:
> I see quite a few modules o
pty `Base()` method — and then type assert to it after which, if it
succeeds you can type assert to `*Base`, like so:
https://go.dev/play/p/-gcKGf4_AFg <https://go.dev/play/p/-gcKGf4_AFg>
Hope this helps.
-Mike
--
You received this message because you are subscribed to the Google Groups
nflicts.
Rather than "go-mock" it would be better IMO if the OP had named it *(something
like) **"*go-vermock" *(the company he works for is Versant) *and if he
chose to name his CLI "vermockgen," or similar.
-Mike
#jmtcw #fwiw
--
You received this message
ameter. That is
unless there is some other unintended consequences I am not seeing and you
have not mentioned.
-Mike
P.S. Ironically, ensuring the benefits of embedded type parameters are *"too
small"* is itself a class of NP problem.
--
You received this message because you ar
ss there are objective arguments for why that can't reasonably be
compiled, or there are unintended conflict elsewhere in the language?
-Mike
[1] https://www.youtube.com/watch?v=yE5Tpp2BSGw
--
You received this message because you are subscribed to the Google Groups
"golang-nuts&quo
create a struct with both type parameters
and use with types that create ambiguity — such a compromise would stop
perfect from being the enemy of the good.
Anyway, as stated this is a strawman proposal. Please shoot holes in it if
there are any opportunities to do so.
-Mike
--
You received this
was mentioned in this discussion, here
<https://groups.google.com/g/golang-nuts/c/Qb4IAEbpziU/m/l1ehl2yDBQAJ>.
-Mike
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails
> On Nov 15, 2023, at 7:08 AM, 'Brian Candler' via golang-nuts
> wrote:
>
> On Tuesday, 14 November 2023 at 03:38:04 UTC Mike Schinkel wrote:
> 1. A value variable and multiple value receivers <--- compiles
> 2. A pointer variable and multiple value receive
e 1 submits the object to the channel
it should no longer attempt to access it.)*
Or again, am I missing something obvious?
-Mike
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receivin
didn't explain it in
his post.
Robert Engels seems to be saying this isn't conceptually a data race but it
is an unfortunate artifact of how the compiler works?
-Mike
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubsc
mix receiver types not more
useful in practice? If the developer makes a mistake and passes a
non-pointer interface value to a method with a pointer receiver they will
get a compile error, so there does not appear to be any downside for
changing the recommendation regarding consistency wit
o know it for several months
before judging it. If you are anything like me, you will come to
appreciate Go by leaps and bounds more than working with PHP. #fwiw
-Mike
On Thursday, November 9, 2023 at 12:35:38 PM UTC-5 Viktoriia Kapyrina
Yelizarova wrote:
> Well, reflection is one of the
Oops!
Meant to say *“Using Lua to develop plugins in Go would NOT be ideal IMO.”*
On Saturday, October 28, 2023 at 10:47:56 PM UTC-4 Mike Schinkel wrote:
> I recently started using github.com/yuin/gopher-lua for a project to
> allow users to add filtering criteria that would be
in
<https://github.com/hashicorp/go-plugin> or similar as others have
recommended, and then only fall back to Lua when you want to allow
end-users who are not Go developers to extend your app in small ways.
#jmtcw #fwiw
-Mike
P.S. You could also use JavaScript
<https://prasanthmj.gith
Absolutely, some times generics are not needed.
I actually don't find a need to use them that often which is probably why
when I came across a use-case that really needed them I was so stumped as
to how make it work. Kudos again to Axel for helping me recognize my
blindspot.
-Mike
P.S
entitled *"Inferring based on interfaces."*
Again, it sure would be nice it this were possible, if for no other reason
than to keep others being as time-inefficient as I was while trying to
figure it out.
-Mike
On Sunday, October 22, 2023 at 11:01:47 PM UTC-4 tapi...@gmail.com wr
How so?
Can you give an example scenario where it could cause unintended
consequences? Or some other negative?
-Mike
On Saturday, October 21, 2023 at 11:57:52 PM UTC-4 tapi...@gmail.com wrote:
It is hard to call such type inference better. That is too aggressive.
--
You received this
ot; in https://github.com/golang/go/issues/58650
> Until then, it's expected that there will be some cases where you need to
> specify the types.
>
> On Sat, Oct 21, 2023 at 9:45 PM Mike Schinkel
> wrote:
>
>> No, that pre-generics case is not sufficient for my use-
See full code in playground <https://goplay.tools/snippet/FwSn1BaWg7k>.
On Saturday, October 21, 2023 at 3:15:03 PM UTC-4 Dan Kortschak wrote:
> On Sat, 2023-10-21 at 11:58 -0700, Mike Schinkel wrote:
> > Recently I was trying to write a func using generics where I wanted
> >
Recently I was trying to write a func using generics where I wanted to use
a slice of an interface that would contain implementers of that interface
and then pass those types to a generic function, but I ran into this error:
type MyStruct of MySlice{} does not match inferred type MyInterface for
ds a `//go:embed` comment, converts your files into Go
source code, compiles that code, and then provides a package that allows
you to write those files to disk from an your Go app before you need to
load the libraries.
Maybe this will work for you? If yes, would love to hear back how it
wor
show me how to get it to work.)
-Mike
On Monday, August 28, 2023 at 12:50:50 PM UTC-4 Tamás Gulácsi wrote:
slog.SetDefault(slog.New(myHandler{Handler:slog.Default().Handler}))
vl...@mailbox.org a következőt írta (2023. augusztus 28., hétfő, 15:06:37
UTC+2):
Hi,
When reading trough the log
gue would be clearer since the reader doesn't have to look at what
> follows the "end" label.
The pattern has an `end:` label always at or near the only return in the func,
and (almost) never any other labels so a reader need not look for it
after recognizing the pattern.
nk you.
-Mike
> On Aug 26, 2023, at 7:00 PM, Ian Lance Taylor wrote:
>
> On Sat, Aug 26, 2023 at 2:11 PM Mike Schinkel wrote:
>>
>> Question about disallowing `goto ` jumping over a variable
>> declaration?
>>
>>
>> And please, before bikes
in advance.
-Mike
--
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 an email
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web vi
If I understand what you are asking then JetBrains GoLand does.
I do not know if there is a way to use the keyboard, but it does provides
links you can click when it displays the call stack on panic.
-Mike
On Saturday, August 26, 2023 at 8:33:08 AM UTC-4 Jason E. Aten wrote:
> Is there
r off finding an ALM
solution and then an IDE that integrates with that ALM, or vice versa, i.e.
find an IDE that integrates with an ALM and then use that ALM.
#fwiw
-Mike
On Wednesday, August 23, 2023 at 7:21:46 AM UTC-4 alex-coder wrote:
> Hi All !
>
> Considering that IBM's punch ca
those nicely.
Can you elaborate on the specific dependencies you are trying to manage?
In specific, vs generalities.
-Mike
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails f
addressed.
In hindsight I would remove the mention of motivation if I could so as not
to be misinterpreted. #justfyi #fwiw
-Mike
On Monday, July 3, 2023 at 2:03:00 AM UTC-4 Henry wrote:
> I don't think it has anything to do with motivation, Mike. The problem I
> see is that there is no
day"* approach
will address the reason people ask for a new language feature. And
especially for error handling improvements, which is near the top of the
things people want to see improved in Go, per the Q1 2023 Go Developer
Survey[1].
#fwiw
-Mike
[1] Go Developer Survey 2023 Q1 Res
fmt* could be modified, but
allowing that formatting strikes me as even more *non*-Go idiomatic than
added a *when* command.
That said, I am not personally advocating for a *when* command, I was just
comparing *when err != nil goto * with the OP and proposer's *when
err handle *. #fwiw -Mik
s.New("no funds")*
*} *8. Using the example above, is there not a way to also annotate
the error in a shared manner vs. having to have all the different handle
labels and duplicated code?
-Mike
--
You received this message because you are subscribed to the Google Groups
&q
Sure: https://github.com/golang/go/issues/58622
Thanks very much,
-Mike
On Tue, Feb 21, 2023 at 12:23 AM Ian Lance Taylor wrote:
> On Sun, Feb 19, 2023 at 11:10 AM Mike Nolta wrote:
> >
> > My code recently died with this error string: "write |1:
> copy_file_ra
7;m not allowed to import it.
Go version is 1.18.10, OS is ubuntu-latest from github actions.
Thanks,
-Mike
[1]:
https://cs.opensource.google/go/go/+/refs/tags/go1.20.1:src/internal/poll/fd.go;l=35
--
You received this message because you are subscribed to the Google Groups
"golang-nu
on https://go.dev/dl/ i only see the packaged version this time:
go1.20.1.darwin-amd64.pkg
whereas historically there have been targz versions as well, such as
go1.20.darwin-amd64.tar.gz last time.
the targz's are useful to me for controlling and augmenting/customizing the
installation.
thank
taken into consideration but I wanted
to add more details about how much hardware like this is available and what
people might be using it for.
-Mike
P.S. I'll follow up over on the ticket, too.
On Friday, February 3, 2023 at 1:36:03 PM UTC-5 Ian Lance Taylor wrote:
> On Fri, Feb 3, 2023 at 9:4
inally, I wonder if someone on the list would be able to help me get around
that error and continue exploring the compilation and execution of Go programs
on an ESXi server from within the ESXi SSH shell?
Thanks in advance for any insight into this.
-Mike
>
> Hopefully that provides so
Is your ESXi server not running an Intel x86 processor? That is what the
article is about.
Also, what OS is your guest VM running?
-Mike
On Monday, January 9, 2023 at 4:20:15 PM UTC-5 brett@gmail.com wrote:
> Good afternoon, hoping to get a little help.
>
> I am trying t
Shouldn't the polynomial be 0x1EDC6F41 instead of 0x1EDC6F1
On Saturday, July 11, 2015 at 10:18:15 AM UTC-7 Joe Poirier wrote:
> On Sat, Jul 11, 2015 at 10:25 AM, Akira Hayakawa
> wrote:
>
>> Hi,
>>
>> I am at loss how I can compute crc32c hash value with given seed.
>>
>> Some C libraries incl
me to
stick with Go moving forward. #fwiw
-Mike
On Wednesday, November 9, 2022 at 4:42:55 PM UTC-5 paurea wrote:
> On Wed, Nov 9, 2022, 20:47 Ian Lance Taylor wrote:
>
>> On Wed, Nov 9, 2022 at 10:40 AM Gorka Guardiola wrote:
>>
>> Seems related to https://go.dev/issue/543
xperience those are often frowned on.
Which, the moral of the story is: strive not to change interfaces once
published and in use when and if you can avoid it.
-Mike
[1] Go Written As If Java
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" gro
here's an example more like my specific use case that i just mentioned,
with the surprising inference behavior --- https://go.dev/play/p/BNmjlYejawZ
On Monday, June 20, 2022 at 9:21:34 AM UTC-4 Mike Andrews wrote:
> great, thanks brian, works like a charm. surprisingly, even wor
f the concept per se?
On Monday, June 20, 2022 at 8:44:06 AM UTC-4 Brian Candler wrote:
> Type inference doesn't work in all cases. When required, just be explicit:
>
> interfaceFunc[string](x)
>
> https://go.dev/play/p/j66sXsfMUBl
>
> On Monday, 20 June 2022 at
anyone know why this simple case doesn't compile? i'm trying to call a
function defined for generic interface type, which fails to compile for
struct instance: https://go.dev/play/p/Y3Gdr2ILpK4
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
Kamil,
Are the JSON files using a set schema, or could they be any arbitrary
schema?
Not that the latter can't be handled by Go, but IMO Go excels at the former
because of ability to statically type.
-Mike
On Sunday, February 6, 2022 at 6:15:25 AM UTC-5 kziem...@gmail.com wrote:
&g
s key-value pair for
> each line which is just too verbose to have the extra "time=" "file=".
> Please let me know the one you actually use.
>
> Thanks!
> Chris
How about one that has fine-grained debug leveling, like glog or klog,
too?
Thanks,
Mike
--
BTW, how are you measuring RSS? That is a trick all by itself! See
https://groups.google.com/g/golang-nuts/c/LsOYrYc_Occ/m/LbjLAsL6BwAJ
Regards,
Mike
golang-nuts@googlegroups.com wrote on 08/23/2020 11:04:47 AM:
> From: Manish R Jain
> To: "golang-nuts"
> Date:
BTW, how are you measuring RSS? That is a trick in and of itself!
https://groups.google.com/g/golang-nuts/c/LsOYrYc_Occ/m/LbjLAsL6BwAJ
Regards,
Mike
golang-nuts@googlegroups.com wrote on 08/18/2020 01:56:30 AM:
> From: Mike Spreitzer
> To: golang-nuts
> Date: 08/18/2020 01:56 AM
Krishna can put a use of TCPMon or tcpdump inside the Kubernetes Pod.
Either of these things can be added to the main container, or put in
another container in the Pod.
Regards,
Mike
golang-nuts@googlegroups.com wrote on 08/23/2020 01:06:20 PM:
> From: "Tamás Gulácsi"
>
Actually, that doesn't work. My apologies. If I figure it out, I will reply.
On Fri, Aug 21, 2020 at 11:27 AM Mike P wrote:
> I was able to accomplish this via the flag library in my testing function:
>
> flag.Set("test.timeout", "30m0s")
>
>
>
>
I was able to accomplish this via the flag library in my testing function:
flag.Set("test.timeout", "30m0s")
I found that being read from here:
https://github.com/golang/go/blob/d21953df047868ed3bcfd0172a6c1672642f5b4a/src/cmd/go/testdata/script/test_timeout.txt#L22
So then I just changed the L
s in the coredump so huge? Does it correspond to anything in
any of the other views?
What do the three big anonymous blocks in the procfs view correpond to in
the other views?
Thanks,
Mike
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" gr
FYI, after asking on Slack I got some useful pointers:
- https://golang.org/pkg/runtime/#MemStats - definitions of memory stats
from the golang runtime
-
https://github.com/prometheus/client_golang/blob/master/prometheus/go_collector.go
- the code that publishes golang runtime memory stats as
is
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 7.1762168e+07
Thanks,
Mike
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this grou
contravariance — but perhaps those can be addressed in the
future?
All in all, I think the team has come up with a really good approach to
generics, much better than the prior proposals.
-Mike
P.S. If there is one thing that piqued my interest about this thread it
was Geoff Speicher's suggestion
JMTCW: I think using square brackets [...] instead of parenthesis (...) is
a good decision.
And as someone whose programming experience has not been in C++ or Java, I
always found angle brackets for generics to be rather confusing but do not
find square brackets as confusing.
So in my mind,
> that will do this. Or fork it yourself - it is not a lot of code.
> > On Jul 24, 2020, at 11:15 AM, Mike Cohen
> > wrote:
> >
> > To be clear, the time.MarshalJSON() function produces valid RFC
> > 3339 timestamps which allow arbitrary timezones. This me
that method, I'm
> a littlesurprised at what you describe, since it just uses the
> timezone in theJSON string. It doesn't use the local timezone as far
> as I can see.Can you show a small program that demonstrates the
> problem?
> Ian
--
Mike Cohen
Digital Paleontologist
As Michael Jones said, you still need to play by the testing package's
benchmark rules for it to be able to benchmark your code.
So something along these lines.
func BenchmarkMarshalSample(b *testing.B) {
for i:=0; i < b.N; i++ {
var sum int64
// start := time.Now()
f
C.GoString((*C.char)(&p.hostname))
--
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 an email
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web
https://golang.org/cmd/cgo/
> When the cgo directives are parsed, any occurrence of the string
${SRCDIR} will be replaced by the absolute path to the directory containing
the source file.
So this might be what you need.
#cgo LDFLAGS: -L${SRCDIR}/. -lperson
On Thursday, 30 April 2020 05:19:36
>
> Are there any editors that support some kind of customisable collapsing
> behaviour? Where the above code could be collapsed to something like:
>
Might be worth reading, commenting on and/or possibly upvoting this feature
proposal for GoLand?
https://youtrack.jetbrains.com/issue/GO-7747
-
me. I am a little
unclear as to whether the Go routines are compatible with crypto_box_open
or libsodium's crypto_box_open_easy, for example.
--
Mike
:wq
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this
mainly
looking at CSS here, not Go.)
I for one pine for a day that will likely never come when transpilers are no
longer needed for development (I am not referring to go generate here, but
tools to input one language and output another.)
JMTCW.
-Mike
--
You received this message because you
I was assuming the compiler did not eliminate it. If it does then my point is
moot.
-Mike
Sent from my iPad
> On Apr 26, 2019, at 9:13 AM, Ian Lance Taylor wrote:
>
>> On Thu, Apr 25, 2019 at 10:57 PM Mike Schinkel wrote:
>>
>> Marcus Low wrote:
>>&
overwritten:
var result string
if temperature > 80 {
result = "red"
} else {
result = "green"
}
And it would do those things without the downsides mentioned thus far in this
thread.
-Mike
P.S. And for me personally, it would help reduce the carpel-tunnel flareups I
ge
On Thursday, April 25, 2019 at 10:20:54 AM UTC-4, Sam Whited wrote:
>
> On Wed, Apr 24, 2019, at 14:08, Mark Volkmann wrote:
> > Are there really developers that find this unreadable?
> >
> > color := temperature > 80 ? “red” : “green”
>
> Yes.
>
> What is "?"? If I've never seen that before I
Andrew Klager wrote:
>
> Is this so bad?
>
> func ternary(cond bool, pos, neg interface{}) interface{} {
> if cond {
> return pos
> } else {
> return neg
> }
> }
>
> color := ternary( temp < 80, "blue", "red" )
>
The issue with that proposal is both true and false expressions are always
e
Marcus Low wrote:
>
> datalen := removedKeyken // removedKeyken must have been int32 in your
> example.
> if value != nil {
>datalen = len(value)
> }
>
The issue with this is it makes two assignments when value != nil instead
of just one.
--
You received this message because you are subsc
;
> Yeah, it's different. But it would certainly be cool to have a solution that
> provides an Electron-like shell around a Vugu application. I'll make an
> issue for it so it's noted for later.
>
> On Friday, March 29, 2019 at 9:12:31 PM UTC-7, Mike Schinkel wro
it? I would be really interested if it could
become a commercial product so that I could have better confidence of it
being supported.
-Mike
On Friday, March 29, 2019 at 12:39:42 AM UTC-4, Brad wrote:
>
> Now that WebAssembly is available as an (experimental) compilation target,
>
Oops. I think I spoke to soon. I don't think what you have is an
alternative to Lorca, but an alternative to Vue.js *(which might still be
interesting.)*
*Whoever is moderating **if you see this in time **please just delete both
messages.*
On Friday, March 29, 2019 at 12:39:42 AM UTC-4, Brad w
This is the initial announcement for Golem. Golem is a general purpose,
interpreted scripting language, that brings together ideas from many other
languages, including Go, Python, Javascript and Lua.
Golem can be used as a command-line application, or it can be easily
embedded inside a Go prog
Sorry for bumping a very old thread, but I absolutely disagree with the
people stating that this problem is contrived, and I got here from a Google
search, so this might be relevant for some people.
A very real use-case for reference-comparing maps is when testing .Clone()
methods. You want to
27;s "Writing Solid Code"):
>
> const debug = false
> …
> if debug {
> if impossibleCondition {
> panic(“impossible condition”)
> }
> }
>
> Matt
>
> On Tuesday, March 13, 2018 at 1:11:56 AM UTC-5, Mike Crilly wrote:
>>
>> I'
1 - 100 of 109 matches
Mail list logo