Skip to content

Repeating working solution ends with a diff on MacOS #394

@MadPigeon

Description

@MadPigeon

Task Reformat/Refactor a Golfer Class is a clear example

https://www.vimgolf.com/challenges/4d1a1c36567bac34a9000002

Solution full text (score 42):
jd3d3X$6Xhi*<Esc>^j2xjxk$18Xhi.join(',')<Esc>ZZ

My output:

% vimgolf put 4d1a1c36567bac34a9000002
Downloading Vimgolf challenge: 4d1a1c36567bac34a9000002
Launching VimGolf session for challenge: 4d1a1c36567bac34a9000002

Here are your keystrokes:
jd3d3X$6Xhi*<Esc>^j2xjxk$18Xhi.join(',')<Esc>ZZ

Uh oh, looks like your entry does not match the desired output.
Your score for this failed attempt was: 39

The diff highlights whitespace at the beginning of the line puts "Hello #{a.join(',')}", but visually it looks the same.

I tried another solution and the problem was different but similar:

Solution full text (score 42 as well):
j3D3X$6Xjkhi*<Esc>j$19Xi.join(',')}<Esc>02xjxZZ

And my output at the end:

Retrying current challenge...
Launching VimGolf session for challenge: 4d1a1c36567bac34a9000002

Here are your keystrokes:
j3D3X$6Xjkhi*<Esc>j$19Xi.join(',')}<Esc>02xjxZZ

Uh oh, looks like your entry does not match the desired output.
Your score for this failed attempt was: 39
[d] Show diff

This time it was the same line, but my whitespaces looked like I only had one space in front of the line and need to add 3 more

I'm using MacBook Pro laptop

Here's my vim ":version" output start (if that helps)

:version
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Apr 28 2025 16:00:40)
macOS version - arm64
Included patches: 1-1350
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               -ebcdic            +lua               -python            +title
+arabic            +emacs_tags        +menu              +python3           -toolbar
+autocmd           +eval              +mksession         +quickfix          +user_commands
+autochdir         +ex_extra          +modify_fname      +reltime           +vartabs
-autoservername    +extra_search      +mouse             +rightleft         +vertsplit
-balloon_eval      -farsi             -mouseshape        +ruby              +vim9script
+balloon_eval_term +file_in_path      +mouse_dec         +scrollbind        +viminfo
-browse            +find_in_path      -mouse_gpm         +signs             +virtualedit
++builtin_terms    +float             -mouse_jsbterm     +smartindent       +visual
+byte_offset       +folding           +mouse_netterm     +sodium            +visualextra
+channel           -footer            +mouse_sgr         +sound             +vreplace
+cindent           +fork()            -mouse_sysmouse    +spell             +wildignore
-clientserver      +gettext           +mouse_urxvt       +startuptime       +wildmenu
+clipboard         -hangul_input      +mouse_xterm       +statusline        +windows
+cmdline_compl     +iconv             +multi_byte        -sun_workshop      +writebackup
+cmdline_hist      +insert_expand     +multi_lang        +syntax            -X11
+cmdline_info      +ipv6              -mzscheme          +tag_binary        -xattr
+comments          +job               +netbeans_intg     -tag_old_static    -xfontset
+conceal           +jumplist          +num64             -tag_any_white     -xim
+cryptv            +keymap            +packages          -tcl               -xpm
+cscope            +lambda            +path_extra        +termguicolors     -xsmp
+cursorbind        +langmap           +perl              +terminal          -xterm_clipboard
+cursorshape       +libcall           +persistent_undo   +terminfo          -xterm_save
+dialog_con        +linebreak         +popupwin          +termresponse
+diff              +lispindent        +postscript        +textobjects
+digraphs          +listcmds          +printer           +textprop
-dnd               +localmap          +profile           +timers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions