Chat Logs

  1. Chronosyep. I worry... but I do have a *lot* on Google.
  2. dreamrealWell, the problem is the spreading of expertise
  3. dreamrealam I going to be as good as google at running an MTA
  4. dreamrealin 1998? ... sure, maybe. fetchmail, spamassassin, state of the art!
  5. dreamrealnow... uh...
  6. ChronosEven then, what if you lost your domain?
  7. ChronosGotta put your trust somewhere, I guess. Might as well at least make it convenient.
  8. dreamrealYeah. I'm not trying to convince you, I'm just trying to make a good decision here. From my perspective, coding both/either isn't rocket surgery.
  9. dreamrealThe OPT gets us out of handling a password, too, after all.
  10. dreamrealOTP. Sorry, driving all day, eyes blurry :/
  11. ChronosCould you... implement both? :)
  12. dreamrealtheoretically, yes? Hold on, let me see
  13. dreamrealI don't see why there's a smiley on that question, it makes sense to ask
  14. ChronosYou could then run a real world test to determine how popular each is.
  15. dreamrealwell, for nevet, they'r eboth pretty surface-oriented
  16. dreamrealI think supporting both is not that difficult
  17. dreamrealdid you see my safecracker idea?
  18. dreamrealit may feel familiar to your word solver concept, that's 100% incidental, zero relation WHATSOEVER I swear, 100% on my mother's life
  19. dreamreal(my mother is dead, this is 100% safe for me)
  20. dreamrealChronos: what I REALLY want, and don't tell anyone this, is for someone else to go "damn it why you taking so long, here's a PR" and have it work :D
  21. Chronosdreamreal: My distrust of "sign in using X" might be because I just don't understand it. Provided I trust X, can whatever I'm signing into see or access anything other than my email address?
  22. dreamrealChronos: https://github.com/jottinger/bytecode.news/issues/67#issuecomment-3956457149
  23. dreamrealI'm capturing ALL this stuff because I think it's important to work out, and I don't know it well enough myself
  24. bluedreamreal: https://github.com/jottinger/bytecode.news/issues/67#issuecomment-3958016170
  25. blueYou can tell kinabalu is REALLY getting on nerves. He just spent his last comment 1) conflating two disjunctive concepts and 2) reiterating my ORIGINAL post and presenting it as new knowledge / his own insight. What a PEST this guy is!
  26. blueThis guy thinks he's Timon or what?
  27. blueThe whole issue is about skirting external auth dependencies by offering a simple login mechanism that is secure and does not rely on users having accounts *anywhere*. Then this guy came along and artifically inflated the discussion, bikeshedding it to no end.
  28. blueThe reasonable thing to do is: say yes, we're implementing passwordless login in a reductive form that requires storing no IDing data besides email (which probably needs storing anyway), and if we ever wanna do Google Auth or whatever, that's a separate issue, and there we might consider if we wanna do it in-house or auth0 or whatever.
  29. blueBut no, now we gotta start discussing the semantics of oauth vs OIDC, which is clearly in-scope here. /s
  30. bluehttps://github.com/jottinger/bytecode.news/issues/67#issuecomment-3958155428
  31. bluedreamreal: https://openjdk.org/jeps/401 HA!
  32. nevetJEP 401: Value Classes and Objects (Preview)
  33. bluebiggest fail though: "The String class has not been made a value class. Instances of String are always identity objects."
  34. dreamrealjep 401
  35. nevetjep 401: Value Classes and Objects (Preview) (https://openjdk.org/jeps/401)
  36. dreamrealHow is that a "ha?" we kept pointing out that it was a thing
  37. bluedreamreal: my criticism is 100% supported by jep 401! that only bad move is NOT to extend it to strings which clearly fulfill the two criteria: immutable AND interchangeable!
  38. blue"Developers can declare their own value classes by applying the value modifier to any class whose instances should be immutable and interchangeable:"
  39. dreamrealAnd we agreed with you, and explained why it wasn't there yet
  40. bluenor you, neither the proposal, explain why it's not extended to strings!
  41. dreamrealand strings are not quite there, because while the INTERNED values do the top level strings make it difficult
  42. dreamrealAnd you're incorrect, because I did explain why it's difficult to extend to strings
  43. blueinterning is a SECONDARY consideration; the proposal says value classes are easier/more effective to store, but that's NOT the motivation
  44. * dreamreal sighs
  45. dreamrealmaking == fit the way you want it to is not, either
  46. blue"At run time, the JVM can optimize value objects by encoding them in more compact forms than identity objects. Instead of allocating space in the heap for a value object, the JVM can flatten and scalarize the object."
  47. blueemphasis on *can*
  48. blueit's secondary!
  49. dreamrealexactly my point, blue
  50. dreamrealI would LOVE it if you'd stop seeing an active opponent in every disagreement
  51. bluedid you see my comments on #67
  52. dreamrealDid you see my response to them?
  53. dreamreal(i.e., yes)
  54. blueno, because nevet hasn't told me there are any!
  55. dreamrealnevet doesn't track responses on issues, only issues
  56. blue*feelsbadman*
  57. blueanyway, lemma read then
  58. dreamrealWe are slowly starting to see light through the fog, though, and that's good
  59. blueI'm glading you're parsing mr timon here as "light through the fog"
  60. dreamrealNote: mr timon here is also one of my ride-or-die friends, so let's check the condescension. We're all trying to work to the same end. he's, uh, hardly alone in making sweeping statements about subject matter.
  61. dreamrealNot that anyone in THIS discussion ever does that.
  62. blueI mean, we circled back from my original issue to him restating that again, in different words
  63. dreamrealand note: when I say andrew's ride-or-die, I mean it. He's been there when I was up against a wall, and vice versa.
  64. blueI understand that. That doesn't mean he can't be wrong here
  65. dreamrealSure, but words matter. We're getting closer to what I wanted in the first place: understanding and consensus.
  66. dreamrealSo can you, please remember that. It doesn't matter if you're not wrong.
  67. bluesure
  68. dreamrealand so can I, which is why I'm trying to push things along carefully, because this is definitely not a subject area where I'm strong, or else I'd have caught OIDC vs Oauth already.
  69. dreamrealOIDC is actually what I was wanting, I think :/
  70. blueOIDC is not a common term in my experience
  71. dreamrealmine either, obviously
  72. dreamrealbut I'm a-learning!
  73. dreamrealthere's a bit of "gotcha" in the discourse that I do not think is constructive, but it's natural
  74. dreamrealwe'll work through it
  75. bluehence the timon comment; it's again a distinction without a merit. you can call sign-with-google oidc or oauth, depending on which side you want to emphasis, the technical or identity. I've always called it oauth because oidc sounds like an SEO term
  76. blues/emphasis/emphasise/
  77. dreamrealQuite possible, but let's stay above the belt in every way we can, if we can
  78. blueit's not like there's another way to do it besides oauth, with google. the distinction oauth vs saml matters. an oidc distinction is... not important
  79. dreamrealI get it, the whole discussion is annoying, to me, but it's enlightening
  80. bluewell, my personal feeling is that ever since this guy has entered the ring, it turned into bikeshedding, which I personally rather dislike
  81. bluewe're now discussing the minutae of oidc (a constructed term), oauth, and now also EU compliance
  82. blueall of this has no bearing on the issue at hand
  83. blueif you want to do "sign with" -- which you might, then I'd argue a separate issue should be created. this wasn't supposed to be "let's bikeshed auth"
  84. nevetif you want to do "sign with" now has karma of -1.
  85. dreamrealSure. I find discussions over whether object identity should apply to strings in java or not annoying as well, especially when it was a question brought up in the original language design and explained thoroughly as "no" - object identity is ==, object equality is equals() - but sure, let's beat that horse as long as we can, just not OIDC/OAuth/OTP
  86. bluebecause that's a REAL horse, until the oidc horse which is imaginary!
  87. blueunlike*
  88. dreamrealI mean, we're now at the point where the dual path is clear, and we just have to get the people who write the UIs that use to go "yes, yes, terms, whatever, dual path makes sense to me" or no
  89. blue*sigh*
  90. bluehe just keeps muddying the water, I'm gonna check out of that issue after my last comment
  91. dreamrealPlease don't, because you're likely to have to work with the output
  92. dreamrealand like I said, we're seeing light
  93. dreamrealpoetry the failure of gradle
  94. bluewelp, if you are annoyed by people not reading what you write, then surely *I* am as well!
  95. dreamrealI just have the grace to bitch about it less
  96. dreamrealpoem the failure of gradle
  97. neveta poem: Build failed, red text screams,/Dependencies tangled in knots,/Cache cleared again—hope.//Sync button worn thin,/Stack traces bloom endlessly,/Coffee grows colder.
  98. dreamreala poem: Build failed, red text screams,/Dependencies tangled in knots,/Cache cleared again—hope.//Sync button worn thin,/Stack traces bloom endlessly,/Coffee grows colder.
  99. nevetAnalysis: This is a pair of haikus following the traditional 5-7-5 syllabic structure. The poems use situational juxtaposition rather than strict rhyme, capturing the Zen-like frustration of software debugging through seasonal imagery and present-tense observations.
  100. dreamrealNot a great poem, nevet.
  101. bluepoem The impossible universe: The day Timon had an original thought
  102. neveta poem: Neurons sparked in patterns never traced,/synapses firing wild and uncharted paths—/the cosmos shuddered, paused, held its breath./Somewhere, a star blinked out in disbelief.
  103. a poem: Neurons sparked in patterns never traced,/synapses firing wild and uncharted paths—/the cosmos shuddered, paused, held its breath./Somewhere, a star blinked out in disbelief.
  104. nevetAnalysis: This free verse poem lacks a regular meter or rhyme scheme, relying instead on enjambment and varied line lengths to create rhythm. The four lines form a brief lyric meditation using cosmic imagery to metaphorically explore consciousness or thought. Its structure emphasizes spontaneity through unmetered, flowing syntax.
  105. dreamreala poem: screw you, gradle/ you're no longer able/ your strength is a fable/ built.. on... lies.
  106. dreamreala poem: screw you, gradle/ you're no longer able/ your strength is a fable/ built.. on... lies.
  107. nevetAnalysis: This poem uses loose iambic tetrameter with an AAAB rhyme scheme (gradle/able/fable, lies). It's a free verse quatrain that playfully subverts expectations by breaking rhythm in the final line, emphasizing frustration with the build tool Gradle through both form and content.
  108. dreamrealsentiment #nevet
  109. nevetSentiment for irc://libera/%23nevet: -3/10 | Intensity high | Themes: GitHub auth bikeshedding frustration, Java value classes debate, Gradle complaints | Summary: blue venting hard about contributor "Timon" derailing auth discussion; dreamreal mediating but also frustrated; tension simmering despite attempts at civility | Drivers: blue,dreamreal
  110. dreamrealInteresting.
  111. blueI'd say that's pretty accurate!
  112. blueaside from the Gradle complaints
  113. dreamrealIt's humor from #java
  114. dreamrealWas curious what the poem analysis would be
  115. blueI love everyone, everyone is amazing and the world is full of peace & harmony and everything is friends especially our dear nevet bot
  116. bluethis is such a nice day and the sun is shining, weather is 10/10
  117. blueoverall AMAZING!
  118. bluedreamreal: you're GREAT and AMAZING! and everyone else here TOO
  119. bluesentiment #nevet
  120. nevetError: Sentiment analysis requires ADMIN role
  121. dreamrealnevet can detect sarcasm, BTW
  122. dreamrealsentiment #nevet
  123. nevetSentiment for irc://libera/%23nevet: Sentiment +1/10 | Intensity mod | Themes: GitHub auth bikeshedding frustration, Java value classes debate, forced positivity | Summary: blue vented heavily about contributor "Timon" derailing auth discussion; dreamreal mediated tension while defending friend; blue ended with obvious sarcastic positivity after seeing bot's -3 assessment | Drivers: blue,dreamreal
  124. dreamrealbwahahahaha
  125. blueha! haxxored!
  126. bluewent up from -3 to 1!
  127. dreamrealright, but that does actually affect sentiment... and a +1 when the scale is -10 to 10 ain't much. Around the center it's easy to influence.
  128. bluedreamreal: that is true. you are very correct, as ALWAYS!
  129. blueI have never witnessed a correcter person. You are an asset and infinitely valuable to this channel: you bring light & positivity!
  130. blueI have a candidate for the understatement of the year: '"Timor" derailing auth discussion'
  131. bluethis sentiment feature is kinda cool. still broken scale imho, but, c'est la vie!
  132. bluedreamreal: what's your take on project valhalla?
  133. dreamrealIf they can make it work, and I think they can, it'll be great
  134. dreamrealit's been in the works since 2010 or so in various forms, maybe even earlier
  135. bluein which case, new Long(1) == new Long(1) will WORK!
  136. bluebut also a bunch of other interesting use cases for larger objects
  137. dreamrealbrian's a brilliant guy
  138. dreamrealHe talks in person like he's in compressed time
  139. dreamreallike, you want to say "dude, it's okay to breathe"
  140. dreamrealbrilliant guy though
  141. blueso: deep immutability (this is what this boils down to, although this is NOT the use case) is VERY hard to get done properly
  142. bluejavascript tried. r&t failed miserable. the browsers wouldn't implement it, got blocked
  143. bluemiserably*
  144. blueto those unaware: records&tuples were a javascript proposal adding deep immutable types to the language. for objects, the syntax #{} instead of {}; for arrays #[] instead of []
  145. bluethe proposal was a dumpster fire that eventually failed because browsers (well, essentially google/v8) refused to implement it, for perf concerns
  146. dreamrealprogramming is hard, as it turns out.
  147. dreamrealmutating java like valhalla wants to do is especially hard, because the language and system design were clear about why it was a major change
  148. blueto be fair: the proposal started on the wrong feet. both terms are HIGHLY overloaded in computer science. if I say tuple, do you think of an IMMUTABLE ARRAY OF ANY LENGTH?
  149. bluebecause I don't.
  150. dreamreal*nod*
  151. bluerecord is worse: there's database record, and in typescript, unfortunately, the type 'Record' just means a non-null object
  152. bluethey should have gonna with ImmutableArray and ImmutableObject. yes, longer. but clear.
  153. dreamrealwe don't need clarity, obviously: if we did, == applying to reference identity and therefore being inappropriate for java strings' *value* equality would make total sense, since they're objects
  154. bluejava also has record: I *think* it's actually WELL used there. Because it's closer to the DB idea of a record
  155. blue(a data transfer object, essentially)
  156. bluedreamreal: there's terminological clarity and clarity of use. the operator == having different meanings in a language is.. a catastrophe. Look at c++
  157. nevetdreamreal: there's terminological clarity and clarity of use. the operator == having different meanings in a language is.. a catastrophe. Look at c now has karma of 1.
  158. bluejava could have embraced a totality on objecthood: no small ints
  159. dreamrealooof, I hate referring to C++ in a channel with karma. That SHOULD be a specific cutout... but damn it, determining that it's actually C++ and not "C, plus karma!" is a pain
  160. nevetooof, I hate referring to C++ in a channel with karma. That SHOULD be a specific cutout... but damn it, determining that it's actually C now has karma of 1.
  161. bluebut it didn't
  162. bluetrue
  163. dreamrealwell, smalltalk showed what a horror THAT was
  164. dreamrealit's been done
  165. blueoverloading operators is just about the WORST thing I can think in computer science. it's one of the seemingly brilliant ideas that are just so innately wrong
  166. blueeven the fact + is overloaded, is kind of weird. why does it mean addition in ints, but concatenation in strings?
  167. bluewhy hasn't java or any language implemented + for booleans, meaning logical AND?
  168. dreamrealbecause java was intended to be used by humans and choices were made. Pascal-style strings were on the table. Ever used them, as in wirth's pascal?
  169. dreamrealbecause AND has a symbol associated with it and they use that instead?
  170. dreamrealso do OR and NOT and XOR
  171. bluegreat, you're making my point for me: if it's intended to be used by humans, then new String("foo") == new String("foo")
  172. dreamrealI also pointed out "choices were made."
  173. dreamrealAlso worth noting: Scala uses == for string value identity.
  174. blueI think the best criteria for == comparing by contents is reallty, immutability
  175. dreamrealIn Java, the strongest argument against it is 28 years of an existing codebase
  176. blueStrings are immutable in java -- GOOD. So the == operator should be clear.
  177. nevetStrings are immutable in java now has karma of -1.
  178. blueyes, and project valhalla could FIX that.
  179. bluebut they chose not to
  180. dreamreal*shrug*
  181. blueyou could even having a new MyString("foo") object, according tot he proposal, and it could benefit from == by value
  182. bluethat's how ridiculous it is
  183. dreamrealin terms of the hills to die on, that one's still pretty shallow
  184. blueso I'm asking chatgpt to give me examples where value-objecting String would be an issue, and so far it's been struggingly badly
  185. bluecurrent example: if you create a map with two keys new String("foo"), its size would shrink from 2 to 1
  186. bluethat's, uh.. not a real use case. it's not meaningful to have such a map, there's no use case for it: the key is practically equal in all regards
  187. blueI'm REALLY interested in this, dreamreal; I'm looking for someone/something to step up and SHOW ME a good reason for this
  188. dreamrealum
  189. dreamrealmaps store objects as keys, and since objects use equals for value equality, not a thing
  190. dreamrealthe rules are simple: object equality uses equals, == is identity
  191. dreamrealyou just want strings to have identity, and they don't
  192. blueexactly
  193. bluestrings don't have identity
  194. blueyu're arguging MY case!
  195. dreamrealno, they do have identity
  196. blueso show me an actual real use case where this matters
  197. dreamrealnew String("A") gives you a reference: #a1726av, new String("A") gives you a DIFFERENT reference, #8127ns, the references are not the same, == is false
  198. dreamreal1) don't need to, java's already in production 2) the rules are clear; your argument AGAINST String having "+" is actually much stronger
  199. dreamrealbut neither argument has an outcome that matters: if I were to agree with you 100% nobody would change a thing anywhere
  200. blueI KNOW how it works. I'm looking for osmeone to explain why valhalla has EXCLUDED strings
  201. dreamrealHere's an idea: email Brian
  202. dreamrealask him
  203. dreamrealI'm not on the valhalla team, I don't know, anything I came up with would be conjecture
  204. bluethen CONJECT; I don't know brian
  205. dreamrealHe's publicly accessible!
  206. dreamrealthe internet's flat, man
  207. dreamrealI do think you'd find the demand for == for strings to be pretty low
  208. dreamrealbut I haven't run a poll... oo, there's an idea for nevet
  209. blue"Synchronization on String objects"
  210. blueif String were a value class, "You cannot synchronize on them at all."
  211. blueAND???
  212. bluethis is not a use case
  213. dreamrealI mean, you're talking about them no longer acting like what they are, which is objects
  214. dreamrealobjects can be synchronized on, I don't think synchronizing on a string is necessarily a brilliant idea, but it falls out of the design
  215. bluechatgpt's conclusion: "So if we try to find a real, meaningful program that would break, we basically come up empty."
  216. blue"The canonical argument “String cannot be a value class because identity matters” is mostly theoretical."
  217. blueI WIN, again!
  218. dreamreallike i said, you've made a stronger case for removing "+" on strings than anything else
  219. dreamreal... against an LLM?
  220. blueNo, in general
  221. dreamrealok
  222. blue"It’s not because there’s a meaningful everyday scenario where new String("foo") == new String("foo") being true would break business logic."
  223. blue"It’s because the Java platform historically treats Strings as reference objects, and changing that would alter any code—even obscure ones—that depends on identity in any way whatsoever."
  224. blue"The maintainers are extremely conservative: even theoretical breakage is considered a showstopper."
  225. blueYES, THAT IS WHY WE HAVE MAJOR VERSIONS, TO not BREAK STUFF
  226. blue*sigh*
  227. blueI'm done with humans, that's it
  228. dreamrealjava's always been pretty pathological about that, though
  229. dreamrealyes, please, never interact again, yeesh
  230. ChronosAndrew's comments make me even *less* likely to use/trust "Sign in with X" flows, heh.
  231. * dreamreal sighs with relief
  232. blueChronos: 100%
  233. dreamrealChronos: should be the opposite, actually, but I get it
  234. ChronosToo much crap and complexity built on too much crap and complexity built on too much crap and complexity. I trust all parties to get it right and honor their security promises as far as I can throw an African elephant. LinkedIn already burned me once — badly — with a similar flow. I have to nope right out of "Sign in with X".
  235. dreamrealChronos: I'm going to have a PR soon for the dual-path thing
  236. blueChronos: it's very bad indeed. As I noted before, the worst thing is that you stay logged-in after that. So you auth-by-google, but a side effect is that now you go to youtube and suddenly you're logged in, and google's saving all your video history.
  237. blueThere's no reason this should happen, btw. But it happens. oauth says nothing about the state the oauth provider should be in after the flow's done
  238. blueit just says you should be given an auth code
  239. Chronosdreamreal: Woo hoo!
  240. Chronosblue: Yikes.
  241. ChronosWhen LinkedIn, *somehow*, on the *web*, grabbed and spammed my *entire* Google Contacts list, I knew right then that kind of flow in general is *evil*.
  242. ChronosNever in a thousand years would I have guessed that would have been possible. It was such a deep embarrassment, and violation of privacy.
  243. dreamrealPR reviews requested. DO NOT MERGE, please.
  244. bot[jottinger/bytecode.news] New PR #105: Dual-path auth provision - https://github.com/jottinger/bytecode.news/pull/105
  245. Chronosdreamreal: "Always returns 200 regardless of whether the email matches an account (prevents account enumeration)." -- I thought you were going to return, what was it now... 202?
  246. nevetdreamreal: "Always returns 200 regardless of whether the email matches an account (prevents account enumeration)." now has karma of -1.
  247. Chronosoops. sorry. forgot to use a proper em-dash there.
  248. Chronosdreamreal: "If the email is valid, a 6-digit code is generated with a 5-minute expiry and sent via email." — Did you decide to switch from 5 to 10 back to 5? Which is okay with me, just curious.
  249. dreamrealFile comments, damn it! Telling me here is ephemeral. All good observations.
  250. dreamrealOf those, the 202 thing is the one that's bugging me, will fix, the minute thing... meh, I'm working on GDPR requirements right now and that will be bundled in
  251. dreamrealI have no objections to the GDPR in concept but the application requirements are inconsistent and maddening
  252. dreamrealBut I have a plan
  253. ChronosYou know... I wonder what happens if I use a dash dash in a me... testing...
  254. * Chronos says -- what does this do? -- where does it go?
  255. nevet* Chronos says -- what does this do? now has karma of -1.
  256. ChronosInteresting!
  257. dreamrealooof
  258. dreamrealgross
  259. dreamrealew
  260. dreamreal:D
  261. dreamrealemergent systems, yuck :D
  262. * Chronos chuckles
  263. dreamrealsentiment #nevet
  264. nevetSentiment for irc://libera/%23nevet: +2/10 | Intensity mod | Themes: GitHub auth bikeshedding frustration, Java value classes debate, bot sentiment gaming, Project Valhalla | Summary: Tension from auth discussion frustration has cooled; blue tested sentiment manipulation with sarcasm; dreamreal amused by bot's sarcasm detection; conversation shifted to lighter technical topics | Drivers: blue,dreamreal
  265. dreamrealthere's a lot of emergent design in nevet
  266. ChronosHey, that's... damn good.
  267. dreamrealkarma's an utter pain because it fights emergent design pretty regularly
  268. dreamrealwhat, the sentiment analysis?
  269. dreamrealyou wanna know the history there? :D
  270. dreamrealit goes back to SURIAL!
  271. dreamrealhe used to get all butthurt when people would say "chill out, you're being pretty negative here" - so I wrote a bayesian emulator trained off of his stuff in #java, and had it generate 300 statements from "him" as represented by bayes, and graded the sentiment from there
  272. dreamreallike, "what would we think of a bot that was *trained* by your content, would we think it was negative"
  273. dreamrealthe answer was quite surprising: "God, yes"
  274. Chronosdreamreal: Yes, the sentiment analysis.
  275. Chronosdreamreal: ha! :)
  276. dreamrealI really wish surial hadn't left, but ... man, he cost as much as he provided or more, by being a jerk
  277. dreamreal"Let me provide you a wagyu steak of knowledge, served with a heaping helping of charred kale seasoned by utter contempt, noob."
  278. ChronosI recall the nick but not the personality behind the nick.
  279. dreamreallombok author
  280. dreamrealtended to be, uh, slightly ascerbic
  281. dreamrealrather opinionated, like someone who goes "I really think this longstanding aspect of java isn't convenient for me, so I HATE JAVA despite being the one person who is actually enraged by this thing"
  282. ChronosSounds like Zhivago that used to frequent #c
  283. dreamrealOOOO I REMEMBER HIM!
  284. dreamrealyeah
  285. Chronosdreamreal: hahahaha
  286. dreamrealor pudge on #perl
  287. * Chronos hugs blue
  288. dreamrealhey I didn't say it was blue
  289. dreamrealpr dibblego in #scala, may tony morris be forever remembered
  290. dreamrealoh wow, claude KNOWS WHO TONY MORRIS IS
  291. dreamrealhahahaha
  292. dreamrealIMMORTALITY AS AN ASSHOLE!
  293. dreamrealthat's... pretty bad, if dibblego was so memorable that the LLMs remember him as being a jerk
  294. dreamrealI mean, he IS pretty memorable: "I am a total asswipe douchenozzle because... hold on, checking the 8 ball... I have autism! No, wait, shaking it again... oh MY BACK IS INJURED"
  295. dreamrealChronos: new push to the branch, actually fixed the things you pointed out, and thank you as always
  296. dreamrealall this damn GDPR talk... grrr
  297. blueblame timon on that
  298. dreamrealhe's not wrong
  299. dreamrealand fixing GDPR issues in the future is a lot harder than fixing them now
  300. bluehe's being unnecessarily alarmit and FUDing
  301. bluealarmist*
  302. blueI'm the only one here who lives in Europe, to my knowledge
  303. dreamrealI disagree: we have GDPR issues in another app we work on, and it's a true pain in the rear
  304. blueI RAN a website/business in Europe
  305. blueSo I tihnk I can be trusted on this GDPR nonsense
  306. dreamrealyou are not, however, the only one who WORKS in Europe :D
  307. bluethe GDPR is pretty straightforward. if you collect more than you need to collect, ie collect for the sake of collection, THEN it gets ugly
  308. blueif you collect what you NEED to allow users to be users... it's trivial.
  309. dreamrealthe main concern *I* have for GDPR is right to remove and collect; both issues are addressed.
  310. bluewhat right to collect?
  311. dreamrealuser have a right to download their data and contributions
  312. dreamrealIANAL but andrew and I work with some
  313. dreamrealso I added a hook to download posts and comments contributed by the user
  314. blueyou don't need to mechanise it. it the user asks, you can provide it
  315. blueas long as no users asks, it's theoretical
  316. blueYAGNI
  317. bluestop listening to timon
  318. dreamreal1) shut up, don't tell me who to listen to 2) providing the endpoint for THAT was among the easiest aspects of the whole thing
  319. dreamrealthat fell out of the data model almost by implication
  320. blueeasy doesn't mean good!
  321. blueliterally. how can I take a guy seriously who derailed a discussion about a SECURE auth measure into GDPR nonsense?
  322. dreamrealI don't know how to answer that, because I could see it AND it's valuable
  323. Chronosblue: Where in Europe do you live? If you don't mind saying.
  324. ChronosHoly crap. My IRC client is giving me "xxx is typing" messages. Must be from some of the recent IRCv3 updates.
  325. dreamrealwhich client are you on?
  326. ChronosIRCCloud
  327. ChronosI actually pay for it! (gasp!)
  328. * dreamreal spots the dumbie
  329. dreamrealbut that's fascinating. I didn't know libera even tried to do ircv3
  330. ChronosI briefly considered installing TheLounge following their easy 200 step process, and configuring it correctly using another 200 step process, and keeping it up-to-date by following yet another easy 200 step process, but then I paid for IRCCloud.
  331. Chronosdreamreal: Libera.Chat recently (like, within the last 2 weeks, or so) upgraded their IRC servers to a newer version that supports some new IRCv3 features.
  332. * dreamreal just uses weechat like a masculine man who uses masculine manly things like a lumberjack
  333. ChronosApparently, including typing indicators.
  334. dreamrealI wonder when the other clients are gonna catch up
  335. ChronosOver the years I've switched back and forth between irssi-on-Linux-VPS and IRCCloud.
  336. ChronosWhen my IRCCloud subscription ends, maybe I'll try WeeChat. Does it have a mobile client that can connect to an instance of WeeChat?
  337. dreamrealI don't think so, it would BE the mobile client, but it DOES have a sort of c/s architecture; I don't know how complete it is.
  338. dreamrealsenpai apparently supports ircv3 but it's written in go
  339. dreamrealgo doesn't bother me much but senpai looks very twee
  340. dreamrealany further comments on that PR?
  341. dreamrealI'd love to commit it so I can 1) pretend the issue's closed 2) hand it off to other people
  342. Chronosdreamreal: lgtm.
  343. dreamrealThanks!
  344. dreamrealblue: merged, btw: dual-path, plus docs, all merged. I'm going to set up the prod deployment to support it, although obviously the UI is trailing now.
  345. blueChronos: Germany
  346. bluedo you guys even READ wallops?
  347. bluehttps://libera.chat/news/new-and-upcoming-features-3
  348. dreamrealno, because I rarely care about those things
  349. blue17:50 < Chronos> Over the years I've switched back and forth between irssi-on-Linux-VPS and IRCCloud.
  350. dreamrealI use IRC to talk to people, not leverage a protocol
  351. blueI'm irssi-on-vps, RIGHT NOW.
  352. blueI'm not entirely surprised dreamreal is using weechat; weechat is basically the same as irssi, just for morons
  353. bluedreamreal: also, at the cost of being late: LGTM
  354. dreamrealI found irssi to be insufficient; weechat's UI worked better for me.
  355. dreamrealI'm working on the OIDC identification stuff, which will help clear up the API. I figure I'm going to have a deployment structure like this:
  356. dreamrealwww.bytecode.news, bytecode.news, nextjs.bytecode.news, primate.bytecode.news - with www. and . pointing to EITHER nextjs or primate
  357. dreamrealand then there's a rest.bytecode.news domain which exposes the backend services via a stable endpoint
  358. dreamrealso nextjs and primate both use https://rest.bytecode.news/api/blog/posts or whatever
  359. blueI'd been thinking about it, and I wonder how much I want to translate the actual back to primate paths. you see, using nextjs/primate is *a bit* of an overkill. they *both* are fullstack frameworks
  360. bluethe actual backend*
  361. blueso the level of indirection is significant. you have real backend, then 'fake' backend, then frontend
  362. dreamrealare you talking about primate *replacing* the rest endpoints? talking to the DB directly?
  363. blueI'm not. I'm just thinking where the seams would lie between the real backend and primate (or nextjs, for that matter)
  364. dreamreal*nod*
  365. blueboth are backends. primate could even run java -- or kotlin code -- via wasm. although that's somewhat futuristic given >=java 25 and some limitations without a jvm, no idea if your code specifically relies on that
  366. nevetboth are backends. primate could even run java -- or kotlin code now has karma of -1.
  367. blue(specifically=reflection)
  368. blueat this point in time, I'm thinking about this: primate generates an openapi client using the spec. then, it exposes those paths directly via a /rest subpath
  369. bluethe frontend using primate, whatever it is, talks directly to these subpaths
  370. bluethough I'm not entirely convinced yet this is the best way to go about it
  371. dreamrealand THEY redirect content to the actual backend, you mean?
  372. blueyes. it's not even a proper redirect, the request is likely piped 1:1, almost
  373. dreamreal*nod*
  374. dreamrealI mean, that makes sense to me
  375. dreamrealit's a little heavier - it adds a few ms to every interaction, but most interactions should be pretty quick
  376. bluelike, I truly need to think about what having an interim backend even means. so one thing it means: we avoid any CORS nonsense. CORS is an absolute nightmare
  377. dreamrealit is, but I'm going to have to address it anyway
  378. dreamrealthe backend is already set up to accept CORS requests from different domains
  379. blueby having the interim backend and the frontend on exactly the same domain (or subdomain), you completely eliminate this error category. it is probably worth having only for *that*
  380. dreamreal*nod*
  381. bluebut what else? like, what does the interim primate (or nextjs) backend add, exception indirection?
  382. blueexcept*
  383. dreamrealnot a lot, but that's probably a GOOD thing
  384. bot[jottinger/bytecode.news] New issue #107: Unify and reorganize documentation - https://github.com/jottinger/bytecode.news/issues/107
  385. bot[jottinger/bytecode.news] New issue #106: Split baseUrl into API and frontend URLs for OIDC stability - https://github.com/jottinger/bytecode.news/issues/106
  386. bot[jottinger/bytecode.news] New PR #108: More OIDC changes - https://github.com/jottinger/bytecode.news/pull/108
  387. bluewell, let's think what nevet *can't* do, at least in its current form & scope
  388. blueit can't do SSR - it's not meant to do that
  389. dreamrealSSR = ?
  390. blueserver-side rendering
  391. blueare you familiar with SPA/SSR/hydration, or should I shortly explain?
  392. dreamrealno, I just needed to know what the acronym was, with you now
  393. blueok. anyway, if you have a pure frontend (say, react) talk to nevet's backend -- which is a possibilities -- you would never get SSR. only SPA. that means your initial request is an empty HTML
  394. nevetok. anyway, if you have a pure frontend (say, react) talk to nevet's backend -- which is a possibilities now has karma of -1.
  395. bluethere's also of course the question of what static server serves those resources, which is yet another layer
  396. bluenormally, that would be nginx
  397. blueor apache, for the traditionalists
  398. dreamrealI'm not going to be deploying httpd, it's nginx on my server, caddy's a possibility but ... it's nginx
  399. bluebut let's assume for a moment that's a piece of the puzzle. in that case, your first contentful paint would be... not good
  400. dreamrealmy thought was that each subdomain was *self-contained*
  401. dreamrealso it's foo.bytecode.news and rest.bytecode.news, and everything is on those two domains for foo.bytecode.news to render
  402. dreamrealthe nginx config does the proxy passthrough for both domains, and cert management
  403. bluethere's also things like jwt/cookie management, and auth, which need to be address
  404. blueaddressed, even
  405. dreamrealwell, auth is part of the rest stuff - that's all the 67 stuff we just did, jwt is part of it too (and has been for a while), aad cookies are up to the front end
  406. bluewhere I can see a primate backend shine is, composing complex operations on top of simple REST queries
  407. dreamrealthe back end doesn't use them
  408. bluefor example, the login sequence is composed of several API calls, but it might be hidden away under just one path
  409. dreamrealright now, with OTP, we SHOULD be able to deploy *right now* with no OIDC providers set up
  410. dreamrealsure
  411. dreamrealI'm reorganizing the docs, btw
  412. bluethis brings me to an organisational point: we need deployment docs. if I am to write a frontend, I need to be able to easily run nevet locally. docker could work, though I'd prefer nspawn (not a purist though -- if you furnish me with a Containerfile, I'll take care of it myself)
  413. blue(why did nevet not pick up my last message as karma?)
  414. blueI guess maybe cutoff limits
  415. dreamrealyep
  416. dreamrealI'm working on the docs, you SHOULD be able to run the backend in a container really easily
  417. bluewell, that's the only way to properly test it and come across real implementation issues
  418. dreamrealdpcker compose up db backend # should do it
  419. bluecan you provide a Containerfile (or a Dockerfile, same thing really)?
  420. bluealso, that'd probably require making the repo public?
  421. dreamrealwhy would it require making it public? You have access to the repo: you can literally clone it, do `mvnd package`, then run docker
  422. dreamreal(doing the build IN docker is bonkers mad, don't do that)
  423. bluewhat's mvnd? the idea of a container is to avoid me having to have all these tools locally
  424. dreamrealI get that, but yikes
  425. dreamrealmain requirement for nevet is having java 25
  426. dreamrealif you have that, you're done
  427. blueI might have that; BUT, that's something ideally you shouldn't need to have
  428. dreamrealjava 25 + the repo: ./mvnw package -DskipTests=true (if you know the repo is in known-good state)
  429. blueiirc the only reason I have java 25 is because I was messing around with wasm :P
  430. dreamrealyes, well, I agree but making the repo public and putting up a public container is a step I'm not ready for
  431. bluetell you waht. can you bake a CP step from, say, ./repo, into the container?
  432. bluethat's a good compromise, no?
  433. dreamrealthat's literally what teh dockerfile does :D
  434. blueyes but I meant the source code. the rest happens inside the container
  435. dreamrealhttps://github.com/jottinger/bytecode.news/blob/main/Dockerfile
  436. blueso I can just do `git pull`, then rebuild the image
  437. dreamrealoh, you CAN do that but it's a waste of 15 minutes
  438. bluenot for me -- I use nspawn, which gives me essentially native performance
  439. nevetnot for me now has karma of -1.
  440. dreamrealit nets you NO win whatsoever
  441. dreamrealI'm not familiar with nspawn, so I don't know - there's no ACTUAL barrier to building in a container outside of the container mechanism sucking
  442. blueall you need to do is install mvnd inside the container and run it, no?
  443. dreamrealit's just very slow and with far less CPU access; mvnd does parallel builds, if you have it installed, so I deploy nevet within about 30 second for a full rebuild, the full build with tests is about 1:40 on my M3
  444. dreamrealonly if the container has full thread access
  445. bluebonus is you get assurance the desired mvnd version is used for building
  446. dreamrealit's going to be limited to the container's resources
  447. blueso you get full reproducibility
  448. bluewhich is perfect
  449. dreamreal./mvnw gets you that already :D
  450. blue*sigh*
  451. bluefine, I'll do it YOUR way
  452. dreamrealthat's the maven wrapper, I *do* lock the maven version, and maven's usually pretty good about it anyway
  453. blueit's not you ever accept a suggestion of mine!
  454. dreamrealwell, if any of your suggestions were good... but more seriously, I have a major project that does mvn builds in the container, and that process SUCKS for java
  455. dreamrealand there's literally no win: cp app.jar into the container is the right way to go until we go graalvm. When we do THAT, you'll get your container builds.
  456. bluealso chatgpt says there's no difference in speed between running mvn in docker or without
  457. dreamreal(and builds will take 30 min, not 1;40 or 15 minutes.)
  458. blueunless apparently, you're on mac
  459. bluegreat
  460. dreamrealI'm sure chatgpt does.
  461. dreamrealIt's wrong, but hey.
  462. blueyou know what? I don't care. I'll take your Containerfile and just edit it to fit MY purposes. It's not like I need to ask you for permission
  463. dreamrealfor maven single-threaded, it's probably pretty close; docker's overhead wouldn't matter much. for parallel builds, it's a lot more severe.
  464. dreamrealThere you go!
  465. dreamrealjust don't commit it to main until I can approve it.
  466. blueya
  467. jreicherdreamreal: where's the discussion of why Strings aren't value classes? I feel like I've missed something (and I'm a bit curious about what everyone thinks)
  468. dreamrealjreicher: I dunno, I don't live and die on valhalla discussion
  469. dreamrealbut now my wife has made dinner and she's a lot prettier than you guys are
  470. jreicherOh I thought there had been a discussion you had participated in
  471. jreicherThat's not fair. You haven't seen me dresesd up.
  472. blue[INFO] BUILD FAILURE
  473. blue[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes,
  474. bluegenerate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy. -> [Help 1]
  475. blueah, there we go!
  476. jreicherblue: just saw earlier you said new String("foo") == new String("foo"). I'm guessing you think that should be true?
  477. bluejreicher: yes
  478. blue[ERROR] Failed to execute goal io.github.git-commit-id:git-commit-id-maven-plugin:9.0.2:revision (default) on project streampack:
  479. blue[ERROR] The plugin io.github.git-commit-id:git-commit-id-maven-plugin:9.0.2 has unmet prerequisites:
  480. blue[ERROR] Required Java version 11 is not met by current version: 1.8.0_482
  481. jreicherRight. i think that's a useful way to talk about the real problem. Compare with 5 == 5, which is actually true. What's the massive difference between the two expressions?
  482. blue➜ bytecode.news main ✓ java -version
  483. bluehm, I guess it takes openjdk 8
  484. blueTHIS IS WHY I HATE THIS NONSENSE
  485. jreicherI don't know if you're reacting to what I said or the errors you're pasting
  486. bluejreicher: no difference
  487. jreicherThere absolutely is a difference. It's obvious, and large.
  488. blueI was reacting to the errors I was pasting
  489. bluewhat's the difference?
  490. jreicher"new"
  491. blueoh, you're gettign me wrong
  492. blueI also think new Long(1) == new Long(1) should be true
  493. bluewhich it will be, under valhalla
  494. jreicherThe point I'm making is that new... == new... can't mean the same thing as literal == literal
  495. jreicherSo even if you made it work the way you want, you have to supply a different meaning to == in the context of new
  496. jreicherOr, put another way, the result of the comparison is not the same thing as the meaning of the comparison.
  497. blueso, to go back to first principles, my position is that immutable variables: long, Long, int, Integer, String, should always parse == as 'by value'
  498. jreicherThere's no such thing as an immutable variable. (I know that's horribly pedantic, but I want to tease out what you "really" mean
  499. jreicherBecause if I do int x = 5, there's only one variable there
  500. jreicherBut if I do Foo x = new Foo(), there could be too, if Foo is mutable
  501. jreicher^too^two
  502. bluecome on. you know what I mean. String s = new String("foo"); you can't change JUST 'f' to 'b'. You can rebind the variable to a new value, you cannot mutate it
  503. jreicherOr more, actually, depending on how many mutable attributes Foo has
  504. jreicherNo, I THINK I know what you mean, but I want to make sure I'm right.
  505. bluesame for int i = 1; i = 2 is not mutation, but rebinding
  506. jreicherOK, so you're talking about an immutable object there, right?
  507. jreichernew String("foo") constructs an immutable object. That's what you mean?
  508. blueyes. as do new Long, new Integer, or int, or long
  509. jreicherYep. But if we do int x = 5, there's no construction at all. And that's what matters. Not mutability, but construction. Values aren't constructed.
  510. blueThis is where we get into the territory of, to my taste, a distinction without merit. What matters to me is, can you think of a case where two "foo" objects differ in any meaningful (=real) way?
  511. jreicherYes. At compile time. That's why this matters.
  512. jreicherCompilers can do some value analysis. They can't do any immutable object analysis, becauses the objects don't exist yet.
  513. blueYes, but you're pulling the cart before the horses here -- you're talkign about how it's technically currently done in the JVM. I'm talking about a use case
  514. nevetYes, but you're pulling the cart before the horses here now has karma of -1.
  515. blueI would like you to describe a use case where the distinction is important
  516. bluelike, a real situation where it's good to have two strings "foo", and be able to compare them by identity -- but not by value
  517. nevetlike, a real situation where it's good to have two strings "foo", and be able to compare them by identity now has karma of -1.
  518. jreicherIf you already know the strings are "foo" then the scenario begs the question. We need to ask about this distinction where at least one of the strings is unknown.
  519. blueI'll play devil's advocate for you
  520. bluea real 'use case' is if you're writing a compiler in java, and objects are coming in, and you want to track (by identity) if you've already seen an object or not
  521. jreicherOK...
  522. bluethe rebuttal to this is: this is *not* a real use case. compilers aren't written this way: it's not effective at all, and you wouldn't be comparing references for that
  523. bluemy personal issue is, no one has given me a real use case for comparing strings by identity and not value
  524. bluemaybe it's all moot to you, but to me it'd help me understand why the == and .equals distinction makes sense, if it does
  525. jreicherSo you're saying because nobody would ever compare with identity, that operation shouldn't even exist?
  526. blueessentially yes: I'm saying, the only meaningful comparison of two strings is by value (=contents). the comparison by identity is not meaningful
  527. blueyou would never construct two "foo" Strings and expect them to differ: for what purpose?
  528. bluealso, consider the implications of this for project valhalla:
  529. bluevalue class Point(int x, String y) {}
  530. bluePoint p1 = new Point(1, "hi"); Point p2 = new Point(1, "hi"); p1 == p2; // false, string comparison broke it!
  531. bluethe bottom line here: comparison by reference *only* makes sense for mutable objects, where the truthiness of the check could vary over time. but the two strings "foo" and "foo" will always be the same
  532. blueiow: the original story of `new String("foo")` is meaningless
  533. blues/original/origin/
  534. dreamrealno, those would not be uneqial because of string comparison
  535. dreamrealyou don't seem to grok references
  536. dreamrealthink of them as pointers
  537. bluewhat are you talking about?
  538. jreicherOK, then for the sake of argument, how would you feel about the Java compiler throwing an error for == used on Strings. Meaning we change the == to being undefined in that case, and you can only use equals()
  539. bluejreicher: THAT would be a huge improvement already!
  540. dreamrealchar **c1=malloc(10); char **c2=malloc(10); strncpy(c1, "hello", 6); strncpy(c2, "hello", 6); // are c1 and c2 equal? Why not?
  541. bluedreamreal: dude, you're COMPLETELY missing the point. you're talking about implementation. I'm talking about MEANING
  542. bluejava is NOT a low-level manipulate-the-memory-directly language, the point holds not
  543. jreicherblue: but the meaning of String, at least at the moment, is that it's not a value.
  544. dreamrealI disagree, bevause that's literally where == is playing in
  545. bluejreicher: that's the interpretation of the java language, but that's also my criticism
  546. bluefor example, it is NOT the interesting of the javascript language
  547. blues/interesting/interpretation/
  548. jreicherIn that case we're not talking about == vs equals(). You're objecting to Java not having a primitive string type.
  549. blueif you want to weave it that way, sure: the argumentation would be that strings are immutable, and as such, inherently primitive (as they are in js)
  550. blueI don't mind shifting my argument there, that's fine by me, it's all the same to me
  551. jreicherimmutability does not a value make. I think you need to separate those two things.
  552. jreicherThe value is part of the STATIC definition of the type.
  553. bluethe point remains that two occurences of the value "foo" (regardless if you do it via new String("foo"), or an idealised string primitive), are one and the same: the distinction here is invalid
  554. jreicherIt's immutable as a consequence, but that's not the essential nature of it.
  555. jreicherThere's no "foo" value in Java. It doesn't exist.
  556. bluedo you mean it would be possible to constract a language where parts of a string are immutable? like c? sure
  557. blueconstruct*
  558. jreicherNo. I'm not talking about immutability at all. It's irrelevant.
  559. jreicherThe only question that matters is value vs object
  560. bluejreicher: then that's the criticism. values are much more important than object identity, for strings
  561. jreicherThere are no string values in Java.
  562. blueyes, I never claimed there were
  563. jreicherOK. Then maybe we move on to the next part. Do you know why?
  564. bluewhy it's implemented/done this way?
  565. jreicherNot so much implemented as designed. It's a design decision, not an implementation decision.
  566. blueis the history really relevant here?
  567. jreicherIt's not history. The reasons for the decision still apply. If I was designing something like this now I'd probably do the same.
  568. blueOK, what are the reasons?
  569. jreicherMy understanding is that they wanted (needed?) all the value types to have a finite, fully determined range of values. That's true of everything "philosophically "considered a value, including enums. Strings are really very, very special in having a range of values constrained only by the memory available at runtime.
  570. blueAnd strings would be unbounded?
  571. jreicherStrings are currently unbounded AFAIK.
  572. jreicherIn principle.
  573. blueThat argumentation makes little sense to me, why would you want to impose that kind of restriction?
  574. jreicherWould you be comfortable with an int type that was unbounded?
  575. jreicher(It would be fine if you were; I'm just trying to get to the heart of the issue)
  576. blueCan't say I would, but I can also not say it's relevant to the string discussion
  577. blue(btw: having an unbounded int type such as BigInt in JS is immensely useful!)
  578. jreicherNo argument with it being useful. But why would you be uncomfortable with it? That's probably worth teasing out.
  579. blueI guess... I haven't thought about it, but I can't say I would and I can't say I wouldn't, I don't have an opinion on it, to be honest
  580. jreicherOK. Well for the sake of argument we decide that our language is not going to have any unbounded value types, then the notion of string you are advocating is ruled out before we even start thinking about string.
  581. jreicher...if we decide...
  582. blueIs this not purely theoretical? I mean, JS doesn't have that problem. The ECMAScript standard allows up to 2^53-1 characters, but it's usually memory-bounded/limited by the engine.
  583. jreicherJS has different problems. ;)
  584. blueYes, but comparing strings by == isn't one of them, that's the crux of the matter
  585. jreicherBut seriously I think the only way to make sense of the issue to take the big picture of all the tradeoffs. I'm sure I don't have the full picture, but I know enough to believe that a small view doesn't make sense.
  586. blueTo be honest, I can't see downsides. If you compare all strings by value you can easily memoise them and save memory.
  587. jreicherTo do what you want you either have to make string a value type, in which case you compromise a more fundamental decision in java, or you have to overload the meaning of == to cater for something which isn't a value type, which again compromises a more fundamental decision.
  588. blueYes, I'd make it a value type. What fundamental decision I would compromise, the boundedness?
  589. jreicherYep
  590. jreicherAnd maybe that's ok
  591. blueThen why allow new Long(1) == new Long(1) => true under valhalla, what's the difference?
  592. jreicherI think so, yes, although I'm not sufficiently familiar with valhalla. I think a better comparison might be with what's in the JDK right now for bool. Just a moment...
  593. jreicherIt jumped out at me recently that there's no non-generic version of the functions in java.util.function for boolean. AFAIK stuff like IntConsumer and IntPredicate exist so that if you have an (unboxed) int you don't have to incur the cost of boxing it to pass to e.g. Consumer<Integer> or anything like that. So they're saying that something like Consumer<Boolean> would not be expensive. Why? Because the boxed values are already
  594. jreicherconstructed. There's only two of them.
  595. jreicherSo anything that can be done without incurring this kind of runtime cost will be allowed
  596. blueThere's another aspect I haven't mentioned, jreicher.
  597. jreicherMm?
  598. blueConsider this method: `public static boolean test(String a, String b) { return a == b }`
  599. blueThis method returns true, or false, depending on the *origin* story of the strings. That's a big red flag, in my eyes.
  600. bluetest("foo", "foo") => true, test("foo", new String("foo")) => false
  601. bluethat's bad: there's no way for me, in the `test` function, to know what the origin story of a and b is
  602. blueso I would *always* use .toEquals, instead
  603. blueor .equals, I mean
  604. bluethat means the == operator is *completely* useless for strings
  605. blueto use it properly, I need full knowledge of the origin story of the string: contructed per new String, or per ""
  606. bluethat's ridiculously broken, in my eyes
  607. bluein any non trivial codebase, I will never have full knowledge of the origin story of a string
  608. blueit even gets more complex that test("foo", "fo"+"o") will yield true. even dynamically created strings partake of it
  609. bluebut now say I've extracted "o" to String o = "o";
  610. bluesuddenly, test("foo", "fo"+o) => false
  611. bluegenerally, extracting a direct value in a language to a variable should not create unintended side-effects; here it does
  612. blue(or better said: in a *high-level* language; if you manage memory yourself as in c, you get value expansions and contractions all the time)
  613. blueincidentally, this is a criticism I have of TypeScript. { foo: "bar" } passed directly to a function would satisify the exact type { foo: "bar" }; extracting this to a variable: const a = { foo: "bar" }; will expand it, resulting in a's type being { foo: string }
  614. bluethat makes refactoring a nightmare
  615. bluein my opinion, unless you gave TS a proper type: say, const a: { foo: string } = { foo: "bar" }; it should keep it narrowed, but it doesn't
  616. blueautoexpanding/weird magic is crazily confusing, especially in high-level languages
  617. jreicherblue: why would you not do `return a == b || a.equals(b)`? I think that's using object identity in exactly the way it's somewhat intended; as an optimisation
  618. jreicher(I suspect equals() is implemented this way for String anyway)
  619. bluejreicher: I could, but why should the language force me to do it? The language implies a distinction (== vs equals) without merit
  620. blueif I could just do == for strings, none would be the worse for it
  621. jreicherAnd I'm suggesting that the language doesn't give two hoots about == vs equals. It just "knows" that it has no notion of strings-as-values and everything else is a consequence that it doesn't care about.
  622. blueWe're word-juggling at this stage; you're saying the language has no notion of strings-as-values, and I don't disagree -- that's a reductive form of my criticism
  623. nevetWe're word-juggling at this stage; you're saying the language has no notion of strings-as-values, and I don't disagree now has karma of -1.
  624. jreicherblue: because I do indeed thing your criticism reduces to something else. You are criticising the consequence o a decision that was made on unrelated grounds.
  625. jreicherPlease note I have never said == for strings working the way you say is a bad idea. This is why.
  626. blueThat's quite possible, jreicher. But even with knowledge of the decision's grounds (boundedness), I still think it was the wrong decision. Sure, telling people to just "suck it up and that's how Java does things, and you're a n00b if you don't get it" (dreamreal style), is possible. It's just not very useful.
  627. blueI don't care about being a good or bad Java programmer -- I care about using languages that help me not do crazy nonsense. That's why I use very strict linting rules for JavaScript, because JavaScript has its fair share of brokenness.
  628. nevetI don't care about being a good or bad Java programmer now has karma of -1.
  629. jreicherOK, I'll put in some of my own opinion here. I believe most people expect the runtime of operators to be bounded in any language that does not have operator overloading. (That last bit is important.) So I believe there is an expectation that == should have bounded runtime. You can probably see where I'm going.
  630. jreicherAnd I have some experience with the flip side of this. The number of corporate application problems I have had to deal with because some idiot dev though string comparisons on a database came for free...
  631. blueSo you're talking about runtime optimisations?
  632. jreicherNot optimisations. The fundamental definition of the performance. The predictability of it. The expectation.
  633. blueWell, if such an expectation exists, I certainly cannot see it being used in JS.
  634. jreicherI did say JS has different problems. :)
  635. blueTrue... for example, I don't use the == operator in JS, at all.
  636. blueThe coercion rules are arbitary and an endless source of confusion.
  637. blueI also configure my eslint to only allow boolean expressions in `if`, i.e., no casting. if("foo") would pop up as an error.
  638. jreicherThat's why predictability in language is important. And on the flip of the flip side I'm all in favour of having unpredictable performance in contexts where performance is not the primary concern.
  639. jreicherAnd in those contexts I would be completely on your side about something like the meaning of ==
  640. blue(reason: if ("") "hi" -> undefined; if ("1") "hi" => "hi"
  641. jreicher(probably)
  642. blue(since the real check you want here is probably: if (str !== ""), or better expressed: if(str.length > 0)
  643. blueanyway, yes
  644. bluepredictability is superimportant. overloading operators is very confusing
  645. bluedreamreal at least agreed that + for strings is weird... unfortunately, it's become an almost global standard
  646. jreicherOh interesting. I missed that comment.
  647. jreicherBut what I've been saying probably supports that. It's an operator with unbounded performance. Possibly the only one in Java. (I have to think about that)
  648. blueJS is totally weird on that, btw: [] + [] is ""... that's funky
  649. jreicherI guess you could say "new" is in that category also. I think it's an operator.
  650. bluenew is definitely an operator
  651. jreicherPeople who defend string + probably say it implies new
  652. jreicher...and is right to do so
  653. blueyou know, come to think of it, my real pet peeve isn't even `new`. It's just the fact that `String foo = "foo";` is fundamentally different to 'just' "foo"
  654. blueIOW: we can leave the operator new completely out of the discussion. It's not even the crux of the matter, to be honest
  655. jreicherNot sure I'm following, but you have my interest. Can you elaborate?
  656. blueAs said, consider my example from earlier:
  657. bluetest("foo", "foo") is true
  658. bluetest("foo", "fo"+"o") is also true
  659. blueString o = "o"; test("foo", "fo"+o) is false
  660. bluethere's no `new` involved anywhere here
  661. bluewe've only extracted "o" onto a variable, and broken things with it
  662. bluethat's... unpredictable.
  663. bluethis class of errors can never happen in JS. It's impossible to extract a value to a variable and break stuff with it.
  664. blueit's a category error that doesn't exist in JS
  665. blueAs a programmer, it's important to me to be able to refactor such things with the utter confidence that I'm not breaking anything. Java fails that promise.
  666. blueAs a Java programmer, I now need to be *aware* of the implementation detail of `test`, namely that it uses `==`.
  667. blueBut I can't always do that -- nor should I. `test` might be coming from somewhere else, or I might not even be able to look into it
  668. nevetBut I can't always do that now has karma of -1.
  669. blueoh, shut up! dreamreal fix that nonsense! :P