Re: [go-nuts] Generics and parentheses

2020-07-22 Thread Michal Strba
Very correct! At least from my perspective. On Thu, 23 Jul 2020 at 02:02 Russ Cox wrote: > So it sounds like everyone is in favor of the entire generics proposal and > all the semantics, and all we have left to hammer out is the bracket > characters? Do I have that right? > > Best, > Russ > > >

Re: [go-nuts] Re: Generics and parentheses

2020-07-21 Thread Michal Strba
Thanks for the feedback Ian! I was drawing the idea mostly from Rust, which already does the same thing, but uses "::" instead of a dot and it works fine there, but sure, it has its drawbacks. st 22. 7. 2020 o 0:05 Ian Lance Taylor napísal(a): > On Tue, Jul 21, 2020 at 8:49 AM wrote: > > > > I

Re: [go-nuts] Generics and parentheses

2020-07-21 Thread Michal Strba
I'd say a dot is necessary when instantiating a function call but unnecessary when instantiating a type because it's always syntactically clear when a type is required. ut 21. 7. 2020 o 18:51 napísal(a): > Using angle brackets is not a must for supporting generics, but it is the > common syntax

Re: [go-nuts] Re: Generics and parentheses

2020-07-15 Thread Michal Strba
Angle brackets are only problematic in expressions in the bodies of functions when specializing a function or a type, right? They are not problematic in signatures and type definitions. What about using a dot when specializing in bodies? func zero() T { var z T return z }

Re: [go-nuts] A better io.Reader.Read signature?

2019-09-05 Thread Michal Strba
Your proposed signature has a little problem and that is that when calling result, err := reader.Read(nil) the Read method doesn’t know how many bytes it should read. The incoming buffer parameter actually serves two purposes. First is to provide a place for storage. The second is to tell ho

Re: [go-nuts] VSCode

2019-08-27 Thread Michal Strba
Why do you need to modify the .bashrc file? All I did was to install the Go extension and everything else proceeded either automatically or through a few dialog boxes. On Tue, 27 Aug 2019 at 14:40 Andreqx wrote: > I am trying to install VSCode to run with Go. I Need to modify the > /.bashrc file

Re: [go-nuts] Re: About the Google logo on the new Go website

2019-07-17 Thread Michal Strba
Guys, why not keep the discussion to the point. Oracle is quite irrelevant here. The issue is the perception of Go among programmers. On Wed, Jul 17, 2019, 11:46 Wojciech S. Czarnecki wrote: > On Tue, 16 Jul 2019 23:06:41 -0700 > Michael Jones wrote: > > > In regards to Oracle, I was delighted

Re: [go-nuts] Re: About the Google logo on the new Go website

2019-07-16 Thread Michal Strba
Okay, so just to explain why I started this topic and what exactly we are talking about. First of all, just to clear up any doubts, I have no problem with the logo. Google 100% deserves to be there. The thing that I'm talking about is this. Every once in a white, I come across a discussion that s

[go-nuts] About the Google logo on the new Go website

2019-07-15 Thread Michal Strba
As you all know, the new, redesigned Go website has a Google logo in the bottom right corner. Someone opened an issue about this, worrying that with the logo, nobody will see Go as a community project: https://github.com/golang/go/issues/33021 The issue was promptly closed and locked by a Go team

Re: [go-nuts] Re: errors/wrap.go looks like it could be made into a more general monad package?

2019-07-02 Thread Michal Strba
First of all, this is not at all what "monad" means. A monad is a way to express threading of values between computations. A result of one computation gets threaded as an input to the next one, and so on. Second, what would be the use-case of this other than errors? On Wed, Jul 3, 2019, 04:52 Ger

Re: [go-nuts] is there any type that cannot be sent on a channel?

2019-06-30 Thread Michal Strba
Not sure where you read that. Anything can be sent on a channel. Even channels can be sent over channels. That's often used when one goroutine needs to reply to a message from another goroutine. ne 30. 6. 2019 o 18:31 Sathish VJ napísal(a): > I thought I read somewhere that functions cannot be s

Re: [go-nuts] Re: A proof-of-concept implementation of my generics proposal for Go

