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

/vt/ is now archived.Become a Patron!

/g/ - Technology

View post   

[ Toggle deleted replies ]
File: 15 KB, 275x275, tourist.jpg [View same] [iqdb] [saucenao] [google] [report]
66906821 No.66906821 [Reply] [Original] [archived.moe] [rbt]

Real Programmers Edition #11

Previous thread: >>66898294

What are you working on, /g/?

>> No.66906832

>Defends meme language
>Responds with a meme

>> No.66906838


>> No.66906845

size_t page_size = (size_t) sysconf (_SC_PAGESIZE);
mmap(0, page_size, PROT_WRITE, MAP_ANONYMOUS, -1, 0);

What's wrong with this?

>> No.66906850

I'm not writing C++

I'm writing C with classes.

>> No.66906852

Arguably the best competitive programmer in the world.

>> No.66906854
File: 866 KB, 620x474, txt.webm [View same] [iqdb] [saucenao] [google] [report]

>What are you working on, /g/?
webm related.
I saw one of those programming challenge pictures floating around and I picked this text to binary/hex as a reflection of my current skill set.
Pretty happy with it.
I'm the weekend hobby guy if anyone is wondering.

>> No.66906890

Are you the type that throws out STL or just language features? or both?

>> No.66906900

I'm basically writing C but with classes anon.

like C, not C++

>> No.66906936

the whole stl is classes and you can achieve value semantics with just about anything by using modern features. You're missing out.

>> No.66906954

I did char to hex when I didn't notice printf had it.

I did bytes to binary to convert fax bytes to a legible format (the encoding is binary keywords, non-byte-aligned)

>tfw I didn't get a job because they said they wanted a programmer but only actually wanted a technical writer when I was talking about byte-alignment issues for 30 minutes with their lead programmer

Faxes are not byte aligned, Tiff images of faxes are in some ways. A little annoying.

>> No.66906988

>competitive programmer
So nobody of any relevance, then.

>> No.66906993

Any working and safe python interpreter for android?

>> No.66906995

>Expand on "mentally ill, nerds and retards", why is that?
Impractical langs used (and more often talked about) by insufferable retards and hipsters.
Most of them don't serve a general purpose or any at all and those who are claimed to have one end up with a design that goes against it making it completely useless and good 'in theory'.
They are designed by autists that care about theories and feature count(anything not found in mainstream langs -mostly niche syntax- so they can brag about it be it useful/practical or not) rather than simplicity or practicality.
Their communities feel superior for being 'newer' (like Go and F# tier new or something that wasn't invented before for a reason like the Rust and Crystal mess) and having X feature that is either useless/is their to fix an issue or measly compared to the overall design and its flaws(which they hail greatly for its 'novelty')
Their communities suffer greatly from inferiority complex (causes above) e.g >>66900461 and have to make whatever claims they can against what they think is their major competitor (e.g Rustfags think they are anywhere near sepples and C)
There is a right tool for the right job but these memes are only good enough to be talked about.

>> No.66907023
File: 8 KB, 200x255, download (2).jpg [View same] [iqdb] [saucenao] [google] [report]

Finally convinced people at work of using the latest angular
I'm working in migrate our app from old angular with vanilla js to the latest angular with typescript

>> No.66907044

He looks like a white Louis Rossmann

>> No.66907047

the difference is the one on the picture is actually jewish

>> No.66907061

There was never any attack. It's absurd to think that just because 1 person is mostly responsible for something, that it is inherently bad. That makes no sense. You should judge the language on merit alone, not who is behind it.

It's not controversial anymore to say that language design via committee often results in bad languages. It's not the fault of the committee, but it does negatively impact the language itself.

A small team designing a language have just as much merit as a large committee, but ultimately it's the merit of the language and tools that you should be judging.

It's possible for a single man to make something great. Maybe you lack confidence.

>> No.66907070

>Pydroid 3
worked fine

>> No.66907071

He's Belarusian

>> No.66907085

Jewish is not nationality dummy

>> No.66907088
File: 92 KB, 1440x900, 2018-07-27-111202_1440x900_scrot.png [View same] [iqdb] [saucenao] [google] [report]

>> No.66907155

>It's absurd to think that just because 1 person is mostly responsible for something
Really? Can a single man create a language and the crucial ecosystem behind it to make it a viable alternative to existing languages?
A LLVM frontend by itself is an ambitious goal.
A static analyzer?
A debugger? Probably leveraging existing ones but that will still require some work.
For editor support, I guess he'll go for something like GNU nano regex-based stuff, but for many people that's not enough.
Guides? Books? Examples? Demos? Working products?
Native libraries?
A game engine? A game engine on it's own is a big undertaking. A game framework then, maybe? That's easier, but still requires a lot of work.
>not who is behind it.
I'm judging on how many, not who's specifically.
>It's possible for a single man to make something great. Maybe you lack confidence.
I just think that designing a new language and hoping for it to achieve a dent in the market is a huge undertaking impossible for a mere mortal.
But I guess I'll shut up and we'll both see.

>> No.66907166

How do you know what's his religion?

>> No.66907180

Scheme is an excellent language originally designed by just two people.

>> No.66907197

Did you read my previous post? >>66906836

In the specific case of Jai it's not 1 person. But I stand by my claim that it's not impossible for 1 person to make something as complex as a programming language, alone, and have it be good. There's no legitimate reason why this can't be the case. Especially when you factor in that as time progresses more resources and lessons are made available to people to learn from and utilize.

I wonder how many people at Bell labs actually had significant influence on C. And take into account the history they were working with, not too much paradigm overlap.

A single simple solution can solve an incredibly complex problem.

>> No.66907199

That was 48 years ago.
Nowadays expectations for a new language are a bit higher.

>> No.66907223

>expectations for a new language are a bit higher.
Evidently not, given the rubbish many people use, advocate, and ask for.

>> No.66907252

where the FUCK do you think you are, bitch boy?

>> No.66907258

There's no correlation between any of those 3 things (time, expectations, merit).

If you're actually interested in the process, go see it first hand.

The programming language itself and the compiler being built.

For decades people have accepted that this is the way things are and are quick to say "you can't do that!", it's refreshing to see Jon say "actually, it's just that easy". It really is, a compiler is nothing other than a program in itself. It doesn't take a genius to determine which existing concepts are valuable to have and which are missing from other languages.

We need to stop treating programming languages as some arcane, impossibly-complex thing just because some are. College kids make them all the time. That's not to say any of those are good, but it's proof enough that it's possible to do, it's just a matter of someone doing it right.

>> No.66907266
File: 37 KB, 311x55, meme.png [View same] [iqdb] [saucenao] [google] [report]

>I did char to hex when I didn't notice printf had it.
Thanks for letting me know.

>> No.66907270

>given the rubbish many people use, advocate, and ask for
Provide an example.
>Did you read my previous post?
I did.
>In the specific case of Jai it's not 1 person.
Are they working full-time? I don't think there's any company backing them up, so they're probably part-time.
>I wonder how many people at Bell labs actually had significant influence on C
But they had years to come up with the design and ecosystem.
C evolved from B, which in turn evolved from BCPL, which was base on CPL.
They had time and financing to to build a portable compiler and an operating system with it.

>> No.66907331

I don't wish to continue discussing this, you seem to be hung up on aspects that seem arbitrary to me. We may just have different perspectives on the matter and it's not my goal to convince you of anything.

For instance, working full time or not seems arbitrary. It's such a highly subjective thing. Most of the engineers I work with are full time salary, that doesn't translate into ANYTHING at all, you can't even gaurantee 8 hours of work a day from them, but sometimes they'll put in more than 8 hours of work, maybe on a weekend.
Engineering isn't a physical job where you can just clock in, grind it out, and be done. Thought and tact has to go into your projects. And the abilities of each individual varies wildly.

To me I can't imagine why someone would focus on these details, the only sensible thing to me is to wait and see. For the moment it shows promise, when it is released to the public I will evaluate it again. But I'm not going to damn it now, just because it isn't a common event.

>> No.66907342

They told me Python is pretty /g/
if force:
except OSError:
except OSError:

>> No.66907347

Hullo GraphQLords
I've run into a situation where a Graph database and GraphQL would be a good fit.
I plan on using Graphene-Python, unless there is something better.

How do you document your GraphQL API?
With REST APIs it's easy because swagger is universally used, but how does this work with GraphQL?

>> No.66907353

>the only sensible thing to me is to wait and see
I agree.

>> No.66907355


>> No.66907426

Nevermind Python is pretty
if force:
shutil.rmtree(path, ignore_errors=True)
os.makedirs(path, exist_ok=True)

>> No.66907440

How many fedoras and katanas do you have anon?

>> No.66907460

who is this boy and when can i fuck him

>> No.66907483

That sounds about accurate - programming circlejerks are definitely a thing. But what is wrong with Haskell/Rust/Go, concretely? Some of the best programmers I know love Haskell (although they rarely, if ever, use it to do things with it), and all the buzz about Rust and Go can't be just memes and people trying to out-hipster one another. Nim I hadn't heard about.
So, between Py and C#, which one will give me less trouble with cross-platform stuff? Ideally I want to use this in both Win and Linux

>> No.66907486

You know the only country in Europe with capital punishment? Belarus.
You know the only crime punished by firing squad in Belarus? Faggotry.
You know where the boy is from?

>> No.66907588


>> No.66907624

Haskell/Rust are academic languages designed to be perfect about theory without any regards to what works in industry. They're obsessed with preventing things the "unsafe" way and only letting you write programs that the static analyzer can understand, well that means they're not touring complete, meanwhile a C program actually runs on a real computer, I can run it on a microwave.
There are no problems with Go, it's the future of programming. Even ESR says so and he uses C.

>> No.66907629

I went to Belarus. Ironically, for a team programming contest. I hope to get into my university's programming team yet again this year.

>> No.66907646

Did you really just imply that Haskell and Rust are not turing complete? Even the type system is turing complete in rust: https://sdleffler.github.io/RustTypeSystemTuringComplete/

>> No.66907657

How can they be, because that would be """unsafe"""

>> No.66907660
File: 409 KB, 1920x2184, 1532639410372.jpg [View same] [iqdb] [saucenao] [google] [report]

SDL anon where are you

>> No.66907697

is this real?
this is the second meme of her
it can't be that bad

>> No.66907724

here I am
what hast thou for me?

>> No.66907735

Who is she?

>> No.66907737

make a program that draws the "code" in the picture i posted

>> No.66907746

what's in it for me?

>> No.66907757

my gf

>> No.66907760

>So, between Py and C#, which one will give me less trouble with cross-platform stuff? Ideally I want to use this in both Win and Linux.
Python is not that good on windows and C# is not that good on GNU/Linux (core 2.1 will be more than fine for your project though)
Go with Python if you don't have/want to install the massive runtime and go with C# if your project is medium in size and/or needs a GUI.

>> No.66907766

karly kloss
became a meme after "cd cd .. cd ls" came out
now this

>> No.66907779

eternal memes?

>> No.66907788

I have like 5 different computers in different places, each having a python install. I shared my work directory so the things i change will propagate to the other computers. But im at a point where i dont know what modules are installed where. Can i just share the installation folder of python between the computers so the modules will be the same everywhere? All of the computers run the same os btw.

>> No.66907789

what a brainlet for a gf you have

>> No.66907793

yeah, but I have SEX with her

>> No.66907829

>Haskell/Rust are academic languages designed to be perfect about theory without any regards to what works in industry
>There are no problems with Go, it's the future of programming
Incorrect. There are no good points about Go. Only autists would use a watered -down C because 'coroutines'. Most modern PL (even the shittiest) can do that and more without the retarded type system and syntax.

>> No.66907836

pipenv is how pythonfags deal with this now.

>> No.66907870

i am semi beginner, starting apprenticeship soon.
So i wanted to work with c# a little, since i never did before and gonna use it there.
I get extremely stuck with the basics? of WPF just trying to databind shit with a template.
This isnt the first time i get annoyed at language specific GUI stuff, it just seems extremely unintuitive and the knowledge is hidden away god knows where.
Am i just retarded? is this normal?

>> No.66907881

>There are no good points about Go
Not the guy you're replying to but I've heard Go has in-built GC you can disable when you need, strings, vectors and hashmaps. These things are the toughest for me to deal with in C.

>> No.66907889

If you create a virtualenv and share it the same way as you share the code, your environment will always be up to date

>> No.66907911

ignoring the return value of mmap,
you only set the PROT_WRITE flag so you can only write into it which seems useless for an anonymous map.
i think you may have to use MAP_SHARED or MAP_PRIVATE flag as well

>> No.66907922

I figured it out it was MAP_PRIVATE thanks

>> No.66907937

>knowledge is hidden away god knows where
I'd say that's pretty normal for GUI builders, have fun.

>> No.66907994

will take a look

never used virtualenv
if a module is updated do i have to update it in every virtualenv?

both of these looks like more work than i imagined

>> No.66908023

if you think one person can't do those things you're a fucking brainlet
most languages are designed by one person, the support ecosystem comes later when the language manages to catch on

>> No.66908049

I studied some C and some java, I know how to write and read files, and I wanted to make cli script to get information from an API, like wikipedia. But I don't even know were do I start, specially how to connect. I know that usually I need a key and there are some commands that return what I ask, etc, but I haven't found any guide that handhold me for a little while to get me started, can someone point me out to some helpful guide or book?

>> No.66908078

>if a module is updated do i have to update it in every virtualenv?
virtualenv contains an entire python environment in a directory. If you keep that directory sync'ed the same way you do with the rest of your project, then you only have to update once.
Both pipenv and virtualenv are as straightforward as you're gonna get as far as environment maintenance goes.

>> No.66908206

Is there a quick and easy way to get the number of entries in an enum/enum class in C++?

>> No.66908219

Would you mind answering a few things?
If i activate some environment in a console, open up a new console and run python will i be in the same environment as the other console?
If i have x and y module in env1, x y and z module in env2 will the 2 environment take up more space than just x y and z itself?

This is so confusing, i think im at an age i cant get used to new things.

>> No.66908249

make an extra enum member and read its value

>> No.66908268

Nice, hadn't thought of that.

>> No.66908363

I would use constexpr/#define since it's not an actually part of enumeration

>> No.66908366

>If i activate some environment in a console, open up a new console and run python will i be in the same environment as the other console?
No. In the first you will be in the virtual environment, in the second console you will be in the global python environment.

>If i have x and y module in env1, x y and z module in env2 will the 2 environment take up more space than just x y and z itself?
Not sure what you're asking here. Each environment has it's own modules and are independent, and you can have the same modules in multiple environments. So if you install the same module in two environments, it will take twice the space in the hard drive.
virtualenv has it's own files to manage stuff, so you do have a bit of "overhead" when using them, but I don't think it should be an issue at all.

>> No.66908417
File: 5 KB, 250x250, 1515692158657s[1].jpg [View same] [iqdb] [saucenao] [google] [report]

>learning programming

>get existential dread that you'll always work food service every time you hit a wall
>too old to join the military
>too pussy to kill myself

Is being a full time college student for life and living off of FAFSA a viable career path?

>> No.66908513

It would need a GUI, yes. Is building GUIs in python hard or something? I don't know much python, just the basics, but it's a fairly intuitive and flexible language, it sounds strange.

>> No.66908518

Thank you

>bit of "overhead"
Thats what i was afraid of, take numpy for example, its huge.

>> No.66908525

There is still organized crime.

>> No.66908568

Academia is organized crime.

>> No.66908591

If you create virtualenv with --system-site-packages flag, you don't need to install numpy for example if it's installed globally, and it won't take extra space, and every virtualenv created with that flag will use the same numpy installation.

>> No.66908824

I've done a lot of Windows desktop application GUIs in Java, Tcl/Tk, Python, and C# (and probably some others that I forget...). My order of preference is:
1. C# (using WPF and MVVM)
2. Tcl/Tk (everything's a list!)
3. Python (WxWidgets, it's fine...)
4. Java

Bindings in MVVM are like a small miracle. Not super easy to pick up, but they make everything so much easier/faster/simpler once you understand them.

>> No.66908841
File: 1.98 MB, 540x304, 64365234523.gif [View same] [iqdb] [saucenao] [google] [report]

As long as you're not making something with real stakes, like paypal or some banking stuff, why would you give a piss about protecting user passwords as opposed to just storing that shit as it is?

>> No.66908863

Dankey Kang?

>> No.66908883

Because idiots use the same password everywhere they go.

Sure, they're not your responsibility and technically you shouldn't be liable if a password stolen from your site is used to drain their bank accounts... but do you think a jury of other idiots agree?

>> No.66908910

my bank has some kind of 2FA, and I assume by the current year, most banks do, so I don't think that's that big of an issue

>> No.66908930

Didn't make it into the team, did you?

>> No.66908942

When it's as easy as hash(string), why not?

>> No.66908952

People are extremely stupid and any design flaws you build in just because you're lazy will be abused by the stupid.
Besides; it's EXTREMELY EASY AND SIMPLE to store hashed passwords. Take the password, hash it with the stored salt, and then compare it against the stored hash to provide the user with a valid session.

>> No.66908973

It's fine for people to be stupid as long as it hurts them. Only smart people should use technology.

>> No.66908984

> I assume by the current year, most banks do

>> No.66908991

Because if you provide a service, then at least one user has valuable information, and that's what you're protecting.
If no one uses your service and/or it has no value, then by all means, store plain text.

>> No.66909033

It's 2018, the users are cattle, the real customer is big data and ICOs

>> No.66909048

And they will sure love to hear you store shit plain text.

>> No.66909092
File: 115 KB, 675x1200, 58374813748.jpg [View same] [iqdb] [saucenao] [google] [report]

>be in 7th grade
>everyone is learning pascal
>I'm all edgy and speshul and decide to learn c++ on my own
>local competition time
>supposed to be piss easy, with almost everyone qualifying for the regional stage
>use c++98 with gcc(mingw) because that's what I know
>regulations state students in junior high are only allowed to use pascal or turbo c++ (with no support for c++98)
>lol who cares, that's ridiculous
>get disqualified
>marked with 0 points (where the theoretical minimum is 10)
>subsequent year, they silently remove the rule

>> No.66909130

>break rules
>get disqualified

>> No.66909136

Maybe they removed the rule because of you, maybe you had a positive impact. Rejoice.

>> No.66909138

where's the traverseposter

>> No.66909183

he reached the rock bottom and started digging

>> No.66909328

Any language that cannot implement traverse is unworthy of use in this century. If you use such a language then you must immediately leave /dpt/ and not return until you have atoned.

>> No.66909340

Too busy programming useful stuff

>> No.66909343

>be a rulesfag
>get reamed in the ass by idiotic rules
>At least I don't live in an anarchic society!

>> No.66909404

Life must be so confusing for you
>break stupid law (it's stupid)
>get fined

>take a tiny loan
>don't make payments (it's tiny, who's gonna care?)
>get sued

>make a small promise
>don't keep it (it's small, whatever)
>friends don't trust your anymore

>> No.66909409

Truly, traverse is necessary, but not sufficient. We must always strive to improve the tools we use. Say no to first-order-only useless ad-hoc imitations of battle-tested features of proven utility. Say no to sliding backward to languages belonging to the 1970s. Say no to lowest common denominator technologies designed to stultify the minds of armies of programmers and enforce a culture of mediocrity.

>> No.66909422

what useful stuff have you created, anon?

>> No.66909434

An unencrypted database that gets hacked also harms innocent users, not only the developers.

>> No.66909435

Various things at work

>> No.66909441

Someone said that I should use enum on this simple switch case but I don't know the fuck I'm doing, why I can't access the enum with the index like on C? What am I supposed to do with enums if I can't do that? t. brainlet

public void move() {
int moveTo = (random.nextInt()+1 ) % 4;
// 0 n, 1 s, 2 w, 3 e

private enum Direction {NORTH, SOUTH, WEST, EAST};
switch (Direction) {
case NORTH: if ((y + 1) <= maxY) { y++; return;}
case SOUTH: if ((y - 1) >= 0) { y--; return;}

>> No.66909460

Use traverse, young neophyte, and everlasting enlightenment shall be yours.

>> No.66909481

I'm too dumb to program. I cant even use vim correctly but I want to be a tech master..

>> No.66909489

Don't you think a guy like this will be eventually hired by a corporation and contribute to a technology that will have impact orders of magnitude greater than whatever you do?

>> No.66909494

The onus is on the users to know whether their passwords are stored with encryption

>> No.66909510

also any language that can't take traverse as a parameter and store it in a data structure

>> No.66909542

building automation with selenium to send spams keys like
"linux is the kernel",
"install Gentoo",
"I killed a CIA nigger with my car".

>> No.66909549

No, I don't.

>> No.66909566

Socket programming, network packets, etc.

>> No.66909571

void traverse(size_t n, size_t elemSize, void *p, void (*fn)(void *elem)) {
for (size_t i = 0; i < n; ++i) {
fn((char*)p + i * elemSize);

>> No.66909580

Naturally, traverse must be definable as a first-class citizen. For being able to express traverse is but the first step on the road to salvation.

>> No.66909584

I'd think otherwise, but fair enough.
Suggest your real programmers.

>> No.66909589

There's web programming, android/iphone, and PLL+CMSS stuff for the majority of programming jobs in my area. Enjoy

>> No.66909597

That is not traverse.

>> No.66909601

What is traverse
Enlighten me master

>> No.66909613


When you are ready to commit changes, do git add -p. This lets you interactively select exactly what changes go together for a commit.

If you change things for 3 different reasons. You make it 3 commits easily this way. Using this made my commits much more helpful and atomic.


Don't underestimate theory. You can't make a good language in ignorance of it. Theoretical languages aren't just wankery. They explore real tradeoffs. Industry always follows theory, even if they are 20 years behind and tweak things for convenience. This is because it is much easier to steal ideas already developed by academics than developing new ones from scratch.

C was designed at a research lab for a pet project and heavily influenced by ALGOL. It literally became popular because colleges could get Unix cheaply for fuck's sake. How much more "industry" can you get?

>> No.66909626

Read, and become enlightened, young neophyte.

>> No.66909649

imho traverse itself is nice but traversals in general are a broader concept (see lens)
Very useful and I now use them and other lens stuff all the time

>> No.66909658

The only programmers I know to be real are those with whom I have worked.

>> No.66909664

My language is like Agda and it can do traverse.

>> No.66909677

Indeed, traverse is but the first step on the road to salvation.

>> No.66909678

I read an interesting case of storing passwords, I forget where.

1) store passwords as is, and lock it off the best you can
Problem) one compromise and EVERYTHING is fucked

2) store one-state encrypted stuff
Problem) have to transmit plaintext, though only one thing is compromised

3) I think the book/article was written before two-password "partial encryptions". I think there's a way you can encrypt something with two sets of known half-keys, so if a system is compromised only half the algorithm is sabotaged i.e. they could decrypt data received but the other side couldn't understand what's sent back

>> No.66909685

You knew what I meant.
Stop dodging the question.
It's so easy to criticize.

>> No.66909688

Then rejoice, for your language may yet prove to be worthy.

>> No.66909712

What the FUCK are you switching? Direction is the name of an enumspace, it's not a variable ya dingus.

>> No.66909722

Not them but I think genius can, in rare instances, trump industry experience. Most of the people in my office are very average, but there is one person who is both an incredible programmer and the least experienced of all of us.

>> No.66909763

>Hey computer! A direction can be north, south, west, or east, ok?
> Hey computer! NORTH OR SOUTH

>> No.66909770

I know of no other real programmers with certainty. I have heard and read only rumors, myths, and legends. Of Simon and Edward, Edwin, Ulf and Catarina, and others. Sadly I can neither confirm nor deny whether such people truly exist.

>> No.66909773

>Hey computer! Hey listen!

>> No.66909793


Suppose a hacker gets only password data, which is a common target because it is easier than admin access.

Your way, they and whoever they sell to can now fuck with any users account any way they please and you can't tell the difference. Expect a mass exodus of users when people start finding your service sends gay porn spam.

By storing a salted hash, your users accounts will still be inaccessibe to the hacker.

>> No.66909811

Sorry to tell you, no amount of genius prepares you for bullshit. I actually am a Mensan and it took me more than a day to find out a library needed to be compiled with C89, because C had been updated and it broken a very rarely used codebase. With the same knowledge, a genius should outperform someone less intelligent, barring personal differences.

>> No.66909819

You would make a great dad.

>> No.66909822

>Expect a mass exodus of users when people start finding your service sends gay porn spam.
>gay porn
I don't get it??

>> No.66909883

Thank you, anon.

>> No.66909961

Enums are programmer-friendly labels for constant values.
You pass them around to make it easier for you to understand what kind of state is being modified and why it's being modified in that way.

Any problem that would normally be solved with enums can be solved without enums, but you are not a machine, so you won't just blindly execute logic without understanding what or why it does what it does.

>> No.66909990

What I'm hearing is the excuses of the incapable.
You're obfuscating your inability to securely store and request for authentication credentials so that you don't seem like a brainlet.

But we all see you for what you really are. There's no need to be afraid, we are all anonymous

>> No.66910011

In Java, how would I write a method to convert a string to another object?

>> No.66910051

I just realized I have an extra computer with no real use. I don't want to program on my main computer or other thinkpad.

What OS should i put on this computer to program with? I want to use python.

>> No.66910093

Like a manual casting to other type? Not sure what you mean by 'another object', and that depends entirely on the object you want to cast to, anyways. Try to give a more lengthy description of what you want to do
Any Linux distro will do

>> No.66910103

I might install something different other than Linux mint because it fucking sucks

>> No.66910122


>> No.66910130

Is there a version of JSON with prototype-based inheritance? I really need this thing to avoid ridiculous amounts of repetition everywhere in my JSON documents.

>> No.66910135

I hole-hardedly agree, but allow me to play doubles advocate here for a moment. For all intensive purposes I think you are wrong.
I have a sick sense when it comes to these types of things. It is almost spooky, because I cannot turn a blonde eye to these glaring flaws in your rhetoric. I have zero taller ants when it comes to people spouting out hate in the name of moral righteousness. You just need to remember what comes around is all around, and when supply and command fails you will be the first to go. Make my words, when you get down to brass stacks it doesn't take rocket appliances to get two birds stoned at once. It's clear who makes the pants in this relationship, and sometimes you just have to swallow your prize and accept the facts. You might have to come to this conclusion through denial and error but I swear on my mother's mating name that when you put the petal to the medal you will pass with flying carpets like it’s a peach of cake.

>> No.66910180

A theory language might be acceptable as a proof of concept but it can't be used in production

>> No.66910192

WTF does traverse even do?

>> No.66910200

I'm trying to read lines from an excel file, tokenize the cells, store the results in an array and copy the results to an object array that will process them.

>> No.66910207

C++ is faster than C. Why do people use C?

>> No.66910222

traverse :: (Traversable t, Applicative f) => (a -> f b) -> (t a -> f (t b))
here's a cute idiom: it's sort of like a multiple getter/setter for a generic data structure

>> No.66910226

See >>66909626

>> No.66910256


So it's basically a for loop in function form? Ruby's each method?

>> No.66910273

sort of, yes
and Traversable is like an interface where different generics can provide different "each"-s

>> No.66910289

Probably because it's not a piece of shit language

>> No.66910290

Don't forget the effect type.

>> No.66910293

I'm shocked by just how good a piece of technology Vagrant is. The API is so simple, but it does so much.

>> No.66910300

Ain't reading that copypasta

>> No.66910306

A car is faster than a bike. Why do people use a bike?

>> No.66910313

because they're obnoxious wankers

>> No.66910317

On nothing. Resting is part of the training, right?

>> No.66910323

So what? That's nothing special. Pretty much every bread and butter dynamic language does the same thing. You're acting like this is some kind of mindraping innovation.


>> No.66910331

traverse-anon, is traverse a turing complete construct?

>> No.66910340

It's literally slower than C and has less features. Just because you have a hard time understanding something, that does not make it bad.

>> No.66910345

first of all, the types
second of all, it works for any applicative functor

>> No.66910353

>Slower than C++

>> No.66910369

Types are theoretic wankery if they do anything more than tell the compiler how much stack space a variable needs

>> No.66910372
File: 56 KB, 621x702, 1527534229037.png [View same] [iqdb] [saucenao] [google] [report]


>> No.66910378

>muh types
>muh functor

So what? Calling each on ruby objects works for any object that responds to each.

>> No.66910399


>> No.66910402

Bikefags are the worst. Especially ones who ride between lanes and constany wiggle between cars.

>> No.66910414

I like that word.
wiggle waggle

>> No.66910426

What even is this?

Agreed. We should be able to just run those fags over.

>> No.66910429
File: 80 KB, 689x647, tumblr_n3gzk968l31s41h46o1_1280.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.66910437

how do i stop this

>> No.66910441

If you want OOP bullshit why not go for Smalltalk which is saner by miles and just as fast as C++

>> No.66910447

>Agreed. We should be able to just run those fags over.
You can't. They're endangered species. You barely see any where I live.

>> No.66910448

>C++ is faster than C
the absolute state

>> No.66910451

I don't even use OOP. I prefer component based and event-driven design. The fact remains that C++ is faster than C and has more features.

>> No.66910472

It is though. Because of the way C restricts where you can declare variables, it makes it less efficient to work with memory on the stack. Additionally, to achieve equivalent functionality that can be seen with templates in C++, you would need to use void pointers (which incurs a performance overhead and is just dumbfuck-programming in general) or you would have to literally copy paste your code multiple times and edit the types for each implementation. C is a shit-tier language.

>> No.66910498

Rewrote a couple awk scripts that I use to make decisions.

#!/usr/bin/awk -f
# Select random line from file

BEGIN { idx = 0 }
$0 !~ /^\r*$/ { array[++idx] = $0 }
END { srand()
r = int( rand() * idx )
print array[r] }

#!/usr/bin/awk -f
# Select random paragraph from file

BEGIN { N = 0 # Index in array
B = 1 # Last line was blank
$0 ~ /^\r*$/ { B = 1 }
$0 !~ /^\r*$/ { if( B == 1 ) N++
B = 0
# Concatenate lines:
pars[N] = pars[N] "\n" $0 }
END { srand()
r = int( rand() * N ) + 1
print( pars[r] ) }

>> No.66910510

me gusta mucho

>> No.66910516

"you don't pay for what you don't use"

>> No.66910552

The first one is just
tail -n $(($RANDOM % `wc < FILE` + 1) FILE | head -n 1

>> No.66910561

or literally shuf -n 1

>> No.66910562

it's true because nobody uses C++

>> No.66910570

Your method starts three processes. Mine only uses one. Efficiency.

>> No.66910580

Is that POSIX?
Premature optimization is the root of all evil.
How many lines do you have?

>> No.66910593
File: 304 KB, 1440x900, 2018-07-27-164252_1440x900_scrot.png [View same] [iqdb] [saucenao] [google] [report]


>> No.66910595

who fucking cares if it's poosix retard.

>> No.66910605

You do want to have the stuff you written work after 1000 years and have future people read it in awe? Are you just going to spit on your legacy?

>> No.66910606

for fucks' sake Cristian you've been spamming the last 3 threads with your shitty sepples, we can't fix every problem so it's best you learn how to troubleshoot

>> No.66910626

what do SDL** and SDL*& mean?

>> No.66910627

you're too retarded to converse with and your shitty tail/awk whatever one you are is telling how stupid you "poosix" programmers are.

>> No.66910633

s/tail -n /tail -n +/
s/wc/wc -l/
there you go, it should work now

>> No.66910636

By itself? No, you need something to apply it to.

>> No.66910683

** is a pointer to a pointer.
*& is a pointer to a reference

>> No.66910702

It doesn't matter. That script took me literally seconds to write, which is more than I can say for if I'd tried to come up with some clever one-liner shell script.

>> No.66910727

This is something I never understood about C and C-like languages.
When the fuck are you ever going to need a pointer to a pointer, or a pointer to a reference, if not a multidimensional array?
Why do people abuse pointer logic so much?

>> No.66910735


Store is an instance of a class that I created that has the public field place. I am getting a "Cannot find symbol" error with this statement. Why? I did the import properly.

>> No.66910747

struct foo *value;

>> No.66910770

you'll never be a 5 star programmer if you keep thinking like that anon

>> No.66910773

Stop posting your homework faggot.

>> No.66910794

>5 star programmer

>> No.66910801

You use pointers to a pointer all the time in other languages. Ever reference a function in an object? First you pointed to the object, then you pointed to the function.

>> No.66910803

I am currently starting a basic 2D point and click game inspired by LucasArts and Sierra games.
I've worked with multiple threads in the past for other projects, but imho a game like this could work fine with a single thread: less hassle and no need to worry about race conditions. What do you think?

>> No.66910812

Implement a linked list in C. What happens if you want to insert at the head?

>> No.66910820

anyone made a booru download script already

>> No.66910832

why do trannies like programming so much

>> No.66910841

I would unironically hire someone in an instant if they came to the interview with such a script.

>> No.66910849

I am working on infinite loss, it is like that loss normie meme but with loss memes, an endless repeating fractal of loss memes.

>> No.66910852

They really don't. They like posting pics of themselves in front of a monitor with some code, just like Instagram hoes do with many other things.

>> No.66910857

Use traverse. Enlightenment awaits.

>> No.66910861

try reading the compiler errors.

>> No.66910874

because autism

>> No.66910882
File: 116 KB, 1440x900, 2018-07-27-171103_1440x900_scrot.png [View same] [iqdb] [saucenao] [google] [report]

I'm just struggling with C++

>> No.66910888

Why wouldn't you just have an instance of foo and then pass it by reference?

But that's one pointer at a time. You dereference the object and then get the function pointer.
I'm saying "when will you ever need a pointer to a pointer besides 2d arrays?"

>> No.66910893

It's not even authenticated, what would be hard about it?

>> No.66910895


>> No.66910897

what is pll? By cms you mean content management system?

>> No.66910899

please stop posting about useless shit like traverse

>> No.66910903

c++ is fun
echo 'struct x struct z<x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(x(y,x(y><y*,x(y*w>v<y*,w,x{}' | g++ -xc++ -

>> No.66910922

you'd think it would already exist tho

>> No.66910965

>But that's one pointer at a time
That doesn't stop it from being a pointer to a pointer. Are you looking for an example that specifically doesn't offset after the first pointer? A linked list.

>> No.66910980

So you made the static analyzer for the compiler run into an infinite loop? Does the loop do anything? Is it turing complete?

>> No.66911008

I didn't finished because I didn't know what I was doing with enums, fucktard.

I'm having some trouble to understand how java works, in C it would be declared as variable and and would just WERKS. So when I declare like Directions d = Directions.NORTH it is like I was creating an Object?

I have some idea about what they are, I'm having a little trouble to get how Java works, mostly.

>> No.66911010

bash library

>> No.66911021

Embrace. Extend. Let people become so dependent on your software that everything you do will BECOME a standard. You are striving for grandeur, aren't you?

>> No.66911024

i got that from a post here from a while ago.
its not an infinite loop though,
each x( doubles the amount of errors it prints,
that example should produce around 14 millions errors.

>> No.66911089

void set_value(struct foo **foo_ptr)
*foo_ptr = getFoo();

void set_value(struct foo *foo_ptr)
memcpy(foo_ptr, getFoo(), sizeof(struct foo));

>> No.66911110

Say we have cli that prints 9 lines per frame.
So 540 lines every second.
Can we make it print a pattern of characters that looks nice at that speed?

>> No.66911118

just use ncurses

>> No.66911140

sometimes pointers point to pointers, imagine any sort of list or tree.

>> No.66911147

I find that the anonymity of a fursuit allows one to write better code in public.

>> No.66911160
File: 2.99 MB, 1280x720, pattern.webm [View same] [iqdb] [saucenao] [google] [report]

pattern stuff works (((okay))). Though there is a lot of still that needs still needs improvement.
Webm related does two times a triangle and then hexagon (each both directions)

>> No.66911165

have you considered suicide
fur is for subhuman and prehuman programmers
humans lost fur and gained the ability to sweat a lot more effectively, giving us greater endurance and also brain coolant
real programmers don't have fur

>> No.66911171

Ever heard of air conditioning, anon?

>> No.66911188
File: 85 KB, 1366x768, interface.png [View same] [iqdb] [saucenao] [google] [report]

to achieve this i (((invented))) some small pattern. pic related is muh web interface.
The pattern is entered on the second textbox.
D => Distance
W => Angle in which the distance has to be driven
Mode 1 is driving the angle directly and mode2 is spinning first and then driving (not seen in the webm, because still buggy)

>> No.66911199

its like a retarded roomba
i love it

>> No.66911202

This. Some libraries (e.g. WinApi and FFmpeg from the top of my head) create most of their objects exactly this way.

>> No.66911210

Are the jews involved in your mediocrity and inventions or something?

>> No.66911217

yes. I fucking love jews now. Why are you asking?

>> No.66911223

t. retard
this is the mentality of idiots

>> No.66911229

are you (((jewish)))?

>> No.66911237

Worse. He's a [[kraut]]

>> No.66911244

Yes and yes. Why are you asking?

>> No.66911252

good luck with your "sweating" in winter or in summer if the humidity is high

>> No.66911256

no reason

>> No.66911331


>> No.66911335

Never looked at this that way.
You might be on to something...

>> No.66911361

found a based thing

>> No.66911423
File: 154 KB, 680x630, Screenshot 2018-07-27 19.00.05.png [View same] [iqdb] [saucenao] [google] [report]

Enjoying swift so far.

>> No.66911428

that boilerplate looks unappealing to me

>> No.66911432

Not every service is honest about the way they store passwords. You can never truly know.

>> No.66911444

def abslt(number):
'''negative numbers up to -7 or any positive number'''
if not number[0] is "-":
return int(number)
else if number[0] is "-":
if number == "-1": return int(number[1:])
else if number == "-2": return int(number[1:])
else if number == "-3": return int(number[1:])
else if number == "-4": return int(number[1:])
else if number == "-5": return int(number[1:])
else if number == "-6": return int(number[1:])
else if number == "-7": return int(number[1:])

number = "5"

number = -1 * number


>> No.66911454

/dpt/, it is time to repent and use traverse. It will simplify your code and elucidate its true meaning.

>> No.66911467

I think you should use 8 spaces as indentation. It is better readable then imo.
But appart from that your code looks great. Well done!

>> No.66911479
File: 35 KB, 580x624, our emoji.jpg [View same] [iqdb] [saucenao] [google] [report]

can computers evaluate drawing skill yet

need a way to filter through these tens of thousands of images from boorus which suddenly appeared on my hard drives

>> No.66911487

Yeah, it's boilerplate. I thought of just using a dictionary, but for the use cases I have for this, a dictionary wouldn't buy me anything. I only have to write this boilerplate once so I don't mind it.

>> No.66911489

I have done C for my undergrad years ago and have worked on java and python since but need to ramp on C again. Whats a good refresher book boys?

>> No.66911494

C++ can potentially be faster than C, since additional stuff such as references and stronger type checking allow for tighter compiler optimization.
Of course, well-written C will still be very fast anyway.

>> No.66911498

How to Design Programs

>> No.66911511
File: 1.00 MB, 640x800, microsoftcertified.png [View same] [iqdb] [saucenao] [google] [report]

I got a job doubling my salary but the company is Indian. Just got told by an internal reference that there will be very heated office politics, that I will have 5 or 6 managers, and that I will be making a lot of people mad (i.e. automating jobs away). Pic related, it's 80% of employees at this firm.

>> No.66911676

I'm reading the ISTQB Foundations syllabus to prepare for my first job (paid internship).
I'm going to test code in C.

>> No.66911718

I guess you could try filtering by score before downloading. Even a score of 2 would cull a lot of stuff.

>> No.66911823

>evaluate drawing skill
That's highly subjective.
Before 2012 people would laugh in your face for trying this, but you can train a model to do so.

The problem is that you need a labeled dataset which subjectively determines skill level for each image.
The larger the dataset the better. Many datasets, such as for image classification, can be as large as millions of images.

You will also run into the curse of dimensionality--drawn images tend to be very large, as in 4K x 4K. Datasets for machine learning tend to use images reduced to 256x256. With a million-strong dataset it can still take weeks to train at that size.

>> No.66911837

>there will be very heated office politics, that I will have 5 or 6 managers
Commit suicide in happiness now before you have to commit suicide in sadness later.

>> No.66911854

I will be dealing with a lot of verbal bs. I'm fucked.

>> No.66911876

>I'm going to test code in C.
Enjoy the rest of the end of your life.

>> No.66911902

>import Spice
Hey anon where the FUCK did you find that. I tried Google just now but it's brushing me off like a Hollywood producer sweeping unsolicited screenplays off his table in a coffee shop

>> No.66911916 [DELETED] 

I want to develop a Progressive web app.
I want to do something on this weekend.
I need some inspiration.

>> No.66911925

wrong thread

>> No.66911927 [DELETED] 

I almost want you to do it just to find out how exactly a web app will feed the poor and take away my guns

>> No.66911947
File: 51 KB, 873x585, 37358733_428243601015669_1833816023095050240_n.jpg [View same] [iqdb] [saucenao] [google] [report]

I want to develop a Progressive web app.
I want to do something on this weekend.
Can anyone suggest something useful?

>> No.66911971


>> No.66911973

Booru clone but automatic fetch new images when you scroll to almost the end of page, giving the impression of infinite scroll.

>> No.66912114

4chan except with markdown-based formatting

>> No.66912128
File: 85 KB, 470x314, diffuse_intrinsic_pontine_glioma_scan.jpg?itok=FQwfaJMj.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.66912146
File: 1.03 MB, 500x500, 1531137811027.gif [View same] [iqdb] [saucenao] [google] [report]


>> No.66912152
File: 372 KB, 500x375, 1532471131595.png [View same] [iqdb] [saucenao] [google] [report]

Something like this can't end my life, I can do this.
Also, it's going to be ethernet firmware.

>> No.66912307
File: 14 KB, 800x500, 2018-07-27-183352_2560x1440_scrot.png [View same] [iqdb] [saucenao] [google] [report]

I made a main menu for my roguelike

>> No.66912320

Out of all the languages I've used, Go feels like closed behind the doors. I'm not saying that it's not FLOSS. But the community is less accessible?
#go-nuts is invite only
gophers on slack is invite only
nobody gives a fuck about G+ mailing lists
the only option you have is gobridge forum, and sometimes the forum is down too.

>> No.66912335
File: 199 KB, 960x957, happy doggo.jpg [View same] [iqdb] [saucenao] [google] [report]

>developing novel system for large organization
>organization has huge upper management reshuffle due to some internal politics
>new chief exec was opposed to doing the project from the start
>suspends it for three months pending progress review
>suddenly organizes a demonstration of the system to stakeholders
>gives us only three weeks notice of this huge demonstration we're meant to do (even though they apparently invited the stakeholders at least a month prior to that) even though it's a very early stage and the system isn't really ready
>clearly just trying to get an excuse to kill the project off
>project lead on our side is a huge pussy and gets strong-armed into going ahead with this without even consulting the dev team properly
>grit our teeth and work our assess off to make it presentable on time
>literally do final touches hours before the big meeting on Monday
>stakeholders were really impressed
>all questions and comments very positive
>head of board goes "this is exactly the direction we should be looking, it should have had higher priority and scope from the start"
>organization chief exec red in the face and looking bloody furious
>organization tech attempts to squeeze in some critical comments
>some stakeholder cuts him off with a "that doesn't matter"
>head of board walks up to dev team during lunch to comment on what a great work we've been doing
>project officially unsuspended on Friday


>> No.66912346

probably encourages people to make PRs.
i can't do non-4chan online interactions though. Shit's too civil, and calling someone's opinion or taste trash would probably get me banned.

>> No.66912432

gz lad, what kind of company is it?

>> No.66912443
File: 27 KB, 412x453, 992b33197e190c14262ece14d0fceec6.jpg [View same] [iqdb] [saucenao] [google] [report]

Can anyone explain how gprahics work? As far as I understand, there's hardware > kernel > OpenGL/Vulkan/DirectX/Metal > SDL/SFML/Cairo > Qt/Gtk. If that's true where does DRI3, X11, XCB, Window Manager/Compositor fit in?
`>` means management layer I guess

>> No.66912457

>hardware > kernel > (the ever ephemeral black box)

>> No.66912462

Specialized chemical engineering thing, I won't be going into too much detail since it's a small world.

>> No.66912467

I'm sorry, I should have added "driver" in there, but with libraries like vulkan, drivers are becoming ever more obsolete.

>hardware > kernel > driver > (the aforementioned black box)

>> No.66912478

If you aren't programming in a functional language in 2018 you are not a real programmer.

>> No.66912488

>vulkan making drivers obsolete
tf? I thought Vulkan is a GPU api?

>> No.66912507

learn vulkan.
you'll learn all about graphics, images, memory, matrices, coordinate systems,linear data, nonlinear encoding, compression, buffers, 1-3d image arrays etc, and that's just chapter 2.

>> No.66912510
File: 1.03 MB, 1200x1198, 1529861734188.png [View same] [iqdb] [saucenao] [google] [report]

Does Rust count?

>> No.66912516

rust is just C++ with wonky linear types.

>> No.66912522

did static analyzer in scheme for no reason. ask ur questions

>> No.66912523
File: 686 KB, 2000x1500, bigstock-Lights-Of-Human-Mind-48190634-e1423585058267.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.66912540

>still earn $100k+ a year with a BA
Why should I care if I'm a "real"(read academic) programmer or not?

>I thought Vulkan is a GPU api?
It's a low lever rendering (2d and 3d) and compute API.
The immediate difference you will notice between OpenGL and Vulkan, iis the fact that in Vulkan, YOU are in charge of doing low level management of device/physical device selection, managing memory, selecting queues, and so forth.
All of this would have been handled by the driver and opengl implementation before, but now you're in charge.
You still rely on the driver(no fucking way Nvidia is gonna give you unrestricted access to their million dollar hardware), but in a much lesser extent.

>> No.66912553

It has pi types too

>> No.66912566

>// (the proposed rust syntax)
fn make_array<const x: u8>() -> Array<bool, x> {
// ...

rust is so disgusting.

>> No.66912577

Now add lifetimes to that, and you've got yourself a reason as to why C++ is still king.

>> No.66912580
File: 411 KB, 494x795, 1453590480680.png [View same] [iqdb] [saucenao] [google] [report]

Did anyone just mention vector<bool>?

>> No.66912592

There's literally nothing wrong with it.

>> No.66912598

What's so disgusting about that? Looks clear to me.

>> No.66912624

do you even bitset, anon?

>> No.66912631

Yes, I do. By importing vector.

>> No.66912640

New thread:

>> No.66912649

auto make_array(const u8 x)() -> Array(bool,x)

same length, but much less noise.

>> No.66912650

Invalid, it was made before bump limit reached. /dpt/ really has gone to shit.

>> No.66912667

*it doesn't have an anime OP

>> No.66912674

Literally the same

>> No.66912685

Real and valid new thread:


>> No.66912761

boorus have scores?!?!?!?!?!

people born before 2050 are brainlet subhumans

>> No.66912832


I want to make a roguelike but I feel like there's so much to learn before I can start

>> No.66913313



What declaration restrictions and how do they make stack memory less efficient?

> or copy paste your code for multiple types

This is literally what C macros do for you.

>> No.66913329

try doing the tutorial.

>> No.66914346

So, where should I start learning programing? Should I go for python or C, I just want to learn how to program, and I have no previous knowledge of programming.
Suggest me some books /g/

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