Fork me on GitHub
#off-topic
<
2019-01-25
>
slipset08:01:04

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

slipset08:01:58

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?

borkdude08:01:36

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

borkdude08:01:37

$ sleep 5
echo $?
0

$ gtimeout 1s sleep 20
$ echo $?
124

slipset09:01:06

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

slipset09:01:47

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.

slipset09:01:42

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.

borkdude09:01:57

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

dominicm09:01:56

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

slipset10:01:20

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.

slipset10:01:39

I’ll explain my usecase:

slipset10:01:05

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.

slipset10:01:35

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

slipset10:01:11

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

slipset10:01:26

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

slipset10:01:07

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.

slipset10:01:52

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.

borkdude10:01:54

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
borkdude10:01:14

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

vemv17:01:09

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

eggsyntax17:01:29

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.

vemv17:01:18

probably https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a had some big influence also not rare to hear that someone's project became a PITA because of RN

eggsyntax17:01:54

Thanks, appreciate it.

eggsyntax19:01:11

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

lilactown17:01:29

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

lilactown17:01:07

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

lilactown17:01:24

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

👍 10
3Jane18:01:48

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

3Jane18:01:04

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

lilactown18:01:27

yes definitely

lilactown18:01:57

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

lilactown18:01:24

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

john19:01:32

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?

john19:01:36

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

hmaurer19:01:24

A O(n) sorting algorithm troll

Lennart Buit19:01:29

Parallel universe sort is O(1) 🙃

john20:01:25

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.

tagore21:01:53

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: https://patents.google.com/patent/US20090179899A1/en

tagore21:01:35

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....

tagore21:01:56

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.

john21:01:59

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.

john21:01:08

Is what I gathered...