[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 26
Old Thread: >>55131326

Anime edition

What are you working on /g/?
>>
What's your favorite text editor /g/? I want to keep this straw poll going for a few more threads.

https://www.strawpoll.me/10508463
>>
>>55140000
>no ed
Why use anything besides the one true editor?
>>
>>55140000
vscode
>>
File: ignucius.jpg (40 KB, 800x600) Image search: [Google]
ignucius.jpg
40 KB, 800x600
>>55140000
> What's your favorite text editor /g/?
emacs, nano for quick edits
>>
Redpill me on negative and fractional types /dpt/
>>
tfw you take a step back from your code and don't know wtf you just wrote.
>>
>>55140011
Does anyone actually use ed anymore?
>>
>>55140038
don't know that feel.
>>
File: hon hon hon.jpg (17 KB, 283x423) Image search: [Google]
hon hon hon.jpg
17 KB, 283x423
What music do you listen to while programming, /g/?
>>
>>55140066
I don't
>>
>>55140038
>tfw you take a coffee break and solve your problem in the middle of a sip
>>
>>55140066
Got any good electronic music to share?
>>
>>55140080
No I was actually looking for recommendations.
>>
>>55140000
checked, and where the fuck is notepad++
>>
>>55140140
In the >>>/trash/ with its left wing anti-freedom author
>>
File: dean_dean_dean_dean.jpg (38 KB, 500x500) Image search: [Google]
dean_dean_dean_dean.jpg
38 KB, 500x500
>>55140073
pic related
>>
>>55140080
/mu/ would probably hate me for this but try looking at this chart for inspiration:

[spoiler] https://rateyourmusic.com/customchart?page=1&chart_type=top&type=album&year=alltime&genre_include=1&include_child_genres=1&genres=ambient&include_child_genres_chk=1&include=both&origin_countries=&limit=none&countries= [/spoiler]
>>
>>55140066
https://www.youtube.com/watch?v=rAbhJk4YJns
>>
Just got F+ZBbZZ2 as an id
That pretentious cunt with the neural network fizzbuzz once again fails
>>
>>55140140
Few people on /g/ user notepad++ because it's trash. They're either fine with regular notepad or get vim/emacs
>>
https://twitter.com/CollinEstes/status/738767017843515393

Apparently NASA uses Node.js, where is your god now?
>>
>>55140223
And when did Nasa last land on the moon?
>>
>>55140140
>notepad++
>>
>>55140222
I am pretty much fine with regular notepad, except notepad++ has tabs, highlighting, better search/replace features.

what else you want from a text editor
>>
>>55140256
Both emacs and vim are capable of all of that and many more.
>>
Anyone familiar with OpenCL here?

Why is it that these guys don't have to call enqueueWriteBuffer and enqueueReadBuffer when putting and getting data in and out of their GPU?

https://github.com/amd/OpenCL-caffe/blob/stable/src/caffe/util/ocl_wrapper.cpp

My code doesn't work unless In have buffers queued, and I'm wondering why these guys don't.
>>
>tfw you find a project you wrote a few years ago and it compiles with 61 warnings

Now I feel the urge to clean the code up.
>>
>>55140352
I don't know that feel
>>
>>55140347
They call it in other files though, so I guess they call these functions at different times but eventually do?
>>
Working on muh file manager. I've decided to go with protobuf.
>>
>>55140256
Good text editing features?
>>
What's wrong with notepad++? Why doesn't /g/ like it?
>>
>>55140428
every time you move your cursor you have to take your hands off the keyboard. that's the largest reason, but the overall GUI design is inefficient.
>>
>>55140371
They do? Shit, okay. I'm too tired today I guess.
>>
File: Notepad--.png (17 KB, 616x257) Image search: [Google]
Notepad--.png
17 KB, 616x257
>>55140428
>>
>>55140451
Yeah in files in the layers folder.
>>
>>55140428
vim > emacs > every other text editor
>>
>>55140023
https://www.cs.indiana.edu/~sabry/papers/rational.pdf
Static typing has gone too far


>>55140520
4chan is an English-speaking anime imageboard
>>
What should I learn next, Perl or Rust?
>>
github.com/deeepaaa/hachidori
>>
>>55140643
Perl
>>
>>55140573
We've known for ages that you can differentiate types, and the results are zippers.

>>55140643
Norwegian, it's the future language of /g/.
>>
>>55140643
Rust
>>
>>55140648
please stop advertising your garbage
>>
>>55140671
It's not about differentiating types
It's about negating and reciprocating types
>>
>>55140691
I know, I'm saying that static typing hasn't gone too far because we've been manipulating types like this for a while
>>
>>55140648
NOBODY CARES
>>
>>55140721
Differentiating types is easy, because sum types + product types (the basic type semiring) is standard
Definitions for negation and reciprocation of a type (or alternatively subtraction and division of types) are not

In the paper, they're effectively requirements and contexts
>>
>>55140732
>>55140681
wow looks like summer began
>>
>>55140754
"values of negative types are values that flow “backwards” to satisfy demands and values of fractional types are values that impose constraints on their context"
>>
>>55140643
Perl is out of fashion. Rust is really in. Learn Rust if you want to be a good plebbitor.
>>
>>55139968
Anime has nothing to do with programming. Stop forcing it.
>>
>>55140648
don't just link to your thing without even giving a description of what it is i know i could just click the link to find out but id rather know what it is before i click it so i know whether or not im interested in it first
>>
>>55140768
http://rbt.asia/g/?task=search&ghost=&search_text=github.com%2Fdeeepaaa%2Fhachidori

wow looks like being a faggot began
>>
File: Martin-Lof.jpg (151 KB, 1024x1303) Image search: [Google]
Martin-Lof.jpg
151 KB, 1024x1303
>>55140830
programming is life
anime is love
love is life
therefore programming is anime
>>
>>55140830
Anime has always been a part of /dpt/ since it existed.
>>
>write fizzbuzz in rust
>Compiler takes control of computer and displays a message in big blocky letters
>UNSAFE CODE: LOCKING CLIENT OUT
>sound of helicopters outside
>can hear vans driving up to my house
>SWAT team rappels down roof and crashes through window
>they beat me down and arrest me
>life sentence with no parole for writing unsafe code
Rust users will defend this
>>
>>55140867
Why would you write unsafe code in FizzBuzz? Are you a nu-male or something?
>>
>>55140867
Land of the free keeping America safe from terrorists like you. Nothing to hide, nothing to fear.
>>
>>55140000
>normies voting for sublime
get out REEEEE
>>
>>55140866
That doesn't change the fact it still has nothing to do with programming and it's just you faggots forcing it.
>>
>>55140867
That's what you get for doing illegal shit. Maybe next time you should program in Idris.
>>
>>55140883
unsafe code ⊆ free code
>>
>>55140011
>>55140140
This poll is about most popular editors on /g/. Unpopular or not used editors get shoved away into other.
>>
>>55140883
>>55140884
>>55140902
>print hello world
>get sent to fema camps
can't make this shit up
>>
>>55140845
touché
>>
>>55140674
>>55140815
OK, I'll be learning Rust next. Thanks anons.
>>
>>55140904
my dick ∈ you're moms asshole
>>
>>55140648
Can you please fix the user interface? Like 100% of your program is user interface so maybe you should get that part right.
>>
File: ss (2016-06-18 at 05.56.27).png (29 KB, 1018x356) Image search: [Google]
ss (2016-06-18 at 05.56.27).png
29 KB, 1018x356
>>55140904
If you like free code so much, use free monads.
>>
>>55140988
You should only use them when necessary. Free applicatives are less powerful, but permit more analysis.
>>
>>55140573
Interesting paper, thanks anon!
>>
>>55140988
Free monads are shit
Free fields pls
>>
>>55139968
>What are you working on /g/?
Nothing because I'm a depressed fuck who always wanted to learning web dev but can't seem to do it.
>>
>>55141100
What's stopping you?
>>
>>55141100
Learn something other than web dev?
>>
>>55140906
So why didn't notepad++ get its own alternative then?
>>
>Lavender is a Firefox browser extension that converts gendered English pronouns (e.g., he, she, herself) to gender-neutral pronouns (e.g., ze, ze, hirself).

https://github.com/hephaest0s/Lavender

Kill me..
>>
>>55141148
The only true gender-neutral pronoun is ⊥
>>
>>55141148
But that introduces ambiguity, because most English writing is done based on there being two sets of pronouns for people

FUCKING MORONS
>>
>>55141148
Now that's nonsensical, since ze ze hirself aren't in the dictionary, but also because "they" and "them" are already the standard genderless pronous.
>>
>>55141182
Oh and forget "theirself"
>>
>>55141182
>>55141201
What's wrong with 'one'? Or 'hit'?
>>
>>55141182
Too true
>>
>>55141100
Becoming an employable web dev should take you about 4 months tops of intense work (assuming you know literally nothing). That is, if you don't have a job or school to worry about. If you do, probably twice as long.
Do you have the strength and motivation to commit to the same task day after day, no weekends off, for 4-8 months? Have you ever done something like that in your life?
>>
>>55141229
"One" isn't so much as a genderless pronoun but for describing an anonymous and/or hypothetical subject who, in OOP terms, hasn't been dispatched. I really had no idea how else to describe it. He/She/They are tied to subjects that actually are existent.

Even then, I doubt SJWs even know much about the real world or language since e.g. unisex bathrooms have been a thing since the dawn of time yet they're still going on about a revolution where they introduce them.
>>
>>55141182
It requires sentence analysis and reconjugating everything because it's plural, too much work for etnhically disinfarnchised wimyn. Check yuor pirvilegde.
>>
File: she.png (7 KB, 257x118) Image search: [Google]
she.png
7 KB, 257x118
reminder
>>
>>55141280
Okay, so what about 'hit'? It's a perfectly good Old English gender-neutral third person singular pronoun.
>>
Python guy here. Been going through the basics, interested in improving, and strongly motivated.
At the end at John Zelle's Python Programming, which I'm enjoying. Want to move to next level. Some sort of community seems to be recommended, but I've heard no clear specifics.

>>55140714
Got any good suggestions? I've done code wars stuff and made stuff related to file sorting.
>>
>>55141320
That won't compile
>>
>>55141229
not special snowflake enough.


i wonder when we stopped locking up insane people.
>>
>>55141333
No main
>>
>>55141343
Not even that. The type is wrong
>>
>>55141350
It's the compilers fault for being unable to infer that Gender and Sex are the same thing :^>
>>
>>55141359
>:^>
I am so triggered right now, shitlord
>>
>>55141370
Men and women are not isomorphic
>>
>>55141321
Well It may be a bit deprecated by a couple hundred years, but "it" would be the same term anyway right? Problem is that "it" is sort of derogatory. Of course language is a human construct and not made by computers so it follows that there are emotions tied with some words. "They" still covers the case.

>>55141291
>It requires sentence analysis and reconjugating everything because it's plural
Not always, like "they said" vs "(s)he said", but yes cases like "(s)he is" "they are" would require some working. But isn't that the fun in programming something is making that work out in all cases? Well I didn't expect much from a JS coder anyway.
>>
>>55141414
Yuor just a mysoginisitc dubsbitrips faggot... Wiat no I ddint say teh f-wrod! Its homophboic!
>>
File: 1466236131822.png (211 KB, 371x377) Image search: [Google]
1466236131822.png
211 KB, 371x377
>>55141079
>not cofree *-coalgebras
>>
>>55141452
It's ok, you said it here and not on twitter.

You're in a safe space.
>>
Which one do you prefer more, /g/ ?

if ( true ) {
do-something
}


OR

if ( false ) { return }
do-something
>>
>>55141504
>falling for the dual meme
>falling for the algebra meme

pls go terminal
>>
>>55141128
Depression. I work a miserable customer service job that leaves me drain. I'm switching to part time work that isn't this soon and I think I'll have more time and more motivation to work on web dev.
>>55141235
I feel like I could do this but I also never know where to start. So you're saying if I really dedicate my time I could become employable in a year? How? Guide me, please!

Can anyone point me to the right direction?
>>
>>55141514

if (
true
) {
dp-something
;
}
>>
>>55141514
| true -> ...
| false -> ...
>>
>>55141514
I prefer to use 0==0 instead of true.
>>
>>55141514
if
(
false
)
{
return
;
}
do-something
;
>>
>>55141514
probably the second one, but it's less maintainable
>>
File: 1456279739277.jpg (30 KB, 500x272) Image search: [Google]
1456279739277.jpg
30 KB, 500x272
>>55141518
>terminal
>not initial
>implying CCC
>>
If anybody wants to help me with my endeavor from yesterday (i'll probably stop posting this after a thread or so, once i'm sure everyone in a normal day has seen it), i've been looking to see how things like chocolate-doom do their drawing.

I know that chocolate-doom most likely uses SDL1.2, and I know
SDL_Flip()
or
SDL_UpdateRect()
is used to update the screen, so I followed that to
i_video.c
in
I_FinishUpdate()
, which is called by the
D_Display()
function in
d_main.c
, which I see is called by the
D_DoomLoop()
function in the same file.

What I assume to look for, is
R_RenderPlayerView()
in
r_main.c
. Not sure where to look from there, everything is all kindof tucked inside eachother, and there's no documentation where things go.

So in the end I don't know how this game draws pixels to a surface and present it to the viewer.
>>
File: 1465387745972.jpg (100 KB, 486x806) Image search: [Google]
1465387745972.jpg
100 KB, 486x806
>>55141612
There aren't going to be any morphisms from you after I've finished with you
>>
If I want to collect data from a webpage, is there any way of programming it so that it doesn't have to download the whole page, just the part that's relevant to me? (using python btw)

It gets really fucking slow when I need to download 400 webpages everytime I run my program.
>>
>>55141514
test() && do_something();
>>
File: bml.webm (3 MB, 512x512) Image search: [Google]
bml.webm
3 MB, 512x512
in other news, working on some cool shit

>>55141649
fair point
>>
>>55141705
range
>>
>>55141744
what is that? some kind of cellular automaton?
>>
>>55141514
if (1 != 2) {
do-something
} else {
return;
}
>>
>>55141744
what is this?
>>
>>55141320
Has anyone wondered if all of this special snowflake bullshit is some sort of social experiment reminiscent of that one conformity experiment involving stick lengths?
>>
>>55141823
that's just what they want you to believe
>>
>>55141767
>>55141787
https://en.wikipedia.org/wiki/Biham%E2%80%93Middleton%E2%80%93Levine_traffic_model
>>
>>55141322
bump
>>
>>55141908
program some stuff
>>
>>55141322
Do concurrent/parallel matrix multiplication
>>
>>55141523
bump
>>
>>55141705
cache it
>>
>>55142030
That might be why Firefox is so slow for me. I completely disabled all caching functions in about:config for privacy reasons.
>>
>>55141908
http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/
>>
>writing a parser

IT HURTS
MY
BRAIN
>>
>>55142196
lol dumbass
>>
>>55142372
Found the chrome faggot
>>
>>55142406
found the faggot
>>
>>55142454
I know you are, but what am I
>>
>>55140000
>All these VIM babies
>people unironically use gedit
>people ACTUALLY use Sublime, Atom and notepad
No wonder why this thread is going to shit
Also, spacemacs is just emacs, you should have just written Emacsens in general
>>
>>55140189
https://www.youtube.com/watch?v=rdj6deraQ6k
>>
just made a script which saves music names in a playlist txt from quodlibet automatically
Don't know why it's a fucking half mb long doe
>>
I'm making a stupid minigame for my java class, and to finish it I have to make a persistent ranking system to save scores
thing is I have no idea what I'm supposed to even use
it's an array of size 10, and it works once using printwriter, but then it overwrites the previous next time I run it
I guess I need to make a loop to test if it was higher than the previous one, then add one to the index or something
anyway, how do I make the printwriter(or whatever I'm supposed to use) go to the next index of the array instead of cleaning the file before
>>
>>55140189
Amazing taste
>>
>>55141643
The SDL screen video buffer is I_VideoBuffer in i_video.c which points to the pixels field of a SDL_Surface.
This is drawn to the window/display in I_FinishUpdate using BlitArea and SDL_Flip.

Some common low level primitive drawing calls are in v_video.c with V_Draw*Patch calls being used for basic blits for things like sprites and rectangles.
In doom/r_draw.c you have the texture mapper for wal slices and it uses a lookup table for the addresses if each row of pixels which is setup in R_InitBuffer (the ylookup being set to I_VideoBuffer + some offset).
The the rest of the r_ files is where you have the actual calculation of what should be drawn.
>>
>>55142512
Spacemacs is popular enough I just said fuck it and included it.
>>
File: lol.png (291 KB, 951x413) Image search: [Google]
lol.png
291 KB, 951x413
>>55142406
kys
>>
I'm writing a shitty bat file to automatically convert some webms, but I know diddly squat about bash since I usually work under linux.
I've most of it down but I want the output files to have an unique filename, and was thinking to just assign the current absolute time to them. Can't exactly find a simple way to do this, though.
Anyone's got suggestions?
>>
>>55142512
>Emacsens
Found the double plural faggot
>>
>>55139968

Can someone redpill me on "bitstreams?"

I'm trying to read PNG data in python and I don't want it to use as much memory as the PNG itself, IE load the entire thing as a hex string.

Is this the problem that a bitstream addresses?
>>
File: darkness.jpg (137 KB, 800x1067) Image search: [Google]
darkness.jpg
137 KB, 800x1067
I'm a decent C/C++ programmer and am just starting off with graphics. Should I learn OpenGL or this new Vulkan nonsense?
>>
File: shot0008.jpg (44 KB, 640x480) Image search: [Google]
shot0008.jpg
44 KB, 640x480
>>55141182
>ze ze hirself aren't in the dictionary
>things need to be in the dictionary to have meaning that humans can understand
>only my dictionary is the correct one
>>
>>55142558
It's still not an editor.

>>55142663
It's not double plural
>>
>>55142752
One Emacs, two Emacsen
One Box, two Boxen
>lrn2jargon

https://www.emacswiki.org/emacs/Emacsen
>>
>>55142699
>I'm a decent C/C++ programmer
since you are combining these two, you are probably neither
>>
>>55140957
can you please specify what you think is wrong about the user interface?
>>
>>55140648
Wow, that fucking spamming faggot closed my issue.
>>
>>55142811
>issue
>>
>>55142699

darker please.
>>
>This site uses HTTP Strict Transport Security (HSTS) to specify that Firefox only connect to it securely. As a result, it is not possible to add an exception for this certificate.
for fuck sake
>>
>>55142699
I'm going to assume you're doing vidya development. Is it 2D or 3D graphics?
>>
File: 1456504577353.gif (1 MB, 400x225) Image search: [Google]
1456504577353.gif
1 MB, 400x225
>>55142874
kill urself my man
>>
>>55142946
3d, more or less vidya but am really just aiming at world/character creation at this point in a general sense.
>>
>>55139968
on this page
https://en.wikibooks.org/wiki/Grsecurity/Obtaining_grsecurity#Downloading_the_Linux_Kernel

in the middle
NOTE: The versions of the grsecurity patch and the kernel must match exactly.

my versions:
kernel is 4.6.2-1
grsec is 4.5.7.201606142010-1

2 stupid questions:
am i ok since they both version 4?
if not do i downgrade or upgrade one of them?
>>
>>55143106
>grsecurity
>using anything by the people who banned someone just for reporting a bug and anyone who replied to him
https://twitter.com/marcan42/status/724749571495075840
>>
>>55143021
No. The tighter your panties are, the better programmer you are.
>>
>>55142842
It IS an issue you fuckface.
>>
>>55143021
Racket Rocket pls go
>>
I'm new to C++ and try to update a field in a class through a method, but the reference does not seem to update.

Here's a very simplified example
class SomeClass {

SomeObject* MyObject;

void SomeMethod(SomeObject* object);

public:
void SomePublicMethod(SomeObject* object);

};

// this is called by the public method
SomeClass::SomeMethod(SomeObject* object) {
MyObject = object;
}

// this wraps the private method
SomeClass::SomePublicMethod(SomeObject* object) {
SomeMethod(object);

// MyObject is still NULL
}


Why is MyObject not updating its reference?
I thought SomeObject* is a pointer to the actual object, setting it inside a method should update it outside aswell, or how does it work?

This is part of a major codebase I don't have control over. And I always get SomeObject* on the public method with some other parameters which decide what internal function to call and which internal object to update.
>>
>>55140151
Lol and what are you right wing? That makes you so much better.
>muh freedoms
Keep that shit in /pol/ Faggot
>>
>>55143200
I agreed with you until you said
>>muh freedoms
>Keep that shit in /pol/ Faggot
>>
>>55141514
if(true) {
// Do something
}
>>
>>55143155
>https://twitter.com/marcan42/status/724749571495075840

so ur saying fuck grsec.
then what do i have for alternatives?
>>
>>55143218
true do-something $ return ()
>>
>>55141514
if
(
true
)
{
return
;
}
else
{
do-sth()
;
}
return
>>
>>55143257
>ur
leave

>then what do i have for alternatives?
The linux kernel unpatched.

Anyhow, as for >>55143106, it's not programming and does not belong in this thread. It belongs in the stupid questions thread.
>>
>>55142699
openCL
>>
>>55141514
true ? do-something : return
>>
>>55143194
Have you tried putting
MyObject
under public?
>>
>>55142355
Use Perl6 grammar, EZ life
>>
>>55143511
I'm using C++ though but it's alright, I figured it out, recursion to the rescue!
>>
>>55143629
>C++
>recursion
You're going to cry.
>>
>>55143644
Actually no, not on modern compilers. I tested that the other day
>>
>>55143655
Addendum: terminal self-recursion only. Maybe mutual recursion doesn't fly.
>>
>>55142553
thanks

still don't know where to look, but it's my understanding that chocolate-doom draws it's own way, and then sends that to SDL?

is this the way more advanced games draw stuff?
>>
File: yui blob.jpg (122 KB, 692x864) Image search: [Google]
yui blob.jpg
122 KB, 692x864
>>55140000
>nobody uses nano but me
>>
>>55143194
i know that passing by reference and by values can be confusing when it comes to passing pointers but essentially you're passing a shallow copy of the pointer to SomeMethod(..) which is in turn assigning a value to that shallow copy.
your code should be like this:
class SomeClass {

SomeObject* MyObject;

void SomeMethod(SomeObject* object);

public:
void SomePublicMethod(SomeObject object);

};

// this is called by the public method
SomeClass::SomeMethod(SomeObject* object) {
MyObject = object;
}

// this wraps the private method
SomeClass::SomePublicMethod(SomeObject object) {
SomeMethod(&object);

}
>>
>>55143730
I use nano when I edit stuff as root and when I do not have x11 accessible (such as in ssh) ;__;
>>
>>55143749
>>55143730
Jesus just learn an editor
>>
>>55143740
...
no
>>
My program can't find the declaration for the nftw even if I include ftw.h, but it works fine if I call just ftw. Also, it can't even find the declaration for the structure FTW used as teh fourth argument in the function that is passed as an argument to nftw. What gives?

here's the code, it doesn't even do anything yet, but still won't pass compliation.

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include <string.h>
#include <dirent.h>
#include <ftw.h>
#define _XOPEN_SOURCE 500

void errExit(char* s){
perror(s);
exit(EXIT_FAILURE);
}

int fn(const char *fpath, const struct stat *sb,
int typeflag, struct FTW *ftwbuf);

int main(){

nftw("bla", fn, 20, FTW_CHDIR);

return 0;
}

int fn(const char *fpath, const struct stat *sb,
int typeflag, struct FTW *ftwbuf){
return 0;
}
>>
>>55143765
nano is an editor
>>
>>55143767
Put _XOPEN_SOURCE before all the headers
>>
got a 7 hour plane trip

whats a good book on 2d/3d cg rendering to read

I've been doing a 3d-raster engine and a ray-marcher and would love to read more info on that or some cool ways to cache/thread/speedup my code.
>>
>>55143766
why?
>>
>>55143765
nano is an editor

>>55143767
>
#define _XOPEN_SOURCE 500

Please don't, just pass it as a compiler flag instead.

Also, post the error. I think that the problem is that you need to define _XOPEN_SOURCE 500 before any includes, would be solved if you just followed my advice above.
>>
>>55140452
I admitt i used this shit for fast editions mostly in sql procedures and taking notes. You redpilled me.

Lightweight Alternatives for both windows 8 (work) and linux?
>>
>>55143740
this is terrible. never do this.
>>
>>55143815
SomeClass::SomePublicMethod(SomeObject object) {
SomeMethod(&object);
/* object dies here, enjoy crashing if you use MyObject after that lol */
}
>>
>>55140643
2nd for perl. Might be out of fashion byt its quirks are mad fun
>>
>>55143730
Nano is great for a quick edit, but not so much as a full time editor
>>
>>55143832
Atom
Apparently like 255 MB so /g/ autists will shit on it but it's always loaded fast for me and has really good plugins
>>
File: computer science.jpg (177 KB, 700x516) Image search: [Google]
computer science.jpg
177 KB, 700x516
So it CS really a meme degree? I gotta make a decision to which degree I should get. I am not interested in mechanical engineering anymore, and I like programming/coding way more. But I am not gonna waste my time/money on a shit degree. Any thoughts on the matter?
>>
>>55143783
Thank you. I guess this is some pretty rookie mistake I made, what's up with that? I'm guessing there's a
#ifdef _XOPEN_SOURCE

somewhere in ftw.h, but I can't find it at all.
>>
>>55143858
What's wrong with it?
>>
>>55143869
In hindsight I wish I went into CS and not some meme games programming degree
>>
>>55143505
No.
I'm calling a private method, so making it public shouldn't make a difference.

>>55143740
Yes, it is very confusing.
I didn't know there's a difference between a pointer and a reference and functions always pass by value instead of passing objects by reference. I'm coming from a language without pointers and all non value types are passed by reference.

I can't change the type passed to SomePublicMethod, it will always be SomeObject*, so changing it to SomeObject won't work for me.
I'm using
SomeClass::SomeMethod(SomeObject*& object) {
MyObject = object;
}

now.

It works.
>>
>>55143893
How is it going for you? Were you able to finish? Have you gotten any jobs?
>>
>>55143831
>Please don't, just pass it as a compiler flag instead.
How do I pass that kind of flag?

Also the error wasn't anything special, just a couple of errors and warnings about undefined stuff, like when you forget to include a header
nadji_make3.c:17:48: warning: ‘struct FTW’ declared inside parameter list
int typeflag, struct FTW *ftwbuf);
^
nadji_make3.c:17:48: warning: its scope is only this definition or declaration, which is probably not what you want
nadji_make3.c: In function ‘main’:
nadji_make3.c:21:5: warning: implicit declaration of function ‘nftw’ [-Wimplicit-function-declaration]
nftw("bla", fn, 20, FTW_CHDIR);
^
nadji_make3.c:21:25: error: ‘FTW_CHDIR’ undeclared (first use in this function)
nftw("bla", fn, 20, FTW_CHDIR);
^
nadji_make3.c:21:25: note: each undeclared identifier is reported only once for each function it appears in
nadji_make3.c: At top level:
nadji_make3.c:27:48: warning: ‘struct FTW’ declared inside parameter list
int typeflag, struct FTW *ftwbuf){
^
nadji_make3.c:26:5: error: conflicting types for ‘fn’
int fn(const char *fpath, const struct stat *sb,
^
nadji_make3.c:16:5: note: previous declaration of ‘fn’ was here
int fn(const char *fpath, const struct stat *sb,
>>
>>55143832
Emacs
>>
>>55143881
Not that anything is wrong with it, it's just too simplistic for my tastes.
>>
>>55143869
>So it CS really a meme degree?
No, that's CE/SE/Game[dev/eng]/Security eng/etc
>>
>>55143875
We've all done this mistake m8. As for <ftw.h>, mind that they use #ifdef __USE_XOPEN_EXTENDED and such. Also notice that it all comes from <features.h> in glibc, which is header guarded and included by everyone, so you must have flags defined before all headers, it's bitten me the other day. Also you can't define __USE_XOPEN_EXTENDED because they undef it :^)
>>
>>55141514

//if x==0: do action 1. Else: do action 2
int x = 0;
int y = 1;

while (x != 0){
y = 0;
x = x - 1;
}

while (y != 0){
y = y-1;
//do action 1
}
//do action 2
>>
>>55143911
Not finished yet, but my grades have been decent thus far so hopefully I can get a job somewhere. Would like to do academic work.
>>
>>55143893
>>55143869
in hindsight I wish I had studied literature, which I actually loved all along but was persuaded to go for money instead of what will make me happy

go figure
>>
>>55143917
-D_XOPEN_SOURCE=500
>>
>>55143945
>stem
>money

Don't tell me you actually fell down the stairs meme
>>
>>55143945
You don't need to study literature. I did that for a year and thought it was pointless because i might as well just read and analyze books in my leizure time. Switched to CS. I don't regret it.
Unless you were actually going to do something meaningful with a literature degree (pfft).
>>
What would be the best way to learn Javascript?
>>
>>
>>55143881
It's good for quick edits, but it's too basic for any major programming
>>
>>55144000
what do you want to learn it for?
>>
>>55143952
I learn something new every day. -Dmacro[=defn]

Thanks. It's strange how I'm simply instructed to use the function nftw, and no one told me to watch out for the order of inclusions and definitions.
>>
>>55144016
>not using a proper text editor
>>
>>55144031
I've heard that Javascript is in demang right now, and that you can get good money if you apply for a Javascript programming job.
>>
>>55144053
*demand
>>
File: 1385745182867.jpg (30 KB, 320x244) Image search: [Google]
1385745182867.jpg
30 KB, 320x244
>>55144016
>>
>>55144016
int abc = 1;
int a<200b>bc = 2;
int ab<200b>c = 3;

?
>>
>>55144138
>a<200b>bc
><200b>

what is this
>>
>>55144152
what vim looks like.
>>
>>55144053
hmm

this makes me think, we could have a starters guide, maybe put it in the OP
wouldn't need to be very complex, just basic progression for learners

>>55144152
it's \u200B, it's a unicode char
>>
>>55144202
does C++ allow this kind of syntax or are you just marking it up to show where the bytes are
>>
I am working on an OS made in Javascript. Every program in it will be made in javascript and the GUI will use css/html and DOM.
>>
>>55142549
kek
>>
>>55144240
https://www.reddit.com/r/ProgrammerHumor/comments/4on81i/til_c_allows_u200b_zero_width_space_in_identifiers/d4e01uz
>>
>>55143865
this
>>
>>55144320
cool. please share when/if you have something to show.
protip: javascript doesn't do multithreading too well. or at all really. so be careful
good luck man
>>
>>55144372
yes i know
im talking about this syntax

int abc = 1;
int a<200b>bc = 2;
int ab<200b>c = 3;
>>
>>55144320
Well, let me know if you actually get something functions, I'd be amazed if you did
>>
File: vim.jpg (3 KB, 159x44) Image search: [Google]
vim.jpg
3 KB, 159x44
>>55144415
just how vim shows characters like that.

also seems the compiler complains when you actually put those characters in instead of using \u200b
>>
is it worth getting a degree in CS or is it better to be self taught?
>>
>>55144415
You have to convert it to the char first then paste that in

thus when it is being compiled it is decoded as \u
that text editor in the image doesn't automatically decode those characters so they are invisible
in vim it does it differently
none of them have anything to do with C++ itself, just the text editor

does that answer your question?
>>
>>55144476
Why not both?
>>
>>55144480
[your code here] hmm testing
>>
>>55144485
i dont want to do 3 more years of college if i dont have to

plus VCU has a shit comp sci program
>>
File: firefox_2016-06-18_22-15-05.png (13 KB, 985x217) Image search: [Google]
firefox_2016-06-18_22-15-05.png
13 KB, 985x217
>>55144480
REEEEEEEEEE
>>
>>55144531
interesting phenomenon

I typed something like \u[code here] then had the rest of my post but it converted the rest to code blocks
>>
>>55144558
time to xss
>>
>>55140900
On the contrary, it's you trying to force non-anime threads.
>>
>>55144585
oh actually it turns out you just don't have to close your [code_] tags
>>
New to programming here.
I've started with C and am now learning Python.

Now I'm thinking, is there anything I can't write in C?
Why would I learn other languages. Most features in python seem entirely unnecessary.
>>
>>55144819
>is there anything I can't write in C?
No
>>
>>55144819
I like C, but I'm not gonna pretend that it's good for anything. Yes, you can write anything with C, but in a lot of cases it would just a lot less frustrating to just use Python or some other higher level language.
>>
>>55144819
>is there anything I can't write in C
I challenge you to average 2 integers
>>
>>55144819
things like networking programming, web backend, database access and many others can be a pain to implement in C. Even using libraries. Some languages do certain tasks better than others.
>>
File: 0_115147_d86651ba_orig.jpg (19 KB, 176x250) Image search: [Google]
0_115147_d86651ba_orig.jpg
19 KB, 176x250
Learning me some Cython with pic related.
I just hope it's everything I could wish for
>>
>>55144856
>it's good for anything
wew, *everything
>>
>>55144657
test
asdfjkl
asdfjklö
sdfkljklö
f
sdf
df
d
s
d
>>
whats something i can program on a 7 hour flight.

no internet during these 7 hours either
Thread replies: 255
Thread images: 26

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.