[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 46
File: 1451844625173.jpg (3 MB, 2480x3508) Image search: [Google]
1451844625173.jpg
3 MB, 2480x3508
What are you working on, /g/?
>>
>>52434865
Huh? What? You can install whatever you like on web servers. PHP certainly isn't always installed unless it's being used.

What is it exactly? Is it a framework you are planning to sell or something?
>>
simply ebin(a)
>>
>>52434874
Please stop using pedophile images. Can someone start a new thread?
>>
Dubs script.
>>
any book recommendations for learning about compilers?
i specifically want to create a simple C compiler and possibly expand upon it later

im leaning towards A Retargetable C. Compiler: Design and Implementation
>>
Hey guys I thought I'd start C(I have previous experience). I want to go through Kernighans book. Could someone suggest a program that I can use on windows to compile and execute C programs?
>>
>>52435117
Eclipse.
>>
File: 1452288953589.png (360 KB, 900x720) Image search: [Google]
1452288953589.png
360 KB, 900x720
How do I learn JavaScript senpai?
>>
>>52434874
es6 analytics pipeline build using hyperloglog and a kafka cluster + more for the multinational enterprise I work for... how is school /g/? I miss those days
>>
>>52435167
By doing it.
But I could recommend Jon Duckett Javascript & Jquery.
Might give codecademy a try for a basic
>>
>>52435218
dont. Learn javascript the good parts and then go for es6 as it's the fucking future
>>
File: 1451141890075.png (144 KB, 600x600) Image search: [Google]
1451141890075.png
144 KB, 600x600
>>52435250
>>
>>52434832

It's not really written in C, per se, it's a Zend Engine extension that exposes it's functionality as PHP classes. It's actually quite clever.

It's not originally my idea, but I liked the speed so much compared to other frameworks that my company invested in its future development, and I've contributed heavily to the project.

As for "Why PHP?", >>52434865
hit the nail on the head. We actually have an intermediate language now that makes the extensions almost as easy to write as PHP but introduces things like static typing and immutable variables to make the code less bug prone.
>>
who was smarter, /g/: Einstein or Von Neumann?
>>
>>52434874
>Picture
Simply, ebin(a)
>>
Writing a vanilla JavaScript frontend framework for my multiplayer dungeon crawler.

JavaScript "object" system is pretty neat, and the canvas is pretty neat to work with once you abstract out the kinks (fucking mouse coordinates)
>>
>>52434874
>What are you working on, /g/?
a silly little DNS mini-project
>>
test
>>
>>52435367
REEEEEEEEEEE

IT'S SO HARD TO MAKE A FLAWLESS DUBS SCRIPT.
>>
>>52435250
>it's the fucking future
As a rule of thumb it's generally a good idea to discard any programing advice that ends with these words.
>>
>>52435380
Unless you can somehow predict both network and server latency, you'll never make it flawless.
>>
>>52435296
>We actually have an intermediate language now that makes the extensions almost as easy to write as PHP but introduces things like static typing and immutable variables to make the code less bug prone.
You mean like HACK?

Still not sure why you're doing PHP. Your company isn't even invested in the project your contributing to?
>>
If this isn't dubs, I'm giving up and moving on to something else.
>>
>>52435435
>2 away
Kek.
>>
>>52435435
Hang yourself anon
>>
File: iii9.png (61 KB, 1181x1161) Image search: [Google]
iii9.png
61 KB, 1181x1161
Laugh at my shit JavaScript dubs code, /dpt/.
>>
>>52435566
>5566
oh the irony
>>
File: 1448473404155.jpg (114 KB, 720x960) Image search: [Google]
1448473404155.jpg
114 KB, 720x960
>>52435566
>let
>>
>>52435089
WORKS WELL
>>
File: 1451333739801.jpg (58 KB, 514x524) Image search: [Google]
1451333739801.jpg
58 KB, 514x524
>>52435566
At least it worked that time, with an image too!
>>
File: v for fuck you.jpg (27 KB, 631x341) Image search: [Google]
v for fuck you.jpg
27 KB, 631x341
Started to do C today, how did I do /dpt/?
>>
File: 1451345692341.png (214 KB, 800x815) Image search: [Google]
1451345692341.png
214 KB, 800x815
>>52435611
It must only work with images.
>>
>>52435566
don't mix binding with actual implementation

use rxjs / fp

split ur code and the responsibilities
>>
>>52435644
You failed terribly and now everybody is dead because of you.
>>
>>52435648
i want weebshit java scripters to go :(
>>
>>52435666
>trips
Nice.
>>
>tfw you will never be pretty
>>
>>52435644
Is that Pelles C?
In that case I would like to congratulate you on your great taste in C IDEs on Windows.
>>
>>52435746
>tfw you will never be a qt3.14 anime girl

Also, trips.
>>
>>52435778
almost anon, almost
>>
>>52435778
>778
God damn it.
>>
File: poring_vector_by_eternalscat.jpg (21 KB, 499x417) Image search: [Google]
poring_vector_by_eternalscat.jpg
21 KB, 499x417
>>52435774
yes, yes it is.
>>
>>52435666
It is useful to run code in people's browsers, anon.

You've got to admit that.

Yes, JavaScript is shit compared to C++, but you can't normally run C++ in people's browsers.
>>
>>52435855
Don't tell me what I can't do, you're not even my real mother.
>>
>>52435855
>It is useful to run code in people's browsers, anon.
It is fucking dangerous to let web devs code run on your browser.
>>
>>52435599
ES6 is the future, anon.
>>
File: i-will-fuck-u-2.gif (531 KB, 500x281) Image search: [Google]
i-will-fuck-u-2.gif
531 KB, 500x281
who here literally programs daily but makes little progress?
>>
>>52435913
>weeb is a shit programmer

no surprise here
>>
FILE *file = fopen("myfile", "rb");
size_t len;
char *data;

if (file) {
fseek(file, 0, SEEK_END);
len = ftell(file);
rewind(file)
data = malloc(len);
fread(data, 1, len, file);
fclose(file);
}


is this the right way to load a file in C?

>>52435913
me
>>
>>52435928
yes
>>
>>52435928
No, you use mmap or your OS's equivalent.
>>
Any nimfriends on?
>>
Think I'll go watch anime for a bit.
>>
Does anyone know if the costs of successive atomic operations accumulate linearly?

That is, in the uncontested case, is locking a lock and performing non-atomic operations more efficient than using multiple atomic operations?
>>
>>52435167
Why aren't webdevs using Typescript?
>>
>>52436014
On moders x86_64 processors in particular but I'm also interested in the aarch64 case.
>>
>>52435999
What anime?
>>
>>52436032
The one with the smug girls.
>>
>>52435977
interesting thanks
>>
>>52436032
Don't know yet.
>>
>>52436056
I'm currently watching Last Exile with my boyfriend, would recommend if you haven't seen it
>>
>>52436079
Thanks, anon. I'll take a look.
>>
File: 1419276460727.jpg (61 KB, 500x539) Image search: [Google]
1419276460727.jpg
61 KB, 500x539
>Try to get into anime
>Cliche and moeshit anime is the norm rather than the exception
>>
>>52435644
puts
>>
>>52435428

It's nothing like hack. The code that gets generated is pure zend engine C. It's nothing like HHVM

Here's a benchmark of Zephir, the intermediate language, vs hhvm vs raw php creating mandlebrot sets. https://www.simonholywell.com/static/files/2014-02-28/index.html

In it's worst case, Zephir is still faster than HHVM in a best case scenario. And as for being invested, our core product is built around the framework, so that's plenty investment for me.
>>
>>52436106
There is more non-moe than moe to be honest.
>>
>>52435913
i make significant progress

just accept that quality applications take some decent amount of time to develop
>>
>>52436106
What do you expect from cartoons?
>>
>>52436030
because web dev's don't understand static typing. And because TypeScript is kinda of hard to get working well with a lot of large JS libraries.
>>
>>52436162
Mmh, what a pity. Looks comfy to me (never done web stuss t'ho)
>>
Literally impossible to get dubs using a script on the bigger boards.
>>
>>52436190
Back in my day we didn't need scripts
>>
Is it possible to use OpenCV or something similar to recognize every single country flag (i.e. program is given an image of a flag, returns the name of the country with that flag) without writing manual flag recognition?
>>
>>52436137
>And as for being invested, our core product is built around the framework, so that's plenty investment for me.
Well, so long as it's being appreciated at work, I can't complain.

Generally looks pretty neat.
>>
>>52436190
Why not calculate the average post time and use that?
>>
>>52434874
linux kernel patch
>>
>>52436207
You could probably train opencv for that but I'm sure there's NN tools out there that have evolved farther than opencv
>>
>>52436226

Well, before I got here they were using zend1 and attempting an abortive migration to zend2. They weren't even using all the features. In two months I had mocked up some of the more heavily used parts of the system in Phalcon and the server could handle 5x the requests per second and TTFB was down by 75%. After than it was pretty much full throttle. And Phalcon's being an extension allows you to migrate easily because you don't have to spin up an entire framework all the time.
>>
>>52436185
I've used it before. It is indeed very nice. Lots of cool stuff in there. Does a lot to make your code still feel like regular JS by figuring out a lot of the types fro you without you needing to annotate them.

For example, doing:
function(object) {
if (object instanceof Person) {
object.sayHello();
}
else if (object instanceof Dog) {
object.woof()
}
}

The compiler will figure out that object is a Person or a Dog depending on the if statement, even though this is how you would write normal JS. Lots of cool shit. Would like to do some more projects with it soon.
>>
I just started reading sicp for the first time and there's nothing I want to do more than sit at an old vt100 in some MIT lab and click clack some lisp into an old mechanical keyboard while stroking my beard
>>
>>52436309
yes?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof

typeof someVar === 'string'
etc
works too
>>
>>52435999
not programming
>>52436046
not programming
>>52436032
not programming
>>52436079
>>>/lgbt/
not programming
>>52436091
not programming

puts("i really wish weebshits and trapfaggots would just go and stay go.");
>>
>>52436329
KILL YOURSELF WEBTARD

that is not how you do OOP
>>
>>52436336
lol, I'm not even a webtard. I just know JS.
>>
>>52436354
n00b
>>
>>52436364
fascinating
>>
>>52435991
Do they eventi exist?
>>
static typing is the only sensible option whether you're a beginner or a professional

official approved languages list:
>C++
>Java
>C#
>D
>Nim (not quite ready for mass adoption yet)
>>
>>52436387
The world needs more programming languages, obviously.
>>
>>52436396
>Here's a list of the only programming languages I know
>>
>>52435065
She's 16
>>
>>52434874
Ebin.

I'm trying to write a routing algorithm for non infrastructure networks in C++. Send help.
>>
>>52436331
Stop shitposting, anon.
>>
File: quite a ruff victory.jpg (46 KB, 653x510) Image search: [Google]
quite a ruff victory.jpg
46 KB, 653x510
>>52436538
Maybe if you'd quit jerking off to drawn cartoons of children, you could take a bit of time to google for some answers?

Probably a shitpaw owner too... smdh.

>>52436555
I'm not, weebshit. Your animu bullshit is shitposting and has nothing to do with programming.

Look at this dog. See? More productive than every single weebshit in this thread.
>>
Posting this here too in hope somebody will help me.

I was thinking about doing a web application similar to google alerts for my final project.

I was wondering what is the best way to get the latest and most relevant links every hour and serve them to the user.

I know I can do it with Python and few web scraping libraries, but I don't think that is efficient.

I didn't use PHP for this but I know cURL can help here. The problem is, now I've read that scraping google is a big no-no and they block you after about 40 requests. Can somebody please help me here?

My plan was to search for a specific keyword with additional parameters like date, relevancy, blog/news/other sources etc. Can I search that with some PHP library and grab the top 5-10 links and then put them in the database and show them to the user inside of the web app? Is that the right way to do it?

TL;DR of the app is that you have your user account and you choose a certain keywords you want to monitor, e.g. "Oscars 2016", some game name, celebrity or similar, and you can track their mentions on the internet - every hour/2/4/6/12/24 or whatever, the results show up in your feed so you don't need to google search all the things you want to keep track of a few times every day. It is basically automatizing the process. I'd probably try to implement a few more features too, but in the nutshell it is like google alerts app.
>>
>>52436583
1) Write a search engine
2) ???
3) Profit!
>>
I'll be wrestling with I2C on AVR soon, I'm still building the breadboard now.
Any recommendations on I2C pull up resistor values?
>>
>>52436758
10k
>>
>>52435644
Cast unused return values to void to denote that it's correct that they're unused.
>>
>>52436767
Thank you.
I guess clocking the bus with lower frequency allows me to use weaker(bigger resistance) pull up?
>>
>>52436808
>unused return values
>his OS doesn't use status codes
go ahead, blame the program
>>
>>52436484
>Here's a list of the only good programming languages I know
FTFY
>>
>>52436830
?
>>
>>52436758
>Wrestling with I2C

mate, it's easiest shit in existence.
>>
>>52436396
>talks about static typing
>doesn't mention a single decent type system
>>
Good morning, /dpt/!
Good morning, Haskell!
>>
>>52437023
It's 5pm, anon.
>>
>>52437177
Timezones, how do they work?
>>
>>52437177
wut
>>
>>52437182

You save you shit to the database in UTC and offset.
>>
File: 1451051382875.png (299 KB, 942x848) Image search: [Google]
1451051382875.png
299 KB, 942x848
What are some fun things to make in JavaScript, /dpt/?
>>
>>52434874
>What are you working on, /g/?

I'm trying to learn Ruby.

Then I want to learn Ruby on Rails.

Then I want to learn... how to properly design software applications, probably, because historically I've just started typing and rewrote from scratch five times when it was shit.

Then I want to make a mapping web application for fictional worlds.

Also I might be about to switch jobs to a C++ heavy codebase so I might need to learn that too.
>>
http://news.softpedia.com/news/zero-day-ffmpeg-vulnerability-lets-anyone-steal-files-from-remote-machines-498880.shtml

Yet another security vulnerability due to the use of memory-unsafe languages like C.
>>
>>52436736
Ehh, that won't work for me. I'm still trying to find some info but no hope, somebody please?
>>
File: 1441172472299.png (95 KB, 431x551) Image search: [Google]
1441172472299.png
95 KB, 431x551
So /dpt/, is there a proper reason why Bethesda decided to tie physics to the games framerate?
Because as far as I can tell, Bethesda was drunk off their asses when they developed Fallout 4.
It's not like it's hard or anything to have a fixed physics timestep. What the fuck are they thinking?
>>
>>52437477
Bethesda is incompetent.

