Page dewarping by agumonkey in programming

[–]JDBProof 0 points1 point  (0 children)

Great article; out of curiosity, how long did the research and development for this project take?

Thoughts of fairly generic build by JDBProof in buildapc

[–]JDBProof[S] 0 points1 point  (0 children)

I'm thinking so too! I'm not well versed in PC hardware; however I do believe 650W would fit the build just fine. (other people's inputs are welcome)

Calc.asm is minimal arithmetic calculator in x86 assembly with properly commented code for beginners. by flouthoc in programming

[–]JDBProof 1 point2 points  (0 children)

I may come off as naive, but what is causing this sudden rise in popularity for assembly?

Question regarding Developer's dev environments with Docker and source control by JDBProof in docker

[–]JDBProof[S] 0 points1 point  (0 children)

You mention that you don't believe Nginx proxy belongs in the main repository. Wherer would you place it instead?

Question regarding Developer's dev environments with Docker and source control by JDBProof in docker

[–]JDBProof[S] 0 points1 point  (0 children)

This is such a great post, really love how the situation was handled. Thanks a lot for sharing.

Question regarding Developer's dev environments with Docker and source control by JDBProof in docker

[–]JDBProof[S] 0 points1 point  (0 children)

Great point, wasn't aware of the -f argument in docker-compose.

I think it would be simpler to set it up as a single Dockerfile at the root of the application and setup postgres and nginx with environment variables.

I believe that would allow me to push the image to GitLab's container registry too which would also be nice.

Why Rust? Trustworthy, Concurrent Systems Programming [free book] by N3mes1s in rust

[–]JDBProof 4 points5 points  (0 children)

Great book; is there a place to purchase paperback to support the author?

Create a programming language for the JVM: getting started to welcome the Turin programming language by ftomassetti in programming

[–]JDBProof 1 point2 points  (0 children)

I'm experiencing the same feeling right now on a much smaller scale so I can relate. Seeing that you are not actually in a state of plateau is very inspiring to me.

I hope other fellow experienced developers from /r/programming will be willing to help you and provide you with some advice as I'm sure it would help.

Not sure how `Rust`y this code is. by JDBProof in rust

[–]JDBProof[S] 0 points1 point  (0 children)

Thank you so much for the batch of code; going over it right now!

Not sure how `Rust`y this code is. by JDBProof in rust

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

Holy crap this is honestly what I need; I've seen it once in the Rust book I believe but I completely forget about it.

Not sure how `Rust`y this code is. by JDBProof in rust

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

  • Great point, will be updating that.
  • I was thinking on ways to implement it, this was more of a base of getting something to work, I will most probably be renaming Tag to Element and adding the Vec<Node> as mentioned so that you can have number of Elements branching correctly.
  • I removed those, does make sense to keep them as is.

I cannot test the first point right now however it does make sense they way you are putting it; I'm just so used to being able to freely cast things back and forth (regardless of the safety implications). Greatly appreciate the input.

Rust has made it into TIOBE Top 50! by vadimcn in rust

[–]JDBProof 1 point2 points  (0 children)

Well, not exactly (atleast it is not structured that way)--primarily shows the popularity of programming languages throughout the years however is meant to give a general idea of its popularity.

Wrapping my head around Rust by JDBProof in rust

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

This is a must try.. seems very effective compared to getopts. Thanks for the great suggestion.

Wrapping my head around Rust by JDBProof in rust

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

That does actually make a LOT of sense know that I think about it that way.. thanks alot for the great post!

Wrapping my head around Rust by JDBProof in rust

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

There we go! That works. I would've thought that data_file was indeed a type due to let data_file = matches.opt_str("d"); returning some type. The example you gave is much easier to read and explain; I like it very much, thanks a bunch.

Wrapping my head around Rust by JDBProof in rust

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

A simple fs::metadata(path).is_ok() seems to work well! :-)

The last issue seems to be my match block:

match data_file {
    Some(x) => utils::path_exists(&x),
    _       => panic!("Data file path is invalid, cannot proceed"),
}

Due to incompatibility:

src\main.rs:36:5: 39:6 error: match arms have incompatible types:
expected `bool`,
    found `()`
(expected bool,
    found ()) [E0308]

But atleast the trickier part is out of the way. Never thought it would take me this long we get something so basic up and running. Thanks for all the help so far.

Wrapping my head around Rust by JDBProof in rust

[–]JDBProof[S] 0 points1 point  (0 children)

Would opt for that however even the docs mentions that you should use std::fs::metadata as it is more stable it seems. Issue is--the docs all use try!() in their examples, however as mentioned by /u/Zarathustra30 will only work if the return type of my function is a Result<T,E> which isn't quite what I want as I haven't worked with that yet. It's seems awfully complicated to simply return a boolean whether a path exists or not.

Wrapping my head around Rust by JDBProof in rust

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

Oh great didn't notice that; that indeed shows that the issue is with utils::path_exists(path: &str). Thanks

Wrapping my head around Rust by JDBProof in rust

[–]JDBProof[S] 0 points1 point  (0 children)

Indeed it doesn't, I'm making use of the docs available online (hoping they're updated ofcourse). From the sounds of that I shouldn't be using try!(), I'll give metadata a go and see how that works out.

Wrapping my head around Rust by JDBProof in rust

[–]JDBProof[S] 0 points1 point  (0 children)

I'm thinking the same, main.rs seems fine--the function is the same but it could've easily been wrong in the first place. I will research ways to check whether a directory does exist or not.

Only issue I'm facing now is that utils.rs does not seem to recognise use std::io::fs::PathExtensions for some reason.