[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: 51
File: 1448976712622.png (346 KB, 640x1136) Image search: [Google]
1448976712622.png
346 KB, 640x1136
What are you working on, /dpt/?

Old: >>52361920
>>
File: 1414613401164.jpg (41 KB, 400x343) Image search: [Google]
1414613401164.jpg
41 KB, 400x343
writing SPARQL queries for a linked data course
>>
>>52366419
Dumb frogposter.
>>
>>52366410
Dumb anime poster.
>>
File: 1423051864866.jpg (328 KB, 2000x1000) Image search: [Google]
1423051864866.jpg
328 KB, 2000x1000
Nth for web development is real programming
>>
>>52366419
dumb frogposter
>>
>>52366410
Dumb pedophile.
>>
>>52366419
Dumb frogposter
>>
>>52366477
Only a paedophile would think an innocent image of a little girl is sexual.
>>
File: Langtons ant.webm (1 MB, 154x240) Image search: [Google]
Langtons ant.webm
1 MB, 154x240
So how are you supposed to make an OK ascii display on windows (or anywhere really) without that annoying clear blinking. Like how does nethack games do it?

Where can I read about it?
>>
>>52366410
>vagina clearly visible
why do they do this?
>>
>>52366498
make a UML diagram
>>
>>52366505
Try libcaca.
>>
>>52366506
because you're austistic
>>
>>52366497
>innocent
>chest exposed so you can see her side boobs
>in panties
>is blushing

take a picture of a child in that same pose and post it on facebook. I can bet you 99% would call you a pedo
>>
>>52366506
Why not
>>
making a VPN kill switch... cuz the ones that available doesn't work. I just got mine working and just need to clean up the codez.
>>
>>52366542
>Americans
>>
Alright so I have a function in C wherein I use a computed value numerous times. However, I do not want to define a variable to hold it and I don't want to compute it numerous times. What I want to do is use ebx/eax via inline assembly. How do I do it? I remember using this method in a driver I made a long ass time ago and it was something like __inline__asm ( "%eax": a) if I wanted to transfer eax to a. Anywho... help?
>>
>hurr durr what is the bump limit
>>
Well, at least we know it's not a trap image.
>>
why is nobody doing anything interesting

all just babby shit in c/c++
>>
File: 1436722233500.png (4 KB, 386x20) Image search: [Google]
1436722233500.png
4 KB, 386x20
Holy shit, what are the chances of this?
>>
>>52366611
>he doesnt know
>>
>>52366577
>However, I do not want to define a variable to hold it
>What I want to do is use ebx/eax via inline assembly.
Why the fuck would you want this?
>>
>>52366595
I just finished a self-expiring localStorage Set writer/reader with inter-tab synchronization.
>>
>>52366577
Just use a variable you non-portable nigger.
Your compiler will optimize it into a register anyway.
Or if you using a shitty compiler, you could use the register keyword explicitly.
>>
>>52366595
I'm writing a VM, a linker and an assembler for it.
I recently implemented virtual memory and interrupts in the VM.
All in C.
>>
File: 1442484648671.png (152 KB, 448x789) Image search: [Google]
1442484648671.png
152 KB, 448x789
>>52366633
How does that inter-tab sync works?
>>
should i make a stackoverflow account
do you have one
>>
>>52366633
Neat. Does it rely on randomness for correctness, or is it always correct? Do you need unique IDs?
>>
>>52366687
No, they are incompetent. 4chan is the best place for coding. Here the code monkeys can not bad the true coders. Clique of bad coders can not exist on 4chan. They can not rule like everywhere else.
>>
>>52366687
It wouldn't hurt to have one?
I mean i doubt it'd help much on a resume.

it's better to have a github, professionally speaking. that way you can easily link to projects you've done and it also shows anything you've contributed to.
>>
>>52366611
> Holy shit, what are the chances of this?
The odds of a file getting that CRC by coincidence are 1 in 4,294,967,296.

But the odds of the file's creator forcing that particular CRC (which isn't exactly hard) are somewhat higher.
>>
File: 1451500303327.png (443 KB, 600x800) Image search: [Google]
1451500303327.png
443 KB, 600x800
How do I stop writing spaghetti?
>>
>>52366779
Why did you post an empty picture?
>>
>>52366632
Just as a refresher really. It's kinda neat too and makes you think since the eax value changes every time and you have to consider that every time as well. Makes you think. It's a side-project too so I want to have some fun with it.

