my subscriptions
POPULAR-ALL-RANDOM | LOADING...MORE »
light3rn commented on a post in r/rust
light3rn 2 points

I'm trying to build email verification for my website, but I can't get gmail smtp working. Lettre has been evolving quite a lot in a short period of time, so many of the examples are now outdated. Also none of any examples actually use external smtp server like gmail. It's finally compiling, but it's asking for STARTTLS:

https://pastebin.com/2yqHRzgn

I guess it has something to do with this, but I can't get my head around all this and I have no-one to ask:

https://docs.rs/lettre/0.8.2/lettre/smtp/client/net/struct.ClientTlsParameters.html

Also some information here:

https://lettre.at/

It would be super helpful if there would be even one example that actually compiles and works by sending hello world from somewhere else but localhost (and wouldn't be a huge project with 10+ source files).

light3rn 1 point

For someone fighting with the same thing: just use this:

https://pastebin.com/ts9npfrt

Just remember to leave email part untouched and use smtp.gmail.com in smtptransport!

light3rn commented on a post in r/rust
light3rn 2 points

I have a networking question: I have built nickel based postresql api, which is working just fine when I connect from localhost, but if I try to access it from outside of local network, it's not answering.

My api is listening http://127.0.0.1:6767 and when I enter in browser "http://localhost:6767/raw", it works just fine, but when I try to connect to my external ip from my phone with "http://83.12.34.56:6767/raw" , it says nothing. My api doesn't "hear" the request.

I've opened up the port 6767 from my router and I have an Arch linux, so I shouldn't have anything weird going on by default(?).

I wonder if there is something I'm missing. Should I open something from linux or change the listening address... I've spent one whole day with this, but I can't seem to solve it. All this networking stuff is still very confusing :)

_jsdw 1 point

Have your app listen on 0.0.0.0 instead to expose it on all of your network interfaces :)

light3rn 1 point

I wanna cry... Thank you guys :)

light3rn commented on a post in r/rust
Quxxy 5 points

From a cursory look, I don't think you're supposed to statically link GTK. There's a list of what you have to distribute on Windows that includes things like image resources.

If you want a single exe with no external dependencies, you might need to use something other than GTK. What that would be, I have no idea; the Rust GUI situation is not great.

Edit: Also, GTK is LGPL licensed, so distributing a statically linked binary could very well be a violation of the license.

light3rn 1 point

Hmm... Thanks. It's more complicated than I thought. I somehow thought that listing dependencies in Cargo.toml was enough.

Quxxy 2 points

Listing dependencies just compiles and links those dependencies. It doesn't do anything else.

light3rn 2 points

I guess the problem is that those dependencies are different than dependencies on external dlls. I'm new to GUIs. It seems that with GTK the program tries to use libraries that it assumes already exists in filesystem. It kind of sucks that it seems there is no way around the problem. I can't assume that people are willing to install stuff on their computers to run my programs. But yeah, I guess that's how it is.

Load more comments
light3rn commented on a post in r/rust
DroidLogician 1 point

There could be an nth_char method but Rust prefers not to hide expensive operations (like iterating a UTF-8 string to find the nth character) behind innocuous-sounding method/function calls. Having to go through the chars() iterator signals to the reader that this could be an expensive operation.

If you're using this pattern a lot, you could wrap it up into an extension trait:

pub trait StrExt {
    // I recommend having these return `Option<char>` but it's your choice
    fn first_char(&self) -> char { self.nth_char(0) } 
    fn nth_char(&self, n: usize) -> char;
}

impl StrExt for str {
    fn nth_char(&self, n: usize) -> char {
        self.chars().nth(n).expect("string too short")
    }
}

let letter = "m".first_char();

Or just a function:

fn first_char(s: &str) -> char {
    s.chars().next().expect("expected character")
}

let letter = first_char("m");
light3rn 1 point

Thanks for your reply! I wasn't clear enough on what I wanted. I was just trying to say:

let letter = 'm';

I had tried these before without success, so I was just confused what I should do:

let letter = "m";
let letter: char = "m";

I didn't understand that " and ' behave differently in Rust.

DroidLogician 2 points

Most statically typed languages use single-quotes for character literals and double-quotes for string literals. Dynamic languages like Javascript and Python don't have a separate character type so they use single-quotes and double-quotes interchangeably.

light3rn 1 point

Thanks, a bit wiser again.

Load more comments
FEMXIII 3 points

Sorry to drag up a slightly old post, but an 'in silicon' fix has been introduced for 9th gen intel 'Ice Lake' processors:

https://www.digitaltrends.com/computing/intel-meltdown-spectre-silicon-fixes-ice-lake/

