« first day (3905 days earlier)      last day (938 days later) » 
00:00 - 22:0022:00 - 00:00

10:00 PM
@RedwolfPrograms M. Licinius Crassus impostor est -Graffiti found at Pompeii, probably
 
reminds me i have a class that made us use java beans event listener based model-view-controller architecture with models that are literally stateful wrappers around pure functions
 
I have no idea what any of that means lol
 
i don't either
 
lol
 
that whole thing just felt like a fever dream
 
10:01 PM
Why add stateful wrappers around pure functions?
 
also we had to use a shit ton of... settable singleton factories
i feel like that defeats the point of a lot of things
like that's literally just a thunked global variable
the thunking wasn't even mandatory just encouraged
...is it a proper thunk if you have a hand implemented lazy initialization actually
probably not
 
If you want it lazyish, I think you can do something like:
 
what we did was initialize a field to null then set it to what we actually want if you try accessing it while it's null
but then there's also a static method that lets you set it to something else which we actively used
the funny thing is this is a class about programming language concepts, where presumably we're looking at all this wacky java design pattern stuff to understand what motivates it, and the lectures are pretty good at exploring the motivations but the assignments... aren't
also i think the class is expected to not know that java has lambdas and method references because there's one place it seemed like we were supposed to use an enum or something to factor common logic out around processing data with two different methods and the assignment just said "you'll see a more elegant way to do this when we get to sml and lisp" like this literal 500 level class full of senior undergrads and actual graduate students has never heard of first-order functions before
 
class Singleton {
  private static class Holder { static Singleton INSTANCE = new Singleton(); }
  public Singleton getInstance() { return Holder.INSTANCE; }
}
 
O_o
 
10:12 PM
@UnrelatedString :o
 
i think i've seen that version before but i think it was when i was looking up singletons on wikipedia lol
 
@DLosc That was supposed to be a reply to my previous messages. If you don't care about laziness, then an enum should do:
enum Singleton {
  INSTANCE;
  //other stuff
}
 
@user I must be reading it wrong, but it looks like a Singleton contains a Holder which contains a Singleton which contains a Holder which...
 
i think we were just doing conceptual singletons as a shitty excuse to use factories when the problem as presented can't motivate factories
@DLosc the holder is static
er
 
@DLosc Singleton objects don't contain Holder objects, the static means that only one singleton instance is made, and Singleton doesn't have a Holder field at all
There is no instance of Holder ever created
 
10:14 PM
actually i don't know what the fuck a static class does but the singleton is a static field of the holder
(which yeah is ofc never instantiated)
 
I gotta say, I like Scala's object a lot better
 
A static nested class is the exact same as a non-static nested class for our purposes, it's just that it can be used in static methods
 
(Assuming that accomplishes basically the same thing)
 
@DLosc Me too, although I like how Kotlin puts the companion object stuff inside the class itself
@DLosc Well, Scala creates an extra class for that companion object too, and that object is an actual object, unlike a static class that you can't really pass around. You can take that as an advantage or a disadvantage
@user *public static Singleton getInstance, not public Singleton
 
Python can do singleton types, but you have to mess around with __new__ and it just feels hacky (assuming there isn't a better way to do it yet)
 
10:17 PM
It does have enums, right?
 
My school tried to save money by using some really weird contrast settings when printing our student IDs
 
@UnrelatedString oh yeah there was also some constraint on when we can initialize a scanner for reading stdin to cooperate with the unit tests but we actually weren't encouraged to use a singleton-enforcing factory for that, despite that being something that actually does motivate a singleton-enforcing factory
 
I kinda like how JS has really straightforward object literals
 
@RedwolfPrograms It's not good
 
@user Python? Not that I know of.
 
10:18 PM
Not built-in, but there's an enum class or smth
 
@RedwolfPrograms Unfortunately I can't show y'all a picture, because that'd be a really efficient way to leak personal info :p
 
like
he literally told us that we have to initialize it after some other thing
and that we have to not initialize multiple scanners
but then gave some example code that uses a static variable in a method or something
like why
 
A static Scanner? They need to build a tenth circle of hell for him
 
@user TIL
I wonder if it's worthwhile to use that in any of my code
 
no
dictionaries are just as good
 
10:22 PM
@rak1507 it's just a completely orthogonal use case
a dictionary is for if you need to get values from names
an enum is for if you need names that just so happen to have values
 
Dictionaries, objects, enums, arrays, numbers, dogs, cats, all the same thing
 
@rak1507 I prefer thesauruses, I can instantly make cause myself I personally sound flawless more also smart agile
4
 
We should be more like JS
 
@UnrelatedString d['name'] vs enum.name
 
Like for example in Pip, operators have an associativity, which right now is one of the three strings "L", "R", and "C". That seems like a classic use case for an enum. I'm just not sure it's worth the effort to switch.
 
10:26 PM
it at least feels cleaner to pretend you're using c or haskell style enum types regardless of whatever python jank is actually happening
 
I would say it is, because enum names can be resolved by a linter, whereas strings can be mistyped
Also ^^
 
But if you're using a dynamically typed language, you're a masochist anyway, so feel free to screw yourself over and use dicts instead
(/s)
 
@user Huh, TIL :P
 
10:28 PM
i hate how no matter how much i'm continually growing to dislike python it's still the language i default to using
 
Well, it's really nice for small stuff
 
that is true
(usually)
 
Switch to PHP, I hear it's fantastic.
 
If someone told me to write a quick thingy to parse HTML, I'm not going to bother cracking out Java or even Scala
 
10:29 PM
s/ for small stuff//
 
Eh, for people like me who make lots of mistakes and are bad at testing, statically typed languages (with actually good type systems) are much easier when you have bigger projects
 
reminds me i really need to get on that making a language to do advent of code in project i kind of forgot it's already october
 
I feel the same way with JS, although I mostly grew to hate parts of it all at once and now it's just sort of been the same level of okayness for the last two or three years
 
Redwolf has Stockholm Syndrome
 
@user yeah, it's much easier to just pull out some regex.
 
10:30 PM
even if you're good at testing and don't make many mistakes it just feels good to statically know how little you've fucked up
 
@AaroneousMiller ikr. import re; re.match(... ftw
 
JS is bad, but once you know how it works it just...works. There's not too much jankiness, compared to languages like Python.
It's not great for the first few years, but once you're used to it you get pretty fast at working around its issues. That's true for any language I guess, but JS's are just a bit less of an obstacle I think.
 
But 0.00000001% jankiness is better than 0.001% jankiness. Even something to transpile from a statically typed lang like TS is nice
 
May 27 at 14:42, by Redwolf Programs
Python takes you on a date, talks to you for a while, and its issues slowly start to show up. JS shakes your hand, punches you in the face, and then is fairly normal from then on.
 
@RedwolfPrograms Taking a few years to get around jankiness does not make for an okay language imo
@AaroneousMiller That's somewhat accurate, except JS continues punching you after that from time to time, just when you least expect it
 
10:33 PM
Idk about that
 
@user I have really come to appreciate the way that a statically typed language like Scala lets the IDE tell you exactly what type any variable is and what member functions it has. I just can't get over how much darn setup there is before you can run a simple Hello World program! (And how long sbt takes to start up each time.)
 
reminds me i have never actually used typescript but on paper i like the idea a lot more than type-hinted python
 
@DLosc Oh yeah, that is annoying
 
like type-hinted python just feels wrong
 
@RedwolfPrograms My nose is bloody
Although you seem to have faired better
@UnrelatedString Cython looks weirder
 
10:35 PM
Tbf JS is my native language, so its jankiness is just sort of the default for me
 
@RedwolfPrograms See, I would've said JS is way jankier than Python.
 
Mmm, I wonder if Java's jankiness is just the default for me and I'm missing obvious flaws
 
Well, not as much subtle jankiness
@user You are you are you are you are
 
What am I missing?!
 
It's so baaaaaaaaaad
 
10:36 PM
Oh this is just the "JAVA bad" meme
 
type-hinted python is just a dynamically typed language larping as a statically-typed language, ultimately combining the problems with both for marginal benefit
 
@RedwolfPrograms Well, half of that might just be OOP
I'm really not a fan of OOP :p
 
java's approach to oop is crufty but honestly not a problem once you've written enough code that the boilerplate is proportionally small
 
@UnrelatedString The worst is when you have a type hint referring to the class you're defining it in, so you have to say class Foo: def bar(baz: "Foo") ... to avoid it crashing
@RedwolfPrograms I think OOP is a very nice and intuitive paradigm, although I don't like that Java forces you to put everything in a class
 
i do hate some stuff about java typing but it's honestly not a bad language
yeah
 
10:38 PM
Static methods and variables feel like odd workarounds to ^^^
@UnrelatedString I like how regular it is - it's a really easy language to teach beginners despite the static typing
 
@user Definitely. I don't know if it's a flaw or not, but any time y'all mention "factories" my eyes glaze over. I don't even know what that is, but every other language I've learned gets along fine without it, so to me it just sounds like jargon for the sake of jargon.
@user And that
 
i feel like java doesn't deserve its place as The Language To Teach People but it's still good for teaching
 
@DLosc ¯\_(ツ)_/¯ fwiw, I don't understand design patterns either, I assume it's the kind of thing you get used to after some professional experience, similar to Haskell programmers being unfazed by functors and gonads and stuff
@UnrelatedString Yes, it should be Scala.
 
i feel like design patterns probably make sense in context
true
 
10:41 PM
I agree, I just haven't used them much (well, not knowingly), and I get mildly uncomfortable around them
 
@UnrelatedString I agree. There's no reason to use type hints in a perfectly good dynamically typed language. :P
 
...i think that time i was looking singletons up it was because i was wondering if there's some particular reason they actually need to exist and i think i did actually find that there are arguments against them
 
Now, I will say that if Python had type-based function overloading like Julia does, that would be cool.
 
Groovy
has type-based method overloading at runtime, I mean. Multimethods or something, they're called
 
10:43 PM
Why am I speaking like half grammatically correct Yoda?
 
Mysterious, the Force is
 
I'm mostly not a fan of teaching Java to new programmers because, at least to me, it feels like it's a language that died long ago and is only still being used in corporations, like Fortran or COBOL. Plus, it's still a little low level compared to JS or Python, and I could see that getting in the way of learning.
 
@user It's "Vyxal Bad" but without making us Vyxalers sad
 
The things I ended up disliking about Julia were 1) it puts all those overloaded functions in the global namespace together, so it becomes nearly impossible to sort through the 138 different definitions of + to find the one you want, and 2) you can write code at the top scope but it's way less efficient or something? I don't remember the details.
 
