News for hackers. Stuff that matters.

glassx

Re:Firefox 51.0 on Tuesday January 24, 2017 @04:13PM (#13475520)
Re:MacBook Pro on Thursday October 27, 2016 @02:33PM (#12807968)
Well, there are many kinds of "professionals".

Designers, photographers or people working with audio/video production don't really need touch-typing.

And those are arguably the kind of "Pro" users Apple is targeting, not coders.

Re:The “432 Hz vs. 440 Hz” conspiracy theory on Monday October 24, 2016 @02:56PM (#12781716)
> in which case nylon strings would be a bit strange ;)

Not at all, there are nylon wrapped strings for electric now too! [1]

[1] http://www.daddario.com/DADProductFamily.Page?ActiveID=3768&...

Re:Probabilistic Programming on Sunday October 23, 2016 @04:50PM (#12775358)
It seems that their definition of "language" encompasses more than general-purpose PLs and includes DSLs, libraries and code-generators.

In their list there are libraries for Scala, .NET, Python, C, OCaml and Javascript.

Re:The Web We Want on Friday June 10, 2016 @01:13PM (#11877894)
> I think I have a better solution. How about keeping HTML/JS and lose the bidirectional protocols used to track you.

Is it that common for trackers to have Websocket/WebRTC as a requirement? Pretty much any trackers I see in the wild is using regular Ajax calls. And if you're a tracking service, it's not exactly hard to fallback to Ajax if Websockets aren't available...

EDIT: My mistake, I misread the first mention of HTTP as HTML.

Yeah, I already lost three chargers because of my cats. I ended up wrapping the cord with one of those "Cable Organizer" things (I don't know their real name), which also helps with strain relief.

http://i.imgur.com/WCbGRZx.jpg

It looks terrible but at least it will last as long as the laptop.

Re:Updates to Chrome platform support on Tuesday November 10, 2015 @06:04PM (#10543300)
> In particular, Mac OS X don't even run well with only 4GB of RAM anymore

It actually runs great. I'm using a 2011 Air w/2GB (cheapest back then) and El Capitan and it's almost as fast as my 24GB Mac Pro.

I push it a bit with Logic Pro X + drum samples (for my V-Drums), but it handles that without complaints. But for web, videos and programming there isn't much of a difference.

Re:The Guide to Cuba, a Ruby Micro Framework on Saturday October 31, 2015 @11:11PM (#10485277)
> I've re-implemented Rails functionality, poorly, way too many times.

It's been a looooong time since I last touched Rails, but I never really missed it when using Sinatra, mainly because of plugins/gems... I even wrote a few. (Currently I'm mostly using Go and C#, though).

Honest question, just so I know what I'm missing: what kind of functionality did you have to reimplement yourself?

Re:C99 tricks on Friday February 13, 2015 @02:58PM (#9046821)
I like Zed Shaw's Debug Macros. Actually his whole book is great.

http://c.learncodethehardway.org/book/ex20.html

Re:C99 tricks on Friday February 13, 2015 @02:29PM (#9046617)
Another useful OpenGL macro, at least for me, is this one:

    #define GLSL(str) (char*)"#version 330\n" #str
It basically enables you to embed quick snippets of GLSL inside your C code, instead of using concatenated strings. Example:

    char* fragShader = GLSL(
      in vec3 uv;
      out vec4 color;
      uniform sampler2DArray tex;
      void main()
      {
        // Comments work too
        color = texture(tex, uv);
      }
    );
In Sublime Text you even get code completion and color highlighting, since GLSL and C look so alike.

I believe it might work for OpenCL Kernels too.

The only downside is that it doesn't add line breaks by itself (hence the "#version 330\n", which requires a line break), so GLSL Compilation errors aren't as useful.

(Source: https://open.gl/geometry )

Re:C99 tricks on Friday February 13, 2015 @02:20PM (#9046556)
I'm currently writing a game in C99.

Compilation times, no need for inheritance and the fact that most libraries I'm using are written in C were the reasons I chose C over C++ or something else.

Re:Erik Meijer: Duality and the End of Reactive [video] on Friday June 13, 2014 @04:47AM (#7887900)
When you say that he's mocking Microsoft engineers, is that because of the Visual Basic comments? Because Erik actually enjoys VB and was responsible for adding some features to it. He's a former employee, so there's context...

And I don't think he's being dismissive of reactive programming, he's dismissive of that definition, which is too broad. He was one of the main proponents of Reactive programming inside Microsoft.

Re:How my school rejected an app made for students on Thursday June 05, 2014 @12:09AM (#7850171)
It's been a while since I last had to parse ASP.NET pages, but AFAIK, the viewstate isn't meant to be parsed by clients, you just have to re-send it during postbacks. It's more like a cookie, or Rails' authenticity_token [1].

[1] http://stackoverflow.com/questions/941594/understand-rails-a...

EDIT: Oh, ok. Re-reading the article, he was parsing the ViewState because there was some data hidden in there (a serious flaw actually), instead of scraping the site normally! Clever!

Re:Tail Calls, Optimization, and ES6 on Sunday May 25, 2014 @03:36AM (#7795758)
>> you don't need mutable local variables to track the state of the loop.

> Erm, that's not really true is it? Isn't the main way which TCO is done by introducing a counter/accumulator?

Yes, but accumulators aren't mutable. You're just passing something like acc*n or acc+1 to the tail call... acc is still the same.

Also, accumulators are not analogous to loop counters, they're more like the "sum" variable in this example (also mutable):

   var list = [0,1,2,3];
   var sum = 0;
   for (var i = 0; i < list.length; i++)
     sum += list[i];
> Anyway, if all you want is a safe loop construct, recursion isn't the only option.

I agree! The point of having TCO in a language isn't replacing every for/while loop with recursion. TCO is just an optimization. The right way (at least IMO and IME) is using better abstractions, like you mentioned. Recursion is just a way of easily building those abstractions, as are loops.

Btw, I probably write way more recursive functions in C than I do in Haskell, because in Haskell I have folds and catamorphisms.

I mean, the idiomatic way of summing those numbers as I did above in functional style is probably this:

    [0,1,2,3].reduce(function(a,b){return a+b;}, 0);
Or:

    sum [0,1,2,3]
in haskell ;)
Re:Tail Calls, Optimization, and ES6 on Sunday May 25, 2014 @03:00AM (#7795706)
By continuations I believe Jules means Continuation-passing style, a popular optimization/intermediate format in compilers:

http://en.wikipedia.org/wiki/Continuation-passing_style

Re:Tail Calls, Optimization, and ES6 on Saturday May 24, 2014 @05:10PM (#7794422)
> A tail call is basically goto with arguments.

In the lowest level, yes, but you could say the same about regular function calls, return statements, and even loops and conditionals, break and continue, etc.

The main selling point of using recursion for looping, IMO, is immutability. As jacquesm said, you don't need mutable local variables to track the state of the loop.

And in the real world functional programming you rarely use recursion to replace a loop, you mostly use abstractions like map/reduce/etc along with lambdas, etc.

Yep. In the same Reddit thread, someone ran cloc on the Linux Kernel, and it even reported one ASP.NET file in there too (just like it did with the Healthcare.gov source):

http://www.reddit.com/r/dataisbeautiful/comments/265yns/mill...

Re:Only 90s Web Developers Remember This on Tuesday February 25, 2014 @09:33PM (#7302428)
Does anyone else remember those amazingly epic flash sites? I even learned Flash 3 because of those... wow...

- http://www.thefwa.com/flash10/gabo.html - http://www.eye4u.com/home/

There are others (manoone) but I can't find archived copies.

Re:Software in 2014 on Thursday January 09, 2014 @05:30AM (#7029695)
There's an App Showcase on Xamarin's website: http://xamarin.com/apps

Out of those, I use Rdio daily and played Bastion a lot and they work great. I didn't know they were made with Mono until now.

Re-read his post, he said he's a "recent parent".
Re:MAME 0.151 ROMs on Saturday December 28, 2013 @02:12PM (#6975908)
I looked it up after reading your comment, and they're receiving donations right now that will be matched 3x (!) by an anonymous donor... they're just shy of a million bucks...

https://archive.org/donate/?img=group0a

Re:Here's how I deal with users who steal on Monday October 28, 2013 @08:28PM (#6630898)
You need to fulfill some requirements to subscribe as a "publisher" [1]:

    Content Requirements:
     - At least 20 albums in your catalog
     - UPCs/EANs/JANs for all products you intend to distribute
     - ISRCs for all tracks you intend to distribute

    Financial Requirements:
     - A U.S. Tax ID
     - A valid iTunes Store account, with a credit card on file
     - Apple does not pay partners until they meet payment requirements and earning thresholds in each territory. You should consider this before applying to work directly with Apple as you may receive payments faster by working with an Apple-approved aggregator.
[1] https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa...
Re:What Does A Song That Costs $5 Sound Like? on Wednesday September 11, 2013 @11:42PM (#6371924)
It is intended for encoding, not for hearing.

Here: http://en.wikipedia.org/wiki/Pulse-density_modulation

Re:We were wrong on Friday June 21, 2013 @12:41PM (#5919143)
It's not protection. It's respect.
Re:How not to be alone on Saturday June 08, 2013 @10:53PM (#5847317)
Sorry if it sounds rude, but I have a much better idea: find a way to bring them into the conversation you're having, try being more interesting, change the subject to something they might want to participate or just leave them alone for a bit. Some people need to "recharge" by being alone.

As vinceguidry put it on another post, "We use technology as a way of filling in parts of your life that would otherwise go wasted with something that could be more meaningful."

Re:Ask HN: What gets you out of bed? on Friday May 31, 2013 @09:45AM (#5798527)
Not the OP, but once I was promoted to lead developer for the flagship app of the company I worked for and that was quite efficient in making me wanting to get to the office before everyone.
Re:Ada 2012 Language Standard Approved by ISO on Saturday December 22, 2012 @11:45AM (#4956883)
Here's where I first read about it.

http://archive.eiffel.com/doc/manuals/technology/contract/ar...

EDIT: there's a reference link but I can't open it on my phone.

I notice the same thing with Rails vs Sinatra. People complain that Sinatra is problematic because it doesn't enforce a directory structure, but you can still make clean, organized code with it.

Older »