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



Thread archived.
You cannot reply anymore.



File: nene.png (596 KB, 900x506)
596 KB
596 KB PNG
Programming Edition.
Previous Thread:
>>66685117
>>
>>66693912
I wish I were an anime girl.
>>
>>66693918
For experience being tentacle raped till your mind and anus break?
>>
already exists
>>66692722
>>66692722
>>66692722
>>
>>66693918
me too
>>
>>66694009
Yes, and it has been derailed thanks to op
>>
https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Concepts.html#C_002b_002b-Concepts
C++ concepts is getting axioms and forall.
>>
>>66695668
That's gnushit
>>
>>66695668
It's good but C++ is still shit
>>
Have a bunch of nodes worldwide in a data center, rerouting data transfer to increase speed using something as simple as Dijkstra's algorithm. What is the best database to store all of the telemetry? Its a time series for each "flow" of packets alongside which data center they spawned from and other information about the packets
>>
>>66695708
>The following keywords are reserved for concepts.
>>
>>66695793
show me any proposal to the standard which uses these keywords
>>
parens and braces
if one represents compound data types and the other represents compound statements, which should be which?
>>
>>66696157
parens for scope
square brackets for lists
curlies are heresy.
>>
>>66696285
what about indexing?
>>
>>66696489
same as any other language.
>>
>>66696503
I want paren free function application. Using square brackets for indexing as well as constructing lists creates an ambiguity.
>>
>>66696522
>Using square brackets for indexing as well as constructing lists creates an ambiguity.
no it doesnt?
>>
>>66696533
foo[bar]

is this constructing a list with one element and then passing it as an argument to foo, or is it indexing foo with bar

Or should it be determined from context?
>>
>>66696594
i don't see a type declaration so it shouldn't be constructing.
looks to be indexing.
>>
>>66696617
>what are temporaries
>>
>>66696622
trash
>>
maaaaaaaan every time I try to advance my project euler I get stuck on 1 question until I do it as efficiently as possible
I don't want to be ocd any more :(
>>
File: 1527726058575.png (400 KB, 598x522)
400 KB
400 KB PNG
>>66693912
I just recently started learning batch scripting and I wanted to ask if anyone here could give me advice?
>>
>>66693912
Who's the bitch?
>>
>>66697723
Microsoft literally made Powershell because batch scripting is so shitty.

But use unix instead
>>
c++ masterrace
>>
if a game is running at 30fps, why can't the values it uses just be halved when increasing to 60fps?
e.g. if in 30fps gravity = 1 and jumpForce = 20, so every frame the character's y = jumpForce -1, why is it when at 60fps gravity can't = 0.5 and jumpForce can't = 10?
>>
>>66700058

... what?
>>
__friendly __reminder __that __c __is __the __best __programming __language
>>
>>66700453
Give proof or shut the fuck up.
>>
File: 1506583787504.jpg (852 KB, 1920x1080)
852 KB
852 KB JPG
>>66699791
C++ is the cutest race.
>>
>>66700466
Looks like a 14 years old with big, juicy, succulent tits. Too bad she looks too young. If she was older, I would rigorously fuck her.
>>
>>66700499
I'd rigorously fuck her regardless if she was 14 or not.
She's probably older than she looks though, you'd be surprised.
>>
>>66700515
She still reminds me of a younger child.
>>
>>66700534
Ok?
>>
>>66700463
it separates the pahjeets from the actual programmers
>muh objects
>muh models
you get paid in incomparable speed for being good at what you do. whatever you used to post your shitty comment was at its core made in c.
>>
>>66700574
>whatever you used to post your shitty comment was at its core made in c.
Firefox and Chrome are written in C++
>>
>>66700596
C++ is still C at its core
>>
>>66700618
Ok buddy.
The thing is though, FF and Chrome are written in C++ style C++, not C with classes.
>>
>>66700618
Are you arguing against or for C++?
>>
>>66700663
Yes
>>
Oh my god there are intermixed tabs and spaces in this python script
>>
>>66700466
agreed
>>
File: file.png (44 KB, 567x594)
44 KB
44 KB PNG
>>66701330
>>
>>66693912
What c++ book is that?
>>
Anybody grinding leetcode?
>>
Why use std::array instead of a normal array?
>>
>>66701553
if you need arrays within arrays, for example.
>>
>>66701330

oh my god your retarded language cares about whitespace.
>>
>>66701553
if you want value semantics for your array
>>
>>66701553
Compile time computed arrays

constexpr auto your_array = []() {
std::array<Foo, len> asdf{};
// fill asdf with shit
return asdf;
}();


You can't even value return a C array at all.
>>
File: 1529358034076.jpg (154 KB, 743x729)
154 KB
154 KB JPG
>>66693912
How do you guys get anything done? I'm trying to work on side projects before the fall semester but I feel like my whole apartment is a giant distraction. I usually end up playing vidya, jerking off, or taking depression naps. Should I start going to the library or a Starbucks?
>>
File: unknown.png (87 KB, 800x600)
87 KB
87 KB PNG
help, anyone got a clue as to what is going on here? or do I have to go in and remove everything makeinfo/texinfo related from the makefiles?
>>
How does having a programming job affect your sparetime programming projects?
>>
>>66701719
Very effectively. To the point where side projects don't exist at all.
>>
>>66697609
The good news is you'll never do it "as efficiently as possible", because you can always improve, so shouldn't make that your goal. A good rule of thumb is just to make sure your program is < 1 minute (maybe <10 seconds on the first 100 or so with few exceptions). If it isn't, learn how to do it properly in the thread (and read the thread anyway because even if your method was fast this time theirs will be faster when it matters next time), make sure you understand it, and move on.
>>
File: Fib2sWc.png (78 KB, 282x300)
78 KB
78 KB PNG
what are you supposed to program after you learn a programming language
>>
>>66701895
Haskell
>>
Any advice for programming udp networking? Packets are suffering.
>>
>>66701895
a programming language
>>
>>66702032
this
>>
>>66701895
Whatever problem you wanna solve. You hit 'em problems daily not knowing that they can be solved programmatically. Just keep an open eye for them, Anon, and help make the world a better place.
>>
Is there anyone here works at a fairly medium size group like 30 developers.

