Better HN
topnewbestaskshowjobs
Log inSign up

ehsanu1

1,377 karma · joined Apr 26, 2011 (15y ago) · 616 submissions

ehsanul@ehsanul.com

I'm actually ehsanul (http://news.ycombinator.com/user?id=ehsanul) here on HN, but I switched Google accounts.

Submissions

comment 8y ago · link · parent

Not sure if troll, but giving the benefit of the doubt...

You are clearly posting a comment comprised of letters of the alphabet. How would one do so without knowing the alphabet, assuming you typed it out rather than dictated it. And well, you also read the original reply. So are you having all that dictated for you? Or are you implying the reading/writing does not require knowing the alphabet (which is difficult to believe, but who knows)?

About the use of an alphabet, have you used a dictionary or any other system that is alphabetically ordered?

comment 8y ago · link · parent

Probably a function of your industry and where you are.

comment 8y ago · link · parent

I can agree with the initial frustration coming from a GC-ed language until one figures out the right way to design code and structure data in a language with manual memory management. But I got over it eventually.

I'm also curious about this nitty gritty bit. I see this:

Generally, Self : Sized is used to indicate that the trait should not be used as a trait object. If the trait comes from your own crate, consider removing this restriction.

I guess you needed that sized restriction for some reason, assuming this was a trait of your own?

comment 8y ago · link · parent

Yeah, true_religion seems confused/misinformed.

comment 8y ago · link · parent

Correctness is typically checked long before code generation happens. This does mean the code generation backend must be trusted, whether the target be x86 or wasm. Just as you have to trust CPUs to not expose processes' memory to each other (oops).

comment 8y ago · link · parent

Surrogate pregnancies?

comment 8y ago · link · parent

Goroutines allow you to write async code ergonomically. Without those, you'd have to write callbacks, which is very unergonomic.

Here's a before and after diff of some prototype async/await usage in Rust: https://github.com/mehcode/shio-rs/commit/8078a34c075bf2f52c...

comment 8y ago · link · parent

Agreed, I wouldn't do a production web service purely in Rust yet, the ecosystem is still way too immature.

comment 8y ago · link · parent

I worked on a high performance Rails API serving dynamically generated map tiles and our response times were actually lower than that.

Sounds like an ideal case for fast response times honestly. I've seen rails endpoints like that aplenty. But there also exists a lot of stuff taking hundreds of ms on a cold cache, and it's the kind of thing where the same effort done in the same way using another language ecosystem would just be 10x as fast.

If you've never seen this, perhaps you've never worked with a large monolithic rails app with a few years of legacy code built up? Brand new API endpoints can be a lot faster of course.

comment 8y ago · link · parent

I've seen numerous big rails apps with times as long or longer, even after decent effort has been put in to optimize. Generally a case of having a lot of things on a page and rendering it all into html server-side (the classic/old rails way of doing things).

comment 8y ago · link · parent

At my day job have an a prod analytics service with all the stuff you mention written in Rust + PG, and the Rust bit which handles data ingestion via HTTP and JSON is only about 5x faster than the equivalent Ruby code. Obviously, that was a big disappoitment to me.

5x isn't too shabby for something potentially somewhat IO-bound. Presumably the effort wasn't 5x to build and maintain that, so if that's a very hot inner loop of something that's great.

What I've found is that using Ruby (mainly gems) idiomatically can just lead to way slower performance. Eg I use time libraries a lot for my day job, and the idiomatic way to write the code had tons of hidden costs and was basically impossible to optimize.

So I wrote a ruby extension in rust, and got a 30x speedup on that code - it was pretty computationally intensive, so a perfect fit for this. Part of it was that I was forced to use more primitive types, but in Rust-land I was able to add types all over the primitives and abstract away to my heart's content, without any overhead. That's just something that's impossible in Ruby - each abstraction always has a cost and there's no way around it.

If you look at the work Aaron Patterson and Shaun Griffin have done and are doing on AR, or what Peter Ohler has done with Oj, I don't think it's fair to say that either the Rails or Ruby ecosystem doesn't care about performance. They just don't put it before usability by default.

Right I wouldn't say nobody cares about performance, some people care a lot and they've been doing great work and helping raise the bar. But overall, the bar is pretty low in the Ruby world.

Chris Seaton (one of TruffleRuby's main authors) has a talk where he shows some of the batshit insane code you see in gems, which they had to figure out how to optimize in TruffleRuby/Graal. Code like allocating a new array and calling the `min` method in order to find the smaller of two values! And that was being called in a hot inner loop! In a gem with otherwise great functionality, a nice website and thousands of users. That's the kind of thing you only see in Ruby-land.

Also, using method_missing (gotta have that pretty DSL, performance and greppability/discoverability be damned) and monkey-patching/alias-chaining/etc is still common unfortunately (though a smart JIT, ie Graal, can apparently handle that).

I am really excited about TruffleRuby and it does really amazing things to optimize crazy Ruby code, so I'm looking forward to Ruby being as fast as say JS in the future. Can't wait for the day I can turn on TruffleRuby in production and halve the AWS bill.

comment 8y ago · link · parent

Those Sinatra numbers look a lot better than I remember them being!

But I wouldn't give that much credence to that, there's barely anything happening in those benchmarks and it seems to be testing things that have had a lot of optimization effort thrown at them. Try adding session management, user permissions, large data models, some business logic, all without putting a lot of effort into optimizing (ie like most work environments) and try again. Also, yeah, use some heavy (extremely popular) gems like ActiveRecord.

And God forbid you actually do something computationally intensive anywhere. Serialization (even with drivers written in C) is also very slow if you have a lot of data. And if you have enough traffic, even a 2x performance difference can be pretty important in terms of cost.

AR and similar libraries are the killer of performance in the Ruby eco-system. It's not the bare web framework itself, but the entire eco-system is generally not too worried about performance compared to other languages (partially because it's harder to optimize in Ruby, partially due to the culture).

