Rainmeter, a few addons, and a scan of a tattoo concept sketch by some Japanese artist. The speaker/headphone button switches audio between headset and TV, the weather text at the bottom changes based on some local reporting station. The D: drive is my mass media and program storage, X: drive changes based on what removeable media is installed. I want to find a good icon set for chrome, VLC, few other things, and get a better scan or photoshopped version of the background, it's a little blocky for big screens. But I love the fuck out of it.
Pretty cool, hey? I think my favourite feature is being able to hide it. I have it set up to only be active when I hit CtrlAltSpace. It's so much faster than taskbar! I also run Taskbar Eliminator. Auto-hide is great, but it annoys me if I accidentally mouse over and bring it up.
I didn't think I would like 10 at all. I got convinced to not just get a clean windows 7 install by a very knowledgeable guy who wasn't on microsofts payroll. Aside from some advertising issues I had to fix a few settings to get rid of, it's pretty responsive, and things are arranged pretty ergonomically, for windows anyway. Also I get a kick out of using Cortana because I'm a Halo buff, even if the new games are shit.
I'm sitting at 101 keys, 36 faders, 7 audio monitors, 3 video monitors, a Mac Mini, a Mac Pro and a fire-breathing 5960x clocked at 4.5GHz all connected with a 4x2 DVI KVM. I've been on Macs for fifteen years. And after last week, I can honestly say that I find configuring Win10 to be easier, less headache-inducing and more likely to be successful than OS X.
This is the link to the 'do i need a jacket?' addon. I'll get you the full list later. On a different machine at present.
Ooh, what motivated you to choose Void Linux? I know there's a bit of a battle going on over whether systemd is a good idea, do you have an opinion on this? (I don't, because I know next to nothing about operating system design). I would post my desktop but it's really really boring. I use vanilla i3 on Arch Linux on my laptop, with the default window decorations and a black background. My work computer uses the same thing but with custom window decoration colours and the default Ubuntu background because I haven't got round to customising it yet. One thing I can recommend however is Spacemacs, which is a set of extensions for Emacs to give it Vim keybindings (evil mode) plus loads and loads of extras. It's really just a collection of Emacs addons, plus some nice config files for managing sets of addons (called 'layers'). All I can say is that it offers a lot of nice defaults and builtins. I use this at work. What code have you been writing?
I picked Void mostly in an attempt to get away from systemd. In my opinion, systemd suffers from severe feature creep. For the most part I'd like the software that I use to follow the unix philosophy. As for why I chose Void over other distros that don't use systemd, it's partially because it uses runit as its init and also because I like its xbps package manager. Overall, it's pretty similar to running arch. It's got the rolling release and the minimal base system. You know, I could never get into emacs. I think it really has more than is necessary for a text editor. To be honest, I would use ed if it had syntax highlighting. I haven't been writing much recently, other than stuff for class. The code in the screenshot is from when I read Build Your Own Lisp a year ago. It just happened to be the most decent looking C code in my projects folder.
That's interesting, also kinda cool that packages are added to the repo via pull request. Emacs has a bit of a learning curve, I don't think I would have ever changed to it except as an act of procrastination. There's a guy at work who is always telling me "you know, you can just do that with a key command", which just boggles my mind. One day I'm going to trawl through the keybindings/Lisp files and see how it all works. One day. I hope class is going well.
I don't buy technical books much because I'm an autodidact. I did buy Mastering Emacs though, even after using emacs for a long time. It's an excellent way to really appreciate emacs.
Emacs isn't really a text editor, it's a LISP virtual machine with lots of primitives for manipulating text and buffers. Probably the most extendable and configurable software for end users. That's why it has so many incredibly diverse packages. I wish I had spent time getting to know vim, but there's no way I'm switching now. You know, I could never get into emacs. I think it really has more than is necessary for a text editor.
I'm impure I guess, I use both. vim for configuration files and C/python/other algol-type languages/SQL/shell scripts and html/javascript/css polyglots, emacs for lisp/ml-family languages/prolog family languages/TeX/postscript. emacs doesn't really shine on languages with gross grammars, it's easier just to use a dumb editor, but it's a delight when commands like forward/backward-sexp can do something sane.
I use Emacs for text, but my windowing is split between Emacs and Tmux. I'm trying to migrate to Tmux. IMO the real options are, Vim is your editor and POSIX is your IDE, or Emacs is your editor and IDE. I'm trying to migrate to POSIX as IDE. But I really like Emacs' chording and modeless buffers-and-minibuffers model. So, I think my eventual goal is POSIX/Tmux with Vimacs as the editor. With scripts in Lua. Vimscript is nasteh.
I don't think emacs really deserves its reputation of trying to be your whole world. It is happy to work the the tools the rest of the environment provides. shell-command-on-region is handy if you have some text you want to transform and can see how to do it with awk or some other external tool more easily than with elisp, for example.
Not an issue. That loop is never normally exited. If `lval_eval` calls `exit(0)`, the process is terminated and memory no longer matters. How else would you do it? There are ways to read input into a pre-initialised buffer, but they're painful, because you have to check if the input was larger than the buffer and read again in a loop. Trading potential memory leaks for potential buffer overflows isn't a gain. There's nothing wrong with using GNU readline. What are you worried about? Performance? Not an issue. Dynamic memory allocation? Should be avoided when possible; not possible here. Dependencies come at a cost. There are projects for which a string library dependency is justified. I doubt a toy REPL is one of them. C strings are simple and well-understood. If you don't understand them, a project like this is a great place to learn. No code is perfect, but this looks like decent C to me.I don't think that all memory will get released properly if you will terminate this loop by C-c.
is there no other option in your code then to re-initialize variables inside a loop?
trying out The Better String Library
Erm. I was just explaining why I think the choices in the code are reasonable. Sorry if I offended you. I didn't. I disagree with your opinions, but I didn't think you're an idiot or a pedant or whatever. Maybe inexperienced, but not stupid. I dunno, my life's been super-busy, so I haven't been around as much as I'd like, but Hubski isn't Reddit. I think a lot of times comments go unseen, or people don't have anything valuable to add, so they don't. I think neither. Few things are black or white. I do think readline is simpler though, and as Dijkstra said, "Simplicity is prerequisite to reliability". Again, don't take this the wrong way, but only one of us is getting worked up. I'm going to keep posting my professional opinion on code, and I'd encourage you to do the same, and maybe we'll all learn something.how come that if I have any concern here I'm either ignored or people read my comments in a (apparently?) Comic Book Guy voice?
Comic Book Guy voice?
I'm either ignored
some think that my way is the way, other think it's atrocious abortion of a code.
Man, chill
I'd have to dig into it to be sure, but I suspect it's a false positive, depending how you define 'false positive'. So, the loop doesn't normally exit (unless one of those functions is a heinous macro). So, when you hit C-c, something, presumably `lval_eval`, calls `exit(1)`. When it does, the process immediately terminates, and the memory in `main` allocated by `readline`, `lval_read`, and `lenv_new` won't be deallocated before termination. Unequivocally. But not cleaning up everything on exit isn't really a memory leak. Any time you exit a program by calling `exit`, you're almost certainly going to leave memory unreleased. That's not really an issue. Some people don't like it, but it's not really a problem. The process terminates, the OS recaptures the memory, end of story. Agreed. Some people think you should always clean everything up. I tend to think it depends on the size of the app. It certainly makes things cleaner for bigger projects, and easier to track down real memory leaks, because Valgrind & Co don't have 'false positives'. I don't think the loop is the issue. With an `exit`, the whole program is killed. The `lenv_del` outside the loop is never called either, and `e` is also leaked. Thinking about it more, I don't think what you want is technically possible. The `lval_eval` has to take all the input, and you don't know how big the input will be. Static buffers in a loop can work for getting all the input, but some way, somehow, you have to get data of unknown length to `lval_eval`. So, you could make `lval_eval` take a fixed length and save state for a second call. But then `lval_eval` has to keep dynamic memory, because it might not be 2 buffers' worth, it might be 200. The dynamic allocation is out of the loop, but it didn't go away, it just moved somewhere else. What you really probably want is garbage collection, or C++ RAII. C just doesn't have a way to specify future deallocation. If it were me, I'd probably make `lval_eval` return an outparam signalling whether to exit, so the main loop would get the signal and `break` after freeing resources. Not a big deal for a small REPL, but certainly for a big project. Everything is relative. From an FP perspective, the `exit` is a side-effect, and this is one of countless reasons impure functions make everything harder.memory leaks are among the worst things and it should not be ignored
at the very least, is going to obfuscate debugging later on.
avoid in-loop declaration of pointers at all cost
No difference. Whether you kill the process with a few bytes of allocations, or 10Gb. In fact, AFAIK the way most operating systems work, if you allocate memory and then free it properly, the OS will still keep that memory 'allocated' to your process, because you're likely to ask for that much again. Again, talking about killing the process. While running, you're right, memory leaks are a huge deal. Especially for long-running applications and services. I think a lot of programmers fall in the same category, myself included. Analytical intelligence and social intelligence tend to have an inverse correlation. I probably didn't develop the social skills most people acquire by high school, until some years after undergrad. And I didn't learn to take things in general less seriously until my late twenties. I think that's just part of getting older, learning to get along with people, play politics. Learning to take enough enjoyment from conversations with nice people, to tolerate being nice to mean people. I'm still not where I'd like to be. I think we're all still learning. So ist das Leben.Are there any guidelines on what is considered, for example, too tasking for system to clean up?
a lot of my reading into people disagreeing with me probably stems from my background.
Thanks! I actually haven't looked at this code in over a year. It was the result of reading Build Your Own Lisp. It just happened to be the most decent looking C code in my projects folder. That string library looks pretty cool. I'll have to play around with it.