<commit_before>! Copyright (C) 2014 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: editors io.standard-paths kernel make math.parser
namespaces sequences ;
IN: editors.atom

SINGLETON: atom-editor
atom-editor editor-class set-global

SYMBOL: atom-path

M: atom-editor editor-command ( file line -- command )
    [
        atom-path get [ "atom" ?find-in-path ] unless* ,
        number>string ":" glue ,
    ] { } make ;<commit_msg>editors.atom: make it work better with Mac OS X.<commit_after>! Copyright (C) 2014 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: editors io.pathnames io.standard-paths kernel make
math.parser namespaces sequences system ;
IN: editors.atom

SINGLETON: atom-editor
atom-editor editor-class set-global

SYMBOL: atom-path

HOOK: find-atom os ( -- path )

M: object find-atom
    "atom" ?find-in-path ;

M: macosx find-atom
    "com.github.Atom" find-native-bundle [
        "Contents/MacOS/Atom" append-path
    ] [
        f
    ] if* ;

M: atom-editor editor-command ( file line -- command )
    [
        atom-path get [ find-atom ] unless* ,
        number>string ":" glue ,
    ] { } make ;
{'fraction_non_alphanumeric': 0.12691652470187392, 'fraction_numerical': 0.0068143100511073255, 'mean_word_length': 2.942953020134228, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1856697', 'n_tokens_mistral': 392, 'n_tokens_neox': 379, 'n_words': 109}