Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the format Name#Password
Subject
Comment
[i]Italic Text[/i]
[b]Bold Text[/b]
[spoiler]Spoiler Text[/spoiler]
>Highlight/Quote Text
[pre]Preformatted & Monospace Text[/pre]
[super]Superset Text[/super]
[sub]Subset Text[/sub]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


420chan is Getting Overhauled - Changelog/Bug Report/Request Thread (Updated July 26)

Hello WordPad

View Thread Reply
- Sat, 16 Jun 2018 12:27:34 EST lP7MCiRB No.37558
File: 1529166454438.png -(48735B / 47.59KB, 960x1039) Thumbnail displayed, click image for full size. Hello WordPad
I'm learning to code but any ideas I come up with are too big / complex for my current skill level.
If you could order me to make a small shitpost toy program I'd be very happy.
Make me code, daddy
1 posts omitted. Click View Thread to read.
>>
Phyllis Brushcocke - Sat, 16 Jun 2018 16:53:25 EST Xm/W+3lL No.37560 Reply
Why don't you try to make a small text-editor program, like Notepad or Wordpad?
>>
Hamilton Cucklestone - Sat, 16 Jun 2018 20:57:02 EST lP7MCiRB No.37561 Reply
>>37559
>>37560
I appreciate it!
Might actually combine, my editor of choice [Textadept] is purposefully small sourced at 6k LOC total, maybe I'll try to remake it in Common Lisp. Still kinda a larger project than I was going for, but since I have something to work from it might work. Kinda like a pixie emacs in CL instead of eLisp without all of those features.

And then integrate a text adventure right into the editor, cause emacs
>>
Telvanni Bug Musk - Tue, 19 Jun 2018 11:15:33 EST lP7MCiRB No.37562 Reply
>>37561
Clarifying, by combining I meant that then I actually have a reason to read through some real source, I've known that I should but I never get around to read just for readings sake. Doing it for a reason (rewriting) gives cause.

Going in I realized I have no idea where to even begin. There's loads of source files and I've no idea which one to start reading in. I'm pushing on though.

Fuck learning all this shit

View Thread Reply
- Sun, 07 Jan 2018 23:01:24 EST EOzYeBa9 No.37259
File: 1515384084027.jpg -(24595B / 24.02KB, 340x451) Thumbnail displayed, click image for full size. Fuck learning all this shit
I wish I could know how to code without having to learn it.
7 posts omitted. Click View Thread to read.
>>
Henry Nendersot - Tue, 27 Feb 2018 01:00:25 EST BW3MomrQ No.37455 Reply
>>37453
Maybe programming isn't for you then. It sounds like you have a penchant for maths though, so that's good.
>>
David Dartham - Tue, 27 Feb 2018 14:03:31 EST 1j8iF08r No.37456 Reply
>>37453
Programming is a craft. If all you've ever done is toy CS programming then of course you can't make anything. Try a software engineering course or apply for Google Summer of Code or just look at some small open source applications. Also a lot of CS people can't write software to save their lives, so don't sweat that.
>>
Shit Fanfield - Fri, 01 Jun 2018 20:07:15 EST +t8dQYkO No.37551 Reply
Me recuerda a la película hete

work less

View Thread Reply
- Thu, 24 May 2018 21:38:13 EST c0hoKBBr No.37548
File: 1527212293108.png -(66024B / 64.48KB, 1269x598) Thumbnail displayed, click image for full size. work less
The book called 4 hour workweek inspired me to develop this system. What it taught me is having a business is good but having a formula for it is better. There's no doubt scaling with no resources is hard, but in a way that is the essence of scaling.

by the way, I hate my life and wish I had the guts to commit suicide

C++ Design: Too Many Arguments!!

View Thread Reply
- Sat, 12 May 2018 13:28:25 EST ooXJl0td No.37530
File: 1526146105683.jpg -(970836B / 948.08KB, 3048x2432) Thumbnail displayed, click image for full size. C++ Design: Too Many Arguments!!
Hi guys and gals,
My C++ program (a roguelike game with lots of lists) is becoming pretty large. As I try to clean things up, I’m noticing I’m creating huge ass functions with many arguments (since I’m passing so much data sets around).

I think I’m pretty meticulous about keeping track of everything, so it’s not that I’m running out of computer memory, it’s just the code is impossibly long and ugly. Is it normal to have functions with 10+ pointers to different datasets, etc.?? Or am I dokng somethig wrong - any idea how to fix it?

