Better HN
topnewbestaskshowjobs
Log inSign up

TacticalCoder

10,589 karma · joined Dec 4, 2013 (12y ago) · 4,854 submissions

email: I'll add a suitable email one of these days
Submissions

comment 6y ago · link · parent

Haven't switched yet. Under Wayland, can users which are not owning the session display an app on the Wayland session/server? (e.g. under X I can do something like "xhost +" and then have any user display an app on the X server). I'm not asking about the security implications of doing that under X (as you already mentioned, X is less secure and an app can read another app's screen content etc.): just if it's doable or not under Wayland?

comment 6y ago · link · parent

> what do they do? Can you point to some successful use-cases today (other than some kittens) where this might apply?

Nitpicking but ain't collectible card games with proof-of-ownership a use case though? In the Magic The Gathering world (for real physical cards) ensuring that thought-after cards are the real thing is an issue. There are brick and mortars grading companies grading the cards. Then you have to trust the seller you're not getting a swapped-in chinese fake.

But another use case I've seen used: fully decentralized messaging, either "pseudonymous" (say tied to a BTC address: there's been a working demo showing on to do this on BTC's lightning network) or fully anonymous messages, using ZK cryptography.

In this case you don't know who send a message to whom. You don't even know if it's a message or an amount transferred.

And if the cryptographic primitives behind that are broken, we would pretty soon know (price would crash).

To me decentralized messaging, fully anonymous using zero-knowledge cryptography primitives, is quite a use case compared to the "we-need-your-phone-number-but-trust-us-our-protocol-and-app-ain't-backdoored-and-we're-not-collecting-any-data" messaging solutions that are out at the moment.

But I agree it's a world obviously full of scam. Still: a blockchain is basically a computer: a very slow and bloated one. But it's also an incredibly correct and very hard to hack computer.

I think there are valid use cases for a fully decentralized computer running advanced cryptographic primitives like zero-knowledge cryptography. To me fully anonymous decentralized messaging is one (and a badly needed one at that). There are probably others.

comment 6y ago · link · parent

Re- the Emacs config suddenly breaking... I do something getting more and more common: I put my entire Emacs config in Git. It's a bit more work when upgrading packages (because you have to commit them too) but then there's hardly ever any breakage that's not one Git checkout away (I'd say anyway that Emacs doesn't that often break at all: it's more the usual package dependencies SNAFU of our trade that bites Emacs users once in a while when they upgrade this or that package).

On a funny side note I had a very bad Emacs breakage recently and at first couldn't understand why checking out the latest known correct Git version wasn't working on my main machine. It was working on another computer (btw copying my entire Emacs config is, well, also one git command away, so is backuping). Turns out: for whatever reason the file containing the list of files recently opened by Emacs got corrupted in a very strange way and that's one of the rare Emacs file I'm not committing into Git. Took me a few minutes to sort out.

comment 6y ago · link · parent

> "I forgot" is generally not a valid defense.

Am I the only here who had to re-install Linux after x weeks or months of uptime because the LUKS password was forgotten? It happened to me more than once.

How is it "generally not" (but sometimes yes?) a valid defense when it's a fact that people are losing their passwords?

The internet is full of messages like: "I forgot my LUKS password but remember it had the name of my dog in it" (not advising to do that btw), "Is there a way to crack my own password?"

P.S: I've got backup of all my files and configuration files, so re-installing Linux ain't a problem: theft / flood / fire / full-disk encryption password lost... I wouldn't lose anything.

comment 6y ago · link · parent

Yes exactly: back when I bought that screen it just came out (I think) and was quite a price jump compared to a similar but "only" 34" LG doing 3440x1600 (same pixel size, just a bit less pixels). So I thought the way you just explained and decided to shell out the extra bucks to get a 3840x1600.

comment 6y ago · link · parent

I switched from two monitors to a single, curved, ultra-wide 38" doing 3840x1600 pixels (LG 38UC99-W) about two years ago. I would never go back. I took maybe two days to get used to it. At first it was funny: going back to a flat screen and I would see the flat screen curved (!) but this weird effect disappeared after a few days and now I can use either curved of flat screen and everything always look normal: it's amazing how fast we adapt.

That's 3x 1280 wide columns (I don't always use three columns of the exact same width that said). That's a lot of screen real estate already.

Common setups I use are three columns (say IDE / Emacs in the middle, browser at the left / terminal bottom left / PDF open on the right / another terminal at the bottom left) or two columns. I often also have one virtual desktop with 9 terminals opened.

IMO when you begin to go really ultrawide the pixels "in the corners" are kind far away compared to the others. A slightly curved monitor helps a lot with that.

Now I don't game and don't watch movie on my monitor so there may be better 3840x1600 monitors than the one I picked two years ago.

I try to arrange things logically and always in the same order, so I always now on with "virtual workspace" I'll find what opened. I use a tiling window manager and keyboard shortcuts to resize windows.

Only app I run in full screen is photo-editing software. I take it audio and video editing software would do too.

comment 7y ago · link · parent

Your nick sounds familiar. "richtea" I'd say I remember but no idea from where.

Yeah I'm sorry that my comment from late 2014 gave that false impression that I said GMP was written in C. What I meant was that it was, when I did the testing, slightly faster to call GMP from C than from Haskell, Clojure, Java. I remember I tried all these back then and calling GMP for C was a bit more efficient. Now I know there are now ways to call libs like this from Java without paying the old foreign function call penalty: but I didn't know about that in 2014. So I called GMP from C because it was faster. Out of memory I'd have said GMP was C with inline assembly but I may be wrong ; )

comment 7y ago · link · parent

Quite a few of us in here! I spend a lot of time in other countries so I'm not that often in Belgium but I'll make sure to contact you when I come around. We should exchange emails. You can email me at bernard at fabrot dot com !

comment 7y ago · link · parent

Wow quite a few belgian in here! Weirdly enough I'm not that big of a beer drinker but... Although I didn't celebrate finding the solution in any other way than doing a silly dance in front of my family I did celebrate the HN thread reaching 2nd place on the frontpage by drinking a Mort Subite / Lambic Kriek : )

comment 7y ago · link · parent

> Does that mean that you could, if you wished, have switched to a different machine and just continued where you left off?

Totally. It's even explained in the original problem description: the idea was that every year you'd switch to more efficient hardware, picking up the computation where you let it off, until Moore's law stopped applying.

I considered upgrading from my i7 6700 to a 8700-K overclocked for slightly faster clock speed (and maybe some instructions taking fewer cycles). It'd have saved some time.

comment 7y ago · link · parent

> How much work was involved in the 3.5 years ?

Already answered somewhere but lost in this thread...

Hardly anything. Relaunching the computation after a black out or an OS reinstall or when I moved from one country to another : )

Also once in a while going ballistic with backups as to not lose x months / years of computations.

Then at the end doing as the puzzle says to do: xor to get the secret message. Get b from the secret message and do 5^b mod (2^1024) then find the first prime above the resulting number. Divide n by that first prime to get the second prime. This took no time.

> What do you think you do in your life that might have given you a leg up in cracking the puzzle ?

I don't know. It required finding it (mostly chance there), reading it and understanding how the parameters were set up, realizing that a solution could probably be found in some "reasonable" amount of time and then it required some dedication (and maybe a tiny of crazyness too) to run if for so long.

I clearly always liked optimization and learning new languages and trying libraries and whatnots: so as the solver was simple to implement I was easy to quickly try different languages / libraries. I kinda knew upon reading the puzzle that there was a good chance that it could be solved faster than expected.

But really it's like 10 or 12 lines of code. I spent some time doing performance tests but besides that it was just being patient?

I was clearly motivated by the idea that I could be the first one to find the solution to this puzzle. That one carrot worked wonderfully on me : )

comment 7y ago · link · parent

