Hacker Newsnew | past | comments | ask | show | jobs | submit | SuspiciousSwan's commentslogin

No, other people also need consistent performance and a simpler system that works in practice.


I think you should revisit perl.

My first job writing perl was in 2005 or 2006, and it was not a good language for an eager idiot without guidance. After a couple years, I started getting it, and it became one of my favorite languages.

I think it was my coworker who told me to read https://hop.perl.plover.com/ and it blew my mind and made me start to rethink how I was approaching code. With the languages that I'd been using previously, the game was to fit the problem into what the language wanted you to do. HOP would likely be boring to you now, and wouldn't do much for me, but at the time, it showed me that perl was a language in which the same problem could be solved in multiple different ways, and both be just as right as the other.

Fetishizing that freedom, just like anything else, leads to self indulgent trash. I've seen it in every language, but perl allows for so much freedom it is easy to misuse.

It clicked with me that the best perl code was code that did what I intuitively thought it should do when I used it, and did what I thought it would do when I looked at it. Perl, compared to every other language that I've used, gave me tools to accomplish that.

Perl's object system is Python's, just in its raw parts. I still miss aspects of Moose that are impossible or ugly to use in other languages. Regexps are easy to misuse, but grammars allowed me to cleanly express what something did better than I've been able to in any other language. Mixing in functional ideas, where appropriate, made my code easier to reason about, instead of the debugging hell that I've seen it add to languages like Java. When I learned the concepts from perl, I learned when to use them in other languages.

I don't use perl much anymore, and I don't think I would push it on a team, and I really don't think that it is a good language for beginning programmers, unless there are good mentors around. Most of the beautiful code that I've ever written has been in perl.


Do you have a good link to learn about grammars in perl?


Start https://perldoc.perl.org/perlre.html#Extended-Patterns . I was trying to find an article from many years ago, but either my google skills fail me, or it is dead. Perl's regular expressions haven't been regular expressions for a long time. Beyond that, the ergonomics of perl make them much more useful for things like flow control than in other languages. It's similar to how you can do type matching in Java, but it's ugly, versus a language like Haskell where using type matching simplifies the code.

Perl 6 (as lizmat pointed out), has more powerful rules. I don't know a ton about them.


Perl does not have grammars (at least, not built-in). Raku (formerly known as Perl 6) does: https://docs.raku.org/language/grammar_tutorial


> Perl does not have grammars (at least, not built-in).

