[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/g/ - Technology

View post   

[ Toggle deleted replies ]
File: 187 KB, 1578x1668, 1538143303183.png [View same] [iqdb] [saucenao] [google] [report]
67876598 No.67876598 [Reply] [Original] [archived.moe] [rbt]

What are you working on, /g/?

Previous thread >>67872508

>> No.67876613

working on my peer to peer bluetooth network `blech`

>> No.67876614

>rust almost as slow as PHP

>> No.67876616
File: 294 KB, 1201x1201, 1537905577015.jpg [View same] [iqdb] [saucenao] [google] [report]

Wrote a compiler for CHIP-8 assembly using Python, since it's only a 35-opcode architecture

Pic related

>> No.67876628
File: 2.26 MB, 3360x2100, scrot.png [View same] [iqdb] [saucenao] [google] [report]

post a screenshot of your code

>> No.67876638

>Wrote a compiler
>Pic related

>> No.67876645
File: 224 KB, 1309x764, chip8.png [View same] [iqdb] [saucenao] [google] [report]

CHIP-8 assembly abstraction on the left

CHIP-8 emulator code showing opcode parsing on the right

>> No.67876655
File: 228 KB, 1000x564, 1538065062326.jpg [View same] [iqdb] [saucenao] [google] [report]

>69 ms and 110 ms are almost the same

>> No.67876659

that could be alot terser if you stored that in a data structure instead of hardcoding it

>> No.67876668

Rust reigns once again

>> No.67876680

>loses to PHP in IPs
rust is joke

>> No.67876681

where's Nim?

>> No.67876683

little late, but install shen

>> No.67876689
File: 378 KB, 1600x900, Screenshot from 2018-10-01 18-25-34.png [View same] [iqdb] [saucenao] [google] [report]

Oops lel

Pic related. It's shite code, but this was in my first month or 2 of learning python

>> No.67876692
File: 541 KB, 500x1155, xOuA2dr.gif [View same] [iqdb] [saucenao] [google] [report]

>case statement
the simplest, ugliest way to implement an interpreter.

>> No.67876695

total matters you cuck

>> No.67876717

It's only 35 opcodes tbf fampai and I started this project like 3 years ago when I was somewhat more of an idiot. Only just got back to it and can't be bothered changing it

>> No.67876719

>losing to PHP

>> No.67876729

it's also the fastest way seeing it can be optimized down to only one/two instructions by the compiler

>> No.67876730


>> No.67876736

>JS beating all of these languages even before optimizations on subsequent calls
Holy shit

>> No.67876737

is _start hardcoded to be the program entrypoint with gnu ld or can I change it with a linker script?

>> No.67876739

A or B? Forget about the first curly. I'm only interested in the second.

if (){
// A

if (){
// B

>> No.67876748

if(cond) {

you tool

>> No.67876752

A. Never seen anyone do something retarded like B

>> No.67876755

first obviously.

>> No.67876757

no matter who wins or loses.
multi-lang benchmarks are mostly ass because some langs will always be written better and take advantage of language specific tools. And others will be written like a first-month user just learning it.

>> No.67876763

get a loads of this mad rustfag

>> No.67876764

{ if (foo)
{ if (bar)
{ if (baz) qux(); }}}

welcome to lisp town

>> No.67876770
File: 33 KB, 500x500, 1536636142018.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.67876775

All right then. A it is.

>> No.67876776

you're mistaken, i'm a deadlang/ nim user.

>> No.67876793

>gtilab's UI front-end is broken again

>> No.67876796

Holy shit Rust is fast. FAST.

>> No.67876808

Looks fine to me. Never seen gitlab before though

>> No.67876810

No, it's a silly way with a bunch of useless testing.
You know where the next instruction is, so just jump to its handler directly instead of going through a switch again.
Unfortunely hardly any language exposes that kind of construct to you.

>> No.67876825
File: 28 KB, 486x332, image0.jpg [View same] [iqdb] [saucenao] [google] [report]

nice license.
other than that, learn haskell

>> No.67876839

based and redpilled

>> No.67876868

Is there a language that does that? Cause I can't imagine not going through a switch to know what the next handler is in C though I use it rarely and only as a hobby for things like CHIP-8, so maybe I'm just being an idiot

>> No.67876888
File: 21 KB, 322x640, 1536636142019.jpg [View same] [iqdb] [saucenao] [google] [report]

>C# cucks right now

>> No.67876898

>Unfortunely hardly any language exposes that kind of construct to you.
thats my point, switch case with int constants is the next best thing you can do if you can't directly control the instruction pointer

>> No.67876912

C with GNU extensions has address of label so you can make a table of addresses and every handler "returns" with goto *op[ip++]

>> No.67876917

So is C, losing to JS lmao

>> No.67876949


Should that be read "for [any] government or an organization that benifits [sic] Israel", or "for a government that benefits Israel or an organization that benefits Israel"?

>> No.67876977

>tfw remembering a talk years ago about how JS can be almost as fast as C when optimized
>tfw this speed pre-optimizations

>> No.67877001

Whats a good reference on modern C++?
I know a bit of this and that, but I feel kinda lost and need to relearn what i should/shouldn't use

>> No.67877007

Thats because no one uses the standard regex and its just kept for backwards comparability, everyone uses other libraries which are much faster. ms said they have other stuf to care about and wont be improving it since alternatives exist.

>> No.67877024

No worries. I wouldn't even touch C# if even semi decent performance is of any concern.

>> No.67877025

This covers 90% of what you need to know.

>> No.67877039

This. Also the c++ core guidelines: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines

>> No.67877040

>ms said they have other stuf to care about
Why do they choose to appeal to normies this hard?

>> No.67877044
File: 147 KB, 684x1007, emasc.png [View same] [iqdb] [saucenao] [google] [report]

Now is the time boys

>> No.67877053

>he fell for the meme

>> No.67877079

How about I, uuhh, C-d... your mum

>> No.67877088

JavaScript rocks!

>> No.67877096


I replied in the dying thread, but here's my attempt at what you did. No case statements, those are a good idea.

>> No.67877098

So now both vim and emacs are memes? what the fuck Am I supposed to use? Atom??

>> No.67877103

Based, redpilled and checked

>> No.67877108


>> No.67877114

Nim has PCRE built into the standard, so it should be similar to C/Rust.

>> No.67877134

>ms profitsource editor
no thanks

>> No.67877143

>open source is great unless ((they)) do it

>> No.67877162
File: 252 KB, 717x533, 1417104688232.png [View same] [iqdb] [saucenao] [google] [report]

import random

def name(a, b, c, d, e):
fname = a + b + c + d + e
return fname

clist = ['b', 'c', 'd', 'f', 'g',
'h', 'j', 'k', 'l', 'm',
'n', 'p', 'q', 'r', 's',
't', 'v', 'w', 'x', 'z'

vlist = ['a', 'e', 'i', 'o', 'u']

dlist = ['mighty', 'wicked', 'destroyer',
'tactician', 'undying', 'sunholder',
'damned', 'patient',

name1 = name(random.choice(clist), random.choice(vlist),
random.choice(clist), random.choice(vlist),
print(name1, 'the', random.choice(dlist))

>> No.67877168

Absolute legend. I've always thought about doing something like that, but wondered if it was worth it due to the 4kb constraint. Have you kept that in mind too? I'm thinking of dropping it since there's no safety checks on Instruction pointer in the spec, and I think other people do as well to get their massive games in

>> No.67877169

>(((open))) source
>but only open to the select few

>> No.67877204

open source botnet is still botnet

>> No.67877210

Your code and examples are written really nicely. Will take a longer look later. Crystal seems pretty alright

>> No.67877224
File: 50 KB, 908x759, 2018-10-01_20-07-16.png [View same] [iqdb] [saucenao] [google] [report]

Fuck you.

>> No.67877229

Lol that's not true. Switches, as well as table of functions always require a return to the head of the dispatcher. A good dispatcher can dispatch from it's current location. It's an unnecessary jump and somewhat nullifies the benefit of branch prediction on couple opcodes.

>> No.67877234

>only open to the select few
its literally for anyone who can browse github

>> No.67877238

>you probably don't have the normal Friend() constructor, so it can't create an array

No, I have Friend::Friend()

>> No.67877242

>A good dispatcher can dispatch from it's current location.
you cant do that in most languages though

>> No.67877266

My trivial programs have made it into the space constraint, but I haven't done big stuff. It's hard to come up with anything big. I also don't check when I run out of registers. Basically, it's currently not 100% finished, but maybe I'll come back and update sometime today or tomorrow. The project really didn't take long, and it's a great intro to basic compiler design. Good luck!


>> No.67877268

name = join

>> No.67877276

yes, look, but not touch. they claim to use an open licince but blocks anyone who tries to do anything with it unless it makes them money.

>> No.67877289

vscode is a trap. It hides under the guise of open source. Unless you build vscode yourself, vscode is proprietary. Unless you build them yourself, addons are proprietary. I put their addon under the original license on their store and 2 Microsoft engineers emailed me and asked me to take it down (which I did because I decided to stop using vscode at that point).

>> No.67877290

Ah fuck, meant to reply to >>67877168 instead of myself.

>> No.67877315

Considering natural numbers of the form, a^b, where a, b < 100, what is the maximum sum of the digits of a^b?

>> No.67877359

Yeah I'll take a look, I've been interested since looking into the cpython code to get until and ++ -- operators in, some saw stuff about lexers, parsers, etc, but you have a folder quite small for it since it's chip-8 so would be great to learn from it

And pretty impressive portfolio anyway with the language variety

>> No.67877363

For some reason I've been getting a lot of 'cuck' variants too. I don't think I've ever gotten an actual name like 'peter' yet.

Didn't even know that was a method, time to rework it.

>> No.67877365

Sepples might be interpreting your code as creating a new single object of class friend and then calling the array operator on it, but I doubt it. Try removing the space before the [].

>> No.67877397

name1 is actually just
join([random.choice(clist) for _ in range(6)])

>> No.67877429
File: 4 KB, 400x400, tegaki.png [View same] [iqdb] [saucenao] [google] [report]


>> No.67877443

I didn't mean my compiler specifically is a good intro to compiler design. More like working on your own small compiler is worth it because it teaches you the concepts without throwing you into CPython or LLVM. Thanks for your feedback!

>> No.67877450

ugh my bad, it should be
" ".join ...

>> No.67877459

Oh I see, what resources did you use to start on it?

>> No.67877474

Also what bigger decisions did you make beforehand that shaped it (maybe just 1 or 2 so I can make some myself)

>> No.67877479

from random import choice
from string import ascii_lowercase as _a

name = lambda a,b,c,d,e:a+b+c+d+e

lst = [
['mighty', 'wicked', 'destroyer',
'tactician', 'undying', 'sunholder',
'damned', 'patient', 'retard']
name1 = name(
choice(lst[0]), choice(lst[1]),
choice(lst[0]), choice(lst[1]),
print(name1, 'the', choice(lst[2]))

>> No.67877492
File: 3 KB, 226x34, file.png [View same] [iqdb] [saucenao] [google] [report]

Remind me how this is acceptable again?

>> No.67877509
File: 8 KB, 413x227, fuck.png [View same] [iqdb] [saucenao] [google] [report]

am i a real programmer yet

>> No.67877511

>what is a floating point number

>> No.67877522

>not a one line ternary

>> No.67877523

how about just
name1 = "".join( [choice(lst[i]%2) for i in range(5)] )

>> No.67877526

you are pajeet

>> No.67877535

why not modulo?

there's nothing wrong with C#

>> No.67877539

Not even close buddy

>> No.67877540

Why not something actually useful?

For a language based on abstraction, I honestly expect it to cancel sqrt and squaring out.

>> No.67877545


>> No.67877548

anyone writing something like that is using java

>> No.67877552

its java

>> No.67877562

My prof in high school recommended me a book called Modern Compiler Design when I first got interested. It's very dense and I wouldn't recommend just reading it all the way through, but certain sections are very helpful.

I don't think chalk is big enough to have a LOT of decisions in its design, and there are already things I'd change if I were to start over. The main decision for a compiler for such a restricted architecture is what features you want to omit to make sure your abstraction still works. Currently, chalk doesn't even support multiplication because it's not present in the arch, and turning it into repeated addition sounds like the perfect way to generate a giant mass of instructions. The main thing I'd change is I would add a more consistent way to write actual assembly in-line, similar to C's asm, because it would prevent hard coding internal functions.

>> No.67877565

Also, why not just

if (result%2 == 0) {
printf "Even"}
else printf "Odd"

>> No.67877582

Looks like a lot the time you just end up with a mix of letter for the name. Sometimes you get something pronounceable, but since the constants are mixed in with the vowels more often than not the you end up with something like 'xdprq'

>> No.67877589

He can't see sharp.

>> No.67877610

okay, so it actually compiles. This is the first time the editor has underlined something in red while the compiler excepts it. What could this mean?

>> No.67877618

that'd make too much sense

>> No.67877643

printf("%s", (result%2) == 0 ? "Even" : "Odd")

>> No.67877644

Well thanks for the resource, I'll see if I can look at what alternatives are recommended as well to get a good idea of different views

Helpful to know your decisions as well.

By the way, I think multiplication wouldn't be a mass of instructions; probably more than desirable, but you could have
a - downwards counter register
b - total sum
c - the 'multiplier'
You'd do something like 3x3:
a - 3, b - 0, c = 3
a - 2, b - 3, c = 3
a - 1, b = 6, c = 3
a - 0, b = 9, c = 3; stop

I had to do something like this to calculate mod 20 for a sokoban game. If I wrote a compiler, I'll definitely have both multiplication and modulus in

>> No.67877700

Is there an actual difference between these in terms of speed or is it just to show that you have a bigger dick than somebody else?

>> No.67877815

The one not using the %s specifier is almost surely faster. Then again, if you don't need formatting, you can just write() directly to stdout to save yourself a few hundred nanoseconds.

>> No.67877862

can you guys explain what are memes and whats real in this thread for a new guy thanks

>> No.67877865

>to save yourself a few hundred nanoseconds.
friendly reminder that humans can register events after at least 15 microseconds (not react, thats more like a 200 microseconds)

>> No.67877906

Oh, interesting. I'll investigate that. Thanks, and good luck!

>> No.67877932


The only thing you need to know in terms of what languages are the "best".

>> No.67877961

My CHIP-8 modulus algorithm, just because I think it's interesting how you have to do things with no easy multiplication or division:
V3, V7 = 0, 5
V6 = V0 >> 2
V6 -= V7
if VF == 0
JP ->mod-time
V3 += 1
JP ->sub-again
V3 << 2
V6 = V3 << 2 + V3
V0 -= V6

V0 is set to the number you want to mod 20, and the result is stored back in V0 at the end
V3 is a counter from 0 which will contain V0/20 rounded down
V7 is the constant 5
V6 is to contain the highest multiple of 20 below V0

So to start:
V6 = V0 >> 2 - sets V6 to the integer part of V0/4
We now want to divide by 5
sub-again will subtract 5 from V6 and increment V3 each time until the carry flag is hit, except the last time
eg V0 = 36, V6 = 9 becomes V6 = -1, V3 = 1 (accurate as 36/20 rounded down is 1)
mod-time will then multiply V3 back by 20, then subtract it from V0 to get V0 % 20
V3 << 2 - V3 = V3 * 4
V6 = V3 << 2 + V3 - V6 = V3 *4 + V3 (eg original V3 * 16 + V3 * 4 = V3 * 20)
V0 -= V6 - final modulus value

I think if I make a proper compiler, due to only 16 registers (and having to really reserve some for snake and sokoban), I'll introduce the concept of 'sacrificing' registers in order to use them to call functions

Thank you!

>> No.67877982

>name = lambda a,b,c,d,e:a+b+c+d+e
Why don't you just use sum([...])?

>> No.67877992

The 2 people who keep rewriting this seem to be beginners

>> No.67878015

please explain your legal mumbo jumbo to niggers like us.

>> No.67878042

>what is fp32 arithmetic

>> No.67878064

I create a virtual stack at the end of the program. I write the registers to memory, use them to call a function, and then load them back in. That way the only limit is the CHIP-8 stack.

>> No.67878122

Is that for school or are you writing a game? if writing a game outside of school, I suggest you read some existing source code, because you're writing code as if it was a script. Oh wait you're on MAC using Swift, nvm..

>> No.67878136

Well that makes a ton more sense lel. I think I'm just used to trying to constrain myself to registers as much as possible

>> No.67878156

Yeah, though that has its limit too. I can keep at most 254 things on the stack, which is sufficient for all the registers for 16 levels of function calls, but still feels a little scary.

>> No.67878168
File: 61 KB, 616x546, lmaoed.jpg [View same] [iqdb] [saucenao] [google] [report]

Why do people say things like these out of the blue? "I want everyone to feel safe". Why exactly? Why does he care? What's his angle? To get more cannon fodder to the grinder that is our industry?

>considers himself white
lmaoed my ass a bit

>> No.67878197

>Is there a language that does that?

>> No.67878204

Why do you care?

>> No.67878215


>> No.67878229

Wanna learn java but i cant install software on a library computer
Is there a portable compiler (if thats the right word) i can use instead?

>> No.67878244
File: 52 KB, 678x800, turing.jpg [View same] [iqdb] [saucenao] [google] [report]

/dpt/-chan, daisuki~

Ask your much beloved programming literate anything.

>"I want everyone to feel safe". Why exactly? Why does he care?

guilt washing due to impostor syndrome?

Please use an anime image next time.

>> No.67878247

I mean objectively they are

>> No.67878268

I'm sad /dpt/

>> No.67878270

You can make it portable if you install it on your PC first and then copy the files to a pen drive.

>> No.67878289

>he hasn't put his emulator on a physical device

Not mine btw

>> No.67878296

>~ times difference
the power of /dpt/

>> No.67878309
File: 67 KB, 200x245, 7099f1.jpg [View same] [iqdb] [saucenao] [google] [report]

Shall we harass Bjarne Stroustrup for allowing Microsoft to develop stuff for ICE* with c++?

* https://en.wikipedia.org/wiki/U.S._Immigration_and_Customs_Enforcement

>> No.67878314

tiobe index is a meme

>> No.67878316

I dont think thats how it works

Can i ask you this >>67878229

>> No.67878334


>> No.67878338

that chink pad looks awful.

>> No.67878345

search for online java ide


>> No.67878395


>> No.67878398

enjoying making small stuff with GoLang at the moment

>> No.67878439

>Wanna learn java
Why? Be warned that java is an inferior programming language and is unwelcome here.

>> No.67878462

with --gc:none -d:release
/* Generated by Nim Compiler v0.19.0 */
/* Compiled for: Linux, amd64, gcc */
/* Command for C compiler:
gcc -c -w -O3 -fno-strict-aliasing -I/home/anon/.choosenim/toolchains/nim-0.19.0/lib -o /home/anon/.cache/nim/h_r/h.c.o /home/anon/.cache/nim/h_r/h.c */
#define NIM_INTBITS 64

#include "nimbase.h"
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
struct TGenericSeq {
NI len;
NI reserved;
struct NimStringDesc {
TGenericSeq Sup;
typedef NimStringDesc* tyArray_nHXaesL0DJZHyVS07ARPRA[1];
N_NIMCALL(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE N_NIMCALL(void, hDatInit000)(void);
STRING_LITERAL(TM_4nVV2OS5GFMRtb4xPLQU8Q_3, "Hello World!", 12);
NIM_CONST tyArray_nHXaesL0DJZHyVS07ARPRA TM_4nVV2OS5GFMRtb4xPLQU8Q_2 = {((NimStringDesc*) &TM_4nVV2OS5GFMRtb4xPLQU8Q_3)}
void PreMainInner(void) {

void PreMain(void) {
void (*volatile inner)(void);
inner = PreMainInner;

int cmdCount;
char** cmdLine;
char** gEnv;
N_CDECL(void, NimMainInner)(void) {

N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
inner = NimMainInner;

int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
return nim_program_result;

N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
TFrame FR_; FR_.len = 0;
echoBinSafe(TM_4nVV2OS5GFMRtb4xPLQU8Q_2, 1);

N_LIB_PRIVATE N_NIMCALL(void, hDatInit000)(void) {

>> No.67878471

have a bot that sends me a message with news at times managed by a cron job. stupid cron timer format is super gay

example: 0 0 10,21 * *

I'm pretty sure this means at 10am and 9pm but im not too sure so im sitting around waiting for the next 20minutes waiting for a message

>> No.67878479

what is this

>> No.67878481
File: 3 KB, 508x50, 2018-10-01_21-39-50.png [View same] [iqdb] [saucenao] [google] [report]

Do I have to do this every time I want a random number between two limits in JavaScript? Is there really no better built-in random number generator?

>> No.67878495
File: 73 KB, 1145x1005, s.png [View same] [iqdb] [saucenao] [google] [report]

if you programming language of choice is not in this list, you can not call yourself an useful programmer.

>> No.67878506

nim compiles to c, which is then compiled to a program
that is the generated C code of
echo "Hello World!"

in nim

>> No.67878507

nim just compiles to C.

>> No.67878515

I thought itd be a good base to learn some fundamentals
Plus i took a java course in highschool oh so long ago so itd just be a good way to get into things

>> No.67878534

Wow. What garbage. I knew nim was a meme but I didn't know how stupid it was.

>> No.67878538

its the best place to learn OOP fundamentals, dont get meme'd by the neets here

>> No.67878540
File: 307 KB, 789x600, 1531058474751.jpg [View same] [iqdb] [saucenao] [google] [report]

C# can go eat a dick.

>> No.67878555


will turn you into a solid programmer

>> No.67878564

I've been doing some m68k assembly projects for antique systems as a hobby and I think I really need to learn how to use some kind of toolchain like make. Stuff is just getting hard to manage with shell scripts alone. Is there a good resource that explains makefiles from the ground up? I looked into the official documentation before and it just seemed convoluted as fuck compared to other scripting languages...

>> No.67878565

it'll bootstrap eventually. It's only on 0.19 afterall.

>> No.67878571

My languages are C, Python and JS, so I'm triply useful

>> No.67878575

I'm fucking lost, how can i cross compile (gnu/linux to windows). I have almost never used windows and i don't know shit.
I tried installing mingw (on my gnu system) but it can't link .so for widows. i tried windows in a VM and installed mingw (64 bits) then changed the path variable, compiles well with SDL2, my application needs opengl (gl3w) and SDL2 to work, prob is i can't compile with opengl, any help?

>> No.67878579


>> No.67878608

It's really backwards as fuck cross compiling from gnu/linux

It's almost as bad on mac if you fall into the xcode trap but there are easier workarounds

imo google lazyfoo's tutorials, it goes into how you do everything you need for each platform. I believe I had success with it when I used to run windows a decade ago, so should still be strong

>> No.67878609

>java 3x faster then .net
>rust almost as slow as php
im laughing my fucking ass off

>> No.67878613

use a modern language. most have trivial cross-compiler switches.

>> No.67878634

Not a rust dev btw

It's closer to C than PHP in terms of total, but you can't really discredit PHP's speed. They've been silently implementing a ton of shit to make their code fast as fuck. It's pretty impressive since you never hear of PHP that much in web dev news

>> No.67878646
File: 8 KB, 442x500, 1538068292820.jpg [View same] [iqdb] [saucenao] [google] [report]

>~2 times faster
>almost as slow

>> No.67878664

get a loads of this mad rustfag

>> No.67878671

then i need a modern languages that has parallelisation (openmp is good for that), the point was to make it fast in c/c++

>> No.67878684

>implying I would use such an ugly language
hell naw

>> No.67878746
File: 27 KB, 465x455, 5c5.jpg [View same] [iqdb] [saucenao] [google] [report]

Got some unix timestamps stored in an array I need to resolve to a date.
How do I use the array in a command?

Trying to run: date -d "@1538423591"

Using this as the timestamp: "${known_date[x]}"

Guessing I need some backslashes as escapes, but not sure where to put them.
All the quotes are literal btw, haven't added any for formatting on this post

>> No.67878755

Damn, I like that.
Here's my first draft of the thing in JS.

In the future, I'll make it so you can choose to make it have a certain number of characters and to be able to choose whether you want it to start with a vowel or a consonant.

>> No.67878786
File: 11 KB, 180x204, namegen.png [View same] [iqdb] [saucenao] [google] [report]

import System.Random
import Control.Monad
import Data.Char

choice xs = (!!) xs <$> randomRIO (0, length xs - 1)

vowels = "aeiou"
consonants = [c | c <- ['a'..'z']
, c `notElem` vowels]

ebinNames = ["mighty", "wicked", "destroyer", "tactician",
"undying", "sunholder", "damned", "patient", "retard"]

capitalize (x:xs) = toUpper x : xs
capitalize [] = error "Empty string"

-- Get a random name with a specific length
randomName len = let name = sequence . map choice . take len . cycle $ [consonants, vowels]
in capitalize <$> name

randomFullName len = do
name <- randomName len
ebinName <- choice ebinNames
return $ name ++ " the " ++ ebinName

main = replicateM_ 10 $ putStrLn =<< randomFullName =<< randomNameLength
where randomNameLength = randomRIO (3, 7)

>> No.67878793

Trying get TensorFlow to sort my porn.

>> No.67878796

Turns out the quotes for date are optional, never mind.

>> No.67878797

again, a trivial thing most languages have now.
But check out https://chapel-lang.org/ It's a language specifically made for it.

>> No.67878810

speaking of which, whatever happened to that anon making the de-censoring hentai thing?

>> No.67878822

Writing a QT5 based web browser. Nothing much right now though.

>> No.67878833

ama a css programmer xd

>> No.67878834

vs code is such an experience compared to atom

>> No.67878839

I'm being dead serious: on windows anything C/C++ is a pain to setup.

>> No.67878845

which do you prefer, sass or less?

>> No.67878849

I don'get it. Who needs vs code or atom or any of that shit?

Want a powerful texteditor? emacs
Want a fullblown ide? vstudio

>> No.67878858

Maybe it turned out to be Gay-I putting dicks on everything and anon was embarrassed

>> No.67878859

I feel you, I thought there was no winning for editors and VSCode managed to change my mind

>> No.67878869

vstudio is not on linux

>> No.67878873

>tfw can commit, push and get back to my editor in three binds
just werks and convenience, without having to learn a meta-language, and pseudo-OS.

>> No.67878875

>he doesn't use unix and vi as an IDE
o i am laffin

>> No.67878876

lmfao, use IntelliJ you cuck

>> No.67878889

>Who needs vs code or atom or any of that shit?
javascript devs. not everyone want to learn your dirt ass smelling emacslisp

>> No.67878901

>using russkie software
good luck faam

>> No.67878912

I want a sensible middle ground.

>> No.67878931

Good enough for Google apparently.

>> No.67878944

whos Sergey Brin, Jim

>> No.67878965

Russkies are the best brogrammers fampai

>> No.67878972

oy vey

>> No.67879001

I have pwndbg installed
Name : pwndbg
Version : 2018.07.29-1
Description : Makes debugging with GDB suck less
Architecture : any
URL : https://github.com/pwndbg/pwndbg
Licenses : MIT
Groups : None
Provides : None
Depends On : python-capstone python-unicorn python-pycparser python-psutil python-ptrace python-pyelftools python-six python-future
Optional Deps : checksec: checksec command support [installed]
ropper: ropper command support [installed]
ropgadget: ropgadget command support [installed]
radare2: radare2 command support [installed]
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 3.87 MiB
Packager : Levente Polyak <[email protected]>
Build Date : Wed 15 Aug 2018 05:49:48 AM CDT
Install Date : Mon 01 Oct 2018 03:12:42 PM CDT
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature

but I still get the regular gdb prompt
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word".

>> No.67879006

>use mercurial for two weeks
hooooly fucking shit, it's so neat and simple and concise and pretty overall

Tell me family, why the heck are we stuck in Linus autistic power fantasy that is git?

>> No.67879028
File: 214 KB, 799x1107, parrish - booklover.jpg [View same] [iqdb] [saucenao] [google] [report]

Learning C as my first "real" programming language. I noticed that dereferencing a pointer is sometimes described as a more expensive operation, at least compared to other simple operations like integer addition. However, it also seems like the canonical way of doing things in C is to pass around struct pointers and accessing the member values inside the functions, so you see "->" quite a lot.
Is dereferencing actually not that expensive? Or should we just not care?

>> No.67879043

I needed to echo 'source /usr/share/pwndbg/gdbinit.py' > .gdbinit

>> No.67879070

it doesn't matter for any program you could write, leave optimization stuff for much later in your career

>> No.67879072

dereferncing a pointer is something that can't be optimized by the compiler/cpu like math operations, but describing it as "expensive" is a huge misnomer, it's literally one operation. You shouldn't care

>> No.67879085

So, I think the real problem is that emacs has a learning curve. You need to spend a long time customizing and learning emacs to be highly productive in it. I'd wager a lot of people open emacs, see the start page and go "what the hell is this?" And they click the menus to open files, expect ctrl+C, ctrl+v and ctrl+Z to behave a certain way and get lost when they open another buffer or even get lost when in the minibuffer. Also, modern popular tools and languages are only integrated through extensions instead of being right out of the box.
Vscode has a good set of tools for popular development (github integration, npm integration, etc) right out of the box and has shortcuts and a layout that make sense to most people without the need to do any configuration whatsoever. I don't think dismissing vscode is the right approach. I think the best thing to do is for someone to fork it, telemetry code (easiest part), gut and rewrite the extension system to something that doesn't connect to microsoft and replace Electron (hardest part). The problem is that the people using vscode likely don't have the skill to do any of that.

>> No.67879106

dereferencing is kinda expensive, but it depends on the application.
If you're dereferencing something that was allocated in the calling function, then that's fine. It's almost certainly still in your cache.
But dereferencing continuously as when traversing a linked list is almost certainly going to rack up those cache misses, which is when the real cost of pointers shows itself.
As a rule of thumb, don't bother passing struct pointers unless a) you have to because you're mutating stuff or b) the structs are pretty big, at least 2 or 3 machine words.

>> No.67879121

give me the scuttlebutt on mercurial vs git

>> No.67879179

So, i don't like when people say this because it will discourage them from writing good code. While it is good to keep that knowledge in the back of your mind, keep it farther back. When a BST the fastest solution, you might opt for making everything an array under the guise of it being faster because you don't have to dereference as much. Maybe you can optimize by including your data inside of the BST struct instead of the BST being a node. But minimizibt dereferences is a secondary problem not a primary problem.

>> No.67879214

A function is just a relation, a map. So JavaScript objects are functions with no abstraction.
Would this be enough to model computation, like how lambda calculus does?

>> No.67879378

git won

>> No.67879401

You've just shown that (fully inhabited) maps are isomorphic to functions. What more do you need to prove?

>> No.67879506

sequence . map?????

0/10 not used traverse

>> No.67879585
File: 32 KB, 720x405, 3pnkbuj.jpg [View same] [iqdb] [saucenao] [google] [report]

>Learning C as my first "real" programming language

what do you mean?

>> No.67879695

(if () (then) [optional else])

>> No.67879738

#include <stdio.h>
int main(){int o_8ffc9af5e5913588bc0b7705602caf02=(0x0000000000000002 + 0x0000000000000201 + 0x0000000000000801 - 0x0000000000000A03);while ((o_8ffc9af5e5913588bc0b7705602caf02 <= (0x00000000000000C8 + 0x0000000000000264 + 0x0000000000000864 - 0x0000000000000B2C)) & !!(o_8ffc9af5e5913588bc0b7705602caf02 <= (0x00000000000000C8 + 0x0000000000000264 + 0x0000000000000864 - 0x0000000000000B2C))){if (!(o_8ffc9af5e5913588bc0b7705602caf02 % (0x000000000000001E + 0x000000000000020F + 0x000000000000080F - 0x0000000000000A2D) ^ 0x0000000000000000))puts("\x46""i\172z\x42""u\172z");else if (!(o_8ffc9af5e5913588bc0b7705602caf02 % (0x0000000000000006 + 0x0000000000000203 + 0x0000000000000803 - 0x0000000000000A09) ^ 0x0000000000000000))puts("\x46""i\172z");else if (!(o_8ffc9af5e5913588bc0b7705602caf02 % (0x000000000000000A + 0x0000000000000205 + 0x0000000000000805 - 0x0000000000000A0F) ^ 0x0000000000000000))puts("\x42""u\172z");else printf("\x25""d\012",o_8ffc9af5e5913588bc0b7705602caf02);;;;o_8ffc9af5e5913588bc0b7705602caf02++;};};

>> No.67879757

What topics do I need to study to be a game programmer and don't want to be my hand being hold like a baby?

>Algebra, trigonometry, calculus, linear algebra
>Data structures and algorithms
>Computer graphics
>Operative system

What else?

>> No.67879775
File: 44 KB, 619x442, linus_macbook.jpg [View same] [iqdb] [saucenao] [google] [report]

It's not officially deprecated yet, but it's best used only for legacy projects that would be too time-consuming to convert to modern C++.

>> No.67879777

You must first be able to write a chip-8 emulator

>> No.67879821

good free c++ compiler for >windows 7?

>> No.67879839

you already posted this shit yesterday and people corrected you, why are you posting it again? Why are you asking for advice if you aren't going to listen?

>> No.67879878
File: 275 KB, 580x701, 1515927927773.png [View same] [iqdb] [saucenao] [google] [report]

This is more /sci/ but /g/ is my board so eh.

I almost blew my fucking hands off two hours ago and I'm not sure what happened :/

I'm making a 3d printed 4G connected attack UAV with a 3.2m wingspan and a 12kg TOW that will carry two heat seeking missiles. I was doing another rocket engine test and I think I somehow accidentally mixed the potassium nitrate fuel with ammonium nitrate or anfo but I still don't understand why it blew up so violently because it wouldn't have been more than 10%. Ammonium nitrate can be used to synthesis potassium nitrate so why would they react like that? The whole thing detonated in the boot of my car and it blew the whole boot off the hinges in the middle of morning traffic at an intersection. My whole boot is now bent and I can't close it. After it blew half the intersection ran the red light and I almost caused a massive chain accident so I noped the fuck out of there. I know impurities in the chemicals used cause 99% of accidental detonations but I've been so careful.

As soon as I got home I detonated the rest of my ammonium nitrate/anfo which was 1.8kg in a park down the road because I'm worried I'm going to get a knock at the door by the feds or something. I'm 100% sure there was a surveillance camera pointed at the intersection.

Makes me wonder how long it will be until anyone who blows their hands off will get a mechanical hand.

Video related.

>> No.67879926

What is that?
More information, above anon for example has given me new information.

>> No.67879939

You're making the horribly incorrect assumption that people actually want to convert their pristine C programs to that garbage fire of a language.

>> No.67879981


>> No.67879982


>> No.67879986

>what is chip-8 emulator
Dude it's like you don't even listen in these threads

>> No.67880013
File: 112 KB, 1005x504, 2eLvhys[1].png [View same] [iqdb] [saucenao] [google] [report]


>> No.67880019

>More information
Your problem isn't that you lack information it's that you lack initiative. Download MonoGame or Unity and start following some tutorials

>> No.67880056

Cute LARP, nice try

>> No.67880059


>> No.67880080

You can read and study all you want, but nothing trumps repetition and iterative deepening, and that's why a list is useless, because you'll find that for yourself, and also due to outside factors, that list will be ever-changing, eg AI is not even on your list, and maybe doesn't belong there but could, whereas operative system is not in my list

>> No.67880112


>> No.67880126

now you're just mocking him

>> No.67880141

There isn't anything in my notes about a chip-8 emulator, I only pay attention to people who have replied to me.
I'm already am programming in the mean time and have created a few applications today.
Studying and repetition go together hand in hand, you don't honestly think reading a book just once is enough do you? Yes I realise that but there is such a thing called a foundation and that hardly changes, that is what I am trying to establish, a foundation to my knowledge on computer science.

>> No.67880175

>you don't honestly think reading a book just once is enough do you?
Why do you think I mentioned iterative deepening?
>foundation and that hardly changes
In computer science, it can change, we don't think about algorithms and optimizations at assembly level and we don't need to, often we don't think about the intricacies of graphics programming. That's why you don't just build a list, because the other topics may have changed drastically to a point where the necessary foundations are different

>> No.67880195

You ever just get an intense wave of loneliness that lasts for a couple of hours?

>> No.67880242

are you learning computer science or game programming? because there's a significant difference. You establish a foundation in game programming by programming games, there is no Intro to Game Programming book

>> No.67880254

joke's on you, I'm in a constant dull state of loneliness.

>> No.67880277

Does anyone have experience using Chapel?

>> No.67880287

_start is hardcoded by the OS as the entry point. It's the loader that seeks it when creating a new process, not ld.

>> No.67880301

>_start is hardcoded by the OS as the entry point. It's the loader that seeks it when creating a new process, not ld.
are you sure about that? on windows, the entry point address is read from the executable header.

>> No.67880307
File: 947 KB, 1366x768, Screenshot from 2018-09-30 20-43-52.png [View same] [iqdb] [saucenao] [google] [report]

What would I need in order to separate an image into its RGB channels like pic related? It has to be done entirely in C and I just don't have any clue.

>> No.67880309

I have no clue on what iterative deepening is, something new I have learned today if I did not ask this question.

Lad what am I suppose to do then to get a good foundation of knowledge so I can be a excellent programmer? Are computer science courses pointless then because of this?
At the moment I am doing access to computing so I can go to university to learn game programming. https://www.amazon.co.uk/Introduction-Game-Programming-Alan-Thorn/dp/8183332358

What is this then? Expensive toilet paper?

>> No.67880320

i have no idea what the fuck im doing
I try to run a notepad+ file saved as .cpp with clang c++ and it just closes

>> No.67880321

Pixels literally come separated into RGB.

>> No.67880326

whats a better C++ profiler than callgrind? even with only instrumenting over the piece of code im interested in it turned a two hundred second operation into one and a half fucking hours, and it hasnt even finished yet

by better i mean faster and very correct

>> No.67880358



The address of the entry point relative to the image base when the executable file is loaded into memory. For program images, this is the starting address. For device drivers, this is the address of the initialization function. An entry point is optional for DLLs. When no entry point is present, this field must be zero.




This is the memory address of the entry point from where the process starts executing. This field is either 32 or 64 bits long depending on the format defined earlier.

>> No.67880368

Well I didn't assume the question was that low level. _start is located inside the crt0.o file which gets linked by ld, but ultimately the program loader decides which offset it starts executing from.

>> No.67880384


Vectorial Calculus
differential equations

Lineal algebra
discrete Math

Geometric algortihms

programming algorthms
Computer Architecture

Render advance
Advance shaders render

>> No.67880389

Book looks good. Just focus on it and apply it while reading like the commenter mentioned

>> No.67880406

>old trashes


>> No.67880407

Are you assuming his color profile?
What if an image identifies as CMYK?

>> No.67880409

>Lad what am I suppose to do then to get a good foundation of knowledge so I can be a excellent programmer?
>Are computer science courses pointless then because of this?
>What is this then? Expensive toilet paper?
Nothing you can't do on your own
Download and engine, read the documentation and play around with it
I did this when I was in elementary school, but apparently you can't start until you go to university

>> No.67880429

usually 8bits image comes in Int 32
Pixel R*256*256 + G*256 + B
B = Pixel mod 256
Pixel = Pixel / 256
G = Pixel mod 256
Pixel = Pixel / 256
R = Pixel mod 256
Pixel = Pixel / 256

>> No.67880461

Thank you anon.
Sounds good although surprised the first result is actually a good one.
Yes but you can't just practice if you have no knowledge at all, that is what I am asking for. Yeah that is great if you only want to use commercial engines but what if you want to make a game that requires you to build one from scratch? Can you build an engine from scratch with just game programming?

>> No.67880486

Don't make a game engine from scratch if you haven't used one first. You don't have to use a full engine like Unity, you can use MonoGame which is more like a library that you import and it will have documentation of all the functions and classes you can use to draw objects on the screen, play sounds, etc. You can start making a game from there.

>> No.67880492

Why does visual studio require so much space?

Also what add-ons should I get If I want to create a console app with .Net Code?

>> No.67880500

so I uncovered a bug in the nim compiler?
.nimble/pkgs/glob-0.8.0/glob.nim(439, 33) Error: internal error: environment misses: dir

too bad I can't make a test case

>> No.67880502

>diversity problem in C++
C++ is a fucking programming language.

>> No.67880516

>visual studio

>> No.67880519

good post, have a free CoC

>> No.67880529

Required for my class, don't discourage me I'm pretty far behind anyway

>> No.67880542

>Required for my class
Seriously? How? Sounds like some pajeet-tier school

In any case, I think cause the studio downloads a bunch of frameworks and runtimes as well. I haven't used windows in ages so cant confirm on how it works now

>> No.67880554
File: 197 KB, 645x1260, 1458872142395.png [View same] [iqdb] [saucenao] [google] [report]

>traverse a binary tree in-order non-recursively using constant space without modifying the tree

>> No.67880558

What is the difference between Unity and implanting MonoGame (whatever this is) into Visual Studio?

>> No.67880560

>traverse a tree non-recursively

>> No.67880572

>school requires you to use windows and microsoft build systems
Just drop out. I hope you're not paying for this.

>> No.67880584

Unity is a full GUI suite for making games. It comes with a level editor and an asset manager and alot of bullshit, it's more like a game maker tool than an engine. MonoGame is just a library. I hope you know what a library is. I recommended that because you said you use C# and that's the biggest C# game tool outside of Unity

>> No.67880589

Stack, function-call overhead. Do any serious applications of binary trees even use recursion?

>> No.67880603

>Do any serious applications of binary trees even use recursion

>> No.67880607

>have to use windows
so many of your fellow students are going to be so discouraged to find how few of the community use, collaborate or cater to the windows system

>> No.67880611

Isn't all of that helpful for making a game though? What is there to gain from using MonoGame over Unity?

>> No.67880634

Because MonoGame gives you more control and I thought you wanted to do things yourself
MonoGame basically just does drawing and sound
Unity does a hell of alot more

>> No.67880638

Objective :Learn to use the C# programming language, and store your work within Git repositories, using Visual Studio by revisiting selected tutorial exercises from your first year programming modules.

You pay 9k british pounds a year for uni in England. Supposedly not a bad school either they taught me quite a lot in first year.

I doubt people care about this stuff (for now)

>> No.67880644

>constant space
I hope your tree has backlinks or is allocated in contiguous memory

>> No.67880650
File: 125 KB, 1070x1200, DCWjrbqXgAAj1ws.jpg [View same] [iqdb] [saucenao] [google] [report]

How tf does pypy work

>> No.67880667

the pure wizardry of different kinds of optimizers

>> No.67880680

Will I become an excellent programmer if I stick with this over something like Unity, GameMaker etc.? Then why do companies use unreal and unity?

>> No.67880684

like v8

>> No.67880718

Becoming an excellent programmer is about contining to push yourself, it doesn't matter what you start with, which is why I suggest getting started as soon as possible
MonoGame is older than Unity, most people use Unity now. Some people want more control over their game code so they use lower-level tools to make their game

>> No.67880723
File: 174 KB, 1920x1080, WIN_20181002_08_32_23_Pro.jpg [View same] [iqdb] [saucenao] [google] [report]

This car pulled up and has been sitting outside my house for 20 minutes. I think there's two people inside. That's the most feddish car I've ever seen. The windows are tinted past legal limit it's blacked out.

I have 20L of HNO3, NH3, C3H6O, H2O2 and H2SO4 in my garage.

What's wrong with the word boot? I'm not American you turbo sperg.

>> No.67880726
File: 152 KB, 466x492, 1430111143462.png [View same] [iqdb] [saucenao] [google] [report]

>Objective :Learn to use the C# programming language, and store your work within Git repositories, using Visual Studio by revisiting selected tutorial exercises from your first year programming modules.
>You pay 9k british pounds a year
Christ. But surely you don't need VS if you can do the work in another IDE/editor? Why don't they teach git itself instead of having VS handle it?

>> No.67880729

This is fucking nice, good idea with linking certain characters together like 'qu' and 'ck'

>> No.67880738

Not him, but you're talking about jumping from basic arithmetic to calculus

People who start programming don't start going off to frameworks, or using 3rd party libraries that interact with massive systems. People who work with unreal and unity in companies work in teams, where they focus and specialize on a certain unit of the whole product.

You're just like the guy who wants to build his foundation on a mountain of books rather than focus and implement with 1 book at a time. Using something lower-level will give you the conceptual knowledge you need to focus on whatever part of game programming you want to do, and if it's all of them, it'll give that too

>> No.67880758

have fun in jail, too bad you can't fight them off with your drone

>> No.67880765

Forgot to mention it's only the first week +
>Ensure you can open Visual Studio 2017 and then work through the following tutorial projects. You should make them each as separate C# .NET Core console apps . Remember to push your local Git repos into private cloud - based rep os before you log - off each time – you will need to have registered a free account with a Git provider such as BitBucket beforehand
So there is some git here.

>> No.67880796
File: 28 KB, 224x276, vulkan.png [View same] [iqdb] [saucenao] [google] [report]

Hoping someone here could drop some shareware.

Want to get into Vulkan. The github is excellent and full MIT to let you go nuts but I'd like the book to go along with and I am flat broke.

>> No.67880804

>>You're just like the guy who wants to build his foundation on a mountain of books rather than focus and implement with 1 book at a time. Using something lower-level will give you the conceptual knowledge you need to focus on whatever part of game programming you want to do, and if it's all of them, it'll give that too

Right ok so if I want to be an excellent programmer, what should I do? What should I use? What should I read? How do I gain conceptual knowledge and be able to do any part of game programming I want to do? I want to be like Iwata.

>> No.67880810

learn OpenGL instead

>> No.67880821
File: 3.81 MB, 4032x2268, 20180323_054041.jpg [View same] [iqdb] [saucenao] [google] [report]

They don't send rich people to jail. They just fine us lots of money.

>> No.67880828

Vulkan is too hard for begginers and mostly code examples for computer graphics are OpenGL or DirectX.

>> No.67880840

At the very least you'll become a better programmer by not fucking using Game Maker.

>> No.67880843
File: 66 KB, 1360x529, Deprecated-in-macOS-Mojave-and-iOS-12.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.67880848

excellent programmers show initative, and you have absolutely none, all you're doing is asking how to reach an end goal without focusing on the steps. You're like someone walking into a music store and saying "what guitar should I buy that will turn me into a guitar god" the answer is it doesn't matter, all that fucking matters is that you practise.
The answer is you should start off with basic I/O, drawing, sounds, a game loop, basic physics, basic game objects with basic logic interacting with each other. Then you move foward with that based on the requirements of the game you're making, then you keep moving foward with more and more advanced projects until you're there. But you think you can become an "excellent programmer" just by reading books and exercises apparently. You need to make a game

>> No.67880854

Learn metal 2 decent doc and good tooling.

>> No.67880878
File: 100 KB, 1353x943, boid engine.png [View same] [iqdb] [saucenao] [google] [report]

I'm building a boid engine that gives me easy ways to selectively apply steering behaviors.

>> No.67880929
File: 637 KB, 2048x1536, 1521895250675.jpg [View same] [iqdb] [saucenao] [google] [report]

Want to also mention that I am very much aware that OpenGL is easier in the sense that documentation and tutorial is more readily available.

I kind of go about learning from bashing my skull until it works and I am very much a fan of how Vulkan opens everything up. I've seen how the code operates to a limited extent in projects such as dxvk.

I am also aware Vulkan implies that support for my application will be more sparse as you need a very recent GPU to leverage it but I'm willing to hedge myself on this if it means I get to go as low as I want to go with supreme performance.

>> No.67880947

>if it means I get to go as low as I want to go with supreme performance.
you don't need that "supreme performance"

>> No.67881007

I am making programs, I am studying and trying to seek more information, how is that not taking the initiative? I am literally asking for the steps to take, that has been my question the entire time, that is all I want is the steps.

Ok Basic Input/Output, drawing, sounds, game loops, basic physics, basic game objects and basic logic interaction. What would be the best program to use to get started that will help me get all the skills needed to be a game programmer that can do anything?

>> No.67881022


>> No.67881030

Making a game would be taking the initiative. I can suggest many expert level game programming topics but it would be useless for you to study without the foundational knowledge obtained by making a basic game. Pick an engine or framework that resonates with you and start making one. Useful topics would be how to set up a game loop, how to draw graphics with your chosen toolset, and how to implement basic physics and collisions

>> No.67881042

macOS is not relevant

>> No.67881048

People who adopt unproven technologies just because they're new should be talked down whenever possible lest programming devolve even more into trendy idiocy
Nobody is using Vulkan and it's preformance improvements are questionable at best

>> No.67881105

Oh ok so I will gain a foundation by making basic games, why didn't you say so, I thought you had to read books and do exercises. So where can I find these useful topics for these then? Will it all be in the documentation? I just don't want to be these useless programmers like pajeets and that, I want to be like Iwata who could turn things around thanks to his programming skills.

>> No.67881122

This retarded attitude leads to stagnation.

>> No.67881138

Stagnation that works
New technologies have to prove themselves

>> No.67881163

Depends what tool you're using. If you are an absolute beginner you should be following tutorials that come with your language and framework, they will tell you how to get some basic running at the very least

has some good general purpose information on game programming but that's intermediate level and if you don't even know OOP most of it will go over your head

>> No.67881164

How is Windows XP treating you?

>> No.67881166


Iwata obtained his first computer, a Commodore PET, in 1978. He dismantled and studied the machine out of his desire to understand it. The computer coincidentally had a central processing unit (MOS 6502) similar to the one used by Nintendo for the Nintendo Entertainment System (NES), a gaming console for which he would later develop games. Following high school, Iwata was admitted to the Tokyo Institute of Technology in April 1978, where he majored in computer science. Tomohiko Uematsu, an engineering professor, noted Iwata's proficiency with software programming and remarked that Iwata could write programs faster and more accurately than any of his other students.

>> No.67881180

You adopt new technologies because you've used the old ones, and they have some peculiar detail about them that you've found really painful for a long time now.

So you look at whatever's new and popping and try to implement some toy project on it just to see if you like it.
Then and ONLY then do you jump onto the bandwagon.

Otherwise you're just quenching a thirst for hipster bullshit instead of your primary goal, which is to learn something useful.

>> No.67881190

I would still be using it if my old PC didn't die

>> No.67881193

That comes with time and experience. You will also want to constantly broaden your horizons, so it's worth digging into some deep topics, like data structures, multi-threading, virtual machines, physics engines, and inverse kinematics, partially because they're all useful to know for games, but also because you'll run into a lot of niche topics along the way. Half of being a good programmer is knowing what to even google.

>> No.67881208

Vulkan may not always provide a FPS boost over OpenGL, but it absolutely reduces latency and jitter/spiking. Unfortunately you don't see that on the benchmarks.

>> No.67881211

New thread:

>> No.67881298

I'm obviously not the person asking the original question, and I have used OpenGL (ES2 technically) before, and it's pretty shitty.
There is so much fucking state all over the place. I've only gotten as far as hello triangle in vulkan, but overall it seems like a much more sensible API, despite the verbosity.

>> No.67881319

>There is so much fucking state all over the place
that's because it's the most efficient way to communicate with the graphics card, you can easily wrap the state in objects if you don't like it

>> No.67881368

>that's because it's the most efficient way to communicate with the graphics card
What the fuck? This statement is so fucking stupid, I don't even know how to adequately deconstruct it beside saying that "you have no fucking idea what you're talking about".
>you can easily wrap the state in objects
This is a fucking terrible idea, as there is no reliable way to actually guarantee that your state actually aligns with that of the OpenGL state machine. You don't want to lure yourself into a false sense of security.
You can use the "direct state access" to mitigate this slightly, but even that is limited to either using an extension or a very new version of OpenGL, which isn't viable to do a lot of the time. Not to mention that you can't even do it in OpenGL ES at all.

>> No.67881405

>What the fuck? This statement is so fucking stupid, I don't even know how to adequately deconstruct it beside saying that "you have no fucking idea what you're talking about".
how do you think processors operate at the most basic level? it's a bunch of state and flags that you set on and off. Obviously some of these will just be internal OpenGL states but that's implementation dependent, state is the most assumption-free way to model it
>there is no reliable way to actually guarantee that your state actually aligns with that of the OpenGL state machine.
Yes there is, make sure you set your states properly
You sound like you've never done any low level programming before

>> No.67881463

Communication with the GPU happens with command streams, not OpenGL state, you fucking moron.
OpenGL does not model how GPUs work at all, so your argument is just completely wrong.
It's just a very stateful software layer.
>Yes there is, make sure you set your states properly
This is much easier said than done. I'm not saying it's impossible, but just foolish and asking for trouble.
>You sound like you've never done any low level programming before
In what way is OpenGL low level? How the fuck do you even define low level? How is this stupid ad hominem and straw man even relevant?
And yes, I have done plenty of lower level programming, just not to the level of actually implementing GPU drivers.

>> No.67881559

>OpenGL does not model how GPUs work at all, so your argument is just completely wrong.
It doesn't model how GPUs work, but it tried to stick as close as reasonably possible. When you changed the blend function or bound a texture, that is what was actually happening on the graphics card (when it recieved the command, if you want to be pedantic) As time went on of course they introduced more and more OpenGL abstractions and graphics cards became more and more customizable, so that isn't as true anymore. State just makes as little assumptions about what you want to do as possible. It provides you with the most power. It's not difficult to wrap state in closed system of objects

>> No.67881834

>parallelism is trivial

Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.