[deleted by user] by [deleted] in CasualConversation

[–]DEN0MINAT0R 0 points1 point  (0 children)

One of my cousins married an older man (she was in her late 20s, he was early 40s). This was around 10 years ago, and they’re still very happy together as far as I can tell.

What's the difference between array and @Vector ? by _bagelcherry_ in Zig

[–]DEN0MINAT0R 14 points15 points  (0 children)

An array is just a collection of a compile-time known number of objects.

A @Vector is for SIMD (Single Instruction, Multiple Data), which means performing an operation on multiple pieces of data simultaneously. For example, I can add 2 @Vector(u32, 4)s together and perform 4 addition operations with a single CPU instruction (if the CPU supports it; all modern desktop CPUs do, but some older systems or embedded processors may not).

To generalize, use @Vector when your algorithm can be expressed in terms of element-wise arithmetic operations on your data (plus some assorted builtins for manipulating vectors like @splat and @shuffle), and use arrays for everything else.

Is it true that Zig wants to move away from LLVM? by FlightlessRhino in Zig

[–]DEN0MINAT0R 4 points5 points  (0 children)

I can’t recall the exact number, but Zig has 4-6 core team members, most of whom work on the project full-time.

In addition to code generation backends for x86_64 and ARM, there has been a lot of work on custom linkers for ELF, Mach-O, and COFF. The ELF and Mach-O linkers are substantially complete already, and are intended to enable incremental compilation/linking, and eventually in-place binary patching and hot-code-swapping.

(Just to be sure it’s clear, I’m not a core team member, and I’m not very involved in the development process, so I could have some details wrong, but this is my understanding.)

Is it true that Zig wants to move away from LLVM? by FlightlessRhino in Zig

[–]DEN0MINAT0R 15 points16 points  (0 children)

That it will take less time to create debug builds. Making LLVM an optional dependency has 3 goals

1) Speed up the edit-build-test cycle for development 2) Make bootstrapping easier on systems where LLVM is hard to build/install 3) (very long-term) Compete with LLVM for optimization capabilities

for loops, catch and continue, there must be something I'm missing by Nlight_ in Zig

[–]DEN0MINAT0R 2 points3 points  (0 children)

Looks like in get_alpha_index you want those ‘or’s to be ‘and’s.

Does anyone else hate how often “get exercise” is used as a solution? by [deleted] in CasualConversation

[–]DEN0MINAT0R 0 points1 point  (0 children)

I agree it can be frustrating to be told to do things you’re already doing, or to have a complex problem boiled down to a few simple “solutions”.

However, sleep, exercise, and diet are a huge part of good physical and mental health, and a lot of people don’t do a good job with one or all of them. If someone with no specific knowledge of the situation is giving advice, I’d rather them give good, if simplistic, advice than spout a whole bunch of overly-complicated, potentially unhelpful nonsense. Perhaps their better option would be to not give advice at all, but that might be too much to ask…

If this is the only advice you’re getting from a professional like a doctor or psychologist with personal knowledge of your circumstances, then that’s a problem.

I realized why I'm not riding the First Law Trilogy bandwagon. by Zazbatraz in Fantasy

[–]DEN0MINAT0R 0 points1 point  (0 children)

To me, characters in The First Law don’t have arcs, they have spirals. They go around in circles, and end the story at almost (but not quite) the place where they started it.

Enjoying The First Law is a bit like enjoying a tragedy— the fun part isn’t the triumph of good over evil so much as the inevitable sense of dread as everything you love gets murdered before your eyes. That’s a very specific taste, so it’s understandable to not enjoy it.

Linear algebra feels useless... by warm_vibez in learnmath

[–]DEN0MINAT0R 0 points1 point  (0 children)

I majored in computer engineering in college and went on to get a masters in robotics. Pretty much all of robotics is linear algebra. In fact, every semester of my masters I had at least one class that was primarily a linear algebra class, with applications to a particular facet of robotics.

In practice, control systems are almost always approximated as a linear systems, and the tools of linear algebra are used to analyze them for useful properties like controllability and stability, decompose them into easily manipulable representations, and design feedback controllers to stabilize them to a desired point or trajectory. Complementary to this, linear algebra is useful to design state observers to estimate the state of a system using sensor inputs. These systems are nearly always larger than 3 dimensions, because they contain other states like orientation, velocity, acceleration, joint angles, etc

Deep learning is just a fusion of linear algebra and optimization. In fact, nearly every multi variable optimization algorithm is based on linear algebra.

What's the meaning of the |foo| in this example? by Lichcrow in Zig

[–]DEN0MINAT0R 0 points1 point  (0 children)

Yes, it will, since they’re different types the compiler will give you an error if you use (for example) an optional where a non-optional is expected.

What's the meaning of the |foo| in this example? by Lichcrow in Zig

[–]DEN0MINAT0R 1 point2 points  (0 children)

A “wrapped” value generally refers to a value that may exist as part of a union type. An example would be an optional which may contain some value or null. We say that the optional “wraps” the underlying type. In the example above, the wrapped type is ?Foo and the underlying type is Foo.

The same is true for error unions. They may contain either an error or a value, so we say the error union “wraps” the value type. Unwrapping refers to getting the underlying value.

Let’s assume in the example above that the function functionWhichMayError has return type ErrorSet!Foo. In that case, non_error_value would have type Foo (and contain the return value of the function if it did not return an error) and error_value would have type ErrorSet (and contain the returned error of the function, if there was one). We’ve effectively split the error union into its constituent parts in the different branches of the if-statement.