>>52366655
no. Sadly I can't be arsed to debug and see if the compiler optimizes it as such and it doesn't recognize the register.
>>
>>52366680
Found out this exists today https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent
>>52366701
I write and read to the same key, so I assume it to be always consistent, unless some wonky browser behaviour.
Source, if anyone cares http://pastebin.com/Nnrh5790
>>
>>52366505
double buffer? idk
>>
R8 my Fizzbuzz /dpt/:

fn main() {
let f = (1..).map(|i| match (i%3, i%5) {
(0,0) => println!("FizzBuzz"),
(0,_) => println!("Fizz"),
(_,0) => println!("Buzz"),
_ => println!("{}", i),
});

f.take(100).last();
}
>>
>>52366813
>It's a side-project too so I want to have some fun with it.
Even under "because I can", this is a retarded thing to do.

>It's kinda neat too and makes you think since the eax value changes every time and you have to consider that every time as well.
If that's what you want, go write assembly. Don't try second-guessing your C compiler.

>Sadly I can't be arsed to debug and see if the compiler optimizes it as such and it doesn't recognize the register.
It optimizes it as such unless it recognizes that doing so is more expensive than the alternative. You know, exactly what you want.
>>
File: 1429705842499.jpg (454 KB, 1280x720) Image search: [Google]
1429705842499.jpg
454 KB, 1280x720
Do you do a bit of CG and HTML, and a bit of Flash, /dpt/?

>>52366813
>no. Sadly I can't be arsed to debug
Well fuck you then.
If you don't care to look at your programs instructions then why the fuck do you even care about performance that much?
Anyway, if you're using either GCC or Clang, I can guarantee you that it will optimize it into a register, and if it doesn't, there's probably a good reason for that.
>>
File: 1451877402987.gif (407 KB, 500x500) Image search: [Google]
1451877402987.gif
407 KB, 500x500
>>52366851
What meme language is that? Ruby?
>>
>>52366873
I love this cat.
>>
>>52366838
Oh, I misunderstood what your thing is supposed to do.

>I write and read to the same key, so I assume it to be always consistent, unless some wonky browser behaviour.
It's not always consistent. This implementation is vulnerable to race conditions.
>>
>>52366873
Rust
>>
>>52366903
>race conditions
Oh, you are right. How would you go about avoiding those?
>>
Animfags need to get out

>>>/r/reddit
>>
File: 1437724379921.gif (173 KB, 510x282) Image search: [Google]
1437724379921.gif
173 KB, 510x282
>>52366878
The best part is if that program is written like shit. They did this to us to teach us how to do OOP on some piece of shit "game" framework that had buggy movement. You could jump when touching a wall and there was nothing you could do. The final step was to make a playable game. Good luck.
>>
>>52366799
There's clearly a very angry packet of crisps. Hella weird how they're floating though.
>>
Who else doing CHIP-8 interpreter?

thinking of doing it in python lel
>>
>>52366851
>"FizzBuzz"
0/10
>>
>>52366994
OCaml is better for those kind of tasks.
>>
File: 1452460437689.png (1 MB, 1600x2743) Image search: [Google]
1452460437689.png
1 MB, 1600x2743
>>52366942
2D women are far superior to 3D women, anon.
>>
>>52366939
In realistic browsers, it's gonna be damn hard to avoid this. There are some mutex implementations on the internet, but all the ones I have seen are only mostly correct and not fully correct; I tried implemented my own, but it was fiendishly tricky to get fully correct and I aborted the attempt when I realized I didn't need it for my project anyway.

According to the localstorage specification, the browser takes care of race conditions on its own and you don't ever have to worry about this. But most browser implementations don't actually do this for performance reasons, and sucks to be you if you want your localstorage usage to not break.
>>
>>52367012
Probably, but this is a hobbyist project to be quite fair. I'll do it in python to get a hang of a more complex interpreter (35 opcodes) than the 21 opcode synacor challenge one, then I'll move onto the GameBoy interpreter which has like 76 opcodes IIRC and so many more intricacies
>>
>>52367021
Tell that to my dick.
>>
>>52367010
Nitpicking:
fn main() {
(1..).map(|i| match (i%3, i%5) {
(0,0) => println!("Fizzbuzz"),
(0,_) => println!("Fizz"),
(_,0) => println!("Buzz"),
_ => println!("{}", i),
}).take(100).last();
}
>>
>>52367037
Use OCaml, it will be easier and more robust.
>>
>>52367045
>"Fizzbuzz"
>doesn't match reference output
-1/10
>>
File: bleh.png (1 MB, 1440x810) Image search: [Google]
bleh.png
1 MB, 1440x810
>>52366838
>no semicolons
>>
>>52366860
Alright then, fair enough. I'll need it some day though and I'll be angrily shaking my fists at the thought of you.
>>
>>52367063
forgot to mention that I'll be doing CHIP-8 in C++ after python, then do GB in C++, just to remember C++ a bit

