Times are UTC Toggle Colours
00:00:55 <Eddi|zuHause> i don't think i've ever played to 2051 00:02:25 *** Progman has quit IRC 00:04:39 *** Hobbyboy has quit IRC 00:27:06 <b_jonas> my previous game went to 2087 00:27:24 <b_jonas> there's still a lot to improve on this 00:27:55 <Eddi|zuHause> i played from 1930 to 2030 once when that was the end of the game 00:29:09 <b_jonas> I think I finally got my steel line to transport all the steel I produce, but I think I'll have to increase the capacity of the goods line too, and there's still several mines that I could connect to the steel mill but I haven't yet because already so little of the steel was transported 00:30:39 <b_jonas> so it still seems fun to develop this steel network further 01:12:21 *** Hobbyboy has joined #openttd 02:03:07 *** glx has quit IRC 02:24:56 *** D-HUND has joined #openttd 02:28:17 *** debdog has quit IRC 02:51:25 *** Flygon has joined #openttd 04:01:49 *** jhq has joined #openttd 04:03:20 *** D-HUND has quit IRC 04:03:20 *** Hobbyboy has quit IRC 04:03:20 *** b_jonas has quit IRC 04:03:20 *** Artea has quit IRC 04:03:20 *** BekJut[m] has quit IRC 04:03:20 *** karoline[m] has quit IRC 04:03:20 *** _dp_ has quit IRC 04:03:20 *** grossing has quit IRC 04:03:20 *** robert[m]1 has quit IRC 04:03:20 *** Heiki[m] has quit IRC 04:03:20 *** moll has quit IRC 04:03:20 *** crem has quit IRC 04:03:20 *** skrzyp has quit IRC 04:03:20 *** milek7 has quit IRC 04:03:20 *** karl[m] has quit IRC 04:03:20 *** Markk has quit IRC 04:03:20 *** ad5twoknebor[m] has quit IRC 04:03:20 *** ciet[m] has quit IRC 04:03:20 *** jback has quit IRC 04:05:01 *** crem has joined #openttd 04:06:06 *** debdog has joined #openttd 04:07:08 *** moll has joined #openttd 04:08:37 *** grossing has joined #openttd 04:08:43 *** Markk has joined #openttd 04:08:56 *** Hobbyboy has joined #openttd 04:09:34 *** BekJut[m] has joined #openttd 04:10:00 *** milek7 has joined #openttd 04:43:43 *** b_jonas has joined #openttd 04:43:43 *** Artea has joined #openttd 04:43:43 *** karoline[m] has joined #openttd 04:43:43 *** _dp_ has joined #openttd 04:43:43 *** skrzyp has joined #openttd 04:43:43 *** karl[m] has joined #openttd 04:43:43 *** robert[m]1 has joined #openttd 04:43:43 *** ad5twoknebor[m] has joined #openttd 04:43:43 *** Heiki[m] has joined #openttd 04:43:43 *** ciet[m] has joined #openttd 06:27:39 *** nielsm has joined #openttd 06:54:40 *** HerzogDeXtEr has joined #openttd 07:24:13 *** andythenorth has joined #openttd 07:37:22 <andythenorth> yo 07:43:45 * andythenorth logs 07:43:53 <andythenorth> my current game is 1890-2016 07:44:00 <andythenorth> unusually long 07:46:14 *** iSoSyS has joined #openttd 07:49:30 *** iSoSyS has quit IRC 07:50:49 *** iSoSyS has joined #openttd 08:13:58 *** b_jonas has quit IRC 08:18:00 <_dp_> crazy idea of the day: circuit racing in openttd 08:21:02 *** sla_ro|master has joined #openttd 08:22:49 <andythenorth> o_O 08:36:40 <_dp_> need some way to make shared waypoints though... 08:40:45 <andythenorth> I'm sure I've seen an 8 segment display done in logic 08:41:00 <andythenorth> could do lap counters :P 08:41:14 <andythenorth> https://www.youtube.com/watch?v=GTjQa70wwCc 08:41:18 <_dp_> I could do lap counters with just signs :P 08:41:34 <andythenorth> well yes, there is the easy solution :P 08:42:19 * andythenorth considers doing it by loading cargos on to ships 08:42:28 <andythenorth> then changing the sprites 08:42:52 <_dp_> for what I'm thinking that's the only solution because rail logic can't distinguish liveries :p 08:43:04 <andythenorth> for shame 08:43:26 <andythenorth> patch! 08:43:39 <TrueBrain> is andythenorth going to write a patch? :P 08:43:50 <andythenorth> maybe 08:43:59 <andythenorth> predicting the future is hard 08:44:05 <andythenorth> _probably_ not 08:44:13 <TrueBrain> some things are more likely than others :) 08:44:25 <TrueBrain> like, it is very likely it will be hot outside today 08:44:51 <TrueBrain> unless the sun exploded and we will only know in 6 minutes, that is a very likely outcome of the day 08:44:54 <_dp_> I can make track with a server company, color player trains with liveries and copy their orders from real player-owned train 08:44:59 <_dp_> only problem is shared waypoints 08:45:21 <andythenorth> _dp_ is it Train Whack 2.0? 08:45:29 <TrueBrain> hmm ... shared infrastructure ... 08:45:33 <TrueBrain> there is a patch for that, I am sure :P 08:45:50 <_dp_> nah, patch is a boring solution :p 08:45:59 <andythenorth> Train Whack: the Next Generation 08:46:07 <andythenorth> Train Whack Redemption 08:46:10 <TrueBrain> a racetrack doesn't need waypoints tbh 08:46:41 <andythenorth> one of the sillier things to do in Blitz (7 v 7 tank game) is tank racing 08:46:49 <andythenorth> hard to prevent cheating though 08:46:53 <TrueBrain> or, you know, play that game :P 08:47:09 <nielsm> hmm, an industry that accepts just one unit of cargo ever, but that unit of cargo pays out a million on delivery 08:47:09 <_dp_> well, I'm thinking to make a spaghetti of purr rails with waypoints 08:47:26 <_dp_> there isn't much point racing in openttd if that's just a circle :p 08:47:40 <TrueBrain> and ......... that is a problem? 08:48:36 *** andythenorth_ has joined #openttd 08:48:43 <andythenorth_> in tanks you can shoot each other's tracks 08:48:51 <andythenorth_> trains have tracks too.... 08:48:55 <andythenorth_> also oof wifi 08:50:16 <_dp_> well, I guess I could always do some silly racing where the speed of the train is a hash or all players actions or smth... 08:51:02 <TrueBrain> make 4 identical islands and make people compete (race) to get that one cargo moved to the right place! :P 08:51:13 <andythenorth_> GS 08:51:18 <andythenorth_> research faster trains 08:51:23 <andythenorth_> make choices 08:51:25 <andythenorth_> set gear ratios 08:51:29 <andythenorth_> choose engines 08:51:35 <TrueBrain> hire crew! 08:51:37 <andythenorth_> yair 08:51:41 <TrueBrain> we are good at this :) 08:51:56 <andythenorth_> choose to shoot the other team's best driver! 08:52:04 <andythenorth_> Syndicate 08:52:40 <TrueBrain> hire disasters you mean :) 08:52:48 <_dp_> hm... buoys can be ownerless it seems... 08:53:34 <TrueBrain> _dp_: modify the server that a waypoint is appearing as owned by the player receiving that packet :) 08:53:40 <_dp_> I thought of sending some engines the other way with ignore signals jammed xD 08:53:46 <TrueBrain> does mean all clients need to be connected before they are created :P 08:54:20 <_dp_> TrueBrain, yep, and I actually thought of that already :p 08:54:45 <TrueBrain> whoho, my mindread device works again \o/ 08:54:54 *** andythenorth has quit IRC 08:55:43 <_dp_> funnily enough I actually do some desync shenanigans on citymania already 08:55:48 <_dp_> it's just story book though 08:57:45 <_dp_> to add engine unlock progress on a common page with requirements 08:58:19 <_dp_> otherwise I'd have to make an owned copy 08:59:16 *** andythenorth_ has quit IRC 08:59:43 *** andythenorth has joined #openttd 09:04:23 <_dp_> I guess I could rebuild the whole track after company is created... 09:04:52 <_dp_> and don't even need to desync anything then 09:05:54 <_dp_> just significantly more work than I expected :( 09:08:12 *** andythenorth has quit IRC 09:08:43 *** andythenorth has joined #openttd 09:14:10 <TrueBrain> I love that between things you say, andythenorth reconnects 09:15:28 <TrueBrain> I really don't like Rust for "return values are the last statement IF there is no ; at the end" .. :( 09:16:34 <_dp_> yeah, it's a bit weird 09:16:36 <_dp_> but useful 09:16:42 <_dp_> also not a rust invention 09:17:07 <TrueBrain> it is not useful, it often takes time to track down in which branch you went wrong 09:17:13 <TrueBrain> and you have to look really closely to your code 09:17:17 <TrueBrain> it is not as obvious as it could be 09:17:25 <TrueBrain> which is a shame 09:17:36 <TrueBrain> I like languages where you can just read it like a book, instead of having to look for clues 09:18:48 *** Samu has joined #openttd 09:20:40 <Samu> h 09:20:42 <Samu> hi 09:20:58 <_dp_> it's a functional programming thing that blocks can return value 09:21:03 <_dp_> lets you assing ifs and stuff 09:21:14 <TrueBrain> they made it some weird hybrid now 09:21:18 <TrueBrain> as you can still use the return statement 09:21:36 <TrueBrain> in a functional language, this is done in a pure form, which is different 09:21:44 <TrueBrain> (where early-returns are impossible) 09:22:01 <TrueBrain> and, tbh, functional languages you cannot read as a book :P 09:22:17 <TrueBrain> it requires some weird brain quirks to be able to read that without thinking :D 09:22:25 <_dp_> well, yeah, but pure fp languages didn't quite take off :p 09:22:38 <TrueBrain> erlang being on top, but yeah, I agree 09:23:04 <TrueBrain> but now you constantly have to scan lines .. as in: you read something, you have to skip to the end of the statement, which can be lines away, to see if this is the return value 09:23:08 <TrueBrain> it is like reading Latin 09:23:20 <TrueBrain> (where a sentence can cross 6 pages, thank you Caesar) 09:24:20 <_dp_> TrueBrain, http://shakespearelang.sourceforge.net/report/shakespeare/#sec:hello 09:24:24 <_dp_> reads like a book! :p 09:24:31 <TrueBrain> yeah ... different kind of book :P 09:29:13 *** Progman has joined #openttd 09:29:28 *** tokai|noir has joined #openttd 09:29:28 *** ChanServ sets mode: +v tokai|noir 09:31:54 *** iSoSyS has quit IRC 09:32:34 <TrueBrain> it is funny that I know some people only of their disconnect/reconnect :P 09:33:47 <TrueBrain> " cpu.load8(cpu.reg_c, (0 << 16) + (0x9b + cpu.reg_d))" <- I always love AST Visitors, you can make it output other languages really easy 09:36:18 *** tokai has quit IRC 09:37:51 <TrueBrain> cpu.load16(cpu.reg_c, cpu.ptr24(cpu.resolve24(cpu.ptr24(cpu.resolve24(cpu.ptr16((0 << 16) + ((0x00 + cpu.reg_d) & 0xffff)))))) + cpu.reg_y) 09:37:54 <TrueBrain> aint it a beaty? :D 09:44:19 <_dp_> hm... can I do a slipstream in openttd? xD 09:44:53 <TrueBrain> if you build it, sure! 09:56:19 <TrueBrain> lol .. Rust HashMaps are not deterministic? I thought we learned that lesson with Python .. guess we are going to repeat history :) 09:56:53 <TrueBrain> "It is against Hash DoS attacks", owh, what a baloney reasoning 09:57:27 <nielsm> wasn't the issue with python's hash maps exactly that it was deterministic, and thus you could force-feed it a data set causing pathological behaviour? 09:57:57 <TrueBrain> in Python for a long time dicts ("hash maps") were seeded on startup 09:58:03 <TrueBrain> which give many many many many programming errors 09:58:11 <TrueBrain> since .. 3.8? they made it deterministic again, I believe 09:58:35 <TrueBrain> mind you, I am talking about deterministic .. I don't care how things are seeded 09:58:42 <TrueBrain> I care that if I put things in in one order 09:58:44 <TrueBrain> I get it out in the same 09:59:01 <TrueBrain> which .. is a lessen Python learnt, and Rust seems to have forgotten :P 09:59:25 <nielsm> in C++ STL it's called an unordered_map when you want a "hash map" 09:59:39 <_dp_> that's not deterministic that's ordered :p 09:59:40 <TrueBrain> I like those namings, as it makes it much more clear what it is you are using 09:59:54 <nielsm> a map is not a list or array, it's not ordered 10:00:03 <TrueBrain> _dp_: well, I don't really care about orderning, I care about getting the same result between runs ;) 10:00:21 <TrueBrain> nielsm: in Python it now is :) 10:00:26 <TrueBrain> which really helps a lot in many cases 10:00:56 <TrueBrain> but now I have a program again that behaves different between runs 10:01:02 <TrueBrain> which is always a bitch to notice ... 10:01:14 <TrueBrain> (and sucks during debugging :P) 10:01:41 <_dp_> ah, that... 10:01:53 <_dp_> isn't there some hashmap implementation that does what you want? 10:01:58 <TrueBrain> there is 10:02:04 <TrueBrain> but .. you first need to notice the default is not 10:02:17 <TrueBrain> giving it a better name would solve these things ;) 10:02:28 <TrueBrain> just a generic "HashMap" is not descriptive 10:02:32 <TrueBrain> "YES, BUT IT IS IN THE README" 10:02:33 <_dp_> default things in rust are secure-focused indeed 10:02:35 <TrueBrain> owh, sod off .. 10:02:36 <_dp_> same with random 10:02:45 <_dp_> it takes some effort to make it non-secure :p 10:03:02 <TrueBrain> that is the fun part, this has not that much to do with security .. you can have it randomly seeded AND still be deterministic .. it just takes more memory :) 10:03:13 <TrueBrain> and I am fine this is the default .. just don't name it something generic 10:03:17 <TrueBrain> it screws people over .. 10:03:24 <TrueBrain> I notice it now, which is fine. But how many people do not notice it? 10:03:43 <_dp_> how many people do even care? 10:03:49 <TrueBrain> and "consistent" might be a better word over "deterministic" btw 10:04:02 <TrueBrain> well, given the amount of bugs shown by Python applications, I would say: A LOT 10:04:11 <TrueBrain> Python has shown the horrors that can come from this :) 10:04:23 <TrueBrain> tests that randomly fail, but are never reproducible, shit like that 10:04:36 <TrueBrain> so so so so so many stackoverflow articles about that :P 10:06:20 <nielsm> and yet it's such a simple concept: a map is not a list or array, a map (from X to Y) is a data structure that lets you look up Y's based on putting in X's, it's not a thing for iteration 10:06:34 <nielsm> if you want an iterable ordered list of pairs of (X, Y) then make a list of pairs 10:06:41 <TrueBrain> nielsm: the issue is, they do allow you to iterate over it ;) 10:06:57 <TrueBrain> well, no, your solution doesn't always work 10:07:03 <TrueBrain> as that means finding X in that list is O(n) 10:07:07 <TrueBrain> which .. is rarely what you want 10:07:24 <nielsm> yes well, for small n that's typically the fastest, on modern archs :P 10:07:26 <TrueBrain> and of course, as mentioned too, it is in the readme, so strictly the world is all okay 10:07:30 <TrueBrain> but it is what you expect vs what you get :) 10:08:05 <_dp_> I kinda feel like people that assume anything about hasmap implementation never wrote one in their life :p 10:08:22 <TrueBrain> Rust gives an iter() over an HashMap .. that the order out is not the order in, I couldn't care less .. that the other out is depending on the position of the moon .. that just is a bit more troubling ;) 10:08:29 <nielsm> and that's why some basic computer science education is useful for programmers! 10:08:33 <_dp_> wtf would you assume a randomized structure be deterministic :p 10:08:38 <TrueBrain> _dp_: sadly, I wrote many, so that doesn't hold either ;) 10:09:00 <TrueBrain> nielsm: that is too easy to brush this off with :) 10:09:12 <TrueBrain> the easy comments: people should read, people should learn, people should know 10:09:31 <nielsm> but okay algorithm textbooks rarely talk about making a hashmap resistent to denial-of-service attacks 10:09:42 <TrueBrain> yet, here I am, a history in programming longer than my arm, being surprised by this. Should I have known better? Sure, I could have read. But then again .. they could have fucking picked a better name ;) 10:10:16 <TrueBrain> as one thing you learn in any CS study: nondeterministic programs are a fucking hell to debug. 10:10:24 <nielsm> anyway I have to go, out in the heat 10:10:28 <TrueBrain> enjoy :) 10:12:19 <andythenorth> oof 10:12:27 * andythenorth should have coffee 10:12:30 <_dp_> it's not like non-randomized are always nice :p 10:12:35 * _dp_ looking at openttd 10:12:48 <andythenorth> is today the day for writing an S3 uploader? 10:12:48 <TrueBrain> at least you always get the same result with the same input :) 10:14:48 <TrueBrain> funny enough, the solution a Rust crate offers, is simply keep a linked list of insertion order, on top of the HashMap 10:15:02 <TrueBrain> keeping the DoS protection too :) 10:15:21 <TrueBrain> what always strikes me as odd with the seeding between runs .. how often does a production process really roll over 10:15:40 <TrueBrain> I guess it is meant in the idea: if it does because someone did a Hash attack, he has to refind a new seed to do it again 10:15:48 <TrueBrain> bit of a poor-mans-solution, basically 10:15:49 <TrueBrain> shrug 10:15:52 <andythenorth> is rust the new thing? 10:16:00 <TrueBrain> if 2004 is new, sure 10:16:29 <andythenorth> seems we have a bit of a gap between python (any idiot can write it, bit slow, packaging is a car crash) 10:16:39 <andythenorth> and C++ (most web devs can't write it) 10:16:53 <andythenorth> we = my bit of the industry 10:16:55 <TrueBrain> Rust is mostly meant to write applications that are proven correct in some sense, I guess 10:17:12 <TrueBrain> if you don't use "unsafe", it is multithread safe and shit like that 10:17:18 <_dp_> andythenorth, that gap is for go lang 10:17:19 <TrueBrain> or claims to be .. have yet to find out if it is true :D 10:17:22 <_dp_> rust is a sane c++ :p 10:17:47 <andythenorth> oof let me know when one has won 10:17:50 <TrueBrain> they clearly took lessons from C++, yes :P 10:17:57 <andythenorth> I lived through the last war 10:18:13 <andythenorth> every 6 weeks, it was 'omfg Ruby has overtaken PHP today' 10:18:14 <andythenorth> etc etc 10:18:21 <_dp_> also wiki says rust is 2010 :P 10:18:26 *** nielsm has quit IRC 10:18:28 <TrueBrain> 2010? I thought 2004 .. 10:18:32 <andythenorth> 'you must switch now or your company is fucked' 10:18:36 <andythenorth> literally every 6 weeks 10:18:40 <_dp_> with 1.0 in smth like 2012 10:18:45 <TrueBrain> owh, 2006, my bad 10:18:46 <_dp_> TrueBrain, 2004 is like, python 10:19:01 <TrueBrain> "The language grew out of a personal project begun in 2006 by Mozilla employee Graydon Hoare" 10:19:41 <TrueBrain> _dp_: Python is a lot older .. like 1990 older 10:19:54 <_dp_> TrueBrain, yeah, nvm 10:20:01 <_dp_> 2004 is about when I learned it xD 10:20:05 <TrueBrain> guess we both suck in years :P 10:20:13 <andythenorth> we all suck at the past 10:20:34 <TrueBrain> but Rust is nice, as in, it is a bit more like a scripting language than C++, but it compiles to the speed of C 10:20:46 <andythenorth> should I write my s3 uploader in Rust? o_O 10:20:54 <TrueBrain> if you want to hurt yourself, sure 10:20:55 <andythenorth> nmlc rewrite in Rust? o_O 10:21:22 <andythenorth> TrueBrain we have to break ourselves to get stronger? :P 10:21:27 <andythenorth> oof 10:21:37 * andythenorth makes trains, for simpler life 10:21:49 <TrueBrain> for me it is like this: I love C, mostly ANSI C for some weird reason .. but writing modern things in C is difficult, because: bindings. I really really dislike C++, as ... well, you need education to do the basic things there. They really went the wrong way to keep things sane. And now you have Rust .. which allows sane humans to write applications again :) 10:21:50 <_dp_> andythenorth, rewrite TW :p 10:22:26 <andythenorth> Rust cross-compiles to JS? o_O 10:22:28 <TrueBrain> and Rust punishes you really really hard for trying to be to scripty, like trying to downcast classes :P 10:22:39 <TrueBrain> Rust can compile to anything; it is build on LLVM 10:22:50 <TrueBrain> well, it is a frontend to LLVM, is the better phrashing 10:22:59 <TrueBrain> and LLVM can output to ... a lot 10:23:39 <andythenorth> https://hacks.mozilla.org/2018/04/javascript-to-rust-and-back-again-a-wasm-bindgen-tale/ 10:24:19 <TrueBrain> Rust has really nice bindings to anything .. they did that part really well 10:24:43 <TrueBrain> I am now writing a Rust application that generates Python code that is loaded in that same application to execute, where the Python code calls the Rust application to do the hard work .. :P 10:25:18 <andythenorth> that's the kind of use case I had in mind when I said there's a gap 10:25:38 <andythenorth> there are times when python is just....TBH slow 10:25:56 <TrueBrain> but Rust made some choices that are ... counter intuitive if you have been programming for more than a month :P 10:26:08 <TrueBrain> which is not always bad, just ... wrapping your head around it ..... is painful .... 10:26:42 <TrueBrain> funny enough, you can write webservers pretty easy in Rust these days :P 10:26:54 <TrueBrain> mostly because they have procmacros, which are ... insane 10:27:05 <TrueBrain> (they = Rust) 10:28:05 <TrueBrain> but yeah, given NML is mostly AST manipulation, it would be a lot quicker in Rust :P 10:28:07 <milek7> what about D? (as better C++) 10:28:11 <TrueBrain> fuck D 10:28:12 <TrueBrain> :P 10:28:30 <TrueBrain> WHY DO PROGRAMMING LANGUAGE HAVE THE NAMES OF WOMEN'S BREAST SIZES?! 10:29:04 <_dp_> imo rust is pretty much the first c/c++ replacement that not only does things better, but does them significantly better 10:29:07 <_dp_> unlike d and stuff 10:29:13 <_dp_> that are nice but no cookie :p 10:29:54 <TrueBrain> from my experience with Rust, I agree _dp_ :) I can bitch, but in general, it works a lot better than C++, and the binaries are blazingly fast 10:30:24 <TrueBrain> just the learning curve ... fucking hell :P 10:31:10 <_dp_> idk, haskel felt worse :p 10:31:19 <TrueBrain> fair; Erlang did too :P 10:31:24 <TrueBrain> but now you are just naming things on the spectrum :D 10:31:52 * andythenorth reading https://lucumr.pocoo.org/2015/5/27/rust-for-pythonistas/ 10:32:29 <TrueBrain> it goes fine till you hit "borrow" :P 10:32:50 <TrueBrain> and be happy "lifetime" is only mentioned once in that document :P 10:32:58 <andythenorth> can't be worse than the first time python hits you with the need to deepcopy() 10:33:07 <andythenorth> especially if you've gone to prod with that error 10:33:08 <TrueBrain> you should never want to do that :) 10:33:20 <TrueBrain> but "borrow" is like learning pointers in C for the first time :) 10:33:36 <TrueBrain> and if you think you understand, really, you do not :P 10:33:52 <andythenorth> proving that point for you, why are pointers considered hard? 10:33:55 <andythenorth> :P 10:34:11 <andythenorth> there used to be advice to use them as a hiring question, apparently some programmers can't understand them 10:34:24 <TrueBrain> pointers are easy, the learning curve to get to that point, not so much :D 10:34:34 <TrueBrain> most Java programmers do not understand pointers 10:34:36 <andythenorth> I probably misunderstand them :) 10:34:39 <TrueBrain> so yeah, that doesn't surprise me :P 10:34:56 <TrueBrain> "memory is cheap" :) 10:35:18 <andythenorth> isn't nearly all of programming just passing pointers along? 10:35:24 <andythenorth> and some maths ops occasionally 10:35:30 <_dp_> for python programmers rust is probably just a pain in the ass 10:35:45 <_dp_> you kinda need to experience C++ to understand why it exists xD 10:35:57 <TrueBrain> haha, feel the pain first, you say? :P 10:47:21 *** andythenorth_ has joined #openttd 10:52:57 *** andythenorth has quit IRC 10:58:02 *** Progman has quit IRC 11:24:22 *** Samu has quit IRC 11:57:05 <TrueBrain> that moment you work on something for 10+ hours, to realize Python doesn't support "goto" statements .. oops, I knew that already :P (well, there is a pip package that does this, but only for Linux :P) 12:14:38 <andythenorth_> I learnt to program in Basic :P 12:15:10 <andythenorth_> at a time when the rule was becoming 'goto is evil, never use it' :D 12:15:53 <andythenorth_> hmm I just taught a child that you can guess the router will be on 192.168.1.or .254 if it stops handing out DHCP addresses 12:15:57 <andythenorth_> I hope this goes well 12:18:44 *** Wolf01 has joined #openttd 12:26:04 <TrueBrain> lol 12:29:04 *** keoz has joined #openttd 12:39:19 <andythenorth_> should I get him a port scanner? 12:52:00 <TrueBrain> free security check, why not 12:57:46 *** andythenorth_ has quit IRC 13:00:06 <TrueBrain> seems he found something :P 13:08:57 *** andythenorth has joined #openttd 13:27:21 *** andythenorth has quit IRC 13:59:54 *** andythenorth has joined #openttd 14:11:33 *** iSoSyS has joined #openttd 14:36:32 <LordAro> TrueBrain: that goto module was literally an april fools joke 14:38:13 <LordAro> personally, i think c++11(+) largely fixes the same problems rust does 14:38:48 <LordAro> and D is quite neat too 14:41:12 <TrueBrain> No, there are 2 implementations of the goto package .. one is maintained .. yes, really :p 14:41:54 <TrueBrain> And have you written anything real in Rust? As I have a hard time believing that you would think that :) 14:44:14 <_dp_> c++xx keeps piling up stuff on top of the existing language so even though that stuff it's not bad it ends up just expanding the mess 14:44:33 <_dp_> besides, with the pace it goes it will get to rust level at c++50 or smth 14:45:10 <TrueBrain> well, I guess what you consider "problems" in his statement :) 14:45:20 <TrueBrain> strongly depends on what you consider Rust fixes :D 14:45:41 <TrueBrain> cargo you can compare with vcpkg I guess, does that count? :D 14:46:06 <_dp_> vcwhat? win-smth? :p 14:46:42 <TrueBrain> I have to write a visitor that does advanced logic on what CPU flags are used .. and one that does advanced logic on where jumps go to, and create valid Python code based on that .. hmm 14:46:55 <TrueBrain> the first should be easy .. the second .. it might even be impossible without goto statements in some cases, I guess 14:47:28 <_dp_> but for example safer memory management, c++ is getting there but syntax is abysmal 14:47:41 <_dp_> are non-null smart pointers even in the standard yet? 14:48:09 <TrueBrain> I do wish some of the Rust RFCs would land in stable quicker 14:48:13 <TrueBrain> like generators ... I love generators :) 14:48:38 <TrueBrain> but the specs are not even settled on that yet .. still debate on what the syntax should be :( 14:48:54 <_dp_> at least they got rid of the lexical lifetimes finally xD 14:49:14 <TrueBrain> I am shocked I managed to avoid lifetimes in general so far 14:49:24 <TrueBrain> I had to add it in some places, but I could remove that with a simple refactor a bit later :D 14:49:43 <_dp_> well, the more you copy the less you have to deal with lifetimes 14:50:56 <TrueBrain> one thing I haven't discovered yet .. if Rust means with copy/move really a memcpy, or just a logical copy :) 14:51:12 <_dp_> idk what rust means I mean memcpy :p 14:51:20 <TrueBrain> it is .. ambiguous, in documentation :P 14:51:38 <TrueBrain> as either I am doing a lot of memcpy, which really is not needed 14:51:41 <TrueBrain> or everything just works fine :P 14:51:45 <_dp_> like, you can make a json parser that doesn't allocate strings 14:51:48 <TrueBrain> I am completely unsure, and I have no real way to figure it out :) 14:51:59 <_dp_> but it makes lifetimes tricky as lifetime of your output now depends on input 14:52:13 <TrueBrain> ghehe, yeah, that would be a bit silly :D 14:52:25 <_dp_> well, but it's bloody fast :p 14:52:50 <TrueBrain> I have these cases I am just not sure what Rust does .. like: struct A { ... }. I call a function with parameter "a: A" 14:52:56 <TrueBrain> it says it copies it (as I do not borrow it) 14:53:02 <TrueBrain> but .. I really hope it doesn't do a memcpy 14:53:10 <TrueBrain> as there really is no need :P 14:53:20 <TrueBrain> but if it is on the stack, it has to 14:53:26 <TrueBrain> so I hope it understand it should go to the heap 14:53:30 <TrueBrain> but again .. shrug 14:54:18 <TrueBrain> the compiler is really smart, I noticed; just the final decision is not really .. clear :) 14:57:08 <_dp_> I haven't written rust in a while so already forgot stuff like that 14:58:06 <TrueBrain> I have been looking if there is a command that simply tells you what Rust is doing with your variables 14:58:06 <TrueBrain> but haven't found it yet 14:58:06 <TrueBrain> feels like it is easy to mess up 14:58:06 <TrueBrain> now I am just crossing fingers and hope I am doing it right :P 14:58:06 <TrueBrain> so far the application is about 1000 times faster than Python, so I guess :P 14:59:25 <_dp_> well, 1000x is kinda expected with any compiled language tbh 14:59:31 <TrueBrain> yup 15:00:13 <_dp_> depends on what you're doing in python though 15:00:26 <_dp_> I remember it beating java on some stuff 15:00:32 <_dp_> not that java is very compiled but... 15:00:47 <TrueBrain> Python and Java work in the same manner, I guess :P 15:01:12 <_dp_> well, java has jit, python... idk anymore xD 15:01:23 <TrueBrain> PyPy! :D 15:03:40 <TrueBrain> owh, wow .. did not know about "cargo clippy" 15:03:52 <TrueBrain> lets see what it has to say :) 15:05:20 <TrueBrain> warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` 15:05:20 <TrueBrain> it is a smart cookie 15:05:53 <TrueBrain> warning: you seem to be trying to use `&Box<T>`. Consider using just `&T` <- funny :) 15:06:05 <TrueBrain> I like how it makes tons of suggestions 15:09:48 *** Wormnest has joined #openttd 15:34:42 *** virtualrandomnumber has joined #openttd 15:38:10 *** virtualrandomnumber has quit IRC 15:53:15 <LordAro> TrueBrain: clippy is very good 15:54:10 <LordAro> did not know about the "new" goto py module though 15:55:38 <LordAro> also, 1000x faster seems quite high 15:55:47 <LordAro> even for compiled vs interpreted 15:59:31 <_dp_> python oop is very slow, if you do that a lot it's 1000x easily 15:59:38 <_dp_> also heavy math is about 100x 16:04:31 *** iSoSyS has quit IRC 16:22:15 *** andythenorth has quit IRC 16:25:19 *** andythenorth has joined #openttd 16:31:25 *** andythenorth has quit IRC 16:40:14 <TrueBrain> LordAro: mind you I am not saying Rust is 1000 faster than Python; just for my workload :) Turns out Python is terrible in spinlocking .. no real surprise there tbh :) 16:41:12 <TrueBrain> and I tried to make a piece of Python reach a 1/60 second deadline .. turns out Python is also terrible in that (shocker) .. spikes all over the place .. like: in 95% of the cases it could make it .. the other 5% were wayyyyyy out of bounds :P 16:41:28 <TrueBrain> that happens if you make Python into a hammer and try to make everything else a nail :D 16:42:23 <TrueBrain> also: http://entrian.com/goto/ <- 1st of April joke. Latest code, 2004 16:42:38 <TrueBrain> https://github.com/snoack/python-goto <- working module, with recent fixes :) 16:43:07 <TrueBrain> same syntax, wildly different implementations :P 16:44:10 <_dp_> TrueBrain, tried disabling gc? that usually makes python pretty consistent 16:45:12 <TrueBrain> I tried a few things, but mostly realized I was using the wrong tool for the tight deadlines I was going for :) 16:45:21 <TrueBrain> and it gave a nice excuse to try Rust ;) 16:46:08 <LordAro> yeah, python not good at (genuine) parallelism 16:47:21 <TrueBrain> this is more an fps kinda thing; so parallelism wouldn't have helped me here :) 16:48:08 <LordAro> so why spinlocking? 16:48:20 <TrueBrain> the parallelism issues I had, I could resolve by creating generators out of the code .. which was a nice way of solving a complex thing, as that meant I didn't need to care about thread-safety :) 16:49:20 <TrueBrain> spinlocks is code waiting for hblank and vblank 16:49:39 <TrueBrain> don't ask me why, I did not write the code I am emulating :) 16:49:39 <LordAro> i see 16:50:29 <TrueBrain> as I said, it is my workload more than Rust vs Python ;) 16:50:30 <TrueBrain> and most likely, my implementation of said workload :D 16:54:13 *** Flygon has quit IRC 17:20:43 *** andythenorth has joined #openttd 17:40:02 *** andythenorth has quit IRC 17:41:39 *** andythenorth has joined #openttd 17:52:00 *** andythenorth has quit IRC 17:52:32 *** Progman has joined #openttd 18:01:27 <TrueBrain> thread 'main' has overflowed its stack <- poor stack 18:13:35 *** andythenorth has joined #openttd 18:17:39 *** b_jonas has joined #openttd 18:42:50 *** gelignite has joined #openttd 19:27:47 <andythenorth> yo 19:27:51 <andythenorth> python sorting 19:28:25 <andythenorth> I have something like [1, 2, 3, 4, -2, -3, -1] (contents vary) 19:28:41 <andythenorth> I want to sort it to [1, -1, 2, -2, 3, -3, 4] 19:28:53 <andythenorth> specifically with the negative value after the positive, if it exists 19:28:58 <andythenorth> coolest solution 19:29:00 <andythenorth> ? 19:29:14 <andythenorth> I have a few hideous ones :P 19:30:14 <_dp_> sort(key=abs) 19:30:35 <_dp_> oh, negative after positive.. 19:30:47 <TrueBrain> A range to your values? 19:30:52 <_dp_> a.sort() a.sort(key=abs) then :p 19:31:25 <_dp_> *a.sort(reverse=True) first 19:32:07 <TrueBrain> Does Python preserve order with equal? Cool .. 19:32:15 <_dp_> yep, timsort is stable 19:32:56 <TrueBrain> Funny! 19:33:05 <FLHerne> a.sort(key=lambda v: abs(v + 0.1)) 19:33:28 <FLHerne> Er, sorry, - 0.1 19:33:43 <TrueBrain> I love the cheats :) 19:36:35 <_dp_> there is also key=lamda x: (abs(x), -x) 19:38:54 <TrueBrain> Now that is a lot cleaner at least :) 19:43:11 <andythenorth> result.sort(key=lambda x: (abs(x), -x)) seems pretty rad 19:43:24 <andythenorth> do I want to ask why that works? o_O 19:43:56 <_dp_> tuples are ordered element-by-element 19:46:46 <andythenorth> well it makes Horse tech tree display so much better :D 19:46:48 <andythenorth> thanks 19:50:13 *** andythenorth_ has joined #openttd 19:50:16 <andythenorth_> https://www.peterbe.com/plog/in-python-you-sort-with-a-tuple 19:50:18 <andythenorth_> so cool 19:51:16 <_dp_> it's probably the least effecient solution though 19:53:49 <andythenorth_> I buy more CPU :P 19:53:49 <andythenorth_> nah it's fine 19:55:51 *** andythenorth has quit IRC 19:58:45 <andythenorth_> hmm should I downgrade my CPU? :P 19:59:48 <andythenorth_> it's a 2.3Ghz i9 8 cores, I could have got a 2.6Ghz i7 with 6 cores for same or less money 19:59:57 <andythenorth_> most performance failures are single-threaded python, or the GPU 20:00:06 <andythenorth_> performance is pretty crap, but eh 20:13:34 <milek7> amd renoir are pretty good 20:15:35 <andythenorth_> not so performant with macos 20:15:41 <andythenorth_> as in, unsupported :) 20:22:53 <SpComb> that's the base clock, what's the turbo clock like? 20:23:58 <SpComb> my i5 is capable of sustained 5Ghz on all 6 cores, dunno if an i9 would really be stable at the same clocks on all 8 cores 20:46:05 <andythenorth_> Turbo Boost up to 4.8GHz allegedly 20:46:09 <andythenorth_> on the i9 20:46:26 <andythenorth_> Turbo Boost up to 4.5GHz on the i7 20:54:15 <_dp_> experirmenting with building ui... https://i.imgur.com/y3YesMm.png 20:55:20 <andythenorth_> auto! :D 20:55:26 <andythenorth_> I was thinking about that last week 20:55:51 <andythenorth_> orient to nearest track? 20:55:51 <andythenorth_> (matching railtype) 20:55:51 <_dp_> yep 20:56:20 <_dp_> well, auto has being in cmclient for ages, I just added ghost preview 20:56:34 <_dp_> *been 21:02:42 *** gelignite has quit IRC 21:05:33 <milek7> _dp_: does this whole window is necessary? :P 21:05:40 <milek7> default to auto on click 21:05:46 <milek7> click+drag for manual direction 21:06:32 <_dp_> I was thinking of ctrl + subtile coords for manual direction 21:06:48 <_dp_> but yeah, it may not be necessary now 21:07:15 <_dp_> though it cmclient format it still may be as it tries to keep all vanilla stuff by default 22:39:23 *** andythenorth_ has quit IRC 22:57:51 *** Wolf01 has quit IRC 22:58:39 *** sla_ro|master has quit IRC 23:42:33 *** Progman has quit IRC