What is your workflow? like how do use gitlab, jenkins,kubernetes,docker like those thing for automation? also redundancy and backups?
>>
>>66697723
Ask ahead. Batch-scripting is hellish, though. Avoid doing anything complex with it. Case in point:

 (

::if you put a label before a closing parenthesis, it has succeed a comment like this one, otherwise it wont parse correctly
:somelabel
)
>>
>>66703124
It's shit.
>>
test
>>
>>66703124
Branches
Branches everywhere
>>
I'm trying not to let rust beat me, but fuck
why is it so hard for me to find an idiomatic way to accept a string into a method on a struct, and store that string as a field in the struct?
specifically I'm trying to read content from a file in one function, pass the parsed line to another function where the string(s) will be used to set certain struct fields (as &str)... and basically I'm at the point where no matter what I do I cannot get the borrow checker to be happy, I am currently always running into an issue with some variable in this flow not having a long enough lifetime.
Should I drop the use of &str for struct fields and just use String?
I cannot seem to find anything in the documentation that indicates one way over the other, in fact most of the time the documentation is pretty lacking imo, and google searching doesn't help since results from a year ago are basically outdated because of the changes to the language
How the fuck does anyone write anything in this? It seems completely immature as far as languages go, I thought it was further along than this?
>>
is there a tool with which i can collaboratively organize ideas into cards and tag them?
>>
>>66703843
oops meant to put that in sqt
>>
>>66703843
https://trello.com/
>>
So many super cool techniques in this library
https://youtu.be/sPhpelUfu8Q
Probably will rebuild my cpp persistent lisp cloney library to include some
>>
>>66703380
>Should I drop the use of &str for struct fields and just use String?
Yes, you smoothbrain, if the struct owns a string it should be a String, or an Rc<str> or whatever if you want to get fancy
>>
>>66703990
That looks interesting, thanks for sharing you stinky weeb.
>>
I am trying to learn haskell. I know /what/ it's doing, I just don't know why it's doing it:

arr = [2, 5, 1, 3, 4]

bubbleSort :: (Ord a) => [a] -> [a]
bubbleSort [] = []
bubbleSort [x] = [x]
bubbleSort (x:y:xs) = if sorted thisSort then thisSort else bubbleSort thisSort
where thisSort = (min x y) : bubbleSort((max x y):xs)

sorted :: (Ord a) => [a] -> Bool
sorted [] = True
sorted [x] = True
sorted (x:y:xs) = if x <= y then sorted (y:xs) else False

main = do print (bubbleSort arr)


So I get that it's bubble sort based on the way it's swapping x and y, so I know why the bubble sort works. Here's what I dont understand:
1) why the fuck is (x:y:xs) in parenthesis instead of brackets?
2) How the fuck does it know that xs is "the rest of the array?" Likewise, how the fuck does it know that x isn't "the entire array except for the last two things?"
>>
>>66704038
List syntax is just syntactic sugar for linked lists. You can create a similar type yourself, and it compiles to more or less the same thing:

data List a = Link a (List a) | Empty

sorted Empty = True
sorted (Link x Empty) = True
sorted (Link x (Link y (Link xs))) = ...
>>
>>66704066
thanks anon. And the (a:b:c) syntax is just an assumption made by the language, where it just knows that each variable is one element, and the one at the end is just "everything else?"
>>
>>66703990
The mutable mode on r-values with only 1 owner with ref counting is so awesome
>>
>>66704091
Two things:
1. The colon operator is right-associative, so (a:b:c) parses as (a:(b:c)), kind of like how (a+b+c) parses as ((a+b)+c)
2. The left and right arguments of the colon operator have different types. The right argument is a list and the left argument is an element of that list.
The compiler knows all this, so list pattern syntax gets to be much lighter-weight than it would be otherwise
>>
File: 1527040408757.png (154 KB, 729x638)
154 KB
154 KB PNG
>>66703990
>1:50
>blue eyed
>undo history
>>
>>66704143
Holy shit suddenly it all makes sense, thanks
>>
>>66704000
Owning would imply the struct could/would manipulate said string, what if it's only the field that needs to be updated meaning I could very well use an immutable reference to a string since I'm never planning to actually changed the string assigned to the field?
I am still forced into String?
>>
>>66704259
You can use a Box<str> to express "a chunk of string data that is owned but will not have its contents changed"
If it might be used in multiple places you can use an Rc<str> or an Arc<str> instead
>>
There's a website I'd like to scrape photos off of, but they store them in slices so you cant just yank the whole image off in one go.
They USED to store them in a simple /id/slice_1 /id/slice_2 format so it was trivial to just yank them and stitch, but now they're stored
/slices/ABSc697721f4524 /slices/ABS23da2898fedf etc
The ABS is consistent between photosets no matter what, and I tried tracing the DOM when loading the full image and it just calls a php script with the main photo ID.
Are these database UIDs or something? i.e. No chance or being able to lazily scrape them again, short of using something like phantomJS?
>>
Why is flutter/dart such an ugly language?
>>
I'm working on maintaining a bunch of Crystal libraries. I really want the ecosystem to grow.
>>
File: 1474812343620.png (103 KB, 506x662)
103 KB
103 KB PNG
>>66700058
Because:
physUpdateMS( 1000 / 30 );

Does not always produce the same results as
physUpdateMS( 1000 / 60 );
physUpdateMS( 1000 / 60 );

This is often due to floating point error accumulation occurring twice as much in the latter example. Normalization (correction / rounding) of said float operations would have to be performed carefully per each iteration to reduce the

Furthermore, polling the input stream presents a problem: Consider "move forward" input event happens thus:

toggleInput( MOVE_FORWARD ); 
physUpdateMS( 1000 / 30 );

Now consider if the sampling were increased to 60 FPS; There are two different outcomes:
// input event fires prior to the two physics ticks
toggleInput( MOVE_FORWARD );
physUpdateMS( 1000 / 60 );
physUpdateMS( 1000 / 60 );


// input event fires between the two physics ticks
physUpdateMS( 1000 / 60 );
toggleInput( MOVE_FORWARD );
physUpdateMS( 1000 / 60 );


Even if you had carefully programmed the logic system to avoid FPU error propagation, the timing of the higher res (60fps) input events would be irreconcilable with a lower res (30fps) system. Two networked systems (or a demo recorded / played back) would quickly desynchronize unless the input polling rate was artificially set to the lowest common denominator (30fps).

This really doesn't matter though, because we just code our logic loop to be fixed at 30fps or even 10fps, and use client side prediction to interpolate and render as many frames as you want between the physics steps; Then rubber band back into the server's "authoritative" snapshot of history when the prediction doesn't match reality.... and plebs are none the wiser.
>>
>>66705022
s/to reduce the/./
>>
I got a question out of curiosity.

I mostly use Linux now, so this is no longer a issue but:
On windows how do you compile C code? I know MinGW and Cygwin exist but both seem to be like compatibility layers for windows. So how do people compile code to work across windows machines?
>>
>>66705340
you'll have to rewrite your question in hindi if you want to ask people who program on windows
>>
>>66705369
Oh you're right my bad

मुझे जिज्ञासा से एक सवाल मिला।
मैं ज्यादातर लिनक्स का उपयोग करता हूं, इसलिए यह अब कोई मुद्दा नहीं है लेकिन:
विंडोज़ पर आप सी कोड कैसे संकलित करते हैं? मुझे पता है कि मिनजीडब्ल्यू और सिग्विन मौजूद हैं लेकिन दोनों खिड़कियों के लिए संगतता परतों की तरह लगते हैं। तो लोग विंडोज मशीनों में काम करने के लिए कोड कैसे संकलित करते हैं?
>>
File: Capture.png (19 KB, 642x248)
19 KB
19 KB PNG
>>66705340
You use a compiler. You realise windows has a C compiler just like linux does?
>>
>>66705443
wot.jpg
It does? Why the fuck is MinGW and Cygwin even branded for that purpose? Is the default compiler shit?
>>
>>66705466
The microshaft compiler is shit but you can just use gcc. MinGW gives access to linux-only libraries like dirent or whatever. Also gives you access to other linux tools and utilities like a package manager and such, it's essentially a linux terminal env running on windows.
>>
>>66705521
No you silly goat.
It's a GNU environment running on Windows.
>>
>can't return arrays in C

what the fuck
I'm too brainlet to deal with this shit
>>
>>66705732
pointers everywhere
just deal with it
>>
>>66705732
we told you c was shit
have fun manually doing bounds checking as well.
>>
>>66705776
>not using a sentinel
sasuga pajeet
>>
>>66705868
C: The language of hacky bullshit
>>
>>66705872
>sentinels are a C thing
just stop my man
>>
>>66705886
never said they were.
But shit like that is idiomatic C.
>>
File: 1513270504044.png (188 KB, 504x680)
188 KB
188 KB PNG
Private constructor + static/friend method = way to construct objects in a sane way with the ability to fail and return some error, while preventing the user from calling the constructor themselves.
you-can't-have-raii-without-exceptionstards BTFO
Btw, if your converting constructors or destructor can throw, you're doing something wrong and you need to fix your shit program.

struct Foo {
static std::optional<Foo> make(int x) {
if (blah blah blah) {
return {};
}

Foo f;
f.x = x;
f.y = x * 2;
// ...
return std::move(f);
}

private:
Foo() = default;

int x;
int y;
};

int main() {
if (auto f = Foo::make(4)) {
// ...
}
}
>>
>>66705891
I hope you realize all that "hacky bullshit" goes on in every single language out there, higher level languages just do it behind your back.
>>
>>66705947
>converting constructors
copy/move constructors*
>>
>>66705957
>goes on in every single language out there
only if the compilers written in C.
>>
>bounds checking
Run along kid, this is the adult area.
>>
>>66705996
Yeah because other languages just divine what the bounds of your array are, right?
>>
>>66706034
>it's either hacky bullshit or impossible
the absolute state of cniles
>>
>>66705872
Rust: The language of being able to implement common data structures without using "unsafe" code
>>
>>66706097
>unsafe
>1,242 code results in rust-lang/rust or view all results on GitHub
*blocks your safety *
>>
>>66706125
>1 and 242 results
>>
A cs student was telling me that the only difference between python and matlab is whether you want to pay for it or not.
Can I use python for signal processing and filter design? Are there packages that will let me graph the impulse response of the filters I make?
>>
>>66706097
You have to write a six letter keyword to do something that's fairly unusual. How terrible.
>>
>>66706259
>programming
>fairly unusual
>>
>got caught up in details for a month
>go back up the code
>where the fuck am I?
>>
>>66706322
>realize you've been doing everything completely wrong and the correct solution was significantly simpler
>feel like shit for wasting a month
>feel kind of relieved because you can do it all again on a different problem
programming is fun desu.
>>
Are design patterns the same as the architecture?
At what point should I start looking into design patterns? Is gang of four a good book?
>>
All codebases I've seen in c has their own implementation of a linked list.
Why is this the case?
>>
>>66706638
it's a trivial data-structure and C 'generics' are annoying to use
>>
>>66706638
Why not?
>>
>>66706638
c is the language for reinventing wheels.
>>
I wish we could back to .COM days. All this PE and ELF crap is fucking bloat
>>
>>66706800
Elf isn't that bad.
>>
File: 1529690847412.jpg (32 KB, 605x146)
32 KB
32 KB JPG
I'm complete noob and doing some GUI Python with tkinter, but my fundamentals suck basically and I'm trying to get a better explanation for this shit:

def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs):


self is just the first argument of all class methods. -> What the hell does that mean?

That when we create things in class, such as 'containers' for our frames/widgets/buttons, we need to have this as an argument, to know it belongs inside of that class we are typing in?

like: container = tk.Frame(self)
also, what exactly does tk.Frame(self) mean? My understanding goes that tk.Frame is a method from tkinter library to create a frame and 'self' is an argument that it belongs in that class.

Basically we could name 'self' anything when we initialize thins, it just works as a keyword to call other things upon and use that keyword as an argument inside of that class, when we create things?

I'm really breaking my brains with this 'self' meaning. Can somebody just punch me in the face and explain it to me like a child?
>>
Does anyone remember meebo?
>>
>>66706884
aim > meeshit
>>
>>66706890
Aim was cool but then Myspace and Facebook ate any competition it had.

tho I will say
RIP AIM
>>
>>66706903
myspace was a gem.
you could tell instantly what the person was like by their profile. Then facebook came along and casualized and sterilized everything.
>>
>>66706839
ELF is SHIT
>>
>>66706872
And to follow up with that, what is happening here exactly?

def show_frame(self, cont):
frame = self.frames[cont]
frame.tkraise()


Why is there (self, cont)? and why are we calling upon [cont] keyword here, instead of just creating (self) and calling upon [self]?

Here's the explanation, but I still don't grasp it fully:

''Another method, with self and an argument of cont for controller.
Then, we define frame as being the self.frame (which is that dictionary above), followed by the controller, which is the key to the value in our dictionary that is our frame.''

what the hell is ''dictionary'' when it comes to self.frames and the other part of cont being a key to our value in this self dictionary is just explained too weird to fully understand the concept. Idk, it might be brain fog and I can't wrap my mind around this right now, but fuck me.
>>
>>66706914
I agree. Then tom sold out to the music industry. It's trash now. I miss the old days when you could HTML the fuck out of it.
>>
>>66706872
Self is the particular instance of the object whose method you're calling, it's implicitly passed as the first parameter on all the object's method calls, but IIRC you do need to explicitly put it as the first parameter in your method definition.

If you've ever tried to do class-like structures in C you'll understand why this has to be done.
>>
>>66706918
If you're such an expert in the ELF file format then explain why it's bloated shit.
Oh wait you can't, because you don't actually have any idea what you're talking about.
>>
install gentoo
>>
File: slap.png (251 KB, 655x493)
251 KB
251 KB PNG
>>66693912
Learning about PCA and PLSR with Python.

Because I'm lacking a proper algebra/stats background, even basic notions as scores and loadings have always eluded me.

Now I'm trying to catch up and I just stumbled into these two terms. However, I was unable to find a definition that'd be as intuitive as possible, let alone graphs to show what scores/loadings are, do, and look like.

Any links or explanations would be absolutely great, as I keep mixing these up.
>>
>>66706926
I kind of get it now.. It's just that I see the code and kind of understand what's happening, but then putting what is happening into english and translating it into my own native language (for better understanding) is just suicidal currently.
>>
File: Script_demo.png (12 KB, 366x118)
12 KB
12 KB PNG
Rate my script, /g/. It notifies you when there's a new post in a thread.

https://git.fuwafuwa.moe/fridmanos/python-scripts
>>
>>66706872
class T:
def __init__(self): # function that will run when you create an instance of this class
self.v = "self is used to access this particular instance" # you can assign values and stuff to the instance via the self parameter

def some_method(self, arg): # using self as the first argument means this method belongs to this class
print(arg)
print(self.v)

