Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
A subject is required when posting a new thread
Subject
Comment
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich

penis pump

How to build a game engine by Fuck Nollerbury - Fri, 31 Jul 2015 20:01:09 EST ID:9CC1LTdp No.34348 Ignore Report Reply Quick Reply
File: 1438387269227.jpg -(67912B / 66.32KB, 550x367) Thumbnail displayed, click image for full size. 67912
Is here any programmer who can give me a good advice?
>>
Phoebe Brookforth - Sat, 01 Aug 2015 06:46:52 EST ID:S2vTLPe0 No.34352 Ignore Report Quick Reply
>>34349
You know, there are a tons of licensing shit, we want to build our own engine to make games on it without any problems.
We want to start from 2D engine (similar to mario).
>>
Nigger Ponningdane - Sat, 01 Aug 2015 11:05:35 EST ID:ye2oh+to No.34356 Ignore Report Quick Reply
>>34349
This.
Make a game in an existing engine you pirated and then if it actually works and people enjoy it, only then think about making your own engine and even then you probably shouldn't bother.
>>
Ian Bardcocke - Sat, 01 Aug 2015 11:21:50 EST ID:OheqWBBY No.34357 Ignore Report Quick Reply
>>34352
For 2d games I would recommend looking at http://www.glfw.org/ and its tutorials.
Unless you want to go deeper then just use pure opengl and figure out how to capture user input in a meaningful way. And if using frameworks such as OpenGL is too high level then I guess you are left with software rendering (or developing your own hardware).


RVA to file offset by Oliver Chovingmick - Tue, 28 Jul 2015 23:19:45 EST ID:uDo1PSNc No.34336 Ignore Report Reply Quick Reply
File: 1438139985454.jpg -(620888B / 606.34KB, 1024x768) Thumbnail displayed, click image for full size. 620888
I'm writing a program to dump the import table for learning purposes. I would like to use file offsets instead if using the Win32 memory mapping API because I'm more familiar with fopen/fread/fseek and would like to make it cross platform. I'm having trouble translating an RVA to a file offset. Here is my code http://pastebin.com/TqyQMhgd The Section Headers should be right after the PE header but I'm getting garbage values.


c programming by Isabella Gittingwot - Mon, 27 Jul 2015 04:04:14 EST ID:MvSt827V No.34320 Ignore Report Reply Quick Reply
File: 1437984254700.png -(56786B / 55.46KB, 557x686) Thumbnail displayed, click image for full size. 56786
Hey /prog/
Im having some trouble understanding how this program works. Can someone have a look and explain? pic related. Thanks in advance
>>
Nell Darryham - Mon, 27 Jul 2015 05:43:54 EST ID:4NKA0wph No.34321 Ignore Report Quick Reply
When you divide intigers in C, you use integer division. 42 / 10 is 4 and 42 % 10 is 2. If you still don't understand, just step through the loop.
>>
Nell Sellerford - Mon, 27 Jul 2015 23:20:29 EST ID:3AS7VbaZ No.34329 Ignore Report Quick Reply
maybe try converting one of the int to a float
>>
Walter Penninglut - Mon, 27 Jul 2015 23:58:09 EST ID:20kGe3mR No.34330 Ignore Report Quick Reply
1438055889670.gif -(2086287B / 1.99MB, 356x196) Thumbnail displayed, click image for full size.
Okay so line 3 is the entry point for the program. All programs start in your main function (Well that's not 100% true, but for now it's good enough.) A function is just a block of code that does one thing, and can be called multiple times to do it again--main is a bit different, but the structure of other functions is the same.

On line 4, memory is allocated for three integers, num, temp and sum, and they are initialized to zero. For this program, it is important that at least sum be set to zero, since it could otherwise contain garbage data, numbers in the millions, positive or negative, and that would drastically effect the outcome.

On line six, the printf function is called to print "Please input your integer number?:" to the screen. You may wish to read the man page for printf, because it can do more than just printing static text: http://linux.die.net/man/3/printf

Line 7 uses the scanf function to read from the default input buffer, in this case, the command prompt. "%d" tells scanf that it's waiting for a signed integer. &num tells scanf to put what the user inputs into the memory location described by num--though I'm not sure why they're giving the address of num to scanf. I don't think that will work, but I don't use C a lot. If this is your code and it's broken, try removing that ampersand.

Line nine starts a while loop. This means that while the condition in the parenthesis is true, it will do whatever is between the {braces}. (Note, this loop will go on forever if you put in a negative number--try it!)