2019-06-30 Thread Michal Strba
iked the original proposal, but using the > "type" keyword seems very natural. And I like the 80/20 constraints thing > with eq/ord/num. Good work -- I hope this gets turned into an official > proposal and debated. > > > > -Ben > > > > > > On Thursday, J

[go-nuts] A proof-of-concept implementation of my generics proposal for Go

2019-06-27 Thread Michal Strba
Hey everybody! A few weeks ago, I posted about my proposal for generics in Go 2. You can find it here. Today, I finished a proof-of-concept implementation. It was a lot of fun and I learned a lot about the internals of Go. The

Re: [go-nuts] bogus "missing return at end of function"

2019-06-09 Thread Michal Strba
Can you post a code (preferably a link to play.golang.org) that does this? I can't reproduce it myself. On Mon, Jun 10, 2019, 02:40 Marvin Renich wrote: > Is it already a known issue that a «for [true] { ... }» loop whose only > exit path is through return statements inside the loop (i.e. no br

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-06-06 Thread Michal Strba
Taylor napísal(a): > On Wed, Jun 5, 2019 at 3:02 PM Michal Strba wrote: > > > > Ian, have you had the time to evaluate the improvements to my proposal > (the original one in this thread)? I'd love to hear if it has some more > significat shortcomings and know what

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-06-05 Thread Michal Strba
ponding with "I haven't had the time yet" is completely understandable. Thanks On Wed, Jun 5, 2019, 22:18 Robert Engels wrote: > > > > > > > -Original Message- > >From: Randall O'Reilly > >Sent: Jun 5, 2019 2:33 PM > >To: Rober

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-06-04 Thread Michal Strba
> Again thank you for your work exploring this! > > Best regards >Marin > > On 03.06.19 15:49, Michal Strba wrote: > > 'const' could be fine too. I guess this is mostly a matter of personal > > preference. > > > > Regarding the array length syntax. It

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-06-03 Thread Michal Strba
plicit keyword qualifier, because - again - it's unambiguous in the > parameter context. Would you agree? > > Best regards >Martin > > On 03.06.19 14:20, Michal Strba wrote: > > Hi Martin. > > > > The proposal adds types as "values", but not re

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-06-03 Thread Michal Strba
as identifier, mostly for generators > and generated code. While nobody can claim to use 'type'. This would > make converting code so much easier, if this proposal is accepted. > > Just a though. Please tell me whether this would be possible. > > Thanks for your work, it&#x

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-05-31 Thread Michal Strba
Btw, as is demonstrated in the proposal, sorting can be solved by passing a comparator to the function: ```go func Sort(a []gen T, less func(T, T) bool) ``` This is actually a far more flexible way than sorting based on an operator or a `Less` method. Sorting based on an operator or `Less` limits

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-05-31 Thread Michal Strba
@Ian, I have been thinking and I’ve come up with a possible solution to yours and some other problems. I’d love to hear your thoughts on it. Note, that this is a very fresh idea. I’m addressing two problems here: 1. Inability to do Min/Max and other generic numeric functions. 2. The

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread Michal Strba
Ian and David, thanks for the response! I personally don't consider MIn and Max to be so important, however, I understand if you do. I've added a new little part to the proposal that describes one possible way for them to be supported: Currently, the type-checker has to distinguish between three k

