Better HN
topnewbestaskshowjobs
Log inSign up

randomdata

8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions

Submissions

comment 2y ago · link · parent

It's a joke about how every contrived Go example posted to the internet is in that vein. You wouldn't blindly pass something up the stack like that in a real application. Well, maybe if you hate other developers for some reason.

comment 2y ago · link · parent

> Can you name 3 apps/projects that use COBOL?

Does this imply that you see COBOL as having a trustworthy future, making it a great choice for a new greenfield application?

comment 2y ago · link · parent

Go was never intended to be a C/C++ successor, it was intended to solve a class of problems that Pike and gang experienced in the software they worked on. Which is to say network servers. What you are probably remembering is that they assumed from their unique Google lens that it was C++ developers who had those same problems and would see it as an alternative to C++ when faced with those problems, but it turned out that in the "real" world people were writing network servers in Python and Ruby, not C++.

Which isn't surprising to the rest of us. If you remember the days before Go, every second thread on HN was about how "company X", including the company now known as X, saw their Ruby network servers completely falling down under load, forcing a rewrite in whatever the language du-jour was that day. But Googlers tend to live in a completely different bubble with respect to the way software is written.

comment 2y ago · link · parent

Maybe they are equivalent, but looking at what other languages do is irrelevant in determining that. If there is nothing else in Ruby to suggest that they are equivalent, then perhaps they are not?

I'm not sure where "care" enters into the picture. It's a computer language. For what reason would emotions be assigned to it?

comment 2y ago · link · parent

It's all relative, I guess. I'm looking at 20 hours of driving to get the western extent of the province. And seven hours the other way to get to the easternmost side. 8 hours is but a leisurely afternoon cruise.

comment 2y ago · link · parent

I'm not familiar enough with the internals to say for sure, but I do know Python has a penchant for dicts. Perhaps it looks up the function each time, whereas Go can be made aware of the function at compile time? That wouldn't be without cost.

Part and parcel with its love for dicts, Python data structures tend to not be shaped like C typically expects. Whereas Go data structures are, at most, lightweight wrappers around C-style structures, and are often even directly equivalent, making passing data about as simple as passing a pointer. Python may be getting bogged down in some kind of marshalling operation. That isn't cost-free either.

comment 2y ago · link · parent

The parent stated that the neural net is trained with a genetic algorithm that seeks to maximize survivability and reproduction. Of which I posit we have optimized as far as it can take it. People have shown to already survive and reproduce to the greatest extent of what appears to be the limits of physical form as we understand it.

So, if we have reached the limits of survivability and reproducibility, only further hindered by other biological processes, what pressure on the generic algorithm would there be to see new traits start to become dominant? If you effectively stop training the NN, you wouldn't expect inference to change.

Perhaps the advent of modern contraception will eventually reveal some mutation that is advantageous enough to overcome the modern setback we've seen in reproduction, bringing to light a different emotion/set of emotions that become dominant. But, realistically, we're only talking a few generations of training on that change to the state of the universe. That's nothing for a genetic algorithm. GA-based training methods are not very efficient with respect to training speed even on computers, and worse in real life when a single generation takes ~30 years to spawn the next.

comment 2y ago · link · parent

> That's better for YOU if you are trying to get answers

Indeed. No sense in breaking the law.

> but for me the reader

I bet they wrote a song about you – or at least, as the song goes, so you think.

> you made up something about C# in the hopes of being corrected

It wasn't made up. The FFI benchmarks I looked at truly did show that. I did not verify exactly what was the cause for the slowness, though – and I clearly maintained the doubt in the original comment in recognition of that. Speculation isn't quite the same as what you are postulating.

Nice execution of Cunningham's law, by the way. Now you're getting it. Welcome to the internet! You're going to like it here.

comment 2y ago · link · parent

> If Go is slow in a certain context, I would want to know what that context is.

You'll know as soon as you measure it. Not exactly rocket science, just plain old engineering. Measuring is what engineers do. You wouldn't build a bridge without first measuring the properties of the materials, and you wouldn't build a program without measuring the properties of its 'materials'.

You make a good point that it is strange we don't get better datasheets from 'material manufacturers' about the base measurements. That wouldn't fly in any other engineering discipline, but I guess that's the nature of software still being young. As unfortunate as that may be, you can't fight the state of affairs, you're just going to have to roll up your sleeves. Such is life.

> How is this better than asking for code examples?

Cunningham's law explains why it is better.

comment 2y ago · link · parent

You do live out in the Ocean? Fair enough.

Nobody has ever thought North Carolina was small, though. Where did that idea come from? In fact, it is not clear why the record needed a distance in the first place.

comment 2y ago · link · parent

> So they can audit whether this is a case when someone claims Go FFI is fine.

Of course nobody would claim such a thing. The cost is real. Whether or not Go is fine will depend entirely on what kind of problem environment you are dealing with and what your own code actually looks like. Someone else's code will never tell you this. There is no shortcut here other than to measure your own code.

> As an outsider, all I see are two people saying "no it's not slow," just about different languages.

It is slow, relatively speaking. But does that matter in your particular situation? Random internet benchmarks show that Python is always slower, way slower, yet people find all kinds of productive uses for Python – even in domains where computational performance is very important! And if it does matter for what you're doing, are you sure you actually picked the fastest option? Measure and find out.

It is good to have rough estimates, but all of these languages are operating within the same approximate timescale here. It's not like Go, C#, or any other language is taking minutes to perform FFI. When you really do need to shave those nanoseconds off, guessing isn't going to get you there. Measure!

comment 2y ago · link · parent

What, exactly, is interesting about arbitrary benchmarks? It might just be the C# code is slower because the developer accidentally introduced different, less performant, logic. It doesn't tell you anything. Only your own code can tell you something. I am not sure how to state this more clearly.

