[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: 319
Thread images: 25

File: llvm.jpg (514KB, 600x765px) Image search: [Google]
llvm.jpg
514KB, 600x765px
Old thread: >>59012259

What are you working on, /g/?
>>
First for Haskell
>>
First for Source Mage.
>>
cute
>>
Yesterday I finished a program I've been working for the last few weeks

I feel like I have PPD
>>
>>59018426
https://tour.golang.org
>>
Daily Reminder: Rust is the safest and fastest language
>>
>>59018609
>
>>
>>59018631
What do you mean by this? He's right.
>>
File: perfect.jpg (202KB, 1241x326px) Image search: [Google]
perfect.jpg
202KB, 1241x326px
>>59018609
>>
>>59018650
It might be an optimal combination of the two but it's not really the best of either of those things in isolation.
>>
>>59018672
what's the safest and fastest in your opinion?
>>
>>59018609
This is what retards actually believe.
>>
>>59018700
Not him, but...

>safest
Ada

>fastest
C and C++ (if used correctly)
>>
>>59018720
I don't even know where to start.
>>
>>59018700
>safest

(insert random useless theorom prover here)

>fastest

FORTRAN
>>
I want to sleep but I can't force myself wat do /dpt/
>>
>>59018753
Start with the Greeks.
>>
>>59018762
This will be funny by the 12th time you post it, I guarantee you.
>>
>>59018779
You right.
>>
>>59018779
it is, in >>>/lit/
>>
>>59018426
I wish my programming books were illustrated by manga artists.
>>
CS student here.

Anybody know some books/things to do to get more training in computer engineering?

Besides playing around with a raspberry pi.

School only has one class for cs majors for embedded systems and i can't take it yet.
>>
File: 1485388994578.jpg (71KB, 640x480px) Image search: [Google]
1485388994578.jpg
71KB, 640x480px
>>59018839
I keep hearing good things about this:
http://www.nand2tetris.org/
>>
At a quick glance I thought OP's picture was another Ujiie Moku doujin and got very excited.
>>
File: its-shit.jpg (192KB, 1031x749px) Image search: [Google]
its-shit.jpg
192KB, 1031x749px
>>59018426
How does llvm work?
>>
>>59019398
very badly if at all
>>
>>59019415
But how does the compiler work? I hear it made some kind of intermediary instruction set for all languages and compilers just target that instead.
>>
>>59019433
Yeah, LLVM IR
>>
Why do C programmers like using short variable names everywhere?
>>
>>59019504
Because historically the C standard only required support for a minimum of like 8 characters in symbol names. People then butchered their codebases in an attempt to be "portable".
>>
>>59019504
They're secretly Haskell programmers
>>
>>59019504
Because clarity is often achieved through brevity.
>>
File: rage.jpg (57KB, 445x459px) Image search: [Google]
rage.jpg
57KB, 445x459px
>writing a software rasterizer
>recreate the same setup (vertex coords, camera fov, clip planes) in blender, an opengl test app, and my renderer
>the other two output a 32x32px rectangle
>mine outputs 29px
>64px reference = 56px in mine
FUCKING SATAN'S HAIRY CUNT HOLE
I wouldn't care about matching reference if I knew what caused the difference, but the fact that I can't make them match implies that either I don't truly follow what's going on or I'm making a serious rounding error somewhere.
>>
>>59019504
Because strcpy doesn't really copy strings, it's a shortcut for some short useful sequence of instructions that you pretty much need to "feel" in a sense to know you're using them right. DoWhatIMean is a myth, so calling it cooy_string doesn't help; on the contrary, an unfamiliar name renders the abstractedness of the thing. We can't afford to forget that we fight completely on our computers' terms.
>>
>>59019870
Assembly languages are even worse in that regard, and that's not a mistake.
>>
What are some decent active /g/ related IRCs?

I find programming really fucking boring on my own.
>>
File: IMG-20160330-WA0000.jpg (21KB, 553x119px) Image search: [Google]
IMG-20160330-WA0000.jpg
21KB, 553x119px
Solve this problem for me, /g/ I don't have a programming environment atm.

>4 people must cross a bridge. It's dark so you need a lantern, and you've got only one. The people walk at different speeds: one crosses the bridge in 1', the others in 2', 5', and 10'. There can be at most 2 people on the bridge at the same time because it's shaky, and the quicker one must adapt its pace to the slower one to share the lantern, which then has to be brought back by one of them. How much time does it require at least to bring everyone to the other side?

I think the idea is to lazily construct a graph with situations in the nodes and alternatives in the edges, and then A* your way through it, but I can't guarantee that. Anyone?
>>
>>59020158
s/alternatives/alternative courses of action/
>>
>>59018609
Javascript is faster though :^)
>>
>>59019398
It uses rotational velocidensity to transpile the BIOS RAM into a compressed bytecode image.
>>
Should you use glib when programming with C or is there some better alternative?
>>
so i have defined this escape sequences:

   BACKSPACE -> \b
SINGLE_QUOTE_CHARACTER -> \'


i'm trying yo write a regexp that if those escape sequences appears in some text, it throws an warning

