~jack

Trackers

~jack/cosmo.nix

Last active 26 days ago

~jack/aeson-dependent-sum

Last active 1 year, 6 months ago

~jack/mudcore

Last active 1 year, 6 months ago

~jack/simple-haskell-flake

Last active 2 years ago

~jack/nix-freeze-tree

Last active 2 years ago

~jack/codec-hostile-waters

Last active 2 years ago

~jack/enum-newtype-plugin

Last active 2 years ago

~jack/casaaaaa

Last active 3 years ago

~jack/libtelnet-haskell

Last active 3 years ago

~jack/acme-dont

Last active 4 years ago
View more

#8 issue with files containing "[" or @ 1 year, 2 months ago

Comment by ~jack on ~jack/nix-freeze-tree

REPORTED RESOLVED FIXED

#8 issue with files containing "[" or @ 1 year, 2 months ago

Comment by ~jack on ~jack/nix-freeze-tree

RESOLVED IMPLEMENTED REPORTED

#8 issue with files containing "[" or @ 1 year, 2 months ago

Comment by ~jack on ~jack/nix-freeze-tree

Finally got around to looking at this. I rewrote your patch to avoid the regex dependency, and released v0.1.1.0.

Thank you for the report and for your patch.

REPORTED RESOLVED IMPLEMENTED

#1 Codecs for type key and value key 1 year, 6 months ago

Ticket created by ~jack on ~jack/aeson-dependent-sum

Like TaggedObject in aeson, but the name of the contents field changes depending on the tag. Perhaps DynamicTaggedObject? We'll need a way of picking out a function to determine the contents field - use a typeclass probably.

#2 Move lua values associated with userdata out of the registry 1 year, 6 months ago

Ticket created by ~jack on ~jack/mudcore

Currently, we create a bunch of refs associated with our userdata (descriptors, timers, ZeroMQ watchers). Now that lua_newuserdatauv() exists, we could instead create userdata that way and keep the relevant Lua values alongside the C structures. struct watcher in lua_zmq.c in fact only exists to hold three lua values.

I imagine each type could have an enum of uservalue indices e.g.

enum watcher_uservalue {
  WATCHER_USERVALUE_SOCKET,
  WATCHER_USERVALUE_IN,
  WATCHER_USERVALUE_OUT,
  NUM_WATCHER_USERVALUES
};

#1 Close lua_State properly when ending a thread 1 year, 6 months ago

Ticket created by ~jack on ~jack/mudcore

In descriptor_close(), we should probably call lua_closethread() on the lua_State corresponding to the thread as we wind up everything else.

#8 issue with files containing "[" or @ 2 years ago

on ~jack/nix-freeze-tree

Seems like I cannot attach documents.

https://pastebin.com/09ZDLqP1

On Sat, Aug 20, 2022, at 14:55, Gianluca Stivan wrote:

I stand corrected, I did not know about that trick :)

I've attached a patch that seems to work on my machine. It doesn't support symlinks, but I guess that's a separate problem.

Thanks a lot for the advice.

On Sat, Aug 20, 2022, at 14:23, ~jack wrote:

I believe that this is fixable, because I ran nix-freeze-tree over a little test directory and made the following changes:

  • When importing a directory, we need to generate something like paths = { "bar@baz" = import (./. + "/bar@baz") { inherit stdenv; }; };
  • When emitting the default.nix for a directory with @ in its name, we need to not have illegal characters in the name field of the mkDerivation call.

-- View on the web: https://todo.sr.ht/~jack/nix-freeze-tree/8#event-201780 Attachments:

  • git-patch

#8 issue with files containing "[" or @ 2 years ago

on ~jack/nix-freeze-tree

I stand corrected, I did not know about that trick :)

I've attached a patch that seems to work on my machine. It doesn't support symlinks, but I guess that's a separate problem.

Thanks a lot for the advice.

On Sat, Aug 20, 2022, at 14:23, ~jack wrote:

I believe that this is fixable, because I ran nix-freeze-tree over a little test directory and made the following changes:

  • When importing a directory, we need to generate something like paths = { "bar@baz" = import (./. + "/bar@baz") { inherit stdenv; }; };
  • When emitting the default.nix for a directory with @ in its name, we need to not have illegal characters in the name field of the mkDerivation call.

-- View on the web: https://todo.sr.ht/~jack/nix-freeze-tree/8#event-201780

#8 issue with files containing "[" or @ 2 years ago

Comment by ~jack on ~jack/nix-freeze-tree

I believe that this is fixable, because I ran nix-freeze-tree over a little test directory and made the following changes:

  • When importing a directory, we need to generate something like paths = { "bar@baz" = import (./. + "/bar@baz") { inherit stdenv; }; };
  • When emitting the default.nix for a directory with @ in its name, we need to not have illegal characters in the name field of the mkDerivation call.

#8 issue with files containing "[" or @ 2 years ago

on ~jack/nix-freeze-tree

That part I’ve already fixed. What’s wrong (and cannot be fixed afaik) is

myfolder/default.nix myfolder/some@other/default.nix

As far as I know there’s no way to import such a structure in nix due to limitations on how nix does parsing.

Thanks!

Il giorno 20 ago 2022, alle ore 13:48, ~jack outgoing@sr.ht ha scritto:

In such situations, I'd try emitting code that calls the path builtin: https://nixos.org/manual/nix/stable/expressions/builtins.html#builtins-path

An enrichment of the built-in path type, based on the attributes present in args. All are optional except path:

  • name
    The name of the path when added to the store. This can used to reference paths that have nix-illegal characters in their names, like @.

-- View on the web: https://todo.sr.ht/~jack/nix-freeze-tree/8#event-201776