# using the class
a = T() # this implicitly calls __init__(self), which creates an instance of T and assigns it to variable a
a.some_method(5) # calls the function using 'a' as the self argument
>>
File: 1529391192698.jpg (3.03 MB, 3200x2495)
3.03 MB
3.03 MB JPG
>>66707005
Thanks a lot!
>>
>>66707005
So in c++ classes; there's also a self instance but isn't the first argument like in python? Typing self before everything can become pretty tiring..
>>
buckle up C-niles
you're days are numbered

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1105r0.html
>>
>>66707032
It is very tiring. I wouldn't recommend learning this stuff with python.
>>
>>66707032
>So in c++ classes; there's also a self instance but isn't the first argument like in python?
Yes. In C++ this is used as a keyword instead of self.
>>
>>66706990
cool script
>>
>>66707032
I'm the guy that posted these explanation questions and from one of the tutorials I'm following it's said you don't have to explicitly write self, as the guy replying to me already explained, but here's the full explanation from the Sentdex (youtube programer):

Now, within our class, we have:
def __init__(self, *args, **kwargs):
While not required, you will often see the first "function" in classes as __init__. First off, these are not functions, even though they act just like functions. They are actually called "methods." __init__ is a very special method, in that this method always runs. Init is short of initialize, and whatever you put in here is going to always run whenever the class is called upon. The other methods will only run when you specifically call upon them to run. Think of this like the various startup processes that run on your computer when you have booted up. You want some things to always start when your computer turns on. You want your mouse drivers to come online, you need your keyboard to work, you want your graphics drivers pumping out your desktop, and so on. The other programs you might have, you just want them to start when you click on their icon. These are like the other methods.
So, self is just the first argument of all class methods. Then you see we're calling these "*args" and "**kwargs."
Like "self," actually typing out "args" and "kwargs" is not necessary, the asterisks to the trick. It is just common to add the "args" and "kwargs." So what are these? These are used to pass a variable, unknown, amount of arguments through the method. The difference between them is that args are used to pass non-keyworded arguments, where kwargs are keyword arguments (hence the meshing in the name to make it kwargs). Args are your typical parameters. Kwargs, will basically be dictionaries. You can get by just thinking of kwargs as dictionaries that are being passed.
>>
>>66707032
>>66707064
C++ also has a different approach to disambiguate calls to member functions in parent classes
>>
>>66707072
was meant for
>>66707064
>>66707055
>>
>>66707005
python is an ugly and annoying language to actually write libraries for
>>
>>66707091
this
>>
>>66707163
actually self
>>
I'm switching from spacemacs to VS Code for my C++ and Rust needs and so far it's good, not as comfy yet, but good. The main reason is spacemacs being too slow, which is not surprising, considering emacs doesn't even have JIT for its meme-lisp. Sure, VS Code is written in TypeScript, but at least it has V8, also the community is way more active.
>>
>>66707237
don't forget to look at all the binds. There's one for pretty much everything.
Like having one to focus the terminal and then your editor so it can be very vim-like.
>>
>>66707269
Yeah, I'm using the vim extension and looked at the binds. They're less comfy than spacemacs' ones, most of them use Ctrl, I'm thinking of recreating the spacemacs scheme.
>>
>>66707290
>vim extension
meh, i'd uninstall it and roll your own.
>>
File: 515966a.gif (1.01 MB, 282x537)
1.01 MB
1.01 MB GIF
>>66707054
So this new standard is just C with classes, which is already a defacto standard due to support by many embedded toolchains. Got it.

>>66705466
Cygwin has ported versions of hundreds of libraries available in its package manager. Behavior of the output binaries is very consistent with standard gcc.
>>
>>66705340
MinGW isn't a "compatibility layer", just a series of GNU programs ported to Windows. Binaries you compile with gcc can be shared across Windows machines without needing to install MinGW.
>>
>>66706884
I know some weebo
>>
File: dead inside quake.jpg (93 KB, 481x784)
93 KB
93 KB JPG
>Backend server: Done
>App that uses backend server: Done
>Trying to deploy server to google cloud platform: Still not working after trying for 3 days
FUCK THIS PIECE OF SHIT FUCK YOU GOOGLE I HATE THIS PIECE OF GARBAGE FUCK MAVEN FUCK GRADLE FUCK SERVERS WHY DID I EVER START PROGRAMMING
>>
whats a good and up to date java ebook?
ive done plenty tutorials online and exercises but i need an ebook to help me understand better the way of thinking etc
>>
>>66707557
learn Haskell
>>
>>66707583
I am learning Haskell. I'm actually thinking one of the first things I'm going to do when I'm up and running is a backend written in Haskell and hope it deploys.
>>
x < y > z;
>>
>>66707646
Use more parentheses
>>
>>66707679
vector < int > vec();
>>
File: Wat.png (109 KB, 1302x891)
109 KB
109 KB PNG
What does any of these means, I'm trying to make GUI and extract real time data from API, then json it and put into panda data frame.

It draws the graph, but the data isn't correct and I get all these errors. Don't even know what to do, asked everywhere already and googled.

It should be like Sentdex has it on this video:

https://youtu.be/uK7wAvS8C0U?t=15m20s
>>
>>66703380
most of the time the documentation is pretty lacking
fucking LOL. One of the best things about Rust is its documentation.
>>
>>66707831
actually I fixed it
>>
When I compile some C++ code with -frename-registers (GCC), this code gets generated.
c01026eb:       e8 10 e9 ff ff          call   c0101000 <KPrint::put_char(char)>
c01026f0: 41 inc ecx
c01026f1: 0f be 11 movsx edx,BYTE PTR [ecx]


>DOESN'T save ecx, a SCRATCH register. it's not a return register either (i686 here)
>calls a function, which is allowed to modify ecx without preserving it.
>continues to use ecx
Is this fucking valid? this looks like a GCC bug to me, and it's crashing my code.
ecx is supposed to contain a pointer, but after the call to KPrint::put_char it gets overridden with a small value (between 20 and 50) and attempts to dereference it causing a page fault.
I just want to confirm with someone here whether this is bad code or not, or if I'm just a retard triggering UB somewhere.
>>
>>66708128
By bad code I mean bad code generation on GCC's part, not mine.
>>
>>66708128
And forgot to mention. GCC version is 8.1.0
>>
File: Hmmm.png (58 KB, 1196x875)
58 KB
58 KB PNG
https://youtu.be/PPRfRV_yIBI

I'm creating python GUI for trading and am stuck at video related. It starts running, extracting data and then stops after 30 sec.

I get ''ValueError: If using all scalar values, you must pass an index'' error after 30 secs of running this.