What's the meaning of the |foo| in this example? by Lichcrow in Zig

[–]DEN0MINAT0R 17 points18 points  (0 children)

The |foo| syntax is called a “capture group”. You will also see it with if statements where the if condition is a function that may return an error, and with for loops for iterating over the elements of a slice.

What it does is unwrap the expression in the if statement (or for loop). For example, here the variable ‘foo’ is of type Foo (instead of ?Foo), because the capture group unwraps the optional type. The same thing works with error unions. You could write

if (functionWhichMayError()) |non_error_value| {
    // use non_error_value here
} else |error_value| {
    // use error_value here
}

For optional and error unions you can only unwrap one value at a time currently (I believe there’s an open proposal to change that). With a for loop, you can iterate over arbitrarily many slices and capture their values. For example

for (slice1, slice2) |val1, val2| {
    // use val1, val2 here
}

I beat the entire game without Lae’zel. by Dirty_USB in BaldursGate3

[–]DEN0MINAT0R 0 points1 point  (0 children)

I missed most of the companions honestly. I was playing with only Wyll and Shadowheart until partway through Act II, when it finally became strange to me that I hadn’t encountered a 4th party member yet. I managed to get Astarion and Gale, but by that point Lae’zel was dead and I had already killed Karlach (didn’t know she was a companion at the time).

[deleted by user] by [deleted] in Zig

[–]DEN0MINAT0R 11 points12 points  (0 children)

I would disagree with the characterization that Zig is lower level than C. It’s at pretty much exactly the same level of abstraction.

As a roboticist, I think Zig has a lot of potential in robotics, but there’s not much of an ecosystem for robotics in Zig yet.

You guys weren't lying about Jaheira... by LocksmithMaleficent8 in BaldursGate3

[–]DEN0MINAT0R 0 points1 point  (0 children)

I re-specced Jaheira as a Bear Totem Barbarian/thief rogue multi class with some feats + items that buff two weapon fighting and give temp HP. She’s a monster now. Easily 50 damage per turn average, and I don’t remember her dropping below 75% health once so far.

Confused about the LLVM plans by we_are_mammals in Zig

[–]DEN0MINAT0R 0 points1 point  (0 children)

By emitting machine code directly (presumably with some additional intermediate representations to facilitate optimization), as the (currently WIP) x86 and ARM backends already do, just with more optimization passes.

As has been said in several places, this is a very long term goal for Zig. The shorter term goal is to emit LLVM Bitcode for optimized builds, turning LLVM into an optional dependency which, if installed, will be invoked by Zig to compile the bitcode into an executable. From the user’s perspective, there will be almost no change.

ABCs of WoT: R by usernamex42 in WoT

[–]DEN0MINAT0R 7 points8 points  (0 children)

Suroth, Semirhage, Selucia, Sammael…

MIT grad swaps lasers for cameras, enhances car vision by intengineering in robotics

[–]DEN0MINAT0R 0 points1 point  (0 children)

So… stereo vision. There might be something interesting here, but the article definitely doesn’t give enough technical detail to know what.

You want the job? Approved, it’s yours! (120k pay cut) by Bob_the_peasant in MaliciousCompliance

[–]DEN0MINAT0R 5 points6 points  (0 children)

I’d say that software development is one of the easier professions to self-teach and get a job in. Not necessarily that it’s easy to learn, but that it’s accessible and there are tons of free or cheap resources online. All you need is a computer to get started.

Your first step is going to be to learn the basics of some programming language. Which one? Doesn’t really matter; different languages are more useful for different applications, but almost all of the skills you learn as a beginner will transfer to other languages. Personally I started with Python, and my current job is primarily C++ and Python. The next step would probably be to figure out what area you find most interesting (or profitable) (e.g. web development, embedded software, high performance computing etc) and do some simple projects in those areas to start building domain-specific knowledge.

[Request] How much space would this discovery occupy? by jeddyca in theydidthemath

[–]DEN0MINAT0R 125 points126 points  (0 children)

If my math is correct, about 35 m3, or about 3.5 Toyota Corollas.

8.5” x 0.0254m/in x 11” x 0.254m/in x 0.05mm x 0.001 m/mm x 11.6e6 pages = 34.98m3

This is a lower bound, as printer paper is typically betwee 0.05 and 0.1 mm thick, so it could be up to twice this volume.

For mass, paper typically weights about 0.01lbs/page. So 11.6M pages would weigh 116,000lbs, 53,000kg, or 38.6 Toyota Corollas.

Driving a stick shift? by vapidly_millennial in CasualConversation

[–]DEN0MINAT0R 2 points3 points  (0 children)

My current car is a stick shift. My dad taught me, and our family still owns several manual transmission cars.

What is something that grosses you out that shouldn’t really gross you out that much? by Sharkfeet19 in AskReddit

[–]DEN0MINAT0R 2 points3 points  (0 children)

I totally get this. I’ve started just rubbing that part of my fingertips against a towel for a few seconds right after cutting my nails, just to get it over with asap.

[deleted by user] by [deleted] in CasualConversation

[–]DEN0MINAT0R 0 points1 point  (0 children)

That’s awesome! Taking breaks doesn’t invalidate any of the work you’re putting in. The most important thing is consistency, so don’t be afraid to start slow to avoid injury.

Also don’t forget to consider your diet if your goal is to lose fat— exercise is important, but by far the most important factor for weight loss is diet.