HNHacker News
TopNewBestAskShowJobs

Shoop

872 karma · joined January 30, 2015

submissionscomments
Shoop··on Mystery Languages
> or wrap the index to a valid one (like Python)?

Python doesn't wrap indices to a valid one. However, it does allow for negative indices which are shorthand for the length of the list plus that negative index.

  >>> a = [1, 2, 3]
  >>> a[3]
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  IndexError: list index out of range
  >>> a[-1]
  3
  >>> a[-3]
  1
  >>> a[-4]
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  IndexError: list index out of range
Shoop··on Rewards of Up to $500,000 Offered for OpenBSD Zero-Days (and other dist.)
dupe: https://news.ycombinator.com/item?id=17424085
Shoop··on Kubrick found what he wanted by trying things out
Facebook redirect: https://facebook.com/l.php?u=https://www.wsj.com/articles/sp...
Shoop··on Rust 1.24
Is there a way to generate IR which is easier on LLVM? The Jai compiler compiles 60kloc with an llvm backend in seconds. Could performance like this be seen in rustc?
Shoop··on C0, an Imperative Programming Language for Novice Computer Scientists (2010) [pdf]
Here is some more information about C0:

C0 is used in 15-122, Carnegie Mellon's second semester introductory programming class. I am currently taking this class. The class teaches C0 for the first two thirds of the semester and then transitions to C for the final part of the semester.

C0 has essentially the same syntax as C, but for pedagogical purposes the semantics of the language have been changed to be much more similar to java. Instead of manual memory management, there is a garbage collector, and user defined structs can only be allocated on the heap. Additionally, there is only one integer type which is a signed 32-bit two's complement integer. Overflow is defined as wrapping. strings are opaque immutable types implemented at a language level, rather than just null-terminated buffers. C0 catches out of bounds array accesses at run time. While C0 internally stores array lengths to perform this check, the length is not accessible from C0 code so array lengths must be passed around just the same as C.

C0's biggest feature beyond C is that it allows for contracts. Functions can have preconditions and postconditions. There are also loop invariant contracts and assertions. These contracts are checked at run time when specific flag is passed to the compiler or interpreter (C0 has both, and uses a bytecode internally). A major focus of the class is proving the safety and correctness of the programs we write using these contracts. We are encouraged to prove safety and correctness using only logical reasoning from contract to contract, not operational reasoning. A co-requisite of the class is a course in proofs. There seems to be a heavy influence on the teaching style from Dijkstra's "On the cruelty of really teaching computing science" [1].

The 15-122 class has written assignments focusing on the proofs part of the course and programming assignments which for the most part are automatically graded by autolab [5]. Our code is tested against a number of unit tests to ensure its correctness and our contracts are also tested to see if they can catch bugs in faulty implementations.

C0's implementation is not open source, but it appears to be used in ongoing research [2]. Here is the language website and course website [3], [4].

[1] https://www.cs.utexas.edu/~EWD/transcriptions/EWD10xx/EWD103...

[2] http://www.cs.cmu.edu/~fp/papers/cc016.pdf

[3] http://c0.typesafety.net/

[4] http://www.cs.cmu.edu/~15122/

[5] http://www.autolabproject.com/

Shoop··on Wal-Mart Offers Linux as Windows Alternative (2003)
ElementaryOS is probably what you are looking for.
Shoop··on The Minifree Libreboot T400 is free as in freedom
What OS do you use?
Shoop··on DeepMind and Blizzard Open StarCraft II as an AI Research Environment
Do you have an article about this? I never heard that AlphaGo moved away from MCTS.
Shoop··on Challenge: Put all of Shakespeare's works into the smallest HTML file you can
Just put all of the text in the file names.
Shoop··on Why you should, actually, rewrite some of it in Rust
One implication is that C would have had more errors, but that's a hard judgement to make. It's probably true.

The thing that really matters is that these errors which the fuzzer found aren't exploitable -- memory errors in rust are guaranteed to panic (unsafe aside) instead of susceptible to overflows, etc. Since fuzzing is very much more of an art than a science, this guarantee is important.

Shoop··on Horcrux: A Password Manager for Paranoids
rofi-pass (based on rofi, a dmenu alternative) allows for custom autotype sequences.
Shoop··on HTTPS on Stack Overflow: The End of a Long Road
What sort of company do you work at? Why can't everyone just be told not to post code?
Shoop··on LastPass: Security done wrong
How is enpass's (cryptographic) design and security compared to 1Password?
Shoop··on Author of ‘Sapiens’ on how meditation made him a better historian
Does anyone else have experience meditating this much? Many people seem to attribute a lot of their success to meditating daily and swear its benefits elsewhere in life. However, two hours a day as well as one sixth of the year nonstop is a lot of meditating. At that point are you meditating just because you enjoy it or is it still beneficial enough to be worth the time commitment?
Shoop··on Redundancy Does Not Imply Fault Tolerance [pdf]
"Modern distributed systems do not consistently use redundancy to recover from file-system faults: a single file-system fault can cause catastrophic outcomes such as data loss, corruption, and unavailability."

Systems studied were Redis, ZooKeeper, Cassandra, Kafka, RethinkDB, MongoDB, LogCabin, and CockroachDB. Serious errors in file system fault recovery were found in all systems, resulting in crashes or reduced redundancy, and some systems even spread corruption to other replicas.

Shoop··on Finding an Alternative to Mac OS X – Part 2
Doesn't pass expose metadata?
Shoop··on Finding an Alternative to Mac OS X – Part 2
Unrelated, but what do people think about enpass? I'm looking for an alternative to 1Password that runs on Linux. Lastpass is another candidate.
Shoop··on Google Has Started Penalizing Mobile Websites with Intrusive Pop-Up Ads
You will probably get more registrations at the expense of pissing everyone else off
Shoop··on Randomness in GNU/Linux
For an alternative (and more widely accepted afaict) opinion, see http://www.2uo.de/myths-about-urandom/
Shoop··on Ask HN: If you were to switch career, what would you do?
I'm not sure why you'd judge a genre by its worst music.
Shoop··on Ask HN: If you were to switch career, what would you do?
I don't want to bring the discussion off topic, but I find that hard to believe. Some good electronic artists that I enjoy are Aphex Twin, Boards of Canada, Burial, and The Avalanches. I agree that there is a lot of crappy electronic music on the internet but I think that's true of any genre. Why do you think its the lowest tier?
Shoop··on Angry Bots Demo
The design docs have a rationale for why not llvm bitcode [1], but I can't find anything comparing wasm to other bytecodes or interpreters. Could you point me to the right place?

[1] https://github.com/WebAssembly/design/blob/master/FAQ.md#why...

Shoop··on Async/await support in Firefox
I read it as more of a whimsical and jokey side comment. I don't think it's that egregious.
Shoop··on Academics argue over how many people read and cite their papers (2014)
If it's not read in even a year or two, I think that can still be considered a failure.
Shoop··on Vim 8.0 released
Not OP but https://github.com/pklausler/aoeui
Shoop··on Ruminations on D: An Interview with Walter Bright
I withdraw my claim that compile time IO doesn't make any sense, but it is something I would be worried about. I wouldn't want the executable my build process produces to be changed by what files are laying around on the disk. Mixing in all of the state in the file system with something you want to be mostly stateless (your build process) seems like a dangerous idea to me.
Shoop··on Ruminations on D: An Interview with Walter Bright
When is D not memory safe?
Shoop··on Ruminations on D: An Interview with Walter Bright
If inline asm or non-portable casts were allowed, D programs would compile inconsistently on different architectures. Compile time IO doesn't make much sense either. Not all limitations are shortcomings.
Shoop··on Spotify Said to Retaliate Against Artists with Apple Exclusives
Do people actually take exclusives into account that much when picking a streaming service? It seems to me like the biggest differentiating factors would be price and familiarity, as long as the services in question had a reasonable amount of the content one wanted.
Shoop··on Data points that Facebook uses to target ads
Are you sure? I often see ads for the same type of thing but from multiple competing brands.
← PreviousPage 4 of 5Next →