ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#nevet

  1. jreicher It's funny isn't it. :)
  2. jreicher But to go back to your example, why would "fo"+"o" give a different result from "fo"+o? I'm missing something?
  3. blue jreicher: because of how test is implemented: return a == b;
  4. jreicher I'm still not following. Why would "fo"+"o" return true for that? Have you tried it?
  5. jreicher (I can think of a reason why it might, but I don't think we can assume it)
  6. blue jreicher: https://www.programiz.com/online-compiler/4fAcB0YXIyK2I
  7. nevet See my Java code in action
  8. blue as you can see, this proves that the origin story of a string matters (unfortunately)
  9. dreamreal jreicher: you nailed it - blue is wanting string to be a primitive, and it's not, nor should it be
  10. blue this isn't something an implementer can reasonably track, so he will always use .equals, anyway
  11. dreamreal unless we want to see StringUtils.equalsIgnoreCase(foo) etc
  12. blue dreamreal: that's not a good example; if you want to compare two strings irregardless of case, convert them both to the same case. pretty straight in JS
  13. dreamreal and comparisons, too
  14. dreamreal all those string operations that fall out of natural applications of a string being an object, broken
  15. blue "a".toLowerCase()==="A".toLowerCase()
  16. blue those string operations are stupid!
  17. dreamreal a whole class of exceptional cases just because you want == to apply as it does in other languages that fit a certain classification
  18. dreamreal yeah, argument's over, you just lost it voluntarily, mate
  19. dreamreal "those string operations are stupid" is a rotten argument that a debate judge would toss
  20. blue what exception cases? a.equalsIgnoreCase(b) is just as broken; and equals doesn't justify it
  21. jreicher https://www.programiz.com/online-compiler/2fAcBchE8y3wI
  22. nevet See my Java code in action
  23. jreicher blue: ^
  24. blue easier: a.toLower()==b.toLower()
  25. jreicher Sorry I couldn't think of anything simpler
  26. blue almost just as long, most expressive, and WORKS!
  27. jreicher I hope you see the point I'm trying to make with that code
  28. dreamreal you should write a very very VERY sternly worded email to brian, mark, and james
  29. dreamreal you will have done what you can, and every other java programmer will shrug and move on
  30. blue jreicher: yes; you've made it for the jvm impossible to intern that value
  31. dreamreal jreicher: don't bother, I've already mentioned the interning
  32. dreamreal he doesn't care, he's desperate for ==
  33. blue that makes the criticism all the better: should we really program against implementation details of the jvm? when we think it interns something, when we think it doesn't?
  34. dreamreal wants it to be impossible to derive identity reference equality for strings, or MAYBE just have a special case where you call the identity reference accessor for that case and that case only
  35. jreicher blue: I don't think it's about interning. It's about what the compiler can do statically. It was actually performing the concatenation for you.
  36. blue dreamreal has lost the battle so he's resorting to mudtossing, which is ok; the grown-ups here understand my criticism is valid, and more so, correct
  37. dreamreal we don't think it interns JACK SHIT, that's why you use equals()
  38. dreamreal no, we've been telling you the same thing for days now
  39. dreamreal there's no mud here
  40. bot [jottinger/bytecode.news] New PR #109: Unify docs - https://github.com/jottinger/bytecode.news/pull/109
  41. dreamreal with equals(), the derivation is predictable
  42. blue your only reaction so far was to declare anyone who doubts this, or stumbles upon this, a bad java programmer; you prefer telling people it's THEIR issue instead of acknowledge the language is broken in that
  43. dreamreal objects act like objects, all the way up and down the tree: valhalla will make a class of objects act like primitives
  44. jreicher blue: it's not completely relevant, but when I was an undergrad learning about functional programming I asked the lecturer why the compiler couldn't do more evaluation since there are no side effects. He responded "well most people expect the compiler to terminate..."
  45. dreamreal no, I said they were a newbie java coder who projected other language characteristics on java
  46. dreamreal there's a reason few java coders with more than a week of experience get caught by this
  47. blue dreamreal: if this is one of the things most people stumble upon learning java, then it is a VALID concern
  48. dreamreal it's a burr that gets sanded down really really quickly because EVERY object acts the same, EXCEPT for string concat
  49. dreamreal yeah, I've seen that too
  50. * dreamreal sighs
  51. dreamreal this is why java failed after six months of its initial deployment
  52. blue jreicher: ha, I see!
  53. dreamreal programmers couldn't figure it out
  54. dreamreal they was just too stupid
  55. blue dreamreal: if you got your head out of the sand, you'd realise that in very many circles, java is a red flag
  56. blue I wouldn't call it a successful language at all
  57. jreicher I don't know. Such widespread hate might be a sign of widespread use. ;)
  58. blue it's got some things right -- particularly recently, but it's been a dumpster fire for nearly forever
  59. nevet it's got some things right now has karma of -1.
  60. dreamreal I'm well aware of it, and yet for SOME reason... OMG have you seen my bill rate
  61. dreamreal it's weird
  62. * dreamreal is not rich, but lives in a nice house, has insurance, has a stable job, has a predictable employment cycle
  63. blue here we go, the argument from authority here. *I* do java and *I* earn money with it so it must be amazing!
  64. dreamreal it's failed almost as badly as cobol has
  65. dreamreal tf are you talking about?
  66. dreamreal You made a claim that it's failed because of *reputation* in some circles
  67. dreamreal the counter to that is that its reputation is FINE in other circles
  68. dreamreal that's not arguing from authority, that's contrasting evidence
  69. dreamreal how the hell do you talk in shul
  70. blue java has a *terrible* reputation. Maybe you've mostly been in java circles historically, but in other circles -- it's almost considered a joke
  71. nevet java has a *terrible* reputation. Maybe you've mostly been in java circles historically, but in other circles now has karma of -1.
  72. dreamreal I'm well aware of its reputation in other circles. So what?
  73. blue There's a reason for that
  74. dreamreal Perl is the worst! ... meanwhile perl is doing fine. COBOL is AWFUL! ... meanwhile trillions of dollars file endlessly through cobol programs. Popularity especially among the glitterati is not a measure of success.
  75. blue Part of it is that it's often so very dumb to do basic things, and the language expects you to do something else instead
  76. dreamreal then don't use it! Easy peasy.
  77. dreamreal nobody here gets a puppy if you like java... or loses one if you don't.
  78. blue That's.. not an answer. *sigh*
  79. dreamreal It actually kinda is: you're arguing with a fencepost expecting to win.
  80. dreamreal I mean, nobody here is going to argue that java has no warts. If it had none, there'd be no reason for java 26, yeah?
  81. blue So I can't criticise Java, and if I do, I am either a "bad Java programmer" / "noob", or I should just not use it? That's your retort? Can you use better than a 5-year-old?
  82. blue s/use/do/
  83. dreamreal but the warts it has are survivable and if == is THE WORST FLAW the language has, I'll take it. If you won't, well, that's cool bruh
  84. Chronos blue: The old C programmer in me is *horrified* at the idea of creating new strings in lowercase just to compare them. So much wasted performance and memory! :(
  85. jreicher blue: it depends on the basis for the criticism. I'm very much against the idea of a general purpose language. I don't think it's possible.
  86. dreamreal Pick a criticsm that has more merit
  87. blue it's not the worst, it's *one* of the worst!
  88. dreamreal hell, I'm upset that they're getting rid of the security manager
  89. jreicher So for me the only valid criticism is that Java isn't doing something well AND it's intended for that thing
  90. blue Chronos: ha!
  91. dreamreal Chronos: blue may also be unaware of java's algol heritage :D
  92. dreamreal I dunno
  93. blue "One of the biggest complaints is how much code you have to write for simple things."
  94. dreamreal the other side of ALL of this is that even if EVERY PERSON in this channel were to agree on every facet that Java has flaws X, Y, Z, A, B, and C, ESPECIALLY that dumb ol' string comparison thing, it doesn't make a single bit of difference to the wider java ecosystem, at all: the person who has THE MOST access here is dmlloyd
  95. blue equals(), hashCode(), toString()
  96. blue but YEAH, I AM the ONLY one who has a problem with equals!
  97. jreicher blue: yes, I would never use Java for throwaway or PoC code
  98. dreamreal blue: who says that, please?
  99. blue dreamreal: CHAPPI
  100. dreamreal Who's that?
  101. blue chatgpt
  102. dreamreal let me know when you're thinking for yourself and not echoing a bayesian complaint
  103. blue so you're claiming it's wrong?
  104. blue that it's NOT one of the biggest complaints?
  105. blue because that reflects what I've seen in the last 20 years
  106. dreamreal hell, surial wrote a library to get rid of a lot of that, a very popular one, and java itself mitigated much of it as well with records
  107. dreamreal I'm not claiming it's wrong that many people complaing about it, but using it is like saying "well the protocols say that..."
  108. blue literally the FIRST thing chatpgt writes is VERBOSITY ("Too much boilerplate")
  109. dreamreal Yes, it's quite verbose
  110. blue and mentions `equals` as one of the first things
  111. * dreamreal sighs
  112. jreicher you know chatgpt is just an automated regurgitation of popular complaints from humans...
  113. blue YUP!
  114. blue which confirms what I'm saying
  115. blue next, gemini
  116. jreicher That these are POPULAR complainst, yes.
  117. blue 1. The "Boilerplate" Tax
  118. dreamreal Okay, just to make you happy: OMG you're right, I've never before seen anyone complain about verbosity in a language famous for not making presumptions, it's the worst, how could i have lived this long this way, I knew Java was never going to work, I have no idea how I got nevet running
  119. blue Java is notoriously wordy. Even for simple tasks, you often have to write a significant amount of "ceremonial" code.
  120. dreamreal blue: that information's out of date, BTW
  121. blue Verbosity: Before Java 14’s Records, creating a simple data carrier required manually writing getters, setters, equals(), hashCode(), and toString().
  122. dreamreal records, no more class declarations
  123. dreamreal yes, before java 14's records, it's almost like java still grows and changes
  124. jreicher blue: generics are an early example of Java developing to get rid of boilerplate. That always happened, and is still happening.
  125. dreamreal it's like you're demanding change but no not THAT change, I demand MY change because I can'r wrap my head around == meaning reference equality
  126. dreamreal blue: we are not the right audience for this
  127. blue dude, java 14 previewed records and it came out officially in java 16 (2021). that's FAIRLY new, so before you also thought the language was garbage?
  128. dreamreal No, I was surprisingly able to deploy things well with java 1.02
  129. blue then what are you talking about
  130. dreamreal because I don't see the language as a replacement for the programmer
  131. blue you're just a blind fanboy at this stage
  132. blue I am able to use things like JS whilst fully criticising their issues
  133. jreicher blue: nobody is saying Java is perfect!
  134. dreamreal it's verbose? Oh no, it's like I, as a programmer, have to write code to get something done, guess I'll write code
  135. dreamreal because java suited my needs at the time
  136. dreamreal and still does
  137. blue yes, verbosity is bad, repeating yourself like an idiot is bad and error-prone
  138. jreicher Just because this or that criticism is invalid doesn't not mean there do not exist any valid criticisms
  139. dreamreal we criticize java too, blue
  140. Chronos If anyone thinks Java strings are bad for any reason, have a seat and let grandpa tell you about C strings
  141. dreamreal or let's start talking about dates
  142. blue dreamreal: I've NEVER heard or seen you criticise java, and everytime I do, your hairs stand on end!
  143. dreamreal blue: and?
  144. blue that sounds like involuntary reaction instead of actually interning the criticism and agreeing where agreement is due
  145. dreamreal you criticize things for reasons I find insufficiently severe to be obstructed by
  146. jreicher Well my pet hate at the moment is the lack of a bottom type. I'm really annoyed about that.
  147. jreicher Keep meaning to submit a JEP
  148. dreamreal so wait - what you're saying is you're desperate for people to agree with you?
  149. blue that's ok, then just say, criticism is valid, I just don't care
  150. dreamreal jreicher: what's a bottom type?
  151. blue but if you don't care about ANYTHING, and everything is "so what?", then what are you doing discussing stuff with people to begin with?
  152. jreicher A subtype of all other types. Always the bottom of the type hierarchy.
  153. blue he means an 'any'
  154. dreamreal blue: maybe this will satisfy you: you're right in all ways here, I tend to focus on different things than changing the underlying structure to fit what I need if I can use that structure to get stuff done
  155. blue dreamreal: THANK YOU, now we're finally getting SOMEWHERE
  156. dreamreal hmm, how would that be fundamentally different than a top type?
  157. jreicher An Object parameter will accept anything. A bottom value can be submitted to anything.
  158. jreicher lvalue vs rvalue. That kind of thing.
  159. jreicher Or whatever that generics mnemonic is
  160. dreamreal hmmm
  161. jreicher (That Kotlin built in to the language)
  162. blue dreamreal: in TS, there are three types: `any`, `never` and `unknown`
  163. blue any is stupid because it's both top and bottom. it's basically a copout
  164. blue unknown is a top type
  165. blue never is a bottom type
  166. blue never is assignable to anything
  167. blue unknown is assisnable to nothing
  168. jreicher What's frustrating is that I can't see a reason for Null not to be treated this way. It already exists in the language.
  169. blue or rather, anything is assigned to unknown
  170. jreicher And it's the type counterpart of the fact that null is a value that can be assigned to any reference type variable.
  171. blue let x: unknown; x = 42; x = "foo"; x = null;
  172. blue but: let: x unknown; x.toString(); // error
  173. blue must narrow first: if (typeof x === "string") x.toUpperCase();
  174. blue function fail(): never { throw "a"; }
  175. blue const x: string = fail(); // no problem
  176. blue const y: number = fail(); // same
  177. blue let z: never = "foo"; // error, can't assign anything to bottom type
  178. jreicher Attempting to implement a generic Either type is what made me want this.
  179. jreicher From what I can tell it's not just the right way to do it, but perhaps the only way
  180. * NeXeN joined #nevet
  181. * jreicher joined #nevet
  182. * jreicher joined #nevet
  183. * NeXeN joined #nevet
  184. * jreicher joined #nevet
  185. * nevet` joined #nevet
  186. * nevet` joined #nevet
  187. * nevet` joined #nevet
  188. * nevet` joined #nevet
  189. * nevet` joined #nevet
  190. * dreamreal sighs. breaking stuff is fun!
  191. * nevet` joined #nevet
  192. dreamreal okay, nevet`'s autoconnect to irc is off, that'll stop :D
  193. Chronos Of possible interest: https://poc.bcachefs.org/
  194. nevet ProofOfConcept
  195. dreamreal Chronos: I'm building a "reference UI" for nevet, closing some gaps in the UI services - and getting OTP working. :D
  196. Chronos dreamreal: Woo hoo! \o/
  197. dreamreal it looks like absolute ass
  198. dreamreal but that doesn't matter. I'm able to post content (including anonymously for posts), approve the content, edit it, add comments..
  199. dreamreal What I really want is a *team*, where someone else owns the endpoints and I just make 'em work. But that's not likely for now. :)
  200. dreamreal so I'm basically trying to make it all out of whole cloth.
  201. blue dreamreal: currently you have one clown who uses claude for that, and another clown with a penchant for *fixing reality* before
  202. blue it's always the next release :P
  203. blue but I guess that's good: it's showing me where the software is missing features that are GENERALLY needed
  204. blue anyway I've been busy with my slavework. once I have some time, maybe this weekend, I could possibly try to fast-cut the next primate release and work on the ui
  205. dreamreal no worries and no hurry
  206. dreamreal and seriously, the judgement helps nothing
  207. dreamreal we all have real jobs
  208. blue it's neither: I *want* to do it, but I'm also not happy with the missing puzzle pieces that would allow me to talk to nevet's API properly
  209. dreamreal I just created a new PR, with a working reference UI
  210. blue the openapi code generator has been planned for a while, it's just gained more prominence by an actual use case now
  211. dreamreal the reference UI looks ... interesting, as in "oh, really."
  212. blue dreamreal: why not a wildcard subdomain cert?
  213. blue anyway, looking at the ref impl
  214. dreamreal blue: because that requires, as best I can tell, a CDN
  215. blue it does not. I got a wildcard subdomain configured on RP and I don't have a CDN
  216. dreamreal then maybe that's the way to go - the DNS host stuff recently would also take care of it
  217. dreamreal This is all definitely not in my wheelhouse
  218. blue oh goodness
  219. dreamreal I told you!
  220. blue this is...
  221. blue I'm without words
  222. dreamreal "ass"
  223. dreamreal "awful"
  224. dreamreal "... really?"
  225. dreamreal "This actually works?"
  226. dreamreal "this looks like you threw it together in an hour without knowing what you're doing"?
  227. blue `<link rel="stylesheet" href="/node_modules/@picocss/pico/css/pico.min.css" />`
  228. * blue totally loses it
  229. blue yes, ok, yes
  230. dreamreal hey, this is for *development*
  231. dreamreal the thing is, this actually exposed some backend problems that got fixed as a result, which was the whole point
  232. * blue quotes les christians
  233. blue "and forgive us our trespasses, as we forgive those who trespass against us"
  234. blue well, could be worse
  235. dreamreal the only thing that bugs me is the impression that you've been offended in some way :D
  236. blue offended?
  237. blue I'm NEVER offended!
  238. dreamreal I miss the good old days when http was enough, and https was an affectation
  239. dreamreal "oh look at YOU you're all SECURE like people can't be TRUSTED"
  240. dreamreal meanwhile: people can definitely not be trusted and even https isn't secure, people are awful
  241. Chronos dreamreal: People are why we can't have nice things
  242. dreamreal right?
  243. bot [jottinger/bytecode.news] New PR #110: Adding a locally-working reference UI - https://github.com/jottinger/bytecode.news/pull/110
  244. bot [jottinger/bytecode.news] New issue #111: Improve karma parsing to reduce false positives - https://github.com/jottinger/bytecode.news/issues/111
  245. blue ^ nice!
  246. Chronos Maybe implement a `!karma` command? Then no worries about --, ++, etc.
  247. nevet Maybe implement a `!karma` command? Then no worries about -- now has karma of 1.
  248. Chronos And whoops.
  249. Chronos Karma karma karma karma karma chameleon
  250. bot [jottinger/bytecode.news] New PR #112: Updating karma parsing for some common circumstances - https://github.com/jottinger/bytecode.news/pull/112
  251. * nevet joined #nevet
  252. * dreamreal!~dreamreal@about/java/dreamreal changed the topic to: This is the channel for the development of the software that runs nevet: https://github.com/jottinger/streampack
  253. dreamreal karma is not supposed to require a lot of interaction to record
  254. dreamreal The rules for parsing should be better now
  255. dreamreal I really dislike C++
  256. nevet I really dislike C now has karma of 1.
  257. dreamreal ... or not :D
  258. dreamreal dang it, okay, that's fine, we can track that
  259. * dreamreal!~dreamreal@about/java/dreamreal changed the topic to: This is the channel for the development of the software that runs nevet: https://github.com/jottinger/streampack
  260. * nevet joined #nevet
  261. dreamreal There we go!
  262. dreamreal I really dislike C++
  263. dreamreal or not
  264. dreamreal now let's try it
  265. dreamreal Chronos: ++
  266. nevet Chronos now has karma of 3.
  267. dreamreal I really dislike C++
  268. dreamreal Yep, there we go.
  269. dreamreal This fix required wizardry: "git checkout main"
  270. * dreamreal sighs
  271. dreamreal Okay, I'm off for the day.
  272. * Chronos joined #nevet
  273. * PyR3X joined #nevet
  274. * NeXeN joined #nevet