Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
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.

Adbot
ADBOT LOVES YOU

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
"The Aristocrats", but the punchline is "Oracle!" instead

QuarkJets
Sep 8, 2008

Hammerite posted:

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.

We need an Oracle smilie like :xcom:

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
We probably couldn't afford an Oracle emote though

spaced ninja
Apr 10, 2009


Toilet Rascal
They will need to send out 4-5 engineers to plan out and deploy the emote.

Arsenic Lupin
Apr 12, 2012

This particularly rapid💨 unintelligible 😖patter💁 isn't generally heard🧏‍♂️, and if it is🤔, it doesn't matter💁.


To say nothing of the consultants who will customize it for our dead gay comedy platform.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
How many cores do the CPUs that will be displaying the emote have?

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

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.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
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.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
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)

Moonwolf
Jun 29, 2004

Flee from th' terrifyin' evil of "NHS"!


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.

Claeaus
Mar 29, 2010

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.

Also as a language it’s kind of meh tbh. I’ve looked at it a few times and not seen any real reason to move away from pure java, which is a lot less bad than it used to be - a lot of kotlin features are nice and I might consider it for a greenfield project I guess, but there’s no absolute killer feature and I don’t think all of the changes are improvements.

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.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
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.

Xarn
Jun 26, 2015
Trigraphs are great :allears:

https://twitter.com/horenmar_ctu/status/1217028265833115648

Tei
Feb 19, 2011
Probation
Can't post for 4 days!

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

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


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;.

Xerophyte
Mar 17, 2008

This space intentionally left blank

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

but if a trigrah can trigger from inside a comment I want to kill myself

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.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



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.

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.

Have you considered lobbying your government to apply for statehood instead?

Xerophyte
Mar 17, 2008

This space intentionally left blank

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!

Soricidus
Oct 21, 2010
freedom-hating statist shill

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

Xarn
Jun 26, 2015
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.

[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.

static_assert(not are_trigraphs_available(), "stop using lovely IBM compilers, thx") :v:


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

but if a trigrah can trigger from inside a comment I want to kill myself

Of course it can, trigraphs are (were) lexer-level modification, so they are translated even before comments are handled.

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

Soricidus posted:

Cool, now explain how all the other programming languages manage without them

Lisp has managed to do without them for 62 years.

Jazerus
May 24, 2011


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.

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.

i think it would be surprising to most american programmers that `/~ is not a standard key on other layouts

Eugene V. Dubstep
Oct 4, 2013
Probation
Can't post for 8 years!
Those characters are readily accessible on a UK ISO layout keyboard as well, FWIW.

nielsm
Jun 1, 2009



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++.

Arsenic Lupin
Apr 12, 2012

This particularly rapid💨 unintelligible 😖patter💁 isn't generally heard🧏‍♂️, and if it is🤔, it doesn't matter💁.


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.

[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.

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.

more falafel please
Feb 26, 2005

forums poster

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?

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


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.

Falcorum
Oct 21, 2010

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. :v:

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

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.

more falafel please
Feb 26, 2005

forums poster

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. :v:

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

Athas
Aug 6, 2007

fuck that joker

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 \.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

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.

[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.

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

Dirty Frank
Jul 8, 2004

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.

Soricidus
Oct 21, 2010
freedom-hating statist shill

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.

Xarn
Jun 26, 2015
Yes, yes, writing code for IBM platforms in 2020 is stupid, we have already established that.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

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.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

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.

:stonklol:

Athas
Aug 6, 2007

fuck that joker
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!

Adbot
ADBOT LOVES YOU

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Is there anyone under 40 who knows EBCDIC is?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply