Details
-
AboutA 14 year old D lover (one of the few) Arch Linux + i3 + plymouth = amazing High school is boring I should be programming Why did I make this?
-
Skillsd, D, DLANG asm, c, c++
-
LocationFar away from home :(
-
Github
Joined devRant on 7/18/2016
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Guys, that's all just the input ports.
-
Systems aspect:
Floating-point formats (in binary) consist of 3 parts: sign (1 bit), exponent (~2 bytes), and mantissa (everything else)
Infinity is when the exponent is all 1s and the mantissa is 0. The sign bit indicates positive (0) or negative (1) infinity.
NaN is when the exponent is is all 1s but the mantissa is nonzero. The value of the mantissa is the 'payload' being talked about. I'm not sure about signaling and non-signaling NaN, but it depends on the payload. -
Cannabis will kill you why the fuck are you doing this ....
*Reads whole thing*
.... s/.*/You do you bro/g -
4. Gentoo √
-
The most helpful turn out to be not yours.
-
Java has issues. If you're programming for the first time, learn the concepts but don't stick with Java. I personally use D. Check it out at https://tour.dlang.org
-
I speak English, so I disabled NLS in all packages. Additionally, all packages supporting the following will compile with (+) or without (-) it:
+bluetooth
+pulseaudio
+i3
+git
+zsh-completion
+vim-scripts
+offensive ;)
+flac
+ffmpeg
+wifi
+unicode
+sound
+threads
-alsa
-X
-nls -
I tried it in C (actually D, but only used C stuff, so essentially same thing) with double (64-bit) and random numbers from rand(). Instead of 340 million, tested it with 1 billion. Compiled on GCC with
-Ofast.
There really isn't much of a difference! -
@michezio Agreed, but the general use case (sum) is not one we're talking about (mostly). The need for running average is generally when the average is needed in each cycle.
By the easy, what were the actual results and errors that you found, compared to sum then average? -
@bigworld12 I agree, but it still won't be the same. I had run some tests checking the difference with lots of random numbers; I'll find (or rewrite) it and post results.
-
If the calculation of n is heavy, utilizing Kahan summation algorithm should alleviate the pain of low precision. You might also be able to rewrite whatever loop you're adding to the average with for pairwise summation.
-
@bigworld12 Yes, but I went about it differently.
@kleinerKobold You're right. The removal of the multiplication also removes risk of overflow for large numbers or large amounts of numbers.
@michezio I had noticed that too!
(o(i - 1) + n) / i
= (oi - o + n) / i
= o + (n - o) / i -
Sorry, but please s/fam//g
-
@jespersh Ah, shit.
-
@jespersh Windows has its areas of power. Linux has different ones. For example, Windows was designed to be the idealistic PC OS. That may make it "better" to you. Meanwhile, every modern supercomputer in the world is running Linux. It's designed for speed and the developers, not normal nontechnical users (though some are working on that). That makes it "better" to me. But not to you. And that's okay. I find that to understand everybody, one simply needs to prefix "I think" to every sentence.
-
Allow you to disable NLS, automatically enable pulseaudio for everything and disable alsa (don't ask why PA)
Allows you to build static libs for anything.
It's like Arch's AUR, but safer and more integrated, and every variant of a package is combined into one.
Also, it taught me how to offload all my compilations onto my more heavy-duty computer, securely (SSH + RSA). -
This looks like manually unrolled D static for each. @Fast-Nop
-
KILL IT WITH FIRE
-
Isn't it awesome when that happens?
It's like you've been enlightened about something, but it's even better because you enlightened yourself. You realise that you're not stupid and you can do things. -
@sondr3 Gentoo is the next-level Arch.
Arch is IMHO okay. It's like Gentoo, without spending hours compiling or USE flags. -
I haven't put it up yet, but I'm making a custom standard library cos their standard library is truly shit. Not in code, but in performance and size. I like system programming, and a good example is PowerNex. The only thing weird about it is that it uses a cross compiler for DMD (the reference implementation). If you are making a project and want control and optimizations, use GDC.
You could just search github with `language:d` and check out what comes by. You can do crazy higher-level shit, though, even though I generally stay away from that.
Also, metaprogramming in D is freaking awesome. You can write the whole fucking program to run at compile time if you obey a few rules.
Best place to get addicted to D (with editable examples): https://tour.dlang.org -
Omg "makes the code stop"
I suddenly don't remember the exact words; I saw it 30 seconds ago. Brain, you good? -
Live. Being human can be interesting too.
-
Dude,
...
You're fucked. -
Have you tried D? I got addicted a year ago, but I'm gonna try Rust for the fun of it.
But my damn Chromebook running Gentoo fucks up with Cargo shit... -
Now, try Gentoo ;)
I have mostly the same setup, but diff. wallpapers.
Background: via feh
Shell: zsh (Agnoster theme from ohmyzsh)
Terminal: Termite
WM: i3
DE: none
Browser: Firefox graphical; (E)Links TUI
Music: CMus
No pics right now (on phone) -
Assembly isn't cross platform or easy to use (depending on programmer, I know, but for me). Assembly is cool, but I prefer other ways. Compilers generally (*ahem* always) optimize better than me or Internet source I use.
-
I'm messing with basic applications low-level.
Making hello world apps with input-output and file writing in ~1024 bytes is euphoria. -
_DEVRANT.PIN.ACTIVATE_
-
BTW In Dvorak the QWERTY 'e' is replaced by '.'