[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: 89
Thread images: 6

Old thread: >>59001874

What are you working on, /g/?
>>
>>59008157
This book is way more useful than Haskell.
>>
>>59008172
I have read this book.
>>
>>59007972

>>59007972

>>59007972

We have a thread, stop thread splitting.
>>
>>59008172
It looks old.
>>
>>59008220
That thread is not going to have any proper discussion
>>
File: 1487458294273.png (171KB, 1754x2643px) Image search: [Google]
1487458294273.png
171KB, 1754x2643px
What's the point of C again?
>>
>>59008259
>meme benchmarks
>>
>>59008259
>asks what the point of C is
>shows a picture comparing C++ with meme-lang
>>
>>59008280
C++ is a proven trash, now on with C
>>
Will Golang ever be an alternative to writing android apps in Java?
>>
>>59008259
It's an incumbent language with actual library and tooling support, and that's not C.
>>
>>59008357
>C
>tooling support
not so fast
>>
File: 1487461582012.jpg (57KB, 1573x426px) Image search: [Google]
1487461582012.jpg
57KB, 1573x426px
>>59008357
That language has massive flaws though
>>
>>59008326
Without a convenient way to access Java API from Go, no. And since Go's type system isn't isomorphic to Java's, I don't think Go will ever replace Java for Android.
>>
>>59008392
oh shit
>>
redpill me on this rust vs c meme
>>
>>59008822
Rust is for cucks and C is for white man
>>
>>59008326
y tho
>>
>>59008822
rust is made by mozilla webfags because C/C++ is too hard for them so they need something """"safer""""

but rust is like a retarded version of C++, it offers no tangible benefits over C++ and it's much less popular (which matters when you need to find people to work on your team)

also
>https://www.rust-lang.org/en-US/conduct.html
>>
File: 1487463346465.png (100KB, 1244x1024px) Image search: [Google]
1487463346465.png
100KB, 1244x1024px
>>59008822
>>59008972
>>59009012
>>
>>59009049
kys
>>
>>59009055
no
>>
>>59008860
Will C and ASM save america from niggers and cucks?
>>
>>59008822
Rust is like a redesign of C++ with some 30 years of hindsight. A lot of /g/ hates it because /g/ is full of people who like to roleplay as expert programmers and feel validated by writing their fizzbuzz programs in an unsafe language, see: >>59009012

>>59009012
modules instead of retarded header system from the 70s
algebraic data types
hygenic macros
pattern matching
immutability by default instead of spamming const everywhere (or not)
traits (which C++ has been trying to add in the form of concepts for the past decade without success)

Really, you should have just stuck with the usual cucks/sjw mantra instead of trying to make a substantive post. No one can argue any facts that way.
>>
>>59009168
The problem with rust is it will take them 5 more years to get Non-Lexical Lifetimes, if we're lucky.
And in the meantime it's pushing a lot of people away, because correct code that ought to work is rejected for no reason by the compiler.
>>
>>59009168
the syntax alone is enough to repulse people
>>
>>59009211
babyduck or stockholm?
>>
>>59009194
>5 more years to get Non-Lexical Lifetimes,

What makes you think it's going to take that long? From what I've read that was largely the goal changing their IR from LLVM's default and they've already accomplished that. I didn't have the impression it was far off.

I agree it drove me away. Fighting with the borrow checker where I knew I was in the right drove me to learn C++.
>>
>>59009211
Only the fools who are afraid of anything they don't already know.
>>
>>59009012
>autism
>>
>>59009228
>>59009235
come on, it's on par with C++ at best, and C++ is not a pretty-looking language, if they wanted to come up with a substantial improvement they could have made a better syntax
>>
>>59009234
It might sound pessimistic, but I'm afraid it might not be too far off, NLLs in rust is a very non-trivial goal.

First the design itself is far from settled, even though the problem is already more than four years old and very well known at this point.
Then there's the fact that it's a surprisingly deep change to the language (and the compiler), with many prerequisites that are just starting to come together, among those the new MIR work.
And finally it doesn't seem to be a priority in the roadmap, even today. More of an afterthought that received far too little attention to hope for significant progress.
>>
>>59009266
Rust started off largely as an ML derivative but supposedly the designer chose C style syntax for popular appeal and ended up with the current puke. It's inappropriate for a lot of the intended semantics of the language. C++ programmers don't have any ground to complain about syntax but some of the especially functional style Rust is ugly on a whole different level and just degrades into a mess of curly braces, parens and vertical bars
>>
>>59009266
Rust is a bit more complex than C++

Even printing a line takes a macro. But Rust is a good language, the new languages will be influenced by Rust

Rust is still better than C++
>>
>>59009335
>Even printing a line takes a macro.

I think most people would rate that better than the streams API.
>>
>>59009412
This is correct.
>>
D > Rust
>>
>>59009503
Thanks D, your approach was noble but the garbage collector kinda ruined it
>>
>>59009503
D was a good name for a Dead language.
Enjoy your GC. Even Alexandrescu gave up on it.
>>
>>59009521
>Enjoy your GC.
Thanks, I will!
>>
>>59009596
Good for you, you must be the only one.
Because everyone who doesn't care about performance and predictable behavior is already using python.
>>
>>59009620
I think it has better performance than C#
>>
>>59009639
Then you need to look at the benchmarks.
>>
>>59009639
you may as well use java/C# if you don't care about GC and being several times slower than C
>>
File: 1474738786656.jpg (28KB, 286x429px) Image search: [Google]
1474738786656.jpg
28KB, 286x429px
Why do people defend C++ when Ada is better in every way?
>>
>>59009746
o'rielly books are autistic
>>
>>59009746
Ada is more verbose then fucking java.
>>
>>59009764
Prove it, my man
>>
>>59009746
>adafags shitting up another quality thread
>>
Best c++ IDE?
>>
i just want C with namespaces tbqh
>>
It doesn't matter.
If you like your language, stick to it and make programs with it
>>
>>59009813
eclipse
>>
Why do programs like atom crash on large files?
What's wrong, it's just a text editor.

I'm trying to make my own text editor and I have to know what causes things simple as text editros to crash?
>>
>>59009789
12 lines, still readable:
public class FizzBuzz {
public static void main(String[] args) {
final String EMPTY = "";
for (int i = 1; i <= 100; i++) {
String value = EMPTY;
if (i % 3 == 0) value += "Fizz";
if (i % 5 == 0) value += "Buzz";
if (value == EMPTY) value += i;
System.out.println(value);
}
}
}


16 lines, and really calling for some extra blank lines:
with Ada.Integer_Text_IO;
with Ada.Text_IO;
procedure FizzBuzz is
begin
for i in 1 .. 100 loop
Ada.Integer_Text_IO.Put (i);
if i rem 15 = 0 then
Ada.Text_IO.Put (" FizzBuzz");
elsif i rem 5 = 0 then
Ada.Text_IO.Put (" Buzz");
elsif i rem 3 = 0 then
Ada.Text_IO.Put (" Fizz");
end if;
Ada.Text_IO.Skip_Line;
end loop;
end FizzBuzz;
>>
>>59009860
It's a browser my man.
>>
>>59009764
What the fuck does that even mean? You know what's verbose? Fucking C, where every other line is an if statement making sure you didn't crash.
>>
>>59009815
Namespaces are a useless feature that just fucks with C's simple ABI.
Although, C technically does have namespaces, just not in the way you're probably thinking of.
>>
>>59009873
Error checking is required in literally every language.
And if you'd ever looked at the IOCCC you'd know C is one of the most compact languages around, when it needs to be.
>>
>>59009878
You made that exact same post like a week ago, are you a bot?
>>
I want to fork https://github.com/limetext/lime
>>
>>59009905
Almost all other languages don't need it to the extent c does and the goal of making a program small isn't a good goal in the first place.

>>59009868
That's so cherry picked you deserve a (You)
>>
>>59009868
>More than 1 statement per line
That's cheating, you douchebag.
Although I can agree that both Ada and Java are shit.
>>
>>59009976
>>59009994
explain
>>
>>59009976
>That's so cherry picked you deserve a (You)
Thank you, it was pretty cherry-picked tbqh.
Still, Ada is pretty verbose.
>>
>>59010009
>if (i % 3 == 0) value += "Fizz";
That is supposed to be
if (i % 3 == 0)
value += "Fizz";

and if you really want to have a fair comparison with the Ada example, it should be
if (i % 3 == 0) {
value += "Fizz";
}
>>
>>59010009
Put in a
[use Ada.Text_IO]
And then putting the prints in one line just like the Java well like just fine. Use put_line instead of put and remove the integer_text_io import since it's not useful. Wow, I think that makes it shorter than the Java version and better more readable.
>>
Is x86 assembly difficult to learn?
>>
>>59009868
Isn't the Ada version wrong though? You're not supposed to output the number when the Fizz/Buzz conditions are met.
>>
>>59008326
gomobile... I haven't used it, so don't ask me
>>
>>59008157
I'm hoping to increase my GitHub contributions and have a few more examples of personal projects. I was hoping to contribute to a GitHub project, maybe spinning up an instance in Jenkins and filing a few bugs.

Here's the dumb question: how can I trawl GitHub for an example?
>>
>>59009878
>Namespaces are a useless feature
lol. it should at least be possible to refactor namespace-emulating prefixes conveniently using the IDE. maybe vim/emacs has a plugin for that, idk
>>
>tfw you realize that 90% of programming is just familiarizing yourself with libraries other, smarter people have made
>then you put them together into your own libraries so that people even dumber than you can then put those together

what

a

world
>>
I want to write a console C/C++ program that takes command input like bash. What simple/tutorial projects or things should I be looking at?
>>
>>59008157
>What are you working on, /g/?- 70 posts and 4 image replies shown.
I haven't started yet, still thinking about how to go about it. I want to add a feature to nemo (cinnamon's file manager) so that you can list directories in the cwd by size, as a file property column. The tricky part will be making sure that this feature doesn't kill responsiveness.
>>
>>59010245
t. webdev/gui monkey
>>
>>59010245
Only if you're some stupid brainlet.
>>
>>59010247
>C/C++
Why are you grouping two completely different languages together?
>>
>>59010247
linenoise
>>
>>59010261
>>59010266
not the other anon, but... an example of what he says:
http://blog.zikes.me/post/how-i-ruined-office-productivity-with-a-slack-bot/
>>
>>59010294
that's just a casual social media bot toy program and he's a literal webfag
http://blog.zikes.me/post/serving-multiple-sites-from-one-go-process/
>>
>>59010352
>that's just a casual social media bot toy program and he's a literal webfag
so, what's the problem? he made something that could be useful, from libs that allow him do that.

what, do you feel like an elite hacker for writing libs like those, libs that other people will end up using?
>>
>>59009868
Really triggering my almonds...
with Ada.Text_IO; use Ada.Text_IO;
procedure FizzBuzz is
begin
for I in 1 .. 100 loop
if i rem 15 = 0 then Put_Line (" FizzBuzz");
elsif i rem 5 = 0 then Put_Line (" Buzz");
elsif i rem 3 = 0 then Put_Line (" Fizz");
else Put_Line (Integer'Image (I));
end if;
end loop;
end FizzBuzz;
>>
>>59010285
Thanks.
>>
>>59008389
>barber slices the throat of his client with a straight edge blade
>somehow it's the blade's fault
>>
https://blog.pusher.com/golangs-real-time-gc-in-theory-and-practice/
>>
>>59010663
>source to destination in less than 100ms
Whoa, did they turn on the Turbo button on their 386?
>>
>>59010712
it's webfaggotry so hopefully it includes network latency
Thread posts: 89
Thread images: 6


[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.