[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: 323
Thread images: 39

File: trap programmer lmao.jpg (130KB, 652x592px) Image search: [Google]
trap programmer lmao.jpg
130KB, 652x592px
old thread: >>61594070

What are you working on, /g/?
>>
First for Go
>>
>>61599590
Nothing. Programming is for faggots.
>>
>>61599590
>XKDC
>Literal fag agenda
>Created while the old thread is still on page 1
Delete this thread and fuck off
>>
File: aoba code monkey.jpg (174KB, 1280x720px) Image search: [Google]
aoba code monkey.jpg
174KB, 1280x720px
What's the proper way to write a backend for your website?
Does it act like a daemon and handle all HTTP requests, or do you hand it off to something like ngnix?
>>
>>61599613
>dyslexia
lol
>>
>>61599631
They act like a daemon. nginx runs as a daemon by default.

And yes, you almost always pass it off to something because you're not trying to reinvent the wheel.
>>
>>61599590
Minecraft clone. Making it multithreaded.

Already added fences and mutexes to the rendering data. Right now I'm trying to boil my draw calls down to thunks by adding global state and thread-safe setters for that state. Yuck! After I sully my code like that I can just move the draw calls to a new renderer thread which will be able to run even if the main thread lags, or visa versa.
>>
>>61599697
In Java?
>>
>>61599590
Who's sparky?
All I can find is he's some weeb tripfag who last posted 5 years ago.
>>
spargy...
>>
File: advanced-collision-detection.webm (993KB, 800x608px) Image search: [Google]
advanced-collision-detection.webm
993KB, 800x608px
>>61599800
Oh god no. The rendering code is in C and the game logic is in Scheme.

Pic is latest video I made for /dpt/. Everything I'm doing right now can't be condensed to exciting demo videos sadly.
>>
What the heck is going on here?

I'm the anon that was writing a ".txt"-> .csv file in Python (code below), and for some reason, the ".csv" file in excel has a ton of "#" marks (although when I go over the cell, there's a number, see pic)

def convert_array_to_excel_file(data_arr, file_array):
folder_str = file_array[0]
files = file_array[1:] #resize array to make it easier to work with

for ind in xrange(len(files)):
files[ind] = files[ind][:len(files[ind])- 4] #remove '.txt'
print "FILENAME: ", files[ind]

print "TYPE = ", type(data_arr)

num_rows = data_arr.shape[1]
num_cols = data_arr.shape[2]

for arr_ind in xrange(data_arr.shape[0]): #Once per each file processed
f = open(files[arr_ind] + ".csv", 'w')
arr = data_arr[arr_ind]
wb = Workbook()

ws = wb.create_sheet()
#iterate through all values in each text file and place them in
# a worksheet
for curr_row in xrange(num_rows):
for curr_col in xrange(num_cols):
f.write(str(arr[curr_row][curr_col]))
f.write(",\t")
f.write("\n")

f.close()
>>
>>61599863
What does the csv file look like? Open it up in notepad and show us.
>>
>>61599863
f.write(",\t")

Should almost certainly be
f.write(",")

Spaces and tabs are meaningful in csv files.
0, 2

is different from

0,2
>>
>>61599852

Scheme is too powerful.
>>
>>61599590

an interpreted language with lisp syntax out of some code from a failed project of mine so I can use it as a calculator for base -1+i numbers and hopefully build some intuition
>>
>>61599852

you should be making fractals with that voxel engine you have there
>>
>>61599885
See pic related,
(pastebin for more info)

>>61599903
My bad. There *was* originally a comma there

https://pastebin.com/s2ud0Bjt

the picture below is what the file looks like when I plot it in matlab (using csvread)
https://imgur.com/a/q9Qh1
>>
>>61599957

The pound signs are an excel issue, the data is fine. Look it up and change the cell formatting.
>>
>>61599957
I think you're not supposed to have that final comma on the end. Other than that not sure.

Also looking at your code it looks like you're transposing your data. Every line of a csv file is a row in excel. So swap your for loops if that bothers you.
>>
>>61599957
>the width of the cell is too small for the contents.
t. google.
>>
Does anyone use the Telerik UI framework? I have to use this shit at work, oh god it's awful. Hold me /g/, I just want to use ExtJS again ;_;
>>
>>61599951
It's pretty good desu. Makes fucking around with things like collision detection a breeze.

Right now I'm engaging in C stupidity though. Going to find out hopefully soon whether rolling my own implementation of mutexes was a mistake:
void static inline control_request(bool _Atomic volatile * lock) {
missed:
while(atomic_load(lock));
if(atomic_exchange(lock))
goto missed;
}

void static inline control_release(bool _Atomic volatile * lock) {
atomic_store(lock);
}


>>61599956
The terrain is a fractal though. It's pink noise.
>>
>>61600077
>rolling my own implementation of mutexes

But.. why?
>>
tbqh there's not really any reason not to use emacs
>>
>>61600077
>rolling my own implementation of mutexes
>was a mistake
yep
>>
>>61600077

you call that a fractal?
>>
>>61600090
Because it's more fun to learn that way. I didn't really know how that stuff worked until I wrote what I think are my own. There's technically a slight speed boost that I'm using to justify my stupidity. Mutexes are opaque types in most libraries because they predate c11, so with this there's less indirection and therefore less lookups. And considering that there's going to be around 512 mutexes per scene all those cache misses add up :^).

Also fucked up yanking out my mutex code:
void static inline control_request(bool _Atomic volatile * lock) {
missed:
while(atomic_load(lock));
if(atomic_exchange(lock), true);
goto missed;
}

void static inline control_release(bool _Atomic volatile * lock) {
atomic_store(lock, false);
}
>>
File: Refk2Ni.png (362KB, 837x390px) Image search: [Google]
Refk2Ni.png
362KB, 837x390px
>>61599590
idek whats what anymore

def datasetToGroups(ds, groupby=None, select=None, orderby=None, *args):
groups = {}
cnames = list(ds.columnNames)
select = select if select else cnames
grpindices = [ds.getColumnIndex(cn) for cn in (
groupby if groupby else cnames
)]
for rndx in xrange(ds.rowCount):
row = tuple(ds.getValueAt(rndx, cn) for cn in select)
groupkey = tuple([row[grpndx] for grpndx in grpindices])
if groupkey in groups:
grouprow = groups[groupkey]
for i, value in enumerate(row):
grouprow[i].append(value)
else:
groups[groupkey] = [[value] for value in row]

if orderby:
ordered = []
for grouprow in groups.values():
orderArgs = tuple(
grouprow[select.index(arg)] for arg in args
if arg in select
)
orderkey = (orderby(*orderArgs),)
ordered.append([orderkey, grouprow])
ordered.sort(reverse=True)
retv = [group[-1] for group in ordered]
else:
retv = groups.values()

return retv
>>
>>61600140

I guess marginal performance gains are a good reason.
>>
>>61600116
Pink noise technically is a fractal.

