News for hackers. Stuff that matters.
Re:Show HN: Jackal – XMPP server in Go by Boulth on Tuesday May 08, 2018 @11:13AM (#17021447)
This is really interesting. As far as I know there are only two servers that power the majority of public instances and both of them have weak type systems.
Re:Show HN: Jackal – XMPP server in Go by ktosobcy on Tuesday May 08, 2018 @02:48PM (#17023602)
There is Tigase (http://tigase.net) written in Java with public instances tigase.im/sure.im
Re:Show HN: Jackal – XMPP server in Go by kiliankoe on Tuesday May 08, 2018 @11:23AM (#17021544)
I assume you're referring to ejabberd (erlang) and prosody (lua)?
Re:Show HN: Jackal – XMPP server in Go by Boulth on Tuesday May 08, 2018 @01:04PM (#17022531)
Yes.
Re:Show HN: Jackal – XMPP server in Go by asabil on Tuesday May 08, 2018 @03:41PM (#17024145)
Since when Erlang is weakly typed? It is dynamic strongly typed.
Re:Show HN: Jackal – XMPP server in Go by jerf on Tuesday May 08, 2018 @03:55PM (#17024288)
The type of strong typing that Erlang has is not a useful definition of the term, as the only weakly-typed language in current use would be assembler. By any other useful definition of the term, Erlang is weakly typed. Erlang + Dialyser can be read as incrementally typed, if you follow my idiosyncratic view of considering the entire programming environment in such decisions rather than just the language itself, but I don't think that's a majority viewpoint, and still doesn't yield a strongly typed language... just an incrementally typed one.
Re:Show HN: Jackal – XMPP server in Go by hauleth on Tuesday May 08, 2018 @04:23PM (#17024644)
As far as I know there is no way for Erlang to automatically cast between types (except numeric, but these are treated as one type with variants), so by any definition that I know it is strongly typed language. Dynamically typed, yes, but strongly.

About other languages that are weakly typed in "current use":

- JavaScript is still weakly typed as far as I am concerned, nothing prevents you from 0 == "" and get true value. - PHP is still weakly typed, with optional type hinting but still sometimes can bite you in the ass

Erlang + Dialyser can be read as quasi-static typing, but it is still strong one.

Re:Show HN: Jackal – XMPP server in Go by funkaster on Tuesday May 08, 2018 @12:04PM (#17021975)
What about openfire[1]?, written in java.

[1]: https://www.igniterealtime.org/projects/openfire/index.jsp

Re:Show HN: Jackal – XMPP server in Go by Boulth on Tuesday May 08, 2018 @01:12PM (#17022609)
I know that it exists but have never seen it in the wild. It's probably used by closed enterprises. If I was in charge there I'd use ejabberd, and Prosody if having less than 50 users.
Re:Show HN: Jackal – XMPP server in Go by sam_goody on Wednesday May 09, 2018 @04:58AM (#17028361)
We use Openfire, after running eJabberd for a while and having too many issues (I actually learnt some Erlang just to fix one of the bugs).

We have two uses. 1. Web based per-page chat for all our logged in users, then using Candy+ejabberd/openfire, but now using a custom node socket based chat server. 2. Internal chat still on Openfire. Have thought of checking out Zulip/Mattermost et al.

Never tried Prosody, and feel that xmpp never got the client thing quite right.

Re:Show HN: Jackal – XMPP server in Go by lucian1900 on Tuesday May 08, 2018 @11:30AM (#17021629)
Go's is not much stronger either. It hardly makes any difference.
Re:Show HN: Jackal – XMPP server in Go by Thaxll on Tuesday May 08, 2018 @12:56PM (#17022462)
You don't known what you're talking about, did you even bother search interface {} in the code?
Re:Show HN: Jackal – XMPP server in Go by erik_seaberg on Tuesday May 08, 2018 @04:49PM (#17024918)
Here are methods that store and retrieve … something, probably. The author had to make up method names because map[string]interface{} doesn't have an interface we could satisfy.

  func (ctx *Context) SetObject(object interface{}, key string) { … }
  func (ctx *Context) Object(key string) interface{} { … }
Here a caller has to provide a method that takes an arbitrary number of … whatever.

  type rowScanner interface {
  	Scan(...interface{}) error
  }
Re:Show HN: Jackal – XMPP server in Go by icholy on Tuesday May 08, 2018 @01:51PM (#17022958)
Keep telling yourself that