HNHacker News
TopNewBestAskShowJobs

arximboldi

1,199 karma · joined December 1, 2014

https://sinusoid.es https://sinusoid.al
submissionscomments
arximboldi··on Clang 5 in a Docker container for C++17
Too bad they are on Windows. Otherwise they could just use Nix: https://nixos.org/nix or Guix: https://www.gnu.org/software/guix/
arximboldi··on Git is a purely functional data structure (2013)
Hey that's awesome! Let me know if you ever would like me to take a look at your code or anything. I'd be happy to link it from the Immer site too when you are ready to promote it :-)
arximboldi··on Ask HN: What to do if you hate working for someone else and arent an entrepreneur?
Hi Eric!

W.r.t. the co-op, at the moment my ideas (or fantasies) are more about organizational stuff than the content (what we would work on). I am just gathering ideas, learning and keeping my eyes open waiting for all this to crystalize...

My motivation is to be able to work with other people in a democratic and (internally) non-capitalistic way. You are still playing in the market so there are lots of contradictions that you would have to assume, but I think there is a lot of progress one can make nontheless. For me Igalia, as I mentioned, is a source of inspiration because they have been going for quite a while and they are about ~50 people now and have a good business. They are also very democratic and flat (e.g. everyone has equal pay, something shocking but with very good rationale). They also do excellent technical work---for example, they have been the ones implementing a lot of ES6 features inside V8 and SpiderMonkey. If you want to read about them, Andy Wingo (the person I know from there) has 3-post series on the topic here: http://wingolog.org/archives/2013/06/05/no-master

On a more political side, recently I read the Telekommunisten manifesto which also touches on cooperative models as a way to do social change for real: http://telekommunisten.net/the-telekommunist-manifesto/

In my student times I was very much into activism, but since I started working I stopped "having time" for it. I was also burned out from the energy and emotional sink that activism can be. I've realized with time that the workplace though has not managed to make me more conservative, if anything, it has made me more concerned about the issues of exploitation and alienation---even in "well-off" industries where workers often feel privileged just because of the (relatively) high salaries. My current thinking is that separating work and politics is one of the things that leads to activism and work burn-out and that, if anything, I should use the privilege of being an engineer to try build a democratic workspace for myself and hopefully others too. In the best scenario it could be an example and do some little good for the world, in the worst case I would have tried and learnt something about how the world works.

W.r.t. finding clients at conferences, I am really no expert, I have actually been freelancing less time than you :-) I don't consider myself an extrovert. What has worked for me so far is doing talks about open-source projects. Last summer, for example, I worked with a client that just watched the video of one of my talks and contacted me. Last week I talked with a new potential client that just some comment on Hackernews where I talked about some of that work. Doing open-source work and talking about it is very time-consuming, so it is not a silver-bullet for sure, but something worth trying if that scratches some itch of yours.

I still feel that I have lots to learn and am making lots of mistakes, but I guess this takes time... :-)

arximboldi··on Ask HN: What to do if you hate working for someone else and arent an entrepreneur?
Hey! To you and Amiuba. I did get started into freelancing slowly. I had money saved when I quit my job and I took things slowly. I don't use freelancing websites. For marketing I use conferences, user-conferences and open-source. I am still in a good relationship with my last employer and I do freelance work for them too.

Wrt the coop, one of my motivations is this Spanish open-source coop which has been running for quite a while and does excellent work: https://www.igalia.com/

When doing research on the topic I found this document you may find interesting too "Technology freelancer's guide to starting worker cooperative": https://www.techworker.coop/resources/technology-freelancers...

arximboldi··on Ask HN: What to do if you hate working for someone else and arent an entrepreneur?
I felt similarly often, even though I was working for a great company with great products and with a very humane way of working. At some point I just could not stand the worker-owner fundamental power imbalance. There is a lot of pretending in our industry that this conflict does not exist, which often ends up in quite schizophrenic logic. I had to go. And Since I don't want to inflict such pain in other people, become the typical entrepreneur (i.e. a capitalist) was not an option either.

My solution for now is to freelance and consulting. It comes with a hole different set of contradictions, but it is a good learning experience and great way to experiment and explore what you want to do. It also buys me time to do open-source and research, but it requires more self-motivation.

My long-term dream is to start a worker-owned coop with other people in the future.

arximboldi··on Git is a purely functional data structure (2013)
Thanks a lot Malkia, that is super encouraging!

Editing code for game levels seems to me like a quite good use-case for this. "Editing" software with rich hierarchical documents is the itch I originally wanted to scratch with this work, even though there are many other use-cases too. Feel free to send me an email if you move further with that idea or if you want to discuss any of these topics with me :-)

