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

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 330
Thread images: 31

File: K&R c.png (1MB, 1000x1400px) Image search: [Google]
K&R c.png
1MB, 1000x1400px
old thread: >>57887341

What are you working on, /g/?
>>
>>57892879
First for D
>>
>>57892879
I don't care about the anime thing but you could variate more the op pics. it's always the same 2 books
>>
>>57892879
Great OP image.

First for node.js Sisyphean callback hell.
>>
>>57892900
I can't in good conscience recommend other programming books because 99% of them are trashy bloated reference texts written for college classrooms.
They're basically cash cows for their publishers because they make a new one literally every school year.
>>
>>57892879
I'm learning about neural networks now. They seem really simple. The hard part is backpropagation and getting the thousands of neuron's weights exactly adjusted to give you the desired output.

How do genetic algorithms work? Backpropagation is gradient descent complicated calculus stuff but wouldn't a genetic algorithm just be adjusting the weights randomly over thousands of simulations, killing off the nets the weren't performing right? Sounds dead simple.
>>
>>57892961
>they make a new one literally every school year.
that's because new stuff comes out every year, while c is an outdated language lost in the 50s
>>
>>57892968
Would be totally inefficient.
Backpropagation with gradient decent is dead simple. It's just the chain rule.
>>
>>57892982
*1990

A language isn't supposed to receive yearly updates, you standardize it once and expect it to be supported on all platforms without ever worrying if all your users will be able to support X feature from 3 releases ago.

Look at python, they're still supporting versions 2 AND 3 simultaneously because nobody wants to switch and they're mutually incompatible.
>>
>>57892992
ah really? I only took up to calculus 1 but I'll try to brush up on that and understand it. either way I'm going to try and get some fun stuff working using a premade neural net library.
>>
>>57892879
Not thanks for using Himegoto image
>>
>>57893013
You do realize that C was updated in 1995, again in 1999 and then again in 2011, right?
>>
>>57892961

I can't in good conscience recommend K&R C either because it does not teach defensive coding practices, which is pretty fucking vital if you are writing C in TYOOL 2016.

It's a really neat historical artifact, well worth the purchase once you are actually familiar with the language, but if you write code like the K&R examples in practice you shouldn't be touching GCC with a ten foot pole.
>>
>>57893078

Name ONE (1) useful feature that came with any of the C standard revisions.
>>
>>57893091
Designated initializers.
>>
>>57893078
Those weren't even really updates.
They simply standardized the non-standard GNU extensions that everyone came to enjoy from GNU C.
>>
>>57893111
So what you're saying is that C received yearly updates then?
>>
>>57893091

stdint.h
>>
>>57893126
Those aren't updates, they're compiler extensions.

You can choose to ignore them and write in strict -std=c90 -Werror -pedantic mode if you so please.
>>
>>57893126
Somebody updates GCC.
>>
>task: rewrite this block of code in a different/better way
if condition { 
execute_a()
execute_b()
} else {
execute_c()
execute_a()
execute_b()
}
>>
>>57893091

// Double slash comments
>>
>>57893091
Single-line comments and declaration of variables inside conditionals
>>
>>57893177
You may be retarded if you can't do this.
>>
>>57893177
Better:
if (!condition)
execute_c();
execute_b();
execute_a();


Different:
switch (condition) {
case 0:
execute_c();
default:
execute_b();
execute_a();
}
>>
>>57893177
If ¡condition {
Execute _c();
}
Exec_a();
Exec_b();

Phone posting and learning C.
>>
Any Javascript (plain Javascript) books or courses that teach how Javascript works itself and with the DOM?

Looking for something that assumes knowledge of programming, not intro to programming that uses Javascript.
>>
>>57893177
unsigned i, iters = (cond) ? 2 : 3;
void (*exec[3])() = {
execute_a, execute_b, execute_c
};
for (i = 0; i < iters; i++)
exec[i]();
>>
>>57893177
Best way I could think to do it :/

void (*func_ptr[3]) = {execute_a, execute_b, execute_c}

int i;
for(i = 0; i < 2; i++){
if( condition && i == 0)
(*func_ptr[i])();
if( condition && i == 1)
(*func_ptr[i])();
if(!condition && i == 2)
(*func_ptr[i])();
}
>>
>>57893280
>teach how Javascript works itself and with the DOM?
I'm not really sure 100% what you mean by this to be honest, but Javascript: The Good Parts is a fairly good intro if you already know how to program and its only like 100 pages or something.
>>
>>57893303
What happens if the condition is false?
>>
>>57893177

sequence_ $ drop (fromEnum condition) [ execute_c, execute_a, execute_b  ]
>>
>>57893341
Oh you're right mate terribly sorry, I also forgot a semicolon. I believe this should work.

void (*func_ptr[3]) = {execute_a, execute_b, execute_c};

int i;
for(i = 0; i < 2; i++){
if((condition || !condition) && i == 0)
(*func_ptr[i])();
if((condition || !condition) && i == 1)
(*func_ptr[i])();
if(!condition && i == 2)
(*func_ptr[i])();
}
>>
I'm a reporter with 4chan's official nightly news station.

Why do you guys come to /dpt/? To socialize? To learn?
>>
>>57893380
The most important task that can be done, 4NN.
Procrastinating on writing code.
>>
>>57893364
Your function pointer array declaration requires an argument list.
>>
>>57893380
Fuck you and your lies
>>
>>57893364
>condition || !condition
this will always be true
>>
>>57893406
Not if there's a fault in the universe where true equals false for a moment. Gotta check for that.
>>
>>57893406
Only in classical logic
>>
>>57893438
In what logic is it not true? It's true in fuzzy logic as well: x + 1-x === 1.
>>
made a game called browncoats

http://pastebin.com/brn9DhTF
>>
>>57893400
>>57893406
Shit, sorry guys. Fixed those things, also thought of an additional optimization. Feeling good about this one.

void (*func_ptr[3])() = {execute_a, execute_b, execute_c};

int i;
for(i = 0; i < 2; i++){
if(true && i == 0){
(*func_ptr[i])();
}
if(true && i == 1){
(*func_ptr[i])();
if(condition){
goto EXIT;
}
}
if(!condition && i == 2)
(*func_ptr[i])();
}
EXIT: //continue...
>>
>>57893446
> +
>>
>>57893454
Why do you need several if conditionals?

Just do >>57893285
>>
>>57893476
Yeah, I'm dumb.
>>
>>57893454
I convinced my coworker to use a goto once. I'm still convinced that it would have been more efficient to use a goto, but I used a language trick to get around it since a goto made him squeamish.
>>
>>57893285
shouldn't it be

unsigned i, iters = (cond) ? 1 : 0;
void (*exec[3])() = {
execute_c, execute_a, execute_b
};
for (i = iters; i < 3; i++)
exec[i]();
>>
>>57893536
But that's the same thing. It still doesn't run execute_c() if cond is false.