What would actually be interesting is to see you gain those important nanoseconds of performance that is so critical to your business. We want to see you succeed (even if you don't seem the want the same for yourself?).

comment 2y ago · link · parent

> Do you have any example of code

No better than your own code. Why not put it to the test? In the end you will either know that you made the right choice, or have the better solution ready to swap in. You can't lose.

The key takeaway from the previous comment isn't some pointless C# vs Go comparison, it is that performance can be hard to predict. Someone else's code isn't yours. It won't tell you anything about yours. Measure and find out!

comment 2y ago · link · parent

The biggest problem with FFI in Go (gc, at least) isn't in the FFI operation itself, rather FFI functions that block for a long time mess with the scheduler.

It seems C# suffers the same problem as real-world benchmarks often show it to be slower than Go when performing FFI, even if it should be theoretically faster.

As usual, performance can be hard to predict. Benchmarking the actual code you intend to use is the only way to ensure that what you think is true actually is. If you aren't measuring, you aren't engineering.

comment 2y ago · link · parent

> If we’re neural nets, shouldn’t 12,000 years of post paleolithic experience be enough to have more modern emotions?

As far as I can tell humans are already able to survive and reproduce to the limits of what the physical human form is capable of. Optimization can only optimize so much. Where do you see "paleolithic" emotions being a limiting factor that leaves room for further optimization? What "modern" emotions do you envision to improve on those metrics?

Human emotions do not appear to be cohesive from person to person, so it seems the generic algorithm is still doing its thing, but if the mutations are no more effective than the "paleolithic" emotions with respect to survivability and reproduction, there isn't much evolutionary pressure to see them become dominant.

comment 2y ago · link · parent

Strictly speaking, that is true. Even the worst code ever written had some thought put into it. But the "actually put some thought" was meant to imply more than putting down the first characters that spew out; to consider the design more holistically and carefully.

But you are right to not take anything that software says seriously. Seriousness is for interactions with humans.

comment 2y ago · link · parent

It lacks expressiveness, which means you actually have to put some thought into your design to avoid butting heads with it. You can't throw up garbage and then keep massaging the types until you can make whatever gobbledygook you came up with fit.

Business/safety critical logic tends to get complicated, and, at least in the case of business software, is more than likely is venturing into unexplored territory, so when you're not very skilled at programming finding the right design can become an insurmountable challenge. A more expressive type system offers a bandaid to work around that.

comment 2y ago · link · parent

> No, Go FFI is so slow it makes Python look fast

Which Python and which Go? There are so many different implementations and different versions of those implementations that this broad statement is meaningless.

From what I have installed on my machine, CPython 3.11.6 seems to take around 80ns to call a C function, gc 1.22.0 takes around 50ns to call the same C function, and tinygo 0.32.0 only takes around 1ns!

Such benchmarking is always fraught with problems, so your milage may vary, but on my machine under this particular test Go wins in both cases, and tinygo is doing so at about the same speed as C itself.

comment 2y ago · link · parent

Oh, so not about to sign in any way, shape, or form. Rather, "about to maybe strike a deal (that is still likely to fall through, as many deal attempts do)"? Got it.

Hopefully next time you can keep your stories straight.

comment 2y ago · link · parent

The easternly side of the forest to the easternmost points of NC is not further than LA from SF, though. Unless you live way out in the ocean, but still consider that to be North Carolina for some reason, you are closer than said distance to the forest.

comment 2y ago · link · parent

"I'm about to arrive" means to me that you are already en route. "I'm about to sign" means to me that the pen hasn't yet hit the paper. In one case the process has already started, in the other process the has yet to commence. These are not comparable. "I'm about to leave" would be a more apt comparison, if we are to stay within proximity of your analogy.

"I'm about to leave" could, indeed, suggest hesitation. Why haven't you left already? –– Once the papers are able to be signed, the time is now. You can do so immediately. To wait means there is something holding you back.

What holds him back, we don't know. Apparently you are too embarrassed to ask or whatever that was that you were trying to say. But given the topic of discussion, presumably it is some kind of hesitation around the use of Ruby. Otherwise, where would the relevance of you telling us this story about your friend waiting to sign lie?

comment 2y ago · link · parent

> Someone with a car and a house and a $20/hour job might be poor because they barely make ends meet

And someone with a $1,000,000 per year salary and a penchant for hookers and blow might also barely make ends meet. Is there some kind of useful takeaway from this fun anecdote?

> but manage to save a few hundred a month

If we assume the average worker with 20 years under their belt, that's ~$40,000. In what world is that poor? That alone, even ignoring the house and any other assets (a car, perhaps?), is somewhere around the top 20%. This disconnect from reality is fascinating.

> A group of people might be able to take out a loan an individual can't

Just who, exactly, is going to lend to poor people, even if they come by the millions, for no reason other than to cover their living expenses? There is almost no chance the poor are going to pay you back, unless maybe they happen to win the lottery. But if you really want to "invest" in the lottery, why not put that money directly into the lottery? What value do the middlemen bring?

> A group of people might collect dues as a cost to be in that group

From who? The poor don't have resources to pay dues. Are you being tricked by rich people again?

> We are clearly talking about business large enough for strikes to happen

No, we are clearly not. What makes you think the farmers that we were talking about earlier in thread even have employees? Many farmers do not. You're clearly not talking about anything related to what the rest of us are, but anyway...

> More people have more options. Options are power. Why are you arguing against this fundamental point?

Get back to us when you've actually read the thread. As amusing as your confusion is, there is no interest in arbitrarily changing the subject for no reason. Never was, never will be. Start a new thread if you want to talk about something else. Hijacking an existing thread for a different purpose is in bad faith.

comment 2y ago · link · parent

Is this your roundabout way of saying you don't know why he'd stall on signing what, at least as described, seems like a fantastic offer and are too afraid to ask?

comment 2y ago · link · parent

The map of US rainforests shows an active rainforest along the western side of North Carolina. It is not all that hard to believe said forest could have been much larger before the human touch.

comment 2y ago · link · parent

Nah. If it were car-centric it would be much more friendly to cars. It has come to try to be everything-centric, which results in it being awful for everyone.

comment 2y ago · link · parent

Are you sure that's a good example of car centricity? The streets in my town are wide enough for a six lane highway, yet the streets were built before the car was even a glimmer in someone's imagination.

comment 2y ago · link · parent

> Between what happens when the start index is greater than the length of the input, and what happens when the end index is greater than the length of the input.

Again, what makes that an inconsistency and not just a different language?

> My suggestion is that the behavior would have made more sense

On the basis of the start and end indices being equivalent. But are they? What attributes of the language should see us consider them to be?

1
303132
256