arximboldi··on Git is a purely functional data structure (2013)
I am working on something like that for C++, a library + debugger called Lager. Quite experimental yet, but been using it to write apps with SDL and Ncurses and I am happy with how it is going... In the end it is a very simple architecture, implementable in any language. Good immutable data-structures are important for big programs though.

Library: https://github.com/arximboldi/lager

Ncurses example (full text-editor): https://github.com/arximboldi/ewig

SDL example: https://twitter.com/sinusoidalen/status/939539173584916480

Immutable data: https://github.com/arximboldi/immer

(There was a talk about Lager at MeetingCpp this year, still waiting for it to be published online...)

arximboldi··on Carp, a compiled Lisp with type inference and a borrow checker
You are right that a lot of Lisps consider themselves more procedural than functional and I was extrapolating Clojure there. (In my defense, the Scheme community is also very functional and immutable oriented)
arximboldi··on Carp, a compiled Lisp with type inference and a borrow checker
I really want to like Carp but I somehow feel that the Rusty memory model does not fit the Lisp philosophy... all the borrowing story comes from a basis mutability.

I wish for something more Clojurish based on immutable data. Then one can exploit the power of inferred type linearity/affinity to transparently build safe "transients" and other cool stuff. Maybe some day I should write such Lisp myself on top of my C++ immutable data structures [1] :-)

[1] https://github.com/arximboldi/immer

arximboldi··on How Evil Is Tech?
I agree! And the list could be so much longer...

It seems also that precisely the privacy-destroying centralizing ad-selling machine companies, are the ones that occupy all our mind-space and have the money and technically interesting challenges. (Oh, and there is also fintech!)

I now am doing ok freelancing (mostly for my previous employer and some other small music software companies from Berlin) and doing some open-source on the side. But it is often hard to motivate myself to get out there and network or find stuff to earn money. Sometimes I consider going back to academia, but my feeling is that over the last years the attempts at quantifying academic output have risen competition to completely unhealthy levels (as my academic friend says: if he has to think in 6-month/project/paper timelines, where is the "long-term" in publicly funded research?).

At least it is easy to find a job that pays decent, which is a very good position to be in compared most of my friends of my generation. And I love software engineering itself. Yet I often wish I could just go on UBI and do open-source stuff all day.

arximboldi··on How Redux Works: A Counter-Example
We were precisely talking about composition and now you say there is only one? I guess you are talking about small apps where you have small dedicated views?

That is a very narrow definition of MVC. I am talking of large interactive software with multiple views on large hierarchical data trees data with different levels of focus and granularity. The kind of software I am thinking of big programs like Photoshop, Premiere, an IDE, Ableton Live...

Disclaimer: I worked for Ableton for quite a 5 few years, and have spent most of my career building interactive software (I work as independent consultant now). Most of the software of that time and age is built around MVC. It kinda works, but as a lot of people in the industry building software of that size will tell you: scale brings the the pain. Because of composoability. In the C++ world, see also talks from Sean Parent--who worked on Photoshop--and is also a strong proponent of "value-based" approaches (he is a great source of inspiration for me). Sean claims that something like 70% of bugs in Photoshop are in UI-related code typical MVC wiring up stuff.

In the end, just pick the right tool for the job. If you are writing small apps and MVC does not explode at that size and fits nicely with the underlying frameworks, go ahead and use it (I strongly suspect you are an iOS dev and understand how conformity with the native framworks is very important there).

But if you are building something large, highly interactive, with lots of views and concurrency, try to move to a more declarative/unidirectional flow/functional approach. It is still an open field and there are many alternative approaches, but it builds down to composability, denotational reasoning and decoupling of effects/logic.

arximboldi··on How Redux Works: A Counter-Example
Then your controller needs to know about 1) all existing views and 2) all effects of model update logic. Again, you end up with low decoupling with points that you can only change with global knowledge (and lots of potential effect interleaving). If you already have a "plain data" model, the next logical step is to just get rid of stateful controller and use a simple data-flow Redux-like flow for updating the UI.

I give in that the tricky part is finding UI frameworks that play nicely. You need something React-like to efficiently re-evaluate the Model -> UI functions, or use an immediate-mode API. Alternatively one can manually write some function to update a stateful UI by comparing the previous and current model and often it's enough. It is a bit like your controller but it is agnostic to the specific actions that happened but just look at the model changes (i.e. no global knowledge needed). I recently discussed this here:

https://github.com/arximboldi/lager/issues/1#issuecomment-34...

arximboldi··on How Redux Works: A Counter-Example
Nice thing about this architecture is that it really is agnostic to your stack and as long as you have some way to build "values" you are good to go.

I have recently been working on a Redux for C++ experimental library with time-travel and all. As an example I built a mini-emacs text-editor with it. Should post about it here whenever I flesh out the README and all (or the MeetingCpp talk about it gets published). In the meantime you might want to check these links:

The library: https://github.com/arximboldi/lager

