[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: 28
File: Visual-Studio.jpg (197 KB, 1576x1182) Image search: [Google]
Visual-Studio.jpg
197 KB, 1576x1182
Visual Studio Edition

Previous thread: >>54102269

What are you working on, /g/?
>>
Delete this shit, micro$hill
>>
second for pure functional programming
>>
>>54109606
Thanks rajesh. 5 bing points for you today
>>
>>54109633
Suck my balls faggot. This is a perfectly good dpt.
>>
File: Untitled.png (2 MB, 1680x1010) Image search: [Google]
Untitled.png
2 MB, 1680x1010
trying to stay motivated with browser #113. getting burnt out after a month of working on it though.
>>
>>54109633
Why do you hate open source projects anon?
>>
>>54109648
R E K T
>>
File: 1461028328396.jpg (44 KB, 640x480) Image search: [Google]
1461028328396.jpg
44 KB, 640x480
>>54109633
Settle down poojeet
>>
>>54109690
Shut it down
>>
#include <stdio.h>

int main(){

int c = 5, d;
d = ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c + ++c;

printf("%d\n", d);

return 0;

}


How much is d?
>>
>>54109690
Isn't microsofts CEO Indian? Or is that Google
>>
What does an AST for a struct declaration look like?
>>
>>54109722
BEST SOFTWARE MINDS
>>
>>54109718
As I said in the last thread: the result is completely meaningless, as the program contains undefined behaviour.
>>
>>54109718
stop posting this shit around random threads
this is not fun nor challenging or w/e you think it is
>>
>>54109722
Both are Indian.
>>
>>54109743
Why?
>>
>>54109755
Because white men can't even compete.
>>
I came up with a brilliant idea /dpt/ should have code jams every month with different themes!
>>
>>54109769
Okay this months theme is shit posting bots
>>
>>54109763
We've been trained to use the toilet ever since we were young. It just feels weird to do it on the street.
>>
>>54109784
Cream rises to the top
>>
I heard C is better than Java
>>
>>54109792
You're trying to start shit.
>>
>>54109798
>Posting facts is "starting shit"
>>
VS is kind of nice, but it allows for cunts who only got their jobs with a bottle of hair bleach and some high heels to 'program'.

That being said I prefer C# over Java's security & library nightmares. I'm a F# fan too. VB is garbage tho... ymmv
>>
>>54109809
Oh look a sexist Linux user. What a surprise /s.

>>54109807

Java and C are totally different, so saying one is better than the other is dumb.
>>
>>54109809
Microsoft's developer tools and libraries are cancer, aren't compliant to the ECMA standards and aren't portable outside Windows. Avoid!
>>
>>54109830
>How can sexism be real if gender is a social construct

wincucks 0
templeOS 1
>>
>>54109848
>Microsoft's developer tools and libraries are cancer
in what way exactly?

>aren't compliant to the ECMA standards and aren't portable outside Windows
Both of those things are 100% untrue. Unless your talking about C++ specific stuff.
>>
>>54109606
https://www.youtube.com/watch?v=1i4-e1okZtw
c++ fags btfo!
>>
>>54109981
Someone reads /r/programmingcirclejerk.
>>
>>54109792
It is for low level stuff like systems programming, that's what C is meant for...C and Java are really in different categories, it's like comparing a helicopter to a freight train. Now C++ which is a different language than C is in the same category as Java, while still supporting the low-level C stuff. It's debatable whether Java or C++ is better for OOP.
>>
>>54109886
>>How can sexism be real if gender is a social construct
That's like asking how you can be poor if money is a social construct, or how you can be arrested if the law is a social construct. Social construct really just means it's not something inherent and objective in behavior, but instead something that arises through human interaction. It doesn't mean that those human interactions won't affect you.
>>
r8
enum choice { scissors, paper, rock }
string[] outcome = [
"draw", "computer wins",
"player wins", "computer wins"
];

for (;;)
{
write("player move: ");
choice p = readln()[0..$-1].to!choice;
choice c = uniform(0, 3).to!choice;
writeln("computer move: ", c);

writeln(outcome[p^c+(c>p)], "\n");
}
>>
>>54110046
No one said anything sexist in this thread though. It's well established you'll get a programming job easier if you are female than male.
>>
>>54109655
Pretty sure I used this in the past for porn, hats off.

nice dubs btw
>>
>>54109886
Gender isn't a social construct, men and women have physically different brain structures.
>>
>>54110067
pointless shit that /g/ loves wasting time on/10
>>
>>54110078
They have physically different genitals as well :^) But "social construct" refers how we use that as the basis for dividing society into sub-groups, instead of based on say left/right handedness or hair color.
>>
>>54110078
No they don't. Stop shit posting. That was proven to be untrue.
>>
>>54110138
When?
>>
File: 1460721185927.png (232 KB, 1366x768) Image search: [Google]
1460721185927.png
232 KB, 1366x768
>>54110138
>>
>>54110078
You're arguing about sex, not gender.
>>
How difficult would it be to write a program in C if I only know C++?
>>
>>54110196
Very difficult, it's like a whole new language.
>>
>>54110196
Not difficult.
>>
>>54110196
Depends on what the program involves. C and C++ syntax are basically identical, main differences are that C doesn't have classes
(but does have structs, which are like public-access classes without member functions) and that you have to use a different library for things like input/output.
>>
>>54110236
>C and C++ syntax are basically identical
It's not 1998 anymore.
>>
>>54110229
*very difficult to write safely
>>
>>54110236
You can make pretend member functions using function pointers or a pointer to a vtable.
>>
>>54110229
>>54110232
I'm getting mixed signals.
>>54110236
I'm not doing planning anything in particular, just trying to expand my knowledge. Anything in particular that might trip me up?
>>
>>54110176
That's 1440p
>>
>>54110298
C uses old style pointers.
>>
File: 1432860473789.png (40 KB, 335x342) Image search: [Google]
1432860473789.png
40 KB, 335x342
>>54110315
>old style pointers
>old style
>>
>>54110266
>a pointer to a vtable
please bjarne you're making me feel physically ill
>>
File: hemi3.png (174 KB, 1600x900) Image search: [Google]
hemi3.png
174 KB, 1600x900
Accurate projected solid angles using hemispherical projection.
>>
>>54110321
Do you prefer the name dumb pointers?
>>
I know it was six years ago but can someone explain to me the Oracle purchase of Sun? Sun owned Java and MySQL, both of which are open source and I have used a bit of, but have never paid a dime to anybody. Is Oracle just a massive server/database administrator for businesses?

