User Controls

  1. 1
  2. 2
  3. 3
  4. ...
  5. 800
  6. 801
  7. 802
  8. 803
  9. 804
  10. 805
  11. ...
  12. 830
  13. 831
  14. 832
  15. 833

Posts by Lanny

  1. Lanny Bird of Courage
    It appears to me, that being able to type fast and 'only use the keyboard', is the choice of professionals. I made a thread about this on either Zoklet or RDFRN, asking if I should try to stop using my mouse.

    I've never used VIM, but I think if I tried anything else, that would be the first thing I looked at.


    Yeah, the action of moving your dominant hand from your keyboard to your mouse too often, aside from just being kinda slow, can lead to RSI and stuff.It seems like it either just happens to some people or it doesn't for whatever reason. Things like a 10 keyless board help but some people (like me) strongly prefer having a number pad and there's still some strain there, just less. To be fair you can probably rig up mouseless workflows in most IDEs I imagine but they generally involve some kind of emacs-like combination of modifier keys which poses its own RSI risks and (and obviously I'm a bit biased here) I don't think you can capture the same power of composable commands that you get with VIM's modal design.
  2. Lanny Bird of Courage
    So I took some AL-LAD and smoked some weed right before the peak and by the time I put down my pipe I was like "well that was a mistake". Spent the following hour or so curled up on my bed watching spirited away, couldn't follow it at all of course but the visual progression was the only way I could perceive the passage of time. I had like a "meta" thought, like thinking about the nature of what I was feeling then but then I started thinking about thinking about what I was thinking so on to the point that I was thinking about the last thing I was thinking uncountably fast, it felt like perpetually falling upwards but swung back and forth between being terrifying and sublime. If I really focused I could process some small piece of information before I went to the next meta-frame so I could coordinate stumbling around a little bit but I would like get somewhere and have to just do this super-short planning process again.

    Good shit.
  3. Lanny Bird of Courage
    Defending ones life is never murder. I don't believe in shooting looters or killing people for stealing stuff; but I see nothing wrong with a man or a woman defending their home, where they lay their head and raise their family, with lethal force.

    Murder is a legal term and many (perhaps most) jurisdictions have situations under which self defense with lethal force constitutes murder.
  4. Lanny Bird of Courage
    No man should need another man to protect him.


    Only dumb beta pussies are so scared of the world that they think literally every member of the citizenry needs to be able to murder at the drop of a hat. Like I always catch flack for having a Hobbesian outlook but you do too, you're just too oblivious to realize what it entails.
  5. Lanny Bird of Courage
    brave bird x pitysex collab is pretty good tho
  6. Lanny Bird of Courage
    omg senpai noticed me
  7. Lanny Bird of Courage
    I can't see my PMs or create threads and haven't been able to for hours. Fix it fix it fix iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiitttttt now!!! *bangs on desk in alternating rapid succession*

    I wasn't able to reproduce it on the usual test account. I dropped the system cache which is what usually fixes this problem but since I couldn't observe it in the first place I have no way to verify if it did anything. Is it still happening?

    BTW, what's in your system? Just curious if you generally only write like this while stimmed up.

    2-FMA and booze.

    are you really self-loathing, Lanny? from what I understand, you are getting your education and living your life right, what's to loathe about that?

    Nah, not really. I just strongly identify with a specific sub-culture but then resent some of the emerging trends within it.
  8. Lanny Bird of Courage
    God damnit, which page were you trying to get to? Create a post or a PM?
  9. Lanny Bird of Courage
    Hard to say there's an obvious best. If there were no learning curve involved I'd probably say C since on some level it's easier to build high-level programs out of low level ones than it is to go the other way, but then there is a learning curve. If you asked which I'd actually want to write an exploit in the answer is Python unless I know beforehand that it requires deeply magical bit bashing.

    Ruby, Python, and Perl occupy basically the exact same space in terms of what they're each good/bad at. I'm a python fan because I like it's language designs the most out of the three, but perl is probably the classically more "hackerish" language (not good per se, just more popular in that circle historically). The largest schism between Ruby and Python is that Python represents a more structured language design, with an emphasis on having "one right solution" in the sense that there should be one obvious way to do a thing while ruby is more permissive in syntax/semantics and the designers are willing to create a pitfall for the benefit of some other system or feature or what-have-you. I've had multiple people describe Ruby as "you can write anything and it just works (but not always the way you expect)" and I'm sympathetic to that, not so much that it's fault tolerant as there are a number of "tricks" or shorthands in the language but they don't always play together well. Perl exists mostly as a confluence of historical forces. Its advocates will make claims about things like "good for prototyping" or "good with string manipulation" but the truth is that it's unnecessarily opaque and it's loved for the fact that you can make fun-but-incomprehensible one-liners with it.

    As for assembly, I'm not sure. There is basically never a good reason to write ASM instead of C, but then knowing C is basically a prerequisite for ASM (I don't know if this is a physical law or whatever, but I've never heard of someone learning ASM without knowing at least _some_ C, the famous P&H textbook assumes students have a grasp on C and it seems like everyone takes there cues from there). The idea of assembly is, in an academic setting, almost always as a compile-target. You learn it to understand you compiler and CPU better, not to write it.
  10. Lanny Bird of Courage
    I've hopped around on IDEs a lot in the past. 3~4 years ago I switched to using vim for 100% of my programming work (and a lot of other stuff since) and am still on that, it's been my longest running setup for programming, although I've certainly gone through a lot of vimrc configurations in that time (in the last month or so I added NERDTree, then wrote a series of macros linking `find` and `mvim` and since uninstalled it).

    For whatever it's worth, in my experience probably 60% of programmers I've run into in the workforce use some sort of IDE with the remaining split between sublime/atom/vim/emacs but obviously that number fluctuates from workplace to workplace. To some degree an IDE or text editor is the most trivial part of a development setup but I mean if you're going to spend hours and hours of your life with the fucking thing even small things are worth finding a comfortable fit and I mean tricking out your shit is just pretty fun on its own.

    I chose my vim setup for a number of reasons. The primary one is that at some point I had internalized the vim keybinds enough that I can't type as fast on anything else and I expect to die that way. People sometimes question if there's really anything meaningful to be gained by the archaic modal editor paradigm and it's a fair question but for me, personally, the answer is a resounding yes. I mean even if it's not any faster, the frustration of using the simpler universal set of editor controls makes me facepalm enough that the time spent on that is enough to tip the scales in my favor. A lot of people point out that (sublime|eclipse|atom|emacs|whatever) has vim-like keybinds but so far I've yet to see one that isn't at least subtly wrong in some way and it always bugs the shit out of me, one point of wrong behaviour is enough to throw off my entire "flow" I've found.

    I've always worked in dynamic languages, so even heroic efforts like we see from jet brains means static analysis is pretty mediocre. A decent jump-to plugin and some experience with picking up new code bases makes SA unnecessary. People will argue that that's just learning to compensate for an editor failure and it may be true but even then I'm happy to give it up for superior text editing. You only need to learn call signatures/types once while you'll need to jocky around lines of text until you die or quit programming.

    Anyway, yeah, I like the "editor separate from tooling" approach and use vim exclusively. IDEs have some cool features but there aren't a lot of thing that aren't implemented as a plugin to your editor of choice, so the question becomes "which is the best text editor" and I think vim wins that battle.

    Oh, soph, if you don't know python has a nice simple debugger built in. Just stick `import pdb; pdb.set_trace()` on a line, and when that line gets executed you'll be dropped into an environment that's a lot like the REPL but in the context of the line being executed (so you can interact with/inspect locals and stuff). In 3 years of doing python dev every day I never needed more than that (well a few times I did, used "rdb" which is the same thing except for communicating with processes that don't have a STDIN/OUT (daemons) via a local TCP connection).
  11. Lanny Bird of Courage
    Happy to help blood, I feel bad that I leave threads in this forum unreplied to (among other things) either out of laziness or a lack of domain knowledge so it's nice if I can be helpful now and then. Feel free to ask follow ups on anything you don't understand, for any reason. Obviously some things are easier to just google but some questions are hard to google for like "ternary operator". I remember trying to google for the ternary operator the first time I saw it (not knowing it was called that) and "?:" or "X?Y:Z" don't return useful results (interestingly "colon question mark" does actually have some valid results). Similar situation with list comprehensions, string interpolation, tuple unpacking etc. (and just for python). And of course there are some things that are just easier to talk through/ask about than read through.
  12. Lanny Bird of Courage
    Definitely is, I remember it.

    I miss that nigga, we was gonna come crash on my couch but then got afraid of rape so no dice.

    I'm sure hit little ginger ass would have been sooo sweet.
  13. Lanny Bird of Courage
    I wonder if arnox has an alt. I could prolly check if he isn't using a proxy (prolly not) but I'm too lazy to check.
  14. Lanny Bird of Courage
    [FONT=arial]So I got the idea in my head that I wanted to watch some of those [/FONT][FONT=arial]online university lectures people always talk about but never do. A [/FONT][FONT=arial]while ago I worked on a little project that required some cursory [/FONT][FONT=arial]knowledge of linguistics (a program to generate phonetic puns). I [/FONT][FONT=arial]managed to hack it with wikipedia but found that part of it really [/FONT][FONT=arial]interesting so I thought to myself "Ima gonna go learn some l[/FONT][FONT=arial, sans-serif]inguistics". But when I started looking around at what was out there through I came to a realization: self-education online almost perfectly mirrors the abhorrent superiority complex of dumshit job-hungry STEM undergrads. The first place I looked was MIT and ironically while I'd be willing to forgive them for a STEM focused set of resources (being the renown engineering school) but they actually had one of the better (but still comparatively deficient) representations of the humanities.

    Go to [/FONT]https://www.coursera.org/browse/][FONT=arial, sans-serif]coursera[/FONT][FONT=arial, sans-serif]. Look at the categories available there. It's fucking retarded that this thing tries to represent itself as a replacement for a liberal education. "Arts and Humanities" are put on the same level as "Computer Science". In the system nearly every great mind of the modern era has been trained in the arts and the humanities are two separate colleges, entirely different from the singular school that includes the disciplines coursera calls "Computer Science", "Math and Logic", "Physical Science and Engineering", and "Life Sciences". Don't even get me started on "Data Science". Fucking data science is a short lived fad with minimal academic recognition and wholly subordinate to CS which is in turn of a subordinate kind to categories like "Humanities".

    Offerings in philosophy out of these sites is laughable. Offerings in linguistics are laughable. The only disciplines that seem well represented are computer science and various "hard sciences" like physics and bio.

    Listen, I studied computer science. I fucking love computer science, a lot more than I love myself. I eat, breathe, and live this shit and I can see, plain as day, that this is wong. STEM supremacy isn't a thing that exists at a meaningful level among academics, even a fucking hick like me knows that every interesting problem in computer science is a problem in either mathematics or electrical engineering, this is a hodunk subfield that's been risen above it station by a quirk of human history and an accident of the parameters of the physical universe. I love it to death and it's the only useful thing I've ever do with my life but it's a myopic fucking nothing. That doesn't mean it's nothing, there are plenty of hard problems here for people like me, people with a neurotic drive to solve this one particular kind of problem, to understand one miniscule corner of the universe, but look at how the ignorant slobs of the world look at it.

    I've been watching people try to get into this field for a long time. People who made it are treated with some kind of bullshit "reverence". I can't count how many time I've heard people say in a self-disparaging manner "I'm not smart enough to write code" or "I guess I'm too dumb to get this". I want to grab them and scream that this isn't intelligence, it's fucking OCD. They try to grab onto something tiny and zoom way in and they fail, they pull back, and they think they're inadequate when what we need is people who can realize that the world where we solve P=NP in order to make prettier graphs of facebook friends if fucking broken on a profound level.

    I'm not saying every STEM major needs to go enroll in a philosophy program, god knows that would be the same problem all over again, and I'm the last person who will ever condone the unmitigated fucktardeness that is the concept of an "idea guy". But the point is that we need to think long and hard about what we want out of our careers (not just picking the career path that gives us the most money for the least misery but finding something to spend half your working life doing that you'd give a fuck about if you weren't collecting a check at the end of the month) and how we, as a society, impose our desires on the youth. There was a time when the US was brimming over with lawyers. Another with doctors. The current "computer science"(read: code monkey) craze was a thing back in the first bubble too. For better or worse, our culture generates ideas about who among us have good lives, which jobs are worth having and who is worth emulating. These ideas condemn literally millions of young people a life-long career every single years. It is appropriate then that we think about the assumptions that underpin what occupations we value and to what degree. Just because Apple needs more code monkeys to churn out the next "revolutionary" consumer electronic and is willing to pay a pretty penny to get them, does that mean we need to pressure human beings to giving up a satisfying career to make that happen? If nothing changes there will come a day when the only people qualified to engage with that question will be too poor to feed themselves.
    [/FONT]
  15. Lanny Bird of Courage
    lol, is that second pic in the first vid arley?
  16. Lanny Bird of Courage
    There's no deep magic here, a hex dump is pretty straightforward, there's just some cleverness in the implementation here (for shorter code, not really performance. I'm tempted to call it "showy").

    My comments on lines that seem non-obvious to me, if I leave something out that's unclear let me know.

    digits = 4 if isinstance(src, unicode) else 2


    the if/else construct here is python's rendition of the the ternary operator. In its general form it can be rewritten

    VAR = LEFT if COND else RIGHT


    becomes


    def f():
    if COND:
    return LEFT:
    else:
    return RIGHT

    VAR = f()


    The interesting difference here is that the ternary form is an expression, that is it has a value, while a traditional if/else can only operate through side effects (changing variable values and such), it's incoherent to ask "what is the value of a (traditional) if/else" in the same way we might ask "what is the value of this function call" or "what is the value of `2 + 2`". In C-like languages the ternary form is viewed with a sort of suspicion, it's considered "tricky" and non-standard compilers have trained programmers to fear promises short-circuit semantics (i.e. that only one arm of an if will be executed) but in functional programming circles a language construct that isn't an expression is variously considered poor style or blatantly wrong.

    But that's kind of a tangent on style. Ternary operator aside, the point here is that `digits` is the number of nibbles per character of `src`. The character/byte/symbol/glyph/what-the-fuck-ever distinction is subtle the idea is this: each hexadecimal digit (0-F) represents a nibble (half a byte, 4 bits, 2^4 = 16 possible values). If the text is encoded in ASCII then each 'character' (character being what's accessed by python's subscript notation ('foo'[1] == 'f')) is 1 byte (two nibbles) but if it's UTF-16 (16-bit characters) then it's 2 bytes or 4 nibbles. This is kind of a strange way of doing things, I don't know why anyone would be receiving something over a network in anything other than a byte-string (represented in python 2.x as type `str` rather than `unicode`) but whatever, that's the idea here.

    for i in xrange(0, len(src), length):


    `xrange` is basically the same thing as `range`, it just has to do with when the sequence is generated. Python has what are called 'generators' which are what we'd call 'lazy sequences' in other languages. It just means that the next number in the range is computed when it's asked for, instead of when the function is first called. For large sequences this is more efficient because we don't need to store the whole sequence in memory, we can just generate numbers as needed and let GC dispose of them when we move onto the next. The third argument just says "increments in steps of `length`", and `length` is the number of characters worth of data to show per line.

    s = src[i:i+length]


    Slice notation, s becomes a `length` long substring of src starting at `i`.

    hexa = b' '.join(["%0*X" % (digits, ord(x)) for x in s])


    There's a lot going on in this line. Python has a construct called "list comprehensions" which are a way of defining a list as a function of another list. They look like:

    [ITEM_EXPR for VAR_NAME in SRC_LIST]


    Which will step over every item in SRC_LIST, assign the item's value to VAR_NAME, and make the item in the result list with the same index the value of ITEM_EXPR where VAR_ NAME is bound. That sounds fancy but it's just a shorthand for a for loop. Consider:

    src = [39, 40, 41]
    dest = [x+1 for x in src]
    # dest === [40, 41, 42]


    Although there's special syntax for "enhancement" operations as well but we don't have to worry about that since it's not used here. The important point is that it defines a transformation of a list. So we know what two thirds of this list comprehension is doing. `s` is the 16 characters of data (it's not actually a list, but it is what's called an `iterable` in python, meaning we can use the subscript and list comprehension syntax on it) and `x` will be each character of that data when the ITEM_EXPR is evaluated. So the question is what

    "%0*X" % (digits, ord(x))


    does. This syntax (more syntax, sorry) is known as interpolation. The general form is `FORMAT % PARAMS` where FORMAT is a string that's like a "template" and some data that's going to be formatted (according to the template) in the output. You see a lot of this in things like


    name = "Sophie"
    print "Hello there %s" % name


    which will output "Hello there Sophie". `%s` is the marker for "format the corresponding input as a string and stick it here". "%X" is the marker for "format the corresponding input as a hexadecimal number and stick it here". You can specify "zero padding", so like "%X" % 32` would be `"20"` but `"%04X" % 32` would be `"0020"` (the output will always be four characters, even if that means including leading zeros which we don't traditionally do). You can also specify the length of the padding as a parameter in the same way we specify the number to be formatted. That's what `%0*X` means, pad with the number of 0s of the corresponding parameters, in this case that's the value of `length`. So the result of the list comprehension is a list of (presumably 16) strings that are the hex representation of the bytes in our length-16 slice of src. `' '.join(LIST)` just returns a string which is each member of LIST concatenated and separated by `' '` (a space).

    As an aside, most languages implements join either as a standalone function or as a method on list types while in python you get this odd inversion of it being a method of strings. Guido has an argument for why this is so and it actually kinda works but it's interesting that most programmers consider it a "wart" on python.

    Oh, and `ord(CHAR)` returns the byte value of CHAR, so like `ord('a')` is 61 (base 10) because under ASCII and UTF-8 'a' is encoded as the 61 (well, the byte that has the numeric value of 61, whatever).

    text = b''.join([x if 0x20 <= ord(x) < 0x7f else b'.' for x in s])


    Similar thing here, we're just iterating over each character in src. The difference is that the list built by the list comprehension is of single characters. If the character is outside the printable range (i.e. less than 32 (0x20) or more than 127 (0x7f)) it's represented in the dump as just a simple dot, so things like control characters, you see these frequently in binary data since it's basically random bit patterns (at least when looking at it as a hex dump. This helps because something like a newline has a 1 in 256 chance of appearing in a byte in a chunk of binary and if that gets printed in your dump the formatting will be fucked. So yeah, the point of this line is to produce the right column (like you see here) and the LC replaces non-printables with dots.

    result.append( b"%04X %-*s %s" % (i, length*(digits + 1), hexa, text) )[/quote]

    More string formatting. Start every line with the "line number", that is the index of the first byte in that line (printed in hex). Then the hex values (calculated two lines up) (and padded with '-', in the case the last line isn't the same length as the others (this is the `%-*s` part). Then the printable ascii representation, the third column (the last `%s`).

    And that's it. Maybe it would have been less opaque if the author had just used for loops and stuff but I've found that as you become a bit more experienced thinking in terms of sequence (or in pythonese "iterable") transformations is a really powerful conceptual model. It's kinda surprising how many problems can be expressed/solved in this way and it lends itself to composability/reuse.
  17. Lanny Bird of Courage
    Hey, wait, is Lanny still stuck in this call? If so he's gotta be absolutely shit faced by now.

    Lol no, it ended in the 8th hour. Got to enjoy waking up at 6 again this morning as well for another, although this one only went for 5 hours. Fun stuff. Wonder what tripping on a business call would be like.
  18. Lanny Bird of Courage
    I doubt it's going to come through at this point. Agora is still down and I don't know if it will reopen. I lose what little interest I had in things so easily, it really doesn't matter, but I don't know if I care enough to try something else. Maybe an RC opioid, or whatever has the best mood enhancing/antidepressant effect.


    Give it a go, I love when you guinea pig for me.

    Hour 7 of the meeting.
  19. Lanny Bird of Courage
    As I recall, statistically gunshot to the head is the way to go. You're underage right? If so I think that's not an option, but if you have access a firearm that's probably the way to go. If you don't fuck it up, hanging is pretty solid. In the stats it's not that effective but then that's because most people who "attempt suicide" don't really want to die or pussy out at the last moment and it's a lot easier to half-ass a hanging than a shooting.

    But really, you probably don't _really_ want to kill yourself so as far as I'm concerned this thread is purely academic.
  20. Lanny Bird of Courage
    Living the life.

    You need opioids, then you'll be completed.

    It's soooo good to hear it. For once we fully agree on something,

    You said you ordered some sort of opiate recently, right? Shipping from China, delayed. Did you get it?
  1. 1
  2. 2
  3. 3
  4. ...
  5. 800
  6. 801
  7. 802
  8. 803
  9. 804
  10. 805
  11. ...
  12. 830
  13. 831
  14. 832
  15. 833
Jump to Top