jdev - 2019-11-11


  1. debacle

    Which is the best XMPP library for golang? No abandonware, please. (cross-question with xmpp:golang@conference.samwhited.com?join)

  2. jonas’

    I use mellium.im/xmpp

  3. debacle

    jonas’ anything good or bad to say about it? :-)

  4. debacle

    is it like aioxmpp, but in golang?

  5. debacle

    I also found Jackal, the XMPP server written in Go, which does not seem to use an external XMPP library. Interesting.

  6. jonas’

    debacle, it was the least bad I could find

  7. jonas’

    but they’re all incomplete and rather low-level

  8. Zash

    debacle: Got some project or looking for XMPP things to package?

  9. debacle

    Zash I start to get interested in golang. It looks like a pretty boring and not so well-designed language, but I need something to kill Python on a low-RAM system. Development must be easy and cheap, like Python, not difficult and expensive like Rust or Erlang. Maybe I should consider Lua :-)

  10. debacle

    jonas’ thnx!

  11. jonas’

    I don’t think you’ll achieve a low memory footprint with golang

  12. debacle

    jonas’ compared to Python?

  13. jonas’

    not sure

  14. Zash

    Go uses GC right?

  15. jonas’

    but depending on what you’re doing you won’t be happy with the golang libraries I’ve found so far because of lack of features

  16. jonas’

    it does

  17. jonas’

    but also scoping magic to avoid the GC if possible

  18. jonas’

    main concern would be static linking here, footprint-wise

  19. Ge0rG

    just use node.js instead? :D

  20. debacle

    jonas’ we would probably use gccgo with dynamic linking. Anyway, as long as libraries are used only once in the system, it doesn't matter, right?

  21. debacle

    static linking is such a bad idea, that's probably the worst aspect of Go

  22. jonas’

    debacle, yeah, but remember that vanilla go brings the go equivalent of libc and stuff

  23. jonas’

    that’s stuff you’d normally save

  24. Ge0rG

    dynamic linking is the benefit of the established frameworks

  25. debacle

    jonas’ the Python ecosystem is very advanced and I feel like a spoiled child when I look at other ecosystems Ge0rG only that node.js is a chemical waste dump, not an ecosystem

  26. Ge0rG

    debacle: you'd be surprised about who lives in chemical waste dumps.

  27. debacle

    jonas’ sure, the standard libary itself might be huge

  28. jonas’

    debacle, I agree

  29. jonas’

    (although I do like myself some C++)

  30. debacle

    golang has been invented out of hate towards C++ :-)

  31. debacle

    Ge0rG JS developers maybe? (jc isn't around, is he?)

  32. jonas’

    and I recently ported a golang thing I wrote to C++ out of annoyance with golang, because as you said: "pretty boring and not so well-designed language"

  33. debacle

    jonas’ it's an outsider view of course. I did not even compile my helloworld yet :-)

  34. Zash

    Go seems like Java levels of Meh to me.

  35. jonas’

    debacle, I did write some golang code: https://github.com/horazont/dragonstash-golang https://github.com/horazont/prometheus-xmpp-blackbox-exporter

  36. debacle

    ah, yes, prometheus, one of the golang poster children

  37. zinid

    > not difficult and expensive like Rust or Erlang This is called education - you learn new and sometimes difficult things in order to be more productive later

  38. Kev

    It's not wrong, though. Both of those are more expensive to learn than most languages.

  39. Kev

    (Because they try to do something that most languages don't, of course)

  40. Zash

    Java and Go must be the cheapest then?

  41. Kev

    Java's probably about the pinacle of cheap to learn, yeah.

  42. zinid

    I don't find Java simple at all

  43. zinid

    Erlang is much more simpler, back then I tried to learn both and ended up with Erlang, at least for my task

  44. Zash

    Who said anything about simple?

  45. zinid

    cheap to learn, okay

  46. pep.

    What does that mean

  47. zinid

    pep.: less time spent learning?

  48. zinid

    at least as I understand it

  49. pep.

    Also, that all depends with what you started anyway. I started with OCaml, it took me quite some time to get into python

  50. Zash

    Probably something something time from being hired to being productive

  51. zinid

    pep.: I agree, after 5 years of math in the university functional languages are closer to me

  52. debacle

    zinid What I meant: I assume, that Erlang and Rust are better™ than Go, but companies care about $/h and time to market. Go has cheaper, faster devs and is still good enough for many projects.

  53. zinid

    debacle: I disagree, but whatever

  54. Zash

    As in, you can grab kids from school and have them typing Go or Java in no time

  55. pep.

    Zash, because they've already gone through the process of learning Java, and that took them all their school years?

  56. guus.der.kinderen

    Is OOP even the go-to paradigm in schools these days?

  57. guus.der.kinderen

    (small pun intended)

  58. Zash

    Who knows?

  59. guus.der.kinderen

    People that are either still in school or are familiar with courses?

  60. MattJ

    Multi-paradigm languages are where it's at

  61. Zash

    Lua?!

  62. pep.

    OCaml :-° (even though object is meh in it, and even if imperative is possible it's definitely not for that)

  63. jonas’

    I got punched in the face with waterfall-model-OOP development as late as 2013 in university, soooo...

  64. guus.der.kinderen

    (that's almost 7 years ago)

  65. jonas’

    guus.der.kinderen, thanks for reminding me

  66. jonas’

    also, I’m pretty sure that they still do the same thing t here

  67. jonas’

    they are very resistant to change

  68. jonas’

    and allegedly have some ties to the proprietary UML stack we were forced to use for every step of the implementation.

  69. guus.der.kinderen

    hah!

  70. guus.der.kinderen

    That, I recognize

  71. guus.der.kinderen

    we had to follow design paradigm that was developed by one of the professors.

  72. jonas’

    ... when they wanted our group (there were groups to implement various software projects) to give a presentation about the thing we did the following year, we politely declined via email with a picture of Tux attached.

  73. jonas’

    fun times.

  74. moparisthebest

    a Norwegian I know that's still in University is learning primarily Java

  75. jonas’

    oh, yeah, of course that was all java

  76. jonas’

    the language of waterfall-oop

  77. jonas’

    the professor was also very proud of being at companies for $reasons aaaaall the time. so good.

  78. Zash

    Should I be glad I don't know what waterfall is?

  79. pep.

    You probably know what waterfall is

  80. jonas’

    what pep. says, and if you don’t, yes

  81. jonas’

    waterfall is when you strictly separate phases like "design", "implementation", "testing" in your ... product ... development ... lifecycle.

  82. jonas’

    don’t pin me on the terms

  83. jonas’

    I tried to flush this out of my brain like a waterfall.

  84. Zash

    Opposite of agile? Or scrum? Whatever those are?

  85. jonas’

    yeah, pretty much that

  86. pep.

    Zash, yeah that

  87. jonas’

    I only survived that course with mpv --loop=inf The\ Big\ Lebowski.medium

  88. pep.

    Basically something without a feedback loop

  89. pep.

    (or too late)

  90. debacle

    jonas’ you are probably right: golang is not a solution to safe RAM. libgo.so has 37 MiB on our systems. libc.so is 1.3 for comparison. OTOH, a statically linked hello.go executable has "only" 5 MiB. Write in C, write in C, golang's not the answer, write in C.

  91. rion

    C++? =)

  92. moparisthebest

    as far as I'm concerned C++ is like Cobol now, only reason to write it is maintenence of ancient bad systems, no reason to prefer it over Rust if there is an option

  93. jonas’

    moparisthebest, library support is a good reason to use C++

  94. moparisthebest

    that implies using C++ libraries is good :P

  95. jonas’

    if there are no rust implementations, sure

  96. jonas’

    there’s still no proper fuse thing for rust for example

  97. jonas’

    (and then there’s of course still the extremely toxic rust community.)

  98. zinid

    jonas’, why toxic? they are funny, Rust Strike Force

  99. zinid

    there is only Rust exists, resistance is futile

  100. moparisthebest

    toxic? I had the opposite impression, that they are too hand-holdy

  101. jonas’

    moparisthebest, they’re just like the matrix folks, whenever there’s even a slight mention of a non-rust thing you have the rust brigade up and running and yelling "RIIR RIIR!!!"

  102. jonas’

    without reason

  103. jonas’

    this makes it seem as if the language coudln’t surive without the RIIR brigade...

  104. moparisthebest

    ah ok you mean the rust advocates, yea that's fair, I meant more the "mission statement" or whatever https://www.rust-lang.org/ "A language empowering everyone to build reliable and efficient software." SO EMPOWERING

  105. jonas’

    I don’t care about extra fluff or plush

  106. jonas’

    seems like they need it.

  107. moparisthebest

    I just mean, personally, I've been through my "hope this runs correctly" (python/js) phase, been through the "hope this doesn't segfault" (C++) phase, and Rust is far far better, again personally :)

  108. moparisthebest

    I find it actually ends up being faster from "start coding" to "runs and works" than other langs

  109. zinid

    what languages did you try?

  110. zinid

    you can try any type-safe language with GC, this will be much more productive than fighting with borrowing or weak refs in cyclic structures

  111. moparisthebest

    it actually isn't though, my day-job language is Java

  112. zinid

    hell, yeah, java is safe as fuck, with NPE 😉

  113. moparisthebest

    that's another point for Rust :) all the other mentioned langs also have NPE right?

  114. zinid

    I don't remember what I mentioned 😉

  115. zinid

    but ocaml or haskell don't have NPEs 😉

  116. zinid

    Rust was initially written in OCaml by the way

  117. jonas’

    relevant: https://www.youtube.com/watch?v=ENqiuLWZNQg&t=1m11s

  118. zinid

    jonas’, LOL

  119. pep.

    :D

  120. pep.

    I'm glad NPE exists, otherwise I would have never listened to this

  121. moparisthebest

    > fuzzing UTF-8 strings pro-tip: Ⱥ (U+023A) and Ⱦ (U+023E) are the *only* code points to increase in length (2 to 3 bytes) when lowercased.

  122. moparisthebest

    totally not a dumpster fire

  123. Zash

    Eh, so?

  124. Zash

    a > A

  125. Zash

    deal with it

  126. moparisthebest

    like if some code naively allocated the same number of bytes to write a lowercase version of a string into, or even tried to do it in-place

  127. moparisthebest

    there is bound to be C or C++ out there that does this

  128. Zash

    bad code gonna be bad