4,687 karma · joined Dec 4, 2021 (4y ago) · 1,693 submissions
comment 2y ago · link · parent
Whether it is formally called a standard or no doesn't change the fact that this is the document everyone points at when determining what CSV is and is supposed to look like. So it is de-facto a standard. Call it a "quasi standard" if that makes you happy.
comment 2y ago · link · parent
Nevertheless, even in projects where my services are talking to something that's bigger, I will, at the very least ask "why cant it be RFC compliant? is there a reason?". And without blowing my own horn overly much, but quite a few systems larger than mine have changed because someone asked that question.
comment 2y ago · link · parent
How? The only thing I can see happening is perpetuation of sloppy use of standards. "Why, why should I change my |-deliminated CSV dialect that requires a double-semicolon at the end of each row, which is arbitrarily denoted by either \n or \r or \n\r when all those programmers will accomodate me, no matter how little sense it makes to do so?
> I do think there’s a point where things are standardized enough that you can safely stop doing that
I agree. And that point was when someone sat down, and penned RFC-4180
Everything after that point, has to justify why it isn't RFC compliant, not the other way around.
comment 2y ago · link · parent
Yes, CSV is much, much older. In fact it predates personal computers. And it went through changes. Again: None of that matters. We have a standard, we should use the standard, and systems should demand the standard.
Standards are meant to ensure minimal-friction interoperability. If systems don't enforce standards, then there is no point in having a standard in the first place.
comment 2y ago · link · parent
And yes, I am aware that the standard says this. My counter question to that is: How much client-liberty do I have to accept? Where do I draw the line? How much is too much liberty?
And the answer is: there is no answer. Wherever any system draws that line, it's an arbitrary decision; Except for one, which ensures the least surprise and maximum interoperability (aka. the point of a standard): to be "conservative", and simply demand the standard.
comment 2y ago · link · parent
Fun fact: I did. And not just for accounting systems, but all sorts of data ingestion pipelines. Did it work every time? No. Did it work in many cases? Yes. Is that better? Absolutely.
Here is the thing: If I accept broken CSV, where do I stop? What's next? Next thing my webservice backends have to accept broken HTTP? My JSON-RPC backends have to accept JSON with /*/ style block comments? My ODBC load-balancer has to accept natural language instead of SQL statements (I mean, its the age of the LLM, I could make that possible).
comment 2y ago · link · parent
Denmark is a member state since 1973, when it was still called the European Economic Community
https://en.wikipedia.org/wiki/Denmark#Constitutional_monarch...
Denmark, together with Greenland but not the Faroe Islands, became a member of what is now the European Union, but negotiated certain opt-outs, such as retaining its own currency, the krone.
And Iceland is part of the European Economic Area (EEA)
https://en.wikipedia.org/wiki/Iceland
Iceland joined the European Economic Area in 1994, after which the economy was greatly diversified and liberalised.
And no, this list showcases mostly countries that are in fact EU members: https://en.wikipedia.org/wiki/Member_state_of_the_European_U...
comment 2y ago · link · parent
These countries are doing great because they are part of the EU. If anyone disagrees, well, it's not like we lack experimental data:
https://www.london.gov.uk/new-report-reveals-uk-economy-almo....
https://www.gisreportsonline.com/r/brexit/
https://www.politico.eu/article/political-gridlock-northern-...
comment 2y ago · link · parent
Not really.
What's bad is when people keep insisting on coming up with new and amazing CSV dialects.
https://www.ietf.org/rfc/rfc4180.txt is very clear about what CSV files are supposed to look like, and the fact that people keep ignoring this for whatever reason, is not the formats problem.
And no, "using another format" is not a solution to this. Because: I can just invent a new DSV dialect. Or a JSON dialect. Or a dialect where the field separator is "0xFF00FF00" and the row separator is the string `DECAFCOFFEE` encoded in EBCDIC, all other characters have to be UTF-32, except for a, b and f, which also need to be EBCDIC encoded.
> For starters, it’s rather unreadable when opened in a text editor. But I bet you don’t really do that with your CSVs all that often anyway!
Wrong. I do that with csv files all the time. In fact I even have an amazing vim plugin just for them [0]. That's pretty much the point of having a plaintext tabular data storage format: That I can view and edit it using standard text wrangling utilities.
---
There is a much simpler solution to this problem: Don't accept broken CSV. If people keep ignoring standards, thats their problem.
comment 2y ago · link · parent
Countries with the highest average standard of living: Check.
Countris consistently socring among, or as, highest in citizen happiness indices: Check.
Stable Economy: Check.
Successfully implemented measures to combat a global pandemic: Check.
Slowly but surely fading out dependency on russian fossile fuels: Check.
Best privacy protection laws in the world: Check.
Shall I go on?
comment 2y ago · link · parent
No, they don't. Pointers and references are fundamentally different concepts. A reference is a name, handled by the runtime, that is bound to an entity. A pointer is just a value of type `uintptr`.
When I "copy" a reference, I simply instruct the runtime to bind another name to the entity.
When I copy a struct containing a pointer, I actually allocate new memory to contain a new copy of that `uintptr`. And since that copy is a true copy of a pointer-value, I can change it.
That's why this:
func main() {
s1 := []int{1, 2}
s2 := s1
s2 = append(s2, 3)
s1[0] = 42
fmt.Println(s1)
fmt.Println(s2)
}
Will give you [42 2]
[1 2 3]
as an output. s2 is not a "Reference" to the same entity as s1, it is a struct holding a pointer, and when we grow the slice this struct represents beyond the capacity of the backing array that pointer points to, by appending to it, we replace that pointer in s2.Comparing that to a language that actually does have reference semantics (python):
s1 = [1, 2]
s2 = s1
s2.append(3)
s1[0] = 42
print(s1)
print(s2)
Gives me [42, 2, 3]
[42, 2, 3]comment 2y ago · link · parent
s2 := s1
This copies the struct in `s1` into a new name `s2`. This struct contains, among other things, a pointer to the backing array. Therefore, when you assign to the slice s2[0] = "bye"
You assign to the same backing array. Slices are not arrays. Copying a slice copies a struct containing a pointer to an array. A similar situation holds true for maps. The same logic that is universal throughout the language, aka. "Go only ever copies things by value" holds true for all of these types.https://go.dev/ref/spec#Slice_types
"A slice, once initialized, is always associated with an underlying array that holds its elements. A slice therefore shares storage with its array and with other slices of the same array; by contrast, distinct arrays always represent distinct storage."
comment 2y ago · link · parent
No, you cannot. To use your above example, I very much doubt that anyone has a workable plan to prove the existence of biblical angels that they could formulate in enough reason and technical detail to begin construction on a multi-billion-dollar project.
People did, and do, have such plans for figuring out the reactions of elementary particles.
There is a difference between "science" and "anything".
> Why this basic science?
Because elementary particle physics pretty much explain how the basic building blocks of the universe, and the forces governing them, work, and thus provide the most essential framework to understand the natural world next to mathematics?
I'd say that's pretty important, and if we spend less than 30bn on that over a 10 year period, I'd call that a bargain, certainly compared to all the other crap society wastes money on.
As long as we have the dough to give trillions in handouts to billionaires so they can buy more yachts, private jets and islands, I'd say we can spare tuppence for the science that furthers our species understanding of the universe.
comment 2y ago · link · parent
Correct, because it takes about 2 seconds to google it. [Here you go](0)
[0]: https://cerncourier.com/a/a-decade-in-lhc-publications/
comment 2y ago · link · parent
thing := Thing{...}
other_thing := thing
pinter_to_same_thing := &thing
ALL types in go are being copied by value. There is no such thing as a "reference" in this language. Even a slice or map is just a small struct with some syntactic sugar provided by the language, and when you assign a slice to another variable, you are, in fact, creating a copy of that struct.comment 2y ago · link · parent
The LHC cost around 4.75 bn (initial estimate) to construct. Let's be generous and add quite some buffer, to a solid 6bn.
The project has been in operation since 2010. Lets assume operational cost of 1bn a year, that brings up the total tally to 20bn. Let's add 10% just to be safe, so 22bn.
The US military expenditure is THIRTY-EIGHT-POINT-SIX (38.6) times that number. PER YEAR! Remind me again, what "substantive gains" were had, by pumping 850bn dollars into one countries military per year? Bear in mind that, despite all that, (the US essentially LOST the last larger war they were involved in)[0].
US military being a touchy subject? No problem, how about agriculture? The EU agricultural subsidies (CAP) pump over 60bn into farming each year. As for the results of all that money being spent, (weeell... )[1]
What about fossil fuels? Worldwide subsidies in these were (just shy of 130bn dollars )[2] (again, that's PER YEAR), and these things are destroying our habitat as we speak.
So please, explain to me how paying less than 25bn, over a 10 year period, to gain the ability to figure out how reality works, is a "massive expenditures", compared to other things society throws money at left right and center.
[0]: https://time.com/6090758/why-america-lost-afghanistan/
[1]: https://www.businessinsider.com/european-union-farm-subsidie...
[2]: https://en.wikipedia.org/wiki/Fossil_fuel_subsidies#Subsidie...
comment 2y ago · link · parent
Because real programming languages are free.
That's it. That's the main reason. Sure, there are hobby projects, yes, but almost every visual "programming language" in use in the industry, is a proprietary product, being licensed or sold. It's a way to make money, and a pretty smart one to be honest: Once people invest time, resources, training, and build actual stuff in my proprietary system, they either invest a lot more money to get rid of it, or keep using it. And inertia in businesses being what it is, they usually chose the latter. What better vendor lock-in than a programming language?
---
IMHO, no, we don't need "visual programming". I have worked with several such systems in professional settings. There is one thing they all have in common: They suck. No exceptions. It doesn't matter what level they abstract at. They are all sold on the simplest of use cases, and to be fair: They can manage them very well. And some even look pretty and are a pleasure to work with.
At the start, that is.
Then the honeymoon is over, and you hit the first snag. The first thing the devs of it didn't anticipate, or anticipated but implemented badly. And you build around that. And then the next thing happens. And the next. And the next.
And very soon, you keep running for the escape-hatch constantly, like calling into library code, or making HTTP requests to some server to do things that would have been a breeze in a real programming language. Congratulations, we are right back to "non-visual-programming", only now our real code is tangled up in this mess, having to waste precious clock cycles pandering to the ideosyncracies of a less capable system, for no better reason that to not get rid of said system. And god help you if you have more than one of these things and they have to talk to each other. Now you can write glue-code between two pseudo-programming systems! FUN!
And, of course, these things are usually not accessible to any established tooling: There either is no version control at all or some vendors pet project idea of what a cool (read: bad) git alternative should look like. There usually is no way to unit- or integration-test anything. The only "IDE" that can deal with them, is the one the vendor provides. Also, `grep`, what's that? Never heard of it.
To be fair, there are some legitimate use cases, for example a limited flow-engine within a larger system that never has to leave that systems confines. But quite often, even these systems would be easier to setup and administer, if the devs had just put in a LUA interpreter and called it a day.
---
So, coming back to the question
"But why do people keep coming back to visual programming?"
allow me to ask an alternative question: Why do people stick with textual programming, despite decades spent on trying to make visual programming happen?
comment 2y ago · link · parent
That can be done with a simple awk/fzf script, which would even allow me to interactively chose the hosts from the ones configured in the ssh config.
> How about managing both hosts and users so that I can easily log into a system as different users for different purposes?
The ssh config already allows doing that:
Host prod-as-foo
HostName domain.of.prod.server
User foo
Identity File ~./ssh/foo.key
Host prod-as-bar
HostName domain.of.prod.server
User bar
Identity File ~./ssh/bar.key
> How about adding some security features to make key management more secure than the standard "everything in the .ssh directory" strategy?IdentityFile keys can be setup to be symmetrically encrypted, requiring a password on use.
The keyfiles can also be loaded via `ssh-agent(1)`, allowing to directly use non-local keyfiles (source: `man ssh`)
> Maybe add some SCP/SFTP features so that moving files from host to host is easier.
Both `scp` and `sftp` already use the ssh config file.