<< 11-08-2020 >>

00:05:58*vsantana joined #nim
00:06:35*vsantana quit (Client Quit)
00:22:40*azed quit (Quit: WeeChat 2.9)
00:38:42*mbuchel quit (Ping timeout: 260 seconds)
00:50:24*maier joined #nim
00:54:59*maier quit (Ping timeout: 240 seconds)
01:06:51*letto quit (Remote host closed the connection)
01:07:18*letto joined #nim
01:30:51*mbuchel joined #nim
01:50:13*Jjp137 quit (Read error: Connection reset by peer)
01:50:53*Jjp137 joined #nim
01:53:50*Jjp137 quit (Read error: Connection reset by peer)
01:59:15*apahl quit (Ping timeout: 272 seconds)
02:00:44*apahl joined #nim
02:17:15*Jjp137 joined #nim
02:21:41*vicfred quit (Remote host closed the connection)
02:22:06*vicfred joined #nim
02:24:49*arecacea1 quit (Read error: Connection reset by peer)
02:25:36*arecacea1 joined #nim
02:26:36FromDiscord<drsensor👹> Hi, how to check value is available in a `Table`?↵Something like `myTable.values.contains("some value")`↵but it give me an error when I try `echo myTable.values`.↵Do I need to convert the iterator into sequence or openArray first?
02:26:59disruptekif "some value" in sometable: ...
02:27:29disruptekactually, that's for keys.
02:28:00disruptekyou might need to `"somevalue" in toSeq(sometable.values)`
02:28:23*Cthalupa quit (Ping timeout: 272 seconds)
02:31:45FromDiscord<drsensor👹> thankyou, it works!
02:35:37*mbuchel quit (Ping timeout: 264 seconds)
02:36:50*Cthalupa joined #nim
02:37:01*mbuchel joined #nim
02:50:32*muffindrake quit (Ping timeout: 246 seconds)
02:51:15*maier joined #nim
02:52:08*waleee-cl quit (Quit: Connection closed for inactivity)
02:52:48*muffindrake joined #nim
02:56:14*maier quit (Ping timeout: 256 seconds)
02:56:22*mbuchel quit (Ping timeout: 260 seconds)
03:01:54*aenesidemus_ joined #nim
03:04:41*aenesidemus quit (Ping timeout: 256 seconds)
03:04:41*pulux quit (Ping timeout: 256 seconds)
03:04:59*pulux joined #nim
03:15:59*rockcavera quit (Remote host closed the connection)
03:18:46*mbuchel joined #nim
03:20:37*Cthalupa quit (Ping timeout: 264 seconds)
03:24:06*Cthalupa joined #nim
04:06:01*supakeen quit (Quit: WeeChat 2.8)
04:06:37*supakeen joined #nim
04:20:29FromDiscord<Nisha> Guess who~
04:24:27FromDiscord<Rika> Who are you
04:25:19FromDiscord<Nisha> Bruh-
04:25:30FromDiscord<Nisha> My name isn't familiar-
04:25:33FromDiscord<Nisha> At all?-
04:25:38FromDiscord<Nisha> (edit) 'familiar-' => 'familiar?-'
04:52:38*maier joined #nim
04:56:58*maier quit (Ping timeout: 246 seconds)
05:01:57voltistYou know your personal project is getting serious when you have to write a legal notice for the README
05:03:25*bung_ quit (Ping timeout: 240 seconds)
05:12:55FromDiscord<Nisha> Oof-
05:30:47*maier joined #nim
05:34:02*bung joined #nim
05:38:16*bung quit (Ping timeout: 246 seconds)
05:38:57FromDiscord<Rika> voltist: what happened?
05:42:46*Cthalupa quit (Ping timeout: 256 seconds)
05:46:13voltist@Rika I'm planning on publishing an open source driver derived from a serial protocol I'm working on reverse engineering
05:47:40Zevvah protocol of what?
05:47:41voltistBasically the legal notice will say "The DMCA is alright with this, and it's perfectly legal to use, but reverse engineering the original manufacturer's products in order to contribute may make you liable for litigation depending on your location"
05:47:51voltistZevv: Telescope mount
05:49:13Zevvcool stuff
05:49:33ZevvI never cared about any of thece dmca things. silly stuff
05:49:53Zevvand for obscure stuff like a telescope mount, I don't think you will ever get a C&D notice
05:51:37voltistThe manufacturer has a business model that is very dependent on their software staying closed source and very expensive, so they have made serious legal threats to those who have considered doing this (so far none have gone open source)
05:52:21FromDiscord<Rika> you can reverse engineer products legally, depending on the kind of reverse engineering you do
05:52:47voltistYeah it's not as illegal as they make it out to be at all
05:53:08Zevvjust make a separate github account and put it on there
05:53:10ZevvI'll clone
05:53:13Zevvrika'll clone
05:53:14Zevvand its out
05:54:01*solitudesf joined #nim
05:54:27voltistMy understanding is that the act of reverse engineering could be considered a breach of trade secrets, but the DMCA provides a safe harbor for the actual description/software written as a result
05:55:21*Cthalupa joined #nim
05:55:52voltistBut "trade secrets" don't exist in my country's law anyway (beyond NDAs), and since we don't have an agreement with the US, the manufacturer can't sue on those grounds
05:56:25voltistI'm very much not a lawyer; this is just what I've managed to gather from the web
05:56:50voltistBut yeah, the good thing is that I can host it on GitHub because it's DMCA friendly
05:59:32voltistDo I even have to mention that the manufacture's software is terrible? As in, literally the worst I have ever used
06:02:33FromGitter<gogolxdong> How to convert seq to JsonNode?
06:06:35Zevvgogolxdong: %
06:06:38Zevvhttps://play.nim-lang.org/#ix=2tRf
06:08:06*Cthalupa quit (Ping timeout: 265 seconds)
06:08:33Zevvvoltist: just hook your stuff up to stellarium
06:08:55FromGitter<gogolxdong> ah, I forgot the most familiar friend.
06:09:07Zevvwho, me? :)
06:09:10Zevvvoltist: http://stellarium.sourceforge.net/wiki/index.php/Telescope_Control_plug-in
06:09:36Zevvwhats your brand and type?
06:10:55Zevvand always remember kids: don't stare into the sun!
06:11:01Zevvwhen looking through your telescope, particulary
06:19:55*Cthalupa joined #nim
06:23:37*endragor_ quit (Remote host closed the connection)
06:23:52*PMunch joined #nim
06:24:07*hnOsmium0001[m] joined #nim
06:28:02*muffindrake quit (Ping timeout: 260 seconds)
06:30:56*Cthalupa quit (Ping timeout: 256 seconds)
06:33:12*Cthalupa joined #nim
06:42:01*endragor joined #nim
06:45:40*Vladar joined #nim
06:59:58PMunchIs there a way of doing single-line case statements?
07:01:14FromDiscord<lqdev> nope. how'd you do it anyways?
07:02:37PMunchWell I just tried "let x = case someEnum: of One: 100 of Two: 200"
07:02:42PMunchBut that didn't work :P
07:03:33FromDiscord<lqdev> it'd be unparsable as `of` is also an operator
07:04:01FromDiscord<Elegant Beef> One lining case statemes seems hideous
07:04:08FromDiscord<Elegant Beef> (edit) 'statemes' => 'statemets'
07:17:25*superbia1 is now known as superbia
07:17:57*bung joined #nim
07:51:04*muffindrake joined #nim
07:51:42voltistZevv: I'm going to make an Indi driver
08:03:41*oddp joined #nim
08:08:00PMunchIndi?
08:12:49Zevvvoltist: indi is cool, but what would you interface with on the other side of the driver?
08:28:20voltistI'd probably use KStars, but the point of indi is that folks can use whatever they want
08:30:19voltistZevv: Are you into astronomy yourself?
08:30:24FromDiscord<Vindaar> @voltist sorry, was away for a week without internet. The ping still relevant?
08:30:55voltist@Vindaar Nah all good, I got my FITS reader working
08:31:56*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
08:32:13*kitech1 joined #nim
08:33:20*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:33:40FromDiscord<Vindaar> oh great work! is it pushed somewhere?
08:34:15voltistNot quite yet
08:34:22voltistI'll do that when I get home
08:34:38voltistI'm at the observatory now, taking some images :)
08:37:01FromDiscord<Vindaar> nice!
08:48:53FromGitter<Lecale> I'm having one of those bad mornings. Is there any real reason why the string "11.69" shouldn't be able to be parsed as a float? I know floats are a bit cuckoo sometimes, but I didn't expect to change the data in my file and see "Error: unhandled exception: invalid float: 11.69 [ValueError]"
08:49:50FromDiscord<lqdev> check for leading/trailing whitespace
08:50:20FromDiscord<lqdev> !eval import strutils; echo parseFloat("11.69")
08:50:22NimBot11.69
08:50:49FromDiscord<lqdev> !eval import strutils; echo parseFloat(" 11.69 ")
08:50:52NimBot/usercode/in.nim(1) in↵/playground/nim/lib/pure/strutils.nim(1127) parseFloat↵Error: unhandled exception: invalid float: 11.69 [ValueError]
08:51:00FromDiscord<lqdev> cc @Lecale
08:51:42FromGitter<Lecale> There isn't anything easy like hidden whitespace to solve the error, no.
08:52:12FromDiscord<lqdev> hm
08:52:13*oddp quit (Quit: quit)
08:52:55PMunchHmm, did something about changing CPU architecture change in the past couple versions?
08:54:09FromGitter<Lecale> I am using Nim Compiler Version 1.2.4 [Windows: amd64] , it was fine for one dataset, then every other one after that went penguin
09:00:22PMunchHmm, that is indeed weird
09:03:19Zevvwow. I found this 1.6Ghz celeron notebook in the bottom of my cupboard. might be handy for the kids to take on holidays. Put an SSD disk in, 2Ggis of ram
09:03:40Zevvbut guess what. Friggin youtube can't even properly play on that hardware anymre
09:03:49Zevv1.6 Ghz!
09:03:51*pbb_ joined #nim
09:03:59ZevvWhat the *HELL* is youtube trying to do?
09:04:08Zevv2 cores loaded to the max
09:04:21Zevvwhy is all software so crap shit today
09:04:30PMunch@Lecale, try to cast it to a sequence of bytes and see if there is anything weird there: https://play.nim-lang.org/#ix=2tRI
09:05:00PMunchZevv, probably trying to use hardware h.256 decoding
09:05:33FromDiscord<lqdev> youtube uses h.264 or vp9
09:05:37FromDiscord<lqdev> never seen it use h.265
09:05:45FromDiscord<Elegant Beef> an easier solution to the casting is just returning the length 😄
09:05:47*pbb_ quit (Client Quit)
09:05:48PMunchI just didn't remember the name of it :P
09:05:53PMunchI meant h.264
09:05:55FromDiscord<Elegant Beef> if it's != 5 you did something wrong!
09:06:09FromDiscord<lqdev> PMunch: h.264 is relatively lightweight to decode tho
09:06:11PMunchHmm, true
09:06:21FromDiscord<lqdev> my rpi 3b can handle it perfectly
09:06:44PMunchWell, it might be lightweight, but if YouTube is trying to execute instructions that doesn't exist on your CPU you're still going to have a bad time :P
09:06:45FromDiscord<lqdev> though, it doesn't go up to any resolutions higher than 480p
09:07:07FromDiscord<lqdev> it's, uh, javascript.
09:07:30PMunchStill ends up getting executed by your CPU at some point
09:07:44PMunch(or GPU I guess, but that's beside the point)
09:10:29FromDiscord<Rika> javascript engines would know what instructions to execute, and whether to use software or hardware decoding, i assume
09:11:01FromDiscord<Rika> anyway i dont think the video player is the heaviest on youtube, its probably all the other shit it runs
09:13:24PMunchBut still, it should be able to handle all the other stuff on a 1.6GHz processor..
09:14:03PMunchThe hardware h.264 decoding is the only thing I can think of that an old CPU would simply miss, which could explain why YouTube doesn't work..
09:14:23FromDiscord<Elegant Beef> If zevv isnt on a unix-like that's getting taken from Windows updates running in the backgrounf suddenly
09:14:35FromDiscord<Elegant Beef> (edit) 'backgrounf' => 'background'
09:14:46PMunchHaha, fair point
09:15:01PMunchBut knowing Zevv it's probably some kind of Linux he's running
09:15:11PMunchEh, maybe not for his kids I guess
09:15:14FromDiscord<Elegant Beef> In all seriousness windows is the death of low spec hardware that'd otherwise be usable
09:15:49PMunchMhm, it's pretty crazy
09:15:54FromDiscord<Elegant Beef> I mean i dont see why not force them to use LFS 😄
09:16:04FromDiscord<Elegant Beef> That way you dont have to solve any problems
09:16:13PMunchIt's backwards compatible to 1000 with software, but hardware you can barely run it on a couple year old machines
09:16:32PMunchMeanwhile you can use a fairly modern Linux system on decades old machines with some work :P
09:16:51FromDiscord<Elegant Beef> I mean it's mostly the sub $400 computers that just cant handle it
09:17:05Zevvit's just plain xubuntu
09:18:07Zevvand I know of course, but I'm just always enraged by how fast hardware gets deprecated because software just gets kind of crappier
09:18:24Zevvit's not just the video decoder. Just the sheer amount of work that has to be done to even load up a site like youtube
09:18:28Zevveven before it starts playing
09:19:11FromDiscord<Elegant Beef> How does https://dev.invidio.us/ fair against youtube?
09:19:12FromDiscord<Rika> its more of "sites start doing more intensive shit because the majority of people's devices can handle it"
09:19:33Zevvit's also about devs being lazy as hell.
09:19:58ZevvI've been doing a lot of android work lately, we're making some kind of "thin client" solution. All these APKS are *so* *full* *of* *shit*
09:20:06Zevvdevs just pull in tons of libs from everywhere
09:20:08Zevvglue it all together
09:20:13Zevvthey all ship the world
09:20:37Zevvit's just like web devs. npm here npm there and now I have to load 37Mb of trash before a page shows
09:21:02FromDiscord<Rika> that is true too
09:21:08Zevvreally, I know it's old-fart-whining, but I remember the days when I would boot my PC and it would go *beep* ready in 2 seconds
09:21:12PMunchAlways fun to hear the front-end devs swearing over having to run "npm restore" :P
09:21:18FromDiscord<Rika> its barely old fart whining imo
09:21:21PMunchOr whatever the command is to reload all packages :P
09:21:40FromDiscord<Rika> always fun forgetting to not back "node_modules" up
09:21:44FromGitter<Lecale> Okay, there seems to be three chars preceeding the string that don't belong there: 239, 187, 191
09:21:49PMunchZevv, I mean you can still set that up with the correct Linux stuff
09:22:04PMunchAs long as your motherboard BIOS isn't too slow
09:22:09FromDiscord<Elegant Beef> I mean Zevv im only 21, and i agree software is a hellscape, look im using a electron application as my main communication method, and just accept that it's taking >500mb of ram for basically nothing
09:22:52Zevvright
09:23:16Zevvand on the other side of the spectrum. I'm fighting these guys in my team over all that docker shit
09:23:39Zevvthey want be to build and dev my software in their docker because everyting is so prone to dependency failures, it's no longer possible to do anything on a normal machine
09:23:57PMunch@Lecale, that is a BOM
09:24:00PMunchByte order marker
09:24:15ZevvWhy the *hell* do I need to do gRPC for one single call to somewhere? Now I need gRPC compilers with golang code generators, I always have version mismatches, everything is broken
09:24:20FromGitter<Lecale> Looks like BOOM to me
09:24:20PMunchStupid Windows think to tell the program which format the file is in
09:25:16PMunchThat one in particular EF BB BF means that it's UTF-8
09:25:28FromDiscord<kodkuce> we need join ISIS kill all devs and windows users and start a new programming standards
09:25:34FromDiscord<Rika> bruh
09:25:39FromDiscord<Rika> a bit too edgy there
09:25:44FromDiscord<kodkuce> (edit) 'users' => 'users( spare araq)'
09:26:00FromDiscord<Elegant Beef> It's more ethical to just make less shitty software that is on par with the shitty alternatives
09:26:15PMunchI kinda like Docker though Zevv, I can build a tiny container that just has the stuff I need, and I don't have to tell anyone I've snuck Nim in there :P
09:26:23FromDiscord<Elegant Beef> Although people dont care about free range software
09:26:24FromDiscord<kodkuce> flaming sword of revolution xD
09:27:03FromDiscord<kodkuce> i like too docker cuz its easyer to setup soem db sewer insted to really have to install it on pc
09:27:14PMunchI was actually surprised when I copied a Nim binary of some program I had lying around over to another machine and it just worked. Let that sink in for a second
09:27:47FromDiscord<Rika> static binaries
09:27:48PMunchIt's so bad that I don't even expect binaries to work across two Linux machines with the same architecture -_-
09:28:12FromDiscord<lqdev> welcome to glibc versioning land, where We Are Retarded™
09:28:28FromDiscord<Rika> lmao
09:28:30FromDiscord<Elegant Beef> Well there would be no issue if you guys used the one true linux, hannah montana linux
09:28:32PMunchHaha :P
09:28:45FromGitter<Lecale> heretic
09:28:47PMunchOh well, lunchtime
09:28:55FromDiscord<Elegant Beef> No it's sleep time
09:28:57FromDiscord<Elegant Beef> Buh bye
09:29:00PMunchHave to figure out this weird 32-bit linking issue mess when I get back..
09:29:34FromDiscord<lqdev> ~~beef where are you going it's 11:30 am~~
09:29:52FromDiscord<Elegant Beef> Dude im in NA it's 3:30 am
09:29:56FromDiscord<lqdev> ik ik
09:30:14FromDiscord<Elegant Beef> Fucking poles man i tell you... they're poles
09:30:36FromGitter<Lecale> Most polish are
09:30:43FromDiscord<lqdev> dumb
09:31:11FromDiscord<Elegant Beef> Shit you're onto something Lecale, has the all Poles are Poles conspiracy been started?
09:31:34FromDiscord<Elegant Beef> Well now that we've made dumb jokes, i now do need to sleep
09:32:16ZevvPMunch: there is *so* much I hate about docker. Just add more layers of complexity, add more potential points of failures.
09:32:37ZevvI have this app running in a docker container because I need to for "reasons". Getting logs out with "docker-compose logs". No more then 10k lines per second
09:32:48ZevvI just sit there waiting up to half a minute for the log to poor out
09:33:08ZevvDon't get me started about getting IPv6 to work in docker. This is 2020. But nooo, sorry, ipv6 is not really something we support ,sorry
09:37:00FromGitter<Lecale> Thanks @PMunch I didn't expect that to be inserted invisibly
09:37:47alehander92oi
09:42:31*lritter joined #nim
09:48:39*Vladar quit (Remote host closed the connection)
09:50:49*NimBot joined #nim
10:03:39FromDiscord<XxDiCaprioxX> Is there a function to compare 2 strings?
10:03:46FromDiscord<XxDiCaprioxX> Except for if a == b
10:04:02FromDiscord<XxDiCaprioxX> And can you ignore the case?
10:04:24FromDiscord<Rika> strutils.cmpIgnoreCase
10:04:33FromDiscord<XxDiCaprioxX> okay thanks
10:04:46FromDiscord<Rika> read the docs, it returns an int
10:04:57FromDiscord<XxDiCaprioxX> what
10:05:02FromDiscord<Rika> -1 for less than, 0 for equal, 1 for greater than
10:05:18FromDiscord<Rika> or actually just "less than 0" for less than, etc
10:05:24FromDiscord<Rika> not necessarily -1
10:06:11FromDiscord<XxDiCaprioxX> But like what I need is "is a equal to b, case doesn't matter"
10:06:28FromDiscord<Rika> yes yes
10:06:36FromDiscord<XxDiCaprioxX> Like Java's .equalsIgnoreCase
10:06:37FromDiscord<Rika> so its just `a.cmpIgnoreCase(b) == 0"
10:06:41FromDiscord<Rika> (edit) '0"' => '0`'
10:06:45FromDiscord<XxDiCaprioxX> Oh okay
10:09:45FromDiscord<XxDiCaprioxX> Is the func keyword really used?
10:09:50FromDiscord<Rika> yes
10:09:53FromDiscord<XxDiCaprioxX> Or can I just call everything proc?
10:10:01FromDiscord<Rika> you can do either
10:10:08FromDiscord<XxDiCaprioxX> Is there any real advantage with func?
10:10:12FromDiscord<Rika> func just gives a bit more ensurance
10:10:17FromDiscord<XxDiCaprioxX> oh okay
10:10:42FromDiscord<XxDiCaprioxX> Anything that contains no output can be a func, correct?
10:11:59FromDiscord<Rika> anything that uses no globals
10:12:35FromDiscord<Rika> procs that use globals include `echo`
10:13:19FromDiscord<XxDiCaprioxX> Okay
10:14:31FromDiscord<lqdev> it's not procs that don't use globals
10:14:37FromDiscord<lqdev> it's procs that don't have side effects
10:14:47FromDiscord<lqdev> using globals is a side effect
10:14:50FromDiscord<lqdev> IO is also a side effect
10:15:00FromDiscord<Rika> eh i forget
10:15:00FromDiscord<lqdev> echo doesn't use globals
10:15:16FromDiscord<Rika> is stdout not technically counted as a global
10:15:25FromDiscord<lqdev> echo doesn't use the stdout variable
10:15:26alehander92what happened
10:15:33alehander92to the alternative
10:15:34alehander92funcs
10:15:41FromDiscord<XxDiCaprioxX> okay so no globals and no io. will the compiler complain automatically if func doesn't work?
10:15:53FromDiscord<lqdev> yes
10:15:55FromDiscord<Rika> yes
10:18:04*sky59 joined #nim
10:26:36FromDiscord<XxDiCaprioxX> ah then its fine+
10:51:43*sky59 quit (Remote host closed the connection)
10:54:13*maier quit (Ping timeout: 264 seconds)
10:57:03PMunchZevv, oh I use docker for building my project. Which is great, because I can give the docker container to the testers and they can build their own version without having to set up everything (because I've done it for them in the docker container). I've also used it for a web-page thingy, which was also nice because I could just send a container to ops and they could run it without having to set up anything.
10:57:22PMunchJust saves me a lot of work from trying to explain how to set up all these bits and pieces
10:57:48PMunch@Lecale, that's the "magic" of BOM..
11:10:12*maier joined #nim
11:27:41*theelous3 joined #nim
11:29:36FromDiscord<Kiloneie> I used the same code to compare tuples to showcase that different type tuples with same fields of same name in same order are identical, but i don't know how to do it with objects...↵https://play.nim-lang.org/#ix=2tSj
11:31:15PMunchYou can't compare two different objects like that
11:31:50PMunchSince in this case the objects are identical you can cast one to the other
11:32:11PMunchOr you could simply remove one of them
11:33:16FromDiscord<Kiloneie> Well i am trying to prove the statement... i think the fact that you can't == them proves the statement that objects are not comparable like tuples are.
11:33:46PMunchWell not arbitrary objects..
11:36:48FromDiscord<XxDiCaprioxX> How can you divide a string using spaces?
11:37:18FromDiscord<lqdev> splitWhitespace
11:38:29FromDiscord<XxDiCaprioxX> And say I have the string "a b" it will give me seq["a", "b"], correct?
11:38:52PMunch!eval import strutils; echo "a b".splitWhitespace
11:38:54NimBot@["a", "b"]
11:40:00FromDiscord<XxDiCaprioxX> And I can say var substring = "a b".splitWhitespace[0] and I get substring = "a" ?
11:40:19FromDiscord<XxDiCaprioxX> (edit) 'var' => '`var' | 'b".splitWhitespace[0]' => 'b".splitWhitespace[0]`' | removed 'I' | 'substring' => '`substring' | '"a"' => '"a"`'
11:40:24PMunch!eval import strutils; var substring = "a b".splitWhitespace[0]; echo substring
11:40:26NimBota
11:40:39FromDiscord<XxDiCaprioxX> what is this !eval?
11:40:55PMunchIt's telling NimBot to evaluate NimCode by using the playground :P
11:40:58FromDiscord<Rika> bot runs the code after "eval"
11:41:00FromDiscord<XxDiCaprioxX> Ah okay makes sense
11:41:07FromDiscord<XxDiCaprioxX> Okay thanks
11:41:23PMunchplay.nim-lang.org
11:41:28PMunchUsing that
11:43:05PMunchHmm, strange. When cross-compiling to a 32-bit binary I must add "nodecl" to a procedure I import from C, lest I get "undefined reference to `edns_opt_list_append@20'"
11:43:21PMunchWorks fine when compiling with 64-bit
11:43:26PMunchWith and without the pragma
11:43:40PMunchIs this a subtle error where the signatures doesn't actually match?
11:43:53FromDiscord<Kiloneie> So for comparing tuples with tuples, using the "==" operator is good right ?
11:44:02PMunchYup
11:44:11FromDiscord<Kiloneie> okay
11:44:12PMunchShould be at least
11:45:12FromDiscord<Kiloneie> vs code instantly whines if the fields are not the same, so that should prove inequality. (Man these videos take forever, i always end up adding more than i thought i will)
11:48:23FromDiscord<Pixeye> hey! is there a way to pass as macro param array element ?
11:48:33FromDiscord<Pixeye> (edit) 'as' => 'to' | 'tomacro param ... array' => 'tomacro paramas'
11:49:25FromDiscord<Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tSn
11:49:58FromDiscord<Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tSo
11:49:59FromDiscord<XxDiCaprioxX> Maybe arrays cant be untyped
11:50:18FromDiscord<Pixeye> oh, sry, not even the array, it's from tuple
11:51:04FromDiscord<XxDiCaprioxX> Then I have no idea sorry
11:51:12FromDiscord<XxDiCaprioxX> How can I make a program await input?
11:51:26FromDiscord<Pixeye> making game?
11:51:41FromDiscord<Pixeye> use glfw or smthing ?
11:53:47FromDiscord<Recruit_main707> stdin.readLine() iirc
11:57:57*rockcavera joined #nim
11:58:23FromDiscord<XxDiCaprioxX> Not in the console
11:58:58FromDiscord<XxDiCaprioxX> Program is running until one point where it needs an input (e. g. press enter) to continue
12:00:37*waleee-cl joined #nim
12:00:40*krux02 joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:38*supakeen joined #nim
12:19:31*maier_ joined #nim
12:23:01*maier quit (Ping timeout: 264 seconds)
12:24:37*moerm joined #nim
12:24:51moermHello everyone ;)
12:25:14PMunchHi moerm
12:25:29PMunch@XxDiCaprioxX, you want a popup?
12:27:24FromDiscord<lqdev> @Pixeye what are you trying to do?
12:29:57FromGitter<alehander92> test
12:30:21alehander92sorry, wanted to see something on gitter
12:35:43FromDiscord<XxDiCaprioxX> I do not want a popup
12:36:06FromDiscord<XxDiCaprioxX> Just the program doing nothing until a certain event#
12:36:45PMunchHmm, so you want your program to just sit idle until you hit enter in the terminal?
12:36:55FromDiscord<XxDiCaprioxX> Basically yes
12:37:10FromDiscord<XxDiCaprioxX> I see asyncdispatch has proc waitFor[T](fut: Future[T]): T
12:37:29FromDiscord<XxDiCaprioxX> As I am working on a discord bot that should work, right?
12:37:55PMunchWait, should the program do something in the background?
12:38:38FromDiscord<XxDiCaprioxX> No
12:40:40PMunchThen why not just a blocking call to read from stdin?
12:41:10FromDiscord<XxDiCaprioxX> It is a discord bot
12:41:12FromDiscord<XxDiCaprioxX> So no option
12:41:32FromDiscord<XxDiCaprioxX> I just wanted to make a simple example
12:41:59PMunchWhy is it not an option?
12:42:28FromDiscord<XxDiCaprioxX> Isn't stdin a system thing?
12:42:57PMunchIt's standard input, basically just the input to the terminal
12:43:25FromDiscord<XxDiCaprioxX> But on a discord server
12:43:29FromDiscord<XxDiCaprioxX> How would it do that
12:43:58PMunchWhat do you mean "on a discord server"? You said you wanted to hit enter on the command line..
12:44:24FromDiscord<XxDiCaprioxX> I said that because I did not want to complicate unnecessarily
12:44:33FromDiscord<XxDiCaprioxX> And just have a simple example
12:44:44PMunchI think you simplified a bit too much :P
12:45:10FromDiscord<XxDiCaprioxX> yeah probably haha
12:48:17FromDiscord<XxDiCaprioxX> So basically I want to have my bot wait for a certain message in the channel after it got called
12:49:29FromDiscord<XxDiCaprioxX> sent a code paste, see https://play.nim-lang.org/#ix=2tSA
13:03:05alehander92don't use waitFor
13:03:12alehander92it shouldn't be used in async functions
13:03:41alehander92use it only in sync functions that invoke async, e.g. your top level code
13:04:39alehander92use await <call that receives messag>
13:05:04alehander92and now, this call can be a completion of a future
13:05:25alehander92that gets completed on an event somewhere else (but i'd guess your discord code already has an api for that)
13:05:59*dulsi_ joined #nim
13:08:04moermHave a nice day everyone
13:08:13*moerm quit (Quit: Leaving)
13:08:22*dulsi quit (Ping timeout: 246 seconds)
13:09:51FromDiscord<XxDiCaprioxX> you too
13:16:26*Senketsu joined #nim
13:39:44FromDiscord<Pixeye> @lqdev I'm trying to put untyped macro into the template
13:41:54FromDiscord<lqdev> not sure what you mean
13:42:09FromDiscord<lqdev> which template?
13:43:08FromDiscord<Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tST
13:43:28FromDiscord<Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tSU
13:43:41FromDiscord<lqdev> right. makes sense so far
13:43:59FromDiscord<lqdev> lemme think
13:44:23FromDiscord<Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tSV
13:44:38FromDiscord<Pixeye> https://github.com/nim-lang/Nim/issues/11091 this is the nearest related stuff I found
13:44:40disbotuntyped macro nested in template: getting sym instead of idents ; snippet at 12https://play.nim-lang.org/#ix=2tSW
13:45:19FromDiscord<lqdev> you don't need the {.used.} if your template is exported btw
13:45:31FromDiscord<lqdev> i suppose testMask is what generates your variable?
13:45:42FromDiscord<lqdev> with the modified name
13:56:57*liblq-dev joined #nim
14:00:18FromDiscord<Pixeye> sent a code paste, see https://paste.rs/PkU
14:01:01*liblq-dev quit (Client Quit)
14:01:11*liblq-dev joined #nim
14:01:17*Vladar joined #nim
14:01:55FromDiscord<Pixeye> sent a code paste, see https://play.nim-lang.org/#ix=2tTd
14:02:32*liblq-dev quit (Client Quit)
14:02:40*liblq-dev joined #nim
14:04:17*liblq-dev quit (Client Quit)
14:04:26*liblq-dev joined #nim
14:05:03*PMunch quit (Quit: Leaving)
14:06:04*oz quit (Read error: Connection reset by peer)
14:10:14*vicfred quit (Remote host closed the connection)
14:10:40*vicfred joined #nim
14:10:56disruptekgonna be a hot one, nimions.
14:17:22FromDiscord<Zachary Carter> does `nimble install` define `release` or `danger` by default?
14:18:41FromDiscord<Zachary Carter> I guess it does - becaue `nimble build` doesn't follow the same code path
14:19:01dom96release
14:20:22FromDiscord<Zachary Carter> if I define `danger` in a `config.nims` will that override?
14:20:56FromDiscord<Zachary Carter> I would assume so
14:21:37disruptekdanger/release in config files is overridden by the cli.
14:22:20disruptekannoyingly, the compiler's notice about the build type is inaccurate.
14:22:24FromDiscord<Zachary Carter> ooph
14:23:19FromDiscord<Zachary Carter> well - for now it doesn't matter too much but eventually it will
14:23:38FromDiscord<Zachary Carter> (edit) 'well - for now it doesn't matter too much ... but' => 'well - for now it doesn't matter too much(for me)'
14:24:01disruptekdiplomacy, i like it.
14:24:17FromDiscord<Zachary Carter> eh it might mean using nimph or something
14:24:49disruptekas soon as i released 1.0.0, it stopped working.
14:25:00FromDiscord<Zachary Carter> heh
14:25:30FromDiscord<Zachary Carter> is there a way to use nimble solely as a dependency manager and not a build tool?
14:25:39FromDiscord<Zachary Carter> like is there a `install dependencies` command for nimble?
14:25:52FromDiscord<Zachary Carter> and then can you overload `nimble build / install` to do nothing?
14:26:01disruptek--depsOnly
14:26:07FromDiscord<Zachary Carter> ah cool - that will work then
14:26:09disruptektry --help once in awhile, chucklehead.
14:26:15FromDiscord<Zachary Carter> man I'm way too lazy for that
14:27:44*arecacea1 quit (Remote host closed the connection)
14:28:38*arecacea1 joined #nim
14:33:25*Guest85438 quit (Ping timeout: 240 seconds)
14:33:25*liblq-dev quit (Quit: WeeChat 2.9)
14:33:33*liblq-dev joined #nim
14:35:26*dadada joined #nim
14:35:49*dadada is now known as Guest63171
14:37:29shashlicknimble build -d:danger works
14:51:29FromDiscord<Kiloneie> https://youtu.be/aME-tyPCPvE↵↵Heres another one of my videos on Nim for beginners.↵I hope i didn't make any errors(besides 4-5 seconds missing at object init. with values(how the F. did that happen in the cutting part... meh))
14:54:47disrupteklet's try making things better.
14:55:11disruptekWHO IS WITH ME?
14:55:32Zevvi am so tired
14:55:41Zevvi just gave up
15:00:19Oddmongermaybe tomorrow
15:09:03*leorize quit (Quit: WeeChat 2.8)
15:10:29*oz joined #nim
15:12:12*maier joined #nim
15:14:11*maier_ quit (Ping timeout: 240 seconds)
15:31:43FromDiscord<kodkuce> @Kiloneie keep the good work 🙂
15:31:56*liblq-dev quit (Quit: WeeChat 2.9)
15:35:45*ehmry_ joined #nim
15:45:15*maier quit (Quit: leaving)
15:45:56FromDiscord<haxscramper> How do I 'transfer' mutability from parameter type to result type? I want to declare function that accepts either mutable or immutable argument and returns one of its fields as `var` or non-var type depending on argument mutability. E.g. I want to have a *single* function that behaves like `proc aux(a: var Type): var Field` or `proc aux(a: Type): Field`.
15:47:47FromDiscord<haxscramper> The only solution that I could come up with is moving implementation to template and declaring two functions but this is just glorified copy-pasting and I want to know if there is some kind of 'cleaner' way to do this.
15:50:10leorize[m]sadly this is the easiest way
15:50:16leorize[m]or... you can just make a template and export that instead
15:51:07leorize[m]since it's a template (which is just an AST snippet), the mutability of the underlying field will translate directly into the "return type"
15:51:11Zevvhaxscramper: do you have philisophical issues with using two procs and a template?
15:51:16Zevvbecause you implement your code only once
15:51:24Zevvit is true that you end up with two compiled implementations
15:53:10alehander92zevv
15:53:21Zevvalehander92
15:53:21alehander92i have philosophical issues with your philosophyu
15:53:29alehander92i am writing you so you can prepare
15:53:34alehander92for my great analysis
15:53:34Zevvwhat is that, a philosophyu
15:53:51alehander92come on man the interviews with my accent are enough
15:54:01alehander92be happy you're not google meeting me
15:54:29alehander92it does sound romanian tho
15:56:11FromDiscord<haxscramper> I just wanted to know if there is something better than copy-pasting (in this case template is just more convenient Ctrl-C Ctrl-V)
15:56:45Zevvalehander92: I have extensive experience with romanians
15:56:47ZevvI own three of them
15:56:52Zevveh, rule
15:56:53Zevvno
15:56:54Zevvmanage
15:56:58Zevvyes, that's the word
15:57:21Zevvan to be honest, I don't understand their inside jokes, but the romanian humor suits me
15:57:30Zevvwhat I do not like though
15:57:39Zevvare the romanian sweets they bring with them after holidays
15:58:03ZevvExcept for the ROMs
15:58:08ZevvI can take ROMs
16:00:14alehander92oh is this the wafer
16:00:25alehander92when i went to romania i saw those chocolates with the romanian flag
16:00:30alehander92very patriotic
16:00:52alehander92they do have nice pastry btw
16:01:18Zevvlets make a deal
16:01:22Zevvyou send me roms
16:01:27Zevvi send you stroopwafels
16:01:29alehander92and they are famous for corn in bulgaria
16:01:31alehander92i think
16:01:40alehander92oh dude
16:01:43Zevvi can also send you weed, but that'll be for your own risk
16:01:45alehander92i eat too much of those in belgium
16:01:47alehander92on fosdem
16:01:55alehander92i shouldn't eat so much
16:02:15Zevv~nono you are mixing things up
16:02:16disbotno footnotes for `nono`. 🙁
16:02:18alehander92and i don't think we have ROM-s here, they are some kind of national thing
16:02:24Zevvstroopwafels != wafels
16:02:34Zevvgoogle that shit
16:02:38Zevvoh no deal then
16:02:41alehander92i can send you svoge
16:03:06Zevvwhats the promillage?
16:03:10alehander92and honey
16:03:11Zevvalcohol co
16:03:15Zevvntent
16:03:21alehander92haha no
16:03:32alehander92rakia is huge, but i am not making you a drunk, dude
16:03:51alehander92i can send you yoghurt tho, it's like big in japan
16:03:55Zevvwe shoudl do that next fosdem meetup. everybody bring 3 national goodies, put it all on the table and divide
16:04:01alehander92they fly the stuff with planes
16:04:07alehander92iirc
16:04:16Zevvnot with cows
16:04:22Zevvbut with planes
16:04:27alehander92it can't grow there
16:04:33Zevvbecause cows have a hard time handling the landing
16:04:38alehander92like, if you leave your milk here on the sun
16:04:45alehander92it just yoghurts or something
16:04:46Zevvwht cant it grow there?
16:04:50alehander92i am very bad at biology
16:04:56Zevvyeah its like magic
16:04:56alehander92it depends on particular bacteria i think
16:05:03Zevvjust like this bread i make. i just m
16:05:05alehander92yeah cows handle a lot more man
16:05:10alehander92they even handle writes
16:05:15alehander92.... ohhhhhh so good
16:05:23Zevvix flour and water, scratch my skull and genitals over the bowl and voila
16:05:31alehander92C O W i expect my linux award
16:05:36Zevvthree days later I have a live dough going
16:06:03alehander92did you pass the keyboard to disruptek
16:06:06alehander92in the middle of the sentence
16:06:12alehander92this is NSFL
16:06:26Zevvoh sorry, bad influences I guess
16:06:36Zevvanyway, im afk because of diner!
16:06:42Zevvit was a pleasure!
16:06:46alehander92my wife also made me sandwiches
16:06:48alehander92see ya!
16:11:12*bung quit (Quit: Lost terminal)
16:13:34*apahl quit (Remote host closed the connection)
16:14:02*apahl joined #nim
16:20:07disruptekdat bread dough
16:21:59alehander92dude
16:22:13alehander92keep zevv of the bad language!
16:22:26disruptekthe man is a menace.
16:22:43alehander92i dont know.
16:22:56alehander92he is a man, and an ace
16:23:29alehander92today i read about OT
16:23:34disruptekOT?
16:23:34alehander92i do a lot of other stuff
16:23:37alehander92but i am trying to get it
16:23:43alehander92operational transforms
16:23:49disruptekwhat is that/
16:23:52alehander92it seems crdt is not everything
16:24:07disruptekcrdt is not everything.
16:24:15alehander92basically a simple way to encode how people collaborate
16:24:24alehander92with a central server
16:24:27disruptekhave you seen gun?
16:24:56alehander92i am preparing for an interview at an american company.
16:25:02disruptekoh yeah?
16:25:09alehander92i hope it's not really insensitive
16:25:22alehander92i haven't seen the gun you're talking about yet
16:25:23disruptekwhich part?
16:25:29disruptekhttps://gun.eco/
16:25:43alehander92well, you told me there are many jobless in usa
16:26:11alehander92but you guys have cool software
16:27:14alehander92hm, it sounds as something different
16:27:24alehander92it seems OT specifcally needs a central server
16:27:41disruptekyes, but just as an aside... look at how gun does conflict resolution.
16:27:48disruptekit's pretty interesting.
16:28:09disruptekhttps://github.com/amark/gun
16:28:10alehander92https://www.tiny.cloud/blog/real-time-collaboration-ot-vs-crdt/
16:28:41disruptekdamn sidebar takes up most of the page. the content is one word per line.
16:28:50alehander92`cat.slave = mark;`
16:28:55alehander92those people live freely
16:29:00alehander92<3
16:29:05*Jesin quit (Quit: Leaving)
16:29:30alehander92but i like they still use a cat as an example of a boss
16:29:46alehander92as you get the vegans on your side like that
16:29:57disrupteki eat vegans for breakfast.
16:30:14alehander92don't do that
16:30:20*tane joined #nim
16:30:30disruptekdude, ima impl goroutines in nim.
16:30:45disrupteki think i'm ready.
16:31:25alehander92oh man you just know someone did it, right
16:31:33alehander92or maybe it was just interfacing with them
16:31:55disruptekno.
16:31:58disruptekthat's golib.
16:32:09alehander92https://github.com/stefantalpalaru/golib-nim
16:32:13disrupteki've come full circle.
16:32:20disruptekhttps://irclogs.nim-lang.org/29-04-2019.html#16:31:55
16:32:24alehander92ok, sounds cool: otherwise thanks for the gun link, i'll keep it in mind
16:32:44disruptekyou have to look at the gun paper. it's the science that is interesting, not the impl.
16:33:13alehander92ok
16:33:21alehander92i'll leave it for tomorrow!
16:33:22disruptekwhich company are you interviewing with?
16:33:27alehander92repl.it
16:33:35disruptekoh that's cool.
16:33:46alehander92i mean probably they get super many ppl
16:33:51*Jesin joined #nim
16:33:55disrupteknot many super people, though.
16:33:56alehander92but it's worth a try
16:34:07alehander92i am trying at many other companies
16:34:12disruptekyeah?
16:34:14alehander92wait, i wanted to write those guys
16:34:53alehander92https://news.ycombinator.com/item?id=24054343
16:35:34alehander92but mostly it's hard to get a response from those, probably they get too many emails after hn
16:35:47alehander92most of my interviews seem local to bulgaria
16:36:07alehander92including the haskell thing. still trying to wrap my head around stuff
16:36:30disrupteki'm learning that people just don't want what i'm selling.
16:38:42alehander92hm, this is always a pickle
16:38:45alehander92for us programmers
16:39:28disrupteki dunno, i think talented and experienced people get hired easily.
16:42:45*Cthalupa quit (Ping timeout: 272 seconds)
16:44:45FromDiscord<dom96> people with connections get hired easily
16:45:31alehander92praise God, i found the ad
16:45:41disruptekoh i have connections. that's the problem: people know me.
16:45:43alehander92i just need to write down a little intro
16:46:00*Cthalupa joined #nim
16:46:22alehander92disruptek you're right, but i think personal motivation plays a role
16:47:02alehander92e.g. mismatching interests/expectations can often happen
16:47:33disrupteki'm not sure about that. i can usually convince an interviewer that i will kill their family if they don't hire me.
16:47:43disruptekit's just hard to get those interviews.
16:47:46alehander92which can't possibly help
16:47:56alehander92that's weird
16:48:01disrupteki know.
16:48:11alehander92i am almost sure, i can get you interviews
16:48:22alehander92if it wasn't for the weirdness of a third person sending cold mails
16:48:56disrupteki need to work at self-promotion. it's just hard with so many agencies surveilling.
16:49:15alehander92i think it would be very easy for you
16:49:22alehander92but i suspect you're looking for something niche
16:49:24disruptekalso, the nim compiler is letting me down in a big way.
16:49:45alehander92the old chap
16:49:51disruptekhave you played with my testes?
16:50:24FromDiscord<dom96> That sort of talk will only get you hired in very specific industries, and it won't be at a tech company
16:50:38disruptekwhat?
16:50:46alehander92i really thought old chap means something more innocent
16:51:02FromDiscord<dom96> Hrm, actually, maybe you could try PornHub? 😛
16:51:04disruptekdom96: get your mind out of the gutter.
16:51:34alehander92dom96 looking at the linux code comments from the 90s ..
16:51:42alehander92it wasn't always like that
16:52:24alehander92but i also wish for a normal library name. just call it `testio-bear`
16:52:55alehander92or something
16:52:58disruptekbare-testes?
16:53:33alehander92~naming is .
16:53:34disbotnaming: 11.
16:53:52alehander92you can use random bulgarian words
16:53:59alehander92`проба
16:54:13disrupteki can't even type that shit.
16:54:14alehander92look: sounds misterious, and it's hard to write. great name
16:54:26alehander92it makes it hard to copy!
16:54:37FromDiscord<dom96> best passwords are soviet passwords
16:54:52alehander92i hope they dont recognize you
16:54:58alehander92would be a bit chinese tech level!
16:55:01*Trustable joined #nim
16:55:08FromDiscord<lqdev> disruptek: npo6a
16:55:17disruptekwe will all be chinese soon enough.
16:55:21alehander92sounds like a rapper
16:57:09*superbia1 joined #nim
17:00:36*superbia quit (Ping timeout: 265 seconds)
17:01:21*ehmry_ quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
17:01:42FromDiscord<tomck> Is there a way to allocate & copy a value into that spot, in a single expression?
17:01:44Zevvso disruptek, where were we
17:02:09FromDiscord<tomck> like, `newInit(MyValue(x: ...))` to get a `ref MyValue`
17:02:29FromDiscord<tomck> seems I can only do `newInit(MyValue)` in one line, then manually assign all the values afterwards, which can be a pain sometimes
17:02:45FromDiscord<tomck> (I don't care about extra copies)
17:03:04disruptekcan you give an example?
17:03:07disrupteka real example?
17:03:34disruptekZevv: i first threatened to impl csp in april of 2019. it's overdue!
17:03:47Zevvno no you threatened to impl core async
17:03:52ZevvI remember that
17:03:54disrupteksame difference.
17:04:08Zevvthat was end of april somewhere I believe
17:04:19disruptektomck: myNewRefObject(x: 1, y: 2) -- alloc and return
17:04:30Zevvdisruptek: https://www.youtube.com/watch?v=JUrOebC5HmA other one
17:04:42Zevv"split it up into a state machine"
17:05:05FromDiscord<tomck> I have an 'init' function which returns a value of the object, is there any standard function to take a `T` and return a `ref T`?
17:05:32FromDiscord<tomck> otherwise if I have an object whihc I sometimes want to use as a value, and i sometimes want to use as a ref, I need to double-implement all the construction functions
17:05:49disrupteksometimes you want it on the stack and other times you don't?
17:05:51FromDiscord<Clyybber> Ah, no, but zevv proposed to add it to the stdlib
17:05:51disruptekwhy?
17:06:03FromDiscord<tomck> Err i just do
17:06:09FromDiscord<tomck> that seems pretty common (to me)
17:06:19disruptekwrite a template.
17:06:31Zevvno you can't do that. You cant magically "ref" a non ref
17:06:42Zevvit requires a deep copy
17:06:42disruptekyou can.
17:06:47Zevvno dude.
17:06:50FromDiscord<tomck> i want to shallow copy
17:06:52FromDiscord<Clyybber> its not a deep copy
17:07:04FromDiscord<Clyybber> you don't have to copy ref fields
17:07:07Zevvoh right, it doesn't need to be deep
17:07:07disruptekeverybody in the world, is bent.
17:07:12Zevvsorry
17:07:14Zevvmy wrong
17:07:22FromDiscord<Clyybber> *you* proposed it haha
17:07:22disruptekno apologize.
17:07:24Zevvbut still, it *is* a copy :)
17:07:26disrupteknow apologize.
17:07:28disrupteknow apologize!
17:07:34Zevvno, I proposed syntax for new object constructors
17:07:37Zevvnew Thing(val: 42)
17:07:46disruptek(ref Thing)
17:07:53Zevvthat is nasty
17:07:59FromDiscord<tomck> yes, is there a way to allocate + copy something into a `ref T`, or do i write that myself?
17:08:26FromDiscord<Clyybber> @tomck proc new(a: T): ref T = result = new T; result[] = a
17:08:34FromDiscord<tomck> Can i explicitly shallow copy? LIke if I moved a `seq[T]` to a `ref seq[T]`, would that copy the whole contents of the `seq[T]`? because I wouldn't want that, I'd want a 'move constructor' or whatever
17:08:56FromDiscord<Clyybber> Are you using arc?
17:09:00FromDiscord<tomck> no
17:09:04disruptekwhy not?
17:09:11FromDiscord<Clyybber> In general, you can trust the compiler to move it
17:09:22FromDiscord<tomck> i have a gc project & i don't want to just move to move semantics + refs + all that
17:09:29FromDiscord<tomck> errrrrrrrrrr interesting ok
17:10:09FromDiscord<tomck> alright ta, i'll just hope that works i suppose, i'll be back if there are weird performance issues dw;)
17:10:18FromDiscord<tomck> thanks for the help
17:10:20FromDiscord<Clyybber> np
17:10:33FromDiscord<tomck> also, any chance this gets added to the stdlib? seems like a really common function, i'm surprised it's not there already
17:10:41disruptekclyybber: does your pr fix some cps stuff?
17:10:49disruptektomck: it's smelly.
17:10:51FromDiscord<tomck> that way we can also get the `new T(x: 0, y: 0)` syntax
17:11:00FromDiscord<Clyybber> @tomck Yeah, I vor for adding it to the stdlib
17:11:01FromDiscord<tomck> which would probably always optimise away the copy trivially
17:11:01disruptekwe already have that.
17:11:06FromDiscord<tomck> do we?
17:11:08FromDiscord<Clyybber> But araq is on holidays currently
17:11:12FromDiscord<Clyybber> disruptek: We don't
17:11:18FromDiscord<Clyybber> You are thinking RefObject(x:0)
17:11:21disruptekyes.
17:11:29disruptektrue, we did talk about adding new.
17:11:30FromDiscord<Clyybber> He wants new NoRefObject(x: 0)
17:11:38disruptekrude.
17:11:47FromDiscord<tomck> Ah gtg, ty for help
17:11:55FromDiscord<Clyybber> oh, eh my PR doesn't fix any CPS issues I think
17:12:09FromDiscord<Clyybber> but it should at least give you confidence that your nimcall actually is a nimcall
17:12:09Zevvhttps://play.nim-lang.org/#ix=2tUC
17:12:10Zevvtoo bad
17:12:17FromDiscord<Clyybber> because before it would get silently turned into a closure
17:12:18disrupteki'm starting to think my mangling bug is a nim bug.
17:12:23ZevvWe need a '--gc:arc' checkbox on nim playground
17:12:27FromDiscord<Clyybber> if you ever pass a closure to it
17:12:37disruptekright.
17:12:49Zevvit does do the right thing with arc tho
17:14:11FromDiscord<Clyybber> disruptek: The cpp bug?
17:14:16disruptekyeah.
17:14:18Zevvall of them!
17:14:34disruptekwell, we have a couple macro bugs and an arc bug blocking us, too.
17:14:43Zevvthe arc is not blocking
17:14:55Zevvwe can work perfectly fine without arc, we only can't do proper performance testing
17:15:07Zevvthe gensym we can work around as well, for now
17:15:27disruptekexceptions.
17:15:29FromDiscord<Clyybber> I wonder if devel will break you
17:15:38FromDiscord<Clyybber> koch boot faster
17:15:40ZevvI was broken long ago
17:16:25disruptekit's 31° in here. 😩
17:16:46Oddmongerlucky man
17:16:47FromDiscord<Clyybber> hey, it didn't break you \o/
17:17:10FromDiscord<Clyybber> disruptek: probs to you for not using the F word
17:17:23*Senketsu quit (Ping timeout: 240 seconds)
17:18:29disruptekit's annoying that proc prototypes are generated without actually having a source proc.
17:18:44Zevvman the more I read clojure, the more I want to drop nim and go there
17:18:57disruptekthe problem is performance and ffi.
17:19:00Zevvlife without syntax must be great
17:19:18disruptekwe can build it inside nim.
17:19:31FromDiscord<Yardanico> Life with JVM must be great
17:19:34FromDiscord<Clyybber> or you can just use closure, and come back crying
17:19:49disrupteki think it's pretty damned nice.
17:19:55FromDiscord<IanIAnIAN> use Nyquist instead
17:20:07disruptekbut, we can get into the jvm with graal, eventually.
17:20:27FromDiscord<Clyybber> disruptek: It is, but braces just arent for humans IMO
17:20:54disrupteksilly.
17:20:57FromDiscord<Clyybber> and after all the language is the medium between us and the computer
17:20:58FromDiscord<dom96> > it's 31° in here. 😩↵@disruptek[IRC]#0000 34C here and no AC
17:21:16FromDiscord<Clyybber> getting cloudy here, finally
17:21:36disruptek35 inside my rv.
17:21:44disruptekpoor dog.
17:21:46disruptek~bentley
17:21:47disbotbentley: 11https://imgur.com/gallery/yEXiWWG -- disruptek
17:21:47disbotbentley: 11a good boy
17:21:52FromDiscord<dom96> Just waiting for https://media.discordapp.net/attachments/371759389889003532/742794926005420123/unknown.png
17:22:01FromDiscord<dom96> RAIN ON MEHHH
17:22:37Zevvwe just had a nice hour of downpour
17:22:48Zevvit's at least, like, 1.5°C cooler now
17:24:07disruptekanyway, let's build this thing.
17:27:20disruptekor would you rather switch to clojure?
17:27:49Zevvnah i'm watching this vid. It was cool when the procs were 4 lines big and there were 3 of them. But the larger examples are becoming totally illegible
17:28:15Zevvjust this whirling soup of parentheses on my screen
17:30:12*vicfred quit (Quit: Leaving)
17:38:26FromGitter<benash> Anyone know why I might be getting an SSL error when doing a GET with `httpClient` but not `libcurl`? I also only get it for one particular host, not all https connections. The message is: `Error: unhandled exception: TLS/SSL connection failed to initiate, socket closed prematurely. [SslError]`
17:39:25FromDiscord<Varriount> Zevv: Can I see the example of the soup?
17:40:45Zevvhttps://youtu.be/JUrOebC5HmA?t=1106
17:41:00ZevvI count 6 )s in a ro
17:41:05Zevvcan also be 7, can't tell
17:41:34Zevvain't nobody got eyes to look at that
17:41:45FromDiscord<Clyybber> exactly
17:44:20FromDiscord<PizzaFox> does the openssl wrapper library have aes support? i looked at the docs page and didnt see anything but wanted to double check
17:44:48FromDiscord<dom96> Zevv, disruptek: What is this? A Clojure channel?
17:45:06FromDiscord<dom96> > does the openssl wrapper library have aes support? i looked at the docs page and didnt see anything but wanted to double check↵@PizzaFox dunno, but if it doesn't then add it 🙂
17:45:17Zevvsure. We praise the high level concepts, but we bash the syntax and the implementation
17:49:46disrupteki think dom96 is afraid of clojure.
17:50:32FromDiscord<dom96> I created a website for a Clojure book once
17:50:35Zevvso disruptek, given your #31, what do you propose. Do we put them in the right order and implement them one by one?
17:50:51disruptekdo we have that many issues?
17:50:53FromDiscord<dom96> Back in my blunder years
17:51:10disruptekoh shoot.
17:51:15Zevvdom96: I bet a clojure book would have brought in more money then a nim book
17:51:16Zevv:)
17:53:02FromDiscord<Clyybber> afaik there a pr open for aes support
17:53:04FromDiscord<dom96> The only Clojure book vs. the only Nim book, perhaps. But one of many Clojure books, not so sure 🙂
17:53:20Zevvtrue, that :)
17:53:47FromDiscord<Clyybber> ah scratch that
17:54:20FromDiscord<dom96> The advance for Nim in Action has been paid off btw, which from what I've read is rare for (programming) books
17:56:14disruptekZevv: it's not a linear rewrite; it's more of a graph.
17:58:02Zevvsure, but is it possible to isolate each stage, concentrate on that, test it, and then do the next one
17:58:08*natrys joined #nim
17:58:23Zevvthe alternative is just take what there is now and iteratively mold it into where you want it to go, of course
17:59:14disrupteki think we probably do want to iterate. i have a bad habit of writing a lot of code that doesn't work for weeks on end.
17:59:31Zevvhehe
17:59:58disruptekIC is mostly done once mangling works. kinda funny.
18:01:14disruptekdo you have a workaround for typed? because iirc, we are blocked there.
18:01:33disruptekholy shit, cps has 27 stars already.
18:01:35Zevvwell, the only problem is that you can't generate a function with the same name, right?
18:01:41Zevvwhy not just call it another name for now
18:01:49disruptekwho are these people and why don't we have any issues from them?
18:01:56Zevvno one actually runs this stuff
18:02:02alehander92it sounds cool
18:02:28ZevvI thought it would be cool as hell. But now that it kind of works, it's not es enthralling as I expected it to be.
18:02:37disruptekdon't be silly.
18:02:39Zevvit's just doing what it should do. the magic is gone
18:02:45disrupteklol
18:02:56disruptekit was sexier when it was more magical?
18:03:00Zevvsure
18:03:06Zevvjust like sex was sexier when it was magical
18:03:06disruptekthat's too funny.
18:03:44Zevvbut still, all I do is talk talk, but I don't do any of the coding on this
18:03:45disruptekcsp over cps is going to blow some minds.
18:04:52FromDiscord<Clyybber> I think calling it another name is a fine workaround for now
18:05:17disruptekshow me.
18:05:50FromDiscord<Clyybber> I'd rather fix the root cause
18:06:02disruptekshow me.
18:06:04FromDiscord<Clyybber> of course
18:06:09FromDiscord<Clyybber> show me.
18:06:18disrupteki'm trying.
18:06:21FromDiscord<Clyybber> disruptek: I'm trying. But my fix is wrong
18:06:25FromDiscord<Clyybber> wtf
18:06:29disruptekwtf
18:06:42FromDiscord<Clyybber> one mind two ppl
18:07:15FromDiscord<Clyybber> whats this https://github.com/disruptek/dust
18:07:19disruptekwherever you think the problem is, it's not there.
18:07:27disruptekdust?
18:07:50FromDiscord<Clyybber> disruptek: WDYM?
18:08:05disruptekyou're looking for the problem in the wrong place.
18:08:15FromDiscord<Clyybber> the problem is typed args leaking into the caller scope
18:08:31FromDiscord<Clyybber> which they must not
18:09:25disruptekdust is unattended syntax truncation, obviously.
18:10:17FromDiscord<Clyybber> and wine is not an emulator, got it
18:10:55disruptekyep.
18:15:35disrupteki'm out of tequila.
18:15:50disrupteknormally, this wouldn't be a problem, but i'm out of edibles, too.
18:16:24FromDiscord<dom96> Note: The Nim community does not condone drug use.
18:16:42disruptekspeak for yourself.
18:16:56Yardanicowe need a new channel for disruptek specifically
18:16:58Yardanico#nim-wild
18:17:11Yardanicoand I'm not even fully joking
18:17:16*hnOsmium0001 joined #nim
18:17:32disruptekhey man, one cannot approach hacking the compiler with a clear mind.
18:17:44FromDiscord<KingDarBoja> 😄
18:17:48FromDiscord<😬🤣> is there a workaround for {.inject.} not working on proc args?
18:18:05disruptekwhat?
18:18:09Yardanicoby using "var arg {.inject.} = arg"
18:18:15FromDiscord<😬🤣> compiler freaks out if I do `template someArgs: untyped = someArgImpl`
18:18:17Yardanicodisruptek: I think they're talking about procs made by templates
18:18:25Yardanicoand injecting proc arguments
18:18:28FromDiscord<😬🤣> some of them are `var` types...
18:18:51Yardanicoprovide the name of the arg to the call to the template
18:19:33Yardanicoor use simple macros
18:19:39Yardanicostuff like quote do or getAst exists
18:19:40FromDiscord<Clyybber> I don't understand the issue
18:19:48Yardanico@Clyybber it's simple
18:19:51disruptekonce i had tequila.
18:19:53disrupteknow i don't.
18:20:41FromDiscord<Clyybber> Yardanico: Is it about `proc p(a {.inject.}: T)` not owkring?
18:20:44Yardanicoif I understood correctly, they're asking for how to inject data here
18:20:45Yardanicohttps://play.nim-lang.org/#ix=2tUR
18:20:46Yardanicoyeah
18:20:59FromDiscord<Clyybber> yeah, I remember asking araq about that one
18:21:08FromDiscord<Clyybber> if it makes sense to gensym proc args at all
18:21:26FromDiscord<Clyybber> but he was too tired to think about it that day :)
18:21:31YardanicoI think you can use byaddr
18:21:32FromDiscord<Clyybber> and now hes gone into the abyss
18:21:50FromDiscord<😬🤣> sent a code paste, see https://play.nim-lang.org/#ix=2tUS
18:22:13FromDiscord<😬🤣> basically the line saying `inc x` doesn't compile because there's no `x`
18:22:17Yardanicoyeah see, almost like my example
18:22:34Yardanico@😬🤣 simplest way is to add argument names to the template arguments
18:22:51Yardanicoalso myProc will be gensym'd too
18:23:07Yardanicomaybe you want a dirty template?
18:23:09Yardanicoit'll work then
18:23:33disruptekwhen i take power, people that don't add argument names to templates will be first against the wall.
18:24:06FromDiscord<😬🤣> right, I got it working
18:24:12FromDiscord<😬🤣> sent a code paste, see https://play.nim-lang.org/#ix=2tUT
18:24:15FromDiscord<😬🤣> Thanks
18:24:40FromDiscord<Clyybber> I'll make a fix for the fact that you can't do {.inject.} on the param
18:24:45FromDiscord<😬🤣> `myProc` didn't get gensym's btw
18:24:58FromDiscord<Clyybber> yeah
18:25:01FromDiscord<Clyybber> but its params did
18:25:09FromDiscord<Clyybber> thats the thing I'm not sure is a good idea :P
18:26:00FromDiscord<😬🤣> I'm guessing it's been in Nim forever so changing it would be a breaking change
18:26:13FromDiscord<😬🤣> procs not getting gensym'd
18:27:09Yardanicoalso if you are not against it, can you please change your discord nickname (I mean the one used for the handle, not the display name)? It would be a bit easier to ping you and talk with you :)
18:27:43FromDiscord<Clyybber> @😬🤣 Nah, thats intended
18:27:52FromDiscord<Clyybber> Procs are {.inject.} by default
18:27:58FromDiscord<Clyybber> I'm talking about gensymming their parameters
18:28:37FromDiscord<Clyybber> @Yardanico You could fix it in the bridge :P
18:28:40Yardanicofix what?
18:28:46FromDiscord<Clyybber> the name
18:28:48Yardanico??
18:28:50Yardanicoit's emojis
18:28:54FromDiscord<Clyybber> by translating emojis to their text equivalent
18:28:55Yardanicomeh
18:29:01Yardanicothat would be much more verbose
18:29:07*Guest63171 quit (Ping timeout: 256 seconds)
18:29:12FromDiscord<Clyybber> grimainglaughing
18:29:12YardanicoHonestly I wish services never allowed for full UTF-8 in handles :)
18:29:22Yardanicoit's fine for display names, but not for handles
18:29:34disruptekit's almost like irc was a sufficient impl.
18:29:39Yardanicoalmost
18:29:46Yardaniconeed message editing support
18:30:33FromDiscord<dk> I'm pretty sure there's no difference between a handle and a display name in Discord
18:30:39*vicfred joined #nim
18:30:42FromDiscord<dk> I'm the emoji person btw
18:30:58Yardanicothere can be difference
18:31:03Yardanicoif you change your display name on a server :)
18:31:07Yardanicoon some specific server
18:31:53FromDiscord<KingDarBoja> Welcome DK (aka EmojiGuy)
18:36:25FromDiscord<Kiloneie> If you change that lowercase dk to uppercase DK, you can be known as Donkey Kong.
18:37:32FromDiscord<dom96> https://tenor.com/view/confident-cocky-smirk-smile-sneer-gif-16053968
18:37:40FromDiscord<dom96> That's drift king to you
18:37:43Yardanico"https://tenor.com/view/confident-cocky-smirk-smile-sneer-gif-16053968"
18:37:51Yardanicothat name
18:37:51FromDiscord<dom96> great url lol
18:38:21FromDiscord<Kiloneie> Did you both just get the same idea lol ?
18:38:29Yardanicono?
18:38:37YardanicoI posted the URL of the GIF because I thought it was funny
18:38:46FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/742814282961518623/unknown.png
18:38:48FromDiscord<Kiloneie> ah okay, what movie is that ?
18:39:05disruptekfast and bi-curious.
18:40:34FromDiscord<Kiloneie> is that the tokyo one ?
18:40:42FromDiscord<Kiloneie> i think i watched it
18:40:46disrupteknah.
18:41:29FromDiscord<Kiloneie> google says no imdb page, therefore, o.o eh ?
18:42:44FromDiscord<dom96> yep, it's the Tokyo one
18:50:22FromDiscord<--HA--> When I iterate over an object with fieldPairs how do I check the type of the value? I want to do something if it's a string, something else if int and otherwise ignore it.
18:50:32disruptekwhen
18:51:28disruptekwhen value is int: ...
18:51:37FromDiscord<Kiloneie> objectVar.fieldname.typeof is string ?
18:51:42leorize[m]@dom96 https://github.com/nim-lang/Nim/pull/15174 need your wisdom on this
18:51:43disbotasyncnet: don't try to close the socket again [backport]
18:54:59FromDiscord<--HA--> Ah `is` works well for this. Thanks
18:58:01FromDiscord<dom96> leorize: commented
18:58:38leorize[m]so... why is there even a closed flag in the first place?
18:58:54FromDiscord<dom96> Check the blame?
19:00:34leorize[m]I did and you added it to fix asynchttpserver
19:00:49leorize[m]why it was done as a flag is beyond me
19:02:08dom96link to the commit?
19:05:23*Jesin quit (Ping timeout: 240 seconds)
19:09:52leorize[m]dom96: https://github.com/nim-lang/Nim/commit/efca06c71c47eb636aacefe97e5816dc2e1082ff
19:11:16dom96Well, it's obvious, no?
19:11:26dom96If the user of asynchttpserver closes the socket then asynchttpserver would blow uo
19:11:28dom96*up
19:11:31dom96with this change it won't
19:11:49leorize[m]but why a flag instead of just invalidating the socket?
19:12:48leorize[m]`net` seems to get by just fine without even having `isClosed` exported
19:13:04*Jesin joined #nim
19:14:20*leorize joined #nim
19:14:27*Jesin quit (Remote host closed the connection)
19:15:42dom96guess I preferred using a flag?
19:16:44leorize[m]but you're also the person who make the change for `net` to invalidate the socket... https://github.com/nim-lang/Nim/commit/1661062ebf147e55e29a0bfb8fc62dc7959b8614#diff-df7c4ae903eab01bc8c4f64f425b48c3R871
19:17:21dom96I didn't write `net` originally
19:17:50dom96well, the very early version that used osInvalidSocket
19:18:03dom96so I decided to just keep those semantics
19:20:06disruptekZevv: you lied to me.
19:20:15leorize[m]so do you want me to get rid of `closed`? I don't see why we should waste a byte to store that one flag when it can be stored by `fd`
19:20:19disruptekthere is no such thing as _flossin' easter_
19:21:20dom96sure, if you want, in a separate PR
19:21:39Zevvit's a dutch tradition
19:21:58disruptekcreepy af.
19:22:12Zevvall the men of the village gather around the water pump, wearing their wooden shoes
19:22:49disruptekcircle floss?
19:23:13Zevvkind of. floss is limited, so they just share this one piece, going round and round
19:23:39disruptekwhen i was wealthy, i had a prepubescent manling floss me in the nude. it's been awhile since i had a proper flossing.
19:26:09Zevvso, is thsi gensym bug blocking or is it not
19:26:24FromDiscord<Clyybber> the weird one?
19:27:14Zevvthe "redefinition of 'X'; previous declaration here" one
19:27:34disruptekthat's not a gensym bug afaik.
19:27:49Zevvaw right, I'm mixing things up
19:27:53FromDiscord<Clyybber> yeah, more like a template/macro bug in general
19:27:53Zevvno wonder, with all these bugs we're having
19:27:54*Jesin joined #nim
19:27:57disruptekit's side-effects due to sem afaict.
19:28:09Zevvok, but is this one blocking for us, it's not really, is it
19:28:10disruptekyou can be forgiven.
19:28:15Zevvit's inconvenient at most
19:28:17disruptekshow me it's not.
19:28:34Zevvok, reading the kids, then I'll give it a go
19:28:39disruptekkk
19:28:47Zevvtoday it's quantum fluctuations
19:28:52Zevvthis book is so cool
19:28:56disrupteki was wondering when you'd get to that.
19:31:01Zevvhttp://www.letterenfonds.nl/en/book/1255/the-mystery-of-nothing-and-infinite-snot
19:33:16disruptektoo bad it's dutch. i guess you can look at the pictures, at least.
19:39:17*vicfred quit (Quit: Leaving)
19:46:22Zevvthe pictures are *also* very cool
19:48:17ZevvI hate how macros hae newTHisThat for some types and not for others
19:48:24disruptekyeah.
19:48:34disrupteki only use newThis for a couple of 'em.
19:48:42Zevvwhy don't we go build this stuff on pmunch's macro tools instead
19:48:56disrupteki thought about it, but i could tell you didn't like the sorta dep.
19:49:09disruptekadmittedly, it's a little different.
19:49:23Zevvwell, you saw my dep adventures the other day. Not being able to run nimph
19:49:25Zevvbecause of deps
19:49:26disruptekanyway, macros are going away.
19:49:35Zevvto be replaced by?
19:49:36disruptekdon't feel bad, nimph doesn't work for me, either.
19:49:44disruptekto be replaced by runtime.
19:49:53Zevvelaborate
19:49:58disruptekactually, i re-tagged 1.0. it should work for people.
19:50:23disruptekthe holy man comes down from the mountain in 3 days.
19:50:37disruptekhe told us before he left that he'd be removing the vm.
19:50:40FromDiscord<Clyybber> disruptek is being sarcastic I think
19:50:43FromDiscord<Clyybber> what
19:50:45disrupteknah.
19:50:49FromDiscord<Clyybber> oh, yeah
19:50:58FromDiscord<Clyybber> but that doesn't mean macros are going away
19:51:14FromDiscord<Clyybber> and they aren't going to runtime either
19:51:14disruptekit's a slippery slope.
19:51:24Zevvso it pulls in half the compiler instead, or what?
19:51:27disruptekwe won't need them much longer.
19:51:32FromDiscord<Clyybber> bs
19:51:37FromDiscord<Rika> thonk
19:51:39Yardanicoit's just experiments
19:51:49FromDiscord<Clyybber> Zevv: I think the idea was instead of using the VM you'd compile it to C and staticExec it
19:52:01FromDiscord<lqdev> if the vm goes away, now my scripting language will actually have a reason to exist ;)
19:52:01disruptektake the blue pill, wake up and believe whatever you want to believe.
19:52:02FromDiscord<Clyybber> but the devil is in the details
19:52:20Zevvhmm that sounds non-trivial
19:52:53disruptekwhat's nontrivial is supporting two languages that do the same thing.
19:53:04FromDiscord<Clyybber> its one language two impls:)
19:53:14FromDiscord<Clyybber> and not even that
19:53:28FromDiscord<Clyybber> they share the parse, sem phase
19:53:34disruptekyou're allowed to be wrong, but first you must concede the point.
19:53:35FromDiscord<Clyybber> so its really just the execution phase
19:53:52Zevvdisruptek: http://ix.io/2tVn
19:54:03Zevv"show me how"
19:54:06FromDiscord<Recruit_main707> i am reading 4raq's destructor page, and this appears about nim without gc, `Strings and seqs will support O(1) slicing`, can somebody explain it to me, i still havent been teached big O notation :v
19:54:11Zevvam I that smart or are you that stupid?
19:54:22disruptekyes?
19:54:29FromDiscord<Clyybber> @Recruit_main707 it means its constant time. No copying
19:55:09Zevvdisruptek: no magic to it right? Just give it another name for now
19:55:12Yardanico@Recruit_main707
19:55:19*Vladar quit (Quit: Leaving)
19:55:24YardanicoO(1) usually means same timing regardless of the size/values/etc
19:55:34disruptekZevv: have doFoo make two procs.
19:56:37Zevvhttp://ix.io/2tVo
19:56:43ZevvI can do three too, if you like that sort of thing
19:56:52FromDiscord<Recruit_main707> so... in practice, what restrictions does it have, it means i cant save a slice in a new variable?
19:58:21Yardanico?
19:58:37Yardanicothat's not related to O notation at all
19:58:50FromDiscord<Recruit_main707> i dont understand what, "same timing" means here
19:58:50disruptekZevv: so hack it into the typed branch?
19:59:11Yardanico@Recruit_main707 well, first of all IDK if it was implemented
19:59:24Yardanicoit should probably be possible (or already done) with cursor inference
19:59:32ZevvI can't touch your code. My hands get dirty.
19:59:38Yardanicobut basically if string is 1 char
19:59:39Yardanicoor 1000000000 chars
19:59:43disruptekc'mon. just replace the clone() calls.
19:59:45Yardanicothe slicing sped will be the same
19:59:53Zevvdisruptek: lemm see
20:00:01Yardanico@Recruit that article is pretty outdated btwe
20:00:02Yardanicobtw
20:00:02FromDiscord<Clyybber> it wasn't implemented yet
20:00:14Yardanicois it possible with cursor inference?
20:00:24Yardanicoif it's safe to do, you don't need a copy for slicing
20:00:24FromDiscord<Clyybber> it should be in theory
20:00:28FromDiscord<Clyybber> yeah
20:00:47FromDiscord<Clyybber> but its a bit more complicated
20:00:54disruptekwe really need to make a views feature for people.
20:01:00disruptekit's crazy.
20:01:57ZevvI have this nasty problem where nim complication get cached if it's the wrong file with the same name.
20:02:09ZevvI have a t.nim in 50 places, and if I compile one of them, nim gives me the last cached one
20:02:15ZevvI don't rembember always seeing that
20:02:29disrupteki have too many t.nims, too.
20:03:10Yardanicofor me it's usually a.nim b.nim or tt.nim :D
20:03:18Yardanico1-2 letter combinations
20:03:59disrupteki don't have the cache problem, but i tend to use local caches.
20:04:00Zevv2 letters, man, that's *so* much work to type
20:04:38Zevvdisruptek: I have other issues with typed: /home/ico/external/Nim/lib/system/fatal.nim(49, 5) Error: unhandled exception: /home/ico/sandbox/prjs/cps/cps/environment.nim(482, 3) `not via.isEmpty` [AssertionDefect]
20:06:12disruptekit might need a tweak to know the root type.
20:06:27disruptekvia is the parent Cont.
20:07:08Zevvhm but I don't even get to clone() now
20:08:16disruptekyou should be running line 622.
20:09:30Zevvno I don't get there
20:09:52Zevvhm wait
20:10:01disruptekyou're on 54c8...?
20:10:28disruptek622 in cps.nim, i mean.
20:10:46Zevvno, i need to add the :C now I guess
20:11:17*FromDiscord quit (Remote host closed the connection)
20:11:30Zevvok i'm good
20:11:32*FromDiscord joined #nim
20:11:34disruptekyes, because we don't use the return value -- it will be for the user's use.
20:12:40disruptek:C looks like a very unhappy muppet.
20:12:42*FromDiscord quit (Remote host closed the connection)
20:12:57*FromDiscord joined #nim
20:12:57*FromDiscord quit (Remote host closed the connection)
20:13:12*FromDiscord joined #nim
20:14:13Zevvbeaker
20:14:32disrupteklol
20:15:24disrupteki was convinced i could see color on our black & white television until we upgraded and i saw that show in color.
20:17:39Zevvhttp://zevv.nl/div/adamsfamily.jpg
20:18:02disruptekyikes.
20:19:49Zevvpull your typed
20:19:50*a_chou joined #nim
20:19:53*a_chou quit (Remote host closed the connection)
20:20:02Zevvit now generates two foo_clone() procs
20:20:20*a_chou joined #nim
20:20:54disruptekis that good?
20:21:27disruptekdid we try adding a template?
20:21:30disrupteki can't remember.
20:24:42*a_chou quit (Client Quit)
20:28:17ZevvI don't know. but this works for now, right?
20:28:43disrupteki forget how to git.
20:28:59disruptekwhy don't they show your changes?
20:29:23FromDiscord<Clyybber> @dk Putting the inject pragma on the param should work now
20:31:04FromDiscord<dk> @Clyybber Wow, that was fast
20:31:09FromDiscord<Clyybber> :D
20:31:21disruptekhe works quickly when he wants to.
20:31:30Zevvoh I didn't push properly sorry
20:31:31Zevvone moment
20:31:34disruptektoo bad he never wants to close our bugs.
20:31:47Zevvdone
20:31:53Zevvnow you do a 'git pull --rebase'
20:31:57Zevvyou can do it!
20:32:01disruptekyeah, thanks, buddy.
20:32:13disruptekbut it doesn't work.
20:33:09FromDiscord<Clyybber> disruptek: Your bugs are the hard ones :D
20:33:21Zevvdisruptek: well, that it doesn't *work* is not my fault
20:33:22FromDiscord<Clyybber> not so much bugs as to undesigned features
20:33:26Zevvit was already broken, wasnt it
20:33:30Zevvbut the bug is gone
20:33:34disruptekfair enough. nice job.
20:33:43Zevvand the xfrm shows to properly converted procs
20:33:49disruptekthe output looks good, yes.
20:34:01disrupteknow if only the compiler worked... 😉
20:34:24disrupteks/clone/clyybber/ should help.
20:34:58ZevvI can append "_clyybber" instead of "_clone", would that help?
20:35:05disruptekalready pushed, my friend.
20:35:16Zevvgit commit -a --amend; git push -f
20:35:38FromDiscord<Clyybber> lol
20:36:47disruptekclyybber wants us to believe that mutating or copying typed ast inside a macro is an undesigned feature.
20:37:11disrupteknever before in the history of nim has anyone wanted to do such a thing.
20:37:17FromDiscord<Clyybber> tell me, this: `macro m(a: typed): untyped = a; m: static: echo "hey"` *should* echo hey twice
20:37:45FromDiscord<Clyybber> disruptek: Oh noe, I mean that when you try to fix it, you get into undesigned territory
20:37:48disruptekyes.
20:38:02FromDiscord<Clyybber> guess what it does rn
20:38:04FromDiscord<Clyybber> it echos once
20:38:11disrupteksweet.
20:38:11FromDiscord<Clyybber> and not after the macro has been evaluated
20:38:23disruptekdoesn't anyone ever test this shit?
20:38:24FromDiscord<Clyybber> so thats the undesigned part
20:38:48disruptekthe manual literally says that macro output is re-evaluated.
20:38:54Zevvwait what
20:38:58Zevvyou cant mutate typed AST?
20:39:03FromDiscord<Clyybber> we don't resem untyped ast
20:39:14disruptekhe means typed.
20:40:07Zevvwell, we will do it anyway, right
20:40:09FromDiscord<Clyybber> disruptek: oh, where does it say that?
20:40:16disruptek~manual
20:40:16disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
20:40:19FromDiscord<Clyybber> I thought there basically was no spec on that
20:40:33FromDiscord<Clyybber> i must be blind
20:40:33disruptekoh maybe i'm thinking of clojure.
20:40:43Zevvdude
20:41:00FromDiscord<Clyybber> bruh
20:41:01Zevvdisruptek: What is this? A Clojure channel?
20:41:07disrupteksemantic analysis happens at least twice:
20:41:16disruptekhttps://nim-lang.org/docs/manual.html#macros
20:41:27disruptekIt repeats semantic analysis of that region of the code.
20:41:46Zevvyeah because if not, what would be the friggin use?!
20:42:02ZevvHey its still there, I threw that out! "However, this is no real restriction because Nim's syntax is flexible enough anyway."
20:42:04disruptektell it to _clyybber().
20:42:20FromDiscord<Clyybber> Zevv: Thats the stable docs buddy
20:42:23Zevvoh you're reading old manuals. don't do that
20:42:32Zevvstable docs are outdated docs
20:42:36disrupteknew for nim 1.3: macros only sem once.
20:42:41Zevvhaha
20:43:03Zevvso, just ignore clyybber and go where no man has gone before, right
20:43:20Zevvboldly
20:43:33disruptekwhat?
20:43:39disruptekplenty of people have built stuff with clojure.
20:44:03disruptekoh you mean nim?
20:44:04ZevvI've heard its slow and the FFI sucks
20:44:42disrupteki heard their macros sem twice.
20:44:56disruptekno wonder it's so slow.
20:45:46Zevvghehe
20:46:01Zevvanyway, early to bed because all wake makes zevv a dull boy
20:46:07disrupteknice job, zevv.
20:46:18Zevvwell, was it *that* hard
20:46:24disruptekhopefully you will have tuple destructuring tomorrow AM.
20:46:48Zevvgo for it. I'll put in the channels and then we can have a presentation at NimConf
20:47:00Zevvyou do the talking, I'll do the mime
20:47:14disrupteki probably won't be alive by then, but i can record my voice.
20:47:38Zevvyes, record some stories so we can AI synthesize you
20:47:46Zevvand then complain and play you at 1.5x speed on youtube
20:47:54disruptekprobably easier done than said.
20:48:17Zevvso, remember: no checking in of broken code in master anymore
20:48:31Zevvthis stuff is getting serious now, with 27 stars
20:48:39disrupteki should put a little markov chain generator into the bot. just regurgitates disruptek commentary.
20:48:55disrupteki know, that's a whole constellation and a half.
20:48:59Zevvpretty repetative anyway
20:49:08disruptekaight, sleep tight, zevv.
20:49:15Zevvo/
20:49:46FromDiscord<Clyybber> gn
20:50:36disruptekman, i really miss tequila.
20:50:53disrupteklast week i belched so violently that i cracked a rib.
20:51:04disruptekhard to keep my mind on code with all this pain.
20:51:13Zevvno, you shouldnt have moved to absynth, that was a bad decision
20:51:34disruptekabsynth doesn't give me gas; it's the garlic that does it.
20:51:36Zevvabsint absinth whatever the spelling
20:51:44FromDiscord<Clyybber> its a bit tricky
20:51:47disruptekabsinthe, i believe.
20:52:06FromDiscord<Clyybber> when a macro arg is typed and we return it as typed
20:52:15FromDiscord<Clyybber> we need to sem it before passing it to the macro
20:52:38disruptekmutation sucks.
20:52:43FromDiscord<Clyybber> but afterwards we have to sem it a bit again, so that we get the symbols into scope
20:52:45disruptekside-effects, i mean.
20:52:49FromDiscord<Clyybber> yeah
20:53:08disruptekyou have to remove the old stuff, though, no?
20:53:26FromDiscord<Clyybber> yeah, my PR currently only does that
20:53:28FromDiscord<Clyybber> remove the old stuff
20:53:45disruptekokay, so you remove it, macro it, sem it back in?
20:53:51disruptekin theory.
20:53:56FromDiscord<Clyybber> in theory
20:54:09FromDiscord<Clyybber> but what if the macro returns typed
20:54:10disrupteksounds like a problem to me.
20:54:13FromDiscord<Clyybber> and you sem it back in
20:54:16FromDiscord<Clyybber> what should happen
20:54:36FromDiscord<Clyybber> ok, well the typed ast can either be a copy, then we resem it completely
20:54:38FromDiscord<Clyybber> right?
20:54:40disruptekthe bigger problem is, whatever if the input to the macro has necessary side-effects to the macro?
20:55:14disruptekyou have to leave it in, then remove the old version after the macro is done making the new version.
20:55:15FromDiscord<Clyybber> yeah, because we wouldn't want those to get triggered twice in macro noop(a: typed) typed = a
20:55:50disruptekit does seem like it has to be a copy, but a perfect copy.
20:55:57FromDiscord<Clyybber> I mean the sideeffect of wahtever you pass to noop should only be get evaluated once
20:56:03FromDiscord<Clyybber> unless you somehow deepcopy a
20:56:12FromDiscord<Clyybber> which I'm not sure allows mutation then
20:56:14FromDiscord<Clyybber> I think not
20:56:19disruptekit's a problem.
20:56:20FromDiscord<Clyybber> so we are protected on that front
20:56:26FromDiscord<Clyybber> the problem is the scope
20:56:34FromDiscord<Clyybber> we sem it before the evaluation
20:56:46FromDiscord<Clyybber> but we need the symbols afterwards
20:57:05FromDiscord<Clyybber> so we need to store the symbols that it introduces somewhere
20:57:29FromDiscord<Clyybber> so that we don't resem it.
20:57:58disruptekwell, we can compare the two.
20:58:09FromDiscord<Clyybber> you mean the ASTs?
20:58:11disruptekyeah.
20:58:20FromDiscord<Clyybber> I mean we are protected from typed AST mutation
20:58:23FromDiscord<Clyybber> so its not a problem
20:58:34disrupteknot a problem to compare them, no.
20:58:45FromDiscord<Clyybber> no I mean we don't have to resem it
20:58:51FromDiscord<Clyybber> since it can't have changed
20:59:04disruptekright, but the comparison can show us symbol changes.
20:59:04FromDiscord<Clyybber> so we can keep the sideeffect count to 1
20:59:11FromDiscord<Clyybber> oh, that you mean
20:59:21FromDiscord<Clyybber> yeah, but such a comparison is complicated
20:59:28disrupteksure.
20:59:38FromDiscord<Clyybber> and since there could be a when random: in there
20:59:45FromDiscord<Clyybber> its nigh impossible
20:59:51FromDiscord<Clyybber> without saving some state at least
21:00:17FromDiscord<Clyybber> and if we start saving the state of symbols that affect the AST then we can just save the symbols it introduces instead
21:00:18FromDiscord<Clyybber> IMO
21:00:53disruptekif you think it's easier... my limited experience suggests that it's pretty tricky.
21:01:08FromDiscord<Clyybber> I mean we must store symbols anyways
21:01:10FromDiscord<Clyybber> or state
21:01:21FromDiscord<Clyybber> I find symbols easier than storing whatever made random go 1
21:01:28disruptekwell, they never go away. right.
21:01:37FromDiscord<Clyybber> the symbols?
21:01:40disruptekright.
21:01:44FromDiscord<Clyybber> they do
21:01:53disruptekonly when we tell them to.
21:01:54FromDiscord<Clyybber> currently you can create C codegen errors with that
21:02:17FromDiscord<Clyybber> just macro m(a: typed): untyped = discard; m: var a = 1; echo a 1
21:02:24FromDiscord<Clyybber> (edit) removed '1'
21:02:39FromDiscord<Clyybber> var a won't exist because the macro discards the result
21:02:45FromDiscord<Clyybber> (edit) 'the result' => 'it'
21:02:58disrupteki'm talking about inside the compiler.
21:03:04FromDiscord<Clyybber> oh
21:03:24FromDiscord<Clyybber> with they you mean the symbols introduced by the typed arg?
21:03:37disruptekthe pre-macro ast.
21:04:42FromDiscord<Clyybber> where would they go
21:04:52FromDiscord<Clyybber> currently they go into the scope and then the macro gets evalled
21:05:05FromDiscord<Clyybber> with my "fix" they get pulled out of the scope again
21:05:19FromDiscord<Clyybber> but the missing part is reintroducing them again if the macro returned the arg
21:05:30FromDiscord<Clyybber> I think we generally need to attach scopes to nodes
21:05:44FromDiscord<Clyybber> to typed nodes
21:05:46disruptekwe need explicit scope nodes, imo.
21:05:51FromDiscord<Clyybber> yeah
21:06:21disruptekit solves a few problems.
21:06:35disruptekand try and while else and defer.
21:06:36FromDiscord<Clyybber> I thought I would need them for the gensym fix too
21:06:38FromDiscord<Clyybber> but I didn't
21:06:45FromDiscord<Clyybber> but for this one I definitely need
21:09:02disruptekmaybe araq will have some 5 line hack to solve it.
21:09:30*dulsi__ joined #nim
21:10:12FromDiscord<Clyybber> I hope not :p
21:10:22FromDiscord<Clyybber> I mean, I do, but it will be bad
21:10:24disruptekheh
21:10:36disrupteka 95% solution would be bad.
21:10:40FromDiscord<Clyybber> we really need such a node
21:10:56FromDiscord<Clyybber> because you could put different typed ast params into a nkStmtList and return it
21:11:10disruptekof course.
21:11:18FromDiscord<Clyybber> and then the nkStmtList needs to properly mix in all the symbols
21:11:45*dulsi_ quit (Ping timeout: 240 seconds)
21:11:46FromDiscord<Clyybber> its interesting stuff. I actually like that its so broken currently, because it gives thinking food
21:12:02disruptekwell, there's a lot of room for improvement.
21:12:07FromDiscord<Clyybber> yeah
21:12:12disrupteki'm just annoyed that it's so half-baked.
21:12:32FromDiscord<Clyybber> I guess the implications just weren't clear when it was introduced
21:12:37disrupteki wish more of this stuff was fully consistent.
21:12:44FromDiscord<Clyybber> thats why I said earlier its an "undesigned feature"
21:13:14disruptekthe manual sets the wrong expectation.
21:17:59FromDiscord<Rebel> sent a long message, see https://paste.rs/Asz
21:20:03*vicfred joined #nim
21:25:35FromDiscord<Rika> @Rebel https://github.com/khchen/winim/blob/e73ecec5679a58488d42d35b39ebeb785baa1564/winim/inc/windef.nim#L623
21:26:05FromDiscord<Rika> ~~have fun, the file's massive lol~~
21:26:22*audiofile joined #nim
21:26:41FromDiscord<Rebel> dam I should've just cloned the repo and used regex to search for it
21:28:02FromDiscord<Rebel> yeah I will need to tweak the final results by hand not sure if I can pass an enum to cDefine as it just wants a string
21:28:10FromDiscord<Rebel> thanks
21:35:54*solitudesf quit (Ping timeout: 256 seconds)
21:37:40*natrys quit (Ping timeout: 256 seconds)
21:39:33FromDiscord<Kiloneie> Where all could i post my videos of Nim for more visibility ?
21:40:59FromDiscord<Elegant Beef> r/programming possibly, they're more lax on self promotion, programming discord/matrix serers
21:41:05FromDiscord<Elegant Beef> What videos?
21:54:50FromDiscord<KingDarBoja> YouTube (?)
21:58:00*natrys joined #nim
22:01:50Yardanico@Kiloneie programming videos generally don't get a lot of views
22:02:07Yardanicoexcept if it's a very popular topic or you're doing scipop-like videos
22:02:32FromDiscord<Elegant Beef> Or if you're brackeys doing unity
22:02:36Yardanicono
22:02:40Yardanicoif you're doing C++
22:02:47Yardanicoand your channel is named "freecodecamp.org"
22:08:51*natrys quit (Quit: natrys)
22:12:47FromDiscord<Kiloneie> well anything Nim related really
22:18:53*Trustable quit (Remote host closed the connection)
22:22:56*lritter quit (Quit: Leaving)
22:26:22FromDiscord<Kiloneie> Imma ask this again tomorrow when more people are awake xD. Most of my views are from subs i already have, forum, here and a few from other Nim videos from other people. 30% is apparently youtube search. Gotta at least try.
22:26:42Yardanicowell if you want to earn money off programming videos - it's not easy ;)
22:26:47FromDiscord<Kiloneie> also what the hell is voat.co(im getting 15% of all traffic from there)
22:26:54FromDiscord<Kiloneie> i know D:
22:27:06FromDiscord<Kiloneie> before i even make a cent...
22:27:07Yardanicohttps://atlas.eff.org//domains/voat.co.html ?
22:27:31Yardanicoah nvm
22:27:44Yardanicohttps://en.wikipedia.org/wiki/Voat
22:28:14FromDiscord<Kiloneie> hub for the alt right, sure.
22:28:18FromDiscord<Kiloneie> lol
22:28:53FromDiscord<Elegant Beef> Dude nim's logo is a crown you cant get more authoritarian than a king 😛
22:29:12FromDiscord<Kiloneie> (little man in the sky can)
22:29:29FromDiscord<Elegant Beef> I thought he was the little man all around us
22:30:08FromDiscord<Kiloneie> Java has the sun D:
22:30:16FromDiscord<Kiloneie> or ... atleast it did xD
22:31:07*dulsi__ is now known as dulsi
22:31:35FromDiscord<Kiloneie> libman posted my video on voat
22:31:38FromDiscord<Kiloneie> ahhh
22:33:13FromDiscord<Kiloneie> I think if i make a thread on many of these popular programming websites and reddit in p. section i could probably at least double the traffic.
22:36:10FromDiscord<Kiloneie> does posting in a reddit thread bump it higher ? Asking if i make a thread and post my videos there will it bump it or not(otherwise a thread per video)
22:36:35leorizenope
22:36:44leorizeactually I don't know for sure :P
22:37:08FromDiscord<Elegant Beef> Nah, reddit shows based off updoot rate/post time afaik
22:38:16FromDiscord<Kiloneie> hmm nice, then i can keep a bookmark on that 😛
22:38:48FromDiscord<Kiloneie> probably gonna end up with a dozen pages to post.
22:38:55FromDiscord<Elegant Beef> Oh god
22:39:15leorizecreators usually just have their own subreddit instead
22:39:32leorizethen if there's anything worth promoting they just crosspost over to other sub
22:39:33FromDiscord<Elegant Beef> Yea, also you could just share a trailer of what your videos go over or w/e
22:42:44FromDiscord<Kiloneie> If i make my own subreddit, its probably gonna get like 2 views per video. Idk
22:43:24leorizeyou can easily promote your own subreddit by telling people to use it as better yt comments :P
22:43:44leorizethen if you want to start promoting you can x-post the vid to other subs
22:43:52FromDiscord<Kiloneie> For a trailer... Not yet, i havent covered much yet, and i mentally cant finish Nim for Beginners in less than a month.
22:44:03FromDiscord<Kiloneie> Hmm i guess
22:45:06FromDiscord<Kiloneie> Imma start doing some video editing on fiverr to make some cents till this gets any, could probably cross promote D:
22:45:58leorizeit's never easy to get business off the ground, esp when you start off with a relatively niche language like Nim :P
22:46:26leorizefiverr sounds like a good idea to get some fund for your projects :)
22:46:35FromDiscord<Kiloneie> Atleast i can establish a monopoly xD... If i keep going
22:46:47*tane quit (Quit: Leaving)
22:46:59FromDiscord<Kiloneie> Yea, i just hope my current videos showcase some skill in that...
22:47:09FromDiscord<Kiloneie> I dont believe in my skills
22:51:24FromDiscord<Elegant Beef> In my opinion your videos have audio issues and tend to play around a bit too much. For example you show off `1..10` `countUp(1,10)` and `countDown(10,1)` in real time, and dont just mention them as other iterators.
22:51:39FromDiscord<Elegant Beef> Mouseclicks + keyboard noise is a huge turnoff for me
22:52:17leorizeI think there are plugins that can filter those
22:52:21FromDiscord<Kiloneie> Yeah... i've been adressing this issue for a while, i really want a mic arm and i got 0$.
22:52:37FromDiscord<Kiloneie> it's way better now all in all, but yeah.
22:53:00FromDiscord<Kiloneie> still not the kind of issue last dude posted videos on nim forum
22:53:02FromDiscord<Kiloneie> ahem...
22:53:03FromDiscord<Kiloneie> xD
22:53:21leorizeyou have some competition now xd
22:53:27FromDiscord<Kiloneie> yeah.... no
22:53:27FromDiscord<Elegant Beef> Yea you do sorta got me wanting to make tutorialization too 😄
22:53:36FromDiscord<Kiloneie> just try video #2 on that guy...
22:54:00FromDiscord<Kiloneie> hes quieter than the insane amount of background noise he has, also mono channel from the right side
22:54:50FromDiscord<Kiloneie> i found a dude who started a week after i started my nim videos then quit 1 week after i first quit as well, like... as if he was copying me lol
22:54:58*ehmry_ joined #nim
22:55:02FromDiscord<Kiloneie> i did a better job though...
22:56:05leorizethey're just starting off, maybe they will be better than you if you slack off for too long :P
22:56:18FromDiscord<Kiloneie> Yeah, i know xD...
22:57:53FromDiscord<Kiloneie> if i don't stop this time, i am planning a ton of videos, including game dev which i really want to touch on(i really wanna make a good game already, my dream since i first tried that path when i was 11 lol)
22:58:18FromDiscord<Recruit_main707> That would be nice
22:58:58FromDiscord<Kiloneie> first with Nico, then SDL2 basics into a pong game or smthing like that. Maybe one day make a good game for steam, then make tuts on how to make that game...
23:00:01FromDiscord<--HA--> sent a code paste, see https://play.nim-lang.org/#ix=2tW4
23:01:23leorizeif you have a static lib of sqlite, just `--dynlibOverride:sqlite --passL:-lsqlite3`
23:01:42leorizeyou can also do `--passL:/path/to/libsqlite3.a`
23:02:39FromDiscord<Clyybber> disruptek: Can you elaborate on your mangling issue with jsonutils?
23:06:07leorizeI found some of my very old Nim code: https://github.com/alaviss/pong
23:06:18leorizeand yes it's a textbook pong game
23:06:24FromDiscord<Clyybber> leorize: Heh, does it still compile?
23:06:37leorizeI don't think I cut out to be a gamedev when I can't even finish a simple pong game lol
23:06:42FromDiscord<Kiloneie> interesting
23:06:57leorize@Clyybber probably not, I used not nil
23:07:11FromDiscord<Kiloneie> i've spent on a single project 1 year before... twice... but then i quit for a long time D:
23:07:24leorizeoh lol `nim >= 0.16.1` as requirement, yea that one is definitely not compiling
23:07:45FromDiscord<Kiloneie> probably a few edits here and there will fix it
23:09:51leorizesometimes I'm amazed by the amount of hacks I'm willing to put up: https://github.com/alaviss/pong/blob/67740800a586874cdb69eb55c4062efe20633cd8/src/pong.nim#L32-L38
23:10:31FromDiscord<Kiloneie> That's outside of my Nim knowledge xD...
23:11:04FromDiscord<Kiloneie> i can't make sense of that lol
23:11:48leorizeI wouldn't fault you for that. My early Nim code isn't the best
23:12:36FromDiscord<Kiloneie> xD. I haven't touched pragmas much yet, and when i did i couldn't remember any of it.
23:13:22FromDiscord<Kiloneie> also i looked the manual a few days ago and couldn't find any explanation on {.inline.} and {.base.}... could you elaborate maybe ?
23:13:54leorize{.inline.} is a hint to tell the compiler to inline a function
23:14:14FromDiscord<--HA--> leorize, with --passL:/path/to/libsqlite3.a it compiles but then at runtime still tries to load libsqlite3.so
23:14:45leorize--HA-- try `--dynlibOverride:sqlite3` then?
23:15:03FromDiscord<Kiloneie> And {.base.} ?
23:15:13FromDiscord<--HA--> should --dynlibOverrideAll not work?
23:15:27leorizethat works too
23:16:19leorize@Kiloneie tell the compiler that a method is the "base" method, meaning that it will be the method that's called if an object didn't override it with its own implementation
23:16:24*tiorock joined #nim
23:16:24*tiorock quit (Changing host)
23:16:24*tiorock joined #nim
23:16:24*rockcavera quit (Killed (barjavel.freenode.net (Nickname regained by services)))
23:16:24*tiorock is now known as rockcavera
23:16:48FromDiscord<Kiloneie> ah okay, thanks!
23:17:08leorizeall of this is documented in the manual fwiw :P
23:17:17FromDiscord<Kiloneie> i couldn't find it D:...
23:17:28FromDiscord<Kiloneie> not for those 2 pragmas
23:17:32FromDiscord<Kiloneie> D:
23:19:27leorize[m]yea, they're documented very sneakily
23:19:28leorize[m]inline: https://nim-lang.org/docs/manual.html#types-procedural-type
23:19:37leorize[m]base: https://nim-lang.org/docs/manual.html#multiminusmethods
23:21:26FromDiscord<--HA--> leorize, I now get this when compiling https://pastebin.ubuntu.com/p/GKFS3CvY3R/ sadly I don't really know much about these things. I'm on debian and installed a bunch of sqlite packages, one of them is libsqlite3-dev
23:22:24leorizeah, you need musl-compiled versions of sqlite
23:22:32FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=2tW9
23:22:41FromDiscord<brainproxy> both x and y are uint64
23:23:04FromDiscord<Rika> can you show the whole line
23:23:18FromDiscord<Rika> bitops.bitand returns the same types it is given
23:23:19leorize--HA-- you can get them from julia binary builder
23:23:22FromDiscord<--HA--> leorize, now that you say it, that makes a lot of sense 🙂
23:23:28leorizeor alternatively
23:23:41leorizejust use sqlite single source file and add it as a `{.compile.}` to your app
23:23:44FromDiscord<Elegant Beef> probably want bitops.bitand(x,y) == 0 or w/e you're looking for
23:23:57FromDiscord<Rika> likely
23:26:30*NimBot joined #nim
23:33:55FromDiscord<--HA--> leorize, thank you! that single source sqlite c file and {.compile.} pragma worked perfectly. I'm hoping this way I'll also have it not so difficult to cross compile to windows later.
23:35:28FromDiscord<brainproxy> > probably want bitops.bitand(x,y) == 0 or w/e you're looking for↵@Elegant Beef too many years o JavaScript 🤪
23:37:01FromDiscord<brainproxy> (edit) 'o' => 'of'
23:46:53*krux02_ joined #nim
23:49:05*vsantana joined #nim
23:49:37*vsantana quit (Client Quit)
23:49:52*krux02 quit (Ping timeout: 260 seconds)
23:49:58FromDiscord<--HA--> Now the regular build fails, with the {.compile: "sqlite3.c".} in there. Can I check with `when` if the --passL:-static is defined by any chance?
23:52:36leorizealternatively you can just add --dynlibOverrideAll to your config