Skip Navigation

Posts
236
Comments
357
Joined
3 yr. ago

  • I don't know what I should be noticing there. I can't see any text for the tool buttons along the left edge of the window.

  • I have trouble with both, but more experience with GIMP. I can't stand all the little tool buttons with no text. I want the name of each tool always visible on its button.

    I have the same problem with Inkscape.

  •  factor
        
    USING: kernel math math.statistics ranges sequences ;
    
    : difference-of-squares ( n -- n' )
      [1..b] [ sum sq ] [ sum-of-squares ] bi - abs ;
    
      
  •  factor
        
    USING: assocs.extras kernel literals make sequences unicode ;
    
    CONSTANT: charscores $[
      [
        "AEIOULNRST" [  1 swap ,, ] each
                "DG" [  2 swap ,, ] each
              "BCMP" [  3 swap ,, ] each
             "FHVWY" [  4 swap ,, ] each
                 "K" [  5 swap ,, ] each
                "JX" [  8 swap ,, ] each
                "QZ" [ 10 swap ,, ] each
      ] H{ } make
    ]
    
    : scrabble-score ( str -- n )
      charscores swap >upper values-of sum ;
    
      
  •  factor
        
    USING: assocs.extras kernel make sequences unicode ;
    
    : scrabble-score ( str -- n )
      >upper
      [
        "AEIOULNRST" [  1 swap ,, ] each
                "DG" [  2 swap ,, ] each
              "BCMP" [  3 swap ,, ] each
             "FHVWY" [  4 swap ,, ] each
                 "K" [  5 swap ,, ] each
                "JX" [  8 swap ,, ] each
                "QZ" [ 10 swap ,, ] each
      ] H{ } make
      swap values-of sum ;
    
      
  • It's more about replacing typed text than using shortcuts, but there's espanso.

  •  factor
        
    USING: combinators kernel sequences sets unicode ;
    
    MEMO: char>score ( char -- n )
      {
        { [ dup "AEIOULNRST" in? ] [  1 ] }
        { [ dup         "DG" in? ] [  2 ] }
        { [ dup       "BCMP" in? ] [  3 ] }
        { [ dup      "FHVWY" in? ] [  4 ] }
        { [ dup          "K" in? ] [  5 ] }
        { [ dup         "JX" in? ] [  8 ] }
        { [ dup         "QZ" in? ] [ 10 ] }
      } cond nip ;
    
    : scrabble-score ( str -- n )
      >upper [ char>score ] map-sum ;
    
      
  •  factor
        
    USING: assocs kernel sequences sets unicode ;
    
    MEMO: char>score ( char -- n )
      {
        { 1 "AEIOULNRST" } { 2 "DG" }
        { 3 "BCMP" } { 4 "FHVWY" }
        { 5 "K" } { 8 "JX" } { 10 "QZ" }
      } [ nip dupd in? ] assoc-find 2drop nip ;
    
    : scrabble-score ( str -- n )
      >upper [ char>score ] map-sum ;
    
      
  • Who or what?

  • Ok next time I won't use your computer.

  • I'll just second the suggestion that KDE Plasma is worth a try, as it's very adaptable once you know what you want. You don't need to install any addons for the functionality you describe, just open the Shortcuts settings, KWin category, and have at it.

  •  factor
        
    USING: combinators.short-circuit.smart kernel math math.parser rosetta-code.luhn-test sequences sets unicode ;
    
    : ex-luhn? ( str -- ? )
      " " without
      dup {
        [ length 2 < ]
        [ [ digit? ] all? not ]
      } || [ drop f ] [
        string>number luhn?
      ] if
    ;
    
      
     factor
        
    USING: combinators.short-circuit.smart kernel math sequences sets unicode validators ;
    
    : ex-luhn? ( str -- ? )
      " " without
      dup {
        [ length 2 < ]
        [ [ digit? ] all? not ]
      } || [ drop f ] [ luhn? ] if
    ;
    
      
  •  factor
        
    USING: assocs kernel math.functions math.parser sequences sequences.extras ;
    
    : raindrops ( n -- sound )
      { 3 5 7 } [ dupd divisor? ] find-all keys
      { "Pling" "Plang" "Plong" } nths concat
      [ number>string ] [ nip ] if-empty ;
    
      
  •  factor
        
    USING: combinators.short-circuit.smart kernel math math.functions math.parser sequences sequences.extras sets unicode ;
    
    : luhn? ( str -- ? )
      " " without
      dup { [ length 2 < ] [ [ digit? ] all? not ] } || [ drop f ] [
        string>digits
        reverse [ <evens> sum ] [ <odds> ] bi
        [ 2 * dup 9 > [ 9 - ] when ] map-sum +
        10 divisor?
      ] if
    ;
    
      
  • Ooh I haven't seen this one. Anyone have a comment on this vs the KleverNotes project? I think that's the name.

  • The Power and Battery widget now responds to middle-clicks and scrolls: middle-click will block or re-enable automatic sleep and screen locking, and scrolling will change the active power profile

    Scrolling on the battery applet is how I adjust my brightness. Is that no longer a thing?

  • Here are a bunch in Factor, taking the easy way when the solution is already in the standard library:

     factor
        
    USING: calendar ;
    
    ALIAS: leap? leap-year?
    
      
     factor
        
    USING: sequences ;
    
    ALIAS: reverse-string reverse
    
      
     factor
        
    USING: kernel math.functions math.parser sequences ;
    
    : raindrops ( n -- sound )
      { 3 5 7 } [ dupd divisor? ] map
      [ { "Pling" "Plang" "Plong" } nth "" ? ] map-index
      concat
      [ number>string ] [ nip ] if-empty
    ;
    
      
     factor
        
    USING: roman ;
    
    ALIAS: roman-numerals >ROMAN
    
      
     factor
        
    USING: combinators grouping kernel sequences sequences.extras sets ;
    
    : RNA>proteins ( RNA -- proteins )
      3 group
      [ { "UAA" "UAG" "UGA" } in? ] cut-when drop
      [
        {
          { [ dup "AUG" =                         ] [ "Methionine"    ] }
          { [ dup "UGG" =                         ] [ "Tryptophan"    ] }
          { [ dup { "UUU" "UUC"             } in? ] [ "Phenylalanine" ] }
          { [ dup { "UUA" "UUG"             } in? ] [ "Leucine"       ] }
          { [ dup { "UAU" "UAC"             } in? ] [ "Tyrosine"      ] }
          { [ dup { "UGU" "UGC"             } in? ] [ "Cysteine"      ] }
          { [ dup { "UCU" "UCC" "UCA" "UCG" } in? ] [ "Serine"        ] }
        } cond nip
      ] map
    ;
    
      
     factor
        
    USING: sequences sequences.extras splitting unicode ;
    
    : >TLA ( phrase -- TLA )
      " -" split
      [ [ Letter? ] filter ] map-harvest
      [ 1 head >upper ] map-concat
    ;
    
      
     factor
        
    USING: kernel math sequences sets ;
    
    CONSTANT: scores
      { "eggs" "peanuts" "shellfish" "strawberries" "tomatoes" "chocolate" "pollen" "cats" }
    
    : (allergy-test) ( allergens remainder -- allergens' remainder' )
      dup log2
      [ scores ?nth '[ _ suffix! ] dip ]
      [ 2^ - ] bi
    ;
    
    : allergy-test ( allergen total -- allergic? allergens )
      V{ } clone swap
      [ (allergy-test) ] until-zero sift
      dup [ in? ] dip
    ;
    
      
  • Have you checked the system settings page that includes compositor stuff?