>>61600201
The best reason is learning though.
>>
>>61599590
If you read XFCE you're a faggot.
>>
>>61600286
indeed openbox master race.
>>
>>61599590
WTF is /G/?
>>
>>61600140
>if(atomic_exchange(lock), true);
Fuck. Of course i make a million errors when trying to yank out my inline but working code into a function. Should be:
>if(atomic_exchange(lock, true))

Why the hell is it valid syntax to put a colon on an if statement anyway? Why would that ever be useful?

Also, do any anons know why I have a while busyloop, and do those anons know why lock is marked as volatile?
>>
>>61599668
b-b-but i want to reinvent the wheel. it's fun.
>>
>>61600212
>the best reason is learning

you're god damn right anon
>>
File: hourly update.png (644KB, 1444x4787px) Image search: [Google]
hourly update.png
644KB, 1444x4787px
Well, it looks like an imposter was pretending to be me:

>>61585839
>>61585909
>>61585945

You guys need to step up the game next time.

To clarify:
1) There is indeed an IQ impact to the genetics system. There's 5 alleles as per the chart shown that impact skin tone. This is not necesasarily race, as each Gene Pool (ie African, Mediteranian-European, Nordic-European, East-Asian, etc) is simply a set of probabilities for each gene to have the recessive vs positive alleles.

And since I've released the source code each time I put out a demo, you'd have been able to go in and see that some of those 5 genes have the dominant (darker skin) allele have a genetic intelligence reduction, among other things.

Plus I just went and manually set a whore gene (increased libido) and a dumb gene (just made up BS) to have higher probabilities in certain gene pools (African, Hispanic).

In other news, I do plan on releasing a new demo sometime this year.
>>
File: no vajayjay allowed on the jay.gif (648KB, 489x377px) Image search: [Google]
no vajayjay allowed on the jay.gif
648KB, 489x377px
>>61600882

and 2). You were posting outdated pictures that have the old graphics, not the new stuff.
>>
>have to learn abysmal, shit languages, frameworks, and even consider webdev and fullstack to get a job
I hate programming.
>>
>>61600882
sup ILLUSION
>>
turned down a 3 months nasa job working with drones because they wanted me to quit school to go to virginia and work there full time for the period

how bad did i fuck up?
>>
>>61600984
Not at all because jobs are temporary as fuck. If they weren't willing to wait, they didn't really want you.
>>
>>61600984
>go to virginia
You dun goofed, anon. Coulda milked dat military industrial complex money.
>>
>>61599863
the column width isn't big enough you dork, ur data is fine
>>
>>61601005
this was my line of reasoning, he was really not hot on waiting 2 semesters until summer after i graduate, idk why
>>
>>61600903
this job >>61600984 wanted C, C++ (yeah i know), socket, threading, and linux systems programming experience. just study what you like and if you're good and the economy's good you'll get a job doing what you like
>>
>>61601022
>not even 2 semesters
Wew. It's standard practice to start poaching students in the first semester of their final year
>>
>>61600897
This looks really nice, can you post some more gifs/webm to show various aspects of gameplay?
>>
>>61600882
>the dominant (darker skin) allele have a genetic intelligence reduction

baka racist
>>
>>61601039
God I hope this happens to me. I really need a decent job after I graduate. I'm scared as it is that there won't be any decent internships in my shit town.
>>
guys anyone knows any good and quick MySQL tutorial for someone who knows SQL server and SQL language??
>>
>>61601104
Well you gotta put effort in to get poached. Does your college have career expos?
>>
>>61601144
Yes, most of it's religious, volunteer work, military, and IT work. I did see IBM on the list for the fall fair so I'll keep them in mind. They do have coop programs as well so I'm going to inquire soon.
>>
can someone pls summarize what node.js is useful for?
>>
Well /dpt/. I thunkified the rendering portion loop, which means it's time to make my program multithreaded.
(clear_screen)
(menu_render)
(draw_world)
(draw_cursor)
(update_screen)

What I had to do didn't make me happy though:
finiteworld * activeworld;
bool _Atomic volatile world_inuse;
bool _Atomic volatile view_inuse;

int cursor_x;
int cursor_y;
int cursor_z;
bool cursor_visible;
bool _Atomic volatile cursor_inuse;

void set_finiteworld(finiteworld * f) {
control_demand(&world_inuse);
activeworld = f;
control_release(&world_inuse);
}

void set_cursor(bool visible, int x, int y, int z) {
control_demand(&cursor_inuse);
cursor_x = x;
cursor_y = y;
cursor_z = z;
cursor_visible = visible;
control_release(&cursor_inuse);
}

void draw_cursor() {
control_demand(&cursor_inuse);
if(cursor_visible)
finite_draw_cursor(activeworld, cursor_x, cursor_y, cursor_z);
control_release(&cursor_inuse);
}

void draw_world() {
draw_compiled_finite(activeworld);
}

I had some flashbacks to my days writing Java thunkifying that loop. Writing getters and setters fucking sucks.
>>
i'm trying to learn C from http://www.learn-c.org/en/Linked_lists

if i use
void append(node_t* head, int value) {
while (head != NULL) {
head = head->next;
}
head = malloc(sizeof(node_t));
head->value = value;
head->next = NULL;
}

it doesn't work, but
void append(node_t* head, int value) {
while (head->next != NULL) {
head = head->next;
}
head->next = malloc(sizeof(node_t));
head->next->value = value;
head->next->next = NULL;
}

does do what it's supposed to
how does that work? isn't the extra ->next redundant?
>>
>>61600882
>/pol/ is making a child molestation simulator
i shouldn't send this to a liberal media outlet but i kind of want to
>>
>>61599611
This. It's so easy even Pajeets can do it. Sage and report this shit thread.
>>
>>61601463
In the first example, you're losing the pointer to the end of the linked list.
>>
>>61601387
FUCK.

So I moved those 5 calls to thread number two. The program doesn't crash. The program doesn't even hang. The worst thing happens. Nothing at all is rendered.

NOTHING.

I've checked and the loop in thread number is iterating. It appears that my commands to opengl/SDL from thread 2 are just being completely ignored.

Fuck meeeeeee.
>>
>>61601550
OpenGL really doesn't play nicely with multiple threads.
>>
File: school interior.gif (2MB, 489x377px) Image search: [Google]
school interior.gif
2MB, 489x377px
>>61601482

I am not /pol/. Politically, I'm more centrist, although I'm not into politics. If I were a board it'd be /sci/ meets /jp/ meets /fit/ meets /g/.

Although before I release the demo, I really need to fix the loli pathfinding...

>>61601463

Look at the condition the loop. What's the negation of head != NULL? It's head == NULL of course!
So when the loop exits head will be NULL. then you just create this node out of nowhere, but you've already left the list.

Like if you had:

[a, 0] -> [b. 7] -> [c, 2] -> NULL

as the list. (a, b and c are node_t)
You would have head pointing to the 4th thing, NULL there. Now you assign it to point to some random chunk of memory with the malloc to create it. you basically have 2 linked lists in memory:

[a, 0] -> [b. 7] -> [c, 2] -> NULL
[head, 3]

or whatever.

With the 2nd you stop 1 node earlier, so when you exit the loop you're pointing to [c, 2], not NULL. so you make c point to head, instead of staying NULL.
>>
>>61601556
I'm issuing all of the opengl commands on one thread though. The only thing I didn't do was create the context in that thread. Augh
>>
should I stop using var?
>>
>>61601497
>>61601567
wew i'm retarded, the pointer's value IS null but i thought it was pointing TO null or something

pointers are hard
>>
>>61601574
>>61601556
So yeah problem was I was creating the opengl context in thread 1. Swapped that over to thread two and .... segfault. Holy fuck I can literally do nothing multithreaded in opengl.

I can't even flush changes to an persistent memory mapping marked MAP_FLUSH_EXPLICIT_BIT.

Wow. Fuck me.
>>
>>61601556
You trying to be cute with OpenGL? Jesus, let the GPU handle the parallelism like it's designed to do, and opengl designed to work with. Don't over engineer low level graphics.
>>
>>61599631
assembly
>>
How do I become a hacker?
>>
>>61600468
You write a process that opens a socket, waits for a connection, handles the connection in another thread which reads lines and parses HTTP headers, then response with some response headers and the page contents. HTTP was actually designed to be very very simple, the difficult part is making it efficient (may involving utilizing a lot of caching and compression options built into the web now) and also protecting against DDoS attacks
>>
why do people recommend python as the first programming language? making fun stuff in python is difficult
>>
>>61601813
Anon I'm trying to avoid the driver overhead caused by having to send commands to the gpu impacting my game. It's a pretty significant component of my frametime.

See pic. Those really tall towers of calls? That's the game logic portion of the loop. They're so tall because functional programming lol. That magenta draw_compiled ...

That's issuing the glDrawArraysInstancedBaseInstance commands.
>>
>>61601889
you talk like you're a hundred times more experienced and competent than you actually are
you're acting like you're smart over-engineering a simple problem
>>
>>61601902
>just do it the stupid way
>stop trying to do hard things
>you're not smart enough to do hard things
>so don't try loser
You're a real winner huh?

Meanwhile I'm going to try to reclaim the million nanoseconds I'm losing to driver overhead.
>>
>>61601919
OpenGL uses state, operates on a single thread, so multi-threading your draw calls isn't smart, it's stupid
Not to mention you're trying to do premature optimization which is also stupid
>>
>>61601958
>premature optimization
Stop using that stupid buzzword, you retard.
I'm not even the person you're replying to, but trying to save a fucking third of your frame is not "premature".
>>
>>61601969
it's not a buzzword, its a legitmate problem from amateur programmers who think they're smarter than they are. And that depends on how long his frame is taking
>>
>>61601958
>so multi-threading your draw calls isn't smart
I'm not multithreading them, I'm moving ALL of them to new thread. The only problem is I didn't realize I needed to move my persistent maps to a new thread too.
>premature optimization
It's not premature optimization if the program works and i'm optimizing it because I'm unhappy with performance.
>>
I come from /sci/ and i want to learn python.
I don't want a meme retard tutorial/book for brainlet please. I don't have programming experience.
>>
>>61600897
did you get kicked out of agdg again lolidev? Also weren't you in jail?
>>
File: new dungeon editor.gif (363KB, 509x376px) Image search: [Google]
new dungeon editor.gif
363KB, 509x376px
>>61602012
>did you get kicked out of agdg again lolidev?

No. I almost never get banned. I just don't post much since I'm busy with life.

>Also weren't you in jail?

I am not nor have I ever been in jail.
>>
>>61601463

I think if you use head != NULL in the while condition in the first piece of code it will work.
>>
File: gaymen.png (2MB, 1912x1488px) Image search: [Google]
gaymen.png
2MB, 1912x1488px
>>61599590
GUI getting pretty good tbqh, I've learned some cute animations as well.
>>
Hi, I have a question. Are there any good resources, aka, paths for self learning/self studying math? I want to become a computer scientist, so I need to git gud at math. I would like to go from basic, to advanced. Enough for me to learn, and practice something everyday, along with programming. Thank you in advance.
>>
>>61602118
go to /sci/ and read the sticky/wiki
>>
>>61602100
Nice, can ya upload a webm of your progress?
>>
>>61600882
Honest opinions:
> Your game looks like shit
> The whole concept is shit (and maybe even illegal)
You're wasting your time on something you'll regret.
>>
>>61602143
Thank you.
>>
>>61602166
Tomorrow, I'm too tired right now, recording and converting to webm is too boring

Game is getting pretty fun
>>
File: 1496020714139.jpg (1MB, 960x1280px) Image search: [Google]
1496020714139.jpg
1MB, 960x1280px
Nim or Rust for a large, performance sensitive desktop application?

>Nim

- Expressive. Very easy to maintain readability
- Core language arguably small
- Very fast, compiles to C and C++ or even JS if you want.
- Hygienic Macro system, and surprisingly good metaprogramming capability
- Has a GC, even though it's claimed to be suitable for soft-realtime applications
- GC can be disabled but GC-less programming lacks documentation
- Hasn't reached v1.0 yet
- Not backed by a rich company
- Nice and small community
- The better, faster and stronger python (without the IDLE, but lets you do low level stuff)

>Rust

- A true systems language with no GC
- Does not hide gory details of abstraction, doesn't even provide type inference at times, Generic types require traits (interfaces) to be specified
- Large and growing community
- Good language tools
- Backed by multiple rich companies
- Too verbose, almost as verbose as C++ if you aren't good at it
- Module system is a bit weird
- Defaults to UTF8, so no nasty surprises while parsing texts etc
- A better, modern and safer C++ that decided to abandon source level C compatibility and has no GC.
>>
>>61602208
C
>>
>>61602246
Both C and Rust compiles to LLVM and Nim can compile to C
>>
>>61602253
None of that means shit. A languages overall speed is not dictated by what it compiles to, it's defined by its semantics and how easy it is to optimise.
>>
>>61602208

Between the two... Rust. RAII over GC means time spent deallocating resources is predictable, rather than spending a lot of time at once deallocating things. If the application is performance-sensitive, then presumably you want to avoid random lagg spikes. You also likely want to avoid wasting tons of memory on unreachable objects while the GC has yet to run. After all, you may need that memory immediately for something else.

Also, who the hell uses Nim? Really, I don't think I've heard it mentioned outside of /g/.
>>
File: 1474325315193.jpg (44KB, 636x616px) Image search: [Google]
1474325315193.jpg
44KB, 636x616px
Employed Haskell programmer reporting in
>>
>>61602312
salary?
>>
>>61602323
300K starting, what do you think?
>>
>>61602323
$300K starting, any job I want.
>>
>>61602337
>>61602338
nice
>>
>>61602290
FYI Nim's GC does not stop-the-world. Time spent on deallocating is a problem though. However, the GC runs only when needed
https://nim-lang.org/docs/gc.html

