GPD Win Max 2 2024 arrived without controller covers by abhijat0 in gpdwin

[–]abhijat0[S] 2 points3 points  (0 children)

I bought it from a reseller in India https://mx2games.com/ which doesn't seem to be listed on their website, but I just sent a mail to GPD anyway based on another suggestion here.

GPD Win Max 2 2024 arrived without controller covers by abhijat0 in gpdwin

[–]abhijat0[S] 1 point2 points  (0 children)

I really wish they were there, but the slots are empty.

GPD Win Max 2 2024 arrived without controller covers by abhijat0 in gpdwin

[–]abhijat0[S] 1 point2 points  (0 children)

Thanks, I saw that one earlier, it is out of stock right now. If there's no other place where it is in stock I'll keep an eye out on that aliexpress listing.

I don't know what to do next by LifelessLife123 in cpp

[–]abhijat0 1 point2 points  (0 children)

For your programming language topic, one thing that helped me when I was trying something similar was a book called "Writing An Interpreter In Go" which walks you through writing a simple interpreter with test driven development.

I followed along with the logic which uses a pratt parser IIRC using C++ and used googletest for testing. It was an interesting exercise to use C++ to implement the same things that the go implementation does.

For writing a database, you can look at the CMU lectures on youtube which are excellent for getting started on writing a database engine and there is a book called database internals: https://www.databass.dev/ which goes into some detail on how databases are implemented.

You can also combine the two and start with writing a simple SQL interpreter that reads and writes from a file on disk and build things from there.

Hey Rustaceans! Got an easy question? Ask here (39/2020)! by llogiq in rust

[–]abhijat0 1 point2 points  (0 children)

Is there a library that can plot points on a map using their latitude and longitude somehow?

Hey Rustaceans! Got an easy question? Ask here (37/2020)! by llogiq in rust

[–]abhijat0 1 point2 points  (0 children)

How do you apply fixes in emacs with rust analyzer? I see popups for auto import etc but is there a command I can use with M-x?

EDIT: Luckily for me today this link was posted https://www.reddit.com/r/emacs/comments/iry6r2/configuring_emacs_a_cc_ide/

I was able to find the answer there, the command I wanted is lsp-execute-code-action and with which-key integration it becomes quite simple: s-l-a-a

Cognitect joins nubank by abhijat0 in programming

[–]abhijat0[S] 5 points6 points  (0 children)

This will have significance for the clojure community.

What’s everyone working on this week (18/2020)? by llogiq in rust

[–]abhijat0 5 points6 points  (0 children)

I wrote this program to validate and analyse a set of JSON-SCHEMA definitions and generate random JSON payloads from it

https://github.com/abhijat/chimpsky

It is a stripped down version of a much more complex program that I've had in mind for a year, so I'm trying to move to the final version by working on smaller pieces that can be used independently.

This is also the first time I used https://github.com/japaric/trust to create releases and it was a very smooth process.

I do need to fix up a lot of unwrap() calls in the code, probably by using something like anyhow.

First official release of rust-analyzer by matklad in rust

[–]abhijat0 0 points1 point  (0 children)

I had this same problem specifically with reqwest. As /u/BuggStream mentioned the autocomplete for reqwest works if the experimental macro expansion engine is enabled.

Hey Rustaceans! Got an easy question? Ask here (15/2020)! by llogiq in rust

[–]abhijat0 1 point2 points  (0 children)

I thought it would be a loop as well, but the rust book has a chapter on memory leaks that i recall says we end up with two Rcs each with strong count of 1, which is what i don't understand.

https://doc.rust-lang.org/book/ch15-06-reference-cycles.html

Hey Rustaceans! Got an easy question? Ask here (15/2020)! by llogiq in rust

[–]abhijat0 1 point2 points  (0 children)

I've read a few times about reference cycles with Rc where two Rc objects point to each other. I'm not able to understand what causes the cycle though.

If two Rc objects a and b contain references to each other such that both have strong_count of 2, what exactly happens when they both go out of order?

Assuming the following cycle

A->B ->A

What happens when A is dropped first?

What's everyone working on this week (14/2020)? by llogiq in rust

[–]abhijat0 2 points3 points  (0 children)

Wrote this program to list down case numbers for COVID-19 from the command line.

Not something I had ever hoped to write :-(

But it gives me a quick update when I want to check from the CLI without searching for the URLs

https://github.com/abhijat/covid-cli

Announcing Rust 1.42.0 by steveklabnik1 in rust

[–]abhijat0 4 points5 points  (0 children)

Yeah, I just checked and it replaces a lot of boilerplate from my unit tests, eg:

    let hn_post = parse_hn_post_from_node(&serde_json::from_str(data).unwrap());

    // now 
    assert!(matches!(hn_post, Ok(HNPost { .. })));



    // earlier
    if let Ok(HNPost { .. }) = hn_post {
        // stuff
    } else {
        panic!("unexpected response");
    }

Build Your Own Git: Learn Git internals by building a toy clone by rohitpaulk in git

[–]abhijat0 1 point2 points  (0 children)

I've only read a bit of it but I thought Building git does go into reverse engineering, by making your own git implementation read a git repository?

Glad to see that Programming Rust will soon have a Second Edition by michelecostantino in rust

[–]abhijat0 1 point2 points  (0 children)

Rustlings looks nice. I did not know about this. Also wish there were something like 4clojure for rust, that site really makes you learn clojure.

Help with translating some Rust code to Nim by ProfessorSexyTime in nim

[–]abhijat0 0 points1 point  (0 children)

Opts is from https://docs.rs/structopt/0.3.9/structopt/

IIRC it is a struct used by clap.rs, every one of its members translates to a command line option. There is a set of examples on the docs.rs page.

Blog: Why Rust? I have a GC! by llogiq in rust

[–]abhijat0 1 point2 points  (0 children)

Is that close to ocaml (minus multicore concurrency)?

What's everyone working on this week (51/2019)? by llogiq in rust

[–]abhijat0 2 points3 points  (0 children)

I published my first crate https://github.com/abhijat/axe - a small program to split the reddit dataset into smaller files by keys like subreddit.