1. 6

    jo is pretty rad, too. It handles creation of JSON much easier than jq.

    1. 2

      The problem is jq is becoming a standard and working its way into a bunch of mainline scripts. I wish someone would write a book on it. I can do simple queries but find some of the syntaxes to be impenetrable.

        1. 1

          Linking to the manual isn’t really helpful. Do you have other more insightful resources to offer?

          1. 1

            None. But I found the manual to be excellent. There’s even examples for almost everything.

      1. 1

        Do you have any recommendations to do the reverse?

        1. 8

          You want to destroy JSON?

          1. 1

            This comment mentions gron.

        1. 4

          With this registry addon Windows XP will have support till 2019:

          Windows Registry Editor Version 5.00
          [HKEY_LOCAL_MACHINE\SYSTEM\WPA\PosReady]
          "Installed"=dword:00000001
          
          1. 1

            It ate your backslashes by the way…

            1. 1

              Fixed. Thanks.

          1. 4

            Something that doesn’t seem to be documented but I found in a GitHub issue, you can use nim c --cc:vcc to compile using Visual Studio in Windows. It only works in a “VS Tools prompt” but it saves installing MinGW if you fancy trying out Nim quickly.

            For me, the most powerful aspect of Nim is that it targets other compilers. So for example you can just include a .c file from a .nim file and it’ll get linked in. You can then import the methods from that C file into your Nim code and call it. Same works both ways too, exposing Nim methods to C code is trivial.

            1. 4

              So for example you can just include a .c file from a .nim file and it’ll get linked in. You can then import the methods from that C file into your Nim code and call it. Same works both ways too, exposing Nim methods to C code is trivial.

              How does that interact with garbage collection?

              1. 1

                I’ve not experimented long enough to know yet.

            1. 6

              Yeah, why not post the source? Any reason why it only provides links to the posts, rather than an embedding of the post on the page?

              1. 1

                Oh yea I did that initially. Two reasons

                1. Load time become crazy slow
                2. Some servers change the CSS making the embedded iframe look strange
                3. Some servers do not allow iframe embed
                1. 3

                  You should try to find a solution, probably cache the entire page. It doesn’t seem like it changes too often and everyone sees the same content anyway. Also, just keep the content of the post, no need for any CSS.

                  1. 2

                    That would be no problem, I can also get the user Icons of the people who posted it. I was thinking it may upset some server/content owners. Feels like a repost to directly copy no ?

                    1. 1

                      Yeah, it’s iffy to directly copy. People might not like that. It’s a good call to not do that.

              1. 1

                Seems like it’s straightforward to read, well done! However, as a general advice, when the functionality is that simple you have to provide unit testing at least so you build up confidence in your own code, not only for yourself but for other people who want to use it.

                1. 1

                  Thanks very much for your suggestion! It is a really good habit of adding unit testing even it is just a toy. I will try to add unit testing later, thanks very much!

                1. 4

                  Reminded of this paper about Schematic Tables: http://www.subtext-lang.org/OOPSLA07.pdf

                  Screencast: https://vimeo.com/140738254

                  From http://www.subtext-lang.org/

                    1. 4
                    1. 3

                      Interesting alternative to Processing, but it seems to be missing bezier curves. I do like that it’s stateless though but it’s a bit verbose. Can you for example define a line and then just update the color and draw each instance? That doesn’t seem possible, but it seems to rely on Rust’s lifetime to actually draw, which is a bit unusual.

                      EDIT: if the author is reading, the reference for a good framework that has it all is libcinder, it’s my favorite thing. You should also think about plugins, or at least promoting them instead of including everything yourself, ofx got good coverage for this. Also, something that Rust makes easy but you’re not using is unit testing, nothing is tested as far as I can see…

                      1. 1

                        contact@nannou.cc is listed on the Github profile.

                      1. 1

                        He mentions self-hosting a personal wiki but doesn’t mention what software he’s using. Anybody have suggestions?

                        1. 1

                          I’d suggest bookstack. It’s a joy to use and easy to deploy.

                          1. 1

                            Hugo + custom theme + GitHub pages + Travis CI, works quite well for me, I don’t write much, if at all but it was painless to setup. Every commit to the source branch triggers a CI that pushes into the master branch of the GH pages, it’s all automated.

                            Okay it’s not really self-hosting… but Hugo + custom theme is still usable behind a self-hosted static nginx.

                          1. 7

                            and even if you’re uninterested in the rest of the article, the answer is from a quote

                            “This time is different” - Sir John Templeton

                            1. 2

                              I honestly wished the author had picked a better title. It’s the best rundown of decentralized file storage I’ve read. But the rules against changing the post title and editorializing the content worked against me here ;)

                              1. 1

                                Do not editorialize story titles, but when the original story’s title has no context or is unclear, please change it.

                                It’s quite explicit that if it’s not clear you can change it.

                                1. 1

                                  OK, I missed that (posted from mobile). Thanks for the clarification!

                            1. 5

                              This is just awesome to read, simple but effective communication.

                              1. 3

                                That godbolt website he keeps linking to & talking about is really, really cool. I am just in awe right now. Carry on..

                                1. 2

                                  You might be interested in watching this: https://www.youtube.com/watch?v=bSkpMdDe4g4

                                  1. 1

                                    I was, thanks!

                                1. 10

                                  I am totally impressed by the article. The authors tries to silence his computers for decades, I am doing the exactly opposite. All my workstations in the past were equipped with large fans (not the small and noisy ones, the large ones that run slow) to generate a decent amount of white noise.

                                  When I am usually sitting in my room and nothing is running, I can hear the noise from the trains, cars, kids, etc outside and from my neighbours inside the house. As soon as I turn my computer on the room is filled with white noise and I can concentrate on my work. Thus, I personally would never, ever use a silent workstation :)

                                  Am I the only one using “noisy” computers?

                                  1. 1

                                    Have you tried listening to ‘pink noise’? I don’t use it all that often as I prefer silence, but it does help me concentrate sometimes.

                                    1. 1

                                      Sounds interesting. Currently, I am only having the noise generated by my noisy computer.

                                      How do you generate the noise? Do you use a specific hardware/tool/… ?

                                      1. 2

                                        I first tried listening to YouTube videos like speps mentioned and that got me interested. I had a shell alias for it named ‘pink’ that used sox, but I don’t seem to have it on the computer I’m currently using. I’m pretty sure it was just something like this:

                                        $ play -n synth pinknoise vol 0.25
                                        

                                        I just start it up when I get too distracted. There’s also ‘brownnoise’ and (suprise) ‘whitenoise’. Listening to regular white noise first gives you something to compare it with. I find pink noise to sound kind of like flowing water and not at all distracting. You might be fine with the sound of your computer ;).

                                        $ play -n synth brownnoise vol 0.25
                                        $ play -n synth whitenoise vol 0.25
                                        

                                        Actually it might have been this one (sounds more like what I remember): https://askubuntu.com/a/789469

                                        1. 1

                                          YouTube has videos like 10 hours of whatever noise you want.

                                          1. 1

                                            I use the iOS app from https://mynoise.net. It generates various types of noises and lets you change levels, save presets, etc. They also have albums on iTunes, Amazon, and Google Play. Most generators cost money but I find the free set to be good enough. Although it does “coloured noises” I prefer the “rain storm” generator.

                                      1. 12

                                        I thought it would actually be about std::optional, not workspace issues that have nothing to do with the problem at hand.

                                        TL;DR: keep your toolchain up to date if you want to use recent language features.

                                        1. 3

                                          yeah. I suspect better article naming would be better at not leaving people feel like they kept on expecting the article to go somewhere it didn’t.

                                          1. 9

                                            I think it’s funny because the reader’s experience parallels the author’s experience of wanting to get someplace.

                                            1. 4

                                              Somebody gets me! :)

                                            2. 2

                                              Sorry folks :(. But std::optional works as one expects - you can write functions to accept std::optional and you just check early on if it evaluates to true and just return empty as needed, so you can chain functions neatly.

                                              Now, if only we could have pattern matching …

                                              1. 3

                                                I think the consensus of languages with options and pattern matching is “don’t use pattern matching, use combinators”.

                                                1. 4

                                                  Hmm as a full-time Haskeller “don’t use pattern matching” is news to me. Do you mean “don’t use pattern matching for fundamental vocabulary types like Maybe or Either? In which case it’s a reasonable guideline. For types representing your business domain, pattern matching is perfectly good practice. IMHO exhaustiveness checking of pattern matching is an indispensable feature for modelling your domain with types.

                                                  1. 1

                                                    Do you mean “don’t use pattern matching for fundamental vocabulary types like Maybe or Either?

                                                    Yes.

                                                  2. 3

                                                    Consensus, really? I’m a big fan of combinators, but I’ll still match on option types sometimes if I think it looks clearer.

                                                    1. 2

                                                      Ooh, this is interesting to me - can you expand on this (or point me to some writeups)? Thanks!

                                                  3. 2

                                                    Agreed. I read all the way down and nothing significant about std::optional.

                                                    I thought it was going to be some sort of piece about how using std::optional could lead to yak shaving or something :(

                                                1. 7

                                                  Blame me for being blunt but it’s a bit stupid. The spec of the language has had that for ages: https://www.ecma-international.org/ecma-262/5.1/#sec-11.4.8 Maybe it’s just me, but I enjoy reading the spec of a language I’m learning, and if there’s no spec it’s usually a red flag.

                                                  1. 3

                                                    I’m kinda worried that the C++ 2d graphics proposal uses Cairo as a reference implementation…

                                                    1. 1

                                                      @ruki: I’ve noticed that with game engines that people make at home and try to promote. Usually if you write an engine, a library, etc. it’s nice to actually have a full use case / demo / application done with it. For example, Unreal Engine 4 has tons of tech demos, short films, etc. that are made with it. A game engine lives and dies by the projects it’s been used to create. In my opinion, the same applies for code libraries.

                                                      1. 1

                                                        Ok, Thank you for your advice.

                                                        1. 4

                                                          Thank you for the invite @emrox! Yes, and also added Perl during the lunch break :) Feel free to suggest other lists on GitHub: https://github.com/listcommunity/support

                                                          1. 2

                                                            Thank you @binarymax @nickpsecurity. I’ve been reading Lobsters for a while but it’s nice to be able to contribute :)

                                                            1. 1

                                                              This is really nice. Thank you for putting this together. And welcome to Lobsters :)

                                                              1. 1

                                                                Welcome to Lobsters! Good idea trying to integrate and organize the lists. :)

                                                                1. 2

                                                                  the author of list.community contacted me on Twitter to let you know he added the C++ section to the page

                                                                  https://list.community/fffaraz/awesome-cpp

                                                                  1. 1

                                                                    No Perl either!

                                                                    1. 3

                                                                      There’s Javascript and Golang, it’s okay!

                                                                        1. 2

                                                                          I stand corrected, thanks! I didn’t find it on the linked front page.

                                                                          1. 3
                                                                    1. 3

                                                                      That would have helped me understand why SOM was taught in my CS course… We used it to match a grid to another grid which I found pointless…

                                                                      1. 20

                                                                        Chrome is worse than Internet Explorer 6, really. I don’t recall ever being concerned that IE6 itself was spying on me and phoning home to Microsoft, but I can’t say that about Chrome and Google. I think using Chromium mostly avoids that problem, at least.

                                                                        However, I recently found Otter Browser which attempts to mimic the original Opera browser. I’ve been using it instead of Chromium when I can, and haven’t noticed any rendering problems or Javascript incompatibility, which should be expected since it’s WebKit based.

                                                                        My biggest complaints so far are that the built in ad-block isn’t great compared to uBlock Origin, some videos don’t play due to Widevine problems, and it’s not very stable. The last problem may be my own fault, though, because I’m running the bleeding edge tip of their Git repo. It’s on my todo list to start debugging some of the problems and contributing code, but I say that about a lot of projects…

                                                                        In any case, it’s being actively developed and I think it’s worth a look for anybody tired of being at the mercy of Google, Microsoft, Apple, and Mozilla.

                                                                        1. 5

                                                                          I’ve used SeaMonkey[1] for years now which mimics the original Firefox 2.0. Never found any compatibility issues as it’s still a recent Gecko, some WebGL or WebRTC stuff doesn’t always work but that’s fine.

                                                                          [1] https://www.seamonkey-project.org/

                                                                          1. 1

                                                                            Otter just seems to be a UI wrapped around WebKit. Meh.

                                                                            1. 1

                                                                              I’m not using it for the rendering engine.

                                                                              I’m not even sure why the underlying engine matters, really.