Chat Logs

  1. cheeserexcept there are no bots allowed here.
  2. cheeserbut yeah. it looks like the web part is busted.
  3. NeXeNone could have their client message a bot that's in no channel, the entire time, to keep a log then
  4. * NeXeN shrugs. not difficult technically. i dunno about the bot tho, probably some cloudflareups
  5. cheeseror just have your client log it like i have for decades.
  6. NeXeNhey i need to do some research
  7. cheeserthe bot's web interface is fucked because it uses an old dropwizard and the logging libraries don't work with it. i don't wanna fix because i'm actively (as in, in another tab in my terminal) replacing that UI as we speak.
  8. NeXeNcool, i wanna see it
  9. cheeserthe UI itself is "done." i just have to fix the oauth stuff that's there.
  10. cheeserthen probably the UI could use a new skin
  11. NeXeNwhat is the fe? vaadin or react/vue/angular ?
  12. NeXeNor just vanilla cheese(r)
  13. * NeXeN suddenly gets a craving for cheese cake
  14. dreamrealThere ARE logs for #java, just not through javabot for now
  15. cheeserfreemarker. 0ld sk00l
  16. cheeserit's going to be quarkus/qute, though.
  17. sbalmoscheeser: What was it before Freemarker? I forget what it was called, and I used to work with it too.
  18. sbalmosWicket! It just came to me
  19. jreichercheeser: do you prefer freemarker over mustache? Or did mustache just not do enough?
  20. NeXeNcheeser: hey you know.....if something works it works....if you're confident in it then it's a good target
  21. cheeserjreicher: this UI code is *old* :)
  22. NeXeNlegacy isn't a four letter word, it's a track record
  23. NeXeNi will have to say i have used vaadin and it's pretty good. it's not the best in the world for everything but it makes dashboards, consoles, and various apps that fit a standard format (content sites) that makes it easy to spin up stuff knowing nothing but java. it's a little like swing/javafx so those skills kinda port over
  24. NeXeNno need to know any front end or js, and you can get typesafe all the way up and down
  25. hassoon'morning
  26. jreicherI hope not. I'm on my third glass of wine.
  27. ParaYou can get your daily dose of natrium by drinking 45,5 kilograms of wine.
  28. nimajeBut you would overshoot your daily dose of sugar by a factor of 4 or something, I don't think thats a good idea
  29. jreicherI'll try it and let you know
  30. ParaHmm, maybe do lots of cardio to offset the carbs?
  31. ParaI think something like 160 hours should do it.
  32. jreicherThere's carbs in wine?!
  33. ParaWell it sure ain't protein.
  34. jreicherI know. I drink white russians for that.
  35. dreamreal~69
  36. javabotdreamreal, 69 is the expected class file format version number of class files emitted when compiling targeting Java 25, which is expected to be released in September 2025. Nice!
  37. ernimrilhmmm, a bit out of date
  38. pr070calhi guys i need some help
  39. pr070calive made an arraylist that take an array of objects
  40. pr070cali write the objects into the array ("", "", "", "", "")
  41. pr070calthen i add the array to the arraylist arrList.add(values)
  42. pr070calwhen i print value[0] after ive written to it i can see it has the correct value
  43. pr070calif i print this System.out.println((((Object[])arrlist.get(i))[0]));
  44. pr070calthe value is always the same the last element i set it to for all 991 of them ?
  45. pr070calhttps://www.irccloud.com/pastebin/4J0RxuUB/
  46. nevetSnippet | IRCCloud
  47. pr070calit prints
  48. pr070calMLK-USDT
  49. pr070calMLK-USDT
  50. pr070calMLK-USDT
  51. pr070calMLK-USDT
  52. pr070calMLK-USDT
  53. pr070calMLK-USDT
  54. pr070cal900 times
  55. pr070calbut System.out.println(values[0]);
  56. pr070caloutputs
  57. NeXeNok, first off. use a pastebin if you're going to paste
  58. pr070calhttps://www.irccloud.com/pastebin/9nWmL9dO/
  59. nevetSnippet | IRCCloud
  60. NeXeNi look up and you've posted 50 lines
  61. pr070caldo you know what is going wrong here
  62. jreicherpr070cal: to begin with I would recommend not using casts, as a general rule. It stops the compiler telling you about your mistakes.
  63. jreicherWhat happens if you remove the cast?
  64. pr070calit says it must be resolved as an object
  65. pr070calthey are all stings though
  66. jreicherExact error please
  67. pr070calthe last one is just repeated over and over again
  68. jreicherI think we need to talk about precisely what the error means, which depends on knowing its exact wording, so if you could provide that...
  69. pr070cali added after this arrlist.add(i, values);
  70. pr070cal System.out.println((((Object[])arrlist.get(i))[0]));
  71. pr070caland it prints al the correct variables
  72. jreicherThe error please
  73. jreicherAfter you've removed the cast
  74. jreicherYou should not use casts
  75. NeXeNok the values array look
  76. NeXeNwhere is it defined? somewhere outside the loop?
  77. NeXeNyou don't need toString() on a getString() btw since it's already string. but now look at this line, arrlist.add(i, values); ?
  78. NeXeNyou're adding the exact same values array refrence to the list on every iteration
  79. NeXeNat the end of the loop, every single index in arrlist points to the same memory address
  80. NeXeNlike jreicher pointed out the complex and unsafe casting
  81. pr070calbut i increments
  82. pr070cali just added that in to make sure it iterates
  83. pr070cali was using add()
  84. pr070calit all works if i print the value straight after i set it
  85. pr070calits only after the for loop when i check the array
  86. nimajeand where do you *set* values? (set not modify)
  87. NeXeNif you instantiate values inside the loop it will work
  88. jreicherpr070cal: have you removed the cast, and if you have an error, what is it?
  89. NeXeNString[] values = new String[1]; or something
  90. jreicherThere might still be other problems, but a compiler error is the easiest one to solve, because the compiler is helping.
  91. NeXeNSystem.out.println(((String[]) arrlist.get(i))[0]) then i think, is what you will ...hold on did i miss a parens?
  92. nimaje(but why would you even have that as an array if you only care about one element from it?)
  93. NeXeNyeah, but my point is that's why it's printing the same thing 900 times
  94. NeXeNyou're simply just assigning the same reference over and over
  95. NeXeNpr070cal: what is this for, what are you trying to accomplish? are you avoiding using an ArrayList ?
  96. pr070cali had to add this inside the loop Object[] values = {"","","","","","","","","",""};
  97. pr070calthanks guys
  98. pr070cali would have never have thought it a reference to the array[]
  99. NeXeNyeah but you can do better
  100. nimajewhere would you have expected the copy? And why Object[] when all you store in there are Strings?
  101. pr070cali have doubles too
  102. pr070caland integers
  103. pr070calwhy doesnt it store the values into the arraylist
  104. pr070cali mean if it has to set a pointer
  105. pr070calwhy doesnt it just add the value in there
  106. nimajethe value is a reference to the array `values` you pass it
  107. nimajeand you probably want to write a record or a class instead of hammering your data into an Object[]
  108. NeXeNyeah a custom record would save you headaches
  109. NeXeNyou can group mixed types in a record
  110. NeXeNok, so this is how i would build a record if i had those various data types and i wanted to decompose a json object and create a record for type safe use, which is what you seem to be trying to do: https://paste.linux.chat/?cdc263ea989c545c#GtRBn6EfmKM3bENmW6ux7WUR88hsv79V2US3kiKC6dYD
  111. javabotNeXeN's title: "Linux.Chat PrivateBin"