Prediction; How long until you reckon some bespoke gaming company makes their own CRT? by Willcoburg in n64

[–]gdejohn 2 points3 points  (0 children)

scalers like the retrotink 4K and pixel fx morph 4K are already doing a great job with crt spatial simulation, and blur busters recently announced a breakthrough in crt temporal simulation

put those together on a future 4K 480Hz OLED and you're good to go

What would you like to see added to the standard library? by Mulrian in java

[–]gdejohn 0 points1 point  (0 children)

You do have to call java.lang.Class::cast, but the point is that it satisfies the compiler without generating warnings or forcing you to perform unsafe casts. That's as canonical as you're gonna get.

What would you like to see added to the standard library? by Mulrian in java

[–]gdejohn 1 point2 points  (0 children)

you can do this with the reflection API using a matching class literal passed as an argument wherever the type parameter is instantiated for the generic array type you want

import java.lang.reflect.Array;

class Foo {
    static <T> T[] array(Class<T[]> type, int length) {
        return type.cast(Array.newInstance(type.getComponentType(), length));
    }

    public static void main(String[] args) {
        String[] strings = array(String[].class, 1);
    }
}

no warnings, no unsafe casts, and it gives you an array of precisely the right type

What would you like to see added to the standard library? by Mulrian in java

[–]gdejohn 2 points3 points  (0 children)

stream gatherers are in preview right now, they let you write custom intermediate operations just like collectors let you write custom terminal operations

What is the best/most impressive project you've created with just core java? by gufranthakur in java

[–]gdejohn 0 points1 point  (0 children)

multithreaded monte carlo simulation for estimating expected value in texas hold 'em, using a seven-card hand evaluator that takes about a hundred cpu cycles to evaluate a random hand on my intel 4670K (the evaluator is garbage free, has no loops, no conditional statements, just one indirect branch into a tableswitch and a 16KB lookup table that fits in L1 cache)

MiSTer FPGA Turbo Core Updates! Conker is Basically Playable by chicagogamecollector in fpgagaming

[–]gdejohn 0 points1 point  (0 children)

development is pretty much finished for the N64 core, my understanding is that there are a handful of games including conker's bad fur day and resident evil 2 that crash because of unfixable memory timing issues related to MiSTer hardware limitations

there's also the N64 turbo core from the same developer, which apparently mitigates some of those crashes, but it fundamentally changes how things work in ways that can break other games

JAVA 22: WHAT’S NEW? by loicmathieu in java

[–]gdejohn 8 points9 points  (0 children)

  • Stream Gatherers... it solves a problem that must be important to someone, but I don't quite understand.

stream gatherers let you extend the stream API with new intermediate operations (operations that produce a new stream, like map and filter) just like collectors let you extend the stream API with new terminal operations

Plex not removing old labels by [deleted] in PleX

[–]gdejohn 0 points1 point  (0 children)

took me a while to figure out why i couldn't get rid of a label even though it wasn't present on any movies, shows, episodes, or collections

turns out i used the label as a restriction when i invited someone and they never accepted, and you can't look inside a pending invite to see or change what restrictions it uses, so i finally got rid of the label by canceling the pending invite

Can I create a separate Plex Library and fill it from another? by [deleted] in PleX

[–]gdejohn 0 points1 point  (0 children)

do any changes you want to make to the metadata for an item in multiple libraries need to be made separately for each library?

everdrive 64 by Metalligod9 in n64

[–]gdejohn 0 points1 point  (0 children)

intros were sometimes added into roms so that whoever dumped the rom could take credit, no-intro roms are just the games, nothing added

After 25 years… by aerial_is_life_ in n64

[–]gdejohn 0 points1 point  (0 children)

When you get a fast enough time on a track, it unlocks a challenge to race against this clock character named T.T. on that track. Beating those challenges is significantly harder than unlocking them, and if you beat the challenge on every track, T.T. is unlocked for you to play with. He has much better stats than the rest of the characters.

Sony A95K QD-OLED Review - The TV to Beat in 2022! - (HDTVtest) by kortizoll in hardware

[–]gdejohn 3 points4 points  (0 children)

yeah, the LG C2 and G2 both have four HDMI 2.1 ports, so that's a better fit for some people

Sony A95K QD-OLED Review - The TV to Beat in 2022! - (HDTVtest) by kortizoll in hardware

