Re: [go-nuts] Pure Golang Online Mandelbrot Viewer and MORE

2019-02-10 Thread Hugh S. Myers
I've got a copy on my system (being the author has got to have some perks!)
but I'm sad to say that the underlying OS has changed so much that it no
longer runs. Even worse I lack the source code :( With that, I could easily
port it to JavaScript and let it loose again, but without there are enough
UI differences that It would be a tough go

On Sun, Feb 10, 2019 at 6:15 PM  wrote:

> I just found this post. Do you know where we can get Fraczooms. I loved it
> as a high schooler!
>
> On Thursday, July 21, 2016 at 11:51:56 AM UTC-4, hsmyers wrote:
>>
>> Interface differences are often similar to discussions about calculator
>> styles. Some swear by RPN, others swear at it :) I'd be happy enough with
>> leaving the box up and maybe an hour-glass cursor. Just avoid visual
>> silence as it tends to look like nothing is going on...
>>
>> On Thu, Jul 21, 2016 at 1:42 AM,  wrote:
>>
>>> Drawing a box is exactly how earlier versions worked. I did this, first,
>>> because other renderers did the same. I found drawing a box was not
>>> intuitive at all.
>>>
>>> People just could not figure it out.
>>>
>>> The reason is that there is no conceptual mapping unless you have
>>> already seen that behaviour in another program.
>>>
>>> What happens is, people do a very small click. This makes a tiny box and
>>> they zoom into some tiny area and wonder what happened.
>>>
>>> So small click = ginormous change.
>>>
>>> My UI design has the property that small-click = small-change and
>>> big-click = big-change.
>>>
>>> Now I can send it to people with no instructions!
>>>
>>> The problems you describe is that it requires a loading/aspect ratio
>>> munging indicator i.e.
>>> https://github.com/johnny-morrice/webdelbrot/issues/10
>>>
>>> --
>>> 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...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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.com/d/optout.
>

-- 
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.com/d/optout.


Re: [go-nuts] XML Pretty Print

2017-12-15 Thread Hugh S. Myers
Has anyone tried HTML Tidy? I know it Pretty-prints HTML and I remember
that the same is claimed for XML?…

On Fri, Dec 15, 2017 at 10:27 AM, Mandolyte  wrote:

> I was able to do a minimalist pretty print with limitations just using
> marshal/unmarshal. See the code here
>  under the "identityXform"
> folder. There is a "readme" in that folder with some notes on this. Also
> tried my hand at blogging about my findings http://www.mandolyte.info.
>
> Thanks all for responses.
> Cecil
>
>
> On Monday, December 11, 2017 at 11:38:44 AM UTC-5, Sam Whited wrote:
>>
>> On Mon, Dec 11, 2017, at 09:12, Mandolyte wrote:
>> > At my previous company I had a Go program that would take any XML
>> > document
>> > and output it as XML in a nicer human readable format, i.e., pretty
>> > printed. I've trying to find it again, but my searches have not turned
>> up
>> > any. Perhaps I had written myself, but I didn't think so.
>> >
>> > Does anyone have a link to one?
>>
>> My xmlstream package contains a formatting transformer that might do
>> what you want:
>>
>> https://godoc.org/mellium.im/xmlstream
>>
>> Note that this was written to test some changes for Go 1.10 and it may
>> only build there.
>>
>> —Sam
>>
> --
> 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.com/d/optout.
>

-- 
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.com/d/optout.


Re: [go-nuts] Elphaba Chess

2017-12-02 Thread Hugh S. Myers
yeah I guess, sick transom gloria monday and such…

On Sat, Dec 2, 2017 at 11:57 PM, Ian Lance Taylor  wrote:

> On Sat, Dec 2, 2017 at 11:37 AM,   wrote:
> >
> > Google is not going to be happy if somebody uses Go to compete against
> > Google.
>
> I think that Go is a nice language, but it's not so nice that it would
> make any difference whether a Google competitor used Go or used some
> other language.  Google does not compete at the level of programming
> language choice.
>
>
> > Most likely, Google made Go public because they wanted enthusiastic
> > contributors to help them develop Go --- hiring programmers is expensive.
> > After Go is settled though, Google may make it proprietary again. The
> > enthusiasts will succeed so well that no further contribution from them
> is
> > needed.
>
> The Go team released Go as open source because proprietary programming
> languages make no sense.  Since all programming languages have
> equivalent power, proprietary languages bring you no advantage.  It
> would never make sense for Google to make some new version of Go
> proprietary.
>
> I appreciate your skepticism of corporations, and that can be a
> reasonable stance, but you should also expect large successful
> corporations to act more or less rationally.  Google might conceivably
> some day decide that it's not worth paying people to support Go, but
> Google would never decide to make a proprietary version of Go.
>
> Ian
>
> --
> 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.com/d/optout.
>

