Skip to main content

Posts

Showing posts with the label go

Large scale ambitions

Learning new things is important for every developer. I've mentioned  this before, and in the spirit of doing just that, I've started a somewhat ambitious project. I want to do a large-scale simulation, using  Elixir  and Go , coupled with a physics simulation in C++. I've never done anything in Elixir before, and only played a little bit with Go, but I figure,  how hard can it be ? Exsim I've dubbed this project exsim - it's a simulation done in Elixir. Someday I'll think about a more catchy name - for now I'm just focusing on the technical bits. Here's an overview of the system as I see it today: exsim  sits at the heart of it - this is the main server, implemented in Elixir. exsim-physics  is the physics simulation. It is implemented in C++, using the Bullet physics library. exsim-physics-viewer  is a simple viewer for the state of the physics simulation, written in Go. exsim-bot  is a bot for testing exsim, written i...

Go, bots, go!

Earlier this year I started experimenting with the  Xmpp   protocol , and implemented bots in Python to communicate with an Xmpp server. I've now revisited those bots and reimplemented them in  Go . I've been meaning to learn Go for quite a while, and this seemed like a reasonable first project to tackle. The source code lives on GitHub:  https://github.com/snorristurluson/xmpp-chatbot If you are an experienced Go developer, I would appreciate any feedback and suggestions on how to improve the code - if you are just starting out with Go like myself, I hope this blog and the code is useful to you. As  before , I'm using  Prosody  to communicate with. Just like I did in Python, my first experiment is to simply open up a socket and poke the server to see where that takes us: func main () { conn , err := net. Dial ( " tcp " , " localhost:5222 " ) if err != nil { fmt. Errorf ( " Couldn't connect " ) } messa...