00:00:43 | * | disruptek joined #nim |
00:00:52 | * | Trustable quit (Remote host closed the connection) |
00:25:55 | * | stefanos82 quit (Remote host closed the connection) |
00:29:35 | * | theelous3 joined #nim |
00:46:42 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
00:50:31 | * | zachk quit (Quit: Leaving) |
00:55:48 | * | oculux joined #nim |
01:23:49 | * | d10n-work joined #nim |
01:28:48 | * | icebattle quit (Ping timeout: 245 seconds) |
01:29:36 | * | abeaumont quit (Ping timeout: 246 seconds) |
01:40:03 | FromDiscord_ | <exelotl> oof I got a bogus SDL2_image.dll from MSYS2... |
01:40:41 | FromDiscord_ | <exelotl> downloaded a binary from here and it now works fine https://www.libsdl.org/projects/SDL_image/ |
01:44:25 | * | theelous3 quit (Ping timeout: 246 seconds) |
01:46:44 | * | vlad1777d quit (Remote host closed the connection) |
01:48:49 | * | vlad1777d joined #nim |
01:52:57 | * | wildlander joined #nim |
02:09:33 | * | oculux quit (Quit: blah) |
02:10:19 | * | oculux joined #nim |
02:13:18 | * | Snircle quit (Remote host closed the connection) |
02:29:54 | * | Tyresc quit (Quit: WeeChat 2.4-dev) |
02:34:50 | * | oculux quit (Quit: blah) |
02:36:14 | * | oculux joined #nim |
03:02:27 | * | banc quit (Quit: Bye) |
03:24:36 | * | banc joined #nim |
03:25:37 | * | abeaumont joined #nim |
04:13:36 | * | dddddd quit (Remote host closed the connection) |
04:16:28 | * | noonien joined #nim |
04:34:36 | * | nsf joined #nim |
04:46:12 | * | d10n-work quit (Quit: Connection closed for inactivity) |
05:08:51 | * | seni quit (Quit: Leaving) |
05:42:32 | * | leorize quit (Ping timeout: 268 seconds) |
05:52:36 | * | vlad1777d quit (Ping timeout: 250 seconds) |
06:20:11 | * | nsf quit (Quit: WeeChat 2.3) |
06:20:44 | * | narimiran joined #nim |
06:21:04 | * | nsf joined #nim |
07:25:42 | * | icebattle joined #nim |
07:29:56 | * | icebattle quit (Ping timeout: 240 seconds) |
07:47:43 | Araq | hhmmm can we remove the 'Error: unreachable statement after 'return' statement or '{.noReturn.}' proc' message? |
07:48:30 | Araq | I only found it annoying, requires the 'if true: return' workaround |
07:49:32 | FromGitter | <GULPF> why not turn it into a warning instead |
07:50:28 | Araq | that would still be confusing for https://github.com/nim-lang/Nim/issues/4691 |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:04:26 | * | gmpreussner joined #nim |
08:06:07 | * | redlegion quit (Ping timeout: 240 seconds) |
08:06:31 | * | redlegion joined #nim |
08:06:31 | * | redlegion quit (Changing host) |
08:06:31 | * | redlegion joined #nim |
08:08:09 | * | kingshuk1000_ quit (Quit: Connection closed for inactivity) |
08:21:52 | * | noonien quit (Quit: Connection closed for inactivity) |
08:25:15 | * | redlegion_ joined #nim |
08:25:47 | * | redlegion quit (Ping timeout: 240 seconds) |
08:30:37 | FromGitter | <Varriount> Araq: I wouldn't mind it being taken away. |
08:33:02 | * | enow joined #nim |
08:33:04 | enow | Hi |
08:33:16 | enow | What are you guys using for syntax hihglithing in VIM? |
08:33:49 | * | wildlander quit (Read error: Connection reset by peer) |
08:34:33 | * | wildlander joined #nim |
08:52:57 | Araq | enow: see this thread https://forum.nim-lang.org/t/4636 |
08:53:17 | enow | thx |
08:53:21 | Araq | https://github.com/alaviss/nim.nvim |
09:02:59 | narimiran | btw, that's only for neovim, not for vim |
09:04:44 | Araq | ah ok but you can always upgrade |
09:05:05 | Araq | I like morpheusvim |
09:06:01 | * | neceve joined #nim |
09:09:25 | * | neceve quit (Client Quit) |
09:10:09 | * | neceve joined #nim |
09:13:59 | Zevv | Araq: I was fiddling with this hidden state in templates. Most of it now works to my liking, but I'm still struggling with converters, because these can only be defined top level. See https://github.com/zevv/nimz3/blob/master/src/z3.nim. Z3 uses opaque AST nodes, which I want to mix freely with normal types like ints and bools. Converters do the right thing, but now I still need a global state. |
09:14:07 | * | vlad1777d joined #nim |
09:14:37 | Araq | is this the Z3 I have been talking about? |
09:14:46 | Zevv | I guess so |
09:14:50 | Zevv | I learned about it during advent of code |
09:15:21 | * | aguspiza joined #nim |
09:15:23 | Zevv | Any thoughts on alternative ways to solve this? For binary operations I could make 3 versions (AST, AST), (bool, AST), (AST, bool), but there are also vararg operators for which this would not apply |
09:17:16 | Araq | well I noticed that 'converter' should have been an attribute |
09:17:25 | Araq | so that I can have converter templates |
09:22:02 | Araq | but I don't like converters anyway and I think you should use an overloaded 'to' proc instead or an operator |
09:23:20 | Zevv | Hm ok. Reading back I also see advantages for providing explicit templates to mix Z3_ast and native nim types, because Z3 requires different underlying functions for operations on different types, although the arguments are always Z3_ast |
09:23:33 | Zevv | for example, int or fp multiply use differet Z3_mk_mul or z3_mk_fp_mul |
09:23:55 | Zevv | and the Nim code does not keep track of the Z3_ast types. |
09:24:01 | Zevv | I'll try to drop the converters, thanks |
09:26:38 | Araq | you're welcome |
09:26:50 | Araq | are you patching the compiler to use Z3? |
09:27:18 | Zevv | not yet :) |
09:27:35 | Zevv | for now I'm just happy I can solve sudokus |
09:27:38 | Zevv | one thing at a time |
09:28:36 | Araq | sudokus? |
09:28:51 | Zevv | these silly puzzles: https://en.wikipedia.org/wiki/Sudoku |
09:29:40 | * | Vladar joined #nim |
09:30:39 | Araq | lol, I do know what sudokus are |
09:30:52 | Araq | I wonder why it requires Z3 |
09:31:08 | Zevv | I doesnt |
09:31:15 | Zevv | but its just a test case |
09:31:33 | Zevv | I give it the constraints and it solves the model |
09:31:54 | Zevv | See latest test case in https://github.com/zevv/nimz3/blob/master/tests/test1.nim |
09:51:55 | Araq | pretty cool |
09:55:39 | Zevv | that's what I thought |
10:00:36 | * | rokups joined #nim |
10:31:26 | * | cyraxjoe joined #nim |
10:31:30 | * | MightyJoe quit (Ping timeout: 272 seconds) |
10:36:24 | Araq | uh oh, bad bug in Nim's effect tracking found |
10:36:35 | Araq | this will break tons of code :-( |
10:37:19 | Zevv | ~ |
11:02:16 | * | manjaro-user-- joined #nim |
11:03:31 | * | stefanos82 joined #nim |
11:20:49 | * | lritter joined #nim |
11:33:43 | * | kapil____ joined #nim |
11:37:35 | * | manjaro-user-- quit (Quit: Konversation terminated!) |
11:42:32 | narimiran | https://erkin.party/blog/190208/spaghetti/ Nim is there too |
11:43:24 | Zevv | "Pascal family" |
11:44:06 | narimiran | well, when i showed some nim code to my brother, the first thing he said: "so, this is some new-pascal?" |
11:44:49 | Zevv | My colluagues always think I'm typing python |
11:48:14 | Zevv | btw, Araq, you're probably totally busy with your bug, but I got the converters out, much better now. |
11:49:02 | * | Ven`` joined #nim |
11:51:20 | Araq | it's true, you can see Nim as a member of the Pascal family |
11:52:00 | Araq | Modula 3 also was a big influence and Python was inspired by Modula 3 too |
11:54:28 | * | narimiran quit (Ping timeout: 272 seconds) |
12:00:04 | * | vlad1777d quit (Ping timeout: 246 seconds) |
12:12:24 | * | leorize joined #nim |
12:22:41 | * | dddddd joined #nim |
12:36:31 | * | noonien joined #nim |
12:52:48 | * | manjaro-user-- joined #nim |
12:54:20 | Zevv | Is there a way to create logical sections in a nimdoc generated document? |
12:54:33 | Zevv | So that I can split up the procs/templates in parts that logically fit together? |
13:01:34 | Araq | well you can reorder the procs, the docgen keeps the order. but I agree it sucks |
13:03:52 | * | Snircle joined #nim |
13:04:38 | Zevv | That will do for now I guess |
13:06:48 | * | wildlander quit (Read error: Connection reset by peer) |
13:10:06 | * | wildlander joined #nim |
13:22:26 | * | vlad1777d joined #nim |
13:23:56 | * | aguspiza quit (Ping timeout: 240 seconds) |
13:25:23 | * | tiorock joined #nim |
13:25:24 | * | rockcavera quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
13:25:24 | * | tiorock is now known as rockcavera |
13:29:05 | FromDiscord_ | <moerm> hello |
13:29:14 | Zevv | Hi moerm |
13:29:34 | FromDiscord_ | <moerm> (Yay! Modula 3 is a nice language but unfortunately all but dead) |
13:30:16 | Araq | ah I'm just replying to you to enter the chat |
13:30:30 | FromDiscord_ | <moerm> ?? |
13:34:53 | Araq | https://forum.nim-lang.org/t/4636 |
13:36:22 | FromDiscord_ | <moerm> OK, read |
13:36:37 | * | ng0 joined #nim |
13:37:54 | FromDiscord_ | <moerm> I've looked at and tried *many* editors. sublime is the one I love most (and it more or less well supports Nim!) but it's not really free (and needs linux compat layer on FreeBSD) |
13:38:42 | * | theelous3 joined #nim |
13:38:49 | FromDiscord_ | <moerm> So -> Textadept. Works everywhere, is quite programmable (Lua) and also has a cli/tui version. |
13:39:10 | Araq | same here, tried plenty of them |
13:39:20 | Araq | never tried Textadept though |
13:39:38 | FromDiscord_ | <moerm> Oh, and: I still stink that you should have taken the ':=' from Modula :p |
13:39:50 | FromDiscord_ | <moerm> Give it a try! It's really worth it |
13:40:42 | Araq | from the little usability testing I knew about the := was more confusing than helpful for Pascal |
13:40:51 | FromDiscord_ | <moerm> A bit Lua centric but fast, nice, works everywhere and has a tui too (which is very nice when troubleshooting something on a remote server) |
13:40:57 | Araq | for example, it's const name = value in Pascal |
13:41:15 | Araq | and type name = desc too |
13:41:57 | Araq | the := is too academic, I cannot write 'const 4 = myname' in Pascal anyway, the '=' has a direction |
13:41:59 | FromDiscord_ | <moerm> The logic is *assignment*. Assignment is := (const is not assignment - but I agree that it's iconfusing some people) |
13:42:43 | Araq | sure assignment is different but it's "close enough" |
13:42:44 | FromDiscord_ | <moerm> But hey, that := thing is a tongue in cheek remark, no serious criticism |
13:43:12 | FromDiscord_ | <moerm> You are on linux, I guess? |
13:43:19 | Araq | *after* the assignment the equality holds :P |
13:43:38 | FromDiscord_ | <moerm> *g |
13:43:41 | Araq | no, I'm either on Windows or OSX, depending on my mood |
13:44:32 | FromDiscord_ | <moerm> -> https://foicica.com/textadept/ downloads are right on the top left |
13:45:49 | FromDiscord_ | <moerm> building it is also comfortable. Just make deps (which automagically gets all dependencies), make, make install |
13:46:02 | FromDiscord_ | <moerm> Takes just a couple of minutes |
13:46:51 | Araq | what UI library does it use? |
13:47:19 | FromDiscord_ | <moerm> As it's largely based on Lua (and a small C core) it should be easy to get it to use the Nim compiler |
13:47:40 | FromDiscord_ | <moerm> I think gtk2 and/or 3. But I've heard no complaints from Mac people so far |
13:47:57 | Araq | well Geany works well here too |
13:49:44 | * | vlad1777d quit (Ping timeout: 272 seconds) |
13:49:45 | FromDiscord_ | <moerm> Would be an acceptable basic editor too (but textadept is easier to extend and program) very fast and quite small |
13:50:30 | Araq | well kudos, textadept looks interesting |
13:50:39 | FromDiscord_ | <moerm> vim would be nice too theoretically but many are afraid of it. And it's somewhat "religious" and there are many flame wars |
13:51:10 | FromDiscord_ | <moerm> You are more than welcome, Araq. |
13:51:13 | Araq | yeah, I don't use vim... ;-) |
13:51:24 | Araq | moerm: Zevv wrapped Z3 for us :D |
13:52:27 | FromDiscord_ | <moerm> I think the criteria I laid out are quite reasonable. And frankly, we should care at all about Top 10 lists or about surveys ("clicking I'd love to have xyz" is cheap, also in terms of thinking). |
13:52:40 | FromDiscord_ | <moerm> We have a Z3 wrapper??? HURRAY!!!!! |
13:53:04 | FromDiscord_ | <moerm> If we follow that, we/Nim will enter another league! |
13:53:52 | FromDiscord_ | <moerm> Ada is not efficient (dev. time), parasail is too young and too focussed on parallelism, etc. Nim could be a killer in that field |
13:54:37 | FromDiscord_ | <moerm> <- hands a bottle of virtual cognac (a good 64 bit variant) to Zevv |
13:54:39 | Zevv | moerm: under development. I'm learning while wrapping, I might not be the best person to pick this up |
13:54:45 | Zevv | but feel free to give it a spin |
13:55:18 | FromDiscord_ | <moerm> I'm so f_cking deep in work right now, sorry. Will have no time before april 😦 |
13:55:22 | Zevv | I'll update the nimble in a minute |
13:55:28 | Zevv | oh ok, then I'll update the nimble before april :) |
13:55:41 | FromDiscord_ | <moerm> But I'll very gladly have a look and keep an eye on it |
13:55:53 | Zevv | https://github.com/zevv/nimz3 |
13:55:55 | FromDiscord_ | <moerm> Hey! Gimme a link! |
13:55:57 | FromDiscord_ | <moerm> *g |
13:57:45 | FromDiscord_ | <moerm> Hmmm, after a very first quick look ... don't fall into the Z3 trap! (oprimization, etc). The point of interest for us is Hoare triples. |
13:58:17 | FromDiscord_ | <moerm> And: We should pass ranges (domains) to Z3. That's helpful for Z3 and that's what we often want |
13:58:31 | Zevv | oh yes, but one step at a time |
13:59:42 | FromDiscord_ | <moerm> Anyway, I'm extremely pleased about your work and very enchanted that Nim is beginning to walk towards Z3 verification. That's really great and important. So,a big THANK YOU to you Zevv! |
13:59:58 | Zevv | no no no, nim is not going towards verification with this |
14:00:03 | Zevv | I have no clue about Hoare triples |
14:00:20 | Zevv | I'm just solving sudokus :) |
14:00:43 | * | manjaro-user-- quit (Quit: Konversation terminated!) |
14:00:59 | FromDiscord_ | <moerm> Haha |
14:01:11 | Zevv | I'm learing as I go, but formal verification is definitily over my head. I'm just a simple engineer |
14:01:30 | Zevv | who happens to think Z3 is übercool to solve stuff I hate solving myself |
14:01:31 | FromDiscord_ | <moerm> You make a good Sudoku solver and I'll turn it into an H3 Verifier |
14:02:06 | Zevv | Well, if you find the time, tell me what you would need, and if you could work with the way stuff is wrapped now |
14:02:19 | Zevv | I'm open to all critique |
14:02:52 | FromDiscord_ | <moerm> You bet that I'll be over it as soon as I have some time! |
14:02:59 | Zevv | great! |
14:03:25 | FromDiscord_ | <moerm> What I'd need is *data* centric. I'm interested in vars and parameters |
14:04:08 | FromDiscord_ | <moerm> I ~ verification |
14:07:09 | Zevv | and why is optimization a 'trap' |
14:07:16 | Zevv | its a valid use case, right? |
14:07:24 | FromDiscord_ | <moerm> Absolutely! |
14:07:31 | Zevv | just not for you :) |
14:07:34 | FromDiscord_ | <moerm> I called it a trap in *our* context |
14:08:19 | Zevv | yeah I see. I'm just getting into the world of solvers; tons to learn, and I really miss the formal education here |
14:08:40 | FromDiscord_ | <moerm> And I called it a trap because of course it's seductive (but not what we need).For you/Sudoku, though it's great |
14:09:05 | Zevv | I hate sudokus :) |
14:09:19 | FromDiscord_ | <moerm> I can give you a hint you might like |
14:09:46 | Zevv | but right, that's the point. It is a versatile toolkit, but I see your use case - if Nim could go towards formally proving stuff, that would bring it to the Rust-league of oooooh-ness |
14:09:58 | Zevv | hints galore! |
14:10:19 | FromDiscord_ | <moerm> There's a weird language from a german prof called "xsetl" (an extension of Setl) which is weird but can help you gain some understanding and the "right way to look at things" wrt verification |
14:10:42 | FromDiscord_ | <moerm> Nope, wrong. That would bring Nim WAY ABOVE Rust |
14:10:48 | Zevv | hehe |
14:11:01 | FromDiscord_ | <moerm> Rust is but yet another approach to create a mem safe C |
14:11:08 | Zevv | I'm having problems finding xsetl, any links? |
14:11:33 | FromDiscord_ | <moerm> It's basically just an application of seperation logic and a poor one at that |
14:11:43 | FromDiscord_ | <moerm> ooops. give me second ... |
14:13:23 | FromDiscord_ | <moerm> sorry, stupid me. Once more I mixed up the name. It's not xsetl but setlx. -> randoom.org/Software/SetlX |
14:13:50 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:14:21 | * | Zevv has homework, thanks! |
14:14:49 | FromDiscord_ | <moerm> Again: SetlX is *not* about software verif per se. It's more like an easy logic language. But it really helps to get the right way of thinking and looking at things |
14:15:55 | Zevv | problem with Z3 is that documentation is sparse and assumes the reader knows what it is all about |
14:16:14 | Zevv | but the subject is intruiging indeed |
14:16:38 | FromDiscord_ | <moerm> Example: In verif we are often interested in propositions with quantors, things like <x op y> where x has a domain and y has a domain and what we are effectively interested in is whether the co domain is with a certain range |
14:17:34 | Zevv | SetlX tutorial seems like a good read, starts with the basics and building up |
14:17:40 | FromDiscord_ | <moerm> re your last remark: Yes that's right. Entry to the verif world is complicated and they seem to not care about beginners. Plus it's math (mostly logic) heavy |
14:18:33 | FromDiscord_ | <moerm> Yes, that's why I recommended it. Btw, in fact I sometimes use SetlsX to get a first impression of a problem. But even just following the tutorial should help you a lot (and make it easier to understand Z3) |
14:18:55 | FromDiscord_ | <moerm> Look: |
14:19:52 | FromDiscord_ | <moerm> (An example) in Nim when we do something as simple as an assignment, we want to know whether the co domain of an expression is fully with the domain of the var we assign to |
14:21:39 | FromDiscord_ | <moerm> var x: int = foo + bar # is that OK? comes down to will *every* possible result of "foo + bar" within the "int" domain? (which is implicit, but we might also have a ranged x). Z3 is great to answer that |
14:22:07 | FromDiscord_ | <moerm> --- |
14:22:08 | Zevv | These are the things I learned to heed by years of experiance in embedded software |
14:22:42 | FromDiscord_ | <moerm> I'm an idiot. Now I've made Araq play with textadept and Zevv work through the SetlX tutorial ... and now I'm all alone here, sniff |
14:22:54 | Zevv | and we are having all the fun, right :) |
14:23:02 | FromDiscord_ | <moerm> Yes, but we are humans and humans err ... |
14:23:04 | FromDiscord_ | <moerm> *g |
14:23:12 | Zevv | Anyway, I need to go pick the kids up and cook diner. Life is full of distractions |
14:23:15 | Araq | er nope |
14:23:27 | Araq | I'm working on a nasty Nim compiler bug |
14:23:41 | FromDiscord_ | <moerm> Seriously, it's not bad at all. I'm a bit under time pressure anyway. So the two of you have fun! (and I'll go back to my work ...) |
14:23:52 | Zevv | thanks! |
14:23:53 | * | Zevv is out |
14:23:53 | Araq | and then I will write my blog post about memory management |
14:24:17 | FromDiscord_ | <moerm> ... and I'm looking forward to read it (and love the regions approach) |
14:24:30 | Araq | yeah, that one |
14:24:35 | FromDiscord_ | <moerm> see you later, probably this evening. Have fun 😉 |
14:25:02 | Araq | found a twist with the regions that make them even more useful |
14:25:27 | FromDiscord_ | <moerm> No need to make me hornier than I already am.... *g |
14:25:38 | FromDiscord_ | <moerm> Looking much forward to read your new post |
14:25:40 | FromDiscord_ | <moerm> cu later |
14:25:47 | Araq | bye |
14:37:00 | * | Perkol joined #nim |
14:47:31 | * | nickftw joined #nim |
14:48:17 | * | nickftw quit (Client Quit) |
15:02:32 | * | kapil____ quit (Quit: Connection closed for inactivity) |
15:10:23 | * | enow quit (Remote host closed the connection) |
15:28:39 | * | neceve quit (Read error: Connection reset by peer) |
15:39:29 | * | neceve joined #nim |
15:41:50 | * | neceve quit (Client Quit) |
15:42:12 | * | neceve joined #nim |
15:46:27 | * | nsf quit (Quit: WeeChat 2.3) |
15:55:29 | * | narimiran joined #nim |
16:12:38 | * | Ven`` quit (Read error: Connection reset by peer) |
16:29:21 | * | vlad1777d joined #nim |
16:44:56 | * | vlad1777d quit (Remote host closed the connection) |
17:01:34 | * | Cthalupa quit (Ping timeout: 268 seconds) |
17:03:05 | * | Cthalupa joined #nim |
17:15:34 | * | vlad1777d joined #nim |
17:26:36 | FromGitter | <brentp> https://gist.github.com/brentp/7d440560968c3ac97c40de17200e404a |
17:27:05 | FromGitter | <brentp> I am needing some fast, small sets on ints and was surprised which is faster in that comparison |
17:27:39 | narimiran | intsets? system.set? |
17:30:08 | FromGitter | <brentp> forgot about intsets. I just updated it. |
17:30:14 | * | rokups quit (Quit: Connection closed for inactivity) |
17:30:26 | FromGitter | <brentp> sets and intsets are 20X faster than the system.set |
17:31:21 | narimiran | what is this fuckery :D |
17:31:53 | narimiran | in debug mode, intsets are fastest, closely followed by hashsets |
17:32:44 | FromGitter | <brentp> so, you agree it's suprising that system.set is so slow? |
17:33:03 | FromGitter | <kaushalmodi> narimiran: Is fixing this issue right in your alley? https://github.com/nim-lang/Nim/issues/9102 |
17:33:08 | narimiran | 20x difference in debug, 10x in release mode |
17:33:21 | FromGitter | <brentp> I get 20X different in release |
17:33:22 | FromGitter | <kaushalmodi> given you recent doc look improvements |
17:33:50 | narimiran | @kaushalmodi yeah, i think we all can agree that something should be done about it |
17:34:20 | FromGitter | <kaushalmodi> @awr1 showed a nice improvement later in the comments in there |
17:34:25 | FromGitter | <kaushalmodi> but he didn't share the code |
17:34:38 | narimiran | yep :( |
17:36:17 | * | nsf joined #nim |
17:36:59 | FromGitter | <brentp> nearly all time is spent in system/sets/countBits32 |
17:38:48 | * | TheLemonMan joined #nim |
17:40:36 | FromDiscord_ | <juan_carlos> But the proc are different on that benchmark. |
17:41:28 | narimiran | they look the same to me (but haven't really spend the time looking for some minor detail) |
17:41:29 | FromDiscord_ | <juan_carlos> I remember critbit also does sets, just for completion. |
17:41:51 | TheLemonMan | brentp: it's the `card` method, not the sets heh |
17:42:13 | FromGitter | <brentp> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5f10f5adf6cb0b2c8e448a] |
17:42:34 | FromGitter | <brentp> that makes system.set almost 2x as fast. |
17:42:41 | narimiran | TheLemonMan saves the day, once again |
17:42:44 | FromGitter | <brentp> but still much slower. |
17:43:22 | narimiran | @brentp remove the asserts everywhere and prepare to be amazed :D |
17:43:38 | FromDiscord_ | <juan_carlos> I like the fasterslower one :P |
17:43:42 | FromGitter | <brentp> hah. indeed. |
17:44:05 | FromGitter | <brentp> thanks @TheLemonMan |
17:44:53 | TheLemonMan | the compiler is not smart enough to recognize the popcount instruction |
17:49:35 | FromGitter | <brentp> with that change to cardSet and adding `.inline.` I get a 4X improvement. Worth opening a PR? |
17:49:50 | TheLemonMan | let's play a game :) |
17:49:57 | FromGitter | <brentp> for my use-case, I actually don't need `.card` so sets will be perfect. |
17:50:21 | FromGitter | <arnetheduck> reminds me of https://github.com/nim-lang/Nim/pull/9029 |
17:52:29 | TheLemonMan | brentp, that change is wrong, you should not iterate over the whole array |
17:53:23 | TheLemonMan | well, unless your set is big enough (like in your case) |
17:53:24 | FromGitter | <brentp> hmm yeah. what's the len for? |
17:53:35 | FromGitter | <brentp> my set is actually fairly small. |
17:53:56 | TheLemonMan | 65535 bits -> 8192 bytes, that's the maximum |
17:54:39 | FromDiscord_ | <Avatarfighter> How does creating a TCP listener work? |
17:55:19 | Zevv | Avatarfighter: https://nim-lang.org/docs/asyncnet.html |
17:55:45 | FromGitter | <Varriount> Anyone here have a good setup for profiling Nim code? |
17:55:54 | * | neceve quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
17:56:22 | TheLemonMan | brentp, that's the lenght of the set in bytes |
17:56:34 | FromDiscord_ | <Avatarfighter> Zevv: I was looking at that but i'm unsure if I specifically need to specify the protocol, etc like you have to in python |
17:56:57 | FromGitter | <brentp> yes, but that seems to be fixed, eh? |
17:57:12 | Zevv | Avatarfighter: it's implicitly SOCK_STREAM/AF_INET, unless specified otherwise |
17:57:18 | TheLemonMan | the trick here is to crunch 4 bytes a time (a single u32) until len > 3 and then process the remaining bytes |
17:57:39 | TheLemonMan | brentp, nah, if a set[int8] is smaller than a set[int16] |
17:57:48 | TheLemonMan | s/if// |
17:58:04 | FromDiscord_ | <Avatarfighter> Zevv: alrighty thank you, that clears that issue up! Another question if I may, what are the advantages of asyncnet vs net other than it being async? |
18:01:05 | Zevv | well, it's async :) |
18:01:07 | FromDiscord_ | <Avatarfighter> I'm dumb, the advantage is that it's async lmao |
18:01:18 | Zevv | Your other choise are a) blocking/single connection or b) using threads |
18:01:31 | FromDiscord_ | <Avatarfighter> lmaoo |
18:01:38 | FromDiscord_ | <Avatarfighter> async it is |
18:01:51 | Zevv | I usually prefer thumb tacks to the forehead over threads |
18:01:55 | Zevv | so async makes me happy |
18:02:00 | FromDiscord_ | <Avatarfighter> lmao |
18:02:09 | FromDiscord_ | <Avatarfighter> you would hate one of my bots |
18:02:20 | FromDiscord_ | <Avatarfighter> i could've gone async but its like 100 threads for 100 bots |
18:02:24 | Zevv | I probably just wouldn't understand it |
18:02:30 | FromDiscord_ | <Avatarfighter> haha |
18:02:34 | Zevv | I decided long ago that i am by far not smart enough for threads |
18:03:18 | FromDiscord_ | <Avatarfighter> tbh I dont understand threads, I just shove while loops in them and hope they don't exit the loop |
18:03:28 | Zevv | Yeah, that's the simple part |
18:04:12 | Zevv | In the beginning it is always obvious and straightforward |
18:04:19 | FromDiscord_ | <juan_carlos> hahaha |
18:04:29 | FromGitter | <brentp> I opened an issue for the sets.card: https://github.com/nim-lang/Nim/issues/10617 |
18:04:41 | Zevv | but somehow I always end up with blood on the walls and myself drunk in a dark alley |
18:04:46 | FromDiscord_ | <Avatarfighter> LOL |
18:05:13 | FromDiscord_ | <Avatarfighter> im about to have the most ghetto proxy for this game |
18:05:33 | FromDiscord_ | <juan_carlos> Oh, it was the threads that cause that, now I know. :P |
18:05:43 | FromDiscord_ | <Avatarfighter> Its always the threads |
18:06:39 | FromDiscord_ | <Avatarfighter> https://cdn.discordapp.com/attachments/536305137547739176/543854799293120540/2pu07ghm7kf21.png |
18:06:50 | FromDiscord_ | <Avatarfighter> Words to live by |
18:07:33 | FromDiscord_ | <Avatarfighter> I have a few more questions, should I use asyncnet or net if i'm making a MITM proxy for a game where there should only be one server&client pair connected to it at a time? |
18:08:13 | FromDiscord_ | <Avatarfighter> I have a few more questions, should I use asyncnet or net if i'm making a MITM proxy for a game if there should be one server&client pair connected to the proxy at a time? |
18:10:40 | Zevv | moerm: funny, SetlX looks very mature, it's properly documented, and seems really useful. Why then, it makes me wonder, is it so obscure and unknown? |
18:11:39 | Zevv | It is consice, pretty powerful, multiparadign, and might even be useful in real life for who knows what |
18:11:48 | Zevv | and yet, I have never heard about it before |
18:12:04 | FromDiscord_ | <Avatarfighter> Is there a developed crypto lib for nim, one that contains hashes and ciphers? |
18:12:35 | Zevv | Avatarfighter: tons, check nimble |
18:12:54 | Zevv | there's openSSL bindings, and some native as well |
18:13:06 | FromDiscord_ | <Avatarfighter> Will do, I'm looking for ARC4 sadly and that one isn't implemented a ton |
18:13:35 | Zevv | EVP bindings for openssl should provide that |
18:14:23 | Zevv | "4 years ago", that's not good news |
18:15:01 | FromDiscord_ | <Avatarfighter> i think ill just manually remake it cx |
18:15:07 | TheLemonMan | RC4? What year is it? 1999? |
18:15:11 | FromDiscord_ | <Avatarfighter> yes |
18:15:20 | FromDiscord_ | <Avatarfighter> Flash games have top security |
18:15:25 | Zevv | well, there's the default openssl bindings from the stdlib, not sure how much you'd need to push that to do rc4 |
18:15:55 | Zevv | rc4 is the shit |
18:16:09 | FromDiscord_ | <Avatarfighter> rc4 is most secure cipher 10/10 |
18:16:14 | FromDiscord_ | <Avatarfighter> /s |
18:17:00 | FromDiscord_ | <juan_carlos> ROT-26 |
18:17:33 | FromGitter | <Clyybber> im so cool i can read ROT-26 |
18:17:56 | Zevv | Clyybber: you're giving away your age |
18:17:59 | Zevv | you're over 40, right? |
18:18:08 | FromGitter | <Clyybber> nah :P |
18:18:23 | narimiran | Zevv: rot **26** |
18:18:43 | Zevv | narimiran: yeah, I get the joke. But who knows about *rot* these days?! |
18:18:50 | Zevv | That's BBS-speak |
18:19:06 | Zevv | let me zmodem that |
18:19:34 | narimiran | ok, my IRL friends call me old and boring. but that people on IRC will also start to insult me.... :'( |
18:20:03 | Zevv | hush hush, we don't find you old and boringa |
18:21:10 | TheLemonMan | is young and boring any better? |
18:21:23 | Zevv | probably :) |
18:21:36 | narimiran | yaaay :P |
18:23:38 | FromGitter | <Clyybber> bitrot is the most secure cypher |
18:24:30 | Zevv | like in, tapes rotting away in moldy cardboard boxes? |
18:25:15 | FromGitter | <Clyybber> exactly |
18:25:35 | FromGitter | <Clyybber> also excuse my pun |
18:25:49 | Zevv | Well, according to Hawkins information never gets lost, so I guess it has to be reversible in some way |
18:29:04 | * | federico3 looks at the broken hard drive *sigh* |
18:29:52 | Zevv | That's the good thing about modern SSD drives: you never have bitrot. They just stop working alltogether from one second o the other. No more I/O errors or block retries. Just *dead* |
18:30:00 | FromGitter | <Clyybber> Zavv So if we were to define a function that advances the universe, it would be bijective |
18:30:37 | FromGitter | <Clyybber> a function with randomness, but still bijective |
18:30:43 | Zevv | Clyybber: I'm too drunk to answer that, I'll have to ask Z3 :) |
18:30:45 | FromGitter | <Clyybber> thats really weird to think about |
18:31:16 | FromGitter | <Clyybber> Z3: "42" |
18:31:20 | TheLemonMan | Z3 is a cat with a funny hat |
18:31:21 | Zevv | ghehe |
18:32:46 | FromGitter | <Clyybber> Zevv: Until someone implements a ssd driver literally rotating the bits... |
18:42:47 | Zevv | TheLemonMan: your quote is now in my README |
18:53:49 | TheLemonMan | woo, I'm internet-famous now |
18:54:59 | Zevv | i will send you five new fake internet points |
18:55:19 | TheLemonMan | also, fuck this shit, I found another bug |
19:06:11 | TheLemonMan | Araq, what does .gcsafe. mean when it is attached to a type? |
19:07:21 | Araq | it means Nim shuts up about Channel[string] and doesn't consider it gc-unsafe |
19:13:39 | TheLemonMan | thanks, I hate it |
19:14:46 | Araq | why? |
19:15:54 | TheLemonMan | it throws off the generic caching mechanism, I'm trying to understand why |
19:16:04 | * | nsf quit (Quit: WeeChat 2.3) |
19:22:03 | * | abm joined #nim |
19:22:40 | FromDiscord_ | <Avatarfighter> Can you do "var not in seq"? |
19:30:28 | Araq | v notin s |
19:31:29 | * | smitop joined #nim |
19:39:13 | * | stefanos82 quit (Remote host closed the connection) |
19:58:28 | * | zachk joined #nim |
20:24:11 | FromDiscord_ | <moerm> hello all |
20:25:54 | FromGitter | <harungo> Hello, can someone help: how to write next expression(which is from C++) in Nim ⏎ ⏎ `return ((h & 1) ? -u : u) + ((h & 2) ? -v : v);` ⏎ ⏎ where h is int and u, v is float [https://gitter.im/nim-lang/Nim?at=5c5f3752604f233ab6e0df0f] |
20:26:30 | * | Tyresc joined #nim |
20:26:42 | FromDiscord_ | <moerm> Nim team: Just a small (not urgent) observation: When working with a couple of files that have {.compile:"foo.c".} in them something seems to go wrong with Nims caching. I had a couple of cases where I had to delete the whole .cache directory for Nim to get it right |
20:27:14 | Zevv | harungo: return (if (h and 1): -u else: u) + (if (h and 2): -v else: v) |
20:27:14 | narimiran | @harungo (if h and 1 != 0: -u else: u) + <similar> |
20:27:21 | Zevv | I wouldn't call that good style, though |
20:27:43 | FromGitter | <harungo> @narimiran Thanks |
20:27:46 | FromDiscord_ | <moerm> Also Nim seems to happily ignore push, passC, pop combos (it uses what's passed in passC for *all* files) |
20:28:05 | * | Perkol quit (Quit: Leaving) |
20:29:20 | FromDiscord_ | <moerm> Zevv Yes, not good style but close enough to what C people want with foo : bar : baz constructs. |
20:29:48 | Zevv | c2nim :) |
20:29:54 | FromDiscord_ | <moerm> sorry, obviously meant foo ? bar : baz |
20:29:58 | Zevv | I see it missed the '!= 0', though |
20:30:32 | narimiran | btw, you can write a template if you really like `a ? b : c` syntax ;) |
20:30:39 | FromDiscord_ | <moerm> does c2nim handle those properly? And what does it produce? The short form or a proper nice multiline form? |
20:30:46 | Zevv | It produced my paste |
20:31:10 | Zevv | close, but no cigar |
20:31:42 | FromDiscord_ | <moerm> Now you broke my heart |
20:32:24 | Zevv | Second time today, first narimirans, now yours |
20:33:34 | FromDiscord_ | <moerm> His majesty, the dark shadow *g |
20:37:57 | FromDiscord_ | <moerm> "Zevv" comes from Lexx, no? Or did I get that wrong? |
20:38:33 | Zevv | Nah, it's from when I was 14 years old. "Executive producer: Zev Braun" at the end of each "Tour of Duty" episode :) |
20:39:06 | Zevv | I'm not that sophisticated, sorry |
20:39:54 | FromDiscord_ | <moerm> Ok, I see. I thought it was from the Lexx series. Anyway, you broke my heart and so I'll be angry for another 12 or so seconds |
20:40:10 | * | vlad1777d quit (Ping timeout: 246 seconds) |
20:40:23 | Zevv | (wait 12 seconds)... btw, read the manual/tutorial. Funny that something so mature and well documented is so obscure and unknown. It seems pretty useful for real-life tasks, but I never heard of it |
20:42:10 | FromDiscord_ | <moerm> Yes, I know some more quite unknown but really useful things. And yes, SetlX is really useful for certain real world tasks. And btw. the prof still maintains it |
20:42:27 | Zevv | I noticed, it's all pretty up to date |
20:44:17 | * | vlad1777d joined #nim |
20:45:29 | FromDiscord_ | <moerm> I also love the notation. It's very efficient. Sometimes with Coq (famous tool) one wastes lots of time and with SetlX it's done quickly. |
20:55:02 | Zevv | Question: I'm looking for a way to restrict a generic like this `foo[T1:bar|int, T2:bar|int](v1: T1, v2: T2)` so that it only matches when at least T1 or T2 is of type `bar`. |
20:55:34 | Zevv | I now create 3 instances, one (bar, bar), one (bar, int) and one (int,bar). Is this something I cna solve with concepts? |
20:59:46 | * | narimiran quit (Ping timeout: 246 seconds) |
21:10:42 | * | rockcavera quit (Ping timeout: 268 seconds) |
21:18:58 | * | aguspiza joined #nim |
21:26:35 | * | mbomba joined #nim |
21:27:50 | * | lritter quit (Quit: Leaving) |
21:46:30 | * | gangstacat quit (Quit: Ĝis!) |
21:51:54 | * | gangstacat joined #nim |
21:58:58 | * | smitop quit (Quit: Connection closed for inactivity) |
22:11:54 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
22:16:03 | * | Vladar quit (Remote host closed the connection) |
22:27:10 | * | vlad1777d quit (Ping timeout: 268 seconds) |
22:29:42 | FromDiscord_ | <Avatarfighter> how do you turn a spliced string from a seq to a string? |
22:30:29 | FromDiscord_ | <Avatarfighter> just kidding I got it |
22:31:31 | * | vlad1777d joined #nim |
22:36:07 | * | abm quit (Quit: Leaving) |
22:45:34 | * | aguspiza quit (Ping timeout: 244 seconds) |
22:55:45 | * | mbomba quit (Quit: WeeChat 2.3) |
23:44:32 | * | zachk quit (Changing host) |
23:44:32 | * | zachk joined #nim |