If you`re into C++ try Cimg ( https://cimg.eu/ )It's an excellent way
to create your own images, fractals, artwork etc. but it does have a
learning curve ..
I also found Lode PNG quite usefu l https://lodev.org/lodepng/ but it
requires a lot more additional code than Cimg
On Sunday, Aug
Has anyone ever tallied the number of different forum threads related to
changing Go error handling ?
The current method is obviously a vexing issue to many Go users, and
It seems silly that this issue has never been resolved by the Go team
beyond maintaining the status quo... despite, IMHO, se
" These are parameters, and should be thought of just like other
parameters in a function call. .."
parameters yes, but not in the current go context of 'parameter' .. Is
it not better syntax for 'generic parameters' to use special, distinctive
symbols e.g. C++ does via < Type > ??
On T
" It does seem that a lot of key decisions are being made on the basis of
a very small sample of emoji votes in the issue tracker, so having a
broader voting mechanism might be useful for informing the decision making
process.. .."
At the very least, 'a broad voting mechanism' would eliminate
https://golang.org/issue/38151 great news !... lets hope something
finally gets resolved
FWIW, I modify my original proposal: replacing #{.. .} with err {...}
On Sunday, June 14, 2020 at 12:57:01 PM UTC-4, Ian Lance Taylor wrote:
>
> On Sun, Jun 14, 2020 at 8:25 AM Tom Limoncelli > wr
Amen Tom.. hard to believe that those who determine what Go syntax is, and
is not, have yet to alter this uniquely awkward feature of the Go
language.
On Sunday, June 14, 2020 at 11:26:08 AM UTC-4, Tom Limoncelli wrote:
>
> On Thu, Jun 4, 2020 at 3:34 PM Ian Lance Taylor > wrote:
> >
> > O
?? Why not a cleaner syntax e.g. x = some_func () #{ } .. symbol #
arbitrarily chosen
--
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...
What does Go use these files used for ? I've got loads of them...What
happens if I delete some or all ?
--
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-n
Than you..
I surely need to beef-up my comprehension of what os.exec does vs what it
does not.
On Wednesday, March 25, 2020 at 2:54:07 PM UTC-4, Kurtis Rader wrote:
>
> The exec.Command() function works fine. The problem lies in your
> understanding of what happens when you use a shell to execut
This simple command works correctly when submitted via the terminal, but
the same command submitted to os.exec does not !!
.. and I can`t understand why...
import ( "fmt"; "os"; "os/exec"; )
func main() {
cb := "ABCD"
cmd := exec.Command ("echo", "echo "+ "'" +string(cb [0:len(cb)-1] ) +"'",
Great suggestion
f := os.Open("filename.ext")
else err != nil {
log.Fatal(err)
}
is much needed syntax improvement vs the current syntax.
I would further suggest f ?= os.os.Open("filename.ext") : log.fatal("Cant
open filename.ext")
But the GO 'custodians' get apoplexy whenever they see an
All the links in this post are incorrect
On Saturday, November 2, 2019 at 10:32:48 AM UTC-4, visualfc wrote:
>
> Hi, all.
> LiteIDE X36.2 released!
> This version fix gocode crash bug. Add new image viewer plugins. Folder
> view support multi copy&paste, move to trash. Fix windows floating doc
Are your test results different when rowSize = colSize> 1000 say ??
On Sunday, September 29, 2019 at 10:18:15 AM UTC-4, zct wrote:
>
> The test code is below:
> package main
>
> import (
> "testing"
> )
>
> const rowSize = 100
> const colSize = 100
>
> var array [rowSize][colSize]int
>
How do I use files in ...\src\archive\zip to add files to an existing
archive file MyArchieve.zip ??
--
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
f( g() ) compiles when g returns exactly the number of args that f()
requires, but if g() returns only 1/2 that number f (g(), g() ) wont
compile !! ...Is this not a Golang absurdity ??
On Tuesday, August 6, 2019 at 7:26:46 PM UTC-4, Ian Lance Taylor wrote:
>
> On Tue, Aug 6, 2019 at 4:14 PM
?? Am I wrong in saying that the statements I've submitted conform to "As a
special case, if the return values..."
On Monday, August 5, 2019 at 11:38:24 PM UTC-4, L Godioleskky wrote:
>
> For f1 defined as func f1(k1, k2, k3 int) (x1, x2 int) {..}
> and f2 defined as func f2(x,y int) (
Here a specific example:
The following compiles and runs as expected
m1x,m1y := ec.scalarMult(16,28,33)
m2x,m2y := ec.scalarMult( 1,28,33)
rx,ry := ec.add (m1x,m1y, m2x, m2y)
However this stmt :rx,ry= ec.add(ec.scalarMult(16,28,33),
ec.scalarMult( 1,28,33)) gives the following compiler e
The web page at http://go-lang.cat-v.org/pure-go-libs
provides Go a valuable list of various Go packages organized by subject
category.
Unfortunately it stopped updating Oct'2012.
If anyone knows of a currently maintained equivalent , please respond
--
You received this message because you a
For f1 defined as func f1(k1, k2, k3 int) (x1, x2 int) {..}
and f2 defined as func f2(x,y int) (xR int) {..}
Why does the compiler complain about the call stmt
f2 ( f1 (1,2,3) ) ??
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" g
Michael,
Considering all improvements you've made to the original, is the current
version of your proposal clear to all following this thread ?
On Wednesday, June 5, 2019 at 6:03:12 PM UTC-4, Michal Strba wrote:
>
> Ian, have you had the time to evaluate the improvements to my proposal
> (the o
Sorry again for the power failure...let me try one last time
one of the annoying things you have to deal with as a team member is being
assigned an "update" of code written by someone who no longer works for the
team.
What makes this annoying is possibility of running into code sections that
co
llow
On Thursday, May 30, 2019 at 12:29:03 PM UTC-4, Michal Strba wrote:
>
> Hi Gophers! :)
>
> I've been thinking about generics in Go 2 ever since the original
> contracts proposal and few days ago, ideas finally clicked. One of the main
> things about this proposal is that it deliberately omi
On Thursday, May 30, 2019 at 1:24:55 PM UTC-4, L Godioleskky wrote:
>
> one of the annoying things you have to deal with as a team member is being
> assigned an "update" of code written by someone who no longer works for the
> team. What makes this annoying is possibility of running into code s
one of the annoying things you have to deal with as a team member is being
assigned an "update" of code written by someone who no longer works for the
team. What makes this annoying is possibility of running into code sections
that contains "crytic" statements that require lots of effort to
und
My thanks to all ... This thread has provided me a wealth of interesting
and varied ideas regarding Go user community viewpoints on Go governance.
For what its worth here's my 'two cents' worth ...
In the end, every Go user has only one 'Go' he/she can choose to
useRegardless of how, why an
Ian: I find many of your comments related to how the Go team functions very
interesting,
I for one would find it helpful if 2 or 3 times a year the Go Team would
communicate to the Go community at large, information related to where and
in what direction(s) it is taking Go, and what directions
https://utcc.utoronto.ca/~cks/space/blog/programming/GoIsGooglesLanguage
--
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.
Dave: Thanks for pursuing this issue and reporting back.
Given the extent of responses to the original question by the Go community
(pro and con), hopefully those responsible for Go syntax will re-visit the
issue and decide whether Go statement "if test then {.. } else { .. }"
prevents any po
Can anyone recommend a good on-line doc for goroutines ? The best one I've
found so far uses a very SLOW approach to present essential info
https://gobyexample.com/goroutines
On Monday, May 6, 2019 at 7:11:00 AM UTC-4, Nitish Saboo wrote:
>
> Hi,
>
> I want a go method to run on multiple cores.
If func f (n int) []int { is some fcn that requires CPU time
T (large) to calculate its return value
And I write :
func main() {
var s [ ] int;
s1 := f(1) ; s1 := f(2)
...
}
I get results after CPU time 2 T
?? To obtain results in < 2T time, can I write s1 := go f(1)
this issue involves much more than Go code For example , we for whom
English is not our native language use 'Google translate' to translate our
golang-nuts questions into English and the golang-nuts responses back to
our native language. The second translation often produces produces
very-stra
Thanks jake.. If previous comments I received indicate that I should put
the original question to rest,... but memguard.go suggests it should be
re-opened
On Saturday, May 4, 2019 at 1:23:40 PM UTC-4, jake...@gmail.com wrote:
>
> On Friday, May 3, 2019 at 9:44:05 PM UTC-4, lgo...@gmail.com wrote
Andrey..This is one one the better ones I've seen ..but clearly parts II
and III of this article are still in the making.
Example:
var kk int;
func main() {
kk= 22
{ kkk := 10
println ( kkk, kk)
}
println ( kk)
//println (kkk) //compiler error bec at this poin
I'm currently working on a specialized encryption system where the keys are
global...
More importantly, I've been unable to locate any decent on-line docs
describing exactly how Go GC works from a functional programming
perspective..I found some docs describing various GC concepts and others
th
Does Go GC destroy all global vars prior to the end of main() ?
--
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.
For mo
Am I missing something ??
When u say :
For any function F and some type T declared asfunc F(x ...T) {}
within F x will have type []T. You can call F with a slice s of type []T
as F(s...)
Why is this needed ?? What's the point of using this "crypto-syntax"
rather than just declaring the
func main() {
var c8 uint8;
var S [256] uint8;
for c8 = 0x00; c8 <= 0xff; c8 += 0x01 { S[c8]= c8 }
}
--
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
The following statement seems very awkward, is there a cleaner way to write
it ?
var T0= [256]uint32; var T1= [256]uint32; var T2= [256]uint32; var T3=
[256]uint32; var T5= [256]uint32
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To uns
Great example of why future Go updates should include the ternary operator.
Your code is mess-ey when written using keywords 'if' or 'switch'
but using '?' it becomes much cleaner
p.Rect.X += rl.IsKeyDown(rl.KeyA) ? -1:0 + (rl.IsKeyDown(rl.KeyD) ? 1 :
0 )
p.Rect.Y += rl.IsKeyDown(rl.KeyW)
To Kortschak and all others participating in this debate :
Please don't get hung up over my choice of symbol '?' .
My choice of symbol '?' and ';' is causing people to equate my proposal
with a proposal to adopt C's ternary operator in Go. This is not what I
intended to propose.
My proposal r
Rob:
Am I missing something ??
The proposed syntax
test ? {
} : {
}
with no-nesting allowed is equivalent to
if test {
//.
} else {
// ..
}
..The former is just a cleaner way of writing the latter
Any complaints regarding 'abuse' associated with the former equally apply
to the latte
Rob : how can it be abused if the compiler wont allow nested ? operators ??
On Thursday, April 25, 2019 at 11:47:21 AM UTC-4, Rob 'Commander' Pike
wrote:
>
> I am pretty sure that the decision not to have ?: in Go was a unanimous
> decision by Robert, Ken and myself after almost no discussion. I
Just to clarify : My original proposal was to include as part of Go the
syntax
(test) ? {
{ //..code block for test=true
} : {
//..code block for test=false
}
I am NOT in favor of allowing nested ternary operations
In addition, I also propose allowing un-nested '?' as an alternative
assig
For me, choosing to write
color = temp < 80 ? { "blue", "red")
vs
func ternary(cond bool, pos, neg interface{}) interface{} {
if cond {
return pos
} else {
return neg
}
}
color := ternary( temp < 80, "blue", "red")
is a no brainer
On Wednesday, April 24, 2019 at 5:25:09 PM UTC-4
If instead of writing: temperature > 80 ? red : green
you choose to follow Marcus and write instead:
map[bool]string{true:"red",false:"green"}[temperature>80]
OR call
func ternary(x int) int {
return map[bool]int{true:12345,false:-1}[x>0]
}
Go right ahead ! ..as they say, "different s
It sure would be nice if Go syntax allowed programmers to replace
if ( test) {
...do sonething
} else {
..do something else
}
with
? (test) {
//...do something
}
{
//..do something else
}
The ? operator can be anything the Go language team considers appropriate
--
You received this message
all responses appreciated
--
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.
For more options, visit https://groups.google
Try scrypt at github.com/elithrar/simple-scrypt . It's not a
'standard lib' item, but I've found the authors code easy to implemented as
'package main' code vs 'package' code
On Monday, April 22, 2019 at 6:14:48 AM UTC-4, whiteh...@googlemail.com
wrote:
>
> I'm porting some code over to
I note that this issue has been dealt with in a previous post
https://groups.google.com/forum/#!topic/golang-nuts/n12khle-mlY
The gist of which seems to suggest that 32-bit is faster than 64
On Sunday, April 21, 2019 at 10:09:09 PM UTC-4, Robert Engels wrote:
>
> At least on intel, float64 shoul
For this simple go code, the *.exe file size is 1800 KB ...why so large
compared to equivalent C-compiled code ??
package main
import( "math"; "fmt" )
func main() {
fmt.Printf("\n %8.3f", math.Sin(1.2) )
}
Does the go generated *.exe file contain code only for math.Sin() or all
the functions that
?? On 64-bit CPUs does anyone have any experience comparing the run-time
speed of float64 based calculations vs float32 ?
Some of my C-code when translated to Go-code seems to run noticeably
slower, so I'm wondering if I can speed things up by converting float vars
to float32 vs float64
--
Y
I think michael Jones ' explanation is correct...when we x : =1.3
Go translates this to a binary representation of 1.3 that is a very close
approximation to decimal 1.3
so when you do fmt.Printf( "\n %v ", x) you get the the binary version of x
translated back to decimal, which will not be exa
Burak Marcin and Miki :
Many thanks, my problem is solved thanks to your comments
On Sunday, April 21, 2019 at 1:10:40 AM UTC-4, lgo...@gmail.com wrote:
>
> Here's the snippet I'm trying to run
>
> package main
> import ( "fmt" )
>
> func main() {
> Af(5)
> }
>
> func Af ( N int) {
>
> //var
Here's the snippet I'm trying to run
package main
import ( "fmt" )
func main() {
Af(5)
}
func Af ( N int) {
//var M = new([N][N]uint16) !compiler error
//var M = make([N][N]uint16)!compiler error
//var M = make([][]uint16, N*N) ## run-time error
// run-time error
M := make( [][]u
Bhagvan's disgrceful misuse of this forum to support his commercial
endeavors should result in the exclusion of all his future posts
On Friday, April 5, 2019 at 10:28:52 AM UTC-4, Bhagvan Kommadi wrote:
>
> Check out my published book on Amazon from packt:
>
> Learning Data Structures and al
55 matches
Mail list logo