Elronnd's recent activity

  1. Comment on Programming Challenge: Text compression in ~comp

    Elronnd Link
    Tada! No decoder but ¯\_(ツ)_/¯ my %codes = %(' '=>'11',e=>'101',t=>'1001',o=>'10001',n=>'10000',a=>'011',s=>'0101',i=>'01001',r=>'01000',h=>'0011',d=>'001...

    Tada! No decoder but ¯\_(ツ)_/¯

    my %codes = %(' '=>'11',e=>'101',t=>'1001',o=>'10001',n=>'10000',a=>'011',s=>'0101',i=>'01001',r=>'01000',h=>'0011',d=>'001
    01',l=>'001001','~'=>'001000',u=>'00011',c=>'000101',f=>'000100',m=>'000011',p=>'0000101',g=>'0000100',w=>'0000011',b=>'000
    0010',y=>'0000001',v=>'00000001',j=>'000000001',k=>'0000000001',x=>'00000000001',q=>'000000000001',z=>'000000000000');
    
    my @input = prompt('> ').comb.grep(* (elem) %codes.keys);
    my $output-bitstring = @input.map({%codes{$^a}}).reduce({$^a ~ $^b});
    
    # pad to a multiple of 8 bits
    $output-bitstring ~= '0' x $output-bitstring.codes%8;
    
    my @output-bitints;
    while $output-bitstring {
            @output-bitints.append($output-bitstring.substr(0, 8).parse-base(2));
            $output-bitstring .= substr(8, *);
    }
    
    for @output-bitints {
            .base(16).print;
            print ' ';
    }
    
    say "\nCompression ratio {@input/@output-bitints}:1";
    
    5 votes
  2. Comment on Tildistas, what is your favorite poem? in ~books

    Elronnd Link Parent
    Hippopotamus; Hippopotamus is a Hippopotamus.

    Hippopotamus;
    Hippopotamus is a
    Hippopotamus.

    1 vote
  3. Comment on What are some ideas and experiences that are underexplored in gaming? in ~games

    Elronnd Link Parent
    Maybe factorio, kind of? You start off making individual belts and machines, but later on, once you get trains and blueprints and bots, you start to think a lot more about high-level architecture...

    Maybe factorio, kind of? You start off making individual belts and machines, but later on, once you get trains and blueprints and bots, you start to think a lot more about high-level architecture design.

    5 votes
  4. Comment on Men Have No Friends and Women Bear the Burden in ~life

    Elronnd Link Parent
    Perhaps they meant representative rather than common?

    Perhaps they meant representative rather than common?

    2 votes
  5. Comment on Opera Reborn 3: No modern browser is perfect, but this may be as close as it gets in ~tech

    Elronnd Link Parent
    I don't think so. I looked into it briefly a while back, but lost interest. You'll probably find something if you google around, though.

    I don't think so. I looked into it briefly a while back, but lost interest. You'll probably find something if you google around, though.

  6. Comment on Opera Reborn 3: No modern browser is perfect, but this may be as close as it gets in ~tech

    Elronnd Link Parent
    I meant unofficial patches for the leaked source code.

    I meant unofficial patches for the leaked source code.

  7. Comment on Opera Reborn 3: No modern browser is perfect, but this may be as close as it gets in ~tech

    Elronnd Link Parent
    Last I checked, there were still some patches to it being thrown around.

    Last I checked, there were still some patches to it being thrown around.

  8. Comment on Opera Reborn 3: No modern browser is perfect, but this may be as close as it gets in ~tech

    Elronnd Link Parent
    What the sibling said; also, there was some really solid tech there, presto used to be faster than all the competition.

    What the sibling said; also, there was some really solid tech there, presto used to be faster than all the competition.

    4 votes
  9. Comment on Opera Reborn 3: No modern browser is perfect, but this may be as close as it gets in ~tech

    Elronnd Link
    Still not using presto.

    Still not using presto.

    9 votes
  10. Comment on The new Windows Terminal in ~comp

    Elronnd Link Parent
    Not the GP, but the linux driver for my wifi card crashes (actually, it makes the scheduler crash, somehow).

    Not the GP, but the linux driver for my wifi card crashes (actually, it makes the scheduler crash, somehow).

    1 vote
  11. Comment on @user urls? in ~tildes

  12. Comment on Programming Challenge: Dice Roller in ~comp

    Elronnd Link Parent
    I did it in 66 characters in perl6: say EVAL S:g/(\d)d(\d)/{[+] [1+$1.rand.Int for ^$0]}/ given prompt

    I did it in 66 characters in perl6:

    say EVAL S:g/(\d)d(\d)/{[+] [1+$1.rand.Int for ^$0]}/ given prompt
    
    3 votes
  13. Comment on Sony and Microsoft to explore strategic partnership, collaborate on new cloud-based solutions for gaming experiences and AI solutions in ~tech

    Elronnd Link Parent
    That's not true! With current technology, it's not possible. However, network infrastructure is going to continue to improve, more than likely to the point where rtt to a server is under 16ms.

    it's physically impossible to get a cloud game as responsive as a locally-processed game

    That's not true!

    With current technology, it's not possible. However, network infrastructure is going to continue to improve, more than likely to the point where rtt to a server is under 16ms.

    1 vote
  14. Comment on Geographical tags in ~tildes

  15. Comment on Programming Challenge: Dice Roller in ~comp

    Elronnd Link
    In perl6, my first time really using grammars; any critique is appreciated. Supports any number of operations in any configuration (e.g. 5 + 6d6 - 80 * 3 / 5d4 is fine), but no order of operations...

    In perl6, my first time really using grammars; any critique is appreciated. Supports any number of operations in any configuration (e.g. 5 + 6d6 - 80 * 3 / 5d4 is fine), but no order of operations or parentheses yet.

    use MONKEY-SEE-NO-EVAL;
    
    grammar Dice {
    	rule TOP { <atom> [ <op> <atom> ]* }
    	token op { '+' | '-' | '*' | '/' }
    	token atom { <number> | <dice>}
    	token dice { <number> d <number> }
    	token number { \d+ }
    }
    
    class Dicer {
    	method TOP($/) {
    		# if it's a number, return the number; if it's some dice, role them
    		sub process($a) { $a<dice> ?? [+] [($a<dice><number>[1] + 1).rand.Int for ^$a<dice><number>[0]] !! +$a<number>; }
    		my @atoms = $<atom>.map(&process);
    		my $total = @atoms.shift;
    
    		for $<op> -> $op {
    			$total = EVAL "$total $op {@atoms.shift}";
    		}
    
    		make $total;
    	}
    }
    
    
    loop { say Dice.parse(prompt('> '), actions => Dicer).made; }
    
    5 votes
  16. Comment on Making Playgrounds a Little More Dangerous in ~life

    Elronnd Link
    I don't buy that for a second. Yes, worse playgrounds are partly to blame for children playing there less, but it's a naïve argument to say that screens don't have any effect.

    “I don’t buy the argument that the screens are keeping the kids from the playgrounds,” said Susan Solomon, an architectural historian and the author of “American Playgrounds.” “If the playgrounds were better, kids would be there. Better playgrounds would definitely give screens a run for their money.”

    I don't buy that for a second. Yes, worse playgrounds are partly to blame for children playing there less, but it's a naïve argument to say that screens don't have any effect.

  17. Comment on CPU.fail - Multiple attacks against modern Intel CPUs disclosed (ZombieLoad, RIDL, Fallout) in ~comp

    Elronnd Link Parent
    I remember reading that side-channel vulnerabilities were hypothesized back in the 90s or early 2000s, but there were worse things to consider and no one was thinking very much about hypothetical...

    I remember reading that side-channel vulnerabilities were hypothesized back in the 90s or early 2000s, but there were worse things to consider and no one was thinking very much about hypothetical vulnerabilities. Someone stumbled across sceptre and meltdown, and here was a concrete way to exploit it so people in general started to think about it more.

    2 votes
  18. Comment on What should be done about synonymous tags? in ~tildes

    Elronnd Link Parent
    Well sure, you can make that argument and that's valid; this was just an example. And I don't think even the staunchest pedants would argue that 'poem' and 'poems' should be distinct.

    Well sure, you can make that argument and that's valid; this was just an example. And I don't think even the staunchest pedants would argue that 'poem' and 'poems' should be distinct.

    2 votes
  19. Comment on Geographical tags in ~tildes

    Elronnd Link Parent
    I don't know about that. Some tags definitely will be unique site-wide. Consider 'news'—that means the same thing in pretty much any group: news relevant to that group. Should there not be...

    I don't know about that. Some tags definitely will be unique site-wide. Consider 'news'—that means the same thing in pretty much any group: news relevant to that group. Should there not be consistency?