You might as well write it
unsigned i, iters = !!cond;
>>
File: MRE-cover.gif (16KB, 300x394px)
MRE-cover.gif
16KB, 300x394px
>>57892879
>What are you working on, /g/?

Learning regular expressions to increase my power level.

Is this a good idea?
>>
>>57893563
yeah but according to >>57893177 execute_c() should be executed before execute_a() and execute_b().
In >>57893285 execute_c() comes after.
>>
File: ritchie.png (234KB, 480x480px) Image search: [Google]
ritchie.png
234KB, 480x480px
>>57893574
It's never a bad idea to learn something new in your field, anon. Especially something as relevant as regex.
>>
>>57893595
If your output is completely dependent on the execution order of your instructions, your code is shit.
>>
>>57893595
I'm starting to think that there isn't a better way to rewrite it, since everyone seems to fail on the first try.
>>
>>57893090
>it does not teach defensive coding practices,
wut
>>
>>57893574
Always, but read about the "regular language" too for some background.

https://en.wikipedia.org/wiki/Regular_language
>>
>>57893624
She seems to think that initializing your variables and doing bounds checking is difficult.
>>
>>57893614
but that's how non-parallel computing works.
>>
>>57892961
Books are free, anon. Read them and find out.
>>
File: 1473863289691.jpg (183KB, 640x931px) Image search: [Google]
1473863289691.jpg
183KB, 640x931px
What are possibilities of programming on the non-Android phone?
Please keep answers relevant to the question.
>>
>>57893711
I guess iphone apps make more money since people who have iphone usually aren't poorfags
>>
Allocating a 3 dimensional array dynamically in C.
#define SIZE 1024 
int i, j;
int ***arr = (int ***) malloc(sizeof(int **) * SIZE);
for (i = 0; i < SIZE; i++)
arr[i] = (int **) malloc(sizeof(int *) * SIZE);
for (i = 0; i < SIZE; i++)
for (j = 0; j < SIZE; j++)
arr[i][j] = (int *) malloc(sizeof(int) * SIZE);
>>
>>57892879
trying out TempleOS
>>
>>57893778
>only three stars
Weak m8
>>
File: andrei.jpg (18KB, 200x256px) Image search: [Google]
andrei.jpg
18KB, 200x256px
>>57892879
r8 my waifu
>>
Sorry for the retarded question, but what's the proper way to do this?
if(a[i] == b[0] || b[1] || b[2] ...){
do something
}

Just doing b[0] works but adding anything else breaks it. I'm using || wrong right?
>>
>>57893798
Allocating a 6 dimensional array dynamically in C.
#define SIZE 1024 
unsigned i, j, k, l, m;
int ******arr = (int ******) malloc(sizeof(int *****) * SIZE);
for (i = 0; i < SIZE; i++)
arr[i] = (int *****) malloc(sizeof(int ****) * SIZE);
for (i = 0; i < SIZE; i++)
for (j = 0; j < SIZE; j++)
arr[i][j] = (int ****) malloc(sizeof(int ***) * SIZE);
for (i = 0; i < SIZE; i++)
for (j = 0; j < SIZE; j++)
for (k = 0; k < SIZE; k++)
arr[i][j][k] = (int ***) malloc(sizeof(int **) * SIZE);
for (i = 0; i < SIZE; i++)
for (j = 0; j < SIZE; j++)
for (k = 0; k < SIZE; k++)
for (l = 0; l < SIZE; l++)
arr[i][j][k][l] = (int **) malloc(sizeof(int *) * SIZE);
for (i = 0; i < SIZE; i++)
for (j = 0; j < SIZE; j++)
for (k = 0; k < SIZE; k++)
for (l = 0; l < SIZE; l++)
for (m = 0; m < SIZE; m++)
arr[i][j][k][l][m] = (int *) malloc(sizeof(int) * SIZE);
>>
>>57893778
>malloc
>not calloc
>>
>>57893826
a[i] == b[0] || a[i] == b[1] || ...
>>
>>
>>57893836
Thanks.
Is there a better/shorter way of doing it if b[] contains 6 elements?
>>
>>57893826
>>57893836
a switch may be good

switch(a[i]) {
case b[0]:
case b[1]:
case b[2]:
...
// do something
break;
}
>>
>>57893090
Go back to complaining about Python 3, Zed.
>>
>>57893827
You only need one for
>>
>>57893836
foreach(j; 0..6) // or a for loop if your language sucks and doesn't have a foreach
{
if(a[i] == b[j])
{
//do thing
break;
}
}
>>
>>57893827
>allocating 2**(10*6) bytes of memory
>>
>>57893097
>>57893141
>>57893187
>>57893188

Name 30 more.
>>
>>57893939
how do you do that cody thingy?
>>
>>57893939
that would "do thing" more than once
>>
>>57893988
>break;
>>
>>57893975
Just die already.
>>
>>57893975
You're the only trip fag I don't hate
>>
>>57893996
>break
I'm a retard
>>
>>57893939
>
a[i] == b[j]

B)
>>
>>57893999

Nice trips, my guy.
>>
is there any practical difference between break/continue and goto?
>>
>>57894048
Cleaner, easier to use, don't have to set extra labels to use them
>>
File: 1471289579297.jpg (87KB, 720x720px) Image search: [Google]
1471289579297.jpg
87KB, 720x720px
>an hour wasted not realising some prick thought "near" and "far" were good macro names
>finally fix bugs
>compiler out of heap space

FUCK YOU C++
I HATE YOU
YOU ARE SHIT
>>
>>57894079
> Macros
Not even once
>>
>>57894111
>hahaha macros are the problem
Oh yeah, let me just #inc
oh wait
>>
>>57894120
You should see a doctor. I think you've had a stroke.
>>
>>57894079
visual studio is nice because it shows a chart of memory used x time.
>>
>>57894142
... no, it was the COMPILER that ran out of space.
because apparently C++ allows types and namespaces to have the same name, but only if it then results in a compiler error
>>
programming languages final in 8 hours. does anybody have some good practice programs or exercises to do in Scheme, Haskell, and Prolog?
>>
>>57894201
a program that calculates the factorial of a number
>>
>>57894201
> Programming final
I wish for simpler times
>>
>>57894229
can do that tail and non-tail recursive, looking for something more challenging

but thanks!
>>
File: 1476713479124.jpg (204KB, 1920x1080px) Image search: [Google]
1476713479124.jpg
204KB, 1920x1080px
Day 8 of AoC doesn't even seem fun, it's just parsing commands and shifting arrays by one.
>>
>>57893642

Given the amount of shit C codebases out there, and the number of vulnerabilities out there caused by said codebases, it apparently is something a lot of programmers skip out on.

Lord knows we don't need more OpenSSL's in the wild.
>>
>>57894418
Could you please leave?
You clearly get all your knowledge of C from sensationalist websites.
>>
Is there a nicer way to check for file existence/readability in C, portably than:

        FILE *file;
