Hacker Newsnew | comments | ask | jobs | submit | zaphar's commentslogin

I read your story there and one thing immediately leaped out to me. Isolation. You isolated yourself from your family and your friends. You removed your emotional support structure and then went full burn in a high stress endeavor for an extended period of time.

Nobody not even extreme introverts can survive emotionally without a social support structure. You're feeling the aftermath now. The good news is it looks like you've reconnected with that support structure. You aren't going to start feeling better overnight though. Give it some time and learn from this experience. You need your family and friends support and you need to go at a pace that your health can support.

Right now you need to heal and that might takes months. Don't despair when it looks like the healing is going slowly. You will heal and then you can try the entrepreneur thing again once you've recovered.


Mutexes are absolutely idiomatic Go code. In fact the Core developers on the ML will often suggest them as a simplification over goroutines for synchronizing access to a shared resource. I'm not sure where you get the idea that they aren't idiomatic.


xkarga00 42 days ago | link

Probably by making the mistake to read the Effective Go.


"Do not communicate by sharing memory; instead, share memory by communicating.

This approach can be taken too far. Reference counts may be best done by putting a mutex around an integer variable, for instance. But as a high-level approach, using channels to control access makes it easier to write clear, correct programs. "


amix 41 days ago | link

I don't really think what I suggest goes against the article you link to. It basically says: use channels when appropriate, but sometimes the best approach is to use locks.

E.g. An bank account is shared state (similar to a reference count) and the best approach is to put a mutex around it instead of fighting with channel synchronization.


xkarga00 41 days ago | link

There are no implications here, it's stated pretty explicitly:

"Reference counts MAY be best done by putting a mutex around an integer variable, for instance. BUT as a high-level approach, using channels to control access makes it easier to write clear, correct programs."

There is a difference between what someone with a background from other mainstream programming languages might think would be the best approach to locking (mutexes) and the idiomatic Go approach (unbuffered channels).


Julia makes it pretty easy to write it in C if you want as well: http://docs.julialang.org/en/release-0.2/stdlib/base/#c-inte...

So that doesn't really give python a leg up over julia.


pekk 43 days ago | link

If I am going to write it in C then what in the world am I using Julia for?


dagw 43 days ago | link

Data IO, formatting, pre and post processing and presentation.

My standard approach is to use python to read in all my data, parse it, format it and beat it into the shape I want. Then, if I need the performance, I pass the data to a highly tuned C function for slowest number crunching parts. Then I take the data back from C and parse it, format it, summarize it and write it out to the file formats I want using python. C may be faster for number crunching, but python is much nicer for data handling, and there the performance difference is negligible.


idunning 43 days ago | link

Exactly - the C interop is used almost exclusively for connecting to existing libraries.


ermintrude 42 days ago | link

Can you also call C++ libraries directly from Julia?


3JPLW 42 days ago | link

Name mangling, as always, is a mess. If they export extern "C" headers, then of course there's no trouble.

There's work on interfacing with the C++ ABI, though. See Cpp.jl[0] and Clang.jl (whose C++ support is still a WIP)[1].

[0]. https://github.com/timholy/Cpp.jl

[1]. https://github.com/ihnorton/Clang.jl/issues/20


zaphar 50 days ago | link | parent | on: The new PHP

Nothing in that article fixes the issues that make PHP unpalatable to me. They are all new features added to the current broken set. Even if they are new and shiny they don't make the rest of the language suddenly better.

Which is really kind of the problem with PHP. All of that broken stuff was allowed to be broken for so long that it's effectively impossible to fix it. All you can do is layer on more features.


Complaining is often a result of comparing our situation to the rest of the environment. When you are sitting in your car in traffic you see that other lane moving faster than you and you get frustrated. When you are at that amazing job you see that other guy two job levels above you with even more perks.

If you only surround yourself with an environment where you don't quite measure up then your baseline gets set two high. You need to recalibrate.

I recalibrate by doing Charity work. And I don't mean just writing a check. I roll up my sleeves and actually engage with people in less fortunate circumstances. Work in a soup kitchen or a food pantry. Volunteer to repair or rebuild someones house when they can't afford to or a tragedy has struck.

It exposes you to people who haven't had the breaks that you had and also helps raise the standard of living for someone less fortunate or lucky and that helps keep your baseline from getting to high.


drblast 55 days ago | link

Great comment, thanks!


I remember minimizing the terminal window to make a script run faster. Taking the text rendering out of the execution path actually had a substantial speedup for long running scripts in some cases. It was one of those things you sort of picked up from other people along the way and assumed everyone knew.

Nowadays I don't know if the difference is noticeable enough to be common knowledge though.


walljm 56 days ago | link

I still have to think about it when i'm piping debug statements to a log... Conditional breakpoints are a similar case.


We used to do Starcraft lunch at work.

2 people would play a starcraft game and the rest of us would gather in a conference room to watch the stream and provide running commentary.

We also have an in house tool that sets up lunch times between a random group of 4 people periodically. It's a great way to meet others in the office and socialize.

Both of these were employee provided ideas. If you empower your employees to implement their own ideas it can have a powerful effect on office morale.


jakub_g 61 days ago | link

> We also have an in house tool that sets up lunch times between a random group of 4 people periodically. It's a great way to meet others in the office and socialize.

This is an awesome idea! Thanks for sharing that.


mikeleeorg 61 days ago | link

Great idea, especially the running commentary part! Sounds like a great way to include more people, plus make these lunches potentially hilarious.


_random_ 61 days ago | link

It also helps if there are no boring bring-lunch-from-home types.


gknoy 61 days ago | link

If bringing your team together is the goal, it cannot be served by labeling those who choose to bring a lunch as "boring types". I know my feelings would be hurt if my coworkers decided to exclude me for that reason.

How does bringing lunch from home prevent team lunches? If it's scheduled ahead of time, it's easy to bring less. One might even be able to justify budgeting N lunches/month out with coworkers.

Also, lunches together don't always have to be in a restaurant. Buyers can get food to go, bringers can take theirs with them, and then you can either meet in a conference room, at a park, etc.


_random_ 61 days ago | link

I guess that's true, maybe the problem is elsewhere.


marincounty 61 days ago | link

I like the way you think!


Robin_Message 61 days ago | link

And none of those annoying people that buy lunch out every day and complain about having no money all the time...


rhizome 61 days ago | link

Please don't go into management.


zaphar 70 days ago | link | parent | on: Spark web server

byteHandler is not a struct it's a byte slice. This is actually somewhat important since it highlights a nice feature of go where you can declare methods on any baseType by aliasing them to your own type.

There is no struct involved here and there doesn't need to be which is nice.


ihsw 70 days ago | link

I've found that when discussing Go, the terms `struct` and `type` are usually used interchangeably. Yes it's factually incorrect, but the message is at least intelligible.


I'm pretty sure you missed the point.

You are right that there is near to zero chance of that occuring. Which is probably what the previous poster meant. Since you can show up with a life threatening issue at a hospital and get stabilizing life saving treatment regardless of your insurance anyone who doesn't have insurance is effectively already leeching.


Guild Wars is my game as well. My wife and my kids all play it with me. It's a decent family gaming night :-)

We like forming camp stealing parties in WvW.



Lists | RSS | Bookmarklet | Guidelines | FAQ | DMCA | News News | Feature Requests | Bugs | Y Combinator | Apply | Library