gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
Lisanna has quit [Quit: Lisanna]
Lisanna has joined #nixos-chat
tertle||eltret has joined #nixos-chat
<samueldr> this software has no sense of humour https://stuff.samueldr.com/screenshots/2018/08/20180817211945.png
<gchristensen> lol
<ldlework> haha
lassulus_ has joined #nixos-chat
lassulus_ is now known as Random_int
lassulus has quit [Ping timeout: 244 seconds]
Random_int is now known as lassulus
etu has quit [Read error: Connection reset by peer]
etu has joined #nixos-chat
Lisanna has quit [Quit: Lisanna]
<tertle||eltret> omg
<tertle||eltret> u guys are so wieredp
<gchristensen> we are certainly eclectic
<tertle||eltret> so it looks like Valve is still supporting games on linux
<tertle||eltret> the new game 'Artifact' will be for linux as well
<drakonis_> uh yeah?
<drakonis_> they upstream kernel drivers and work on the video stack
<tertle||eltret> im not sure exactly, but they fund the Vulkan API and have been running thier games on linux for years now
<tertle||eltret> i can even run Dota on the nouveau driver
<tertle||eltret> but it runs about twice as good on the nvidia blob
<infinisil> Oh very nice, a webpage only for advocating Nix :O https://www.usenix.org/
<ldlework> lol
<drakonis_> :V
Guanin has quit [Ping timeout: 244 seconds]
Guanin has joined #nixos-chat
drakonis_ has quit [Remote host closed the connection]
jD91mZM2 has joined #nixos-chat
sphalerit has joined #nixos-chat
<jD91mZM2> sphalerit: \o
<{^_^}> sphalerit: I'll pass that on to jD91mZM2
<jD91mZM2> {^_^}: I'm online
<{^_^}> jD91mZM2: 18 seconds ago <sphalerit> https://twitter.com/grhmc/status/1030635029439889410 ;)
<sphalerit> Oops
<jD91mZM2> Dealing with the AST is basically Scratch lol
<sphalerit> Blargh matrix
<jD91mZM2> ?
<jD91mZM2> The worst part about writing the parser gotta be constantly breaking all 30 unit tests btw :|
<ldlework> i think i have really improved nix-mode
<joepie91> jD91mZM2: :D
<joepie91> (re: working)
Lisanna has joined #nixos-chat
LnL has quit [Read error: Connection reset by peer]
LnL has joined #nixos-chat
<jD91mZM2> ldlework: I've been looking forever but can't even find what port a language server should use lol
<jD91mZM2> Oh wait, maybe it's just sending json through stdin... I should try that
<jD91mZM2> Oh yeah that's it...
<jD91mZM2> They should probably specify that somewhere :P
__monty__ has joined #nixos-chat
sir_guy_carleton has joined #nixos-chat
<jD91mZM2> ldlework: Oh, language servers seem relatively easy! Started work on one, but it's nowhere near working yet. But it logs requests to a (hardcoded) file, and I could that as an accomplishment :)
__monty__ has quit [Quit: leaving]
__monty__ has joined #nixos-chat
pie__ has joined #nixos-chat
pie_ has quit [Ping timeout: 240 seconds]
<gchristensen> ldlework: ooh link
<gchristensen> sphalerit: :)
<gchristensen> LnL: ^ instead of passing `--option sandbox false` for the vm tests and possibly building multiple drvs without it, I chose something more precise and much worse :P
<LnL> euh...
<LnL> we added something like that for local networking because that isn't allowed in the darwin sandbox by default
<LnL> but _any_ networking doesn't sound like a greatidea
<gchristensen> that is why I have to make such promises to turn it on:)
<LnL> a drv can make all the promises it wants
<gchristensen> :P
<LnL> this would atleast need a nix.conf setting IMHO
<LnL> btw. I had a feeling that I was partially responsible for shlevy's tweet
<LnL> can you explain what the problem is?
<gchristensen> oh I'm not going to upstream this patch
<gchristensen> and you weren't :)
<LnL> I'm pretty sure I'm the one that told you about it
<gchristensen> nah, I knew about it :P
<gchristensen> LnL: I want to run my Nix install tests inside a nix-build, but still have all the benefits of sandboxing, minus the network sandbox
<LnL> gchristensen: assuming this is using a vm and you're talking about sandboxingn on the host
<gchristensen> yea
<LnL> then why does the host or vm need internet access?
<gchristensen> to talk to nixos.org and cache.nixos.org
<LnL> I assumed that, but why? ;)
<gchristensen> first half is to run the installer, second half is to ... access the cache ..., without having to set up a custom certificate authority and fake certs
<LnL> the installer tarball should be a build input
<gchristensen> yeah but I want to do truly end to end tests
<LnL> hmm ok, I feel like that doesn't really belong in a nix build tho
<gchristensen> it doesn't :)
<LnL> you can't express what it depends on
<gchristensen> I agreue
<LnL> thought you where just doing the tarball -> install part
<gchristensen> no
<gchristensen> after I have it working for Nix, I'm going to update it to test the way Target installs Nix which uses something then calls the Nix installer
sir_guy_carleton has quit [Quit: WeeChat 2.0]
jtojnar has quit [Ping timeout: 240 seconds]
jtojnar has joined #nixos-chat
<infinisil> Hey, I remember there being some convention for not having to specify the full LICENSE in your projects, but instead just use the spdx identifier
<infinisil> Anybody know what I mean/has a link to it?
<LnL> doesn't ring a bell
<LnL> what a weird day, feel like I've been preparing food since I woke up :p
jtojnar has quit [Ping timeout: 244 seconds]
jD91mZM2 has quit [Quit: WeeChat 2.0]
jtojnar has joined #nixos-chat
Drakonis has joined #nixos-chat
__monty__ has quit [Quit: leaving]
<gchristensen> anyone want to write about how cool NixOS, NixOS tests, and nix-shell is? https://news.ycombinator.com/item?id=17787815
kisik21 has joined #nixos-chat
Guanin has quit [Read error: Connection reset by peer]
Guanin has joined #nixos-chat
jtojnar has quit [Read error: Connection reset by peer]
jtojnar has joined #nixos-chat
LnL has quit [Excess Flood]
LnL has joined #nixos-chat
<gchristensen> nice, thank you! what have you made better?
<ldlework> gchristensen: it mean it is really hard to test that
<ldlework> basically i read the existing implementation over and over until i thought I understood what they were trying to do
<ldlework> Then I reimagined the implementation in the most cleanest way I could
<ldlework> Making sure that it did what I thought it should do
<gchristensen> so cool
<gchristensen> I'll try it after dinner :)
<ldlework> it is very much commented so hopefully people who wish to improve it further can just read it and get going
<gchristensen> oh what the heck, justwaiting for tomatoes to simmer, I'll try now.
<gchristensen> ldlework: how do I try it? :$
<ldlework> gchristensen: just eval the whole snippet
<ldlework> then find some nix code
<ldlework> screw it up
<ldlework> and run nix-mode-format
<gchristensen> should I disable nix-mode first?
<ldlework> no this modifies nix-mode
<ldlework> it replaces a single function
<ldlework> via defalias
<gchristensen> seems to mosty do the right thing!
<ldlework> \o/
<ldlework> let me know if you find something that doesn't work
<gchristensen> seems to dedent line 2 here for me: https://gist.github.com/grahamc/927cdf3d7f141c59986970ca18d1e9ac
<ldlework> len != let
<gchristensen> erm, yeah, that was a typo in my example
<ldlework> hmm that indents correctly for me
<ldlework> wtf
<gchristensen> maybe I did it wrong :)
<kisik21> Are there any people well-versed in vim-nix?
<ldlework> just copy everything in my snippet into an elisp buffer
<ldlework> then do
<ldlework> M-x eval-buffer
<kisik21> oh emacs
<ldlework> go to your example code
<ldlework> M-x nix-mode-format
<ldlework> If it doesn't work, I've screwd up the code export or... something.
<ldlework> I should probably just fork nix-mode
<LnL> kisik21: yeah, crazy emacs people
<kisik21> what can I do so vim-nix wouldn't impose its own indent guidelines on me?
<kisik21> Switching to emacs is not an option :)
<gchristensen> hmmm ldlework not sure, Il'l loo kmore soon.
<LnL> kisik21: not sure what you mean, I did introduce some bugs in the last update if that's what you mean
<kisik21> Wow you're the developer?!
<kisik21> I dunno if these are bugs
<kisik21> or Nix style guidelines imposed on me
<kisik21> I'll try to describe
<kisik21> enter some Nix code, and it sometimes shifts indents. When you type ` };\n`, it may turn into `};\n` (mind the space count)
<kisik21> LnL: is this one of your bugs?
<kisik21> Oh yeah, makes me mad as hell!
* samueldr won't update
* kisik21 wonders if the samueldr's context was the same
<samueldr> it's been several months since I updated my vim plugins
<samueldr> it there's a new bug I won't ;)
<kisik21> Installed vim via home-manager a week ago.
<LnL> yeah, that's a bug =gGG does work correctly but insert mode gets confused
<kisik21> Can you fix it please?
<gchristensen> kisik21: maybe it is something you could help with
<LnL> I've been thinking about reverting the commit that introduced it
<kisik21> I'm not versed in vimscript (or what Vim plugins are written in)
<kisik21> I only know some Nix, Python and Bash, and a snip of C (just barely enough to not freak out at compiler errors)
<kisik21> LnL: I could volunteer to test it, if I will be able to hack it in with an overlay into home-manager
<kisik21> (I probably will be able to do it, looking at home-manager handles vim plugins)
<kisik21> s/at/at how/
<LnL> I have tests :) but fixing it is tricky because the indentation heuristics are not great
<kisik21> I don't know if I will be able to help you even a little bit
<kisik21> My vim knowledge is lacking...
<kisik21> enough for everyday usage
<kisik21> not enough for tweaking plugins
<ldlework> fixed nim-mode for emacs on that snippet: https://gist.github.com/dustinlacewell/5384d3d8e271335d4cbf740afa649009
<ldlework> :)
* kisik21 is scared of Emacs
<ldlework> just sayin
<samueldr> it's a great general-purpose programming environment, just lacking a good editor ;) *ducks*
<kisik21> It just needs more vim
<samueldr> kisik21: ever head of evil mode?
<samueldr> when I tried it, it worked good enough for my vim-used fingers
<LnL> kisik21: you can use dae3d30
<kisik21> yeah, but never used it, because still to scared for emaks
<gchristensen> nothing to be scared about. the first screen you see in emacs provides instructions on how to learn Emacs
<kisik21> the first time I tried to open Emacs, I didn't found a way to close it
<samueldr> emacs even has a gui for most (all?) knobs and toggly bits
<LnL> and how do you go there without a mouse?
<kisik21> unlike vim
* samueldr is firmly in the camp of use whatever you like to use :)
<gchristensen> LnL: arrow keys. samueldr: yeah!
<ldlework> kisik21: you wernt born with knowledge of how to close vim
<samueldr> my workflow isn't vim-like at all, and I fight with some features of vim
<kisik21> I like that it has built-in sed
<ldlework> i tend to think of emacs as an application platform with many many many editors.
<kisik21> even vim
<ldlework> yes
<kisik21> is there an emacs within emacs?
<ldlework> well emacs doesn't literally run vim
<ldlework> someone reimplemented it with elisp
* samueldr wonders about plugging in neovim actual into emacs
<samueldr> since neovim is that client-server model
* kisik21 wants to turn vim into emacs-like hub of everything
<kisik21> Mail in vim would be nice
<samueldr> kisik21: this could hurt
<ldlework> the problem is vimscript is just a toy
<samueldr> I found it better to let vim be the editor, and use tools around
<ldlework> LnL: if it helps, my approach was to treat everything like a comment, string, or expression.
<ldlework> Using a stack-counter to figure out which expression we're inside of by counting expression caps and ends.
<ldlework> Once I find a cap for which we didn't already see a corresponding end for
<ldlework> we know we found the opening of the expression that contains us
<ldlework> we simply find the indentation containing that cap, and indent relative to it
<LnL> yeah, I use a partial combination of that and heuristics based on the current/previous line
<LnL> where the second part isn't great ofcorse
<ldlework> LnL: the only thing I had to do that was strange
<ldlework> is treat " = " -> ";" as an expression type
<kisik21> LnL: ok, I take my words back, I don't know how to fetch a specific version of a vim plugin if it is generated automatically
<kisik21> oh wait
<kisik21> here it is
<kisik21> automatic generation of nix expressions at nixpkgs build time
<kisik21> ok
<kisik21> I retake my words from back
<LnL> kisik21: vimPlugins.vim-nix.overrideAttrs (drv: { src = fetchzip { ... }; })
<kisik21> LnL: seems like I became a bit dumb, where to put this?
<kisik21> LnL: Oh finally I hacked in your plugin! And it works!
<LnL> kisik21: samueldr: pushed, let .. in (not the bindings) are still aligned a bit nicer then before
<kisik21> what about braces {}?
<LnL> also: vim "+NixEdit hello"
<LnL> this won't get indented correctly anymore https://gist.github.com/LnL7/d9cf8bd12012c8942a2fe4e7515bc6ac