7

I need to boast a bit and ask for "code review". I'm sorry if this doesn't constitute a good post.

I browse local communities more often than I should for my mental health.

I was checking out https://nim-lang.org/ and when I googled it one of the links was to rosettacode.org and I decided to check out the implementation of 2048.

I noticed that zig's implementation was a non-working auto translation of rust's, so I decided to rewrite it.

My repo: https://codeberg.org/Vulwsztyn/2048_zig

With the reader, writer, and arraylist api changes in 0.15 most of the sources were usless and if I hadn't found https://github.com/xyaman/mibu I guess I would have surrendered.

Feel free to roast the hell out of my code.

[-] Vulwsztyn@programming.dev 2 points 1 week ago

Your post is my introduction to gleam and I already love it. Thank you

[-] Vulwsztyn@programming.dev 6 points 1 week ago

coming from a language with consistent pronunciation I pronounce it "aur" like other comments said, like "aurum" or like in Portuguese - how it is written)

[-] Vulwsztyn@programming.dev 2 points 1 week ago

That's not a good idea

[-] Vulwsztyn@programming.dev 3 points 3 weeks ago* (last edited 3 weeks ago)

I know it's not the point of this comment, but I'll check harlequin out

[-] Vulwsztyn@programming.dev 1 points 2 months ago

syntax is bad for list operations, also there are situations where you need to count the number of parentheses you closed, which wouldn't happen of you were able to use fluent interfaces

[-] Vulwsztyn@programming.dev 1 points 2 months ago

do you have an example of this?

[-] Vulwsztyn@programming.dev 3 points 4 months ago

This is only a Draft for now though

[-] Vulwsztyn@programming.dev 1 points 4 months ago

Yeah, but you can also write it like I proposed which is less boilerplaty and gives the same advantages

18

Hi, I recently realised one can use immutable default arguments to avoid a chain of:

def append_to(element, to=None):
    if to is None:
        to = []

at the beginning of each function with default argument for set, list, or dict.

5
4
[-] Vulwsztyn@programming.dev 4 points 2 years ago* (last edited 2 years ago)

Read the 1st comment under 1st link, 2nd link os about something different, 4th links is about something absolutely different. **

view more: next ›

Vulwsztyn

joined 2 years ago