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
Luigi Thirty
Apr 30, 2006

Emergency confection port.

https://blog.joda.org/2018/09/do-not-fall-into-oracles-java-11-trap.html lol

quote:

Oracle JDK, the one all web searches take you to, is now commercial not $free.

The key part of the terms is as follows:

You may not: use the Programs for any data processing or any commercial, production, or internal business purposes other than developing, testing, prototyping, and demonstrating your Application;

Adbot
ADBOT LOVES YOU

elite_garbage_man
Apr 3, 2010
I THINK THAT "PRIMA DONNA" IS "PRE-MADONNA". I MAY BE ILLITERATE.
Hopefully this will be the Perma Death of Java

one less language to worry about

Next up on the kill list: OpenJDK

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
its against the terms to even run oracle's runtime in any sort of container or namespacing mechanism. it's possible that even using selinux with oracle's jvm is violating that.

java is good though. oracle is not.

VikingofRock
Aug 24, 2008




Are there reverse zip bombs? Like where a reasonably-sized input has a gigantic zipped form. I know that by the pigeonhole principle there are inputs with zipped forms that are larger than the original input, but my guess would be that there is an upper limit on this potential growth.

Arcsech
Aug 5, 2008

CRIP EATIN BREAD posted:

java is good though. oracle is not.

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

VikingofRock posted:

Are there reverse zip bombs? Like where a reasonably-sized input has a gigantic zipped form. I know that by the pigeonhole principle there are inputs with zipped forms that are larger than the original input, but my guess would be that there is an upper limit on this potential growth.

I think the answer is "no, not unless the particular compression algorithm is extremely bad"-- decent pseudorandom inputs will probably all compress about the same

which is to say that lossless compression in the worst case has to fall back to a data stream that takes up "basically the input file, plus inline framing/metadata to specify that we basically couldn't compress it" bytes, which, assuming the compression algo isn't poo poo, takes up 1+delta (for some kinda delta closer to 0 than to 1) times the original file size

e: in a degenerate case, lz77 has an "expansion ratio" of 1 / 1100% but who fuckin' cares about single byte files

quote:

for the default settings used by deflateInit(), compress(), and compress2(), the only expansion is an overhead of five bytes per 16 KB block (about 0.03%), plus a one-time overhead of six bytes for the entire stream. Even if the last or only block is smaller than 16 KB, the overhead is still five bytes. In the absolute worst case of a single-byte input stream, the overhead therefore amounts to 1100% (eleven bytes of overhead, one byte of actual data). For larger stream sizes, the overhead approaches the limiting value of 0.03%.

prisoner of waffles fucked around with this message at 16:49 on Sep 26, 2018

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)


looks like it’s j9’s time to shine!!!

mystes
May 31, 2006

It's actually apparently sort of supposed to be because they merged Oracle JDK into OpenJDK and Oracle JDK is now just a version of OpenJDK, so anyone who doesn't want a commercial version is just supposed to be using OpenJDK or something.

However, the confusion around this is definitely going to kill Java, which is unfortunate. I guess it's just part of Java's continual effort to shoot itself in the foot so everyone uses crappy languages like go instead.

gonadic io
Feb 16, 2011

>>=

carry on then posted:

looks like it’s scala native’s time to shine!!!

Zlodo
Nov 25, 2006

prisoner of waffles posted:

I think the answer is "no, not unless the particular compression algorithm is extremely bad"-- decent pseudorandom inputs will probably all compress about the same

how about writing an algorithm that creates a valid stream that the decompressor will understand but which purposely wastes space

for instance when creating a huffman tree you could inverse the probabilities so that it assigns the longest codes to the most common symbols

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

Zlodo posted:

creating a huffman tree you could inverse the probabilities so that it assigns the longest codes to the most common symbols

the cute thing about what you're proposing is that it would do okay on random noise and do badly on complex compressible data

Star War Sex Parrot
Oct 2, 2003

CRIP EATIN BREAD posted:

its against the terms to even run oracle's runtime in any sort of container or namespacing mechanism. it's possible that even using selinux with oracle's jvm is violating that.
it's also against oracle's database terms of service to publish benchmarks

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

mystes posted:

However, the confusion around this is definitely going to kill Java, which is unfortunate. I guess it's just part of Java's continual effort to shoot itself in the foot so everyone uses crappy languages like go instead.