However there is a fair amount of argument around this https://news.ycombinator.com/item?id=10950414
>>
>>61602352
> Garbage Colector
Why aren't you using a real programming language that uses superior ARC?
>>
>>61602363
Nim does deferred RC
>>
Ruby, can you write a blog explaining how impls and traits work in Rust?
>>
>>61601999
if you want to move them to a different thread, thw thread needs its own glcontext, retard
>>
>>61602083
Looks nice so far, it would be cool if it was like dwarf fortress but with lolis instead of dwarves.
>>
>>61602502
Yeah no shit I quickly figured that out. Except when I do that I can't update memory in thread one.
>>
>>61602399

I don't have a blog; I just post here. I'm not really sure if I could explain any of this stuff better than the official documentation. Honestly, the way I see things, traits are just like interfaces. You've got a set of functions over some generic type that are mandatory to be implemented, and it makes it easier to write generic functions that work on any type that supports that interface. The impl keyword is just a way of adding "methods" to some data type, usually for some interface (aka "traits"). There's probably some more nuance beyond that, but that's the gist of it. Everything else is just syntax.
>>
File: rust-ed.png (114KB, 923x520px) Image search: [Google]
rust-ed.png
114KB, 923x520px
Wew.
>>
>>61602824

I actually know a dude who can suck his own cock. If I remember correctly, the guy's a virgin because he doesn't want to get into a serious relationship, but simultaneously doesn't like the idea of a one night's stand. At least he's got himself.
>>
What's the point of traits and interfaces?
>>
>>61603061

Polymorphism.
>>
Any resources how to animate a simple 2D arm with 3 pivots in android studio? Heard about Canvas. First time android dev here.
>>
C++ is fucked beyond redemption isn't it? Even if they include support for Modules, there will still be C preprocessors and header-files

It's almost like C++ doesn't want to be C anymore
>>
>>61602920
what time is it in US right now?
>>
>>61603449
1:40-4:40 AM
>>
>>61603442
Why did they try so hard to "play catchup" with other languages and add all those ME TOO features?
I feel like it was a calculated scheme by the standards committee and the various writers who would make mad bank selling brand new updated C++ books in the process.
>>
>>61603449

1:55 AM on the best coast.
>>
File: JcTY3nb.jpg (60KB, 500x341px) Image search: [Google]
JcTY3nb.jpg
60KB, 500x341px
What are some good beginner/intermediate projects for someone who knows C and Python?
>>
>>61603442
C++ has been in a constant struggle to distance itself from C.
>>
>>61603061
It's like OOP except hipster.
>>
File: concentratedautism.jpg (764KB, 608x3248px) Image search: [Google]
concentratedautism.jpg
764KB, 608x3248px
>>61600897
>>61600882

he's been at it for a while...
>>
I would like to change my career, but I'm self-taught and my math skills are rather weak.

I've been babbying around in web dev for the past 9 years. Right now I'm in a ""senior"" web application developer. While in the past years, I've been moving away from babby PHP websites to actual web applications, I feel like this branch is a dead end.

I would like to move away from web dev.

What branch is accessible? What does /g/'s self-taught population work in? I'm getting more and more interested into embedded systems. There's a world-leading elevator manufactorer nearby me and they always post that they look for "Software Engineers for Embedded Systems" on LinkedIn. They require both C and C++ for example. There is also a rather big manufactorer of office coffee-machines who occasionally looks for embedded system developers.

Where would I start? Are embedded systems even a wise choice? Should I just start learning C?

My current skills are limited to Java, SQL and PHP. My math skills are on a highschool level
>>
What's the best way to start making Android Apps?

I know a bit about IDEs and some languages but I'm still a beginner
>>
>>61599071
This is basically a blog by someone who doesn't understand his tools and tries to teach others about what he has learned.

I hate this. It's clutter.
>>
>>61604194
>I know a bit about IDEs and some languages but I'm still a beginner

how much exactly? you should already know how to write software in general, then apply it to android in particular

learning to program by developing mobile applications borders on self-inflicted psychological torture
>>
>>61600882
yuk; so many magic numbers.
>>
>>61604221
Like I did a bit with Eclipse and Visual Studio a few years ago, but pretty much forgot everything related to actual programming
>>
>>61603766
No that's not true. They could cut it all in an instant. But that doesn't matter because the parts that are weighing down the language is the committees idea of what is good proposals. Many proposals just substitute old features because those old proposals were too lazy to do something decent. And for the most part they're not better.

It's a dying lang covered in necrosis.
>>
>try to pass my discrete GPU to a win10 virtual machine on my laptop
>error 43
>read up on it
>nobody actually ever got this working
how do people actually learn the PCI protocol and stuff
>>
>>61604251
>They could cut it all in an instant.
And break backwards compatibility, so it might as well just be a new language.
>>
>>61599590
What are the most important design patterns to learn?
>>
>>61604236
Magic numbers are more efficient brainlet
>>
>>61604276
none, dont try to fit an existing solution to the problem, instead think of the right solution and it will come to you automatically
>>
>>61604292
>magic numbers are faster than macros
>>
>>61604275
Yeah. That's how you move away from another language. Clearly they're not doing that.
>>61604276
http://realtimecollisiondetection.net/blog/?p=81
>Design patterns are spoonfeed material for brainless programmers incapable of independent thought, who will be resolved to producing code as mediocre as the design patterns they use to create it.
>Christer Ericsson
For you? Learn all of them.
>>61604292
You must be really stupid. You could #define them if there were actual issues somehow but there's not.
>>
>>61604305
>You could #define them if there were actual issues somehow but there's not.
>he expects to re derive constants on the fly rather than just hardcoding them
>he thinks there's no performance cost to this
sup you fucking brainlet
>>
>>61600882
why aren't you doing something more productive with your time
>>
>>61604305
>learn you another language
>links to haskell
>is VP of technology at Activision
Nice guy.
>>
>>61604296
>Just be yourself ;)
Nice advice dipshit.
>>
>>61604328
>>61604320
Stop shit posting you mong.
>>
>>61604337
so "hurrr design patterns are for brainless sheeple" isn't shitposting but calling bad advice out is?
>>
>>61604345
It links to an argument.
And you didn't reply to that statement.
You're not providing reasons why the advice is bad.
Also the comment on how #define would be derived in some manner to create runtime cost is simply impossible since it's just text substitution macros.

Perhaps you're just dumb. But I find it hard to believe you'd be this extremely dumb so you're probably shit posting.
>>
>>61604371
People like you are why /dpt/ truly is trash and will never be a quality place for programming discussion.

Enjoy.
>>
>>61604371
>It links to an argument.
The entire argument is "hurrr design patterns are for brainless sheeple"

