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

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

Thread replies: 255
Thread images: 27
File: dat boi.jpg (73 KB, 680x632) Image search: [Google]
dat boi.jpg
73 KB, 680x632
fuck off trap fags

prev: >>54638110
>>
>>54643873
>>>/b/
>>
music to shitpost to

https://www.youtube.com/watch?v=OrR1TGQY20Y
>>
>>54643909
https://www.youtube.com/watch?v=CU5ByOf9eP0
>>
>>54643857
>C++

Take the module system problems I described above and augment them with insane compilation times due to template metaprogramming complexity as well as extremely unreliable ABI. Templates are pretty sweet but the language is simply not productive enough for me, especially since the end result is endless linkage pain, even more so than C programs.

It gets to the point where the only sane way to do C++ libraries is to effectively wrap the C++ implementation with a C ABI. Otherwise, you might as well assume everyone is using the exact same compiler and build environment as you.

>Java

I've done a fair share of Java and while it's much nicer nowadays, both in terms of language features and stdlib support, I've come to realize that there are better actual languages available out there to program in. The JVM is solid, Java, not so much. And libraries/classpath are still awkward. Hellish JarInJar loader bugs are something I don't want to run into again.

>>54644071
That's nice, which Scheme? Guile?

>>54644081
I remember Scheme used to have actual papers written about the fragmentation of implementations and the lack of a real standard library and module systems. Standard Schemes simply weren't practical.

Racket seems to have branched off into its own thing. That's probably for the best. Every implementation was an island as far as my understanding goes.

Does it have a lot of libraries? FFI support?

What about Guile? Last time I ran into it was in the context of GNU Makefiles as an extension language. If someone made a game with it, it can't be restricted to just embedded, in-application scripting.

>gnumaku

Well I'm gonna browse his code for a bit. I have more experience now, maybe I can figure out his trick this time
>>
4th for forth
>>
Working with java, can someone explain how to print a string the same amount of times as a value in an array?

So if array[0] = 3, I need to print 3 "X"s in a row and store it in a list as 1 string.
>>
File: sanity-and-comrades.jpg (46 KB, 424x505) Image search: [Google]
sanity-and-comrades.jpg
46 KB, 424x505
>>54644167
>gnumaku
>check this thing out
>https://github.com/davexunit/gnumaku
>Latest commit 881836c on May 4, 2014
>on May 4, 2014
>May 4, 2014
>2014
>/g/
>ever finishing a project
>ever
>>
Where do I start with bash scripting?
>>
>>54644258
how do you know it's not already finished
>>
>>54644167
>Does it have a lot of libraries?
They can be found on https://pkgs.racket-lang.org

>FFI support?
It surely does!

I can't say anything about Guile because I have never used it myself.
>>
>>54644295
try collecting all the files on your desktop and moving them to an archive. then launch your workspace and any programs you want to open

better yet, assign these programs names and ask for which specific ones you want to open
>>
File: 1461455363883.jpg (215 KB, 2048x1356) Image search: [Google]
1461455363883.jpg
215 KB, 2048x1356
how difficult would it be to make a ping pong in openGL (C / C++)?
>>
>>54644258
It was going to be a full-fledged game, but then he decided to turn it into a library. As far as I can tell he finished what he set out to do and then moved on.
>>
>>54644394
Nothing's ever finished m8
>>
File: 1444854046524.png (206 KB, 2126x1116) Image search: [Google]
1444854046524.png
206 KB, 2126x1116
>>54643873
>>
>>54644411
It depends on you. Since you're asking here instead of making it, I'm going to guess it will be very difficult.
>>
>>54644417
for you
>>
>>54644432
i just had this idea and thought i would ask /dpt/
>>
>>54644411
not difficult at all if you're talking about pong, it's just some rectangles
>>
>>54644435
For literally any library lol, it really is a lifetime of work

I bet 99% chance he just lost interest, ran out of steam
>>
>>54641089
>what method you used to store the tags

Categorical hypergraph database.
>>
>>54644423
rolling alskdjf;alsjdfa;lj
>>
I couldn't understand why it hurts a lot when you bite your tongue accidentally but it doesn't hurt when you bite it intentionally, and what I couldn't understand most is why you're biting your tongue right now ?!
>>
>>54644491
Has anybody really been far even as decided ?
>>
>>54644248
for (int i = 0; i < array[0]; ++i) {
System.out.print("X");
}

I'm not really sure what you're asking.
>>
>>54644258
>lispy
>guile
>gnu
Instantly dropped.
>>
>>54644511
nvm I figured it out.
>>
in python 3 is there a way to append letters to single list variable?

like lets say I ask the user to input 1 letter at a time. instead of putting it in a list like

list = ['i', 'n', 'p', 'u', 't']

can i just save it like

list = ['input']
>>
>>54644543
list = ['in']
list[0] = list[0] + 'put'

?
>>
>>54644585
??
>>
File: yDy5d9.gif (2 MB, 480x640) Image search: [Google]
yDy5d9.gif
2 MB, 480x640
>>54644258
>>54644416
He made a game engine
https://dthompson.us/pages/software/sly.html
He recently used it in a recent lisp game jam
https://davexunit.itch.io/lisparuga
>>
>>54644592
pytards everyone

python is horrible, especially for beginners
>>
>>54644543
>in python 3 is there a way to append letters to single list variable?
yes
"+"
>>
>>54644592
???
>>
Whats the quickest way to set up a windows VM? I have reason to believe that running this could fuck my shit up.
>>
>>54644688
Install VirtualBox, plug in a Windows ISO, and press enter a bunch of times.
>>
Anyone have any clue what this could possibly do? Just got a .js file in the mail that is very similar, sharing quite a few functions, and Im curious what it could do.

It also came with a clearly fake bitcoin wallet .exe, so theres that.
http://pastebin.com/YPrZ4jnK
>>
>>54644701
Gonna take forever to download a windows iso. Might as well start now.
>>
File: cool.png (19 KB, 630x185) Image search: [Google]
cool.png
19 KB, 630x185
Is there a difference between these two?
>>
>>54644619
that just adds another item to the list instead of appending it to the first item
>>
Finished a year long piece of work, nothing to do now.

Is this what retirement feels like??
>>
>>54644750
strings are not lists in python, they are strings
+ is the concatenation operator for strings
to add something to the end of a string, use +
>>
In this C++ code https://msdn.microsoft.com/en-us/library/xwtb73ad.aspx