When I debug it, the first problem is in pic related. I have no idea what to do or what this means.
>>
>>66708286
types would have prevented this
>>
>>66708286
>I'm creating python GUI for trading
That's a tough one, try creating C++ CLI for milking cows.
>>
So I'm not sure this is the best place to ask but I'm going to anyway.
I had been struggling with sticking to a language for a long time, just getting through the basic books for several languages. I just would start to struggle when grappling with some of the more abstract ideas in the language. Earlier this week I was going through the Rust book for fun, and I'm not sure if it was just the repetition of reading the concepts or the way the Rust book was written, but the ideas started to click for me. Now when I go back and look at the code I'd written in other languages, rather than just seeing the retyped code from the books, I am starting to understand it.
This got me excited to actually pick a language and focus on it, but I don't feel like Rust is an ideal choice because it's more niche.
I'm just an IT consultant, so my job doesn't necessitate the programming skills that I would like to have, so this is more about fun side projects, and maybe eventually contributing to cool open source projects, but I don't know what language to start to focus on.
TL;DR: I was a brainlet with the concepts of programming, they finally clicked for me, what language should I choose to focus on now?
>>
>>66708404
Rust
>>
>>66708404
If you want money get stuff done then Java. If you want to wank on /g/ about how cool you are then C or Rust or Hasklel
>>
>>66708404
>I don't feel like Rust is an ideal choice because it's more niche.
Please elaborate
>>
>>66707560
bump
>>
>>66708437
>>66708494
Just doesn't seem to be as widely used as the other languages, I suppose niche was the wrong word.

>>66708488
Never really messed around in java, the /g/ wiki has recommended books right? Any other book recommendations for Java?
>>
>>66708404
>what language should I choose to focus on now?
What kind of projects do you think you will be interested in making? The important thing isn't which language you choose, it is that you keep programming, so take whichever language will keep you programming.
>>
>>66708550
Do the oracle Java tutorial to learn the fundamentals, then check out Effective java and
Java Conucrrency in Practice
ALso check out frameworks like Spring Boot and vert.x (vert.x is better but not as common)
https://www.amazon.com/Java-Beginners-Seventh-Herbert-Schildt/dp/1259589315/
https://www.amazon.com/Effective-Java-3rd-Joshua-Bloch/dp/0134685997/
https://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601
>>
>>66708572
Sweet thanks. Off to reading!
>>
While true
>>
>>66708631
One of Java's biggest advantages is its ecosystem. There's lots of useful libraries and tools. For example:
DL4J (machine learning, neural networks)
Weka (machine learning)
Optaplanner (optimization problems)
Guava & Apache Commons (Useful libraries, although not so necessary anymore iwth java 8)
Immutables
Lucene
and many more
>>
>be me
>try VB.net
>think I'm free from brackets
>make new dictionary
>suddenly brackets
Wtf I feel raped
>>
>>66693912
C++ Primer vs Programming: Principles and Practice Using C++ by Bjarne Stroustrup? Which is better for an intermediate Python programmer moving to C++ with no background knowledge in it or OOP?
>>
File: 1519477815575.jpg (2.14 MB, 3025x2103)
2.14 MB
2.14 MB JPG
>>66708128
Please respond
>>
>>66708871
I'm exactly you. Go for accelerated C++. It was an excellent fit for me. I am confident you'll you satisfied as well.
>>
>>66708720
Not him but how is Guava obsolete with Java 8? I still find it useful.

>Lucene
It's hell to learn. I'm doing a project in it and I'm drowning.
>>
>>66708909
Didn't say it ways obsolete, just not as necessary anymore
>>
File: regex_steps.png (90 KB, 974x755)
90 KB
90 KB PNG
Could someone help me out with understanding the performance or step # of regex?

pic related is not the exact regex I am trying, but very similar.
As an example, if I check for [math] + [eqn] tags and their content, it apparently takes 48 steps, while checking for <br> is 114 steps.
Now combining those 2 blows everything up to 3411 steps.
Even removing the [eqn] regex, it's still 2317 steps.

What's happening here when combining those patterns?
I guess it's generally better to run multiple shorter regex then, rather than one longer one?
>>
>>66708572
Got any beginner friendly Spring texts? I find the documentation difficult to use as I believe it's geared towards more experienced JavaEE users.
>>
>>66708940
Yes regex's performance deteriorates quickly as the pattern gets more complicated.
>>
>>66708879
I haven't heard much about it unlike the two I mentioned. How much does it cover compared to Primer and PPP? I know It doesn't include C++11 since it was written way before it was released. I'm thinking of using PPP and then moving on to Primer which has a seperate section for C++11 since PPP doesn't cover C++11 either.
>>
>>66708128
>>66708877
Seems to be a bug, though it may be better to confirm with the devs somehow. It seems to continue using ecx as if it were a pointer. Is it supposed to be holding an array of some sort at that point?
>>
>>66708945
I'd just go through the spring boot guides and spring webflux / reactive guides on their page
>>
>>66708940
https://stackoverflow.com/a/1732454
>>
File: 1480631460295.jpg (59 KB, 655x527)
59 KB
59 KB JPG
programming is way easier than i thought. you are essentially just automating math
>>
>>66709001
It covers a lot but assumes you already have some previous programming experience so they don't go into great depths for some things that are common across most programming languages (which is what I was looking for).

I suggest you get a free copy from library genesis and flick through some chapters and decide for yourself.
>>
File: 1507379671990.gif (352 KB, 256x256)
352 KB
352 KB GIF
>>66693912
Who is dat animu gril?
>>
>>66709069
you are way retardeder than I thought. you are essentially just retard
>>
>>66709003
Yeah, ecx is supposed to be holding a pointer value of type char* decayed from a char[], hence the inc because the code is in a loop iterating over a char buffer.
At least that's what it is until it gets overwritten with something else in the call.
>>
>>66709042
I've mostly been just dabbling into the Spring Boot to quickly get that controller running.
Never heard of Webflux/Reactive until now. Are they useful for application that do not use any frontend? Just service running on a server?
>>
>been working as software dev for 2 months now
>guy from technical sales comes up and asks me to be part of the group heading to [large mech e company] to discuss details of a joint project
>supposed to talk to their software guy to discuss the interface and protocol our machines will use to communicate
>get there
>their software guy didn't show up
>sit around for 5 hours while they're yapping about sales, project management and other non-technical shit
>no wifi, can't shitpost
>can't play blockout or supertuxkart in a meeting
>write Brainfuck parser and interpreter instead
gg
>>
>>66709098
Lurk for at least two years before posting.
>>
>>66709136
What's the source look like and what's the full disassembly?
>>
>>66709137
spring webflux is spring's way of doing asnc request handling, it uses the reactor pattern like node.js or vert.x (vert.x is 100x better at it tho than spring)

And yes it is useful for webservices, in fact you should aim to do all request handling / IO using the reactor/actor pattern, because it is much more scalable in comparison to regular spring's way of doing request handling by passing requests to a thread pool
Async IO = Higher concurrency
>>
File: 4chan.png (220 KB, 500x372)
220 KB
220 KB PNG
>>66709098
google image search
>>
>>66709177
Now you got my attention. I could actually use this. I'm gonna read up on the reactor/actor pattern first and will definitely check both the WebFlux and Vert.X
Thanks for bringing these to my attention. Would you say the learning curve for these technologies is steep?
>>
>>66701634
That will make it worse probably. Build your goals into a larger framework. "I need to complete this part of my project by tonight so that tomorrow I can do X so by the end of the week Y will be done and at the end of the month I'll have Z." Intense exercise helps with this, at the end you'll have your priorities slightly more straight.

