News for hackers. Stuff that matters.

sinhpham

Re:What I learned in 2017 writing Go on Wednesday January 03, 2018 @08:41PM (#16067276)
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.

No. Software evolve and there's value in knowing your assumptions still hold after the change/refactor.
Re:Rust: Enable WebAssembly backend by default on Sunday November 26, 2017 @02:16PM (#15782465)
"C calls into you" means you already have a C code base and now need to call your C# functions.
Re:Rust: Enable WebAssembly backend by default on Sunday November 26, 2017 @01:06PM (#15782140)
Could you please add an example of using cargo instead of calling rustc directly? How do I configure cargo.toml?
Re:Rust 1.21 on Thursday October 12, 2017 @12:52PM (#15459346)
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...

Re:Swift 4.0 Released on Tuesday September 19, 2017 @11:00PM (#15290447)
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?
Your email is not visible in your profile
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/

Re:Ask HN: How do you make money from your side projects? on Tuesday March 28, 2017 @08:14PM (#13982139)
How many emails did you send to get your first paying customer? What was the respond rate of your emails?
Because you can then catch errors at compile time instead of run time.
Re:Rust vs. Go on Wednesday January 18, 2017 @05:42PM (#13431100)
Example: http://insanitybit.github.io/2016/05/30/beyond-memory-safety...

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

Re:My Go Resolutions for 2017 on Wednesday January 18, 2017 @04:13PM (#13430338)
It's being done at compile time.
Re:HiOperator (YC S16) Provides Customer Support as a Service on Wednesday November 30, 2016 @06:29PM (#13075657)
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/

Re:Introducing Initialized Capital on Monday October 24, 2016 @01:48PM (#12781061)
How early is your "early stage"? Also, what's the best way to pitch to you?
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.
Re:What happened to Microsoft's Midori operating system project? on Wednesday November 18, 2015 @11:58AM (#10588952)
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.

Re:What happened to Microsoft's Midori operating system project? on Wednesday November 18, 2015 @01:29AM (#10586314)
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...

Re:Emerging Best Practices in Swift on Wednesday November 18, 2015 @12:32AM (#10586107)
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.
Re:BitTorrent Sync Beta API Now Available to Developers on Tuesday November 05, 2013 @01:10PM (#6676779)
Does anyone know which algorithm they use underneath for duplication detection/delta encoding? Is it rsync or something else?
Re:Robocom: a game for programmers on Wednesday April 18, 2012 @12:27PM (#3858754)
Re:Ask HN: How to report hours as a contractor? on Saturday February 11, 2012 @08:12AM (#3579178)
yast.com is pretty nice. I've been using it for 3 months and have no complains.
Re:AppHarbor (YC W11) launches scaling on Tuesday August 30, 2011 @06:27AM (#2940819)
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.
Re:AppHarbor (YC W11) launches scaling on Monday August 29, 2011 @09:49PM (#2939791)
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.
Re:Google Buys Motorola For $12.5 Billion on Monday August 15, 2011 @08:05AM (#2886461)
Well, there's Nokia for Win Phone 7 =)
Re:Ask HN: Windows phone dev success/failure stories? on Sunday July 31, 2011 @01:37PM (#2828928)
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.