Better HN
topnewbestaskshowjobs
Log inSign up

sepeth

234 karma · joined Oct 13, 2010 (16y ago) · 77 submissions

Submissions

comment 2w ago · link · parent

It also looked to me a bit like a semipredicate problem:

https://en.wikipedia.org/wiki/Semipredicate_problem

comment 3mo ago · link · parent

One of the nice things about jujutsu related to this is that when you update a branch, it rebases other branches started off of that branch. I often switch to jj if I want to split my work for easy reviewing, and it works great colocated with a clone created with git.

comment 9mo ago · link · parent

I haven’t been using Emacs for a long time now, but isn’t the Emacs way better? With undo tree you don’t lose any history, but the same is true for what Emacs does by default and it is much easier to navigate the history, since every change is part of a linear history and undos and redos also get added to it.

comment 1y ago · link · parent

This is why I believe GPL v3 is important.

comment 5y ago · link · parent

This this this. It was the first thing I missed in Vim when I switched. You also don't lose in Vim, as it keeps it the history as a tree, but it is harder to navigate the tree than Emacs' linear history.

comment 6y ago · link · parent

I tried this with VSCodium, but it doesn't work. The recommended extensions are not in open-vsx marketplace. I installed the foam extension from the VSIX file, and it asks to reload VSCodium but I don't see it in my installed extensions after.

I would love to help to get it working for VSCodium if it doesn't depend on anything VSCode specific.

comment 9y ago · link · parent

I agree with the first part, but not with the second part. I believe equating John's behaviour to a chef who has told a customer off is just as distant as mine.

If I was looking exact equivalent, I would just send the same link to the same email.

I am using empathy here. I don't know you guys, you may feel ok if you get shouted when you do wrong when contributing to a project, but I would feel bad, and as a human, I don't think my feelings are not important. If it is coming from an important person like Linus Torvalds, this would hurt even more, and really I don't see anything disrespectful to anyone in John's email.

comment 9y ago · link · parent

And to the people who actually help you.

Not only your users are important, people who help you are also important.

> If you ask nicely and people don't do it, or keep ignoring it then you up the tone

I am sure it can be done much better with a little effort. Being smart, or being someone who has done something important shouldn't exempt you from being nice to other people.

comment 9y ago · link · parent

How? Really? Ask that to a child beaten up by their parents in the street. I am sure that child won't make the same mistake again. I am not interested about if Linus is right or wrong, many other people have done that already. I am more interested the way that he speaks. I am gonna go ahead and say it. The way he speaks in this email is ugly, wrong, and should never be encouraged. The language we use is important, even though sometimes it takes more effort, love takes effort, good things take effort, and good communication takes effort too. We should at least try to be nice. Otherwise life would be kak.

comment 9y ago · link · parent

They are public. When you create an AWS account, you will have a default VPC (this wasn't the case with the classic EC2), and when launching an instance, if you don't specify anything else, the instance you launch will be in the default VPC.

comment 10y ago · link · parent

Do you really think that it is that simple?

comment 10y ago · link · parent

Let's replace some of Math with dance!

https://youtu.be/iG9CE55wbtY?t=8m40s

comment 10y ago · link · parent

"Non-nullable Types"

This is the first filter I check when I am deciding to learn a programming language these days. Almost all real world code I saw have had random null checks everywhere.

comment 10y ago · link · parent

A bit old and it is in Pascal, but still, Let's Build a Compiler by Jack Crenshaw is also fun to read:

http://compilers.iecc.com/crenshaw/

comment 10y ago · link · parent

Ah sorry, I was misreading it from the beginning :(

comment 10y ago · link · parent

It puts zeros to unused bytes in the destination. Here's a note from its man page:

Some programmers consider strncpy() to be inefficient and error prone. If the programmer knows (i.e., includes code to test!) that the size of dest is greater than the length of src, then strcpy() can be used.

One valid (and intended) use of strncpy() is to copy a C string to a fixed-length buffer while ensuring both that the buffer is not overflowed and that unused bytes in the target buffer are zeroed out.

comment 11y ago · link · parent

They are part of the GNU system.

http://www.gnu.org/help/evaluation.html

Btw, some projects are hosted on nongnu.org domain, those are not part of the GNU system.

comment 11y ago · link · parent

Not directly related, but there's one tweet I like:

"No no no no. The voice of newbies is one of your biggest assets. Why don't they understand? What is the confusion?" John Resig

https://twitter.com/jeresig/status/584030561313943552

comment 11y ago · link · parent

How CORBA compares to Apache Thrift, or Google's protobuf? or do they try to solve different things?

comment 11y ago · link · parent

> I just turned down an offer because of something like this.

One question, was this offer from amazon? I mean, are the things the guy said for amazon?

comment 11y ago · link · parent

You should use highest protocol of pickle, here are the numbers in my machine:

    In [5]: %timeit pickle.dumps(a)
    1 loops, best of 3: 724 ms per loop

    In [6]: %timeit pickle.dumps(a, protocol=pickle.HIGHEST_PROTOCOL)
    100 loops, best of 3: 12.4 ms per loop

comment 11y ago · link · parent

I also used this in a similar situation, it helped me to save a lot of memory in my skiplist implementation:

https://github.com/sepeth/python-skiplist/commit/00ae7f94246...

Redis's skiplist is also using the same feature:

https://github.com/antirez/redis/blob/unstable/src/server.h#...

comment 11y ago · link · parent

> Note that you can be a programmer without ever having touched a computer, people have been coming up with algorithms and integrating them into systems for ages.

Slightly different, but the first episode of SICP videos helped me to reach the same conclusion:

https://www.youtube.com/watch?v=2Op3QLzMgSY

We can even say Newton, or Euclid wrote programs. Maybe not by sitting in front of a computer, but they described a process to calculate something.

comment 11y ago · link · parent

I haven't read 'Code' yet, but I think starting from NAND gates is right; it has to stop at some level. I feel CMOS, MOSFETs, semiconductor physics.. are all interesting topics, but this book is already too broad.

comment 11y ago · link · parent

FP languages have algebraic data types for this. Why do they call it virtual structs? How are they different than ADTs?

comment 11y ago · link · parent

does that mean camera have seen it as blue?
123