<< 14-06-2020 >>

00:00:01*junland quit (Quit: %ZNC Disconnected%)
00:01:42*junland joined #nim
00:03:51*krux02 quit (Remote host closed the connection)
00:09:03FromDiscord<ikrima> sent a long message, see https://discordapp.com/channels/371759389889003530/371759389889003532/721516513076445281
00:10:19FromDiscord<ikrima> (edit)
00:10:54FromDiscord<ikrima> (edit)
00:13:01FromDiscord<ikrima> if helpful, here's an example using the dsl & what it gets transformed into: https://gist.github.com/ikrima/87f2bd1599c66bfc4aeed181a1981fc4
00:15:25*MightyJoe quit (Ping timeout: 246 seconds)
00:15:40*cyraxjoe joined #nim
00:25:31*fredrikhr quit (Ping timeout: 260 seconds)
00:39:21*aenesidemus_ joined #nim
00:40:16*aenesidemus quit (Ping timeout: 246 seconds)
00:41:22zedeushttps://github.com/krux02/opengl-sandbox
00:41:25zedeusmaybe this can help you?
00:53:01*oddp quit (Ping timeout: 258 seconds)
00:58:09FromDiscord<ikrima> @Zedeu follow-up: would this be "idiomatic/sane" nim code? ↵since i'm using this exercise for evaluating nim itself, i don't want to misjudge it
00:58:52FromDiscord<ikrima> @Zedeus[IRC]#0000 ↵follow-up: would this be "idiomatic/sane" nim code? ↵since i'm using this exercise for evaluating nim itself, i don't want to misjudge it
01:00:09FromDiscord<ikrima> (repo still useful regardless, just good to know if i'm looking at "bad/hacky" nim code or not)
01:00:39zedeusmostly yeah, but it could be better. it's very heavy on macros and krux likes verbose variable names, besides that it seems fine
01:01:07zedeus(macros are very relevant here, not saying it should use less of them)
01:20:20*cyraxjoe quit (Quit: I'm out!)
01:22:54*cyraxjoe joined #nim
01:29:43*opal quit (Ping timeout: 240 seconds)
01:45:38*opal joined #nim
01:59:47*chemist69 quit (Ping timeout: 260 seconds)
02:01:34*chemist69 joined #nim
02:24:03*opal quit (Ping timeout: 240 seconds)
02:24:49*nikita_ joined #nim
02:27:22*nikita` quit (Ping timeout: 246 seconds)
02:39:45*opal joined #nim
02:46:11*monok joined #nim
02:48:58*mono quit (Ping timeout: 265 seconds)
02:54:56*muffindrake quit (Ping timeout: 256 seconds)
02:57:00*muffindrake joined #nim
03:08:11*waleee-cl quit (Quit: Connection closed for inactivity)
03:31:34disrupteki wanna write a lib that gives you a really nim-natural object share across dbus.
03:32:35disruptekit takes the jason encoder/decoder and implements a version for dbus types.
03:34:38FromDiscord<Rika> jason? as in json? why json
03:35:22disrupteknot json, jason. it'll be a similar version, but dbus and not json.
03:35:31disruptek!repo disruptek/jason
03:35:32disbothttps://github.com/disruptek/jason -- 9jason: 11JSON done right 15 5⭐ 0🍴
03:35:45disruptek!repo disruptek/deebus
03:35:46disbothttps://github.com/disruptek/deebus -- 9deebus: 11simple sugar over dbus 15 0⭐ 0🍴
03:36:19disruptekif the object isn't supported natively, we can just use frosty to serialize it.
03:36:28disruptek!repo disruptek/frosty
03:36:29disbothttps://github.com/disruptek/frosty -- 9frosty: 11marshal native Nim objects via streams, sockets 15 6⭐ 0🍴
03:37:12FromDiscord<Zed> When were those emojis added?
03:37:19FromDiscord<Zed> i love it
03:37:29disruptekthey've always been there.
03:37:46FromDiscord<Zed> huh, i've never noticed
03:37:50disruptekthat's the source of the "cutlery" joke.
03:38:24FromDiscord<Zed> ?
03:38:40disruptekit's the number of forks.
03:39:05disruptekwhat else?
03:39:55disruptek~araq
03:39:55disbotaraq: 11👑 the powers that He 👑 -- disruptek
03:40:25disruptek~Araq is 👑Andreas "What Else?" Rumpf👑
03:40:26disbotAraq: 11👑Andreas "What Else?" Rumpf👑
03:40:53disruptek~Rika
03:40:54disbotRika: 11a footnote
03:41:02disrupteka mere footnote.
03:41:13disruptek~zedeus
03:41:14disbotno footnotes for `zedeus`. 🙁
03:41:22disruptek~zedeus is the nitter.net guy
03:41:22disbotzedeus: 11the nitter.net guy
03:42:16FromDiscord<Zed> lol
03:42:22zedeusnice.
03:42:30disruptekzedeus: give me a project in your project. i'd like to help specifically.
03:43:22disrupteki will stream work on it at least one day a week.
03:43:24zedeusyou wanna work on nitter?
03:43:33disruptekwhy not? is it done?
03:43:43zedeuslots of work to be done
03:43:46zedeushmm
03:44:14zedeusI think the two most wanted features right now are embeds and an API
03:44:29disruptekwhat are embeds?
03:44:37FromDiscord<Zed> how many people are using nitter?, zedus
03:44:39zedeusshowing tweets on other sites using nitter
03:44:52disruptekah, that would be useful from a marketing perspective.
03:45:04zedeusI'm not sure, I'd guess about 60k
03:45:14zedeuslast we checked nginx logs it was 15k unique visitors per day
03:45:20FromDiscord<Zed> damn, that's alot
03:45:21disrupteki guess it should probably be as close to the way twitter works as possible, right?
03:45:26FromDiscord<Zed> good job
03:45:31disruptekexcept, y'know, private.
03:45:33zedeusquite close, yeah
03:45:55zedeusthe main problem is how to make them, there's no obvious UI element yet
03:46:03zedeusso we need to add tweet dropdowns, like twitter has
03:46:07disrupteki would say the embeds are no-brainer more important, right?
03:46:16disruptekmuch larger audience. developers will wait, too.
03:46:23zedeusyeah, I agree
03:46:30disruptekand it's not like developers cannot implement the api if they need it fast.
03:46:36zedeusthe browser extensions that redirect you can swap out twitter iframes too
03:47:06disrupteki'm not sure i know what that means.
03:47:09disruptekwhy would i want that?
03:47:20zedeusto avoid loading things from twitter
03:47:30zedeusremember, we don't want twitter to know about us
03:47:45zedeus"us" being the people that want to use nitter
03:47:48disruptekwho makes the browser extensions?
03:47:58zedeushttps://github.com/zedeus/nitter/wiki/Extensions
03:48:11disruptekoh, this works now?
03:48:13zedeusyep
03:48:34disruptekokay, but the embed is designed for non-nitter users, right?
03:49:10disruptekthis is like a business card; it is likely the first introduction you have of your product.
03:49:17zedeussort of, it's to show tweets on your site without breaking the privacy of your visitors
03:49:23disruptekright.
03:49:34disruptekso there's a massive opportunity there.
03:49:35zedeusand y'know, nitter is much lighter
03:49:50zedeusand faster, in most cases
03:50:11zedeusloading a profile/timeline only takes 300 ms in most cases, vs twitter's 1.3-1.7 seconds
03:50:15disruptekpeople want this because it's better than the alternative and unassailably no worse.
03:50:37zedeusyeah, especially now that they removed the old UI forcing people to use the new dreadful one that seemingly most people hate
03:50:55disruptekdo you run js?
03:51:12zedeusnone, except an opt-in script for supporting infinite scroll
03:51:23zedeusand video playback, but I'm working on that
03:51:34disruptekhtml5 covers video, no?
03:51:51disrupteki have a friend that made an html5 player.
03:52:03zedeusyeah, but twitter by default serves .ts files in a m3u8 file, requires hls.js to play. turns out those sneaky bastards actually have mp4 versions though, so that's why I was working on the zero-copy proxying
03:52:41disruptekwhy don't you just use their api?
03:53:33zedeusI do, sort of
03:53:53disruptekjust certain calls, or...?
03:53:56zedeusyou see, now they removed the old UI, I had to start from scratch on a big part of the code
03:54:04zedeushttps://github.com/zedeus/nitter/pull/169
03:54:04disbotNitter v2
03:54:10zedeusit's all json now
03:54:29zedeuson that note - if you have some big improvements for how the json parsing/deserialization code is written, please work on it
03:54:52disrupteki just have an obstacle.
03:54:53zedeusbut note that I'm not interested in 30 temporary data types for easy deserialization code
03:55:10disrupteki dunno what that means.
03:55:59disruptekthe idea is that jason is implemented via concepts. the concept of a string is a thing that can rendered as be a quoted string.
03:56:19disrupteks/be/is/
03:56:19FromDiscord<Elegant Beef> No i'm not you are
03:56:50zedeushttps://github.com/zedeus/nitter/blob/master/src/parser.nim
03:56:53disrupteki'm just having an issue with the macro that creates variant objects.
03:57:07zedeusthis is pretty manual json parsing, which is fine but not ideal, I guess
03:58:11disruptekseems fine to me. is it slow? can you rely on the types?
03:58:26zedeusit's blazing fast, the parsing and rendering overhead is about 1 ms
03:58:46disruptekwhy work on it?
03:58:57zedeusI like clean code that's easy to extend later
03:59:06zedeusnot necessary
03:59:11disrupteki can't see how it forwards the immediate goal.
03:59:27zedeusit doesn't, was just a note since you've worked on a bunch of json stuff
03:59:36zedeusanother project you can work on is a new redis library that doesn't suck
03:59:53zedeuspreferably by generating the API and having some nice templates
04:00:07disruptekwhat i think would be worth doing, and i know you don't, is supporting decompression in the web client.
04:00:26disruptekyou might be surprised how much faster everything becomes.
04:00:43zedeusoh that is done now using nginx
04:00:55disruptekoh nice.
04:00:57zedeusgzip (and brotli when I get around to enable it)
04:01:12disruptekthat's really good.
04:01:18disruptekwhat kind of affect did it have on speed?
04:01:32zedeusminor, since the majority of time is waiting for twitter to respond
04:01:50zedeusnitter is fast now though, really fast
04:01:55zedeusabout 2-4x as fast as before v2
04:02:08disruptekis there anything slow?
04:02:18zedeusnothing we can do anything about
04:03:02disruptekokay, i'll look at redis. its been ages since i used it, anyway. 👍
04:03:14zedeusin redis_cache (which contains rather poor code) you can see my current usage of it
04:03:28zedeusI use frosty and snappy for compression and de/serialization
04:03:34disruptekis there anything useful that's missing?
04:03:41disruptekyou use frosty?
04:03:44zedeusyep
04:03:49disruptekand it works?
04:03:52zedeusindeed it does.
04:03:57disruptekholy shit.
04:04:00disrupteki don't even use it.
04:04:07zedeusI can't use the socket feature since it needs to be compressed first
04:04:22disruptekwhat does that have to do with it?
04:04:43zedeuswell, my current usage is this `compress(freeze(data))`
04:04:48disruptekfrosty really works?
04:04:54zedeusyeah, I was surprised too
04:05:06disruptekdoes it even pass tests?
04:05:18zedeusdefine tests
04:05:34disruptekoh, frosty is the one that's broken right now.
04:05:37disruptekblocking me.
04:05:53zedeusI'm not using #head, don't worry
04:06:01disruptekcannot create a case object after reading the discriminator from the stream via a macro.
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:06:03zedeusif I do, it doesn't work
04:06:10zedeusah I don't use case objects
04:06:12disruptekoh, head is broken?
04:06:23zedeussort of, there's a missing nimble package in marshmellow
04:06:33zedeuserh, marshmellow doesn't have a .nimble
04:06:36*supakeen joined #nim
04:06:39disruptekoh muffins
04:06:51disruptekwe don't use it yet i don't think.
04:06:54zedeusyeah forgot, haven't looked at it recently
04:07:31zedeusI optimized the hell out of nitter's memory usage recently
04:07:44zedeusnitter.net with its tens of thousands of daily users only uses 100 MB
04:07:49disrupteknice.
04:07:55zedeuscould be better, but I'll take it for now
04:08:07zedeusit remains at 65 MB for hours till rush hour comes around
04:08:21disrupteki'm looking forward to optimizing gram.
04:08:32disrupteklots ideas for stuff to try.
04:08:40zedeusoptimizing stuff is fun
04:08:40disrupteki'm surprised how large intsets are in memory.
04:09:00zedeusare they?
04:09:03FromDiscord<Rika> i dont understand what nitters for IMO
04:09:13disruptekyeah, i think they are.
04:09:17zedeusnitter is for using twitter without actually using twitter
04:09:27FromDiscord<Rika> IMO -> tbh, me brains not workin
04:09:29disruptekso that twitter cannot follow you.
04:09:34zedeusyour reasons for doing that may vary, but the main reason is privacy
04:10:01zedeusnow that the good UI has been removed, you may also want to use it if you want a better web client
04:10:16zedeusif your bandwidth is limited, that's another reason to use nitter, since it's much lighter and faster
04:10:39zedeusthere are also conveniences, like a search tab on profiles and unrestricted access to the media tab, amongst other things
04:10:49FromDiscord<Rika> i'd use it if i could combine people's twitter pages or whatever theyre called
04:10:55zedeusyou can do that
04:11:00zedeusnitter.net/elonmusk,spacex,nasa
04:11:01FromDiscord<Rika> oh, how
04:11:34zedeusthe limit is ~25 due to search query restrictions, still working on solving that problem.
04:11:47FromDiscord<Rika> oh i see, 25 doesnt sound too bad of a limit
04:12:04zedeusit's decent, but far lower than the number of accounts people usually follow
04:12:28zedeusyou can also browse twitter lists too, so you could make a list that mirrors the people you follow
04:12:36zedeusexample: https://nitter.net/NASA/lists/Astronauts
04:13:05zedeusoh, disruptek there is another small thing you can work on
04:13:16FromDiscord<Rika> > it's decent, but far lower than the number of accounts people usually follow↵Zedeus: *sweats* i uh have over a thousand by now i think
04:13:22disruptekyeah?
04:13:25zedeushttps://github.com/zedeus/nitter/blob/master/src/tokens.nim
04:13:30disruptekover a thousand what?
04:13:45zedeusmy uh, "token pool" here is designed in a specific way but the usage of it is subpar
04:14:18FromDiscord<Rika> disruptek: follows lol
04:14:29disruptekwhat does that mean?
04:14:35FromDiscord<Rika> people i follow
04:14:40zedeuseach token has a rate limit that we can keep track of, twitter sends us back the new number after every request. you must not use the token after this number reaches 0, other wise you get rate limited. after 15 minutes, you can use it again, but after a couple hours the token expires fully
04:14:40FromDiscord<Rika> people i want to see tweets of
04:14:47FromDiscord<Rika> or are you talking to zed now
04:15:25disrupteki was talking to you both.
04:15:34disruptekzedeus: sounds fun.
04:15:53zedeusI use a seq to store the tokens, using it as a queue. when getting a token for use, I pop a token off the seq, check if it's usable, and if so I return that to the caller, otherwise I put it back in the back of the seq - unless it has expired
04:16:18zedeusthis leads to tokens being unavailable for ~300 ms at a time will requests run, requiring a fairly large token pool
04:16:24zedeuswhile*
04:16:46zedeusif tokens instead could be shared without being removed from the seq, that might help, but I haven't spent time trying to solve that yet
04:16:55FromDiscord<Rika> if you never access the middle of the seq, do you really need to use a seq?
04:17:10disruptekwhy don't you just use a deque or a ring buffer?
04:17:14zedeusyes, they're popped from the top and returned to the back
04:17:20zedeuswell I could, it doesn't make a difference
04:17:22FromDiscord<Rika> yeah what dis said
04:17:44disruptekdoes the amount of time you want to delay vary with the token?
04:17:56disrupteki would think that all tokens are equally servicable.
04:18:35FromDiscord<Rika> it would make sense that hte delay would be constant
04:18:37zedeusnono, let me explain. we pop a token from the seq, use it in a http request, then return it to the seq. the request takes ~300 ms
04:18:49disruptekso what?
04:18:55FromDiscord<Rika> uh
04:19:01zedeusduring that 300 ms it cannot be used in other requests, that's the issue
04:19:03*aenesidemus_ quit (Read error: Connection reset by peer)
04:19:12zedeusgetting new tokens is rate limited as well, this is why it matters
04:19:13disruptekhow many tokens are you allowed to have at once?
04:19:17FromDiscord<Rika> make a datatype that you can do a `get()` then internally the next get will be on the next token
04:19:25zedeusI think about 187 every 15 minutes
04:19:44disruptekokay, well i think this is a data-structure problem.
04:19:44zedeuseach token has a rate limit of 187, so a theoretical max of 35k requests every 15 minutes
04:19:48zedeusjindeed
04:20:04disruptekcool, this is a good one for the stream, too.
04:20:11zedeusawesome
04:20:11FromDiscord<Rika> its an interesting one, at least to me 😛
04:20:21disruptekyeah, it'll be really fun to play with.
04:20:34zedeuslet me know if you need further explanations, this whole deal has been complicated and I've spent hundreds of hours working on nitter
04:20:53zedeusat this point, I'm pretty sure I know more about twitter than most developers at twitter
04:20:55disrupteksure, i know how it is.
04:21:03disrupteki'm just amazed that frosty works.
04:21:10zedeusnot that I want to, I hate twitter almost as much as I hate web development
04:21:17zedeusgood job on frosty, it's cool
04:21:43disruptekthanks, i'm close to being able to thaw json.
04:21:52aeverrthats a lot of checks
04:21:53aeverroops
04:21:57disruptekjust has a weird error that i don't understand.
04:21:59aeverrsorry, wrong channel
04:22:12disruptek/home/adavidoff/nims/nightly/lib/pure/streams.nim(394, 14) Error: invalid type: 'void' in this context: 'proc (s: Stream, result: var void){.gcsafe, locks: 0.}' for proc
04:22:19zedeushuh
04:22:44zedeuscould it be because of nrvo?
04:23:00FromDiscord<Rika> looks like it would be because of nrvo
04:23:00disruptekit's possible.
04:23:17zedeusI don't know if the transformation is literally applied like that, and at that stage, but that's my idea
04:23:40disrupteki have to dig into it, but i've been hacking at this mangling thing.
04:24:10zedeusno rush
04:24:18disruptekit's a mess, but i have to put it away. seems like the only solution is whole-program analysis.
04:24:38zedeusoh also, about what nitter is for
04:24:39disruptekwell, it might be the easiest solution, anyway.
04:24:41zedeushttps://github.com/ciderpunx/twitrssme
04:24:47zedeusthis no longer works, had lots of users
04:24:52zedeusnitter has rss feeds
04:24:58zedeushttps://github.com/twintproject/twint
04:24:59disruptekah, neet.
04:25:05disruptekneat, too.
04:25:10zedeusthis no longer works, over 5k stars and I see it mentioned quite often
04:25:18zedeusnitter can fill the gap of these
04:25:53disruptekhmm, cool.
04:25:59FromDiscord<Rika> time to advertise
04:26:05zedeusthe twint developer has said he doesn't have time to work on it, and the twitrss guy is very inactive
04:26:07disruptekany idea what the benefit to caching would be?
04:26:56zedeuswe already cache profile ids, photo rails, lists, and rss feeds
04:27:24disruptekso you just can't cache the timeline?
04:27:25zedeusnot doing so would make nitter more than twice as slow, waste tokens, and probably start hitting rate limits
04:27:54zedeusthe timeline could be cached, but most timeline traffic is rss which is cached, and I'm not sure how often timelines are revisited within a 5-10 minute frame
04:28:14disrupteki'm thinking users may share follows.
04:28:49zedeuscertain popular timelines likely get visited a lot, but I have no idea
04:29:11disruptekthat's where i was going with asking about benefit of caching.
04:29:15zedeusan interesting problem could be doing some runtime analysis using redis, then doing dynamic caching
04:29:33zedeusie. cache timelines that get visited very often
04:29:46disruptekcan't redis handle ttl?
04:30:12zedeussure, but we don't want to waste memory caching timelines that don't get visited more than once during that ttl
04:30:27zedeuspeople run nitter on arm devices, dammit
04:30:43disruptekthe memory can get evicted.
04:30:57disruptekif it's visited more frequently, the cache will get hit.
04:31:00zedeusyou have very limited control over what can get evicted
04:31:03disruptekit will always get hot, as it should.
04:31:14disruptekreally?
04:31:27zedeuswell not _very_ limited, but it's not exactly granular
04:31:50zedeusanyway, this isn't a problem right now, nitter's traffic doesn't cause a problem with rate limits yet
04:31:53disruptekyou can choose the unix time stuff expires at in an O(1) op afaict.
04:32:04disruptekokay.
04:32:24disruptekso better token handling and what else?
04:32:50zedeusfor now there's token handling, redis library, embeds
04:32:58disruptekoh right.
04:33:04zedeussome refactoring/cleanup if you feel like it, the types could use some work
04:33:26disruptekembeds seem the most important.
04:33:34zedeusyep
04:33:42zedeusit has been wanted for a long time, nitter is getting old
04:33:56disruptekdo you know how to do it?
04:33:59zedeusI started the project over in april last year
04:34:06zedeussort of, something about iframes
04:34:27zedeusbut again, the main obstacle is tweet dropdowns
04:34:31disrupteki guess it cannot be difficult for obvious reasons.
04:35:51zedeusbut yeah generally there's lots of things to work on, just look at the issues
04:37:22zedeushttps://github.com/zedeus/nitter/issues/134
04:37:23disbotquoted replies button
04:37:33zedeussee my reply here for why embeds haven't happened yet lol
04:37:42zedeusagain it's not difficult to do, it just has to be done first
04:37:52disruptek~features
04:37:53disbotfeatures: 11begin in the unfortunate state of /unimplemented/ -- disruptek
04:37:57zedeusindeed
04:38:28disruptekokay, i'll start tomorrow. 👍
04:38:56shashlickConan turned out to have some big holes
04:39:15disruptekhow so?
04:39:17shashlickBuilds for osx are built on 10.14 so older osx complain
04:39:58shashlickWindows builds are done with visual studio and the static libs don't link with mingw
04:40:29zedeusoh also with dropdowns we can add a nice "Archive" button, the functionality of which should be obvious.
04:40:29disruptekthese sound like teething problems.
04:40:53leorize[m]shashlick: have you tried my osx builds?
04:41:25zedeusI'm planning to support decentralized twitter archives, requesting deleted tweets from whitelisted nitter instances and such
04:42:03zedeusat least two twitter engineers have looked at nitter so far and they love the project
04:43:13FromDiscord<Rika> holy shit damn
04:43:18shashlick@leorize nope, unfortunately my Nim time is effectively down to an hour a week
04:43:52zedeuseventually you will be able to login with your twitter account on nitter, but you know what they say about features
04:44:00shashlickThat's after adding up ten random sessions of coding
04:44:33shashlickI'd have done better to add http://binarybuilds.org support first
04:44:50zedeuswrong url? I can't load it
04:46:13shashlickhttps://binarybuilder.org/
04:47:39zedeusdamn, that's neat
04:52:01shashlickYep Julia has taken the whole wrapper thing real seriously
04:53:51disruptekwhy does it build binaries sequentially instead of all at the same time?
04:54:01zedeuscores are finite
04:54:07shashlickCheck this out - https://github.com/JuliaBinaryWrappers/
04:54:18disruptekyou could hardly come up with a more parallelizable process.
04:54:51disruptekinteresting.
04:55:17disruptekseems like we should use this, right?
04:55:26zedeusI'm not sure I get it
04:55:36shashlickI'm planning on adding support to pull binaries from there
04:55:45disruptekyou give it build instructions and it extrapolates to support more platforms.
04:55:50disruptekyou can tweak any such script.
04:55:56zedeusbut wrappers?
04:56:02disruptekwhat about them?
04:56:16zedeushow does that relate to crosscompilation?
04:56:19disruptekpeople that use nimph don't necessarily /need/ to build it.
04:56:40disruptekthat's how tests can work better.
04:57:07shashlickOr libarchive when you are using nimarchive
04:57:50shashlick@kdheepak already wrote Nim code to download from there so should be easier than Conan
04:59:33zedeuswait.. so it's for downloading (or compiling) library binaries, it's not for generating language bindings to them, or does it do both?
04:59:41shashlickhttps://github.com/kdheepak/binary-builder-downloader
04:59:53shashlickThat just builds the binaries
05:00:44zedeushttps://github.com/JuliaBinaryWrappers/FFMPEG_jll.jl
05:00:47zedeuswhat's all this about then?
05:04:40shashlickYep you can then import them into Julia
05:04:59shashlickThey have some wrapping process as well, still looking for the details on that
05:06:58*dddddd quit (Ping timeout: 246 seconds)
05:07:33shashlickhttps://github.com/JuliaInterop
05:14:07*Senny quit (Ping timeout: 272 seconds)
05:14:11*silvernode joined #nim
05:17:11zedeusdisruptek: there's #nitter btw, we can talk there tomorrow
05:27:39*gangstacat quit (Quit: Ĝis!)
05:42:16*solitudesf joined #nim
05:44:03silvernodeHow come when I return getch() in a proc, it tells me it is of type char and has to be discarded?
05:45:15FromDiscord<Rika> what do you mean
05:45:28FromDiscord<Rika> what is the proc's return type
05:47:26silvernodehttps://play.nim-lang.org/#ix=2p8Y
05:47:57FromDiscord<Rika> it compiles just fine
05:48:21FromDiscord<Rika> if you use it, you need to do `discard ask_question()` or use the result
05:49:45silvernodeyeah I wasn't using it, I ended up echoing it and that was considered using it Figured it out right before you replied
05:49:47silvernodethanks
05:50:05silvernodenot echo but rather made a var
06:00:47*bung joined #nim
06:02:07*marnix joined #nim
06:05:35*Vladar joined #nim
06:08:32*vikfret joined #nim
06:18:44*marnix quit (Ping timeout: 265 seconds)
06:22:06*fredrikhr joined #nim
06:27:10FromDiscord<Rika> \:( jester doesnt compile on devel
06:36:37*marnix joined #nim
06:41:58*marnix quit (Ping timeout: 260 seconds)
06:44:20PrestigeTrying to understand refs a bit better - I have an OrderedTableRef in ObjectA that I provide to ObjectB. If ObjectA updates that table, shouldn't ObjectB see the changes?
06:45:47Prestigeoh it does, good
06:52:37FromDiscord<Rika> voltist: you made inumon the library right?
07:14:32*marnix joined #nim
07:17:52*cyraxjoe quit (Ping timeout: 246 seconds)
07:18:28*cyraxjoe joined #nim
07:20:30*Cthalupa quit (Ping timeout: 272 seconds)
07:21:24*Cthalupa joined #nim
07:25:55*cyraxjoe quit (Ping timeout: 265 seconds)
07:26:18*cyraxjoe joined #nim
07:28:10*solitudesf quit (Ping timeout: 260 seconds)
07:55:51FromDiscord<Elegant Beef> Prestige what languages have you programmed in?
07:56:46Prestigequite a few I guess - started with Java, learned C#, javascript, typescript, python, a little c.. tried a few like rust, go, kotlin
07:56:58Prestigewasnt a fan of ruby
07:56:59FromDiscord<Elegant Beef> Ah then references are like Java/C# classes
07:57:32Prestigeyeah I thought my ref wasn't being updated for some reason but I literally just forgot to change the variable I was calling lol
07:57:37FromDiscord<Elegant Beef> Ah
07:59:01FromDiscord<Elegant Beef> Do you need a reference table?
07:59:37FromDiscord<Elegant Beef> Im going to guess probably no, but idk what you're doing
08:01:02PrestigeI finished that chunk of code, I think I'm good
08:01:08PrestigeNeed to clean up some of this code though
08:01:38Prestigewas just implementing these little indicators in my status bar to show if a tag has a window on it: https://0x0.st/iWNN.png
08:41:51*D_ quit (Ping timeout: 272 seconds)
08:44:41*D_ joined #nim
08:48:57*kenran joined #nim
08:50:30*Vladar quit (Quit: Leaving)
09:04:27*drewr quit (Ping timeout: 260 seconds)
09:05:54*drewr joined #nim
09:09:48*solitudesf joined #nim
09:11:28*fredrikhr quit (Read error: Connection reset by peer)
09:11:48*tdc joined #nim
09:11:53*fredrikhr joined #nim
09:21:13*marnix quit (Ping timeout: 264 seconds)
09:23:52*oddp joined #nim
09:26:01*silvernode quit (Ping timeout: 264 seconds)
09:30:10*nikita_ quit (Quit: leaving)
09:41:24*fredrikhr quit (Quit: Client Disconnecting)
09:52:01*krux02 joined #nim
09:55:15FromDiscord<wiremoons> Hi - can anyone recommend a document or article on how to start writing tests for Nim programs? I have seen info in `assert` and `doAssert`, noticed there is a `unittest` module - but that says to use `testament` - but no links to what that is that I can see. Sorry if I am missing the obvious!
09:59:31ZevvNo testament needed.
10:00:05ZevvYou can import unittest and just do tests there. It does not do much, but provides handy tools for nice output and expected execptions and stuff like that
10:00:30Zevvyou can just run your code as a normal nim program, no testament needed
10:00:41ZevvTop level you define a 'suite', then your 'tests' blocks below that
10:01:32krux02wiremoons: The easiest way to define tests for a module is to write a section at the end of your file: when isMainModule:
10:01:59krux02in this section you call your private functions with asserts to expected results.
10:02:18krux02run your module, and you get your test results.
10:02:43krux02This is not yet automated testing, but it gets you started.
10:05:45*D_ quit (Quit: No Ping reply in 180 seconds.)
10:06:40*D_ joined #nim
10:10:12FromDiscord<wiremoons> OK - thanks for the suggestions 👍
10:26:10*pangey joined #nim
10:29:34*kenran quit (Ping timeout: 240 seconds)
10:57:53PrestigeIs issue #6 being worked on? (Cyclic imports)
10:58:15PrestigeOr is there some way around that issue
11:01:17FromDiscord<Rika> reorder your imports basically
11:01:33FromDiscord<Rika> theres a certain way to order them but its hard to elaborate on
11:01:37FromDiscord<Rika> i think its touched on in the manua
11:01:38FromDiscord<Rika> ,
11:01:38FromDiscord<Rika> l
11:02:26PrestigeYeah, was looking it over.. seems weird
11:05:08*NimBot joined #nim
11:14:54*nikita` joined #nim
11:19:50FromDiscord<Shucks> Im running into a `recursive module dependency` is there a way to define a variable with a global object type without defining the specific object?
11:21:30FromDiscord<Shucks> like `var MyVar: object`
11:25:00FromDiscord<flywind> @wiremoons If you can tolerate some bugs in `testament`, you can look at this simple introduction to `testament`. 🤣 ↵https://dev.to/xflywind/how-to-use-testament-in-nim-1l0h
11:26:57*Vladar joined #nim
11:29:05krux02Shucks: define your type first, then you can define your global variable.
11:29:30krux02Nim doesn't allow forward declarations of types sadly.
11:29:55krux02to break the recursive module dependency, it helps to have one module that declares all the types.
11:30:00krux02without functions
11:32:04FromDiscord<wiremoons> Thanks @flywind - I will take a look 🙂
11:34:09FromDiscord<flywind> np
11:34:14krux02You should not use testament in your own projects. It is an internal testing tool designed to test the Nim programming language with many testing the nim compiler feauters specific feautures.
11:37:19FromDiscord<Shucks> > Shucks: define your type first, then you can define your global variable.↵@krux02[IRC]#0000 yea the issue I got is that the type is from a file which needs my global variable aswell
11:37:27FromDiscord<Shucks> > to break the recursive module dependency, it helps to have one module that declares all the types.↵@krux02[IRC]#0000 Gonna do that then
11:39:08Yardanicowe also have https://nim-lang.org/docs/manual_experimental.html#package-level-objects but I didn't see it used in real code at all :P
11:40:10*WilhelmVonWeiner quit (Ping timeout: 272 seconds)
11:48:16*letto quit (Quit: Konversation terminated!)
11:49:13FromDiscord<Rika> well its still in experimental
11:49:19Yardanicosooo? :)
11:49:30Yardanicocode reordering is experimental too but I've seen it used a few times
11:49:34Yardanicoconcepts are "experimental" too
11:50:12FromDiscord<Rika> its the first time ive seen it in this document even
11:50:20Yardanicoit's been here for a long while
11:50:21FromDiscord<Rika> reordering and concepts have been there for longer
11:50:25Yardanicowell yes
12:06:02*supakeen quit (Quit: WeeChat 2.8)
12:06:14*letto joined #nim
12:06:34*supakeen joined #nim
12:11:34*lritter joined #nim
12:25:44*waleee-cl joined #nim
12:28:28*abm joined #nim
12:41:04*dddddd joined #nim
13:18:02*haxscramper joined #nim
13:19:44FromDiscord<Shucks> what are the correct debug parameters for gdb? I've added a lot crazy stuff to the nim.cfg and it just doesnt feels correct lol. ```-d:debug↵--debugger:gdb↵--linedir:on↵--debuginfo```
13:26:17FromDiscord<Rika> --debugger:native ?
13:34:49haxscramperHow to distingush between different global procs using `typeof`? I want to do this: `when declared(toPStr) and (toPStr is proc(a: int): string {.nimcall.})`, but it fails if I define more than one proc with the same name.
13:36:37FromDiscord<Rika> what are the 2(or more) procs' signatures?
13:36:43haxscramperHere is test code: `https://play.nim-lang.org/#ix=2paH` - commenting second `toPStr` makes check valid. It compiles both ways, just doesn't work as I want it to.
13:36:54FromDiscord<Rika> you can define 2 procs w/ same name only if the 2 procs have different argument arity and types
13:36:59FromDiscord<Rika> not return type
13:37:23FromDiscord<Rika> huh
13:38:33*Senny joined #nim
13:40:08FromDiscord<Shucks> > --debugger:native ?↵@Rika Thanks. Debugging nim seems quite hard. VSCode with gdb doesn't shows me any variables and stuff
13:50:00*chemist69 quit (Ping timeout: 256 seconds)
13:51:01*chemist69 joined #nim
13:56:57haxscramperWriting proc that accepts proc work - the one with correct signature is used. Assigning `let t = toPStr` gives compilation error `invalid type: 'None' for let`. Having only regular and generic procs defined leads to the same error - `https://play.nim-lang.org/#ix=2paK`. Is there are some way of selecting an overloaded proc or I just have to go with `when(compiles(...))`?
14:00:02haxscramperHow expensive is `when(compiles(...))` by the way? I'm writing a pretty-printer for objects - which means it will trigger quite often during compilation (dozens of times at least, even more if printing lots of different types).
14:06:14Zevvhaxscramper: safest is to measure I guess. Just do it a million times and divide by a million to know how long it takes :)
14:09:15*marnix joined #nim
14:32:15disruptekhaxscramper: it's super cheap.
14:33:43*kenran joined #nim
14:45:25haxscramperI actually tested it on one million `compiles` checks (34mb of text) - results are: `Hint: 1037839 lines; 107.292s; 1.963GiB peakmem;`. Which means about `0.0002` seconds per check. Script to generate test case: `https://play.nim-lang.org/#ix=2pb6`.
14:58:40*PMunch joined #nim
14:59:42disruptekneat; that seems cheap enough.
15:00:41disruptek~compiles is tested it on one million `compiles` checks (34mb of text) - results are: `Hint: 1037839 lines; 107.292s; 1.963GiB peakmem;`. Which means about `0.0002` seconds per check. Script to generate test case: `https://play.nim-lang.org/#ix=2pb6`.
15:00:42disbotcompiles: 11tested it on one million `compiles` checks (34mb of text) - results are: `Hint: 1037839 lines; 107.292s; 1.963GiB peakmem;`. Which means about `0.0002` seconds per check. Script to generate test case: `https://play.nim-lang.org/#ix=2pb6`.
15:04:27FromDiscord<Shucks> Just found out that i had a 64bit version of gdb in path and my project is build in 32bit
15:04:33FromDiscord<Shucks> seems to work fine now
15:08:54*nerthus quit (Remote host closed the connection)
15:09:08*nerthus joined #nim
15:19:24ZevvPMunch: What was this compile you were running for a month?
15:20:06disruptekdude. it's like a proc that takes 308 million arguments.
15:20:31PMunchZevv, it's still running :P
15:20:37Zevvright. I made a little test to see how #args scales to compile time ,but it seems to be nicely linear
15:20:55disruptekonly 307 million seconds to go.
15:20:58PMunchThat's what I expected
15:21:14PMunchI can always run the one with all 5 letter combinations again and see how long that takes
15:21:33PMunchTiming that by 26 should tell me how long this should take
15:21:41disruptekjust think of all the heat generators we could make.
15:21:58disruptekand here pmunch is wasting energy on arguments.
15:22:06PMunch:P
15:22:22disruptekFOR SHAME
15:24:06ZevvI have a little proc taking 'n' ints and echoing them all
15:24:20Zevvcompiling that for n = 100000 takes 2 seconds
15:24:33Zevv(26**6) * 2.0/100000 is only 6000 seconds
15:24:38FromDiscord<Rika> 100k is nothing compared to 308 million
15:24:45Zevv^^
15:24:56disruptekit's weird how that works.
15:25:14Zevv100k and 308 million is not that far apart
15:25:18FromDiscord<Rika> i think its linear in smaller perspectives
15:25:25FromDiscord<Rika> how a circle looks linear when zoomed in
15:25:43disruptekants have a narrower field of vision.
15:26:30Zevvoh waait something interesting is happening at 120k
15:26:34Zevvsuddenly it blows up
15:26:50Zevvit kind of halts
15:27:03disruptekmemory churn.
15:27:10Zevvprobably
15:27:16Zevvrestarting from 120k onwards
15:27:39Zevvyeah just exhaustion
15:28:50Zevvbut no longer linear
15:30:04disruptekdid you hear? someone is actually using frosty and it works.
15:31:53Zevvwhat be frosty
15:32:05disruptek!repo frosty
15:32:06disbothttps://github.com/disruptek/frosty -- 9frosty: 11marshal native Nim objects via streams, sockets 15 6⭐ 0🍴
15:32:34disrupteksimple recursive freeze/thaw.
15:32:48Zevv"Frosty can handle cyclic data structures," \o/
15:32:51Zevvyou did it
15:32:53Zevvgood boy!
15:33:16disruptekoh, yeah. i think it's still the way i said it was.
15:33:20ZevvI do wonder how you plan to do cyclic data structures of infinite size though
15:33:44disruptekaraq showed me how to turn a recursive operation into a fsm.
15:34:08Zevvbut still, where do you plan to store this infinite size list of things you already serialized
15:34:29*silvernode joined #nim
15:34:39disruptekthey don't make infinites like they used to.
15:34:44disruptekthey make 'em better.
15:34:49ZevvI just explained my kid today how you can put up an infinite amount of people in a hotel with an infinite amounut of rooms occupied by an infinite amount of people
15:34:53Zevvtoo bad he didn't want to listen
15:34:57disruptekyou can get them small and grow them.
15:35:18Zevvhow many infinites are you allowed to grow at home in the US these days then
15:35:30disruptekit's pretty much infinite.
15:36:25disruptek!last disruptek
15:36:26disbotdisruptek spoke in 12#nim 54 seconds ago 12https://irclogs.nim-lang.org/14-06-2020.html#15:35:30
15:38:08Zevvlucky you
15:38:16Zevvhere in the netherlands stuff is much more regulated.
15:38:30disruptekit's weird how that works.
15:38:38Zevvone infinite stuffed under your car seat and you're done for
15:39:03disruptekthey cancelled LivePD here.
15:39:18Zevvha
15:39:57ZevvWe just Zol
15:40:59zedeussup
15:41:12disruptekwhat is up my man.
15:43:00zedeusI found an old twitter API reference pdf created by disassemblying the twitter app, that lets you do a bunch of stuff the new API doesn't allow without authorization
15:43:10zedeuswith this nitter can support more stuff
15:43:22disruptekwow
15:43:35zedeushowever they have separate rate limits, but use the same tokens, so I may have to revise how that works
15:43:50disruptekneat.
15:44:44zedeusdropdowns are important btw, they will allow for plenty of features
15:44:45disruptekwe can just balance tokens between each side.
15:45:43zedeuswe can do a mumble call and talk about nitter's internals if you want
15:46:19disruptekyeah, turns out i broke mumble and obs when i rebuilt qt.
15:46:33zedeusjoys of using source-based distros, huh
15:46:57disrupteki love it, i really wouldn't want to fly any other way.
15:47:28disrupteki guess i just don't understand the guarantees of other sytems.
15:48:34zedeusthings are unlikely to break, and if they do you won't have to wait a few hours for qt to rebiuld
15:48:46disrupteka few hours?
15:48:55zedeusdepends on your cpu of course, but qt is no small project
15:51:48disruptekwww-client/ungoogled-chromium: 58′44″ average for 53 merges
15:51:55disruptekdev-qt/qtgui: 2′05″ average for 19 merges
15:52:18zedeusfair. maybe you just need to rebuild mumble?
15:52:20disruptekis two minutes a long time for a process i can run in the background or even automate?
15:52:26*adnan338 joined #nim
15:52:31disrupteki'm just asking.
15:52:38disruptekam i the idiot here?
15:52:41solitudesfccache is cheating
15:52:44adnan338Hi, is this how I should be using locks? https://play.nim-lang.org/#ix=2pbu
15:52:51disruptekgtfo there's no such thing as cheating.
15:52:57zedeuslol
15:53:10disruptekTHIS IS SPARTA
15:53:26zedeushttps://github.com/zedeus/nitter/issues/189
15:53:27disbotSupport Unix Domain Sockets
15:53:38zedeushmm, do you know what he wants? can we do it?
15:53:53disruptekyeah, it's like what swayipc does.
15:54:28zedeusI assume that would be separate from jester
15:54:52disruptekit would make interesting api-using apps easier for x-lang development, i guess.
15:55:16disruptekis this a linux-only app?
15:55:47zedeusit might run on windows but I don't know, or care
15:55:56disruptekokay.
15:57:04zedeusare you going to fix your mumble today?
15:57:14disruptekyeah, probably.
16:01:10*haxscramper quit (Remote host closed the connection)
16:01:14disruptekseems like making it work with jester would be ideal.
16:01:18disruptekmaybe we can pr jester.
16:04:53FromGitter<kdheepak> Currently the binary-builder-downloader code downloads binaries and related metadata in parallel as well! nim makes it easy to do that.
16:05:21FromGitter<kdheepak> I haven't looked into conan support yet, but I'm interested in adding conan and conda support.
16:05:50zedeusperhaps, I consider it low priority though since it doesn't really offer a significant benefit over using tcp, and it's local only which isn't the main use case for nitter
16:06:07disruptekmakes sense.
16:09:42*chemist69 quit (Ping timeout: 260 seconds)
16:10:02*kitech1- quit (Quit: ZNC 1.7.5 - https://znc.in)
16:10:35*chemist69 joined #nim
16:10:44*kitech1 joined #nim
16:12:47*bung quit (Quit: Lost terminal)
16:16:36*PMunch quit (Quit: leaving)
16:18:46*marnix quit (Ping timeout: 258 seconds)
16:35:25*abm quit (Read error: Connection reset by peer)
16:38:58disruptekwhat's the relationship between when a token expires and your software?
16:39:54zedeusif the expired token is used, you get an error
16:40:04*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
16:40:20zedeushow long it takes to expire i'm not 100% sure, but it appears to be a couple hours
16:41:08disruptekwhat's the impact of getting the error upon use of an expired token?
16:41:12*kitech1 joined #nim
16:41:54zedeushaving to redo the request - wasted time
16:42:08disruptekokay, but nitter does the right thing, right?
16:42:16zedeusyeah, it discards expired tokens before use
16:42:33disruptekright, but i mean a failure is pretty cheap, especially if it's for testing purposes.
16:42:48disrupteki'm just trying to understand if there are any hidden costs like it could break all your keys, etc.
16:43:10zedeusnah, twitter's token rules are very stupid
16:43:37disruptekso currently you just do something to check the pool every few minutes?
16:44:11disruptekwhat's the limit of token requests?
16:46:05zedeusnot quite. when we want a token we go through the token pool till we get a usable one, or fetch a new one if none are available. a loop is running every two seconds that checks whether some minimum amount of tokens are available for use. this is done to prevent having to fetch tons of tokens during bursts
16:46:27disruptekright.
16:46:47disruptekeach token can be used 187 times, though, right?
16:46:56zedeusi'm still not sure about the rate limit for getting tokens, it doesn't exactly give you a number. you fetch twitter.com and either it contains a token, or it doesn't
16:47:02zedeusyeah, 187 times every 15 minutes
16:47:20disruptekso when the token is >15mins old, you toss it.
16:47:27disruptekor if it has been used 187 times.
16:47:46zedeusnah, when it's 15 mins old the limit is reset
16:48:08disruptekso each token is a thread.
16:48:11zedeusif it has been used 187 times, we put it back in the pool for later
16:48:47*ftsf quit (Ping timeout: 260 seconds)
16:48:47disruptekdo you have to guess what constitutes a use or does twitter tell you the current usage number?
16:49:21zedeusthe number is returned in the headers
16:49:41disrupteknice.
16:50:45*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
16:51:07*kitech1 joined #nim
16:52:19FromDiscord<dom96> Aren't you worried Twitter will shut this down? 🙂
16:52:26zedeusnope
16:52:40zedeusif they shut it down, their site will stop working :)
16:53:22FromDiscord<dom96> Hrm, but they could surely change the mechanism completely and quite suddenly, no?
16:53:35zedeusoh, they did, but I just followed along
16:53:43zedeushttps://github.com/zedeus/nitter/pull/169
16:53:44disbotNitter v2
16:53:51FromDiscord<dom96> fun
16:53:57zedeusbesides, their ancient APIs are still available, they hate breaking backwards compat
16:54:12zedeusjson fields deprecated in 2010 are still included
16:56:05FromDiscord<dom96> Nice. If I haven't said it already, amazing job 🙂
16:56:34*Senny quit (Ping timeout: 240 seconds)
16:56:42FromDiscord<exelotl> yeah nitter is great :D
16:58:37*Kaivo quit (Quit: WeeChat 2.8)
16:59:47zedeusthanks!
17:00:40disruptekdoes fetching a token count as a use? ie. do they start with 0 uses or 1 use?
17:00:52zedeus0
17:17:21shashlick@kdheepak I've already built Conan support - you can leverage that
17:18:01shashlickhttps://github.com/nimterop/nimterop/blob/conan/nimterop/conan.nim
17:19:20stefantalpalaruI have finally documented this collection of ugly hacks: https://github.com/status-im/nimbus-build-system
17:20:14shashlickI'm going to leverage your code for binary builder support
17:20:43shashlickIdeally your code can be used at compile time
17:22:44shashlickWhat does conda support buy for Nim?
17:40:43disrupteki registered the domain nim.fan last night. 🥰
17:42:23FromDiscord<dom96> For some reason that reminded me of Gradha's blog which is filled with K-pop fandom https://gradha.github.io/index.html
17:42:50zedeusdisruptek: you better make it a giant fan with a spinning nim crown
17:43:00disruptekvery sharp pointy bits.
17:45:29disruptekalso nim.ninja
17:45:36disruptek👑.🥷
17:46:39supakeendisruptek: going to make it into a blog planet? ;)
17:46:49disruptekwhat's a blog planet?
17:47:04supakeenit's an old thing where many blogs would be aggregated about the same subject
17:47:14disruptekweird.
17:47:16*azed joined #nim
17:47:19supakeenso you used to have planet.mozilla.org for all the mozilla contributor blogs and stuff
17:47:35disruptekwhat a strange concept.
17:48:15zedeushttps://planet.emacslife.com/
17:48:17zedeusanother example
17:51:13dom96https://planet.nim-lang.org/
17:51:23dom96We already have one :)
17:51:38disruptekwtf
17:53:25supakeenrip
18:02:44*azed quit (Quit: WeeChat 2.8)
18:05:48disruptekzedeus: how many tokens do you run on the server?
18:07:00zedeusthe minimal is set to 20 in the config, but it might be more. last time I checked it was around 50, but I had two nitter instances running at the time
18:07:23disruptekis there a literal limit?
18:07:40zedeustheoretically yes, but I haven't calculated it yet
18:07:57*waleee-cl quit (Quit: Connection closed for inactivity)
18:08:15zedeusit requires knowing the exact rate limit for getting tokens, and when/how they expire
18:08:52disruptekbut you don't know that limit, right?
18:09:21zedeuscorrect. if we assume 100 tokens can be fetched every 15 minutes, and they expire after 2 hours, that's a max of 800 at any given time
18:10:05disruptekoh, the 15min limit isn't on the tokens themselves, it's on the number that you will fetch?
18:11:12zedeusthe rate limit per token resets every 15 minutes. the rate limit for fetching tokens I'm unsure about, but I think it also resets every 15 minutes
18:11:31disruptekokay, neat.
18:13:27zedeushttp://ix.io/2pc5
18:13:27FromDiscord<Rika> calling a proc that returns a closure counts as a global?
18:13:47zedeusthis gives you some interesting info, but I don't know if any of these relate to the tokens retrieved by simply fetching twitter.com
18:14:19zedeusthat is, I don't know if the mechanism by which you retrieve tokens that way is counted in this list
18:14:40*silvernode_ joined #nim
18:14:46*silvernode quit (Quit: Konversation terminated!)
18:15:12*silvernode_ quit (Client Quit)
18:15:20disruptekneat.
18:15:34*silvernode_ joined #nim
18:15:42*silvernode_ quit (Client Quit)
18:15:57zedeushere's the old api pdf I mentioned http://seriot.ch/resources/abusing_twitter_api/twitter_api.pdf
18:16:08zedeusmany of them still work, only requiring a guest token
18:24:18disrupteklol nice.
18:24:29disrupteki wonder if there's a swagger for this.
18:24:54disruptekseems like yes.
18:25:30FromDiscord<Rika> how do i make an immutable (set on compiletime) variable that's accessible in all threads?
18:27:48disruptekhow is it a variable if it's compile-time immutable?
18:27:59disruptekyou mean like var .compileTime?
18:28:01FromDiscord<Rika> well, i dont know what else to call it
18:28:07disrupteka constant?
18:28:14FromDiscord<Rika> `let smth = static:` is what i do
18:28:21disruptekwhy?
18:28:36Yardanico@Rika const smth = static: ?
18:28:42FromDiscord<Rika> i dont know really, it just works, i dont know if its what i intend it to do
18:28:52disruptekconst smth = "something static"
18:29:02FromDiscord<Rika> its a table[table[string, string]]
18:29:08disruptekso what?
18:29:16FromDiscord<Rika> ill try it
18:29:23disruptekcool, dawg.
18:29:35FromDiscord<Rika> nice
18:33:35FromDiscord<Rika> is my # of threads limited by how many logical cores my machine has?
18:33:41disrupteknah.
18:33:55disrupteka practical limit is tens of thousands.
18:34:06FromDiscord<Rika> huh, jester is only doing the # of logical cores then
18:34:10Yardanicoyes
18:34:19FromDiscord<Rika> yes what
18:34:20Yardanicobecause usually it doesn't benefit if you make tens of thousands of threads
18:34:41disruptekdepends on the architecture.
18:34:55FromDiscord<Rika> i mean, 10s of thousands i do not need
18:35:01FromDiscord<Rika> 2 is too little, though
18:35:02disruptekdon't be greedy.
18:35:05zedeusyou only have X cores, having more threads than that doesn't magically result in more work being done
18:35:19Yardanico@Rika well why not just amount of logical cores you have?
18:35:20zedeusdepends on the workload of course
18:35:36disruptekno, but it requires that the dispatcher handle scheduling instead of letting the os do it.
18:35:39Yardanicohttps://nim-lang.org/docs/osproc.html#countProcessors
18:36:05FromDiscord<Rika> @Yardanico I've only 2 logical cores
18:36:10Yardanicosoo?
18:36:25FromDiscord<Rika> Tis a vps, requests are kinda slow :(
18:36:26Yardanicoif you do CPU work then using more than 2 won't make a big difference in most cases
18:36:37zedeusfiring up more threads will not make it faster
18:36:40Yardanicooh, with jester and httpbeast? strange
18:36:44Yardanicoremember, httpbeast is async
18:36:45FromDiscord<Rika> I'll figure it out
18:36:49Yardanicooptionally threaded async
18:36:59zedeususing httpbeast latency increases 4x with threads enabled
18:37:04FromDiscord<Rika> Hmm
18:37:16zedeusthreads are for throughput, not latency
18:37:28FromDiscord<Rika> Hmm
18:38:08zedeusI benchmarked it yesterday when fixing a bug that imo made httpbeast completely unusable in production
18:38:22disruptekanother one?
18:38:32zedeusnah, just crosstalk
18:38:37disruptekah.
18:38:55disrupteki honestly don't think any of this stuff is production ready.
18:39:04zedeusyou don't want your data to get sent to the next guy in line just because you disconnect early
18:39:21Yardanicodisruptek: it's the best we have, no need to be so pessimistic :)
18:39:26disruptekcould be useful; it's like caching.
18:39:30zedeushah
18:43:25FromDiscord<Rika> oh, also with jester, i get `ERROR Could not send response: Operation now in progress`, dunno why but i suspect i'm being stupid and am doing something horribly wrong
18:51:47*tane joined #nim
19:00:22leorize[m]`-d:useStdLib`
19:00:25leorize[m]pass that
19:00:31leorize[m]make jester uses asynchttpserver
19:00:33*luis_ joined #nim
19:01:32leorize[m]httpbeast is designed for benchmark and IMO should never be used by anyone as the default.
19:02:41luis_Hi all, if I want to create a command line tool in which I can pass output from one commad into it in a bash pipe... should I be using readLine?
19:03:12Yardanicoluis_: maybe it's better to look into https://nim-lang.org/docs/osproc.html ?
19:03:13leorize[m]that works
19:03:25luis_many thanks
19:03:29*bung joined #nim
19:08:03FromDiscord<Rika> leorize: then it is odd that jester uses it by default, is it not?
19:08:24leorize[m]well benchmarks benchmark the default
19:09:08leorize[m]it's a way to make jester ranks higher in benchmark since httpbeast is much faster than asynchttpserver (I think, never benchmarked)
19:09:18zedeusit is
19:09:21leorize[m]don't quote me on that though, I'm not jester's author
19:11:38leorize[m]iirc the forum uses asynchttpserver, so I have trust in that it'll work properly
19:12:25zedeus4 cores with httpbeast I get ~150k req/s, while asynchttpserver is about 44k req/s
19:12:45zedeusthat's using jester, without you can get a bit faster
19:13:15FromDiscord<willyboar> whip is getting almost the same with plain httpbeast
19:13:40FromDiscord<willyboar> from what the author of web framework benchmark told me
19:13:43zedeuswith httpbeast alone i can reach 200k
19:13:51FromDiscord<willyboar> yes
19:13:52FromDiscord<Rika> huuuh... now i'm getting bad file descriptor on my vps but not on my desktop
19:14:01FromDiscord<willyboar> whip gets almost 185k
19:14:16zedeushah, you need jester#head to fix that, dom hasn't made release with my fix in it :)
19:14:58FromDiscord<willyboar> rosencrantz gets almost 30k with asynchttp
19:16:50FromDiscord<willyboar> i would love to see how rosencrantz would go with httpbeast support
19:18:40Zevvdisruptek: I'm giving up on the continuation stuff for now
19:19:52ZevvI've got too much going on
19:25:13*vicfred joined #nim
19:41:42FromDiscord<willyboar> I get this error in my app when compiling with arc
19:41:56FromDiscord<willyboar> ``` /Users/nikos/.nimble/pkgs/parsetoml-0.5.0/parsetoml.nim(1898, 5) Error: undeclared identifier: 'deepCopy' ```
19:42:23Zevvyeah, it's not lying
19:42:27Zevvthere is no deepCopy for arc
19:42:48FromDiscord<willyboar> yes it works with boehm
19:43:41FromDiscord<willyboar> thank you
19:45:42Zevvwow I just noticed my mqtt lib suddenly has a broker as well
19:45:52Zevvthat's what you get from giving full repo permissions to strangers I guess
19:53:55luis_Yardanico: it should be the readBuffer from io? I am aiming at reading text passed in a bash pipe into my nim program.
19:54:50luis_something like echo "text" | program.nim
20:05:46*NimBot joined #nim
20:12:38PrestigeWish there was a decent way to deal with circular deps. I can solve it by putting everything in a single file but, that kind of sucks doing
20:12:59Yardanicodid you try https://nim-lang.org/docs/manual_experimental.html#package-level-objects ?:P
20:14:59PrestigeHmm sounds a little hacky but let's see if it works
20:16:46*kenran quit (Ping timeout: 256 seconds)
20:24:22PrestigeOkay I think I don't understand this setup, can't get it to compile: https://play.nim-lang.org/#ix=2pcH
20:24:49*tdc quit (Ping timeout: 264 seconds)
20:28:41*nerthus quit (Remote host closed the connection)
20:31:46*luis_ quit (Ping timeout: 256 seconds)
20:43:30*bung quit (Quit: Lost terminal)
20:50:37*Senny joined #nim
20:59:37*Cthalupa quit (Ping timeout: 264 seconds)
21:00:52*waleee-cl joined #nim
21:01:55*Cthalupa joined #nim
21:11:57leorize[m]Prestige: it works in the nimble package scope
21:12:02leorize[m]those two files has to be in a nimble package
21:12:28Prestigeoh it has to be the name of the nimble package? okay
21:12:32leorize[m]actually only `a` has to be in a nimble package :P
21:12:55*adnan338 quit (Ping timeout: 260 seconds)
21:15:13*solitudesf quit (Ping timeout: 264 seconds)
21:16:12*aeverr quit (Ping timeout: 256 seconds)
21:27:12*PMunch joined #nim
21:34:35*Trustable joined #nim
21:38:00*unihernandez22 joined #nim
22:04:04*tane quit (Quit: Leaving)
22:05:49*PMunch quit (Ping timeout: 246 seconds)
22:07:59*unihernandez22 quit (Ping timeout: 245 seconds)
22:15:51FromGitter<ynfle> Is there a `parseStmt` version that isn't `compileTime` just for parsing?
22:31:52*PMunch joined #nim
22:38:13PrestigeOkay, Nimdow is finally in it's beta release: https://github.com/avahe-kellenberger/nimdow just finished up the status bar
22:40:57*Vladar quit (Quit: Leaving)
23:02:31PMunchNice!
23:04:08PrestigeThanks!
23:05:23*rockcavera joined #nim
23:11:36*lritter quit (Quit: Leaving)
23:45:11PMunchNice Reddit post by the way :)
23:48:12PrestigeThanks - I'm planning on doing a video about the release on my channel (and showing the features, how to set it up, etc)
23:48:27PMunchThat'd be cool
23:48:32*oddp quit (Ping timeout: 265 seconds)
23:49:07PMunchOh, well time for bed
23:49:08*PMunch quit (Quit: leaving)
23:53:17*oddp joined #nim
23:56:06*ftsf joined #nim
23:57:00*Trustable quit (Remote host closed the connection)