That said, the language has gotten a lot faster since the 1.8 days, eg GC has seen a lot of improvement, but it's still damn slow.

comment 8y ago · link · parent

How does a "global resource manager" work and in what way is it better than RAII and garbage collectors? Googling wasn't helpful.

comment 8y ago · link · parent

Had to re-read a few times, but the comparison just seems like a poorly worded attempt at a joke/insult.

comment 9y ago · link · parent

Try:

1. Rainbows End, by Vernor Vinge 2. Otherland, by Tad Williams

comment 9y ago · link · parent

I agree, not small (seems subjective), but still the smallest! The smallest leap is probably not very large :D

comment 9y ago · link · parent

It's a joke. A quantum leap is what you say, but a quantum in physics is all about being the smallest discrete unit of some physical property such as energy.

comment 9y ago · link · parent

I can't live without my vim bindings now, it's incredibly jarring anytime I have to use someone else's editor. The muscle-memory is just too strong, and configuring vim with a bunch of plugins is extremely easy to do and provides me a lot of value for no downside afaict.

I started configuring vim years ago and have only tweaked it here and there over time, adding a plugin for this or that as I felt the need. I don't really see anything wrong with that :)

comment 9y ago · link · parent

Moreover, it's likely that a proper GAI would be able to ideate and come up with such concepts completely on its own. In fact, "lying" need not necessarily be a concept that has to be learned, the concept at play here is getting people to do what you want them to do by means of words. Lying falls out naturally.

The whole idea behind dangerous superhuman AI is in that AI seeing possibilities that humans fail to see and gaining capabilities that humans do not possess. Without superhuman intelligence, AI is no large threat to human civilization, exposed to dangerous concepts or not.

comment 9y ago · link · parent

MyTime | Senior Software Engineer | San Francisco, CA | Full-Time | ONSITE | https://www.mytime.com/merchants/scheduler

Team: We're a small team of ~10 developers, largely remote, looking to grow our San Francisco team by a few members.

Product: We build a SaaS product for appointment-oriented service providers, like hair stylists, auto mechanics, pet groomers, etc to manage their business: scheduling appointments, taking payments, managing client information, reporting/analytics and some marketing tools.

Tech stack: Monolithic Rails backend + Angular 1/2 single page web frontend. Our backend API also powers Android and iOS clients.

Looking for: Experienced full-stack and frontend web developers, with a minimum of 4 years experience in full-stack/frontend positions. For full-stack, we would like someone with some Rails experience in order to hit the ground running. For frontend development, we'd like experience writing single page applications, but the technology (besides using JS) is not a major factor.

Apply: You can send me your resume directly at ehsan+hn@mytime.com

comment 9y ago · link · parent

That's progress, but that's not exactly a home screen widget. Eg, I can see "20C" and an icon showing it's rainy right on my phone's home screen. I don't think you can do that with the web yet, hopefully people are working on it.

comment 9y ago · link · parent

How about that await though.

comment 9y ago · link · parent

What's the project for simulating a reptile brain? I know we've not fully nailed the ~1000 cells required for simulating a whole worm, though we're getting there: http://www.openworm.org/

comment 9y ago · link · parent

As a many tabs user, I don't agree. The use case is more like a more visible bookmark, with history. Any tabs commonly used will already be loaded, and it is fine to lazy load tabs that are rarely used but kept open as reminders. It's definitely a much better experience than waiting 5 minutes after startup for the CPU activity to die down.

comment 9y ago · link · parent

I think the "-only" part is the problem. Marketing and naming events for minority groups is fine, but they would ideally be welcoming of all groups not part of the minority. Now it might still seem slightly funny for any old person to take part in an event called "black girls code", but it's better than excluding them entirely and I'd hope that most such events are inclusive of all groups.

comment 9y ago · link · parent

> Especially the crap about "make the test fail first" (making the test fail is useful, especially if you're unfamiliar with some aspect of it), but it should not be an obligation

Sometimes I write code to fix a bug, then a test the tests my bugfix. Test passes. I'm done right? Well, I make sure my test fails without the bugfix. About half the time, the test still passes. ie I wasn't testing what I thought I was testing. That's why you make the test fail.

comment 9y ago · link · parent

Applications may be able to do this in a controlled manner. Library authors never should.

comment 9y ago · link · parent

IANAA (I am not a archaeologist), but I'm guessing the dating is based on the materials that encased/surrounded the artifact rather than the material of the artifact itself.

comment 9y ago · link · parent

My understanding is that even SSDs perform somewhat better sequentially (throughput-wise), though the difference isn't quite as dramatic as with HDDs. That said, the 400 mb/s random write speed for nvme mentioned is plenty faster than sequential write speeds most people had access to until recently with SSDs, so that's pretty interesting.

comment 9y ago · link · parent

To understand that an assignment doesn't run that slow, you need to be told that.

Not really. You just try it, and notice it ran instantly. You don't really have to care how it happens to run behind the scenes, as long as you have a working model of the semantics. That's the entire point of most abstractions, to make it so that you don't have to think about all the details when you don't want/need to.

1
456
21