I'm not going to use OCaml lmao, I just got through Racket, I could do with less languages. I'll give it a glance though
>>
my AI has hit 800 lines and is still pretty shitty, but the groundwork is there.

What's the chat with learning techniques for optimising hieristic weights? I have up to 8 different values for determining the value of a game position but I need a way of weighting them.
>>
File: 1424804813046.png (118 KB, 424x335) Image search: [Google]
1424804813046.png
118 KB, 424x335
>>52367044
hoi penis~
>>
File: 1452426290185.png (355 KB, 612x407) Image search: [Google]
1452426290185.png
355 KB, 612x407
Remember, readability > memeability, there's nothing wrong with throwing in a couple of if else statements.
>>
Question about compiled languages:
How do you test small changes if the application is medium/large and compilation takes a good couple of minutes?
>>
>>52366994
>>52367037
>>52367091
The Chip 8 instruction set doesn't use GC, so you shouldn't be using a language that has it.
>>
>>52367084
>too retarded to understand all 3 of ASL rules
You don't need that semicolon 99.99% of the time. And, when you really do, you can add it. Better readability as well.
>>
>>52367114
>though
There's almost always a more elegant way than a bunch of ugly if statements..
>>
>>52367088
If you can think of a scenario in which you would need this, I'll be much impressed. (Protip: you can't, because the whole concept makes no sense at all.)
>>
>>52367030
Mixing in an async mutex is probably not worth the effort. Considering my usage case, I can likely let it slide. If it works fine in Chrome and FF, the rest doesn't matter.
>>
>>52367143
I can code that in lad
>>
hey /g/

why is clojure the best programming language?
>>
>>52367114
Agreed completely. Ternary operators are a mess to read.
>>
>>52367127
Modularise into small libraries or use a language designed with fast compilation in mind.
>>
File: tard brackets.png (3 KB, 412x111) Image search: [Google]
tard brackets.png
3 KB, 412x111
>>52367145
it just looks incomplete and makes it harder to tell where a statement ends
everyone relying on automatic semicolon insertion should be killed and the feature should be removed from the language desu
"asi was a mistake" -me
>>
>>52367278
C/C++ and Java fags probably all think this way, but is seems very natural to people coming from many other languages. Semicolons are boilerplate by definition.
>>
posting in cute anime thread
>>
>>52367252
Fuck you, man. Ternary operators are my BFFs.
>>
>>52367365
Stop writing spaghetti, anon.
>>
>>52367325
The ; removes whitespace-sensitivity. It also makes the syntax less fragile.
>>
>>52367182
i prefer readability
>>
>>52367252
only if you use them too much.

They seriously help me tons.
>>
>>52367406
It's boilerplate almost always. You only need indentation to readably close expressions.
>>
File: 1450855203121758055.jpg (115 KB, 1080x1080) Image search: [Google]
1450855203121758055.jpg
115 KB, 1080x1080
Trying to work around guessing correct resource lookup magic,
https://msdn.microsoft.com/en-GB/Library/windows/apps/hh965324.aspx

However the only way MS exposes it is through ResourceManager class which can not be manually instantiated.
So i figured i can obtain "current" class instance:

namespace wrl = ::Microsoft::WRL;
namespace foundation = ::ABI::Windows::Foundation;
namespace resources_core = ::ABI::Windows::ApplicationModel::Resources::Core;
wrl::ComPtr<resources_core::IResourceManagerStatics> p_statics;
{
wrl::Wrappers::HStringReference const class_id(RuntimeClass_Windows_ApplicationModel_Resources_Core_ResourceManager);
auto const hr(foundation::GetActivationFactory(class_id.Get(), &p_statics));
if(FAILED(hr))
{
return;
}
}
wrl::ComPtr<resources_core::IResourceManager> p_resource_manager;
{
auto const hr(p_statics->get_Current(&p_resource_manager));
if(FAILED(hr))
{
return;
}
}