what is that static int function?
static int smf();

what the fuck is going on in this code?

static int (*array_1[])() = {smf,}; // C2712
>>
never mind I missed the paragraph above "a static array of pointers-to-functions in a __try block."
>>
>>54644423
roll
>>
>>54644543
list[0] += next_letter


What's your intention here anyway?
>>
>>54643873
O shit waddup
>>
>>54644929
i'm making a basic hangman game for practice because I'm still new

so I want to save the secret word into a variable and then save the user's guesses into a list. When the list == variable, it'll tell the user they've won or whatever. But when I use list + userGuess, it just adds another list item instead of adding the guess into the string contained within the first list item. There's probably a better/easier way to do this but I'm still new.
>>
>>54644738
Is this Java???
>>
>>54645009
Looks like C++ to me.
>>
>>54644981
split the word into an array of characters. when a user guesses a letter, see if any of the characters in the "secret word" array are a match for the guess. you can figure out the rest. good luck.
>>
>>54644738
>>54645032
To me too (though I don't know much Java). But why tf would you make an ArrayList class?? a) that's a name from Java and b) there are more than enough array-ish classes out there.

Anyways, yes, when the parameter is non-POD, the behaviour is different using an initialization list. In the second scenario, itemCount is initialized with it's default constructor, then set to be 0... To confirm this, try passing in an object without a default constructor the second way. It won't compile or my name isn't <REDACTED>

http://stackoverflow.com/a/9903262/6283490
>>
>>54644777
nice trips
>>
What is the easiest way to email in C without any external libraries, i.e. Curl.
>>
>>54645153
Why would you program anything in C without using external libraries?
>>
>>54644981
Doesn't really sound like hangman tbf, you might be making things more complicated for yourself that way

Here's a simple one. Definitely could be implemented better, but you get the idea
import string
import sys

word = 'hangman' # you can set word based on user input too
letters = list(string.ascii_lowercase)

# game
guess = [' '] * len(word) # separated, so you can use it for easily displaying
correct_guess = list(word)

while guess != ' ' * correct_guess:
guessed_letter = input("Choose a letter: ")

if guessed_letter not in letters:
print("Letter chosen already.\n")
continue

if guessed_letter in word:
for i in range(len(word)):
if word[i] == guessed_letter:
guess[i] = guessed_letter
print("Correct character chosen.\n")