There is also reports of 8th gen being fixed going forward:

https://www.techradar.com/news/intel-8th-gen-cpus-with-baked-in-meltdown-protection-to-land-later-in-2018

light3rn 1 point

Thanks!

Hitife80 1 point

This is awesome -- I think it is very much worth adding to the Rust section of Arch Wiki! I was able to successfully follow steps there for a CLI app, but was always wondering what it takes to get the GTK one running in both without VS build tools. Thank you!

light3rn 3 points

Happy to hear! I'm not sure how people would see that since the guide is for Windows, not Arch. I don't have very good experiences with Arch community, even though Arch, the Arch wiki, pacman and AUR themselves are amazing. Last time I wrote an install script for Arch linux for newbies to learn from I was attacked quite rigorously. It seems that some community members have quite strong views on how things should be handled, which I guess is in it's own way a good thing (Arch environment stays more "pure" and some right information is easier to find). The sad side is that the learning curve is super steep because of that.

tl;dr: I'm not sure if I dare to open my mouth in that community anymore, but if you feel more courageous, feel free to share this information as you like :)

Hitife80 1 point

Yep, I know what you mean. I was actually surprised they left the "how to compile rust for windows on linux" part there for CLI -- because as you have outlined -- one can easily bring it down as non-arch related. Sad but true. Nevertheless, the advice on that wiki worked well. :-(

Rust subreddit is a very good place for this though. May be it is worth starting a wiki here for these odd bits and ends of important, but hard to acquire information.

light3rn 1 point

Yeah, and Rust community seems very friendly. I was thinking about "just leaving this here". If one searches for GUI and Windows in /r/rust, this pops up now semi easily. Also I tried to formalize the title so that it pops out for relevant people. If the information is worth it, this will keep living somehow when people copy the good bits to their own collections. If not, natural selection will bury it deep :)

I think Monero's (cryptocurrency) community is somewhat similar. Friendly and a lot of brilliant people around. I think their strategy is great: in Reddit there is one pinned discussion where there is all relevant info for beginners in compact package and one pinned discussion for newbies to ask stuff. Rust already has one pinned discussion for newbies and I think that's great. Only the pinned beginner info is missing. Here's how it looks like there:

http://goedhartvoordieren.nl/?page=r/Monero/comments/7hhgjx/monero_gui_01110_helium_hydra_megathread_download/

For Rust it could have something like:

1) What is rust? -> Link to a collection of youtube videos about good talks already there

2) How to get started? -> Link to download page and probably few youtube videos and tutorials which explain how to boot to Hello World! Remember that many people don't know what the compiler is even though they may know some javascript, php, vba, html, css, sql... It's easy but just new information.

3) How to make and compile simple GUI? -> Link to step buy step guides how to boot basic window with button for 1) Linux 2) Windows 3) Mac 4) Cross compilations in Linux. These guides should be separated to avoid any confusion. Also link here https://github.com/gtk-rs/examples

4) Short explanation to few key websites and what should one look from there, how the information can be found and what is the logic behind the structure of the websites:

https://rustbyexample.com/

https://doc.rust-lang.org/book/second-edition/

http://gtk-rs.org/

I can even take care of the content for the pinned thread, if needed.

Load more comments
light3rn 2 points

I found this and there is talk about external configuration with environment variables, but no tips where to actually put these variables (Cargo.toml, cmd, some external system file somewhere?):

https://github.com/alexcrichton/pkg-config-rs

Same here:

https://docs.rs/pkg-config/0.3.9/pkg_config/

I have even tried to put PKG_CONFIG_ALLOW_CROSS=1 here: Control Panel → System and Security → System → Advanced system settings → Environment variables. No luck.

memoryruins 13 points

OP, check out Github’s releases feature instead. Generally it’s best to avoid committing compiled binaries (although there are extensions to avoid the negatives of large binary files).

light3rn 3 points

Thanks, I'll check that out. I'm new to github as well. Just wanted these to be easily available and usable for average users. I think only a minority of the population even knows what a compiler is.

IntolerableBalboa 1 point

And they are going to be cloning your repo for binaries? How does that make any sense? O.o

light3rn 1 point

Or just download the .exe and run it.

Load more comments
light3rn commented on a post in r/Monero
ZERPHED69 27 points

The only thing that disappoints me about Monero... is not buying earlier and cheaper.

light3rn 7 points

I had same regrets first with Bitcoin and then with Monero. In some point however I understood that opportunities don't stop coming and we should keep out eyes in the future or we keep missing them all the time. The game is easier from the mirror, but there is no winning in that game because everything goes farther from us, not towards us.

It's not about being perfect and not to miss an opportunity. It's about what is an optimal strategy going forward.