Or just be autistic, like half the people here.
>>
File: macplus_grande.jpg (48 KB, 600x600)
48 KB
48 KB JPG
>>66709147
*music starts*
>>
>>66709235
No it's not necessarily steep, just takes some getting used to since you will work with Futures and other async constructs a lot. If you want a full async end to end (from api over business logic to database) service, you basically throw out the old imperative pattern of if a then b then c. There's several ways to handle async, for example callbacks, futures or the reactive extension library (RxJava)
Frameworks like vert.x or webflux abstract this a lot, so it's not that hard, just strange at first.
Also if you want some additional motivation for this, check out the latest benchmarks
https://www.techempower.com/benchmarks/#section=data-r16&hw=ph&test=db
If you want to go full reactive, I really highly recommend vert.x, which has an excellent documentation. If you don't want to give up spring though, I'd def. give webflux a try, tho I am less familiar with it.
>>
>>66709069
dumb frogposter
>>
>>66709313
It's all in your head
>>
>>66709171
// Called from operator<<(IPrint&, <various int overloads>)
template <typename T>
void print_int(IPrint &p, T i) {
char buf[80]; // This is the buffer ecx is pointing into.

switch (p.get_base()) {
default:
case Base::Dec:
uint_to_dec_string(i, buf, p.uses_comma());
break;
case Base::Hex:
uint_to_hex_string(i, buf);
break;
case Base::Bin:
uint_to_bin_string(i, buf);
break;
}

p << buf; // Here it calls operator<<(KPrint&, const char*) which calls IPrint::put_string(const char*)
}

KPrint::put_string(const char*):
    void put_string(const char *str) {
for (; *str; str++) { // This is the line it page faults
put_char(*str); // KPrint::put_char(char) from disasm (devirtualized virtual method)
}
}


And here's the full disassembly of the function the offending code appears in:
https://pastebin.com/yyPmVXan
Though beware, it's an optimized LTO'd inlined mess, otherwise I can't reproduce the bug with other settings. Most I can do is not strip it.
Area of interest starts on line 72.
>>
>>66709147
>Brainfuck parser and interpreter
Did you at least JIT-compile it to machine code?
>>
>>66709382
As far as I can tell that's bad codegen especially since I think there's no way to influence it on your end, but it may be good to find and confirm with someone a little more knowledgeable.
>>
File: Watt.png (80 KB, 1216x912)
80 KB
80 KB PNG
>>66708286

Anyone?, how can I pass in an index for real-time data that I'm getting from API.

It's getting data, but after 30 sec it closes down. because I'm not passing in an index. I don't get how should I pass in an index for 100 new indexes that get extracted every second.
>>
>>66709147
>bragging about being asocial
writing a brainfuck "parser" is literally trivial. you can do it with a bunch of sed commands frankly.

it's just straight up text replace certain symbols with certain bits of C code.
>>
>>66709505
Have you verified that it's still getting responses from the server? Check the status code in your response object, maybe you're just getting shitlisted after 30 sec after the rate limiter or something and then pass empty object there.
>>
>>66701634
Don't take it personally, I'm an EE who ended up full-time programming. It's surprising how much easier it is when there's a carrot at the end of the stick. Maybe you could join a group related to your side projects? Nothing serious, just an update every few days of progress.

Also, fuck working at home. Screens need to be bigger, need areas for notes and papers and the coffee cup...
>>
>>66703124
>backups
I could probably share some rsnapshot scripts I have... FreeNAS 11 is a little annoying but it works predictably enough, and although rsnapshot is a bitch to set up, you can do different machines on different schedules with 256-bit keys and stuff with full logging. Delta backups that can directly be cd'd into and look like normal data.
>>
>>66709392
Not yet, although that would be a cool addition. Maybe if I get really bored at work again (unlikely).

>>66709520
Don't call other people asocial when you can't see how they can have fun with a simple programming exercise when they're bored. Post your sed brainfuck parser.
>it's just straight up text replace certain symbols with certain bits of C code.
That's not what a parser does.
>>
>>66709544
As said, it is getting responses for 30 seconds, then it gives out the ''ValueError: If using all scalar values, you must pass an index''.

After that it's not responding and updating the graph anymore, so it's not getting response anymore.

I have a rate of 2000 set. I'm not sure what you mean by passing in an empty object there?
>>
>FOLDER 1
>SUBFOLDER 1
>File.f
>NFile.f
>SUBFOLDER 2
>File.f
>SUBFOLDER 3
>File.f


?>Open Subfolder 1
?>IF NFile.f present THEN
?>Go to Next Subfolder
?>ELSE IF File.f present THEN
?>Copy File.f as NFile.f
?>IF File.f not present then
?>Go to Next Subfolder


What would be the best way about doing this on a Windows or Linux environment. I have a bunch of TV Shows and Movies with Poster files and i want to copy those files and rename the copies Folder so i get the movie image on the folder.

I dont really know much about programming about from a bit of the logic behind it - not how to write it.

TiA
>>
>>66709748
for what purpose?
>>
>>66706218
https://docs.scipy.org/doc/scipy-1.1.0/reference/signal.html
>impulse(system[, X0, T, N]) Impulse response of continuous-time system.
>dimpulse(system[, x0, t, n]) Impulse response of discrete-time system.

Looks like it.
>>
>>66700453
SEMEN!
>>
>>66709999
nani?
>>
File: 1531261741891.jpg (85 KB, 794x794)
85 KB
85 KB JPG
>>66693912
How long does it take to learn basic programming languages to a degree where you can mention proficiency in your CV/resume? I have an innate ability for most things STEM related and managed to get quite proficient with a HDL in the timeframe of about a week for a University exam but I've never bothered learning to program properly. I'd like to have some programming experience on my CV for when I apply for jobs in autumn but I fear I may have left it too late. Where would you anons recommend I start out?
>>
>>66710079
if you want a corporate job learn Java /C#/C++ + JS
>>
>>66710179
I want to work in robotics
>>
>>66710196
C, C++, ASM.
and probably python
>>
what do you guys think about this use of unique ptr


editA(A&){}

int main()
{
auto obj = std::make_unique<A>();
editA(*(obj.get()));
}
>>
>>66710281
Cheers lad, I looked at python already and it seems easy enough to get my head around. I'll start with that and C.
>>
>>66700618
This is wrong though, C++ redefined the C standard to stay compatible with existing C code while eliminating a lot of things in the standard that were perceived as issues, like undefined behaviour.
>>
>>66710386
Nice digits, also, it's great that C++ doesn't have any undefined behavior
>>
>>66710410
It has undefined behaviour, they just eliminated a lot of it by redefining the standard is what I was trying to say.
>>
>>66710425
IT DOES?!?!?
OH NO
>>
>>66709748
So you want to skip all directories where File.f doesn't exist, but in directories that only have File.f, you want it to be copied to NFile.f?

On GNU/Linux you could do this with find:
find FOLDER1 -type f -name File.f -execdir cp {} NFile.f \;