if ((file = fopen("/some/path/to/file", "rb"))) {
fclose(fp);
// File exists
}
>>
>>57894201
Implement foldr, then use it to implement map and filter.
>>
>>57894464
Write that into it's own function called file_exists so that you can simply write
if (file_exists("/path/to/file")) { ... }
>>
>>57894485
then use it to implement foldl
>>
>>57894490
That's what I'm doing, it just seems like an ugly implementation. I was wondering if I just was missing some obvious nicer way to do it.
>>
Any reason not to use puts for achieving the same result as "text\n" with printf?
>>
>>57894508
No. But printf is more convenient overall. You will find that as you use it more.
>>
>>57894464
Nope
>>
>>57894079
This is why you need a lexer.
You'd k on your near and far were macros if you had highlighting for it.
>>
>>57894439

If only. The websites are wrong, it's worse than that.
>>
>>57893778
>>57893827
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if (argc < 5) {
fputs("Not enough arguments\n", stderr);
exit(EXIT_FAILURE);
}
int
d1 = atoi(argv[1]),
d2 = atoi(argv[2]),
d3 = atoi(argv[3]),
d4 = atoi(argv[4]);
int (*A)[d1][d2][d3][d4] = malloc(sizeof *A);
if (!A) {
perror(argv[0]);
exit(EXIT_FAILURE);
}
printf("sizeof *A = %zu\n", sizeof *A);
int x = 0;
for (int i = 0; i < d1; i++)
for (int j = 0; j < d2; j++)
for (int k = 0; k < d3; k++)
for (int l = 0; l < d4; l++)
(*A)[i][j][k][l] = x++;
return EXIT_SUCCESS;
}
>>
>>57893829
It's almost like he wants side effects.
>>
File: hackingtheloop_1920.jpg (645KB, 1920x960px) Image search: [Google]
hackingtheloop_1920.jpg
645KB, 1920x960px
Need some help with a VB.net project I'm working on.

So, to calculate the price of something, it's similar to buy one get one free. Except the second item is a dollar. However, it works like this. Say you buy four items. First is full price, second a dollar, third full price, fourth a dollar.

I was going to just divide qty by 2 if greater than 1, but that won't handle odd numbers.

How would you guys go about this? Doesn't really matter that it's VB.net, really I just need to figure out how to do it as a formula.
>>
> puts has an implicit \n
> fputs does not
> fprintf has FILE as first parameter
> fputs has it as the second
REEEEEEEEEEE
>>
I think I may be retarded. Can someone please explain scripting to me or point me to an example of a scripting or some resource to learn from?

A script is just something you run from console right? I feel like this is a massive gap in my knowledge.
>>
>>57894674
Check Wikipedia.
It's not that important to know really.
>>
How do I get network connections in Java?

I can easily do it in chrome devtools (pic)
>>
>>57894694
I need a write a script to post to an api I'm making use of and am just fretting over what the fuck to write it in or what the fuck the word means.

I search scripting language on wikipedia and it didn't make it super clear except it is a declaration lacking language.
>>
>>57894706
*how do i scrape network connections is what I meant

I want to get the Games link from it.
>>
>>57894605

Perform division by 2 on the number of items. Don't use integers, but instead, the decimal type.

The ceiling of this is the number of full price items purchased
The floor of this is the number of $1 items purchased.

https://msdn.microsoft.com/en-us/library/k7ycc7xh(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/1cz5da1c(v=vs.110).aspx
>>
File: +20b-combinations.png (23KB, 394x820px) Image search: [Google]
+20b-combinations.png
23KB, 394x820px
>>57892879
i wrote a function to generate completely random email verification codes because rich user experience.
>>
How would I write a script that makes a REST call to an api, then based on what it gets back post to another api?

I'm honestly super fucking confused as to how to approach this. I can write something that makes rest calls in java and do so, but I just need a script to do like one task that doesn't have to be part of anything bigger.

should I just use javascript and rhino?
>>
>>57894707
write in perl, anon. best general purpose scripting language desu.
>>
>>57894795
I ended up writing spaghetti but it works.

        If CInt(txtBoxQtyCustom.Text) > 1 And CInt(txtBoxQtyCustom.Text) Mod 2 = 0 Then
lblSaleThree.Visible = True
customTotal = ((CDbl(txtBoxQtyCustom.Text) / 2) * CDbl(lblCustomThree.Text)) + (CDbl(txtBoxQtyCustom.Text) / 2)
txtBoxTotalCustomeFreestyle.Text = customTotal
ElseIf CInt(txtBoxQtyCustom.Text) > 1 And CInt(txtBoxQtyCustom.Text) Mod 2 <> 0 Then
lblSaleThree.Visible = True
customTotal = (((CDbl(txtBoxQtyCustom.Text) + 1) / 2) * CDbl(lblCustomThree.Text)) + ((CDbl(txtBoxQtyCustom.Text) - 1) / 2)
txtBoxTotalCustomeFreestyle.Text = customTotal
Else
customTotal = CDbl(lblCustomThree.Text)
txtBoxTotalCustomeFreestyle.Text = customTotal
End If
>>
not strictly programming related, but working with 1GB of storage has been the worst experience of my life so far
>>
>>57894902
What do you program?
>>
>>57894902
64kb put men on the moon
>>
>>57894928
aids
>>57894938
everything modern is bloated. I can't get to a usable system with <550mb, and I can't get anything else I need installed on top of that
>>
>>57894945
>aids
I see.
>>
>>57894706
nvm i got it
>>
What are your thoughts on the _s family of c functions?
>>
File: 1479086973111.jpg (9KB, 400x400px)
1479086973111.jpg
9KB, 400x400px
I wish Go didn't have garbage collection

I would use it over C in a heartbeat if that were the case
>>
>>57894945
>sable system with <550mb
My server runs at around 50MB with vim open
>>
>>57894901

Looks gross. In C#, I'd do it like this:

using System;
using static System.Math;

public static class Pricing
{
public static decimal BogoPrice(decimal amount, decimal price)
{
var half = amount / 2;
var full_price = Ceiling(half);
var one_dollar = Floor(half);

return full_price * price + one_dollar;
}
}
>>
What should I use in C?
a{
}
or
a
{
}
>>
>>57895003
Hey, psst...Rust.
>>
>>57895019
Doesn't really matter, just stay consistent
>>
>>57895019
first
>>
>>57895019
both


void function(void)
{
puts("desu");
}

while (1) {
puts("senpai");
}
>>
File: 1479976666995.jpg (50KB, 1024x768px) Image search: [Google]
1479976666995.jpg
50KB, 1024x768px
>>57894603
>fputs
>>
>>57895024
Hey, psst... Get a standard.
>>
>>57895050

