[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: 45
File: gentoo.jpg (26 KB, 400x300) Image search: [Google]
gentoo.jpg
26 KB, 400x300
old thread: >>54383013

What are you working on, /g/?
>>
first for javascript
>>
second for traps aren't gay and neither is flannel
>>
What do you use for your cross platform programs?
Made a simple program with JavaFX and kawa which was pretty easy to build for all platforms(pc,android) but JavaFX seems to be pretty slow.
Last time I tried lambdanative it run like shit on pc but almost year ago.
Kivy is shit.
QT seems like it could be decent.
>>
>TFW using Typewriter to generate angularJs API services from webapi controller actions, that retain typing of request params and responses and unwrap HTTP promise data automatically

Feels real fuckin good man
>>
File: 1429058116894.jpg (143 KB, 638x680) Image search: [Google]
1429058116894.jpg
143 KB, 638x680
Daily reminder that OOP is terrible:
https://www.youtube.com/watch?v=QM1iUe6IofM
>>
>>54390120
we know anon
>>
>>54390120
Even if one agrees with you, at what point should you be accused of spamming this video to get views?
>>
File: swedenYes.jpg (178 KB, 1024x768) Image search: [Google]
swedenYes.jpg
178 KB, 1024x768
Hey I am looking for advice.

I have spatial data on server and I want to generate a map and send it to the user.

The simplest way would be to generate bitmap and send it to the user just as file.

but if I would like allow user to scroll the map and move (left/right like on google maps) it, I would have to generate data dynamically?

In this situation sending bitmpan is a bad idea, but I am not sure if I could send such amount of data with json.

I am looking for some advice about technology to read about.
>>
File: skilled.webm (3 MB, 720x404) Image search: [Google]
skilled.webm
3 MB, 720x404
Ask your favorite programming literate anything (IAMA)

>>54390086
https://www.youtube.com/watch?v=7p6hqMnsLFY

>>54389945
IUP
>>
>>54390266
Don't send a bitmap over json anon. Just put a unless pointing to a png/jpeg file in the json
>>
>>54390009
>TFW using Memewriter to generate memeMeme MEME memes from memer memer memes, that retain memeing of meme memes and responses and meme MEME meme data automatically
>>
So for a shitty kmalloc im thinking of just writing doubly linked lists with a size field equal to the amount of memory between it and the linked list, and just returning a pointer to the start of memory inbetween.

Anyone know a less retarded way than that which doesnt require me doing a crazy amount of shit?
>>
>apply for backend job with description talking only about needing C/C++ knowledge
>go for interview
>guy asks me stuff about html, css and js
>stumped because I don't give a fuck to learn the specifics of these
>not a single C question
>wake up this morning to an email saying I was unqualified for the job

Have I been trolled.
>>
>>54390356
You should've just said that wasn't part of the description and left
>>
>>54390278
CUTE

Why aren't there jobs in Lisp?

What's the point of learning Lisp?
>>
>>54390445
>HTML and JS are similar to C
>insinuating you use C# and then saying you don't do OOP
>taking 20 hours to do a web crawler

Holy shit you are retarded.
>>
File: 1407905937240.jpg (23 KB, 500x375) Image search: [Google]
1407905937240.jpg
23 KB, 500x375
>>54390445
I don't believe I have seen any more stupidity in a single post.
>>
>>54390356
>job ad is for an engine-room maintenance position
>At interview they ask you about psychology and customer service, and tell you you'll be working the cash register

Nigga, they dumb.
>>
>>54390466
>>54390457
pls no bully
>>
>>54390444
clojure is quite popular in San Francisco.
>>
File: VNQ2YgT.png (10 KB, 883x134) Image search: [Google]
VNQ2YgT.png
10 KB, 883x134
>>54390473
I just don't understand why you started spouting off about things you clearly are inexperienced in.

What was the point?

I feeling of inclusiveness with the denizens of this thread?
>>
>>54390489
how did you get an imgur filename?
did you upload and then download this?
>>
>>54390476
That doesn't help Lisp's case at all.

Anyone who moves to San Fran right now is clinically retarded.
>>
>>54390476
City of the gay uses the worst lisp dialect.

I bet it's tech startups nonthe less who will pay you shit.
>>
>>54390494
I'm lazy.

I use ShareX.

Ctrl+Shift+4, drag box, ctrl+V in AppChan X.
>>
File: ANDROID.png (318 KB, 800x799) Image search: [Google]
ANDROID.png
318 KB, 800x799
>>54390445
>I'll admit I don't know C though, I don't do any oop
>>
>>54390496
>it's where you will be paid the most
>good climate
>hot girls everywhere
>6% black population
but, sure, San Francisco should be avoided at any cost.

>>54390509
Clojure is top notch for concurrency, it's the most well scalable of lisps.
>>
>>54390546
Even scheme has concurrency libraries that can give you what clojure has. It's by no means some exclusive club.
>>
>>54390554
no, most of schemed doesn't even have native threads.
>>
>>54390476
Use Kawa
http://per.bothner.com/papers/JavaOne15/slides.pdf
Kawa's startup time was far better
Kawa’s performance was generally better
Kawa made it much easier to work with JMonkeyEngine than either Clojure or
ABCL:
Inheriting from Java classes is much simpler
Working with a traditional imperative, object-oriented library is easy in Kawa
or ABCL, but more awkward in Clojure
Kawa toolchain is much simpler than Clojure’s
>>
>>54390585
Both guile and kawa have support for native threads.

Also spawning tons of native threads is not scalable. A proper concurrency system would pool green threads against a few kernel threads. See erlang.
>>
>>54390546
>$3500 for a shoebox with a sink
>ultra-liberal political climate (I lean left socially, but they're on a whole 'nother level.)

No, thanks.
>>
>>54390546
>paid the most
You also pay some of the highest prices for housing and food.
>>
File: 1293260425014.png (8 KB, 570x533) Image search: [Google]
1293260425014.png
8 KB, 570x533
>mfw I replaced 1000 separate glDrawElements calls with just 2-3 glMultiDrawElements calls

I mean, it does count, right? The docs say glMultiDrawElements might be internally implemented as just one for loop, but the implementation is free to optimize it in every possible way.

Next I'm going to see what wonders I can do with glMultiDrawArrays.
>>
>Linux display servers
Should I still be using Xlib? Or XCB? Maybe I should support Wayland or that shit Ubuntu is pushing?
Then do I use GLX (Xlib only) or EGL for an OpenGL context? Shit.
What the fuck are new applications supposed to use now? Yeah of the linux desktop will come when we've got rid of all this fragmented bullshit.
>>
>>54390736
Use an abstraction layer like Qt and GTK.
EGL is Wayland proof. Sounds like a no brainer to me.
>>
>>54390736
Nobody expects you to talk to X or your wayland compositor directly. You a GUI library which abstracts over them.
>>
>>54390773
>Use a gui library just to make a window to render GL into
>Wait 5mins while it chugs along and starts up, when I could do it myself in 3 lines of Xlib
>>
File: DSC00122.jpg (932 KB, 2000x3000) Image search: [Google]
DSC00122.jpg
932 KB, 2000x3000
Does anyone know how to make something like conky / start10 / rainmeter? I have no idea what to start, let alone what I'm supposed to search on google. Can some anon point me out in the right direction?
>>
>>54390814
Make a borderless window that sits behind all windows. Done.
>>
>>54390773
What if you use system that does not have gtk or qt and you plan on keeping it that way?
>>
File: DSC00125.jpg (729 KB, 2000x3000) Image search: [Google]
DSC00125.jpg
729 KB, 2000x3000
>>54390833
Thanks anon
nice dubs
>>
>>54390834
>>54390805
Then give up the prospects of your program running on every window system with little to no modification.
>>
File: peach.webm (3 MB, 848x480) Image search: [Google]
peach.webm
3 MB, 848x480
>>54390444
>Why aren't there jobs in Lisp?
There are still jobs in lisp but you need to find them

>>54390444
>What's the point of learning Lisp?
What i like in lisp is the sexp (easy to edit), it's a programmable programming language, (mostly) everything is an expression, dynamic, ultimate goto.

>>54390655
Kawa is great and unfairly/unjustly unknown.

>>54390675
And Bigloo, and Chez Scheme. But Clojure has STM, agents, atoms, futures, promises, ... out of the box

>>54390675
>A proper concurrency system would pool green threads against a few kernel threads. See erlang.
clojure has core.async

>>54390700
>>54390685
Still worth it. Liberalism is not that bad when you are in the middle-upper or upper class.

>>54390736
>What the fuck are new applications supposed to use now?
A cross-platform framework: sdl2, allegro, qt, ...

>>54390814
google "undecorated window"
>>
>>54390896
what
>>
>>54390896
Before anyone asks, it's Kiss x Sis OVA.

I'd rather live in the extended suburb towns of Washington or Oregon (nowhere near Portland)
>>
>>54390896
>A cross-platform framework: sdl2, allegro, qt, ...
Sure, because I like waiting 6 years for my application to initialize everything including the kitchen sink, poll for every kind of event under the sun, and generally be maximum-bloat just to get an OpenGL context on screen.

If I wanted that shit I'd move to windows/.NET like I do in my job.
>>
>>54390944
Well have fun writing hundreds of lines of code in WinAPI/Xlib/xcb just to get the basic stuff set up.
>>
>>54390944
>waaaa Linux is fragmented
>use library X and Y instead
>waaaa muh startup time
Seriously kill yourself.
>>
>>54390961
>Hundreds of lines
Nah bro, it's like 60-lines of XCB and half of those lines are just spliiting function calls up since xcb loves it's 20-argument-functions.
Less if I didn't do error checking or handle closing gracefully.
>>
File: rapt.webm (203 KB, 704x400) Image search: [Google]
rapt.webm
203 KB, 704x400
>>54390944
>just to get an OpenGL context
Then there is glfw

http://www.glfw.org/
>>
>>54390972
>Initalize SDL
>Oh, hey, I totally wanted all this audio and 2d blitting bullshit you're loading for me.
>Oh shit, it crashed because pulseaudio isn't installed correctly. Even though I don't want sound
Thanks.
I just want a fucking window, OpenGL context and event loop.
>>
>>54390984
Use Qt and stop being a whiny bitch.
Why are you so obsessed by startup time in the first place? Those extra ms startup time are none of your concern.
>>
>>54390305
Types are not memes, tho.
>>
>>54391009
>Wants less bloat
>Qt
Hey, lets use a library that insists we throw out our compiler and build system and use theirs instead!
>>
>>54390266
You should probably use googlemaps or openstreetmap in a webpage.

It's pretty easy, you set the json with the data, and the page draws marker on the map. pannable/zommable according to your settings.

is this an option?
>>
>>54390301
yeah, I was just wondering how to solve case when I do not send a map as pic, but I am "streaming" map to user on fly when he scroll map left/right/up/down.

Google like map, but similar just toy level, I know google use quadtree as structure, but I do not know how is it working so smooth.

I am trying to make something like this just on very simple level, but in my case I am only able to send information about color of all pixels in user view.
>>
>>54390736
lol whiny bitch just use windows or fuck off
>>
>>54390805
fuck off tard get a pc made in this millennium i doubt it takes any significant amount of time to start up
>>
>>54391139
>Run application udner debugger/profiler
Yeah, it fucking does then nigger.
>>
>>54391182
doubt it

don't expect too much from your pentium 2 entitled prick
>>
why's it gotta be so fucking hard to download a video these days

torrents are fucking dead and i found a good stream but it's obfuscated or not getting cached or shit so i can't get it from the firefox disk cache

fuck's sake
>>
>>54391237
>torrents are dead
Explain.
>>
>>54391245
a lot of the public trackers take ages to even "find" the thing, takes many retries if it even works at all, and then a lot of them have horrible/no seeding
>>
>>54391269
>a lot of the public trackers take ages to even "find" the thing, takes many retries if it even works at all,
I never had any problems with torrents from nyaa.
>and then a lot of them have horrible/no seeding
I downloaded GoT S06E02 with 30k seeders.
>>
>>54391303
>nyaa
i don't download jav much but yeah haven't had problems with nyaa
>GoT
i'm talking about relatively obscure stuff not the most popular stuff
>>
>>54391269
I think it's more likely that you're retarded than torrents being dead.
>>
>>54391303
>>54391325
ok i found it on pornolab thanks i guess for reminding me that there are decent torrent sites
>>
>>54391344
yeah nah there are plenty of torrents especially the more popular ones that i don't run into any problems with
>>
>>54390944
>glfw and glew
Doo some Googleing faggot
>>
have any of yous programmed embedded software? would it be difficult to go from programming in C with a terminal in/output to writing embedded software in C?
>>
>>54391390
>GLFW
Hey, I need joystick and multi-monitor-fullscreen support just to put triangles into a buffer.
>GLEW
Hey I need all that multi-coontext GL1-2, EGL, GLX and WGL support just to fucking call glDrawElements().
>>
>>54391435
Depends on the system you are programming. Which is...? But yes programming in C on a PC is usually very different from programming in C on an ES. At least you know the language.
>>
>>54391533
>he doesn't need joystick and mutli-monitor fullscreen support
>he doesn't code GL mutli-context
Plebeian.
>>
>>54391533
kill yourself
>>
>>54391068
Unfortunately not.

For example, I have database with gps points and for each of point I have specific value (number).

I use this database with points to generate my own map/picture.
It looks similar to pic.

Now I am not sure if its possible this way.
User send gps position and server stream data to user and app is generating map on the fly. Lets assume that map on user app will be very small 600x600px. Whats the proper way to send data to user app, user phone is buffering it and load.

Second option.
Generate very big map on the server. Write some algo to cut it into thousands square (quadtree) and send it on the fly when user scroll map.

but I am not sure about communication part. What would be the best? streams?
>>
File: height_map.jpg (2 MB, 2980x2031) Image search: [Google]
height_map.jpg
2 MB, 2980x2031
>>54391876
>>
void ll_destroy(llist* l) {
if (ll_empty(l)) {
free(l);
return;
}
int size = ll_size(l);
node* nodes[size];
node* current = l->fnode;
int i=0;
while(current->next != NULL) {
nodes[i] = current;
i++;
current = current->next;
}
for (int i = 0; i< size; i++) {
free(nodes[i]);
}
//free(nodes);
free(l);
}

Destroying a single linked linked list.
Executing this gives me error, free on invalid pointer.
What's wrong?
>>
HEY WHINY BITCH

https://www.opengl.org/wiki/Load_OpenGL_Functions

SHUT THE HELL UP FUCKING LAZYFUCKTARD
>>
>>54391916
Why are you doing it like that?
Your issue is at
    while(current->next != NULL) {
nodes[i] = current;
i++;
current = current->next;
}

You are checking current.next after having updated the current pointer to current.next.
>>
>>54391993
Thanks, it works now.
How do I destroy a linked list?
I cannot destroy nodes while iterating, because I'd lose the reference the next pointer, so I store them in a temp array and free them one by one.
>>
>>54392064
Stash the next pointer in a local variable, free the current pointer, repeat.
>>
>>54392064
The standard bearer way is
node* prev, curr = l->fnode;
while (curr) {
prev = curr;
curr = curr->next;
free(prev);
}
free(l);
>>
>>54389858
Gentoo girl is a cute!
>>
>Vulkan
Is the vulkan driver in mesa intel-graphics only? Or is it a generic software one?
>>
>>54389945
>QT
You answered yourself
>>
>>54390120
Good thing nobody really cares about your uninformed opinion, NEET.
>>
>>54390736
>>54390984
Just use GLFW, retard. Don't reinvent the wheel.
>>
>>54390120
>doesn't know C++ has exceptions
Does this fag even know C++?
>>
This is mine

https://play.google.com/store/apps/details?id=eu.depa.captionr
>>
Trying to make a mic-input to midi-output in python, but have little experience so far. Hoping to get it working, else I'm gonna go do something smaller.

The plan:

1.) Record audio trough input (Using PyAudio stream)
2.) Make that audio (array of integers) fourier-transformed (Using numpy fft)
3.) Find the highest frequencies (not sure how, as the fourier transform is not coming off the ground yet)
4.) preferably the other frequencies that vary up to 10db also.
5.) Convert that frequency spectrum to a set of tones
6.) Do this many times each second, but not uncontrolled (In an extreme case 100 times/second should cover speeds up to 360bpm with eight' notes?)

I'm currently trying to find out how I can interpred a fft output.
>>
File: coding for -g-.png (427 KB, 499x836) Image search: [Google]
coding for -g-.png
427 KB, 499x836
>>54389858
just finished this
>>
>>54392814
Use the YIN pitch tracking algorithm.
>>
>>54392977
underage b&&?
>>
>>54390120
This guy's videos are too fucking long and he could easily cut each one to under 10 minutes if he would stop rambling and present his argument without any filler.
>>
>>54389858
Working on my final project for my Data Structures classes. Mostly just working on not killing myself though
>>
>>54393046
on youtube it seems that
length of video > strength of argument
>>
File: not an argument.png (12 KB, 761x389) Image search: [Google]
not an argument.png
12 KB, 761x389
>>54393062
are you suggesting long videos might not necessarily be arguments
>>
>>54390120
5min in and he's just rambling
>>
>>54393072
i don't know what you're saying. i was saying that it seems on youtube, the longer your video is the more people will think that you actually have a solid argument.
>>
Working on a project in C++. I've got a question about static arrays.

I have a function that is called quite frequently. In that function, I need to store a bunch of numbers that are used for some calculations.
Right now I'm just using a plain integer array. I wonder if declaring the array every time the function is called could be hurting the speed of my program (computing time is important). How do I make the array stay constant without making it a global variable?
>>
File: not an argument.jpg (237 KB, 598x792) Image search: [Google]
not an argument.jpg
237 KB, 598x792
>>54393094
I don't get it
>>
is there no simulator or something that you can put GLSL code in to see if it will get fucked up by the worst implementations

or like
float foo = // ...
if(bool(foo)) { // ...

is probably dangerous as fuck if foo was calculated regardless of how it was calculated? or...?
>>
File: 1449028030216.jpg (163 KB, 699x882) Image search: [Google]
1449028030216.jpg
163 KB, 699x882
>>54393120
nice post +1 internetz
>>
What's the definitive C++ book? Also hi
>>
>>54393147
thx
>>
>>54393165
>Hi
fuck off we're full
>>
>>54393117
You..make it global?
>>
>>54393195
Is there no other way of doing it? I'm not that great at C++ desu.
>>
File: 4thEnglish.jpg (50 KB, 591x722) Image search: [Google]
4thEnglish.jpg
50 KB, 591x722
>>54393165
>>
>>54393257
Just declare it with static, right in the function. It will only be in scope within the function.
>>
>>54393117
Make it static
>>
>>54393165
>>
>>54393290
>>54393277
Thanks!
>>
>>54390489
hahahahahahah
>>
Is it possible to run another program from your program. Such as run things youd normally do manually from a cmd prompt but get p++ to do it.
>>
>>54393618
Usually you would use Bash
>>
>>54393618
look up the os module in python.
>>
>>54393618
Try searching for shell execute.
>>
I am working on a makefile.

main.exe: $(OBJ_FILES)
g++ $(LD_FLAGS) -o $@ $^

obj/%.o: src/%.cpp
g++ $(CC_FLAGS) -c -o $@ $<


How can I surround this block, which runs on default (calling 'make'), inside a target?
>>
What's the main difference between these two and when should one be used over the another?

typedef struct {
unsigned char field1;
int field2;
} abc;


struct abc {
unsigned char field1;
int field2;
};
>>
>Try to make a bash script to reset my wan IP in my router
>Can't get it to work

Why is making scripts such a meme 99% of the time? you'd be better off just doing it manually desu instead of trying to shave off 5 seconds
>>
Hey friends starting to watch the Lynda fundamentals of programming series. The one thing I'm worried about is math, for programming how strong does your mathematical knowledge have to be? Should I look into taking a course for it?
>>
>>54393821
typenames and struct names are separate namespaces
first example:
abc *ok;

second example:
struct abc *ok;
>>
>>54393821
In the first one you have an unnamed struct definition and struct 'variable'. You can do

abc.field2 = 3435;


The second one declares a struct named abc, but in order to use it you need to create your struct 'variable'. You cannot valorize its fields.
>>
>>54393920
>he doesn't know what typedef is
Please don't try to answer questions beyond your own knowledge.
>>
>>54393821
the first lets you write abc as the type and the second makes you do struct abc. since the namespaces for structs are separate from other types, you should use the second one if abc is going to be used as an identifier elsewhere. technically, the second is usually the better option, but it makes you type more and breaks code if you wanna change the type of that from a struct to a union or use another typedef for it (like if I deprecate abc in favor of xyz, I still want to leave typedef struct xyz abc;). in modern C the first is usually the more popular option
>>
>>54393821
Protip: don't typedef structs.
>>
>>54393954
I actually totally missed the typedef keyword. Oops.
>>
>>54393983
top kek
>>
>>54393275
I got that for my 16th birthday present a few years back.
>>
>>54393984
I thought so, no worries fambly
>>
>>54393983
It's 2016
>>
>>54394024
last week?
>>
>>54394092
Nah I'm 19 now and work in IT running Cable all damn day
>>
File: ooooooooooooh.gif (2 MB, 310x174) Image search: [Google]
ooooooooooooh.gif
2 MB, 310x174
>>54394092
>>
How much fundamentals shoudl one person know before jumping into coding? Some kind anon posted a couple different websites with courses but I'm wondering how much I should try to study before just jumping in and trying to mash out code.
>>
>>54394113
sucks man, should've gone to college
>>
>>54394202
Never start learning to program from websites. After you've been learning for about a year or so (i.e. get comfortable with a language) it's okay to learn from websites, but never at first. The reason is that they never teach you enough, and only teach you to copy what they wrote.
You don't have to study anything before learning to program, though, although a lot of books begin with a "This is how computers work" chapter or something.
My first book was C Primer Plus by Stephen Prata and I heavily recommend it.
>>
>>54394202
if you're doing websites or apps, not much honestly.
just start learning and read up what you need when you do need it.
>>
>>54394202
find a problem online and try to solve it with help from google, that's the easiest way to get started.
going on websites is nice and all but they only show you the tools, not what you can do practically with them
>>
When making profiled builds with gcc, does it make sense to run the application multiple times? Will gcc iterate on the files it outputs, or just overwrite them?

I'm testing as I write this, but the program takes a bit to run through adequately. I can't find much documentation on -fprofile-generate / -fprofile-use.
>>
>>54394324
geez do people actually do this to get started?
>>
>>54394410
yeah basically
>>
>>54394442
what are you able to do now? how much time have you spent learning? it seems pretty bad to not start with an introductory book
>>
>>54394479
who says you can't do both?
>>
>>54394275
I disagree with this. It really depends on if you know what you want to do, how you think, and what you already know. I found learncpp very useful and filled in the rest on my own. Reading through books designed to "teach" was far too slow, compartmentalized, and put bluntly, boring. I can handle forming the framework and mental structures on my own, I just need to the information to do that with. The mental overhead of dealing with an author that has their own ideas about what you need to know and when, isn't really worth it.

I'd recommend books after you already have a functional foundation. whether that foundation is any good or not is irrelevant, because you move through the book more quickly and correct any misconceptions or errors you might have accumulated on your own.
>>
>>54394479
>bad to not start with an introductory book
trying to read a book instead of just sitting down and coding is just going to deter him instead
>>
>>54394479
how much time have you spent learning?
been programing for 10+ years
>what are you able to do now?
magic beyond your comprehension

Think about it like this. When you were a kid, you didnt read pages of color and compositional theory before you picked up fingerpaints and shit out something half decent. Programing is the same. Amautre skill can be learned as needed from Google. If you want to become a professional, you'll need to hit the books. But that's for another time.
>>
when you do like

`uname -a | grep -i linux'

is the text from `uname -a' sent as an argv or does the linux magically make it into a file to be read from?
id like to make my own utilities for shit n giggles but this i do not understand
>>
>>54394638
It pipes it to grep. To my (extremely limited) knowledge, grep receives the input through stdin.
>>
>>54394671
does piping pass a file descriptor to the program or something?
>>
>>54394638
>>54394671
The | operator pipes (redirects) the left program's output to the right program's input via a pipe, which is a linux (unix ? posix ?) structure.

Basically, the 1st program's stdout becomes the 2nd program's stdin
>>
>>54393983
why
>>
>>54394690
No idea.

It might pass a reference to a starting memory location where it's buffering the stream. Maybe the shell handles that.
>>
>>54394638
neither. the standard output of uname -a is sent to the standard input of grep -i linux. No files are created. grep will output lines to stdout sent into its standard input that match your search string. Pipes are an incredibly powerful part of unix.
>>
>>54394713
This.
It's POSIX.
>>
>>54394713
>>54394722
so if i wanted to pipe eg. `uname -a' to my program, i'd have to read from stdin?
>>
>>54394690
yes, a program usually starts with stdin/stdout but piping replaces those with other things (like stdin -> stdout of a different program)
>>
>>54394744
BTW, piping is replacing the file descriptor of the input program B by the file descriptor of the output of program A.

https://en.wikipedia.org/wiki/Dup_(system_call)
>>
>>54394744
yes, all of your utilities will be much more flexible if they read from stdin because it allows them to operate with pipes
>>
>>54394514
>>54394509
>>54394514
>>54394570
Have none of you read introductory books before? They're pretty much just guiding you through the basics to get a good foundation, not a bunch of math and stuff
>>
>>54394810
Yes. That's why I have the opinion I have.
>>
>>54394810
i have not and i need not to, i code for fun, i don't find reading a manual fun.
have you read the manual for your computer before you turned it on?
>>
>>54395016
english grammer for dummies
>>
>>54394720
Theo de ratt sama doesn't like it
>>
finally wrote a vm after hours of being a retard
>>
>>54395016
give up programming and become a spokesperson for down's syndrome
>>
>>54395016
>>54395125
samefag
>>
>>54395142
i'll let you believe that
>>
>>54395153
didnt ask for permission
>>
>>54395225
https://www.youtube.com/watch?v=CXpuRIZzJog
>>
>>54395142
they have different IP addresses anon

why would anyone go to so much trouble to samefag?
>>
>>54390489
Someone has to turn this picture into the CS graduate meme, please.
>>
>>54389858
/g/, I'm wondering if you can help me out a sec.
This is beyond my level of code as I'm new, but I want to create something (for GreaseMonkey) that will automatically close a certain type of website.

For example, say I'm buying shit on Amazon. I want it to automatically close when it's something like:

https://www.amazon.co.uk/gp/digital/fiona/thank-you [and everything that follows in the URL from that]
https://www.amazon.co.uk/gp/digital/fiona/clarification/purchased [and everything that follows in the URL from that]

What should I be looking at doing, or is there something like this already?

I seem to be spending a lot of time closing tabs for things after they've finished, but I can't just right click and 'close all', because not everything has finished.

Help?
>>
>>54395308
>>>/wdg/
>>
>>54395308
JEW
>>
>>54390476
How do you figure that?
There's only a handful of companies that have been hiring for Clojure positions and those are usually in the lines of "need JVM programmer, experience with Scala and/or Clojure preferred"
>>
>>54395332
I was split between here and there. Guess I'll ask them.
>>
>>54395332
>>>/g/wdg
>>
>>54395390
Fug, I'm retarded.
>>
>>54395412
indeed you are
>>
>>54395308
Don't listen to the anons telling you to go to /wdg/ anon, this is a perfectly good place to ask a question like that but all they want to do is shitpost about programming langauges.

Look into example userscripts and how they trigger on certain pages, and the
window.close
function.
>>
>>54395542
>>>scripts
>>
>>54395308
anon if you need to write a program to automate your shopping you may be purchasing too many things.
>>
File: 1435513340508.gif (381 KB, 260x317) Image search: [Google]
1435513340508.gif
381 KB, 260x317
>>54395604
>>
>>54395542
Thanks, anon. I had a look but apparently most won't let you without changing it.

I've never used greasemonkey or anything but I'm guessing a sort of if statement with on.click plus a timeout might work?

>>54395604
I tend to get a lot of free Kindle ebooks and stuff. When they're on special offer, especially. I rarely spend money.
>>
File: CONDUCTOR.gif (301 KB, 136x240) Image search: [Google]
CONDUCTOR.gif
301 KB, 136x240
>>54395604
>there's a girl in /dpt/
>>
File: 1449083028174.jpg (998 KB, 1100x1249) Image search: [Google]
1449083028174.jpg
998 KB, 1100x1249
>>54395668
we're all girls anon-chan
>>
>>54395692
>tfw maki will never peel your carrot ;_;
>>
>>54394860
>I'll continue to talk about something I don't know about specifically because I don't know about it
nice
>>
>>54395066
same
>>
>>54395735
>be an asshole to everybody
>>
File: aqueilah01.jpg (94 KB, 600x600) Image search: [Google]
aqueilah01.jpg
94 KB, 600x600
>>54395731
that doesn't sound right
>>
>>54395604

I once remember reading about a dude that made a bot to buy a random $1 item from eBay every day. Wanted to see what kinds of interesting shit he'd get. There are legit reasons to automate shopping.
>>
>>54395781
Go away tripfag.
REEEEEEEEEEee
>>
>>54395781
i don't think copying an idea from xkcd is a legitimate reason
>>
>>54395796

It is a legitimate reason.
>>
>>54395807
It's as legitimate as your reason for wearing a trip, ruby.
>>
File: lol funny.jpg (61 KB, 667x645) Image search: [Google]
lol funny.jpg
61 KB, 667x645
>>54395807
>>
File: are you nervous anon.jpg (16 KB, 292x218) Image search: [Google]
are you nervous anon.jpg
16 KB, 292x218
When are you ready to apply for a programming job?

I don't have a CS degree, but I've worked with python a lot for the past year in my job (mainly running/debugging/writing scripts), have great SQL, and am learning java quickly.

I'm learning as much python and java as possible in my spare time, but I'm kind of clueless as to when I should try and apply for something. I was thinking of going for the Java Associate certification and then trying, but I'd like to hear /dpt/'s advice on this
>>
File: HA (3).jpg (12 KB, 241x230) Image search: [Google]
HA (3).jpg
12 KB, 241x230
>>54395861
that was funnier than it should have been
>>
>>54395883
>I don't have a CS degree
>don't have degree
show them the projects you've made, you need to prove to them that you know what you're doing
>>
Where do you guys find other people (in real life) who are actually interested in computer science? Not just programming (and, if just interested in programming, not just in meme languages), but also other cool more theoretical things. Uni can't be it, it's full of plebs.
>>
>>54395823

I actually don't have a legitimate reason to use a trip. I started using it on /vp/ for some reason I can hardly remember, but kept it on our of laziness. Then when people started getting pissed off about it, I kept using it to spite them.

>>54395791

Anon, you have two options:

1. Filter me
2. Deal with it

The third option, complaining about me, is only going to get me to keep posting with a trip. You are the cause of my continued tripcode usage. So not only will you not get what you want, but you will be wasting time that could be spent programming.
>>
>>54395937
>
HE CAN'T BE SERIOUS!
>>
>>54395937
this is real life
sadly
>>
>>54395937
Good universities.
>>
>>54395937
Yeah, you're basically a unicorn.
People in my CS program look at me funny when they find out I write code for fun in my spare time.
>>
>>54395946
this is the best part of having a trip code
>>
>>54394401
Drawing attention to this.
>>
>>54395984
Most people are half-minded degenerates.
>>
>>54396028
>>54395946
everyone has you filtered, dumbshits
i really ought to enable filtering replies to tripshits
>>
>>54395937
job
>>
>>54396090

Everyone except the ones who are currently complaining, including you.
>>
>>54396090
you ought to enable filtering tripcodes in the first place
although after that you'd run out of a reason to even come to these threads
>>
>>54396090
shhhh, let them keep their trips, it's easier to hide them that way
>>
I don't filter trips because they're the only people I can trust to not be newfags

/dpt/ has been ruined so much by mass immigration that the trip fags and the trap posters are the least cancerous part
>>
>>54396116
Why use a trip?
>>
>>54396228
because he needs status on a site absent of it
>>
>>54396228
i started using one because i was shitposting a ton and wanted to force myself to contribute good posts a bit more (i.e. if i didnt people would just filter me)
also it's nice for me to be able to keep track of people's projects when they talk about them so i figured i'd let other people keep track of mine
>>
>>54396283
you're still shitposting, you're always shitposting, filtered.
>>
File: harp.jpg (49 KB, 934x525) Image search: [Google]
harp.jpg
49 KB, 934x525
>>54396283
>>>>>>'"'honourable trips'"'
frob
>>
>>54396207
Every tripfag has objectively shit opinions though
>>
>>54396346
Yes, but the majority of /dpt/ these days is people with shit opinions. At least I've known Ruby and GTP for a while
>>
>>54396361
if you want people to have special snowflake names and you want to suck their cocks, go on reddit or facebook
>>
>>54396361
>Opinions i don't agree with
>They must objectively be shit
>>
>>54396387
mplying they're not objectively shit
>>
>>54396373
I'll take tripfags over the ACTUAL reddit and facebook fags /dpt/ (and 4chan in general) is polluted with
>>
>>54396410
then fuck off, you clearly don't belong here
>>
>>54396432
Fuck off. Tripfags are not as cancerous as the newfags we've got.
>>
>>54396410
This. Pretty much why I started using a trip lately. The trips are generally consistently reasonably smart here. Much more so than the average anon who are heavily diluted with newfags, shitposters and pajeets. Even better, many will claim they filter you, which means you have to deal with them less.
>>
File: 62050764.png (361 KB, 858x725) Image search: [Google]
62050764.png
361 KB, 858x725
Help /dpt/ I'm getting pull requests from third worlders, how do I make it stop?
>>
Should I waste $2000 on a good computer /g/?
>>
>>54396495
Stop usng shithub I guess
>>
>>54396444
lurk more
>>
File: x260.jpg (209 KB, 1920x1080) Image search: [Google]
x260.jpg
209 KB, 1920x1080
>>54396511
Just bought an x260, couldn't be happier
>>
File: 1372709400193.jpg (90 KB, 500x667) Image search: [Google]
1372709400193.jpg
90 KB, 500x667
>need to have shit on github to show employers
>can't think of anything good to make

Fuck, this is hard
>>
>>54396525
Github is cancer, I get issues from pajeets who want me to write their code for them
>>
>>54396495
If you want to accept their garbage, check for hidden malicious code at least, maybe try to clean it up. Otherwise there's nothing you can do but reject the pull request, preferably with an excuse. Maybe just tell them why their code is shit?

>>54396531
>thinks someone identifying themselves is worse than someone actively spreading misinformation

>>54396542
Hm, well that looks like a decent laptop, but I'm going be building a computer for VR.
>>
File: a10 sconvolto lol.png (125 KB, 280x325) Image search: [Google]
a10 sconvolto lol.png
125 KB, 280x325
>>54389858

Learning Java, I've been stuck at page 10 for the last 5 years.
But I'm good at vidya.
>>
>>54396475
>The trips are generally consistently reasonably smart here
You happen to be the exception though...
>>
>>54396621
Nah, I'm pretty great most of the time.
>>
>>54396475
>Even better, many will claim they filter you, which means you have to deal with them less.
That's actually pretty neat... Maybe I'll start tripcode exploring

>>54396621
What dumb stuff has he done? I don't pay attention to the names in /dpt/
>>
So Craig Wright was Satoshi and reddit bullied him until he couldn't take it anymore, shame
>>
>>54396641
>What dumb stuff has he done?
he's a pretentious prick most of the time and an asshole the rest of the time
>>
Why does functional programming trigger /g/?
>>
>>54396641
>What dumb stuff has he done?
Well I've never actually seen him do anything. He just shitposts. It's usually more inane than the average anon.
>>
>>54396672
because it's SHIT and its users are smug dunning kruger neckbeard fags
>>
>>54396660
>>54396694
I've met multiple smart assholes. Well, call him an asshole if he's an asshole, but that doesn't make him dumb.

>>54396672
Cause they look at a Haskell program and it looks so different from what they know that they conclude "Why would anyone use this?" without knowing anything about it
>>
>>54396708
Put your trips back on so i can filter you
>>
>>54396708
>but that doesn't make him dumb
I never said you were dumb; inane, definitely. I've never seen you do anything but shitpost so I can't tell how smart you are.
>>
mandatory tripcodes when?
>>
File: wyatt privilege.png (588 KB, 656x492) Image search: [Google]
wyatt privilege.png
588 KB, 656x492
>>54396672
People on /g/ are fearful reactionaries who cling to their C because they are afraid of and too stupid to realize FP is the future.
>>
>>54396727
I don't use trips. Been considering it though

>>54396738
Oh, I see what you're getting at. I'm not samefagging that guy.
Thread replies: 255
Thread images: 45

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.