would this work?
[^\b\\\']
>>
>>59020158
isn't it always best to just have the fastest guy have the lantern and have him bring everyone over the bridge one by one?
>>
>>59020406
1. Square brackets only match any of the individual characters given, it won't match a multiple character sequence.
2. You've negated the character set given, so effectively what that regex will do is match any character that's not \ or '
3. \b is significant in regex, it represents a word boundary. it also needs to be escaped.

If you're actually trying to match the literal strings \b, \\, and
\'
, you could do:

(\\b|\\\\|\\\')
>>
>>59020524
what the fug. that's not where I put the code tags
>>
>>59020426
Seems it's not. That would take you 10+1+5+1+2 minutes, which is 19', but here follows a solution in 17', and I heard you can do it in 16', so I want to put the matter to rest.

>start
>1 and 2 go (elapsed time: 2')
>1 comes back (elapsed time: 3')
>5 and 10 go (elapsed time: 13')
>2 comes back (elapsed time 15')
>1 and 2 go (elapsed time 17', done)
>>
>>59020524
>>59020550
thanks for replying.
basically i have this
Allowed:
FORM_FEED -> \f
NEWLINE -> \n
CARRIAGE_RETURN -> \r
TAB -> \t
BACKSLASH_CHARACTER -> \\
DOUBLE_QUOTE_CHARACTER -> \"

Not allowed:
BACKSPACE -> \b
SINGLE_QUOTE_CHARACTER -> \'


if any of the "not allowed" shows up, it should thrown an error
for the allowed i had
[\f\n\r\t <not sure what to write next>]
>>
File: 12830560100.jpg (624KB, 1066x1094px) Image search: [Google]
12830560100.jpg
624KB, 1066x1094px
>>59018426
>>
Java is the best programming language.
>>
>>59020615
>for the allowed i had
1. That regex is shit wrong for the same reason as the other
2. Why should one search for the allowed escape sequences anyway? You'll just do nothing when finding one, and if you think about it, if all the other things are neither allowed nor disallowed, what are they?
3. Are you sure the point is the literal escape sequence and not the non-printable character it stands for?
>>
File: 1487463703061.png (100KB, 1244x1024px) Image search: [Google]
1487463703061.png
100KB, 1244x1024px
>>
>>59020689
>>59020670
>>
>>59020615
Are you trying to match strings or are you actually looking for literal newline characters and tabs and such in text?
>>
>>59020689
C++ doesn't allow overloading/specializing everything.
Rust doesn't have overloading at all.

By that logic ASM is the perfect language. It's so simple none of the features need any workarounds when you fail to understand them.
>>
>>59020670
Hi, how's the weather in Mumbai?
>>
>>59020704
Java hatred meme originates from Micros**t shills trying to promote their Java Ripoff called C#
>>
>>59020734
Enjoy your broken templates
>>
>>59020758
I can't, none of them are broken.
>>
>>59020740
ばかなの?
>>59020744
Java is unironically a bad language.
>>
>>59020670
>Java
you misspelled "Go"
>>
>>59020771
No, he didn't say most retarded.
>>
>>59018609
Safest - maybe.
Fastest - fuck no. Maybe in 5 years, when the compiler does not suck ass.
>>
>>59020799
>LLVM
>Sucking ass
I'm not a Rust fanboy, but that's pretty retarded. They're not even behind in the benchmarks.
>>
Python 3 Here
The guy who was making a tic tac toe shit game
Posted here before but my code was dirty as fuck so I cleaned it but I still encounter the same problem, please help.
So i have this function
check3()
which like the name implies it checks for a line of three X's or O's
for a in listcombi:
print(sum(a))
if sum(a) == 3:
P1W = True
gameend = True
elif sum(a) == -3:
P2W = True
gameend = True
else:
pass

I have a print(sum(a)) there because I want to know if this is working correctly and it does, when there is a line of 3 X's it prints 3 and of O's -3, and if i make it to print gameend it comes out as True, everything is good as it is now, but I have a function which ask the input for the user and if gameend = True this function should stop
def askinput(P,N):
check3()
if gameend:
return winner()
else:
#Everything

So the function runs 9 times, 5 times for Player 1 and 4 Times for Player 2, but when gameend = True, the function keeps running and doesn't return
winner()

What the hell is happening ?
I need help
By the way winner() is defined before check3() is defined
>>
>>59018539
What does go let me do more easily that I couldn't do in another language?
>>
>>59020837
experience pain
>>
>>59020811
LLVM is only the backend. rustc first has to desugar Rust code and optimise in all the ways trait magic was promised to enable. So far it does not do that to a satisfying degree. If you hand LLVM some high level abstracted code, don't expect it to produce very fast machine code.
>>
File: 1486840605145.png (310KB, 1005x742px) Image search: [Google]
1486840605145.png
310KB, 1005x742px
So which one of you faggots ruined their job interview?
http://workplace.stackexchange.com/questions/85255/how-should-we-evaluate-a-candidates-strange-behaviour-in-an-interview
>>
>>59020834
just have check3 return gameend and use if check3(): return winner()
>>
>>59020764

Baka nano - Are you stupid? Or What are yoy, stupid? Apparently it's some meme.
>>
>>59020870
So devirtualization, or templates/inlining ruining your icache in C++.
Both have in theory high level abstractions that are hard to evaporate away, but in practice it doesn't matter in the benchmarks because you'd have to write spectacularly bad code for it to be noticeable.
>>
>>59020834
Are you even using a loop somewhere in there? It sounds like you're doing it recursively or misunderstanding what return does. Poast whole code, I can't reason on partial information.
>>
>>59020891
>John deliberately avoided every woman he met. Rather than asking the female receptionist for directions, he emailed one of the owners and waited for the Head Developer to take him to the interview room.

Fucking kek
>>
>>59020837
Concurrency, writing servers, reading and maintaining others' code. Everything else is anywhere from meh to >>59020855
>>
>>59020896
木さま!!
>>
>>59020987
>>
>>59020716
in text
>>
>>59020908
Yes, but in rust the cause is a bit different. Rust fell hard for the FP meme and converting semi-FP code to something fast is a decent hurdle. The other problem is that good, fast algorithms are often invalid Rust code, because the borrow checker can't reason about them. The thing is fucking too primitive.

So, theoretically, Rust can become a really great language. Completely memory safe, high level, but optimised down to very efficient code thanks to the type system. In practice the compiler is shit and needs at least 5 more years to become viable.
>>
>tfw go doesn't even have any gtk/Qt bindings
How am I supposed to write small UI applications now?
Either: dive straight into Rust autism
or use python or Java

I want none of those obsolete C or C++ trash, might as well use ALGOL 60
>>
>>59021072
Use ALGOL 60.
>>
>>59020676
think about real programs

if the program has an invalid escape sequence, the compiler should throw something like:
Error: invalid escape sequence <%s>


the point is if you find escape sequences that are not allowed you inform the user with an error.

its like a error detection regex
>>
>>59021072
Ada has bindings and is from the Algol lineage
>>
>>59021046
>Yes, but in rust the cause is a bit different. Rust fell hard for the FP meme and converting semi-FP code to something fast is a decent hurdle.Yes, but in rust the cause is a bit different. Rust fell hard for the FP meme and converting semi-FP code to something fast is a decent hurdle.
Yes and no, Rust isn't all very far on the FP spectrum. They have lambdas just like C++, and generic algorithms like map that take lambads, just like C++. But that part isn't hard at all to optimize.
Things like encouraging a recursive style and immutable data structures would have been bad, but Rust doesn't have that.

>The other problem is that good, fast algorithms are often invalid Rust code, because the borrow checker can't reason about them. The thing is fucking too primitive.
Very true.

>So, theoretically, Rust can become a really great language. Completely memory safe, high level, but optimised down to very efficient code thanks to the type system. In practice the compiler is shit and needs at least 5 more years to become viable.
It certainly can and needs to improve, especially if you're going to write naive code and expect it to be fast.

But at the end of the day it's still a systems language, if you need to optimize Rust will happily let you go all the way down to assembler, and you'll have no excuses in the benchmarks.
>>
>>59021121
>if you need to optimize Rust will happily let you go all the way down to assembler,
>
>error: inline assembly is not stable enough for use and is subject to change (see issue #29722)
Rust is a meme until all the features necessary for systems programming become available.
>>
Go is intuitive unlike Java or C#. It's a good garbage collected language.

But I like Rust better anyways.
>>
>>59020960
>>writing servers
>implying that's the only thing you can do
when will this meme end, that Go is only useful for web stuff? have you ever looked at a list of projects that use Go? I bet you are already running at least 1 Go program without knowing...

is /dpt/ really this ignorant? do you retards do it on purpose or something?
>>
>>59021138
Rust is a young language.
Limiting yourself to stable is like using ANSI C and complaining it doesn't have a memory model with Atomic weapons.
>>
I am creating a wildlife cam for my dad with an IR sensor and a webcam.

However, I can't get the raspberry pi I'm using to record faster than 6fps, which isn't too much of a bother, but the video still plays at 30fps.
How would I manually set the playing speed?

I'm using Python+OpenCV2.
>>
>>59021157
Unstable languages are a meme for people without schedules or jobs.
>>
>>59021149
sorry.

i'm looking for an actual newline.(those escape sequences that are "invisible" in naked text)

example
hello
go to the mall
ciao


in text we have
hello\n
go to the mall\n
ciao
>>
>>59021172
ANSI C is purely a NEET language
>>
>>59021172
Calling a serious programming language a "meme" is exactly what an unemployed NEET on an Internet imageboard would say.

If you have nothing to say, shut up and go back to your deprecated languages.
>>
>>59021154
I have a lot of experience with Go. Go may be pretty good in multiple fields and completely terrible in others, but where it truly shines is servers and tools related to servers and the web in general.
>>
>>59021190
GNU C is stable and has much more systems programming features than Rust will probably ever have.
>>59021198
>a serious programming language
lmao wtf is an unserious programming language? Memers and their adjectives.
>>
>>59021224
>lmao wtf is an unserious programming language?
Brainfuck, FiM++ or Haskell
>>
>>59021170
My first thought would be to either get a faster machine or not use Python, if it does anything other than call C/C++ libraries. Perhaps both.
>>
>>59021233
He asked for a definition, not for a list of them.
>>
>>59018609

>safest
That would be Ada

>fastest
That would be C, maybe Fortran for some applications.
http://benchmarksgame.alioth.debian.org/u64q/rust.html

>>59020267

It loses every single Benchmark to Rust
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=node&lang2=rust
>>
>>59021224
GNU C isn't really as featureful as a NEET thinks. Grow up and get a job. I don't mean to disrespect GNU but GNU C is far from perfect. Rust is 2 y/o and it already competes with C++.
If you don't count the attendance of libraries C++ or Java has, Rust is already a better language ootb as suggested in >>59020689


>hurr durr no tooling etc
When C came out, there was no tooling available as well. Then UNIX was born.

Rust is not (currently) better than C in terms of libraries and performance. But there are already many interesting rust projects found on github.
Heck, Rust even has Redox OS, an OS with a microkernel architecture that HURD wanted so hard to be.

I'm not saying you should tell your boss to translate your project to rust, I'm saying that you should ditch C, it is living in it's borrowed time. Once the LLVM backend of Rust gets matured it will be as fast as C.

[irrelevant] Cargo's package managing system is amazing. No more fucking yourself in the ass with makefiles and waiting thousands of years to compile.
>>
File: 1423681299680 (1).jpg (593KB, 2121x1939px) Image search: [Google]
1423681299680 (1).jpg
593KB, 2121x1939px
>>59021224
>GNU C
>pretty much scheme given that it has setjmp and TCO
>
int x = ({ thing; another });

>what a fucking dream
I'm always frustrated about expressions being able to be statements, but not the other way around, especially because it makes no fucking sense given what it compiles down to. Why do they not understand?
>>
>>59021316
>I don't mean to disrespect GNU
Why? it's literal garbage.
>>
>>59021306
Senpai!

safest && fastest language, not safest || fastest languages
>>
>>59021329
in haskell everything is either an expression, a declaration, a pragma or an import
>>
>>59021336
I am forever obliged to GNU, I respect the philosophy
>>
>>59021340
Probably Ada, if you use the most up to date gnat.
>>
>>59021306
seems most of the performance issues in node stem from using a single core. if they learned to multithread properly i imagine they might be reach or even surpass Rust
>>
>>59021376
Do they provide cost free abstraction and a decent concurrency model?

Can I get a real comparison between Rust and gnat?
>>
>>59021178
I'm still not understanding you well. If you're looking for the actual characters it's this:

Allowed:
[\f\n\r\t\\\"]


Not allowed:
[\b\']


If you're looking for the unconverted escape sequences, you should be doing this:

Allowed:
(\\f|\\n|\\r|\\t|\\\")


Not allowed:
(\\b|\\\')
>>
>>59021407
>gnat
rustc and gnat
>>
>>59021407
Yes, but read the Barnes book and find out for yourself. http://libgen.io/search.php?req=Programming+in+Ada+2012&open=0&res=25&view=simple&phrase=1&column=def
>>
>>59021316
>Programming languages having their own package manager
A huge fucking meme that needs to die.
>>
>>59021340

For safest && fastest to hold true, safest || fastest would have to also hold true.

/*
+--------+---------+-------------------+--------------------+
| Safest | Fastest | Safest OR Fastest | Safest AND Fastest |
+--------+---------+-------------------+--------------------+
| True | True | True | True |
| True | False | True | False |
| False | True | True | False |
| False | False | False | False |
+--------+---------+-------------------+--------------------+
*/
>>
>>59021457
>pointless, silent moaning of a lonely autist that'll never be heard in real world
>>
>>59021457
You're about 26 years late on that.
>>
>>59021154
Give me some examples of go programs that I might be running right now
>>
>>59021457
How else would you easily include third-party open source libraries in your project?
>>
>>59021468
Senpai!
___(singular) not ___(plural)
Rust is the highest common denominator of the safest (haskel/JS) and the fastest language (C/C++)
>>
>>59021474
>so insecure you feel the need to attack someone with a different opinion than you
get help anon
>>
>>59021390

Actually, Node.js performs worst in the benchmarks where it has multiple CPUs under load.

>>59021505

Ada is the safest, and is roughly on par for performance.
Also, do not lump JS in for the "safe" languages. Even if I had some reasonably modern CPUs to do the job, I would not use JavaScript to manage a nuclear power plant, and neither should you.
>>
>>59021552
I would definitely not use C for a nuclear power plant.

I would however, use Rust
t. sysadmin
>>
>>59021498
>HUR DUR WHAT IS
sudo pacman -S libgofuckyourself

Protip: if your library isn't in your distros repository, and is not compiled as a normal shared or static library, then it's most likely complete meme garbage.
>>
>>59021577
>Arch
yeah, it's a complete meme garbage
lol get out
>>
>>59021574

Given the choice between C and Rust for a nuclear power plant, I would also pick Rust, although I would have some concerns, due to the fact that it is new, and that there are no actual proofs of its safety.
>>
>>59021577
Do you realize you are locking yourself to Linux and a specific distro of Linux?
>>
>>59021574
>using non mature programming language for nuclear powe plant
>claims to be sysadmin
Running website.io does not make you sysadmin...
>>
>>59021626
http://www.garin.io/rust-vs-c-pitfalls
>>
>>59021655
(you)
>>
>>59021457
>>59021577
>meme
Fuck off back to your subreddit.
>>
>>59021590
see >>59021678
>>
>>59021678
Not him, but you are the most chronic artist ever to exist in any tech (or pseudo tech) forum I have ever seen. Get help.
>>
>>59020987

Kisama, though he/she used katakana for Ki rather than hiragana like the rest of the word, it's like rudely addressing someone you don't like in a defiant way: "Bastard!"
>>
>>59021678
No, YOU need to fuck off back to your subreddit, and take back with you whatever shit memes you brought here, such as: programming language specific package managers.
>>
>>59021702
Upvoted
That fucking 'anonymous' hacker guy on this forum really pisses me off too.
>>59021712
Why do you format your posts like that, redditor?
>>59021721
I didn't say anything about programming languages or their package managers. Which I think are shit. Now back to your subreddit.
>>
File: 084.png (102KB, 300x256px) Image search: [Google]
084.png
102KB, 300x256px
>>59021721
If you don't want to use the package manager, don't use it?
>>
POST YOUR FUCKING PROJECTS RIGHT FUCKING NOW
>>
File: 1482250975767.jpg (69KB, 775x837px) Image search: [Google]
1482250975767.jpg
69KB, 775x837px
Novice here to put it kindly. I'm doing a paper, rock, scissors game for java. Think I got the basic game working as intended. The thing is that I need to have the program initiating new rounds until either the computer or the player wins three games total.

I suppose I need to but a while loop. I improvised as I went along and now I have no idea how to do this.

Should i put it in here?

public static void main( String [] args) {

Random random = new Random();
Scanner scanner = new Scanner( System.in);
String computerChoice;
String userChoice;
String winner;

showMenu();
computerChoice = generateComputerChoice( random );
userChoice = getUserChoice( scanner );
winner = chooseWinner( computerChoice, userChoice);

System.out.println("You chose " + userChoice + "\nComputer chose " + computerChoice );
System.out.println(chooseWinner(computerChoice, userChoice));

I was thinking something in the lines of

while(computerChoice<3 || userChoice<3){

stuff

}
>>
>>59021752
>that plebbit file name
Deport yourself back to your shithole.
>>59021761
>java
Deport yourself from this thread.
>>
>>59021760
n-no bully
https://github.com/ibabushkin/gabelstaplerwm
>>
>>59021760
I'm not working on anything right now.
>>
>>59021574
>t. sysadmin
opinion discarded
>>59021552
lmao, thats sad
>>
>>59021770
See >>59020744

Go back to microsoft shilling forum, parjeet
>>
no
that is not correct rendering
none of that is correct
fuck you
>>
>>59021774
lookin good
>>
>>59021785
>lonely autist in denial
now this is sad
>>
File: maxresdefault.jpg (62KB, 1280x720px) Image search: [Google]
maxresdefault.jpg
62KB, 1280x720px
>>59021774
>https://github.com/ibabushkin/gabelstaplerwm
>gabelstaplerwm
>gabelstapler
>>
>>59021787
Why the fuck do you format your posts in this way, plebbitor?
>Go back to microsoft shilling forum
You must be literally retarded if you think I somehow don't hate C# as well. They are both undeniably among the worst languages ever created.
Now back to your subreddit.
>>
>>59021851
That was an impressive demonstration of backpedaling, parjeet. But Microsoft is not going to pay you with bing points if you back off from shilling C#.
>>
>>59021791
yay
it works if I reverse every single coordinate
but I don't need to reverse coords of hardcoded test objects
so I think it might be blender's stl exporter being screwy
the special snowflake z up convention doesn't help
maybe I'll just go pirate modo
>>
File: 8YSAH2B.png (240KB, 1440x2560px) Image search: [Google]
8YSAH2B.png
240KB, 1440x2560px
>>59021760
i'm working on a kernel

if you have the skills, feel free to contribute

https://github.com/torvalds/linux
>>
>>59021904
>defends j*va
>claims to be non-indian
Your kind is not welcome here.
>>
>>59021925
>Tries to defend Java 2.0
>Claims not to be an indian subreddittor
gb2plebbit, parjeet
>>
I have a bash post-install script for my arch.
How would I configure it so that it can update any changed configurations it gets by a git update?
>>
reminder that caffeine is bad for creativity

so anon: if you have a hard time solving complex problems, spend more time sleeping and consume less caffeine! ~
>>
>>59021904

I make a lot of money as a C# evangelist. Don't knock the job.
>>
>>59021946
>that plebbit uppercase after ">"
Go be retarded somewhere else, like at ribbit.
>>
>>59021988
>capitalizing anything at all
it's like you don't even want to type like ken thompson
>>
>>59021977
>sleep 20 hours a day
>don't study shit
>somehow i can solve complex problems

kys
>>
>>59021977
just leave.
i recommend something like "tumblr" or "9gag". basically a place where people actually care about your "personal experiences"
>>
>>59021988
That, too was yet another demonstration of backpedalling, parjeet.

I hope you celebrate your screenshot in /r/india when you head back there.
>>
>>59021505
>download the source from the internet
>put in in the project directory
>add it to the project
>compile it with the rest of your project
>>
>>59021988
>Implying
>>
>>59022009
there's something like sleeping too much, anon!
please don't throw hyperboles at statements to disprove them! ~

>>59022011
please don't bully! ~
>>
>>59022025
ok

haha
>>
>>59021973
What do you mean by changed configuration?
>>
>>59022025
Meant to reply to >>59021498
>>
>>59022030
fuck off, retard. I couldn't care less about your pseudo-scientific bullshit
for someone who is almost dependent on it to function your advice is as garbage as it gets. now please go somewhere else, adults are talking here.
>>
Did a cancer inducing tripshit just reply to me? I don't know because it got blocked. kek
>>
>>59022057
why are you dependent on caffeine to function, anon?
>>
>>59022004
>ken thompson
Who?
>>
>>59022025
>t. wincuck

meanwhile with a package manager
$ cargo install racer
>>
File: .png (41KB, 1080x1920px) Image search: [Google]
.png
41KB, 1080x1920px
>>59021760
Fixing the dumbest shit in Lightning browser. Already fixed how tabs look. Fixed the back button closing tabs(what the fuck, seriously). Now I'll replace the home button with forward button and move it to the right of the address bar. That's the first phase. The second phase is to fix the way the top bar is hidden and shown - it's fucking insane, why do I have to fling fast enough in the middle of the page. Phase 3 is actually adding features - fast scroll to top/bottom buttons like in Opera and bookmarks/open tabs syncing.
>>59020670
>>59020744
Java and all its accompanying infrastructure is slow convoluted garbage. C# is fucking godly in comparison.
>>
>>59021909
looks like shit desu
>>
I work in a research environment where I use matlab, python, and R for automating tasks, calculating statistics, parsing data from databases, etc. and I'm not sure if learning C/C++ would be worth it.

what do you guys use C/C++ for?
>>
>>59022092
>Java slow, C# fast
Get a load of this /r/indian pajeet
>>
>>59022035
e.g. if I changed my .vimrc on one computer I can update it on another just by running the script and it checks if the file was updated and then replaces the original one on the computer.

Or something along those lines.
>>
>>59022098
roleplaying as a kernel hacker like >>59021909
>>
>>59022103
Speak to me again once you're employed.
>>
>>59022092
>Java and all its accompanying infrastructure is slow convoluted garbage. C# is fucking godly in comparison.
wew pajeet
that "java bad, c# good" meme is really getting out of hand
it's almost like you have no clue what you're talking about
>>
>>59022082
why do you care? it helps me a lot
>>
>>59022121
but i am.

i manage hordes of pajeets like you.
>>
>>59021804
it is definitely sad, i'll pray for you anon hugs
>>
>>59022121
>backpedaling THIS hard
>It's another episode of C# codemonkey pretending to be employed and shitty on Java: season 3
>>
>>59022127
I'm using both. And 5 more languages(only counting those I made a GUI application with). Using Java right now in the aforementioned project and everything is painfully slow.
>>59022138
>>59022145
Like I said, speak to me again once you're employed.
>>
>>59022164
top zozzle, C# NEET
>>
>>59022106
If you have ssh on all these machines you could just use rsync, have a "master" computer every other one syncs with.

I guess you could also set up set up a git repo and symlink all your configs to it.
>>
>>59022164
>Like I said, speak to me again once you're employed.
>reading comprehension

i am.

i manage hordes of pajeets like you.

i'm a project manager and i can't program for shit. not even fizzbuze or whatever the fuck
>>
>>59022136
i want to help you, anon! ~
>>
>>59022184
He still makes 6 figures while you work for 4$/hour on freelance websites pajeet
>>
I am working on simple motion tracking using background subtraction from static camera. I need some help with tweaking the result. Anyone have some experience? I am thinking about some background updating algorithm, to get rid of slow light changes and permanent changes on background.
>>
>>59022199
hahaha C# NEET pajeet so mad
>>
>>59022164
anon, what makes c# faster than java?
>>
>>59022213
because java programmers can't see sharp when they program
>>
>>59022213
It's not, it's just another buzzword ingrained by Micros**t
>>
>this java & C# autism
go away
>>
>>59022213
I mostly meant the infrastructure(that I called convoluted). Compiling 40k SLOC(most of them are generated from designers) for 2 minutes straight is a disgrace. Java itself has optimizations for number crunching(that's why it's often fast in certain math benchmarks) but once you start dealing with OBJECTS and especially collections, everything goes to trash. C# has true arrays and can allocate objects on stack, Java defaults to heap and everything is referenced.
>>
>>59022196
what's your favorite language and anime?
>>
>>59022211
I am indeed mad that they make you work for that money anon, give me a bitcoin address so I can lend a hand of help :(
>>
>>59022268
>go away
i see what you did there
>>
>>59022211
Good to know I'm fit for 80% of jobs out there.
>>
>>59022213

Structs.
>>
>>59022298
Golang is the future
>people stuck in the 80's
ASM -> C -> C++ -> (Java -> Python -> Ruby) -> Javascript
>new and aspiring programmers
ASM -> Rust -> Golang -> Web assembly

Prove me wrong.
Protip: you can't
>>
>>59022331
If you're going for meme languages Rust is objectively better.
>>
>>59022331
if that's the future then I'd rather be stuck in the past
>>
>>59022348
For low level programming.
Go should be a better option for general purpose but I'm not sure if Go wants to be.

Well, you can always trust on rust
>>
>>59022271
>Java and all its accompanying infrastructure is slow convoluted garbage.
but you claimed that both are slow convoluted garbage!
why are you backpedalling?

>C# has true arrays and can allocate objects on stack
java also has "true" array, although not "true" multidimensional arrays. are you maybe confusing the two?
neither java nor c# specify whether they allocate objects on the stack or the heap, anon.
while c# structs can get allocated on the stack more easily, they aren't always allocated on the stack.
in addition to this, structs aren't common at all.
the hotspot jvm has escape analysis, so it may also allocate objects on the stack!
i don't see where you were going here.
>>
>>59022358
You are like people back in the late 70's
>hurr durr C hipster use B
>>
>>59022272
i don't have time to watch anime, anon!
i exclusively use f star! ~
>>
>>59018700
Racket
>>
>>59022367
spare him, just a dumb microsoft fanboy
>>
>>59019491
>LLVM IR
Writing code to generate it is almost like generating assembler, except without most of the really annoying bits.
>>
>>59022379
You have time to post on here, but not enough time to watch anime?
>>
>>59022367
>but you claimed that both are slow convoluted garbage!
Quote it.
>java also has "true" array
Java arrays are always arrays of references. Nothing you can do with that.
>>
>>59022396
i just started posting after being absent for a year, please don't bully! ~
>>
>>59022379
>i don't have time to watch anime, anon!
don't reply to my posts ever again. i don't want to talk to you.
>>
>>59022414
>Java *and* all its accompanying infrastructure is slow convoluted garbage.
if you didn't mean that java was slow convuluted garbage, then why use it in that sentence?

is an int[] an array of references? primitive types are value types, anon.
>>
>>59022379
You will never become a smart programmer unless you start watching anime and wear striped knee socks
>>
>>59022427
ok
sorry
>>
>>59022427
Never fucking reply to me again unless you're contributing to the thread.
>>
>>59022463
Never fucking reply to me again unless you're contributing to the thread.
>>
>>59021749

Nope just rudimentary understanding of the English language.
>>
>>59021457
C also has package managers... they just happen to be your systems package managers

>>59021496
do you use docker/lxd?
>>
>>59022475
Never. What is the point of docker.
>>
>>59022374
sounds like you know alot about those times, care to share some stories grandpa?
>>
>>59022438
C O L L E C T I O N S
>>
>>59022497
C is a meme language for hipsters and nu-males that can't into B or FORTRAN
>>
>>59022374
haha this is funny because you use C and B as placeholders while ken's B actually preceeded ritchie's C which did nothing but add a bunch of types to B!
one could say that ritchie's C was actually just a statically typed hipster version of ken's B, haha!
>>
>>59022530
>not pdp-4 assembly
fag
>>
>>59022452
i said don't reply to me
>>
>>59022519
arrays are not collections, anon
when you're talking about collections in the context of java, you're talking about types that implement the collection interface.
there is no such thing as a type called array that implements the collection interface in java, anon,
can you please stop backpedalling? you're a mess!
>>
>>59022530
see >>59021678
>>
>>59022484
>Never
OK
do you use ubuntu?
>>
>>59022551
ok
sorry
>>
>>59022574
No I use Debian Unstable
>>
>>59022531
>but add a bunch of types
>just a statically typed hipster version of ken's B
Are you seriously implying that this was not an excellent thing to do?
Have you ever read the B "specification". It's backwards as fuck, by modern standards.
>>
>>59022438
>if you didn't mean that java was slow convuluted garbage, then why use it in that sentence?
For some reason I thought you meant Java *and* C#. A brain fart probably. Anyway, I explained why Java itself is slow in >>59022271
>is an int[] an array of references? primitive types are value types, anon.
I just checked and for arrays primitive types are indeed not autoboxed. Obviously doesn't work for collections. Meanwhile in C# you can allocate an array of structs on stack, or even do manual memory management with pointer arithmetic if you want. Java is faster in primitive cases, C# is faster in just about everything else.
>>
File: 1400624277969.gif (2MB, 164x275px) Image search: [Google]
1400624277969.gif
2MB, 164x275px
>>59022553
>Java has arrays
>You just can't use them for anything that requires a collection

>Minimum 8 bytes for each element in ArrayList<Integer>
>>
>>59022570
>t. C webfag
Get a real white man's language like B
>>
>>59022607
what are you talking about? fuck off back to your subreddit.
>>
>>59021760
https://github.com/lehitoskin/ivy
>>
>>59022331
Rust is more like a C++ replacement. Golang is a replacement for nothing.
>>
>>59022599
for structs to get allocated on the stack, they need to be sufficiently small.
for both c# and java, you can optimize for cache efficiency by grouping primitive types in multiple arrays.
c# allows you to get rid of some levels of such grouping (for instance by having an array of small structs), but there really isn't that much of a giant difference.
point is, you can write cache efficient code in both languages.

you're right about c# allowing unsafe code and that theoretically allowing you to write more efficient code, this is however a trade off in regards to sandboxing.
>>
>>59022598
no, anon, i was not implying that, haha
>>
>>59022668
>you can write cache efficient code in both languages
>All of the objects have massive amounts of padding and other shit
Good job wasting all of the space on your cache lines
>>
>>59022605
yes, boxing for primitives in generic types sucks and harms efficiency, just like the entire way java generics are implemented.
i thought that was a given, though, and not relevant to the debate.
>>
>>59022685
>haha
Is this really fucking 4chan?
Did I stumble onto facebook, reddit, or somewhere else by accident?
>>
>>59022695
>All of the objects have massive amounts of padding and other shit
what are you on about? i wasn't suggesting to throw primitives into classes, anon.
>>
File: .png (21KB, 553x363px) Image search: [Google]
.png
21KB, 553x363px
>>59022668
>for structs to get allocated on the stack, they need to be sufficiently small.
You can force that with a keyword stackalloc. C# is simply faster when dealing with data structures(let's be honest, it's 99% of the time), too bad there's not many benchmarks to show.
>>
>>59022721
this is 4-Chan, haha! ~
>>
@59022721

calm down #hothead
>>
>>59022598
Same can be said about C
>>
>>59022787
Yes, early C was still a bit weird, but C has evolved since then.
>>
>>59022589
oh well, I couldn't find/remember another program used by distros... but I'm pretty sure I found one a while ago

>>59022721
the elite of 4chan has spoken
>>
>>59022737
>You can force that with a keyword stackalloc.
didn't know that, thanks, although it requires unsafe, and if we're talking about unsafe code, c# will end up faster either way because it isn't restricted by the same sandbox restrictions as java.
>C# is simply faster when dealing with data structures(let's be honest, it's 99% of the time)
i agree that c# is potentially faster in the practical case for many reasons (e.g. i don't disagree with your point about the java eco system either), just saying that java (ergo the optimum in the best implementation) isn't "slower" than c# per se.
of course you need to disregard the mess that is generics and a large part of the eco system for that.
>>
>>59022737
Anyway, speed isn't even the main advantage of C#. I got distracted too much already.
>>
>>59022800
B never got to evolve, though!
please don't bully B! ~
>>
>>59022211
Where's Common Lisp? Where's Ocaml? wtf, was this list made by indians?
>>
>>59022824
I said in the very beginning that Java would be faster for number crunching, sometimes even beating C. I would really like to see the comparison of Java's GC and C#'s GC performance comparison. I heard Java's caught up and now a multigenerational one as well, but how does it fare in real life.
>>
>>59022800
>C has evolved since then.
By including accidental addons like macros
>>
>>59022861
i wish both the state of the art java and c# gc would optimize more for latency and less for throughput by default. you can probably tweak both, though.
it's interesting to see that the main dude behind the hotspot gc is now working on the go gc and took an entirely different focus.
>>
Working on my 2D twisty puzzles game.

>>59022856
It's in OCaml.
>>
>>59022879
Even a shitty text-based macro system is better than no macro system.
>>
>>59022861
>sometimes even beating C
Please provide an example where the C version isn't written in a retarded and inefficient way.
>>
>>59022888
tfw you will never be this good at proGaming
>>
>>59022907
don't underestimate the optimizations possible with a runtime! ~
>>
>>59022912
What are you saying anon?
>>
>>59022598
type systems were a mistake

>>59022879
macros are useful though
>>
>>59021760
https://github.com/bakape/meguca
>>
>>59022882
In C# you can pause GC(for code sections and objects) so there's that at least. Also "using" applies some optimizations when you're rapidly creating and replacing objects.
>>
>>59022926
im an irredeemably shitty programmer
>>
>>59022923
What exquisite knowledge is the runtime going to have exactly?

i386 is basically dead, x64 is de-factor and armv7 is the only """new""" thing to have to deal with.

Compilers actually have it a lot easier than they did 25 years ago.
>>
>>59022948
You can learn by practicing a lot. That's why I have been doing since I'm 7 and I will doing until I can not type.

Coder 4 life.
>>
>>59022939
>character by character updates
What did you mean by this?
>>
>>59022941
What screenshot?
>>
Started work on a browser extension that sorts a 4chan thread according to replies. The indented posts you see in the screenshot are replies to the parent post above it. The numbers to the left of the post show the number of direct replies each post has, and the number of nested replies there are total, respectively.

Clicking on a reply expands that tree so you can read deeper comments.

It's a super rough proof of concept, but would this actually make a thread easier to read?
>>
beginner programmer here, know the basics of Java
what's the god tier programming language that I should master? I was thinking Python or C
>>
>>59022976
I can see you type, upload images, etc. in realtime and vice versa.
>>
>>59022969
the runtime knows which code paths, allocations etc. are most common, so it is theoretically able to cache things and spend excessive ressources on optimizing the most common code paths.
i'm not sure about the statement that anon made (that java could do better than c) but at least in theory the runtime's able to optimize more efficiently than a compiler, simply because it's provided with a lot more information.
>>
>>59023014
>I can see you type
Sounds pretty cool & creepy at the same time
>>
>>59022985
>wanting reddit cancer layout
no
>>
>>59022985
why the fuck would anyone prefer a tree view over a linear view, especially without le upboats?
>>
>>59022838

B had some weird fucking semantics. Everything was typeless, and a character literal could store fucking 4 regular characters, all in the equivalent of one int.

https://www.bell-labs.com/usr/dmr/www/btut.pdf
>>
>>59022974
I've been doing it off an on since I was 13. Went to a tech school and was really into programming for 4 years but never had any major projects. When I was 17 I got an internship in the web development department at a local business and doing that for two summers killed all of the joy I had for programming. Now I'm at uni for cs and I'm not engaged because all of my cs classes are ridiculously easy for me. How do I repair my love for writing computer instructions
>>
>>59023060
because B was more of nothing but a different syntax for assembly than C! ~
>>
>>59022907
Some benchmarks here
http://www.stefankrause.net/wp/?p=6
>>
>>59023038
>>59023051
Yeah, it's probably pointless after all. I just wanted to see how well it'd work. It definitely makes browsing a thread feel a lot different, and I suspect certain types of threads would be nicer to view as a tree.
>>
>>59023026
Many feel embarrassed at first. On the other hand, you can have realtime text-based discussions, circular quote graphs and detect mobile posters on sight. Laughing at slow typers is also fun.
>>
>>59023110
no
>>
>>59022985
4chan X already has this.
>>
>>59023116
anon wants to create a 4chan that acts like discord, cute! ~
>>
>>59023131
What the. What setting is that?
>>
>>59023144
I thought Discord only had message-level commits, like Skype and other messengers. Also the nick and account-centric nature of Discord is disgusting. A discussion medium should be anonymous by default and respect the users choice for privacy.

>>59023162
"Threading" in the dropdown menu in the top banner.
>>
>>59023144
>like discord
>cute
>>>/r/ibbit
>>
>>59023313
please don't bully! ~
>>
>>59023318
Please stop 「ironically」acting like a faggot, kudasai.
>>
>>59023318
Oh I'm gonna bully you alright
>>
>>59023337
please don't bully! ~

>>59023344
please don't bully! ~
>>
>>59022995
S-someone?
>>
>>59023371
Cython
>>
>>59023371
there's no god tier language and anyone trying to reply to you seriously will immediately end up in an argument with 7 other angry people
>>
>>59023371
Do you realize we discuss this every 15 minutes with or without being asked to?

Whatever answer you get is just going to be an echo of the unsubstantiated shitflinging you can read if you scroll up in the thread.
>>
>>59023409
let's be honest, we discuss this more frequently.
/dpt/ is /languageshitflinginggeneral/
>>
>>59023391
n-no C is god tier and everything else is filthy pajeets
>>
>>59023466
n-no <haskell or any other language with an even more redundantly expressive type system> is god tier and everything else is filthy pajeets
>>
>>59022995
defer 0. Close all other tabs
1. go to
https://doc.rust-lang.org/book/README.html
>>
>>59023442
I like the C standard shitposting the best.
>>
>>59023409
C is objectively the best language tho.
People will be writing new C code 50 years from now.
Can you say the same about your shit-tier flavor of the month languages?
>>
>>59022985
How would you handle a post with multiple parents? That's possible on 4chan, but not on reddit, and isn't really compatible with a tree structure - you'd basically have to duplicate the entire sub-tree under each parent.
>>
>>59023550
Yes.

Looks like I win this argument.
>>
>>59023550
>C is objectively the best language tho.
Even C++ is better than C
>>
I'm working on a Unity game. Or would be but I never used the damn engine before and all the tutorials for what i'm trying to do are ass.
>>
>>59023532
then why does rust look like lisp with diamond brackets?
>>
>>59023568
Are you fucking serious? C++ is a terrible language.
Get some fucking taste.
>>
New thread: >>59023578
>>
>>59023572
When did I say it doesn't?

>>59023579
What's the point of C again?
>>
>>59023550
>not establishing job security by writing a perl script that is the backbone of society and maintaining it for 200 years
tbqhfamishygddt
>>
>ctrl-f ~
>9 matches
shit thread
>>
>>59024367
15 matches
I didn't update for a while
>>
>>59024381
anon please! ~
Thread posts: 319
Thread images: 25


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