But it crashes at get_Current since it is not a metro app and app-context stuff is never initialized.
Life is tough...
>>
What's the best board to get SFW lewd anime pics, /dpt/?
>>
>>52367648
/a/
>>
>>52367635
>What are code tags?
>>
>>52367635
>What are code tags?

If you're going to paste a chunk of code and ask a question please use code tags or pastebin you fuck.
>>
Semicolons at the end of statements are boilerplate. Separating same-line statements are ok, but having same-line statements anyway is anti-pattern.

Python pretty much does it best, as scope through indentation is a practice we all do even in languages with boilerplate { } ;

Languages should incorporate it for clearer code, the only use for the alternative is in autistic code golfing.
>>
>>52367648
>SFW
>lewd anime
you can only choose one
>>
>>52366410
Messing with CustomStringConvertable and StringLiteralConvertable in Swift

struct Thing : StringLiteralConvertible, CustomStringConvertible {
let a: String

var description: String {
return a
}

init(string: String) {
a = "My name is \(string)"
}

init(stringLiteral value: String) {
self.init(string: value)
}

init(extendedGraphemeClusterLiteral value: String) {
self.init(string: value)
}

init(unicodeScalarLiteral value: String) {
self.init(string: value)
}
}

print("tom" as Thing)
>>
what's the most efficient way of deep copying an object in python?

copy.deepcopy, cPickle or implementing a copy method manually?
>>
>>52367667
>>52367675
adding them won't make shit better anyway

>>52367675
I didn't ask anything.
>>
File: 1435908290120.jpg (191 KB, 700x600) Image search: [Google]
1435908290120.jpg
191 KB, 700x600
>>52367648
/e/ is good, you have to be careful though, some are obviously not SFW.
>>
>>52367770
Yes it will, I thought you were asking a question because your entire post was one big unreadable block that made me just assume you were a moron asking a dumb question.

Use code tags for stop posting.

You cunt.
>>
File: 1435908341195.jpg (445 KB, 900x636) Image search: [Google]
1435908341195.jpg
445 KB, 900x636
Is this a good way to check if I'm in a 4chan thread?

if(document.URL.split("/")[4] === "thread"){
//do stuff that only applies to threads
}
>>
>>52367863
lol
>>
>>52367863
no
>>
>>52367863
>>52367774
>>52367112
>>52367021
>>52366960
>>52366410
Please do not post lewds. You are ruining my nofap 2016.
>>
>>52367863
Use indexOf. If 4cuck changes the URL you're fucked.
>>
>>52367863
use the 4chan API
>>
File: 116891276451e055716fca4.jpg (8 KB, 100x111) Image search: [Google]
116891276451e055716fca4.jpg
8 KB, 100x111
>>52367889
OK
>>
>>52367710
>differentiating between strings and MULTIPLE TYPES of string literals
Well, scratch Swift from the "sane language" list.
>>
>tfw software developer
>haven't written code for job in a week
>bored

If I were normal, I'd be raising a family and doing all of that shit.

So give me a programming goal /dpt/
>>
>>52367938
Be a Go master at the end of the month.
>>
>>52366994
I'm doing that right now, actually. Using Python because Pygame is the only thing resembling graphics library I know how to use. On that note, what graphics library should I learn? SDL?

>>52367143
Why does it matter? Can't everything in the machine be represented by fixed-size arrays anyway?
>>
>>52366505

What are you currently using for terminal output? You're not just writing to standard out without putting it into raw mode, are you?
>>
>>52367963
>SDL?
SFML lad, if only because pySFML is 100x faster than pygame in various areas
>>
File: SpJ79mB.png (386 KB, 2144x1800) Image search: [Google]
SpJ79mB.png
386 KB, 2144x1800
>>52367937
What do you mean? There's only one String. StringLiteralConvertable just means you can toss a String to something that otherwise would take another type and the compiler will call the init(stringLiteral value: String) constructor automatically.
>>
File: 1451751832808.png (17 KB, 418x359) Image search: [Google]
1451751832808.png
17 KB, 418x359
>mfw putting every class in its own file
>mfw putting everything in classes
I'm not even into pooinloo, but the modularity and portability lads. Can I get an amen?
>>
File: 51437306_p0.jpg (332 KB, 1300x1676) Image search: [Google]
51437306_p0.jpg
332 KB, 1300x1676
Reminder that the file is a really poor abstraction
>>
>>52368027
>using a language with classes
>using classes
Alright Gurpreet.
>>
>>52368027
>Can I get an amen?
not if you're going to use the pooinloo meme as if you're above everyone else
>>
std::random_shuffle ( myvector.begin(), myvector.end() );