I don't get it.
>>
>>54110336
What did you program to make this work?
>>
>>54110339
rawdawg pointers is the proper term.
>>
>>54110339
"pointers"
>>
>raw unsafe puppy strangling pointers
please, lads, you'll frighten the webdevs
>>
I've been working on a cheat for a really shiity call of duty/minecraft autism game created in unity. Litterly so much is clientsided it hurts
>>
>>54110384
Nothing wrong with forcing work on the client so long as it doesn't hit performance. Just make sure to validate everything!
>>
>>54110384
I think you're misusing the term litterly
>>
File: f.png (55 KB, 718x340) Image search: [Google]
f.png
55 KB, 718x340
>>54110353
Part of my Geometric Optics module in my larger Fortran machine, with gnuplot for simple previews.
>>
>>54110022
Didn't think
>>54109792
would get a sensible answer
>>
>>54110186
They're the same thing.
>>
VISUAL POO IN THE STUDIO LOO
>>
this place is deeeeeead
>>
>>54110942
Maybe you shouldn't have used a visual studio logo anon.
>>
File: TLPI-front-cover.png (183 KB, 454x600) Image search: [Google]
TLPI-front-cover.png
183 KB, 454x600
Continuing to read this
>>
>>54109606
>VS
Top most kek, /dpt/

Write a GUI program in basic and kill yourselves
>>
>>54111014
Funny you bring that up, my copy should arrive tomorrow afternoon.
>>
File: 234234243.jpg (60 KB, 590x400) Image search: [Google]
234234243.jpg
60 KB, 590x400
>when your 'simple script' ends up taking 12 hours to write with tons of unforseen features becoming necessary
the snake has me in its breathless embrace
>>
>>54111333
http://gen.lib.rus.ec/search.php?req=the+linux+programming+interface

Mine just arrived
>>
Rate my rock paper scissors!
enum win_condition determine_winner(enum move p1, enum move p2)
{
if (p1 == p2)
return DRAW;
switch (p1)
{
case ROCK: return (p2 == PAPER) ? PLAYER_2 : PLAYER_1; break;
case SCISSORS: return (p2 == ROCK) ? PLAYER_2 : PLAYER_1; break;
case PAPER: return (p2 == SCISSORS) ? PLAYER_2 : PLAYER_1; break;
}
}
>>
>>54111365
I'm not a pirate though :^)

