Threads for elbrujohalcon

  1. 2

    Wow, another great plugin for rebar3! I’m really hoping I can spend some time in Erlang again soon. It seems like rebar3 is becoming comparable to Elixir Mix now. Excellent blog post as well!

    1. 1

      Well… we’re, in fact, looking for senior Erlang devs, if you’re interested.

    1. 2

      Is it time for a Gallegos por el mundo: Software edition?

        1. 2

          I was thinking of this one:

          It was like the Galician version of Callajeros Viajeros. I think there was another version that was just traveling around Spain. (Edit: Duh, it was just called Callajeros.) I think it might have been a type of show more popular about 10 years ago.

          For reference, I’m half Galician, but grew up in the States. Still have family around Vigo and Salvaterra do Minho.

        1. 2

          As a Portuguese speaker, that was a delight to read. Grazas!

          1. 6

            Funny story: my mother tongue is Spanish, but I lived in Brazil for a long time (7 years). One time I was visiting my family back in my home country and over dinner the TV was on in the background. At some point, I made a comment about the topic the show was covering and asked my dad what he thought about it and he gives me this blank stare and says: ‘huh? What are you talking about?’.

            Turns out the TV was set on the TV Galicia channel and nobody was paying attention to it because they didn’t understand the language. Gallego being kind of a mix of Spanish and Portuguese, I had been following the content without issue, assuming it was Spanish.

            It kind of blew my mind that my brain would kind of put it together and I never even notice.

        1. 18

          TLDR: Instead of using length(list) > 0 - which traverses the whole list - use list.is_empty() which in Erlang you can implement using pattern matching with [_|_] which looks like a robot butt.

          1. 2

            With help from Filipe Varjão in Twitter, I now added a TL;DR directly into the article.

            Nobody can say that I don’t listen to my readers :P

            1. 1

              I read the article thinking I was going to learn some obscure new fact only to find that it was explaining a simple concept I knew in a far more complicated way. This TLDR comment is better explanation.

              Also, why, in a blog post, are single letter variables used? I can understand using them in the shell for experimentation but in a blog post they only make the Erlang syntax more obscure and hard to understand. We should be trying to make Erlang syntax as readable as possibly by using VeryDescriptiveVariableNames.

              1. 3

                I read the article thinking I was going to learn some obscure new fact only to find that it was explaining a simple concept I knew in a far more complicated way.

                I think you put too much trust in my blog writing… and I appreciate that :)

                This TLDR comment is better explanation.

                Of course, since the article is not just an explanation. It’s also a joke and a funny story and a rumbling… or a combination of all that.

                Also, why, in a blog post, are single letter variables used? […] VeryDescriptiveVariableNames.

                Because I’m super-lazy and the variable names were not the point of the article. But don’t worry, I went in and extended the variable names now, they are NotSuperVeryClearYet, but it doesn’t really matter… Nobody looks at the variables when there is a super-sexy robot butt in front of them ;)

              2. 1

                I don’t think you can use a user-defined list.is_empty in guards, though.

                1. 1

                  You can’t, you can match against [], tho.

                  1. 1

                    I’m a little disappointed erlang doesn’t have is_nonempty_list/1 which would play nicely with dialyzer, too.

                    You can build such a guard in elixir:

                    defguard is_nonempty_list(l) when is_list(l) and l != []

                    Likewise disappointed it’s not in the Kernel module

                2. 1

                  Why does Erlang not carry this information as a class attribute?

                  1. 7

                    Because lists are not a class, in Erlang. As a matter of fact, lists are just a human construct in Erlang. The language only provides a basic element with no particular meaning ([]) and a way to link two things together: The cons operator ( […|…]). The standard library (OTP) provides a module to use that cons operator to build lists by always putting a list on the second element of it and understanding [] as the empty list. So… if you use the functions in the lists module, it’s assumed that you will pass lists (i.e. things constructed by applying cons 0-N times over []), but in reality… nothing prevents you from using lists functions on things that are not actually lists…

                    1> lists:sublist([a | [b | [c | []]]], 1, 2).
                    2> lists:sublist([a, b | [c]], 1, 2).
                    3> lists:sublist([a,b,c], 1, 2).
                    4> lists:sublist([a,b|{something, that, is, "not a list"}], 1, 2).

                    In a nutshell: [] and […|…] are basic building blocks of Erlang. Everything else (e.g. […, …, … | …], […, …, …], etc.) is just syntactic sugar.

                1. 8

                  I know it’s off-topic because the article is great but names like “robot butt” make me wince and/or cringe, just feel a little gross.

                  1. 12

                    Then you will love The Goatse Operator =()=!

                    1. 3

                      OH NO

                    2. 1

                      Sorry about that, not a native speaker myself =/

                      1. 11

                        Should’ve been robutt

                        1. 10

                          I’m a native speaker and I think “robot butt” is hilarious. Humor is subjective. I’ll grant that “robot butt” is perhaps somewhat unprofessional, and if I worked in an Erlang shop I might not share this with my coworkers for that reason, but don’t take the criticism too personally.

                      1. 3

                        Great work!

                        How robust is this for detecting usage via things like apply/3?

                        1. 2

                          So far, there is no rule to check function usage and therefore we didn’t need to consider that case. We didn’t add rules like that because that’s already covered by xref.

                          1. 2

                            Oh, very cool. I didn’t know xref could be used like that.

                        1. 3

                          How hard would it be to implement something equivalent for Elixir? Or is there already something like this for Elixir?

                          1. 3

                            Nothing like this exists for Elixir, AFAIK. We’ll need some different rules, tho.

                          1. 9

                            Organizing spawnfest !!!

                            1. 4

                              Besides a couple that are already mentioned (like Alan Kay and Rands)…

                              • Hernán Wilkinson. He radically changed my view on what my job (and now my passion) is. He also lead me to the discovery of other great role models (like Alonso Church, the father of lambda calculus). Hernán and his pals have and promote my favorite way to organize a company. If you have some time to spare, you should check how 10Pines works.
                              • Robert Virding. I had the amazing luck to work with him, teaching one of the languages he has created (Erlang). He is such a smart but down-to-earth fellow, he transpiles that inspiring feeling of I’m no special, you could totally do what I did. Just put yourself into it.
                              • Jordan Mechner. I could never understood (even after reading the books) how two floppy disks could contain such an inmersive experience as Prince of Persia. I’m not a game developer nor a UI expert by any means, but I always admired the talent of people that can do so much with so limited resources.
                              1. 3

                                I was fortunate enough to be Hernán’s boss for a couple years and we’ve remained friends.

                              1. 3

                                My desktops. In them:

                                • Sublime Text with wpool
                                • iTerm2 with top, a pinger, a server running and some other consoles
                                • inaka’s slack
                                • Musicmatch with a Megadeth song 🤘
                                • Toggl
                                1. 4

                                  Hey, I recently (not a week ago) give a talk about my experience on this (I moved from developer to manager and back again twice in my career already): Notes are in Spanish, sorry. A much much earlier version of this talk was recorded here, too:

                                    1. 1

                                      I don’t think I star hundreds of repos, but I starred plenty of them I don’t contribute to, just because I use Sibell to be notified of their releases ;)

                                      1. 1
                                        • I organized conferences and events
                                        • First half of the year, I worked as the CTO of a great company
                                        • Last half of the year, I went back to programming and now I’m building considerably complex software for Real-Time Bidding servers
                                        1. 3

                                          From my personal experience organizing EFLBA this year and watching Monika organize many Erlang factories over the years:

                                          • Preparing the bags and swag is not a simple task. You have to schedule some time for it in advance, talk to your sponsors about how to gather the stuff (particularly in Argentina, remember customs are tricky, to put it lightly).
                                          • You will need volunteers for the day of the conference. You might have a nice team, but you and your team will also be exhausted from the stress of the last days prior to the event and willing to watch some talks or even speak or present them. Volunteers are an invaluable help to deal with the minor tasks through the conference.
                                          • Gather feedback! All the feedback you can. From speakers, from the audience, from your co-organizers, even from the tech crew. It’s super important, being this your first conference, to learn from it. And on this topic, you have to get the feedback as fresh as you can. If you wait for a week after the event to send a survey… nobody will reply.
                                          • If the event is in Buenos Aires, don’t forget that everybody working on the event (even the volunteers!) must have insurance. And insurance here is not a cheap nor an easy thing to procure. Plan for it in advance.
                                          • Hire a professional tech team. Recording the conference/talks properly goes a long long way to promote the next year’s version of it. Check the videos of EFLBA, they have links to the tech team if you want to hire the same one.
                                          • Don’t forget speakers’ dinner (especially if you have international speakers). To care for your speakers is super important. In most cities, there are many things you can tour around for free, and that would be a plus for anybody visiting the city for the first time.
                                          1. 3

                                            Thanks for running this u/elbrujohalcon. It was a super fun two days!

                                            1. 1

                                              Thank you for participating :)

                                              1. 2

                                                Thanks again for throwing it. :)

                                            1. 3

                                              Besides HackWeek at the company where I work (where I will be refactoring a couple of libraries that became too entangled over time), I’ll be getting everything ready for SpawnFest.

                                                1. 5

                                                  I read this, waiting for some kind of story payoff, and it never hit. Basically, instead of fixing an error it was embraced and became a joke. As far as I can tell, it was never fixed. I didn’t get any insight into even trying to find the error, nor did I get much about the culture, that is, how it became a joke.

                                                  In short: huh?

                                                  1. 3

                                                    Thanks, Geoff.

                                                    Yeah, the error was never fixed, mostly because it was not a single error. It was a group of errors: -0// was the symptom of something going terribly wrong and totally untrapped somewhere.

                                                    I’m not really interested in discussing how we debugged the many different situations in which -0// appeared and of course I don’t even remember most of them.

                                                    Nevertheless, I’m super happy to expand on how it became a joke as much as needed. I’m just not sure what to say. So, what would you recommend I add to make the culture part more complete and interesting? Any particular questions you think I can answer to give a better view of the cultural implications of -0// would be much appreciated.

                                                    Thanks, again.

                                                  1. 2

                                                    I think if I were to relive my Erlang education, it would be to go against the severely pushed agenda of `no matter what, use behaviors from the get-go.’ gen_server is a great pattern, but it feels counter to everything functional programming and for that matter concurrent programming is all about. Sure, now knowing how the behaviors are implemented, it all fits, but for the first while, the behaviors felt magical (like OOP), stateful-feeling-ish (like OOP), and imperative (after all, 1. a gen_server is embodied within a single named process, despite that Erlang touts: go ahead, create millions of processes; 2. the most common thing to do with said servers is use =call= which is blocking/synchronous). In the end, of course, use the behaviors, but just blindly using them from day-one is a crappy lead-in to Erlang/OTP, and probably comes with many hidden costs as far as how fast & deep one learns the paradigms of FP and all things OTP.

                                                    1. 1

                                                      I can’t agree more with this feeling. It is, in part, the inspiration behind this blog post. The idea is to first find the problems, try to solve them, figure out they’re always the same ones and somebody before you found them too, and only then using the tools that solve most of the problem for you and write your specific code.