Why does this function exist?
>>
>>52367112
Can't find sauce for shit.
H-help?
>>
>>52368080
To randomly shuffle something.
>>
File: 1435956404567.jpg (516 KB, 850x533) Image search: [Google]
1435956404567.jpg
516 KB, 850x533
>>52367895
Maybe, but that would be true for:

https://Boards.4chan.org/qa/#thread

>>52367915
Why send another request when I can find out if I'm in a thread from the already loaded page?

Besides, the API has rules and a ToS. That's no fun.
>>
>>52368027
>put everything into one file
>avoid classes
https://raw.githubusercontent.com/dtschump/CImg/master/CImg.h
>>
>>52366410
>What are you working on, /dpt/?

Kind of mixing /dpt/ and /ohm/ atm.
I'm making an Atari 2600 emulator on fpga that I plan on turning into a hand held device that can play the old cartridges.
>>
File: turtle3.webm (2 MB, 640x360) Image search: [Google]
turtle3.webm
2 MB, 640x360
>>52368092
So, why is my something predictably shuffled each time?
>>
>>52368099
>tfw wanting a anime homescreen without being made fun of by my coworkers
>>
>>52368139
You're stuck in a quantum vacuum.

Probably.
>>
>>52368139
Because if you don't supply an RNG, it uses std::rand, which by default has the same seed every run.
>>
File: csgrad.jpg (250 KB, 1137x679) Image search: [Google]
csgrad.jpg
250 KB, 1137x679
>>52368110
I think this has passed the point of autism
>>
tfw you have :Sex with vim
>>
File: 1383195552_image.jpg (108 KB, 600x480) Image search: [Google]
1383195552_image.jpg
108 KB, 600x480
>>52368164
show em your special skill
>>
>>52366410
Anal edition?
>>
>>52367127

Many source files, don't delete the .o files. Re-compiling one source file doesn't take minutes.

Also, try not to do that thing where you make a couple of changes and then compile several times until you get it right. If something's fucked in a large application, try actually using a debugger.

>>52368060

I'd like to hear your reasoning.

>>52368139

Was not aware snapping turtles like to eat mice.
>>
>>52368193
Header was probably generated using bin2c and is used like:
const char[] data = {
#include "data.h"
};
>>
>>52368080
Because while C++ is, the STL isn't bloated enough for the committee's tastes yet.
>>
>>52368220
Don't be sick, anon. That's a little girl.
>>
>>52367127
Use C#. Realize not having edit/continue and an IDE is hell.
>>
File: 1446290901343.jpg (533 KB, 1920x1080) Image search: [Google]
1446290901343.jpg
533 KB, 1920x1080
>>52368230
The file when talking about software has a number of issues.

Now there is the grouping by file type, that sense of course, you don't want your PNGs in your favourite language's source code

And directories are fine too, assuming your language makes use of directories for seperating units of code.

But just having one unit, translation unit or whatever it is called consist of multiple files for the sake of it shows a poor quality of tooling.

Really all you made with those files is a set of # tags like on a website for where to start reading the piece of code.

Having it all in seperate files leads to a lot of bookkeeping

I have a 12000 line file now and it is going to become bigger
>>
>Was not aware snapping turtles like to eat mice.
Was not aware your mum likes to eat my d :DDDDDDDDDDDDDD
>>
File: 1363774280996.png (70 KB, 455x339) Image search: [Google]
1363774280996.png
70 KB, 455x339
>>52368220
>>
File: pl_higurashi_355.png (3 MB, 1920x1200) Image search: [Google]
pl_higurashi_355.png
3 MB, 1920x1200
>>52368164
Then hide your power level, faggot.
>>
File: IC814519.png (20 KB, 680x403) Image search: [Google]
IC814519.png
20 KB, 680x403
>>52367127

