Better HN
topnewbestaskshowjobs
Log inSign up

codr7

3,876 karma · joined Mar 28, 2019 (7y ago) · 2,562 submissions

codr7@protonmail.com
Submissions

comment 7y ago · link · parent

I've smoked tobacco for 30-ish years. Organic, additive-free tobacco is definitely less problematic for me. Lately I've been growing my own Nicotiana Rustica [0], which contains plenty more nicotine than regular tobacco but is nowhere near as addictive.

I know what I would do if I was selling drugs and didn't give a crap about anything but profits, I would make them as addictive as possible.

[0] https://en.wikipedia.org/wiki/Nicotiana_rustica

comment 7y ago · link · parent

Cannabis works well, as do poppy-extract/opium; but none of it is legal where I am unless you're practically dead already.

comment 7y ago · link · parent

What if the root cause is something that's simply broken? Like a smashed vertibrae in my case. The root cause was falling from a cliff without any protection besides a helmet.

comment 7y ago · link · parent

I've lived 12 years with chronic pain caused by a smashed vertibrae from a climbing accident.

No _legal_ drugs that aren't heavily addictive. And the predictable result is that you can't even get legal medicine that works any more, because no one dares to touch the addictive stuff.

And I sort of get it, I went through hell getting off OxyNorm/Contin after the accident. But it's really shitty to leave people hanging with no legal alternatives.

Edit: What kind of person down votes this? I would seriously consider seeking help.

comment 7y ago · link · parent

Not much, no.

I can think of several causes that are more likely in the described scenarios. The fact that younger employees often are easier and cheaper to exploit is fairly well known, as is the fact that plenty of employers don't mind playing that game in the name of awesome profits. The total disregard for experience goes a long way to explaining why nothing works very well these days.

To me it sounds more like you have a horse in this race yourself, like you wouldn't mind guilt tripping employees in the name of profit.

comment 7y ago · link · parent

Is it just me, or does this look more like a propaganda piece to confuse and guilt trip employees into learning in their free time than an attempt to explain anything? Seriously, who comes up with these examples?

Every action has consequences (also commonly called karma) and every effect has its causes. And that's about it. Picking an arbitrary cause and insisting it's special doesn't look very constructive from here.

comment 7y ago · link · parent

The way Python has macros, sure :)

You would have to keep everything in variants, or wrap/unwrap manually all over the place to get similar functionality.

And C has tagged unions.

comment 7y ago · link · parent

What you're looking for is awareness, to be right here right now and observe what's going on inside. If you're like most people, you spend most of your time lost in thoughts that you didn't actively choose. The first step is to realize that is the case, which is very difficult in the middle of the storm; hence the sitting down with closed eyes.

comment 7y ago · link · parent

So you're saying that you never have anything going on in your head that you didn't choose? No uncomfortable thoughts that you have to push away? No egos lashing out at other people or telling you you're not good enough?

If that's the case then congratulations are in order, most people have to put in some effort to get there. Maybe you're a natural, depends on where you came from. Being left alone to do your thing in a sane environment makes it easier to stay in touch.

Whatever the case, there's never any harm in sitting still with closed eyes for ten minutes.

comment 7y ago · link · parent

While I can see the logic there, I would strongly recommend against alarms. The deeper you go, the more sensitive you become. Being pulled out abruptly is very uncomfortable, to the point where knowing what's coming will stand in the way of even trying.

I would say sit as long as you feel like it, except that doesn't really help initially. Maybe put on a non-intrusive background track that fades out when time is up? And do take your time when coming back; start by listening, then opening the eyes slowly etc.

Same goes for waking up from regular sleep, but refusing alarms in this society is a pretty serious compromise.

comment 7y ago · link · parent

Beating yourself up over "failing" only causes more delay and more suffering. That goes for not meditating as much as you think you should and not trying hard enough when loosing awareness. It's just practice, if you're not failing now and then you're not learning.

I had to sort of force myself by going to live in an ashram full time for a while.

comment 7y ago · link · parent

I'm talking about choosing when and what to think, to not be a victim to your default settings. The rest follows by itself.

comment 7y ago · link · parent

The real benefit of meditation from my perspective is proving to yourself that you're not the voices in your head. I mean, you can't be; since you're obviously capable of observing them from the outside while they go on with their business. What takes practice is staying aware and not feeding them energy by identifying.

Once the spell is broken, the conserved energy and improved focus and control changes everything.

The mind is indeed a wonderful servant but a terrible master.

comment 7y ago · link · parent

Not all of it, but I'm sure most statements follow some kind of CRUD pattern.

Getting that out of the way is exactly what an ORM can help with.

comment 7y ago · link · parent

Me thinks someone needs to have a go at maintaining a 2Mloc accounting package built using only embedded SQL statements and stored procedures, including migrating the whole mess between major database vendors.

I guess one advantage is you have to learn, it but I really prefer some kind of ORM for more mundane repetitive CRUD. More to get a structured (ha!) interface between the database and the application than for the convenience.

I do wish most of them would stop insisting on putting the cart in front of the horse and make code the primary representation.

comment 7y ago · link · parent

I read the first edition back in the days; and again, and again. Back then, during my first years working as a programmer, it was a gold mine and definitely helped push me in the right direction.

One of my favorite authors wrote that every book eventually becomes a prison for the mind. At some point you will transcend the content which means it's time to move on. But that doesn't change anything about the book, it's still as excellent as ever for others.

