• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. Guide to Z80 ASM basics

      I've been thinking about messing around with Z80 ASM for a while with the end goal of doing interesting things with one of my old TI calculators. Finally got around to doing some googling, found...

      I've been thinking about messing around with Z80 ASM for a while with the end goal of doing interesting things with one of my old TI calculators. Finally got around to doing some googling, found this guide to the basics, and thought I'd share it for anyone else who might like to read it.

      13 votes
    2. Programming challenge: undo this "Caesar" cipher.

      Disclaimer: I'm a novice and this is a half baked idea Recap The Caesar cipher is fairly straight forward as it just shifts letters along by a set amount. This means that it's quite easy to brute...

      Disclaimer: I'm a novice and this is a half baked idea

      Recap

      The Caesar cipher is fairly straight forward as it just shifts letters along by a set amount. This means that it's quite easy to brute force. There's only 25 offsets, after all. Try to decode this to see what i mean:

      Plqfh 3 foryhv ri jduolf, dqg frpelqh lq d vpdoo erzo zlwk pdbrqqdlvh, dqfkrylhv, 2 wdeohvsrrqv ri wkh Sduphvdq fkhhvh, Zrufhvwhuvkluh vdxfh, pxvwdug dqg ohprq mxlfh. Vhdvrq wr wdvwh zlwk vdow dqg eodfn shsshu. Uhiuljhudwh xqwlo uhdgb wr xvh. Khdw rlo lq d odujh iublqj sdq ryhu phglxp khdw. Fxw wkh uhpdlqlqj 3 foryhv ri jduolf lqwr txduwhuv, dqg dgg wr krw rlo. Frrn dqg vwlu xqwlo eurzq, dqg wkhq uhpryh jduolf iurp sdq. Dgg euhdg fxehv wr wkh krw rlo. Frrn, wxuqlqj iuhtxhqwob, xqwlo oljkwob eurzqhg. Uhpryh euhdg fxehv iurp rlo, dqg vhdvrq zlwk vdow dqg shsshu. Sodfh ohwwxfh lq d odujh erzo. Wrvv zlwk guhvvlqj, uhpdlqlqj Sduphvdq fkhhvh, dqg vhdvrqhg euhdg fxehv.
      bonus points for a program that takes the above text and outputs the shift I used without any human input

      My dumb idea (didn't work, my bad. They're in normal Caeser cipher now)

      I like the simplicity of the shifting characters but having it always be in one direction, and always being the same offset makes it easy to notice the pattern and decode.

      If we have the shift value determined by the length of the current word, and the direction of it dependent on if it's a vowel or a consonant.
      a pirate is nothing without his ship becomes
      b jolgnk kq gvmapgz ppmavbm elp odml so we still have a visibly Caesar-y cipher, but we'll know it's not a true Caesar cipher.
      The offset changes for every word and then is applied based on each letter in the word. If it's a vowel, then the encoded value is shifted upwards but if not, it slides down.

      For the purposes of the below tomfoolery; prime numbers are consonants and the rest are vowels.

      A Valley Without Wind 1 and 2 Steam Key:
      B qjsbuf jt opuijoh xjuipvu ijt tijq
      FWR0H-GQM7B-5344H
      
      Aces Wild: Manic Brawling Action:
      C rktcvg ku pqvjkpi ykvjqwv jku ujkr
      K5R0H-29NPM-A3OTE
      
      Age of Empires Legacy Bundle:
      D sludwh lv qrwklqj zlwkrxw klv vkls
      69PQW-UY3H7-7SQWT
      
      AI War + 4 DLC packs & Tidalis Steam Key:
      E tmvexi mw rsxlmrk amxlsyx lmw wlmt
      KO99D-73JZ2-XNIK3
      
      AI War: Vengeance Steam Key:
      F unwfyj nx stymnsl bnymtzy mnx xmnu
      7M2I8-I99N9-6E9F2
      
      Alan Wake Collector's Edition Steam Key:
      G voxgzk oy tuznotm coznuaz noy ynov
      6ZNJ5-BIVFN-6ZSDZ
      
      Alan Wake's American Nightmare Steam Key:
      H wpyhal pz uvaopun dpaovba opz zopw
      7RERD-4ACYN-TCDQ2
      
      Amnesia: Dark Descent Steam Key:
      I xqzibm qa vwbpqvo eqbpwcb pqa apqx
      VGEO8-OU48X-MU7BL
      
      Anachronox:
      J yrajcn rb wxcqrwp frcqxdc qrb bqry
      3589L-YGF9V-NKGW0
      
      Anodyne:
      K zsbkdo sc xydrsxq gsdryed rsc crsz
      9HW7H-7Z73Z-6302D
      
      Anomaly Defenders:
      L atclep td yzestyr hteszfe std dsta
      ICPIB-M63TI-9Y96V
      
      Anomaly Korea:
      M budmfq ue zaftuzs iuftagf tue etub
      QMPZ2-JUK8B-JRK3V
      
      Anomaly Korea:
      N cvengr vf abguvat jvgubhg uvf fuvc
      30R9T-C02AA-7DQLG
      
      Anomaly Warzone Earth:
      O dwfohs wg bchvwbu kwhvcih vwg gvwd
      38UM9-Z26PH-Q4VAU
      
      Anomaly Warzone Earth Mobile Campaign:
      P exgpit xh cdiwxcv lxiwdji wxh hwxe
      54TYN-AU26Q-5AGGY
      
      Aquaria Steam key:
      Q fyhqju yi dejxydw myjxekj xyi ixyf
      3853A-YSB4J-6243A
      
      Awesomenauts:
      R gzirkv zj efkyzex nzkyflk yzj jyzg
      DH9T5-BWOQC-KB6TB
      
      Awesomenauts:
      S hajslw ak fglzafy oalzgml zak kzah
      RNRJ0-CPT4O-S9UHE
      
      Awesomenauts Cluck Costume:
      T ibktmx bl ghmabgz pbmahnm abl labi
      VOWWW-QTR3Q-EAS9J
      

      These are encoded using a Caeser shift. The line under the title is a fixed phrase (a pirate is nothing without his ship) for aid in the bonus points

      I can post my code if it turns out to be unsolvable (like a bug https://trinket.io/python/dabf2b61f9), but if not; I can also keep going from letters A to Y (sans U) over the weeks with my humble bundle reserves (plaintext or not). I've had these keys for far too long and I'm never going to actually use them, but I also noticed a surge of keys being donated here so figured I might as well change it up.

      Have fun

      9 votes
    3. What trick/pattern/concept/whatever did you adopt that has improved your code quality?

      One big thing that has made maintenance of my older code easier has been considering the concept of cyclomatic complexity. In particular, limiting conditional checks to exceptional cases as much...

      One big thing that has made maintenance of my older code easier has been considering the concept of cyclomatic complexity. In particular, limiting conditional checks to exceptional cases as much as is reasonable has made it easier to focus on the "happy" path of code execution and easily track down the errors, and the limited nesting depth has made things easier to read as well. Overall, my code remains relatively flat and I'm not branching through layers of logic trying to track down a simple bug.

      What are some simple things you do to keep your code from being a massive headache long-term?

      26 votes
    4. Ubuntu 18.04

      Anyone using Ubuntu 18.04 yet? I was thinking about installing it alongside Windows, but wasn't sure if I should wait and just install 16.04. Wanted to get a few opinions.

      9 votes
    5. Post your setup!

      A thread to post your desktop (or laptop) setups - what OS you use, what desktop environment you use, what window manager you use, what editor you use, what terminal emulator you use etc.

      24 votes
    6. I made a thing: News Desk

      I've only been seriously programming for about a year now (and mostly in R), but I've been digging into Python for the past few months. Mostly I use pandas/numpy/scipy/scikit-learn, etc. for data...

      I've only been seriously programming for about a year now (and mostly in R), but I've been digging into Python for the past few months. Mostly I use pandas/numpy/scipy/scikit-learn, etc. for data analysis and some ML stuff, but in an effort to expand my skills I've also been playing around trying to build a few projects.

      It's not much, but I built this: News Desk

      Feedback is welcome. One bug that I'm aware of is that when you refresh the program, the url_list isn't cleared and the URLs from the refreshed articles are just appended to the list. So even though only 20 articles will show, you can select, for example, article 35.

      11 votes
    7. What will be the future of desktop interfaces?

      I feel that the mobile user interfaces has been developed and changed immensly compared to desktops, when it comes iOS and Android. While Windows has pushed some controversial but interesting...

      I feel that the mobile user interfaces has been developed and changed immensly compared to desktops, when it comes iOS and Android. While Windows has pushed some controversial but interesting features, macOS and Linux DEs has been kind of stagnant. Has desktop interfaces reached its peak form? Or is there more developments to come?

      10 votes
    8. Hey ~comp, how does on-call work?

      I'm starting a new job soon and I believe I'll eventually be in the on-call rotation. I've never done on-call in a formal sense. Past jobs I was always pretty junior and I tended to work on mobile...

      I'm starting a new job soon and I believe I'll eventually be in the on-call rotation. I've never done on-call in a formal sense. Past jobs I was always pretty junior and I tended to work on mobile apps that don't have all that many emergency problems. The closest I've ever come to a real on-call was helping some charities run their website.

      I don't really perform well under pressure and I'm pretty terrified. I've heard that a lot of places have automatic rollbacks and other methods of automatically dealing with things, so pages only really happen when something is really broken.

      How do people deal with issues like that? What happens if I'm not able to figure something out within a good time limit?

      10 votes
    9. Is Tilde BRUTAL? What do you think of this design trend towards brutalism/minimalism?

      Here's a nifty gallery with some examples that are text-heavy and straightforward, not unlike my new favorite site. http://brutalistwebsites.com/ So is tilde brutalist? Or minimalist? Both?...

      Here's a nifty gallery with some examples that are text-heavy and straightforward, not unlike my new favorite site.

      http://brutalistwebsites.com/

      So is tilde brutalist? Or minimalist? Both? Something else? Whatever it is, I love it :)

      Edit: So glad this generated some thoughtful discussion. Sincere thanks.

      10 votes
    10. Does anyone have tips or tricks for self studying / preparing to get a CCNA?

      Hey everyone, I've decided to start studying to get my CCNA. My books are showing up Monday and I'm really excited. I'm going to shoot for self studying and prep for the testing. I think I can do...

      Hey everyone, I've decided to start studying to get my CCNA. My books are showing up Monday and I'm really excited.

      I'm going to shoot for self studying and prep for the testing. I think I can do it as I've always thrived in a more self paced learning environment (I also have no money for the classes).

      I'm just wondering if anyone has any tips, supplemental material, etc they could recommend? What was hardest for you and what was easiest? What did you spend too much time studying and what didn't you spend enough time on?

      6 votes
    11. AskComp: Reactive coding and splitting observables

      I was going to ask this on Stackoverflow but it seems like reactive programming is split into per-language questions (RxJava, RxJS, RxRuby, etc.) and this is a more generic question. How do you...

      I was going to ask this on Stackoverflow but it seems like reactive programming is split into per-language questions (RxJava, RxJS, RxRuby, etc.) and this is a more generic question.

      How do you stream items from one Observable to multiple Observers?

      I have a stream of CSV items, they're mapped to a dictionary/hash table, and then I want to:

      • get the maximum value from this stream
      • process the stream in a different way
      • sample the stream

      Can I call subscribe multiple times and then call the other operators?

      5 votes
    12. My random notes for Nim lang

      -> Nim notes <- Some background I am learning a new programming language Nim. As many would do, I also take my own notes as I am learning it, running little example by myself, etc. .. but I doing...

      -> Nim notes <-


      Some background

      I am learning a new programming language Nim. As many would do, I also take my own notes as I am learning it, running little example by myself, etc.

          .. but I doing that a bit differently.

      • I take notes in Emacs Org mode. Org mode has a feature set called Org Babel. That allows one to document the code snippets, and also run them directly in that document, and insert their output results below them -- Notes in Org

        This also helps me document regression of the language behavior between different Nim versions of any, as the exact outputs are documented too. After each major Nim update, I press a single binding (C-v C-v b) in Emacs, and all the output blocks get recalculated.

      • But not everyone uses Emacs and Org mode. So to be able to share them to a wider audience, I need to export (Org term) that to a format like HTML, PDF, or Markdown..

      • Hugo is a really fast static site generator that uses Markdown as one of the primary content formats. It parses that to HTML using a Go Markdown library called Blackfriday.

      • As my notes are in Org mode, and converting them to HTML via Hugo needs them to be in Blackfriday compatible Markdown (which is almost like GitHub flavored Markdown), I starting working on an Emacs Org mode package ox-hugo about a year back. Using that, this Markdown file is generated. Hugo natively supports a subset of Org, but I needed to write this package to use the full power of Org mode.

      • Hugo then takes that Markdown and generates the final Nim notes page in HTML.


      In the end, I have something that ties together all things of my interest: Nim, Emacs, Org mode and Hugo :)

      8 votes