Options

[Programming] djmitchella travelling through snow to rfind duplicate dates for singletons

18081838586100

Posts

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Sublime text. Vim is... Some people like it apparently?

  • Options
    mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    Basically if you like vim you have Stockholm syndrome

  • Options
    gavindelgavindel The reason all your software is brokenRegistered User regular
    Basically if you like vim you have Stockholm syndrome

    Vim: the program where if you forget a command, you can't leave. Good luck getting that cursor back!

    Book - Royal road - Free! Seraphim === TTRPG - Wuxia - Free! Seln Alora
  • Options
    HounHoun Registered User regular
    gavindel wrote: »
    Basically if you like vim you have Stockholm syndrome

    Vim: the program where if you forget a command, you can't leave. Good luck getting that cursor back!

    ESC, ESC, ESC, ESC, ESC, ESC, Shift+ZZ.

  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    Vim is good if you're locked into only command line stuff and need to make a minor edit to a text file.

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    urahonky wrote: »
    Vim is good tolerable if you're locked into only command line stuff and need to make a minor edit to a text file.

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Example: vim comes standard in our device builds. About half the time I will go through the extra effort putting nano on it, even though I only ever need to add/change a couple lines once

  • Options
    thatassemblyguythatassemblyguy Janitor of Technical Debt .Registered User regular
    I admit I haven't done a good job of learning the IDE editors I use in my day to day, so I'm not sure if any of them offer the mode-editor style of vim.

    I just really like the cursor travel that vim offers in a simple package. Like, reaching for the mouse to click is enough to drop me out of my train of thought sometimes (Yes, I am a dumb, but this is beside the point), so having an editor where my hands stay on the keys I'm using for multiple tasks is amazeballs.

  • Options
    StarfuckStarfuck Registered User, ClubPA regular
    vim + tmux is the bees knees too.

    jackfaces
    "If you're going to play tiddly winks, play it with man hole covers."
    - John McCallum
  • Options
    ecco the dolphinecco the dolphin Registered User regular
    Small fun story from when I first started to use Linux:

    I was really amazed at the whole multi-terminal concept (was it like Alt-F1/F2/... or Ctrl-Alt-F1?)

    and for some reason I loaded up my first instance of vim.

    But couldn't figure out what :q meant =P

    So proving that a little knowledge is a dangerous thing, I went into another text terminal, ps'd and kill -9'd the vim process.

    Penny Arcade Developers at PADev.net.
  • Options
    Jimmy KingJimmy King Registered User regular
    vim is one of those tools that I'd like to learn better. I suspect much like with cli vs gui stuff, once learned I could do a lot of stuff much more quickly. Unfortunately, I can't be bothered to learn it or use it often enough for the keyboard shortcuts to be second nature. I can insert a line above or below, delete a line, start editing wherever I am in a line, save and quite, save and not quit, search, and jump to end or beginning of a file and that lets me get whatever I need to done. My knowledge of emacs is about the same... enough to get shit done without having to spend more time looking at docs than editing the file, but not enough to find it any quicker or easier to use than sublime or atom or whatever.

    tmux is also something I need to learn, now that it's been mentioned. I've used screen for about a billion years and it does what I need so I have a hard time justifying the time to figure out tmux. Everyone I've talked to who has bothered to use both says tmux is better though, so I should figure it out some day.

  • Options
    ecco the dolphinecco the dolphin Registered User regular
    Of course, I say all this as I load up vim/gvim on my Linux machines all the time. =P

    Le *sigh*
    Jimmy King wrote: »
    vim is one of those tools that I'd like to learn better. I suspect much like with cli vs gui stuff, once learned I could do a lot of stuff much more quickly. Unfortunately, I can't be bothered to learn it or use it often enough for the keyboard shortcuts to be second nature. I can insert a line above or below, delete a line, start editing wherever I am in a line, save and quite, save and not quit, search, and jump to end or beginning of a file and that lets me get whatever I need to done. My knowledge of emacs is about the same... enough to get shit done without having to spend more time looking at docs than editing the file, but not enough to find it any quicker or easier to use than sublime or atom or whatever.

    Yeah, I don't know half (more than half, I imagine, actually) the vim shortcuts either. I read through a few vim golf examples, but couldn't make head nor tails of some of them.

    Penny Arcade Developers at PADev.net.
  • Options
    mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    I use the aarow keys to navigate, the ultimate shame for vim users

  • Options
    DelmainDelmain Registered User regular
    I use the aarow keys to navigate, the ultimate shame for vim users

    I realize there are other options, but I never learned them and feel no desire to.

  • Options
    DehumanizedDehumanized Registered User regular
    You can get really elaborate with vim navigation but you get a lot of the way there with just four commands.

    ^d ^u ('down', 'up') go down and up half a page. they're easy to hit, quick for navigation, and also a bit less sledgehammery than pageup/pagedown

    w ('word') jumps to the next word

    b ('back') jumps to the prior word

    hjkl will navigate single characters (left/down/up/right in order). these are pretty functionally boring despite having better hand positions, so if you use arrow keys whatever

    On environments that I plan to use more than once, I usually will also map jk to <ESC> (imap jk <ESC> tossed into your .vimrc file) so that switching between edit mode and cursor mode is an easy keystroke to remember and type ("jk i am done editing this").

  • Options
    AnteCantelopeAnteCantelope Registered User regular
    My biggest problem with vim has to be all the many, many times I've found the part of the file I want to edit and started typing away, without realising I'm not in edit mode, and my typing has done something weird like moved me to a different location, deleted a line, and started recording a macro.

  • Options
    InfidelInfidel Heretic Registered User regular
    As someone who does a lot of server admin and webapp tweaking, I have gotten plenty comfortable with vim and use it as first choice on terminals.

    If you can use it, it's great.

    OrokosPA.png
  • Options
    ElaroElaro Apologetic Registered User regular
    Hey, isn't the proof algorithm for halting problem a little wonky?

    So, say you have a stop(code) function that answers the question of whether it stops or not. Then, if you have an algorithm that goes like this:
    haltingProof()
    {
    while(stop(haltingProof())
    {continue;}
    halt
    }
    

    Well, my problem with it is, if you "implement" it, then stop(haltingProof()) actually becomes infinitely recursive, in this manner:

    1. The while evaluates stop(haltingProof()), so it runs stop
    2. Then the stop evaluates while(stop(haltingProof()), and because the stopping condition is whether stop(haltingProof()) is true or not, stop must evaluate stop(haltingProof()), so it runs stop
    3. Etc. etc.

    What I'm getting at is that things become weird when code-analysis functions are given themselves as arguments. Do they all loop infinitely?

    Children's rights are human rights.
  • Options
    InfidelInfidel Heretic Registered User regular
    The idea is that you can always build a contradiction like the one above.

    Write a program that checks itself using your Halt algorithm. If the Halt algorithm says that you halt, then loop forever, otherwise halt.

    That you can construct such a program is the proof that you can't determine the solution by code, as you can always wrap it into this contradiction.

    OrokosPA.png
  • Options
    InfidelInfidel Heretic Registered User regular
    edited February 2015
    http://youtu.be/macM_MtS_w4

    You can skip to 3:25

    Infidel on
    OrokosPA.png
  • Options
    SeolSeol Registered User regular
    No general procedure for bug checks will do.
    Now, I won’t just assert that, I’ll prove it to you.
    I will prove that although you might work till you drop,
    you cannot tell if computation will stop.

    For imagine we have a procedure called P
    that for specified input permits you to see
    whether specified source code, with all of its faults,
    defines a routine that eventually halts.

    You feed in your program, with suitable data,
    and P gets to work, and a little while later
    (in finite compute time) correctly infers
    whether infinite looping behavior occurs.

    If there will be no looping, then P prints out ‘Good.’
    That means work on this input will halt, as it should.
    But if it detects an unstoppable loop,
    then P reports ‘Bad!’ — which means you’re in the soup.

    Well, the truth is that P cannot possibly be,
    because if you wrote it and gave it to me,
    I could use it to set up a logical bind
    that would shatter your reason and scramble your mind.

    Here’s the trick that I’ll use — and it’s simple to do.
    I’ll define a procedure, which I will call Q,
    that will use P’s predictions of halting success
    to stir up a terrible logical mess.

    For a specified program, say A, one supplies,
    the first step of this program called Q I devise
    is to find out from P what’s the right thing to say
    of the looping behavior of A run on A.

    If P’s answer is ‘Bad!’, Q will suddenly stop.
    But otherwise, Q will go back to the top,
    and start off again, looping endlessly back,
    till the universe dies and turns frozen and black.

    And this program called Q wouldn’t stay on the shelf;
    I would ask it to forecast its run on itself.
    When it reads its own source code, just what will it do?
    What’s the looping behavior of Q run on Q?

    If P warns of infinite loops, Q will quit;
    yet P is supposed to speak truly of it!
    And if Q’s going to quit, then P should say ‘Good.’
    Which makes Q start to loop! (P denied that it would.)

    No matter how P might perform, Q will scoop it:
    Q uses P’s output to make P look stupid.
    Whatever P says, it cannot predict Q:
    P is right when it’s wrong, and is false when it’s true!

    I’ve created a paradox, neat as can be —
    and simply by using your putative P.
    When you posited P you stepped into a snare;
    Your assumption has led you right into my lair.

    So where can this argument possibly go?
    I don’t have to tell you; I’m sure you must know.
    A reductio: There cannot possibly be
    a procedure that acts like the mythical P.

    You can never find general mechanical means
    for predicting the acts of computing machines;
    it’s something that cannot be done. So we users
    must find our own bugs. Our computers are losers!

  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    I'm so glad I wasn't the one that started this vim war.

  • Options
    Jimmy KingJimmy King Registered User regular
    Vim war? That was the most friendly and reasonable discussion of Vim I've ever seen.

  • Options
    gavindelgavindel The reason all your software is brokenRegistered User regular
    Holy crap, that halting song. I need to email that to my Theoretical CS professor so she can show her class.

    Book - Royal road - Free! Seraphim === TTRPG - Wuxia - Free! Seln Alora
  • Options
    DaedalusDaedalus Registered User regular
    Basically if you like vim you have Stockholm syndrome

    I started learning vi because the only editor on our target hardware was BusyBox's crappy version of vi.

    Then I learned vim when our development network's X server crapped out for a day or so because hey, I already knew the basics

    Now I can't use anything else. The last time I used Visual Studio, I had random ":w" all over my code from when I absent-mindedly tried to save.

  • Options
    Jimmy KingJimmy King Registered User regular
    I'm starting to think that our designers and project managers have come to believe that agile means "we can add a feature or change our minds at any time and the developers have to do it while meeting the same deadline and all other features... even if the project launches tomorrow".

    They also seem to have funny definitions of "use the same", "won't make any changes", and "do nothing".

  • Options
    crimsoncoyotecrimsoncoyote Registered User regular
    Jimmy King wrote: »
    I'm starting to think that our designers and project managers have come to believe that agile means "we can add a feature or change our minds at any time and the developers have to do it while meeting the same deadline and all other features... even if the project launches tomorrow".

    They also seem to have funny definitions of "use the same", "won't make any changes", and "do nothing".
    D:

    I feel you. I really do. I have some similar issues and fears...

  • Options
    zeenyzeeny Registered User regular
    edited February 2015
    Starfuck wrote: »
    vim + tmux is the bees knees too.

    Always amazes me how many people use Vim instead of emacs on this forum, while in language specific communities I always feel that emacs is on top....Probably wishful thinking.

    Edit: I'm speaking specifically about development of course.....

    zeeny on
  • Options
    AnteCantelopeAnteCantelope Registered User regular
    I'm trying to make a simple browser-based multiplayer game as a learning exercise, but I'm really inexperienced when it comes to web UI stuff. To keep it simple, imagine it's a game of noughts and crosses. I want two people to be able to go to a page, the server picks one of them to be crosses, they click in the grid and both players see a cross where they clicked.

    Does anyone know a good tutorial for stuff like that? I'm hoping to keep it to just javascript, no plugins or flash or anything, and I don't need animations or physics or anything. I could do a really simple version of client vs server, but I don't know where to start with making one player's choice visible to the other, at least without making the other player sit there refreshing until something happens.

  • Options
    InfidelInfidel Heretic Registered User regular
    @AnteCantelope

    Don't have any good articles to point you too but I have a good bit of experience with custom Javascript AJAX long-polling / Comet, and WebSockets, as the two main places you'd look at.

    OrokosPA.png
  • Options
    djmitchelladjmitchella Registered User regular
    You could use Firebase as a starting point; it's free, they have examples, and it'll take care of the client-server part for you (plus it falls back from websockets to long polling/etc automatically, which saves you a bunch of browser compatibility pain). Caveat: I haven't personally used Firebase, but people around here have played with it and it seems fine for them.

  • Options
    ElaroElaro Apologetic Registered User regular
    Well, okay. the Church-Turing hypothesis says that there is no computing machine that is stronger than a Turing machine. Yet, we humans can recognize that P(Q) is a paradox. So how are we humans able to recognize ("be stronger than") a Turing machine? What do we have that computers don't?

    I still think P(Q) loops infinitely, thereby giving no answer.
    P(Q)=P(Q) ; which gives
    P(Q)=P(while(P(Q))continue else halt ; which gives
    P(Q)=P(while(P(while(P(Q))continue then halt)) continue else halt ; and so on

    What if P checked calls from A to A and also from A to P? I think what happens here is it detects that Q is calling P(Q) and throws an exception. I'm well convinced enough that you can't determine if any program will loop infinitely, but I'm pretty sure that you can determine the halting quality of some, or perhaps most, programs.

    Children's rights are human rights.
  • Options
    AnteCantelopeAnteCantelope Registered User regular
    Infidel wrote: »
    Don't have any good articles to point you too but I have a good bit of experience with custom Javascript AJAX long-polling / Comet, and WebSockets, as the two main places you'd look at.

    I don't really know where to start, and I didn't want to hop on here and say "Tell me everything!"

    So, I should start learning AJAX? I'd probably prefer to stay away from websockets, I think.

  • Options
    GrobianGrobian What's on sale? Pliers!Registered User regular
    Elaro wrote: »
    Well, okay. the Church-Turing hypothesis says that there is no computing machine that is stronger than a Turing machine. Yet, we humans can recognize that P(Q) is a paradox. So how are we humans able to recognize ("be stronger than") a Turing machine? What do we have that computers don't?

    I still think P(Q) loops infinitely, thereby giving no answer.
    P(Q)=P(Q) ; which gives
    P(Q)=P(while(P(Q))continue else halt ; which gives
    P(Q)=P(while(P(while(P(Q))continue then halt)) continue else halt ; and so on

    What if P checked calls from A to A and also from A to P? I think what happens here is it detects that Q is calling P(Q) and throws an exception. I'm well convinced enough that you can't determine if any program will loop infinitely, but I'm pretty sure that you can determine the halting quality of some, or perhaps most, programs.

    That's obvious and no one is debating that. The halting problem is that you can't have an algorithm that checks halting for every algorithm.

  • Options
    GrobianGrobian What's on sale? Pliers!Registered User regular
    You're making assumptions about how P works. That doesn't matter, you can treat it like a black box that just spits out true or false for the sake of the paradox.

  • Options
    GrobianGrobian What's on sale? Pliers!Registered User regular
    (Sorry for the triple post, I'm on mobile)
    Also simply knowing that it is a paradox doesn't make you more powerful than a Turing machine. You still can't say if the algorithm halts or not, that's the whole point.

  • Options
    DelmainDelmain Registered User regular
    Infidel wrote: »
    Don't have any good articles to point you too but I have a good bit of experience with custom Javascript AJAX long-polling / Comet, and WebSockets, as the two main places you'd look at.

    I don't really know where to start, and I didn't want to hop on here and say "Tell me everything!"

    So, I should start learning AJAX? I'd probably prefer to stay away from websockets, I think.

    I'd take a look at Node.js

    It's pretty powerful and event based stuff like this is pretty easy in Node

  • Options
    Jimmy KingJimmy King Registered User regular
    wheee big fancy website release today. god I hope it works.

  • Options
    SpawnbrokerSpawnbroker Registered User regular
    Currently building our second provider-hosted app at work this week. We're going to end up selling it to customers and hosting it ourselves on a public server, since it doesn't store any data. Here's hoping people like it, I think one of our customers has already bought it and that's paying for our R&D work on this thing.

    I still don't know if anyone else in the industry is doing this kind of thing, but it's getting us plenty of business. It looks like hybrid solutions between on-premise and the cloud is where the future is going for SharePoint. Nobody wants to go full cloud, but there seems to be a lot of interest in either "mostly cloud" or "semi cloud" for a lot of businesses.

    Steam: Spawnbroker
  • Options
    KambingKambing Registered User regular
    edited February 2015
    Elaro wrote: »
    Well, okay. the Church-Turing hypothesis says that there is no computing machine that is stronger than a Turing machine. Yet, we humans can recognize that P(Q) is a paradox. So how are we humans able to recognize ("be stronger than") a Turing machine? What do we have that computers don't?

    I still think P(Q) loops infinitely, thereby giving no answer.
    P(Q)=P(Q) ; which gives
    P(Q)=P(while(P(Q))continue else halt ; which gives
    P(Q)=P(while(P(while(P(Q))continue then halt)) continue else halt ; and so on

    What if P checked calls from A to A and also from A to P? I think what happens here is it detects that Q is calling P(Q) and throws an exception. I'm well convinced enough that you can't determine if any program will loop infinitely, but I'm pretty sure that you can determine the halting quality of some, or perhaps most, programs.

    When you say "humans can recognize that P(Q) is a paradox", you are no longer talking about the domain of programs but the domain of proofs. A human recognizes/verifies the diagonalization proof via the rules of some logic; similarly a computer can do the same thing. In this sense, a computer can recognize the diagonalization paradox as well.

    It's important to note that the diagonalization argument actually shows how both human logic and computers are limited in the same way. We are unable to make a decision about what P(Q) returns not because of an infinite loop but because of a logical contradiction.

    As an aside, note that the Church-Turing hypothesis relates an informal notion of computability ("things we can compute on pen and paper") with the formal notions of computability: general recursive functions, the λ-calculus, and turing machines. It isn't a proven theorem (because of the "informal notion of computability"), and it only comments on what computation can do versus cannot do.

    Kambing on
    @TwitchTV, @Youtube: master-level zerg ladder/customs, commentary, and random miscellany.
Sign In or Register to comment.