Id love to hear your ideas!!
9 posts omitted. Click View Thread to read.
>>
Esther Pullerforth - Mon, 21 May 2018 02:44:25 EST Xm/W+3lL No.37545 Reply
>>37544
I personally find lambda function usage in C++ more complicated than standard explicit named function usage most of the time.
>>
Hedda Turveywater - Mon, 21 May 2018 15:20:05 EST +joVuqaF No.37546 Reply
>>37545
The lambda expression comes in handy for partial application because you can't nest standard functions in C++. Plus, if the lambda is only meant to be a helper for one particular function, you wouldn't want it to pollute the global name space anyway.
>>
Phyllis Dunnerbudging - Wed, 23 May 2018 11:09:54 EST De9RwqWL No.37547 Reply
>>37530
Yes, roguelike games have many pointers to different datasets like: character attributes, monsters, spells, potions, locations.
And the routines can be very very long, especially the case statements covering all possibilities.

In contrast to what others say, generally do not split routines into smaller functions if there is only one caller. Otherwise you will be scrolling all over the place and making a bigger out-of-context mess than you can imagine.

What you should do is avoid global variables. Collect them all into a larger struct and pass that along as a pointer to a 'global dataset'.

Look into nethack and ularn for comparison.

Mini multiplayer server instance

View Thread Reply
- Tue, 08 May 2018 12:02:54 EST S/rykYgn No.37528
File: 1525795374104.gif -(562047B / 548.87KB, 200x200) Thumbnail displayed, click image for full size. Mini multiplayer server instance
This is a hard question to explain because English is not my first language.

I have a game coded with socket.io that uses a persistent world. When a player clicks play, he enters the world and can manipulate it like singleplayer Minecraft. However, many other users can access the server at the same time and modify the world so that the first player sees modification, but none of the players can see each other. All enemies, bullets, etc are only for each individual player. Players only can see world modifications of other players.

I want to make it so groups of 2 players can player simultaneously. So these 2 players can see each other as well as world modifications of all other players. Would I just have to have multiple servers? I want to just use the 1 server to let groups of 2 players to play the game like how solo players play the game now. I can't afford to host many small servers.
>>
Sidney Surringwock - Fri, 11 May 2018 01:19:59 EST Xm/W+3lL No.37529 Reply
Since your game is like Minecraft, you could simply have one very large procedurally generated world that was so big that it's highly unlikely that any group of 2 players would ever run into one of their neighboring groups of players.

C++

View Thread Reply
- Mon, 09 Apr 2018 09:00:46 EST 9B4LusOJ No.37498
File: 1523278846948.jpg -(24430B / 23.86KB, 576x768) Thumbnail displayed, click image for full size. C++
I'm looking for something a bit like std::map, except that I don't care about a <key, value> pair; I just want to be able to say to the thing, "here, keep this integer". And "hey, have you got that integer, yes or no?"

Something tells me a hashmap isn't the right tool for the job, but I can't seem to figure out what is. Any ideas?
2 posts omitted. Click View Thread to read.
>>
Shitting Gumbleman - Sun, 06 May 2018 03:33:29 EST Xm/W+3lL No.37527 Reply
If all you care about is "could this item potentially be in this set?", then you might want to look into using a Bloom filter datastructure (not the kind used in graphics, but the other kind used in general computer science).
https://en.wikipedia.org/wiki/Bloom_filter

C++ from Java

View Thread Reply
- Mon, 30 Apr 2018 11:44:50 EST uuXCv622 No.37523
File: 1525103090443.jpg -(131910B / 128.82KB, 900x750) Thumbnail displayed, click image for full size. C++ from Java
Alright boys, I just finished my first year of Applied Computer Science, we were taught Java extensively and had one class on VB in the second semester (god I hope I never have to work with that) Anyways, apparently next year we continue on the programming concepts we learned expanding into things like multi-threading which we haven't learnt yet, except we switch to C++. The thing is, we don't actually get taught C++, we're just taught IN C++. The advice from the second years I got was teach yourself C++ over the summer and that will be the easiest class you take next year, otherwise it will be the hardest. So, what resources could you recommend to make that transition? What are specific Java-to-C++ quirks I might need to know?
>>
Fucking Wublingbanks - Mon, 30 Apr 2018 18:38:08 EST jPnU+Gop No.37524 Reply
Download and spend a weekend on A Tour of C++. Then make a toy project to feel out your compiler and workflow. You'll be way ahead of the curve.
>>
Phyllis Gingerway - Wed, 02 May 2018 02:36:17 EST Xm/W+3lL No.37525 Reply
Learning C++ without learning C might be the largest part of the hurdle for you. Otherwise, many of the object-oriented paradigms of Java carry over into C++. For a very high-level view, read Wikipedia's entry on the differences and similarities between C++ and Java:
https://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B