More seriously, it's a huge pain reading programming books digitally. I like to make notes in the margin and quickly flip from section to section. I'll gladly pay for a physical copy.
>>
>>54109606
Newbie to python here, working on a Rainfall calculator using an array as an assignment.
>>
>>54111357
currently going through this hell for my algorithms class, and hopefully i will never have to touch the language ever again
>>
>>54111373
what if one of them is NULL?
>>
>>54111402
why would they be null?
>>
>>54111373
not enough bit diddling 0/10
>>
>>54111373
It's like you WANT slow code.
>>
>>54111406
God works in mysterious ways
>>
>>54111333
>>54111381
Oh, nice
I love physical copies too, but I also like having money in my wallet
Maybe at a future date
>>
>>54111381
I'm not gay, but $100 is $100. Personally, my morals on pirating breaks down around $20 or so.

My thinking was that I could spend the same amount of money for my semester's books on a tablet, then just browse the PDFs and do my notes on there.
>>
>>54110067

why not just have a random number select the array position?
>>
>>54111400
>hopefully i will never have to touch the language again
doubtful. it's too useful for web parsing tasks and communicates with databases easy for quick little queries and data analysis.

going back to C++ after a two day python bender is almost vertigo inducing
>>
>>54110424
dang that actually looks kind of okay. maybe i should learn Fortran
>>
If I want to write a desktop application launcher, do I have to learn X, or is there some higher level library I can use?
>>
>>54111461
wouldn't be legit, friendo
plus I still wanted to show the computer's move
>>
>>54111478
What do you mean by "desktop application launcher"?
>>
>>54111500
Anything from dmenu to Cairo dock
>>
>>54111478
>>54111517
You'll probably want to use xcb or Xlib. I don't know if high level GUI libraries like GTK would be very helpful.
>>
>>54111532
That's what I thought. They just seem so complicated and low level, but I guess it's all I have. Thanks.
>>
Does anyone know how to make a pause for a few nanoseconds in Java.

thread.sleep() goes down to only 1 ms.
>>
>>54111587
What are you writing that requires nanosecond granularity?
>>
>>54111587
Wow, good look pausing at nanosecond granularity in Java.
Of course, it may actually be possible for all I know
>>
>>54111587
for (int i = 0; i < 100; i++) {}
>>
I have a program which opens a stream of data from a CAN controller and reads the messages as they come in. These messages come quite quickly (~250 CAN frames per second), but, because of various reasons, like the controller going offline, the messages could just stop, with no real notification to the application that it's stopping the stream, the messages just halt. I'm trying to figure out a thread which, in a loop, checks periodically for whether there hasn't been any messages in the last 2 seconds, so I can notify the application that it needs to re-open the stream. I thought of setting an event every time a message comes in, but isn't this expensive? Performance is my concern since these messages take a decent amount of cycles to parse through, so I can't have the parsing thread taking more CPU time than it needs to.
>>
Anyone ever used learnvisualstudio.net? It looks good and I like his free stuff but I don't know if it's worth $100 and I can't find a torrent of the latest stuff.
>>
>>54111633
definitely not worth
>>
>>54111587
Thread.Sleep is inaccurate, and desu, thinking of using it is sometimes a sign you're tackling the problem the wrong way. Not saying there isn't valid use cases for Thread.Sleep, but I consider it as a last resort only, personally.

But to answer your question, there is no way you will be able to sleep for a couple nanoseconds.
>>
>>54111468
why use python over something else in that situation (i.e. Ruby, Perl, etc.) that facilitates more abstractions for a short script?
>>
>>54111653
>there is no way you will be able to sleep for a couple nanoseconds
There is busy-waiting, like >>54111602 recommended, but yeah, it's still inaccurate as fuck and you've got to make sure it doesn't get optimised out.
>>
>>54111640

Why is that?
>>
>>54111626
If you wanted to minimize overhead as much as possible, maybe you could do something like:
Whenever a message arrives, set bool messageReceivedRecently to true.
Then have a thread that just does something like
if(!messageReceivedRecently) NotifyMainThread();
messageReceivedRecently=false;
Sleep(2000);
>>
Decided that I'm going to learn multithreading. This is neat stuff, never thought about it before.
>>
>>54111402

The arguments are not pointers. They cannot be null.

>>54111373

You do not need to insert break statements immediately following return statements.
>>
>>54111761
It's cool until you get into making parallel algorithms because you realize you can't
>>
>>54111694
Ha, I was just thinking about this solution.

To make things completely correct though, I should protect the bool with a critical section though, right? I am running on c++03 so I don't have std::atomic.
>>
https://www.youtube.com/watch?v=4qXNyt8Lvsw
Post what you're programming to
>>
>>54111786
https://www.youtube.com/watch?v=3czQT52d16s
>>
>>54111786
https://www.youtube.com/watch?v=Jv1ZN8c4_Gs
>>
File: chaika2.jpg (71 KB, 487x460) Image search: [Google]
chaika2.jpg
71 KB, 487x460
>>54111786
>>
>>54111823
Repulsive.
>>
>>54111838
I bet you listen to weebshit
>>
>>54111786
https://www.youtube.com/watch?v=3M9RFtziALc