Re: [go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread Michal Strba
ded, based on my history dealing with > unnecessary and avoidable 'cryptic C++, > my input is: Generics are a great idea EXCEPT when they allow use of > cryptic syntax > > On Thursday, May 30, 2019 at 12:29:03 PM UTC-4, Michal Strba wrote: >> >> Hi Gophers! :)

[go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread Michal Strba
ents that require lots of effort to >> understand. After looking at the link you provided my input, based on >> dealing with cryptic C++ is: Go should not allow cryptic syntax. >> > Generics are useful except when their syntax becomes cryptic > > >>

[go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread Michal Strba
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 omits the ability to restrict the set of types a function can work with. This is a limi

[Ayatana] HUD shouldn't be only for searching but also for finding

2012-01-26 Thread Michal Strba
Hello! The idea of HUD is good, but currently it's totally incomplete. Look at the Ubuntu Dash and you can see what it can do. I can not only searching for apps and files (or music, etc) but you can also find everything (except files). You can go for example to Games and see all games you've i

Re: [Ayatana] Unity Dash mockup

2011-11-06 Thread Michal Strba
On 11/06/2011 03:12 PM, András Bognár wrote: Hi, I don't really like the current Dash border, so I started working on a mockup (https://plus.google.com/104888645168610370479/posts/BoAcd3c2Ek1). Different separator line, thinner dash border. I think the Dash looks nicer with the 1px border a

Re: [Ayatana] Unity Dash mockup

2011-11-06 Thread Michal Strba
On 11/06/2011 03:12 PM, András Bognár wrote: Hi, I don't really like the current Dash border, so I started working on a mockup (https://plus.google.com/104888645168610370479/posts/BoAcd3c2Ek1). Different separator line, thinner dash border. I think the Dash looks nicer with the 1px border a

Re: [Ayatana] semi-transparent indicator menus

2011-10-30 Thread Michal Strba
and conforms to the dominant background image color. On Fri, Oct 28, 2011 at 2:18 PM, Michal Strba <mailto:faiface2...@gmail.com>> wrote: On 10/28/2011 08:48 PM, Omar B. wrote: Would look more consistent and nice. some mockups: http://4.bp.blogspot.com/_JSR8IC77U

[Ayatana] Unity panel

2011-10-12 Thread Michal Strba
Hello everybody! This suggestion is only about design nothing more. I think that unity panel in ubuntu looks bit boring. It looks (of course it isn't functionally identical) as panel in 10.04+. I think that it should match with launcher (transparency and style). Of course with this will be a desig

Re: [Ayatana] Overlay scrollbars

2011-10-08 Thread Michal Strba
On 10/08/2011 04:47 PM, nick rundy wrote: Two critical bugs keep the ayatana-scrollbars from being usable in my opinion; I filed bug reports in hope that 12.04 will get the fix: Thumb should not appear until it is clickable/grabbable https://bugs.launchpad.net/ubuntu/+bug/870714 Thumb should a

[Ayatana] Overlay scrollbars

2011-10-06 Thread Michal Strba
Hello! I currently read the post on OMG! Ubuntu about overlay scrollbars in 12.04: http://www.omgubuntu.co.uk/2011/10/minor-improvements-ubuntus-overlay-scrollbar-12-04-video/ I think that there can be another improvement because there is a bit problem. When you want to resize window to the right

[Ayatana] Fwd: Re: Dash search vs Alt+F2 in 11.10

2011-09-22 Thread Michal Strba
Original Message Subject:Re: [Ayatana] Dash search vs Alt+F2 in 11.10 Date: Thu, 22 Sep 2011 14:02:27 +0200 From: Michal Strba To: Naba Kumar On 09/22/2011 01:19 PM, Naba Kumar wrote: Hi, I use Alt+F2 a lot to launch apps and at the same time the "

[Ayatana] Workspace switcher needs redesign

2011-09-13 Thread Michal Strba
Hello everyone! I think, that workspace switcher isn't now as useful as it can be because it doesn't have dynamic workspaces. I think, the best way to solve this problem is to make workspaces dynamic and not dynamic. For example, you'll add few workspaces and you name them "Mail", "Work", "Ga

[Ayatana] Workspace switcher

2011-09-02 Thread Michal Strba
I'm currently trying the beta version of ubuntu 11.10. It's great but one thing isn't consistent. It's workspace switcher. Now when you switch workspaces with CTRL+ALT+ARROW the wallpaper does not move. There are only moving windows. But when you open up workspace switcher, there is wallpaper on ev

[Ayatana] Dash design

2011-08-27 Thread Michal Strba
Hello. I really like new things in oneiric like dash button in laucher, new alt-tab, etc. But one isn't very good and that's DASH. It still isn't clean, tidy and simply usable. For the first we have to define what is dash for: 1. FINDING AND LAUNCHING APPS You can find app by name or by cat