<< 13-06-2020 >>

00:00:22FromDiscord<Rika> warnings?
00:00:28FromDiscord<Rika> about what
00:00:47FromDiscord<Rika> if its something like a deprecation warning then theres not much you can do about it no>
00:00:50FromDiscord<Rika> since the os is old
00:02:36shashlick```lib/libcrypto.a(ct_vfy.o)) was built for newer OSX version (10.14) than being linked (10.13)```
00:04:25FromDiscord<Rika> supporting older operating systems sounds like a pain...
00:28:46FromDiscord<--HA--> Is it possible to change a stdlib proc to my own version? Something like monkey patching in ruby?
00:29:46shashlickWell if they compiled binaries on an older osx, it would work for anyone
00:30:29FromDiscord<Rika> @--HA-- depends on whether it is in system or not
00:30:48zedeusyou can monkey patch entire modules
00:31:07zedeusand you can import a module except some symbols
00:31:36zedeusie. `import stdlib except replace`
00:31:37*konradmb joined #nim
00:33:58FromDiscord<--HA--> Nice. So I would import except the proc I'd like to be different and then just rewrite that one in my own code?
00:34:04zedeusyep
00:37:46FromDiscord<--HA--> I only want to make a very small change but I guess there is no way around copy & pasting the whole orginal proc? It's not someting I can easily do with the result, the change has to go in "the middle"
00:37:55zedeusno
00:38:26FromDiscord<--HA--> Ok, thanks!
00:40:41*bung joined #nim
00:41:58*a_chou joined #nim
00:44:04*konradmb quit (Remote host closed the connection)
00:44:17*konradmb joined #nim
00:45:10*bung quit (Ping timeout: 258 seconds)
00:54:13*a_chou quit (Quit: a_chou)
00:59:42FromDiscord<--HA--> Can I force the import of a proc that is not marked with a `*`?
01:05:17FromDiscord<Rika> include instead of import
01:05:58FromDiscord<Generic> can you import only certain symbols?
01:07:56FromDiscord<Rika> from module import symbol
01:08:55FromDiscord<Generic> I meant include
01:09:04FromDiscord<Generic> it's already too late in the night
01:09:29FromDiscord<Generic> if you would include a complete stdlib package, that sounds like a lot of trouble
01:11:13FromDiscord<Rika> it is
01:11:24FromDiscord<Rika> usually you shouldnt include
01:15:01*vicfred quit (Quit: Leaving)
01:15:47FromDiscord<Varriount> Anyone seen any interesting programming articles/papers lately?
01:20:28disruptekzedeus: what's up my dude?
01:20:42zedeustrying to make httpbeast useful in production settings
01:20:49zedeusI'm very close, but getting some stalled futures
01:21:17disruptekno point.
01:21:17zedeusI can explain the problem and my progress if you got time
01:21:21disrupteksure.
01:21:31disruptekwhat's a stalled future look like?
01:21:35zedeushttps://github.com/dom96/jester/issues/248
01:21:37disbotCrosstalk between different HTTP requests ; snippet at 12https://play.nim-lang.org/#ix=2p2i
01:21:58disrupteklol
01:22:10zedeushttps://github.com/dom96/httpbeast/blob/master/src/httpbeast.nim#L93
01:22:58zedeusit releases file descriptors when the client disconnects, which leads to reusing the same fds for ongoing requests where the event loop hasn't finished yet
01:24:25zedeusone sec, I'll make a fork so you can see the solution
01:25:34*adnan338 joined #nim
01:25:52disrupteki really don't know why you aren't using lambda yet.
01:25:56zedeushttps://github.com/zedeus/httpbeast/commit/fe2b466058171d5b22e3352fc7235bcc30b0c248
01:27:11zedeusthese conditions might seem a bit strange, but it took many hours to reach this, covers lots of edge cases
01:27:34*oddp quit (Ping timeout: 240 seconds)
01:27:50zedeusthe problem now is if you fire a bunch of requests at the same time, some futures may never complete for whatever reason, leading to onRequestFutureComplete never being called
01:28:30adnan338Hi is there any example on mutex/RwLock? All I could find was locks but I want to see some example on nim locks before trying to solve my problem at hand. I have to download a list of items and everytime a download finishes, I want to update a mutext value. And whenever there is an update to that mutex value, I want to invoke a callback. I tried creating a listener but I am stupmed by the dynamic nature of the callback: https://play.
01:28:30adnan338nim-lang.org/#ix=2p2j (of course, callbackArg is not a static value)
01:28:54disrupteki think the original comment was correct, now?
01:29:06disruptekno?
01:29:08disruptekrather.
01:29:32zedeusline 312? yeah I misunderstood that
01:29:45zedeusmaybe
01:31:26disruptekmy guess is that you have multiple events in a single select raise, and you somehow aren't iterating over all of them.
01:31:31*konradmb quit (Read error: Connection reset by peer)
01:31:47*konradmb joined #nim
01:32:01disruptekyou can get multiple events in a single, uh, event.
01:32:08disruptekfrom a single select call, i mean.
01:32:21disruptekit's just a guess.
01:32:35disrupteki honestly would throw all this stuff in the trash.
01:32:54disruptekto me it's just not worth fucking with.
01:33:14disrupteki would rather engineer around the software with engineering that is designed for scale.
01:33:21zedeusit's the default jester backend, and therefore thus default nim web server, so it would be nice to not have a de facto web server with a giant security hole
01:33:38disrupteksure. so write a new one.
01:33:45zedeusnah, ain't got time for that
01:33:46disruptekit's not like you aren't skilled enough to do it.
01:34:11disruptekwell there's no point in supporting either stdlib or jester.
01:34:19disruptekneither will be used going forward.
01:34:29zedeushow's yourang going
01:34:54*konradmb2 joined #nim
01:35:00disruptekhaven't been focused on it, but it's designed for cps, so it's not relevant.
01:35:25disruptekstill, it /could/ conceivably be used with weave if you want to do a proper http server.
01:35:27zedeusio_uring showed promising performance for web servers
01:35:35*konradmb2 quit (Read error: Connection reset by peer)
01:35:49*konradmb quit (Read error: Connection reset by peer)
01:35:54disruptekof course; it's zero-copy async and supports practically unlimited threads.
01:36:22*konradmb joined #nim
01:36:42disruptekmy advice: use sync.
01:37:44zedeusthe events never have more than one event btw
01:37:55zedeusin this case, that is
01:38:08adnan338I'll post this on the forum
01:38:09disruptekwell, that's good.
01:41:00disruptekadnan338: just take out the "with:" argument.
01:41:07disruptekyou have an extra parameter.
01:41:09*konradmb quit (Client Quit)
01:41:36adnan338disruptek well I need to update the value "with"
01:41:39adnan338a new one
01:42:10disruptekwell, you don't call the update proc with more than two arguments.
01:43:18disruptekhttps://play.nim-lang.org/#ix=2p2j
01:43:32disruptekoops. https://play.nim-lang.org/#ix=2p2n
01:44:08disruptekzedeus: how many requests do you get per second?
01:44:29zedeusfor nitter?
01:44:33disruptekyeah.
01:44:38zedeus~30-100
01:44:38disbotno footnotes for `30-100`. 🙁
01:44:56zedeuswell, that + media, so a few hundred
01:45:33disrupteki would just put it behind api gateway and use lambda. i can show you how i do it if you want.
01:45:46zedeusI finished the (almost) zero-copy media proxying btw, works very well
01:46:08disrupteknice.
01:46:20zedeusnah I'm good, I like the traditional web server setup. besides there are 13 other nitter instances, it needs to just work
01:46:20disruptekyou proxy media just to beard the user?
01:46:34zedeusthe whole point is privacy, so proxying is a must
01:47:12disruptekwell, then i recommend you use a real web-server.
01:47:35zedeusI just got closer to finding the issue, but it's weird
01:48:21disruptekwhat do the stalled futures look like?
01:48:24zedeusthe callback assigned to the futures has the correct file descriptor, but inside the callback it's sometimes the previous one
01:48:51zedeusie when printing callback assignment, we get 1 2 3... but printing the fd inside the callback, we sometimes get 1 2 2
01:49:16disruptekis this arc?
01:49:21zedeusnope
01:50:44disruptekso the dispatcher is stupid.
01:50:54zedeusseems like it
01:53:31disruptekis getFd() yielding different values between invocations?
01:55:38zedeusgetFd isn't used here
01:55:47zedeushttps://github.com/zedeus/httpbeast/blob/master/src/httpbeast.nim#L226
01:56:09disrupteklemme clone this stupid thing.
01:56:11zedeusechoing fd right here you get the right one, echoing inside the callback it's wrong (sometimes)
01:56:23*Satomi-Kowa joined #nim
01:56:26disruptekyour callback gets called with the wrong fd?
01:56:34disruptekbut the right number of times?
01:56:58zedeuseither the closure somehow gets the wrong fd, or it calls the wrong callback
01:57:09disrupteki'm on your branch.
01:57:38disruptekso it's line 242; you add it and it has the right fd?
01:57:56zedeushttp://ix.io/2p2q
01:57:58zedeushere
01:58:23zedeusadd an `echo fd` inside the callback
01:58:56zedeusrun the server, then `for i in {0..100}; do (curl localhost:8080) &; done` or something similar
01:59:16zedeusthen `lsof -n (whatever the process is called)`
01:59:38zedeusthe last line has the file descriptor still open, find that number in the output
01:59:47disruptekkk
02:00:27zedeusalso comment out the polling on line ~320 to make it easier to read
02:00:59zedeusthen you should get a mostly sequential list of "done: fd" followed by a mostly sequential list of fds, but some of them are duplicated
02:01:17*chemist69 quit (Ping timeout: 260 seconds)
02:01:36disruptekgimme a sec to set this shit up. i guess i don't have a working pm.
02:02:45disruptekdo i have to give it options or something?
02:02:54*chemist69 joined #nim
02:03:25zedeusnope, just `nim c -r http.nim`
02:04:10disruptekit cannot even find its own source.
02:04:12disruptekridiculous.
02:06:52disruptekdo i need different build flags? i'm not seeing any open fd.
02:07:26zedeustry opening 200 requests at once instead, it's not deterministic
02:10:01disrupteki never see anything open.
02:10:27zedeusdid you switch to the stop-talking branch?
02:10:34disruptekyeah.
02:10:38zedeushmm
02:11:47*adnan338 quit (Ping timeout: 260 seconds)
02:11:52disruptek12 threads, danger, nothing open.
02:11:55disruptek10,000 queries.
02:11:57zedeusoh, do 1 thread
02:12:13zedeusdanger off, let it go slow
02:12:37disruptekhow do i limit threads?
02:12:42zedeus--threads:off
02:13:06disruptekstill nothing.
02:13:29disrupteki'm polling lsof every .1 sec.
02:14:07disruptekwhich kernel are you on?
02:14:23zedeus5.6.14
02:14:38disruptekdone 4095
02:15:17disrupteki think 100000 processes hung something.
02:15:23zedeushah
02:15:30zedeusI'll try to reproduce on my laptop
02:16:13disruptekit's using 30gb of memory.
02:17:19disrupteknow it says the following, and i quote:
02:17:22disruptekltcocetao l dthl ooot scolta o lccphoaoonlrsnhtteo cs8ptt 0o t8rpto 0o 8:rlt0 o88Cc00oa:8nln 0heCc:too ninsCoetonc n tpntioeiorcmntte idt8o i0nom8 ue0ttd:i
02:17:27zedeusamazing
02:17:49disrupteki know; how does it know i speak finnish?
02:17:52zedeusI think that's supposed to say Hello World, but I could be wrong
02:18:07disruptekalso,
02:18:09disruptekrll:ie d(i l2lte8l(eod )d 2c t8oFto)nao ni cFelcoaceonitdnnl neettecdooct t tlc toooto cno can lolelonhcocnotcaes alcttlht oho p ostolstorotc t apl ploo8ohrc0rota8ts l0 t8h:8 0o 0p8sC8o0to0r: n:t pno CerC8octo0nt n8ni8n0eo0e:cn8c t 0tCti:ioio onmnCnone nedttnc iietommciueedtotd in
02:18:22zedeusi think it's trying to explain the problem
02:19:13disruptekafaict there's no problem.
02:19:47disruptek$ sum src/httpbeast.nim
02:19:53disruptek62854 16
02:20:28zedeus❯ sum httpbeast.nim
02:20:30zedeus29954 16
02:21:23disruptekwut
02:23:02zedeuspushed a commit with the minor changes
02:23:03disruptekwhich asynctools?
02:23:17disruptek41127
02:23:20zedeus41127 16
02:23:42zedeusasynctools#pr-fix-compilation
02:24:01disrupteki'm using leorize's nightly build. last night.
02:24:07disrupteknim, that is.
02:24:34zedeusmine is 4 days old, should be equal
02:25:05zedeussame happens with 1.2.0
02:25:23*Satomi-Kowa quit (Quit: Connection closed)
02:25:28disrupteknow it exh fds.
02:27:18disrupteksometimes it segvs on callback.
02:27:40disruptekare you running boehm?
02:28:02zedeusnope, all default
02:28:51*bung joined #nim
02:29:44disruptekboehm seems more stable.
02:30:10zedeusboehm doesn't work
02:30:17disruptekseems correct to me.
02:30:36zedeusin this small example it works, but for nitter it doesn't
02:30:44disruptekwhy?
02:32:02zedeushttp://ix.io/2p2v
02:32:05zedeusi dunno
02:32:16zedeusalso, with boehm it still messes up callbacks
02:32:46disruptekyou need a better test.
02:33:23zedeusalright, I'll tear httpbeast apart to make a minimal example
02:33:50disruptekwhat kinda hardware are you on?
02:34:07*bung quit (Ping timeout: 246 seconds)
02:34:24zedeusi5-6600K
02:35:06disrupteki have no idea what that means, honestly.
02:35:17*r4vi quit (Read error: Connection reset by peer)
02:35:23disrupteki only know about hardware when i build a new machine.
02:35:31disruptekLinux olive.disruptek.com 5.6.15-gentoo-2005312150-auto #3 SMP Sun May 31 21:54:39 EDT 2020 x86_64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz GenuineIntel GNU/Linux
02:35:31zedeusmid-tier intel cpu from 2016
02:35:45zedeusLinux gibson 5.6.14-arch1-1 #1 SMP PREEMPT Wed, 20 May 2020 20:43:19 +0000 x86_64 GNU/Linux
02:35:47disrupteki think this is from 2018 maybe.
02:36:27disruptekhack the planet
02:36:38zedeushell yeah
02:36:58disrupteki was just talking about william gibson to someone.
02:37:24disruptekyou know he plagiarized a lyric from disposable heroes in his Idoru, from like '94.
02:37:26disruptekprick.
02:37:32zedeushorrible
02:37:35zedeusgreat guy though
02:37:41disruptekyeah, swell fellah.
02:38:27disruptekto this day i don't think i've ever seen him called out on it.
02:41:12disruptekcould your preempt kernel have something to do with it?
02:41:19zedeusjust ran it on a VPS, still happens
02:41:31zedeusLinux nitter 4.18.0-147.5.1.el8_1.x86_64 #1 SMP Wed Feb 5 02:00:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
02:41:49disruptekso your fix doesn't fix it?
02:41:55*surma quit (Ping timeout: 272 seconds)
02:41:59zedeusI don't have a fix for this
02:42:01disruptekdoes the stock branch exhibit the problem, too?
02:42:10zedeusno, it doesn't use the callback
02:42:35zedeuswell, I haven't tried echoing in it to look for this specific problem
02:45:27zedeuscompiled using a fresh nim devel on my laptop, also happens there
02:45:39zedeusare you sure you're using the cloned httpbeast?
02:45:53disruptekwe compared checksums.
02:46:40zedeusdo you get the cb output?
02:46:45disruptekyep.
02:47:03zedeusguess your cpu has no time for this bullshit then
02:47:11*mono joined #nim
02:47:35disrupteki could use a proper load tester.
02:47:46zedeussure, throw wrk at it
02:48:12disruptekaight
02:49:30disruptek284907 requests in 10.10s, 28.80MB read
02:49:31*monokrom quit (Ping timeout: 246 seconds)
02:49:39disruptekSocket errors: connect 0, read 9, write 0, timeout 0
02:50:07zedeuswrk or wrk2? default settings?
02:50:15*bung joined #nim
02:50:25disruptekwrk just wrk.
02:50:29disruptekone thread
02:51:04disruptek10 threads:
02:51:09zedeusI got a segfault
02:51:09disruptekSocket errors: connect 0, read 15, write 4264836, timeout 0
02:51:25zedeusSocket errors: connect 0, read 46, write 110599, timeout 0
02:51:28disruptekyeah, me too.
02:53:12zedeusline 179 `if data == nil: continue`
02:53:19zedeusprobably a race condition
02:53:40disruptekit's interesting that it crashes after finishing on fd 4094 with siege and my adhoc curl test with 100k processes.
02:53:49zedeus341270 requests in 10.00s, 34.50MB read
02:53:51zedeusSocket errors: connect 0, read 71, write 0, timeout 0
02:54:12zedeus2 sockets still open
02:54:52*FromDiscord quit (Remote host closed the connection)
02:54:58*endragor quit (Remote host closed the connection)
02:55:05*FromDiscord joined #nim
02:55:27disrupteklet me know when you decide to start from scratch.
02:55:44zedeuslol
02:56:01disruptekError: unhandled exception: /home/adavidoff/nims/nightly/lib/pure/ioselects/ioselectors_epoll.nim(150, 11) `s.fds[fdi].ident == InvalidIdent` Descriptor 54 already registered [AssertionDefect]
02:56:39disruptekError: unhandled exception: Bad file descriptor (code: 9) [IOSelectorsException]
02:56:44*muffindrake quit (Ping timeout: 256 seconds)
02:56:47zedeusI've gotten those but fixed them using those conditions, I'm not getting them now though
02:56:54disruptekError: unhandled exception: /home/adavidoff/nims/nightly/lib/pure/ioselects/ioselectors_epoll.nim(150, 11) `s.fds[fdi].ident == InvalidIdent` Descriptor 53 already registered [AssertionDefect]
02:57:20disruptekError: unhandled exception: Bad file descriptor [OSError]
02:57:34disruptekthere's a reason i don't use dom's code.
02:57:42disruptekwell, there are multiple reasons.
02:58:48*muffindrake joined #nim
02:59:09disruptekanyway, i wanna try to fix closure mangling tonight. lemme know if you come up with another idea and i'll pop back.
02:59:28zedeussure thing, thanks
03:03:07*surma joined #nim
03:05:19*endragor joined #nim
03:06:58PrestigeHey disruptek the other day we spoke about that xlib call to get a string. I found a way to do it with using alloc0, but I have to init a string with a particular size. Do you think there's another way to do it, so I wouldn't have to give it an initial size? https://0x0.st/iWzG.png
03:07:58disruptek`addr str` is a shorter way to `str[0].addr`
03:08:11disruptekand, no, you cannot alloc a "whatever you need" quantity.
03:08:18PrestigeCool, thanks
03:08:35disruptekjust do it in one statement:
03:09:05disruptekpropReturn = cast[ptr cstring](alloc0 300)
03:09:28PrestigeThen I need to dealloc propReturn yeah?
03:09:32disruptekthe alloc0 zero's it so that you don't need to worry about terminating it.
03:10:00disruptekyes, dealloc it in a finally around the call.
03:10:34disruptekor do it your way. it's fine, too. nim objects are zero'd automagically. 👍
03:11:16PrestigeAnd in my way I don't have to worry about dealloc, I think
03:11:32disruptektrue, for whatever that's worth.
03:12:32disrupteki'm going to reimplement nimph as a pragma.
03:13:11disruptek{.nimph: "https://github.com/disruptek/openapi".} will install the package and import it.
03:14:01*endragor quit (Ping timeout: 264 seconds)
03:14:19disrupteki'm tired of this shit.
03:18:11*r4vi joined #nim
03:19:09shashlickHow come
03:29:15*endragor joined #nim
03:45:52disruptekhow come i'm tired?
03:47:14*r4vi quit (Ping timeout: 240 seconds)
03:48:52*surma quit (Ping timeout: 256 seconds)
03:49:17disruptekbecause my package manager is always broken due to one reason or another.
03:49:36disruptekright now it's compiler bugs, apparently.
03:50:15disruptektime to embed the pm in the compiler so it can be safe.
03:52:42*surma joined #nim
04:02:46*Senny quit (Ping timeout: 256 seconds)
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:06:36*supakeen joined #nim
04:10:58*surma quit (Ping timeout: 256 seconds)
04:14:59*surma joined #nim
04:16:20*r4vi joined #nim
04:30:55FromDiscord<tyler569> I've been trying to use nim for some freestanding work (os:standalone, gc:none), and from time to time I'll hit a `Error: system module needs:` error - I recognise that I can't use some things, but is there any way to know what I'm going that triggers the error?↵Right now I'm stuck with one of these on some new code I wrote and I can't for the life of me figure out what I'm doing that doesn't work freestanding
04:31:24FromDiscord<Rika> i assume anything that needs strings, seqs, or ref types
04:32:26FromDiscord<tyler569> this specific example uses none of those. I have an openArray but it's commented out as I try to find what's the cause
04:33:41FromDiscord<tyler569> well I found the problem
04:34:02FromDiscord<tyler569> passing a `'x'` to a proc that takes a `char` apparently requires `appendString`
04:39:42FromDiscord<Rika> huh, sounds dumb
04:39:59FromDiscord<Rika> are you sure? have you tested a proc w/o contents
04:40:28FromDiscord<tyler569> I can, I just realized the error may be masked by dead code elim if I remove the call
04:41:12FromDiscord<tyler569> okay yeah 'x' -> char works in a simple case
04:41:20FromDiscord<tyler569> hm
04:43:00FromDiscord<Rika> check if any of the procs you're using has a default parameter w/ a string
04:43:11FromDiscord<Rika> or uses a string internally
04:45:27FromGitter<Knaque> Is there a difference, if any, between `nim secret` and INim? At first glance they seem to be functionally identical.
04:45:51disruptekone is supported and the other is not.
04:46:16zedeusnim secret uses the vm, inim recompiles for every line
04:46:28FromDiscord<tyler569> sent a code paste, see http://ix.io/2p2E
04:46:38FromDiscord<tyler569> Port being a `distinct uint16`
04:46:50FromGitter<Knaque> Right, okay. Thank.
04:46:56FromGitter<Knaque> Plural.
04:47:22*adnan338 joined #nim
04:53:00disrupteklol unittest breaks mangling.
05:01:54disruptekyuk, i get to figure out exported symbols that collide with similar generated symbols in adjacent modules.
05:03:06disrupteki swear it's like no one thinks this stuff through...
05:04:20zedeusthis callback issue is seriously weird
05:04:23zedeusI'm beginning to think it's a closure bug
05:04:51FromDiscord<JSGrant> @Zachary Carter Sorry, ended up passing out last-night; But the focus on HCR is actually one of the reasons I'm a bit more excited for Frag over the other options I've seen tbh
05:05:05disruptekit won't surprise me if there's a bug in the async impl.
05:05:14disruptekit's kinda obtuse and needlessly complex.
05:06:12zedeusin asyncfutures `addCallback` I added an argument for the fd to echo it inside the callback, which then calls the passed callback (onRequestFutureComplete)
05:06:30zedeusthe callback created by addCallback has the correct id, but the one passed in does not
05:06:40zedeusdespite being created on the same line using the same fd variable
05:06:49FromDiscord<JSGrant> Generally though, I'm very excited / hopeful that Nim will eventually eat Python's lunch in-terms of Gamedev; HCR or not -- hot-code reloading just makes things a LOT more attractive to me lol
05:13:53*endragor quit (Remote host closed the connection)
05:15:34*endragor joined #nim
05:20:40*endragor quit (Ping timeout: 256 seconds)
05:25:23disruptekzedeus: neat.
05:26:42zedeusI can't make any sense of this
05:26:54disrupteksounds like a race condition against the env.
05:27:50disruptekit's very possible that we don't have anything high-throughput that actually tests an env value to make sure it comes through unscathed.
05:28:07disrupteki wonder why i cannot repro it.
05:28:44disruptekmy kernel is somewhat hardened; maybe that has something to do with it.
05:28:58zedeusdo you have another machine available?
05:29:22disrupteksure, but i am crashing. i will try it on a cloud box tomorrow.
05:29:32zedeuscool, same here
05:30:58disrupteki have a t3.nano which should be about as slow as they come.
05:31:00disruptekttfn
05:31:26zedeusgn buddy
05:32:01*solitudesf joined #nim
05:36:48FromDiscord<Technisha Circuit> How would i log all of my console to a site so my friend can see the errors while I'm away?
05:37:45FromDiscord<Rika> what
05:38:06FromDiscord<Rika> i think you need a custom solution for that
05:38:08FromDiscord<Technisha Circuit> I basically want to pipe all output to stdin to a site where it gets logged
05:38:10FromDiscord<Technisha Circuit> Oof
05:38:14FromDiscord<Rika> aka you need to host a site that'd allow you to do that
05:38:21FromDiscord<Technisha Circuit> Ooof okay
05:38:24FromDiscord<Rika> okay wait
05:38:25FromDiscord<Rika> idea
05:38:39FromDiscord<Rika> @Technisha Circuit where is this output coming from
05:38:46FromDiscord<Rika> a server or your phone
05:39:07FromDiscord<Technisha Circuit> My phone :P
05:39:10zedeusthis is like 4 lines of code with jester
05:39:13FromDiscord<Technisha Circuit> xD
05:40:28FromDiscord<Rika> yeah
05:40:33FromDiscord<Rika> baiscally what zed said
05:41:25FromDiscord<Technisha Circuit> So how would i redirect everything from stdin to the site then? Using a txt file that just logs everything?
05:41:56zedeusdon't use stdout, add to a file or use the logging module that can do it for you
05:42:05FromDiscord<Rika> basically `program > some file` then run a webserver to serve that file, im guessing
05:42:28FromDiscord<Technisha Circuit> Oh okay
05:42:46zedeusif you're talking about crashes, you can do `program >> file` or `program | tee -a file`
05:44:02FromDiscord<Rika> was gonna suggest tee, but this is on a phone
05:44:04FromDiscord<Rika> no clue if tee's there
05:44:18zedeusif they're running nim on it, tee is probably there
05:47:21*endragor joined #nim
05:47:23*waleee-cl quit (Quit: Connection closed for inactivity)
05:51:31*endragor quit (Ping timeout: 246 seconds)
05:53:22*adnan338 quit (Ping timeout: 258 seconds)
06:03:11*adnan338 joined #nim
06:10:51*adnan338 quit (Read error: Connection reset by peer)
06:15:01*ftsf joined #nim
06:16:11ftsfhmm is there a nice way to make an array with an index with an enum type that can hold the full length of the enum eg. array[myEnum.high + 1, myType]
06:21:35FromDiscord<Rika> ftsf: https://nim-lang.org/docs/manual.html#types-array-and-sequence-types
06:22:14ftsf@Rika oh I see, you can specify a range for the first argument
06:22:23ftsfarray[myEnum.low..myEnum.high, ...]
06:22:27ftsfcool
06:22:29ftsfthanks
06:23:53FromDiscord<Technisha Circuit> I don't understand what the issue is... https://media.discordapp.net/attachments/371759389889003532/721248461848182795/Screenshot_20200613_072316_com.android.chrome.jpg
06:24:03FromDiscord<Technisha Circuit> It's Nim 1.2.0
06:24:06FromDiscord<Technisha Circuit> From the site
06:29:08FromDiscord<Rika> repl.it doesnt have nim 1.2.0
06:29:11FromDiscord<Rika> afaik
06:35:23FromDiscord<Technisha Circuit> I've downloaded it myself
06:35:29FromDiscord<Technisha Circuit> @Rika
06:35:38FromDiscord<Technisha Circuit> I downloaded it from the Nim site :P
06:36:46FromDiscord<Rika> well then good luck with that, i cant help you 😛
06:36:49FromDiscord<Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/721251713176174672/Screenshot_20200613_073647_com.android.chrome.jpg
06:36:51FromDiscord<Technisha Circuit> Ooof okay
06:39:34*kenran joined #nim
06:47:03*marnix joined #nim
07:04:56*tdc joined #nim
07:13:10*Vladar joined #nim
07:13:54marnixI'm a Nim noob (and #nim noob), found a performance diff in Nim 1.2.0 where --gc:arc is 2x slower than the default, on My First Nim Program(tm) which is just tokenizing a 30-40 MB mmap'd text file. Is that worth reporting? How/where?
07:17:20FromDiscord<Rika> try it with the devel branch
07:17:23FromDiscord<Rika> *first
07:17:32FromDiscord<Rika> see if its still 2x slower than default
07:17:45FromDiscord<Rika> if it is, report it in the nim repo
07:19:29marnixOK, will see if I can get that set up. Am using binary distro through nix currently, let's see if I can get it built from source.
07:20:25FromDiscord<Rika> (man, i hear of so many people using nix nowadays)
07:21:37*vicfred joined #nim
07:23:25Zevvmarnix: can you share your code?
07:24:19marnixZevv Yes, later today probably, a gist or something I think.
07:24:26Zevvk
07:31:52*marnix quit (Ping timeout: 265 seconds)
07:34:00FromDiscord<Rika> kinda wish we had stdlib fixed point decimals
07:34:02FromDiscord<Rika> do we?
07:36:10*dddddd quit (Ping timeout: 246 seconds)
07:37:13*Trustable joined #nim
07:37:26*neceve_ joined #nim
07:43:49FromDiscord<Technisha Circuit> What does gc:arc do?
07:44:24FromDiscord<Rika> arc stands for atomic ref. counting afaik
07:44:27FromDiscord<Rika> so it switches the gc to that
07:44:33FromDiscord<Technisha Circuit> Oh
07:44:43FromDiscord<Technisha Circuit> Is it supposed to be faster?
07:45:06FromDiscord<Technisha Circuit> And what's the advantages of using arc over the Nim default?
07:45:13FromDiscord<Rika> yeah supposedly
07:45:30FromDiscord<Rika> its a deterministic garbage collector afaik, though i cant explain well how its better
07:45:39FromDiscord<Technisha Circuit> Oh okay
07:48:45FromDiscord<Elegant Beef> https://forum.nim-lang.org/t/5734 this will probably explain it
07:51:16FromDiscord<Rika> huh, it isnt atomic ref counting lmao
07:51:21FromDiscord<Rika> ive been lied to
07:51:49FromDiscord<Elegant Beef> Automatic
07:52:00FromDiscord<Elegant Beef> Araq calls it atomic
07:52:08*nsf joined #nim
07:52:23FromDiscord<Rika> lmao think ya just pinged em
07:52:31FromDiscord<Elegant Beef> Well get a better platform
07:52:41FromDiscord<Elegant Beef> Well i guess he doesnt but he does call it out i mean
07:52:41FromDiscord<Rika> tell that to em
07:52:48FromDiscord<Elegant Beef> Well i just did
07:52:51FromDiscord<Elegant Beef> 😄
07:53:28FromDiscord<Elegant Beef> IRC is officially the go to platform for those that are very very self concious
07:57:20*NimBot joined #nim
08:00:08vicfredhi, did sort only used to work with arrays (0.13.0) but now (1.2.0) also works with sequences? https://atcoder.jp/contests/abc042/submissions/14212464
08:02:29FromDiscord<Rika> no, i assume its because your outType has no cmp proc
08:02:35FromDiscord<Rika> hmm
08:02:38FromDiscord<Rika> i think
08:03:14vicfredthe type is string, I also got the same error but with ints
08:03:15FromDiscord<Rika> also christ, nim 0.13
08:03:26FromDiscord<Rika> thats old as hell hahaha
08:03:35FromDiscord<Rika> ah
08:03:50vicfred4 years is not that old
08:03:57FromDiscord<Rika> i assume 0.13 doesnt have an algorithm.sort that doesnt need a cmp proc thats passed in
08:04:01FromDiscord<Elegant Beef> lol
08:04:11FromDiscord<Rika> nim is just 14ish years old
08:04:16FromDiscord<Rika> thats 1/3 of its life already
08:04:25FromDiscord<Elegant Beef> Also it just released 1.0 in october
08:04:52FromDiscord<Elegant Beef> Atleast i assume 99% of stuff was subject to change
08:04:55*marnix joined #nim
08:05:16FromDiscord<Rika> https://nim-lang.org/0.13.0/algorithm.html here's the docs for 0.13 algorithm
08:05:38FromDiscord<Rika> you can see that theres no sort w/o a cmp proc passed in
08:05:44marnixSo Zevv Rika: I created https://gist.github.com/marnix/48cbcb00ced295c3e182c765f4a74939 for that --gc:arc performance difference observed on Nim 1.2.0.
08:05:52FromDiscord<Rika> just pass in system.cmp and youll be fine
08:06:12marnix(Won't have time to try devel branch now.)
08:07:09*marnix will be away from the keyboard for a long time now.
08:07:58FromDiscord<Rika> ill try it then
08:08:00vicfredthanks now it works, also 0.13.0 refused to compare an array to a sequence https://atcoder.jp/contests/abc042/submissions/14212649
08:08:40FromDiscord<Rika> just so you know how "old" 0.13 is, the last version before 1.0 was 0.20
08:08:47vicfredand with strings https://atcoder.jp/contests/abc042/submissions/14212674
08:09:11vicfredhttps://en.wikipedia.org/wiki/Nim_%28programming_language%29#History
08:09:27FromDiscord<Rika> i am aware.
08:09:45FromDiscord<Rika> time doesnt really matter if the rate of improvement is not constant
08:09:47vicfredim running 1.2.0 locally but I cant do anything about the contest website
08:09:53FromDiscord<Rika> yeah
08:09:56FromDiscord<Rika> i understand'
08:12:46FromDiscord<Rika> marnix: horribly bad news: it seems like arc on devel makes it even worse, around 2x worse than arc on 1.2
08:12:58FromDiscord<Rika> let me try again
08:18:08ftsfahh just noticed my collision routines don't work in newer Nim, since they use multimethods which are deprecated, is there a good reason not to use them?
08:19:01*nikita` joined #nim
08:19:19Zevvmarnix: what is your input?
08:19:33FromDiscord<Rika> marnix: update, new devel is still around the same as 1.2.0
08:19:39FromDiscord<Rika> zevv: its in the run.sh file
08:20:15ZevvOh I missed stuff I think, let me read up
08:20:25*vicfred quit (Quit: Leaving)
08:20:46*vicfred joined #nim
08:20:51Zevvrun.sh?
08:20:56FromDiscord<Rika> in the gist
08:21:23Zevveuh - sorry, I'm stupid probbly. I posted a gist with a short nim program
08:21:39Zevvthat looks for "set.mm"
08:22:30vicfredsend me an invite to the discord, I like irc better but I use discord on the phone
08:22:33FromDiscord<Rika> i think this is worth an issue in the nim repo
08:22:59FromDiscord<Rika> i
08:23:02FromDiscord<Rika> *i'm aeverr
08:23:18vicfredthanks
08:23:24FromDiscord<Vicfred> hi
08:23:31FromDiscord<Rika> that avatar tho
08:24:05Zevvrika, sorry, hold my hand. I'm trying to look at marnix's performance problem, but I need that "set.mm", and you say I need to find a "run.sh"
08:24:10ZevvWhat am I missing
08:24:49FromDiscord<Rika> https://gist.github.com/marnix/48cbcb00ced295c3e182c765f4a74939#file-run-sh
08:25:07FromDiscord<Rika> run it or something 😛
08:25:39Zevvoh that's a differnt url with more context - woot
08:25:44FromDiscord<Rika> but yeah tried it in newest devel and it's just as slow as stable right now
08:26:50Zevvfor me on devel it's about as fast with arc as with default
08:27:38FromDiscord<Rika> huh
08:27:39FromDiscord<Rika> thats weird
08:28:23FromDiscord<Rika> sent a code paste, see http://ix.io/2p37
08:28:35Zevvoh nah wait - huuuge difference between -d:danger and -d:release
08:28:41ZevvI only use :danger these days
08:28:47FromDiscord<Rika> oh?
08:28:56FromDiscord<Rika> whats making danger as fast but release slower
08:30:55Zevvoverflow checks in the inner loops
08:31:30ZevvThis is the C code: http://zevv.nl/div/diff.png
08:33:10aeverrthats a lot of checks
08:33:37alehander92_morning!!
08:35:09FromDiscord<Rika> good morning
08:42:51*arecaceae quit (Remote host closed the connection)
08:43:42*arecaceae joined #nim
08:47:32ftsfhmm how would i grab the output of a shell command at compile time and shove it in a string?
08:47:57ftsfeg. grab git version string
08:48:28ftsfaha `staticExec`
08:52:31FromDiscord<mratsim> @ftsf, multimethods prevents many optimization opportunities (for example VTable) and are very seldom used. Most importantly you can reimplement thm on top of single dispatch with macros or visitors
08:53:02FromDiscord<mratsim> i.e. they are deprecated so that they don't hinder future refactorings
08:54:11ftsfmratsim, I see, I'm curious how I would reimplement my collision functions as single dispatch, eg. collide(a,b: Object): bool {.base.}, collide(a: Foo, b: Bar): bool, collide(a: Bar, b: Baz): bool
08:54:30ftsfdo you know of any examples of how one might reimplement it?
08:56:51ftsfI suppose I could just `if a is Foo and b is Bar: ...` and `if a is Bar and b is Baz: ...`
09:02:28FromDiscord<Elegant Beef> Oh hey ftsf, hope my nico issue didnt annoy you 😄
09:02:59ftsfElegant Beef oh hi, not at all, just wish I could reproduce the issue
09:03:33FromDiscord<Elegant Beef> No replication on your linux tests?
09:03:50ftsfhaven't got around to testing on linux yet =(
09:03:53FromDiscord<Elegant Beef> Ah
09:03:55ftsfi should set up a VM
09:04:13FromDiscord<Elegant Beef> I did try to fix it myself before making the issue, but i couldnt see anything that should cause that
09:04:37ftsfyeah, i have no idea what would cause it =\
09:04:47FromDiscord<Elegant Beef> I did manage to make it sound more like sound, but still no volume control
09:05:32ftsfmy guess is it's somehow multiplying the volume by 255 instead of 1, but can't see why that would happen
09:06:05FromDiscord<Elegant Beef> oh i tested even using hard coded decimal values and even with something like .000001 it still would go 100%
09:06:33FromDiscord<Elegant Beef> It's like it has 0 interest in the volume control on my setups(Maybe all of linux?)
09:07:01*marnix_ joined #nim
09:07:02ftsfit's very odd cause it's all being done in software (nico code)
09:07:25ftsfnow that i think about it, were you doing javascript build or C build?
09:07:31*marnix_ quit (Remote host closed the connection)
09:07:32FromDiscord<Elegant Beef> Yea i noticed you're letting SDL handle the audio, so it shouldnt be an issue
09:07:33ftsfi didn't test JS
09:07:36FromDiscord<Elegant Beef> I only did C builds
09:07:40ftsfok
09:07:43FromDiscord<Elegant Beef> JS doesnt compile atm with some errors
09:07:56FromDiscord<Elegant Beef> Which can be commented out but no clue how to use the outputted js for anything
09:08:42ftsfputting some time into nico atm
09:08:44*endragor joined #nim
09:08:48ftsfso hopefully fix up most of the issues
09:09:10FromDiscord<Elegant Beef> Also no clue if you seen my nico-helper repo, but could be a nice thing to implement
09:09:22ftsfgoing to record a talk on using it for NimConf, so would be good to fix a bunch of the issues so they don't cause issues for people following along
09:09:32ftsfoh i haven't seen it, link plz?
09:09:39FromDiscord<Elegant Beef> A FSM level loader basically
09:09:45FromDiscord<Elegant Beef> https://github.com/beef331/nico-helper
09:10:02FromDiscord<mratsim> @ftsf, most compilers (Clang in particular) use Visitors to implement multidispatch
09:10:04ftsfoh awesome, i'll check it out
09:10:18FromDiscord<Elegant Beef> It's not that complex, but it does allow sepeartion of levels/code
09:10:23*rokups joined #nim
09:10:28FromDiscord<Elegant Beef> Makes it much nicer to work with imo
09:10:49FromDiscord<Elegant Beef> Without any otherway many people will tend towards a big old single file
09:10:59ftsfnice, yeah even I tend to use one big file =)
09:11:05*endragor quit (Remote host closed the connection)
09:11:05FromDiscord<mratsim> also My raytracer has a collision function called "hit" but I did it with object variants: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/physics/hittables/hittables_variants.nim#L53-L54
09:11:10*endragor joined #nim
09:11:11FromDiscord<Elegant Beef> Which imo is rather terrible to work with
09:11:20ftsfbut that's mostly to work around nim giving me dramas when I try to split things up =\ I feel I must be doing something wrong
09:11:45FromDiscord<mratsim> I have a macro that generates "class-like" object variants: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/support/emulate_classes_with_ADTs.nim
09:12:33ftsfthough in some more complex projects I use a stack of "States" which handle the update and draw
09:12:47FromDiscord<Elegant Beef> Yea so basically what i have
09:12:54FromDiscord<Elegant Beef> It's sorta like scenes for Unity
09:13:09FromDiscord<Elegant Beef> I do have plans to make more helper stuff but the music stuff annoyed me 😄
09:13:25ftsfyeah, but the stack lets you easily add a new state on top then return to the old one, works well for stacked menus
09:13:39ftsfmmm the audio stuff is a bit of a mess, needs cleaning up
09:13:42FromDiscord<Elegant Beef> Ah that'd be a nice thing to add to this manager
09:14:19FromDiscord<Elegant Beef> loadLevel, destackLevel
09:14:28FromDiscord<Elegant Beef> Level is a misnomer now i guess but 😛
09:14:30ftsfpushLevel popLevel
09:14:38ftsfpushState / popState is what I use
09:14:48FromDiscord<Elegant Beef> Yea probably better terminalogy
09:15:07ftsfsome states are "transparent" which lets it render the one below it as well, but only top one recvs input
09:15:35ftsfso you can do a pause menu while drawing the game underneath
09:15:55FromDiscord<Elegant Beef> Ah yea i dont have layered logic, not that it'd be too hard
09:16:16*fredrikhr joined #nim
09:16:36ftsfi've got a half done gui system for nico too which i'm keen to spin into a helper lib too
09:16:50FromDiscord<Elegant Beef> Guess i'll attempt fixing it again but doubt i'll see why, i tend to just change values and cry that my ears are bleeding cause of 100% audio 😛
09:16:53ftsfsimiar to unity's IMGUI
09:17:12FromDiscord<Elegant Beef> Nice, was thinking about getting pixel perfect collision done aswell since it's sorta required
09:18:01FromDiscord<Elegant Beef> With some abstraction for multiple tile sprites with flip
09:18:04alehander92_seems as a good idea mratsim!
09:18:08ftsfdownloading a linux distro to run in a VM now, so hopefully can figure out the audio issue
09:18:10alehander92_like how your code is docummented!
09:18:33FromDiscord<Elegant Beef> Yea, well @Elegant Beef if you make any progress, i need to sleep
09:18:52ftsfshall do
09:18:59ftsfnight night
09:19:17FromDiscord<Elegant Beef> Buh bye
09:19:43FromDiscord<Rika> wait why did you ping yourself
09:20:05ftsfthey were telling me to @ them =)
09:23:40*oddp joined #nim
09:27:27FromDiscord<Rika> didnt understand, usually you'd say "@ me" and not actually @ yourself no?
09:27:30FromDiscord<Rika> anyway
09:28:18*bung quit (Ping timeout: 256 seconds)
09:30:33*tane joined #nim
09:31:06*bung joined #nim
09:32:03*arecaceae quit (Remote host closed the connection)
09:32:36*arecaceae joined #nim
09:55:03planetis[m]ftsf: we have #nim-gamedev now, come join us!
09:55:10ftsfplanetis[m], ooh nice sure
10:07:08FromDiscord<Shucks> newbie alarm: I would use `read` and `write` all the time so I thought custom operators would be great but how exactly would I use them now? https://play.nim-lang.org/#ix=2p3z
10:12:39*lritter joined #nim
10:19:03alehander92_hm
10:19:10alehander92_but think about the reader
10:30:40*krux02 joined #nim
10:33:22*Vladar quit (Remote host closed the connection)
10:39:19*Vladar joined #nim
10:43:12marnixRika Zevv Thanks for looking into my --gc:arc performance diff. Will one of you create an issue on GitHub? Or should I create one based on my gist?
11:02:55*Trustable quit (Remote host closed the connection)
11:10:33FromDiscord<lqdev> @Shucks custom operators cannot contain letters https://nim-lang.org/docs/manual.html#lexical-analysis-operators
11:11:26FromDiscord<lqdev> also there's no need to use `typedesc` with an explicit generic param, just use `typedesc`
11:11:34FromDiscord<lqdev> or better yet, just use `type`
11:11:49*lqdev[m] left #nim ("User left")
11:12:14FromDiscord<Shucks> Oh alright
11:12:37Yardanico@lqdev I don't think just using "type" is a good way here :P
11:12:58YardanicoI think it's deprecated
11:15:24*kenran quit (Ping timeout: 256 seconds)
11:36:02FromDiscord<lqdev> is it?
11:36:14FromDiscord<lqdev> I was pretty sure typedesc is the one that's deprecated
11:39:04FromDiscord<Rika> I was sure of typedesc being the preferred one
11:43:37bungtypedesc is good
11:45:08Zevvmarnix: feel free to create an issue. For me the solution is "just use -d:danger", but that's not the message Ar4q wants to spread, I believe
11:45:33marnixZevv :-)
11:45:44marnixWill do
11:56:16*marnix quit (Remote host closed the connection)
11:59:13*brainbomb1 joined #nim
11:59:53*brainbomb quit (Ping timeout: 272 seconds)
12:06:02*supakeen quit (Quit: WeeChat 2.8)
12:06:36*supakeen joined #nim
12:10:51*ride[m] joined #nim
12:30:32*marnix joined #nim
12:43:27*zama joined #nim
12:50:09*rokups quit (Quit: Connection closed for inactivity)
12:55:59*dddddd joined #nim
13:03:22FromDiscord<Shucks> Im looking for something like `getCurrentBinaryName`
13:03:49*kungtotte joined #nim
13:04:18Yardanicohttps://nim-lang.org/docs/os.html#getAppFilename
13:05:10*luis_ joined #nim
13:14:43*luis_ quit (Quit: luis_)
13:18:09*silvernode quit (Quit: Konversation terminated!)
13:19:59*luis_ joined #nim
13:20:44FromDiscord<Shucks> thank you
13:30:23*nsf quit (Quit: WeeChat 2.8)
13:34:43*luis_ quit (Quit: luis_)
13:42:21*silvernode joined #nim
13:43:08silvernodeHow easy is it to host Nim Playground on my own server?
13:43:27Yardanicosilvernode: see https://github.com/PMunch/nim-playground-frontend and https://github.com/PMunch/nim-playground
13:43:39YardanicoI think you just need nim and docker :)
13:43:56silvernodeOh nice, that should be fairly easy then
13:44:06*PMunch joined #nim
13:45:01*luis_ joined #nim
13:46:20silvernodeI want to run my own server for the playground to help save bandwidth on the official playground server.
13:47:08Yardanicowell I don't think official playground server has that high of a load
13:48:22*Trustable joined #nim
13:51:10PMunchNot really
13:51:23PMunchBut feel free to spin up a clone if you want
13:55:38silvernodek0mpjut0r: I guess I just want to help out in some way. If nothing else, it could be an alternative to the official playground if that happens to go down for some reason for a day.
13:56:03Yardanicoyou can instead for example help federico3 with a VPS for nimble.directory :)
13:57:08*FromDiscord quit (Remote host closed the connection)
13:57:24*FromDiscord joined #nim
13:57:26silvernodeYardanico: what's the problem they are having?
13:57:48Yardanicosilvernode: https://nimble.directory/ hosts and makes docs for all nimble packages
13:57:56YardanicoI mean it hosts readme and documentation
13:58:35Yardanico"This service allows you to explore Nim packages known to Nimble. It tests package installation and generates documentation using "nim doc". It also generates badges with the output of install test and documentation generation that you can link to."
13:59:14silvernodeYardanico: oh, that would be cool if I did that too. I use the packages directory from time to time. Would be neat to have an instance of my own.
13:59:30silvernodebrb
13:59:33*silvernode quit (Quit: Konversation terminated!)
14:00:06FromDiscord<Rika> yardanico what are they hosting on right now
14:11:36*PMunch quit (Quit: leaving)
14:17:24federico3BTW the load on the existing VPS decreased a lot after the last changes
14:17:30Yardanicoah nice
14:24:56FromDiscord<dom96> PMunch: any ideas how many people at once the playground can handle?
14:25:06FromDiscord<dom96> I'm planning to use it for the examples in my nimconf talk
14:26:14supakeenfederico3: I really like how the updated design came out!
14:37:12*Senny joined #nim
14:37:48federico3supakeen: I'm fixing the font sizes as we speak
14:39:42FromGitter<phdye> Can anyone point to a working example of using NimRtl with a C main ?
14:50:33marnixZevv, Rika: FYI Issue logged for --gc:arc performance diff, https://github.com/nim-lang/Nim/issues/14651
14:50:35disbotNim 1.2.0 --gc:arc makes going over a large file much slower ; snippet at 12https://play.nim-lang.org/#ix=2p5f
14:52:28*neceve_ quit (Read error: Connection reset by peer)
15:01:10*kenran joined #nim
15:22:00*endragor quit (Remote host closed the connection)
15:36:48*luis_ quit (Ping timeout: 258 seconds)
15:51:13*aenesidemus joined #nim
16:02:14*bjornroberg quit (Remote host closed the connection)
16:05:50FromDiscord<Technisha Circuit> What's the default nim gc?
16:05:59FromDiscord<Technisha Circuit> Just `default`?
16:06:16disruptek--gc:refc
16:06:31disrupteki have an old version of nimph in the cloud and it's silly how fast it is.
16:06:37disrupteki love it.
16:06:50FromDiscord<mratsim> I think refc is pure ref counting without cycle detection
16:09:17FromDiscord<Skaruts> is there some binary `|=` equivalent in nim?
16:10:15disruptekmratsim: all i know is...
16:10:18disruptek$ nim --fullhelp|grep gc
16:10:22disruptek--gc:refc|markAndSweep|boehm|go|none|regions
16:10:36*brainbomb1 quit (Quit: Leaving.)
16:10:57disruptekprobably should add arc and orc to that list. 🤷
16:12:22FromDiscord<Technisha Circuit> > --gc:refc↵Thanks!
16:13:14FromDiscord<Technisha Circuit> Why would i want to use Go's GC in Nim?
16:13:24FromDiscord<Technisha Circuit> Like, any benefits i could get from it?
16:15:12disruptekzedeus: i cannot repro your bug in the cloud, either.
16:15:27zedeushey, just got up
16:15:30zedeusthat's odd
16:15:53disruptekLinux grape.disruptek.com 4.14.114-103.97.amzn2.x86_64 #1 SMP Sun Apr 28 03:59:40 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
16:16:25zedeuswould you mind running a binary I upload? just for a sanity check
16:16:33disrupteksure.
16:20:08zedeushttp://ix.io/2p5w
16:20:16zedeusruns on port 4000
16:20:19disruptekyou're testing /my/ sanity, huh.
16:20:22zedeushah
16:20:46zedeusrunning 200 curls a few times causes the bug
16:21:10disrupteki'm running for n in (seq 0 10000); curl http://localhost:8080/ > /dev/null 2>&1 &; end and no problems yet.
16:21:18disruptekthis is a nim from april, too.
16:23:03disruptekwhat is this binary?
16:23:04FromDiscord<mratsim> @Technisha Circuit to use goroutines from Nim
16:23:32FromDiscord<Technisha Circuit> Wth are those? An offbrand coroutine?
16:23:55zedeusdoing 10000 curls I get 108 stalled sockets
16:26:03disruptekwhich port?
16:26:07zedeus4000
16:26:22zedeusjust ran the binary on another server, still happens
16:26:28disruptekcannot repro.
16:28:39disruptekthis is a static link against glibc-2.29.83 or so?
16:28:42disrupteksomething like that?
16:29:25zedeus2.31
16:29:45zedeusI didn't explicitly make it static, dunno
16:30:27disrupteki don't have anything that new.
16:30:45disrupteki tend to lag far behind on glibc because it's just not worth the grief.
16:30:53disruptekif i could run 2.26 i would.
16:31:29zedeusI compiled it on my laptop with 2.29, still happens
16:32:00disruptekgcc what
16:32:19disrupteki'm 9.3.0
16:32:28zedeusI just found a vps where I cannot repro, seemingly because it's too slow to trigger the race
16:32:56zedeus8.3.0 on laptop, 10.1.0 on desktop
16:33:00disruptekmaybe i haven't exhausted my cpu budget on the nano.
16:33:08disruptekthis is bananas.
16:37:48disruptekit's not able to consume even 300 fds. i wonder if i'm hitting some soft process creation cap.
16:38:50zedeus`ulimit -n` ?
16:39:47disruptek1024
16:40:08zedeussame as my vps where it works
16:40:30disruptek4k on my desktop and cannot repro there, either.
16:40:54zedeuseven using my binary?
16:42:38FromDiscord<Generic> @Skaruts unfortunately no
16:42:40disruptekyep.
16:42:55disruptekwhat's the glibc on the vps?
16:44:03zedeus2.28
16:44:20disruptekGNU C Library (Gentoo 2.29-r8 p9) stable release version 2.29.
16:45:18disruptekthe nano is GNU C Library (GNU libc) stable release version 2.26, by Roland McGrath et al.
16:45:29*ride[m] left #nim ("User left")
16:45:46disrupteki can't even consume 450 fds on the desktop.
16:47:20zedeusdom96 Araq: you around?
16:58:06FromGitter<phdye> FYI: useNimRTL DLL segfaults on linux with C main https://github.com/nim-lang/Nim/issues/14652
16:58:08disbotuseNimRTL DLL segfaults on linux with C main ; snippet at 12https://play.nim-lang.org/#ix=2p5M
16:58:18*vicfred quit (Quit: Leaving)
17:05:05zedeusdisbot: yardanico can reproduce
17:05:10Yardanicodisruptek: ^
17:13:27*pbb_ is now known as pbb
17:19:18*nsf joined #nim
17:27:24zedeuspassing the values through a proc first before making the closure seems to mitigate it a bit, but not entirely
17:33:25FromDiscord<codic> Solus Linux now has nim 1.2.0 https://dev.getsol.us/T8979
17:35:45*bung quit (Quit: Lost terminal)
17:36:24FromDiscord<Recruit_main707> is the unroll pragma still ignored by the compiler?? https://media.discordapp.net/attachments/371759389889003532/721417699434954822/unknown.png
17:37:55Yardanicoi think so
17:38:52Yardanicoyou can see the implementation in https://github.com/nim-lang/Nim/blob/devel/compiler/pragmas.nim#L589
17:39:30Yardanicowell anyway for C compilers you can enable -funroll-loops
17:39:34Yardanicoalthough it's not fine-grained
17:48:07FromDiscord<Recruit_main707> thats a shame, unroll would be sick
17:48:21Yardanicothe DFA unrolls while loops three times btw :P but that's for analysing
17:48:33Yardanicohttps://github.com/nim-lang/Nim/blob/75e579ff8ec3b5b3659612ea24f8d2b8c0e20230/compiler/dfa.nim#L316
17:52:28PrestigeI keep using this pattern with options - would anyone else find this useful? https://play.nim-lang.org/#ix=2p5Z
17:52:39PrestigeJust reduces code a little bit when using options
17:52:59PrestigeWas thinking of submitting a PR.. I keep using this in all my projects
17:54:09zedeushttps://github.com/PMunch/nim-optionsutils
17:54:35Yardanicohttps://github.com/PMunch/nim-optionsutils/blob/master/src/optionsutils.nim#L190 :D
17:54:45Prestigehaha wow, nice
18:03:43*Northstrider quit (Ping timeout: 252 seconds)
18:03:50FromGitter<bung87> nice
18:05:18FromGitter<bung87> today I tried livescript feel confortable with its syntax
18:11:10*arecaceae quit (Remote host closed the connection)
18:11:42*arecaceae joined #nim
18:18:55*vikfret quit (Remote host closed the connection)
18:19:14*vikfret joined #nim
18:48:06FromDiscord<codic> livescript is awesome
18:48:15FromDiscord<codic> just coffeescript but better
18:48:27FromDiscord<codic> (both are maintained by the same person actually...)
18:54:07*brainbomb joined #nim
18:54:37*vikfret quit (Quit: Leaving)
18:56:14FromGitter<bung87> if it could have sweetjs's macro that even better
18:56:25*brainbomb quit (Client Quit)
18:57:27*kenran quit (Ping timeout: 260 seconds)
19:15:16alehander92_huh interesting
19:15:39alehander92_i didnt know they are related
19:37:00*Jesin quit (Quit: Leaving)
19:45:20*Jesin joined #nim
19:45:43FromDiscord<Technisha Circuit> What's livescript @codic?
19:46:03FromDiscord<codic> @Technisha Circuit https://livescript.net
19:46:06FromDiscord<Technisha Circuit> Oo
19:46:20FromDiscord<codic> It's basically coffeescript with functional programming
19:46:38FromDiscord<codic> The author of coffeescript kinda uses it as a 'playground' for testing featrures as well
19:46:46FromDiscord<codic> According to some github issue that i cant find
19:47:28FromDiscord<Technisha Circuit> Is all existing CoffeeScript code compatible with LiveScript or no?
19:47:42FromDiscord<codic> No
19:47:47FromDiscord<Technisha Circuit> Aw
19:47:49FromDiscord<codic> Only minor changes tho
19:47:51FromDiscord<codic> https://livescript.net/#coffee-to-ls
19:48:02FromDiscord<codic> Also, this isn't about nim.... *nim is the best compile-to-js lang*
19:49:02FromDiscord<Technisha Circuit> Nim is the best, i agree-
19:49:32FromDiscord<codic> Don't you dare betray us
19:49:36FromDiscord<Technisha Circuit> I wish it would produce es6 code though because I'd find it cool looking at the beauty of Nim-
19:49:44FromDiscord<codic> What?
19:49:46FromDiscord<Technisha Circuit> (edit) 'Nim-' => 'Nim coupled with JS-'
19:49:55FromDiscord<codic> ES5 is better
19:50:00FromDiscord<Technisha Circuit> How so?
19:50:04FromDiscord<codic> Simply because it's supported more places
19:50:10FromDiscord<Technisha Circuit> That's true
19:50:17FromDiscord<codic> If you used es6, the logical decision is to use babel and convert it to es5 anyways
19:50:21FromDiscord<Technisha Circuit> But ES6 looks way nicer
19:50:39FromDiscord<codic> You can convert some es5 stuff to es6: https://lebab.unibtc.me (opposite of babel)
19:50:42FromDiscord<codic> Not that much nicer
19:50:50FromDiscord<codic> It's easy to replicate functionality
19:50:58FromDiscord<Technisha Circuit> Nice
19:51:19FromDiscord<codic> Just use mozilla's sweet.js (to add macros to js) and add all the es6 stuff
19:52:05FromGitter<yumaikas> So, looking at the jester source, does it let me set mime types?
19:52:41FromGitter<yumaikas> It looks like settings.mimes always gets overwritten?
20:06:14FromGitter<yumaikas> Never mind, the MIME type I'm interested in is there
20:08:47FromGitter<yumaikas> So, using sendFile on a WASM file seems to mix things up?
20:24:16FromDiscord<willyboar> alehander92 are you here?
20:33:04*cyraxjoe joined #nim
20:34:22*aenesidemus quit (Ping timeout: 260 seconds)
20:34:25*MightyJoe quit (Ping timeout: 264 seconds)
20:35:03alehander92_https://github.com/nim-lang/Nim/pull/14632/commits/e1dd90754464b409f5955c5d7df58cd7a28c369a
20:35:04disbot[WIP] porting name mangling from ic effort
20:35:07alehander92_disruptek ..
20:35:11alehander92_yeajh!
20:35:13alehander92_i am here
20:35:39FromDiscord<willyboar> have you ever look at rosencrantz?
20:35:55*marnix quit (Ping timeout: 260 seconds)
20:35:56alehander92_i know about it!
20:36:02alehander92_but i havent really used it iirc
20:36:07alehander92_it's by andrea
20:36:22FromDiscord<willyboar> I used it in the past few days
20:36:28alehander92_it seemed interesting , what do you find cool about it
20:37:10FromDiscord<willyboar> i like the composition
20:37:20FromGitter<phdye> Can anyone point to a working example of using NimRtl with a C main ?
20:37:44FromDiscord<willyboar> i would like a better syntax but you can use to it
20:38:37FromDiscord<willyboar> also the codebase is kinda small
20:38:53FromDiscord<willyboar> and it is easy to and new handlers
20:41:52*aenesidemus joined #nim
20:44:15alehander92_hmm
20:44:20alehander92_yeah thats true!
20:44:25alehander92_i have to look at it again
20:44:40alehander92_but i am mostly interested in the type stuff honestly
20:44:59FromDiscord<willyboar> type stuff?
20:46:01disruptekalehander92_: what?
20:46:11alehander92_why the movie
20:46:13alehander92_reference
20:46:20Yardanico@phdye I suggest you to post the question on the forum
20:46:48FromGitter<phdye> Thank you. I shall.
20:47:46disruptekwhy the movie reference?
20:48:30*NimBot joined #nim
20:48:35*waleee-cl joined #nim
21:03:16alehander92_the commit
21:03:19alehander92_had a movie
21:03:21alehander92_i mean yeah
21:03:26Zevv"type stuff" and the well received sequel "type stuff II"
21:03:45*Trustable quit (Remote host closed the connection)
21:03:58Yardanicotype stuff III: typedesc revenge
21:06:04*Trustable joined #nim
21:07:40FromDiscord<willyboar> lol
21:08:35*kenran joined #nim
21:13:36FromGitter<codenoid> hi folks, how you doing, hope everything getting better
21:15:41FromDiscord<willyboar> hello @codenoid everything is good
21:18:30FromGitter<deech> As of the 8th of June I'm not seeing any osx nightlies https://github.com/nim-lang/nightlies/releases.
21:18:42Yardanicowait a bit ;)
21:18:49FromGitter<deech> Ah, thanks!
21:19:02Yardanicoleorize[m]: is experimenting with new way of building nightlies
21:21:01Yardanico@deech try to use https://github.com/alaviss/nightlies/actions/runs/134085277
21:22:32FromGitter<deech> Nice! So is macOS still on 1.2.1?
21:22:38Yardanicothere's a 1.3.5 build there
21:22:41Yardanicodid you miss it? :P
21:22:47Yardanicothird in the list "nim-1.3.5-macosx_amd64.tar.xz"
21:22:52*solitudesf quit (Ping timeout: 246 seconds)
21:23:01FromGitter<deech> crap.
21:23:04FromGitter<deech> Sorry.
21:23:19YardanicoI don't know if it works though, please tell your experience to leorize[m] :)
21:23:26FromGitter<deech> Will do!
21:24:25Yardanicothese builds are mostly static
21:25:22*Jesin quit (Quit: Leaving)
21:27:15*kenran quit (Ping timeout: 260 seconds)
21:30:40*Jesin joined #nim
21:48:54*Vladar quit (Quit: Leaving)
21:49:15*MightyJoe joined #nim
21:50:52*cyraxjoe quit (Ping timeout: 256 seconds)
21:51:17*chemist69 quit (Ping timeout: 260 seconds)
21:51:43*chemist69 joined #nim
22:05:19FromGitter<xmonader> is @zah == Zahary ?
22:06:34zedeushttps://github.com/dom96/httpbeast/pull/35
22:06:35disbotFix crosstalk
22:07:25Yardanico@xmonader depends on which Zachary you're talking about :)
22:07:45Yardanicowe have https://github.com/zah and https://github.com/zacharycarter
22:08:54*yannicK joined #nim
22:09:57FromGitter<xmonader> I'm confused actually, but he's the team lead of nimbus
22:10:03Yardanicoyes, that's zah
22:10:32FromGitter<xmonader> thank you so much @Yardanico
22:11:34*nsf quit (Quit: WeeChat 2.8)
22:12:53*tane quit (Quit: Leaving)
22:14:38*yannicK quit (Quit: leaving)
22:17:30FromDiscord<willyboar> nice zedeus
22:22:47*tdc quit (Ping timeout: 260 seconds)
22:50:53*lritter quit (Quit: Leaving)
22:54:17*Trustable quit (Remote host closed the connection)
22:58:24FromDiscord<Recruit_main707> having this function: https://media.discordapp.net/attachments/371759389889003532/721498731895062547/unknown.png
22:59:09FromDiscord<Recruit_main707> and GameTickPacket being specified to be passed by copy: https://media.discordapp.net/attachments/371759389889003532/721498921687449600/unknown.png
22:59:59FromDiscord<Recruit_main707> why does the generated function use a pointer still? https://media.discordapp.net/attachments/371759389889003532/721499135349489674/unknown.png
23:02:47FromDiscord<Recruit_main707> (ignore that ^)
23:04:21FromDiscord<Recruit_main707> it has to do with using `{.push: bycopy.}` instead of doing it manually
23:04:54FromDiscord<Recruit_main707> doesnt it work?
23:14:38FromDiscord<Recruit_main707> it definetely seems like a bug, should i open an issue?
23:39:05zedeusis it an issue?
23:53:25FromDiscord<Recruit_main707> It does look like
23:53:51zedeusthen perhaps you should open an issue for it