I responded to it by calling it shitposting.
>>
>>61603061
It's more flexible than inheritance-based OOP because you're not locked into a position in an object hierarchy.
>>
>>61604245
it depends then, if you want to start from scratch, i'd learn python with a text editor like notepad++. if you like the language you can just use kivy.
>>
>>61604380
>>61604371
>>61604345
How can you actually argue about that? Just agree to disagree. How naive does someone have to be to think that you can change someone's opinion on the internet...
>>
>>61604292
> Magic numbers are more efficient brainlet
It's a 2D pixel art game

anyway... you could always use a settings map loaded into static memory via an include.

In "config.txt":
{"prop1", 'z'}
{"meme", 69}
...


Then load the config at compile time through:
static std::map<std::string, /* a union of the supported type(s) */> config = {
#include "config.txt"
};


Then access properties through
(int)config["meme"]
>>
>>61604404
I realise now the union meme with the cast is a bad idea. Instead use a templated class; the config should look more like this then:
{"prop1", TYPE<char>('z')}
{"prop1", TYPE<int>(69)}


There's probably a better way of dealing with the types but idk, I havent touched C++ in a few years.
>>
>>61604400
I've changed people's minds all the time. And explaining this to a moron gives them just 1 barrier to learning. Compile the code and inspect the asm. They will find a distinct lack of operations they'd expect.
And in this case with #define they just need to run the preprocessor to see that their code is identical.

We can't agree to disagree on facts.
>>
>>61604404
This will have runtime effect. Quite a massive one. std::map is one of the worst datastructures in existence. It won't matter for anon because he's gonna cost his processor tons of CPU time by virtue of being a shit programmer. But as general advice you shouldn't use std::map if you care about performance because the standard has defined it to be bad.
>>
>>61604547
Yeah, but how would ge get O(1) access to members of the config array? He could define macros for each index, but that's even more disgutsing.
>>
>>61604572
Lots of ways.
The problem isn't that it wouldn't be O(1). Sure it's not worst case O(1), no sane hash map is. He's storing his variables in a linked list. That's the problem.
I'd choose a vector with enum indices and do the #include trick for storing the values and their names in a different file while only having to declare them once.
That will give you O(1) access since there's no searching. You take a minimal amount of cachemisses (especially if you order your enums by use in the program but that's a bit overkill). You'd probably sort the values into different vectors by type. Not much hassle. Avoids the casting you did too.

But it all depends on your goal. I think using a hash map for values like these is fine. I think it may be possible to do some constexpr/template things to actually give you no runtime cost but I'm not comfortable enough to say for sure.
>>
>>61604635
>he's storing his
You're storing your, sorry.
>>
>>61601889
>glDrawArraysInstancedBaseInstance
At least you are doing that.
Put things into as few draw calls as possible (best would be one, and thats entirely possible)
Also make sure to use array textures and Shader Storage Buffer Objects instead of Unforms to reduce the driver overhead.
I think I understand what you are trying to do by moving the draw_compiled into another thread.
But I would first optimize this draw call.
There might be something wrong with it.
Can't see any code, so I am not sure.
If you can manage to put the whole gl stuff into another thread, it may be fine.
If it won't work, then maybe just move all the logic away into another thread, and only keep the gl calls and such in the main one.
I don't think its necessarily too great of an idea though,
>>
File: 1dollar.jpg (244KB, 1515x1114px) Image search: [Google]
1dollar.jpg
244KB, 1515x1114px
Can anyone post the list of projects? I need ideas
>>
>>61604769
rewrite the last thing you did in haskell
>>
>>61601387
>Writing getters and setters fucking sucks.
I'd recommend using an IDE for that.
>>
>>61604864
>haskell
But programming should be fun!
>>
>>61604889
hence haskell
>>
>>61604635
>>61604646

I agree, though not with the linked list meme. It's not a linked list, the std::map is an array where each member of the array is like a linked list head. Therefore the map is O(n) and Ω(1) right?

To active this with a more C style solution, I think the entire thing could be done like an X-macro. The trick is that you can set the index in the static array to be the line of the X-macro minus the original initilizer macro, e.g:

The config, this could also be in a txt with #include "..."
#define CONFIG_SET \
DCL(property1, "value") \
DCL(property2, 69) \
...


Then the enum can be built with something like this:
#define DCL(n, m) n ,
typedef enum {
CONFIG_SET
} CONFIG_ENUM;
#undef DCL


Then the data can be built with this; again, you're going to need a union for the types.
#define DCL() (union_type)m ,
const union_type[] = {
CONFIG_SET
};
#undef DCL


To get an idea of what I mean by the union meme: https://github.com/vivkin/gason/blob/master/src/gason.h (line 24 and on...)
>>
>>61603842
Genetics were a mistake. Humanity has gone down the drain since this nasty obsession with genes. Of course, people are different, populations differentiate because they adapt to their environment. And it was good like this without being scientifically scrutinized. But now it's literally turned into an industry and it's not pretty.
>>
Backend guy here, using mainly Erlang and Java these days, although have exp. with Python, C, JS and PHP.

I want to start doing graphics, starting with simple 2D interactive programs.

Is JavaScript the easiest place to get started?
>>
>>61604904
fuck I forgot to name the array, anyway the point is still clear.
>>
>>61604904
> std::map is an array where each member of the array is like a linked list head
Surely you mean std::unordered_map, std::map is a btree.
>>
>>61604918
oh yeah kek, sorry
>>
>>61603842
on github?
>>
File: 1474140098052.png (2MB, 3840x2160px) Image search: [Google]
1474140098052.png
2MB, 3840x2160px
>>61603733
doesnt really matter what languages, but python would help with the web handling challenges.
>>
File: Untitled.jpg (188KB, 1163x1142px) Image search: [Google]
Untitled.jpg
188KB, 1163x1142px
>>61599590

node.js, webpack, ECMAScript2017, React, express, Graphql, postgres, postcss.

the dream of choosing your own stack.
>>
>>61605003
>that anon who got no answer even though xhe posted an anime image
>>
show me your package.json, /g/

cat package.json 
{
"name": "_",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"lint": "eslint --ext js schema index",
"start": "babel-node index.js"
},
"babel": {
"presets": [
"stage-0",
[
"env",
{
"targets": {
"browsers": [
"last 2 versions"
]
}
}
]
]
},
"dependencies": {
"babel-cli": "6.23.0",
"babel-core": "6.23.1",
"babel-eslint": "7.1.1",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-0": "6.22.0",
"body-parser": "^1.17.1",
"cors": "2.8.1",
"eslint": "3.15.0",
"express": "4.14.1",
"express-jwt": "^5.1.0",
"html-minifier": "^3.4.2",
"jsonwebtoken": "^7.3.0",
"knex": "^0.12.6",
"mailgun-js": "^0.9.0",
"pg": "^6.1.2",
"redis": "^2.7.1",
"request": "^2.81.0",
"request-promise": "^4.2.1",
"shelljs": "^0.7.8"
}
}
>>
>>61605052
$ cat package.json
cat: package.json: No such file or directory
>>
opinions on Facebook's Relay Modern?

(hint: it's absolute fucking bullshit.)
>>
>>61605075
give me the basic gestalt
>>
>>61605118
it's a library for wrapping React-component's in other components that communicate with your graphql-backend, and updates your components according to changed data.

Except the docs are fucked, usability is shit and most things are generally unintuitive as fuck.
An alternative exists, Apollo, which looks easier to use.
>>
>>61604995
rolle
>>
>>61605142
but do you have to use that?

seems a lot of bullshit just to do simple things
>>
File: hip stack.png (185KB, 800x600px) Image search: [Google]
hip stack.png
185KB, 800x600px
>>61605003
It's like you're trying to fit the stereotype.
>>
File: download.jpg (8KB, 243x207px) Image search: [Google]
download.jpg
8KB, 243x207px
>>61602006
Please, i want a reply.
Thank you
>>
>>61599863
why not just use pandas? it would be 2 lines jesus
>>
>>61605311
dumb frogposter
>>
File: 1500994801574.gif (134KB, 393x393px) Image search: [Google]
1500994801574.gif
134KB, 393x393px
>>61605311
>hey guys can you fix my computer please it doesn't work
>>
>>61604995
roll
>>
>>61604912
>Is JavaScript the most painful place to get started?
Yes.
>>
Is it normal for a vptr to be added to non-polymorphic objects when compiled with g++ -O0?
>>
>>61605518
How come? What do you suggest instead?
>>
>>61605052
>^
Disgusting
>>
>>61605646
why?
>>
File: wallhaven-64060.jpg (593KB, 1920x1200px) Image search: [Google]
wallhaven-64060.jpg
593KB, 1920x1200px
>>61604995
o-ok. glasses ON! HERE I GO!
>>
internal void RenderWeirdGradient(int xOffset, int yOffset)
{
int pitch = bitMapWidth*bytesPerPixel;
uint8 *row = (uint8 *)bitMapMemory;
for (int y = 0; y < bitMapHeight; ++y)
{
uint32 *pixel = (uint32 *)row;
for (int x = 0; x < bitMapWidth; ++x)
{

uint8_t Blue = (x + xOffset);
uint8_t Green = (y + yOffset);

*pixel++ = ((Green << 8) | Blue);
}

row += pitch;
}
}


Wont (Green << 8) just be 0??? I mean its 8 bit and you are shifting by 8?
>>
>>61605797
-Wshift-overflow
>>
>>61605797
might be integer promotion?
>>
>>61605797
>>61605847
Yes, I also think it would be integer promotion.
>>
>>61605847
integers get promotions?

what about MY promotion ??
>>
>>61604904
https://youtu.be/fHNmRkzxHWs
Around 45:40


Ideally it'd be an array of keys and an array of values. But because the Cpp committee are morons it is not.
>>
>>61605840
>>61605847
>>61605870

what is an 'integer promotion'? is it like casting in Java?
>>
>>61605909
Types like short and char get automatically converted to ints before arithmetic operations are performed.
>>
File: 1495379990639.gif (835KB, 500x375px) Image search: [Google]
1495379990639.gif
835KB, 500x375px
>tfw you test your program using a boogeyman

what's his name?
>>
>>61606019
?
>>
>>61605926

ok let get this straighten out, I have 8 bit value so we have

a_1 a_2 a_3 ... a_32 (integer digits for x + xOffset)

when I assign this to uint8_t it takes only a_25 a_26 ... a_32

then we transform it back to 32 bit
then perform shift operation
then perform OR operation on Blue (I am assuming we also convert blue to 32 bit? or maybe the 00's on the left is implied)
then assign to *pixel pointer??

or fuck big/small endian it makes every fuckign thing even mor econfusing
>>
>>61606224

woops, I meant '... 32 bit value so we have ...'
>>
>>61606224
an expression like this
((Green << 8) | Blue);

is interpreted like this
(( ((int) Green) << 8) | ((int) Blue) );
>>
>>61602006
next time when you want to argue try to do it against someone you have equal or better experience than and maybe you'll do better next time.
>>
File: mlem mlem.png (26KB, 300x250px) Image search: [Google]
mlem mlem.png
26KB, 300x250px
>>61606257

oWoWo

thx anon <3
>>
File: 1461810094819.jpg (355KB, 497x800px) Image search: [Google]
1461810094819.jpg
355KB, 497x800px
Not sure If i should ask this here or the stupid questions thread, but what's the best book for learning how to do shit with a raspberry pi? Was thinking about reading the one by Eden Upton.
>>
>>61606372
sqt is probably a better place to start
but what do you even expect to do with it?
>>
every project i start stops at a grinding halt when i try to do anything bigger than what i already know how to do, since every library i have ever looked at felt like a monolithic beast by brain can't comprehend

any recommendations to get over my retardation?
>>
>>61606385
nothing in particular, I was considering setting up a small home server for no reason, I'm really just bored and looking for something to do.
>>
>>61606392
What is it that you struggle to comprehend?
>>
>>61606418
That's a good thing to do with a Pi if you've never done anything like it before, but it's not really a programming thing.
>>
>>61606456
Yeah, It's just the dpt tends to have more intellectual replies than sqt, I suppose I'll try that then.
>>
Redpill me on elixir, erlangvm /dpt/
>>
>>61606481
1. Shit.
2. Outdated.
3. Outdated.
4. Ok.
5. Outdated.
6. Outdated.
7. Outdated.
8. Okay-ish.
>>
>>61606481
looks good to me.
>>
>>61606481
You won't need even half of one of those books. A reference is handy to have around, but the best way to learn is by doing (programming).
>>
>>61606424
every big library i tried using so far, CImg and sdl to name a couple.

i guess a better question would be, if i still struggle with anything more advanced than fizzbuzz do i need to go back to the basics or surrender and continue bashing my head against libraries/projects until i succeed?
>>
>>61606481
>I am learning C++.
Top Anime mistakes in 2017
>>
File: output-copy.jpg (40KB, 636x616px) Image search: [Google]
output-copy.jpg
40KB, 636x616px
In C++, I'm using an ofstream to write the response from an HttpSendRequest to a jpg file. All my output files are completely distorted at this point. I think my problem is the way I'm trying to write my image files. How do I force a one on one copy here when reading the handle? Is there a better alternative to ofstream?

The loop I'm using to write
void fileWriter::writeToFile(HINTERNET openAdress)
{

std::ofstream outputFile;
outputFile.open("output.jpg");
DataReceived = '\0';

while(InternetReadFile(openAdress, &DataReceived, 1, &NumberOfBytesRead) && NumberOfBytesRead )
{
outputFile << DataReceived;
}
std::cout << "Download complete" << std::endl;
outputFile.close();
}

If I compare this to the original (>>61602312) the files are 99% identical.
>>
>>61606526
By all means continue, SDL is a good place to start. Take a look at the lazyfoo's tutorial.
>>
>>61606530
that's right, anon should learn the next useless meme language instead
>>
>>61606498

>1.Shit
It got a raving review
https://accu.org/index.php?module=bookreviews&func=search&rid=1185

>Outdated
So are you saying I shouldn't read them?
>>
Do projects ever roll their own payment processing code? So instead of using Paypal/Stripe, CC info is manually transmitted to a banking institution to make a payment. I have the free time of a neet if that matters
>>
>>61606540
Even that would be better than c pee pee. That language is garbo
>>
>>61606535
>If I compare this to the original
I meant in a text editor.
>>
File: c2plusigns.jpg (309KB, 663x1408px) Image search: [Google]
c2plusigns.jpg
309KB, 663x1408px
>>61606481
Every adult male should read Bjarne at least once in his lifetime desu
>>
>>61606541
>So are you saying I shouldn't read them?
What this >>61606507 Anon said. I gave a try most of those books, you won't get much out of them and many things have changed since.

Stick to anything that teaches you C++11/14, and you're good to go.
>>
>>61606588
>Stick to anything that teaches you C++11/14, and you're good to go.
This is the most important point, C++11 changed everything.
>>
>>61606535
Make sure to open the file as binary file.
>>
>>61606639
Thanks a ton friend, it worked.
>>
What kind of jobs can I take if I learn assembly?
>>
>>61606755
Visitor assistant at a museum.
>>
>>61606755
mostly legacy or speed dependent software
>>
File: chise.webm (2MB, 640x640px) Image search: [Google]
chise.webm
2MB, 640x640px
>>61606755
assembly man
>>
>>61606588
>>61606611
What books do you suggest?
>>
>>61606784
Man, this looks oddly delicious.
>>
>>61606792
'C++ Primer' (Not Plus) or 'Discovering Modern C++' if you have a math background.

Then you can read the Scott's book. I think this one: https://www.amazon.com/dp/1786465183 is also worth looking at afterwards, it's new.
>>
>>61606795
Melted cheese? Delicious? How odd!
>>
(defun hmac-sign (key message &key (encoding :utf-8))
(let* ((key (babel:string-to-octets key :encoding encoding))
(message (babel:string-to-octets message :encoding encoding))
(hmac (ironclad:make-hmac key 'ironclad:sha256)))
(ironclad:update-hmac hmac message)
(ironclad:byte-array-to-hex-string (ironclad:hmac-digest hmac))))


I'm really new to common lisp, trying to write a thing that makes a signature for API calls.

the signature format is basically:
HMAC( var3 HMAC( var2 HMAC(key var1)))

the problem with the above is it takes a string, and returns a hexdigest. I need to be able to recursively calculate an hmac signature of binary digests, only returning a hexdigest at the very end. The problem I'm running into is that i have to initially convert everything from strings into octets before operating on them but i can't very well pass the binary digest returned back into the function when it expects a string to turn into octets. I know i'm just a CL noob and there is a simple solution here. I just wont feel good about myself until i've made this usable with recursion.
>>
>>61606784
>cutting off the wax and leaving it in the customers dish.
I hope they picked that up afterwards.
Who'd want to eat old dry cheese wax?
>>
>>61606838
>I just wont feel good about myself until i've made this usable with recursion.
Don't force yourself to use recursion and get a headache.
>>
>>61606755
If all you know is assembly I doubt you could find a job. There likely will be jobs where you could just work in asm but I don't see someone getting those jobs without knowing at least C.

But it's useful to know how to read it. Not necessarily all that important to program in it.
>>61606935
He's just observing a limitation of his system.
>>
>>61606922
>old dry cheese wax
It's just unmelted cheese. You can put yours on my plate, I'll eat it.

>>61599590
I've spent the last 3 hours helping people on a forum rather than doing my own work. I've found that it's more fun to basically create little prototypes that start a project, rather than finishing and solidifying a project.
>>
>>61606838
define a recursive local function with labels
>>
>>61606975
>I've found that it's more fun to basically create little prototypes that start a project, rather than finishing and solidifying a project.
wew
no shit
>>
File: Untitled.png (171KB, 188x458px) Image search: [Google]
Untitled.png
171KB, 188x458px
>>61606821
I'll be honest I'm starting to question all these recommendations seeing as everyone's biased in their own way.
I think I'm just going to do both of Bjarne's books since he made the language. They both do C++11
>>
>>61606982
thanks thats helpful
>>
>>61607230
Good luck with the chapter on making a calculator.
>>
>>61606982
do you have a simple example thats really vague, unless that was the point
>>
In C, is there any sense in having static globals in a .c file?
>>
When people say Lisp
what do they generally mean?
I searched it up there's Scheme and others.

I'm not familiar with this family of Languages
>>
>>61607389
Common Lisp maybe?
>>
>>61607259
Writing calculators is easy, you just convert the expression to RPN and use the Shunting Yard algorithm.
>>
>>61607389
i would say a homoiconic programming language based on lambda calculus where the syntax is made of s-expressions and where the base data structure is the list abstract type. (which is why javascript has nothing to do with scheme contrary to what some anons here claim).
>>
how do i work my way up to an android app

im just a java noob.
>>
>>61599590
>sparky
lol
>>
File: s.png (129KB, 1680x1050px) Image search: [Google]
s.png
129KB, 1680x1050px
>>61599590
>What are you working on, /g/?

Exploring the deepest, darkest corners of Racket.
>>
>>61607536
Why do you keep changing your color scheme?
>>
>>61607414
Which one is worth learning and has a good community with good 3rd party libraries?
>>
File: s.png (68KB, 1680x1050px) Image search: [Google]
s.png
68KB, 1680x1050px
>>61607602
randomized every time i type a char.
>>
>>61607695
That sounds annoying, how does your solution to D15 look like or did you just start working on it?
>>
>>61607491
What do you mean up
>>
>>61607724
just started
>>
>>61607724
the inputs they gave are crap and require parsing
eg for day 15
Disc #1 has 17 positions; at time=0, it is at position 5.
Disc #2 has 19 positions; at time=0, it is at position 8.
Disc #3 has 7 positions; at time=0, it is at position 1.
Disc #4 has 13 positions; at time=0, it is at position 7.
Disc #5 has 5 positions; at time=0, it is at position 1.
Disc #6 has 3 positions; at time=0, it is at position 0.


why not just
1 17 0 5
2 19 0 8
3 7 0 1
...
>>
File: kode.png (1MB, 960x1018px) Image search: [Google]
kode.png
1MB, 960x1018px
>>61607491
You download Android Studio and start CODING furiously like a madman, you smoke pack a day, drink a lot of coffee, tell every family member or any other distraction to fek off in the most rudest of ways, you throw you code away regularly into the trash, you continue to CODE even more furiously

That's how you work your way up my dude
>>
File: 1478941858011.jpg (36KB, 406x409px) Image search: [Google]
1478941858011.jpg
36KB, 406x409px
>>61607733
i can only do codeabbey stuff. never made a 'real' program
>>
>>61604995
roll
>>
>>61607779
what's your rank on codeabbay? i am believer
>>
>>61607775
sounds about right.
do. fail. learn. do. fail. etc...
>>
>>61607774
Yeah, most inputs onwards that contain such instructions will use a text format like that instead of just space/comma separated values. Thankfully I used Python so I just used the re module to match the lines:
RE_DISC = re.compile(r'Disc #(\d+) has (\d+) positions; at time=(\d+), it is at position (\d+).')


And then to parse the discs:
discs = [Disc(*map(int, RE_DISC.match(line).group(1, 2, 4))) for line in data]


I guess if you don't really care about parsing their input you can just manually redo the file or fill in the data as some structure in your program.
>>
>>61607775
Yer a babby. I first disown my whole family, then buy a d-wave on stolen credit. After that, I research quantum annealing for 10 years then buy another d-wave because the first one is outdated. Once I master quantum super-position programming, I create an AI family so that I may disown them.
>>
>>61607792
same

>>61607799
>>61607775
what if i wanna learn kotlin
>>
>>61607804
why would you need to compile at runtime a static regex?
>>
>>61599590
I'm building an Image Downloader solution in C# so that I can download images from 4chan.
>>
>>61607841
In this particular case it doesn't really matter but it's just a habit for when working with backend services (i.e. compile a regexp and then reuse it as clients as handled and need to use it).
>>
>>61607875
sounds challenging
>>
File: 1485956707201.png (268KB, 960x530px) Image search: [Google]
1485956707201.png
268KB, 960x530px
>Getting my feet wet on databases with a new project
>Things work without too much struggle so far
>Suddenly when I test it it tells me the login failed
>>
I'm throwing together an excel sheet for some shit at my workplace
AAaaaaaa
Why doesn't this return the same result when textbox_d0 and textbox_d1 are of the same value?! My head hurts.

((Worksheets(wrkSheet).TextBox_D0.Value) ^ 2 + 1) ^ 0.5
((Worksheets(wrkSheet).TextBox_D1.Value) ^ 2 + 1) ^ 0.5


It has to be VBA so they can modify the code (they don't know anything else)
>>
>>61607837
then learn kotlin, what's stopping you?
>>
>>61608105
ahhhh

since i don't know java well, im wondering if its ok..or a good idea to learn this lang that's based on java
>>
>>61608085
Because it isn't the same value?
>>
>>61608132
(2 ^ 2 + 1) ^ 0.5
(2 ^ 2 + 1) ^ 0.5
>>
Hi guys, what are some good books on cryptography ?
>>
>>61608186
i'm not falling for your tricks NSA
>>
>>61607775
There's literally nothing wrong with this image.

Programming is one of the most interesting creative outlets right now.
>>
>>61608085
TextBox_D0 and TextBox_D1 aren't of the same value.

It's as simple as that.
>>
Hey /dpt/, is what I'm doing completely retarded?
https://pastebin.com/ZMVbtjyr
I'm playing around with fixed point arithmetic but I have little experience actually writing sepples, I mainly just shitpost.
>>
>>61607969
It was a fucking pain in the asshole to extract the SRCs from the img tag but I managed. Now comes the part where I download the files
>>
>>61608407
I really hope you used a HTML parser...
>>
>>61601889
You're doing it wrong. OpenGL mandates you store things in VAOs which are aggregates of drawing calls and buffer-binds stored GPU-side. Do that, and I'm sure you can reduce those 33% to nothing.
>>
>>61608418
Sorry to inform you of this but I did not.
>>
How in the fuck do I disable the narrowing conversion error in MSVS? Like I can -Wno-narrowing with GCC.
>>
>>61599863
>>61601017
this, mang
>>
>>61608464
>destroying data silently
You're doing it wrong. There's a reason for that error/warning.
>>
File: s.png (81KB, 1680x1050px) Image search: [Google]
s.png
81KB, 1680x1050px
>>61607724
here my solution for the silver star. i will write the input scanner later

(for/or ([i (in-naturals)]
#:when (= 0
(remainder (+ i 5 1) 17)
(remainder (+ i 8 2) 19)
(remainder (+ i 1 3) 7)
(remainder (+ i 7 4) 13)
(remainder (+ i 1 5) 5)
(remainder (+ i 6) 3)))
i)


for/or stops as soon as an iteration return anything else than #f (false)
#;when tells on when condition the iteration block shall be evaluated
>>
>>61605278
create-react-project

are you stupid?
>>
>>61608493
It literally doesn't matter in my case.
>>
>>61608557
Then don't try to shove floating point numbers into ints (or some equivalent).
>>
>>61608590
The thing is it's a third party library that expects floats but VS seems to be top retarded because I just fixed a completely unrelated error and all of the conversion narrowing errors disappeared.
>>
>>61608632
>I am perfect so the tool must be flawed
>>
>>61608642
I'm not saying I'm perfect I'm saying that fixing a completely unrelated error shouldn't magically make another error disappear from 40 source files.
>>
>>61606555
What are the dotted line arrows supposed to mean?
>>
>>61608682
>make change in implementation that is called by 40 source files
>confused when the errors produced by the calling of that implementation are gone

I could assume that you're actually competent, but the likelihood is that you really are confused about what you did to fix the issue.
>>
>>61608704
You just made a huge assumption about what I did and you're completely wrong. I have a bunch of source files that call a third party library where they pass uint32_t as a float. This is where the errors come from. Another error came from the fact that I use std::localtime instead of std::localtime_s (because apparently the former is deprecated in MSVS), fixing the std::localtime error magically made the errors about conversions disappear.
>>
File: Mathemagic.png (88KB, 1044x520px) Image search: [Google]
Mathemagic.png
88KB, 1044x520px
>>61608352
Please criticize me, even if it's for stupid shit.
>>
>>61608793
1+2+3+... to infinity is not -1/12
>>
>>61608920
proof?
>>
>>61608934
The series diverges towards infinity.
>>
>>61609008
>words
>a proof
>>
>>61609021
You asked for proof, not a proof.
>>
>>61609021
I assumed it was obvious, but I'll go down a layer. It diverges because it is a p series where p = -1. If p is < 1 for a p series it diverges.
>>
new thread when? :3
>>
>>61609049
>>61609081
you can't trick me
i'll never let you steal 1/12 of a dollar from me
>>
https://github.com/mdbecker/community_twitter_bot/blob/master/bot.py

how do I make it so that it doesn't matter who sends the direct message, any direct message that gets sent (unapproved users), the bot will still tweet it out
>>
New thread:
>>61609155
>>61609155
>>61609155
>>
>>61609156
> mess['sender']['screen_name'] in conf_users
Remove that part?
>>
>>61599863
>for some reason, the ".csv" file in excel has a ton of "#" marks
>when I go over the cell, there's a number
my fucking sides holy shit
>>
>>61601772
same thing baka
>>
>>61601862
step 1) kys
>>
>>61604995
roll
>>
>>61608793

when memes can fool the mathematicians then you know we are all doomed
>>
nutthing
Thread posts: 323
Thread images: 39


[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.