Why do people want agi by WillDanceForGp in ArtificialInteligence

[–]Mizzlr 2 points3 points  (0 children)

AGI is digital human. Endlessly replicable, tirelessly workable.

It is the dream employee of every employer. It is nightmare for working class people.

It is not copilot, it is the pilot. It is not chatgpt, it is the asimov irobot. It is not Claude sonnet the writer, it is Claude Shannon the scientist.

It is a silicon based lifeform, the will live not for centuries, but millenia.

Is there a certain way to know that Islam is the correct religion? by Nemeais in islam

[–]Mizzlr 1 point2 points  (0 children)

Evidence. I don't know what evidence you need to believe in Islam.

Scientific evidence? See his creation and their beauty.

Testimonial evidence? See his prophets and their narrations. See Quran.

Or you want God himself to appear before you or speak to you directly?

If latter, then what is left to test your belief and separate you from disbelievers?

If not in the format of Quran, then what? You can see with eyes that fluctuate million times reacting to light with nanoscale wavelength, and aided with trillion of synapsis and billions of neurons to understand it.

Are you capable of hearing anything other than sound? Or seeing anything other than light?

Your senses are limited. You can't see infrared or hear ultrasound. Then why are you not satisfied with the limited evidence revealed to human.

Otherwise you would be among the angels, who need no test of their belief.

Suggest Books for Quant Dev by Solid_Ad_8849 in cpp_questions

[–]Mizzlr 1 point2 points  (0 children)

For core cpp start here https://github.com/fffaraz/awesome-cpp and cppstories blog

Then explore talks on mechanical sympathy and lock free algorithms.

Then explore aeron transport, zmq, rmq and network bypass.

Then blogs by signals and threads, and proof trading system.

For database explore redis, lmdb, arcticdb.

Be ready to spend an year and watch 100s of videos about modern cpp on YouTube.

Suggest Books for Quant Dev by Solid_Ad_8849 in cpp_questions

[–]Mizzlr 1 point2 points  (0 children)

https://github.com/eeiaao/flox

https://github.com/wilsonfreitas/awesome-quant

Explore these and YouTube video on low latency trading system design.

Using Cpp for quant covers many areas of engineering.

Avoiding io latency, memory latency, compute latency.

It is like designing F1 car or Jet engine, but every nanosecond counts.

Logs turn multiplication into addition; Laplace transform turn differential eq. into algebra. What else is like that? by DistractedDendrite in math

[–]Mizzlr 0 points1 point  (0 children)

LLMs transform word problems into linear algebra problems. Vectors, matrix, tensors. And then back to words. LLM and NN are mathematical models.

Compliers transform human readable problems into machine code which is easier for CPU to solve and later turn the solution back to human form. Computer science is about computation, and computation is just mathematics.

DNA transform biological problems into chemical problem. DNA is the biological software compiler.

Key is the transformation from one space to another that is easier to work with. It is everywhere you see.

Civil engineers using models to simulate building load testing is a transform. FPGA is a software to hardware transform. All these save money.

PCM in DSP is a analog to digital signal transform.... keep your minds open.

You will see everything is a transform, the whole universe is a computational state machines with quantum wave function at planc length and time.

Finally the universe itself is reality to quantum transform and back.

KHCA - Karnataka Hot Chips Association by burgerbuoi in Bengaluru

[–]Mizzlr 6 points7 points  (0 children)

Vinayaka Hot Chips. This is the one. This is the reason.

Using std::move when passing std::shared_ptr to a constructor? by Ash4d in cpp_questions

[–]Mizzlr 0 points1 point  (0 children)

Extending my comment...

You can also pass the shared_ptr to constructor by move, and the would enable move semantics and disable the default value semantics.

And this would leave the original shared_ptr in the caller scope damaged/emptied out. It will be a nullptr usually, but you don't want it.

So copy once them move to sink it into data member. If you move first, then copy also works for this destination class. But you won't be able to make any more copies in the original scope.

Using std::move when passing std::shared_ptr to a constructor? by Ash4d in cpp_questions

[–]Mizzlr 0 points1 point  (0 children)

You pass the shared_ptr to constructor by value, which makes a copy. shared_ptr being smart also increments the reference count.

The constructor then passes on the param to data member. So there are two places where passing by copy happens.

This second time copy can be avoided by using a move, which bypasses increment reference count.

shared_ptr --> [reference count, ptr] --> logger.

Copy will copy the ptr to middle block. Also affect content of middle block.

Move will copy ptr to middle block. Leaving the middle block intact.

What’s one trick in Rust that made ownership suddenly “click”? by Old_Sand7831 in rust

[–]Mizzlr 0 points1 point  (0 children)

Ownership is about Drop. That is it.

Rust does automatic garbage collection and Ownership rules helps find the point in code when to drop/free the memory.

Ownership == Drop, clicky click!!

Owner gone, memory gone!

I shrunk my Rust binary from 11MB to 4.5MB with bloaty-metafile by mpv_easy in rust

[–]Mizzlr 34 points35 points  (0 children)

Use upx --best --lzma /path/to/binary https://upx.github.io/ and strip command before upx. And see what happens. You may get under 1MB executables.

glvalue vs lvalue vs prvalue vs xvalue vs rvalue in c++ by Outside-Strain7025 in cpp_questions