-- 
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.com/d/optout.


Re: [go-nuts] Re: Elphaba Chess

2017-12-02 Thread Hugh S. Myers
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 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 capture
>> the opponent's pieces and it can't be captured --- it is just used for
>> blocking.
>>
>> I would like to write a program to play this game, but writing that from
>> scratch is beyond me.
>> Perhaps I could find a public-domain open-source chess program and modify
>> it to use my rules. I would have to change the legal-move code to eliminate
>> captures by the queen or captures of the queen.
>> Other than that, the program should work fine. Check-mate is still the
>> goal. The queen is still worth 9 points, but that is irrelevant, so you
>> might as well say that it is worth 0 points.
>> I would not expect the point values for the other pieces to change ---
>> they might though --- this would have to be determined by experimentation
>> (by stronger players than myself).
>>
>> I would prefer to do this in Go as I'm learning Go and this would be a
>> good learning exercise.
>> If there are no such programs available in Go however, then I could use
>> another language --- I know C, C++ and Pascal, but not very well, and I
>> don't like them much.
>> My background is in Forth (I've done that professionally), but ANS-Forth
>> killed Forth in 1994, so nobody really uses Forth anymore.
>>
>> thanks for any links --- Hugh
>>
>> My ultimate goal with Go is to write a program to "understand" the Ido
>> language, at least insomuch as generating a grammar diagram for a sentence
>> and determining if the sentence is grammatical.
>> It could go from there to generating an English or Spanish translation. I
>> have a lot to learn about Go before I tackle such a program however.
>>
>> Does Go run on smart-phones? I have only heard of Java and Objective-C
>> being used. I have no interest in learning Java, and not much interest in
>> Objective-C.
>>
>> This program lends itself well to parallel processing. The meaning and
>> part-of-speech (POS) of each word in an Ido sentence is
>> context-insensitive, so the words can be analyzed in parallel.
>> I have designed a multi-core Forth processor that can be built into an
>> FPGA --- that is what I would like to use --- build a handheld device to do
>> the translation.
>>
>> --
> 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.com/d/optout.
>

-- 
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.com/d/optout.


Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Hugh S. Myers
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 code and re-assembled again. Not
the best approach, but it allowed some exciting prime number research for
the time…

On Sat, Jul 22, 2017 at 10:14 AM, Rémy Oudompheng <remyoudomph...@gmail.com>
wrote:

> The math/big library has basic routines implemented in assembly for
> most common architectures, with all the math written in Go atop those.
>
> Rémy.
>
> 2017-07-22 17:39 GMT+02:00 Hugh S. Myers <hsmy...@gmail.com>:
> > Is math/big pari based?
> >
> > On Sat, Jul 22, 2017 at 8:36 AM, Rémy Oudompheng <
> remyoudomph...@gmail.com>
> > wrote:
> >>
> >> 2017-07-22 17:19 GMT+02:00 Rémy Oudompheng <remyoudomph...@gmail.com>:
> >> > 2017-07-22 16:48 GMT+02:00 me <yout...@z505.com>:
> >> >> How does GoLang compare to other languages for mathematics dealing
> with
> >> >> really large numbers?
> >> >>
> >> >> Prefer the ability to work with 2GB sized strings as numbers (need
> much
> >> >> bigger than int64)
> >> >>
> >> >> I see there is this:
> >> >> https://golang.org/pkg/math/big/
> >> >>
> >> >> And probably some other github projects for math in go?
> >> >>
> >> >> Is Python and Mathematica better at handling super large numbers?
> Plain
> >> >> C?
> >> >> C++ ? Javascript?
> >> >>
> >> >> I need to start working with some massive numbers, but am unsure to
> >> >> choose
> >> >> Go - as I don't have experience in Go Mathematics units yet.
> >> >>
> >> >
> >> > math/big is the standard package for big integer arithmetic in Go, and
> >> > it is quite fast.
> >> > For your huge numbers, it all depends on which operations you need to
> >> > do.
> >> > For example, the math/big package uses Karatsuba multiplication, which
> >> > cannot handle 2GB numbers in a reasonable amount of time.
> >> >
> >> > I wrote a little module (github/remyoudompheng/bigfft) to play with
> >> > FFT-based multiplication of huge integers, while maintaining
> >> > interoperability with the math/big package.
> >> >
> >> > On my computer, it multiplies 1Gbit numbers (300MB strings when
> >> > printed in base 10), in 24 seconds (the GMP library does it in 9.3
> >> > seconds). I assume that it would multiply your 2GB strings (6 Gbit
> >> > numbers) in about 2 minutes.
> >> >
> >> > You are welcome to try it.
> >> >
> >> > Regards,
> >> > Rémy.
> >>
> >> The most annoying issue you might encounter is that if your 2GB
> >> strings are numbers printed in base 10, the math/big will not be able
> >> to parse them in a reasonable time using the standard method
> >> (SetString).
> >>
> >> Rémy.
> >>
> >> --
> >> 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.com/d/optout.
> >
> >
>

-- 
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.com/d/optout.


Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Hugh S. Myers
Is math/big pari based?

On Sat, Jul 22, 2017 at 8:36 AM, Rémy Oudompheng 
wrote:

> 2017-07-22 17:19 GMT+02:00 Rémy Oudompheng :
> > 2017-07-22 16:48 GMT+02:00 me :
> >> How does GoLang compare to other languages for mathematics dealing with
> >> really large numbers?
> >>
> >> Prefer the ability to work with 2GB sized strings as numbers (need much
> >> bigger than int64)
> >>
> >> I see there is this:
> >> https://golang.org/pkg/math/big/
> >>
> >> And probably some other github projects for math in go?
> >>
> >> Is Python and Mathematica better at handling super large numbers? Plain
> C?
> >> C++ ? Javascript?
> >>
> >> I need to start working with some massive numbers, but am unsure to
> choose
> >> Go - as I don't have experience in Go Mathematics units yet.
> >>
> >
> > math/big is the standard package for big integer arithmetic in Go, and
> > it is quite fast.
> > For your huge numbers, it all depends on which operations you need to do.
> > For example, the math/big package uses Karatsuba multiplication, which
> > cannot handle 2GB numbers in a reasonable amount of time.
> >
> > I wrote a little module (github/remyoudompheng/bigfft) to play with
> > FFT-based multiplication of huge integers, while maintaining
> > interoperability with the math/big package.
> >
> > On my computer, it multiplies 1Gbit numbers (300MB strings when
> > printed in base 10), in 24 seconds (the GMP library does it in 9.3
> > seconds). I assume that it would multiply your 2GB strings (6 Gbit
> > numbers) in about 2 minutes.
> >
> > You are welcome to try it.
> >
> > Regards,
> > Rémy.
>
> The most annoying issue you might encounter is that if your 2GB
> strings are numbers printed in base 10, the math/big will not be able
> to parse them in a reasonable time using the standard method
> (SetString).
>
> Rémy.
>
> --
> 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.com/d/optout.
>

-- 
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.com/d/optout.


Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Hugh S. Myers
Like everything else, '*it depends…*'

Do you want speed?
Do you want the bulk of the coding already available as a library/module?
With or without a user interface?

Answer those first and then ask again.

Oh! Replace Javascript with Perl…


On Sat, Jul 22, 2017 at 7:48 AM, me  wrote:

> How does GoLang compare to other languages for mathematics dealing with
> really large numbers?
>
> Prefer the ability to work with 2GB sized strings as numbers (need much
> bigger than int64)
>
> I see there is this:
> https://golang.org/pkg/math/big/
>
> And probably some other github projects for math in go?
>
> Is Python and Mathematica better at handling super large numbers? Plain C?
> C++ ? Javascript?
>
> I need to start working with some massive numbers, but am unsure to choose
> Go - as I don't have experience in Go Mathematics units yet.
>
> --
> 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.com/d/optout.
>

-- 
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.com/d/optout.


Re: [go-nuts] Parse JSON in Template

2017-02-19 Thread Hugh S. Myers
The devil sitting on my shoulder tempts me to say "Of course, there is" and
walk away. That said, by now there must exist code to read JSON (YAML,
Windows config files, etc.) from a string. It's just a matter of finding
it.

   - https://gobyexample.com/json
   - https://blog.golang.org/json-and-go

are just the first two examples that are returned by a Google search which
mentions 'About 2,890,000 results (0.54 seconds) '. The query was 'go code
to read JSON'
HTH and good luck!

--hsm.

On Sun, Feb 19, 2017 at 9:17 AM, Rejoy  wrote:

> I am retrieving a set of field values from the Database into an interface
> type object. One of the field values is a JSON string (say Order detail). I
> am retrieving it as a string as passing it on to a template and referencing
> it using {{.orderdetail}}
> this is the output I get on the client which is a valid json:
> [{"pid":"d6742e4e-2ad6-43c5-97f4-e8a7b00684e2","image":"
> 1Appleiphone7.jpeg","name":"iphone7","price":7,"count"
> :1},{"pid":"12d3d8fc-66b6-45f9-a91b-d400b91c32aa","
> image":"2SamsungGalaxys7.jpeg","name":"SamsungGalaxy7","price":7,"count":1}]
>
> I am not able to access the values in the json using the keys at client
> side in the template. {{.orderdetails.pid}} does't yield and value.
> One way would be to unmarshal the string into a map([string]interface{})
> and then pass on the data to the templates. But was curious if there is a
> way to access the data using the JSON keys.
> Thanks
> Rejoy
>
> --
> 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.com/d/optout.
>

-- 
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.com/d/optout.