News for hackers. Stuff that matters.

emillon

Re:The Dropbox hack is real on Friday September 09, 2016 @09:40AM (#12462057)
When I used pwsafe and keepassx they had this option.
Re:Turns websites into Markdown on Friday September 09, 2016 @09:21AM (#12461877)
You might want to filter local and unroutable URLs, for example entering 127.0.0.1 renders a MAMP Pro page.
Re:The Dropbox hack is real on Wednesday August 31, 2016 @03:19AM (#12396515)
It's a common feature of password managers.
Re:Simple Ways of Reducing the Cognitive Load in Code on Thursday June 30, 2016 @03:38AM (#12007112)
There are no semantic problems with this, but typing will get in the way: you can express it fairly easily if all the functions have the same type (such as Int -> Int): actually it's just 'foldr ($)'. But it is difficult to type a list of functions such as each member's return value has the same type as the next one's parameter (symbolically, [an-1 -> an, ..., a1 -> a2, a0 -> a1]). It's easier to refer to the composition of such functions, which is why you would see it as 'h . g . f'.
Re:Simple Ways of Reducing the Cognitive Load in Code on Tuesday June 28, 2016 @10:09AM (#11993889)
It's more like the pipe operator in ocaml (http://blog.shaynefletcher.org/2013/12/pipelining-with-opera...). The lisp version has the extra advantage that you don't have to repeat it between all the intermediate functions. ((->> 2 (* 100) str count) vs 2 |> (* 100) |> str |> count).
Re:1999.io: Blogging like it's 1999 on Thursday June 09, 2016 @08:13AM (#11868835)
I'm hoping to make them fashionable again! http://webring.club/ :)
Re:Loop Invariants on Monday February 29, 2016 @10:21AM (#11195933)
This kind of proofs usually are separated in two steps:

- correction: define a loop invariant. Assuming the loop terminates, it will hold when the program exits the loop.

- termination: define a loop variant, something that changes at every iteration. If you can find a variant that is a strictly decreasing sequence of natural numbers (or an increasing, bounded sequence), you've established that the loop terminates.

Once you've done these two steps you know that the program terminates and the invariant holds at the end. (in your case, you won't be able to find a good variant - depending on the floating point semantics you use of course).

This is correct, I missed this!
That's assuming that this particular string was already present somewhere in the binary. Since it is only present as a reference, you would not see the string in a binary patch.
That is my opinion too, but I would go even further and say that this change could have been made on the compiled binary.

This kind of statement must take 10-15 bytes max to patch and the build boxes are typically less safe than source control systems.

The letters in this password spell "sun su".
Re:My Home-Built TTL Computer Processor on Thursday November 19, 2015 @07:36AM (#10594385)
Thanks for the heads-up!

For some reason mailchimp was returning 403s from heroku, this must be related to this morning's outage. This is fixed and I added the emails that failed.

Re:My Home-Built TTL Computer Processor on Thursday November 19, 2015 @04:39AM (#10593727)
(shameless plug)

I totally agree, that was awesome to discover random websites. I think that there's still a place for webrings these days, so I'm creating the webring club. Feel free to subscribe on http://webring.club/ or shoot me an email (address in profile) if you're interested in exchanging ideas!

Re:Tetris as a C++ Template Metaprogram on Wednesday July 01, 2015 @03:53PM (#9814672)
This kind of compiler has already be done: http://gergo.erdi.hu/projects/metafun/
Re:Closures and Objects Are Equivalent on Monday April 13, 2015 @03:06AM (#9366301)
Yes, it's not very formal and as others said it would need some definitions to make a useful result.

But actually I don't think that this duality is related to types: in a static language, the types of captured variables does not appear in a value's type. And for the object side, the type of instance variables is hidden behind the public interface too.

So it's really more about techniques for creating abstractions than how the values are composed together.

Re:Closures and Objects Are Equivalent on Sunday April 12, 2015 @12:18PM (#9363797)
I like to see this as a sort of duality: closures are objects that have a single method (call) and objects are made of functions that can only capture one variable (this).
Re:Why OCaml GADTs matter for performance on Tuesday March 31, 2015 @02:16PM (#9298650)
Yes, exactly. ADTs are entirely known statically so there's no vtable etc.
Re:Why OCaml GADTs matter for performance on Tuesday March 31, 2015 @02:22AM (#9294660)
At runtime, GADTs are actually represented the same way as plain ADTs (that is, a tagged union). The tighter types make it possible to remove some unused branches in pattern matching, so you may remove a few tests, but memory-wise it should be the same.
Re:OCaml: Objects on Monday March 16, 2015 @02:50PM (#9213448)
> OCaml classes allow row polymorphism, but disallow immutable updates (immutable updates meaning create a new object with everything the same, but one element different.)

There's a functional update construct for objects:

http://caml.inria.fr/pub/docs/manual-ocaml/objectexamples.ht...

It works like { r with field = value }.

Re:Why OCaml, why now? (2014) on Sunday February 15, 2015 @07:00AM (#9052400)
> Also, when your programs use abstract data types you lose the benefits of pattern matching.

In some cases you can also use "private ADTs". Modules seeing such a type can use pattern matching on them but can not apply the constructors.

Older »