What's wrong with fputs? Anon wants to print to standard error, and has no need for formatted strings.
>>
File: 1481079297331.png (10KB, 406x398px) Image search: [Google]
1481079297331.png
10KB, 406x398px
>>57895075
>Ruby
>>
>>57894945
550MB is doable depending on what you consider "usable". for a lightweight headless server it can be adequate.
i try to keep a "small" root partition of 10-15 GB and a big chunk of that is used up by kernel source, repo lists, and locales i don't need. i wish there was a way to prevent them from getting built/installed all the time because it adds up to nearly 550M on its own since there are so many fucking languages in the world and the GIMP needs to know how to have a horrible UI in all of them.

>>57895016
he means storage, not RAM. I doubt you have a server that takes up 50MB of disk space, vim on it's own is about 25-30MB
>>
>boilerplate
>>
#include "studio.h"
>>
>>57893091
anonymous structs and unions.
>>
>>57895003
Why not do GOGC=off?
It's not ideal but you wouldn't normally use GC'd libraries in C I'm assuming so what's the issue with avoiding those in GO?
>>
>>57893091
stdbool.h :^)

On a more serious note, I can't wait for the threads library to become a thing
>>
Is Ruby still worth learning, or is it dying like perl?
>>
>>57895217
ruby is already dead pham
>>
>>57895019
This >>57895047 is the correct answer.
>>
>>57895217
ruby is for fags and socialjewish
>>
Trump should tweet about Oracle Corporation taking too much money to develop a shitty VM so it's stock crashes.
>>
public boolean killAllNiggers()
>>
>>57895261
{ return false; }
>>
>>57893778
Fucking retard.

int *array = malloc(1024 * 1024 * 1024);
>>
>>57894079
Try upgrading from 2mb of RAM.
>>
#define racism "not racism"
>>
>>57895302
this

>he fell for the finite ram meme
>>
File: 1480399648629.jpg (59KB, 728x410px) Image search: [Google]
1480399648629.jpg
59KB, 728x410px
Two questions:
1: How do I separate game logic from framerate? I'm tempted to make some sort of time-based event queue but that would be inefficient.
2: How do I wake up inside?
>>
>>57895217

If you're looking for a job with it... there's still a few Ruby jobs floating around if you're into webdev.

Otherwise, I'd personally recommend it if you want a scripting language that's fun and easy to use.
>>
>>57895261
I always make my variables something like that when following along with a tutorial or whatever
>>
>>57895319
>I'm tempted to make some sort of time-based event queue but that would be inefficient.
that's literally how all games work

use epoll
>>
>>57895319
1: http://gafferongames.com/game-physics/fix-your-timestep/
2: Can't wake up.
>>
>>57895017
Oh wow man that is clean as fuck.

Too bad I'm high now and it's due tomorrow so I saved and submitted it.
>>
>>57895330
epoll?
>>
So I'm writing a script via node js. If I make too make requests to the api I'm using (more than 1 per second), they're gonna ban my account. How the fuck do I slow this shit down?
>>
>>57893177
(unless condition (execute_c))
(progn (execute_a) (execute_b))
>>
>>57895369
stop using node.SJW
>>
>>57895385
man this is just what I know how to use

What's from with node js? Why is it SJW?
>>
>>57894485
ez pz, wtf, something challenging
>>
>>57894201
>Scheme, Haskell, and Prolog
>>
What do you Americans even learn in CS careers?
>>
>>57895426
essentially nothing
>>
>>57895355
linux only polling api for FDs
you create an epoll FD then add the FDs you want to be notified for when there's events and you epoll_wait on the epoll FD and you may be give events

>>57895369
what API?
>>
>>57895443
>what API?
api.ai
>>
>>57895393
They're just memeing don't take it seriously
>>
>>57895450
t. node.jew admin
>>
>>57895443
>using acronyms that are so short that a million other acronyms come up if you search for them
>using platform-specific instructions
I'm just gonna make it so that before every draw call it uses the time delta to decide how many physics iterations to do.
>>
Are there more of those "my code, my laptop and my drink" pics?
>>
What are the chances that I'll never have to use node.js?
>>
>>57895468
You should read: >>57895337
>>
>>57895492
Why?
I went to the end and it turns out it's what I just said.
>>
>>57895484
99%
>>
>>57895348

1. Think about the problem before writing code.
2. Do not overthink the problem; all programs are just mappings from input to output. Sometimes you have multiple inputs. Sometimes you have multiple outputs. Sometimes the inputs do not all come at the beginning of the program's run (events). Sometimes the outputs do not all come at the end of the program's run (mutable state). But the zen is always this: Know what your input should look like, know what your output should look like, and the way from one to the other will become clear.

>>57895369

Sleep between requests. Your CPU could use a break to do other things anyways.
>>
>>57892879
How does /g/ learn new programming languages?
>>
>>57895464
Give me one legitimate complaint or you're a memer. You wouldn't want to be a memer would you?
>>
>>57894492
are you a troll, you can't implement foldl with foldr because of order of evaluation
>>57894485
folder _ acc []     = acc
folder f acc (x:xs) = f x (folder f acc xs)

foreach f = folder (\x acc -> f x : acc) []

filtra p = folder (\x acc -> if p x then x:acc else acc) []
>>
>>57895567
Mindlessly doing tutorials I don't understand. Eventually it clicks.
>>
>>57895567
Copy-paste from stackoverflow until I memorize everything
>>
>>57895468
This is the babby stage of engine development.

You should have a graphics thread that executes your drawcalls and waits for vsync. This is easy to implement these days and has been pretty much standard since the Trinity engine.
>>
>>57895567
Read the standard and the defacto book.
>>
>>57895577
https://wiki.haskell.org/Foldl_as_foldr
>>
File: node.sjew.png (2KB, 278x20px)
node.sjew.png
2KB, 278x20px
>>57895572
fuck off nodekike

node is run by socialjewish
>>
>>57895650
Well that is pretty gay. Still gonna use it though.
>>
>>57895650
I recognise that Code of Conduct

>Rust
>>
>>57895509
For clarification you want to read all the articles in the series (or at least the first two).
>>
>>57895567
Read a decent book on it and write some shit. Not necessarily in that order.
>>
>>57895750
Weird, I write a decent book and read some shit.
>>
>>57893841
reddit
>>
File: image.gif (851KB, 951x534px) Image search: [Google]
image.gif
851KB, 951x534px
>>57892879
A while ago one of you fags posted this in here
def sqrt(x):
def find(good, improve, guess, target):
if good(guess, target):
return guess
return find(good, improve, improve(guess, target), target)
return find(lambda x,y:abs(x*x-y)<1e-9, lambda x,y:(y/x+x)/2, 1, x)

Tonight, I decided to rewrite it in Haskell and it only took four levels of black magic. I initially expected worse... I also then made my own version.
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverlappingInstances #-}
import GHC.Float (double2Float,float2Double)
import qualified Prelude as Pre
import Prelude hiding (Real,sqrt)
import Debug.Trace
probe val = trace (show val) val