Alternatively (POSIX compliant!):
#!/bin/sh
for d in *
do
if test -d "$d"
then
for f in "$d"/*
do
if test -f "$f" -a "$f" = "$d/File.f"
then
cp "$f" "$d/NFile.f"
fi
done
fi
done

You can replace line breaks with semicolons if you want.
What this does is:
>list the contents of the current directory
>go through the list items one by one, if one is a directory:
>list the contents of the subdirectory
>go through the list items one by one; if one is a file and is called "File.f", then copy it to NFile.f
This doesn't abort when a directory resp. a file meeting the criteria is found, i.e. this always iterates through the contents of the entire (sub-) directory.
>>
I was thinking how to handle mouse input.

Checking the list of clickable objects is the best solution I can come up with but I can't get rid of the feeling that it's wrong.
>>
>>66709748
>>66710438
Note that the first example (with find) ignores folder hierarchy completely while the second example will only work when called from within FOLDER1 and with a folder structure like you described.
>>
File: movies with image.png (469 KB, 2576x1081)
469 KB
469 KB PNG
>>66710438
>>66709962

i have my movies and tv shows and my media player downloads the artwork. oine of those files is called "poster.jpg". if i copy that file and name it "folder.jpg" then windows uses that image as the directory image.

i have a lot of movies and dont want to do it manually. thats the purpose, see pic related.
>>
>>66710438
also thank you for the code. i will give that a try tonight when i have a bit more time.
>>
>>66710596
I'd just use find in that case. Don't know how to do it on Windows, I'd probably write a Python script similar to my second example to do it.
>>
>>66701895
Instead of scouring the internet for a program that does a niche function that you need, try to make it yourself
>>
>>66710673
i have them all stored on my linux server, so i can do the cli way. thanks again
>>
Why don't computer languages do it like this?
{ for(x:y)
{ if(x=0)
print(x)
continue
}
{ while(x>0)
x=x-1
print("OHAYO")
}
print("DESU")
}
>>
>>66710765
That's kinda already the case for Python, without the braces.
>>
>>66710859
I mean why does the starting brace go after the keywords instead of before?
>>
>>66710765
or better yet
for (x;y)
if x = 0
print(x)
continue
while x > 0
x+=1
print(ohayou)
print("desu")

>>
>>66710873
The braces delimit the code block. The opening statement isn't considered part of the code block.
>>
>>66710958
Why shouldn't it be?
>>
I like RAII and zero-overhead and all but C++ is a mess. What are my alternatives? Rust is as messy, go has a gc, etc. Halp.
>>
>>66711132
you probably don't care about zero-overhead as much as you think you do
>>
>>66693912
How do I make my own programming language?
>>
>>66711132
nothing really, maybe nim? idk hard to suggest anything if you're looking really for zero overhead abstractions
>>
>>66711132
What language features are a must to you?
>>
I really can't do Advent of Code 2016 day 11. I implemented a bfs search, implemented already visited states and optimised it, but it still takes forever to get an answer (left running more than 4 hours and still no solution).
>>
>>66711111
Quints demand we write our own language that does this, ASAP.
I'll get started on the logo.
>>
>>66711150
do you know how to program?
>>
>>66711143
This is correct for day to day but I sometimes dabble in os-dev and I don't want to switch languages.

>>66711172
> OOP but not 100% enforced.
> RAII like in C++ or some other way to not have to keep track of memory frees.
> A well documented STL where there is not 10 completely different ways to do things (i.e. conts char* vs string)

>>66711157
I'll check nim out. Thanks. I've heard it's not as mature tho.
>>
>>66711183
Yes, in several langauges:
-C/C++
-Java (regrettably)
-JavaScript (regrettably)
-Python
-Ruby
-Haskell
>>
Is errno bad design?
>>
>>66711258
>OOP
Inheritance is a defect attractor. Read more ESR
Also you do want a GC and you should use Go
>>
>>66711283
Haskell is good for designing a language. Start simple and work your way up. A very basic language could be like a calculator.
>>
Daily reminder that __auto_type, statement expressions and local functions make gnuc acceptable lisp.
>>
>>66711288
Yes.
>>
>>66711150
1. Write code that parses a string and builds a tree representation of a program's syntax
2. Write code that evaluates a parsed program
3. Modify that code so instead of actually running the program, it outputs instructions for evaluating it later on
>>
>>66707173
kek
>>
>>66707173
Underrated.
>>
>>66711289
I don't wanna use a GC. There's different ways of handling memory beside a GC and as I said. I do some os-dev stuff and a GC doesn't work for me.

>>66711157
Also, about nim: it compiles to C but it has a GC. Wot?
>>
>>66711337
It wasn't in an era of monothreaded programs. Parallel and concurrent programming seemed so clunky and useless for single-thread CPUs that were doubling in processing power every year or so at that time.
But then the Pentium 4 hit the 4 GHz barrier and housefires ensued. The monothread dream was dead and languages that didn't take concurrency seriously suddenly got old. That's one of the motives behind Go and its handling of errors, in trying to look like C while taking concurrency into the language.
>>
>>66711482
>I don't wanna use a GC.
Yes you do. You can deallocate manually or you can use a GC. Those are your choices.
>>
>>66711629
Why do you pretend as if RAII and ownership models don't exist? Miss me with the go shit.
>>
>>66711681
They exist, but they're an evolutionary dead end. Just use Go already.
>>
>>66711629
rust
>>
>>66711691
Don't meme on this guy he wants serious advice
>>
File: file.png (73 KB, 380x349)
73 KB
73 KB PNG
>>66711697
>>
>>66711684
> How do I get people to use my language of choice?
> Ah, I gotta be disingenuous and unhelpful.
>>
>>66711355
How do that?
>>
best online haskell crash course?
>>
>>66711132
>uses stupid rust terminology
>clearly wants someone to recommend him rust
>rust is a messi
Just use it already you tsundere fuck
>>
>>66701895
Lots of schools makes you rewrite functions of the C standard library. Lots of resources cover this so if you're stuck you can get some help.
Writing a compiler from the lexer to the IR should be something on your todo list too. It involves a lot of research, understanding of some design patterns, and a lot lot lot more.
>>
>>66710438
find Media -type f -name poster.jpg -execdir cp {} folder.jpg \;

Thank you. You just saved me so much time.

Thank you so much
>>
File: 1451194787338.png (1.09 MB, 1098x1645)
1.09 MB
1.09 MB PNG
>>66712060
You are welcome.
>>
>>66711807
You could try skimming through the wikibook?
Not sure, but make sure you use stack (haskell-platform is a pain)
>>
>>66711355
>>66711300
Any guides I can read, matching dub guys?
>>
>>66712200
First you can always google "X interpreter in Y", e.g. a lambda calculus interpreter or a calculator. Then there'll usually be separate guides on parsing anyway.

What sort of programming language do you envision?
>>
>>66712200
No, that's part of the learning experience.
>>
>>66712246
Well, I plan to write it in C++. C if you feel i'll be called gay for using C++.
And it is a calculator and string handling programming language.
>>
>>66712264
Think about what expressions will look like. Do you know BNF? e.g.
i = an integer
s = a string
e ::= i | s | e + e
e.g.
1 is an expression because it's an integer
1 + "hello" is an expression because it's an expression, then the symbol +, then another expression
>>
Got a raspberry pi yesterday. Gonna work on it today to deploy my webserver with sweet 100% uptime.
I'm looking forward to it.
>>
>>66712298
BNF?
>>
>>66712420
Backus-naur like the example I gave for expressions
e ::= i | s | e + e
>>
File: sadder.jpg (38 KB, 464x320)
38 KB
38 KB JPG
>>66712453
You lost me. I'm so sorry.
I feel like a failure right now.
I have the ability to do something cool yet i'm not prepared to do it.
>>
>>66712473
You are a failure, so you're right in feeling like one. Please stop wasting everyone's time with your pointless, inane, boring questions and educate yourself before posting on here again.

Consider deleting all your posts.
>>
Would i want to learn a low level language like c or c++ for a cyber security internship? Asking for a friend.
>>
>>66712473
stupid frogposter
>>
I'm making a small game with text interface in Python, but now I have rather serious trouble - I can't do actual interface part.
I want to work with single terminal screen of text, 80 characters by 25, no scrolling with each command. My friend told me that there are many python modules for text user interfaces, but after days of googling, all I can find is some pseudo gui shit with widgets and such. My stupid question is - is there some sort of simplistic module for python which is preferably cross-platform, and allows me to manipulate terminal to some extent? (Clean screen, print text in specified place, and so on) I know that on Windows I can use control codes to do this, but it's not something I need to do once or twice - thus I'll need to write some small framework of my own. This, as my friend says, is stupid idea, and I should just use already created solution.
>>
>>66712540
>>66712567
>>
Hey anons. Did any of you do a cool project in your final year? Looking for inspiration.
I was considering something using the Spotify, Genius and WhoSampled APIs, but thinking that might be too basic.
>>
>>66712473
He's just not very good at explaining himself.
The Backus-Naur-Form basically tells you how to break down program code into smaller and smaller logical units until you arrive at basic things like identifiers and operators. The atoms of a programming language, so to speak.
An identifier might be "a" or "b", an operator might be "+" or "=". An expression can be constructed several different ways; it can either be just an identifier, or two expressions joined by a binary operator (yes, that is a recursive definition - an expression can contain other expressions, which can contain other expressions etc).
So the rule for an expression would be:
e := i | e o e
(an expression is comprised of an identifier, or two expressions joined by an operator).
Expressions can then be joined into blocks, etc etc until you arrive at a program.
An example for a Brainfuck BNF could look like this (not official notation, this is just what I use. There are also other ways to express it):

<Program> := <CodeBlock>
<CodeBlock> := [ <Expression> ]
<Expression> := <Command> <CodeBlock> | "[" <Loop> "]" <CodeBlock>
<Loop> := <CodeBlock>
<Command> := "." | "," | "<" | ">" | "+" | "-"
>>
>>66712656
>spoonfeeding
Consider never posting again yourself. He was given more than enough information to deduce what BNF is by himself (or to google it, even). The fact that he did neither shows that he's either retarded or not invested in learning this at all (because he's more enamoured by the idea of knowing something than actually knowing it).
>>
>>66712759
He's also a stupid frogposter
>>
File: 30 year old.png (87 KB, 714x810)
87 KB
87 KB PNG
>>66712759
Yeah man, better not tell anyone anything! Fucking babies, you don't need to spoonfeed them! In fact, let's not have conversation here at all. Let's just be assholes to one another so everyone leaves us ALONE ON OUR SECRET ANONYMOUS IMAGE BOARD

Got a better idea: I'll keep spoonfeeding as much as I want, and there's literally nothing you can do about it, faggot.
>yfw
>>
>>66712759
Assblasted high-school gym teacher.
>>
File: 1522215159903.jpg (22 KB, 500x373)
22 KB
22 KB JPG
>>66693912
Does Android Studio have a problem with encodings or something? I'm trying to create a wordlist for a keyboard and I'm going fucking insane. Every time my text files (one word for line) get converted to xml they get cut whenever an accented character appears. I tried to change the encodings of the source files in notepad++ to UTF-8 and to put the same encoding in all the project's settings but it didn't work. If I set the source files to windows-1252, instead, the words in the xml are not cut but the accented characters are shown as unrecognized (black squares with a white question mark in it) both in AStudio and on my phone, if I try to use that language pack. Is there a way to solve this problem?
>>
>>66712860
You do not belong here. You are part of why this general has been declining in quality at a faster rate these last few years.

>>66712883
I am more qualified in my sleep than you'll ever be in your entire life.
>>
File: street rules.jpg (131 KB, 891x670)
131 KB
131 KB JPG
>>66712926
Sadly true.
SHIT DON'T MATTER ON THE STREET THOUGH, BOIII.
>>
>>66712962
I grew up in an european slum in the late 90s. I could literally murder you in a 1 on 1.
>>
>>66713006
The royal family is not a European slum, Prince Harry.
>>
>>66713006
>I grew up in a slum, I could literally murder you in a 1 on 1.
I grew up in a safe white village, I could literally call the police.
>>
>>66693912
Anyone know SQL?

I have literally never used it before but I barely passed a technical interview.
>>
>>66713189
Let's chat on Hangouts!
Hi Ian - I'll be calling in a couple of minutes. Thanks!
Sounds good.
1. Which of the following is not true about Natural Joins?
a. Natural join is based on all columns in two tables having same name
b. It selects rows from the two tables having different values in the matched columns.
c. If columns having same names have different data types, it returns error.
d. None of the above.
>c.
2. Which of the following is not true about a FOREIGN KEY constraint?
a. It is a referential integrity constraint.
b. It establishes a relationship between a primary key or a unique key in the same table or a different table.
c. A foreign key value cannot be null.
d. A foreign key value must match an existing value in the parent table.
>c
3. Can you join a table to itself?
a. Yes.
b. No.
>a,
4. Which of the following is not true about SQL joins?
a. An inner join is a join of two tables returning only matching rows.
b. A left or right outer join returns the results of the inner join as well as the unmatched rows in the left or right table respectively.
c. A full outer join returns results of an inner join as well as the results of a left and right join.
d. None of the above
>c.
5. The "IN" SQL keyword...
a. Is used with the DISTINCT SQL keyword only.
b. Defines the tables we are selecting or deleting data from.
c. Determines if a value matches any of the values in a list or a sub-query.
>c
6. Can you use both HAVING and WHERE SQL clauses in one SQL statement?
a. Yes.
b. No.
>a.
7. Normalization is ...
a. A special way of selecting data
b. The process of adding primary key to a table
c. The process of arranging information stored in a database in a way, which removes redundancy and ambiguity.
>c.
8. To use a FETCH statement with a cursor you always have to supply an explicit direction such next or prior.
a. True
b. False
>a

how baby basic are the questions I go wrong?
>>
>>66712759
>programming discussion in the daily programming thread is spoonfeeding because you can just google it and post pictures in your programming socks instead
The reason why this thread is worthless
>>
>>66693912
Do any of you /g/uys know if there is a website where I can hire someone to have a look at my code and solve a problem I could have, and what would the costs be?
>>
Why is Scala such a cluster fuck holy shit
>>
nu
>>66714313




Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.