Better HN
topnewbestaskshowjobs
Log inSign up

sinhpham

64 karma · joined Jul 31, 2011 (15y ago) · 28 submissions

Submissions

comment 8y ago · link · parent

I find myself increasingly doing this in Rust:

    let lines = {
        let ret = vec![];
        // Open file
        // Read into ret
        ret
    };
    let processed_data = {
        // Open another file
        // Use lines
        // Construct ret
        ret
    };
    ....

You get the best of both worlds this way: scoped, meaningful names like with sub-functions and the continuity of a long one.

Everything is an expression is an underrated feature of Rust.

comment 9y ago · link · parent

No. Software evolve and there's value in knowing your assumptions still hold after the change/refactor.

comment 9y ago · link · parent

"C calls into you" means you already have a C code base and now need to call your C# functions.

comment 9y ago · link · parent

Could you please add an example of using cargo instead of calling rustc directly? How do I configure cargo.toml?

comment 9y ago · link · parent

What happened to impl Trait? I was quite excited to see it under 1.21 in the milestone predictions thread, but it has since been moved to "horizon".

https://internals.rust-lang.org/t/rust-release-milestone-pre...

comment 9y ago · link · parent

They implemented what looks like the Rust ownership model: SE-0176 Enforce Exclusive Access to Memory (https://github.com/apple/swift-evolution/blob/master/proposa...), but I'm having a hard time understanding the proposal, can anyone shed some light on this?

comment 9y ago · link · parent

Your email is not visible in your profile

comment 9y ago · link · parent

I dislike the rigidity of the original pomodoro technique, so I made a flexible one without the fixed time slots. You only have a minimum working duration, work for however long you like. I found that way it doesn't break my flow.

https://www.niftytools.online/flexpomodoro/

comment 9y ago · link · parent

How many emails did you send to get your first paying customer? What was the respond rate of your emails?

comment 9y ago · link · parent

Because you can then catch errors at compile time instead of run time.

comment 9y ago · link · parent

Example: http://insanitybit.github.io/2016/05/30/beyond-memory-safety...

TL;DR: compile time checking that your state machine transition is correct.

comment 9y ago · link · parent

It's being done at compile time.

13.

Show HN: Flexible Pomodoro Timer(niftytools.online ↗)

2 points · by sinhpham · 9y ago · discuss

comment 9y ago · link · parent

They seems to run an interesting tech stack with Elm + Elixir + Phoenix https://github.com/HiOperator/

Disclosure: knew this since just yesterday I was searching for Elm jobs to add to my wesite https://www.jobsinnew.tech/post-49/

15.

Show HN: Find jobs in your favorite emerging programming languages(jobsinnew.tech ↗)

1 points · by sinhpham · 9y ago · discuss

comment 10y ago · link · parent

How early is your "early stage"? Also, what's the best way to pitch to you?

comment 10y ago · link · parent

Hey I'm working on a side project, looking to grow it and would love to talk with someone who have done it before. However I couldn't find any contact information in your profile.

comment 11y ago · link · parent

What other cool stuff can "management, strategy, and customer satisfaction cadres" even do? And if just because "management, strategy, and customer satisfaction cadres" is not doing "supercool stuff" (whatever it means), the company should focus on R&D, then the vast majority of companies should cease to exist. Like it or not, companies are here to make money.

Saying MS should reinvent itself to be a R&D company is like saying Toyota should stop making cars because their normal cars aren't running by water, auto driven, and charged by solar panels yet. Ya, what's the point? Use your money to research on energy, AI and what not. Never mind where that money comes from.

When I read these absurd statements I think the author is either trolling, has an agenda, or is living in a bubble.

comment 11y ago · link · parent

They had a net income of $4.62 billion last quarter, how is that "not so great"?

http://www.reuters.com/article/2015/10/23/us-microsoft-resul...

comment 11y ago · link · parent

Is the currying example even currying? It looks like it's just a function returning a function to me. I thought currying it's some thing like func contains(subString: String, string: String) -> Bool, and calling contains("a") would automatically return a func(x: String) -> Bool.

comment 13y ago · link · parent

Does anyone know which algorithm they use underneath for duplication detection/delta encoding? Is it rsync or something else?

comment 14y ago · link · parent

Maybe it's robocode? http://robocode.sourceforge.net/

comment 14y ago · link · parent

yast.com is pretty nice. I've been using it for 3 months and have no complains.

comment 15y ago · link · parent

My bad, yes I don't need to log in to view the docs if I go directly to support.appharbor.com. But from the main page, when I click "Support", it forces me to log in.

comment 15y ago · link · parent

Good news. I've tried AppHarbor and it's really easy to deploy your .Net site. One quick suggestion though: don't make me log in to see your documentation.

comment 15y ago · link · parent

Well, there's Nokia for Win Phone 7 =)

comment 15y ago · link · parent

Look at Yalla Apps. Among 3 official third-party publishers, Yalla Apps has the lowest price. They have a list of "focused" countries, but you can publish via them regardless of where you from.

comment 15y ago · link · parent

Well I found some numbers here: http://www.farseergames.com/blog/2011/5/26/krashlander-numbe...