Also the sooner you download Visual Studio (it's free now, so there's no excuses!) and learn how to use an interactive debugger, the better off your entire life will be.

There are some large differences that you'll have to learn between the languages. Most of them fall under the category of "things Java does for you that C++ makes you do manually". Things like this include:
  • Memory management. Garbage collection is *not* a thing in C or C++, so you have to manage the creation and deletion of your objects manually (using new/delete or malloc/free or placing the objects on the stack as automatic variables).
  • Pointers, references, and by-value passing of variables. This is pretty important in C and C++ (C doesn't support references). Pointers are a new concept of a variable that can "point" to arbitrary locations in memory (or to "null"). References are really just pointers with a nicer syntax that can only point to one thing. So much stuff in C/C++ is pointers and this is a really important language concept, so make sure to try to learn it well!
  • Strings are not really a built-in type. You can use std::string for ease of use, but you really should get comfortable with C-strings (character arrays or char*).
  • Operator overloading is possible in C++. This is not necessarily a required feature, but the ability to redefine operators is useful for various purposes.
  • "const" is a special keyword in C and C++ and it marks a variable as being non-modifiable after the first time it is written. This is a lot like Java's "final" keyword for variables.
  • The built-in types are mostly the same: short, int, float, and double all mean the same things between the two languages. Also both languages have a type for boolean logic ("bool" in C/C++ and "boolean" in Java). C/C++ also support "unsigned" versions of the integer types, namely "unsigned short", "unsigned int" (which is the same thing as just "unsigned"), and "unsigned long". These unsigned variables let you re-use the sign-bit as another data bit, thus doubling the possible range of values (but not allowing you to represent values less than 0).

Helpful tips:
  • Try to compile with the highest warning level your compiler will let you use. This will help you find all of the problem areas in your code before you even run it.
  • Ask people for help early and often if you get stuck. C/C++ is pretty complicated and nuanced and often hearing an alternate explanation will help you get a fresh perspective on why and how things work.

Game dev live stream

View Thread Reply
- Sat, 28 Apr 2018 12:36:33 EST /kCdQ+UW No.37520
File: 1524933393357.jpg -(52501B / 51.27KB, 500x471) Thumbnail displayed, click image for full size. Game dev live stream
im writing a game in an out dated version of the unreal engine and streaming it :] https://www.twitch.tv/otayzilla
>>
Lillian Simmlebeck - Sat, 28 Apr 2018 23:10:42 EST 2j3uquS6 No.37521 Reply
Aw yeah dog let me waste my life by watching you waste your life.

Pose estimation and rigging

View Thread Reply
- Sun, 08 Apr 2018 05:39:32 EST xDpPYEfL No.37493
File: 1523180372573.jpg -(42267B / 41.28KB, 889x500) Thumbnail displayed, click image for full size. Pose estimation and rigging
facebook released a new method to detect multiple bodies in a video. Some poeple already made their own attempts on github to do the same, and the algorithm will detect human movements and infer a skeleton out of it (you may have seen it, th eone with different colored limbs). What is the best pipeline to use this algorithm to extract movements from people in videos and place their sksletons into say anime figures in a video rendering software so the figure can follow the pose extracted form the human?

just asking for which software / language is best for this. i already know the theory, just need the practicalities of it (mostly model rigging and video stuff)

trying to make a hatsune miku x donald trump dance video but too lazy to rig it myself so i want to use AI for that.
2 posts omitted. Click View Thread to read.
>>
Phoebe Mucklespear - Tue, 10 Apr 2018 11:39:39 EST 9QSfnS0r No.37508 Reply
That said:

>too lazy to rig it myself so i want to use AI for that.
At current time there is no ready to use end user application that can do this.
And writing such application yourself is certainly more work that animating by hand.
>>
A_Wizard !cMZsY.BCnU!!vVWR8L52 - Wed, 11 Apr 2018 20:43:18 EST mJDH+xt3 No.37514 Reply
>>37493
This is actually a bit disturbing. An amazing toy, but the ability to log this kind of biometric data can be used for some pretty damned nefarious ends.
>>
Samuel Berringtit - Fri, 13 Apr 2018 12:02:59 EST 9QSfnS0r No.37516 Reply
>>37514
I disagree, at least in an ideological sense.
I think it's disturbing that the law still regards video as hard, tamper-proof evidence. This should have been fixed in the early 00s not now when it's becoming a trivial exercise in terms of labor.
And if you find that scary see what can be done in conjunction with statistics.
For instance they demonstrated an algorithm that can guess a persons sexual orientation with 90%+ accuracy....
Just based on the intricacies of a facial expression on one photograph.