>>54111847
Where do you think you are, mate?
>>
>>54111847
No. I just don't consider grown men screaming to be music.

https://www.youtube.com/watch?v=LCz8hUMOIxk
>>
>>54111786
https://www.youtube.com/watch?v=sxzFSjxSTcU
>>
>>54111867
If metal was just grown men screaming then your point would make sense
>>
>>54111870
The worst part of that "song" is that there were some good instrumentals; they were just completely ruined by the pointless screaming.
>>
>>54111786
https://www.youtube.com/watch?v=PFrVJANcmIU
>>
>>54111786
https://www.youtube.com/watch?v=4qlCC1GOwFw
>>
File: 1457452847-20160308.png (331 KB, 684x1259) Image search: [Google]
1457452847-20160308.png
331 KB, 684x1259
>>54111786
https://www.youtube.com/watch?v=SmW17QvUhRM
>>
>>54111916
Any redeeming features metal might have are literally and figuratively drowned out by the screaming.
>>
File: 1341857037472.jpg (58 KB, 500x339) Image search: [Google]
1341857037472.jpg
58 KB, 500x339
>>54111959

>he thinks all metal has vocals
>>
>>54111924
I love the instrumentals, atmosphere, mood, etc. The vocals add to the experience. Whatever if you don't think so
>>
>>54111959
>\forall m \in metal \exists screaming
wut
>>
>>54111786
So much for /dpt/, thanks a lot asshole.
>>
>>54111986
>people posting music prevents people from discussing programming
huh
>>
>>54111986
I regret absolutely nothing
Plus I was grooving so hard to the song I had to post it
>>
>>54111981
>>54111967
I am obviously commenting on the examples posted in this thread. Apologies if my reference to metal was *slightly* too general, you useless pedant.
>>
>>54111959
>do you even instrumental
https://www.youtube.com/watch?v=hQBaWXdGbqE
>>
>>54112036
I ride a bicycle, thank you very much
>>
>>54112036

>Any redeeming features metal might have are literally and figuratively drowned out by the screaming.

ok
>>
>>54112021
Have you noticed how the discussion has shifted exclusively to music?

>>>/out/
>>
File: cute boy awoo.jpg (151 KB, 645x989) Image search: [Google]
cute boy awoo.jpg
151 KB, 645x989
>>54111786
https://www.youtube.com/watch?v=2xOGhxAWGhE
>>
>>54112068
There wasn't exactly a vibrant programming discussion that was interrupted.
>>
>>54112068
It's programmers talking about music, not /mu/fags. That's the difference
>>
>>54112068
Now it's shifting to how the thread is about music. Good work you're doing to fix it lad
>>
>>54111959
>screaming
as opposed to the complete shit vocals everywhere else in music? auto-tune, wailing, whining, slurred ebonics.

metal took the torch from classical music. it's the only area in music right now where real development is taking place.

if you want to stop being a pleb check out baroness, yellow and green album is my favorite.
>>
File: 5235.png (68 KB, 600x411) Image search: [Google]
5235.png
68 KB, 600x411
>>54112105
>metal took the torch from classical music. it's the only area in music right now where real development is taking place.
>>
>>54112105
>metal took the torch from classical music.
No. Music died March 28 1943. Nothing of value has been made since.
>>
File: 1402886827853.jpg (55 KB, 900x810) Image search: [Google]
1402886827853.jpg
55 KB, 900x810
>>54112105
>This whole post
>>
>>54111778
bump

does boost or some other library provide a quick-and-dirty implementation of std::atomic? Eventually I will be able to move to c++11 at least, but in the meantime, I really don't care to add a critical section to my class for every bool that gets used in a multi-threaded context.
>>
>>54112129
Why so specific?
>>
>>54112105
>as opposed to the complete shit vocals everywhere else in music? auto-tune, wailing, whining, slurred ebonics.
It's amusing that you justify metal's vocals by comparing it to pop and rap.

But I think you're mostly right. Music is shit nowadays, and maybe metal is the best of a bad bunch. I don't listen to contemporary stuff, so I wouldn't know.
>>
>>54112126
>>54112129
>>54112135
wallow in your ignorance faggots, see if I care.
>>
>>54112149
https://en.wikipedia.org/wiki/Sergei_Rachmaninoff

The last of the Romantic composers.
>>
>>54111786
https://www.youtube.com/watch?v=kXYiU_JCYtU
>>
>>54111587
Use a sentinel and loop on system nanotime.

There is a version of sleep() that takes both millis and nanos, simply put 0 for millis.

