|
Oracle's SQL Plus command-line app will format NUMBER column values like 0.1 as ".1". Also Oracle: if you try to import CSV files containing column values formatted like that, it imports them as zeroes. So if you used SQL Plus to create CSV files, then import to another database from those CSV files using Oracle's own tools, you get different data in the new database. Great job Oracle, thanks, good work. I love to have my time wasted.
|
# ? Sep 23, 2020 20:53 |
|
|
# ? Jun 6, 2024 05:02 |
|
"The Aristocrats", but the punchline is "Oracle!" instead
|
# ? Sep 23, 2020 20:59 |
|
Hammerite posted:Oracle's SQL Plus command-line app will format NUMBER column values like 0.1 as ".1". We need an Oracle smilie like
|
# ? Sep 23, 2020 21:20 |
|
We probably couldn't afford an Oracle emote though
|
# ? Sep 23, 2020 21:28 |
|
They will need to send out 4-5 engineers to plan out and deploy the emote.
|
# ? Sep 23, 2020 21:32 |
|
To say nothing of the consultants who will customize it for our dead gay comedy platform.
|
# ? Sep 23, 2020 22:32 |
|
How many cores do the CPUs that will be displaying the emote have?
|
# ? Sep 23, 2020 22:49 |
|
Hammerite posted:So if you used SQL Plus SQL Plus is incredibly idiosyncratic. On many platforms the loving backspace key doesn't work out of the box in SQL Plus without googling for some bullshit - I remember being in a database class with a bunch of info systems majors trying to use SQL plus without a working backspace and their solution was to just get really good at not making typos. You're almost always better off doing what you're doing with SQL Developer.
|
# ? Sep 23, 2020 22:58 |
|
It turns out to be weirder than I thought. It does accept the syntax, it's just that it rounds the value. It's rounding 0.1 to 0 because the column is declared as NUMBER(22). If it was NUMBER(22,1) it would be ok. So it's my fault, right? Well, yes and no. I looked at the internal tool we use for managing databases to determine what the column data type should be, and it said it was NUMBER(22). I uncritically copied that, not appreciating the significance of the lack of a second parameter. If you ask SQL Plus to DESC the table, it tells you that the column is NUMBER(4,1). Why does the internal tool claim it's NUMBER(22) when it isn't? I, uh, don't know. I have the source (it's our own utility). It's iterating over results returned by Oracle.ManagedDataAccess.Client.OracleConnection.GetSchema(). I'm debugging through it right now, and it's claiming to the app that the column is NUMBER(22). In summary, I don't know who made this thing lie to me, but I hate them and I hate Oracle.
|
# ? Sep 23, 2020 23:07 |
|
I figured it out. It's our app's fault it is lying to me. I blamed Oracle and it wasn't even Oracle's fault! In my defense, leaping to the conclusion that "it's Oracle being obtuse" is usually a pretty good bet. (and besides, it ought to have warned me that it was not actually inserting the data I told it to)
|
# ? Sep 23, 2020 23:31 |
|
Also if you're importing data in and out of Oracle in 10i and more recent, and if you're on 9i or early just run, you're on software where the binaries are old enough to vote by now, and the table is the same just use Data Pump import/export, it's vastly faster than csv data dumping and imports. SQL*Plus is a nightmare, not least because it's all KSH based because they're psychopaths, use SQL Developer or apparently SQLCL which is the new command line tool they've done with innovations from the intervening decades like easy history and moving within your text.
|
# ? Sep 24, 2020 00:09 |
|
Soricidus posted:The pedant in me is compelled to note that that’s not technically what transpiling is. Kotlin compiles to JVM bytecode or transpiles to JS source code. We have basically switched from Java to Kotlin since about 6 months at my work and now everytime I need to edit a Java class in our system it just feels so primitive. Java has gotten a lot better than before as you say and have a lot of the features Kotlin has but in Kotlin it feels like those features are implemented how those features should be implemented, not how they have to be implemented due to legacy.
|
# ? Sep 24, 2020 21:18 |
|
I guess that's true for now, but Kotlin's ultimate undoing will probably be that it's trying to abstract across three different ecosystems (JVM, JS and Native) while it's controlling none of them. Syntax for native memory allocations is already pretty awkward for instance, and it's probably going to get worse. Java otoh can just tweak the JVM to best fit what Java the language needs.
|
# ? Sep 24, 2020 22:27 |
|
Trigraphs are great https://twitter.com/horenmar_ctu/status/1217028265833115648
|
# ? Sep 25, 2020 08:17 |
|
Xarn posted:Trigraphs are great the existence of trigraphs makes sense because not every nation have the same language and it would be ridiculous that some random country can't write in c++ because don't have the basic keys on the keyboard but if a trigrah can trigger from inside a comment I want to kill myself
|
# ? Sep 25, 2020 16:42 |
|
I looked up the explanation for that one. If trigraphs are enabled, ??/ evaluates to \, which makes the first line a multiline comment, and all the compiler sees is return true;.
|
# ? Sep 25, 2020 16:47 |
|
Tei posted:the existence of trigraphs makes sense because not every nation have the same language and it would be ridiculous that some random country can't write in c++ because don't have the basic keys on the keyboard You can line splice comments (and other things) with \ equally well so you kind of have to be able to do it with the equivalent trigraph. [E:] Also, while I applaud that trigraph test and think it's the opposite of a horror, I'm not entirely sure when it's useful. As a foreigner it's mildly annoying when programming languages use very US-centric tokens. My personal favorite is $ which is really just asking to make your language hard to type anywhere else, but ~ and ` deserve special mention. Yes, I do have a US layout installed and I use it to code with; I even have a physical US keyboard on my work machine. It's still mildly annoying. Considerably less annoying than trigraphs, but annoying.
|
# ? Sep 25, 2020 17:07 |
|
Xerophyte posted:As a foreigner it's mildly annoying when programming languages use very US-centric tokens. My personal favorite is $ which is really just asking to make your language hard to type anywhere else, but ~ and ` deserve special mention. Have you considered lobbying your government to apply for statehood instead?
|
# ? Sep 25, 2020 17:12 |
|
Munkeymon posted:Have you considered lobbying your government to apply for statehood instead? While that would make Puerto Rico jealous, I'd rather lobby congress to join the EU. We have a vacancy now!
|
# ? Sep 25, 2020 17:39 |
|
Tei posted:the existence of trigraphs makes sense because not every nation have the same language and it would be ridiculous that some random country can't write in c++ because don't have the basic keys on the keyboard Cool, now explain how all the other programming languages manage without them I thought it was less to do with other languages, anyway, and more about ibm still wanting to use ebcdic for source code as we enter the second decade of the 21st century
|
# ? Sep 25, 2020 18:19 |
|
Trigraphs actually aren't part of C++ anymore. As you might expect, IBM strongly objected, but was told to pound sand and provide them as a vendor extension.Xerophyte posted:You can line splice comments (and other things) with \ equally well so you kind of have to be able to do it with the equivalent trigraph. static_assert(not are_trigraphs_available(), "stop using lovely IBM compilers, thx") Tei posted:the existence of trigraphs makes sense because not every nation have the same language and it would be ridiculous that some random country can't write in c++ because don't have the basic keys on the keyboard Of course it can, trigraphs are (were) lexer-level modification, so they are translated even before comments are handled.
|
# ? Sep 25, 2020 20:03 |
|
Soricidus posted:Cool, now explain how all the other programming languages manage without them Lisp has managed to do without them for 62 years.
|
# ? Sep 25, 2020 21:19 |
Xerophyte posted:As a foreigner it's mildly annoying when programming languages use very US-centric tokens. My personal favorite is $ which is really just asking to make your language hard to type anywhere else, but ~ and ` deserve special mention. i think it would be surprising to most american programmers that `/~ is not a standard key on other layouts
|
|
# ? Sep 25, 2020 22:19 |
|
Those characters are readily accessible on a UK ISO layout keyboard as well, FWIW.
|
# ? Sep 25, 2020 22:27 |
Trigraphs aren't for compatibility with keyboard layouts, they are for compatibility with non-ASCII-derived codepages. Like some EBCDIC variants don't contain all the characters required to write C so the trigraphs are required there. That's the specific reason IBM objected to trigraphs being removed from C++.
|
|
# ? Sep 25, 2020 22:38 |
|
Xerophyte posted:You can line splice comments (and other things) with \ equally well so you kind of have to be able to do it with the equivalent trigraph. When I worked for Rogue Wave (blast from the past), we used to say that our *real* IP was our knowledge of every single compiler bug everywhere. We had scripts that ran before compiling our class libraries on the local system; they asked asked "does indirecting through 0 return 0?" and such like. It wasn't based on "Are you the IBM compiler?", it was based on "Do you have this bug that we first identified in an IBM compiler?" The idea was that it was an acceptance test, and every new compiler bug might turn out to apply on other compilers, or not. If you were writing something like that, that had to make sure your source code passed multiple compilers, a trigraph test would be useful.
|
# ? Sep 25, 2020 23:01 |
|
What I don't understand is the intersection between the code that's still written using EBCDIC and the code that *needs* to be built on modern C++ compilers. I get not wanting to gently caress with 50 year old code, but why do you need to build that with a modern compiler that you can't just add a switch to?
|
# ? Sep 25, 2020 23:30 |
|
If you want to use multiple compilers to build a project, you need to make sure that they're ABI-compatible. That's exactly as much fun as you think it is, so it's generally best to just the latest compiler for everything.
|
# ? Sep 25, 2020 23:34 |
|
more falafel please posted:What I don't understand is the intersection between the code that's still written using EBCDIC and the code that *needs* to be built on modern C++ compilers. I get not wanting to gently caress with 50 year old code, but why do you need to build that with a modern compiler that you can't just add a switch to? And then you have the people arguing that the C++ ABI should always be stable and unbroken so they can keep using the same binary blob from 20 years ago, because the vendor has gone out of business and management doesn't want any time to be spent in finding a newer version of a small dependency for their multi million software.
|
# ? Sep 26, 2020 02:50 |
|
If you have old code that contains trigraphs, isn't removing them as easy as literally running a find/replace? Trigraphs were converted so early in the compilation process, I doubt they had weird escaping rules or anything like that.
|
# ? Sep 26, 2020 08:18 |
|
Falcorum posted:And then you have the people arguing that the C++ ABI should always be stable and unbroken so they can keep using the same binary blob from 20 years ago, because the vendor has gone out of business and management doesn't want any time to be spent in finding a newer version of a small dependency for their multi million software. I'm guilty of this too, but I port video games for a living, so finding binaries of a version of Scaleform from 2009, but built for "an undisclosed platform, but it needs to be built for x64 Linux against libc++ and using clang >=x.y.z or gcc >=a.b.c" is literally hell, because you can't just replace scaleform without hiring a new UI team and adding 6 months to the project oh and they don't have a source license for scaleform, which was sold to autodesk in 2014 or something and they no longer support it. I mean if you happen to find a source archive of that version, maybe you can tweak their cmake? It'll be illegal, but hey, who knows
|
# ? Sep 26, 2020 08:22 |
|
NihilCredo posted:If you have old code that contains trigraphs, isn't removing them as easy as literally running a find/replace? Trigraphs were converted so early in the compilation process, I doubt they had weird escaping rules or anything like that. This is only possible if you are using a character set that has all the characters you need. Some EBCDIC variants lack # and \.
|
# ? Sep 26, 2020 12:29 |
|
Xerophyte posted:You can line splice comments (and other things) with \ equally well so you kind of have to be able to do it with the equivalent trigraph. Is $ not found on many international keyboard layouts? That's a surprise to me. I mean the UK keyboard layout has both $ (shift-4) and £ (shift-3). I wouldn't be surprised at all if £ is rarely found on international layouts, but considering the pre-eminent international status of the US at the time computer keyboard layouts were being developed* it'd seem odd to me if it wasn't included in most layouts. * yes I know typewriters existed long before computers
|
# ? Sep 26, 2020 13:02 |
|
Looking qt q french keyboqrd (azerty), $£ qre on the sqme key, just next to enter, shift to get £, qnd the € symbol is right alt-E q and a qre swapped compared to a querty keyboard and I am totally fine with that.
|
# ? Sep 26, 2020 14:16 |
|
Athas posted:This is only possible if you are using a character set that has all the characters you need. Some EBCDIC variants lack # and \. Yes, we’ve established that it will be necessary to stop using a legacy encoding that should have been retired before most posters here were even born. If you’re writing C++ code in 2020 that requires the latest language features, but for some reason you can’t convert the legacy portions to utf-8 before feeding them into your modern compiler, then you’ve already hosed up so horribly that it would be cruel to continue to enable your self-harm.
|
# ? Sep 26, 2020 15:04 |
|
Yes, yes, writing code for IBM platforms in 2020 is stupid, we have already established that.
|
# ? Sep 26, 2020 15:33 |
|
I will never forget the IBM suit elemental who wrote with a straight face "We do realize the industry is moving towards an increasingly ASCII world, but" in 2013.
|
# ? Sep 26, 2020 16:18 |
|
NihilCredo posted:I will never forget the IBM suit elemental who wrote with a straight face "We do realize the industry is moving towards an increasingly ASCII world, but" in 2013.
|
# ? Sep 26, 2020 22:06 |
|
Is there anyone still defending EBCDIC on anything remotely resembling technical grounds? Even IBM only used it out of necessity, as ASCII (of which IBM was a proponent) was not ready in time for System/360. The closest I can find is someone who observes that when using punch cards, EBCDIC only requires two holes per column for uppercase characters, which can increase the reliability when using card readers. Now that's rugged engineering I can understand!
|
# ? Sep 26, 2020 23:33 |
|
|
# ? Jun 6, 2024 05:02 |
|
Is there anyone under 40 who knows EBCDIC is?
|
# ? Sep 26, 2020 23:39 |