Live data from Hacker News

Go is my hammer, and everything is a nail

maragu.dev

691–700 of 816 posts

Re: Go is my hammer, and everything is a nail

#691
post #292

Earlier quoted context omitted.

Yes, because one can either turn off the GC, allocate memory up front (arena style), or call C or Assembly from Go. The performance is likely to be good enough with GC turned on, though, because it is unusually fast.

Turning off the GC isn't the blocker. Plenty of GC languages manage. I'm more interested in how Go handles graphics APIs and binding a render thread or working with GUI threads considering how goroutines are done. Does one need to write non-idiomatic go, avoiding goroutines or is there some trick? For example, GTK isn't thread safe so you can't just use that library without considering that.

No, go is not for native gui apps. I recently made some rough go bindings to minifb and while easy to do, it wasn't productive at all. Errors are hard to follow; are they go or minifb? Callbacks work until I have too many calls then the app might freeze altogether.

Go is great for image/draw and things like passing pixels: (C.uint)buffer.Pix

It comes down to Google wanting Go to use the web as the interface, which in practice means not doing dynamic linking (except in Windows.)

To your question, go gui apps will have 'runtime.LockOsThread()' near the start so it's all green/light/go threads and only 1 OS thread.

Re: Go is my hammer, and everything is a nail

#692

Earlier quoted context omitted.

The implementation is preexisting. Even if it was directly used, there would not be an implementation in the snippet. So it not being implemented in the snippet proves nothing. And what do you mean "someone else"? You're the one that said the compiler "certainly knows" how to do that.

> So it not being implemented in the snippet proves nothing. It doesn't prove anything, but is what we've been talking about. Indeed, there is nothing to prove. Never was. What is it with this weird obsession you have with being convinced by something? Nobody was ever trying to convince you of anything, nor would there be any reason to ever try to. That would be a pointless endeavour. > And what do you mean "someone…

> there is nothing to prove. Never was.

What was the point of your question, if not to prove something?

If you were trying to imply that the implementation doesn't exist, that implication was fatally flawed.

If you were asking to waste time, then it worked.

If you had another motive, what was it?

Are we having a 5d chess game? I thought it was a normal conversation.

> He who wrote the "citation".

Nobody? Nobody wrote a citation.

Do you mean the person that asked for a citation? If so, you're wrong. Finding evidence for your own claims would not make you a middleman. They didn't want to have a discussion with someone else, they wanted a discussion with you, and for that discussion to have evidence. Citing evidence is not passing the buck to someone else, it's an important part of making claims.

Re: Go is my hammer, and everything is a nail

#693

I used to work for a Go shop. We dealt with financial data. I found it so annoying that many of my colleagues would use Go for one-off tasks such as aggregating CSV files, updating the database with some data, or fetching data from the database, and then trying to make a plot. I saw my colleagues again and again implementing basic algorithms such as rolling median, or finding a maximum. Instead of loading data into P…

I've had exactly the same experience, it's a nice language but using it for things it's not suited for like data exploration makes no sense to me. Production data pipelines on the other hand, but only after testing them well and as you say, making sure there's good testing if you're implementing things like numerical routines.

> it's a nice language but using it for things it's not suited for like data exploration

Pedantic point, but this is an issue of library support, not the language.

For whatever reason, data scientists and ML researchers decided to write their libraries and tools in a Kindergartner's language with meaningful whitespace, dynamic typing, and various other juvenile PL features specifically aimed at five year olds and the mentally infirm.

Re: Go is my hammer, and everything is a nail

#694
post #589

Earlier quoted context omitted.

It has not been my experience that Go is good for almost everything. On the contrary, it seems good at a couple very specific (though very common) niches: network services and cli utilities. But for most of what I do right now - data heavy work - it has not turned out to be very good (IMO). It really is just not better in any way to have to constantly write manual loops to do anything.

I agree with this, there is a reason Python is the king of data.

Yeah, but Go is also worse (in my experience) than most, if not all, of the other general-purpose languages I've used, for this niche.

For instance, Rust is actually pretty great in this space, despite being very ... not-python, and Java also has decent libraries. Then C++ (and Fortran!) are good for a very different reason than python, "on the metal" performance, which Go also isn't a great fit for.

Re: Go is my hammer, and everything is a nail

#695

Earlier quoted context omitted.

If you have a csv, pandas is the "less overkill" route than loading it into a database to use sql.

Each their own tool, but that's nothing awk can't do [1]. I prefer a shell script, because shell is everywhere. [1] https://stackoverflow.com/a/75073649

Sorry, but no, awk and shell scripts are not a good choice for this kind of work. I'm sorry, but they just aren't!