That's not true since v5.10 (2007). Here's a sample that matches a subset of LaTeX markup:

  $matcher = qr{
      (?&File)
   
      (?(DEFINE)
          (?<File>     (?&Element)* )
   
          (?<Element>  \s* (?&Command)
                    |  \s* (?&Literal)
          )
   
          (?<Command>  \\ \s* (?&Literal) \s* (?&Options)? \s* (?&Args)? )
   
          (?<Options>  \[ \s* (?:(?&Option) (?:\s*,\s* (?&Option) )*)? \s* \])
   
          (?<Args>     \{ \s* (?&Element)* \s* \}  )
   
          (?<Option>   \s* [^][\$&%#_{}~^\s,]+     )
   
          (?<Literal>  \s* [^][\$&%#_{}~^\s]+      )
      )
  }xms
It's nowhere near as advanced as Raku grammars (not much is), but it's there, and it's built-in.


it looks to me like HOP is mostly teaching traditional LISP concepts. I could write those same functions in Javascript, and they'd be more readable


With which JavaScript version? At the time HOP was written I remember JavaScript still doing all it's for loops in C-style and there was certainly no arrow syntax to make anonymous JS functions manageable.

There were also no functional methods available, as related by the restriction to C-style for loops. (Array Iteration methods didn't appear in the spec until 2009, so I don't see how you could have map or select or anything else functional).


Even a subset of that would be amazing to me -- "removed all of the undefined behaviors, added 128 bit signed and unsigned integers, features for explicit cache management (!!!), and container classes as part of a standard library"


Right now, we have a consumer, provider model of the internet. The internet in the 90s was very different, and looked much more peer-to-peer.

The higher level sharing and storage that we have now through services such as Facebook, Instagram, Dropbox, etc, could have been built in a peer-to-peer way, on top of things like Peergos.

I do not think that Peergos will necessarily be the exact technology that a new, decentralized version of internet technologies will be built on, but we are building the infrastructure and knowledge needed to be ready for power and economics shifts online.


The advantage over C++ isn't about the language itself. If your datastores all have functioning java connections, and your data modeling is already all done in java, it can be worth the pain to do performance critical code in java. I would rather do it in C++, but sometimes the most rational path forward is ugly.

Rust's future is far from certain. I would feel irresponsible using it on a project that wasn't self contained.


I guess looking at movies and books, I could see where you'd get this idea, but it really isn't accurate.

There are different types of feeling good, and the purely chemical good isn't particularly rewarding. There are the moments in life where you are happy because you are living the life you want to live, and those are way better than just feeling good from drugs. Sometimes life goals and drugs come together, and that gets really interesting. It's reasonably common for people to do MDMA and have a glimpse of their life without anxiety and trauma, or LSD and looking at their own existence objectively.

For me, the best moments in my life are around building connections with people.


Lotta people talking about heroin in this thread, but lets be clear, unless you have tried heroin, or are otherwise intimately familiar with its affects, you are probably not qualified to talk about what it feels like.

Not trying to single out parent, just felt like it should be mentioned.


As someone who's done quite a bit of heroin...All of these comments are sort of correct in their own way. On its own turf, no, nothing will ever feel as good as heroin. Normal life experiences can't compete with that, not directly. But there is a one-dimensionality to its goodness that allows you to have experiences that, though i'm not sure they feel "better" than heroin, feel good in different ways that can be more satisfying, while also being sustainable.

It's sort of like the fact that nothing tastes better than cheesecake (or insert your favorite dessert here), but that doesn't mean you can't enjoy life or even other food without it.


As someone who's been through many different addictions, I'm starting to appreciate freedom from craving (a specific form of inner peace) more than the pleasure of indulging in a craving. (As well as the subtle benefits to mind and mood that come with it!)


Ya. It's sort of hard to explain to people who haven't experienced it, right? They like to ask "does not cheesecake ever taste as good as cheesecake?" and of course the answer is no: Cheesecake always tastes better than not-cheesecake. But there are other dimensions to experience that aren't captured by the immediacy of taste in that sense.


I am not misenjoying your non-shallow depth of double negatives (JK, love your observations)


I was trying to get to this with good versus rewarding, but it's one of those things that is so obvious when you feel it, but hard to communicate with people who haven't.

As far as drugs go though, there is a lot of personal preference involved too. For me, MDMA in unhealthy quantities is still the best that I've ever felt, and I know some other people prefer the meth high, but I don't think that's exactly what you are arguing against :)


The dimensionality is the key part. It's not just a metaphor, it's a physical quantity. Like cheesecake, the neurological response to heroin follows a specific profile of activation. However, (most) humans find fulfillment in far more dimensions than any single activity provides.


Life would be empty without cheesecake though.


Then I really don't recommend you experiment with heroin :)


I am a very very fat guy trying to eat properly and it’s excruciating, even after 5 weeks away from most of my daily life. Damned if I haven’t toyed briefly and desperately with the idea of some kind of pharmaceutical intervention. But my lifelong policy with drugs has always been if I can’t even handle Mountain Dew Throwback, I won’t have a chance with speed or coke or pot


Unsolicited tip. Something I find has helped me a lot with challenges like you are facing is to stop looking at them as difficult or choices and simply understanding it what you have to and are going to do. Remove the choice from the equation. I had some pretty destructive habits when I was younger and now people comment on my strong mental discipline. This approach has really helped. I recently had to cut all starch from my diet due to an auto-immune diagnosis and went through ketosis. The discipline has now become the habit. It never occurred to me to not follow through even in the deepest keto flu period. It's possible to achieve and once you've beaten one hurdle the next one becomes easier until you control fully your thoughts and not the other way around.


Definitely second this. Choices are hard, but decisions are easy. If you make hard rules for yourself and decide to follow them without exception, it is much easier to stick to, at least, that's what i've found for myself as well.


Much obliged. It’s a surprisingly alien concept for me with food, yet not elsewhere in my life. Odd, come to think of it.


Interesting. I will try to think that way. BTW I’m quite self-disciplined pretty much every other way and I never thought much about it, but I think that’s how I normally am. If it’s not food or caffeine...


Hah, I try to avoid it.


I'm writing from personal experience. Well, I've never done heavy opiates in a basement, so maybe going subterranean makes all the difference.


It really depends who your clients are. If they are servers, 30s can work okay. If they are end users, caching happens all over. It's a huge PITA, especially since you'll run into podunk ISPs that have their own custom caching setup, but you have a customer with a shop there. Not that I'm still bitter.


It sounds like you have a lot of operation issues due to the technologies that you used. I mean, at least you aren't doing your backend in node, but running an actor system on top of an actor system is going to be brutal to properly analyze once you actually have scale.

What sort of process do you have for picking trendy technologies vs tested ones, and how much do you talk to people who have built large scale systems before implementing things like scala?


Yeah... Reading this, it smacked of a possible combination of poor tool choice and over-engineering (which I've been guilty of plenty). I built a video processing/workflow application in Scala with Akka a few years ago and debugging that was hard enough, eventually it was refactored to a simpler Kotlin/Spring application... Actor systems are great for certain use cases but you can really hurt the transparency of your app if you aren't careful. I can't imagine maintaining the OP's application at scale for this use case, but maybe they have someone smarter than me!


Counterpoint: debugging erlang systems in production is a cakewalk. The tracing and introspection tools that come bundled in OTP make tracking problems down really easy. It's really hard to go back to systems that don't have erlang level visibility, so much so that it's kind of a crutch sometimes.

This is an ecosystem problem and not something inherent in a program using an actor abstraction.


Ah yes, that is a great point. Erlang/OTP were designed to be used as actor systems, whereas the actor implementations in Scala and other JVM languages/frameworks are at least one level of abstraction above that. Definitely agreed on Erlang/OTP having a wonderful set of tools for debugging/visibility, but I still stand by my assessment that OPs problems are from over-engineering (and secondarily from the ecosystem).


Definitely. In the handful of instances I've seen akka used, regular jvm abstractions would have been simpler and more coherent.


Systems in general tend to have a way that they like to be used. Erlang has all of the tools to support that model, and from my limited experience with it, works great when you respect it. I wouldn't reach for it due to my inexperience, but if I had someone like you on my team, I'd love to learn.

Java also has really great tooling.. when it is used like it wants to be. I don't have enough erlang experience to know if it is true there or not, but with Java, I've found that smart but green devs (like it sounds like Heap has) tend to reach for systems that solve a lot of their initial problems and cover up their initial ignorance, but then trade it for operational problems down the road. More experienced developers tend to build systems that are boring, explicit, take longer to get to Beta, but don't require a pager.

drob mentioned that they aren't writing flink jobs very often, which makes me think that they are probably using it for some sort of rollups / stream processing of their analytics data. If the business logic of those is complex, they'll probably have a bad time with outliers that fuck up their cardinality assumptions. If it isn't super complex, they probably didn't take the time to model their data correctly with boring java classes, and keep pushing complexity into the interactions between their actors.

Either way, they would have a lot faster and easier to maintain system if they forced themselves to pretend to be stuck with java 1.6 except where 1.8 stuff improved performance and readability (basically avoid abusing streams and reflection)


Scala is not exactly a new trendy technology at this point; it's being used in industry quite widely.


I don't have a lot of faith in BYD busses actually working correctly. Proterra seems like the most solid design around, and looking on LinkedIn, it seems like they picked up a lot of people who worked at Tesla when things were going better over there.


Care to expand on why? It seems they are working correctly as they make over 500,000 vehicles a year whilst Proterra are claiming 375 since inception. [1]

[0]https://en.wikipedia.org/wiki/BYD_Auto#Sales >BYD Auto sold a total of 506,189 passenger cars in China in 2013

[1] https://en.wikipedia.org/wiki/Proterra,_Inc. >the company has sold more than 375 buses


It's even more accurate than I thought when I saw it. I assumed the the visualization of the virus was stupid movie crap, then I worked in bioinformatics and realized it was https://pymol.org/2 . One of my friends worked for the state health department, and she said that the level that R0 was explained was spot on as well.


I'm an infectious disease epidemiologist - their explanation of R0 (which is occasionally a silly concept but that's another story) is one of the better ones, and the one I use in my classes.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: