-  [WT]  [PS]  [Home] [Manage]

  1.   (new thread)
  2. [ No File]
  3. (for post and file deletion)
/pr/ - Programming
  • Supported file types are: C, CSS, DOC, DOCX, GIF, H, JAVA, JPG, PDF, PNG, SVG, SWF, TXT, WEBM
  • Maximum file size allowed is 10000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 400 unique user posts. View catalog

  • Blotter updated: 2011-01-12 Show/Hide Show All

There's a new /777/ up, it's /gardening/ Check it out. Suggest new /777/s here.

Movies & TV 24/7 via Channel7: Web Player, .m3u file. Music via Radio7: Web Player, .m3u file.

WebM is now available sitewide! Please check this thread for more info.

Request for comments Neckbearded Basement Dweller 18/01/02(Tue)02:39 No. 5091 [Reply]
5091

File 15148571617.jpg - (29.41KB , 331x400 , confused1.jpg )

I'm hacking up a dynamic class loader, and I have all of the easy stuff done (dlfcn, dirent, etc.).
So the manager needs to know which container to construct based off the extension of the file that needs to be passed to the containers constructor.

The question then is: should I have the container shared object advertise which file extensions are supported or should I have it advertise a mime type?

My concern with using the mime type is that I would need a mapping from file extensions to mime type.
And my concern with using just the file extension is that there may be extension collisions.


>>
Neckbearded Basement Dweller 18/01/06(Sat)01:24 No. 5092

Incase anyone is interested, I decided to implement the code analagous to the following pseudo-code:

for ( auto module : modules.equal_range( input ) ) {
try { auto module_class = module.second.constructor( input );
return std::unique_ptr< Module >( module_class );
} catch ( exception e ) { }
}

I let the modules advertise what inputs they support and use that do decide which loaded modules to attempt to create. In documentation I require that the module throw an exception if the input is not supported, or fails to load. I'll deal with the other issues related to that as I think of them.




How does one learn hacking? Lukas 17/03/15(Wed)23:34 No. 4999 [Reply]
4999

File 14896172853.jpg - (86.42KB , 600x1067 , dbd.jpg )

I have basically none experience with advanced usage of computer whatsoever and O have no idea where to begin. I want to become the ultimate neckbeard.


>>
Neckbearded Basement Dweller 17/11/14(Tue)06:47 No. 5086

I think it's kind of hard becoming a hacker. But mostly, the skills you need to train is knowing how computer network works in details.

Install a linux distribution. I really like Archlinux (hard to install, but you're going to learn a lot of stuff). Debian is also great.

Try to understand how computers interact with each other. What is actually happening when you browse the internet ? How does it work ? What is your browser actually doing when loading a website ?

Learn how to program. I recommend bash, C, python.

Understand what is a Network. Learn tools like NMAP and netcat.

Good luck.




Neckbearded Basement Dweller 16/11/03(Thu)02:58 No. 4952 [Reply]
4952

File 147813833229.gif - (0.99MB , 250x333 , 1477848410201.gif )

What programming language should I learn first?


13 posts and 1 image omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 17/05/17(Wed)14:55 No. 5041

Processing is a fun way to learn Java.

https://processing.org/

Khan Academy has a JavaScript version with plenty of tutorials. JS is a shitty language but it'll probably help you get some of the basics.


>>
Neckbearded Basement Dweller 17/05/21(Sun)17:02 No. 5044

lua with love2d framework


>>
Neckbearded Basement Dweller 17/11/04(Sat)13:06 No. 5084

>>4952
Learn C & Java
Start of with Java and as soon as you can write clean code start with learning C.




Neckbearded Basement Dweller 16/11/28(Mon)20:50 No. 4970 [Reply]
4970

File 14803626017.png - (102.11KB , 800x600 , Untitled.png )

hey /pr/ here are some cool open source games i found.

https://play0ad.com/
http://www.xonotic.org/
https://www.wesnoth.org/

maybe you can use your programming skills to help develop and make these games better.


>>
Neckbearded Basement Dweller 16/12/22(Thu)13:27 No. 4976

+
AssaultCube
OpenArena
OpenRA


>>
Neckbearded Basement Dweller 17/06/27(Tue)10:05 No. 5047

>>4976

Adding on from AssaultCube:
Cube 2 engine / Sauerbraten (http://sauerbraten.org/)
Tesseract (forked from sauerbraten, http://sauerbraten.org/)
Red Eclipse (also forked from sauerbraten, https://redeclipse.net/)


>>
Neckbearded Basement Dweller 17/11/04(Sat)13:05 No. 5083

>>4970
http://pixeldungeon.watabou.ru/




Neckbearded Basement Dweller 17/07/19(Wed)00:36 No. 5054 [Reply]
5054

File 150041736958.jpg - (23.73KB , 450x300 , armie-hammer-the-social-network_cycgik.jpg )

Friend is learning JavaScript as her first language. Should I stop her?


>>
Neckbearded Basement Dweller 17/07/30(Sun)05:44 No. 5057

Unless she is specifically trying to learn Front-End Web Development with Front-End Frameworks, I'd recommend trying to get her to switch.

Python in general is a much easier more intuitive first language, and if we wants to do WebDev, the Flask framework makes it very easy. Once she is comfortable with Flask, HTML, and CSS, going into JavaScript, Front-End or Server End will be generally much easier.


>>
Neckbearded Basement Dweller 17/08/31(Thu)15:35 No. 5070

fuck no


>>
Neckbearded Basement Dweller 17/10/19(Thu)15:15 No. 5078

>>5054
No, let her be comfortable in C-syntax instead of using Python.




Neckbearded Basement Dweller 17/07/28(Fri)10:04 No. 5056 [Reply]
5056

File 150122907045.jpg - (2.47KB , 135x100 , pp.jpg )

Hi, /pr. I'm learning Scala and I want challenges to implement in this language. What do you guys suggest?


>>
Neckbearded Basement Dweller 17/10/15(Sun)17:52 No. 5076

Fuck, this board is dead.




Neckbearded Basement Dweller 17/08/16(Wed)05:58 No. 5061 [Reply]
5061

File 150285589835.jpg - (9.09MB , 3800x5244 , jasmine4.jpg )

results.Sort((g1, g2) => g2.depth.CompareTo(g1.depth));

Can someone explain to me what the hell this C# does?

results is a System.Collections.Generic.List

It's some kind of interface shortcut I guess? But what is => and why write it like that, does it save CPU cycles or just time for the coder himself?


1 post omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 17/08/18(Fri)05:06 No. 5065

>>5064
Darn, the formatting got completely fucked. Oh, well.


>>
Nattack!upUGcHlgU2 17/08/18(Fri)10:55 No. 5066

>>5065
https://pastebin.com/8Qh9KEv9

Here bud

>>5061
Function currying and lambdas combine to make a thing called Streams (as my college puts it anyway), they are not quite the same as a filestream, however.

It's a great thing to learn, a bit tricky at first but can eliminate the need for complicated nested loops with slightly less complicated nested lambdas.


>>
Neckbearded Basement Dweller 17/09/04(Mon)00:29 No. 5071
5071

File 150447779632.jpg - (181.57KB , 650x922 , jasmine2.jpg )

Thanks for explaining! I think I'll need to do a bit more research on lambdas before I grasp them.




Neckbearded Basement Dweller 17/03/17(Fri)15:37 No. 5001 [Reply]
5001

File 148976143896.jpg - (140.76KB , 610x581 , coq-noir.jpg )

I just failed a job application over a bizzfuzz. Please tell me what I did wrong.

> First, I think, this dickhead wants me to just fart out a line of Haskell in two seconds. Well, no, that's not what this job is about
> Started with a specification in Atelier B just to show that I can make trains work
> After writing the specification in B-Method, I went into Coq for a nifty proof
> I wrote all this using Acme with a 20 year old 3-button that I only save for special interviews
> My Coq proof proves, I extract the proof to Haskell. Then for shits and giggles, I show this clown why dependent types are essential for string-out by rewriting it in Idris
> I try to run it and it crashes. Fucking Idris 0.99 whatever no problem
> Turns out one of my types was a character off. Quick save, I just started talking about how I would have done it in CML instead if I wasn't crunched for time, and that I did it in peano numbers over the fibonacci sequence
> It compiles. Success! Wait, but this needs a graph.
> An hour of MATLAB later and I have something truly beautiful... a 5d graph of fizz and buzz, and it's only like 3mb. I'm proud as shit, I've been working my ass off for the past three hours
> "Do you know fucking javascript? It's a porn ad you idiot"

Didn't get the job. What the hell is wrong wrong with people?


>>
Neckbearded Basement Dweller 17/03/20(Mon)18:48 No. 5007

Had a good laugh 6/10


>>
Neckbearded Basement Dweller 17/04/11(Tue)05:42 No. 5038

I'm sorry to hear that.

You'll do better next time.




Neckbearded Basement Dweller 17/04/08(Sat)10:39 No. 5036 [Reply]

Hey /pr/ first time getting into programming a debug mode for brogue and I'm gonna learn to do some miscellaneous programming, but I want to make brogue into a debug form, but when I try to do so, I get this:

||=== Build: Debug in Brogue (compiler: GNU GCC Compiler) ===|
C:\Users\Zenheart47981\Desktop\brogue debug folder\Brogue-windows-v1.7.4\Brogue-windows-v1.7.4\Brogue Source\PlatformCode\main.c||In function 'main':|
C:\Users\Zenheart47981\Desktop\brogue debug folder\Brogue-windows-v1.7.4\Brogue-windows-v1.7.4\Brogue Source\PlatformCode\main.c|77|error: 'cursesConsole' undeclared (first use in this function)|
C:\Users\Zenheart47981\Desktop\brogue debug folder\Brogue-windows-v1.7.4\Brogue-windows-v1.7.4\Brogue Source\PlatformCode\main.c|77|note: each undeclared identifier is reported only once for each function it appears in|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
||=== Run: Debug in Brogue (compiler: GNU GCC Compiler) ===|


The curses console is undeclared, but how do I declare it?


>>
Neckbearded Basement Dweller 17/04/09(Sun)06:20 No. 5037

>>5036

Have you looked specifically in all files you've imported?

When I first attempted to do this on my own I get a different error, cursesConsole is undeclared, you have to declare it in a specific file?

Have you found any references for cursesConsole in different files?

Add this in codeblocks:

extern struct brogueConsole cursesConsole; in file platform.h.




i need tips Neckbearded Basement Dweller 16/10/30(Sun)04:53 No. 4948 [Reply]
4948

File 147779958931.png - (50.05KB , 1116x1086 , Irish boy.png )

Hi /pr/ i need some advice for creating my own chan board


>>
Neckbearded Basement Dweller 16/10/30(Sun)06:14 No. 4949

Well I would start with getting what they are called correct.

Pick up, uh, php, python, perhaps some java script.


>>
Neckbearded Basement Dweller 17/02/19(Sun)13:13 No. 4991

So what makes your chan different to other chans? Are you bringing anything new to the table?


>>
Neckbearded Basement Dweller 17/03/17(Fri)15:42 No. 5003

Sperg out and try to make solar powered weatherproof server repeater boxes, like the guy who wanted to start spacechan.




Delete post []
Password  
Report post
Reason