Sure, go for it if you're just doing stuff for your own personal interest. But if you're doing serious data-driven work in a professional environment, this is going to be an awful choice.

Re: Go is my hammer, and everything is a nail

#696

Earlier quoted context omitted.

> So it not being implemented in the snippet proves nothing. It doesn't prove anything, but is what we've been talking about. Indeed, there is nothing to prove. Never was. What is it with this weird obsession you have with being convinced by something? Nobody was ever trying to convince you of anything, nor would there be any reason to ever try to. That would be a pointless endeavour. > And what do you mean "someone…

> there is nothing to prove. Never was. What was the point of your question, if not to prove something? If you were trying to imply that the implementation doesn't exist, that implication was fatally flawed. If you were asking to waste time, then it worked. If you had another motive, what was it? Are we having a 5d chess game? I thought it was a normal conversation. > He who wrote the "citation". Nobody? Nobody wrote…

> What was the point of your question, if not to prove something?

My enjoyment. For what other reason would you spend your free time doing something?

> If you were trying to imply that the implementation doesn't exist, that implication was fatally flawed.

And if I weren't trying?

> If you were asking to waste time, then it worked.

I ask nothing, but if you feel wasted your time, why? Why would you do such a thing?

> If you had another motive, what was it?

As before, my enjoyment. Same as you, I'm sure. What other possible reason could there be?

> Nobody? Nobody wrote a citation.

There was a request for me to refer another party who was willing to talk about the subject that was at hand – one that you made reference to ('you called the idea of finding a citation a "waste of time"'). Short memory?

> Finding evidence for your own claims would not make you a middleman.

There wasn't a request for evidence, there was a request for a citation. Those are very different things. A citation might provide some kind of pointer to help find evidence, which is what I suspect you mean, but, again, if that's what you seek then you're back to wanting to talk to someone else. If you want to talk to someone else, just go talk to them. There is no reason for me to serve as the middleman.

> it's an important part of making claims.

Nonsense. If my claim does not hold merit on its own, it doesn't merit further discovery. It's just not valuable at all. It can be left at that, or, if still enjoyable, can be talked about to the extent that remains enjoyable.

Perhaps you are under the mistaken impression that we are writing an academic research paper here? I can assure you that is not the case.

Re: Go is my hammer, and everything is a nail

#697

Earlier quoted context omitted.

As someone with +20 years in finance (hedge funds/trading) and knows .Net, Java, Python, C++, shell, etc, the first question I'd ask is: where's the data? If I'm being asked to do data analysis, it's because we need the answer yesterday. So, the tool I choose always going to be a matter of which gets me the answer fastest and with the least amount of friction. That's almost always dictated by where the data is _now_.…

It's in this email attachment right here. Now what?

To me that sounds like a csv file and it'll likely be a python script from me.

Re: Go is my hammer, and everything is a nail

#698

Earlier quoted context omitted.

> there is nothing to prove. Never was. What was the point of your question, if not to prove something? If you were trying to imply that the implementation doesn't exist, that implication was fatally flawed. If you were asking to waste time, then it worked. If you had another motive, what was it? Are we having a 5d chess game? I thought it was a normal conversation. > He who wrote the "citation". Nobody? Nobody wrote…

> What was the point of your question, if not to prove something? My enjoyment. For what other reason would you spend your free time doing something? > If you were trying to imply that the implementation doesn't exist, that implication was fatally flawed. And if I weren't trying? > If you were asking to waste time, then it worked. I ask nothing, but if you feel wasted your time, why? Why would you do such a thing? >…

Okay so confirmed you're going meta to dodge any actual points being made, and grind any possible progress of the conversation to a halt. Bye!

Re: Go is my hammer, and everything is a nail

#699

Earlier quoted context omitted.

While terrifying, it is not uncommon to see python notebooks make it to production.

Oh god why. I thought (and hoped) that GP didn't actually mean this. I see how a team or an organization can eventually get to this point. It just saddens me that they got there.

why not, many data related tasks are rather ad-hoc, it's a waste of time to make a long lasting software out of every ad-hoc request

Re: Go is my hammer, and everything is a nail

#700

Earlier quoted context omitted.

> What was the point of your question, if not to prove something? My enjoyment. For what other reason would you spend your free time doing something? > If you were trying to imply that the implementation doesn't exist, that implication was fatally flawed. And if I weren't trying? > If you were asking to waste time, then it worked. I ask nothing, but if you feel wasted your time, why? Why would you do such a thing? >…

Okay so confirmed you're going meta to dodge any actual points being made, and grind any possible progress of the conversation to a halt. Bye!

Confused by academic paper writing confirmed. What lead you down that path?
Post reply on HN