@RedwolfPrograms I wouldn't call Java low level at all, and it certainly isn't dying, although there are more modern languages out there
Besides, programmers work for corporations, and there are probably more jobs for Java programmers than there are for Fortran or COBOL programmers
 
10:48 PM
@RedwolfPrograms Fun fact: Java is four years younger than Python
 
@DLosc i feel like with stuff like arithmetic operators especially there's something wrong if you're actually overloading them instead of making them work with some kind of interface or typeclass
 
What's wrong with (static) overloading?
 
@user Well sure, because Java's newer. But it seems like it's very clearly going down the same path. And sure, it's not low level compared to C, but having to deal with types and C/Java sort of arrays seems like something that would just get in the way of learning.
 
CMP: Best language to teach new programmers?
 
@UnrelatedString I'm not 100% sure what that means... example?
@user QBasic /ohj
 
10:50 PM
@RedwolfPrograms That's the fault of Java courses - real life Java (afaict) doesn't involve that kind of low level stuff
 
Types and arrays?
 
Arrays
 
Please don't say ArrayList (shudders)
 
I'm on a robotics team, and even when for the math-intensive methods, we rarely have to do anything "low-level"
 
@user But in all seriousness, probably Scratch (though I haven't tried it myself).
 
10:51 PM
@RedwolfPrograms Why not? They're perfectly good
 
hahahahahahahahahhahahahahahahahahhaha
hahahahahahahahahahahahahaha
 
@DLosc Ooh yeah I heard it had some new features
 
@DLosc like, you could have an Addable interface/typeclass for things you can add and actually no that would restrict the kinds of addition you can define so yeah overloading is fine lol
 
hahahahahahahahahahahahahahahahahahahahahahah
 
You've convinced me with those arguments, imma turn all my Java into JS now :P
@UnrelatedString Isn't that kinda overloading?
 
10:52 PM
Having to use .get/.set to access into all of your arrays is horrible
 
@DLosc definitely disagree
 
it's polymorphism without overloading
 
JS/python/basically anything are sufficiently beginner friendly
and not completely unrealistic + shit
 
@RedwolfPrograms So? You don't have to do it that often
Most of the time, you just iterate over it
 
Yeah you do...that's literally what you do with arrays
 
10:53 PM
Not really
 
Does Java seriously not have a way to customize that sort of thing?
 
A lot of our code that does use arrays/ArrayLists looks something like this:
 
yeah it sucks that java doesn't let you use square braces for containers that aren't arrays when you do not want to use arrays
 
If it lets you make 2+2==5 it should really let you do something as simple and useful as that
 
for (var subsystem : subsystems) {
  doTheThing(subsystem);
  asdfasf;
}
Operator overloading would be amazing, but the Java people thought it'd be abused ¯\_(ツ)_/¯
 
10:54 PM
and == is reference equality so you have to use a .equals() method which just leads to drowning in parentheses
that is true
 
I really wish I could use Kotlin or Scala for everything, but apparently Kotlin is considered a difficult language to teach so that idea got shot down :(
 
But when you're teaching someone a programming language, you can't do everything the easy, nice looking way at first
You have to .get and .set and do weird stuff all the time
 
True
 
@user I'll add that to my list of reasons not to like Java, then. Operator overloading is the best part of OOP.
 
10:55 PM
...i'd say i have no idea how kotlin could be difficult to teach but i actually haven't seen anything it has outside what i learned in the koans a month or two ago lol
 
@RedwolfPrograms How often do you need to index into arrays/ArrayLists and mutate them?
 
All...the...time
 
@UnrelatedString I assume the explicit null checking might be a problem for some, but the flow typing and type inference is glorious
 
At least in JS, I probably average a couple of array indexings per line
 
@RedwolfPrograms ???
You're serious?
 
10:56 PM
Yes
 
Oh wow
 
i do feel like you can mitigate the need for overloading if you just make it easy to have new operators
 
I guess web development just requires different stuff then?
 
and/or general infix function syntax
 
@UnrelatedString Does Kotlin do that? That's a cool feature I've often thought about, but not one that's in any language I know.
 
10:57 PM
I'd like to point out that Java has amazing IDE support in IntelliJ (I know JS does too, but static typing gives Java an edge here) so a lot of stuff is auto completed
@DLosc No, but Scala does :)
 
If you have to rely on your text editor to write and understand your code for you the language is bad
 
Kotlin does have operator overloading
@RedwolfPrograms Why?
 
@user =) Well I am looking forward to reading about that!
 
