Forgot your password?
typodupeerror

Comment Re:All your base will belong to AI (Score 1) 55

I prefer the ML way, which your stackoverflow doesn't consider. Rust, which borrows heavily from ocaml, does not have or use exceptions. You can do method chaining, and you can simply handle errors inline. How you do that is flexible, depending on your need. The error can be handled by the calling function using a simple question mark, like

let bar = foo()?.bar()?

Or you can transform the error or the resulting value using e.g.

let bar = foo().map(|v| v.bar())?

If your type implements Default (basically all primitive types do, and structs can simply derive it) then you can just say to return the default value if any errors are encountered:

let bar = foo().map(|v| v.bar()).unwrap_or_default()

So suppose bar() returns either a string or an error, in the above, bar would just be an empty string. Or, you can simply have it panic if either fails:

let bar = foo().unwrap().bar().unwrap()
Or
let bar = foo().expect("foo failed").bar().expect("bar failed")

But actually this isn't even what I was talking about. Go in general is very boilerplate-y, and GP demonstrated a good example of that. Rather, see this:

https://blog.janestreet.com/ef...

In Go, some of this isn't even possible to achieve, and the examples you can do in Go require a lot more code. And you'll have a very hard time trying to come up with an example in the other direction. Here's also a rust psuedocode example I'm curious to see how you handle in Go:

(slashdot seems to be hostile to any attmempt at indenting)

let file_text = file
.open()
.await
.map_err(|e| format!("couldn't open file because {e}"))?
.read_text()
.await
.map_err(|e| format!("couldn't read text because {e}"))?;

Where open() and read_text() are async functions. This code does not panic, and even uses the idiomatic Go approach of all errors as strings. The only way I know of to do this in Go involves a lot of boilerplate involving goroutines, usually channels, tuples and if err != nil checks. We'll also pretend that Go has a concept of a yield point.

Comment Re:All your base will belong to AI (Score 1) 55

This is important:

(e.g., learning how to use a module) or toiling (e.g., writing repetitive blocks of similar code)

They use the LLM for learning and for rote work. This is perfect for Go. Go means favoring simplicity over higher level concepts. Like English at elementary school level instead of college level. Most languages have macros, generic types and union types. Go philosophy is "these concepts take too long to learn". Favor long code over concise code. Repeat yourself, often. Fix the same bug, often.

The complexity is even less of a factor. This isn't hype or fear; it's the new reality.

Welcome to Go. Welcome to 2009.

Comment Re: FUD (Score 1, Interesting) 54

You're not as familiar with this as you think. The overwhelming majority of data sent is a false positive. And Apple didn't try it, they were going to but buckled under public pressure in the US.

Besides, the EU mostly just pays lip service to privacy. Everybody makes a huge deal out of age verification laws here in the US for even pornography, but in Europe they're not only common even outside of pornography but there's even public backlash against companies that don't do it. See for example steam's refusal to implement age verification, many Europeans even on this very site have blasted them for "not following our laws" while totally disregarding why Valve doesn't want to do it.

If you're not aware, by the way, EU politicians have exempted themselves from this surveillance.

Comment Re:Cope (Score 1) 153

He seems to suggest that this is how somebody "copes" with the reality that in the US, there are fewer protections around employment.

But "coping" with that doesn't seem necessary in light of:
- If you live in the US, you're going to have a lot more disposable income than if you did in the EU. The only exception might be Luxembourg, who the US periodically trades places with at the top, but everywhere else in the EU you're going to do worse. That figure, by the way, is after you account for taxes, health care, food, etc.
- If you prefer job security over income and being able to afford everyday things, you could always move to the EU or anywhere else where the same applies. It's a long process, but people do it. Why "cope" when you have that option?
- Net migration between the US and the EU is in favor of the US -- it doesn't seem like "cope" when people actively choose that option.

But I'm not seeing how this is exploitative. If you start a business venture, and it doesn't work out, why should you be compelled to retain employees that you don't have any need for? It would be like saying you should still be forced to pay the guy who mows your lawn every week after you replaced your grass with rocks. This just doesn't make any sense. If the EU says you're required to keep paying him anyway, especially if you also have to fund his pension when he retires, that sounds far more exploitative to me.

If you were required to keep paying somebody to mow your lawn once you hire them, then you are probably less likely to ever pay them to begin with, which would explain why disposable incomes in the EU are much lower. Everything you do has a cost, and stalled economic growth is the price the EU chooses to pay. It's neither right nor wrong, it's just what they, as a whole, have decided they want.

Comment Re: There's always Starlink (Score 1) 76

just from the word "penumbra" thrown out of context?

You were under the impression that satellite communication doesn't involve photons.

(the coverage spots of the satellites aren't shaped like the borders of countries

They're hexagonal cells. However the bird projects photons, not snowflakes.

GPS receiver, which the Starlink terminal uses to determine its location (among other things) and refuse to work if in an unsupported country

Surely it's impossible.

Slashdot Top Deals

"It ain't over until it's over." -- Casey Stengel

Working...