jtojnar has quit [Read error: Connection reset by peer]
lassulus has quit [Ping timeout: 272 seconds]
lassulus_ is now known as lassulus
jtojnar has joined #nixos-chat
Myrl-saki has joined #nixos-chat
{^_^} has quit [Ping timeout: 260 seconds]
{^_^} has joined #nixos-chat
vdemeester has quit [Ping timeout: 260 seconds]
benkolera has quit [Ping timeout: 260 seconds]
vdemeester has joined #nixos-chat
benkolera has joined #nixos-chat
simpson has quit [Ping timeout: 260 seconds]
sir_guy_carleton has joined #nixos-chat
simpson has joined #nixos-chat
drakonis_ has joined #nixos-chat
sir_guy_carleton has quit [Quit: WeeChat 2.0]
drakonis_ has quit [Remote host closed the connection]
<infinisil>
Phew, I am pretty close to having a draft finished
<infinisil>
It goes very in depth
<samueldr>
:)
<etu>
To nixcon or not to nixcon. My employer just planned some team event the same day as nixcon starts. I'm not a big fan of team-events so that gives a plus point to nixcon.
<etu>
I need to look at travels and hotels.
<etu>
I mean, going to nixcon is a solid excuse to not attend the team-event
__Sander__ has joined #nixos-chat
__monty__ has joined #nixos-chat
<andi->
Also you probably planned that months ahead ;)
<clever>
and that is the address of a Binding (line 33) which is immediately followed by an array of Attr's (line 15)
<clever>
and the "zero" length array on line 40 allows you to access that
jasongrossman has joined #nixos-chat
<clever>
and each Attr contains a key, Value*, and Pos*
<clever>
infinisil: so when you do `let foo = { ... }; in { a = foo; b = foo; }`
<clever>
the a and b are just pointers to the original Value for foo
<clever>
infinisil: but after running __path over things, it has to create a new Bindings and Attr array, for a&b, with a unique __path, and repeat down the entire tree
<clever>
infinisil: i'm thinking there should be a top-level arg to nixpkgs, that enables or disables this
<infinisil>
I might do some measurements how much slower it really is
<{^_^}>
nix#2392 (by cleverca22, 3 days ago, open): Improve stats
<infinisil>
Because it should really only increase memory usage for such duplicate attribute values, which don't appear very often, aliases being the most prominent one
<clever>
infinisil: in the case of `pkgs.pkgs.pkgs.pkgs.hello`
<clever>
for each step down, it has to copy the entire Attr array on the Bindings
<clever>
infinisil: if the sum of the lenghts of the lists (0+3+0) matches the length of the last non-empty list (3), then just return the last non-empty list, and dont even concat
<infinisil>
Heh nice, makes sense
<infinisil>
I also recently learned from the nix source that lists are really arrays and tail is O(n) :/
<clever>
for list1, only smallList[0] is used, and there is no length field
<clever>
for list2, smallList[0] and smallList[1] are the values, no length field
<clever>
for listn, biglist.size and biglist.elems are used
<clever>
so lists of size 1 or 2, save a pointer redirection
<clever>
slightly smaller memory usage as well
<clever>
size of a value: 24
<clever>
> (64/8) * 3
<{^_^}>
value is a path while an integer was expected, at (string):179:1
<clever>
every single Value object in nix, is a set of 3 64bit fields
<clever>
> (64 / 8) * 3
<{^_^}>
24
<clever>
the first is the ValueType enum (which could be 1 byte, but eh)
<clever>
the last 16 bytes is a union of many things, none of which may exceed 16 bytes
<infinisil>
Neato
<clever>
so whenever nix is dealing with an int, bool, or float, the raw value is directly in the Value object, and there is no extra storage cost
<clever>
for strings, the Value contains a pointer to the c-string, and a pointer to the list of context
<clever>
for paths, its just a c-string pointer, and nothing else
<clever>
for sets, it has a pointer to a Binding, which is followed by an array of Attr's, so the size depends on how many attrs it contains
<clever>
and the keys must all be known when creating the Binding+Attr[], so recursion can be an issue
<clever>
mkIf within modules helps there
<clever>
and the rest are also just pointers to other things of varying sizes
aszlig has quit [Ping timeout: 272 seconds]
aszlig has joined #nixos-chat
sir_guy_carleton has joined #nixos-chat
jasongrossman has quit [Ping timeout: 272 seconds]
<gchristensen>
I made a quick cheat-sheet for how to do common stuff with docbook: https://docbook.rocks/ check it out! is it helpful? am I showing too much? am I missing something obvious? and please send me feedback :)
<__monty__>
Why would I use docbook over say, reST?
<sir_guy_carleton>
agreed; it doesn't really explain what docbook is really good for, only that markdown has some limitations
<joepie91>
I can answer that one: rst has a horrendous amount of syntax that looks *nothing* like anything else
<joepie91>
it's a very... inaccessible format
<joepie91>
I'm not especially happy with docbook either but at least you can infer structure there without knowing all the details of the format
jD91mZM2 has joined #nixos-chat
<samueldr>
being XML is both convenient an inconvenient: good XML tooling, especially since docbook leans on doctypes and such; but writing XML by hand will always be... inconvenient; imho having XML there is good, even if UX-wise it's a chore
<gchristensen>
_why_ docbook is out of scope at the moment.
<gchristensen>
the scope for now is "ok, I'm going to use docbook, now what"
<gchristensen>
or rather, "I need to add a bit of docs to a project which uses docbook, now what"
<maurer>
gchristensen: Now what -> go write a markdown file, a wiki article, or a blog post, and wait for one of the docbook nerds to translate it </s>
<gchristensen>
if you want, sure!
__Sander__ has quit [Quit: Konversation terminated!]
<gchristensen>
but nobody should be afraid of docbook
<maurer>
I think it's less that they are afraid, and more that there are a bajillion tags, and that typing tags makes you want to kys
<maurer>
because they are so verbose
<maurer>
It's like writing a LaTeX document, except that every project has its own dialect
<gchristensen>
yes! there are a billion tags! here are the 10 you'll need
<maurer>
so even if you learn to write foo-project docbook, you'll find that another project uses a different set of tags, so some are missing, and there are some new ones you need to use
<gchristensen>
there is no "dialect"
<gchristensen>
you can know these 10 tags and make a meaningful contribution to any docbook based document.
<gchristensen>
are there more? obviously, do you strictly need to know them? no
<jD91mZM2>
XML for markup? What is this madness?
<gchristensen>
can you achieve more semantic precision by using more tags? yes, it is why they're there. do some projecs choose to use them? yes, but whatever -- these 10 tags will get you all the way to a PR where a reviewer can help take it the rest of the way.
<gchristensen>
jD91mZM2: if only there were some form of markup language which could be used to richly describe plain text, and be extended for different use cases ~(˘▾˘~)
<maurer>
gchristensen: It's not that XML is the wrong way to represent this data - it is the right way. However, people _already_ don't want to write documentation, and they _also_ don't want to write XML
<gchristensen>
sure!
<jD91mZM2>
gchristensen: Talking about markdown? >:)
<gchristensen>
each project can handle people who want to contribute docs but don't want to write XML differently. We have a generous offer on the table for them, for someone else to convert it.
<samueldr>
markdown isn't much better than <b></b> and friends, especially with regards to how there is no "one markdown" :(
<gchristensen>
that is fine. but also, for people who are open to learning new things, here we go -- a nice easy to use resource, getting you started quickly on useful structure and syntax!
<samueldr>
well, there *is* one, the original one
<gchristensen>
samueldr: the one for writing prose targeting an HTML document? :)
<samueldr>
the one replacing <b></b> and friends :)
<jD91mZM2>
Maybe, but *personally* I think it's more natural, **although** that might just be me :\^)
<gchristensen>
sure! it is!
<samueldr>
two different goals I think, one is to make the document *look* a way, the other is to make the document *mean* something
<jD91mZM2>
¯\\\_(ツ)\_/¯
<gchristensen>
but also, DocBook isn't so bad for people to say they'll just never do it.
<maurer>
Isn't it? That's usually what I see people say in #nixos whenever docbook is mentioned
<maurer>
but I might have a biased memory here
<gchristensen>
DocBook isn't so bad for people to _justifiably_ say they'll just never do it.
<gchristensen>
if you hate docbook already, sure, docbook.rocks isn't for you. docbook.rocks is for people who are open minded and willing to learn something new
<jD91mZM2>
I mean it's a little annoying having to escape all the XML syntax & stuff IMO
<gchristensen>
sure!
<samueldr>
CDATA is usable too there AFAIK
<jD91mZM2>
(Are you sarcastic btw? I'm having trouble telling)
<gchristensen>
nope, it is a bit annoying
<jD91mZM2>
Oh, ok. Didn't get the context of the conversation as I just logged on, so I didn't initially see if you're super positive or just a little positive towards XML
<gchristensen>
out of the >30,000 lines of XML & > and < appear about 100 times
<gchristensen>
^ out of the 30,000 lines of nixos / nixpkgs docs that is
<gchristensen>
so it is a bit annoying, but it isn't real common
<jD91mZM2>
Hmmm perhaps. I feel like it's nicer with `\&` though, which is why markdown appeals to me (not that it has &)
<gchristensen>
sure it is a bit nicer
<jD91mZM2>
Not saying docbook is bad though, I don't even know what it is :P
<gchristensen>
docbook can do nice things too, which are very hard for markdown
<jD91mZM2>
oooooo like?
<gchristensen>
I'm so glad you asked!
<gchristensen>
give me 15 min :)
<jD91mZM2>
inb4 gchristensen proves docbook is turing complete
<gchristensen>
alas, "The notion of Turing-completeness does not apply to languages such as XML, HTML, JSON, YAML and S-expressions, because they are typically used to represent structured data, not describe computation."
<jD91mZM2>
Yes but PowerPoint...
<jD91mZM2>
To be fair, I'm sure you could make some kind of XML thing that uses custom tags to describe a program
<gchristensen>
oh well there is XSLT which is a purely functional programming language
<jD91mZM2>
Beautiful
<joepie91>
gchristensen: emphasis: "typically" :D
<joepie91>
anyway, I'd be more interested in docbook if it were used as a semantic storage format for documentation, rather than as a format to manually author
<samueldr>
joepie91: you could nerdsnipe yourself into that :)
<joepie91>
sure, I'll put it in slot #5821 of my todo list :)
<LnL>
simple answer is no, build time dependencies ignore that so this only works if your dependencies are all locked and in the magically correct order
<LnL>
the magic ordering is the fun part
kisik21 has joined #nixos-chat
<clever>
disasm: and poof goes slack!
kisik21 has quit [Ping timeout: 272 seconds]
sir_guy_carleton has quit [Quit: WeeChat 2.0]
tertl3 has joined #nixos-chat
lopsided98 has quit [Quit: Disconnected]
lopsided98 has joined #nixos-chat
lopsided98 has quit [Remote host closed the connection]
lopsided98 has joined #nixos-chat
<etu>
gchristensen: I really wish I could. But I've should have planned it earlier. The cheapest way I could get there now would be around 800€. And sadly I can't motivate that enough.
jasongrossman has joined #nixos-chat
jasongrossman has quit [Remote host closed the connection]