sqrtf :: (Real a) => a -> Float
sqrtf = Pre.sqrt.toFloat
sqrtd :: (Real a) => a -> Double
sqrtd = Pre.sqrt.toDouble

class Pre.Real a => Real a where
toFloat :: a -> Float
toDouble :: a -> Double
instance (Pre.Real a, Integral a) => Real a where toDouble = fromIntegral; toFloat = fromIntegral
instance Real Rational where toDouble = fromRational; toFloat = fromRational
instance Real Double where toFloat = double2Float; toDouble = id
instance Real Float where toDouble = float2Double; toFloat = id

sqrt :: (Real a) => a -> Double
sqrt = (find (\x y -> (abs $ x*x-y) < 1e-4) (\x y -> (y/x+x)/2) 1).toDouble where
find good improve guess target = if good guess target then guess
else find good improve (improve guess target) target

sqrt' :: (Real a) => a -> Double
sqrt' = (iter 1.2 0).toDouble where
iter x x1 y = if good x x1 y then x
else iter (improve x y) x y
improve x y = (y/x+x)/2
good x x1 y = match (show x) (show x1) 0 > 12 || (abs $ x*x-y) < 1e-8
match (x:xs) (y:ys) n = if x == y then if length xs > 0 && length ys > 0
then match xs ys n+1 else n+1 else n

It seems the more stupid stuff I do in Haskell, the more I enjoy it.
>>
File: 813527923.png (660KB, 1280x720px) Image search: [Google]
813527923.png
660KB, 1280x720px
>>57895819
>find good improve guess target = if good guess target then guess
>>
File: 1481148162610.jpg (59KB, 554x197px) Image search: [Google]
1481148162610.jpg
59KB, 554x197px
How do i extract description, price and title from pic related using xpath and list link that's in the same li class as stuff that i searched for? I use c#
>>
>>57895833
you can't
>>
>>57895819
>haskell is concise
>>
>>57895844
Why is that? I can find title already and display it in console, i just need the correct xpath selections to match title with href
>>
What do you use haskell for, other than fizzbuzz/algorithms from books?
>>
>>57895864
we don't have the technology yet
>>
>>57895868
>other than fizzbuzz
Damn you got me there
>>
>>57895880
Oiii matey, i'll glass you
>>
>>57895882
Oh
>>
File: abo.jpg (58KB, 620x387px) Image search: [Google]
abo.jpg
58KB, 620x387px
>>57895847
Well, the python implementation accepted all real numbers, and I wanted the Haskell version to do that as well, so I first had to bastardize the Real typeclass...

After that, if you just look at just the sqrt function, it is about the same length as the python version.
>>
>>57895819
I don't understand what all of that is for
What's wrong with just



find good improve guess target | good guess target = guess
| otherwise = find good improve (improve guess target) target

sqrt x = find (\x y -> abs (x*x - y) < 1e-9)
(\x y -> (y/x+x)/2)
1
x
>>
I'm starting on a networked game project. I was wondering, when sending a packet from the server to a client about, say, an entity having moved, how would the client identify the entity?
Of course each entity would have a unique id of some kind, at the moment it's an unsigned integer in my systsem. But when the packet arrives, I have to find the entity of the correct UID quickly from the world entity array. What strategy would be best suited for finding the entitity? A hash table type thing, maybe? A scene can have thousands of entities at a time, so iterating through all of them when a packet arrives to find the one with the correct UID is not really viable.
>>
>>57895911
i probably should've lowered the guards a bit
>>
>>57895911
And that's for any fractional, which is more general than real
>>
>>57895319
It's not very easy.
https://www.youtube.com/watch?v=fdAOPHgW7qM
>>
>>57895912
is simply an array of entity pointers practical for you? then an entity id would be the array index
>>
File: 1481181018372.png (64KB, 235x235px) Image search: [Google]
1481181018372.png
64KB, 235x235px
>>57895911
Check the type...
sqrt :: (Ord a, Fractional a) => a -> a
>Fractional
The python version is implemented for all real numbers.
>>
>>57895952
It works for anything you can divide with.
That's what it should be, surely
>>
>>57895952
>>57895960
in fact Haskell's Real has toRational

so

sqrt . toRational
>>
File: darwin.jpg (169KB, 663x858px)
darwin.jpg
169KB, 663x858px
>>57895939
>fractional, which is more general than real
* No instance for (Fractional Integer)
* No instance for (Fractional Int)
>>
>>57895972
Sorry, I misinterpreted real at first.
I thought it meant approximately representing reals, not approximating to rational
Still >>57895968
>>
>>57895948
Not really since entities get deleted and added as the game goes on (bullets and what not), so the indices change all the time. The UID is what remains unique. And if it was the index, that would require the array order being the same on the server and the client, which is difficult to achieve and doesn't really suit the architecture.
>>
File: corgi4.jpg (45KB, 617x424px) Image search: [Google]
corgi4.jpg
45KB, 617x424px
>>57895968
Yep, that would work. Danke
find good improve guess target | good guess target = guess
| otherwise = find good improve (improve guess target) target

sqrt'' x = fromRational $ find (\x y -> abs (x*x - y) < 1e-9)
(\x y -> (y/x+x)/2)
1
$ toRational x
>>
>>57896043
fromRational is limited to fractions, but I guess using something similar you could do

class Real a => FromReal a where
fromReal :: Rational -> Maybe a
>>
File: 1459110191413.jpg (24KB, 547x459px) Image search: [Google]
1459110191413.jpg
24KB, 547x459px
>>57896057
fromRational there is fine
the Python function's signature is
:: (Real a, Fractional b) => a -> b