No it really didn't. I think I mentioned here elsewhere in a comment but I use an Intel Core-i7 6700 "non K": so the version that is not meant to be overclocked and which Intel rates as having a max TDP of 65W. And this would be with the four cores running. I don't know the TDP / power consumption when it's turbo-boosting at 3.9 or 4.0 Ghz (when one or two cores are at full speed on the 6700, it goes from 3.4 to 3.9 or 4.0 on these cores).

Basically I like my workstation to be quiet. Really very quiet: as in I can only hear it if I put my ear on the tower. So I never have ultra power hungry CPUs. I don't game so no GPU besides the integrated one. A M.2 SSD which consumes next to nothing.

Power bill probably did increase a bit but honestly it was lost in the noise: I definitely didn't notice anything : )

comment 7y ago · link · parent

I found the challenge by chance. It was so long ago I don't exactly remember when. Thought it was 2015 but an old comment of mine on HN seems to indicate I may have started looking into this back in 2014, when I was still using a core-i5 CPU : )

> Can you tell us a bit more about your self-taught background?

Sure... I started programming in BASIC at 11 years old on the most inconceivable setup ever: an Atari 2600, which was a gaming console (the infamous one which lead to the video industry crash of 1983 with a landfill filled with E.T. cartdridges). So how do you write BASIC on that at 11 years old? Well your mom offers you a "BASIC cartridge" which comes with a keyboard in two parts you plug in the joystick ports! (horrible experience but I do remember writing tiny programs drawing colored lines using that).

Then the Commodore C-64: more BASIC, some assembly using a "power cartrigde", mainly to modify (hack?) games. Then the Commodore Amiga: learning to write intros and demos. Then the PC (386, 486, and so on): writing a video game (finished but never published but it landed me my first job: long way too long story), writing more intros and demos (won a PC demo compo in Sweden). I'll blog one day (when I'll have a blog) about that PC / DOS video game which was running at 60 Hz on a 386 because it used a cool collision detection method I came up with (which as far as I know is unique and was pixel perfect even back then and was and still is particularly efficient). I still do have both the source and the binary for that game.

For the languages I mainly did BASIC then assembly (680x0 and 80x86), C with inline assembly, C++, Java... Then I stuck with Java for a very long time. Got a Sun Certified Java Programmer certification around 2000 (which makes me an oldtimer): only cert I ever got.

I cannot say I didn't do boring Java consultancy for even more boring companies/organizations. And thankfully once in a while a fun professional project ; )

Nowadays I'm still programming in Java as for my own projects I like to write proof of concepts using Clojure (and ClojureScript). And as I'm an Emacs (IntelliJ for Java though) user if of course waste a lot of time with elisp, hacking my Emacs config!

I hope you still love HN ; )

comment 7y ago · link · parent

Ah no, I don't use Massdrop.

Keyboard is a Happy Hacking Keyboard Pro JP. Mat was a gift from my brother and I have no idea where it comes from. Monitor is a LG. Watch is a slightly fancy swiss mechanical diver's watch ; )

comment 7y ago · link · parent

Hi, no problem for me with the off-topicness: I said I'd gladly answer questions : )

As dsincl12 wrote it's indeed a 38": the LG 38UC99-W.

And you're correct, good catch: it's the Awesome WM running on Linux (Debian Stretch). For the geeky details: it's Awesome WM but with a patch I modified doing "useless but not useless" gaps. Basically it adds gaps between the top bar and between the windows, but it doesn't add gaps on the edge of the screen (which to me makes the more sense but YMMV).

So yeah a Core-i7 6700 / 16 GB of RAM / NVMe M.2 PCI-e 3.0 x4 SSD, which is my daily workstation (as I wrote elsewhere in this thread: I solved this on my everyday workstation).

I've got 12 virtual workspaces set up and my "main" one is in a three columns layout (with Emacs in the middle ;)

comment 7y ago · link · parent

Ah "Ron's Code 5". It's Ron Rivest too ofc!

Good you post this because I had no idea what I could keep my computer busy with now that LCS35 is solved ; )

comment 7y ago · link · parent