@user We might as well write directly in machine code...
 
This is 2021, you expect people to use ed now? :P
@RedwolfPrograms wut
 
10:58 PM
@user i feel like most people should be much happier with explicit null checking and nullable types than with getting the infamous java nullpointerexceptions out of nowhere when they probably don't even know what a pointer is
 
@user No, vim, of course :P
 
The whole point of programming languages is to represent code in a way that's human readable
 
@UnrelatedString Yes, but it's a hindrance to beginners. Rust's borrow checker is nice, but I keep fighting it
 
If you need an IDE to do that for you, the programming language has failed its #1 task
 
lol
i need to get around to learning rust
 
10:59 PM
@UnrelatedString I don't remember much C#, but I remember really liking the nullable types and the ?? operator
 
@RedwolfPrograms And Java is readable
 
maybe i'm just open to nullable types because i spent some time playing with haskell's Maybe
 
@user I'm going to stop arguing this because I've just realized how entirely subjective this is :p
 
A language isn't just its syntax, it's also the libraries, the IDE support, the community
@RedwolfPrograms So many things are subjective that it's just pointless to argue anything :(
 
@RedwolfPrograms [insert astronaut meme] Always has been
 
11:00 PM
@user Yeah, but I have a feeling if I'd started with Java and you'd started with JS, we'd be arguing for the oppposite positions :p
 
@UnrelatedString Oh yeah, I just looove foo.flatMap(_.fold("")(_.toString).find(asdf))
@RedwolfPrograms I started with JS :P
 
D:
Traitor
 
Uh oh X^D
 
Just a really crappy subset of JS in a crappy editor (Khan Academy)
Or maybe it was just an older version of JS
 
Oh, I need to go do some math homework that's a month late. See y'all o/
 
11:01 PM
i think i started with js on fucking w3schools lmao
 
I tried moving the JS from the editor into an HTML file and literally nothing worked because Khan Academy was just weird
 
@user It is true that JS has gotten way more usable over the past 10-15 years.
 
JS has improved massively in the last decade, keep that in mind
ninaj;d
 
Yeah, as has editor support
 
ninaj;d
 
11:02 PM
I still much prefer Scala or Kotlin, though
 
I was trying not to get my ninaj ninja'd
So I typed a little fast and...
 
;d
 
truew
i make so many speed typos i just found ninaj;d especially funny
likje one time i was typing lmao and it came out as lampo
 
it's been my nickname on a discord server ever since
 