You may not get what you want due to your platform's scheduler.
>>
>>54112166
I wanted to stay away from that comparison but for real I'm an autistic fuck and consider the "screaming" to be part of the instruments. I don't even pay attention to the words. Pop/Indie music is what's really disgusting here.
>>
>>54111786
https://www.youtube.com/watch?v=PZwQeZh6rP0
>>
>>54111786
https://www.youtube.com/watch?v=sZWLlU0d5eM
>>
>>54112192
Why the fuck are you talking about programming? This is a music thread, take your nerd shit elsewhere.

>>>/out/
>>
>>54112166
There's still good stuff coming out if you dig deep enough
This is a great album that came out in 2014
https://www.youtube.com/watch?v=HNXNMx-InXc
>>54112200
Good taste, what did you think of their latest album? I can't get enough of Piss Crowns Are Trebled after seeing them perform it live in February
>>
Any of you guys familiar with GTK2? Essentially I'm creating a picture which has 3 buttons below it. The way I'm going about this is by creating a horizontal box for the picture, and another which contains the buttons, then adding both of those to a vertical box.

My issue is that each horizontal box is taking up the same amount of space, so the button are taking up 1/3rd of the screen, and hiding the picture. Any ideas on how to make the lower portion of the vertical box take up significantly less space?
>>
>>54112182
https://www.youtube.com/watch?v=ifKKlhYF53w
>>
>>54112231
>GTK2
Deprecation upon deprecations

lel
>>
>>54112166
What do you think about Allan Holdsworth? This guy is a genius at composition https://www.youtube.com/watch?v=j9xOomYyLI8
>>
>>54112236
I can actually play that piece (poorly). It's not that bad. Those are octaves he's playing at the end.
>>
>>54111786
aye https://www.youtube.com/watch?v=RI04xPkeCm0
>>
>>54111786
this or die https://www.youtube.com/watch?v=ssWmIL3AZsU
>>
>>54110067
needs a learning algorithm
>>
File: 1460893664193.jpg (56 KB, 720x720) Image search: [Google]
1460893664193.jpg
56 KB, 720x720
Someone help me pick a good GUI library. All the typical options seem so shitty I'm considering using Win32 even though I'm on Loonix.
>>
>>54112549
There isn't one. Use another language, QT, or give up.
>>
>>54112566
checked

Qt is out of the question because of the license. I need a normie-compatible GUI interface because I'm trying to sell my program which I already made as a CLI tool.

For me it's either:
>use Win32 and WINE libraries
>GTK2
>embed a web server so I can use Javascript/HTML for the GUI

Win32 has the advantage of looking good and working without too many warts. GTK2 at least theoretically will work on Windows and OS X, but look like shit. The web app would be easy to make and work everywhere but have a shittier user experience.
>>
>>54112608
>Qt is out of the question because of the license
what's the license?
>>
>>54112621
Dual licensed so that if you release a program using Qt as closed source, you cannot statically link the library.

Also I dislike the whole ecosystem and the fact that I'm forced into their shitty QMake build system as well as all their own data structures. It's all the shittiness of Win32 without any of the benefits (native look).
>>
/dpt/ what's a good site to look for programming jobs? I've exhausted indeed.com, and worse I've exhausted it with an outdated resume
>>
>>54112657
Freelance in Topcoder if you think you're so good

Then reapply
>>
>>54112608
You can do it, it's just gonna suck
>>
>>54112739
So how does this work?
Companies dump programming challenges and pay only the guy who wrote the best solution?
>>
>>54112608
>>54112769
Best option imo

http://stackoverflow.com/questions/7842695/a-java-gui-for-a-c-application-is-this-a-good-design
>>
>>54112739
If I thought I was good I wouldn't have exhausted indeed before I found a job
>>
Has anyone used React Native? My boss is considering using it since we have an iOS and Android app, but just glancing over the site it looks like it'll be a pain in the ass on Android especially for someone with hardly any javascript experience.
>>
>>54112862
It actually doesn't look too bad. Javascipt is an easy language to learn don't sweat it. Better than using Java.
>>
>>54112608
>embed a web server so I can use Javascript/HTML for the GUI
You know that's not a bad solution, i did this before and it work surprisingly well.
>>
Do you guys procrastinate?
>>
>>54112652
>you cannot statically link the library
And what, your religious beliefs prevent you from linking dynamically?
> It's all the shittiness of Win32
No. Nothing among GUI frameworks is even close to win32 shittiness
>>
>>54113158
only niggers do
>>
Do you guys get a good amount of sleep?
>>
>>54113220
I'm NEET so yea. Though I'm nocturnal.
>>
Any other polyglots here?

