News for hackers. Stuff that matters.

icedog

Re:The F# Path to Relaxation [video] on Tuesday March 03, 2015 @04:25AM (#9136833)
If anybody is interested in F#, look for a nearby meetup group to join. The SF F# group is pretty active and Mathias Brandewinder's hacker dojos are absolutely awesome!

[0] http://www.meetup.com/sfsharp/

Re:The Lost Art of C Structure Packing on Friday February 20, 2015 @08:36PM (#9084291)
I'm not saying it's exactly the knapsack problem, but it's quite related. Ordering from largest to smallest does not yield the optimal solution - period.
Re:The Lost Art of C Structure Packing on Wednesday February 18, 2015 @07:08PM (#9071727)
You must not be familiar with the knapsack problem.
Re:The State of Go on Saturday February 14, 2015 @05:12PM (#9050946)
Besides the arrow keys, you can move forwards or backwards by clicking on the left or right edges of a slide.
Re:Web Socket Hook: A bridge between web hooks and web sockets on Thursday February 12, 2015 @02:15AM (#9037825)
This is better described as a 'publish-subscribe pattern using web sockets'. To be brutally honest (take this as constructive criticism), the addition of the HTTP endpoint isn't very interesting either. Implementing all this takes perhaps less than 100 lines of code.

Furthermore, your site is susceptible to XSS

curl http://web.sockethook.io/hook/foo --data "foo=<script>alert('hello')</script>"

Re:Ask HN: What are your predictions for 2015? on Thursday January 01, 2015 @12:17PM (#8823477)
Fastmail was once owned by Opera but bought itself to be independent again. I reckon they wouldn't be interested in being owned by another corporation, especially Yahoo.
Took me 4.5 minutes, 103 requests, 13.1 MB transferred data.

Going to "Online Store" was also ~4MB more and 25 seconds...

Re:Streem – a new programming language from Matz on Thursday December 11, 2014 @03:16PM (#8736835)
I'll take an extra branch over concatenation and dealing with new line chars any day.
Re:Streem – a new programming language from Matz on Thursday December 11, 2014 @02:48PM (#8736692)
I disagree that it maps most directly to the problem statement. You're performing a common factor computation in your mind, which may be more difficult given numbers other than 3 and 5. In my opinion, pattern matching offers the most direct solution and comes with an abundance of compiler optimizations. Here's an example in Rust...

        for i in range(1i, 101) {  
            match (i % 3, i % 5) {  
                (0, 0) => println!("Fizzbuzz"),  
                (0, _) => println!("Fizz"),  
                (_, 0) => println!("Buzz"),  
                _ => println!("{}", i),  
            }  
        }
Re:Show HN: C# 6.0 Functional Language Extensions on Thursday November 20, 2014 @02:59AM (#8634770)
I'm an F# developer, but still decided to not use F# to build an android app. Dealing with the UI libraries like support.v4 was just too painful from a functional perspective. If you don't need any object oriented dependencies, then it's smooth sailing.
Re:Rappelling Off a Roof on Wednesday October 29, 2014 @09:45PM (#8530932)
Ahhh, that explains it. Thanks for the detective work.
Re:Rappelling Off a Roof on Wednesday October 29, 2014 @09:08PM (#8530843)
Interesting that one of those presenters is named Howard Payne. Along with Payne being an elevator company, Howard Payne is the name of the antagonist in 'Speed', who hacks an elevator...
Re:The Raft Consensus Algorithm on Wednesday October 29, 2014 @06:25PM (#8530355)
Your phone version is in the lowest 12%-tile. No offense to you, but as an Android developer, I'm content making my minimum required version Ice Cream Sandwich if it means avoiding any complexities.
Re:Firebase is Joining Google on Tuesday October 21, 2014 @08:37PM (#8490957)
We don't know how "solved" these questions are because it's closed source.
Re:Why your first Rust FizzBuzz implementation may not work on Monday October 13, 2014 @11:46AM (#8449162)
What do you expect; it's FizzBuzz.
Re:Why your first Rust FizzBuzz implementation may not work on Sunday October 12, 2014 @11:13PM (#8447360)
Here's the same approach in F# without the different types of String; therefore, easier to get more functional.

    let fizzbuzz num =     
       match num % 3, num % 5 with      
          | 0,0 -> "FizzBuzz"
          | 0,_ -> "Fizz"
          | _,0 -> "Buzz"
          | _,_ -> num.ToString()

    [1..100]
      |> List.map fizzbuzz
      |> List.iter (fun (s:string) -> printfn "%s" s)
Re:Why your first Rust FizzBuzz implementation may not work on Sunday October 12, 2014 @10:26PM (#8447267)
Putting the String issue aside, I just wanted to show the beauty of pattern matching.

    for i in range(1i, 101) {
        match (i % 3, i % 5) {
            (0, 0) => println!("Fizzbuzz"),
            (0, _) => println!("Fizz"),
            (_, 0) => println!("Buzz"),
            _ => println!("{}", i),
        }
    }
-- edited: removed `.to_string()`, thanks chrismorgan
Re:ColorRun – Simple browser game about colors on Saturday August 16, 2014 @07:50PM (#8188029)
You could create a backend service that generates 1px swatches of a color; of course, this will only make it one step more difficult to cheat.
Re:The San Francisco Rent Explosion: Part II on Wednesday August 13, 2014 @04:13PM (#8174798)
I have a friend paying $2200 for a 230 sqft micro-apartment in SOMA. It's like having your bed in a tiny kitchen.
Am I the only one who prefers to work in public libraries? The San Mateo library has plenty of seating/power outlets, a respectable cafe, and free underground parking.
Re:Splashbase: Find free, public domain, hi res photos on Thursday June 19, 2014 @03:17AM (#7914833)
I run a website which uses a blurred photo as the background. I'd love an API from splashbase that I could poll daily for rotating in new images on my server.
Re:Rust by Example on Sunday April 27, 2014 @03:05AM (#7654233)
Web services aren't the only things that run on servers. And nobody is forcing you to use just one tool for all your jobs.
Level 1 just reloads after I get to the exit.
Re:The Muse's Successful Application to YC W12 on Friday March 28, 2014 @07:19PM (#7490586)
Since today's topic on HN is usability testing. I'm a bit confused by the connection between the goal stated on the YC application and thedailymuse.com. Correct me if I'm wrong, but I don't see anywhere that says this is a resource for women or "non-traditional candidates". How are you targeting this demographic without being discriminatory in your job applications?
Re:We lost a customer. This is how we found out on Friday March 28, 2014 @06:49PM (#7490463)
Indeed, this helps solve a bigger problem than usability: what the hell are they selling.

I'm often frustrated by the poor messaging written on landing pages or even the 'About [Product]' pages. Either the page is 100% marketing fluff or 100% technical info. With marketing fluff, I can read a thousand words and still not get any substance. With just technical info, they often leave out answering the key marketing answers: what are the competitive advantages?

Re:iGo: a new Syntax for GoLang on Friday March 21, 2014 @04:36PM (#7444753)
As an F# and Go developer, I reckon you should say, "IGo syntax looks very familiar to [any language which uses significant whitespace]". However, I'd still disagree with that statement.
Re:How Corruption Is Strangling U.S. Innovation (2012) on Friday March 21, 2014 @04:18AM (#7441201)
Regulation isn't an appropriate response. If taxi's are cheap to operate (hence ample supply but artificially limited) then personal vehicles are cheap as well. "Big fat lazy motherfuckers" will just buy their own vehicle and make an even larger mess.

Pardon my idealistic views, but it would be better to curb demand for taxis with: a. cheaper, more consistently on-time public transportation b. safer bike routes c. casual carpool programs

The real question is why you rather take a taxi than your local public transportation.

Older »