11:04 PM
@UnrelatedString The little-known fifth Marx brother
@user Scala syntax >> Kotlin syntax, IMO
 
:P
Perhaps you mean Scala syntax >>>>>>>>>>>>>>>>>>>>>>>>> Kotlin syntax
 
I much prefer being able to define a function + (or maybe operator+) instead of a function with some name that doesn't contain the operator symbol that I then have to remember. That's one thing I dislike about Python's operator overloading.
 
^
 
wait do you not have to actually declare new operators
and fixity is just like implicitly derived from the symbols you use
thjat's neat
 
11:09 PM
@DLosc i can NEVER remember the name of python's dunder for indexing
i hate it
 
Even Scala does this, to some extent: the apply method just automatically overrides the "function application operator" (if you can call it that). I wish you had an annotation or something like @thisFunctionOverrides() or smth
 
is apply not from a callable interface or something
 
@UnrelatedString Uhhh.... X^D I want to say it's __get__ and then __set__ for when it's an LHS, but I'm not 100% confident
 
@DLosc otoh you can just look it up, since you probably don't need it too often
 
JS does operator overloading in a very peculiar way
Proxy
it's scary
 
11:10 PM
@DLosc i feel like the word item is in there... probably
 
Oh, right
 
@UnrelatedString Neat, but also horrifying.
 
@UnrelatedString Nope, so that you can define your own "polymorphic functions" in Scala 2 and stuff
 
@WheatWitch idk about horrifying, but it is annoying for DSLs and stuff. Does make parsing easier, though
@UnrelatedString ¯\_(ツ)_/¯ It's quite handy when you want to define a constructor-like method, I just don't like the way you "override" that "operator"
 
11:12 PM
One thing I dislike about operator overloading is the people who use it when it really shouldn't be used
 
Oh yeah
But you could say that of a ton of features that can also be handy
 
@user sometimes you want to just pass indexing as a function and it's hard to want to just write a lambda that uses the square brackets syntax when you know there's a method you can use directly and it'll only take five minutes to look it up
 
Unless you're making something that replaces or upgrades a built-in class that uses that operator, I don't think you should use overloaded operators
Unless it just really makes sense
 
@UnrelatedString Oh right, Python lambdas are kinda annoying, right?
 
Looking at you, cin/cout.
 
11:13 PM
i'm not sure how they compare to other lambdas but i don't love having to write out the word lambda
 
