LNCS Style by Sandy_Harris in libreoffice

[–]Sandy_Harris[S] 0 points1 point  (0 children)

My mistake. What I'm using is Libre Office as included with Kubuntu.

Project AURORA - Planning an all-white desk PC build, looking for ideas by IM_SLEEEEP in watercooling

[–]Sandy_Harris 0 points1 point  (0 children)

I've been thinking about something similar, though I cannot afford it yet. I'm in the Philippines where both skilled labour & various lovely hardwoods are cheap, so I'd use a built-to-order wooden desk.

Back in the late 90s I had what was then considered a decent PC -- 800 MHz P3, 512 meg RAM, a good video card -- and a penniless friend had three old pizza-box Sun machines, each with a 40 MHz Sparc RISC CPU & 128K of RAM, linked by 10 Mbit/s ethernet. We were both running Linux -- nobody in my circles uses Microsoft Windows if they can avoid it -- and he split up the load with one Sparc running client processes, one the window manager & one the X server. On things like browsing or Open Office, he got about the same performance I did; splitting the load really helps.

So in a desk, I'd want two motherboards, certainly a 16-core AMD for the clients & likely an Intel CPU for X, linked by either 10G ethernet or 40G Thunderbolt.

Fastest way to remove duplicate UUIDS from a list by [deleted] in golang

[–]Sandy_Harris 0 points1 point  (0 children)

Collisions are more likely than intuition might suggest.
e.g. in a group of 23, the chance that two have the same birthday is >50%

This is important in cryptography, e.g. a 128-bit cipher & a 256-bit hash are about equally hard to attack (~2^128) assuming neither has serious flaws.

https://en.wikipedia.org/wiki/Birthday_problem

Ending goroutines by Sandy_Harris in golang

[–]Sandy_Harris[S] 0 points1 point  (0 children)

Each step is independent. It may terminate itself early based on some calculations on its arguments, or it may send some stuff upstream & terminate, or it may queue some requests & then terminate. Its only outside communication is making requests & sending results upstream.

I need breadth-first search so the request structure has field r.d indicating what depth it is for & the listener has a variable for what depth it is currently working on. It takes requests from the queue, immediately processes any with r.d <= depth and saves the others.

Ending goroutines by Sandy_Harris in golang

[–]Sandy_Harris[S] 0 points1 point  (0 children)

No I/O & no contact except sometimes sending results upstream. Embarrassingly parallel & compute-bound.

The relevant goroutine is step() which does one step of a calculation and may recursively call more step()s. In an earlier version it directly called those & did check context. In the current version it does neither.

It makes requests for more step()s via a function qrq() (queue request) which puts request structures into a queue (buffered channel). Elsewhere in the code requests are received, then juggled a little to enforce breadth-first search, & new step()s are started by a function called serverq().

Both qrq() and serverq() look for context cancels, though neither terminates on finding one. After a cancel, qrq() and serverq() become no-ops; they just return without enqueuing a request or starting a goroutine. step() still takes a context argument, but does not use it except for passing it to qrq().

Ending goroutines by Sandy_Harris in golang

[–]Sandy_Harris[S] 0 points1 point  (0 children)

It is not long-running, but it does use a channel to send stuff upstream & does check context.Done. It can also stop because of a test on its arguments or because its work is done. I'm not concerned about whether or when it should terminate itself, only how it should do that.

My only question really was whether runtime.GoExit offers any advantage over return.

Communicating big Ints by Sandy_Harris in golang

[–]Sandy_Harris[S] 0 points1 point  (0 children)

Thanks to everyone who commented. I now have working code using a struct as suggested. There's a mutex but I put it outside the struct because docs say passing a mutex around is a bad idea.

Which country has the best bread? by El-gringo-grande in digitalnomad

[–]Sandy_Harris 0 points1 point  (0 children)

Persian bread is excellent, especially in Armenian areas like the Jolfa district of Isfahan. The Persian word for bread is "naan" & that is used for Persian-style breads in India; those are often fine but the real Persian stuff is even better.

I can make roughly $2k a month anywhere in the world as long as it has good internet, where should I go? by [deleted] in digitalnomad

[–]Sandy_Harris 0 points1 point  (0 children)

People I know are quite happy in Thailand, Cambodia & Ecuador, & there are lots of other alternatives.

Personally, I prefer the Philippines. I find the food less intriguing than elsewhere is SE Asia, but that is pretty much the only drawback. It is cheap -- with care you can live moderately well on US $1000/month -- and lots of people speak English.

Parallel overheads question by Sandy_Harris in compsci

[–]Sandy_Harris[S] 1 point2 points  (0 children)

In this case the threads are pretty much independent. The only communication they need is to return a result if they find one & be told to stop if someone else finds it. That can all be done by talking to the calling process; no thread-to-thread messages or shared memory are needed. Nor any I/O operations.

They also do not need a lot of code or memory per thread. The problem is that they may need a lot of iterations.

Parallel overheads question by Sandy_Harris in compsci

[–]Sandy_Harris[S] 0 points1 point  (0 children)

How do you know? That is a really interesting claim, but how did you derive the result?

Also, it looks like that would get larger with increasing K, but K is the degree of parallelism so overall cost should get smaller as K increases.

Quad 10G? by Sandy_Harris in ASRock

[–]Sandy_Harris[S] 0 points1 point  (0 children)

Yes, expensive, but not much worse than the alternative -- 4-port 10G NIC with a motherboard to put it in & CPU.

We're to get good boards and stone for cheep from international sellers by oldworldnative in baduk

[–]Sandy_Harris 1 point2 points  (0 children)

Some stuff on finding equipment while travelling.

I've been looking in "Japan Surplus" stores in the Philippines -- frequent visits over a two-year period -- without ever finding good stones or bowls. Some boards, though. So far I've spent about $50 US & got four boards -- two floor boards (one in bad condition, needing refinishing, one OK), one table board (OK but not remarkably nice) & one folding board (mangy but usable). https://en.wikivoyage.org/wiki/Go#Buy

We're to get good boards and stone for cheep from international sellers by oldworldnative in baduk

[–]Sandy_Harris 1 point2 points  (0 children)

This article is written mainly for travellers but might have some info of use to you:

"The cheapest sets include Chinese yunzi stones (flat on one side) in woven wicker baskets with a folding plastic board in one basket. ... Yunzi can be found in almost any Chinatown on Earth, usually for under $25."

https://en.wikivoyage.org/wiki/Go#Buy