The Counter-Example: https://github.com/arximboldi/lager/tree/master/example/coun...

The text editor: https://travis-ci.org/arximboldi/ewig

Show-case of a time-travelling debugger: https://twitter.com/sinusoidalen/status/926382341433577472

arximboldi··on How Redux Works: A Counter-Example
I disagree.

It doesn't because encapsulated mutation does not compose. Typical example: your data model fires signals notifying change as soon as you change them, then thew view updates. All good, until you have to build transactional updates and then you get flicker, broken invariants due to partial values being propragated, etc, etc. You need to understand how everything is wired up together to really know what is going on because effects are interleaved with logic, even when each component individually feels decoupled and nice.

What Redux/value-based data model does is to really separate those concerns. Your update logic is a function that just can mess all it wants with the new values it produces. It is composable because you can just build logic by calling smaller logical unit and you know everything you need to know by looking at the inputs and outputs.

It is way simpler (and less!) code in all but the most trivial of the examples.

arximboldi··on Don’t use C++ auto? Restricting auto is not the best decision
You can change the `std::result_of_t<...>` for `typename std::result_of<...>::type` to make it work in C++11 :)
arximboldi··on Ask HN: How much time do you spend on “marketing” your open source projects?
Thanks! The talk is called "The most valuable values". A lot of it will be about "thinking in value semantics" and then I'll show the architecture of interactive software as an example. There will be video, I think :-)
arximboldi··on Don’t use C++ auto? Restricting auto is not the best decision
The problem there is in your Task::run() function. It now looks like this in the commit I just saw:

        template< typename T,typename ... Args >
	future<T>& run( std::function< T( Args ... ) > function,Args ... args )
	{
		return Task::run<T>( std::bind( std::move( function ),std::move( args ) ... ) ) ;
        }
It should look like this for that example to work without the type erasure (haven't tried, there might be typos):

        template< typename Fn,typename ... Args >
	future<std::result_of_t(Fn(Args...))>& run( Fn&&, Args&& ... args )
	{
		return Task::run<std::result_of_t(Fn(Args...))>( std::bind( std::forward<Fn>( function ),std::forward<Args>( args ) ... ) ) ;
        }
This version is also more efficient, since otherwise you are type erasing twice.
arximboldi··on Don’t use C++ auto? Restricting auto is not the best decision
Actually performance problems are way more probable when not using auto. Example:

   std::function<void()> = [] { ... };
Vs:

   auto = [] { ... }
In the first case you are doing type erasure, which adds quite few penalties. Even in other cases, the type you typed might be convertible from the actual thing that is returned, causing extra conversions. If you always use "auto" the chances you use the right type and do less conversions is way higher.
arximboldi··on Ask HN: How much time do you spend on “marketing” your open source projects?
I am very happy to hear that Zyn-Fusion will be completely open sourced. Once again, thanks for this tremendous work. I understand that financing open-source work, specially for end-user programs, is very dificult. Best wishes!
arximboldi··on Ask HN: How much time do you spend on “marketing” your open source projects?
That's a really cool one, thanks for maintaining it! The audio Linux space is kind of niche, but awesome people like you keep it alive :D

EDIT: I find it a bit misleading now that the website shows a screenshot of Zyn-Fusion (which is not open source) instead of ZynAddSubfx. It could be clearer what is what.

arximboldi··on Ask HN: How much time do you spend on “marketing” your open source projects?
Now that I think about it! that is not my most popular open source project, my most popular one is this one: https://github.com/arximboldi/gnujump

That is an oldie, that I did in high-school, just scratching my own itch (I was addicted to a game called XJump, but wanted a better version). The major marketing thing I did was submitting it to the GNU project, which helped it get some exposure. It also got packaged into Debian, which also got it into Ubuntu, which helped it get visibility and ease of install. For a while a few times a year I would receive recordings of "high scores" that people would send me to upload to the official website, where I kept a ranking. The website is now down sadly (ooops!).

arximboldi··on Ask HN: How much time do you spend on “marketing” your open source projects?
My most popular open-source project [1] I talk about at conferences, mostly C++ ones (last example [2]). I was lucky to also land a paper about it at ICFP'17 [3]. On Friday I will talk at the MeetingCpp conference in Berlin about a new library I am building (kind of experimental Redux for C++ with time-travelling debugger!).

I work as a freelancer and at the moment I do client work 3 days a week and dedicate the rest of the time to the open-source work. The open-source work includes doing research and implementing these tools, but also preparing the talks, which is a very time consuming task for me. Doing conference talks is very emotionally exhausting, I dread the previous weeks to the talk---but the feeling afterwards is very good and it is a good way to get exposure, I hope.

My dream is to some day form a social company with a coop structure that works full-time on open-source, either directly or indirectly helping clients use these tools in their system. I hope I am set up in the right direction.

Recently I opened a Twitter account to talk mostly about my open-source stuff [1]. I admittedly hate Twitter as a social network, but I've been convinced that it is a good place for networking in our industry, so I just play the game.

I keep telling myself that I should open blog too, but then I realize that one can't simply do everything all the time, so I guess maybe I'll never do it.

To your last question: is it unfair to not do marketing to your work? Totally not. Just do whatever feels right to you. If one day you realize you have built something really useful, probably you'll get the urge to tell people about it.

[1] Immutable data-structures for C++: https://github.com/arximboldi/immer

Example usage: https://github.com/arximboldi/ewig

[2] https://www.youtube.com/watch?v=sPhpelUfu8Q

[3] https://public.sinusoid.es/misc/immer/immer-icfp17.pdf

[4] https://twitter.com/sinusoidalen

arximboldi··on An Open Letter to Intel
> If nothing else, this bit of news reaffirms my view that the Berkeley license provides the maximum amount of freedom to potential users.

Interesting conclusion, considering one of the "features" of the Intel ME is precisely to limit what the final user can do with their computer.

arximboldi··on A 12pt Font Should Be the Same Size Everywhere (2012)
I have mixed feelings about this. I get the point about touch: i.e. the button should have a fixed size in proportion to your finger. However in other scenarios I am not sure size should be constant. In most cases, you have to factor in the distance to the viewer. This is, probably "projection angle in the retina" is a more useful invariant.

For example, in a big TV that is far from you, you want things to be bigger than in a monitor, that is closer. And in a laptop, you probably want it even smaller.

"Design by pixel" takes this into account somewhat indirectly because most display are designed to have their pixel density in inverse proportion to the size of the display, which is also inversely correlated to the expected usage distance. Sometimes technology changes our expectations of definitions and things become small, until designs catch up with the new expected pixel density. We have worked around this problem with pixel density factors on retina/QHD.

I agree that all this in the is a evolutionary "hack". But I am not sure that the proposed solution, even though more rational sounding, actually makes things better.

arximboldi··on What are some of the most disliked programming languages?
Interestingly, but somewhat unsurprising, most disliked languages are "medieval" languages according to: https://www.youtube.com/watch?v=y2___qaG_9Q

;-)