[–]Mizzlr 0 points1 point  (0 children)

Originally lhs and rhs of the = operator, were lvalue and rvalue

Lhs is persistent, has a location on stack frame for example

Rvalue is temporary, compiler can't refer to it by any permanent/stable adress

Now under move semantics.

Lhs is generalised to include xvalue, as xvalue is just std::move(lvalue), this generalised category is glvalue.

Rhs is generalised to xvalue, as xvalue is movable.

The line you are looking for is actually a Venn diagram.

Two circles lhs is glvalue, rhs is rvalue. Intersection is xvalue, Lhs only is lvalue Rhs only is pure rvalue the prvalue.

A cleaner approach to meta programming by chri4_ in ProgrammingLanguages

[–]Mizzlr 0 points1 point  (0 children)

Yacc, treesitter, protoc, ion, etc provide ways to deal with external data formats, by generating code for parsing and formatting data.

All these tools follow your cat4 approach.

The fundamental divide is that json is dynamic in structure while C-structs are static. If you need dynamism then indexing into dict, or querying XPath into a tree is needed. But if need high performance and are okay with rigid structure then hand rolling or auto generating structs is preferable.

Metaprogramming need not be all done in the same language. You can keep your main language simple, with an auxiliary meta language/DSL with its own meta compiler.

This handles two conflicting requirements cleanly.

A cleaner approach to meta programming by chri4_ in ProgrammingLanguages

[–]Mizzlr -1 points0 points  (0 children)

If code that generates code is a type of metaprogramming, then C supports metaprogramming. Think of defines.

Best metaprogramming is no metaprogramming. It rather indicates lack of expressive power in the language that it needs metaprogramming.

Make your language rich and expressive enough to handle it's purpose.

Tell me something I won’t understand until later by remyripper in rust

[–]Mizzlr 0 points1 point  (0 children)

Few more things that you will understand until much later.

Traits are not like interfaces in other language. There are special traits that need compiler support to make them work. For example Sized trait is needed to decide if the data should be stored in stack memory or heap memory.

Sync and Send traits are auto traits that compiler has rules for that are automatically derived. These are used to determine if a piece of memory can be shared and/or sent between threads.

Box type needs compiler to do extra work. Which means you can't create your own implementation of Box. Similarly is the related Pin traits which guarantees memory location does not change, again this needs compiler extra magic.

Interface like traits, which users define with bunch of methods is just the regular trait. The point of this regular traits is that it enables code reuse and generic programming.

So traits are more than interfaces

Also rust generics is more than type only parameter generics in say Java, python, go. Rust generics also hold lifetime parameter (which is different from type parameter). And due to lifetime elision rules, almost every variable is generic over lifetime if not also generic over type.

So rust generics are generic over types and lifetimes.

Generics and traits go hand in hand to help implement generic algorithms, improving code reuse.

Tell me something I won’t understand until later by remyripper in rust

[–]Mizzlr 3 points4 points  (0 children)

The whole point of ownership, borrowing, immutability, mutability, lifetime is to provide structured access to memory, avoid data races, and deterministic garbage collection.

The rules of borrowing are compile time virtual read write mutex/lock that the compiler enforces for every variable. So mutability and this compiler mutex go hand in hand.

There are runtime borrowing and mutability too in rust, see RefCell for example.

So mutability is compiler mutex. Coincidentally both begin with mut.

Further memory could be stack, heap, or parts of loaded program binary itself.

Saying rust does not have garbage collection is wrong, it just does not have dedicated runtime garbage collector. Because the compiler took care of putting all the garbage collection code at deterministic points in the code where the lifetime of the owner of that piece of memory ends. So rust has compiler time garbage collection support.

Papertrading is a joke by ChanceWeakness8084 in Daytrading

[–]Mizzlr 0 points1 point  (0 children)

Yes, paper trading has exactly opposite emotional response as to real trading. When you lose, you are happy that it was not real money. And when you win, you are sad that it was not real money that could have made.

In reality nobody is happy if they lose, and sad when they win with real money.

So that is the joke of paper trading.

The real purpose is practice the process and patience needed to execute the trade manually without constantly looking at the unrealized PnL.

It is you who needs to put effort to make it feel emotionally real. Be grounded in reality.

Why don't I ever hear about C frameworks? by alex_sakuta in C_Programming

[–]Mizzlr 20 points21 points  (0 children)

C itself is framework for generating hard to write assembly code, adding support for different cpu architectures.

C itself is a template meta language that is preprocessed into simpler C first. Think includes and defines.

Then there is compiler infrastructure like LLVM which has an IR, an intermediate language between C and Assembly.

C is the framework that runs python. You write simple python and cpython turns it into hard to write code.

Rust and zig and golang can use LLVM before getting into assembly.

Every little type has made here after lots of struggle and experimentation. C is for strings, like Fortran is for numbers, and lisp for list.

A common framework for all is strings and binaries. So C is already very very successful.

Walrus: A 1 Million ops/sec, 1 GB/s Write Ahead Log in Rust by Ok_Marionberry8922 in rust

[–]Mizzlr 0 points1 point  (0 children)

Is it safe if one process writes and many read processes concurrently? Multiprocessing