This will answer most questions about their design decisions.
>>
>>52437477
What's wrong with that?
>>
>>52437524
It relies on the game to run at a certain frame rate (60) for the game to run as expected.
Have good graphics card and turned vsync off? enjoy your super fast physics.
Have shit card? enjoy your super slow physics.

It's wrong by design, you should develop your game to work at any arbitrary frame rate. It's not even hard to do.

>>52437502
I don't believe they can be that incompetent.
>>
>>52437502
>>52437558
They probably licensed the engine. And the engine is shit.
>>
>>52437565
What's that got to do with anything?
>>
File: tmp.png (84 KB, 640x480) Image search: [Google]
tmp.png
84 KB, 640x480
I'm still kind of learning Java and OOP and I drew the problem I'm having in pic related.

So I have a parent class that has an update function has an abstract method. It's overridden by the child class. What's the best course of action when all child classes but one require only a single piece of of informtaion, while the child class requires two? Do I just change the function prototype to include an extra piece of information that most child classes don't need?
>>
Is there a simple way to draw a black border or outline around a 2d image with opengl 2.1?
>>
>>52437565
They used to license the Gamebryo engine, but since Skyrim they've been using an in-house engine.

Even a basic semi-pro engine like Unity has a well-defined separation between a physics and display timestep.

Bethesda makes their money on art and content, and has never been good at technology. This should not be news to you.
>>
>>52437565
The physics engine I mean, they managed to fuck up their own by themselves.

>>52437579
They didn't program the engine, they don't have the source code for it. Since FO4's engine is just a newer version of the one they used at least since Morrowind (just with a name change inbetween) it is pretty safe to say that the non-physics part is not affected by the framerate.
>>
>>52437592
Yes.
http://www.w3schools.com/css/css_border.asp
http://www.w3schools.com/cssref/pr_outline.asp
>>
>>52437588
Jesus christ how horrifying.

https://www.draw.io/

Go use this.
>>
Building a tool to faciliate fapping. ./fap.js N *.webm spawns N cvlcs playing *.webm in an infinite loop. You're welcome, humanity.

#!/usr/bin/nodejs --harmony
var spawn = require('child_process').spawn,
argv = process.argv,
workers = +argv[2],
tasks = argv.slice(3);

roundRobin(tasks, workers).forEach(tasks => {
var i = 0;
shuffle(tasks);
loop();

function loop() {
spawn('cvlc', ['--play-and-exit', tasks[i]]).on('exit', () => {
i = (i + 1) % tasks.length;
loop();
})
}
});

function roundRobin(tasks, workers) {
var assignments = [];
for (var i = 0; i < workers; i++)
assignments.push(tasks.filter((_, j) => j % workers == i));
return assignments;
}

function shuffle(array) {
return array.sort(() => Math.random() > 0.5 ? 1 : -1);
}
>>
>>52437558
Sure but for the typical use case - smooth 60 fps with occasional lag spikes, the setup is perfect. Dont you hate when you're playing a game and you're in the middle of a boss fight and the framerate drops to 3? By the time you render a few frames, the boss has attacked you 10 times and you're dead.

Tieing the physics to the frame rate protects players from frame slowdown.
>>
>>52437620
Thanks.
>>
File: 1.jpg (752 KB, 1920x1080) Image search: [Google]
1.jpg
752 KB, 1920x1080
Does anyone have this in any text format?

I really can't be fucking bothered writing this out.
>>
>>52437622
yeah, and then gta iv multiplayer happens, where people launched it at 640x480 to get high framerate and faster cars
>>
>>52437622
>Dont you hate when you're playing a game and you're in the middle of a boss fight and the framerate drops to 3?
This has literally nothing at all to do with tieing the physics to a fixed framerate. Both the game logic and physics engine should adapt to varying framerates, as taught in fucking game design 101, fourth lesson.
>>
>>52437622
No, that's wrong a fucking retarded.
Kill yourself.
>>
>>52437588
instead of passing in int int1, int int2, redefine the interface to be public void update(WorldState a) {} or whatever so you can pass in any info a child could possibly need.
>>
>>52437627
Send a screenshot of your problem in that so it's actually legible, might be able to help you then.
>>
File: 3dpd.jpg (192 KB, 480x640) Image search: [Google]
3dpd.jpg
192 KB, 480x640
What's the best dialect of lisp with a good set of libraries? I'd really like to dive into functional programming and use it for a project.

I already know scheme.

Is it racket?
>>
File: 1450726424104.png (622 KB, 1024x1024) Image search: [Google]
1450726424104.png
622 KB, 1024x1024
>>52437621
>using JavaScript outside of a web browser

WHY?
>>
>>52437640
Sounds like you should write a program to convert text in a picture into actual text (since you obviously have nothing better to do with your time than programming busywork that benefits no-one).
>>
>>52437588
No, you pass a fucking list to the function.
>>
>>52437674
Oh thanks, this is what I was looking for.
>>
>>52437679
Racket or Common Lisp.
Guile's set of libraries is okay but R5RS is pretty shitty.
Chicken is full of shitty eggs that might build fine on the developers machine but then fail to build at all for anyone else - and there's no official quality control for this.
>>
>>52437691
If I were capable of that, then I would do that.

Sound like you should write a program that posts worthless responses based on your level of self-importance at any given moment (since you obviously have nothing better to do with your time than responding to questions with meaningless shitposts)
>>
>>52435415
Distributed execution across multiple nodes to cover a 10 post bandwidth for higher probability of hitting the dubs?
>>
>>52437680
Why not? ECMAScript is a general scripting language, it doesn't matter if you plug in the DOM (browser) or a bunch of OS interface libraries (nodejs) into it.
>>
>>52435415
>not simulating the entire internet on an EC2 cluster you rented with christmas giftcard money in order to find the constants needed to get perfect dubs everytime
pleb
>>
>>52437679
i don't know all existing implementations but

racket: good amount of libs, has a package managers
chicken scheme: same as racket
kawa: rely on the java virtual machine (tons of libs)
clojure: same as kawa, probably the most currently used lisp in the san francisco bay.
hy: implemented on cpython (ton of libs)
>>
>>52435566
Why not run it server-side with Node,js? It'd be a lot less messy, no DOM bindings everywhere. APIs exist for a reason.
>>
Anyone know of any decent tools for stripping stuff from raw text?

I could write a quick and dirty script for this specific instance, but it'd be nice if I could have a tool that does that kinda shit.
>>
File: o.webm (777 KB, 1440x896) Image search: [Google]
o.webm
777 KB, 1440x896
>>52434874
Im working on my random image generator
Actually im mostly trying to make a board RPG game map generator now
>>
File: guidosicp.png (100 KB, 601x623) Image search: [Google]
guidosicp.png
100 KB, 601x623
>>52437679
If you want to do some functional programming, then pick a functional programming language, no ? (haskell, elm (very promising), clean, idris, ...)
>>
>>52435855
Node.js, Phantom.js, and Protractor.js make me lots of money though. Not even a web dev.
>>
>>52437858
Yep, it's called the basic unix toolchain.
>>
>>52437858
sed?
>>
>>52437888
>somebody mails him free copy of expensive, well-made work of art
>gets snarky and cunty about it
fucking pythonfags i swear to god
>>
>>52436162
Because Dart is 100x better.
>>
>>52435599

Absolutely.
>>
>>52435746
>>52435778
You can be in VR
>>
>>52435389
es6 is just the next version of the programming language, not some shit framework or library
>>
File: 1451862418594.png (114 KB, 256x256) Image search: [Google]
1451862418594.png
114 KB, 256x256
>>52437640
Here you go, anon:

http://pastebin.com/QHkdtDzw

It's in JSON format.

I generated it from: https://better-dpt-roll.github.io/

Using:

var dpt = {}; 

var challenges = document.getElementsByClassName("index");

for(var i = 0; i < challenges.length; i++) {
dpt[Number(challenges[i].textContent)] = document.getElementsByClassName("challenge")[i].firstChild.textContent;
}

console.log(JSON.stringify(dpt, null, 2))
>>
File: code.png (5 KB, 318x142) Image search: [Google]
code.png
5 KB, 318x142
Will this code get the entire contents of the text file?
>>
File: and then.jpg (62 KB, 407x584) Image search: [Google]
and then.jpg
62 KB, 407x584
>>52437888
>lisp
>higher-order functions
>lazy evaluation
>currying
>not a functional programming language
>>
>>52438035
>I ended up taking the .js file containing all the challenges from his source code and just stripping the raw "name" value out

Oh well, if it works it works.
>>
>>52437886
bretty gud
>>
>>52434874
Been learning Django, and now trying to get webRTC to let me record videos for upload to my server using a version of webRTC that has a flash backup (for compatibility).

I know Python pretty well, and have gone through all the Django tutorial docs. The shim I'm using for webRTC that has the flash backup relies on JavaScript, so I'm going through the codecademy course just to get the syntax down so I can understand the example and work it to my needs better. Does this sound like I might be getting in over my head?
>>
>>52437886
Good, now try generating stuff that's actually visually pleasing rather than just printing a couple of rand()s into an XML file.
>>
>>52436808
>Cast unused return values to void

u wot
>>
>>52438403
(void) printf("");
>>
File: 1442447882356.jpg (65 KB, 500x312) Image search: [Google]
1442447882356.jpg
65 KB, 500x312
>need to add line break to string
>string += "\n"
>adds an actual "\n" to string, instead of line break
>>
>>52438438

where the hell did you get this idea? i've never seen anyone do this.
>>
File: assembly.jpg (144 KB, 677x633) Image search: [Google]
assembly.jpg
144 KB, 677x633
>tfw wage slave IT work is done for this week so I can finally finish my CHIP-8 interpreter
It's gonna be a good weekend lads
>>
File: lol.jpg (67 KB, 400x445) Image search: [Google]
lol.jpg
67 KB, 400x445
>>52436808
>>52438438
I wonder if there would be some way to design a feature that 'collected' these 'garbage' bits of data once they're no longer needed...
>>
File: assembly categories.jpg (160 KB, 646x1189) Image search: [Google]
assembly categories.jpg
160 KB, 646x1189
>>52438591
First game will either be sokoban or pacman

Any other suggestions?
>>
>>52436808
>Cast unused return values to void to denote that it's correct that they're unused.

You bloody what mate?
>>
Why haven't you accepted ocaml as your lord and savior yet, /dpt/?
>>
>>52438863
Procedures generally return certain values for certain reasons. If that reason is an error you want to know about it.
To indicate that you are aware of a value being returned, but think that it is okay to ignore that value, even if it were to express an error, you cast the return value to void.
That way others reading your code know you did not just forget to handle a return value.
This should be used sparingly and only with functions that either don't return an error or do not compromise the program when they fail.
>>
>video called BACK TO BASICS
https://www.youtube.com/watch?v=xnqTKD8uD64

>SOFTWARE ENGINEERING
>SOFTWARE ENGINEERING
>SOFTWARE ENGINEERING

What the fuck man, I don't know anything about that shit. How is this basic
>>
>>52439120
developers developers developers developers.
>>
>>52434874

http://codeshare.io/4chan
>>
File: 1434193205492.gif (177 KB, 180x218) Image search: [Google]
1434193205492.gif
177 KB, 180x218
>>52435600
OH FUCK

WELL DONE
>>
File: 1367038156864.jpg (63 KB, 610x406) Image search: [Google]
1367038156864.jpg
63 KB, 610x406
>>52435600
>>
How do I learn HTML, /dpt/?
>>
>>52439182
thanks fambly
>>
>>52439223
right click -> view source
>>
>>52439022

There's plenty of reason to ignore return values. Certain functions return their dest ptr, etc. There's no reason to always handle a function's return, and always casting to void when you want to do that seems questionable.

Not the worst idea I've ever heard, but also, why bother?
>>
File: Untitled.png (50 KB, 615x656) Image search: [Google]
Untitled.png
50 KB, 615x656
which keyboard for programming

this one's spacebar is fucked
>>
>>52439223
<head>
<title>My home page!</title>
</head>
<body>
<h1>Welcome to my home in Cyberspace :)</h1>
<img src="cool_animation.gif">
<a href="guestbook.htm">Sign my guestbook!</a>
</body>

i think that covers most of it.
>>
>>52434874
ebina boob simulator
>>
>>52439390

Get something with reds. I'm going to get a Ducky premier with reds soon.
>>
File: disgust.jpg (46 KB, 620x400) Image search: [Google]
disgust.jpg
46 KB, 620x400
>>52439434
>reds
>programming
>>
>>52439453

what the hell are reds?
>>
>>52439453

What's wrong? Reds are beautiful for programming. Nice feeling and no clackity.
>>
File: 1452204217946.jpg (63 KB, 914x574) Image search: [Google]
1452204217946.jpg
63 KB, 914x574
>>52439434
Don't you mean blues?
>>
>>52439453
This. Brown or bust.
>>
>>52439476
You know what is even more beautiful?
W H I T E.
>>
>>52439476
>>52439434
you might as well just get a rubber dome keyboard if you're gonna get reds.

blue all the way
>>
File: Mech_keyboard_switches.gif (638 KB, 1600x2220) Image search: [Google]
Mech_keyboard_switches.gif
638 KB, 1600x2220
>>52439469

>>52439476
Way too light, you have to tiptoe so you don't make typos
>>
>>52439495

Blues are terrible. The sound drives me insane.

>>52439517

I never had an issue with that.

>>52439502

Browns are also pretty good. They just don't feel as good to me.
>>
What about topre switches?
>>
File: card.png (278 B, 24x24) Image search: [Google]
card.png
278 B, 24x24
>>52435818
This image triggers me, and you, my friend?
>>
>>52439563
They're the best, obviously. Only issue is the long actuation distance.
>>
>>52439546
Sounds like light manlet hands to me

you sure you can take those 45 grams
>>
>>52439658
NEVER SKIP FINGER DAY
>>
>>52439390
psl repsodn
>>
>>52439675
>>>/tif/
>>
What is this?
>>
>>52439390
Your spacebar is fucked.
My tab key is fucked.
Wanna pair program on each other's laps?
>>
>>52439732
I think it's a maltron ergonomic qwerty trackball keyboard black large... jpg.
>>
File: true-love.jpg (29 KB, 580x292) Image search: [Google]
true-love.jpg
29 KB, 580x292
>>52439734
sure
>>
9
>>
>>52439750
Are you a female woman with no penis whatsoever?
>>
>>52439658
>Sounds like light manlet hands to me

Not really.
>>
File: 33urin6.gif (894 KB, 320x213) Image search: [Google]
33urin6.gif
894 KB, 320x213
>>52439805
>a female
>in a programming thread
>>
>>52439822
Fuck off, Urkel.
>>
>>52439836
fuck off transvestite
>>
>>52439846
How am I a tranny when I clearly made sure to verify if it's a female?
I am a male.
Who doesn't like anime.
nor trap faggotry.
>>
>>52439872
fuck off faggot
>>
>>52436387
One guy I work with loves nim. He's called Dom isn't from my country and I'm pretty sure he's an autistic. That's a real nimfriend for ya
>>
>>52439957

Nim seems pretty cool, though. Seems fairly simple and the FFI looks good.
>>
>>52438641
snake, like on old nokia phone
>>
>>52439914
mad because missing chromosome
>>
>>52435599
Nice let, mate.
>>
>>52439980
Hi Dom
>>
>>52437800
Checked.
>>
>>52439980
Some days ago I was about to read something on it... But hey, if I want to learn some obscure language I prefer learning something with particular killer features (e.g. Rust safety), not just a well-thought-but-not-so-special-and-unlikely-to-ever-become-serious language...
Will dig into it anyway some of this days (at a first glance, it seems to be a pleasure to use), but for now just meh...
>>
File: 1410141503674.jpg (9 KB, 225x225) Image search: [Google]
1410141503674.jpg
9 KB, 225x225
>>52435167
>>52435250
>Learn javascript the good parts
I'm sorry, but that is not a good book.
>then go for es6 as it's the fucking future
It is, but you will still need to know ES5 for now. And being able to write good ES5 code will make you a better ES6 programmer.

I recommend getting up to speed with CodeAcademy, then reading Secrets of the JavaScript Ninja. It will show you about functional programming, closures, and a whole mess of ridiculously useful things that will help you write readable, functional, and terse code.
>>
File: interviewer.jpg (285 KB, 902x652) Image search: [Google]
interviewer.jpg
285 KB, 902x652
public class A {
public void x() {
y();
}
public void y() {
System.out.println("1");
}
}
public class B extends A {
@Override
public void y() {
System.out.println("2");
}
}
public static int main( String args[]) {
B b;
b.x();
}


Well?
>>
>>52439957
The fun part is that Dom is an active contributor of Nim, so you probably saw him on their forums (he has a autistit-looking photo), so you have visited their forums...

>nimfriend
>>
>>52435644
C has automatic concatenation (So "Yo" "~!" -> "Yo~!"), so you can actually have a single printf() there,
>>
>>52440244
>I'm sorry, but that is not a good book.

what's wrong with it?
>>
>>52440267
2
>>
>>52436106
Go watch Ninja Scroll, m8.
>>
>>52440320
>1993
Fucking hell, it's ancient.
>>
>>52440275
I can tell you a lot of personal info about him if you like. Implying I would fucking waste time going to look up his photo.
>>
>>52440320
>>52440348
>>52440311

NOT
PROGRAMMING
Fuck off to /a/ if you want to talk about drawn children to jerk off over.
>>
>>52440381
What's your favourite anime, anon?
>>
>>52440381
What the fuck, I am not talking about anime you fuckin' neckbeard.
>>
Hey g.
CS student Here.
I am gonna pass my test tomorrow and wish to start on my math prep for next month.
I also want to learn java, as many modules we do require Java.
Can you give me advice on modern java books I can learn from, give me exercises to train my knowledge and skill, refer back to and are worth the shekels?

I wish to spend 2h a day on it until the end after the math test and then use it regularly.
>>
>>52438035

>142: "4chan thread quality analyzer"

hahaha, what?

That's simple:
>System.out.println("garbage");
>>
>>52440417
Pokemon.
I don't know any.
>>
>>52440305
It's outdates, Crockford doesn't really show any good patterns, and his mind has changed about a lot of stuff in the book since he's written it.

Also, he has this you-have-to-only-use-the-things-I-like-and-everything-else-is-evil attitude about a lot of features that are much more useful than you'd think.

A lot of experienced JavaScript developers actually loathe the book.

You can read it, but take it with a grain of salt, and look the things it says up on MDN.

Also: http://sayyouresorryforwhatyouvedone.blogspot.ca/2011/04/douglas-crockford-for-javascript-good.html

>>52440417
Madoka Magica
>>
>>52440214

Rust is good and I like playing with it, but I don't think it has any particular ""killer"" features. Ruby might disagree with my assessment there.
>>
>>52440442
>outdates
*outdated
In other news, I can't into typing.
>>
>>52438641

Game of life and Tetris were my first two games.
>>
>>52440311
Sadly incorrect. It will call the y method from A, actually.
>>
>>52440348
So nobody is going to take my bait? I assumed all of /dpt/ were born around 1993.
>>
>>52440442
>Crockford
Isn't he pretty autistic?

I get a "his way of doing things is the right way and everyone else's way is the wrong way" vibe from him.
>>
>>52440244
>Secrets of the JavaScript Ninja
Oh neat! There's a version slated for release this year that will have ES6 in it.

So there you go! https://www.manning.com/books/secrets-of-the-javascript-ninja-second-edition
>>
>>52440311
>weebshit

thanks... we'll let you know.
>into_the_trash_it_goes.jpeg
>>
>>52440026
alright anon, I'll work on it

>>52440464
GoL sounds pretty fun too. I'll add that to my near future projects.

On another note, I got drawing, game loop time and keyboard down, so it's just the 1 beep sound left to implement, then an assembler, then I can start writing code in my own implemented assembly language.
>>
>>52440523
You're in the minority, anon.

Why are you even on 4chan?

There's not a single board that hates anime, even /pol/ likes anime.
>>
>>52439511
Only autists need audible or tactile feedback. Blacks and reds are the best.
>>
>>52439563
>>52439599
They're literally expensive rubber domes.
Their long actuation distance is because you have to bottom out the key for the membrane dome to deform enough to make contact with the switch.
A 90s high quality rubber dome keyboard gives you most like same experience.
>>
>>52440477
Nobody cares.
>>
>>52440466
I just tested it and you're full of shit
>>
so my atmega died during operation and won't boot
what do?
Thread replies: 255
Thread images: 46

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.