0
51
oessessnex

@programming.dev

oessessnex 22 points 3 years ago

Some people consider working on programming languages fun, so they create new ones.

path: 0 2100831, hotness: undefined, score: 22, children: 0
oessessnex 21 points 2 years ago

I don't have 2 mil, how do I get out of this? File for bankruptcy?

path: 0 10288879 10288946 10289004 10289026, hotness: undefined, score: 21, children: 4
oessessnex 18 points 2 years ago

When does the narwhal bacon?

path: 0 12345197, hotness: undefined, score: 18, children: 3
oessessnex 14 points 3 years ago

I usually kill them with my phone with the screen turned on (the background needs to be blueish and the room needs to be completely dark). For some reason they don't see it, they just sit there until they get squashed.

This doesn't work for tiger mosquitoes.

path: 0 1095157, hotness: undefined, score: 14, children: 1
oessessnex 10 points 2 years ago

Remove the wall plug, straighten the paper clip and insert it into the cable in between the wires, reinstall the wall plug.

path: 0 9675130, hotness: undefined, score: 10, children: 0
oessessnex 9 points 3 years ago

Nope. Monads enable you to redefine how statements work.

Let's say you have a program and use an Error[T] data type which can either be Ok {Value: T} or Error:

var a = new Ok {Value = 1};
var b = foo();
return new Ok {Value = (a + b)};

Each statement has the following form:

var a = expr;
rest

You first evaluate the "expr" part and bind/store the result in variable a, and evaluate the "rest" of the program.

You could represent the same thing using an anonymous function you evaluate right away:

(a => rest)(expr);

In a normal statement you just pass the result of "expr" to the function directly. The monad allows you to redefine that part.

You instead write:

bind((a => rest), expr);

Here "bind" redefines how the result of expr is passed to the anonymous function.

If you implement bind as:

B bind(Func[A, B] f, A result_expr) {
   return f(result_expr);
}

Then you get normal statements.

If you implement bind as:

Error[B] bind(Func[A, Error[B]] f, Error[A] result_expr) {
   switch (result_expr) {
       case Ok { Value: var a}:
           return f(a);
       case Error:
           return Error;
   }
}

You get statements with error handling.

So in an above example if the result of foo() is Error, the result of the statement is Error and the rest of the program is not evaluated. Otherwise, if the result of foo() is Ok {Value = 3}, you pass 3 to the rest of the program and you get a final result Ok {Value = 4}.

So the whole idea is that you hide the if Error part by redefining how the statements are interpreted.

path: 0 2378542 2381361 2382337 2382820 2383607 2384737, hotness: undefined, score: 9, children: 0
oessessnex 8 points 3 years ago

You are seeing the posts on all instances the instance you have the account on is federated with.

path: 0 663869, hotness: undefined, score: 8, children: 4
oessessnex 8 points 2 years ago

Play chess.

path: 0 11143010, hotness: undefined, score: 8, children: 0
oessessnex 7 points 3 years ago
path: 0 494489 496257 496824 499064, hotness: undefined, score: 7, children: 1
oessessnex 7 points 3 years ago

First focus on working on projects instead of improving your skills. The concepts you learn are usually a solution to some problem. Things are easier if you first encounter the problem yourself and then learn the solution, than if you do it in reverse. It is ok to do things poorly when you are starting out.

path: 0 787215, hotness: undefined, score: 7, children: 0
oessessnex 6 points 2 years ago

I started exercising, I quite embarrassingly couldn't do even a single push-up, I can do 20 now.

My Ender 5 has been lying around for 3 years, maybe I'll dust it off during the weekend :)

path: 0 12654153, hotness: undefined, score: 6, children: 0
oessessnex 6 points 3 years ago

Java

path: 0 1483902, hotness: undefined, score: 6, children: 0
oessessnex 6 points 2 years ago

You don't even need soil, you can just put them on the ground and cover them with hay, and they grow just fine.

path: 0 9517735 9521369, hotness: undefined, score: 6, children: 1
oessessnex 5 points 2 years ago

If you create accounts on various sites with an email address on your new domain keep a list of those. If decide to let the domain expire you need to close the accounts beforehand, otherwise someone else can get access if they purchase the domain.

Also you will likely be playing for the domain forever, so just register/renew it for 10 years, maybe you'll also get a discount.

path: 0 10626079, hotness: undefined, score: 5, children: 0
oessessnex 5 points 3 years ago

Editing in (neo)vim is akin to live programming in a very terse programming language. You can also create your own commands (keybindings) and repeat snippets multiple times (macros). This is amazingly powerful if you need to convert between two formats or extract some information.

The UI is not a highlight of this editor.

It also takes years before selecting the commands becomes mostly subconscious. It is definitely a long term investment.

path: 0 1156156, hotness: undefined, score: 5, children: 0
oessessnex 5 points 2 years ago

Treat people the way they would like to be treated.

path: 0 12239810 12242333, hotness: undefined, score: 5, children: 0
oessessnex 5 points 2 years ago

None. I'm kind of surprised most people don't use lemmy the same way as reddit, I assume nobody just browsed /r/all?

path: 0 11801750, hotness: undefined, score: 5, children: 0
oessessnex 5 points 3 years ago

The implementations mostly don't matter. The only thing that you need to get right are the interfaces.

path: 0 2825582, hotness: undefined, score: 5, children: 0
oessessnex 5 points 3 years ago

Every instance is federated with every other instance by default. However the admins can defederate from selected instances, which means the users cannot interact with that instance in any way.

path: 0 663869 664358 665163, hotness: undefined, score: 5, children: 0
oessessnex 5 points 2 years ago

It's easier to write that much if you are just making stuff up...

path: 0 10331759 10335069 10337739, hotness: undefined, score: 5, children: 5

thanks for using Leebra!

go to feed...