My current flavour of the month is Rust, but it looks like a long term one
>>
>>54113158
What do you think i'm doing right now?
>>
>tfw watching SEL for the first time, C in episode 1
nice

>>54113220
Kinda. I alternate waking up at 8am and 11:30am, usually get about 5-7 hours of sleep on 8am nights, 8-9 hours on 11:30am nights.
I hate it. I have to wake up in less than 5 hours.
>>
>>54113291
>NEET
>getting sleep
why do people like to lie on the internet?

Im thinking of getting better sleep and improving myself, working and studying harder. I hope it pulls through
>>
>>54113158
Yep. On assignments only somewhat, usually get them done slightly ahead of time. On studying for tests, yes. On sleeping, yes.
>>
>>54111786
https://www.youtube.com/watch?v=t9CXmEUwvgM
>>
>>54113309
Is anyone not? I know there are some sad sacks of shit that are "<LANGUAGE> developers" but I don't see or interact with them. I assume if you have the level of literacy necessary to shitpost on /g/ you know at least a half dozen languages and are able to use them more or less interchangeably.
>>
>>54113309
Learning to fizzbuzz (read: do basic things, perhaps far more than fizzbuzz, but still nothing substantial) in many languages is quite a waste of time. I honestly find it best to know one fast-to-run language, and one fast-to-write language, maybe a couple more. C, Python is a good pair, although I'm not too keen on Python but it works. I spent maybe two weeks on Haskell, maybe I'll return to it when I have nothing to worry about. Getting familiar with Java at the moment, its ez.
>>
>>54113365
Of course, the more underground lisp dialects you know, the leeter you are.
>>
File: Punch-Drunk Love.webm (3 MB, 1916x814) Image search: [Google]
Punch-Drunk Love.webm
3 MB, 1916x814
How do I make something like this using OpenGL?
>>
>>54111470
I'm not him but I do a fair bit of Fortran programming. Modern Fortran isn't so bad, its the shitty old FORTRAN 77 that's everywhere that fucking sucks dick.
>>
>>54113435
Apply a blur/blend shader over a bunch of colored vertical bars that change colors randomly
>>
can I make python check if a page is working or not?
lets say an invalid imgur link and valid imgur link
>>
Can I control the hardware cursor in graphics mode through VGA?
Or will I need a card specific driver?
>>
>>54109633
>freetard is mad that his shitty mememacs can't compete.
>>
so i got this task to create an application with a video stream which you can connect to another PC and use that computers webcam and make as a live stream. The other PC is linux based rasberry pi with a logitech webcam connected through USB (that pc will be on a separate network). I tried converting a webcam into an IP Camera and make a live stream but it only works when both pcs are in the same network. Any ideas? I heard that you can make this with UDP packets, but i have no idea where to start with this.

- Pls no bully.
>>
>>54114094
Have you ever used mememacs?
>>
>>54114095
I am using c#, help senpai
>>
>>54113769
There's some tools people have made to check for dead links. They just go through a list of words and if a page has a certain amount of them it tells you.
>>
>>54114045
in DOS?
>>
>>54114095
If it works on the same network, but not on others then it is likely being blocked by a firewall.

Try and setup port forwarding on the router that is nearest to camera device.
>>
>>54114161
What? no.
I want to write a kernel, and I just want to know whether I can use the hardware cursor through VGA or I'll have to use a software cursor.
>>
>>54114192
the firewall is disabled on both pcs and i can't access the router. Because muh companys router. The raspberry pi has an usb modem which i cant have access as well... wat do famalam?
>>
>>54114257
Can you test this in a non-production environment? Probably would be best attempting this outside of a production network so you can verify the issue. What port(s) are you using? Company have a dmz or something you can put the camera device on? Only other option would be tunneling and they might flip their shit on that one.
>>
>>54114195
in VGA text mode the cursor advances by itself
>>
>>54114331
First of all, that's wrong, the cursor does not advance by itself, at least not when writing characters via 0xb8000.
Second of all, I'm not talking about VGA text mode, I'm talking about VGA graphical mode (including VESA).
I don't think I even said anything about advancing a text mode cursor. Fix your fucking reading comprehension.
>>
>>54114324
I am testing my pcs not companies yet. For streaming im using a additional peace of software called yawcam to convert my usb shitty logitech webcam into ip cam and i use port 8081 for this. But i heard some programmers that i should use udp video transfer or something to make a video stream from another pc.
>>
>>54114381
Transport protocols will only matter when the connection can be established. It doesn't sound like you can establish a connection at all at the moment. It could be a number of issues. Can you reach other devices on that network at all? Could be ACLs, routes, etc. Should be looking at the network layer to troubleshoot in all honesty.