The first thing it does is put num modulus ten into temp. Modulus is related to division, for instance, 10/3 is 3.33..., but in C, it's exactly 3, because we're only doing integer division, so decimals get dropped. So actually, 10/3 is 10R1--Remember, like when you first started doing division. Computers are stupid.

So if 10/3 is 3, but 9/3 is also 3, how do we know the difference? That's where mod comes in. 10%3 (ten mod three) equals one. Do you get it? If not, make sure you ask because although it seems stupid, this is actually an important thing to know!

Anyway, that's getting off track, and I hope you didn't know it otherwise I just wasted your time. So temp is set to the remainder of num divided by 10.
Comment too long. Click here to view the full text.


Lisp implementation by Lillian Sullyford - Fri, 24 Jul 2015 12:06:22 EST ID:t7kgNIOp No.34295 Ignore Report Reply Quick Reply
File: 1437753982543.png -(407044B / 397.50KB, 725x459) Thumbnail displayed, click image for full size. 407044
I am interested in how expressions normally evaluate in Lisp. I imagine that what happens is that the innermost expressions just get replaced with what they wind up evaluating to, like this:

(+ (+ 3 4) (square (fib 3))
(+ (+ 3 4) (square (+ (fib 2) (fib 1)))
(+ (+ 3 4) (square (+ (+ (fib 1) (fib 0)) (fib 1)))
(+ (+ 3 4) (square (+ (+ 1 0) 1)))
(+ (+ 3 4) (square (+ 1 1)))
(+ (+ 3 4) (square 2))
(+ (+ 3 4) (* 2 2))
(+ 7 4)
11

And I imagine that every time one of these expressions get evaluated, the expression just gets garbage collected and replaced by the result.
I feel like this scheme (no pun intended) works perfectly, but I also feel like modern Lisp implementations do not work this way. How do they work?
>>
Edward Sivingkick - Sat, 25 Jul 2015 00:26:42 EST ID:KmxmS4eT No.34298 Ignore Report Quick Reply
>>34295
That's basically it, unless you have special forms or macros, which don't (necessarily) evaluate the expressions within them. For example, Clojure's `if` won't evaluate the "else" expression if the condition is true.
>>
Ernest Grimshaw - Sat, 25 Jul 2015 10:59:34 EST ID:fsld9AGU No.34301 Ignore Report Quick Reply
That's not actually what happens, even if you're trained to think about it that way by your programming classes. But the end result is supposed to be equivalent to what you're saying. What (usually) happens is that the interpreter will recursively descend through the expression, evaluating the sub expressions as needed and passing the results back up to the expressions that contain them, which are then evaluated.

(+ (+ 3 4) (square (fib 3))
=> (+ 3 4)
=> 7
(+ 7 (square (fib 3))
=> (square (fib 3))
==> (fib 3)
===> (+ (fib (- 3 1)) (fib (- 3 2)))
====> (fib (- 3 1))
=====>(- 3 1)
=====>2
====>(fib 2)
=====>(+ (fib (- 2 1) )(fib (- 2 2)))
======> (- 2 1)
Comment too long. Click here to view the full text.
>>
Alice Pongerman - Sun, 26 Jul 2015 12:58:45 EST ID:t7kgNIOp No.34310 Ignore Report Quick Reply
I see.
But from what >>34301 is saying, it seems like you can implement it several different ways. I am toying with the idea of making some sort of stackless lisp implementation to target very small CPUs. Such CPUs might not have a suitable stack, but I had the idea that the middle part of the stack (that which is neither the current stack frame nor the root expression) can be discarded. so I thought I'd employ the following tactic. It's not very CPU efficient but it uses almost no memory.

Keep a pointer A to the root node of the function.
Keep a pointer B to the cons I am currently evaluating.
Iteratively point B at the various nodes.
If the expression at B does not need further evaluation, then somehow move it to the next expression in A.
If B contains subexpressions, then point B at the subexpression and evaluate it.
If B does not contain subexpressions, then evaluate it.
And then point B at the next subexpression in A.

When A does not contain any more subexpressions it can be evaluated.
>>
Rebecca Clillershit - Sun, 26 Jul 2015 17:47:37 EST ID:e2KqAFol No.34311 Ignore Report Quick Reply
>>34295
HtDP book teaches you exactly how Racket (DrScheme) is evaluated, and using the Racket IDE (DrRacket) there's a "Multi Stepper" option you can choose when using Beginner Student Language which will show you every step of the way what is being processed. It's not CLISP but still a 'modern' Lisp so you can see for yourself.

apt-get install racket

[code]
(define (fibo n)
(cond
((= n 0) 1)
((= n 1) 1)
(true (+ (fibo (- n 1)) (fibo (- n 2))))
)
)

(+ (+ 3 4) (sqr (fibo 3)))
[/code]


a mysql queriy by Walter Borringgold - Mon, 20 Jul 2015 02:14:13 EST ID:ZN22sJOK No.34278 Ignore Report Reply Quick Reply
File: 1437372853342.png -(177669B / 173.50KB, 1930x555) Thumbnail displayed, click image for full size. 177669
the idea here:
a user can upload a post with multiple contents, ex: 2 images followed by a text followed by a video ...
the db keeps track of the order the user selected the contents in with content_index.
on the main page i need to generate thumbs which contains the title, and the first content that was selected, should also indicate if there are multiple contents for an actual post.
so i need a query something like:

select *, count(*) as `count`
from posts t1 join
posts_content t2
on t2.post_id = t1.post_id
group by t1.post_id
order by t1.date_posted desc
limit 30

the problem here is that from t2 it does not always returns the content of which's content_index is 0.
Comment too long. Click here to view the full text.
>>
Martha Fumblelore - Mon, 20 Jul 2015 13:50:52 EST ID:aJsJBvJp No.34279 Ignore Report Quick Reply
>>34278
try adding a where content_index = 0 after your join
>>
Fucking Dirrywill - Mon, 20 Jul 2015 20:06:32 EST ID:ZN22sJOK No.34280 Ignore Report Quick Reply
>>34279
If i do that from t2 it will return the record only where it's index=0, therefore i have no means to indicate if there are multiple content for that posts
>>
Walter Genningfield - Mon, 20 Jul 2015 20:47:45 EST ID:aJsJBvJp No.34281 Ignore Report Quick Reply
>>34280
Will count(*) as `count` not return the number of contents associated to a post?
>>
Fucking Dirrywill - Tue, 21 Jul 2015 01:33:56 EST ID:ZN22sJOK No.34282 Ignore Report Quick Reply
>>34281
yep, count is always going to be 1 in this case.
>>
Walter Genningfield - Tue, 21 Jul 2015 11:50:08 EST ID:aJsJBvJp No.34283 Ignore Report Quick Reply
1437493808794.jpg -(192959B / 188.44KB, 1920x760) Thumbnail displayed, click image for full size.
>>34282
How about with having content_index = 0, it appears to work on sqlfiddle, but I may be wrong
pic related


Beginner Search Algorithm by Emma Trotville - Tue, 21 Jul 2015 23:41:37 EST ID:TYWzUgM/ No.34286 Ignore Report Reply Quick Reply
File: 1437536497091.jpg -(26422B / 25.80KB, 500x438) Thumbnail displayed, click image for full size. 26422
Hey guys, had a basic search algorithm question.

I'm in a basic C++ class, and we're working on linear and binary search algorithms.
The example for C++'s linear search is:

pseudocode
-----------------------------------------------
while (index < numElems && !found)
{
if (search == element)
{
found = true;
position = index;
}
index++;
Comment too long. Click here to view the full text.
>>
Shitting Bullerhood - Tue, 21 Jul 2015 23:57:24 EST ID:aJsJBvJp No.34288 Ignore Report Quick Reply
>>34286
There is really no difference between using a 'while' or a 'for'
if you change to a 'for', your loop would look like:
for (;index < numElems && !found; index++)
so you are pretty much just moving your increment of index to the top
Also, if you did want to look for multiple matches you would just remove the check of the found boolean and return an array of ints of positions
>>
Emma Trotville - Wed, 22 Jul 2015 00:07:41 EST ID:TYWzUgM/ No.34289 Ignore Report Quick Reply
>>34288
Great, I thought something like that but I wasn't sure.
Thanks for letting me know I'm not crazy.
>>
Rebecca Pankinbitch - Wed, 22 Jul 2015 19:00:02 EST ID:qrdKR99o No.34291 Ignore Report Quick Reply
Don't check a variable every time you loop if you don't have to. Just break the loop when you're done.


retard by Cornelius Murdham - Tue, 21 Jul 2015 23:00:03 EST ID:xyv60+2x No.34285 Ignore Report Reply Quick Reply
File: 1437534003483.png -(274587B / 268.15KB, 400x300) Thumbnail displayed, click image for full size. 274587
i have been pretty unmotivated/depressed and without school for a few months now (family situations cant really get into it, death blows) and im not sure if/when ill be going back to (community) college

i really want to get back to coding but i have no creativity/ideas and havent touched any programming for a long time. what language should i pick up?

i kind of wanted to do objective c for apps but i lack ideas for them..

what do?
>>
Emma Trotville - Tue, 21 Jul 2015 23:44:14 EST ID:TYWzUgM/ No.34287 Ignore Report Quick Reply
Java is good for apps. I'm not a good programmer by a long shot but I've developed a couple apps for my boss in Java with Swing.

There's good free tutorials through
http://docs.oracle.com/javase/tutorial/uiswing/

For ideas, those are always the hardest part for me. Good luck.


Emacs/Vim and full bash shell on Android by George Sanningford - Sun, 19 Jul 2015 04:40:15 EST ID:e2KqAFol No.34276 Ignore Report Reply Quick Reply
File: 1437295215929.jpg -(138760B / 135.51KB, 640x640) Thumbnail displayed, click image for full size. 138760
http://termux.com/

It's basically tmux, and full zsh/bash shell, and comes with packages like emacs, gpg, vim, ssh, curl, python interpreters, perl, gcc, gdb, ect. https://github.com/termux/termux-packages/tree/master/packages

Can port Electrum bitcoin wallet to it (if you also port Python 2.7.x instead of default 3.4.x), can build LibreSSL portable and use chacha to encrypt files, can install tarsnap for encrypted backups, can maintain remote servers, can build and debug programs in C/C++/Lisp/Scheme/Python/Perl/Js/Node.js, and none of it requires root so secure to use.


Must read books, /prog/ related by Augustus Pittdock - Mon, 29 Jun 2015 21:45:35 EST ID:VGq8Z4Ml No.34176 Ignore Report Reply Quick Reply
File: 1435628735977.jpg -(16557B / 16.17KB, 480x330) Thumbnail displayed, click image for full size. 16557
I want to keep improving, what books are "must read" for programmers?
9 posts and 3 images omitted. Click Reply to view.
>>
Reuben Clobblekodge - Tue, 14 Jul 2015 20:38:55 EST ID:PV4d0zcO No.34251 Ignore Report Quick Reply
>Would you recommend it for a beginner?

Do you want to learn to code? Then no. Do you want to learn computer science to become a decent programmer? Then yes.
>>
Basil Cluffinghack - Wed, 15 Jul 2015 14:22:05 EST ID:W8xUMgFj No.34258 Ignore Report Quick Reply
>>34251
I appreciate the reply. Sounds like it would benefit me down the road as right now I'm more focused on learning to code. Thanks
>>
Isabella Pirringwutch - Fri, 17 Jul 2015 18:36:46 EST ID:e2KqAFol No.34266 Ignore Report Quick Reply
>>34235
If you don't have a formal CS degree SICP is literally the next best thing. Of course, all the books from the "A Scheme Bookshelf" are excellent https://jaortega.wordpress.com/2007/01/31/a-scheme-bookshelf/ this guy got a PHD in physics before deciding to learn computer science in his late 30s.

Although the author of this book is controversial because he's kind of extremely racist it's the other best Unix book, also free http://www.catb.org/esr/writings/taoup/html/ but it's an important read because it tells you why the original developers made the decisions they did, which you can learn from when you make programs now.

I would def recommend SICP to a beginner too. I read it before I read a little schemer or anything else. Mainly because it shows you what real programming can do. If you get a python or java book you'll think that's all there is to programming and not get the part where you can make a program that can interpret itself in a tiny amount of lines.
>>
Shit Wossleridge - Sun, 19 Jul 2015 00:47:07 EST ID:W8xUMgFj No.34274 Ignore Report Quick Reply
>>34266
Very interesting stuff. Thanks for the reply and links! I'm really excited to see what I can really do with some code
>>
George Sanningford - Sun, 19 Jul 2015 03:58:13 EST ID:e2KqAFol No.34275 Ignore Report Quick Reply
>>34274
Friedman has a new book out, The Little Prover https://mitpress.mit.edu/index.php?q=books/little-prover

Though none of us will likely need to formally prove software as we don't work for Microsoft or NASA, it's an interesting book anyway and still gives you plenty of advice on writing correct logical code.

There's also an online assistant/tutor for SICP http://icampustutor.csail.mit.edu/6.001-public/ so you can type programs into it and not have to install GNU Scheme (MIT scheme) http://www.gnu.org/software/mit-scheme/


Computer Theory Revision by Albert Pusslechedging - Wed, 15 Jul 2015 14:43:00 EST ID:/eqZEY/G No.34259 Ignore Report Reply Quick Reply
File: 1436985780841.jpg -(25530B / 24.93KB, 531x84) Thumbnail displayed, click image for full size. 25530
Got important exams coming up in August, stumped on how to answer this question. Anybody able to help with this?
>>
Ebenezer Novinghall - Thu, 16 Jul 2015 22:53:23 EST ID:2Vb7Tojw No.34261 Ignore Report Quick Reply
I can probably help. What don't you get? There's like three questions in there.
>>
Nell Drummerfield - Sat, 18 Jul 2015 17:05:25 EST ID:PW18fUqr No.34271 Ignore Report Quick Reply
This is a pretty good test question.
>>
Walter Gebbernodge - Sat, 18 Jul 2015 17:40:39 EST ID:3AS7VbaZ No.34272 Ignore Report Quick Reply
holy shit this is like programming for babies
>>
Nicholas Burrymog - Sat, 18 Jul 2015 19:07:59 EST ID:4fVW/91W No.34273 Ignore Report Quick Reply
If you don't know what a data type is and why it's important then you deserve to fail


Lets talk about Automata by Samuel Pittridge - Thu, 09 Jul 2015 21:37:34 EST ID:1JpxER6n No.34221 Ignore Report Reply Quick Reply
File: 1436492254357.jpg -(98597B / 96.29KB, 1498x756) Thumbnail displayed, click image for full size. 98597
I recently took a course in automata this past spring semester and I really enjoyed it. In fact I love it. However, I feel like I don't really know how to apply it. I learned about NFA's, DFA's, pushdown automata and Grammars. I feel like I don't know how to apply it, and I also would like to know what kind of jobs can I get that require everything I learned in automata?
>>
Nathaniel Nittingshit - Fri, 10 Jul 2015 00:52:36 EST ID:PQzGpXuE No.34222 Ignore Report Quick Reply
you can apply it to designing user interfaces

you can also apply it to doing stuff with integrated circuits and basically simple stuff that a full CPU is just too much for.

battery powered toys, vending machines etc.
>>
Reuben Tootfield - Fri, 10 Jul 2015 21:32:37 EST ID:0fDyrctt No.34226 Ignore Report Quick Reply
This stuff can come up in the design of network protocols.
You could write a compiler.
>>
Nicholas Pudgebud - Sat, 11 Jul 2015 04:57:56 EST ID:PW18fUqr No.34227 Ignore Report Quick Reply
>>34221
Realistically you can implement Conway's GoL and be done with most of automata.

I jest.
>>
Shitting Nickledale - Sun, 12 Jul 2015 19:04:51 EST ID:2Vb7Tojw No.34233 Ignore Report Quick Reply
>>34221
Drivers and compiler frontends tend to have these a lot. Any time you're dealing with hardware<->software communication you'll probably run in to them, just because having hardware that does whatever it wants whenever it wants is terrible.


presidential programs by Hamilton Sabbletire - Fri, 19 Jun 2015 20:02:49 EST ID:8Ff5EZYV No.34156 Ignore Report Reply Quick Reply
File: 1434758569351.jpg -(699015B / 682.63KB, 2880x1800) Thumbnail displayed, click image for full size. 699015
do you think its possible to create a program that could run aspects of the govt..
like economical decisions and things like that? do you think we'll ever have a computer for president?
11 posts and 1 images omitted. Click Reply to view.
>>
Samuel Pittridge - Fri, 10 Jul 2015 03:24:31 EST ID:1JpxER6n No.34224 Ignore Report Quick Reply
1436513071357.jpg -(1590B / 1.55KB, 136x80) Thumbnail displayed, click image for full size.
>>34215
>>
George Dibblebare - Sat, 11 Jul 2015 12:38:58 EST ID:rPOG68r1 No.34228 Ignore Report Quick Reply
>>34215
This is what happens when you mix drugs with basic.
>>
Betsy Senkinfield - Sat, 11 Jul 2015 14:13:25 EST ID:S+TDDgvB No.34229 Ignore Report Quick Reply
>>34223
Nah, you're the delusional twit. Brains are computers. That's all they are. It just has hardware that's slightly more sophisticated than what people would usually call computers.
>>
Priscilla Grimlock - Sat, 11 Jul 2015 20:38:37 EST ID:PQzGpXuE No.34230 Ignore Report Quick Reply
>>34229

Slightly?

You have no idea what you are talking about.
>>
Hannah Gablinghan - Wed, 15 Jul 2015 19:55:26 EST ID:/cM97hLW No.34260 Ignore Report Quick Reply
>>34230
I wouldn't say slightly either but the human brain isn't some unfathomable black box. you remember that guy who computed a 1 second simulation of a complete human brain and it took him 50 days? it produced brain waves because clusters of neurons were firing at different times etc. and look at what's been accomplished with neural nets and vision. the writing's on the wall and someone stands to make massive amounts of money off it

obviously not the naysayers
nb


<<Last Pages Next>>
0 1 2 3 4 5 6 7 8 9 10 11 12 13
Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.