it's going to kill java for people who post questions on stack overflow asking how to concatenate two strings. the java ecosystem itself will be fine.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
also the best compression algorithm: http://www.dangermouse.net/esoteric/lenpeg.html

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'


lol

moonshine is......
Feb 21, 2007

http://www.dangermouse.net/esoteric/petrovich.html

found the official yospos os.

gonadic io
Feb 16, 2011

>>=

reward

Arcsech
Aug 5, 2008

CRIP EATIN BREAD posted:

it's going to kill java for people who post questions on stack overflow asking how to concatenate two strings. the java ecosystem itself will be fine.

yep

oracle will have a few new lawsuit targets, some idiots will get made examples of, people will freak out

and then all the adults using java who pay people money to understand software licenses will just keep on doing what they're doing today

mystes
May 31, 2006

Nah, java will just become another cancer like the AGPL that no companies will touch.

AggressivelyStupid
Jan 9, 2012

extern has been slathered all over functions in this pile of poo poo c program and I'm like 99% sure functions are implicitly extern in header files

there are some instances of variables being EXTERN, with EXTERN being conditionally defined to either nullstring or extern, depending on if __foo__ is defined

this feels gross, could someone recommend some good reading for all this? my gut tells me we're doing poo poo very wrong but I don't have any concrete reasons why

E: I've done some googling but keep getting c++ stuff which while interesting doesn't really apply

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

mystes posted:

Nah, java will just become another cancer like the AGPL that no companies will touch.

Except for all those companies that have no problem going all-in on lovely oracle db. They'll have middle managers writing java licensing checks faster than you can say "yospos bithc"

mystes
May 31, 2006

Big corporations may license java for now, and milking them is probably the goal, but it's going to turn into a thing like React before the license change where everyone is trying to switch away from it as fast as possible regardless of whether that's actually a massive overreaction.

Arcsech
Aug 5, 2008

mystes posted:

Big corporations may license java for now, and milking them is probably the goal, but it's going to turn into a thing like React before the license change where everyone is trying to switch away from it as fast as possible regardless of whether that's actually a massive overreaction.

ah yes, my company will jump at the chance to rewrite our 1.9 million lines of java into rust, not a problem. totally something to do on a whim

e: also port 2 or 3 giant libraries we depend on into some other language, because there basically aren't meaningful alternatives in any other language

e2: plus god knows how many lines of scala in another big project i forgot exists

Arcsech fucked around with this message at 23:32 on Sep 26, 2018

CPColin
Sep 9, 2003

Big ol' smile.
I wonder if Experts Exchange has upgraded from Java 8 yet. Probably not, since I'm the guy who pushed them to upgrade to Javas 5, 6, 7, and 8 and they laid me off two Januaries ago.

But speaking of EE and rewriting stuff to get away from Java, EE is currently built off of a home-built CMS that's just absolutely terrible to work with and mixes concerns so thoroughly it's practially impossible to make any progress on fixing. The employee who "designed" this CMS, eight or nine years ago or so, declared it a functional prototype and proceeded to immediately suggest we rewrite the entire codebase in PHP. I can't even imagine how much of a mess that would have been.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

AggressivelyStupid posted:

extern has been slathered all over functions in this pile of poo poo c program and I'm like 99% sure functions are implicitly extern in header files

you’re almost correct, function prototypes are always implicitly extern in C

when dealing with libraries, it can be important to ensure C++ name mangling isn’t applied to symbols derived from C declarations, that’s why instead of extern you’ll often see something like MYLIB_EXTERN used, where it’s defined like

code:
#if defined(__cplusplus)
#define MYLIB_EXTERN extern "C"
#else
#define MYLIB_EXTERN extern
#endif
and then used for both function and global variable declarations

this can also be a good place to put things like compiler specific directives to mark a symbol as exported (when building a library) or potentially NULL (when consuming a library at runtime) so it’s good practice in general

AggressivelyStupid
Jan 9, 2012

theyre actually doing a lot of:


code:
foo.c

#define __FOO_C__

...

#define __BAR__
#include "bar.h"

..

code:
bar.h

#undef EXTERN
#ifdef __BAR__
#define EXTERN extern
#else
#define EXTERN
#endif
...

EXTERN long piss(char* poo poo);
again this is pure C, i think C99 or maybe ANSI C