Would someone mind checking my work?

View Thread Reply
!!dPPr4Oxe - Mon, 09 Apr 2018 22:15:27 EST PRg+vC3B No.37504
File: 1523326527669.jpg -(1821032B / 1.74MB, 4128x2322) Thumbnail displayed, click image for full size. Would someone mind checking my work?
I'm using the site PracticePython.org to learn some python and one of the challenges is list overlap comprehension. My solution seems WAY different than what they have but it also seems to be working which seems, wrong. Would one of you kind people mind having a look and telling me if this is ferkakt? Here's a picture of my Jack Russel Terrier as a show of my gratitude.

import random

al = random.randint(5, 25)
bl = random.randint(5, 25)
a = random.sample(range(100), al)
b = random.sample(range(100), bl)
c = []

if len(a) > len(b):
c = [i for i in a if i in b and not c]
if len(b) > len(a):
c = [i for i in b if i in a and not c]

print(a)
print(b)
print(c)
>>
Isaac Yankem D.D.S. !!dPPr4Oxe - Mon, 09 Apr 2018 22:17:51 EST PRg+vC3B No.37505 Reply
Here's the challenge itself if that helps you understand what I was trying to do with it: (https://www.practicepython.org/solution/2014/04/16/10-list-overlap-comprehensions-solutions.html)

This week’s exercise is going to be revisiting an old exercise (see Exercise 5), except require the solution in a different way.

Take two lists, say for example these two:

a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]

and write a program that returns a list that contains only the elements that are common between the lists (without duplicates). Make sure your program works on two lists of different sizes. Write this using at least one list comprehension. (Hint: Remember list comprehensions from Exercise 7).

Extra:

Randomly generate two lists to test this
>>
Nathaniel Pittwell - Tue, 10 Apr 2018 01:19:26 EST k++VoPQ4 No.37506 Reply
  1. Stop using bullshit variable names. Is c common? Then call it common. Names matter.
  2. It doesn't matter which list is longer or which list you iterate over. If you were trying to optimize, all you did was waste time and create a bug.
  3. List comprehensions are always introduced as being the same thing as a list appending loop, but it isn't true. You can't reference the resulting list from within the comprehension so what you're trying to do will never work. To get unique items, either make the input or output unique.
  4. Randomly generating lists and manually checking the result is a bad joke. Instead, organize code into small functions and write test cases:

def make_common_list(a, b):
common = [i for i in a if i in b]
return make_unique_list(common)

def make_unique_list(seq):
unique_list = []
for i in seq:
if i not in unique_list:
unique_list.append(i)
return unique_list

def test_make_common_list():
assert make_common_list([1,1,2], [1,2,5]) == [1, 2]
assert make_common_list([1,2,5], [1,1,2]) == [1, 2]
assert make_common_list([], [1,2,5]) == []
>>
Isaac Yankem D.D.S. !!dPPr4Oxe - Tue, 10 Apr 2018 22:00:49 EST PRg+vC3B No.37512 Reply
>>37506

Firstly, thinks for responding and giving advice. I appreciate it immensely.

Let me address each of your comments individually to give and get clarification.

  1. The list names are used from the exercise given. Also, I didn't think they would matter much because they aren't being used in any real world code. Just as an exercise to learn how things work. I get that if I were building something that would be used for anything other than completing this coding exercise naming the lists something useful would be important. I have a little tiny bit of knowledge of JavaScript and have dicked around with creating things in it and I know to always make sure an array has a useful name so that I know what data it's storing.

2. Ok. I was thinking that because the lists weren't sorted in my code (Remember they're generated randomly) that I would always want to check the longer one against the shorter one so it wouldn't get to the end of the short one and stop. That wasn't made clear in the source material I was reading that it wouldn't be a problem. In fact, they made it seem like it would be a problem if one was longer than the other and you didn't do something for it.

3. I'm not completely sure I understand but IF I do, you're saying that I cannot check against the list I'm creating inside of the list comprehension? That makes sense sort of and working around that is definitely something I'll keep in mind. TBH: I kind of like using the for loops more than list comprehension. The whole things feels like voodoo to me and the for loops make more sense in my head.

4. I see. Randomly generating and then testing it is dumb because who knows what kind of results you'll get if they're random. I should have started with known lists, made sure it works and then generated them randomly.

Help with databases

View Thread Reply
- Sun, 08 Apr 2018 12:16:39 EST 9uEY0yYY No.37494
File: 1523204199704.jpg -(147212B / 143.76KB, 1070x1434) Thumbnail displayed, click image for full size. Help with databases
Hello guys, I recently started work
ing on a website and I need it to access a certain database, I already have a key to this database, but I wanted to know if I have to learn PHP or SQL or both to use it.
2 posts omitted. Click View Thread to read.
>>
Rebecca Bimblesadging - Mon, 09 Apr 2018 11:55:06 EST k++VoPQ4 No.37500 Reply
It sounds like you have an API key. If that's the case, you'll need code server side to access the API and render HTML for a user to view. You can use PHP for that. You shouldn't be dealing with SQL unless you have some responsibility for the operation of the database.

It also sounds like you're way over your head. Maybe step back and look at how other people are doing the kind of things you're trying to do.
>>
Eugene Blackson - Mon, 09 Apr 2018 16:04:02 EST WQgEyuaW No.37501 Reply
>>37500
I already know how to create a webpage (HTML5, JS and CSS) I just wanted to know how I could get into the making of the server-side of a website, since I've learned js was not really made for that.. thanks for the clarification though I forgot to mention I didn't own the database, I was just trying to make my website interact with it.
>>
Rebecca Bimblesadging - Mon, 09 Apr 2018 19:52:08 EST k++VoPQ4 No.37502 Reply
>>37501
Actually, you can do Javascript on the server. A lot of web developers today use Javascript for almost everything. I don't think it's an especially good idea, but there's no denying that it's wildly popular.

Scheme

View Thread Reply
- Sat, 24 Mar 2018 00:20:38 EST ZIMgPzji No.37483
File: 1521865238411.png -(113482B / 110.82KB, 540x960) Thumbnail displayed, click image for full size. Scheme
I have the following projects in Scheme:

  • A ncurses-based browser
  • A bulletin board system
  • A roguelike

I would also like to implement prolog in Scheme and use it to implement collision detection for a larger game.

fsf

View Thread Reply
- Thu, 25 Jan 2018 06:24:09 EST 2ob1iX5O No.37290
File: 1516879449223.jpg -(282819B / 276.19KB, 1920x1121) Thumbnail displayed, click image for full size. fsf
hey lemme find out THat this system is being remotly controled by someone behind the desk or is some room upstairs wtf WMI cmon admins!!!
>>
Hannah Pickcocke - Sat, 27 Jan 2018 01:10:48 EST BW3MomrQ No.37297 Reply
>>37290
I'm not sure what you're asking for or how to help you.
>>
Albert Feddlewock - Mon, 02 Apr 2018 12:59:46 EST lP7MCiRB No.37491 Reply
>>37290
Literally just check behind your desk dude, if there's somebody there, fiddling with your wires, then yes, your system is being remotely controlled from someone behind your desk.

This is an admin problem. Fuck the wiregnome up yourself. RTFM.

Java

View Thread Reply
- Sun, 30 Jul 2017 21:21:21 EST ddyPydmV No.37126
File: 1501464081485.png -(37854B / 36.97KB, 500x500) Thumbnail displayed, click image for full size. Java
Is Java worth learning? I want to get into software development but I'm not sure what language to pick up.
13 posts omitted. Click View Thread to read.
>>
Esther Bunham - Tue, 20 Mar 2018 18:48:27 EST uuTMcsOp No.37477 Reply
Let me just mention.

Most big companies I know programmers in are writing high performance/availability applications in Java, C++, or Golang depending on the domain. Some are still using PHP. My own company (one of the top 20 "internet companies" according to Wikipedia) is using Java and Golang for writing new high performance backend services. For new frontend services which talk to the backend ones we're using Node.js for server-side and React.js for client-side. Our old frontend stuff is in PHP.

So my thought here is that Java is a good choice of first language. It's sort of middle of the road so you could go from Java to Golang/C++ or JS/Python/Ruby/Kotlin pretty easily.
Although if you know you want to do less performance intensive web apps (this would cover almost all web apps actually) you could start with something like Node.js or Ruby on rails.
>>
Esther Bunham - Tue, 20 Mar 2018 18:52:52 EST uuTMcsOp No.37478 Reply
>>37477
And just a personal thought - if you're just getting started writing programs it might be good to learn HTML+javascript. Just because I think it would be more fun for most people if they could learn by writing applications that have a visible component (in this case a web page you can interact with).
>>
Esther Bunham - Tue, 20 Mar 2018 18:54:43 EST uuTMcsOp No.37479 Reply
>>37476
Oh and by the way, my Scala fanboyism only applies if you're not writing smartphone apps

Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.