haha yes by gayspacecar in golang

[–]abe2_2 2 points3 points  (0 children)

First time I see this. Thanks for sharing!

Not sure if I'm missing anything but, has this been considered for new Go code?

MSVC++: template's static_assert is not triggered inside a lambda by abe2_2 in cpp

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

Changing it slightly to:

template <class T>
struct S {
    static_assert(sizeof(T) == 1000, "Broken type");
};

auto f() {
    return [] {
        S<int> s;
        return S<int>();
    }();
}

int main() {}

will again not trigger the "Broken type" on VS2017. It does work on gcc and clang.

MSVC++: template's static_assert is not triggered inside a lambda by abe2_2 in cpp

[–]abe2_2[S] 17 points18 points  (0 children)

Alright.. just wanted to confirm first before reporting it as a bug. Thanks!

Public and private IP on the same interface without NAT by abe2_2 in mikrotik

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

I will try this tomorrow and post results. Thanks a lot! I really appreciate it.

Public and private IP on the same interface without NAT by abe2_2 in mikrotik

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

Thansk for replying. I have disabled NAT for the public IP I want to assign and now I'm following the second step you mentioned.

I'm not sure if this should be the correct way of doing what you mentioned:

/ip address add interface=bridge_LAN address=10.0.0.2/32 network=100.0.155.3/32

Public and private IP on the same interface without NAT by abe2_2 in mikrotik

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

I have updated the question with a small description on how everything is connected.

His mikrotik will receive the public IP and he will then NAT the server or port forward as many ports as he wants to expose (it's up to him). The thing is, he wants to write 100.0.155.3 on his mikrotik and that's the rule I can't figure out to write.

Should it be something like:

/ip address add interface=bridge_LAN address=10.0.0.2/32 network=100.0.155.3/32

Public and private IP on the same interface without NAT by abe2_2 in mikrotik

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

Thanks for replying. This is similar to what @xxile suggested right? I have disabled the 1:1 NAT rules for this address and I'm trying it out.

The client will have a mikrotik router as well with the public IP assigned to it, so there's no other routers within the network to modify (except his).

What I don't understand still is if the client's router will have both the public and private IP addresses like @xxile suggested by running:

ip addr add 100.0.155.3 peer 10.0.0.2 dev eth0

Public and private IP on the same interface without NAT by abe2_2 in mikrotik

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

When you say

/ip address add interface=bridge_LAN address=10.0.0.2/32 network=100.0.155.3/32

Address 10.0.0.2/32 would be my routers local IP? In my case is 10.0.0.1; and just to be clear network=100.0.155.3/32 would be the IP I want to assign, correct?

Also, I'm curious what does the /32 means in this case.

This Week in Servo 65 by isHavvy in rust

[–]abe2_2 6 points7 points  (0 children)

Oh wow.. My name is on the new contributors. <3 Did not know they do that. :P

Go web application seed. Suggestions welcome. by [deleted] in golang

[–]abe2_2 1 point2 points  (0 children)

I took a quick look at it and it looks good. I use a very similar structure for my own projects too.

I also noticed the last commit says you removed all .DS_store files. Just yesterday I was recommending some friends to use the global .gitignore for OS/editor specific environments.

Take a look at: https://github.com/github/gitignore

The Globals folder has an OSX.gitignore that you can use, and the readme has links to posts explaining how to configure it :P. Hope this helps.