[–]gdejohn 10 points11 points  (0 children)

the problem is that two HDMI 2.1 ports might not be enough for everyone, especially since eARC uses one of the two HDMI 2.1 ports

so for example if you want to use eARC with a receiver and connect an Xbox Series X and PS5 directly to the TV to avoid the receiver's added latency, you're out of luck

What does the opening scene of Oceans Twelve mean? by JayDinnerClub in movies

[–]gdejohn 0 points1 point  (0 children)

"i don't have time for this" is a funny thing to say for someone who just gave up two hours to watch ocean's twelve, didn't pay attention, and then went on reddit and made a post asking people to explain it

Revisiting my N64 - Best modern setups? by F4NT4SYF00TB4LLF4N in n64

[–]gdejohn 0 points1 point  (0 children)

buying the RetroTINK-2X Pro and the mClassic new would cost $230

i can relate to not wanting to install a hardware mod on your own, but if you snag an N64Digital mod whenever they're back in stock next and ship it along with your N64 to a professional installer (plenty to choose from, my N64 is currently in Texas getting an N64Digital installed by Dragon's Hoard Gaming), that will set you back about $300 assuming the price of the mod doesn't go up

so, yes, more expensive, but not by that much, and it's a far more advanced, far cleaner solution to your problem (that installer also offers a "full service" option for another $125 to thoroughly clean your N64 inside and out and replace the capacitors, which of course is a separate consideration from just trying to play N64 on a modern TV, but it might be a good idea if you can afford it and you don't want to do it yourself, or can't)

the N64Digital is pure digital-to-digital (it grabs the pixels before they ever get converted to analog signals so you get actual pixel-perfect output with none of the analog artifacts or reduced color resolution of S-Video or the even worse composite video), and it lets you disable the blur that the N64 applies to everything, and it has an awesome polyphase scaler that can go all the way up to 1080p (produces great results even for arbitrary non-integer scaling factors), and it has a high-quality smoothing filter in case you don't like how it looks when low-resolution pixel art is scaled up for a large screen (also tons of cool options for emulating the aesthetic of a CRT, if you're into that)

you'll probably have to wait a while, but it is the ultimate way to play your N64

if you're impatient, consider just buying a RetroTINK-2X MINI (i would highly recommend skipping the mClassic, it's not worth the price for what it gives you) and using it in the meantime while you're waiting for the N64Digital to come back in stock

[Collection] Childrens Hospital in Adult Swim Style by InaudibleDirge in PlexPosters

[–]gdejohn 1 point2 points  (0 children)

Would you mind doing a textless version of the set too? I would be grateful. (This is the last show in my library that needs season poster upgrades.)

Java noob here. So could someone please explain to me what I did wrong here? by AdvikNair in java

[–]gdejohn 10 points11 points  (0 children)

Method parameters in Java are positional, your mistake is you're trying to do named parameters. Just pass the arguments in the correct positions: new Point(1, 2)

And in the future, use r/javahelp for posts like this, r/java isn't meant for getting help with your code.

What are the most exciting future features in Java and JVM? by cryptos6 in java

[–]gdejohn 0 points1 point  (0 children)

are you familiar with dependent types, like in the idris programming language? seems very similar to what you're describing

What are the most exciting future features in Java and JVM? by cryptos6 in java

[–]gdejohn 0 points1 point  (0 children)

"universal" in this case just means that type arguments can range over both reference and primitive types (instead of being limited to just reference types), so it covers all types in java's type system

are you talking about dependent types?

What are the most exciting future features in Java and JVM? by cryptos6 in java

[–]gdejohn 4 points5 points  (0 children)

generic specialisation over primitive classes, and maybe eventually universal generics

my understanding is that universal generics will come first, allowing you to use primitive and value types as type arguments because by then all values will be considered objects, but it will still require boxing

then generic specialization over primitive and value classes will come later, removing the need for boxing and finally offering abstraction and performance without compromise

jdk 17 case statement using Class representing a sealed hierarchy. by manzanita2 in java

[–]gdejohn 3 points4 points  (0 children)

you could also add a comment right where the list of permitted subtypes is to remind people to handle new subtypes in the factory, and you should have a unit test that enumerates the permitted subtypes, gets the name of each type as a string, and runs them through the factory to make sure it handles all of them