The only constant in this universe is change.

comment 7y ago · link · parent

I once wrote a memory resident keylogger back in high-school to catch the lonely sysadmin's network login. Not that I knew what to do with the login, I just wanted to prove to myself that I could.

I got plenty of logins, but not the one I wanted. Until a friend looked over the sysadmin's shoulder. I lost interest right there, but my friend went on to wreck the entire network by mistake and barely escaped paying for the whole mess.

Have to give some credit to the sysadmin for the catch. To figure out who was messing with his stuff, he put a program that emitted a high frequency tone through the PC-speaker in his login script and sat down next door to wait for my friend to take the bait.

comment 7y ago · link · parent

Second that, after 34 years in the game I'm always on the lookout for dead or dying code. Every line I can put out of its misery is one less to deal with in the future.

And I find that removing dead code often unlocks further improvements that become obvious without the noise.

Even if the functionality is needed down the line, it tends to require massive rewrites to catch up.

comment 7y ago · link · parent

That sounds very unlikely to me, and would need to be backed up by solid proof.

I think you need to take a chill pill and figure out where all the hate is coming from.

comment 7y ago · link · parent

To imagine a scenario, sure. I can imagine plenty of scenarios.

Epstein liked to film his visitors and use the material to blackmail them. Knowing that, it's not unreasonable to assume that he ordered his slaves to behave nice and inviting.

You should be very careful about drawing lines between what you can and can't think. Once you do that, it doesn't really matter if you call it Religion or Science; you're still hosed.

comment 7y ago · link · parent

I thought this much would be obvious by now, but here we go. The people who traffic and rape children are mainly found among the filthy rich so called elite. If you want to do something about that, punching RMS won't help.

The thing about RMS is that he prefers to use his own brain and is not afraid to stand up for his views, which is an increasingly rare phenomenon. So rare that its nearly considered a crime these days.

The perpetrator is a victim, there's no doubt about that. Psychopaths aren't born, they are created through trauma in a society that doesn't give a crap about humans.

comment 7y ago · link · parent

Thank you :)

Sorry, no. I used to be really into parsing algorithms and tools, and I still consider them useful for more mundane tasks. But the last thing I need when exploring the syntax of a new language is someone else's arbitrary limitations.

My language parsers [0] tend to be rather messy recursive-decentish creations. But I think that's fine; since in a new language the syntax should be allowed to move around freely, and prematurely nailing it to the floor to check a box isn't really going to help anyone.

What usually happens is I'll tighten the parser as needed along the way when I feel confident enough. Which brings us to the issue with parsing tools, they're all in from the start rather than gradual.

https://github.com/codr7/g-fu/blob/master/v1/src/gfu/read.go

https://github.com/codr7/cidk/blob/master/src/cidk/read.cpp

comment 7y ago · link · parent

There are usually plenty of opportunities to infer types and check identifiers etc. at compile time without the need to annotate anything. And the more you annotate, the more opportunities for the compiler to help.

I don't have enough TypeScript experience; but from what I've seen, it comes pretty close to providing tools without mandating use and help where it can in the same spirit as Common Lisp.

I guess if your company mandates checking all boxes, which unfortunately seems bound to happen sooner or later, that doesn't help; but it's hardly TypeScript's fault.

The various Haskell-ish web languages popping up all over the place though, that's a different story. I wouldn't touch those with a ten foot pole. I'm so done with academic hoops.

2394.

Show HN: cidk – Interpreter Devkit in C++(github.com ↗)

1 points · by codr7 · 7y ago · discuss

comment 7y ago · link · parent

Glad you like them, one of the most underrated abstractions in software if you ask me. Floats are just plain evil for most use cases. I spent 13 years maintaining a 2Mloc accounting system written using an exotic mix of float types and layers upon layers of failed attempts to control the resulting rounding chaos.

Agreed, same is true of many general purpose languages. One advantage is a stronger compiler with more static guarantees than Python that produces significantly faster code.

What is gained from restricting the use case is simplification of syntax and semantics. Once you don't have to cover all bases any more, you don't have to make as many compromises. I'm barely getting started here, once I get around to defining functions/equations/integrals etc. it will become more obvious.

Easier embedding/integration is another good reason. Let's say you need to evaluate formulas in some application. Adding Python as a build dependency is serious business and writing your own means reinventing a lot of infrastructure along the way.

Finally, building on top of cidk [0] means smooth integration with any language targeting the same framework. The calc opcode mentioned in the README is a good example.

[0] https://github.com/codr7/cidk

2396.

Show HN: calcl – A Programmatic Calculator(github.com ↗)

8 points · by codr7 · 7y ago · 4 comments

comment 7y ago · link · parent

There is definitely some overlap from what I can see, fix point numbers is one notable difference.

I would say calcl is more flexible; since it's designed to be used standalone, as an opcode in any cidk [0] program or as a C++ library.

It also serves as a minimal example of how to design an interpreter around cidk.

[0] https://github.com/codr7/cidk

comment 7y ago · link · parent

I'll add all of Edward Tufte's books, which are excellent both in content and presentation. The Humane Interface by Jef Raskin was also formative for me.

They complement each other well; Raskin being more technologically/psychologically oriented and formal, while Tufte takes on information design in general at a higher level.

And I second The Design of Everyday Things by Don Norman, it should be required reading for anyone designing anything used by humans.

1
798081
86