Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> welcome @Vor 👋
[discord] <Vor> Thank you, @Nicd !
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> Welcome @BLANK 👋
[discord] <BLANK> Thanks
Tunnel Master
@tunnelmaster_gitlab
[discord] <BLANK> I'm wondering if there's a feature to change your username, I did see a feature request from 2 years ago that isn't closed, so I'd assume that there still isn't and I should contact someone?
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> there is not, I can do it for you
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> I need the account name and if the account has an email address associated with it, send me a free form email to ceo@ahlcode.fi to prove you own the account. also note that your profile URL will change and all your API tokens will change. also best to log out
Tunnel Master
@tunnelmaster_gitlab
[discord] <BLANK> Alright
[discord] <BLANK> THanks
[discord] <BLANK> Thanks*
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> I will do it tomorrow evening probably
[discord] <Nicd> I'll ping you then
Tunnel Master
@tunnelmaster_gitlab
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> Nice! 👍
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> @BLANK sorry I didn't have time to do it yesterday and probably also not today, but I will try tomorrow
[discord] <BLANK> Alright, no problem. Take your time
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> I'm doing it now, taking backups
Tunnel Master
@tunnelmaster_gitlab
[discord] <BLANK> Bit of a late response, but alright, thanks.
[discord] <Nicd> @BLANK please check now, your first choice was available
[discord] <BLANK> Works, thanks. I'll need to remake the API keys right?
[discord] <Nicd> you don't need to regenerate them, they are already changed
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> you just need to set the new ones in your editors
[discord] <BLANK> Ah, alright
[discord] <BLANK> Thanks again. I don't need to do anything else right?
[discord] <Nicd> nope, it should work
[discord] <BLANK> Great
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> welcome @zaoxbkqx 👋
Tunnel Master
@tunnelmaster_gitlab
[discord] <Rain Falls Up> I just had a though that many others probably have had. I think that global leaderboards would be cool for code::stats. Its the perfect way to drive programmers to dump even more of their time into programming
[discord] <Nicd> yeah it's been talked about many times. the issue is that they would be full of cheaters
[discord] <Nicd> even just the global "top languages" list that we used to have quickly became useless because people can just add unlimited XP through the API
[discord] <Nicd> and sometimes that happens by mistake with some editor plugins
[discord] <Rain Falls Up> Oof yeah, I sorta thought about that
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> one planned feature is groups
[discord] <Nicd> then you could have group leaderboard because you can always kick out the cheaters 😛
Tunnel Master
@tunnelmaster_gitlab
[discord] <Rain Falls Up> Thats dope
[discord] <Nicd> but with the current rate, look forward to it in around 5 years 😄
[discord] <Rain Falls Up> Ay, fair. Everyone's got lives. Theoretically of course
[matrix] <fperson:tchncs.de> yep, cool idea
Tunnel Master
@tunnelmaster_gitlab
[matrix] <fperson:tchncs.de> are these groups something public?
[matrix] <fperson:tchncs.de> or maybe they can be both public and private
[discord] <Nicd> yeah private and public
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> some work-in-progress query magic from yesterday:

[discord] <Nicd> ```elixir
@spec update_aliases(t()) :: :ok
def update_aliases(user) do
alias_map = Language.get_alias_map(Repo)
user_aliases = user.aliases |> Enum.reduce(%{}, &Map.put(&2, &1.source_id, &1.target_id))
combined_aliases = Map.merge(alias_map, user_aliases)
IO.inspect(combined_aliases)
{originals, targets} = combined_aliases |> Map.to_list() |> Enum.unzip()

query =
  from(x in XP,
    join:
      m in fragment(
        "select * from unnest(?::integer[], ?::integer[]) as m(original_language_id, language_id)",
        ^originals,
        ^targets
      ),
    on: m.original_language_id == x.original_language_id,
    join: p in Pulse,
    on: x.pulse_id == p.id,
    where: p.user_id == ^user.id and x.language_id != m.language_id,
    select: {p.user_id, x.id, m.original_language_id, x.language_id, m.language_id}
    # update: [set: [language_id: m.language_id]]
  )

IO.inspect(query |> Repo.all())

:ok

end
```

[discord] <Nicd> part of the aliases editor, this will update all of the user's XP rows to match the aliases
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> alias editor is working now. needs some styling though
[discord] <Nicd> and it's so slow that it needs a loading indicator 😄
Tunnel Master
@tunnelmaster_gitlab
[discord] <Rain Falls Up> Howdy there dbaer!
[discord] <Rain Falls Up> Welcome to the server
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> welcome @Mr_Matrix_eyes 👋
Tunnel Master
@tunnelmaster_gitlab
[discord] <Nicd> welcome @marius 👋