light3rn commented on a post in r/Monero
nnsmtmre 7 points

you have it backwards, for a ringsize 5 transaction the chance of staying anonymous is 80% while being traced is 20%. also this is only for 1 transaction. most people who really want higher privacy just churn, since with only 5 churns of ringsize 5 the probability of being traced becomes 0.032%.

edit: also apparently Monero changed their sampling method after this paper came out and Matthew Green's paper about the sampling techniques makes it even more efficient for higher ringsizes.

light3rn 1 point

Also why don't people mention stealth addresses here? It's not like chance for being traced is 20% directly. The chance to guess the right stealth address is 20%. Then one must also break the encryption before one can see who the actual sender is.

light3rn commented on a post in r/xmrtrader
M5M400 4 points

still, I wouldn't put my life savings in XMR at this point. like every crypto, it's one stupid vulnerability away from failure.

Impulsive666 3 points

Agree. I am bullish on Crypto, but it would be delusional to put my life's savings into just one asset class, let alone Cryptos.

In 10 years everyone will be an expert und will have known all along that cryptos were going to succeed / fail. But at the point where we're at it wouldn't be a sound decision to go all in on cryptos. We'll see, the history books are written by the winners.

light3rn 2 points

Exactly, remains to be seen. Debate is useless, because only future will tell. Also discussion afterwards is useless, because no-one could had really told what will happen. I think that this game is way too chaotic for anyone to really forecast. We should place our bets and then live with the outcome, good or bad.

Don't get me wrong, I'm not saying I'm confident that we are going to the moon. What I am saying that I'm confident on my investment rationale and Monero's technology. I've been investing for 14 years personally, working for finance 8 years and got Master's degree from finance (economics and accounting as minors) so I'm quite familiar both with risk management and how useless all this conversation is. It's not going to make my investment better or worse if we agree or disagree on something.

The reason I'm having these discussions is that in my opinion a lot of people are just pouring money in cryptos because of nice marketing speeches or beautiful logos. People can't be confused forever and in some point markets will find the way to price these projects. In that point prices will get more on par with the actual usefulness of the projects and I think it will be violent.

Load more comments
light3rn commented on a post in r/Monero
midipoet 1 point

I don't want to wait and fight for Monero as a reaction. I want to act first. I want Monero to be based on every exchange in every country. I want the wallets to be able to be downloaded without a VPN from every country. I want Monero to be so firmly entrenched into every society that it would be near impossible to remove.

i don't think that would be the way to go (though what you suggest would help). normalisation and mass adoption makes things more difficult to ban, but it hasn't stopped governments before. I mean China had a ban on more than one child not so long ago, so banning a specific crypto seems a walk in the park compared to that carry on.

Personally, I think the way to go would be educate and inform governments, ultimately convincing them humans should have a right to financial privacy (which is actually information privacy). Of course that is a much harder battle, but unless you win that one - you are probably always going to be facing an uphill battle.

light3rn 1 point

However monitoring a child ban is a bit easier. And so is taking a child away.

Winniedapoo69 3 points

That is very debatable, but what we really need is a mixture of both use and Hodling combined, which is what I have listed as points 11 and 20.

Storage of value in the purest sense is money that:

a) retains value over time and

b) increases in value over time (deflationary).

This is why Gold is a tier 1 asset despite never being used to buy groceries, coffee, entrance fees to clubs or pay bills. Storage of value rates higher than medium of exchange, otherwise fiat would be considered better than gold but it isn't, (it's trash for storing wealth e.g. housing, healthcare and food all increasing comparatively) but makes an excellent medium of exchange - the functions are seperated.

Monero is most likely both, but private storage of wealth is more critical at this point in time as we already have a lot of fiat and credit for shopping but not many avenues for savings that outpace inflation.

light3rn 2 points

Thank you for writing this.

Load more comments
light3rn commented on a post in r/Monero
slave008 3 points

The devs designed Monero for general use, you can never know in which case who needs more or less privacy. If somebody needs more privacy then they should do it. For now it's cheap, later it might not be.

light3rn 2 points

Also it's not as easy as guessing between mixing addresses. Those addresses visible in blockchain are not actual addresses but stealth addresses. Even with mixing 0 it wouldn't be transparent. Mixing just makes it even harder to analyze and gives plausible deniability.

slave008 1 point

I see, but we are talking about following outputs, you can never know what correlation analysis the adversaries have. Those that really need privacy, should use every measure, the rest of us will just use the default.

light3rn 1 point

I would probably churn as well if it was really super serious situation. I just wondered if it's actually reasonable to calculate the actual probability like that. I think now it gives a wrong picture about the situation. But yeah, I like math, so probably I'm a bit nitpicky.