print("You win. The word was {}".format(word)
>>
>>54644869
It's an array of function pointers being initialized with a pointer to one of the static member functions of the struct S1 using a C++11 initializer list. The definition of smf is missing.

It results in C2712 because that's an initializer list on the right hand side, which has a destructor.
>>
>>54645153
#include <stdio.h>
#include <string.h>

int main ()
{
char *command = "curl --url \"smtps://smtp.gmail.com:465\" --ssl-reqd --mail-from \"[email protected]\" --mail-rcpt [email protected] --upload-file my_fucking_email --user \"[email protected]:password\" --insecure";

system(command);

return(0);
}
>>
>>54645203
Just suck it up and use libcurl. It's not hard.
>>
Oops, >>54645261 was meant for >>54645153
>>
>>54645207
Oh wait, sys isn't needed.

An alternative to using string for initializing letters is
letters = [chr(ord_letter) for ord_letter in range(ord('a'), ord('z') + 1)]
>>
>mfw working on my Android app
>mfw it was posted on AndroidPolice the other day

Now I can't figure out how to advertise it and shit isn't moving from 150 current installs
>>
>>54645207
Shit you need to add
letters = letters.replace(guess_letter, '')

when you correctly guess a letter
>>
File: point.png (18 KB, 1111x728) Image search: [Google]
point.png
18 KB, 1111x728
Disregard much of what I'm doing in the program I just have a couple questions.

1. How do I get the array passed from main to the function
2. How do I return a new array "value" back to main?

I know it would be using * and &, but I'm just not sure how to implement it and where they would be placed.

Thank you
>>
>>54645560
>this algorithm and tab space
lad why
>>
>>54645560
Bruh its an assignment forcing us to use c-strings only. It's going to look retarded atm. Besides the point I'm not looking for comments regarding the nature of anything I'm doing.
>>
>>54644423
roll
>>
File: akari~nn.png (522 KB, 519x697) Image search: [Google]
akari~nn.png
522 KB, 519x697
None of the pastebin sites seem to like my C program.

Pls rate my dumb music program~
unsigned char b[], r1[], r2[];/* run: 'gcc -o pcm pcm.c && ./pcm | aplay' */
main(p,c,m){p=0,c=1;while(1){for(m=0;m<10000;m++){unsigned char*a=(c)?r1:r2;
putchar(((char)((float)(*(a+m)+*(b+m))/2.0)));}if(p++>2){p=0;c=!c;}}}

https://a.pomf.cat/vbrtpq.c
>>
ITT we do OOP without classes:
module type StateObj = sig (* interface StateObj { *)
val get : unit -> int (* int get(); *)
val set : int -> unit (* void set(int); *)
end (* } *)

let state x = (* class State implements StateObj { *)
(module (* public State(int x) { this.x = x; } *)
struct
let x = ref x (* private int x; *)
let get () = !x (* public int get() { return x; } *)
let set x' = x := x' (* public void set(int x) { this.x = x; } *)
end : StateObj) (* } *)

let () = (* public static void main(String[] args) { *)
let module X = (val (state 100)) in (* State X = new State(100); *)
X.get () |> string_of_int |> print_endline; (* System.out.println(X.get().toString()); *)
X.set 5; (* X.set(5); *)
X.get () |> string_of_int |> print_endline (* System.out.println(X.get().toString()); } *)

run here: https://glot.io/snippets/eeufyni56l
>>
>>54645973
ugh. i almost threw up
>>
>>54643930
>tfw so much nofap that this vid is making you sweat
>>
File: OOHHH WAH AH AH AH.jpg (20 KB, 298x395) Image search: [Google]
OOHHH WAH AH AH AH.jpg
20 KB, 298x395
how many hours would you say that you anons program per day?
>>
>>54646031
4-5 when i have time, 1-2 when i dont
>>
File: block_picking.webm (2 MB, 800x608) Image search: [Google]
block_picking.webm
2 MB, 800x608
Been working on my minecraft clone.

Got some mouse picking action going on, and hooked up some simple left click = turn block to air.

The mouse picking isn't quite fully-featured yet because I don't have a mechanism for knowing which side of a block is picked.

It ended up being more tricky than I thought since I made some poor assumptions about how the scene should recompile after a block is changed.

Basically changes to one chunk didn't affect neighboring chunks so at the boundaries of chunks, when a block was changed to air the sides of its neighbors didn't become visible. So I had to fix some broken code that went unnoticed... maybe I should do unit testing. Yeah I should.


Some of y'all yesterday asked if I have a github for this. Not yet, I would probably want to remove the copyrighted material (the texture file) before I do that. Version control will definitely be important when I start doing optimization though. And unit tests will be important for that too...
>>
>>54646047
i'm a noob so forgive me for the retarded questions but how do you choose what you want to program? For me it's easy because I still need to learn everything, but once you already know all of the fundamentals how do you choose what projects you want to tackle?
>>
>>54646031
About 1-2 at work. Rest of work is spent reading about things I see in job postings so that I can get a better job,.
>>
>>54646058

nice, keep it up.
>>
>>54646058
git?
>>
>>54646058
use this texture pack. Guy gives anyone permission to use it. That one 3ds minecraft clone has it and plenty others.
http://eldpack.com/

git it up nigga
>>
>>54646074
most of the time, i find something that i need to be more productive in programming in general. like recently i made a tool to scaffold new projects i create and configure all my tooling from one master file. another thing i do is when im out of projects to work on ill just throw around hundreds of shitty ideas, right like 10-15 lines of code for them, and then realize how stupid they are. in the process i usually come up with a better idea like "even _____ would be better than this shit" and stick with it.
also, just try to find something you or your friends might use. if you're into ricing, make a tool for backing up config files or sharing them with friends, for example. if you're on IRC a lot then make a script to generate statistics about how you use it (avg. word length, lines per day, etc.). or say you have a big music collection, make a program to sort your music somehow. things don't have to be elaborate, the most fun projects are those that take a few days to get a working prototype out because you can go back and rewrite them or make them better without much work.
and im not gonna lie, coming up with ideas is still one of the hardest parts of programming because even when i do think of something good, im often too lazy to stick through with it and just keep looking for something else to do
>>
>>54646058
wouldn't mind forking this actually, you should make it open source
>>
>>54646031

Depends on the day. Over the past two days, I spent a total of 16 hours (7.5 yesteday, 8.5 today) writing about 1200+ lines of C and YACC, just to get ASTs working for an assignment.

And no, that is not including breaks. I want to think that that's an accomplishment, but then I remembered that a typical working day is 8 hours.

>>54646009

Unless you have something you need to be doing, just go ahead and fap. There are 0 negative side effects (except if you fap so much you neglect your normal responsibilities), and there are some positive side effects, such as alleviating headaches.
>>
File: stallman_gnu_linux_homeless.jpg (173 KB, 672x900) Image search: [Google]
stallman_gnu_linux_homeless.jpg
173 KB, 672x900
If one wanted to create a matrix in C, which would be the better way?
A multidimensional array.
int matrix[3][3];
// Access (2,2)
matrix[1][1];

or a single dimension array
int matrix[3 * 3];
// Access (2,2)
matrix[1 * 3 + 1];

I think that it wouldn't matter in terms of performance because accessing arrays is simply adding to memory address.
>>
>>54644423
roolling
>>
>>54646167
The first is more literally what a matrix is. People are going to look at you weird if you're only using a single-dimension array for a 3x3 matrix.
>>
>>54646195
What about an arbitrarily large matrix?
>>
>>54644423
ROLL
>>
>>54645973
You mean in a language without classes right? Because OO is just an abstraction. What you're doing is just abstracting as well, they are classes
>>
>>54646167
http://www.gnu.org/software/gsl/
gsl_matrx *mat = gsl_matrix_alloc(3,3);
// access (2,2)
*gsl_matrix_ptr(mat, 1,1) = 1.0;
>>
>>54646212
no, it has classes too. this is just using non-OOP language features to implement OOP
>>
>>54646234
Ah sounds fun

I remember a guy in an old /dpt/ thread months ago who used macros in C to closely emulate C++ templates
>>
Success!

import requests
import re
from bs4 import BeautifulSoup

def gettoken(data):
soup=BeautifulSoup(data, 'html.parser')
i=0
for element in soup.find_all(name=True, value=True, type=True):
if i == 2:
print(element['value'])
out=element['value']
i+=1
return(out)

with requests.Session() as c:
url='http://www.pastebin.com/login'

headers='Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'

out = c.get(url, headers={ 'User-Agent': headers})
csrf_token_login=gettoken(out.text.replace('\n',''))
submit_hidden='submit_hidden'
user_name='MYNAME'
user_password='MYPASSWORD'
submit='Login'
print(csrf_token_login)

login_data=dict(csrf_token_login=csrf_token_login, submit_hidden=submit_hidden, user_name=user_name, user_password=user_password, submit=submit)
c.post(url, data=login_data, headers={"Referer":url, 'User-Agent': headers})
page=c.get('http://www.pastebin.com/u/MYNAME',headers={'User-Agent': headers})
html=page.content
print(html)
file=open('finished.txt','w+')
file.write((str)(html))
file.close()
>>
>>54646167

The better way is to use the "syntactic sugar" of C.

Consider if you're accessing an array as array[y][x]. That works. What about using the first version and array[y*3+x]. What if you get mixed up and write array[x*3+y]?

Granted, the same thing can happen if you mix up the x,y order of array[y][x] for array[x][y]? Both are possible, but I'd wager that the array[y*3+x] form is easier to mix up.
>>
>>54646203
Just use the same dimensions that the matrix has. Don't be a goober.
>>
>>54646258
Does the latest version of python3 handle html parsing well without BeautifulSoup? It should be the default imo
>>
>>54646292
I have no idea, I always use beautifulsoup which works smoothly
Didn't even know python could parse html by default
>>
>>54646257
for reference, the direct translation to class syntax:
(* Strictly unnecessary, since interfaces can be anonymous*)
class type state_obj = object
method get : int
method set : int -> unit
end

class state (x) : state_obj = object
val mutable x = x
method get = x
method set x' = x <- x'
end

let () =
let x = new state 100 in
x#get |> string_of_int |> print_endline;
x#set 5;
x#get |> string_of_int |> print_endline
>>
>>54644606
Ikaruga?
>>
>>54646322
HTMLParser in python2 (you need beautifulsoup iirc because it truncates past special html symbols beginning in & like &pound)

html.parser in python3, haven't used it yet
>>
>>54644423
roll
>>
>>54644423
Roll
>>
>>54646398
TMS or WMS? too many TLAs
reroll
>>
Fuck me. Ate some bad meat for dinner. I can tell because of the rancidity of my belches. Stomach is killing me. What do?

Also working on a compiler for a simple language so I can visualize the compilation process. Should be valuable in teaching students how compilers work at a high level. I'm trying to convince the CS department at my Uni to start up a Compilers course as a senior elective/graduate course.
>>
>>54646475
Nice blogpost fag.
>>
>>54646583
>hey /g/ what are you up to?

Also really want advice about stomach pains. Shit is keeping me up.
>>
File: 1457838965559.gif (247 KB, 480x430) Image search: [Google]
1457838965559.gif
247 KB, 480x430
>>54645887
>2000 lines of code

What the fuck
>>
>>54646475
>>54646602

If it's bad meat you ate, you probably have some food poisoning, and the only thing you can do is ride it out. It would help to stay hydrated, so make sure you're drinking enough water (or I dunno, Gatorade). If the symptoms get worse, see a doctor.

t. Google.

Also, I'd like to see my CS department have more courses in general. We have a compilers course, which I'm taking right now, but no courses that go beyond the basics. I'd like to study some advanced compiler optimization techniques, or perhaps see how to build JIT compilers. I'd also like to take a course on developing device drivers or firmware.
>>
Someone write me a program that rotates my screen to 'potrait(flipped)' upon execution

preferably without a separate library, although it doesn't really matter. Any language too
>>
>>54646712
He'd be cray if he didn't store that binary data in a binary file
>>
>>54646475
>Stomach is killing me
not sure if it could help, but... omeprazole is really good against gastritis
>>
>>54645887

It compiles with warnings, so it's trash. Moreover, the type signature for main is wrong. The main function should only ever have one of the following type signatures:

int main(void) { /* no command line args * }
int main(int argc, char *argv[]) { /* with command line args */ }


Anything else is garbage.
>>
>>54646717
>but no courses that go beyond the basics. I'd like to study some advanced compiler optimization techniques, or perhaps see how to build JIT compilers
I don't think they'll offer that to undergrads (maybe you're a grad). But the idea behind tracing JIT compilers is pretty simple. The implementation can be very involved however because you need to make an interpreter as well as a machine-code compiler. The tracing step counts the number of times certain instructions in the interpreter are executed and once the number increases past some preset limit you've detected a "hot loop". Then the JIT engine generates machine code for that loop, or the full method and then replaces the interpreter code with a jump to the generated mcode in the heap.

The LuaJIT is an excellent starting point when learning how to do JITing and optimization. The entire thing is all of 60-70 kLoC, which is manageable. There is good documentation of the technical features including the bytecode and IR used, and -jdump allows you to see all exactly how the JIT decides to compile a method and all levels of the compilation.
>>
>>54646827
these comments are irrelevant when you consider the code is obfuscated
>>
>>54646827
>it complies with warnings
Not on my machine.
Also, im taking advantage of pre ANSI C
If you don't declare a type in the signature, a variable is implicitly an int
>>
File: intense_gore.gif (2 MB, 360x202) Image search: [Google]
intense_gore.gif
2 MB, 360x202
I've been doing some benchmarks testing the speed of different implementations of matrices. I have been using Lua as a kind of test program and I'm trying to compare it to C.
Here is a one dimensional version of a matrix.
#!/usr/bin/lua

array = {}
row = 10000
col = 10000

for i=1, row do
for j=1, col do
array[row * i + j] = 1
end
end

print(array[500 * row + 500])

And here is the two dimensional array.
#!/usr/bin/lua

array = {}
row = 10000
col = 10000

for i=1, row do
array[i] = {}
for j = 1, col do
array[i][j] = 1
end
end

print(array[500][500])

I made sure there were no background processors doing any computation work which could affect the speed by taking usable resources. I used the "time" command to produce the following times taken:

$ time ./1darray.lua 
1

real 0m6.569s
user 0m6.336s
sys 0m0.232s

real    0m4.311s
user 0m3.832s
sys 0m0.476s

This is quite strange for some reason because the 1D array doesn't seem to be that quick as one would expect.

I tried to do the same thing with C. For the 2D array I had:
#include <stdio.h>
#include <stdlib.h>

#define ROW 10000
#define COL 10000

int main(int argc, char **argv)
{
int **array = malloc(sizeof(int) * ROW);
int i, j;
for (i = 0; i < ROW; ++i) {
array[i] = malloc(sizeof(int) * COL);
for (j = 0; j < COL; ++j) {
array[i][j] = 1;
}
}
printf("%d\n", array[500][500]);
return 0;
}

and I got
real    0m0.255s
user 0m0.184s
sys 0m0.068s

Here is the code for the 1darray:
#include <stdio.h>
#include <stdlib.h>

#define ROW 1000
#define COL 1000

int main(int argc, char **argv)
{
int *array = malloc(sizeof(int) * ROW * COL);
int i, j;
for (i = 0; i < ROW; ++i) {
for (i = 0; j < COL; ++j) {
array[i * ROW + j] = 1;
}
}
printf("%d\n", array[500 * ROW + 500]);
return 0;
}

However, the 1darray doesn't even seem to stop. Why is the 1darray in both cases much slower than the 2d array?
>>
File: 2016-05-20-01:47:15-scrot.png (10 KB, 512x320) Image search: [Google]
2016-05-20-01:47:15-scrot.png
10 KB, 512x320
>>54646872
I suppose it works on your machine, too?
>>
>>54644423
roll
>>
>>54646899
Maybe you should pipe the output to your sound card.
>>
>>54646896
I'm guessing because with multi-dimensional arrays, the compiler will optimize how it jumps to the relevant 1st dimension, whereas with the single-dimension array, it multiplies at a higher-level first.

This is weird considering I reckon C would use a quick mult opcode either way. You'd have to disassemble your compiled executable and see what's what
>>
>>54646929
oh huh, reading comprehension huh.
>>
>>54646827

First line forgot to close comment with a /. Derp.

>>54646825

A quick google on this drug suggests that it may not be wise to take when one has food poisoning. Or rather, that it may increase the chance of food poisoning, which Anon already has.

>>54646854

I am in grad school. Available electives are, sadly minimal.

>Then the JIT engine generates machine code for that loop, or the full method and then replaces the interpreter code with a jump to the generated mcode in the heap

Eh, I think there's a few JIT compilers that just flat out JIT compile every method without fail into native code. What I'd like to know is how to best translate bytecode into machine code, to balance for both efficient machine code and fast translation.

I've got an idea to try to make a port of the CoreCLR to Risc-V as a personal project, maybe over the summer, but I'd like that the JIT I make not run like dogshit.

>>54646872

GCC warns that your variables are untyped, and thus will be implicitly int, and also warns that you implicitly used putchar without including its header file. Either your compiler is old or your compiler is shit.
>>
>>54646964
>GCC warns that your variables are untyped, and thus will be implicitly int, and also warns that you implicitly used putchar without including its header file. Either your compiler is old or your compiler is shit.
You missed the part where he was saying he's taking advantage of pre-ANSI C.
>>
>>54646772
no
>>
>>54646964
>Eh, I think there's a few JIT compilers that just flat out JIT compile every method without fail into native code.
That's the whole reason for detecting the hot loops; the idea being tracing. Only compile what gets run often or repeatedly.
>>
Alright clojure lads, I'm trying to make a histogram. So I got a set of numbers between 1-255 and I want to round them to the nearest multiple of 8 and count the occurrences of them.

So is there some easy way I've totally overlooked to round each number to the nearest multiple of 8?

Once I have that the frequencies function should do the rest.
>>
>>54646896
In the second one the nested loop begins with i = 0 instead of j = 0.
>>
>>54644295
I don't use Mac OS X, but this tutorial was perfect.
https://developer.apple.com/library/mac/documentation/OpenSource/Conceptual/ShellScripting/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004268
>>
>>54644423
Rollos
>>
>>54643938
Truely vaporwaveis dead
>>
>>54644606
>Lisparuga is supported on GNU/Linux systems only.
hurr, developer couldn't be assed to look at Unixlikes other than GNU/Linux
Typical GNUtard.
>>
>>54647174
Aww poor mac user.
>>
>>54647051
>So is there some easy way I've totally overlooked to round each number to the nearest multiple of 8?

DuckDuckGo is your friend.

(define ((round-to-n base) num)
(* (round (/ num base)) base))

(define round-to-8 (round-to-n 8))

(round-to-8 5) ;=> 8
(round-to-8 9) ;=> 8
(round-to-8 15) ;=> 16
>>
>>54646167
The first example takes up more memory and if you want to heap allocate the matrix it becomes a mess.
In that case you might want to do a single dimensional array, and you could make a few helper functions to abstract over it so that it "feels" two dimensional
>>
Is there anyway to define inside of defines in C? I'm trying to do
#include <stdio.h>
#include <stdlib.h>

#define ROW 10000
#define COL 10000

#define make2Darray(type, name, x, y) \
type (*name ## _raw)[x][y] = malloc(sizeof(type) * x * y); \
#define name (*name ## _raw)

int main(int argc, char **argv)
{
make2Darray(int, array, ROW, COL);
for (int i = 0; i < ROW; ++i) {
for (int j = 0; j < COL; ++j) {
array[i][j] = 1;
}
}
printf("%d\n", array[500][500]);
return 0;
}
>>
>>54647401
And
#define free2Darray(name)
free(*name ## _raw);
*name ## _raw = NULL;
#undef name
>>
>>54647401
Don't try too hard with C macros. They're shit. If you want power, use another language.
>>
>>54647490
If I want optimal code, I want C. Is there another macro system I could use with C? I know of shit like m4, but I don't know anything about it.
>>
>>54647511
You don't want to over abuse the macro system like this. C macros aren't powerful enough to do what you want, and piling on additional macro systems is just going to make your code complicated and non-portable.
Just find a solution that doesn't require macros. If you're trying to write generic code, use goddamn C++. Use C++ JUST for the templates, if you have to. You'll get "optimal code" (question yourself why do you want "optimal code" so badly?). Just don't expect anything great from C.
>>
>>54647511
Actually for math shit FORTRAN is faster.

I wouldn't worry too much about 2d arrays though.
int * arr = malloc(sizeof(int)*x_max*y_max);
arr[x + y*x_max] = 1;

It's not that bad.
>>
>>54644688
vagrant
>>
>>54647569
I just don't like having to type that shit out. I like my code to be aesthetic.

>>54647555
Might as well use
 new int[x][y]; 
if I'm using C++. I guess I really should spend the time to learn C++ proper.
>>
>>54647308
>imblyng
OpenBSD, Minix, Solaris, and more
>>
>>54647650
>Solaris
You truly believe what you're saying?
>>
>>54647625
>I like my code to be aesthetic.
The C macro system is the opposite of a e s t h e t i c, though.
>>
>>54647625
You DEFINITELY should learn C++.
Check this shit out:
#include <cstdlib>

template <typename T, int W, int H>
struct Array2D {
T* buffer;

/* constructor automatically called
when variable is created */
Array2D () {
data = malloc(sizeof(T) * W * H);
}
/* destructor automatically called
when variable goes out of scope */
~Array2D () {
free(data);
}

/* T& is a "reference", like a pointer
but you don't have to explicitly dereference.
also "reference"s can never be NULL */
T& at (int x, int y)
{
return data[x + y * W];
}
};

const int ROW = 10000;
const int COL = 10000;

int main ()
{
Array2D<int, ROW, COL> array;
for (int x = 0; x < COL; x++)
for (int y = 0; y < ROW; y++)
array.at(x, y) = 1;

/* array automatically freed */
return 0;
}


Yes, lots of things about C++ are bloat and are a mess but it's also REALLY nice, all at little to no cost to performance. I haven't even gotten into stuff like smart pointers and value/move semantics that would make the above code safer and easier to use.
>>
>>54647650
You're still a poor downtrodden mac user.

>>54647625
Well for aesthetics no matter what you do C is going to be ugly. And C++ is even uglier (besides C++ is a mess).

Evil defines are aesthetically infinitely worse than that anyway.
>>
>>54647673
Not to mention C++ gives you an opportunity to do your taxes every few minutes! Oh and all the edge cases and gotchas! The wonderful template error messages!

The compiler specific ABI's are great too! I love compiling my code for every compiler i use! I love absolutely ~needing~ full source to use someone else's tools! It really helps make C++ be a great low level language!
>>
>>54646896
What the fuck. Just tested both C programs. The array of arrays (malloc in loop) does better than the 1D array with manual offsetting. Cache effects are a bitch.
>>
>>54647732
What's your alternative?
Yes, I know fully well that template/overloading errors are fucking annoying, and that a lack of standardized mangling was a horrible idea.
But the only other options are C and Rust.
C offers only a few abstractions at all, and a shitty macro system. Rust is like a grammar nazi on steroids, too restrictive to be a systems programming language and too low level to be an application programming language.
I would however argue that good C++11 code can be "prettier" than the C equivalent, and certainly easier and less bug prone.
>>
I was told Visual C++ was good for learning C on, but it seems like a pain in the ass. What should I use?
>>
>>54647768
clang on linux
>>
>>54647760
>too restrictive to be a systems programming language
It isn't. Also there is unsafe to fall back on.
>>
>>54647768
gcc or clang on linux, but lacking that, mingw should be fine. On a dedicated server it's maximum comfy.
>>
Can you help me with a python import error?

I'm debugging my program in Eclipse 4.5.2 using PyDev 5.0.0.
Somewhere in it, I need to import a module from an SVN server but I get this error:
ImportError: No module named shot_classification

Normally I'd just include the parent folder for shot_classification in the PYTHONPATH and it should work, but just adding the https link to the SVN repo to the PYTHONPATH obviously doesn't work. Is there some black magic shit I need to do? This error didn't show up on my old work pc and I haven't changed this file since I last ran it on the old pc.

code example:
#
# program_being_debugged.py
#
# {...}
from module_loader import load_module # this is successfully imported
# {...}
repo = 'https://this.is.censored.com/svn/svn_ShotClassification/trunk'
rep_link = repo + '/python/shot_classification/path_to_file/file_to_include.py'
cvj = load_module(rep_link, perform_svn_update = True)
# {...}


module_loader basically goes to the given SVN repo, finds all the modules in it (which works as it should) and imports them. It finds all three modules in the SVN repo: shot_classification (which is what I want), jobs and camview_job and attempts to import them in that order.
import imp
# {...}
# modules = ['shot_classification', 'jobs', 'camview_job']
def import_module(modules):
for m_name in modules:
params = imp.find_module(m_name)
module = imp.load_module(m_name) # <-- Import Error here
return module
>>
File: 1462919343695.jpg (98 KB, 900x675) Image search: [Google]
1462919343695.jpg
98 KB, 900x675
I just downloaded Qt, I've never tried it before.

First of all, I thought it was open source, why are they charging for licenses? I downloaded the online version with the LPGL license, is it going to be automatically uploading my project to some repository?

Second, and more importantly, does anyone have a tutorial? Their site has a bunch of B-roll images and buzzwords but I can't find a fricken tutorial.
>>
What are some personal projects one can do around things like Hadoop and Spark? It seems like those aren't really things you can work with on an individual level so how can you get the experience wanted on job applications?
>>
>>54648165
It's free (as in tacos) for people who use it in their free (as in America) software. They offer enterprise licenses so your company can use it without having to release any source code.
>>
Still writing my game in C++ on android.

I've finally ported it to Linux using annoyingly ancient X calls for window creation.

Got sound working with OpenAL and Oggvorbis (allows me to do all sorts of effects!)

software dev interview in Seattle next week... A little nervous about it
>>
>>54648227
>(current-year)
>making direct calls to X
2004 called. They think you're a perfect hire.
>>
>>54647760
>t, and certainly easier and less bug prone.
only if you know what you're doing. C++ offers a lot to shoot yourself with.
>>
>>54648266
and I'll rewrite it to wayland as well.
It's not that hard actually. this is fullscreen opengl after all.
>>
>>54648176
>What are some personal projects one can do around things like Hadoop and Spark?
When I was going to get into this shit I planned to just roll out a couple vms to use as a cluster, to train for the "devops" parts of working with the spark stack (you can google some tutorials - "local hadoop cluster on virtual machines" or smth similar).
As for developing spark apps themselves you can learn how to do it without deploying to a set of beefy servers, all the principles are the same as for developing on local machine, just take some typical problems solved by spark and scale them down.
>>
>>54648176
build a mini distributed search engine.
>>
>>54648373
>>54648176
Also, pluralsight's spark course seems to be pretty decent. And you can get a couple months of pluralsight for free if you register for this ms thing: https://www.visualstudio.com/en-us/products/visual-studio-dev-essentials-vs.aspx
>>
>>54644738
First one is objectively superior. It's the only way to initialize members that require values upon initialization, such as const or reference members, and it can be more performant than assigning values in the body of the constructor.
>>
>>54648409
>>54648385
Thanks for the recommendations. I wasn't able to get an internship this summer so I'm looking for something to do and I'm interested in big data stuff, I'll take a look into doing a course and then maybe doing a search engine. Thanks guys!
>>
>>54648448
>nks for the recommen
just find the API and get working. fuck courses
>>
>>54648494
I guess my problem is that I do not really know where to get started on anything. Right now I'm working on a baseball simulator using Qt which I enjoy working on plus I get to play it on my phone. I guess I do not see a major need to drop that project just because I think it doesn't look too impressive on a resume
>>
>>54644738
second one calls the default constructor first, then sets them. The first is "better". But for built in types like int either is good.
>>
C question:

I use openmp to parallelize my code. It works really well, but there's something I can't seem to achieve: My code should parallelize depending on what exactly it does: It can render images, but also whole video clips. If it does the first, it's supposed to assign a part of the image to each thread. If it does the latter, it is supposed to assign a whole frame to each thread. It is simply much more efficient to do it that way. So is there any kind of pragma directive that can do this depending on the value of a C variable, like
int animation_flag = 0;
…
#pragma omp parallel for if ( animation_flag )
for ( …; …; … )
{
…
}
>>
>>54648693
#pragma is compiler specific command
I wouldn't use them at all if you can avoid it.
You don't want your build breaking when you switch from gnu gcc to clang
>>
>>54648776
http://openmp.org/wp/openmp-compilers/
>>
>>54648227
Why not use sdl for creating the window?
>>
File: 1523632463.jpg (42 KB, 565x376) Image search: [Google]
1523632463.jpg
42 KB, 565x376
>>54648196
that doesn't make any sense. so I can program my whole application using the free version, buy a license and then suddenly I'm not required to share the source code just because I'm now sending them a paycheck? who are they to tell me?
>>
>>54648873
>who are they

IP holders
>>
>>54648693
pragma before a for loop? doesn't look very clean
>>
>>54648902
To my knowledge that is just the way openmp works.

>>54648776
To me it is by far the most convenient way to implement parallel code. I could get into pthread.h, but I only heard the worst of things. With openmp the parallelization is literally just two lines of code and it's done.
>>
>fuck off trap fags
welcome to 4chan newfriend, traps been a part of the culture since /g/'s inception, lurk moar to find out more
>>
>>54648984
only a small part of the culture, and it's often ironic, it doesn't justify being a fag
>>
>>54648693
>is there any kind of pragma directive that can do this
Literally the first paragraph in openmp cheat sheet http://openmp.org/mp-documents/OpenMP-4.0-C.pdf
#pragma omp parallel [clause[ [, ]clause] ...]
structured-block
clause:
if(scalar-expression)...
>>
>>54649004
>only a smart part of the culture, and it's often ironic
kebabs are just one of the thousands of things in turkish culture, yet they're pretty major retard
>it doesn't justify being a fag
idk, homosexuality is pretty common, but having an irrational anger against it isn't, you should at least try to seem normal because you're an embarrassment anon
>>
>>54649033
>>>/lgbt/
>>
>>54646153
It makes some headaches worse, mainly those related to high blood pressure.
>>
>>54649033
No, the desire to interlace your sexuality to everything isn't common.

/g/ - technology
not
/g/ - histrionic
>>
>>54649044
>>>/facebook/
>>54649060
actually it's basic human behavior, it's sad that I have to tell you this myself anon
/g/ = gay crossdressers
>>
>>54649073
stay delusional fag
>>
>>54647673
>T* buffer;
>uses name "data" for the rest of the program

good job
>>
>>54649085
i don't remember believing you to be intelligent.
>>
>>54648196
>america
>free
>not a corporate-cucked shithole

travel moar
>>
>>54649106
(You)
>>
>>54649073
The real question you should be asking yourself is, would you be rationalizing homosexuality if you weren't an homosexual yourself?

So, what kind of person does that make you?
>>
#include <stdlib.h>

int main(void)
{
for(;;) char *p = malloc(1);
return 0;
}

why does this crash?
>>
Python 3.5.1 |Anaconda 2.4.1 (64-bit)| (default, Dec  7 2015, 11:16:01) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = [1,2,3,4]
>>> b = a
>>> b.remove(1)
>>> print("a : %s" % a)
a : [2, 3, 4]
>>> print("b : %s" % b)
b : [2, 3, 4]
>>>


w...what?

how can I perform this operation?
>>
>>54649119
<3
>>54649127
a person who doesn't think everything is a crime and has a guilt complex lol? it's alright senpai, one day you'll have the pride to admit and come out :D
>>
>>54649154
You need to do a deep copy of a, a simple equals is a shallow copy (equivalent to pointing to the same space in memory)
>>
>>54649154
What operation?
> make a list of integers 1 through 4, call it a
> tell python that it can call this list b as well
> remove the first element from the list of integers
> print it twice by referring to it as a, then as b

Basically b = a tells python that they are one and the same.
>>
>>54649191
yes thanks I just read this http://henry.precheur.org/python/copy_list
and I understand now
>>
>>54643873
I never thought I'd say this, but I would actually prefer trapfaggotry to flavor-of-the-month memes.
>>
>>54649154
>>54649191
>>54649195
>>54649204

>>> a = [1,2,3,4]
>>> b = []
>>> b = list(a)
>>> b.remove(1)
>>> print("a : %s" % a)
a : [1, 2, 3, 4]
>>> print("b : %s" % b)
b : [2, 3, 4]
>>>


fixd
>>
File: fragezeichen yui.png (94 KB, 396x395) Image search: [Google]
fragezeichen yui.png
94 KB, 396x395
Why is operator overloading allowed in languages? Why would you want to allow people to write ambiguous garbage programs?
>>
>>54649210
the trapfaggotry is the root of the problem, this thread wouldn't exist if it wasn't for the trapfaggotry
>>
>>54649226
Weil du dich da unten anfässt.
>>
>>54649226
in C++ it's ok because the programmers are assumed to be experts.

in C# it's plain retarded, Csharts are fucking clueless.
>>
>>54649006
Thanks m8, you just made my code 100 lines shorter. Thanks for the link too
>>
>>54649243
Sorry. I'm originally from Turkey. I can't speak German yet, but I saved this picture from a German site.
>>
>>54649245
What's the difference between operator overloading in C++ and C#?
>>
>>54649267
You'll fit right in with 80% of our population. Refugees welcome!
In case you were serious: I said
> because you touch yourself down there
>>
>>54649295
Danke.

I'm starting German school next month btw. My English is already good so it shouldn't be so hard.
>>
>>54649294
C# is a shit language used by pajeets and nathaniels, it doesn't need operator overloading and all the other extraneous shitty little features, even the language designers are starting to realize that they're being fucking retards https://www.infoq.com/news/2016/05/csharp7-pattern-matching-removed

but for C++ it can be useful (when used responsibly) in order to implement matrices, vectors, imaginary numbers, high precision arithmetic types etc with clean syntax, for example http://www.boost.org/doc/libs/1_57_0/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/cpp_int.html
>>
>>54649362
Oh, you're one of those.

I shouldn't have dignified you with a response.
>>
>>54649368
kill yourself retard
>>
>>54649368
>doesn't want to respond to someone
>still does it
thanks for proving the point about meme language programmers IQ lol
>>
>>54649226
write in a functional language (like F#)
operator overloading is based (partly because operators are not treated specially in F#)
>>
Me again.
>>54648161
The error actually crops up one line earlier, when module_loader tries to call imp.find_module(m_name)

Can anyone please help?
>>
Can someone explain OpenGL vertex array objects/vertex buffer objects to a retard
>>
File: walrus serious.jpg (177 KB, 1200x630) Image search: [Google]
walrus serious.jpg
177 KB, 1200x630
>>54649226
think about a struct/class representing an RGB color. if any of the two colors are added together, you want the result to be the correct color that would result in the addition of the two given light combinations. overloading the + operator here makes perfect sense. overloaded comparison operators are also very useful, especially when defining how the objects will be used in some container. operator overloading is also crucial in generics.

so basically for a lot of good reasons.
>>
>>54648776
>I wouldn't use them at all if you can avoid it.
yeah, incompetents shouldn't use advanced features
>>
>>54649106
BTFO
>>
>>54649153
it doesn't tho
>>
>>54649515
I already write functional code in Scheme

I'm glad that Lisps aren't obsessed with mathematical symbol circle jerking in the way ML type langs are
>>
>>54649577
VBOs are arrays
VAOs are collections of VertexAttrib calls, so binding a VAO is equivalent to making those same calls.
>>
got an exam on AI with prolog in an hour, but theres no practice questions or anything. should i revise on AI, or prolog programming?
>>
File: jesuscard.png (262 KB, 540x285) Image search: [Google]
jesuscard.png
262 KB, 540x285
is OOP just an attempt at retard mitigation to prevent human error? I'm not a part of the antiOOP circlejerk because it seems like a cool way to structure shit but it seems like any time you actually need something performant it turns into "always do the opposite of what OOP says" with global variables and code duplication everywhere
>>
>>54649577
vertex buffer object: array of vertex attribute data, the data that the vertex shader gets as "attribute" variables, for example position, color or anything you'd like

vertex array object: think of it as an array of vertex buffer objects
>>
>>54649698
it's a great way to structure your code from a software engineering point of view and can be reasonably performant, still orders of magnitude faster than webshit languages
>>
>>54649698
read OOP backwards
>>
Is making my program virtually unnoticably slower in order to make it significantly easier for me to write it a crime? Hardcoding state instead of making it data driven will make my life much, much easier.
>>
>>54649226
It can save you a lot of documentation reading. Imagine you load some lib for complex numbers and every little operation is saved as some stupid function that's named without any conventions. Is the function to add two complex numbers "add_complex", "addComplex" just "add" or "add_c" or whatever? It would be annoying as hell. Luckily operator overloading exists. Though even operator overloading can be pretty fucking annoying and ambiguous, i.e. in numpy where "*" is element-wise multiplication when dealing with numpy.array, and "*" is matrix-multiplication when dealing with numpy.matrix. It makes sense of course, but it's easy to forget, especially because it's often not easy to see what kind of object you are working with atm.
>>
>>54649732
That's why you only should do OOP specifically in object-oriented languages (OOL)
>>
>>54649737
no it's fine. even for performance-oriented applications you don't need to micromanage and spend a lot of effort squeezing out the last few percent of performance, the big picture is more important
>>
>>54649698
no, it stems from the way humans naturally understand and categorize things. If I call some physical object in this world a cat, that means something, we understand it to be some four legged creature that eats meat, makes some type of noise, moves in certain manner, etc...

OOP thus is attempting to let you define "objects" just as we define their physical representations in this world. Of course in computer science, we need to be confined to real or physical objects, that is abstract objects can be just as, if not more, useful.

In terms of performance, your statement is highly anecdotal. Based on your question I'm going to guess you don't have much programming experience, in that case you shouldn't be worried about performance. Most amateurs hate hearing that, thinking they want to learn how to write fast code write away, but fast code is highly dependent on your application, data flow, language, compiler and the system you're running it on. "Premature optimization is the root of all evil."
>>
>>54649606
thanks bay x
>>
File: attention_whore.jpg (30 KB, 400x375) Image search: [Google]
attention_whore.jpg
30 KB, 400x375
>>54649768
KILL YOURSELF
>>
>>54649698
Everything beyond machine code is an attempt at retard mitigation to prevent human error.
>>
>>54649698
It's a way to organize imperative code
And design patterns are a way to "fix" OOP
>>
>>54649749
>especially because it's often not easy to see what kind of object you are working with atm
#justpythonthings
>>
>>54649800
>dear design patterns fix OOP
>they're not the primary problem with OOP
WeW lAd
>>
>>54649782
Why? My life is actually worth living :^)
>>
>>54649873
>fag shilling and attention whoring in an amateur programming thread on the autistic underage poorfag consumerist subsection of a weeb neckbeard pedophile forum
sure sounds worth living
>>
>>54649873
>lying on the internet
m8...
>>
>>54649909
>REEEEEEEEEEEEEEEEEE
>get the hell out of muh GEEE
>>
>>54649758
you must not do much realtime at your website mill
>>
>>54649698
It is inherently stateful, and thus harmful
>>
>>54649758
One rupee has been deposited into your account Rajeesh
>>
shitpost
>>
>>54649973
you're the boss
>>
>>54649949
java is like ~2-3 times slower than C/C++, it's not slow compared to most languages, and GC pauses are not an issue if you don't spawn countless new objects like a retard (which would be slow in any language), and realtime is a niche which has higher requirements than pretty much all other applications, it's ok to spend orders of magnitude more man hours on a realtime program than the equivalent normal project
>>
>>54649909
>>54649912
well I'm sorry your lives are sad but it's not my fault. I'm feeling pretty happy rn :^)
>>
>>54649994
and thanks to JIT compilation, java is among the fastest for long-running applications, someone post the web server benchmark if you have it
>>
Instead of allocating/deallocating dynamic memory I'll just preallocate 1kb and use that for everything y/n
>>
>>54650023
>dynamic memory
do you mean on the stack as in functions or malloc/free

use dynamic memory for anything that isn't too big to fit on the stack or needs to persist in global scope
>>
>>54650002
>pretty happy rn :^)
>:^)
we can all tell you life is empty lad
>>
>>54649994
Java has the VM side as well

Is there any recent benchmarks comparing Go and Java for GC?
>>
>>54650023
>>54650044
>C dynamic memory allocation refers to performing manual memory management for dynamic memory allocation in the C programming language via a group of functions in the C standard library, namely malloc, realloc, calloc and free.
oh nvm

yeah use a preallocated chunk of memory if you know your usage in advance
>>
>>54650055
You seem to have a hard time accepting others might have happy lives, I feel sorry for you lol
Thread replies: 255
Thread images: 27

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

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