@RedwolfPrograms They can make life easier (although cin << and cout << are weird, they could've been methods/functions/whatever)
 
It just feels so unnatural and arbitrary
 
Wouldn't it be cool if every concept in every language had to be accompanied by the longest and most unintuitive mathematical name for it one could find? /s
 
Why not just input() and print()
 
i like how the c++ stream syntax encourages chaining but it still feels kinda superfluous
 
11:14 PM
Oh, that kinda makes sense
 
List a is just the free monoids generated by a.
Isn't that so much clearer!
 
i really need to learn actual category theory
 
@user So wait, how does the Scala parser know that some random identifier that I defined somewhere is now an operator?
 
It doesn't?
It determines the fixity solely based on the first character (and if the last character is :, it's right-associative). That makes life easier for the parser because it doesn't have to resolve other stuff first
 
i'm in a semantics class and i keep thinking about how a category-theoretical semantics might handle context and quantifiers and then i realize i don't know category theory
 
11:17 PM
(monoids aren't strictly a ct concept btw, they are originally from abstract algebra, but they fit neatly in with ct)
 
@UnrelatedString Just mumble something about "a monad of A is just a monoid in the category of endofunctors of A with product replaced by composition" and you'll be fine
 
@user it also makes it easier for a human to read an expression with user-defined operators if they can intuit the precedence and associativity without having to know what the operators do or reference their declarations
 
@user Maybe the page you linked isn't giving all the details, but it says "You can use any legal identifier as an operator," and then it gives an example where and is defined as a method of a class and immediately used as an infix operator...?
 
@UnrelatedString True
@DLosc The parser doesn't need you to define and at all, though, it'll still parse it correctly. The compilation error will just come later when it can't resolve and
 
So if I write an expression x y z, the parser will assume y is a binary operator?
 
11:21 PM
compare haskell operators where you can usually guess precedence within a class of related operators based on what's most useful but then you want to use >>= and <$> together and sit for a minute wondering how that works
 
@DLosc Yup. It treats that as equivalent to x.y(z)
 
Interesting. Does that just work for binary operators, then? Because if it also works for unary operators, then w x y z would be ambiguous
 
@UnrelatedString >>=<$>, easy. You got any harder ones? :P
 
@DLosc You can't define unary operators like that, they're special. They have the same problem you dislike about Python: you have to define methods called unary_!, unary_~, etc. You can't make any identifier a unary operator, which I think is a good thing
I kinda dislike unary operators in general, despite their usefulness
 
11:24 PM
yeah
 
Are y'all familiar with how Agda does operators?
 
It scares me
 
@user Proposal: replace all unary operators with a single binary operator that performs different operations on its right operand depending on the value of its left operand /s
 
You define them with slots, so you basically can just make new syntax.
 
11:25 PM
@user Well that's too bad
 
Syntax like if x then y else z is user definable in Agda.
The one issue is that this method requires separating tokens by spaces.
 
@DLosc However, since it has been previously established that you are masochist, you will have -language:postfixOps enabled, which means that w x y z will be parsed as w.x(y).z. But! If the next line has another a, it will be parsed as w.x(y).z(a). But! If there is another blank line or ; between w x y z and a, it will be parsed as w.x(y).z and then a, separately. I swear, Martin Odersky must've been drunk when he put that feature in
@WheatWitch That doesn't sound terrible, though
The fact that you have this much power is kinda scary. How is a human to remember so many fixities and stuff?
 
Yeah, it sucks a bit for code golf, but really it's quite reasonable.
 
@user I may be a masochist, but I'm a picky masochist. That doesn't sound like my type of fun. :P
@WheatWitch I don't know much about Rebol, but I think it has some capabilities along those lines (and also requires space-separation).
 
11:29 PM
@WheatWitch How exactly do you define if without if? Pattern matching?
 
Yeah pattern matching, case switching etc.
 
Interesting
 
Agda doesn't really have if in the way other programming languages do. It's just a part of the standard library.
 
nvm I'm not making any sense
 
@WheatWitch I love it when a language has a tiny core and can implement everything else as library functions. ^_^
I guess it's a bit like building up mathematics from a small set of axioms, isn't it?
 
11:32 PM
@WheatWitch btw, may I ask why?
 
I am not a fan of it's eager evaluation, I like type erasure, and I don't really like it's universe model.
 
Does Agda have type erasure?
 
oh yeah i forgot how much i love type erasure
 
Java's type erasure is different, isn't it? It doesn't do monomorphization or whatever so you can't have two methods with one taking a list of strings and another a list of Files
 
Java doesn't really have type erasure.
 
11:38 PM
Does Idris have a different definition of type erasure?
 
yeah i had no idea java even had something resembling it
i'm pretty sure java has all kinds of type at runtime
 
You can get type errors at run time in Java.
 
Oh, you mean like not having any type checking at runtime?
Yeah that sucks (getting ClassCastExceptions, I mean)
 
I've had an issue where Java would erase my type signatures, then infer the wrong type and have a type error.
 
Also the fact that arrays are covariant-ish in the type system but invariant at runtime so everything crashes and burns
 
11:40 PM
@WheatWitch what
 
@WheatWitch I think you mentioned this once before
 
2
Q: Can I give a generic function the correct type information?

Éamonn OliveI have a bunch of class properties that are initialized in a somewhat complicated but very uniform way. Since it is both error prone and a pain to maintain about 10 copies of this code I would like to abstract this. Here is what the code looks like for setting one property: if ( userConfigMapPat...

 
ninja'd
 
I believe that Agda can be type erased, I don't know if the most popular instance is.
But sort of oddly the possibility of being type erased is more important to me than the practice.
 
11:44 PM
@WheatWitch May I ask if there's some reflection magic going on behind the scenes?
Are you using some kind of compiler plugin?
Because if there's a cast to some type parameter in there, then that should just be erased, and you can't instantiate something with a type parameter either, so you'd need a Class object or something, right?
 
No compiler plugins.
 
If you're using Jackson, could this help (if you're still using that code)?
 
This is not like an intentional thing where I want to show off how to break Java. It was something I actually encountered at work.
I am (fortunately) no longer on a team using Java.
 
:)
It's so bizarre that UserConfig and other types aren't erased when you use them directly but are when you give them as type arguments
And this isn't even some obscure library, it's a popular one that should just work
 
00:00 - 22:0022:00 - 00:00

« first day (3905 days earlier)      last day (938 days later) »