ainar-g's recent activity

  1. Comment on Programming Q&A Thread in ~comp

    ainar-g
    Link Parent
    “Good Design” is an overloaded phrase. How do you define it for your personal projects?

    “Good Design” is an overloaded phrase. How do you define it for your personal projects?

    4 votes
  2. Comment on Programming Q&A Thread in ~comp

    ainar-g
    (edited )
    Link Parent
    EDIT: Forgot to add: you can ask me any questions regarding Go development. I'll gladly respond. I think reposts from other threads are okay, as long as you repeat the question in your post, so...

    EDIT: Forgot to add: you can ask me any questions regarding Go development. I'll gladly respond.

    I think reposts from other threads are okay, as long as you repeat the question in your post, so that people don't have to follow the link.

    Awesome. I'm actually right in the middle of trying to choose which one I should learn.

    I'd love to have a conversation with people here who already use one or (ideally) both ... any informed opinions?

    I am a professional Go developer, and I love Go. I've dabbled a little bit in Rust, and I've already written here about Rust before. In short, my opinion is that Rust is still growing, and there is a big chance that the code you write right now will have to be rewritten later, when async/HKT/constexpr/what-have-you becomes a part of the next edition.

    With that in mind, I would recommend learning both. Because they are very different languages with philosophies that are sometimes complete opposite of one another. Both will make you a better programmer, in different ways.

    In fact, don't stop there. Learn C. Learn Scheme. Learn POSIX shell. Tinker and explore. Solve real problems. Then solve them better, with less parts. Follow guidelines. Then write your own.

    3 votes
  3. An experiment I've been thinking about lately: a (recurring?) Q&A thread! Ask any questions about programming, answer other users' questions, or post suggestions for future threads. Don't forget...

    An experiment I've been thinking about lately: a (recurring?) Q&A thread! Ask any questions about programming, answer other users' questions, or post suggestions for future threads.

    Don't forget to format your code using the triple backticks or tildes:

    Here is my schema:
    
    ```sql
    CREATE TABLE article_to_warehouse (
      article_id   INTEGER
    , warehouse_id INTEGER
    )
    ;
    ```
    
    How do I add a `UNIQUE` constraint?
    

    Meta questions:

    • Should I turn this into a recurring thread?
    • If yes, should it be a weekly or a monthly thing?
    • Should DBA and SysAdmin questions be allowed or should someone else make a separate recurring thread for these?
    15 votes
  4. Comment on What are you doing this weekend? in ~talk

    ainar-g
    Link Parent
    Well, pooping from the clouds would be very impolite towards the people below :-P

    Well, pooping from the clouds would be very impolite towards the people below :-P

    2 votes
  5. Comment on What are you doing this weekend? in ~talk

    ainar-g
    Link Parent
    Good luck! I've switched from clomipramine to imipramine this Friday. So far, nothing, which is better than having side effects, I guess. We'll see in a week.

    Good luck! I've switched from clomipramine to imipramine this Friday. So far, nothing, which is better than having side effects, I guess. We'll see in a week.

    2 votes
  6. Comment on Brainstorm - Vietier (Wind) in ~music

    ainar-g
    Link
    Brainstorm (aka Prāta Vētra) are a Latvian band who sing in English, Latvian, and Russian. This is one if my favourite songs from them. There is also an English and a Latvian version. But I prefer...

    Brainstorm (aka Prāta Vētra) are a Latvian band who sing in English, Latvian, and Russian. This is one if my favourite songs from them. There is also an English and a Latvian version. But I prefer the Russian one. Probably for obvious reasons ;-)

    I hope you enjoy.

    1 vote
  7. Comment on Chris Kogos - Sonic & Resonance (HOME Cover) in ~music

    ainar-g
    Link
    This sounds especially nice at 150 % speed.

    This sounds especially nice at 150 % speed.

    1 vote
  8. Comment on Calculating Actual Build Dependencies in ~comp

    ainar-g
    (edited )
    Link Parent
    (You probably already know all that, but I've decided to write this comment anyway for the readers who don't.) Re. idiosyncrasies: if we're talking POSIX make, $(XX) or ${XX} expand to the value...

    (You probably already know all that, but I've decided to write this comment anyway for the readers who don't.)

    Re. idiosyncrasies: if we're talking POSIX make, $(XX) or ${XX} expand to the value of the macro named “XX”, while $XX produces the expansion of the macro named “X” followed by a literal “X”. And there is no := operator for macro expansion at declaration time in POSIX make; it's = all the way down.

    1 vote
  9. Comment on Calculating Actual Build Dependencies in ~comp

    ainar-g
    (edited )
    Link Parent
    It is a way to find them, but I would say that visualising the dependencies in your ./makefile dependencies with e.g. Graphviz is a much better and quicker one. While we're here, fun POSIX fact:...

    It is a way to find them, but I would say that visualising the dependencies in your ./makefile dependencies with e.g. Graphviz is a much better and quicker one.

    While we're here, fun POSIX fact: ./makefile with a lowercase “m” actually takes precedence over ./Makefile with an uppercase “M”. So the only reason why you would want a ./Makefile and not a ./makefile is to “be consistent with the guidelines of the community or the company”.

    Source:

    By default, the following files shall be tried in sequence: ./makefile and ./Makefile. If neither ./makefile or ./Makefile are found, other implementation-defined files may also be tried. (…)
  10. Comment on Calculating Actual Build Dependencies in ~comp

    ainar-g
    Link
    Is it though? I've recently written on Reddit about how frustrated I am with the fact that a massive amout of young developers don't really understand what make is for. I am probably just a crazy...
    (…) Unfortunately keeping your dependencies specified in your build configuration is time consuming and error-prone.

    Is it though? I've recently written on Reddit about how frustrated I am with the fact that a massive amout of young developers don't really understand what make is for.

    I am probably just a crazy whiny irrelevant tech-reductionist at this point, because the world where you use your OS's kernel's tracing facilities to “calculate” your dependencies instead of actually reading your own code seems like the Clown World to me.

    7 votes
  11. Comment on [Request] Emacs/readline-like keys on text fields in ~tildes

    ainar-g
    Link
    Not the answer you're probably looking for, but I've come to the conclusion that it's easier to just type messages in your favourite editor and copy-paste them to the textarea. In fact, I'm...

    Not the answer you're probably looking for, but I've come to the conclusion that it's easier to just type messages in your favourite editor and copy-paste them to the textarea. In fact, I'm writing this exact comment in Vim right now. Besides using all the power-editor tools that you're used to, that provides the additional benefit of keeping your draft intact in case of a power failure or a random computer hick-up. (That is, if you save often and if your OS, file system, and hardware aren't crap.)

    7 votes
  12. Comment on Unofficial Weekly Discussion #4 - What is your most "thinking outside the box", "pie in the sky", and/or "out there" idea for Tildes? in ~tildes

    ainar-g
    Link Parent
    I think that the same rule still applies. If you decided to remove your vote from this post as opposed to ten thousand other posts in your voting history then it was probably not that good in the...

    I think that the same rule still applies. If you decided to remove your vote from this post as opposed to ten thousand other posts in your voting history then it was probably not that good in the first place.

    The assumption here is that people won't just randomly remove votes from old posts but will remove votes from posts they don't like any more. Which is not a safe assumption, obviously, but it's the one I've made.

  13. Comment on Unofficial Weekly Discussion #4 - What is your most "thinking outside the box", "pie in the sky", and/or "out there" idea for Tildes? in ~tildes

    ainar-g
    (edited )
    Link Parent
    If the StackOverflow rules apply, the trust score is removed. Imagine that someone posts something as original content and receives a lot of votes. Later it is discovered that the content wasn't...

    If the StackOverflow rules apply, the trust score is removed. Imagine that someone posts something as original content and receives a lot of votes. Later it is discovered that the content wasn't original and that the poster basically stole it. It is therefore logical to remove the award from the user since the score wasn't really deserved.

    1 vote
  14. Comment on Unofficial Weekly Discussion #4 - What is your most "thinking outside the box", "pie in the sky", and/or "out there" idea for Tildes? in ~tildes

    ainar-g
    Link Parent
    I actually can imagine that. Could even be fun: you get to re-experience all the good stuff that you liked as well. Then again, I am a programmer who enjoys writing documentation and tests so I...

    I actually can imagine that. Could even be fun: you get to re-experience all the good stuff that you liked as well. Then again, I am a programmer who enjoys writing documentation and tests so I won't be surprised if I am a minority here :-)

    1 vote
  15. Comment on Unofficial Weekly Discussion #4 - What is your most "thinking outside the box", "pie in the sky", and/or "out there" idea for Tildes? in ~tildes

    ainar-g
    Link
    Partially stolen from Bugzilla. Limited number of votes. That is, users start with a number of initial votes, say 10,000, that they can use the same way tilderinoes use them right now. When...

    Partially stolen from Bugzilla. Limited number of votes. That is, users start with a number of initial votes, say 10,000, that they can use the same way tilderinoes use them right now. When they're out of votes they have to unvote some of the topics and comments that they didn't really like that much in the first place.

    The community or the moderators have some way of rewarding or punishing a user by increasing or reducing the user's vote number. I think it should also be possible to vote for a submission several times. Probably within a limit.

    Note that the votes aren't transferred. This is not a “vote economy”. If a user with 100 votes creates a submission which receives 1,000 votes then the user still has the same 100 votes. Maybe with some bonus from the community or moderators, but the bonus is not equal to 1,000 votes.

    4 votes