>>52368296
This, pic related new in VS2015.
>>
>>52368342
I was looking for F/SN wallpaper, but they're all too obvious mang.
>>
File: 4459353701_826a3c120d.jpg (126 KB, 489x400) Image search: [Google]
4459353701_826a3c120d.jpg
126 KB, 489x400
>>
File: 788.png (304 KB, 1178x377) Image search: [Google]
788.png
304 KB, 1178x377
autism
>>
Small python script with PyQt for file archiving, I'm a beginner but I really enjoy programming stuff when I feel like I need something, learn new stuff as I add more functions to my programs/script.
>>
>>52367127
Go compiles with decent performance!
Now I have some packages which have a ton of C underneath and those are now,
I don't test small changes in those unless I have some downtime anyway.
>>
>>52368306

So how would you design a build system that can efficiently work with a single file, rather than multiple, separate files?

>>52368164

Anon, I gave a presentation in class on i2p with a pony as my wallpaper. Nobody laughed, or even commented on it.
>>
>>52368080
while it's not being deprecated officially, you should just std::shuffle instead anon.

http://en.cppreference.com/w/cpp/algorithm/random_shuffle
>>
>>52368080

To... shuffle your container? Why not have it?
>>
File: pl_fate_651.png (3 MB, 1920x1200) Image search: [Google]
pl_fate_651.png
3 MB, 1920x1200
>>52368370
Very.
>>>/w/powerlevel
>>
>>52368396
>>52368164
I'd make fun of you both, non-stop, until HR fired me for making fun of retarded people.
>>
>>52368410
Thank you anon. Didn't know a powerlevel thread existed.
>>
Weebs are literally incapable of programming beyond the fizzbuzz level. This has been proven with statistics.
>>
File: 1446216035386.jpg (33 KB, 848x480) Image search: [Google]
1446216035386.jpg
33 KB, 848x480
>>52368396
Those are a whole different beast

But I always wind up with the same set of problems with multiple files that I do with a single file.

With multiple files the knobs you want to turn with the build system rarely actually match that set of files

You still have markup inside of the files to assist you

So I prefer to rig something super tiny on the spot, after all things change.

I guess this would be more of an issue with multiple authors but even then I don't see how you couldn't properly merge what is after all text
>>
>>52367863
it doesn't ignore consecutive slashes unlike most web servers
https://boards.4chan.org//g//thread//52366410

const pathArray = location.pathname.split("/").filter(s => s !== "");

if (pathArray[1] === "thread") {
// do stuff that only applies to threads
}
>>
>>52368441
Nah, man. I can program.
>>
>>52368504
but not beyond the fizzbuzz level.
>>
>>52368515
goto reddit; 
>>
>>52368441
I'm a weeb and I disagree.
>>
>>52368515
Please tell us what are all of these programming levels are
>>
File: Screenshot - 110116 - 21:57:26.png (146 KB, 1356x688) Image search: [Google]
Screenshot - 110116 - 21:57:26.png
146 KB, 1356x688
>>52368515
String parser seems complicated enough.
>>
>>52368548
>what are all of these programming levels are
>what are these are

obvious weeb can't even english
>>
I'm trying to overcome a long range communication issue. I have 30 ATTiny85 chips that I need to slave to a base unit. I wanted to just hook them up via RS485 or UART -> MAX485 but 85's don't have serial capabilities.

Trying to figure out if this is a software issue I can overcome or a hardware issue and I have to make some design changes.
I'm pretty new to this so I'm probably just looking past something simple
>>
File: post-110069-1273164125.png (16 KB, 634x571) Image search: [Google]
post-110069-1273164125.png
16 KB, 634x571
>>52368565
Holy shit, I think I've had a stroke while writing that post
>>
>>52366477
>3016-1000
>Not being a pedo
ISHYGDDT
>>
>Weebs are either normies or geeks m8s
>>
>>52368562
use the apis fagit
>>
>>52368607
>he thinks it's 4chan
>>
Fuck Java desu
>>
>tfw I can average 2 ints in brainfuck
Who else knows this feel?
>>
>>52368625
>not smart enough to use Java

top kek anon
>>
File: 1399353105982.png (458 KB, 493x424) Image search: [Google]
1399353105982.png
458 KB, 493x424
>>52366477
implying you aren't one
>>
>>52368637
>not dumb enough to use Java
ftfy
>>
>unironically being a weeb
like what the fuck lmao
>>
>>52368626
,>,
++++++[-<--------<-------->>]<<
[->+<]>>++<
[
[->+>+<<]
[-<<-
[>]>>>[<[>>>-<<<[-]]>>]<<]
+
<<[-<<+>>]
<<<]
[-]>>>>[-<<<<<+>>>>>]
<<<<++++++[-<++++++++>]<.
>>
>>52368649
nice dunning kruger
>>
>>52368480
Thanks, anon. It works.

