Fork me on GitHub

Quick searches on the internets give me nothing, so I’ll try here:


We’re running our builds in circleci, and I was looking into how to fail a job in circle if it runs for too long. Anyone have any priors on this? Maybe @marc-omorain?


@slipset CircleCI has a timeout property for this, but I’m not sure about the return code. For speculative I use timeout


$ sleep 5
echo $?

$ gtimeout 1s sleep 20
$ echo $?


@borkdude yes, the timeout property was the one I was looking for, thanks.


Interestingly, I want to fail a build if it runs for too long time, so I want to decrease the timeout. Most people seem to want to increase it.


The reason for this is that we have a bunch of integration tests, which, if they run for a substantial amount of time, might be an indication of a performance degradation in our code.


I also want to be able to use the timeout locally, that’s why I don’t use the CircleCI property


This is a bit weird, but it feels like the Web is doomed to use polling, which creates unnecessary burden on servers. This seems particularly frustrating to efforts like rdf, where you want to query data from across the Web, but then I have to make (potentially) lots of Web requests and experience a slow site on my part. Is there any list of what the rdf community are doing in this space? I'm particularly interested in the context of using it for building loosely coupled websites in which you would expect to see relationships appear in under 10s most of the time.

Marc O'Morain10:01:49

@slipset is there output while the process is running?

Marc O'Morain10:01:01

We have a ‘no output timeout’ on steps


Yes there is output.

Marc O'Morain10:01:24

So you can specify a step should be killed if there is no output for some length of time.


I’ll explain my usecase:


What I’d really want to do is to have a performance test running as part of my ci. That’s a bit far away.


What I do have is a bunch of integration-tests. Squinting slightly, they could be seen as a performance test.

Marc O'Morain10:01:47

The no_output_timeout arg to run


Yesterday I made a commit that made our integration-test run almost three minutes (double the time) slower than usual.


I’d really like for a build like that to be cancelled.

Marc O'Morain10:01:36

So you want to fail hard at some point

Marc O'Morain10:01:41

To prevent regressions


Say that I know that our integrationstests normally finish in about 3 mins. I want to fail hard if they run for more than 4 mins.


of course, in an ideal world, circle would keep a tally of the runtimes for this step, and I could fail if the run was n % slower than avg or some sort.


I’d say you use the GNU timeout util I already mentioned. If you see output or not is irrelevant to this problem. And you’ll also be able to use this locally.

☝️ 5

You can set the timeout based on previous statistics that you keep in a database


out of curiosity, how's the React Native adventure going for the folks (clojurescript)? anyone know? Looks like RN lost cred in the javascript world, would be interesting to compare stories


Oh, did it? Any pointers to that? I'd be curious to read up on it, I've been continuing to think of RN as an upside to doing React (via re-frame). Not that I've ever used it, but it's nice to know that I could turn a site into a mobile app if I needed to.


probably had some big influence also not rare to hear that someone's project became a PITA because of RN


Thanks, appreciate it.


They say an awful lot of nice things about RN for something that started a move away from it 😆

Alex Miller (Clojure team)17:01:47

RN fell off a bit in the Clojure survey this year after growing the last few

✔️ 10
Alex Miller (Clojure team)17:01:40

dropped from 19.5% targeting it to 16.5%

Alex Miller (Clojure team)17:01:12

not sure if that’s a leading or trailing sign


some of it might have to do with the fact that they’re doing a huge re-architecture that’s going to land sometime soon


I used RN heavily (not in CLJS) 2 years ago, the project is still going, but I’m not excited to jump on it again until the update lands


that being said, if I had to do mobile dev again, I’d use RN

👍 10

is it easier if you start with RN in the first place?


(rather than ending up supporting multiple versions of the same code like airbnb did)


yes definitely


we tried to do a frankestein-ish hodgepodge of iOS + Android + RN and it was awful


mainly because we weren’t sold on RN in the first place. the team is now working on migrating to 100% RN


So, in software patents, you can't patent software formula, but you can patent particular software applications of formula. For a functional programming languages, where the immutable, pure parts of the code are, in a way, more like formula (as eric normand calls "calculations"), decoupled from their side effecting applications, how would one define the patentability of a library of pure functions?


Not patentable?

Daniel Hines19:01:19

Can you patent math? Pure functions are mathematical constructs, no?

Daniel Hines19:01:31

But their expression in an executable language could be patentable, since they aren’t the math itself but a particular method/preparation for symbolizing the math.

Daniel Hines19:01:34

The math a calculator does shouldn’t be patentable IMO, but a design for a mechanical calculator should be, and I think machine-operable code is more like the mechanical calculator, no?

Lennart Buit19:01:43

Not arguing for software patents but playing devils advocate: where does that end, if you have a brilliant data structure, let’s say a very clever ‘map’, how would that be different from a very brilliant electronic circuit


A O(n) sorting algorithm troll

Lennart Buit19:01:29

Parallel universe sort is O(1) 🙃


What constitutes a "language" then? How different does one language have to be from another in order to claim that formula in one language is not patented by the implementation in the other language.


I'm def not an attorney, let alone a patent attorney, but I did once write a provisional patent for a fairly complex algorithm. It was a while ago, but as I recall it was much more a description of the algorithm in geometric terms, with a lot of diagrams, than source code. In a final patent the claims section would have been even more general. It never moved beyond the provisional, so is not available publicly, but here's an example of a software patent in a similar area:


As far as I can tell the law on software patents is not entirely clear at this point though, and it's hard to tell what would stand up in court....


What I do recall is that it was necessary to constantly reference the "system" as a whole, down to mice and keyboards, because it's the system that is patentable, even if what you're really doing is patenting an algorithm.


Yeah, essentially you have to tie the algorithm to side effects - something that manipulates the outside world. And it's the connection to the side effects that makes the algorithm patentable.


Is what I gathered...