Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Marwan Rabbâa
    using --release flag decrease binary size from 4.9M to 1.9M
    is there any reason not to use this flag ?
    Carlos Donderis
    --release flag optimizes the code, but increases considerably the compiling time.
    Vitalii Elenhaupt
    Hey. Yes, the main reason is the compiling time
    • veelenga/ameba@c5729b1
    • veelenga/ameba#31
    you can still compile it with a release flag if it fits your needs:
    $ CRFLAGS=--release make bin
    Marwan Rabbâa
    and --no-debug ?
    Vitalii Elenhaupt
    any other crystal flags you can pass using CRFLAGS. For example:
    $ CRFLAGS="--release --stats" make bin                                                                                                                                               ✹
    /usr/local/bin/crystal build --no-debug -o bin/ameba src/cli.cr --release --stats
    Parse:                             00:00:00.000123912 (   0.19MB)
    Semantic (top level):              00:00:00.220423575 (  52.70MB)
    Semantic (new):                    00:00:00.002317802 (  52.70MB)
    Semantic (type declarations):      00:00:00.024875458 (  52.70MB)
    Semantic (abstract def check):     00:00:00.001466401 (  52.70MB)
    Semantic (ivars initializers):     00:00:00.162740006 (  76.70MB)
    Semantic (cvars initializers):     00:00:00.002485070 (  76.70MB)
    Semantic (main):                   00:00:00.927657055 ( 189.13MB)
    Semantic (cleanup):                00:00:00.002510379 ( 189.13MB)
    Semantic (recursive struct check): 00:00:00.000961374 ( 189.13MB)
    Codegen (crystal):                 00:00:00.664403397 ( 229.13MB)
    Codegen (bc+obj):                  00:00:00.285879103 ( 229.13MB)
    Codegen (linking):                 00:00:00.179272187 ( 229.13MB)
    Codegen (bc+obj):
     - all previous .o files were reused
    mkdir -p ../../bin
    cp ./bin/ameba ../../bin
    Harrison Bachrach
    Hi! I'm currently working on integration with Ale. Thank you for ameba!
    Harrison Bachrach
    PR opened here: w0rp/ale#2174
    Vitalii Elenhaupt
    @HarrisonB oh, that's nice. Thanks a lot
    Vitalii Elenhaupt
    Once it is merged, be free to add a note here: https://github.com/veelenga/ameba#editor-integration
    Bar Hofesh
    Hi @veelenga
    I think I found a bug
    NOISE_ARRAY.each do |noise|
              [sample_a, sample_b].each do |sample|
                sample = sample.delete(noise)
    This will make ameba say:
    [W] Lint/UselessAssign: Useless assignment to variable `sample`
    > sample = sample.delete(noise)
    Vitalii Elenhaupt
    @bararchy sorry for the late notice.
    Why do you think this is a bug? In my understanding that assignment is still useless, because sample in the block is just a reference to the original value and assignment doesn't have any affect:
    sample_a = 1
    sample_b = 2
    [sample_a, sample_b].each do |sample|
      sample = sample + 1
    puts sample_a # => 1
    puts sample_b # => 2
    Hayden Jones
    hello folks! I am having an issue with Ameba where the Layout/TrailingWhitespace lint is being triggered all over the place on lines where there isnt any trailing whitespace. I am using Ameba through WSL and I'm editing all my code with VSCode on Windows, so I was wondering if perhaps there is some kind of config I need to tell Ameba about line endings? Any help would be appreciated
    Vitalii Elenhaupt
    @wrq are you able to share an example of a file where it wrongly triggers the linting error?
    Also, please ensure you have a .editorconfig file in the root of your project and there is trim_trailing_whitespace = true option.
    please see the new slack channel and ask to create an ameba channel if you want
    Vitalii Elenhaupt
    @Acciaiodigitale hey. I don't see too much reason for creating a slack channel right now. Just a few people joined this Gitter channel so even smaller number can participate slack.
    Rishav Sharan
    Hey Vitalii. I am struggling with setting up Ameba. I have added it as a dependency to my app. what next? the docs skip that bit and go straight to configuration
    Vitalii Elenhaupt
    Hey @rishavs. Once you added it as project dependency you should run shards install command in order to pull the deps and build ameba.
    Once it is done, a new executable should appear bin/ameba, which can be executed.
    Please let me know if that works.
    Rishav Sharan
    yep. got it to work. Had to move the binary to /usr/bin for the vs code extension to work
    one feedback: by default the only warning that I see is trailing whitespace one. I have 60+ instances of it and that really feels more like noise
    I would recommend having thta be off by default and to let folks switch it on via config if needed
    Vitalii Elenhaupt
    Thanks for the feedback. I think the more idiomatic way is to implement auto-correction. That's what most people want and what will help with the problem above as well.
    fn ⌃ ⌥
    Anyone there?