And it looks like 4chan's native extension has problems with consecutive slashes.
>>
>>52368657
shit negro, in just the 2nd line you go less than cell index 0
>>
>>52368651
Stop pretending you don't like it fag
>>
Working on my YouTube subscription manager.
The idea is to run the application every few hours. It'll check if the channel has uploaded one or more videos relative to the last run. If so, the user can send the result by mail or invoke a script. You can always invoke the script manually and it'll print the result to stdout.
I already can parse the config and open close the database connection.
I'm thinking about a name for my class that'll receive the result from the parsers and sends it to the user. I was thinking about 'Execer', short for executer. Any more suggestions?
>>
>>52368660
Nice Psych term you learned on Wikipedia and throw around to look smart
>>
>>52368698
my phone tells me when subscriptions upload videos.
>>
>>52368705
nice delusion that you're so "smart" that you see no use for java
>>
>>52368480
didnt know javascript had the keyword const

nice
>>
>>52368719
I see a use for Java, however I see other languages that can do what Java does and more
>>
>>52368698
>I was thinking about 'Execer', short for executer.

Don't do this or I'll slap you. Call it Executer.

I can't count the number of times people have dropped one or two letters from a word with columns and class names.

Unless you are dealing with AbstractFactoryAbstractFuckBeansController class names, you don't need to abbreviate words.
>>
 int num = 0;
