jeffhykin

@jeffhykin@lemm.ee
6 Post – 247 Comments
Joined 12 months ago

This could actually a pretty big deal

  1. The Eclipse foundation has been making alternatives to VS Code's "killer apps" (Docker, Python, Go, C++, SSH, Live share, etc). AKA the closed source ones exclusive to VS Code offical that make all VS Code forks a huge downgrade. The Eclipse foundation is also running the extension store that powers VS Codium.
  2. "why not just use VS Codium?" (With the killer extensions made by Eclipse)
    • VS Codium is great, but because of manpower limits, they always have to be "downstream" of VS Code. They can't rewrite any of the core systems.
    • As someone who contributes to VS Code, and loves VS Codium, many issues I have with VS Code have been open on github for +5 years, with hundreds of comments and thumbs-ups. We can't even sort the file explorer view by last-edited and folders-first (but we can do folders-first alphabetical). Thats been open since 2020.
    • Theia looks like it could finally be the hard fork I've been waiting for. A hackable editor, trying to be open source, where all my extensions work, and the community can actually make a PR, get it merged, and extensions are not excessively sandboxed.
    • Will it be that? Only time will tell, but the Eclipse foundation has a pretty good record. They're definitely prepared for long term support.
2 more...

For context, Tea (the cli tool) was created by the author of homebrew. But for some reason he changed the name to pkgx and made tea into the crypto thing: From the creator of Homebrew, Tea raises $8.9M to build a protocol that helps open source developers get paid

He's probably interested in blocking these kinds of PR's.

A (nice) coworker once asked me if I had a system for managing tasks.

I thought they were asking to learn, so I enthusiastically told them about the ~30 different systems I use; the inbox of all incoming tasks, a flowchart for task allocation, urgency VS importance whiteboards, etc, etc. I mentioned each of the books and methodologies those systems came from. (I highly recommend this 5min vid and listening to Order from Chaos (written by and for people with ADHD))

"Oh... cool" was their response, and in that moment I realized they were actually asking because they thought I didn't have any system at all...

I write a lot of bootstrapping scripts, and I have a solution thats probably something you and others in this thread have never seen before. You can write a single script in a full/normal language, no compilation step, and it works on systems that only have bash/sh. It doesn't compile to bash, or at least not in the way you might think/expect it to, but it should do what you want.

