1. 6

    Another great C compiler with a single author - https://github.com/michaelforney/cproc

    1. 3

      The one you link uses QBE as a backend whereas lacc has its own backend, a significant part of writing a compiler.

      1. 3

        qbe is also from a single author, I suppose you could say cproc has 2 authors then.

        1. 3

          FWIW QBE is also written by a single author. Both are great projects :)

      1. -2

        Very excited to see yet another I/O framework for Rust. Nothing makes me think a language is a good choice to use when I see a fragmented community using thousands of different crates that all provide the same features that some other languages just put in their standard library.

        1. 4

          Not sure if you’re attempting humour here, you could have had a good point by not trying to be so sarcastic about it.

          I agree though, same happens with D. I was trying to find how to read xml, great there is std.xml! Oh it’s been deprecated because it’s not up to the standards of the standard library, and none of the existing packages seem very mature…

        1. 4

          Off-topic, but translated in french, the name and the description are funny; and yes I admit I’m a kid :’)

          Ps: popol is a slang word for dick.

          1. 4

            It’s like when English speakers work with the Coq theorem prover…

            (Les mots françaises sont tres belle, même les cochons…)

            1. 3

              Good one too :D !

              I am not trying to be rude, but just for you to know in order to further improve your good french:

              French words have a gender, either male or female, and the word “mot”, which means “word”, is male.

              As “mot” is male, you must use the male form of the adjective “français” (french) and not the plural female form “françaises”.

              Also, we use the adjective “bel”, which means “beautiful”, only before singular male words that start with a vowel or a muted consonant : like “un bel ouvrage” (a fine work) or “un bel homme” (a beautiful man). It’s plural form is “bels”.

              For male words that start with an audible consonant, you would use the word “beau”: “un beau cadeau” (a wonderful gift). Its plural form is “beaux”.

              For female “belle”, or its plural form “belles” works for every female words.

              So, with these two patches, you would say

              Les mots français sont très beaux, mêmes les cochons…

              Have a nice evening ! :)

              1. 2

                même

                Not trying to be rude either, when used as a indefinite pronoun it doesn’t have a plural :)

                1. 1

                  Damn… Thanks, today I learned !

                2. 2

                  I am not trying to be rude, but just for you to know in order to further improve your good french:

                  Thank you. 20 years ago I was fluent enough to do daily life and work in French (I lived in Luxembourg for a year or so) but I haven’t spoken it at all since then. I can still understand it well enough to listen to music and watch some TV, but it’s getting harder and harder.

                  (I helped some French tourists in Las Vegas 7-8 years ago. That was the last time I spoke French with a native speaker…and I gave them wrong directions. Not because I messed up the French but because I was wrong about how to get where they were going.)

            1. 2

              I thought everyone had switched to mutt years ago…

              1. 3

                Nobody I know switched straight from elm to mutt. Most went to pine first.

                1. 2

                  Same here, Pine Is Not Elm was the mail reader of choice for my peers. I believe the client I used was mh, but it’s been a looooong time.

                  1. 2

                    Ahh I switched from pine to elm and then mutt.

                  2. 1

                    Any link to that? Couldn’t find anything but the email client…

                    1. 5
                      1. 2

                        That’s the (terrible) joke.

                    1. 4

                      Ditto is a well known clipboard manager that’s existed since at least 2004[1]. If the author reads this you might want to consider changing the name.

                      [1] https://ditto-cp.sourceforge.io

                      1. 1

                        I don’t use GitLab myself but if you do, please open an issue.

                      1. 3

                        Whenever I need audio in a project I just use RtAudio[1].

                        [1] https://www.music.mcgill.ca/~gary/rtaudio/

                        1. 2

                          I’ve been putting up with CMake for years, in our complex cross-platform (pretty much every major platform) C++ codebase. Xmake looks wonderful … as though someone finally listened to my rant about how build systems should use a real programming language instead of awkwardly extending their syntax into a pidgin.

                          Is it as good as it looks on the surface?

                          1. 2

                            I keep hoping that Jon will finish Fabrique. I like the fact that CMake + Ninja has a clean separation of responsibility, one doing responsible for configuring a build, the other responsible for running that build as fast as possible. This means that it’s possible for CMake to export IDE projects if I want a richer debugging experience. Ninja itself is great and I don’t see any point in trying to recreate it. The nicest thing I can say about CMake is that it’s not autoconf.

                            CMake is a macro system, so everything is a string. Sometimes you interpret it as a number (which is fun when it’s a version string like 10.10 vs 10.2) or a list (with the inherent problem of using a valid character as the list separator). CMake also randomly hard-codes things. For example, the back end to use the Visual Studio compiler always passes /TC or /TP (C or C++ input), so if you want to compile Objective-C on Windows with clang-cl from a CMake build system you have to use an undocumented feature of the clang driver intended for debugging to tell it to remove these flags: they don’t appear in any variable visible in your CMake scripts.

                            In contrast, Fabrique is a strongly typed language with high-level types such as files (so your build system has enough information to drive a sandboxing framework, for example), actions, lists, and so on, along with functions. It is designed to be possible to drive from an IDE’s GUI or a configuration file and includes concepts such as modules and delegation so you can easily express ideas such as ‘the C compiler flags in this module should be these, plus any from the command line, but not the ones from the parent directory’ (at least, in the design - this is missing so far) and, because those options are passed as a list (not a string), they’re easy to filter without having to escape / unescape.

                            If anyone finds build system generators interesting and has spare time, please contriute to Fabrique! The design is great, the implementation is incomplete and I don’t think Jon has had time to work on it for over a year.

                            1. 1

                              Yes, you can try it.

                              1. 1

                                Xmake doesn’t generate VS projects which I think is why CMake is still so popular. vcpkg supports CMake out of the box. I was wrong see below.

                                1. 1

                                  xmake also support to generate vs projects, cmakelists, build.ninja, makefile, compile_commands and etc. You can see https://xmake.io/#/plugin/builtin_plugins?id=generate-visualstudio-project

                                  xmake project -k vs 
                                  xmake project -k vsxmake (generate vsproject and wrap xmake, recommanded)
                                  

                                  And xmake also support vcpkg, conan, clib, homebrew packages. You can see https://xmake.io/#/package/remote_package?id=add-a-vcpkg-dependency-package

                                  1. 1

                                    Awesome, it’s been a while since I looked again and I should have checked it :)

                                    1. 1

                                      It’d be lovely if it generated Xcode projects too.

                                1. 2

                                  CUDA is used extensively (eg. research papers about computer graphics), what makes you doubt it so much?

                                  My general opinion on this is that a GPU has perfomace cliffs which are easier to control if you have a lower level language (if we can call CUDA low level). For example when having bank conflicts due to the size of a wave or the access pattern.

                                  As always, if you want performance, you have to put in the work to understand the internals and doing so with a language not so high level is easier.

                                  1. 3

                                    Everything you say about GPUs is also true of CPUs, and compilers have gotten quite good at making code work fast on CPUs without exposing every single tiny implementation detail. And yes, you need to understand the underlying hardware, but the compiler seems a lot more helpful for CPUs than for GPUs.

                                    And I think the issue is that C/C++ isn’t really designed for GPUs.

                                  1. 4

                                    I really wish that people would stop recommending PEGs; in my experience, the cases where they do what you expect is exactly the set of cases when the underlying grammar is LL(1); if you have anything more complex, then the ordered choice construct will silently hide what the grammar author would want to be reported as an ambiguity and you’ll therefore end up parsing the wrong thing. Fixing this problem generally requires all sorts of hacks such as completeness or negative lookahead combinators (the latter of which are especially insidious as they need to be deep in the parser to avoid accepting too much).

                                    This is not to say that the idea of parser combinators is bad; in fact, they have a wonderful API that has done far more to get people to use real parsers for small tasks. The problem is that there is a simple, intuitive implementation of parser combinators (i.e., PEGs) that will tend to behave in spectacularly unintuitive ways. It is possible (and in fact, relatively easy) to provide a parser combinator API for a LL(1), LALR, ALL*, or really any other parsing algorithm; see, for example hammer for how it might be done.

                                    (Full disclosure: I wrote a significant portion of Hammer)

                                    1. 1

                                      Isn’t the parser combinator framework that this article talks about something distinct from a PEG? Am I misunderstanding what PEG refers to?

                                      1. 1

                                        The class of grammar that this framework can parse is exactly PEG; this is easy to tell from the fact that the orElse combinator implements ordered choice. If the first match succeeds, the choice will never be re-examined even if it causes the grammar as a whole to fail.

                                        So, for example (with apologies for the formatting, as I don’t speak F#),

                                        sequence
                                          (orElse
                                            (many (pchar 'a'))
                                            (many (pchar 'b')))
                                          (pchar 'c')
                                        

                                        will fail on “bc”, because the first branch of the orElse succeeds having parsed nothing and then the parser for ‘c’ fails.

                                        Somebody who doesn’t know much about parsing would tend to imagine that that would be equivalent to the following:

                                        orElse
                                          (sequence (many (pchar 'a')) (pchar 'c'))
                                          (sequence (many (pchar 'b')) (pchar 'c'))
                                        

                                        (i.e., distributing the sequence into the orElse)

                                        However, this latter parser will accept “bc”

                                      2. 1

                                        Any reason your changes aren’t upstreamed?

                                        1. 2

                                          UpstandingHackers is actually the primary repo; the reason it’s marked as a fork on Github is that my ex-wife didn’t want to deal with making it look right :-/

                                      1. 2

                                        You don’t mention existing research you might have done and maybe dismissed some options already. For example, why not Raspberry Pi?

                                        1. 2

                                          Depending on the task at hand, the Raspberry Pi can do quite a bit. There are some examples on the PyImageSearch blog, such as https://www.pyimagesearch.com/2017/12/18/keras-deep-learning-raspberry-pi/.

                                          I think some of his examples do training on a more powerful computer, but apply the resulting models on the SBC.

                                          1. 1

                                            The only thing I know of in this space is an Arduino. I had a lot of fun programming an Arduino, but it would likely not have enough resources for this project. Would a Raspberry Pi be better than a NVIDIA Jetson Nano? Thank you.

                                            1. 2

                                              The Rapsberry Pi can do what you describe but your description is a bit succint. I would say the advantage is that you can develop your software in any Linux environment (even WSL) with fake sensor values, etc. and then use real hardware. There are people using Raspberry Pi as home automation central computer, including with speech synth and recognition.

                                          1. 10

                                            Some context as people might have missed the recent report from esr: https://gitlab.com/esr/reposurgeon/blob/master/GoNotes.adoc

                                            1. 5

                                              As Stroustrup put it, everyone wants a simple language plus a couple more features.

                                            1. 3

                                              I initially thought it’ll let you download a ZIP with MP3/FLAC/OGG/OPUS/ as a backup, Would be nice for someone who want to move out from Spotify, as you can’t actually play the JSON file or even import it somewhere else.

                                              (disclaimer: I don’t really care about these “piracy issues” which people likely want to bring on there)

                                              1. 6

                                                I will point out that it’s near trivial to bypass the Spotify DRM with Panda. There’s a post i’ll try to dig up.

                                                https://moyix.blogspot.com/2014/07/breaking-spotify-drm-with-panda.html

                                                1. 4

                                                  Yeah, now that I think of it I should have called it export rather than backup, or something like that…

                                                  1. 2

                                                    You used to be able to do that with C SDK[1].

                                                    [1] https://github.com/mopidy/libspotify-archive (archive because the files aren’t hosted by Spotify anymore)

                                                    1. 2

                                                      I used to use something like that for a Spotify competitor in the very early days of streaming music. It was fantastic.

                                                    1. 1

                                                      Recently found WDL[1] made by Justin Frankel (of Winamp fame). It’s used by Reaper, a popular music editing tool.

                                                      [1] https://www.cockos.com/wdl/

                                                      1. 6

                                                        If you’re looking for something a little different and a lot of fun, might I recommend GNUstep?

                                                        It might also be interesting to play with one of the less mainstream paradigms, like immediate mode GUIs.

                                                        1. 3

                                                          imgui is not suitable for people who require accessibility features.

                                                          1. 4

                                                            True. A11y and, to a lesser extent, i10n are often completely ignored in the smaller or lesser-known toolkits. Electron and things built on it seem to be an a11y nightmare from what I can tell.

                                                            My comment was more a “here’s some fun things you can mess around with that you may not have considered.”

                                                          2. 2

                                                            I did think about imgui a bit. I think that for my purposes it will require me to keep a lot of extra state, though. Also, re-render every frame is a bit expensive. I will take a look at gnustep.

                                                            1. 2

                                                              The “re-render every step” semantics aren’t meant to imply that that’s the implementation. That’s just the mental model for working with it, and libraries like Conrod work to only re-render the things that have changed.

                                                              1. 1

                                                                I mean like, you have to rebuild the tree every frame.

                                                                Remember that imgui was created by a game developer; games tend not to have super complex UIs, and have to re-render every frame anyway.

                                                                1. 2

                                                                  imgui was created really for game development tools, not even real game UIs. It’s meant to be quick and easy debug UIs, asset editors, etc. The kinds of things you get loads and loads of in game development. I think almost all commercial games just do their UIs from scratch.

                                                                  1. 2

                                                                    AAA game dev here. We used Coherent UI for our most recent project which is WebKit based. It’s just easier to find people who write HTML/CSS. Previous project was ScaleForm but no one would recommend that anymore as it’s Flash based.

                                                            2. 1

                                                              might I recommend GNUstep

                                                              Is objective-c still a thing? IIRC GCC’s support for it has diminished, which is rather ironic for a project that includes ‘GNU’ in the name.

                                                              1. 1

                                                                Afaik, clang still has good support.

                                                            1. 10

                                                              The maker of the Iowa Caucus app was given $60,000 and 2 months. They had four engineers. $60k doesn’t cover salary and benefits for four engineers for two months, especially on top of any business expenses. Money cannot be traded for time. There is little or no outside help.

                                                              This is the important bit. “Cheap, fast, good: pick two.” If the caucus wanted a better app, they’d have needed to invest a lot more time and money.

                                                              1. 4

                                                                I don’t think so: Even if you assume 10% bench time, that’s still a mean $81k salary which is above market rates (avg. software engineer salary in Des Moines is $75k). That still leaves revenue for a $80k salesperson with a $80k OTE and the company makes money.

                                                                It is more than possible two months time isn’t enough to build a $360k mobile app for some people, but I certainly could’ve done it, and I probably would have for $360k.

                                                                My guess: Either the persons who made the RFP didn’t anticipate their real requirements (uptime/availability, accuracy, etc), or The Maker really doesn’t know how to make software. Without looking at the RFP I wouldn’t venture to say, and my own experience doing government projects could have me believe either equally.

                                                                1. 1

                                                                  Did you read that number right? It’s 60k not 600k.

                                                                  1. 4

                                                                    $60k for 2 months work is $30k/pcm. If I do 6 projects of that size a year that’s $360k/pa revenue. If I discount that by 10% (for running my business; my salesperson, overage, etc), that’s still $324k/pa I could budget for four people, or an average salary of $81k.

                                                                    I could certainly do this project in two months, and then do six more just like it in a year. That means if I went and did the RFP myself I could make $360k/pa doing projects like this.

                                                                    I’ve also done events though, so I know that even if the RFP says there’s going to be wifi available, it’s going to be shit. Someone who hasn’t might trust the RFP and the project will fail: Whose fault is that? It seems a bit unfair to blame the developer who writes to a spec where the spec is just ambitious/wrong, but it also seems a bit unfair to blame the RFP writer since they might have never done event software before either. I suppose I could blame the DNC for hiring idiots in the first place, but that’s a bit higher up the food chain than what we’re talking about: We have no idea what they’re paying their PM…

                                                                  2. 1

                                                                    None of the engineers at Shadow was based in Des Moines. They seem to have been based in Seattle, Denver, and NYC. $81k is not above market rates in those cities.

                                                                    1. 1

                                                                      Do you have a link for that?

                                                                      I searched their jobs page and saw offers for “remote” which is usually a sign they pay midwest rates.

                                                                      I haven’t seen any news articles saying where the developers actually were.

                                                                      1. 1

                                                                        I was going by the developers associated with them on Linkedin.

                                                                1. 8

                                                                  I think Minetest is a really cool project. I love the openness, both in terms of being open source and its friendliness to mods and custom servers.

                                                                  I also wish Minetest focused more on game feel. There are extremely few particle, no view bobbing, almost no visual effect when breaking a block other than it disappearing, no vignette effect, almost nothing that’s not technically “necessary”. It feels a lot like a game designed by programmers, with little to no involvement from game designers, and I think a little focus on those areas could make it feel way better to play.

                                                                  1. 1

                                                                    I find that perspective very interesting. When I enjoyed Minecraft it was primarily before the hunger system was introduced, back when it felt more like a toy than a game. It was more like digital Lego.

                                                                    1. 5

                                                                      He’s not talking about game play, it’s game feel. The pop sound when a block is mined has been in Minecraft since the very beginning (or at least when I started around alpha 0.7). This video explains it well: https://www.youtube.com/watch?v=Fy0aCDmgnxg

                                                                      1. 2

                                                                        It’s still very much ‘digital lego’ / construction toy in the quite-popular ‘creative mode’. The ‘survival’ mode is where you get hunger, hostile monsters, etc.

                                                                        1. 1

                                                                          Survival was creative but you still had restrictions and as they say, restrictions breed creativity.

                                                                      2. 1

                                                                        well, many of those features can be added via modifications. I usually play on servers, thought (specifically, Pandorabox).

                                                                      1. 2

                                                                        Wow! Unfortunately it looks like the kicad files, STLs, etc are unavailable (this 404’s for me): http://justine-haupt.com/designfiles

                                                                        1. 2

                                                                          This is awesome, last weekend I went to a party where two DJ’s played on two Gameboy and it was amazing! One used LSDJ and the other used nanoloop. https://nanoloop.com/one/index.html

                                                                          1. 1

                                                                            Check out Morusque on Spotify, his World albums are all Gameboy music.

                                                                            1. 5

                                                                              OP is the link to the SNES part. He’s releasing details of each platform separately at different dates.

                                                                              1. 1

                                                                                Ah, thanks for clarifying.

                                                                            1. 1

                                                                              I wanted to check D with the -betterC option and it compares quite well with the other entries in the table!

                                                                              (dmd-2.090.0)$ dmd -betterC -O hellobc.d
                                                                              (dmd-2.090.0)$ ls -al
                                                                              total 16
                                                                              drwxrwxrwx 1 speps speps  512 Jan  6 21:09 .
                                                                              drwxrwxrwx 1 speps speps  512 Jan  6 19:41 ..
                                                                              -rwxrwxrwx 1 speps speps 8328 Jan  6 21:09 hellobc
                                                                              -rwxrwxrwx 1 speps speps   97 Jan  6 21:04 hellobc.d
                                                                              -rwxrwxrwx 1 speps speps 1816 Jan  6 21:09 hellobc.o
                                                                              (dmd-2.090.0)$ strip hellobc
                                                                              (dmd-2.090.0)$ ls -al
                                                                              total 12
                                                                              drwxrwxrwx 1 speps speps  512 Jan  6 21:09 .
                                                                              drwxrwxrwx 1 speps speps  512 Jan  6 19:41 ..
                                                                              -rwxrwxrwx 1 speps speps 6128 Jan  6 21:09 hellobc
                                                                              -rwxrwxrwx 1 speps speps   97 Jan  6 21:04 hellobc.d
                                                                              -rwxrwxrwx 1 speps speps 1816 Jan  6 21:09 hellobc.o
                                                                              (dmd-2.090.0)$ strace -c -- ./hellobc
                                                                              Hello betterC
                                                                              % time     seconds  usecs/call     calls    errors syscall
                                                                              ------ ----------- ----------- --------- --------- ----------------
                                                                                0.00    0.000000           0         1           read
                                                                                0.00    0.000000           0         1           write
                                                                                0.00    0.000000           0         2           close
                                                                                0.00    0.000000           0         8         7 stat
                                                                                0.00    0.000000           0         3           fstat
                                                                                0.00    0.000000           0         5           mmap
                                                                                0.00    0.000000           0         4           mprotect
                                                                                0.00    0.000000           0         1           munmap
                                                                                0.00    0.000000           0         3           brk
                                                                                0.00    0.000000           0         1           ioctl
                                                                                0.00    0.000000           0         3         3 access
                                                                                0.00    0.000000           0         1           execve
                                                                                0.00    0.000000           0         1           arch_prctl
                                                                                0.00    0.000000           0        10         8 openat
                                                                              ------ ----------- ----------- --------- --------- ----------------
                                                                              100.00    0.000000                    44        18 total
                                                                              

                                                                              Used the example from [1]:

                                                                              extern(C) void main()
                                                                              {
                                                                                  import core.stdc.stdio : printf;
                                                                                  printf("Hello betterC\n");
                                                                              }
                                                                              

                                                                              [1] https://dlang.org/spec/betterc.html