for(num=1; num <= 100; num++){
if(num % 3 == 0) // check if multiple of 3
printf("Fizz (%d)\n", num);
else if(num % 5 == 0) // check if multiple of 5
printf("Buzz (%d)\n", num);
else if(num % 3 == 0 && num % 5 == 0) // check if multiple of 3 AND 5
printf("FizzBuzz(%d)\n", num);
else
printf("%d \n", num);


alright fizzbuzz attempt? I would like to find a way not having to test for fizz & buzz twice but , I'm not sure how to do it the most economic way. Shouldn't a fizzbuzz program only have to do two checks per run through the loop? And use something like a goto to a specific print?
>>
File: 1451754656606.png (17 KB, 418x359) Image search: [Google]
1451754656606.png
17 KB, 418x359
>OOP
name bigger memes
>>
>>52368719
Really though, the only reason you can possibly have to use Java is if you're unaware of its alternatives.
>>
>>52368736
doesn't mean you have to say "fuck java desu". and actually it just validates java because you feel that it's worth directing your energy toward it whether it be positive or negative energy
>inb4 ">4chan is one person"
>>
>>52368757
oop is good when done right
>>
>>52368757
OOP is not a meme

scalability is
>>
>>52368757
Generics.
>>
File: 1451779320598.png (20 KB, 418x359) Image search: [Google]
1451779320598.png
20 KB, 418x359
>>52368772
>oop is good when done right
good choice lad, can we meme bigger than this?
>>
>>52368757
Significant whitespace
>>
>>52368767
>my retarded opinion is the objective truth
how insightful, anon
>>
>>52368779
>lad

can girls be lads
>>
File: quite a ruff victory.jpg (46 KB, 653x510) Image search: [Google]
quite a ruff victory.jpg
46 KB, 653x510
>>52368757
these threads.
cats.
>>
>>52368757
Material design.
>>
>>52368757
The use of this particular frog image in /dpt/.
>>
>>52368771
wut
>>
>>52368795
too big, lad
>>
>>52368779
kill yourself

>>52368757
programming applications in C
>>
>>52368786
this

together with lazy evaluation the only bad parts of haskell
>>
>>52368808
>kill yourself
old meme lad
>>
Does anyone have that image with the most enjoyed programming languages?
>>
>>52368828
kill yourself
>>
>>52368805
>lad
:s
>>
>>52368832
I have that image of a frog looking condescendingly forwards
>>
>>52368832
it's bullshit

fuck off to sjwhub and curryniggerflow normie
>>
>>52368755
kill yourself
>>
>>52368850
Nice, it's the same, I'll go for it
>>
>>52368755
prime grade bait
>>
>>52368824
That's like saying curly braces and OOP are the only bad parts of Java.
>>
>>52368744
You're right. Execer is a bit too much anti ExecuterServiceImpl.
I was also thinking about simply calling it 'Runner'.
>>
>>52368824
the entirety of haskell is extremely shit
>>
File: Te28SOS.png (184 KB, 751x1823) Image search: [Google]
Te28SOS.png
184 KB, 751x1823
>>52368757
'code', at least in this thread.

>shit is always in top 5
>java winning the popularity contest over Python this thread

Still working on filtering out non-significant words.
>>
>>52368883
That's kinda true though.
In fact, Go is Java with those features removed.
>>
>>52368909
post source code?!
>>
>>52368921
Go is hot garbage, 9001x worse than java
>>
>>52368731
Below IE 11 doesn't support it, you should probably avoid using it unless you're making a Chrome/Firefox extension.
>>
>>52368921
Then it's like saying := and channels are the bad parts of Go.
>>
>>52368938
I will when I get it more fleshed out.

Working on phrase combination stats and optimizing the API calls.

I'll sell it to NSA/Facebook when I'm done.
>>
>>52368969
You're better off selling the data to mook.
>>
Wait Go has no OOP and it has pointers?
Maybe Rob Pike isn't such fucking big faggot holy fucking shit.
But he is still faggot tough.
>>
>>52368989
He probably has all sorts of analytics stuff going ham on the entirety of 4chan already.
>>
>>52368757
Code reuse
Versioning
Portable
>>
>>52368995
Go has the concept of interfaces if you call that OOP.
>>
>>52368698

>I'm thinking about a name for my class that'll receive the result from the parsers and sends it to the user. I was thinking about 'Execer', short for executer.

DON'T BE AFRAID OF LONG NAMES

EXECER IS NOT MEANINGFUL

I WOULD READ IT AS "EXESSER", AND IT WOULD MAKE NO SENSE AT ALL
>>
>>52368995
>has pointer
no pointer arithmetic though
>>
fuck CHIP-8, give me something harder
>>
>>52369092
gameboy.
>>
>>52369092
NES
>>
>>52369092
x86
>>
File: ya_boi_bowie.jpg (29 KB, 500x412) Image search: [Google]
ya_boi_bowie.jpg
29 KB, 500x412
Trying to learn C without getting frustrated and giving up.
>>
>>52369097
>>52369104
>>52369126
lmao I'll just do CHIP-8, cbf tbf
>>
>>52368698
If you can call a class an "Executor" it shouldn't be a class.
>>
>>52369158
Why?
>>
>>52368995
>OOP
Mind, it has struct composition OOP, not classes.
>>
>>52369180
Because it could likely just be a function or even just a code snippet that has been factored out and abstracted for no reason.
>>
Is OOP the most overused and meaningless programming term?
>>
>>52369191
Can't be done in Java :^)
>>
>>52369191
And if Executor is a very complex class?
>>
If I do
a = 0?1:;
b = 1?4:;
c = 1?:3;
d = 0?:4;


in C, what will be the values of a, b, c, and d?
I know that, for example,
e = 1?:2;
sets `e` to `1` but everything else is obscure to me.
>>
File: 1448024204125.jpg (111 KB, 540x720) Image search: [Google]
1448024204125.jpg
111 KB, 540x720
>>52369139
Hang in there senpai

It's okay to take a break
>>
>>52369214
I'm having a hard time thinking of anything that complex that can be boiled down to "executes something".
>>
>>52369207
There are so many different kinds of OOP, so yeah, pretty much.
>>
>>52369207
No it's design pattern.
>>
>>52369216
a 0
b 4
c 1
d 4
Just a ques
>>
>>52369207
Quite the contrary; it has become so ubiquitous that it's hard it's hard to imagine programming without it, making the term sound meaningless on first glance.
>>
>>52369216
a = 0
b = 4
c = 1
d = 4
>>
>>52369253
>it's hard to imagine programming without it
what a pleb
>>
>>52369139
I believe in you yo. What are you trying to learn atm?
>>
>>52369214
not him, but he's right executor is really rubbish name.

Find something more descriptive (sounds like it might be better to refactor into a controller)
>>
>>52369233
A cpu is a executor of a code segment. Do you think that a CPU is simple or complex?
>>
>>52368878
I honestly wasn't baiting I'm just trying to learn fucking c.
>>
>>52369216
since when does C have some sort of elvis operator?
>>
>>52369289
check if multiple of 3 AND 5 first so you get the correct output

and you should almost never use goto
Thread replies: 255
Thread images: 51

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.