Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nikki93
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
61.
▲
by
nikki93
5y ago
Love can actually be used directly as a C++ library. It's a bit of work to get the build system going but then you can use the Love API like: https://github.com/castle-xyz/castle-client/blob/7bfffa10e84..
62.
▲
by
nikki93
5y ago
LuaJIT was "good enough" at this that it worked pretty well for me -- mostly for automatically binding to headers from my own code where I was careful to avoid some of the potential gotchas. With a macro the header was stringified
63.
▲
by
nikki93
6y ago
I think the "each new member can enhance creativity of existing members" vibe can exist generally among "scenes", and scenes definitely can use technology that directly taps into this. I like the "scenius" term
64.
▲
by
nikki93
6y ago
Yeah the in depth look helps before forming conclusions like "you have to render everything every frame." Key thing is immediate mode can often mean just the sense of the API, not necessarily the draw scheduling. re: widget-local
65.
▲
by
nikki93
6y ago
These aren't just workarounds. It's often the natural immediate mode api. A lot of immediate mode "scroll view" systems just have a child lambda passed with an index for which element to render, and it only calls the lam
66.
▲
by
nikki93
6y ago
I meant the copy semantics of the ref itself. The copy operation on a refcounted ref increments the refcount at the object it's referring to. The references themselves are values. Another way of looking at this--in C++ the copy constru
67.
▲
by
nikki93
6y ago
Nim's ARC thing is pretty different from blackbox GCs you have to poke with a stick like Go's or JVM's. It's pretty deterministic where additional calls are inserted by the compiler, and you can use --expandArc or look a
68.
▲
by
nikki93
6y ago
Also seq[T] and closures involve GC (and some other types maybe).
69.
▲
by
nikki93
6y ago
Refcounted refs have copy and destruct semantics, and then what you're talking about is basically move semantics over those refs. Refcount increments be elided if the ref is "moved." The increment is only needed on copy. Addi
70.
▲
by
nikki93
6y ago
Yes! Thank you. :) And no, I am not a bot. Well, I guess to some extent I am, I'm just the SQL routines running on a server, and I'm writing this down based on what I see in the database that this user is said to have sent at some
71.
▲
by
nikki93
6y ago
An important thing is that with move semantics and good analysis for those at compile time, a lot of assignments can be moves and not need refcount changes. This fact actually comes up in Nim with ARC a lot. Refcounted refs are pretty expli
72.
▲
by
nikki93
6y ago
I also use a mac pretty regularly and a 1440p desktop. I was getting at the aspect ratio issue, which it seems like you were talking about first, before now talking about resolution (?). Yes, a higher resolution can fit more pixels. The abs
73.
▲
by
nikki93
6y ago
I would actually explicitly pick switching from an already-satisfactory i3 setup to a Regolith setup as maybe not worth it (unless you're literally just doing it for kicks, I guess?). In my case: I've done i3 setups before and the
74.
▲
by
nikki93
6y ago
I'm on a System76 Lemur Pro these days and really love it. It's light, keyboard feels good, battery life is great. Echo the desire expressed in other comments here of wanting nicer / higher res screens. But having been on Arc
75.
▲
by
nikki93
6y ago
Works pretty fine / well with a tiling window manager.
76.
▲
by
nikki93
6y ago
Re: WASM -- https://github.com/nikki93/ng-public -- Public repo for a game side project I've been working on that does Nim -> C/C++ -> WASM (native desktop also works, iOS probably works (have used the
77.
▲
by
nikki93
6y ago
Is this based on having used Nim in practice in projects and observing the code of many Nim projects and collecting data / insights; or without having used Nim and on speculation / general thoughts about macros / DSLs (or som
78.
▲
by
nikki93
6y ago
Interesting, it works and continues to work well for me, but it's totally possible that I happened to see through these issues. The main thing I've liked is the ability to set any bullet as the current view root and show a breadcr
79.
▲
by
nikki93
6y ago
I'd been using entt in C++, and recently have been working on a wrapper for entt in Nim (since Nim can just generate C++ output, works fine with templates, and lets you even emit your own C++ code, this is doable), and found that Nim i
80.
▲
by
nikki93
6y ago
A big reason for using vanilla Workflowy for me is that the mobile app is quite good. It's actually ... really, really good. A lot of edit operations that I'd've had to think for a while about how to support UX for--they do a
81.
▲
by
nikki93
6y ago
This seems quite possible from everything I've explored, and also is something I want to try soon. It's also interesting to use Nim through JS for a scripting layer for an application written in Nim; where they both communicate th
82.
▲
by
nikki93
6y ago
https://nim-lang.org/ -- says "statically typed" within the first 7 words of the main description of the language on the homepage... Most of the features happen through the type system (eg. functions are always to
83.
▲
by
nikki93
6y ago
I think this is really important for application programming, and one of the things that is promising to me about Nim. Also the metaprogramming / DSL stuff helps create eg. specific DSLs for UI programming and things like that (somethi
84.
▲
by
nikki93
6y ago
Cool! Nim is related here, where instead of text manipulation you're doing AST manipulation with quasi-quoting (like in many lisps), eg. https://nim-lang.org/docs/tut3.html#introduction-building-yo... .
85.
▲
by
nikki93
6y ago
Can you eg. generate a struct with fields based on an existing struct or on a comptime array in D? Can you receive a structure literal of anonymous type and iterate over it at compile time? (curious bc. these were a few things I found strai
86.
▲
by
nikki93
6y ago
You can put together an `std.builtin.TypeInfo` structure describing the type (eg. by using `@typeInfo` on an existing type and editing the result, adding something under `.Struct.fields`); then use `@Type` to 'unreflect' it back i
87.
▲
by
nikki93
6y ago
Seems like `defer_if` is meant for things like the `errdefer` case: https://gustedt.gitlabpages.inria.fr/defer/#org4ae1e19 There's no implicit "error for this stackframe" stuff in C so it needs to be giv
88.
▲
by
nikki93
6y ago
One use case of something similar is generating a regular expression matcher at compile time for example. This is what the C++ library https://github.com/hanickadot/compile-time-regular-expressio... does. There are a l
89.
▲
by
nikki93
6y ago
Interestingly this is something you can do in Zig with its `@Type`. Zig's compiler can eval (some) Zig code at compile time, this code can produce new types, and you can mention those types anywhere types are normally mentioned.
90.
▲
by
nikki93
6y ago
It's not simply pedantic, you would be interested in knowing that if you are interested in the implementation of vector-like data structures or if you want to implement one yourself, and the only motivation for that isn't that you
More ›