and so is your version's
>>
Wheres a good site to get decent remote programming jobs? All freelancing sites are filled with pajeets and idiots who don`t know the scale of what theyre asking for. I love my technical computing but will do web dev if it puts food on the table...
>>
>>57896131
You should try that ai contest website with bitcoin bets and stuff. I don't remember its name tho
>>
>>57895833
Help pls
>>
>>57896250
Get some parsing module, pull out the <li> elements by class first. Then for each, pull out the <a> href, the span interior, the final div, then from each span in that div pull out the interior. Done.
>>
I want a source version control system which constantly checks for file modifications and automatically creates a new version when any file is changed/deleted/created.
>>
>>57896299
I'm using HTML agility pack that does the job but i have no clue how to write the correct xpath, so far i have this

var items = 
from itemsOnPage
in document.DocumentNode.SelectNodes($"[text()[contains(., '{title}')]]")
select new { Description = itemsOnPage.InnerText };

foreach (var item in items)
{
Console.WriteLine(item);
}

Console.ReadLine();


It show title, but i can't find how to search and display all 3 criteria
>>
>>57895868
you can make real programs like xmonad (1000LOC, other equivalents are like 5000LOC+)
>>
>>57896349
li[contains(@class, 'Insert the li class name here')]

http://stackoverflow.com/questions/1604471/how-can-i-find-an-element-by-css-class-with-xpath
>>
>>57896349
>>57896409
XmlNodeList items = doc.DocumentElement.SelectNodes("li[contains(@class, 'Insert the li class name here')");
foreach (XmlNode item in items)
{
//continue here, avoid one liners
Console.WriteLine(item);
}
>>
>>57896489
this would make sense but my li classes don't have names, look at >>57895833

I need xpath to check every li class, see if it contains selected title, price and description and return href from that class if it does contain everything
>>
>>57896502
Okay, use xpath to select all top level <li>. Then just throw a try statement in the foreach loop, if it has everything, great, you can now append the item you parsed to a list of products. If not, it fails on that item then goes to the next.
>>
WE NEED A NEW THREAD
>>
>>57896629
>hahaha look i posted it again xd
>its not even at the bump limit guys lol
>>
>>57896629
Are you a timer traveller or something?
>>
>>57894079
kys pls
>>
File: fragzeichen.jpg (91KB, 1280x720px)
fragzeichen.jpg
91KB, 1280x720px
Considering how C programs have literally killed people with buffer overflows and race conditions, don't you think there should be some kind of moratorium on development in that language? Like in order to pass federal safety standards, a product cannot contain any C code. Seems fair no?
>>
I'm trying to print the return value of a function, it will return a char pointer so it should be ok but I get the warning
"format '%s' expects argument of type 'char *', but argument 2 has type 'int'"
/* Show all the todo items on the screen */
void showTodoItems( TodoItem todolist[], int nrOfExistingItems )
{
char showTodo[MAXLINESIZE];
for(int i = 0; i<nrOfExistingItems; i++)
{
int x
printf("%s", *formatTodoItem(todolist[i], showTodo));// Warning
}
}
Here is char *formatTodoItem, it should work and return a char pointer that could be used in printf.
char *formatTodoItem( TodoItem todo, char *s )
{

sprintf(s,"%d %d-%d-%d %s", todo.id, todo.due.year, todo.due.month, todo.due.day,
todo.description);
return s;
}
>>
>>57897301
nvm that int x lol
>>
>>57897296
Do this >>57897292
>>
>>57897296
C can be perfectly safe, provided that it is tested enough.
It's when your code relies on an int overflows and you change the underlying hardware without testing your shit that rockets start blowing up.
>>
>>57897296
>federal safety standards for programming
helicopter yourself
>>
>>57897334
You do realize they're inevitable?

Just wait until an Internet of Shit botnet takes down some hospital's life support system or something. Sooner or later there will be enforced security standards for anything put onto the market.
>>
>>57897346
lets just hope a virus that kills all left wingers gets """""accidentally""""" released into the water supply of most countries before that happens.
>>
>>57897370
>I like it when code sucks and people die because of it

Libertarianism is sugoi
>>
>>57897378
>implying i'm a libertarian
that wouldn't be consistent with believing that left wingers need to be shot on sight. by state force or not doesn't really matter as far as i'm concerned.
>implying your standards will actually protect someone
nice one.
>>
>>57897296
You can write terrible code in any language.
>>
>>57897301
In showTodoItems, in the printf, why does using '*' do to the second argument?
>>
>>57897397
s/why/what/
>>
>>57897395
thus reinforcing the need for federal-level standards
>>
>>57895819
Reconsider your choice of using Haskell...
>>57897395
>>
>>57897397
>>57897301
You've pointed out exactly what's wrong with his code.
The * dereferences the char pointer, making it a char.
That is then promoted to an int, so that's why the compiler is complaining about ints in particular.

Remove the *
>>
>>57897422
>You've pointed out exactly what's wrong with his code.
I know Anon. I wanted him to explain to me what in does because I believe making him explain his code is the best way to help him learn what's wrong with it.
>>
>>57892879
Only the most inefficient way of classifying data, nested if statements....
>>
>>57897296

So... all operating systems are banned by default and we have to make new ones from scratch in Ada or Rust?
>>
Finally found a good article that distinguishes well between OOP and procedural programming.
http://blog.ircmaxell.com/2012/07/oop-vs-procedural-code.html?m=1
Maybe the arguments will stop now.
>>
What would be the best language for imitating viruses? I'm talking real world viruses.
>>
>>57897459
Legacy software would be grandfathered, but there would be stringent standards moving forward.

You laugh now, but 100 years from now I guarantee you this will be the case.
>>
>>57897486
Imitating meaning what? Just getting caught by anti-virus programs?
I'd say any relatively low level language will do.
>>
File: 1480290654058.jpg (35KB, 376x395px) Image search: [Google]
1480290654058.jpg
35KB, 376x395px
>>57897459
yes

rustfags and other hipsters realize the only way people will use their shitty meme languages is if it is mandated by law
>>
>>57897501
No. I need to imitate a virus before I can recreate it in the real world with the help of a few virologists.
I need to develop a targeting mechanism which can detect the political orientation of anyone the virus infects.
>>
>>57897346

Maybe there will, but they won't and can't bar C or C++ from usage. A large percentage of our infrastructure relies on C code. All of our network code. All of our cryptography code. All of our operating systems and drivers for those operating systems. Despite Microsoft's hard-on for C++, Windows is written in ANSI C, and drivers are too. The reference interpreters for Ruby, Python, and a number of other language interpreters are written in C. The CLR, JVM, and Node V8 engines are written in C++, and they all do a lot of "unsafe" low level operations. And code that runs on any of these interpreters automatically has a dependency on C code.

>>57897486

I'm assuming biological viruses? I'd guess you'd probably use the same languages you might use in a protein folding simulator. GROMACS, a chemical simulator library used in folding@home, is written C and C++. I would recommend a language with high performance for this job if you are trying to simulate viruses for research.

>>57897498

Consider the following:

If there is a blacklist on languages available for use, programmers will develop supersets of the banned languages, call them something else, and call it good. Can't use C? Well, we'll just change the file extension from .c to .m. As it turns out, Objective-C is a strict superset of C, and it also happens to not be called C.

If there is a whitelist on languages available for use, programming language research will screech to a halt, and academia will throw a shit fit. I will likely be among them, since once of the main topics I am considering studying for my PhD is compilers.
>>
>>57897524
what does "imitate a virus" mean? How can you imitate a virus without actually being a virus?
>>
>>57897592
Yes. Thanks mate. I think it will be ready within 6 to 7 months. I hope they don't get to implement their regulations before this happens. Wouldn't matter either way though since I have brilliant people working with me.
>>
>>57897598
Simulating various "versions" of it for research purposes.
>>
File: We_get_it.jpg (8KB, 236x214px) Image search: [Google]
We_get_it.jpg
8KB, 236x214px
>>57893975
>>
>>57897627
so make a real virus, and run it on a network of VM's with no internet access maybe?
>>
>>57897655
I'm not talking about a computer virus. I'm talking about researching a simulation which will then be made into a real life virus.
>>
>>57897672
>simulate
you keep using that word etc etc..
>>
>>57897699
Do you know what a simulation is? I want to run it as a computer program. Which the frameworks above will help me do.
I have a team of virologists so they will deal with the biological side of things.
>>
>>57897721
>I want to run it as a computer program.
I virus is a computer program.

>I have a team of virologists so they will deal with the biological side of things.
You mean you want to simulate a real biological virus on a computer?
>>
>>57893826

var a = ["top", "kek", "lel", "asd"];
var b = ["lel", "kek", "top", "asd"];

for(var i = 0; i < a.length; i++) {
if(a[i] == b[i]) {
//do something
}
}
>>
File: 3.jpg (191KB, 1200x1200px)
3.jpg
191KB, 1200x1200px
Capy!
>>
I'm feeling nostalgic and what to make DOS games again. How would you do this? I had Turbo Pascal before, but I'd rather use C++ or even C.
>>
>>57897756
Yeah, but that term originally came to CS from biology.
Yes.
>>
>>57897788
>Yeah, but that term originally came to CS from biology.
no fucking shit, but if you use term "virus" on a programming thread the context is going to suggest you mean computer virus.

You can't simulate a biological virus on a computer in anything but the simplest of ways. That shit requires way too much power to usefully simulate.

What aspects do you want to simulate?
>>
>>57897803
I've explicitly and implicitly stated the biological nature of it though.
The most important part is the targeting mechanism (don't know the proper biological terms) which will detect whether or not to release the malicious changes. it depends on one factor, the political orientation of the carrier. if the test fails the virus self destroys and no harm is caused.
>>
why is there always an anime girl as a the OP image of these threads?
>>
>>57896337
Anything similar exists?
>>
>>57897842
>it depends on one factor, the political orientation of the carrier.
you want to create a biological virus that can detect the political orientation of the carrier?

Are you high? No anon, you can't do that.
>>
>>57897844
because they are very good and cute
>>
>>57897855
>you want to create a biological virus that can detect the political orientation of the carrier?
Yeah.
>Are you high?
No.
>No anon, you can't do that.
Why not? I've discussed it with a bunch of people and I think we can come up with a model that successfully predicts whether or not a person is left wing. Of course there will be errors, but they won't be statistically significant and i think the end result is totally worth it.
>>
Virus used to attach to files. Believe it or not, they could just append code into an existing executable.

How can I program in DOS? Should I use DOSBOX and run old IDE there?
>>
File: GldCAQc.jpg (142KB, 600x871px) Image search: [Google]
GldCAQc.jpg
142KB, 600x871px
>>57897844
It's just science, anon.
>>
>>57893091
atomic_flag and the C++ memory model
>>
>>57897900
>Why not?
because biological virus can't be engineered with anything remotely that sophisticated. All you can do is swap out a few genes here and there and test see does it still work.
>>
>>57897902
>they could just append code into an existing executable
You can still do that in some cases.

What are you even trying to do?
>>
>>57897902
>Virus used to attach to files. Believe it or not, they could just append code into an existing executable.
That's the definition of a virus, yes. You can still do that today, you know.
>>
>>57897915
But leftism is linked with severe mental illness, detachment from reality, hormonal and various neurotransmitter imbalances.
I think it would be fairly easy to scan for that and then "execute" the code that needs to be executed.
>>
>>57897900
>>57897915
In the case of a computer virus, it would be pretty easy to figure out if a given user is left wing based on what they write and even what they talk about around their computer.

Obviously, you'd need the virus in question to essentially have total control of their machine, because it would need to access their microphone, keylog credentials and use the creds to connect to an API to pull their raw post data and then you could run that through whatever libraries you create to analyze within a margin of error whether or not they are "leftist".

At that point, if the "if" statement is true, you wreak havoc as normal.
>>
>>57897951
A computer virus won't physically remove them from this reality which is the effect I'm looking for.
I need to write something that operates in our world, it will be basically the same thing as a computer virus which test a bunch of thing then does what must be done if the final if statement if true.
It could actually attach itself to the vocal cords to analyze speech patters but I am assuming that would require a lot more work. I don't think someone as simple as a virus is capable of this, could be wrong though since this isn't my field.
>>
>>57897975
I hope you are trolling or trying to make some shitty joke, because otherwise you are insane.
>>
>>57897975
something* lmao
But yeah. If anyone has any other suggestions for protein folding simulations etc, please point me to them.
>>
>>57897975
Yeah, now you're just being autistic.

Feel free to go to >>>/sci/ or something to discuss further, because this isn't programming.

I even tried to help you make it programming related, but it turns out you're a sperg.
>>
>>57897986
In what way does this even remotely resemble a joke?
>>57897994
This is programming though, I need to run a lot of simulations on viruses, protein folding and stuff of that nature so I'm looking for good libraries that do this.
Something on parasites would be good too if we decide to pick that route.
>Feel free to go to >>>/sci/
The /sci/ part would be handled by other people working with me.
>>
>>57897975
t. 12 year old polack
>>
>>57898044
I don't visit /pol/ and I don't break rules about the minimum age on this site.
>>
>>57897919
I used to make simple ASCII RPGs back in the day. Didn't know it was a thing until I got to the internet (rogue). I know you could just make games normally using modern tools, and just replicate the pixel size and screen resolution. But it doesn't feel the same way as an authentic DOS program. Maybe I'm just trying to relive the long lost past.
>>
>>57898051
Of course, sweetie. Please, keep telling me about your plans to create a pathogen that targets people who disagree with you, it's entertaining.
>>
>>57898052
Why don't you download Nethack and see how many decades of trying it takes you to ascend?
Should keep you busy for a while.
>>
>>57898081
who are you to say I won't be the first test subject?
>>
>>57898093
Not him but I ascended with around 2 years of experience (valkyrie but still)
>>
>>57898096
I'm someone who can recognize people who have no fucking clue what they're talking about.

You're either a misguided kid, or mentally challenged.
>>
>>57897902
> DOS
> viruses
> IDE
You can stop right now.
>>
>>57898119
Seems like your recognition skills failed you this time, honey
>>
>>57898134
You know "IDE" means things other than "thing I think I'm supposed to hate", right?
>>
All trends seem to be moving into deep learning and stuff like that but I'm not smart enough for that and I don't know enough math

I started with webdev, then moved to Java (did a MOOC), then to C#, now I made a game in C# /Unity

but nobody's gonna hire me if I only show a game in my github

Any advice what's a good way to get a job in any related field, what should I focus on? I'm in Europe

where are the job trends going?
>>
New thread:

>>57898154
>>57898154
>>57898154
>>
>>57898138
You seem to think just having an idea is enough to start a project.
That's not how it works, dear.

There are people with much more money and talent than you, people who have an education and a track record of success, who will tell you that the state of the art in biology is nowhere near your little fantasy virus.

Never mind the fact that you'll probably have forgotten all about this in a week, the mere fact that you talk about living organisms as if they were a computer architecture, shows that you're so ignorant you don't know how ignorant you are.
>>
>>57897975
Anon you're really reaching far into future tech when you're looking to target people with specific beliefs.
The most reasonable approach would probably be to have nanomachines that replicate and have a destructive behaviour when receiving a specific signal. Something you'd broadcast in places where these problematic people congregate.

But even so that's extremely hard to do and is still very far ahead of our time.

And I don't see how a person who's asking for what programming language suits a simulation task can possibly even begin to make headway.

If you want to exercise anti-democratic behaviour against your political opponents just infect them with malware and frame them for crime. Have them download CP. Put incriminating evidence in their browser histories and then make the police aware somehow. It won't kill most of them but it's certainly severely harming them.

You're a fucking asshole either way.
>>
>>57898160
Those statements are contradictory. Wanting to learn DOS viruses makes one think that the purpose is to learn how things realy work. Using IDE on the other hand is usually all about "just make it work and dont give a fuck ever again".

If you want to learn you better off without any sort of ide. If you want to do cool stuff like all those leet hakzors do and be edgy then help youself.
>>
>>57898202
yeah sure, didn't even read your shitpost, hun.
>>57898209
Nanomachines are a solution too. You would still have to program them with the ability to scan various biological parameters.
The best thing would be speech pattern analysis. You just need a few days to gather enough data before finally making the decision. Of course you would need something to manually and remotely override false negatives.
>But even so that's extremely hard to do and is still very far ahead of our time.
Why do you think so? We already have test which measure the levels of various hormones and neurotransmitters in your body.
>If you want to exercise anti-democratic behaviour against your political opponents just infect them with malware and frame them for crime. Have them download CP. Put incriminating evidence in their browser histories and then make the police aware somehow.
That is against my morality. I want a fast end for them and a scary reminder for everyone else.
>It won't kill most of them but it's certainly severely harming them.
You don't get who I'm up against. They can't be dealt with in this manner. You could literally frame 80% of them and it wouldn't change much.
>You're a fucking asshole either way.
Why is that?
>>
>>57898254
>yeah sure, didn't even read your shitpost, hun.
What a surprise, the guy who thinks he can kill people for having different opinion ignores criticism.

Just keep going, you're entertaining ^__^
>>
>>57898214
An IDE has tools that show you the underlying mechanics, you dumb fucking faggot.

For example, if you're using a language that isn't assembly, you can use a feature of your IDE to show you the generated assembly that your code is creating, which helps you learn how it "really works" so you can optimize.

An IDE isn't about hiding things; it's about giving you more tools and information on the task at hand.
>>
>>57898271
Just consider it hunting.
I don't think there's anything morally wrong with mass slaughter of animals
And an animal can't possibly have an opinion.
>>
>>57898254
>why is it hard
Because you're looking for something that's not just a poison. You're looking for a disease you can trigger remotely. It's a way more difficult problem.
>that's against my morality
I think you should reconsider when you've justified murder but can't put people in jail.
>speech pattern analysis
How? Just how the fuck would you get a microphone into the picture? You didn't think about this for 1 second anon.
>biological parameters
I don't know who you're targeting but if you could understand your opponents political beliefs from their biometric data you have far better means of dealing with them without even breaking the law.

>why am I an asshole?
Because you're aiming to harm people without giving them a chance to respond or regret their actions.
In the hypothetical scenario where I'd agree that they should die you would still have to give them a trial of sorts. Inform them of why they're bad and find a solution.
This board is not for philosophy though. So this discussion can fuck right off. You don't know enough to participate here. Just leave. Learn a language, C is easy and does a lot. Medical simulation is often complicated and performance intensive so it's suitable.
>>
>>57898310
Wow, so edgy. Calm down, emo duck.

Good news is you're probably just an angsty teen then, instead of a clinically retarded adult.
>>
>>57898287
> implying you will ever look at underlying mechanics when IDE allows you to do new virus.hack_all_that_shit_for_me(shit);
IDE and high level languages is all about convenience. DOS viruses not in assembly? Srsly? What are you gonna make them in? Node.JS?
>>
>>57898323
>Because you're looking for something that's not just a poison. You're looking for a disease you can trigger remotely. It's a way more difficult problem.
It's more like a cure to be honest. For them and for this planet.
>I think you should reconsider when you've justified murder but can't put people in jail.
Putting them in jail using the methods you've described could possibly ruin innocent people's lives, like their families for example. I would like to avoid that if it means I can still accomplish my goal. I also don't want for them to be able to live off other people while being in jail.
>How? Just how the fuck would you get a microphone into the picture? You didn't think about this for 1 second anon.
No need for a microscope. Some nanomachines could attach themselves to the vocal cords and read the vibrations. The vibrations then get translated to something that can be translated into words.
>I don't know who you're targeting
I am targeting left wingers of all stripes. Socialists and their kind would be the first to pass the test though.
>but if you could understand your opponents political beliefs from their biometric data you have far better means of dealing with them without even breaking the law.
How is that? that's interesting. And why would it be breaking the law? In the worst case scenario I would break some kind of hunting regulations
>Because you're aiming to harm people without giving them a chance to respond or regret their actions.
I've already accounted for this with the simple fact that they cannot possibly regret their actions. I doubt they are even concussions. They have literally no excuse for being left wing when they have access to such quantities of information (the internet)
>In the hypothetical scenario where I'd agree that they should die you would still have to give them a trial of sorts.
Already did a few attempts at establishing a rational conversation with them. Turns out they simply don't have the faculties to do so
>>
>>57898323
>Inform them of why they're bad and find a solution.
The only solution would be physically reverting their brain to how it was prior to their infection.
This of course assumes the disease isn't genetic.
The only other solution is what I have already proposed. Seems like the most effective way of dealing with it once and for all. Of course every single person would have to be a permanent carrier since the threat of them reinfecting our planet is pretty high.
>This board is not for philosophy though. So this discussion can fuck right off.
this thread is about programming so we can discuss the philosophy of programming.
>Learn a language, C is easy and does a lot. Medical simulation is often complicated and performance intensive so it's suitable.
Yeah that's what I'm looking into as we speak
>>
>>57898402
conscious*
Do you have any more details on nanomachines by the way? That's even better than viruses.
>>
>>57895092
the problem is that I need to install libraries onto there that I have to build from source, and I can't cross compile all of them because I need to do a lot of work to link against Musl. just getting a C toolchain on there and some minimal utils fills up the entire drive. I might be able to set up a VM of Alpine and cross compile everything, but that's a lot of fucking work
>>
>>57893999
>calls people tripfags
Woah look whos talking
Thread posts: 330
Thread images: 31


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.