<< 09-02-2019 >>

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:03FromDiscord_<exelotl> oof I got a bogus SDL2_image.dll from MSYS2...
01:40:41FromDiscord_<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:43Araqhhmmm can we remove the 'Error: unreachable statement after 'return' statement or '{.noReturn.}' proc' message?
07:48:30AraqI only found it annoying, requires the 'if true: return' workaround
07:49:32FromGitter<GULPF> why not turn it into a warning instead
07:50:28Araqthat 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:37FromGitter<Varriount> Araq: I wouldn't mind it being taken away.
08:33:02*enow joined #nim
08:33:04enowHi
08:33:16enowWhat 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:57Araqenow: see this thread https://forum.nim-lang.org/t/4636
08:53:17enowthx
08:53:21Araqhttps://github.com/alaviss/nim.nvim
09:02:59narimiranbtw, that's only for neovim, not for vim
09:04:44Araqah ok but you can always upgrade
09:05:05AraqI like morpheusvim
09:06:01*neceve joined #nim
09:09:25*neceve quit (Client Quit)
09:10:09*neceve joined #nim
09:13:59ZevvAraq: 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:37Araqis this the Z3 I have been talking about?
09:14:46ZevvI guess so
09:14:50ZevvI learned about it during advent of code
09:15:21*aguspiza joined #nim
09:15:23ZevvAny 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:16Araqwell I noticed that 'converter' should have been an attribute
09:17:25Araqso that I can have converter templates
09:22:02Araqbut I don't like converters anyway and I think you should use an overloaded 'to' proc instead or an operator
09:23:20ZevvHm 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:33Zevvfor example, int or fp multiply use differet Z3_mk_mul or z3_mk_fp_mul
09:23:55Zevvand the Nim code does not keep track of the Z3_ast types.
09:24:01ZevvI'll try to drop the converters, thanks
09:26:38Araqyou're welcome
09:26:50Araqare you patching the compiler to use Z3?
09:27:18Zevvnot yet :)
09:27:35Zevvfor now I'm just happy I can solve sudokus
09:27:38Zevvone thing at a time
09:28:36Araqsudokus?
09:28:51Zevvthese silly puzzles: https://en.wikipedia.org/wiki/Sudoku
09:29:40*Vladar joined #nim
09:30:39Araqlol, I do know what sudokus are
09:30:52AraqI wonder why it requires Z3
09:31:08ZevvI doesnt
09:31:15Zevvbut its just a test case
09:31:33ZevvI give it the constraints and it solves the model
09:31:54ZevvSee latest test case in https://github.com/zevv/nimz3/blob/master/tests/test1.nim
09:51:55Araqpretty cool
09:55:39Zevvthat'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:24Araquh oh, bad bug in Nim's effect tracking found
10:36:35Araqthis will break tons of code :-(
10:37:19Zevv~
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:32narimiranhttps://erkin.party/blog/190208/spaghetti/ Nim is there too
11:43:24Zevv"Pascal family"
11:44:06narimiranwell, when i showed some nim code to my brother, the first thing he said: "so, this is some new-pascal?"
11:44:49ZevvMy colluagues always think I'm typing python
11:48:14Zevvbtw, 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:20Araqit's true, you can see Nim as a member of the Pascal family
11:52:00AraqModula 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:20ZevvIs there a way to create logical sections in a nimdoc generated document?
12:54:33ZevvSo that I can split up the procs/templates in parts that logically fit together?
13:01:34Araqwell you can reorder the procs, the docgen keeps the order. but I agree it sucks
13:03:52*Snircle joined #nim
13:04:38ZevvThat 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:05FromDiscord_<moerm> hello
13:29:14ZevvHi moerm
13:29:34FromDiscord_<moerm> (Yay! Modula 3 is a nice language but unfortunately all but dead)
13:30:16Araqah I'm just replying to you to enter the chat
13:30:30FromDiscord_<moerm> ??
13:34:53Araqhttps://forum.nim-lang.org/t/4636
13:36:22FromDiscord_<moerm> OK, read
13:36:37*ng0 joined #nim
13:37:54FromDiscord_<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:49FromDiscord_<moerm> So -> Textadept. Works everywhere, is quite programmable (Lua) and also has a cli/tui version.
13:39:10Araqsame here, tried plenty of them
13:39:20Araqnever tried Textadept though
13:39:38FromDiscord_<moerm> Oh, and: I still stink that you should have taken the ':=' from Modula :p
13:39:50FromDiscord_<moerm> Give it a try! It's really worth it
13:40:42Araqfrom the little usability testing I knew about the := was more confusing than helpful for Pascal
13:40:51FromDiscord_<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:57Araqfor example, it's const name = value in Pascal
13:41:15Araqand type name = desc too
13:41:57Araqthe := is too academic, I cannot write 'const 4 = myname' in Pascal anyway, the '=' has a direction
13:41:59FromDiscord_<moerm> The logic is *assignment*. Assignment is := (const is not assignment - but I agree that it's iconfusing some people)
13:42:43Araqsure assignment is different but it's "close enough"
13:42:44FromDiscord_<moerm> But hey, that := thing is a tongue in cheek remark, no serious criticism
13:43:12FromDiscord_<moerm> You are on linux, I guess?
13:43:19Araq*after* the assignment the equality holds :P
13:43:38FromDiscord_<moerm> *g
13:43:41Araqno, I'm either on Windows or OSX, depending on my mood
13:44:32FromDiscord_<moerm> -> https://foicica.com/textadept/ downloads are right on the top left
13:45:49FromDiscord_<moerm> building it is also comfortable. Just make deps (which automagically gets all dependencies), make, make install
13:46:02FromDiscord_<moerm> Takes just a couple of minutes
13:46:51Araqwhat UI library does it use?
13:47:19FromDiscord_<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:40FromDiscord_<moerm> I think gtk2 and/or 3. But I've heard no complaints from Mac people so far
13:47:57Araqwell Geany works well here too
13:49:44*vlad1777d quit (Ping timeout: 272 seconds)
13:49:45FromDiscord_<moerm> Would be an acceptable basic editor too (but textadept is easier to extend and program) very fast and quite small
13:50:30Araqwell kudos, textadept looks interesting
13:50:39FromDiscord_<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:10FromDiscord_<moerm> You are more than welcome, Araq.
13:51:13Araqyeah, I don't use vim... ;-)
13:51:24Araqmoerm: Zevv wrapped Z3 for us :D
13:52:27FromDiscord_<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:40FromDiscord_<moerm> We have a Z3 wrapper??? HURRAY!!!!!
13:53:04FromDiscord_<moerm> If we follow that, we/Nim will enter another league!
13:53:52FromDiscord_<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:37FromDiscord_<moerm> <- hands a bottle of virtual cognac (a good 64 bit variant) to Zevv
13:54:39Zevvmoerm: under development. I'm learning while wrapping, I might not be the best person to pick this up
13:54:45Zevvbut feel free to give it a spin
13:55:18FromDiscord_<moerm> I'm so f_cking deep in work right now, sorry. Will have no time before april 😦
13:55:22ZevvI'll update the nimble in a minute
13:55:28Zevvoh ok, then I'll update the nimble before april :)
13:55:41FromDiscord_<moerm> But I'll very gladly have a look and keep an eye on it
13:55:53Zevvhttps://github.com/zevv/nimz3
13:55:55FromDiscord_<moerm> Hey! Gimme a link!
13:55:57FromDiscord_<moerm> *g
13:57:45FromDiscord_<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:17FromDiscord_<moerm> And: We should pass ranges (domains) to Z3. That's helpful for Z3 and that's what we often want
13:58:31Zevvoh yes, but one step at a time
13:59:42FromDiscord_<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:58Zevvno no no, nim is not going towards verification with this
14:00:03ZevvI have no clue about Hoare triples
14:00:20ZevvI'm just solving sudokus :)
14:00:43*manjaro-user-- quit (Quit: Konversation terminated!)
14:00:59FromDiscord_<moerm> Haha
14:01:11ZevvI'm learing as I go, but formal verification is definitily over my head. I'm just a simple engineer
14:01:30Zevvwho happens to think Z3 is übercool to solve stuff I hate solving myself
14:01:31FromDiscord_<moerm> You make a good Sudoku solver and I'll turn it into an H3 Verifier
14:02:06ZevvWell, 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:19ZevvI'm open to all critique
14:02:52FromDiscord_<moerm> You bet that I'll be over it as soon as I have some time!
14:02:59Zevvgreat!
14:03:25FromDiscord_<moerm> What I'd need is *data* centric. I'm interested in vars and parameters
14:04:08FromDiscord_<moerm> I ~ verification
14:07:09Zevvand why is optimization a 'trap'
14:07:16Zevvits a valid use case, right?
14:07:24FromDiscord_<moerm> Absolutely!
14:07:31Zevvjust not for you :)
14:07:34FromDiscord_<moerm> I called it a trap in *our* context
14:08:19Zevvyeah I see. I'm just getting into the world of solvers; tons to learn, and I really miss the formal education here
14:08:40FromDiscord_<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:05ZevvI hate sudokus :)
14:09:19FromDiscord_<moerm> I can give you a hint you might like
14:09:46Zevvbut 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:58Zevvhints galore!
14:10:19FromDiscord_<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:42FromDiscord_<moerm> Nope, wrong. That would bring Nim WAY ABOVE Rust
14:10:48Zevvhehe
14:11:01FromDiscord_<moerm> Rust is but yet another approach to create a mem safe C
14:11:08ZevvI'm having problems finding xsetl, any links?
14:11:33FromDiscord_<moerm> It's basically just an application of seperation logic and a poor one at that
14:11:43FromDiscord_<moerm> ooops. give me second ...
14:13:23FromDiscord_<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:49FromDiscord_<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:55Zevvproblem with Z3 is that documentation is sparse and assumes the reader knows what it is all about
14:16:14Zevvbut the subject is intruiging indeed
14:16:38FromDiscord_<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:34ZevvSetlX tutorial seems like a good read, starts with the basics and building up
14:17:40FromDiscord_<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:33FromDiscord_<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:55FromDiscord_<moerm> Look:
14:19:52FromDiscord_<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:39FromDiscord_<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:07FromDiscord_<moerm> ---
14:22:08ZevvThese are the things I learned to heed by years of experiance in embedded software
14:22:42FromDiscord_<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:54Zevvand we are having all the fun, right :)
14:23:02FromDiscord_<moerm> Yes, but we are humans and humans err ...
14:23:04FromDiscord_<moerm> *g
14:23:12ZevvAnyway, I need to go pick the kids up and cook diner. Life is full of distractions
14:23:15Araqer nope
14:23:27AraqI'm working on a nasty Nim compiler bug
14:23:41FromDiscord_<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:52Zevvthanks!
14:23:53*Zevv is out
14:23:53Araqand then I will write my blog post about memory management
14:24:17FromDiscord_<moerm> ... and I'm looking forward to read it (and love the regions approach)
14:24:30Araqyeah, that one
14:24:35FromDiscord_<moerm> see you later, probably this evening. Have fun 😉
14:25:02Araqfound a twist with the regions that make them even more useful
14:25:27FromDiscord_<moerm> No need to make me hornier than I already am.... *g
14:25:38FromDiscord_<moerm> Looking much forward to read your new post
14:25:40FromDiscord_<moerm> cu later
14:25:47Araqbye
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:36FromGitter<brentp> https://gist.github.com/brentp/7d440560968c3ac97c40de17200e404a
17:27:05FromGitter<brentp> I am needing some fast, small sets on ints and was surprised which is faster in that comparison
17:27:39narimiranintsets? system.set?
17:30:08FromGitter<brentp> forgot about intsets. I just updated it.
17:30:14*rokups quit (Quit: Connection closed for inactivity)
17:30:26FromGitter<brentp> sets and intsets are 20X faster than the system.set
17:31:21narimiranwhat is this fuckery :D
17:31:53narimiranin debug mode, intsets are fastest, closely followed by hashsets
17:32:44FromGitter<brentp> so, you agree it's suprising that system.set is so slow?
17:33:03FromGitter<kaushalmodi> narimiran: Is fixing this issue right in your alley? https://github.com/nim-lang/Nim/issues/9102
17:33:08narimiran20x difference in debug, 10x in release mode
17:33:21FromGitter<brentp> I get 20X different in release
17:33:22FromGitter<kaushalmodi> given you recent doc look improvements
17:33:50narimiran@kaushalmodi yeah, i think we all can agree that something should be done about it
17:34:20FromGitter<kaushalmodi> @awr1 showed a nice improvement later in the comments in there
17:34:25FromGitter<kaushalmodi> but he didn't share the code
17:34:38narimiranyep :(
17:36:17*nsf joined #nim
17:36:59FromGitter<brentp> nearly all time is spent in system/sets/countBits32
17:38:48*TheLemonMan joined #nim
17:40:36FromDiscord_<juan_carlos> But the proc are different on that benchmark.
17:41:28narimiranthey look the same to me (but haven't really spend the time looking for some minor detail)
17:41:29FromDiscord_<juan_carlos> I remember critbit also does sets, just for completion.
17:41:51TheLemonManbrentp: it's the `card` method, not the sets heh
17:42:13FromGitter<brentp> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5f10f5adf6cb0b2c8e448a]
17:42:34FromGitter<brentp> that makes system.set almost 2x as fast.
17:42:41narimiranTheLemonMan saves the day, once again
17:42:44FromGitter<brentp> but still much slower.
17:43:22narimiran@brentp remove the asserts everywhere and prepare to be amazed :D
17:43:38FromDiscord_<juan_carlos> I like the fasterslower one :P
17:43:42FromGitter<brentp> hah. indeed.
17:44:05FromGitter<brentp> thanks @TheLemonMan
17:44:53TheLemonManthe compiler is not smart enough to recognize the popcount instruction
17:49:35FromGitter<brentp> with that change to cardSet and adding `.inline.` I get a 4X improvement. Worth opening a PR?
17:49:50TheLemonManlet's play a game :)
17:49:57FromGitter<brentp> for my use-case, I actually don't need `.card` so sets will be perfect.
17:50:21FromGitter<arnetheduck> reminds me of https://github.com/nim-lang/Nim/pull/9029
17:52:29TheLemonManbrentp, that change is wrong, you should not iterate over the whole array
17:53:23TheLemonManwell, unless your set is big enough (like in your case)
17:53:24FromGitter<brentp> hmm yeah. what's the len for?
17:53:35FromGitter<brentp> my set is actually fairly small.
17:53:56TheLemonMan65535 bits -> 8192 bytes, that's the maximum
17:54:39FromDiscord_<Avatarfighter> How does creating a TCP listener work?
17:55:19ZevvAvatarfighter: https://nim-lang.org/docs/asyncnet.html
17:55:45FromGitter<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:22TheLemonManbrentp, that's the lenght of the set in bytes
17:56:34FromDiscord_<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:57FromGitter<brentp> yes, but that seems to be fixed, eh?
17:57:12ZevvAvatarfighter: it's implicitly SOCK_STREAM/AF_INET, unless specified otherwise
17:57:18TheLemonManthe trick here is to crunch 4 bytes a time (a single u32) until len > 3 and then process the remaining bytes
17:57:39TheLemonManbrentp, nah, if a set[int8] is smaller than a set[int16]
17:57:48TheLemonMans/if//
17:58:04FromDiscord_<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:05Zevvwell, it's async :)
18:01:07FromDiscord_<Avatarfighter> I'm dumb, the advantage is that it's async lmao
18:01:18ZevvYour other choise are a) blocking/single connection or b) using threads
18:01:31FromDiscord_<Avatarfighter> lmaoo
18:01:38FromDiscord_<Avatarfighter> async it is
18:01:51ZevvI usually prefer thumb tacks to the forehead over threads
18:01:55Zevvso async makes me happy
18:02:00FromDiscord_<Avatarfighter> lmao
18:02:09FromDiscord_<Avatarfighter> you would hate one of my bots
18:02:20FromDiscord_<Avatarfighter> i could've gone async but its like 100 threads for 100 bots
18:02:24ZevvI probably just wouldn't understand it
18:02:30FromDiscord_<Avatarfighter> haha
18:02:34ZevvI decided long ago that i am by far not smart enough for threads
18:03:18FromDiscord_<Avatarfighter> tbh I dont understand threads, I just shove while loops in them and hope they don't exit the loop
18:03:28ZevvYeah, that's the simple part
18:04:12ZevvIn the beginning it is always obvious and straightforward
18:04:19FromDiscord_<juan_carlos> hahaha
18:04:29FromGitter<brentp> I opened an issue for the sets.card: https://github.com/nim-lang/Nim/issues/10617
18:04:41Zevvbut somehow I always end up with blood on the walls and myself drunk in a dark alley
18:04:46FromDiscord_<Avatarfighter> LOL
18:05:13FromDiscord_<Avatarfighter> im about to have the most ghetto proxy for this game
18:05:33FromDiscord_<juan_carlos> Oh, it was the threads that cause that, now I know. :P
18:05:43FromDiscord_<Avatarfighter> Its always the threads
18:06:39FromDiscord_<Avatarfighter> https://cdn.discordapp.com/attachments/536305137547739176/543854799293120540/2pu07ghm7kf21.png
18:06:50FromDiscord_<Avatarfighter> Words to live by
18:07:33FromDiscord_<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:13FromDiscord_<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:40Zevvmoerm: 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:39ZevvIt is consice, pretty powerful, multiparadign, and might even be useful in real life for who knows what
18:11:48Zevvand yet, I have never heard about it before
18:12:04FromDiscord_<Avatarfighter> Is there a developed crypto lib for nim, one that contains hashes and ciphers?
18:12:35ZevvAvatarfighter: tons, check nimble
18:12:54Zevvthere's openSSL bindings, and some native as well
18:13:06FromDiscord_<Avatarfighter> Will do, I'm looking for ARC4 sadly and that one isn't implemented a ton
18:13:35ZevvEVP bindings for openssl should provide that
18:14:23Zevv"4 years ago", that's not good news
18:15:01FromDiscord_<Avatarfighter> i think ill just manually remake it cx
18:15:07TheLemonManRC4? What year is it? 1999?
18:15:11FromDiscord_<Avatarfighter> yes
18:15:20FromDiscord_<Avatarfighter> Flash games have top security
18:15:25Zevvwell, there's the default openssl bindings from the stdlib, not sure how much you'd need to push that to do rc4
18:15:55Zevvrc4 is the shit
18:16:09FromDiscord_<Avatarfighter> rc4 is most secure cipher 10/10
18:16:14FromDiscord_<Avatarfighter> /s
18:17:00FromDiscord_<juan_carlos> ROT-26
18:17:33FromGitter<Clyybber> im so cool i can read ROT-26
18:17:56ZevvClyybber: you're giving away your age
18:17:59Zevvyou're over 40, right?
18:18:08FromGitter<Clyybber> nah :P
18:18:23narimiranZevv: rot **26**
18:18:43Zevvnarimiran: yeah, I get the joke. But who knows about *rot* these days?!
18:18:50ZevvThat's BBS-speak
18:19:06Zevvlet me zmodem that
18:19:34narimiranok, my IRL friends call me old and boring. but that people on IRC will also start to insult me.... :'(
18:20:03Zevvhush hush, we don't find you old and boringa
18:21:10TheLemonManis young and boring any better?
18:21:23Zevvprobably :)
18:21:36narimiranyaaay :P
18:23:38FromGitter<Clyybber> bitrot is the most secure cypher
18:24:30Zevvlike in, tapes rotting away in moldy cardboard boxes?
18:25:15FromGitter<Clyybber> exactly
18:25:35FromGitter<Clyybber> also excuse my pun
18:25:49ZevvWell, 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:52ZevvThat'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:00FromGitter<Clyybber> Zavv So if we were to define a function that advances the universe, it would be bijective
18:30:37FromGitter<Clyybber> a function with randomness, but still bijective
18:30:43ZevvClyybber: I'm too drunk to answer that, I'll have to ask Z3 :)
18:30:45FromGitter<Clyybber> thats really weird to think about
18:31:16FromGitter<Clyybber> Z3: "42"
18:31:20TheLemonManZ3 is a cat with a funny hat
18:31:21Zevvghehe
18:32:46FromGitter<Clyybber> Zevv: Until someone implements a ssd driver literally rotating the bits...
18:42:47ZevvTheLemonMan: your quote is now in my README
18:53:49TheLemonManwoo, I'm internet-famous now
18:54:59Zevvi will send you five new fake internet points
18:55:19TheLemonManalso, fuck this shit, I found another bug
19:06:11TheLemonManAraq, what does .gcsafe. mean when it is attached to a type?
19:07:21Araqit means Nim shuts up about Channel[string] and doesn't consider it gc-unsafe
19:13:39TheLemonManthanks, I hate it
19:14:46Araqwhy?
19:15:54TheLemonManit 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:40FromDiscord_<Avatarfighter> Can you do "var not in seq"?
19:30:28Araqv 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:11FromDiscord_<moerm> hello all
20:25:54FromGitter<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:42FromDiscord_<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:14Zevvharungo: return (if (h and 1): -u else: u) + (if (h and 2): -v else: v)
20:27:14narimiran@harungo (if h and 1 != 0: -u else: u) + <similar>
20:27:21ZevvI wouldn't call that good style, though
20:27:43FromGitter<harungo> @narimiran Thanks
20:27:46FromDiscord_<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:20FromDiscord_<moerm> Zevv Yes, not good style but close enough to what C people want with foo : bar : baz constructs.
20:29:48Zevvc2nim :)
20:29:54FromDiscord_<moerm> sorry, obviously meant foo ? bar : baz
20:29:58ZevvI see it missed the '!= 0', though
20:30:32narimiranbtw, you can write a template if you really like `a ? b : c` syntax ;)
20:30:39FromDiscord_<moerm> does c2nim handle those properly? And what does it produce? The short form or a proper nice multiline form?
20:30:46ZevvIt produced my paste
20:31:10Zevvclose, but no cigar
20:31:42FromDiscord_<moerm> Now you broke my heart
20:32:24ZevvSecond time today, first narimirans, now yours
20:33:34FromDiscord_<moerm> His majesty, the dark shadow *g
20:37:57FromDiscord_<moerm> "Zevv" comes from Lexx, no? Or did I get that wrong?
20:38:33ZevvNah, it's from when I was 14 years old. "Executive producer: Zev Braun" at the end of each "Tour of Duty" episode :)
20:39:06ZevvI'm not that sophisticated, sorry
20:39:54FromDiscord_<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:23Zevv(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:10FromDiscord_<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:27ZevvI noticed, it's all pretty up to date
20:44:17*vlad1777d joined #nim
20:45:29FromDiscord_<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:02ZevvQuestion: 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:34ZevvI 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:42FromDiscord_<Avatarfighter> how do you turn a spliced string from a seq to a string?
22:30:29FromDiscord_<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