[ 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: 283 KB, 1125x1476, 1537999538766.jpg [View same] [iqdb] [saucenao] [google] [report]
68881296 No.68881296 [Reply] [Original] [archived.moe] [rbt]

General Programming Thread edition

Previous thread >>68872998

What are you working on, /g/?

>> No.68881318

heh thats a nice picture
these are often very good

>> No.68881321

Im trying to make a simple application that takes the input [point/coordinates]
and sorts them into different arrays for 1st of every pair being the domain and the latter being the range
im not sure if there is a specific syntactical way of doing this in python ; take the first value from a point in an array and sort it into a subsequent array

>> No.68881336

Why do "programmers" who are also "writers" and "code architects" and "designers" always put animals on their books? Do they have a sick fetish? Why are they always full of shit?

>> No.68881378

>why do these programmers keep writing books about programming?
>Do they have a sick fetish for programming or something?

>> No.68881386
File: 87 KB, 600x788, developing.jpg [View same] [iqdb] [saucenao] [google] [report]

cause animals are relevant

>> No.68881403


Thoughts on this?

>> No.68881420

Edie Freedman, a designer at O'Reilly Media thought Unix is weird and so are old engravings of animals so he put the two together. Tim O'Reilly liked it so they went with it.

>> No.68881423
File: 83 KB, 1152x720, sicp.jpg [View same] [iqdb] [saucenao] [google] [report]

I'm more curious about the SICP cover, why does the table have that weird leg?

>> No.68881469
File: 78 KB, 800x450, gabu.jpg [View same] [iqdb] [saucenao] [google] [report]

gabu a cute

>> No.68881482

I'm struggling with organizing structure of my projects. Especially constantly growing projects at work, that start as simple webservice ("we need it small and simple and on yesterday") and then grow to enormous proportions, with business logic scattered between controllers, models and helpers.

Is there some way to prevent it? Do you use some scalable project structures? How do you organize your code?

>> No.68881501

The maiden stands for functional programming. She's a maiden (i.e. a virgin) because functional programmers can't do anything that has side effects. The table stands for COBOL. That's why it has a demon foot. The bowl stands for riches, which rests on COBOL, because at least you can use COBOL for writing a business application. The maiden is being tempted by the table to give up on Lisp and write something that people will actually use. That's why she's pointing to the table. The wizard is attempting to dissuade her. The pointy things in the wizard's hand are for killing the maiden if she refuses. (Functional programmers get testy in the presence of COBOL.)

>> No.68881540
File: 15 KB, 394x383, 1542404966331.gif [View same] [iqdb] [saucenao] [google] [report]

>Anon I need you to write a flexible framework that grabs the latest build JAR from Artifactory but saves the current JAR if there is one and maybe connect to the current builds on Git and convert them to JAR using some remotely deployed process you'll need to source from some department not involved with us and you need to write it all in a way that can be explained to other devs in a single PDF page and have it all launchable and controlled via gralde commands

>> No.68881546

like this?

>>> input_array = [(2,1), (1,4), (3,5)]
>>> output_x = sorted(map(lambda i: i[0], input_array))
>>> output_y = sorted(map(lambda i: i[1], input_array))
>>> output_x
[1, 2, 3]
>>> output_y
[1, 4, 5]

>> No.68881554

very deep lore

>> No.68881584

nobody cares

>> No.68881590

I want to invent my own programming language with two types, word and address.

>> No.68881600

"nah i'm good, see you later"

>> No.68881608

i started maybe like a week ago , is this sorting by this lambda function ment to be learnt by beginners ie; am i learning python wrong

>> No.68881641

nobody cares?

>> No.68881644

O'Reilly books are (usually) great, you mongoloid.

>> No.68881649

new to c
plz rate
#define max(a,b) ((a) > (b) ? (a) : (b))

void longest_common_subsequence(char *a, char *b, char *out, size_t len) {
if (!a || !b || !out)

char *l = calloc(len + 1, len + 1);
if (!l)

char *r = calloc(len, len);
if (!r)

for (int i = len - 1; i >= 0; i--) {
for (int j = len - 1; j >= 0; j--) {
if (a[i] == b[i]) {
*(l + (i * (len + 1)) + j) = 1 + *(l + ((i + 1) * (len + 1)) + j + 1);
*(r + (i * len) + j) = a[i];
} else {
*(l + i + j) = max(*(l + ((i + 1) * (len + 1)) + j), *(l + (i * len) + j + 1));

size_t i = 0, j = 0, k = 0;
while (i < len && j < len) {
if (*(r + (i * len) + j)) {
out[k++] = *(r + (i++ * len) + j++);
} else if (*(l + ((i + 1) * (len + 1)) + j) > *(l + (i * (len + 1)) + j + 1)) {
} else {


>> No.68881656

C-- had something like that, iirc

>> No.68881666

Lambas are retarded functishit and should be avoided by any high IQ person

>> No.68881686

unreadable garbage/10

>> No.68881695

so how would i do what i said in >>68881321 without it ?
i mean it worked, and i sorta get how it works, is there a better alternative and why is it better ?

>> No.68881705

its just a function without a name

>> No.68881712

map(lambda i: i[0], input_array) is just for taking the first element of each point in input_array. Its roughly an equivalent of running for loop, so you could do it like that:
x_elements = []
for i in input_array:
output_x = sorted(x_elements)

but with map is more elegant

map(f, l) basically runs function f (so lambda i: i[0] in example above) for each element of list l
check out this link for further reading

>> No.68881713

Write a callable method like a non-degenerate

>> No.68881721

Don't listen to pajeet, lambdas are fine.

>> No.68881725

Any recommandations for quality resources where I could learn sorting algorithms?

>> No.68881728

i understand, that was my original question. i dont know how to, so i was asking, im not familiar with the python syntax

>> No.68881734

how can I improve the readability?

>> No.68881740
File: 20 KB, 297x335, CLRS.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.68881746

ctrl + f (you)
8 results
good thread

>> No.68881759

>im not familiar with the python syntax
you could improve your python programming skills very fast by learning basic python syntax before asking questions on vietnamese tapestry forum

>> No.68881762

this book is the pinnacle of retardation. absolute terrible garbage.

>> No.68881768

Its easy just
def myFunction(paramater) :

>> No.68881778

why's that?
Ive been looking for an algorithms primer.

>> No.68881779

im trying, i cant find reliable sources anywhere to teach me, either people are telling me step by step how to print out a string or they are praising OOP and sucking its dick while not explaining shit and speaking in terrible abstractions
any good starting point ? im just pissed from all the missinformation

>> No.68881784

whats wrong with using print to console statements to debug

have i been programming wrong the last 3 years

>> No.68881791

autists like me care

>> No.68881796

Go to the /g/ wiki and get one of the recommended books (Specifically 'Automate the Boring Stuff')
Always use books and avoid stupid pajeet webtutorials

>> No.68881815


>> No.68881824

thanks man, most coherent advice and explanation so far

>> No.68881837

thanks man, most coherent advice and explanation so far

>> No.68881852
File: 473 KB, 1433x779, js_rocks.png [View same] [iqdb] [saucenao] [google] [report]

JavaScript rocks!

>> No.68881875

It's mostly this shit:

*(r + (i * len) + j)

Simplest thing would be to just use a VLA since you're freeing anyway.

char r[len][len];

>> No.68881887

thanks anon

I've read that a lot of C programmers dislike VLAs - is this really true?

It definitely would make the code cleaner, in this case.

>> No.68881889

In Clips interpreter i did

(setf x '20)

And then

(+ x 14)
Why? '10 with ' is quote, right?

>> No.68881903

use pastebin/dpaste
don't use one letter variables other than i and j

vla are tricky
different platforms restrict vla size

>> No.68881913
File: 10 KB, 234x250, 0072 - gu0XYfy.jpg [View same] [iqdb] [saucenao] [google] [report]

>He doesn't know that's an O'reilly thing

>> No.68881923

>never write comments
>write unit tests ad hoc without much organization
>always debug using printf
>sometimes copy paste code
>trash variable names
>use global variables

when i make my github and upload my programs there, should i go back and write some comments, try to tidy up

the stuff works
idk about clips, but im rpetty sure in regular scheme, if you do (eval (quote 10)) you will get 10

and (+ x 14) will first eagerly evaluate the arguments

did you not read sicp

>> No.68881925

VLAs are considered bad because you can't check how much stack space is left so you might blow it up, you can't check if it fails like malloc.

For your exercise program, it's fine.

>> No.68881933 [DELETED] 

Why have you not killed yourself yet?

>> No.68881959

Quote returns its argument unevaluated.

Basically, when the Lisp interpreter reads "10", it creates a numeric object "10". Then, you quote that numeric object, which simply results in the numeric object being returned. You may also evaluate numeric objects, which results in the original numeric object. There's no need to quote self-evaluating objects such as numbers or strings.

(= 10 '10) ; T

>> No.68881963

how many books has he written
does he secretly have some brilliant strong AI program that writes the books for him
whenever i come across one of his books it's often a pretty hefty tome

how does he do it

>> No.68881980

He's just a super high IQ autist. Just be glad he cares this much about helping out his developer bros

>> No.68881986

I think imma fail a course and make parents waste 1.2k dollars to retake the course
h-hug me

>> No.68881990

Nothing. It's a tradition going back even before there were consoles to print to. In this talk, Niklaus Wirth (creator of Pascal) gives an anecdote about how they would use an instruction to ring a bell at certain parts of a program written on punch cards to debug:

But you should still be aware of and use debug tools like gdb and valgrind. Not all types of errors can be debugged with print statements alone.

>> No.68882005
File: 68 KB, 900x600, laughing_crows.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.68882017

what course ?

>> No.68882036

idk, i never liked any of his books i came across
too much
>and now there is this feature and this feature and this feature
valgrind is awesome, i never use gdb, seems it might take me too long to learn

i gotta say, some of the most valuable lessons i've learnt are from zed shaw - use a text editor not IDE, use the cli, use valgrind

>> No.68882046

sorry for cursing on 4channel

>> No.68882064

Retake the course, not just repeating the exam?

>> No.68882096

>Advanced Java

>> No.68882118

Is this a college course?

>> No.68882130

Yeah apparently
It's an elective but since small university we had no choices but this

>> No.68882133

>"""Advanced""" java
>still living off parents
Absolute state of this dude

>> No.68882169

no other option to both
minimal wagekeking here is like 200-250$ a month
Doesnt even cover basic shit let alone school

>> No.68882197

So you're stupid and poor. Quite a combo you got running there

>> No.68882230

my parents got money its okey
i just feel bad for failing
yeah for java maybe
fuck that shit

>> No.68882238

That is literally what maven install does

>> No.68882246

watching this makes me feel guilty my own compiler is a piece of trash that has the simplest and most memory inefficient garbage collection ever
8 gigs of memory, what a luxury

>> No.68882252


I couldn't find the stupid questions thread so here it goes, how many times does the done() method execute in jade?

>> No.68882258

Do numbers in lisp are nullary functions that returen themselves?

>> No.68882261

I know but my firm uses three extra layers of worthless shit on top so I have to use them

>> No.68882279

I feel you bro. At least you don't have PCI compliance bs to worry about

>> No.68882287

>tfw passed my first interview today

>> No.68882298

What happens if you don't do your programming job properly?
Do you get fired?
I'm always shit at debugging

>> No.68882328

You get promoted to a managerial position

>> No.68882341

this unironically

>> No.68882359

I mean, you might be able to think of them that way, but that's not how Lisp views them.

Lisp has two fundamental types of objects: atoms and cons'. Everything that is not a cons is an atom:
(consp (make-array 10)) ; NIL - an array isn't a cons
(consp 1) ; NIL - a number isn't a cons
(consp nil) ; NIL - nil isn't a cons
(consp (cons 1 2)) ; T - a cons is a cons
(consp (make-hash-table)) ; NIL - a hash-table isn't a cons

Lisp has a few simple evaluation rules:
* quote = s
* all atomic data-structures except symbols evaluate to themselves (including functions)
* symbols are evaluated by searching the d-list for the relevant binding
* eval[cons['cond, rest]] = [null[rest] -> NIL
| eval[caar[rest]] -> eval[cadar[rest]]
| T -> eval[cons['cond, cdr[rest]]]]
* eval[cons[a, rest]] = apply[a, eval-list[rest]]

>> No.68882378

>tfw not sure if I'll go to a final interview with a Managing Director of Accenture tomorrow morning or just stay in bed and sleep because I don't actually want the job

>> No.68882418

Do you want the money though

>> No.68882435

I'll probably be paid less than my current job. Accenture seems only suited for people interested in sales who can't produce shit themselves

>> No.68882480

how do I name my threads in Rust? in Go I name them Gophers and they are cute all working together >.<, I need something similar in Rust

>> No.68882492

"kill yourself"

>> No.68882493


>> No.68882497

>the life of a soi-developer

>> No.68882507

Alrighty /g/
I'm trying to login onto a website with python using a post request.

When I do the login authentication via Chrome the browser runs a script named ioBlackBox which puts out an authentication string which it passes along to the target website with the post request. The script seems to be integrated into the website and my question is how I would go about running this script on Python so I can log into this website without using a browser.


>> No.68882535

Free coffee is a free coffee...

>> No.68882610

that's pretty easy and in my opinion sounds like a very clear specification for a language, which means it's very doable

basically you can either compile to C and use pointers and words

OR you can actually directly compile to assembly (with or without an intermediate of your design)

i like it, and you can actually do all kinds of programming using such a language

your specification lacks one thing though, the data at the addresses are you going to garbage collect it or leave it to the programmer to figure this out

>> No.68882662
File: 35 KB, 540x960, 1544314147260.jpg [View same] [iqdb] [saucenao] [google] [report]

anyways. the request module makes this easy with requests.Session(). if you're more stubborn like me you could try and use urllib.request but it requires more steps and everywhere you look everyone recommends the request module because learning how http works is too much work for python programmers.

>> No.68882715

Stop posting that disgusting thing.

>> No.68882772
File: 68 KB, 828x828, 01e676cccfad997657c45507af08b9ab.828x828x1.jpg [View same] [iqdb] [saucenao] [google] [report]


I'll see how that works. So far I've been using requests.post(url, data) to the website's login server. Perhaps session() is a bit more robust. Thanks

>> No.68882781
File: 392 KB, 766x432, brain gremlin.png [View same] [iqdb] [saucenao] [google] [report]

>have a Python script to do some stuff I often do, placed at /home/anon/foo/bar/foobar.py
>have symlink set up (/usr/local/bin/foobar -> /home/anon/foo/bar/foobar.py) to use 'foobar' freely
>decide to rewrite the thing in C so that it's faster
>place my C project in /home/anon/foo/bar2
>compile and install it with cmake (standard mkdir build; cd build; cmake ..; make; make install)
>everything seems to be working nicely
>go back to my Python script to check something
>it's binary? wait, what?
>check 'which foobar'
>it's still a symlink pointing to /usr/local/bin/foobar -> /home/anon/foo/bar/foobar.py
>cmake's install overwrote the symlink target (i.e. the Python script) with the C project binary

Am I the dumb one here? I would have expected the default install behavior to be either copying the binary to /usr/local/bin or setting up a new symlink to the /home/anon/foo/bar2/bin/foobar binary. I guess it makes sense since replacing the symlink target is less likely to require elevated permissions.

>> No.68882945

wait what
but aren't they in different folders
wow i saw this comic
can i have more of this 19 yo girl

>> No.68882977


>> No.68882987

Yes, they are in different folders. The cmake install apparently resolves the symlink and replaces its target (wherever it might be) with the binary.

Definitely not what I expected.

>> No.68883002




>> No.68883011

kinda makes sense in some way
im not entirely sure what a symlink is but if it's a pointer to a file then you are just doing fwrite(pointer_to_file, my_c_program)
in a sense i suppose

>> No.68883082

What's the best way to make my program update on a fixed time interval?

float time = 0;
time += elapsed_time();
if(time >= .016){
time = 0;

This is the basic idea I've been using, but it gets fucked up if elapsed_time() is something like .015.

>> No.68883101

use the clock() in time.h
idk if that's best, but ought to work perhaps

>> No.68883127

sleep() or usleep() if you're just a command-line toy. system timers with event handlers if you're in the real world.

>> No.68883134

>that picture

>> No.68883299

>unreadable garbage
so, typical C

>> No.68883311
File: 21 KB, 193x261, download.jpg [View same] [iqdb] [saucenao] [google] [report]

Doesnt work, any other ideas regarding >>68882507

Also, its not about talking with the website in question, more about running a script that is on the website itself.

>> No.68883338

That book is laughable and anyone who actually opened it knows it. Font for moles, brainlet algorithms spread out on gorillion pages. No mention of cache-oblivious, dynamic optimality, nothing.
Get Skiena, Sedgewick or read a god damn paper/thesis. Fucking pretentious autists.

>> No.68883346

is it a good exercise for a beginner to reimplement String class and a few data structures classes like ArrayList, HashMap, HashSet?

>> No.68883359
File: 149 KB, 828x801, dyplom12.png [View same] [iqdb] [saucenao] [google] [report]

bumping question for interest

>> No.68883370

no, work on a real project.

>> No.68883399

ur mom fagit

>> No.68883401

yes, it is

>> No.68883431
File: 139 KB, 500x700, 1500616329156.png [View same] [iqdb] [saucenao] [google] [report]


>> No.68883432

For a beginner? Not really
Implement something that reflects what you'd like to be working on later and that generally never should involve creating low level data handlers

>> No.68883476

holy shit, he's not going to write a fucking hash table with a perfect hash function and the best possible performance

just O(1) O(1) delete is all, whatever he will be working on later will with absolute certainty involve hash tables and array operation

it's perfect practice, much better than

>> No.68883491

a propos design concerns, i was looking around on github to see how people keep their shit and what the fuck
is something like that not bothering anyone?

>> No.68883503

Depends, if you're in an academic setting doing algorithmics, computer science, bioinformatics or stuff like that I say try to implement every single data structure you use just to make sure you understand it, even if your implementation isn't what you actually end up using (which should generally be the case).

Otherwise it may be educational but it's not necessarily the best use of your time.

>> No.68883510

>the average sepples programmer, absolutely seething at somebody advising against menial re-implementation of stl shit

>> No.68883554

aaah, it's you, btfoing the sepples and cniles once more

absolutely based and redpilled /ourguy/ right there

>> No.68883576

When I look at what's generally considered top tier C code bases (e.g. sqlite) they implement their own hash tables, b-trees and the like from scratch.

>> No.68883589

>gradle clean build install pdf

>> No.68883604
File: 769 KB, 1052x1342, 1517592628950.png [View same] [iqdb] [saucenao] [google] [report]

Reminder that telling people to kill themselves is rude and counterproductive to quality discussion in /dpt/!

>> No.68883614

Has anyone here ever implemented a Van Emde Boas tree before?

>> No.68883648

bullying saves lives.

>> No.68883658

i had the idea once, do it just for laughs
decided against it

implementing a (balanced) binary tree should be good enough

VEB seems rather theoretical, like a sub nlogn sorting algorithm that has constant factors that are too large for a practical implementation

>> No.68883675
File: 68 KB, 591x911, 2352532525.jpg [View same] [iqdb] [saucenao] [google] [report]

Is pic related a good book?

>> No.68883678

No. But i implemented Tango tree about 7 years ago.

>> No.68883691

>When I look at what's generally considered top tier C code bases (e.g. sqlite) they implement their own hash tables, b-trees and the like from scratch

Yeah because they probably had a team of 3000+ people and found a guys PhD t
from 15 years ago to implement that would improve performance by 0.0005%
Use your head buddy, this isn't reflective of what most people are putting their effort towards

>> No.68883719

you dont need to implement THE perfect hash table
but if you are a total beginner it makes sense to implement A hash table, just to have an idea how it works

>> No.68883790

Nah, they've been there since the first release which was just by D. Richard Hipp alone.

>> No.68883846

What the perfect hash table (or any other data structure) is depends on your problem. For most non-generic problems you can definitely implement a better hash table than a generic one implemented for a wide class of problems by someone else. It may not be the best use of your time, but it might be useful in some situations, and it's definitely educational.

>> No.68883856


>> No.68883886

Okay, if I sort a list of integers with a bst, say an AVL tree, how I can get I an ordered list? Do I walk all the way to the left, and as I go right, push onto a stack/queue or add to a linked list?

>> No.68883901

*The hash tables anyway, I think he only put in b-trees when he dropped gdbm like a year later.

>> No.68883903

because you can't put a picture of code on the cover of a book like engineers do with bridges or mathematicians do with geometric shapes and functions

>> No.68883919

In fact looking through the code now he's had *multiple* specialized hash table implementations there.

>> No.68884021
File: 82 KB, 645x729, 1514694727315.png [View same] [iqdb] [saucenao] [google] [report]

In order to be better at solving leetcode or interview questions, what data structures and algorithms should I get really familiar with? I see linked list and stacks are easy and tend to be common so I have those down but I'd like to be able to not be a brainlet about stuff like merge sort, selection sort, BST's and etc.. I've implemented them before for school work but I never run into them outside of classes so I have a hard time retaining them.

>> No.68884315

sure, but don't forget to make them exception safe.

>> No.68884400

How do I make this work? https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a55d90520ef0bc964d7fb016c4fd2f93

The closure clearly doesn't outlive the thing. How do I tell that the compiler?

>> No.68884418
File: 266 KB, 638x363, 1508855948774.png [View same] [iqdb] [saucenao] [google] [report]


>> No.68884427

it's a step up for him from scala atleast.

>> No.68884448

Either you change the box to a reference or you move the closure into the box.

>> No.68884450

Use the move keyword before the closure's || to say that the closure takes ownership of the thing.

>> No.68884454

is it true that EE is a jobless degree?

>> No.68884457

Actually you can just do:

>> No.68884472
File: 246 KB, 500x656, file.png [View same] [iqdb] [saucenao] [google] [report]

It's a publishing company. Come on.

>> No.68884477

A yes this solves it. Thanks. Having a hard time with livetimes

>> No.68884478

>is it true that EE is a jobless degree?

There will always be jobs for EEs. Maybe not enough, but utilities and many industries employ them. If you make solid grades at a good engineering school you can find a job, and later on you can find a better one if you need to.

>> No.68884498

it's just like manning and having random art-pieces on the covers of all their books.

>> No.68884540

Is it better to start learning CS and programming from high level or low level? Today the trend is to start learning high level (SICP style) and do some low level later. I think we should start low level and high level at the same time (learning assembly/C/scheme at the same time). What is your opinion?

>> No.68884550

low level with a modern language (not C)

>> No.68884557

high level, focusing on data structures and algorithms

>> No.68884584

Depends on what you want to do. You'll need high level language stuff but it's not necessary that you'll need the low level at all.

>> No.68884591

What is your goal? Do you want to be Java codemonkey or an engineer who can solve problems at any level?

>> No.68884607

High level focusing on computability theory and categorical semantics

>> No.68884608

Is there ever a good reason to have a move constructor that is not noexcept?

>> No.68884806

What does the WINAPI file system flag FILE_SEQUENTIAL_WRITE_ONCE mean? Are volumes that have this flag just WORM volumes like CD-Rs or do I not see something here?

*asked this in sqt also but I think this thread is more suitable for this question*

>> No.68884879

Please help me decide what toolkit to stick with.

I've been bouncing around, trying different frameworks, languages, and type of development, but I can't find one that I enjoy enough to compromise on and become adept in, I'm a novice (at the very best) with too many software development toolkits.

My problem is that I keep getting hung up on how so many toolkits that would make me the most marketable all feel like I'm just duct-taping shit together until it works. I very much prefer to use all first party and/or open source tools in developing software. Ones that preferably are made for each other, with the intention of all being designed to work together from the beginning.

I was interested in giving iOS development a shot since it'd involve making software for iOS/macOS, with Swift in Xcode, but I've recently been told that most iOS development is done with JavaScript and transpilers, to more quickly get the app on both Android and iOS more quickly. I wouldn't mind eventually working with stuff like that, but I really want to become adept, and eventually master, an ecosystem of tools to create software.

I know this all probably is very counter intuitive to the programming culture/market, but it's something that my compulsive nature craves to at least be involved with, and get my first programming job in something to a similar extent.

TL;DR (and for a lack of better words)
What are the best all-in-one software development ecosystem-like toolkits that are marketable?

>> No.68884888

>Specified volume can be written to one time only. The write MUST be performed in sequential order.
My guess is that yes, like cd-r.

>> No.68884912

Thank you very much, but can you tell where did you get that info? I googled far and wide but couldnt find anything like that

>> No.68884937

It was on the msdn for CIFS


The description in GetVolumeInformationA page was less descriptive.

>The specified volume supports a single sequential write.

>> No.68884952

Did you ever hear the phrase: "The right tool for the job"?

>> No.68884977

Thanks again, I really should've guessed to search msdn for that

>> No.68884983

I have an interview with Google next month. How do I prepare?

>> No.68885011

Cut your penis off

>> No.68885012

Bring a gun.

>> No.68885079

invert a tree

>> No.68885096

>What are the best all-in-one software development ecosystem-like toolkits that are marketable?
The first thing you need to learn is that all of them are bad. They're fucking shit. Garbage. Every one, without exception.
You can get hired using garbage to make more garbage. That's fine. But you need to understand that it's garbage. If you go down this path, you will never touch anything beautiful. It's a job shoveling shit and you're doing it because you're being paid.

That said, Flutter is the new shiny thing. Like all the others, it's a piece of shit. But it has Google behind it (QUICK REMINDER: ANDROID IS MADE BY GOOGLE) and they're working on better integration with the native widget toolkits. React Native is the thing Flutter is trying to replace, and it's an even worse piece of shit, but it's also an established player with the backing of goddamn Facebook, and there's money there.

>> No.68885102

just bee yourself

>> No.68885117
File: 50 KB, 599x563, 1484154787285.jpg [View same] [iqdb] [saucenao] [google] [report]

I don't fucking understand Python conditionals

>> No.68885133

Tell me /g/ is Lua worth investing time in?

>> No.68885143

if a thing is true do a thing
else do another thing

whats not to get m8?

>> No.68885165

What does /dpt/ do to improve attention to detail?
Back out, their hiring process is shit

>> No.68885200

the syntax is fucking ass

>> No.68885213

Pythons fucking pseudo-code, i don't know how much simpler you want lad.
But what don't you understand exactly?

>> No.68885267

Yeah bro. Good programmers are generally trans, but the truly exceptional programmers are furfags. Only the best of the best are into monochromatic natural ferals though. Those are the kinds of high level experts who write books.

>> No.68885310
File: 6 KB, 250x164, 1499278555905.jpg [View same] [iqdb] [saucenao] [google] [report]

If you think OOP is so great, solve the problem of equals() transitivity throughout inheritance without breaking the Liskov principle

>> No.68885342
File: 264 KB, 148x111, its come to this.gif [View same] [iqdb] [saucenao] [google] [report]

tl;dr I'm doing this assignment where I have to pass variables back and forth between functions and if certain conditions are met then they should get return true but I'm not doing it properly and everything is returning false

>> No.68885366

post the code.
or if it's long use https://hastebin.com/

>> No.68885382

Check your indentation and don't mix tabs with spaces

>> No.68885408

>Pythons fucking pseudo-code
Wrong. It's python. There's no definition for pseudocode and I would never write pseudocode like python code.

>> No.68885411

you know what i mean you pedantic faggot.

>> No.68885440
File: 10 KB, 350x158, 31D8MFQDAML.jpg [View same] [iqdb] [saucenao] [google] [report]

How hard would it be to get the keyboard on one of these to work on PC? Could a driver be written for it (from scratch) relatively easily?

>> No.68885460
File: 53 KB, 403x448, 1510277605196.png [View same] [iqdb] [saucenao] [google] [report]

Two of the six entries will actually get the fail message but they still get added to the list anyway.


Easy on the insults, please

>> No.68885461

Do you understand the difference betwen == and is?

>> No.68885466

>you know what i mean
Not if you want me to make a favorable assumption (that you're ignorant about what pseudocode is). I can assume you're _stupid_ and think you just motivated the idea that python is simple. But you didn't, not even close.
It's not pedantry. You're making a false claim and a positive assertion from that. It's a sign of a broken mind.
Python does that to people I hear.

>> No.68885483

Question about L-Systems

Production rule:
F-> F[+FF][-F]F[-F]

First iteration:

Second iteration:
F[+FF][-F]F[-F] [+ F[+FF][-F]F[-F] + F[+FF][-F]F[-F]][- + F[+FF][-F]F[-F]] + F[+FF][-F]F[-F][- + F[+FF][-F]F[-F]]

I got the solution to the second iteration from my professor but it doesnt make any sense, can anyone knowledgeable enough confirm/deny if the second iteration is right/wrong?

>> No.68885492

>Python does that to people I hear.
don't even use Python myself, so try again.

>> No.68885504

Not him but is it like in Java's String where == compares addresses and equals() compares contents?

>> No.68885506

validator(tr_entry, acc_list)
if True:

You don't actually check what validator returns.

if validator(tr_entry, acc_list):

>> No.68885518

I hate VBA so fucking much, I hope none of you fuckers will ever have to use this godforsaken piece of shit
Why can't I just pass an array to a function as an argument? Why does it have to be this torturous every single time I try to do it?

>> No.68885521

>so try again.
At guessing what language you use?
I don't really care.
Now I'm not making favorable assumptions anymore since you rejected those.
So to be perfectly clear this post you just made was not a counter argument.

>> No.68885570
File: 61 KB, 960x945, 1428729823285.jpg [View same] [iqdb] [saucenao] [google] [report]

I'mg oing to kill myself

>> No.68885603

>Why can't I just pass an array to a function as an argument?
>Seems a bit too odd to be true
>look it up
>it's true
>there's entire pages of workarounds
Wtf is this.

>> No.68885638

Is there any way to access data coming from a USB port in c/c++ without downloading a whole library?

>> No.68885646

Is there a list of these edits somewhere?

>> No.68885667

Has anyone here ever bullshit experience on their resume?

>> No.68885690

No, I have enough real experience to get a job, so there is no need to lie.

>> No.68885695

Yes, implement your own lib

>> No.68885720

I don't see why you would but choose your platform and copy what they do.


>> No.68885721

I like lua, it's great for prototyping and writing glue layers. The syntax gets people rl mad tho - 1-indexing is fcking weird.

Been working on my halite bot for this programming game thing instead of studying. rip.

Currently struggling with how to divide decision making and pririty setting locally versus and globally. Maybe I should try to rewrite my python code into java or c++ too...

>> No.68885729

In linux it's all files, look in /dev

>> No.68885739

What? The page you linked says:

> It is possible to pass an array into a subroutine or function.

So it is possible.

>> No.68885744

Who thinks OOP is great in this day and age?

>> No.68885759

Can you connect it to your PC?

>> No.68885765

What, anon? You don't like writing a program dependent on a dozen layers of shit you can't see and don't understand?

>> No.68885772

Probably (how does the library do it if not?) You probably have to use the host OS directly, e.g. on Linux you would learn its USB API. But use a Linux distro and chances are the library is in its repositories (libusb?) which makes "downloading" trivial.

>> No.68885789

Yes there is a to-usb adapter

>> No.68885796
File: 109 KB, 220x164, popcorn.gif [View same] [iqdb] [saucenao] [google] [report]


>> No.68885799

double x = 0.1 ;
print(1 - 1/x) ;

What does your language of choice print out?

>> No.68885800

Not really, look at >>68885720

To access a raw usb device on linux, you can use one of those 3 ways. netlink sockets, udev or sysfs/usbfs.

>> No.68885804

It's still better than the Bespoke (TM) architecture I deal with at work

>> No.68885818

Syntax Error

>> No.68885824

Yes, == checks value equality and 'is' checks pointer equality

>> No.68885833

From what I've been dabbling with and talked about with full-time devs, so far, it doesn't really seem like "the right tool for the job" is being used in most cases, by companies.
It seems, more often than not, that devs want to or are told to use the quickest tools rather than the best tools.
That kind of development doesn't seem enjoyable to me.

>You can get hired using garbage to make more garbage. That's fine. But you need to understand that it's garbage. If you go down this path, you will never touch anything beautiful. It's a job shoveling shit and you're doing it because you're being paid.
but that makes me sad because I want to make at least decent quality software with at least decent quality tools, and most of it all seems unpolished and built quick to be fixed later by interns.

>That said, Flutter is the new shiny thing.
I've actually recently started loosely looking into Flutter. Is it basically the cleanest option for mobile development? Even though it surely isn't as clean as doing Xcode w/ Swift and Android SDK w/ Kotlin/Java (which companies don't seem to want to do simultaneously)?

>> No.68885834


>> No.68885835

Just an idea but maybe the emulator people have written something for it? In the best case it's open source and you can steal it and build on top of it

>> No.68885849

Currently I'm working on catching up on Advent of Code.

>> No.68885852

OOP isn't a single thing, there's OOP done well and there's bad OOP
Well written OOP BTFO any other approach by a million miles

>> No.68885861


>> No.68885867


Oh nice, you're right about where I am. I got spoilered by some friends and now I'm a little scared about Day 6.

>> No.68885871

I'm using the modulus operator in Python and trying to print alternating indications of odd and even numbers based off the blastoff function I learned in basic Python class like so:


However, when I type:

x = 25
y = x % 2
while x > 0:
if y == 0:
print ('even')
elif y == 1:
print ('odd')
x = (x - 1)
print ('blastoff!!!')

It prints the correct amount of outputs, but I get


instead. What am I doing wrong?

>> No.68885872

"Well written OOP" is an oxymoron.

>> No.68885890

y is not updated inside of the loop. It will always stay at the same value.

>> No.68885896


>> No.68885905

The problem with The Best Tool is often that it's one more dependency, possibly prohibitively licensed, that no employee is familiar with nor willing to study, and it might also render a team or two useless

>> No.68885909

Yeah i've looked into that already. You guys are my last hope basically

>> No.68885915
File: 61 KB, 700x420, 1529212211388.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.68885933

>based off the blastoff function I learned in basic Python class
>print ('blastoff!!!')
>defines y once and wonders why it's not being updated
The absolute state of modern education. You're failing at basic logic here, never mind programming.

>> No.68886001


x = 24
while x > 0:
y = x % 2
if y == 0:
print ('even')
elif y == 1:
print ('odd')
x = (x - 1)
print ('blastoff!!!')

This worked. Thanks :D

>> No.68886023

Ebin :3

>> No.68886024

I actually go both ways

>> No.68886047

Ah a true 4channel patron I see

>> No.68886065

Fair enough.
Given those concerns, what's a marketable toolkit compromise between those limitations and the currently best tools for making software?
.Net Core/C# with Visual Studio?

iOS development with Objective-C in Xcode is, roughly five or more years ago, a common go-to example I could roughly use as a comparison for what I'm wanting.

>> No.68886103

Pick an ecosystem and go with all the common tools that are popular on it. Networking and web stuff is everywhere in demand

>> No.68886114

>tfw scheme has not atom? predicate

>> No.68886124

for x in range(24, 0, -1):
print(f'{x}: odd' if x & 1 else f'{x}: even')
print ('blastoff!!!')

Fixed that for you little buddy

>> No.68886137

literally me
good thing I gave up and continued on my lisp adventures

>> No.68886216
File: 28 KB, 591x716, 1535923562173.jpg [View same] [iqdb] [saucenao] [google] [report]

>tfw you have been debugging your python code for hours to find out why it won't compile and realize you typed "blatsoff"

>> No.68886272
File: 331 KB, 700x3287, VdIrIZ6.png [View same] [iqdb] [saucenao] [google] [report]



>mfw when I see myself hurting


> mfw I see you hurting

>> No.68886295

$ gcc 'blastoff!!.py'
blastoff!!.py: file not recognized: File truncated
collect2: error: ld returned 1 exit status

Guys, I tried compiling my program and it shows this error. Now I can't open my problem, it's just an empty file. How can I undo this operation? Thanks in advance

>> No.68886342
File: 112 KB, 300x300, 1540747389731.png [View same] [iqdb] [saucenao] [google] [report]


>> No.68886371


>> No.68886394

which language is the most erotic?

>> No.68886440


>> No.68886446

Guys im using powershell for the first time and I'm falling bad. I need a simple script to compress multiple folders and it needs to have a couple of if's and one foreach statement. So far i have this shit

$path = "C:\"

$source = Get-ChildItem -Path c:\ -Filter "Folder?" -Directory

Add-Type -assembly "system.io.compression.filesystem"

Foreach ($s in $source)


$destination = Join-path -path $path -ChildPath "$($s.name).zip"

Compress-Archive -Path $files -DestinationPath $destination -CompressionLevel Fastest

>> No.68886481
File: 29 KB, 310x326, 0130 - WYr3lct.png [View same] [iqdb] [saucenao] [google] [report]


>> No.68886495

>It needs to have a couple of if's and one foreach statement
So basically this is your homework?

>> No.68886499


>> No.68886552

Why are there so much absolute retard beginners on /g/
>guise how do I use loops??!

>> No.68886581
File: 171 KB, 783x280, 15214596325498538.png [View same] [iqdb] [saucenao] [google] [report]

Is it normal to have a shit-ton of documents inside documents in MongoDB?
That shit looks so ugly, but at the same time, I suppose that's kind of the point of the DB design.

>> No.68886600

Literally thats the only legitimate reason to be using Mongo

>> No.68886640
File: 58 KB, 499x680, partitionA.png [View same] [iqdb] [saucenao] [google] [report]

I was reading an old book of algorithms and it used a simplified version of pic related (as part of a bigger problem)
However in the pseudo-code it checked if the left index was smaller than the right index every single time before incrementing/decreasing each index, without explaining why
Is there any reason to check that besides when doing the switch? I couldn't think of any, and it sounded wasteful.
If it helps, it returned the value of the left index in the end

>> No.68886643

Is there a good website for finding programming jobs based on skills and location?
I just want to check mark all of the things I have experience with, type in the city I'm working in, and then see all of the job that are hiring for those skills in that city.

Searching shit like Indeed just gives me a bunch of trash and I can usually only search one skill at a time.

>> No.68886662

Make a site like that and become a millionaire

>> No.68886684

Linked in is a bloated piece of shit but its keyword searching is legitimately good

>> No.68886687

constant stream of CS freshmen

>> No.68886709

What's the most popular language and SDK for mobile development?
I want to use what I'd probably get hired for.
Someone recently told me that JavaScript is the most used language for mobile development and that devs usually just use a popular SDK that transpiles the JavaScript into Java for Android and Swift for iOS.
That was the first I've ever heard of that, though.

I've been messing with Swift/iOS development, so I figured I should try out what's most marketable, though.

>> No.68886728

Is Android dev even worth it these days? From what I've read it's practically impossible to earn money with it as an indie dev. iOS also has new interesting stuff like ARKit, and I have a hackintosh. However I don't know Swift, and I'd have to pay $99 a year just to have an app on the app store. Thoughts?

>> No.68886732

Are you guys using next generation proprietary memory allocation techniques?

>> No.68886738

JavaScript and Java will always be marketable

>> No.68886754

This is why we should stop shitting on Reddit. If we only reply to those threads by linking /r/learnprogrammig they would probably leave and stay there. Telling them to "fuck off to plebbit" will only make them stay here

>> No.68886755


>> No.68886776

>This is why we should stop shitting on Reddit.
kill yourself, and stop replying to basic questions if you want them to leave. Dumb zoomers are ADD anyway.

>> No.68886779

My networking professor is using Cisco Packet Tracer to like configure virtual routers in class through a terminal.
He just writes the code and we copy it like sheep without understanding it.
Where can I learn this syntax and keywords by myself?

>> No.68886843

UwU my hubby sways my pwogwamming swocks make me wook wike an anine loli like the gwil in wop, wuuu love cwoding in C and nomming bwig bwack penis om nom

>> No.68886872

Stop that. I don't know, I never studied L-systems. Instead of bumping go read up on them and figure it yourself.

>> No.68886886

ive done that, and i reached the conclusion the solution is wrong. Im kinda looking to get a second opinion. I already emailed him about two wrong solutions on that paper so I dont want to do it again and sound like a smartass knowitall

>> No.68887054

How hard would it be to make my own terminal editor? Kinda bored and looking for a project to dump some time into

>> No.68887062

Very hard if you want it to be anything but ncurses notepad.

>> No.68887063

Cisco probably has a manual or book somewhere.

>> No.68887075

Any idea what language would be good for it?

>> No.68887081

Does the process and syntax change from router to router? So this only for Cisco hardware or is it universal like a programming language or something

>> No.68887108

I don't know, I'm not a network admin. I don't use those things. All I'm saying that whatever tool or language you are using probably has a reference/tutorial somewhere. Either directly from cisco or you might have to pirate it.

>> No.68887109

IOS is pretty much the same. I forget the syntax, I did it like 5 years ago.

>> No.68887134

Shut the fuck up you annoying nigger.

>> No.68887204 [DELETED] 
File: 1.86 MB, 3264x1836, 20181211_180358.jpg [View same] [iqdb] [saucenao] [google] [report]

You jelly?

>> No.68887248

The only examples of closures I've ever seen are lambda functions
what are some examples of non-function closures?

>> No.68887260

What IDE do I use with Angular?

>> No.68887269

Why does everyone keep telling me that EEs don't get jobs and that I should just stick to CS, even my academic adviser told me not to go into EE because CS is easier and pays more money. What the actual fuck, I'm so confused and conflicted.

>> No.68887272

is MVC a meme?
seems to me that however you spin it there is plenty of shit that doesn't fit in one of the three and has responsibilities in all areas

>> No.68887276

Lisp is one of the easiest languages to write a compiler/interpreter for since its syntax is so simple
you could always just write a lisp interpreter and use it to run all the huge pre-existing emacs packages that are written in lisp

>> No.68887326

Python if you don't care about performance, C if you do.

>> No.68887364

MVC is shorthand for practices that seemed like good ideas at the time, but became untenable as users expected more features and the state space of all software exploded
It's totally appropriate if you're writing software in 1998
But now we have animated widgets and let me tell you those things are a motherfucker

>> No.68887400

Closures don't have to be lambdas, but they are always functions. Consider something like this:
function foo(x) {
function bar(y, z) {
return x * y + z; // captures x - is a closure
return bar;

w = foo(3)(4, 5); // 17

>> No.68887423

Hey guys I need some help finishig this Java program. I need to add a loop so that when the FileNotFound exception class is encountered, the user is informed that the file does not exist and provides the user the opportunity to enter another file name. the loop continues until the file is found and then displays the correct file.

Here's what I have so far:

public static void main(String[] args)
File file; // For file input
Scanner inputFile = null; // For file input
String fileName; // To hold a file name

// Get a file name from the user.
fileName = JOptionPane.showInputDialog("Enter " +
"the name of a file:");

// Attempt to open the file.
file = new File(fileName);
inputFile = new Scanner(file);
"The file was found.");
catch (FileNotFoundException e)
"File not found.");
fileName = JOptionPane.showInputDialog("Enter " +
"the name of a file:");


JOptionPane.showMessageDialog(null, "Done.");

Thanks guys

>> No.68887441
File: 69 KB, 626x667, back.jpg [View same] [iqdb] [saucenao] [google] [report]

we have got the sequence of parentheses with asterisks, such as:

determine how many correct parentheses' sequences exist, given the fact you should replace all the asterisks with parentheses.
works out with Catalan's number, but:
1. input must be correct if we remove all the asterisks
2. correct sequences should be adjacent to each other

seems like a combinatorics task, yet i don't know how to proceed

>> No.68887464

What is the best syntax for lambdas
(x) -> x*2;
(λ (x) (* x 2))
x => x*2;
λ x: x*2

>> No.68887483


>> No.68887503

lambda x: x * 2

>> No.68887514

Trying to figure out what CPU I want to write an emulator for.

So far looking at 4004, 6502, 8080, and 68000.

4004 looks pretty comfy.

>> No.68887520

or i could have just said, if the number of asterisks is odd

>> No.68887538

Here is an even number of asterisks.

>> No.68887551

[](auto x) { return x * 2; }

>> No.68887560

Thanks for the advice m8s. Probably gonna look for something easier to work though to be honest

>> No.68887567

yeah, i think, Catalan's won't work out here
just remembering the index of existing parentheses, generate all the pairs using dfs seems fucking dumb and naive

there should be a smarter solution

>> No.68887568
File: 35 KB, 456x456, 1468551288516.jpg [View same] [iqdb] [saucenao] [google] [report]

>auto as a function parameter type

>> No.68887588

>generate all the pairs using dfs seems fucking dumb and naive
Considering you need to go over every single solution, it's probably fine.

>> No.68887594

How about 6502 + NES shit, once you can run NES ROMs it should be pretty fufilling.

>> No.68887634

yes, it's a generic lambda

>> No.68887642

Not a bad idea. Plus I've already studied the 6502 assembly more than any other assembly.

>> No.68887648

it might be a sick combinatorics task, though
seems like i'll have to go naive then, maybe someone would figure the smarter solution

>> No.68887693

I was wondering if other people here have issues starting projects. I've been programming for almost 10 years now. I really enjoy the learning aspect of programming, so I've picked up a bunch of languages and tools, especially recently.

However, I just can't settle on any projects of any decent size. I have some ideas on things I'd be interested in, but right now I've been learning Rust, did a few toy programs, and I don't want to work with it anymore, now I want to learn Scheme.

Am I maybe aiming too high when it comes to the types of projects I want to work on? What do y'all usually do?

>> No.68887707


To clarify, I don't have issues at work, other than occasional bouts of inability to concentrate.

I mean doing personal projects.

>> No.68887807
File: 305 KB, 1920x1080, e3a4ef2bb014fce26fd754dd22b0ed05.png [View same] [iqdb] [saucenao] [google] [report]


I've also found these, maybe this is the solution to my woes? Pick something that's small enough for me to get done in a week or two.

>> No.68887819

Learning is often more interesting than doing, if you can't settle down on a project you'll end up with a bunch of half finished projects in a bunch of different languages.

What do you want to write the most?

>> No.68887922
File: 23 KB, 702x537, 1528887019848.jpg [View same] [iqdb] [saucenao] [google] [report]

Has anyone here ever implemented a Van Emde Boas tree before?

>> No.68887944

No but I have seen a tree(spruce I think) before. I believe this makes me an expert on this topic.

>> No.68887960
File: 1.61 MB, 3840x2160, gchallengesv4.png [View same] [iqdb] [saucenao] [google] [report]


>> No.68887968

Then why don't you make a tree and get out of here.

>> No.68887977

I watched that MIT lecture on it and got very confused

>> No.68887996

New thread:

>> No.68888022

I'm restarting from halfway, and taking notes this time.

>> No.68888044
File: 809 KB, 1300x1244, comfy lain.jpg [View same] [iqdb] [saucenao] [google] [report]

Beat me by a few seconds. Mine would have been better.

>> No.68888060

Misaka a cute. Lain a shit.

>> No.68888065 [DELETED] 

All anime is shit.

>> No.68888067


That's exactly what I'm finding; it's more fun to learn than to sit down and write a program larger than 100 lines. I've been doing bash lately and doing scripts for my system. I do enjoy configuring my text editors and shell, that's always fun.

Project wise, Im a game dev by trade, but things that interest me are tooling around that, so compilers, text editors, shell tools, graphics. All also require a lot of work, unless I just do some basic toy versions.

>> No.68888124

a language created because brazil had crappy laws?

>> No.68888193

No you're shit.

>> No.68888293

do you have anything I could use to learn how the ppu works (and be able to emulate it)? I've implemented all the 6502 instructions including the undocumented ones already.

>> No.68888381

yeah, the DNA of scheme is definitely different from traditional Lisp. Common Lisp is a successor; Scheme is a fork.

>> No.68888400

>degenerate weeb gets hostile when his life gets questioned

>> No.68888425

ok kid

>> No.68888427

What about

And you could always reference other emulators source code.

>> No.68888450
File: 56 KB, 260x263, 0928 - HvK6DGX.png [View same] [iqdb] [saucenao] [google] [report]


>> No.68890117

Angry and hostile posts are the signs of a person that already lost the argument.

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