i actually can't get the goddamn thing to build due to linker errors, straight out of source control, which is a cool and good feeling. there's approximately 200 .c and .h files in the folder, and only 90~ of them inside the codewarrior project.

i dunno if embedded is normally this level of Hell or what but I kinda hope not

Nomnom Cookie
Aug 30, 2009



mystes posted:

Big corporations may license java for now, and milking them is probably the goal, but it's going to turn into a thing like React before the license change where everyone is trying to switch away from it as fast as possible regardless of whether that's actually a massive overreaction.

everyone will switch to openjdk except for companies that are also ok with paying for things like oracle db

if openjdk goes to poo poo for whatever reason then idk google will fork it or something

JawnV6
Jul 4, 2004

So hot ...

AggressivelyStupid posted:

i dunno if embedded is normally this level of Hell or what but I kinda hope not
i mean, sorta

#ifdef guards to prevent multiple-inclusion (if that's actually what's happening) is better done with #pragma once

screwing around with extern is another smell of "this was broken once, now i have this dead chicken to wave over every new declaration"

sorry i have the memory of a goldfish, what's your goal here? just re-building something, trying to modify it, trying to do a new product with the old code base?

AggressivelyStupid
Jan 9, 2012

JawnV6 posted:

#ifdef guards to prevent multiple-inclusion (if that's actually what's happening) is better done with #pragma once

screwing around with extern is another smell of "this was broken once, now i have this dead chicken to wave over every new declaration"

i think this is exactly what is happening

JawnV6 posted:

sorry i have the memory of a goldfish, what's your goal here? just re-building something, trying to modify it, trying to do a new product with the old code base?

fixing some bugs and just getting the drat thing to compile in the first place

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
"#pragma once" used to be a bit problematic on GCC so people avoided it for a while iirc

fake edit: from https://gcc.gnu.org/gcc-3.4/changes.html

quote:

File handling in the preprocessor has been rewritten. GCC no longer gets confused by symlinks and hardlinks, and now has a correct implementation of #import and #pragma once. These two directives have therefore been un-deprecated.

JawnV6
Jul 4, 2004

So hot ...
woof, that's rough

AggressivelyStupid posted:

there's approximately 200 .c and .h files in the folder, and only 90~ of them inside the codewarrior project.
i'd start with the assumption that those 90 are a complete set and try to ram it thru the IDE. see if the other ~110 share some property (appear autogenerated, appear like main.c.BAK.final or other crude not-version control, etc.) to at least explain their existence

another approach would be to find main() and add files one at a time to fix whatever build issue it complains about first. on adding each file, take the time to scrub the EXTERN dances away at a bare minimum

ugh, i really don't envy your position. there's some happy-path through the files where everything's declared once, but the prior authors don't really care if you can find it again

AggressivelyStupid
Jan 9, 2012

I was able to clear up the undefined linker errors by adding a few files to the project

ended up with a multi defined error instead just before I left for the day!! Looking forward to untangling that tomorrow

The annoying thing is that it's basically untouched since 2014 and these people don't have source control discipline so the compiled binaries that are in the PLM (god drat it) may well have been the result of changes that exist only on some dickhead who left last years computer

I think this somehow makes me, the intern, the leading expert on this product lmfao

AggressivelyStupid fucked around with this message at 02:59 on Sep 27, 2018

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
sounds like your internship is teaching you a lot

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

lol all the scala idiots in my org are gonna get so much louder now

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
maybe everyone will switch to Swift

after all, IBM’s doing lots of stuff with Swift on Linux

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

eschaton posted:

maybe everyone will switch to Swift

after all, IBM’s doing lots of stuff with Swift on Linux

3 people have asked me to implement Hadoop in swift now. people must hate me

Luigi Thirty
Apr 30, 2006

Emergency confection port.

call me when swift runs on the Motorola 68000

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Luigi Thirty posted:

call me when swift runs on the Motorola 68000

be the change you want to see in the world: write the compiler

Zlodo
Nov 25, 2006

Luigi Thirty posted:

call me when swift runs on the Motorola 68000

well it could be an interesting project I guess

https://github.com/M680x0/M680x0-llvm
https://github.com/apple/swift

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill

jit bull transpile posted:

lol all the scala idiots in my org are gonna get so much louder now

do they not understand that this affects scala in exactly the same way as it affects java

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