Precisely. And I did this on my everyday workstation, which I also used simultaneously for coding, browsing, emailing, etc.

Is that not epic? : )

Now I think it's fair to say that part of the solution also consisted in realizing that using a fast big integer library it was doable in three years something.

comment 7y ago · link · parent

It was decided that the solution would be kept secret until the 15th of May, when the time-capsule shall be opened.

As the problem states: there's a number allowing to factorize n. There's also a little message.

comment 7y ago · link · parent

> TacticalCoder last HN comment is from Dec 5, 2015. Checks out.

I didn't realize... Your comment is actually extremely funny: I love it : )

Yeah, it's more or less when I started computing that. This is hilarious.

comment 7y ago · link · parent

Hi MrXOR,

first thanks a lot for posting this to HN!

Then: is there a question somewhere in your post which I missed? : )

comment 7y ago · link · parent

The puzzle is based on a paper from 1996 by Rivest, Shamir and Wagner: https://people.csail.mit.edu/rivest/pubs/RSW96.pdf

Each step depends on the result of the previous step. I don't know of any claim that the crypto/maths behind the paper do not hold.

You can use a FPGA or build an ASIC: but as far as I know as long as the crypo in this paper hold, it's not parallelizable.

comment 7y ago · link · parent

> Did you knew for certain that your program will solve the puzzle at some time?

The description of the problem itself explains a way to verify that intermediate results are correct.

> Did you have an estimation of the date?

Yes and that one is easy: I wrote a little piece of code (in Clojure, whatever, it's unrelated to finding the solution) which would check at which intermediate result the computation was and then compute an "ETA".

Fun story: I'd regularly send my brother something like this...

{ :time-left-in-years 1.239341704718417 :eta "1 year 2 month(s) 26 day(s)" :percentage-done 0.6284244211583109 }

(that's an actual estimate I found in my old emails)

: )

comment 7y ago · link · parent

I obviously love all the kind of algorithmic puzzle / challenges / competition.

I haven't done many from Project Euler but I did participate a lot in the "TopCoder" competition back when TopCoder started (that'd be many many years ago).

I think it's a great way to learn about algorithms or to learn a new programming language.

comment 7y ago · link · parent

Kinda: a friend told me exactly that the other day. But we then discussed it: technically the hare started first and then rested, which is not what Simon and his team did : )

comment 7y ago · link · parent

And fun fact: that (french) book was actually typeset in LaTeX but I had to fight big times with my published/editor so that they'd accept LaTeX as they wanted me to typeset it using QuarkXPress. I knew how to use Quark XPress but I wanted that book to be typeset from Linux, with LaTeX. And eventually they accepted ^ ^

comment 7y ago · link · parent

Celebration at the MIT on the 15th of May and it is public.

I don't have a blog (yet) but I do have a few things I'd like to write about (not just this puzzle) and share with other enthusiasts so I think I'll simply start a blog. But it won't be on the 16th: I'll need some time to come back home etc.

comment 7y ago · link · parent

> Was this a side project? did it require much attention after the initial setup?

Totally a side project.

It hardly required any attention: just making sure the computation was running and making sure to backup the intermediate results once in a while (I had backups everywhere of the intermediate results: remote servers, USB keys, DVD, other computers at home, email, etc.).

I only needed to do a few tiny steps once I found the secret message (which contains a number which allows to compute one of the two prime numbers).

comment 7y ago · link · parent

That'd be me too!

I'd love to hear more about it: you can email me bernard @ fabrot dot com

comment 7y ago · link · parent

As for the uptime it's a pretty reliable machine: I'm running the i7-6700 (non K, so non overclocked) version. Intel lists it at 65W max TDP but that'd be with all the cores at 100% I guess. It's a 3.4 Ghz CPU turbo-boosting when only one core is at 100% to 4.0 Ghz on that one core.

OS is Debian stretch: it's rock solid in my experience.

It was rebooted on average once a month (I switched country, there were black outs, I upgraded the OS, etc.) but there have been stretches where it was up for several months in a row, happily cranking!

1
158159160161162