Quantcast
[ 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: 200 KB, 1305x741, smalltalksyntax.png [View same] [iqdb] [saucenao] [google] [report]
67351388 No.67351388 [Reply] [Original] [archived.moe] [rbt]

What are you working on, /g/?

Previous thread: >>67342208

>> No.67351435
File: 33 KB, 680x544, 902.jpg [View same] [iqdb] [saucenao] [google] [report]
67351435

>>67351388
Working on my 6th Form project which has turned into a sweet paid deal with lower school with annual payment. Considering taking a gap year to see how far I can take it since high demand in other schools for this type of software.

>> No.67351458

>>67351435
dumb frogposter

>> No.67351494
File: 296 KB, 1158x1200, 1532392666364.jpg [View same] [iqdb] [saucenao] [google] [report]
67351494

i started learning Python

>> No.67351502

>>67351458
True I am

>> No.67351596

>stacks
>queues
>lists
>linked lists
I hate programming. Why nobody told me about this?

>> No.67351619
File: 29 KB, 400x307, Idle.jpg [View same] [iqdb] [saucenao] [google] [report]
67351619

>>67351596
Just wait until you get to B-trees, anon.

>> No.67351627

>>67351596
linked lists aren't real programming.

>> No.67351637

>>67351596
Should've read a book first

>> No.67351671
File: 24 KB, 1200x847, haskell logo.png [View same] [iqdb] [saucenao] [google] [report]
67351671

>>67351627
You shut your whore mouth

>> No.67351673

Rate my SQL style:

select
d.id [Device ID],
d.desc [Device Description],
s.name [Setting],
s.value [Value]
from setting s
join device d
on d.id = s.deviceid
where d.id in (
'a4646df',
'ce5674'
)
order by d.desc, d.id

>> No.67351675

>>67351596
Those are pajeet-tier easy.

>> No.67351700

>>67351494

Congratulations! Python is a fun language, and you will be effective in no time.

>> No.67351708

Does anyone have any python book recommendations for someone coming from C++?

>> No.67351719

>>67351596
they're all useful though

the only things i dislike about programming are trees and vectors (to a lesser extent)

>> No.67351733
File: 12 KB, 526x544, 1453157679313.png [View same] [iqdb] [saucenao] [google] [report]
67351733

>>67351388
>made yet another web scraper script, this time to download a bunch of rare anime episodes in my native language
>episode titles contain spoilers
>the filenames are the titles, my program outputs the name of the current file being downloaded
>have to try hiding everything but the episode number when checking the download status
>realize i'm running away from the output of my own fucking program

>> No.67351740

>>67351719
>vectors
But why?

And trees are such a general and useful concept I'm not quite sure why you would dislike them. Do you just not understand them?

>> No.67351748
File: 821 KB, 1932x2576, 20180828_175059.jpg [View same] [iqdb] [saucenao] [google] [report]
67351748

>>67351675
see this? it really easy to read it, but if you are starting to read music, it is hard
I am suffering (with both)

>> No.67351750

>>67351733
You do realize Kabuto Kouji doesn't actually die in lava? Spic-kun

>> No.67351753

>tfw Haskell

>> No.67351755

>>67351750
wrong, faggot.
you'd never guess the anime.

>> No.67351779

>>67351755

Haven't You Heard? I'm Sakamoto

>> No.67351784

>>67351748
I've only taken a couple of into courses of programming. Only took me a couple of days to learn and implement data structures. Try this: write a program in C that grabs a file off a webserver and saves it on your computer using linked lists. This isn't hard.

>> No.67351806

>>67351784
ok, I will follow your advice. Thank you!
faggot

>> No.67351810

>>67351207
>engineering
>5 classes in a semester
what school do you go to where you don't have to take 6? Anyways, you'll be fine, those group project/design courses are easy (and actually fun if your team isn't retards), calc 1 is 50% identical to your calc class from HS, and some new stuff, reg ex class should be relatively easy, and maybe even fun, the systems and circuit board class will be interesting, and the difficulty will be based on the effort you put in, since those types of classes tend to be lab heavy

>> No.67351813

>>67351784
>This isn't hard.
Stop saying this.
It's such an unnecessary, nonconstructive thing to say.
It might have been easy for you, it might not have because of selective memory, either way it might be difficult for someone and putting them down for it is just not cool. At the same time, nobody cares that you think it's easy, it only makes you look like an asshole.

>> No.67351820
File: 116 KB, 805x556, b urself.jpg [View same] [iqdb] [saucenao] [google] [report]
67351820

>>67351748
Still, understanding both basic data structures and elements on your sheet are steps required to grasp even more complicated, yet useful and beautiful, structures, both in music theory and programming. In music you should play it to understand how it sounds, at least in the beginning. In programming you should implement data structures yourself to understand how they work, at least in the beginning. Do not despair and keep working at it. There's literally no other way.
unless you decide to be a whiny cunt and just complain on /g/ instead of improving yourself, in which case - fuck you

>> No.67351835

>>67351207
Where are you studying? Sounds somewhat similar to what I did last year

>> No.67351855

>>67351813
>Stop saying this
This isn't your elementary school. In the real world, liberal mindsets are garbage. Go cry about it to your mom, faggot. No one owes you anything. Don't expect to have your handheld. Move to france, if life is too hard for you.

>> No.67351864

>>67351708
Modern python cookbook

>> No.67351866

>>67351855
Not being an asshole is being a liberal?
Man you must be fun to be around.

>> No.67351872

>>67351673
Looks good. I personally would do like this, but only if there more than 4 columns, with just 4 columns I wouldnt bother with new rows, same goes for the IN() part, with just 2 I wouldnt put them into seperate rows
Main different form yours is the capitalization of keywords so its easier to part them out of the query, and the comma before the string in the IN() part so that it would be harder to accidentally delete it.

SELECT d.id AS [Device ID],
d.desc AS [Device Description],
s.name AS [Setting],
s.value AS [Value]
FROM setting AS s
JOIN device AS d ON d.id = s.deviceid
WHERE d.id IN
('a4646df'
,'a4646df'
,'ce5674')

ORDER BY d.desc, d.id

>> No.67351874

>>67351855

You are

U

N

E

M

P

L

O

Y

E

D

>> No.67351893

>>67351872
hm, the spacings looked better in notepad, oh well

>> No.67351918

>>67351872

Thanks for the feedback. Fair points. I try to omit optional keywords where I can as part of optimizing for readability, which is also why I don't like prefixing commas or capitalizing keywords. But I don't have a problem with either personally and find your style usable.

>> No.67351925

>>67351866
No, expecting to be treated like a baby is liberal. No one owes you anything. i.e. You're not going to be president of the US. Sorry, I'm such an asshole.

>>67351874
>Self-employed
FTFY

>> No.67351928

>>67351925

fucking called it

>> No.67351938

>>67351925
fucking kek, do you fix computers for allowance?

>> No.67351956

>>67351928
Okay, whatever. Congrats?

>>67351938
Nope, I provide telephony, and ERP.

>> No.67351973

you guys actually got me into reading!

what's some good stuff to learn AI?

>> No.67351986

>>67351956

erp = erotic roleplay

so you're a phone sex operator

>> No.67351987

Help, I'm a brainlet. Is this how I do it?
unsigned int popcnt_inverse(unsigned int cnt) {
if (cnt > 32) return 0xFFFFFFFFu;
return 0xFFFFFFFFu >> ~(-33 + cnt);
}

I mean it works, but is this the best way?

>> No.67351997

>>67351986
EXACTLY! BTW, not everyone in this thread is a sissy.

>> No.67352053

https://go.googlesource.com/proposal/+/master/design/go2draft.md

Apologize

>> No.67352065

>>67351673
personally I like capital SQL syntax, and always using square brackets on columns and tables

SELECT
d.[id] AS [Device ID],
d.[desc] AS [Device Description],
s.[name] AS [Setting],
s.[value] AS [Value]
FROM [setting] AS s
JOIN [device] AS d
ON d.[id] = s.[deviceid]
WHERE d.[id] IN (
'a4646df',
'ce5674')
ORDER BY
d.[desc],
d.[id]

>> No.67352115

>>67352065

I find the brackets around table & column names needlessly verbose unless they are escaping reserved keywords or something. Using the brackets exclusively around plain-language column aliases is a helpful cue to the reader when they're checking how the data maps to some other object or structure IMO.

>> No.67352160

>>67351987
unsigned int isn't guaranteed to be the same size on all systems.
use types from this https://en.cppreference.com/w/c/types/integer

>> No.67352205

>>67352065
SELECT
d.[id] AS [Device ID]
, d.[desc] AS [Device Description]
, s.[name] AS [Setting]
, s.[value] AS [Value]
FROM
[setting] AS s
JOIN [device] AS d
ON d.[id] = s.[deviceid]
WHERE d.[id] IN
(
'a4646df'
, 'ce5674'
)
ORDER BY
d.[desc]
, d.[id]

>> No.67352219

>>67352205
SELECT
d.[id] AS [Device ID]
, d.[desc] AS [Device Description]
, s.[name] AS [Setting]
, s.[value] AS [Value]
FROM
[setting] AS s
JOIN [device] AS d
ON d.[id] = s.[deviceid]
WHERE
d.[id] IN
(
'a4646df'
, 'ce5674'
)
ORDER BY
d.[desc]
, d.[id]

>> No.67352239

>>67352115
reason I do it is because I've run into columns and tables with spaces in the name. Also I've had the need to build query strings programmatically. Always encapsulating my DB's, tables, and columns means I can never have an issue. Same reason I do all caps for syntax, inline SQL becomes readable without highlighting

>>67352205
>>67352219
Hello Miscrosoft SQL Server Management Studio

>> No.67352245

https://pastebin.com/uFfsezjL

>> No.67352296
File: 1.37 MB, 985x1400, 1498777327838.jpg [View same] [iqdb] [saucenao] [google] [report]
67352296

What's a good open-source library for doing 3D mechanical simulations? I'm building robots and want to test them out before printing so I can use machine learning to optimize the design.

>> No.67352309

>>67352296
Gmod

>> No.67352335

>>67352239
>Microsoft SQL Server Management Studio
you got me

>> No.67352570

>>67352309
based

>> No.67352622

Learning Haskell because I'm bored and burnt out. Tired of having to write boring sql for work and don't want to work on web development.

So hopefully this keeps me interested.

>tfw losing motivation to keep making things

>> No.67352656

non-neet anons: I'm 21 and am only entering college next year. is age a problem when it comes to being hired?

>> No.67352772

>>67352656
AIDS

>> No.67352911

>>67351494
I'm sorry to hear that. Hope you like syntax.

>>67351708
>coming from C++
I see you love buckets of pointless syntax. The problem you'll have with python is the One Right Way philosophy whereas sepples loves giving you fifteen ways to accomplish something under the mistaken premise that a sufficiently smart compiler will manage to optimize that shit fucking language.

>>67352656
no one gives a fuck

>> No.67352967

>>67352911
Did you get raped by a curly bracket or something?

>> No.67353001
File: 2.93 MB, 320x236, ModernSoftwareDevelopment.gif [View same] [iqdb] [saucenao] [google] [report]
67353001

>When you try to use an NSA open source analytic tool for your research, but Docker fails to build because one of its dependencies depends on a Ruby gem that doesn't exist in the gem repository. So you try to run the project without Docker, only to find it fails immediately because of a syntax error - an unmatched parenthesis caused when some programmer half-assed commenting out some function call that was split across multiple lines. So you fix his fuck up and install all of the Python packages required by his imports and the program fails to run again, but this time, it's because of a java.lang.ClassNotFoundException.

>> No.67353020

>>67353001
chad programmers write their own libs.
virgin programmers import libs from the net.

>> No.67353143
File: 1.52 MB, 1698x932, nodesandconnections.webm [View same] [iqdb] [saucenao] [google] [report]
67353143

Going to study pathfinding algorithms so beginning with making nodes and connections. Next up is showing the distance between the connected nodes!

>> No.67353237

>>67353143
yeah, make it so when you click, instead of checking if you're ON the point it simply gets the closest point to your cursor
It'll make your life way easier. Also way don't you generate a random graph?

>> No.67353398

>>67353237
that's a good idea I'll definitely do the round to closest thing. I'm doing it manually and not randomly because I want to mess around with things and make it customized because eventually it'll go into a grand strategy games and the nodes will be provinces

>> No.67353433

>>67353398
Well at least load a predefined graph from your code that you can modify at runtime so you don't spend 5 min creating one from scratch.

>> No.67353457

how should i quit my job

>> No.67353472

>>67353143

What's this for? Just experimenting? Linked Nodes?

>> No.67353531

Scala is such a frustrating language to try to do anything interesting in.

>> No.67353592
File: 31 KB, 437x355, this.jpg [View same] [iqdb] [saucenao] [google] [report]
67353592

#include <stdio.h>
#include <string.h>
int main(){
char path1[50];
char path2[50];
FILE* plist1 = NULL;
FILE* plist2 = NULL;
char input1[61];
char input2[61];
char seq1[5000];
char seq2[5000];
int a,b;



printf("type in file 1 path: \n");
scanf("%[^\n]%*c", path1);
printf("type in file 2 path: \n");
scanf("%[^\n]%*c", path2);

plist1 = fopen(path1, "r");
plist2 = fopen(path2, "r");
a=0;
while(fgets(input1, 61, plist1)) {
if(a==0){
a++;
continue;
}
if(strcmp(input1,"")==0){
continue;
}
strcat(seq1,input1);
printf("%d %s\n",a,input1);
a++;
}
printf("%d %s\n",a,seq1);
return 0;
}


How come this doesn't skip the blank lines like it is supposed too?

>> No.67353636
File: 44 KB, 636x616, 1474325315193.jpg [View same] [iqdb] [saucenao] [google] [report]
67353636

Employed Haskell programmer reporting in

>> No.67353646

>>67353636
Do you ever feel bad for OOPsies?

>> No.67353670

Whatever happened to OSGTP, Ruby, and nv?

>> No.67353733

>>67353592
nevermind just don't bother sorry

>> No.67353830

Writing a microkernel for what I hope will eventually be a distributed OS

>> No.67353850

I'm a wordpress programmer.

Can I join this thread?

>> No.67353873

>>67353850
no, dumb webshit

>> No.67353883

>>67351748
Nice F dur Tonleiter you got there

>> No.67354035

>>67353472
Just want to learn about pathfinding and will eventually apply it to a game where an army will traverse across provinces (nodes)

>> No.67354086

I have a C test in a couple weeks, and my knowledge of it is mediocre at best.
Do I read K&R? If not, then what should I do?

>> No.67354151

>>67352772
?
If actually meant the disease then yes Im AIDS

>>67352911
good to know, thanks anon. I intend tô be a good developer anyways

>> No.67354356

Is it worth it to use Qt to develop desktop applications in this day and age? Looks like the fastest way excluding webshit and Java.

>>67354086
Couple weeks are enough I think. K&R as a reference, for more in depth I guess C Programming A Modern Approach is okay. What is it about?

>> No.67354382

>>67354356
>What is it about?
Huh, wish I knew. It's for the army.
I've read that there will be 25 questions for every topic (C being one of them) but that's not official info by any means.

>> No.67354684

I'm working on a mitmproxy clone written in Rust in a feeble attempt to learn Rust.

>> No.67354732

>>67352911
t. zoomer who can't type

>> No.67354778

Scheme is the most elegant dynamic language in existence.

>> No.67354797

>>67354778
>scheme is the cleanest piece of shit in the toilet
alright then.

>> No.67354897
File: 792 KB, 2339x1654, untitled.png [View same] [iqdb] [saucenao] [google] [report]
67354897

>>67351388
I'm trying to use GPIO input from A0-A5 on the Adafruit Feather 32u4 Bluefruit LE:
https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/pinouts

I'm using this code:
https://learn.adafruit.com/custom-wireless-bluetooth-cherry-mx-gamepad/software

I got it to work except for the added GPIO. I realize they are different. How do I add input from A0-A5? Can I use pin 0 and 1?

Any help would be appreciated. If there is a different board with similar capabilities that would also be helpful.
Thanks.

>> No.67354921

Foreground extraction and real-time mean shift. Been shilling my repo all over ribbit to tons of updoots but not a single contributor. Kill me.

>> No.67354937

>>67354382
>for the army
In what sort of sense? Like you'll be writing code while enlisted? Sounds like ass

>> No.67355001

>>67351596
Because you didn't finish college
I bet you don't even know about
>binary trees/red black trees
>treis
>doubly linked lists
>hash tables
>graph theory

>> No.67355019

>>67355001
>tries

>> No.67355029

>>67355019
What, are you fucking retarded?
https://en.wikipedia.org/wiki/Trie

>> No.67355067

>>67355029
>treis
What, are you fucking retarded?

>> No.67355090

>>67355067
Try to say more than one word at a time, and you'd have success conveying your thoughts

>> No.67355101

>>67354921
https://github.com/tuckerpo/real-time-cv-filters
This is the repo in question btw. If anyone of you know anything about computer vision specifically within the opencv2.x framework using python I would appreciate some feedback/contributions.

>> No.67355126

>>67355090
Okay, how's this: didn't you mean tries, you mongoloid nothing? Try using your brain if you want spell correctly or not come off as an overly aggressive and overly arrogant retard.

>> No.67355168
File: 53 KB, 236x862, benshakiradestroysobaba.jpg [View same] [iqdb] [saucenao] [google] [report]
67355168

>>67351855

>> No.67355219

What's the best way to learn practical assembly? I've done some x86 and can make stuff like the thing below, but the amount of resources that actually go over making programs (i.e., not just opcode references) seems limited.


section .data
running db 'Running',0xa
period db '.',0xa
done db 'Done.',0xa

BYTE_BUFFER times 10 db 0 ;a buffer to be used by int_to_char

section .text
global _start

_start:
mov r12,500

mov rdi,running
call print

countdown:
mov rax,r12
call print_int

sub r12,1
cmp r12,0
jne countdown
jmp exit

print:
push rdi
call strlen
mov rdi,1
pop rsi
mov rdx,rax
mov rax,1
syscall
ret

print_int:
call int_to_char
mov rax,1
mov rdi,1
mov rsi,r9
mov rdx,r11
syscall
ret

strlen:
xor rax,rax
.strlen_loop:
cmp BYTE [rdi + rax],0xa
je .strlen_break
inc rax
jmp .strlen_loop
.strlen_break:
inc rax
ret

;converts integer to string
;takes int in rax
;returns pointer to string in r9
int_to_char:
mov rbx,10
mov r9,BYTE_BUFFER+10;store the number backwardes with LSB at 10 and decrementing to reach MSB
mov [r9],byte 0 ;store null terminating byte in last slot
dec r9;dec buffer index
mov [r9],byte 0xa;store break line
dec r9;dec index again
mov r11,2;r11 will store the size of the string in the buffer.
.loop_block:
mov rdx,0
div rbx;get LSB by dividing by 10. LSB will be remainder and stored in dl.
cmp rax,0 ;if rax (quotient) is 0 then that means we have reached the MSB
je .return_block
add dl,48;convert each digit to ASCII
mov [r9], dl;store ASCII value in memory with r9 as index
dec r9;decrement our index
inc r11; increment size of buffer to accomodate the new data
jmp .loop_block ;loop
.return_block:
add dl,48
mov [r9], dl
dec r9
inc r11
ret

exit:
mov rax,60
mov rdi,0
syscall

>> No.67355231

>>67355219
write a compiler for a small but not too small subset of C.

>> No.67355265

>>67355231
but that's out of my skill level. I'm still pretty much a beginner at asm. I've only ever written one compiler (in rust) and it was pretty shit.

>> No.67355273

>>67355265
Pick your favorite retro game and try to write it up. I personally did ascii space invaders, took a couple weeks of a few hours/day work but it was fun and I learned a lot about ARM8

>> No.67355746

I'm getting tired of writing Java here.
Isn't there any sort of "shorthand" for Java Class Constructors? For example Struct MyType {
age, marks, height: i32
name: String
}
impl MyType {
fn new(age, marks, height: i32, name: String) -> Self {
age, marks, height, name = default; // looks for the members with same name and assigns them accordingly
}
}

>> No.67355754
File: 55 KB, 696x600, 40161705.jpg [View same] [iqdb] [saucenao] [google] [report]
67355754

>>67355746
Here's a cute picture for attention.

>> No.67355951

>>67355746
Wouldnt that just be using this.?

>> No.67355952

Updating an existing project that's used a lot in my area to "production quality". Replacing the existing 100000+ file makefile system with centrally located and minimal cross-talk cmake. Replacing all the Python C API stuff with pybind11 because lol having to bug fix every time there's a new version of Python. Splitting the project into two projects for modularity (and so I can totally replace one with my version which doesn't suck). Replacing their homegrown coroutine and scheduler which is broken and leaks like a sieve because they dont know what a weak table is, with the one built into Python. And finally touching up the C and C++ codebase for smell.

They are currently compiling with Werror because they are retarded and without Wextra, because lol we're new. It currently only compiles with GCC too, and not because of Werror either. Yeah it's that bad. Also it supports multiple targets, but only one at a time, you have to recompile to switch.

THOUSANDS of people use this software every day. Everyone in my office does. And yet it's totally amateur. And of course corporate won't fork up ONE SINGLE PENNY to maintain or upgrade our reuse libraries because no matter how many years of college they get, you can't teach them to not grabble over short term profits like a bunch of trolls.

>> No.67355980

>>67355952
Let me guess: you've been working at this place for a few months?

>> No.67355988
File: 94 KB, 1200x1200, IntelliJ_IDEA_Logo.svg.png [View same] [iqdb] [saucenao] [google] [report]
67355988

Finished working on my plugin for IntelliJ (it makes coding Java easier).

https://plugins.jetbrains.com/plugin/10904-brew-java

>> No.67356088

>>67355980
This is a FOSS project. No, I dont have the patience to muck through internal stuff.

>> No.67356109

>>67356088
Good lord man why even put in the effort for the FOSS meme?

>> No.67356154

>>67356109
I can't work on it at work because no money for it, but I can outside of work because its FOSS. It will also force some of the programs to fork up small amounts of money each to support the new version, effectively allowing some library maintainance to occur. My evenings are about to become very sparse, so why the hell not?

>> No.67356160

>>67351596
These are easy once you get a little practice with them.

>> No.67356231

How do I store a number in memory in x86 assembly? I've been storing everything in registers but I don't think you're supposed to.

My program is here: https://pastebin.com/wR7pYzDG

Specifically around line 29 I want to know how I can store the health and damage into memory instead of registers.

>> No.67356241

>>67356109
And honestly my changes are pretty easy. I've already completed the make=>cmake switch. The rest is mostly ripping shit out.

DELEGATION OF RESPONSIBILITY. Engineers man. I swear.

>> No.67356245

>>67356231
??? make a reference to a location in memory and store something from a variable to that memory location

>> No.67356264

>>67356245
yeah but how do I know what memory is available? I try to do it but i get segfaults.

Can you write out exactly how you would do that because I think I'm doing it wrong.

>> No.67356273
File: 261 KB, 480x270, 1344970833081.gif [View same] [iqdb] [saucenao] [google] [report]
67356273

>>67355988
>working for a multi-billionaire company for free
Why do cucks like you do this?

>> No.67356294
File: 2.27 MB, 638x478, spanvisualizershort.webm [View same] [iqdb] [saucenao] [google] [report]
67356294

plane generator

>> No.67356360

>>67356264
call malloc(implement it yourself or use the c runtime) to store on the heap or decrement the stack pointer to store a local var

>> No.67356389

>>67356273
>multi-billionare
just because you find pajeets advertising them everywhere doesn't mean they have that much money.

>> No.67356390

>>67356273

>he didnt download it and check it out, what a retard

>> No.67356407

Why did we end up with JS in browsers instead of Scheme?

>> No.67356433

>>67356407
netscape's dominance in the late 90s

>> No.67356443

>>67356433
yes but why was JS created. other, better languages already existed

>> No.67356523

>>67356443
because jaba for the browser

>> No.67356611
File: 186 KB, 756x720, 1517895478771.jpg [View same] [iqdb] [saucenao] [google] [report]
67356611

Will switching from Pillow to scikit-image result in large speedup?

>> No.67356686

I swear data scientists are the most useless mouthbreathing fucking retards on this planet

>> No.67356702

>>67356686
>data scientists
data is a meme

>> No.67356790
File: 32 KB, 1478x282, Screenshot from 2018-08-29 14-40-54.png [View same] [iqdb] [saucenao] [google] [report]
67356790

>>67351388
how would you use bit operations to make a function for this?

>> No.67356914

Should I learn C or C++ first? I'd like to know both, but I'm not sure what order to learn them.

>> No.67356956

>>67356686
Agreed.

I put it down to their tech stack being useless beyond their meme jobs.

>> No.67357004

what if i had, 400 iq... i could do anything
but what if it decreased by 2 for every year of my life thereafter

>> No.67357134
File: 87 KB, 480x360, crypto_cowards.jpg [View same] [iqdb] [saucenao] [google] [report]
67357134

Are you supposed to throw a copyright notice or license in to freelance projects?

>> No.67357308

>>67357134
Of course.

>> No.67357322

>>67356914
C is deprecated, use C++

>> No.67357323

>>67357308
Just a "Copyright <First Last> 20xx" or do I need to use a license?

>> No.67357376

>>67356914
Definitely learn C first.
Once you've done that, when you've done that, you'll then learn what a shitty and disgusting language C++ is.

>> No.67357390

>>67357376
>C++
Fuck, I meant C. You get the point.

>> No.67357398

>>67357390
No, I definitely didn't make a mistake in that post.

>> No.67357410

>>67357376
>>67357390
Thanks.

>> No.67357438

>>67357410
Just to be sure, you want to stay the fuck away from C++.

>> No.67357441

>>67357438
Get out, pass faggot.

>> No.67357452
File: 235 KB, 1000x1000, 1526460593089.png [View same] [iqdb] [saucenao] [google] [report]
67357452

>> No.67357457

>>67357441
And being a filthy sepplesfag is supposed to be better?
Get your garbage out of here.

>> No.67357501

Where did I go wrong...

Basically, I tried making a grading system program thing, but normally I put everything with 45, the grade would show as F. When a float like 95.5, it doesn't show the grade (like A+, A or A-).

my code's a bit too long, so here's a pastebin.
https://pastebin.com/wuVBmcC5

>> No.67357545

>>67357501
is this even a useful program if the user has to type in that much shit

>> No.67357562

>>67357323
yes

>> No.67357563

>>67357545
I don't know, I'm trying to learn.

>> No.67357594

>>67351619
Whats a b tree

>> No.67357603

>>67351708
Learn python the hard way

>> No.67357615
File: 58 KB, 500x336, D96B98FC-045D-4B43-8E22-917104211DD5.jpg [View same] [iqdb] [saucenao] [google] [report]
67357615

>>67351748
Now try basic

>> No.67357625

>>67357603
That book is complete crap. Don't listen to anything Zed Shaw says.

>> No.67357627

>>67351784
I wish i was will hunting like you

>> No.67357638

>>67351810
My school only requires 12 credit hours that’s potentially 3 classes

>> No.67357640

>>67351619
>B-Tree
So just a linked list?

>> No.67357648

>>67351855
>youre a liberal if youre not an abrasive cunt for no reason
Ok

>> No.67357656

Why the fuck does a mail client has to be over 10k of C?

>> No.67357660

>>67357640
Yes

>> No.67357679

>>67357656
10k SLOC isn't even very much for a non-trivial program.
Also, email is actually somewhat complicated. There are a lot of protocols and standards you need to follow if you want to do it properly.

>> No.67357691

>>67355988
wats it do?

>> No.67357695
File: 56 KB, 484x443, 1517948003729.jpg [View same] [iqdb] [saucenao] [google] [report]
67357695

>>67351813
>>This isn't hard.
>Stop saying this.
Why? Are you a brainlet?

>> No.67357696

>>67357656
????
are you fucking kidding me?
do you think email is simple?

>> No.67357709

>>67351596
those are all basic as fuck stop being a brainlet bitch

>> No.67357719

>>67357709
>tfw i cant do programmig
https://www.youtube.com/watch?v=L6urRX_szKQ

>> No.67357742

>>67357501
> semgrade>95 && semgrade==100

Typo on the second comparison. Should be <=.

Learn how to use a debugger. You would catch this error immediately.

>> No.67357744

>http://haskellbook.com/index.html
Should I buy it?

>> No.67357754

>>67352065
jesus CHRIST that's fucking autistic
why would you EVER do this?

>> No.67357765

my girlfriend is starting to use python for scripting stuff at work; she only knows VBA now and thinks python is the best thing ever

so she was telling me about how she always gets type cast errors in VBA and it turns out the VBA fucking editor inside of excel or whatever other ms apps have this lang in them doesn't have any kind of intellisense or anything beyond basic syntax highlighting

what's up with that? seems like they should add that

>> No.67357766

>>67357679
>>67357696
busybox sendmail is less than 500 lines of code
why is fetchmail 30.5k?
is POP3 that complicated?

>> No.67357770
File: 1.03 MB, 1920x1080, sketch-1517146906283.png [View same] [iqdb] [saucenao] [google] [report]
67357770

>> No.67357774

>>67356686
data scientists are basically batman
they're smarter, richer, better looking, and harder working than you

>> No.67357783

>>67357770
:think:

>> No.67357804

>>67357134
just GPL it bro :^)

>> No.67357813

Lads, how do I structure and develop projects with a large codebase? A concrete resource would be nice.

>> No.67357818

>>67357813
use folders

>> No.67357833
File: 15 KB, 396x774, images(3).jpg [View same] [iqdb] [saucenao] [google] [report]
67357833

>tfw finally taking the go pill

>> No.67357852

>>67357813
Don't overdesign your program. You want your design to be somewhat freeform early on, and not impose stupid limitations on yourself while you still don't know how the program is going to end up.
Only once your program is more mature, can you go through and make things more formalized/rigid if you want to.

Basically, OOP is a fucking mistake.

>> No.67357929

>>67357813
What programming language?

>> No.67357952

>>67351784
This is actually possible to do, but here's the key, you need to be able to Google and answer your own questions. And do this over and over again. I think a lot of people are under the delusion that there's some "secret" that programmers know, that computer science programs have the power dole out, which gives you **magic** programming knowledge.

A coworker's boyfriends was CONVINCED there was something programmers knew that would make it a lot easier for him to learn how to program.

His mindset was wrong. It's not one thing, it's a million little questions answered overtime, most likely through google.

I suppose a good place to start would be to ask, "What sorts of questions should I even be asking?" I've been thinking about learning itself a lot, guys....

>> No.67358012

>>67357766
Fetchmail's feature set is just so much larger, that it's not even a fair comparison.
Busybox's sendmain is basically the most barebones SMTP client you could write; fetchmail just does so much more.

>> No.67358099

>>67352656
Ya if youre 50. Youre 21 ya daft cunt

>> No.67358110

>>67353020
Chad programmers have lives

>> No.67358153

>>67353457
Put in a two weeks notice and be respectful in the exit interview

>> No.67358181

Are there any decent programming related youtube channels? Whether they be tutorials or news or interesting projects or whatever

>> No.67358216
File: 531 KB, 750x751, 9aow9tfbszj01.png [View same] [iqdb] [saucenao] [google] [report]
67358216

All my friends abandoned me so i'm fallowing my newly found dream to program the sadness away.

Which Language should I learn.

>> No.67358240

>>67358216
What do you want to make?

>> No.67358280
File: 71 KB, 505x653, 1515905200658.jpg [View same] [iqdb] [saucenao] [google] [report]
67358280

>>67358240
Vidya is endgame, but honestly is seems rewarding enough on it's own right, so I'm not really picky on what i'd be making.

>> No.67358287

>>67358280
>Vidya
C# and C++

>> No.67358289

>>67358012
s_client does the job for POP3, and it's 3.5k
sendmail is again, 0.5k
throw in some directory and file managing code, say 1k
and we should be able to have barebones mail manager in 5k

>> No.67358291

>>67358280
>Vidya is endgame
Most AAA games are made in C++ but you could learn C# for Unity if you want to fuck around and make shit by yourself.

>> No.67358321

>>67356294
In holy c?

>> No.67358334

>>67356294
holy shit, it's in TempleOS

>> No.67358371

>>67351388
Discord bot with python
the spaghet code is tasty

>> No.67358378
File: 8 KB, 544x135, 2018-08-29_20h13_38.png [View same] [iqdb] [saucenao] [google] [report]
67358378

>>67358371
forgot pic

>> No.67358431

if FPLs are very expressive and can be used to get more compact code (less LoC) then why can't they be seen in any large project even newer and upcoming ones?

>> No.67358440

>>67356914
First, you learn boolean logic operations
then, you learn transistor logic
then, you learn how to build functional units from logic gates
then, you learn CPU design
then, and only then, you learn assembly language
then, after you have mastered assembly language (not dabbled, but mastered it), you learn C
then, after you have mastered C, you may learn the higher-level languages of your choice, but you will always use C and assembly as your primary languages because everything else is unnecessary bloat.

>> No.67358469

>>67358431
Something something pajeet something something OOPsies something something

>> No.67358470

>>67358440
no

long answer people have spent a good amount of time to specifically make programming not needing all this background knowledge.
It's recommended to know them though.

>> No.67358485
File: 947 KB, 1200x1200, 1512930634595.png [View same] [iqdb] [saucenao] [google] [report]
67358485

C does not allow you to write software as performant as it could be with the same amount of effort.
Dynamic linking is a huge mistake and LTO should be the standard and enabled on all libraries including the standard library.

>> No.67358501

>>67357004
Thatd b cool. Youd be rich and stupid thats the happiest combination possible

>> No.67358640

>>67358485
just use c++ and make everything inline lmao

>> No.67358642

>>67357004
If you started this at 20 you'd still have 300 iq at 70. It doesn't seem like a double-edged sword to me. Maybe having a large iq would suck though.

>>67358485
What alternative do you suggest for writing performant software?

>> No.67358668

>>67358640
Compiling intermediate code is faster than compiling C++ code.

>>67358642
>What alternative do you suggest for writing performant software?
C++

>> No.67358673

>>67358668
This is true.

>> No.67358678

>>67358431
I imagine the sort of people with the commitment to read or contribute to a large project would less likely be the sort of people to experiment with different paradigms.

>> No.67358690

>>67358668
The language is too large and inconsistent for my taste.

>> No.67358697

>>67358440
programming ≠ computer engineering.

>> No.67358701

>>67358690
You must be low IQ then, seeing as even I can comprehend modern C++

>> No.67358707

>>67358485
>Dynamic linking is a huge mistake
why?

>> No.67358710

>>67358697
What is a cpu if not a circuit-level implementation of an assembly interpreter?

>> No.67358717

>>67358640
Inline doesn't mean inline tho.

>> No.67358735

>>67358710
the roots of programming are the turing machine (imperative) and lambda calculus (declarative), two abstract concepts. If you want to learn circuitry and logic design, then become an electronic engineer

>> No.67358736

>>67358717
inline means vague linkage, vague linkage means you can stuff everything in headers, stuffing everything in headers means free "LTO" and trivial linking

>> No.67358758

>>67358707
Unnecessarily complicates system and kernel design
Gets in the way of optimization (no inlining, can't LTO, compiler knows less, PIC)
Upgrading a library can break existing programs.

All for little gain, one of which has been reported by operating system devs as false in practice (memory/disk space gains).

>> No.67358771

>>67358291
>Most AAA games are made in C++ but you could learn C# for Unity if you want to fuck around and make shit by yourself.
more like 10% c++ 90% scripts

>> No.67358774

>>67358735
Circuit logic is just functional programming.

>> No.67358804

>>67358701
>The analysis of the influence that programming languages have on the thinking habits of its users, and the recognition that, by now, brainpower is by far our scarcest resource, they together give us a new collection of yardsticks for comparing the relative merits of various programming languages. The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.

https://www.cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html

>>67358735
>the roots of programming are the turing machine (imperative) and lambda calculus (declarative), two abstract concepts.
What does that have to do with programming not being computer engineering?

>If you want to learn circuitry and logic design, then become an electronic engineer
That's what I'm doing, but to me a synchronous circuit still just looks like a more flexible type of program.

>> No.67358807

>>67358758
the main gain is being able to patch up a product without requiring the user to download the massive single executable again because of a small update
The main examples being OSes, web browsers and anti-viruses.

>> No.67358812
File: 195 KB, 1254x1280, download2dadcbcc_ated_2f0_2fTelegram_2fTelegram_2520Images_2f238224980_302767.jpg [View same] [iqdb] [saucenao] [google] [report]
67358812

What library for clients like curses but in c++?

>> No.67358826

>>67358707
IIRC, dynamic linking only needed to exist because X11 was too bloated for 90's hard drives. It also creates a lot of security vulnerabilites.

>"I tend to think the drawbacks of dynamic linking outweigh the advantages for many (most?) applications."
– John Carmack
http://harmful.cat-v.org/software/dynamic-linking/

>> No.67358840

>>67357625
I liked it. What do you recommend?

>> No.67358843

>>67358807
And I'm saying that little gain is not worth it's disadvantages.

>> No.67358851

>>67358485
Found the rustietard

>> No.67358856

>>67358851
Try again

>> No.67358862
File: 154 KB, 1280x844, 15344153586140.jpg [View same] [iqdb] [saucenao] [google] [report]
67358862

What to do if I struggle with coding? These basic structures don't seem to be that easy for me. And I am employed. I think as soon as I'll be given a real task I'll just shit in my pants hoping I'd encounter the solution at StackOverflow.

What to do? Why does it seem so difficult to think and concentrate? Am I doomed to be a junior forever?

>> No.67358865

>>67358807
For AV it makes more sense to manually load modules dynamically, which is not the same as dynamic linking.

>> No.67358874

>>67358707
the debate static vs dynamic has been over for years now; no one care anymore. dynamic linking is barely slower (less than 1%) and is even sometime faster (due to cpu cache). the software engineering advantage of dynamic linking are too precious to be avoided.

>> No.67358890

>>67358862
It comes with experience. Of course, if you just blindly copy-paste code from stack you're not getting any. I, personally, hate having someone else's code in my codebase (At my workplace I currently work on server-side C++/postgres/JS solo, which is a blessing), so even if I do take code from stack (and I do quite often), I thoroughly go through it, reformatting, renaming, and sometimes reworking.

>> No.67358895

>>67358826
his own games prove him wrong.

>> No.67358904

>>67358874
And software vendors all opt to ship their own dynamic libraries instead of using system or third party provided ones, which completely defeats the purpose of having dynamic linking.

>> No.67358911 [DELETED] 

>>67358862
To get to the next level, implement data structures and algorithms yourself, ideally following a book.

>>67358874
I don't see making it harder to understand what code your running as a software engineering advantage.

>> No.67358912

>>67358812
florida genocide best day of my life

>> No.67358924

>>67358843
Yes it is. dynamic libraries are also used to create APIs that can be consumed by any compatible PL and they can be extended without breaking shit or relinking.
The small perf gain is not enough to ignore the increase in memory use(dlls can be shared) and program size(dynamic libs can be listed as dependencies or already provided by the system)

>> No.67358928

>>67358862
To get to the next level, implement data structures and algorithms yourself, ideally following a book.

>>67358874
I don't see how making it harder to understand what code you're running is a software engineering advantage.

>> No.67358950

How to use busybox ssl_client to fetch POP3 mail?

>> No.67358951

>>67358181
No

>> No.67358965

>>67358924
Something doesn't have to use dynamic linking to be shared:

From: Geoff Collyer <[email protected]>
To: 9fans
Subject: Virtual memory & paging
Date: Mon, 4 Feb 2002 02:38:16 -0800

There isn't a copy of the entire C library in every binary. There is
a copy of each library routine called, directly or indirectly, by the
program in question.

Sharing of instructions is done at the granularity of process text
segments, as in V6 or V7 Unix. The text segment of a process that
forks is shared between parent and child by page mapping. Also,
running (via exec) a program multiple times concurrently causes the
(pure) text segment to be shared by page mapping across those
processes. So all copies of rc and on a machine should share a text
segment.

>> No.67358990

>>67358895
Can you give an example of what you're saying?

>> No.67359012

>>67358965
I don't understand your post nor the attached email.. The C runtime is a perfect example for dynamic linking benefits because its implementation varies across different platforms.

>> No.67359231

>>67359012
>because its implementation varies across different platforms.
Ok?
I don't see how a program could possibly take advantage of this given you'll need to ship different executables for different platforms anyway.

>> No.67359277

>>67358707
>library gets fucked with either by maintainers or something on your system
>now every application that uses it is fucked

>> No.67359282
File: 18 KB, 499x361, computahmade.jpg [View same] [iqdb] [saucenao] [google] [report]
67359282

>>67358911
>it harder to understand what code your running
dude, this is actually wanted. have you ever studied software engineering/design? interface > implementation, never forget that.

https://en.wikipedia.org/wiki/Loose_coupling

>> No.67359301

>>67359012
Is it not the perfect example for static linking so you don't end up with shit like appimages and the 20 other ways to distribute binaries on Linux?

>> No.67359303
File: 283 KB, 1440x1440, confuviolence.jpg [View same] [iqdb] [saucenao] [google] [report]
67359303

>>67358990
sure. quake 3, for example, is using dynamic linking extensively. because of that, it does allows optimization (the game load a specific library according to the hosting architecture) and modding.

>> No.67359342

>>67359303
That doesn't prove him wrong though.
Quake 3 isn't many (most?) applications.

>> No.67359361

>>67358826
People don't want to spend literally hundreds of hours of compute resources recompiling their entire linux distros whenever glibc updates.

>> No.67359376

>>67359361
since when did static lining consume hundreds of hours of compute resources

>> No.67359382

>>67359361
>Look at me I hate performance I wish performance would just fucking die already
Is pretty much exactly what you just said.

>> No.67359395

>>67359382
>performance
do you have any study backing your claim?

>> No.67359401

>>67359361
There is no need for every program to update just because glibc updated.
If whatever changed in glibc doesn't matter to your program there's no need to ship a new version.

>> No.67359404

>>67359376
If you want to update a library, you then need to update everything that links that library, and everything that links things that links that library, etc.
You then have libraries like libc which are basically used by absolutely everything, meaning everything needs to be recompiled. (relinked technically, but it's unlikely you still have the build files)

>> No.67359436

>>67359404
See >>67359401
There is no need to update everything.
And when you have static linking, there is no concept of "updating libraries" outside of compiling programs, as the only reason to even have a static library sitting on your machine is if you're compiling a program that links against it.

>> No.67359471

how the cpu cache would suffer if every app had libc statically linked?

>> No.67359484

>>67359436
>>67359401
That sounds stupidly unmanageable.
Who the hell decides/knows if a library "needs" an update? Do you think distro maintainers know all of the requirements and quirks of all of the software they manage?
Not to mention, you're now going to have to keep track of the versions that everything is compiled against (and the versions of dependencies that those are compiled against, and so on) for every single package.

You may be able to get away with this shit on an embedded system, where you have relatively low number of packages, but real linux distros have literally thousands of packages they deal with that are changing all of the time.

>> No.67359488

>>67354937
I live in Israel. We have 3 years of mandatory service, so I'd rather spend it coding and learning than in the front.

>> No.67359490

>>67359471
Not much with LTO

>> No.67359504

>>67359484
>Who the hell decides/knows if a library "needs" an update?
The maintainer/developer of the program using the library, duh.
The libraries will update as the programs update on their own anyway.

>> No.67359508

>>67359490
>LTO
what has lto anything to do with that?

>> No.67359524

>>67359508
The C library is small and simple.
The increase in size would hardly be noticeable when you LTO that with your application.

>> No.67359551

>>67359524
i am talking about the cpu cache (cache hit and cache miss). if every app has its own glibc in memory, the amount of cache misses may rise significantly.

>> No.67359553

>>67359504
>The developer of the program using the library, duh
That's not how it works, idiot. Almost all of the time, the people developing the library are not the ones distributing binaries of it.
>The libraries will update as the programs update on their own anyway.
So a program that hasn't been updated in 10 years is doomed to use 10+ years old libraries without any of the potential improvements they've had?

>> No.67359581

>>67351388
I'm getting paid to meme.

>> No.67359593

>>67359551
No it would probably decrease.

>if every app has its own glibc in memory
Except it doesn't you retard. Learn what LTO is.
If your program doesn't use something, it's not emitted in the executable.
And what your program does use is tightly optimized and possibly inlined into your program because your compiler now has much more knowledge about everything. I can easily see many C library functions always being inlined as they're quite small.

>> No.67359637

>>67359553
>the people developing the library
Do not need to worry about programs using it updating or not.

>>67359553
>So a program that hasn't been updated in 10 years is doomed to use 10+ years old libraries without any of the potential improvements they've had?
First of all, this is hardly a problem as it's already outdated shit nobody should be using.
Second of all, chances are the program wouldn't work with updated stuff.
This is a non issue and definitely not worth complicating everything and losing performance over.
What a dumbass reason to use dynamic linking.

>> No.67359658

>>67359551
Also, in modern operating systems, processes with the same text section share that text section via memory mapping.

>> No.67359693

>>67359593
printf alone takes several thousands of instructions. you seem to have zero knowledge about the matter.
>If your program doesn't use something, it's not emitted in the executable.
this is irrelevant, the cpu doesn't load the whole program in the instruction cache, only the executed parts.

>>67359658
exactly, they share the .txt of the dynamic libraries which decrease the amount of cache miss on a multi tasking OS.

>> No.67359728

>>67359693
Shared libraries don't decrease cache misses.
There's no rule saying a shared library has to be mapped at the same virtual address in every program, and often they aren't.

Static libraries + LTO would first of all decrease the distance a program has to jump to call a library function (allowing it to use faster jump instructions), and second of all decrease the size (and efficiency thanks to no PIC cancer) of the code that actually gets executed.

>> No.67359744

>>67359728
Meant INCREASE the efficiency

>> No.67359746

Does anyone have good resources for learning network programming? Very basic level, if possible. Like "what's a socket"-level.

Any language is good, C/C++ are preferred though.

>> No.67359761

>>67359728
>There's no rule saying a shared library has to be mapped at the same virtual address in every program, and often they aren't.
so? Not all levels of cache hold virtual addresses.

>> No.67359767

>>67359728
>There's no rule saying a shared library has to be mapped at the same virtual address in every program, and often they aren't.
both intel and amd are relying on both physical and virtual memory addresses for cache resolution to avoid aliasing and to decrease cache misses.

>> No.67359768

>>67359746
https://beej.us/guide/bgnet/

>> No.67359796

>>67359231
So now you have to compile for alpine and every platform version that introduces changes.
Good job.

>> No.67359819

>>67359693
>which decrease the amount of cache miss on a multi tasking OS.
By a tiny amount
Task switches are very sparse from the perspective of a clock cycle.

>> No.67359832

>>67359768
Thanks!

>> No.67359835

>>67359796
>So now you have to compile for alpine and every platform version that introduces changes.
Ok?
Performance > special snowflake distros
It's not that difficult to recompile the program for your distro. In fact, every distro already fucking does that.

>> No.67359858
File: 183 KB, 976x880, patmeonheadplz.jpg [View same] [iqdb] [saucenao] [google] [report]
67359858

>>67351388
Did i do good, /g/?

#include <stdio.h>

typedef struct{
char suit;
char value;
} card;

#define SHUFFLE_ITERRATIONS 30
#define PICK_CARD_INTERRATIONS 10

char values[13] = {'a','2','3','4','5','6','7','8','9','10','j','q','k'};

int suit;
card deck[52];

int main(int argc, char const *argv[])
{

//Initiating cards
for(int i = 0; i < 52; i++){
suit = i % 4;
switch (suit)
{
case 0:
deck[i].suit = 's';
deck[i].value = values[i % 13];
break;
case 1:
deck[i].suit = 'h';
deck[i].value = values[i % 13];
break;
case 2:
deck[i].suit = 'c';
deck[i].value = values[i % 13];
break;
case 3:
deck[i].suit = 'd';
deck[i].value = values[i % 13];
break;
default:
break;
}
}

//Shuffling deck
int card1, card2;
card temp_card;
for(int i = 0; i < SHUFFLE_ITERRATIONS; i++){
card1 = rand() % 52;
card2 = rand() % 52;
while(card1 == card2) card2 = rand() % 52;
temp_card = deck[card1];
deck[card1] = deck[card2];
deck[card2] = temp_card;

printf("Shuffling by swapping place with card at position %i with card at position %i \n", card1, card2);
}

printf("\n");
//Picking two random cards (which aren't the same)
for(int i = 0; i < PICK_CARD_INTERRATIONS; i++){
card1 = rand() % 52;
card2 = rand() % 52;
while(card1 == card2) card2 = rand() % 52;
printf("Card 1: %c of %c \t \t Card 2: %c of %c \n", deck[card1].value, deck[card1].suit, deck[card2].value, deck[card2].suit);
}

return 0;
}

>> No.67359944

>>67359835
There is no perf gain just bloat

>> No.67359956

>>67359944
>huuuuur duuuuuur

>> No.67359959

>>67358890
It's just hilarious I could land a job knowing some language specifications and STL, but at the same time not being able to write a linked list operations without tips.
For how long do you concentrate while doing tasks?

>> No.67359974

>>67359858
Did you choose C specifically? Aren't you allowed to use C++?

>> No.67360080

>>67359277
>the static libc library had a hole
>you have to rebuild all your system
Not an excuse for glibc though. musl is a good candidate for a static libc.

>> No.67360093

How can I retrieve mail from POP3 with SSL? Here's my session with "openssl s_client -connect mail.cock.li:995" (I login, then send "TOP 1 1" and "TOP 2 1" and QUIT): http://termbin.com/fdvx

>> No.67360103
File: 53 KB, 1003x474, ballsack.png [View same] [iqdb] [saucenao] [google] [report]
67360103

This is something of a /qtddtot/ in programming theory, but you don't have one. My question: am I an idiot for not getting this, or is the author of this passage an idiot for making mistakes? First by suddenly counting in the other direction in the image and finally by not even doing that right (no items of weight 3 or 4)?

Divide and Pack

The Knapsack problem can also be divided and conquered.
Remember, we have n products to choose from. We will enumerate each item property as follows:
• w_i is the ith item’s weight,
• v_i is the ith item’s value.

An item’s index i can be any number between 1 and n. The maximum revenue for a knapsack of capacity c choosing among the n items is K(n, c). If an extra item i = n+1 is considered, it may or may not improve the maximum possible revenue, which becomes the highest of:

1. K(n, c), if the extra item is not selected.
2. K(n, c − w_(n+1)) + v_(n+1), if the extra item is selected.

Case 1 disregards the new item. Case 2 includes the new item, and selects among the original items ensuring there’s enough space
for it. This means we can define the solution for n items as the maximum of subsolutions for n−1 items:

K(n, c) = max( K(n − 1, c), K(n − 1, c − w_n) + v_n ).

By now it should be easy to transform this recursive formula into a recursive algorithm.

Figure 3.13 illustrates how the recursive process solves a sample problem.

>> No.67360140
File: 42 KB, 807x659, 1463930928711.jpg [View same] [iqdb] [saucenao] [google] [report]
67360140

>>67351388
whats the fastest framework/lang for setting up a shitty crud app connected to a proper database thats also reasonably maintainable
its all i do at work and doing it with java is an asspain

>> No.67360152
File: 121 KB, 513x448, De_Rumia.png [View same] [iqdb] [saucenao] [google] [report]
67360152

>>67359956
nice argument undergrad

>> No.67360181

>>67360140
>doing it with java is an asspain
FPLs are unironically good for CRUD. If you want something similar to Java with less boilerplate and no xml bloat, asp core.

>> No.67360209

>>67360152
>I don't know what LTO or PIC is
Dynamic linking is pure bloat, not static linking lol.

>> No.67360215

>>67360181
the new openapi analyzer is fucking godsent!

>> No.67360258

>>67359974
Well, yeah, but I want to learn C. If i know C, C++ won't be very difficult to understand at all.

And the better I am at C, the better I'll understand programming in general = the more efficient code i can produce. In real projects I'll ofc use cpp, java, python or javascript since the code production speed is a lot higher, but when it comes to theoretical cases i prefer C mostly because of how "raw" it is.

>> No.67360271

>>67360258
>If i know C, C++ won't be very difficult to understand at all.
how little you know

>> No.67360287

>>67359959
I can go for the whole day doing a task, missing lunch and not noticing I'm supposed to go home 30 minutes ago. Depending on the mood. Other days I go to meetings and sit posting here in between. Generally, concentration never seems to be an issue for me. I enjoy what I do.

>> No.67360295

>>67360080
Only binaries that use the patched functionality.

>> No.67360329

>>67351388
roblox crypto miner. top games have 70k players at any given time

>> No.67360437

>>67360258
>If i know C, C++ won't be very difficult to understand at all.
You're in for a wild, wild ride with C++ my friend

>> No.67360456
File: 53 KB, 1000x800, consulting teh al gore rhythms.jpg [View same] [iqdb] [saucenao] [google] [report]
67360456

>>67351388
An Excel VBA macro to find any cells with a specific acronym and delete the rows that do not contain such a cell, other than the print title row. Then I plan to make the macro work over all the worksheets in a workbook.

It's driving me absolutely bonkers and it might end up costing me a job if it doesn't work. I have about 1000 excels workbooks to go through and print within the next couple weeks.

Wat do?
I am too pleb for this shit.

>> No.67360469

>>67360456
enjoy being unemployed soon anon

>> No.67360471

>>67351619
Just wait till you get to Trie Trees...oh wait...

>> No.67360485

I started learning COMMON LISP. It's very shouty.

>> No.67360508

>>67360456
dumb frogposter

>> No.67360514

>common lisp is not statically typed and type inferred
they had one fucking job

>> No.67360523
File: 84 KB, 658x901, 1506887313161.png [View same] [iqdb] [saucenao] [google] [report]
67360523

>>67360469
No bully.
But considering I'm reprinting these things and the last people to print them did so manually without macros I might be ok either way.
Imagine printing every single one manually.

>> No.67360540

>>67360523
stupid frogposter

>> No.67360548

>>67360514
common lisp is the worst relevant lisp

>> No.67360590

>>67360540
u mad?

>> No.67360599

>>67360590
yeah

>> No.67360656
File: 41 KB, 222x222, sadcatissad.png [View same] [iqdb] [saucenao] [google] [report]
67360656

>>67360599
I'm sorry.

>> No.67360672

>>67360656
post the gif

>> No.67360699

>>67360656
i forgive you

>> No.67360704

>>67357952
I only google when I encounter a concept I don't understand or need to learn something pedantic. Otherwise, I frequently use the man pages. Which are extremely helpful and convenient.

>> No.67360708
File: 1.23 MB, 500x220, IGoogledIt.gif [View same] [iqdb] [saucenao] [google] [report]
67360708

>>67360672
There. Compensation for your claim for being mad.

>> No.67360723
File: 87 KB, 1024x1010, a87c938caca495d456bc228bbb8f6d26beb166ea_hq.jpg [View same] [iqdb] [saucenao] [google] [report]
67360723

I have a tip for anyone working on RESTful APIs. Notice your requests ending immediately with a status of 'canceled' before returning any data? Do you see your front-end server accessing your static files again and again after each request is submitted - with perhaps the slightest visual hint of a page refresh between them? The problem isn't with your back-end or requests. You didn't prevent default behavior correctly on your front-end forms. It's therefore refreshing the page and ending the request before it can even complete.

>> No.67360844

>>67360723
>>>/wdg/

>> No.67360865

>>67360723
Whoops - >>>/g/wdg

>> No.67360945
File: 185 KB, 1024x663, ancient_monument.jpg [View same] [iqdb] [saucenao] [google] [report]
67360945

Is there a way to add a firewall rule using the command line or some API regardless of what firewall is being used (whether it's the standard Windows Firewall or some other type of firewall)?
Or would that require writing your own firewall from scratch?

>> No.67361082

>>67360485
>shouty
what do you mean ?

>> No.67361228

New thread:
>>67361224
>>67361224
>>67361224

>>
Name (leave empty)
Comment (leave empty)
Name
E-mail
Subject
Comment
Password [?]Password used for file deletion.
Captcha
Action