u/Karys - 9 Archived Voat Posts in v/programming
u/Karys
  • home
  • search

u/Karys

0 posts · 9 comments · 9 total

Active in: v/programming (9)

  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››
Comment on: Alternatives to notepad++

Learn vim.

2 17 Feb 2016 22:21 u/Karys in v/programming
Comment on: What kinds of problems is /v/programming solving these days?

I mostly write C++, with a little Perl, VHDL, and bash mixed in these days. I maintain test suites for a memory controller, and write new tests as new features are added.

In my free time, I worked on a factorial art generator in a language called Processing with some friends of mine (github.com/EmbeddedDesign/factorial)

0 24 Dec 2015 08:51 u/Karys in v/programming
Comment on: I Want to Start Programming. Where Should I Start?

That depends on what you are intending to do as a programmer. There are plenty of things you could want to do that C/C++ would not be suited for... For example, android dev, or web scripting.

0 24 Dec 2015 06:29 u/Karys in v/programming
Comment on: I Want to Start Programming. Where Should I Start?

The biggest mistake I find people making when they decide that they want to learn programming is that they have no idea what they want to DO with programming. It's a very useful skill, but it will not stay with you if you are not doing it for a reason you enjoy, or that's important to you. You could sit there for hours going through online tutorials on syntax and algorithms, but it won't mean anything to you unless you are intending to use that to help yourself solve a task in some way. Now, before I start ranting too long....

Step 1: Choose a project.

Step 2: Choose the language and tools that are best suited to accomplishing the task you set out for yourself in step 1.

Step 3: Do the project.

Step 4: Go back to step 1.

0 24 Dec 2015 06:28 u/Karys in v/programming
Comment on: Is this a good sub for programming help?

I think I found the issue. You want a standalone string with a single digit in each of those variables. And by explicitly moving each character into it's own string, it add's a null termination character and gives each digit it's own location in memory. stoi takes a const string location, and reads until a null terminator, so my optimization actually doesn't help you. There's probably a way to do this as a one-liner, but it's not necessary. Would just look more elegant imo...

0 16 Dec 2015 21:58 u/Karys in v/programming
Comment on: Is this a good sub for programming help?

You are welcome, fellow goat.

2 16 Dec 2015 08:41 u/Karys in v/programming
Comment on: Is this a good sub for programming help?

Also, I don't believe there's any benefit to explicitly declaring 7 strings for the 7 digits, as you can do it all in one line as

numA = stoi(input[0])

or numA = stoi(input.at(0)) if you prefer, I'm fairly certain they're functionally equivalent

4 16 Dec 2015 08:28 u/Karys in v/programming
Comment on: Is this a good sub for programming help?

What you're looking for here is

if (i == 3 && input[i] != '-')

4 16 Dec 2015 08:23 u/Karys in v/programming
Comment on: Are there downsides to using a wrapper/bindings for a library?

I've used swig before with minimal effort, albeit not for Go. It worked pretty well, wasn't hard to set up makefiles, although it was fairly slow in some cases.

I used it to cross compile a C API I had built into a perl module so my users could code in perl instead of C. I later tried rewriting the API in C++, and found that the swig cross compile module was much much slower.

1 22 Aug 2015 00:32 u/Karys in v/programming
  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››

archive has 9,592 posts and 65,719 comments. source code.