Better HN
topnewbestaskshowjobs
Log inSign up

codesnik

1,035 karma · joined Mar 11, 2009 (17y ago) · 496 submissions

Submissions

comment 6y ago · link · parent

well, then why bother copyiing at all? ruby passes references everywhere. Those are not pointers, of course, but for small arrays AFAIR those arrays (pointers to actual data) are contained in the reference itself. And logically it simplifies things soo much.

comment 6y ago · link · parent

There're revision control systems based on diffs, but git's power (and durability) is that every commit references only blobs, which are (content addressable) files, not diffs. All the diffs used in git log presentation or git-diff command or git rebase command are computed on the fly from the two stored versions. And yes, if you commit a giant file, and then delete it in next commit it's there forever, until you remove or rewrite a history of a branch that references this file somewhere in history.

There're optimizations on the storage level, compression etc, but on logic level those are transparent

comment 6y ago · link · parent

apple apologized?!

comment 6y ago · link · parent

You probably jest, but perl introduced simple arrays and hashes long before introducing references, and this created a lot of confusion later. Very simple json-like structures are pretty confusing in perl now. In most other dynamic languages distinction between array and a reference to an array is nonexistent, thankfully.

There're some actually exotic data structures, like pseudo-hashes. And perl can do this! $x = \$x

But having switched to ruby 15 years ago I never missed this particular quirk.

comment 6y ago · link · parent

wings are surprisingly tiny. I wonder if wide body is actually providing some lift there.

comment 6y ago · link · parent

> I would imagine Apple doing this with FaceTime soon.

And we'll notice it because somehow our and other people faces in facetime will start to subtly translate strangely aggravating emotions, as current memojis do.

comment 6y ago · link · parent

and memory tricked me. Whitespace doesn't work for regex and quoting terminators.

comment 6y ago · link · parent

and, AFAIR, in perl space and enter could be delimiters too! I think I've used it in some perlgolf task which didn't count whitespace.

comment 6y ago · link · parent

there were attempts to use ; instead, many query parsers in standard libraries still split parameters pairs on semicolon. But who cares if browsers still generate & in GET forms

comment 6y ago · link · parent

"attach a screenshot of your desktop"? really?

comment 6y ago · link · parent

Maybe it's not that relevant here, but in most ruby on rails projects nowadays there're a lot of "service objects" which are intended to be instantiated with all the needed inputs, and to have just one public method "call" without arguments, meant to be called just once.

So, from all the perspectives, they are just functions. But they're not defined as such usually, only because it'd be slightly awkward in ruby for those functions(methods, actually) to have private functions inside. Because there's no import mechanism in ruby, only mixins, which "imports" all the private methods in the module as well, polluting namespace of your class.

As a side measure, those service classes usually have a class method "call", which just passes all the args to the new instance of the class and calls the "call" on it, so you can later just do "ServiceObjectClass.call(args)" or even weirdly looking "ServiceObjectClass.(args)"

It looks very awkward IMHO, but I haven't seen better alternatives yet.

comment 6y ago · link · parent

I went through training for Amadeus system in 2010, to get a better idea of the problem domain I'm going to automate for our startup. "oh", I've thought, "it's a terminal, and a text interface, I'll be fine". After two weeks of training we had an exam. With manuals on hand and a 3 hours time limit. My fellow students were pretty fast, and I spent 2 hours issuing a single ticket.

comment 6y ago · link · parent

oh, so many memories. 4 years debugging barely documented xml output of Amadeus SOAP services (SOAP in name only), (re)inventing rules engines for tax calculations, fearing to receive a bunch of Debit Memos to come 2 months after deploying another poorly understood rule.

Metasearches more or less killed OTA's since. Nobody cares about user experience anymore, if tickets are 1 dollar cheaper on some other OTA, traffic will go there.

comment 6y ago · link · parent

that article (which imho is totally devoid of any substance) still reminded me about other thought experiment by Feynman: What if there's just one electron in the universe, traveling back and force in time, becoming positron when changing time direction, consuming energy when turning forward and releasing when turning back? He was quick to reject this idea, because in this case there would be exactly the same amount of electrons and positrons in the universe, and it doesn't seem to be the case, but I just love the elegance of the conjecture.

comment 6y ago · link · parent

well, system of black holes would lose some energy via gravity waves, this isn't something that could be reversed, yes?

comment 6y ago · link · parent

Clifford Simak's books all seem to be mainly about evolution of humanity of some sorts, but they are so epic that they touch almost every usual and unusual sci-fi topic.

comment 6y ago · link · parent

Ruby introduced similar change in 1.9 back in 2007, and we're fine.

comment 6y ago · link · parent

There's no evidence of neanderthals using bows, though. Hard to imaging some people using bow drill but not using bow for hunt. Or we haven't find it yet, of course.

comment 6y ago · link · parent

and 1 day unlimited pass is a thing, for just 230 rub.

comment 6y ago · link · parent

I think you can use the ticket for only one subway ride in one go, that severely limits your plan. And 90 minutes are counted since the first trip.

comment 7y ago · link · parent

I've pitched that idea for my part-remote company, because remote workers really left behind. I wonder, why just once a month?

comment 7y ago · link · parent

I wonder how this is even patentable.

comment 7y ago · link · parent

me too. I was surprised it wasn't that common at the time.

comment 7y ago · link · parent

nice. long time ago I had much success importing and filtering multiple gigabytes of CSV data into elasticsearch using CSVfix (if I'm not mistaken) + jq (converting it to json-lines in between, using jq as well) xsv seems to cover some areas I've used jq.

comment 7y ago · link · parent

and as someone undiagnosed, but very probably with it too, someone with less variable productivity than me, and in the same time not my manager, would be of enormous value to me. That shouldn't be a "dedicated personnel", as an assistant or whatever, but project manager for example would be helpful for other people too. I'll certainly try to have such an arrangement at some point.

comment 7y ago · link · parent

I'd argue that naming and usability of git is actually very-very up to the point. Naming reflects not the what you want to do on high level, but what you want to do with underlying data structure and checked out files. This could be seen as weakness or unnecessary problem for newbies, but if you work with branches or in multiuser environment, you inevitably would run in some complex and problematic conflict, and then "magical tools" would leave you with a mess, while I've yet to see problem with git repository I couldn't solve.

I've actually taught how to use git to many teams, and I always start with merkle trees. They are actually easy to grasp even for designers and other nontechnical people, and could be explained in 10 minutes with a whiteboard. And then suddenly git starts to totally make sense, and I'd dare to say, become intuitive.

comment 7y ago · link · parent

Well, evolution is slightly slower than that. Try few hundred millenia.

comment 7y ago · link · parent

if the tether would be visible in sun light, and because of eccentricity of moon orbit not always pointed directly to earth, it could look interesting from earth.

comment 7y ago · link · parent

aand of course its symbols are in unicode already. I've heard that not every modern bengali inscription could be represented in unicode.

comment 7y ago · link · parent

"best frisbees" - in their envelopes, or opened up?
1
1314151617