arximboldi··on Does C++ need a universal package manager?
To your last question: yes! In a "Nix expression" defining how you build the package (i.e. a "derivation") you can specify where the source is fetched from via any mechanism (e.g. http, ftp, git, etc.)

The documentation is good but it can sometimes be a bit rough. There are some good blogposts on how to achieve specific things that you may find when searching around. Also the IRC community seems is quite active, responsive and friendly :-)

arximboldi··on Does C++ need a universal package manager?
I came here to say the same. Recently I have started using Nix as a universal package manager, every project I start starts with a `shell.nix` file with a pinned <nixpkgs> commit and some line to bring in gcc or make. I always build in a nix-shell --pure to make sure I didn't miss anything. The system is so great and works so beautifully it's even hard to explain.

Nix has very sensible defaults and defining a Nix expression to install a cmake or autotools package is a breath. But even projects with just Make or no build system at are easy to install, you just need to copy the output to the /nix/store in the installPhase (to $out). And I can easily define Python or any other language dependencies in the same consistent and concise syntax. I have no fear anymore I won't be able to install dependencies in the future. Any other dev just does `nix-shell` in the project root and they are sure they are ready to go. I even used to hate the Nix syntax (as opposed to Guix) but at some point it "clicked" and now it makes a lot of sense.

Only drawback is no Windows support. Maybe someone at Microsoft could help with that? It would be so sad to have the community converging to a suboptimal solution just cuz Windows... :/

arximboldi··on Librestd: a library to create C++ RESTful API services
There is this very nice talk on building a C++ rest framework using functional programming concepts. I like the analytical approach to design, and really hope it becomes an open source library soon.

https://www.youtube.com/watch?v=nR2raX2-a0Q

arximboldi··on Simplifying build in C++
I like Nix. Only problem is it doesn't seem to work on damn Windows. Nix has, in my setup, made the build system topic almost irrelevant, since it allows for simpler build scripts to play well with other dependencies. Plus, it works with stuff in any language and polyglot projects are a bliss. I really hope it catches traction.
arximboldi··on Text Editor: Data Structures
Thanks a lot for mentioning it! :-)

Ewig uses RRB-Trees (Relaxed Radix Balanced Trees) which like ropes, is confluent (supports fast concatenation) but has very stable bounds otherwise, similar to a vector-like type.

EDIT: The parent mentions a video, I gues it is the CppNow talk: https://www.youtube.com/watch?v=ZsryQp0UAC8 Last week I did another version of that talk at CppCon (with slightly deeper coverage of Ewig) but I don't think it is in Youtube yet.

← PreviousPage 5 of 10Next →