(guillotine because it's a universal executor) https://github.com/jeff-hykin/deno-guillotine

This^ one uses Deno/JavaScript, but in principle it might be possible to do with other languages. It definitely requires some explanation, so I'll try to give that here;

As another person said, shells are not nearly as standardized as we need them to be. Mac uses zsh, Ubuntu uses dash, neither store a posix bash exectuable in the same place, and both have ls and grep differences that are big enough to crash common scripts. Even if you're super strict on POSIX compliance, common things will still break if you write a big script (or trying to compile a big program to bash).

I hate JS as much as the next guy, but it is possible to write a single text file that is valid bash/dash/zsh/powershell and valid JavaScript all at the same time. It sounds impossible, but there is enough overlapping syntax that actually any javascript program can be converted into a valid bash script without mangling the JS code. It might be possible to do for python as well.

POSIX is good enough for making a small, carefully-crafted well-tested OS-detecting caveat-handling script. So that's exactly what we do; use a small shell script at the top to ensure that the JS runtime you want is installed (auto install if missing). Then the script executes itself again using the JS runtime. It wasn't easy but I a made a library that explains how it's possible and gives a cli tool that automates it for the Deno runtime (the link I posted above).

After that, I just recreated tools that feel like bash, but this time they are actually cross platform. Ex:

let argWithSpaces = "some thing"
run`echo hello ${argWithSpaces}`

I picked Deno because it auto installs libraries (imports directly from URL so users don't have to install anything)

14 more...

Also don't forget your mandatory call to the doc each month for every refill
and don't forget to call a day early when it lands on a weekend
and don't forget to setup the mandatory appointment every 6 months
and don't forget to actually go to the appointment
and don't forget to schedule a drug test once every whatever-amount-of-time it is for your state
and don't forget to not eat or drink or take the medication the morning of the drug test

Cause if you forget just 1 of those they'll obviously have no choice but to deny you the medication you've been taking every day for 10 years. But you understand because punishing disabled people for mistakes/crimes of able-minded people (who don't find those things challeging), is clearly the only option they have.

25 more...

I have read the 1.2 spec (I'm trying to make a round trip parser for JS, and I do maintainance on a fork of the rumel yaml python package). I actually think its very well thought out, with things I hadn't considered like future extensibility, streaming applications, and data-corruption detection.

The diagrams, color coding, and less-formailty of the spec was much appreciated. Especially compared to something like the ECMA Script spec, which reads like a math textbook had a child with a legal document.

I'm not saying YAML is perfect; round trip (the thing I'm working on) is nearly impossible because it wasn't a design goal. It has a few too many features (I've never seen a declaration in the wild), but it does a good job at accomplishing the creators goals, and the additional features basically only slow down parser-implementers like me. I often pick it because of the tag support, which I've struggled to find an equivalent for in other serialization languages. I use anchors in recursive data structures, and complex keys for serializing complex data structures (not human readable). The "document end" marker has been nice when I'm worried about detecting partial-writes. And the merge key is nice for config files.

The application/perspective matters. Yaml might be bad for you but its not bad for everyone.

6 more...

I was curious about this too and went through a few different news sources (BBC, yahoo, etc). Sadly all of them just repeated the same information.

Maybe in a few days they'll have better details.

13 more...

If you think that's good, then you're gonna love this "simplified" real code posted as a real issue on one of my Github repos.

Edit: updated link to address the stack-trace comment

1 more...
npm install
peer dependency not found
npm install

Myself and another developer are working on something we think will solve this:

OP: https://lemm.ee/post/2800726 TLDR: Automatic User Distribution

Whenever someone goes to the sign up page, for example, on Lemmy.world, we:

  • look at the recommender list
  • find the server that is most under capacity
  • have a very large iframe with "Sign up for Lemmy (using [under capacity server here])"
  • have a small "No, I want to sign up specifically on Lemmy.world" option
7 more...
One little asterisk 
Could fix the problem I think
[Segmentation fault]
1 more...

For software engineers; you can make an executable that runs ANYWHERE. Same file, executes on windows and on Linux and on mac, x86, arm doesn't matter.

https://github.com/jart/cosmopolitan

1 more...
  • I made this countdown website You know that meme of "The event starts at 2pm, and its 10:30am--which is practially 11am--which is practically noon, and its an hour drive so i basically need to leave now!" Well this website solves that problem for me. On desktop it turns the top of the browser tab into a countdown (it can work on mobile too but its rough atm since I only made it for me). Type "Mon,Wed,Fri 10:00am Class" into the text box and it'll count down the seconds. Type "8:00am thing" and it'll assume it happens everyday. Type 12/25/2020 8:00am and it'll know its a one time event. The text will stick around even if you refresh the page, so you can bookmark it and enter everything once. One card can have multiple times, just make a new line and put another time on it. I usually have something like 8:40am leave, 9:00am class starts, 10:00am end of class all in one card. Then I have a separate card for the next event.

  • Using a sunlight alarm clock and a space heater to kickstart (and HEAVILY enforce) a morning routine

    • (Use a timer socket with the space heater to have it auto turn on)

    • It is incredible how effective this the combination is. You can go to bed at 1am and get up at 5a and still wake up in a decent mood, never pressing snoose, never dealing with a noise-maker. When it's hot and bright, your whole body just tries to be awake instead of trying to keep you asleep.

    • Do the exact opposite at night to break hyperfocus (use the thermostat clock to make it cold and have lights auto-turn off using timer sockets) it's difficult to keep working when it's really cold.

    • If you really need to be awake, add a gradually-increasing-volume music alarm

  • For subscriptions, use Privacy.com to create virtual credit cards. I have 1 card for each subscription. If I'm doing a free trial, I limit the card to $1 so if I forget it's not a big deal. When I want to stop a normal subscription, I don't even bother with the website. I just one-click cancel the card.

  • An Alarm hack; to set an alarm that goes off in 5 days (without downloading a better app) use the weekly-repeat feature and just select the only one day of the week. Then cancel the repeat when it goes off (or be like me and sooze it for 3 weeks then delete it). Everything on my calendar becomes an alarm once it gets close enough.

  • Have a "gradient" of food. E.g. some food you really like, some that's okay, and some that you won't eat unless you have to. During finals/crunch-time when you forget to go to the grocery store, there will still be food available when you really need it.

  • I've used many different task systems. I agree you've gotta have one, but its gotta work for you. My tip is; be ready to evolve it, and dont be afraid to be simple. I had a conplex auto sorting spreadsheet that was perfect for 3 years, but, at a separate time, I had a little black notebook that was awesome. One day the spreadsheet just stopped being useful, same with the notebook. Life changes, and it doesnt mean your system is a failure, or that you are "falling off". If anything it can mean you're growing. So always be looking at other people's systems to see if you can imagine adapting it to your own life. Also, be wary of the glamorous well-marketed overly-high-tech solution.

Finally, there's a general thing I call "their L, your W"

  • There are weird things, like keeping your shoes on, that can keep you in a working mood (different for each person). The tip is, even if others say "tracking mud all over the house is unnecessary and a definite L", don't merely ignore them; make it clear you're intentionally taking their L--you'll will deal with the dirty floor later. Then enjoy/relish your win of staying in a working mood. DONT think "well taking my shoes off _shouldn't_™ matter". If it matters to your brain, it matters for you. If people complain "that doesn't make any sense", well the placebo effect doesn't make sense either, but its real. We're not being petty or lazy, we are being pratical.
  • A funny one of these that works for me is having 1 plate, 1 bowl, 1 fork, 1 knife, and 1 spoon in the kitchen (extras are in the attic and intentionally hard to get). My sink is never full of dirty dishes, and I never put off cleaning them.
  • A really extreme example is; I got rid of my car. Best decision of my life. I never "try" to work out, I don't need to; I bike everywhere. I get benefits of working out for free (no mental cost). I get so much more done after being active, and when I'm late I can actually just try harder and get there on time. Takes a lot of planning, picking living location, etc to be able to, but it's worth it.

I feel dumb for having to ask but what exactly is "active users half year" vs "active uses monthly"?

Is half year just mean one or more comments/upvotes in the last 6months?

1 more...

My favorite was this project because it really shouldn't be possible, it requires some unusual problem solving (kinda like code golf), but the best part is seeing people's horrified expression when they realize

  1. The monstrosity works
  2. There's no real alternative

(I'm working on a video that explains it, but until then the readme and stack overflow post will have to do.)

1 more...

Lemme just premtively catch the "this isn't an ADHD specific thing" by saying; That comment on this post is like going to a community of people in wheelchairs, finding an "ugh stairs" meme, and commenting "everybody hates stairs, that's not a wheelchair specific thing". Sure, everyone procrastinates, and you might think you relate but it's not the way we relate.

7 more...

You'll basically have timezones either way, there's just two ways of doing it.

If we all used UTC, then businesses would need to change what time they opened depending on their location. Ex: Best Buy opening at 12 noon on the US west coast, and 3pm on the east coast. Locations inbetween would have different opening times. So we would get the noon zone, 1pm zone, 2pm zone, and 3pm zone. All nation wide businesses with standard open/close times would effectively follow the same pattern, and it would be best if they all coordinated on where those zones occured. So then we would get new timezones, they'd just be slightly different in how they functioned.

1 more...

does this compiler exist

TLDR; 65% of what you want exists as the Rust compiler, which is probably as close as you're going to get at the moment (edit: I was wrong see the comment about racket for a less practical but more flexible system). Take a look at macros like view! on this page. Rust doesnt support html-like syntax, but it does within that view! because someone made a macro that supports it. Rustc doesn't directly have a config file AFAIK but it also doesn't need any build tools (no make, cmake, autoconf, etc) because everything can be done with rust itself (because it's macro system is Turing complete with full file access).

Full Response:

I agree with the general idea, but I think there are lots of misconceptions. Gcc does allow doing things before the preprocess step, after the preprocess step, before the linking step, etc. It's possible, but not easy, to run your own programs inbetween those kinds of steps. As for why there's no config file, it's probably cause gcc is really old, but I'll have to let someone else comment on that.

However, syntax support is effectively a completely different feature request. For example the "adding brackets to indentation" couldn't really/correctly come before the preprocessing step. I mean a really hacky solution like my indent experiment from a long time ago can, but it will never be even slightly reliable because of the preprocessor, multi-line strings, comments and other edgecases. Let me explain.

  • The syntax cannot be parsed without running the preprocessor. Things like un-matched brackets are completely allowed before the preprocessing step. It would be literally impossible for the parser to run before preprocessing.
  • So let's talk preprocessing. The preprocessor is so stupid it won't even notice the difference between C, Haskell, or Ada. It's just looking for strings, comments, ints, and preprocessor directives. That's it. It has no idea about scopes or brackets or anything like that.
  • So for the "adding brackets to indentation" to work, it would need to run its own preprocessor step, then do some parsing of its own, and then run the indent-to-bracket conversion.

But note, preprocessor strings just coincidentally parse the same as C strings. There's already a limitation of the preprocessor failing on, lets say, python where python has triple-quote strings.

That said, preprocessing is actually highly unusual in the sense that it can be done as a separate step. Usually parsing needs to be done as a unified operation. Not to say it can't be modular, but rather the module must be given to a central controller that knows about everything rather than just having a code-transformaiton step.

With those misconceptions out of the way, now I want to talk about the parts I agree with.

IMO the perfect language is the one that has an "engine" that is completely separate from the syntax. And then the language/compiler should allow for different syntax. LLVM IR could be argued as being "an engine", but man is it a messy edgecase-y engine with no unified front-end.

The closest current thing to what you're talking about is almost certainly Rust macros. Unlike the preprocessor, Rust macros fully understand rust and are a part of the parsing process. They are decently close to what you're saying, instead of compiler flags it's just imports within Rust. You can write HMTL, SQL, and other code just right in the middle of a rust program (and it's not a string either, it's actual syntax support). Not only is it possible, but I have been eagerly awaiting for someone to create a garbage-collected syntax within a Rust macro. People have already created garbage collectors, it's just a matter of making a nice wrapper and inter-op.

That said, and even though Rust macros are head-and-sholders above basically every other language, I personally still think rust macros don't go far enough. Indent-based code isn't really possible within rust macros, rust macros can't have imbalanced braces, and there can be escaping issues that prevent things like YAML syntax from ever being possible. They also can't allow for extensions like units, e.g. 10gallons without wrapping it with some kind of delimiter (which defeats the point)

AFAIK currently there is no compiler that supports a composable syntax like that. I've worked on designing such a system, and while I don't think it's impossible, it is extremely hard. There's a lot of complications, like parsing precedence, lookaheads, operator precedence. Two syntax modules that don't know about each other can easily break each other. Like I said, I don't think it's impossible, but it is difficult.

8 more...

We can revert normal human bloodcells into stem cells and then into specialized cells like neurons. It was an incredible breakthrough several years ago that nobody seems to know. There's been recent developments too

I only found out about it when I was talking to Hon (the lead on this project), and asked him where he got the neurons for playing pong, and he said "I got them from myself".

2 more...

In certain states in the US they require a drug test to make sure you are infact taking the medication yourself. Its almost like a reverse drug test; you get in trouble if you're not taking drugs.

So I guess also don't forget and/or try to get off the medication otherwise you'll fail the drug test and also loose access.

19 more...

I like all of it, except for that awful "texture healing". Imagine having words above & below like

i=mins
w=maxs

But the m's just slightly don't line up because the top one is wider than the bottom one. I'd feel like my editor was gaslighting me 🤢

9 more...

"Its MIT open source and anyone can use it!"

  • But Microsoft only publishes a not-MIT licensed one
  • And if you DONT use that one, the extension store created by microsoft wont work
  • And even if you make your own extension store (which people did for VS Codium) you legally wont be allowed to use any of the de-facto quality of life extensions (Python, SSH, Docker, C#, C++, Live Share, etc)
  • And those extensions default to needing fully-closed-source tools develped by microsoft
  • AND, unlike Chromium, anything that tries to fork and build on top of VS Code, (e.g. gitpod; a web-based dev environment) will die because none of the de-facto/core/quality-of-life extensions people are used to will be available. They'll have to use the Microsoft alternative (e.g. Github workspaces)

The MIT codebase is just bait

1 more...

Instead of blocking sign-ups we can have Lemmy's sign up automatically recommend other servers.

Another developer and I already have a PR in development for it.

Here's the idea in more detail: https://lemm.ee/post/2800726

It's actually probably the single most common ADHD trait. It's the "attention deficit" in ADHD; can't force the brain to change focus from doom scrolling into whatever you actually want/need to do. The anxiety is just the side effect when the "other thing" happens to be important/urgent.

3 more...

Spending 5K on advertising would get 1/100th of the visibility of "spending" 5K by sending it back to Menedez. The only downside is Menendez gets the 5K and if it was 5K of glued together pennies he effectively wouldn't even be getting that.

I think we can give facebook/threads the bad end of the bargin IF we have a data protections.

You know how powerful copy-left was for open source? I think we can do the same for Lemmy servers. We can have users agree (formally) that the data on a particular server cannot be used for training llvm's advertisements, marketing profiles, etc, and make it legally binding.

Even if we don't federate with them, Meta can still harvest the data so we should add these protections regardless. Maybe there is already something like this and I'm just unaware of it.

If we do add these protections and we ensure that the largest instance (e.g. Lemmy.world) is community controlled, I think it could work well for bringing more content to Lemmy.

15 more...

"Select where you heard about typst"
-> Fediverse

Finally somewhere that actually has Fediverse as an option, this must be a good app.

Two things

  1. If you're able to encrypt; then done case closed. You can even add a "destruct" login where logging in to a secondary account deletes the primary account under the event that the gov forces you to login.
  2. If you're not able to encrypt (e.g. shared system or cameras watching you type, or written documents) then then slang can actually be effective and easier than a whole language. It can be dynamic/fluid, and gives the author the defense of metaphors and misunderandings. It's basically the only way to have hidden communication with others "in plain sight".

Finally, governments are practical. If something looks interesting, like a thing labeled "journal" with mysterious words inside, they're going to spend resources on it. Your best protection can be boringness. Write a novel, like LOTR, have the language be part of the novel, and when characters speak, replace their dialog with your journal entry. Put it on the shelf with other novels, and it becomes something that's not worth looking into.

I feel like somehow it being a robot arm with sensors/reactions makes it much more terrifying than an arm with predefined motions that operate in a loop

4 more...

really? For me it's more of a not having time. Doesn't cost much to go caroling, watch Charlie Brown, cut paper snowflakes, make handmade gifts, etc

1 more...

First 1/3rd is a bit of fluff but after that, good article. Especially the last 1/3rd.

1 more...

Can we get the links/receipts/examples?

I'm onboard with the post, and glad to see Lemmy working as intended. Making a post (instead of silently defederating) is wonderful. That said, I think its very important to say "because of comments like X[link] and Y[link]" instead of "due to severity".

Imagine if the roles were reversed and the CCP was saying they're "defederating from lemmy.world due to severity". Members should be given the 1st hand evidence, rather than 2nd hand opinions/summaries.

I give a list of generic opt-out excuses when I invite people to an event. That way, if it doesnt sound fun to them, they just pick an excuse off the list instead of trying to make one up and potentionally seem rude.

Its simple, but surprisingly effective for staying on people's good side.

The killer feature (IMO) is automatic conversion of C code to Zig code (transpiling). E.g. take a C project, convert it all to Zig, and even if you don't transpile, you still get really nice compat (include C headers just like a normal input without converting). Getting a medium sized C project converted to Zig in 1 day or 1 week, then incrementally improving from there, is really enticing IMO especially considering the alternative of rewriting in Rust could be months of very hard conversion work. Transpiling isn't perfect but it seems to be a 97% soltuion.

The second advantage seems to be easy unsafe work.

BTW I don't really use Zig, and I still prefer Rust, but those are the reasons I think it has a niche of its own.

4 more...

Lapse is going the extensions-for-features route, cross platform from the start, is more buggy atm, slower progress (doesn't have 3 dedicated experienced devs) but is more accepting of community support.

Zed, similar goals and rust backend, probably has some monetization goals (eventual offering of live sharing code service), and Zed isn't afraid to hardcode features. Like... very hard hardcoded features, to the point that I'm kinda concerned about it. This 5min clip of Theo looking over the source code shows it pretty well https://www.youtube.com/watch?v=ZOYp6-k9HhE&t=1533

The Atom/Zed devs write the most well-documented code I've ever read. Clear variable names, perfect comment-explainations when needed, etc. I wish they would join up with Lapse.

1 more...

The killer feature (IMO) is automatic conversion of C code to Zig code (transpiling). E.g. take a C project, convert it all to Zig, and even if you don't transpile, you still get really nice compat (include C headers just like a normal input without converting). Getting a medium sized C project converted to Zig in 1 day or 1 week, then incrementally improving from there, is really enticing IMO especially considering the alternative of rewriting in Rust could be months of very hard conversion work. Transpiling isn't perfect but it seems to be a 97% soltuion.

The second advantage seems to be easy unsafe work.

BTW I don't really use Zig, and I still prefer Rust, but those are the reasons I think it has a niche of its own. Does rust already fill this space? Yeah kinda, but that's why I'd call in a niche

after spending +3 years getting experienced and reading a lot of the source code (getting past the documentation/learning-curve problem), I can say there are at least two fundamental flaws, with nixpkgs moreso than nixos:

(Edit: Added 0)

  1. The culture issue. See thread below

  2. The messy mono-repo was never desgined to be searchable. It might feel searchable to a newby, but many teams have dumped tons of effort and slapped together lots of hacks to make niche-package-versions even halfway searchable. Devbox is doing a good job of fixing this, but its not there yet.

  3. The monorepo design is unmaintainable/unscalable from a package maintainer standpoint. There's a ton of contributor burnout, there's no automated quality control on packages, to outsiders its not obvious how to report package-specific issues or how to edit/fix/contribute to a single package, and instead of 30min to publish a hello-world npm or cargo package, users need to make a PR on the core, and get it approved. Meaning publishing a hello-world package would get rejected anyways. The good news is flakes hub is fixing this, and I'm really excited for that.

The good is;

  • The pros still outweigh the cons. My projects from 3 years ago that I haven't touched still work (0 bitrot) first try, no manual install/setup needed.
  • people have put a ton of effort into nix. Its truely amazing how many things work in nix despite how absurdly difficult it is to get things working with nix
  • it is pretty much as reproducable as it can be and nothing else is even remotely close.
13 more...

Really surprised nobody mentioned plants

He could get $5,000 in pennies and glue them together in the shape of gold bars

1 more...

Each line is the same total length but the "m" in "mi" would be wider than the m in "ma"