<commit_before>! Copyright (C) 2003, 2010 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel namespaces ;
IN: prettyprint.config

! Configuration
SYMBOL: tab-size
SYMBOL: margin
SYMBOL: nesting-limit
SYMBOL: length-limit
SYMBOL: line-limit
SYMBOL: number-base
SYMBOL: string-limit?
SYMBOL: boa-tuples?
SYMBOL: c-object-pointers?

4 tab-size set-global
64 margin set-global
15 nesting-limit set-global
100 length-limit set-global
10 number-base set-global
t string-limit? set-global

: with-short-limits ( quot -- )
    H{
        { line-limit 1 }
        { length-limit 15 }
        { nesting-limit 2 }
        { string-limit? t }
        { boa-tuples? t }
        { c-object-pointers? f }
    } clone swap with-variables ; inline

: without-limits ( quot -- )
    H{
        { nesting-limit f }
        { length-limit f }
        { line-limit f }
        { string-limit? f }
        { c-object-pointers? f }
    } clone swap with-variables ; inline
<commit_msg>prettyprint.config: string-limit? shouldn't be a global.<commit_after>! Copyright (C) 2003, 2010 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel namespaces ;
IN: prettyprint.config

! Configuration
SYMBOL: tab-size
SYMBOL: margin
SYMBOL: nesting-limit
SYMBOL: length-limit
SYMBOL: line-limit
SYMBOL: number-base
SYMBOL: string-limit?
SYMBOL: boa-tuples?
SYMBOL: c-object-pointers?

4 tab-size set-global
64 margin set-global
15 nesting-limit set-global
100 length-limit set-global
10 number-base set-global
string-limit? on

: with-short-limits ( quot -- )
    H{
        { line-limit 1 }
        { length-limit 15 }
        { nesting-limit 2 }
        { string-limit? t }
        { boa-tuples? t }
        { c-object-pointers? f }
    } clone swap with-variables ; inline

: without-limits ( quot -- )
    H{
        { nesting-limit f }
        { length-limit f }
        { line-limit f }
        { string-limit? f }
        { c-object-pointers? f }
    } clone swap with-variables ; inline

{'fraction_non_alphanumeric': 0.11872826626924987, 'fraction_numerical': 0.02185792349726776, 'mean_word_length': 2.502608695652174, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4539195', 'n_tokens_mistral': 685, 'n_tokens_neox': 640, 'n_words': 182}