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

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 316
Thread images: 30

File: haskell..png (7KB, 397x131px) Image search: [Google]
haskell..png
7KB, 397x131px
What are you working on, /g/?


Functional Programming Thread:
>>58105321

Previous Thread:
>>58117916
>>
>>58123966
This thread is pathetic. It is not about programming. It's just a bunch of computers illiterates and first semesters memeing about whatever they just learned.

A quick search shows that most arguments used here are not original and have been copied from some trendy tech blog or other shit site.

The only real programming questions I have seen so far are from beginners(it's fine to be a beginner btw).

This entire site is shit and I don't know why anyone would regularly come here.
>>
Second for golang
http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/
>>
>>58123978
Okay
>>
File: anime.png (786KB, 1000x1300px) Image search: [Google]
anime.png
786KB, 1000x1300px
>>58123978
>This entire site is shit and I don't know why anyone would regularly come here.
It's a hobby site for weeaboos to appreciate anime
>>
>>58123999
>A quick search shows that most arguments used here are not original and have been copied from some trendy tech blog or other shit site.

>>58123999
>http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/


>>58124005
Case in point. See above.
>>
Haskell fucking sucks.
>>
which functional language should i learn lads?
>>
>>58124016
Most arguments aren't original anon. That's simply fact.
I ran into that article when dealing with how weird golang ASM is.
Makes me consider once again if it's worth sticking to it.
>>
>>58123978
>This entire site is shit and I don't know why anyone would regularly come here.

Mostly to talk about the status of personal projects and get ideas.

It's also fun to shitpost.
>>
>>58124035
>Most arguments aren't original anon. That's simply fact.
It is not. Is really easy to come up with original arguments if you know something about the subject. In this case, programming languages and their applications.

The link you posted is the fist google result for "golang trash". Is a short article with poor argumentation(I had already seen it and I'm a golang programmer). One might think you just searched for "golang trash" and posted the first link for the solely for the purpose of trolling.
>>
File: 1482257252634.png (1MB, 1280x720px) Image search: [Google]
1482257252634.png
1MB, 1280x720px
What is golang?
>>
>>58123978
>This entire site is shit and I don't know why anyone would regularly come here
That's nice, feel free to leave whenever then
>>
>>58124144
A shit language that manages to be good at nothing and bad at everything
>>
I feel like I've been a beginner for the last 3 years
>>
>>58124163
You're always a beginner at something.
>>
>>58124149
>regularly
reading comprehension
>>
>>58124083
I'm not a golang programmer*
>>
>>58124175
Yeah I guess so, and with programming you genuinely never stop learning. But I still feel so out of my element
>>
>>58124215
If you feel so out of your element maybe programming is not for you.
>>
>>58124181
Oh boy, a technicality
You clearly don't like it in this thread, so kindly fuck off, you're only making it worse with your bitching
>>
>>58124253
I'm too deep now, it's like the only marketable skill I have. When I have a well defined goal I'm pretty good at it, but my main problem is that this doesn't feel like a hobby for me.
>>
>>58124282
Maybe you just lost some drive. Do you have some pet project on the side or anything that passion you?
>>
>>58124262
I'm waiting a build finish and have nothing else to do. There are no new messages on my usual mailing lists and I already masturbated.
>>
>>58124326
It hurts.
>>
>>58124318
do you feel your legs tired after fap?
>>
Posting this question again from the last thread. Shitty IIS.

>>58124072
>>
>>58124336
Yes. I also like to stretch them when I'm close to finishing.
>>
>>58124295
Nothing specific, I was going to install the android sdk and try to get into some make some applets but I keep putting it off. Atm I don't have an isp so I'd have to go out and download it from like the library or some other wifi hotspot something.

It's stressful since I know that it's not hard to get a job as a dev and all I have to do is just cobble some portfolio together but at the same time I can't ever think of what to make and that all that's holding me back is me.

I dropped out due to bad grades (I'm not stupid, honestly I got an A on my programming final and did well in the CS classes) so I'm just in this awkward transitory period. And I'm just trying to sort my life out but there's a lot i need to get in order. Programming to me is just something I know I have to pursue since it pays fairly well (more than what I'm used to) and it's not that difficult. So I've completely removed myself from the hobby aspect of it.
>>
>>58123978
Where can I unsubscribe from your blog?
>>
>>58124357
>>>/g/wdg
>>
>>58124408

you guys are cooler tho
>>
>>58124366
>Yes
why do they?

is there a scientific explanation?
>>
>>58124419
That's how cavemen nutted
>>
>>58124032
Racket
>>
>>58124417
http://stackoverflow.com/questions/20162368/500-internal-server-error-images-not-loading
>>
>>58124024
You fucking suck (At Haskell).
>>
>>58124391
>It's stressful since I know that it's not hard to get a job as a dev and all I have to do is just cobble some portfolio together but at the same time I can't ever think of what to make and that all that's holding me back is me.

What other subjects do find interesting? Try to port some other application to android.
I like among other things, network and security.
As a side project in racket I'm developing a malaware development language and framework.(with precautions to keep the script kidies out)

Netcat is not that complicated, if you like networking you can port it to android with a nice graphical interface. Most stupid managers would be impressed.
>>
>>58124417
that's because we keep guys like you out
>>
>>58124032
>λ=
>>
>>58124419
Idk but most male animals get something like thiss after coitus.
>>
>>58124460
Why are you replying to him?
>>
File: anal beads.png (5KB, 217x109px) Image search: [Google]
anal beads.png
5KB, 217x109px
>when you're tool cool for the default window controls so you abuse undocumented features and reflection to remove them so you can implement your own that break sometimes
>>
>>58124391
To find something to make I recommend to make something that you personally or people close to you needs. Programming is indeed work, it's not hobby all the time. Some time you need to do boring ass shit. You also seem to have been through tough time so I wish you luck my friend, and try to find some fun in programming to cheer you up.
>>
>>58124406
Just stop giving me (You)s.
>>
>>58124479
Never fucking reply to me again unless you're contributing to the thread.
>>
>>58124430

i dont have an htaccess file though.
>>
File: reptile.jpg (781KB, 1920x1080px) Image search: [Google]
reptile.jpg
781KB, 1920x1080px
>>58124477
>most male animals
>thiss
we're onto you
>>
>>58124489
Hey man thanks a lot I appreciate it.

>>58124465
I have a few project ideas for when I got everything in order but that's a while down the line, once I tinker around with the sdk and get a feel for it
>>
>>58124479

They can't help it.
>>
>>58124479
It's fun
>>
>>58124483
>undocumented features
>reflection

Shouldn't you just use SetWindowLong(...) and EnableMenuItem(...)?
>>
File: maxresdefault.jpg (32KB, 1280x720px) Image search: [Google]
maxresdefault.jpg
32KB, 1280x720px
>>58124539
>I have a few project ideas for when I got everything in order but that's a while down the line, once I tinker around with the sdk and get a feel for it

In my experience:
It's best not to wait for the perfect conditions. Do it now. (pic)

The best way to get around with a new technology, sdk, language, framework, etc, is not with the tutorials. Is actually implementing something you are about. You learn what you need on the way.
>>
>>58124610
^^^ This man speak the truth.
>>58124539

I also learned the best by just tinkering with a new technology and learning what I needed, to achieve my goals on my project.
>>
File: FeministPepe.jpg (45KB, 680x689px) Image search: [Google]
FeministPepe.jpg
45KB, 680x689px
>>58124664
>^^^ This man speak the truth.
Did you just assume my gender?
>>
>>58124718
there are no girls on the internet.
>>
>>58124597
Burger king, give me a SITREP on the King Nigger birth certificate.
>>
File: 1482139286518.jpg (104KB, 1052x1342px) Image search: [Google]
1482139286518.jpg
104KB, 1052x1342px
>>58123978

>>58124015
>>58124015
>>58124015
This to be honest family.

The only reason I come here is to get the motivation I need to continue studying by seeing pictures of slutty anime lolis reading programming books.
>>
>>58124760
Are you implying gender is binary?
>>
>>58124083
>it's the first google result
So? Of course that's what I'l find when I'm facing concerns of that specific nature (golang's attempt at ASM).

My point was more that the arguments (as you would see if you've read it) are similar. The problems are the same. Practically nobody in programming phrase their problems in specific circumstance like you might with social issues or whatever. You have a issues in general.

That's why they bother you I think. They don't have drastically different steps in the inference because we're dealing with such solid subjects and we're on the whole not retarded.

It's not bad that peopel come with the same complaints. It's very good that when people complain about OOP they end up complaining about the same things largely. If we didn't have that we would either have far too many issues with OOP, so many that people have trouble categorizing their importance, or we would have problems that are of a subjective nature.

What we should ask ourselves is why people don't solve the issues more.
Why is the primary performance oriented language (C++) also object oriented and has a culture that promotes it? Why don't we have better abstractions for the space that C++ covers? (arguably C++14 and up is working on that but before then it was pretty barren)

Solving issues shouldn't be this hard.
>>
>>58124318
>I'm waiting a build finish
How long does it take?
And why are you making it take that long? Do you prefer to masturbate?
>>
>>58124796
there are no girls on the internet.
>>
>>58123966
Am I the only one who hate IPFS?

I mean I would love to see distributed web getting more popular but this is just a hyped bittorrent ripoff written in Go.
>>
>>58124408
Nothing Found
>>
File: 1481676545531.jpg (29KB, 320x427px) Image search: [Google]
1481676545531.jpg
29KB, 320x427px
>>58123966
Real talk now, why does /g/ have such a hard-on for Haskell?

I get that the language is much more elegant than, say, Java, but what's the point in learning it if no one actually uses it to code anything (expect for meme projects like xmonad)? What's the point in investing your limited free time time to learn a new language when you can't do anything useful with it?
>>
>>58124510

im on windows. Tried that too didnt work
>>
>>58124866
A couple of autists shill it hard. I personally kinda hate it because the environment it runs on blows liquid ass through a straw. I'm much more interested in the push for functional concepts in lower level languages like C++.
>>
>>58124866
>limited free time
Everyone here is a NEET or soon to be NEET.
>>
>>58123978
Yup. Just going over the same arguments again and again.
The more serious projects don't even get replies or they're completely irrelevant.
Sounds like a good moment to leave completely.
>>
>>58124844
>domain ending in .io
>written in Go
It's hipsterware.
I'd love to see distributed web become a reality just like you, but IPFS is not the solution in my opinion. It tries to be a better bittorrent, but fails in doing so. All the problems IPFS faces have already been solved in the bittorrent protocol. They were better off writing a convenience layer on top of bittorrent.
>>
>>58124943
>soon to be NEET
I don't think I'm getting fired any time soon, and it would be pretty easy to get another job if that happened.

>>58124866
>why does /g/ have such a hard-on for Haskell?
It's a very vocal minority, and even some of those anons "love it", and yet they don't use it for a single non-trivial application.
>>
>>58124866
Haskell is a perfect programming language on paper. It's worthless for real problems.
>>
>>58124992
Truly the communism of the programming language world.

>A *real* functional language hasn't been tried yet!
>>
>>58123966
>have a functional programming thread
>still forcing Haskell in /dpt/ in OP
I mean, what the fuck?
>>
>>58124812
>(golang's attempt at ASM
It is not

>Practically nobody in programming phrase their problems in specific circumstance like you might with social issues or whatever

Yeah, they are just shitting out of their mouths. Not phrasing well thought problems in relation to a well defined scenario.

>Practically nobody in programming phrase their problems in specific circumstance like you might with social issues or whatever
They have almost any steps in the inference. They just throw they biased opinion in a blog post.

>and we're on the whole not retarded.
Yes, "we" are.

>with such solid subjects and we're on the whole not retarded.
The problem is not agreeing with other person.
The problem is that the complains are usually not well pondered memes.

>What we should ask ourselves is why people don't solve the issues more.
They do btw. But people that solve issues are mostly in academia, trying to solve issues, not sell shit. And people that I complained about are complete imbeciles working in industry buying shit products("the next big thing") from some shit company that have more lawyers than engineers.
>>
>>58124820
>How long does it take?
Idk. It's actually building and running tests. The testing part is the one that takes most of the time.

>And why are you making it take that long?
I'm not. I'm actually using pretty good hardware(companies cluster). It's just that there a lot of things to test.

>Do you prefer to masturbate?
Yes.
>>
Is there any way to detect route changes with React Router?
>>
>>58125195
Yes.
>>
File: rave-no-audio.webm (3MB, 720x1280px) Image search: [Google]
rave-no-audio.webm
3MB, 720x1280px
WS2812B room lighting synced to music using FFT
>>>/wsg/1457751 for audio
>>
>>58125127
They're zealots. They can't help it.
>>
  for x in 1..args.len() {
let im = args[x].clone();
thread::spawn(move || {
let i = image::open(&Path::new(&im)).unwrap();
// HashTypes: Gradient, DCT, DoubleGradient, Mean
let h = ImageHash::hash(&i, 16, HashType::Gradient);
let b = h.bitv;
println!("Path: {}, Hash: {}", &im, to_hex_string(b.to_bytes()));
});


I have some rust that looks like this. Sometimes I think what happens is multiple threads try to write to stdout at the same time, and I get this:
thread '<unnamed>' panicked at 'cannot access stdout during shutdown', ../src/libcore/option.rs:705


What do I need to do to just gather up all the output then print it at once after the loop is over? In Go I would just use a channel but it doesn't seem as straightforward looking at some Rust docs.
>>
>>58124770

Faked from Johanna Ah'Nee's birth certificate.
>>
>>58123978

i am a newbie and /g/ helped me a lot, more than curryoverflow
>>
>>58125366
Read the documentation and use the users mailing list of the 'thing' you are learning. Is much more productive.
>>
>>58124144
A language good for writing servers, server-related tools and nothing else.
>>
>>58125396

i arrived at the stage where i can do medium-size projects (1000 lines) and only look for information when i encounter a problem.

i also want to know software engineering design besides just learning the language. for that i will probably have to read books.
>>
>>58125326
Maybe this'll help: https://doc.rust-lang.org/std/sync/struct.Barrier.html
>>
I just learned the Single responsibility principle, but find it kinda retarded.

You can interpret it in the way that every class should only have one method.
>>
>>58125326
> In Go I would just use a channel but it doesn't seem as straightforward looking at some Rust docs.

Rust has channels too. And they are not hard to use:

    let (tx, rx) = std::sync::mpsc::channel();
// and then in each thread thread
let thread_local = tx.clone();
// do work
tx.send(value);


But your real problem is the main thread exits and it kills all the child threads before they are finished.
>>
>>58125436
That works great, thanks.
>>
>>58125564
errr, that should be thread_local.send(value). I'd personally just call it tx, too, though.
>>
Rust is shit, Go is shit, Java & C# are shit. Is the only sane language for webdev really C++?
>>
>>58125530
>You can interpret it in the way that every class should only have one method.
You don't understand nigga. You want to keep your code as modular as possible. The SOLID (https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)) helps you with that. This way you can easily modify the behavior of the code without refactoring the entire codebase.
>>
>>58125983
>C++
>sane

All languages are shit. Find one you like and use it.

Just make sure to call it shit when anyone asks you about it so that way you're covering for any sort of potential intellectual weakness you'd otherwise show by actually liking a given technology.
>>
>>58126022
behavior of the program*
>>
File: anal beads.webm (1MB, 492x496px) Image search: [Google]
anal beads.webm
1MB, 492x496px
Merry Christmas, /dpt/!
>>
>>58123978
faggot

>>58123966
Question about Java
When I have some class Foo that extends Bar and I fill an ArrayList with Bar's and then from that ArrayList of Bar's I create another ArrayList with Foo's, how would I do that? just cast the Bar's to Foo's or is there a better way? It works for my purposes apparently but I don't like casts
>>
What are programming languages written in

What's the answer to that question written in
>>
>>58126103
BNF

English
>>
>>58123978
>double spaced line-break
hi, reddit
>>
>>58126066
make each dot blink separately, like

red - green - red - green
green - red - green - red
....
>>
>>58126116
Why aren't we all just learning BNF then
>>
>>58126116
>BNF
what's the BNF interpreter written in?
>>
>>58126066
We should have a programming challenge for making the prettiest ASCII Christmas tree.
>>
>>58126212
it could be the new fizzbuzz
>>
>>58126103
Other programming languages, if you're looking for a serious answer. The first languages after a steady hand and some magnets were opcodes to a CPU, which basically 0 and 1s. Even then nobody really did that for any length of time, it's unusuable. Assembly makes those calls into somewhat readable English. Then people used that to build more compilers that compile their own code straight into binaries. So they're "bootstrapped". Now days a lot of people write new languages in C.
>>
>>58126103
>>58126229

Compilers all the way down
>>
>>58126228
Hopefully every retard knows how to print a triangle in ASCII. The challenge is to make it pretty. A rotating blinking swastika at the top would be nice.
>>
>>58126212
>>
>>58126212

couldnt you just type it out in notepad or something then just print it in command line? why would you "program" ascii art?
>>
>>58123978 (you)
>>
File: JUST.jpg (27KB, 600x424px) Image search: [Google]
JUST.jpg
27KB, 600x424px
>trying to make a scraper to validate phones on 411.com
>everything is behind 100 layers of cookie validation buttfuck

WHY IS IT SO HARD
>>
>>58126256
Whatever floats your boat.
>>
>>58126030
>All languages are shit
>There are only two kinds of languages: shit ones and Haskell
>>
>>58126297
>hasklel

god, you shills never stop
>>
>>58126256
so it's scalable
if you want to make your asci art 10x10, 100x100 or 50000x50000
>>
>>58126315
I like that scalable is literal and non-literal in this instance.
>>
>>58126324
wat
>>
>>58124866

The point is to become a better programmer.

If you learn C and C++ and Java and C#, you learned languages that are pretty close together.

If you learned C and Scheme and Perl and Haskell, you have languages with very different approaches, forcing you to do things differently. Even if you won't use all of them in your daily production, it's still worth learning them because it will make a better overall programmer.
>>
>>58126297

srsly, are you hascucks being paid by someone?
thats pathetic
>>
>>58126313
Those are rephrased Stroustrup's words, dumb nigga
>>
>>58126344

I agree with your post, but would argue that there is no point in learning Perl.

It is a horrible, ugly language. There are many slick and fashionable scripting and web development languages.
>>
Anons, I tried to read some source code but I immediately got headaches because every single term was foreign to me and trying to remember all the foreign terms made my brain go numb, what do I do to stop this feeling
>>
File: scrot.png (2KB, 194x222px) Image search: [Google]
scrot.png
2KB, 194x222px
#!/bin/bash
# xmastree.sh
declare -a a=('.' '~' "'" 'O' "'" '~' '.' '*')
[[ $# = 0 ]] && s=9 || s=$1
[[ $s -gt 5 ]] || s=5
for (( w=1, r=7, n=1; n<=$s; n++ )) ; do
for (( i=$s-n; i>0; i-- )) ; do
echo -n " "
done
for (( i=1; i<=w; i++ )) ; do
echo -n "${a[r]}"
[[ $r -gt 5 ]] && r=0 || r=$r+1
done
w=$w+2
echo " "
done;
echo " "

how to run
./xmastree.sh 12
>>
>>58126069
yes you need to cast. dont be afraid of casting. it is meant to be used all the time.
>>
>>58126404
nice try NSA, but I won't sudo rm -rf my system32 today
>>
>>58126401

Post it here, maybe we can help.
>>
>>58126401
LEARN the terms. There is a difference between memorizing keywords in certain places and actually learning them, what they do, why they'd be used and why they're called what they are. Work with the language, use those terms one by one on your own, and then all the boilerplate and necessities get filtered out and you only have to concentrate on how the logic and structure of the program works.
>>
>>58126404
looks comfy
>>
>>58124866
Because you want to learn different paradigms. What would be the point of understanding both java and c++ to a similar level? If anything if you know one you can learn the other in a couple of days. Haskell makes has a lot of good uses, that are outside of building stuff to for example. If you're into mathematics Haskell is far easier to use than Java, or C.
>>
>>58126427
Looked around Quake's source files on Github, couldn't really point to a specific place at this point
>>
>>58126396

Personally I prefer Ruby, but I wanted to avoid "hurr, unironically recommending hipster shit language" type of comments..
>>
>>58126500
>>58126401
troll/10
>>
>>58126401
Do it more often.
>>
>>58126523

no matter what language you mention here, you will get at least one

>unironically recommending x shit language
>kill yourself, code monkey

comment. get used to it.
>>
>>58126464
>What would be the point of understanding both java and c++ to a similar level? If anything if you know one you can learn the other in a couple of days
That's far more true of languages like C# and Java. C++ is much lower level than Java, doesn't have GC as Java does, has entirely different syntax for many things, has a giant stdlib, different build and linking structure, the standard library has its own reference pointer types with shared and unique ptrs, you'll need to learn memory allocation, better type safety, templates, etc.

Nobody who only knows Java and languages as high level as Java with the same type of GC and other concepts is going to pick up and start writing acceptable C++ code in a matter of days.
>>
>>58126404

if i do something like this straight outta uni will i get a job quickly?
>>
>>58126464
>If you're into mathematics
If you are into mathematics, no programming language is really hard except of those what were made for purpose hard.
>>
>>58126557
yes anon we're free to print christmas trees again
>>
>>58126534
? Elaborate anon, because that shit looked like a lego V8 motor
>>
>>58126552
Yeah I guess because I went from C++ to Java I didn't really think about going the other way around. I think you're right, but still I think the overall point stands.
>>
>>58126297
one burrito has been deposited into your account
>>
>>58126563
yeah but haskell is inherently cleaner and less terse. Which is especially handy when you only raw mathematical output.
>>
>>58126589
Yeah, I did something like the opposite. I agree though, going from imperative languages with side effects and state manipulation -> pure functional is quite a big learning step.
>>
>>58126630

of course haskell is much cleaner and better for maths, because it can do little else.
>>
File: binary_christmas_tree.gif (3KB, 434x517px) Image search: [Google]
binary_christmas_tree.gif
3KB, 434x517px
>>58126212
>>
MY FUCKEN GOD, YOU HAVE GONE AND DONE IT, /g/

I WILL TRY YOUR LITTLE AUTISTIC MEME LANGUAGE YOU CIRCLEJERK ABOUT

what is a good Eclipse plug-in for haskell?
>>
>>58126710
>Eclipse plug-in for haskell
>>
In brainfuck
             +
+++
+++++
+[->+>+
++>++++<<
<]>>++>++>,
>++++++++[-<-
----->]<[->+>+>
+<<<]>>>>>+<<<[->
[->+<<<<<<.>>>>>]>-[
-<+>]>[->+<<<<<<<.>>>>
>>]>++[-<+>]<<<<<<<<<.>>
>>>]<[-<<<.>>>]<<.>>++<->>
+


input : 6
output:
*
***
*****
*******
*********
***********
*************
***************
*
>>
>>58126718
>eclipse
>>
>knuth did the 22nd christmas lecture this year

he just keeps going
>>
>>58126719

>some people actually take their time to study this
>>
>>58126710
>going full reeeee about meme language
>references eclipse
>>
>>58126710
>eclipse
lol
>>
>>58126671
>Making C the root.

Enjoy your O(N) lookups.
>>
>>58126741
study? it is only 8 instructions. probably one of the easiest language to learn
>>
Good ad servers for mobile?

I read interstitials have a higher ctr but notice mobile ads are going crazy lately. Some fix to the bottom, some you have to scroll through, modal-esque and all sorts of craziness.

What's good and who serves them? I'm launching in 3 days and this is all that's left!
>>
>>58124866
Haskell is just like /g/: useless
>>
>>58126786
what kind of application?

why are you putting ads in your app?

are you jew?
>>
File: 1481830688240.png (199KB, 317x333px) Image search: [Google]
1481830688240.png
199KB, 317x333px
>>58126830
gonna get all the shekels schlomo.
>>
>>58126870
gonna give lots of negative reviews on it, goyim
>>
>>58126786
>>58126870
what's the app? Have you considered integrating Bitcoin donations (launch the wallet with the proper address)?

I hope nobody on /g/ uses the Google Play store when F-Droid has (arguably) better apps with fewer adds and better features.
>>
Guys, I try hard not to be a code monkey, but I still am one.

Months ago, I read a book about the underlying basics of operation systems. But I already have forgotten all of it, because literally all I need in my job is Java.
>>
>>58126907
you should probably kill yourself. once a code monkey, always a code monkey
>>
>>58126907
>about the underlying basics of operating systems
good god that sounds boring

Have you considered contributing to some open source software or making something cool as a side project?
>>
>>58126927
>Have you considered contributing to some open source software

people contribute to a project i have on github (a kernel written in C), i just merge their pull requests.

that's basically all i do there.
>>
>>58124083
> Is really easy to come up with original arguments if you know something about the subject.
Not an original argument.
> Is a short article with poor argumentation
Not an original argument.
>one might think you just searched for "golang trash" and posted the first link for the solely for the purpose of trolling.
Not an original argument.

Try again.
>>
>>58126917

get a job, kiddo, maybe i will talk to you then

>>58126927

i could try, but that is code monkey-ing too, and unpaid on top of that.
what i really wanna learn is some software design theory.
>>
>>58126954
Not an argument.
>>
>>58126971
>Not an argument.
Not an original argument either.
>>
>>58126945
Can you link to it?

Maybe try contributing to a project that has some public recognition

>>58126967
That sounds pretty boring IMHO. The code-monkey part only really applies when you deal with something easy. When you start making something that deals with harder subjects (math, number theory, AI, physics, chemistry, statistics, etc.), then it becomes more interesting.
>>
>>58126989
>Can you link to it?
Sure.

https://github.com/torvalds/linux
>>
>>58127002
hardy harr harr
>>
>>58126954
None of those were arguments. I were stating facts.
Also, I didn't say an argument is valid if it's 100% original, I said almost all the arguments in this thread are just plain copies of *shit* arguments from shit sites.
>>
>>58126830
It's for normies. It's an anonymous messaging app.
>>58126904
The design is very minimal. I do run a few websites with donation links. One has about 10k uniques a week and has only received 2 5 dollar donations in 3 years.
I put adsense on the website and made more than that the first day. I like the idea of donations, but it doesn't work unless you're wiki and beg constantly.

Anyways I'm looking at admob.
>>
>>58127028
>None of those were arguments. I were stating facts.
Again, not an original argument.
>Also, I didn't say an argument is valid if it's 100% original,
Still not original.
>I said almost all the arguments in this thread are just plain copies of *shit* arguments from shit sites.
Including all of yours.
>>
>>58127042
>anonymous
>>
>>58126563

>If you are into mathematics, no programming language is really hard

This is wrong.

I've met a lot of physicists and math guys (having studied math for 2 years myself) and 95% of them can't program for shit.


Like RMS said: "programming is a craftsmanship ship, not a science." It's a lot about best practices and a hell lot about experience. You can't give a formula for a well-designed program. And just looking through the documentation or doing an intro tutorial doesn't cut it at all.


A lot of scientists just look the syntax of a program and think they "understood" programming, when in reality they don't even know what they don't know.
>>
>>58127058
>Again, not an original argument.
Reading comprehension

>Still not original.
Reading comprehension

>Including all of yours.
It actually is.
>>
What's /dpt's fav Java IDE for Linux?
>>
>>58127090
InteliJ IDEA + Eclipse plugin + Netbeans plugin
>>
>>58127083
>Reading comprehension
Definitely not an original argument.
>It actually is.
Basic refutation, one of the most common arguments there are.

I'll give you one more shot.
>>
>>58127070
Yes, it's secretly a place for people to vent and say nasty things. It looks innocent enough on the surface though.
>>
>>58127104
>Definitely not an original argument.
Reading comprehension

>Basic refutation, one of the most common
>arguments there are.

>I'll give you one more shot.
Reading comprehension
>>
>>58127090

eclipse

>inb4 poo in loo

>>58127100
>InteliJ IDEA + Eclipse plugin + Netbeans plugin

lel
>>
>>58127134
Now you're even plainly refuting yourself by using the same argument multiple times,which even if it was original initially would fail to be so the second time.

You've failed to make a single coherent or valid point in this thread.
>>
>>58127175
>reading comprehension
>>
>>58127144
I wouldn't know either way. I'm 28 and white and learning on the side of work. Just looking for an easy option and didn't know if something better than eclipse was out there.
>>
>>58127362
>I'm 28 and white
did you feel this was relevant to say?
>>
>>58127362
>I'm 28 and white

>>>/pol/

use Eclipse. generally, if you are a beginner, dont bother with subtle differences in stuff. all IDEs do roughly the same.
>>
how do you guys write code?

I'm relatively new and trying to finish my first simple app that I picked up strictly as a learning experience. I'm thinking I might be more productive if I do pseudocode on paper and then simply copying to code. right now i'm feeling like I'm spending too much unnecessary time looking at a screen trying to think of everyting in my head when a piece of pen and paper would be more productive.

How do you guys go about writing your code?
>>
>>58127383
>>58127437
im pretty sure it was just a joke about 'poo in the loo' and him not being indian
>>
>>58127449
i get an idea and implement it
>>
Rate my thing /dpt/
https://github.com/BobbyRaduloff/BenisCode
>>
>>58127449
I just finished my eighth flowchart detailing the networking system in my project. It helps a lot
>>
>>58127472
>BenisCode is simple inneficient bloating
>inneficient
>>
>>58127472
:DDD
>>
>>58127527
What can I say. I'm inefficient at English.
>>58127549
It's not even the Spurdo Spärde meme.
>>
I've been using vim for programming java but I want to switch to eclipse, what are the main differences I have to be wary of?
My setup right now is a src folder with java files and a makefile that compiles to a bin folder.
>>
File: images.png (7KB, 182x276px) Image search: [Google]
images.png
7KB, 182x276px
>>58127580
>>
Why do C programmers always reinvent even the most basic wheel?
>>
>>58127585
i use nano for work, and i take 3 times more time as the other developers to do stuff
>>
>"We can create an istream_iterator for any type that has an input operator (>>)."

Help me understand this line /dpt/.
By "type that has an input operator", they're meaning a type that can be constructed from an input stream?
>>
>>58127611

they are generally like the amish people of programming, refusing to use up-to-date technology out of belief.
>>
Linux distro that isn't shit?

I cant even install nodejs and npm without errors because of hash mismatch.

This happens every time I try to install anything ever. Fuck ububtu.
>>
>>58127639
I've mostly had a good experience with debian
>>
>>58127602
Pure friggin coincidence. Benis was an inside joke between me and my friend before we found about this. I was looking for comments on my code not my maymays though...
>>
>>58127449
I start with the use case code as if I already had the functions and data types I needed, then I go and head and implement them to make it work (and only make that particular use case work).
If I later on realize I needed more generality I go back and refactor those functions/types.
>>
>>58127655
benis :DD has been a spurdo meme for a while

sorry I have no comments only memes
>>
>>58127639
Fuck ubuntu?

Fuck you.
>>
>>58127639
I had no issue installing node or npm on Ubuntu. You are doing something wrong and putting the blame on your distro.
>>
>>58127654
Debian rhymes with plebian.
I'll bet you think that's just a coincidence.
>>
>>58127617
The mean a type that overloaded operator>>() appropriately.
>>
>>58127682
It's pronounced "Deb-ian", not "Deeb-ian".
>>
>>58127632
>programming MCs in JavaScript and Python
you kek
>>
File: bane.png (716KB, 998x600px) Image search: [Google]
bane.png
716KB, 998x600px
Any msp430 ams programmer here?

I need advice.
My cpu is 16bit.
Now lets assume that I have
[r15] = 4300

now

cmp #0x615a, 0x0(r15)


From what I understand 0x0(r15) it is indexed addressing mode so it point at memory location that is stored at r15 with 0 offset.

Now in 0x0 r15 is 1byte stored (two hex values), how is it possible to compare 2 bytes?

or this compare is going to compare 61 with 0x0(r15) and 5a with 0x1(r15)

?
>>
>>58127639
>because of hash mismatch
can you post some errors? it sounds like you did something stupid and I never had this problem
>>
>>58127699

>what is c#
>what is c++
>what is java

time to retire, granny
>>
>>58127697
Toemayyytoe Toemahtoe
Plehbian Dehbian

It doesn't matter, motherfucker.
>>
>>58127724
>programming in virtual machine
>needing classes on 4KB
you kek2
>>
>>58127611
Because if C is the correct tool for your job you can't and shouldn't be including generic and superfluous shit left and right.

C is for where you need an efficient hand-crafted solution. If you're an artist making a sculpture you generally don't suddenly decide to not do the arms yourself and go buy a whole mannequin just to glue its arms onto your sculpture.

(You can still practice code reuse)
>>
>>58126229
C isn't a common choice for compilers anymore. C++, maybe, but C is quite rare. Even GCC uses C++ now.
>>58127042
>ads in a messaging client
nobody will use your app. just get people to start using it and then find investors
>>
>>58124966
I wanted to be the devil's advocate and say that IPFS do adds DNS and naming conventions to the Bittorrent network but that's foolish, DNS is centralized...
>>
>>58127449
I'm guessing at this point I'm dealing with algorithms and perhaps getting closer to data structures?

how do most developers go about figuring out the best algorithm? like are there tools I can use to help me figure out the best algorithm? do they use flowcharts or pseudocode? Just looking for some good practices. want to look at my monitor as least as possible.
>>
>>58126229
>Now days a lot of people write new languages in C.
Maybe if they're fucking retarded. ML and its derivatives (including Haskell) exist.
>>
>>58127763
ML?
>>
>>58127751
>Even GCC uses C++ now
Technically yes, practically no. Just take a look at the source code.
Excluding the C++ shit in GCC, everything else is practically C. They even still have the .c extension on most of their files.
>>
What do you guys think will more likely take off: augmented reality or virtual reality?
>>
>>58127774
neither
>>
>>58127772

Fact: GCC is trash
>>
>>58127692
I thought that too, but the book i'm reading hasn't covered operator overloading yet.
Only constructors with an istream& param.
>>
>>58127701
AFAIK there's a prefix / modifier that can be applied to the instruction which specifies what kind of value is at the memory address (byte, word, dword, etc.). Most, if not all, assemblers will automatically apply the correct prefix based on what register or immediate (constant) you are comparing it to.
>>
>>58127791
GCC is OK, but I find clang to be faster to compile with on-par performance.
>>
>>58127774
augmented virtuality obviously
>>
>>58127774
VR is more likely to get me off.
>>
>>58127774
Both silly fags, but VR is already finished. It was a fad and it has long passed as such.
>>
>>58127791
>GCC is trash
>said a trip fag on a chinese knitting image board
>>
>>58127800
From cppreference:
>std::istream_iterator is a single-pass input iterator that reads successive objects of type T from the std::basic_istream object for which it was constructed, by calling the appropriate operator>>.

It appears your textbook is being shitty and using material that's covered later.
>>
>>58127811
i agree. augmented reality seems more reasonable and applicable in the real world.

I feel like augmented reality is genuinely where the software industry is headed.

so i'm wondering what devices will resonate best with this technology and what languages will also be most beneficial. thinking c++ since its more resourceful than java.
>>
>>58127841
I will say though, VR seems like it could have some really cool applications outside of what it's commonly been used for (video games). Maybe still media, galleries, movies, or job applications like training simulators for pilots or quarry truck drivers. But for muh gaymes, it's really silly, because you get a massive lack of peripherals (two hands and a camera as your eyes), so it limits what the game can achieve in complexity, but you also get a massively limited immersion (rock climbing, but with your feet still on the carpet in your socks, you just get vertigo when you look down)
>>
>>58127894
i feel like the best device might be the car especially when they become completely self driving and electric.

imagine being able to be on the road driving anywhere for virtually no cost and without the exhaustion of having to drive. at that point people can probably live in their cars comfortably.

make a whole computer out of the car and just play games as it drives you across the country.

man i want this to happen.
>>
>>58127706
I'm on work wifi and forgot to authenticate :^)
>>

def christmas(person):
if person == ME:
print ("You've been a very good boy! You are given the gift of Haskell, the perfect lanugage.")
elif person == DPT:
print ("You've been naughty. Slow code and memory leaks willl come to you.")
else:
print ("bane?")
>>
>>58128167
>python
>memory leaks
>>
>>58127751
>nobody will use your app.
People say this about everything I launch.

Also I should find investors.

Hearing how the reddit founders got money when they didn't have any money and didn't even come up with the idea for reddit blows my mind. They got money for being likeable.
>>
>>58127751
>C isn't a common choice for compilers anymore. C++, maybe, but C is quite rare. Even GCC uses C++ now.
Wrong. They just allow for C++ code if it doesn't use a lot of C++ features and is readable by C programmers. Most of GCC still is C.

https://gcc.gnu.org/ml/gcc/2010-05/msg00705.html
>>
>>58127042
>It's for normies. It's an anonymous messaging app.
It sounds like a good idea. I started developing the same thing some years ago but moved on to other projects.
>>
File: 2016-12-22_16-28-32.png (11KB, 365x504px) Image search: [Google]
2016-12-22_16-28-32.png
11KB, 365x504px
Wrote a maze generator in ruby just for kicks.
>>
>>58128252
This is really cool. Is the code open source?
>>
>>58128252
now write a solver for it.
>>
File: hax.png (20KB, 960x230px) Image search: [Google]
hax.png
20KB, 960x230px
>tfw relatives are visiting and im in my parents basement hacking
>>
>>58128252

Did you use Prims?
>>
>>58128284
It's a randomized depth-first search: https://en.wikipedia.org/wiki/Maze_generation_algorithm#Depth-first_search

Basically, it walks a meandering path. If it hits a dead end, it backtracks until it's not a dead end, and continues meandering. It eventually steps on every tile.
>>
>>58128314
Go up there and visit, leave being a shut-in for later
>>
>>58126719

Seems to only work for inputs up to size 9, so it's not that complex. Nonetheless, I'm going to use it as a test program for my brainfuck compiler. It seems to check out.
>>
>>58128330
No way, man. I only have enough energy stored to go to the liquor store.
>>
>>58128252
>>58128285
You can't, that is unsolvable.
>>
>>58128337
you can run it here without inputs

https://copy.sh/brainfuck/

and produces a big as fuck tree
>>
>>58128349
not with that attitude
>>
>>58128344
if only there was something for solving that
>>
>>58128376
chip 8 emulator?
>>
Just fucking around with fractal art generation in MATLAB, planning to build an XMPP server in Go, for the hell of it soon.
>>
>>58128379
no, it's a menu system for my TV project
>>
>>58128393

Add a chip8 emulator to your TV menu system.
>>
>>58128400
not unless somebody streams a CHIP-8 emulator over the network
>>
>>58128400
>>
File: 32867qewydu.png (251KB, 338x366px) Image search: [Google]
32867qewydu.png
251KB, 338x366px
>>58128400
you like these?
>>
>>58128350

Going to that website, if I run it without entering any inputs, it causes Firefox to lock up. If I give it an input of 30, it creates a tree of size 3. Similarly, my own compiler produces a tree of size 3 for an input of 30.

Also, this is my compiler's outputted assembly:
https://hastebin.com/onujihisek.go

Note that it is ugly as sin. The only thing I can optimize is turning repeated + or - instructions, or repeated < or > instructions, into a single add or subtract.
>>
Holy fuck this is poo in the loo tier stuff right here.

People seriously call Haskell elegant?
>>
>>58128400
The more i'm thinking about it, the more i'm liking the idea of an integrated game. Maybe do pong with IR remotes?
>>
>>58128541
It's only possible to do better with certain type system extensions.
>>
>>58128329
Cool! Thanks for sharing!
>>
>>58128558
>m-m-muh types!!
>>
>>58128599
If that's so poo in the loo and unelegant, let's see your alternative.
>>
>>58123966
>>58123978
speaking of
(defn -main
[composite]
(def vectormap [])
(loop [divisor 1]
(if (< divisor composite)
(if (integer? (/ composite divisor))
(do (def vectormap
(conj vectormap
(hash-map :divisor :number (/ composite divisor))))
(recur (inc divisor)))
(recur (inc divisor)))
vectormap)))


Why won't this run outside of the REPL?
I need to compile it so I can run it on my desktop, but I can't even get it to run in leiningen
>>
>>58128602
Mathematica doesn't have Tuples but I'd do this

zip[ls__List] := Take[#, Length /@ {ls} // Min] & /@ {ls} // Transpose


>> zip[{1, 2, 3}, {4, 5, 6, 7, 8}, {a, b, c, d}]
{{1, 4, a}, {2, 5, b}, {3, 6, c}}
>>
>>58128657
Lists aren't tuples.
>>
>>58128663
Tuples aren't that necessary then I guess.
>>
>>58128425
>>58128461
>>58128545

Anything is possible.
>>
>>58128674
For example if i wanted to restrict a function to "Tuples" in Mathematica I could just use parameter constraints.
>>
>>58128700
What games would you want to see embedded? I like pong since it is homage to older TVs
>>
>>58128650
I'm getting this error in bash

Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
>>
>>58128674
I mean if you're okay with the issues that come with making it all dynamic and not static then it's decent, I guess. Haskell can also do it the more dynamic way.

In Haskell + some extensions or something with a similar type system you can do:
data Lists :: [*] -> * where
LNil :: Lists '[]
LCons :: [a] -> Lists as -> Lists (a : as)

data Tuple :: [*] -> * where
TNil :: Tuple '[]
TCons :: a -> Tuple as -> Tuple (a : as)

zipH :: Lists as -> [Tuple as]
zipH LNil = []
zipH (LCons xs LNil) = TCons <$> xs <*> pure TNil
zipH (LCons xs ls) = zipWith TCons xs $ zipH ls
>>
>>58128736

Breakout is a good one, and fairly simple, too.
>>
>>58128911
Example usage:
zipH (LCons [1, 2, 3] (LCons ['a', 'b', 'c', 'd'] LNil)) = [TCons 1 (TCons 'a' TNil), TCons 2 (TCons 'b' TNil), TCons 3 (TCons 'c' TNil)]
>>
>>58128960
That's gobbledygook.
>>
File: vorschau_lb19.jpg (126KB, 1280x720px) Image search: [Google]
vorschau_lb19.jpg
126KB, 1280x720px
>>58128650
>>58128778
Please help this is so frustrating
>>
>>58129028
So is
BinaryOp @@@ l /; AllTrue[l, Length[#] == 2 &]
.

At least you can see the Haskell is just applications of constructors.
>>
What would be a good approach to merging multiple sorted arrays into a single sorted array?

e.g. I have sorted arrays like:

[1, 2, 3, 4]
[1, 3, 5, 10]
[4, 8, 10, 12]

And would like to end up with:

[1, 1, 2, 3, 3, 4, 4, 5, 8, 10, 10, 12]
>>
>>58129050
Yeah but it's pretty self-explanatory if you try a few things out. I don't know how someone would experimentally tease out the meaning of that Haskell code.
>>
File: 1463293854951.gif (631KB, 440x247px) Image search: [Google]
1463293854951.gif
631KB, 440x247px
Repeat after me /dpt/

"developers aren't sysadmins. I will stop lying to my boss to get admin rights".
>>
>>58123978
>he doesn't know that 4chan is 100% about contrarian and ironic memes
>>
>>58128226
it require a C++ compiler mate
>>
>>58129140
fuck it dude just flatten it and sort 'em again
>>
>>58129159
Because you don't have to? It's just data, WYSIWYG. You read (TCons 1 (TCons 'a' TNil)) as (1, 'a').
>>
>>58129182
It's obviously as part of implementing merge sort so that's a terrible answer. It's a terrible answer either way, actually.
>>
>>58129160
no
>>
>>58129182
I'm talking thousands of arrays with millions of elements each here.
>>
>>58129198
Well you'll have to do some sorting of the leading elements of each array so that's still sorting a thousand elements a million times.
>>
>>58129185
Is that how other functions expecting tuples would interpret it?
>>
>>58129160
>developer types out command to sysad using chat program
>sysad pastes command into terminal
>sysad pastes stdout back to developer
why is this a good system?
>>
>>58129241
They would pattern match using that syntax, yes.

You could do it with operators instead to make it a bit nicer if you wanted.
>>
>>58129245
Explain the scenario this has actually happened to you, or are you mistaking the arch Linux irc for a job?
>>
>>58129198
is it time-critical?
>>
>>58129269
i've filed tickets in JIRA for exactly that, waited a few days for the result too
>>
>>58129273
Not particularly but I'm writing it on my own to make it faster in the first place since it takes 10 minutes ATM.
>>
>>58129290
what I normally do in such cases when I have to solve an esoteric problem is to retreat to my comfy thinking chair and ponder the problem for as long as it takes.
>>
>>58129283
Again, scenario? I can't imagine any place with more than 5 employees copy and pasting a command into a production server.
>>
>>58129312
I wanted a program installed on a server, can't remember which one but was related to audio encoding.
>>
New thread:

>>58129383
>>58129383
>>58129383
>>
New thread:

>>58129408
>>58129408
>>58129408
>>
>>58129398
>>58129414

So do we post in the less gay thread or the one that was posted first?
>>
>>58129425
You know the rules. It's not gay if you're following the rules
>>
>>58129425
I'm posting in the (slightly) less gay one, recommend you do the same.
>>
Less gay thread has more posts. Moving there.
Thread posts: 316
Thread images: 30


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.