HackerTrans
TopNewTrendsCommentsPastAskShowJobs

jamii

3,461 karmajoined 18 yıl önce
http://scattered-thoughts.net/

[email protected]

Submissions

Artificial Adventures

scattered-thoughts.net
25 points·by jamii·10 gün önce·2 comments

I'm Not a Cat

scattered-thoughts.net
5 points·by jamii·17 gün önce·1 comments

Borrow-checking without type-checking

scattered-thoughts.net
91 points·by jamii·3 ay önce·32 comments

Borrow-Checking Surprises

scattered-thoughts.net
1 points·by jamii·3 ay önce·0 comments

Do We Understand SQL?

youtube.com
2 points·by jamii·7 ay önce·0 comments

comments

jamii
·3 ay önce·discuss
> It seems like either one evaluates the contents of the `box`, and would only make a difference if you tried to use `x` afterwards?

More or less. x^ moves the whole box whereas x* copies the contents of the box.

> Awkwardly, it also hasn't been assigned so I'm not sure the box is accessible anymore?

Yes, if you move something and don't assign it then it gets dropped, same as rust.
jamii
·3 ay önce·discuss
> The goal is that most of your code can have the assurances of static typing, but you can still opt in to dynamically-typed glue code to handle repls, live code reloading, runtime code generation, malleable software etc.
jamii
·7 ay önce·discuss
Wasm-mvp is very simple, especially if you drop the floating point instructions. But WAMR supports a lot of extensions - https://github.com/bytecodealliance/wasm-micro-runtime?tab=r.... There is a garbage collector, jit, WASI, threads, debugger support etc.
jamii
·10 ay önce·discuss
My bad :)
jamii
·10 ay önce·discuss
EDIT I totally missed the context
jamii
·10 ay önce·discuss
I've tried using binaryen, and I've also tried emitting raw wasm by hand, and the latter was far easier. It only took ~200 lines of wasm-specific code.
jamii
·10 ay önce·discuss
Yeah, json is annoying because of the limited types, but postgres arrays/rows are annoying because of the lack of sum/union types (if your UI has a heterogenous list of elements).

The OLAP world has much nicer type systems eg https://duckdb.org/docs/stable/sql/data_types/union.html.
jamii
·10 ay önce·discuss
One of the dynamics is that people get older so they move into different buckets.

We can make the model way simpler to make it clearer. Say in 2020 we hired 1000 20-24yo, 1000 25-29yo etc and then we didn't hire anyone since then. That was five years ago, so now we have 0 20-24yo, 1000 25-29yo, 1000 30-34yo etc and 1000 retirees who don't show up in the graph.

Each individual year we hired the exact same number of people in each age bracket, and yet we still end up with fewer young people total whenever hiring goes down, because all the people that got hired during the big hiring spike are now older.
jamii
·10 ay önce·discuss
I made a stupid simple model where hiring in all age brackets rose slowly until 2021 and then fell slowly. That produces very similar looking graphs, because the many engineers that were hired at the peak move up the demographic curve over time. Normalizing the graph to 2022 levels, as the paper seems to do, hides the fact that the actual hiring ratios didn't change at all.

https://docs.google.com/spreadsheets/d/1z0l0rNebCTVWLk77_7HA...
jamii
·6 yıl önce·discuss
I've been avoiding proprietary options because it's usually a big time investment to get them working on nixos, but I'm open to suggestions.
jamii
·6 yıl önce·discuss
This is the best option I've tried so far. Thanks :)
jamii
·6 yıl önce·discuss
I can't believe this comment ended up dead - that was the correct answer. I had more success with ddd this time around.
jamii
·6 yıl önce·discuss
> Activate the "Load Executable" button in the toolbar.

There is not a "Load Executable" button in my toolbar.

https://imgur.com/a/qOTZgy3

I also mentioned that in the article. Maybe you read it in a rush.

> Paste in the location bar or in the file name field, or access the context menu of the location bar and activate the "Paste" menu entry.

The location bar does not accept text. It's just a dropdown. Pressing C-l doesn't replace it either, like it does in the gtk file selector.

https://imgur.com/a/wbuKniU

> Activate the "Run" button in the toolbar.

There is no "Run" button in my toolbar.

https://imgur.com/a/rUHMRam
jamii
·6 yıl önce·discuss
> some bad combo of gnu with other tools, or a missing lib, or a side effect of system customization, or a beta distro, or something like that maybe?

Oh, I'm sure it is. Debugging it would probably be good practice. I'll just open my working debugger...
jamii
·6 yıl önce·discuss
I'm using zig, but there is also a fair amount of c in this project and I step into it fairly often. Gdb itself works just fine crossing between zig and c.
jamii
·6 yıl önce·discuss
I use rr pretty often. Most gdb frontends also work using rr, as long as they either have buttons for reverse-step or allow you to enter commands directly. That's why I was kind of bummed out that gede, which was the most functional debugger I tried so far, has neither.
jamii
·6 yıl önce·discuss
Looks interesting. I'll add it to my list for the followup post.
jamii
·6 yıl önce·discuss
> those are the tradeoff between flexibility and ease

It isn't a required tradeoff. Most of the gdb frontends I tried display the local variables at all time, but also allow writing arbitrary gdb expressions if I want to. Having both is clearly better.
jamii
·6 yıl önce·discuss
This is true but note that:

* gdb works on zig code, so it isn't unreasonable to expect gdb frontends to also work * being on nixos might explain crashes or failing to start, but it's hard to imagine how it could be responsible for various gdb frontends not being able to set breakpoints, run to the correct line or render a pointer to an array of bytes, especially when those same features work fine in gdb * it also doesn't explain why the memory view in most frontends was buggy or didn't work at all * I also tried lldb, whose gui I couldn't operate at all, and code-lldb, whose breakage might actually be nix-related since I had to patch a binary (but the error message was complaining about invalid utf8...)

I'm also happy to try non-gdb/lldb debuggers if you have any suggestions.
jamii
·6 yıl önce·discuss
It doesn't work very well for me - https://scattered-thoughts.net/writing/the-state-of-linux-de...

This is perhaps related to using zig, but it's frustrating that gdb itself works fine with zig but each gdb frontend manages to break in different ways.