The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
Please vote in the Forum Structure Poll. Polling will close at 2PM EST on January 21, 2025.

Git Merge Squashing [Programming] Thread : Filesystems logging stuff

194959698100

Posts

  • urahonkyurahonky Cynical Old Man Registered User regular
    I'm using Putty to connect to this Terminal server if that makes a difference. Sorry I should have mentioned that.

  • jdarksunjdarksun Struggler CORegistered User regular
    bowen wrote: »
    And if you're using regex you're gonna have a bad time.
    So much of what I do involves regular expressions and text manipulation, I just have to ask you: ¿Que?

  • mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    ctrl+shift+v (not ctrl+v) should still work in putty, I think. I edited in some other options in my other post as well. I think ctrl+r should allow you to insert text from other files into the currently open buffer.

  • BowenBowen Sup? Registered User regular
    Right click works in putty last I knew.

  • BowenBowen Sup? Registered User regular
    jdarksun wrote: »
    bowen wrote: »
    And if you're using regex you're gonna have a bad time.
    So much of what I do involves regular expressions and text manipulation, I just have to ask you: ¿Que?

    MC2wS.png

  • BowenBowen Sup? Registered User regular
    edited March 2014
    ujrXPI5.jpg
    p5wBHNM.jpg

    Bowen on
  • jdarksunjdarksun Struggler CORegistered User regular
    edited March 2014
    bowen wrote: »
    jdarksun wrote: »
    bowen wrote: »
    And if you're using regex you're gonna have a bad time.
    So much of what I do involves regular expressions and text manipulation, I just have to ask you: ¿Que?
    MC2wS.png
    s/\d* [Pp]roblems/Mischief Managed/

    Edit: Though I guess I could have gone [Pp][Rr][Oo][Bb][Ll][Ee][Mm][Ss]{0,1}+

    jdarksun on
  • BowenBowen Sup? Registered User regular
    r4Lp2.gif

  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    urahonky wrote: »
    My new project has me working in Linux a lot more and I'm quite enjoying it. I only knew a handful of commands but now I'm starting to brush up on my command line experience.

    But vim... Man... That's going to take a bit.

    Do the vimtutor tutorial every day for a week (do it twice a day, once in the morning and once at night if you are super keen). By the end of the week you'll be proficient.
    Vim has a reputation for impenetrability that was built up during the editor wars and has never really cleared despite being trivially easy to learn and understand.

    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • jdarksunjdarksun Struggler CORegistered User regular
    It's not that it's difficult to understand, it's that the hotkeys are obtuse and it's anything but user friendly. I mean, look at your own advice. Do the tutorial (the tutorial!) twice every day for a week and you'll be proficient. Yikes!

  • BowenBowen Sup? Registered User regular
    nano for life

    If I need something else, that's what SCP and sublime is for

    People who use vi/vim/emacs are masochists

  • DehumanizedDehumanized Registered User regular
    I use vim sometimes but it kinda weirds me out how vim zealots seem to focus on I must input all this text fasterrrrr when usually for me any barrier to me writing code isn't on how fast I can write the text, but how fast I can figure out what I want to write...

  • VargarVargar Registered User regular
    Combine sshfs and your favorite editor to do remote editing in style*.

    *providing you have a good internet connection and a ssh daemon on the server.

  • BowenBowen Sup? Registered User regular
    Ethea wrote: »
    Combine sshfs and your favorite editor to do remote editing in style*.

    *providing you have a good internet connection and a ssh daemon on the server.

    I have done this with sublime I'm pretty sure.

  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    edited March 2014
    jdarksun wrote: »
    It's not that it's difficult to understand, it's that the hotkeys are obtuse and it's anything but user friendly. I mean, look at your own advice. Do the tutorial (the tutorial!) twice every day for a week and you'll be proficient. Yikes!

    I don't mean proficient as in "you'll be able to enter text", I mean proficient as in "you will be really good at using Vim, including a firm grasp on the most powerful and useful productivity features". I wish every text editor/ide came with a tutorial to make it easy to learn the good stuff that you can do.

    Alistair Hutton on
    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • undergroundmonorailundergroundmonorail single-track subway Registered User regular
    Re: recursion

    Today I wrote:
    def foo(b, d1, d2 = None):
        # stuff
    
        if d2 is not None:
            foo(b, d2)
    

    I love recursion so much I'll use it even where there isn't any reason to. :D

    Pokémon X | 3DS Friend Code: 0490-4897-7688
    Friend Safari: Fighting - Machoke, Pancham, Riolu | In game name: Jessica
    Official Weather Gym Leader of the G+T Pokémon League. @me to try for the Climate Badge!
  • MahnmutMahnmut Registered User regular
    edited March 2014
    bowen wrote: »
    To rekindle the flames of hatred for recursion.

    It's not that we can't read it, it's just that I hate it. Same with regex. Though at this point I can't read regex anymore so I've got that going for me.

    Really though, recursion should be "well there really is just not a better way to do this." (some of the more advanced data structure stuff like trees use it)

    If you're using recursion for something like fibonacci you deserve to be strung up and stabbed.

    And if you're using regex you're gonna have a bad time.

    I had seen basically no recursion whatsoever until I took an algorithms class on Coursera, and trees and stuff are exactly where! Lots of little recursions like:
        public void put(Key key, Value val) {
            root = put(root, key, val);
            root.color = BLACK;
            assert check();
        }
    
        // insert the key-value pair in the subtree rooted at h
        private Node[b] put(Node h, Key key, Value val)[/b] { 
            if (h == null) return new Node(key, val, RED, 1);
    
            int cmp = key.compareTo(h.key);
            if      (cmp < 0) h.left  = [b]put(h.left,  key, val[/b]); 
            else if (cmp > 0) h.right = [b]put(h.right, key, val);[/b] 
            else              h.val   = val;
    
            // fix-up any right-leaning links
            if (isRed(h.right) && !isRed(h.left))      h = rotateLeft(h);
            if (isRed(h.left)  &&  isRed(h.left.left)) h = rotateRight(h);
            if (isRed(h.left)  &&  isRed(h.right))     flipColors(h);
            h.N = size(h.left) + size(h.right) + 1;
    
            return h;
        }
    

    Mahnmut on
    Steam/LoL: Jericho89
  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    Also, Vim Golf is really fun.

    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • ASimPersonASimPerson Cold... ... and hard.Registered User regular
    Emacs 4 lyfe

    Well, maybe. It seems likely that I'll probably use a proper IDE at my next job.

  • an_altan_alt Registered User regular
    Mahnmut wrote: »
    I had seen basically no recursion whatsoever until I took an algorithms class on Coursera, and trees and stuff are exactly where! Lots of little recursions like:
        public void put(Key key, Value val) {
            root = put(root, key, val);
            root.color = BLACK;
            assert check();
        }
    
        // insert the key-value pair in the subtree rooted at h
        private Node[b] put(Node h, Key key, Value val)[/b] { 
            if (h == null) return new Node(key, val, RED, 1);
    
            int cmp = key.compareTo(h.key);
            if      (cmp < 0) h.left  = [b]put(h.left,  key, val[/b]); 
            else if (cmp > 0) h.right = [b]put(h.right, key, val);[/b] 
            else              h.val   = val;
    
            // fix-up any right-leaning links
            if (isRed(h.right) && !isRed(h.left))      h = rotateLeft(h);
            if (isRed(h.left)  &&  isRed(h.left.left)) h = rotateRight(h);
            if (isRed(h.left)  &&  isRed(h.right))     flipColors(h);
            h.N = size(h.left) + size(h.right) + 1;
    
            return h;
        }
    

    Was that the Sedgewick course?

    Pony wrote:
    I think that the internet has been for years on the path to creating what is essentially an electronic Necronomicon: A collection of blasphemous unrealities so perverse that to even glimpse at its contents, if but for a moment, is to irrevocably forfeit a portion of your sanity.
    Xbox - PearlBlueS0ul, Steam
    If you ever need to talk to someone, feel free to message me. Yes, that includes you.
  • templewulftemplewulf The Team Chump USARegistered User regular
    Is there a ruby-y way to store custom validators? E.g., should they go in the spec folder? Some other helper folder?

    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
  • LD50LD50 Registered User regular
    Like, there's places where recursion is great, and should be used. There's also tons of places where recursion is an ok idea, until you factor in all the edge cases. Problems arise not with the creation of solutions for the latter, but when you go back to code that was written years ago and you have to find out what it's actually doing/why it's breaking.

  • KambingKambing Registered User regular
    LD50 wrote: »
    Like, there's places where recursion is great, and should be used. There's also tons of places where recursion is an ok idea, until you factor in all the edge cases. Problems arise not with the creation of solutions for the latter, but when you go back to code that was written years ago and you have to find out what it's actually doing/why it's breaking.

    I'd argue that the same thing is true with iterative/imperative code, if not worse, because (uncontrolled) state is innately more difficult to reason about especially if you "have to page it in" after the fact.

    @TwitchTV, @Youtube: master-level zerg ladder/customs, commentary, and random miscellany.
  • ecco the dolphinecco the dolphin Registered User regular
    Ethea wrote: »
    Combine sshfs and your favorite editor to do remote editing in style*.

    *providing you have a good internet connection and a ssh daemon on the server.

    Haha, did it exactly the opposite today.

    An embedded Linux rootfs over nfs, and editing files locally.

    Penny Arcade Developers at PADev.net.
  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    Question: Is there anything more boss than hex editing a file to remove a single byte to turn it from an invalid gzip file to a valid one thus proving you are right?
    Answer: No. There is nothing more boss than that.

    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • EchoEcho ski-bap ba-dapModerator, Administrator admin
    What if you removed two bytes?

  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    Echo wrote: »
    What if you removed two bytes?

    That sounds like a lot of effort.

    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • oldmankenoldmanken Registered User regular
    Slacker.

  • urahonkyurahonky Cynical Old Man Registered User regular
    Looks like funding was cut for my old project yet again. Even more than before... I'm sorta lucky that I'm on this security project right now but I hear there are a ton of jobs in danger right now. :(

  • DelmainDelmain Registered User regular
    There always are in gov't contracting.

  • MahnmutMahnmut Registered User regular
    an_alt wrote: »
    Mahnmut wrote: »
    I had seen basically no recursion whatsoever until I took an algorithms class on Coursera, and trees and stuff are exactly where! Lots of little recursions like:
        public void put(Key key, Value val) {
            root = put(root, key, val);
            root.color = BLACK;
            assert check();
        }
    
        // insert the key-value pair in the subtree rooted at h
        private Node[b] put(Node h, Key key, Value val)[/b] { 
            if (h == null) return new Node(key, val, RED, 1);
    
            int cmp = key.compareTo(h.key);
            if      (cmp < 0) h.left  = [b]put(h.left,  key, val[/b]); 
            else if (cmp > 0) h.right = [b]put(h.right, key, val);[/b] 
            else              h.val   = val;
    
            // fix-up any right-leaning links
            if (isRed(h.right) && !isRed(h.left))      h = rotateLeft(h);
            if (isRed(h.left)  &&  isRed(h.left.left)) h = rotateRight(h);
            if (isRed(h.left)  &&  isRed(h.right))     flipColors(h);
            h.N = size(h.left) + size(h.right) + 1;
    
            return h;
        }
    

    Was that the Sedgewick course?

    Yeah! I thought it was really great. Especially the programming assignments -- very satisfying to ace the autograder's enormous battery of tests.

    Steam/LoL: Jericho89
  • a5ehrena5ehren AtlantaRegistered User regular
    ASimPerson wrote: »
    Emacs 4 lyfe

    Well, maybe. It seems likely that I'll probably use a proper IDE at my next job.

    Eclipse CDT really isn't that bad.

    I dunno, my coding has never really felt limited by my text-entry speed and I'd rather have the easier navigation.

  • InfidelInfidel Heretic Registered User regular
    Anyone here in Calgary?

    Looks like I'll be there the week of April 14th for a Microsoft BI course.

    OrokosPA.png
  • ASimPersonASimPerson Cold... ... and hard.Registered User regular
    a5ehren wrote: »
    ASimPerson wrote: »
    Emacs 4 lyfe

    Well, maybe. It seems likely that I'll probably use a proper IDE at my next job.

    Eclipse CDT really isn't that bad.

    I dunno, my coding has never really felt limited by my text-entry speed and I'd rather have the easier navigation.

    I don't mind Eclipse CDT either. In fact I was just using it for the debugger UI.

    But for day-to-day development it was just impractical due to the size of our codebase(s).

    My next gig will be Android focused, so... yeah.

  • an_altan_alt Registered User regular
    Mahnmut wrote: »
    an_alt wrote: »
    Mahnmut wrote: »
    I had seen basically no recursion whatsoever until I took an algorithms class on Coursera, and trees and stuff are exactly where! Lots of little recursions like:
        public void put(Key key, Value val) {
            root = put(root, key, val);
            root.color = BLACK;
            assert check();
        }
    
        // insert the key-value pair in the subtree rooted at h
        private Node[b] put(Node h, Key key, Value val)[/b] { 
            if (h == null) return new Node(key, val, RED, 1);
    
            int cmp = key.compareTo(h.key);
            if      (cmp < 0) h.left  = [b]put(h.left,  key, val[/b]); 
            else if (cmp > 0) h.right = [b]put(h.right, key, val);[/b] 
            else              h.val   = val;
    
            // fix-up any right-leaning links
            if (isRed(h.right) && !isRed(h.left))      h = rotateLeft(h);
            if (isRed(h.left)  &&  isRed(h.left.left)) h = rotateRight(h);
            if (isRed(h.left)  &&  isRed(h.right))     flipColors(h);
            h.N = size(h.left) + size(h.right) + 1;
    
            return h;
        }
    

    Was that the Sedgewick course?

    Yeah! I thought it was really great. Especially the programming assignments -- very satisfying to ace the autograder's enormous battery of tests.

    I thought it was great too. People may laugh at the idea of an algorithm course in Java, but he did a fantastic job. I took it as a refresher, but I definitely learned a few things.

    It also had the side effect of catching me up to date with the current state of Java at the time. So much material would have been painful prior to the introduction of generics, for example.

    Pony wrote:
    I think that the internet has been for years on the path to creating what is essentially an electronic Necronomicon: A collection of blasphemous unrealities so perverse that to even glimpse at its contents, if but for a moment, is to irrevocably forfeit a portion of your sanity.
    Xbox - PearlBlueS0ul, Steam
    If you ever need to talk to someone, feel free to message me. Yes, that includes you.
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    making massive strides in C++ game development

    editable map files that can be imported, check
    mouse and keyboard movement with all kinds of edge case handling, with collisions, check
    line of sight to determine if enemies are visible, check
    a combat engine with cooldowns, check

    big todos: AI (ugh), advanced effects rendering (sparkles, flashes, lighting), text rendering that isn't leaky and slow

    this is a discord of mostly PA people interested in fighting games: https://discord.gg/DZWa97d5rz

    we also talk about other random shit and clown upon each other
  • gavindelgavindel The reason all your software is brokenRegistered User regular
    All nice comments about Scheme are utterly retracted in the face of multilayered set operations, done by hand.

    If I wanted to union a set difference except the intersection of jim and joe bob, I'd use a fucking library function. In a sane world.

    Book - Royal road - Free! Seraphim === TTRPG - Wuxia - Free! Seln Alora
  • urahonkyurahonky Cynical Old Man Registered User regular
    I just want to say: fuck scheme.

    But I may be biased because in the class that they teach Scheme they also teach Ruby. And after going from scheme to Ruby I felt like I was touched by the holy spirit.

  • LD50LD50 Registered User regular
    What is this bizarre place where they teach both Scheme and Ruby in the same class? Is it a metaprogramming class or something?

  • BowenBowen Sup? Registered User regular
    Might be an Artificial Intelligence class? That's about the only place I can see it.

This discussion has been closed.