ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. kcomhnall my assumption would be a video about the addition of lambdas
  2. cheeser nullability
  3. Para video description mentions valhalla
  4. dreamreal Yeah, youtube title extraction is a PAIN
  5. dreamreal I don't even know WHY. I mean, I know WHY they make it a pain from their end, but dang
  6. Para Youtube's API and account management in general is superbly stupid.
  7. Para It's like 14 steps even when you know what you want to do.
  8. dreamreal Yeah, I don't think the bots want to use their API if that can be avoided: twitter's the same way
  9. dreamreal twitter's API is the only reliable way to get tweets programmatically, and it's $0.005/request, although they have aids for *repeated* requests
  10. dreamreal I decided nevet'll get twitter support when it gets a sponsor who asks for it :D
  11. dreamreal I am still working on youtube, though
  12. dreamreal nitter still works but it does human verification; the other twitter things route to twitter itself now
  13. sbalmos the only thing more screwy than Youtube's API and account management is AWS IAM and its API authentication
  14. Para AWS IAM is good until policies.
  15. Para Like...I understand and agree why they're there, but its still bad.
  16. NeXeN oh the nullability thing is huge but i mean it's survived thus far
  17. cheeser i'm sad about nullable still being the default but i don't really see a way they can fix that without breaking almost every single line of code ever written.
  18. NeXeN there is always a way. use the force. if it doesn't work then make it work harder
  19. jreicher NeXeN: What's "the nullability thing"? The only JEPs I can find about this are still in draft.
  20. Para NeXeN: If force doesn't work, you're not using enough.
  21. Chronos "Just don't make mistakes"
  22. dmlloyd the draft JEPs are generally a reflection of whatever the current state of experimentation is... but they don't always update the JEPs quickly especially if lots of things are being experimented with
  23. dmlloyd there are some JDK trees that you can check out and mess around with if you're brave
  24. cheeser building openjdk is not exactly trivial or pleasant, though.
  25. jreicher Oh I'm just interested in knowing what the current thinking is. Is there a sincere effort to add nullability to the type system? Or do people just chat about it over cocktails?
  26. NeXeN it's about whether or not something can be set to null. some ways you can get a promise or other ways to keep from ever getting a null
  27. cheeser jreicher: it's a significant effort. it's been on brian's back burner for some time.
  28. cheeser but i think he considers it low hanging fruit compared to, say, value types.
  29. cheeser um. is that what I meant to say? i got distracted midsentence. it's low *priority* compared to ...
  30. NeXeN it can eliminate a performance concern
  31. NeXeN null checks are expensive, if one could eliminate null then it would be simpler to design things that don't null pointer error at runtime
  32. cheeser yep. and now that he's thinking "carrier classes" to remove the disconnect between regular classes and records, i'd imagine he's feeling similarly about the gap between value types and regular classes
  33. Para IIRC most null checks gets eliminated by JIT anyway.
  34. Para I've never found the attractiveness of this particular topic. Maybe im dum.
  35. cheeser i don't know that that's true... dmlloyd might know better. but that seems like a dangerous check to elide
  36. dmlloyd if the JIT can prove that a value coming in is always null, it'll drop the check
  37. dmlloyd that kind of thing can be invalidated by deoptimization
  38. cheeser i'd imagine that's vanishingly rare, though.
  39. NeXeN i do love value classes, and it's a good model for a personal project of mine
  40. dmlloyd not at all, every instance method call or field access has a null check on it
  41. dmlloyd so you definitely want to eliminate as many as possible
  42. cheeser the field would have to be final, no?
  43. NeXeN well it's like a promise can return a value or not you gotta wait or decide to do something else, and null is really that situation in a nutshell
  44. dmlloyd no, the field value isn't null checked, the instance is
  45. dmlloyd `foo.bar(); foo.baz()` <- foo is provably null if `foo.baz()` is reached
  46. NeXeN null just happens in the data a lot
  47. dmlloyd I mean if `foo` is itself a field then yeah it would be rechecked unless it was stable and final
  48. dmlloyd but if it's like a local var then the second one doesn't get null checked
  49. dmlloyd (if `foo` is a stable final field then its value is cached in a register so there's only one load)
  50. dmlloyd even `this.foo()` has an implicit null check that has to get eliminated by *something* that knows `this` is never `null`
  51. jreicher Yeah elimination of runtime checks is one of the reasons I like type systems. I think Alexis King's "parse, don't validate" essay makes the same point. And the runtime checks include both those done by the language and those the programmer had to write.
  52. NeXeN you get some extra decorators, like ! to be able to specify something, i forget i read the jep and docs
  53. NeXeN oh yeah it flattens the array as well, making it very performant
  54. NeXeN https://openjdk.org/jeps/8303099
  55. javabot NeXeN's title: "JEP draft: Null-Restricted and Nullable Types (Preview)"
  56. nevet NeXeN mentioned url: https://openjdk.org/jeps/8303099 ("JEP draft: Null-Restricted and Nullable Types (Preview)")
  57. NeXeN i am guilty of doing many sanity checks on incoming data