UDP would be useful when data can arrive out of order or not at all. (streams are a decent example)

TCP is useful when you need to make sure data arrives in order and all of it arrives. (file transfers etc)

UDP works for video streaming since sometimes with TCP you get lag when a packet dies somewhere in transmission and the network card is waiting on it to assemble the stream and push the video up to be displayed. UDP just keeps getting data and pushing it along. It's also a little more lightweight since the header is smaller and there's less (pretty much 0) involved in establishing a connection.
>>
>>54114365
>write direct into video memory
>be surprised that cursor doesn't advance
well no shit
>>
>>54110068
You have to be joking. IT industry is probably 95% male programmers
>>
>>54114481
Did I say I was fucking surprised?

Jesus fucking CHRIST, the reading comprehension of this place is fucking terrible. Let me put it in caps and you might understand better.

IN VGA GRAPHICAL MODE, DO I HAVE ACCESS TO THE HARDWARE MOUSE CURSOR ON THE FUCKING SCREEN, LIKE AS IN CAN I ACCESS THE TWO REGISTER ON THE GPU TO CONTROL THE POSITION OF THE HARDWARE MOUSE WHICH IS DRAW BY THE GPU AS IT'S SCANNED OUT TO THE MONITOR, OR DOES VGA NOT PROVIDE THAT AND I'LL HAVE TO WRITE MY OWN SOFTWARE CURSOR?

No, I am NOT fucking talking about text mode.
No, I am NOT fucking talking about text mode cursor.
No, I am NOT FUCKING TALKING ABOUT ADVANCING THE TEXT MODE CURSOR, I HAVE NO FUCKING IDEA HOW YOU DEDUCED THAT, FOR FUCKS SAKE.
>>
>>54114519
int 33h, 4
>>
>>54114468
So how do i make than a connection between those 2 separate networks and not using additional softwares? I'm kind of new to socket programming.
>>
>>54114538
That's the BIOS though, or does that interrupt use the VGA hardware?
I'm not looking for a BIOS function, I'm looking for a way to show and control the hardware mouse by interacting with the VGA hardware directly, since I'll be switching to 32bit protected mode I won't have access to BIOS functions, so I obviously can't use them.
>>
>>54113047
>>embed a web server so I can use Javascript/HTML for the GUI
>You know that's not a bad solution, i did this before and it work surprisingly well.

Agreed, this is what I finally settled on doing. I think I've settled on the best way to do user interfaces these days:

- CLI; barebones minimum of user interaction, requires the least effort; should be first, default choice

- Javascript web app using React or your favorite web UI framework, exchanging RPCs over HTTP with a server program that contains the core business logic. This is favored because of its portability. Regular non-hosted non-SAAS programs can also use this by running the server program on the hard disk and running the client on localhost.

- Mobile iOS/Android app, much like the web app, does RPC with a remote server program.

Forget the dinosaur that is desktop GUI programming. I just wasted a couple hours tinkering with a GTK2 library before I figured out there is no point. IMO desktop GUIs just aren't worth the pain for small projects. The only time I think it's bearable is with C#/Visual Studio and to a lesser extent Java/Swing, but that's not my thing.
>>
>>54114519
well next time learn to describe your problem instead of expecting people to tell what you mean, you aspergetic little shit xd
>>
>>54114538
This is a DOS interrupt though, not even BIOS one, it's not use for him. I don't think VGA has any kind of mouse overlay.
>>
>>54114569
My original post was not at all hard to understand, it was quite fucking clear I was talking about the hardware mouse cursor.
>>
>>54114584
I'm sure it sounded clear in your mind, as I said learn to describe your problem in details, matter fact learn how to phrase and form coherent sentences first phaggot
>>
File: 556.jpg (108 KB, 400x400) Image search: [Google]
556.jpg
108 KB, 400x400
https://www.youtube.com/watch?v=1ELhJeA0pjY

Holy shit i hadn't seen anything so horrible since Swordfish
>>
>>54114618
It's not my fault you're retarded, you fucking tripfag.
>>
>>54114555

Really depends on the network devices in between you and the other device. If the camera device is just tossed on a subnet where other users are on, you may or may not convince network guys to allow that port in the firewall. Pretty much would be a tiny web server where it shouldn't be. There's likely a network segment where it is better suited. Then it really comes down to the firewall. If it's a stateful firewall that has security levels and the privileged segment initializes the connection, then you wouldn't even need to open up ports or configure ACLs.

Like I said, try it outside of the production network first. Take it home, port forward on router and then try connecting over the Internet or another subnet or something. If it works, then there's an issue with security in place. Try to find out the best way to get it done. Talk to the network people.

Trying to circumvent security will likely get you fired.
>>
File: kissu.webm (3 MB, 1280x720) Image search: [Google]
kissu.webm
3 MB, 1280x720
Ask your much beloved programming literate anything (IAMA)

>>54114045
I think vga has hardware cursor only in text mode.

>>54113435
Fragment shader. That's color interpolation with varying luminance and alpha channel over time.

>>54113220
No more than 6 hours. Sleep can be helpful to resolve problems.

https://en.wikipedia.org/wiki/Eureka_effect#Sleep
http://link.springer.com/article/10.3758%2Fs13421-012-0256-7

>>54112549
Kivy
IUP
enaml

>>54111587
https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#sleep-long-int-

>>54110236
>(but does have structs, which are like public-access classes without member functions)

Also without inheritance
Without polymorphism
Without default initialization
Without static field
But, yes, c structs are like c++ classes ( ̄ー ̄)

>>54110067
https://bitbucket.org/snippets/Tetsumi/RXko/untitled-snippet

>>54110022
>It is for low level stuff like systems programming, that's what C is meant for...C and Java are really in different categories,

Java was specifically made for system programming.

>>54109727
you can dump the ast with clang.
>>
>>54114770
If you're so literate then tell me how to enable vga in qemu virt board for aarch64 xd
>>
should I throw a IndexOutOfBoundsException or a NoSuchElementException when I cant find a element in a LinkedList ?
>>
>>54114784
qemu has a -vga <cg> option, look it up in the manual.
>>
>>54114770
>Java was specifically made for systems programming
Yeah. I'm sure most kernels and embedded systems are programmed in Java ;-)
>>
Another one of THESE questions:

Which language should I learn? I've dabbled in HTML but would like to have basic knowledge in coding. Is there a language I can learn as a base that I can apply to other languages if I want to learn more?
>>
>>54114770
> Java was specifically made for system programming
You don't really know that system programming is, don't you?
>>
>>54114814
C
>>
>>54114804
I would use NoSuchElementException. IndexOutOfBounds is for when you can't find the index.
>>
>>54114770
>Java was specifically made for system programming.
That was Java creators' original idea back in 1991, but it has evolved since then to be an application language, unsuitable for system programming.
>>
>>54114829
my thoughts exactly, thanks
>>
>>54114809
>>54114816
There are multiple definitions for systems programming. So the question is: did you deliberately pick the unfitting one just to make a "witty" comment or are you really so fucking stupid that you don't know that there are multiple definitions?
>>
>>54114872
No there aren't.
Java is an application programming language. Any language that compiles to byte code is by definition not a systems programming language.
>>
>>54114692
I'm doing an internship there. Thank you for your info now i have some ideas how to make it video stream happen.
>>
>>54114872
> There are multiple definitions for systems programming
Yes, the right one and your.
https://en.wikipedia.org/wiki/System_programming
https://en.wikipedia.org/wiki/System_programming_language
>>
File: ki.webm (3 MB, 1280x720) Image search: [Google]
ki.webm
3 MB, 1280x720
>>54114809
Actually. there are many embedded systems that are programmed in java, even payment cards.

>>54114816
When you program for the system/hardware (the program is not directly used by the user). Would not be surprised if most of today server backends are programmed in java.

>>54114906
>Any language that compiles to byte code is by definition not a systems programming language.
That's wrong, for example, openbsd kernel is extendable in lua.
>>
>>54111823
i can listen to this
>>
>>54114946
What do you think the VM that the Java code runs on is programmed in?
>extendable
Exactly.
>>
>>54114804
Exceptions are for exceptional circumstances
>>
>>54114625
looks dumb af but at least they're trying
>>
>>54114967
there a multiple java machines in the nature, both software and hardware (ARM made java processors). Java can be compiled into native code but would ruin the main purpose to use it with embedded systems.
>>
File: 1443079302488.jpg (92 KB, 374x363) Image search: [Google]
1443079302488.jpg
92 KB, 374x363
>haskell hello world binary is 140.5 times bigger than C hello world binary
>>
File: 200_s (2).jpg (25 KB, 272x200) Image search: [Google]
200_s (2).jpg
25 KB, 272x200
>>54111587
but why
>>
why is java pushed so hard in """"corporate""""
>>
>>54111587
there is no way in any language on relevant platforms you could reliably pause for exactly "a few nanoseconds". also, WHY would you do this, it sounds like an XY problem and that you're being retarded.
>>
>>54115056
How big is it?

also
>implying the size of the program matters at all
>>
>>54115094
because it's good and it scales to large and complex applications
Thread replies: 255
Thread images: 28

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.