63
zegordo 1 point

Wow! Over 40k hodlers.

light3rn 1 point

People won't stay xmrtraders long.

KiXiT 4 points

40k subs and there are posts on the front page that are 5 days old :/

Not a very active sub or maybe it's because moneros subreddits are broken down too much

light3rn 2 points

It's quiet because we are not hitting all time highs. Noise will come back when new people start flowing in.

light3rn commented on a post in r/Bitcoin
47
light3rn 1 point

What do you think would be their incentive to push the price down so that people would buy the dip? I would understand if they had huge short positions but to get normies buy the dip...

Just trying to understand what you were after. Finance background here too: I've been trading derivatives for living and now 80% in cryptos.

giospez 1 point

I’m not after anything in particular. I own a handful of bitcoins and if it goes up I’m happy. But when CBOE futures started on Dec11 the initial puts were for btc at 8k by mid February. Guess what happened next. My point is to warn young, enthusiastic, possibly inexperienced investors (I assume, maybe wrongly, that many btc lovers are not exactly Wall Street wolves) of the risks of jumping into this if they don’t have plenty of play money and patience. And when normies buy the dip, money comes in that’s easy to skim by automated platforms. Again, this is just my personal opinion. I’m not a professional.

light3rn 1 point

Oh, ok. I asked because in my opinion it's really hard to point out actual causal relations. Markets often over interpret the meaning of correlations between A and B. I agree that WS may have power to drive the price, but for me it looked like that the volume behind those futures wasn't big enough to incentivize anyone to manipulate bitcoin's price. Risk reward ratio just didn't seem to be there unless one is able to short big time somewhere else (or then volumes changed dramatically after first weeks).

I guess the real game will start H2 2018, when many market participants will have futures based products on bitcoin in place. When they start making phone calls and selling bitcoin products for HNWIs and institutions, money will start flowing. Not sure if the real volume is there yet when banks trade only from their own balance sheet.

light3rn commented on a post in r/xmrtrader
YouShouldBeWriting 2 points

Your theory is incorrect. It has to do with BTC pegging of all alts. We need more pairs aside BTC for the decoupling to happen.

light3rn 2 points

I think it's partly true. In history when BTC has dropped, also for example XMR/BTC has dropped at the same time and not only XMR.

In finance (especially in portfolio theory) correlations are used a lot as a tool to manage risk. In general, stock markets for example are quite highly correlated (inside index but also globally). This is because investors many times react to things with mentality "risk on" or "risk off". Not everyone has the same stocks in their portfolio, but when enough people are considered, it kind of flattens out so that all the stocks drop at the same time when people start moving as a herd.

Kind of offtopic, but in case you are interested: Investors usually seek for a portfolio with with high expected return and low volatility (=standard deviation=tendence for turbulence basically). Good way to do this is to look for stocks and asset classes that are not highly correlated between each other so that it smooths out the ups and downs. Now that cryptos are getting big enough for more professional investors, my guess is that cryptos are going to be seen more as an asset class for investing capital (because professional investors are the ones controlling real money) and that will will drive correlation up even more.

But I think it's also true that BTC being "the one pair to rule them all" ties cryptos together too.

light3rn commented on a post in r/Bitcoin
boof_tongue 5 points

I regularly read rt.com (a western targeted, russia state sponsored media outlet) and they continually demonize crypto. It's as if they don't want any Americans to think it's good.

light3rn 5 points

What? My feeling is the complete opposite. Keiser report is shilling bitcoin all the time. My feeling is that they are trying to weaken US dollar. If US dollar loses it's reserve currency status, it's going to be really bad for US government and very convenient for Russia (and China).

PajamaWhale 0 points

Sure but Russia and China can do that without RT informing us. RT is doing us a service by informing us on a world reality that the U.S. propaganda networks won't.

light3rn 1 point

RT is just one channel. RT is also doing a service. I think both are true at the same time. RT is not pro US nor anti US per se. It's pro Putin. It's in their interest to take down US government but they may also help US citizens at the same time. Flippening cannot happen without US government losing it's global dominance. US government losing it's global dominance cannot happen without Putin being happy about it. Putin does not hate US citizens. He does hate your government.

I'm not US nor Russian citizen btw. Just observing global political scene with interest.

view more:
next ›
2,158 Karma
707 Post Karma
1,451 Comment Karma

Following this user will show all the posts they make to their profile on your front page.

About light3rn

  • Reddit Birthday

    August 3, 2017

Other Interesting Profiles

    Want to make posts on your
    own profile?

    Sign up to test the Reddit post to profile beta.

    Sign up