<< 12-10-2021 >>

00:09:30nrds<Prestige99> I guess so Yard, but there's been an effort to create a standard
00:09:44nrds<Prestige99> I think github is one of the few that doesn't follow the newline "standard"
00:10:50nrds<Prestige99> I use sembr to write so it's slightly annoying (https://sembr.org/)
01:01:29FromDiscord<satyrn> how would i use newAsyncHttpClient() to get the contents of multiple websites asynchronously
01:13:48FromDiscord<Yardanico> you would start multiple futures
01:34:52*oz quit (Remote host closed the connection)
01:35:07*ox joined #nim
02:04:20*Mister_Magister quit (Read error: Connection reset by peer)
02:04:41*Mister_Magister joined #nim
02:07:37*arkurious quit (Quit: Leaving)
02:50:07FromDiscord<Gumber> ugh ssl is such a pain to get working on windows
02:50:21FromDiscord<Gumber> no idea why the nim client won't connect
02:50:39FromDiscord<Gumber> and Nim basically logs nothing just silently crashes
02:54:33FromDiscord<exelotl> Someone really wrote an RFC for when to press enter šŸ˜…
02:56:25FromDiscord<impbox [ftsf]> with no effect
03:05:09FromDiscord<Gumber> okay sweet - no idea what I was doing wrong but the ssl socket stuff is working now yay
03:05:23FromDiscord<Gumber> https://media.discordapp.net/attachments/371759389889003532/897319006573297684/unknown.png
03:06:14FromDiscord<Gumber> I guess that's not really visible - oh well
03:07:03FromDiscord<satyrn> how would i check if a website is online without getting content
03:07:36FromDiscord<satyrn> nvm im sumb
03:07:38FromDiscord<satyrn> (edit) "sumb" => "dumb"
03:12:05FromDiscord<impbox [ftsf]> there's a HTTP HEAD request
03:33:35FromDiscord<Rika> Ping?
03:36:07FromDiscord<Yardanico> In reply to @Rika "Ping?": http head is exactly "http head" for websites
03:36:15FromDiscord<Yardanico> if you ping the IP you'll not be checking website availability
03:36:22FromDiscord<Yardanico> since it can resolve to cloudflare or some other CDN or some shared web hosting
03:36:24FromDiscord<Rika> Iā€™m not replying to imp
03:36:30FromDiscord<Yardanico> oh, then why ping? :D
03:36:31FromDiscord<Rika> I guess so
03:36:54FromDiscord<Rika> In reply to @Yardanico "since it can resolve": That could still mean the site is ā€œavailableā€ though
03:37:00FromDiscord<Rika> Sure I guess a head request will work
03:37:11FromDiscord<Rika> Implementing ping in code is harder anyway
03:38:44FromDiscord<Yardanico> In reply to @Rika "That could still mean": not really
03:38:54FromDiscord<Yardanico> what if it was banned on the shared hosting or cloudflare stopped serving it
03:39:06FromDiscord<Yardanico> also it can be offline and cloudflare shows you the "live view" page
03:39:09FromDiscord<Rika> In reply to @Rika "Sure I guess a": Yeah I got that after I sent this
03:39:24FromDiscord<Rika> You can argue the live view page is available
03:39:28FromDiscord<Rika> Depending on the website
03:50:15FromDiscord<satyrn> how would i check if an entire string is alphanumeric
03:50:28FromDiscord<satyrn> the isAlphaNumeric proc is only for characters so
03:50:41FromDiscord<Rika> Iterate over the string and you get characters
03:54:49FromDiscord<impbox [ftsf]> Ping is terrible for checking a website, website could be up and reject pings. Could be down and respond to pings.
03:55:10FromDiscord<impbox [ftsf]> Even http HEAD is not that great, you're better off getting the content and checking for something you know will always be there
03:55:10FromDiscord<impbox [ftsf]> Which will depend on the site
04:03:16*rockcavera quit (Read error: Connection reset by peer)
04:03:40*rockcavera joined #nim
04:03:40*rockcavera quit (Changing host)
04:03:40*rockcavera joined #nim
04:06:02*supakeen quit (Quit: WeeChat 3.3)
04:06:31*supakeen joined #nim
04:09:54FromDiscord<KimJongUnstoppable> Does anyone know how to properly call ProcessStartInfo? I tried using the winim package to load System and call it that way, but it fails no matter how many different ways I attempt to do it.
04:10:04FromDiscord<KimJongUnstoppable> (edit) "ProcessStartInfo?" => "ProcessStartInfo from the windows API?"
04:19:00FromDiscord<impbox [ftsf]> what have you tried and what happens?
04:21:59FromDiscord<KimJongUnstoppable> sent a long message, see http://ix.io/3BuC
04:22:57FromDiscord<KimJongUnstoppable> I realize I can probably use a Runspace pipeline to get the information I want using Powershell but that feels really hacky
04:23:41FromDiscord<impbox [ftsf]> could use just use CreateProcess from window api?
04:24:02FromDiscord<impbox [ftsf]> or CreatePipe
04:24:06FromDiscord<impbox [ftsf]> rather than trying to use CLR
04:24:47FromDiscord<KimJongUnstoppable> CreateProcess might work
04:25:46FromDiscord<KimJongUnstoppable> I haven't used it in nim / winim before though. I'm assuming there's a way to call that somewhere in winim/lean or winim/mean?
04:26:04FromDiscord<Yardanico> what exactly do you want to do?
04:26:19FromDiscord<impbox [ftsf]> you could just use osproc startProcess
04:26:26FromDiscord<impbox [ftsf]> instead of making it windows specific
04:26:33FromDiscord<impbox [ftsf]> but yeah, depends what you want to do
04:26:36FromDiscord<KimJongUnstoppable> Start another application if it's not running already. Checking to see if it's running isn't necessary, because if it's running it shouldn't run twice, but I need to pass commandline args to it
04:26:52FromDiscord<impbox [ftsf]> https://nim-lang.org/docs/osproc.html is the place to go
04:26:55FromDiscord<Yardanico> In reply to @KimJongUnstoppable "Start another application if": yeah, you certainly don't need clr for that
04:26:59FromDiscord<impbox [ftsf]> no need to care about windows
04:27:03FromDiscord<KimJongUnstoppable> Awesome, thank you both
04:27:04FromDiscord<Yardanico> but you might need winim
04:27:17FromDiscord<Yardanico> i don't think nim stdlib has a proc to check if something is running with a specific pid
04:27:24FromDiscord<impbox [ftsf]> "Checking to see if it's running isn't necessary"
04:27:59FromDiscord<KimJongUnstoppable> My thought process through this has been extravagant (check if its running, uptime, etc from windows) and has whittled its way down to "just bruteforce the app launch and let it fail if it's still running" lol
04:27:59FromDiscord<impbox [ftsf]> osproc.startProcess
04:28:00FromDiscord<Yardanico> oh then you just use osproc, yeah
04:28:14FromDiscord<KimJongUnstoppable> Cool, really appreciate the advice
04:28:16FromDiscord<KimJongUnstoppable> thank you both
04:47:55FromDiscord<retkid> so i have a server but i also have a bunch of functions that the server uses
04:48:16FromDiscord<retkid> does it make sense to put the functions in a separate file called "ServerNamelib"
04:48:27FromDiscord<retkid> or should i just make due with 400 lines of fluff
04:49:34FromDiscord<enthus1ast> i like and do both
04:50:02FromDiscord<retkid> personally my brain tells me to make it separate i dunno
04:50:21FromDiscord<retkid> API fetching code is verbose
04:51:17FromDiscord<impbox [ftsf]> i like having everything in one file unless it's going to be used by different apps
04:51:33FromDiscord<impbox [ftsf]> then split out stuff that would be used by multiple apps to a separate nim file they can both import
04:51:53FromDiscord<impbox [ftsf]> easier to jump around inside one file than jump around between files
04:52:02FromDiscord<retkid> apart from some math stuff i ported from other languages i dont think I'll have a use for it
04:52:05FromDiscord<enthus1ast> when its so verbose, maybe you can make it denser with eg template, macros or (custom) pragmas
04:52:13FromDiscord<retkid> well its just
04:52:17FromDiscord<retkid> lemme show you
04:52:38FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/897345994134528050/unknown.png
04:52:39FromDiscord<retkid> stuff like this
04:52:40FromDiscord<retkid> annoys me
04:52:56FromDiscord<retkid> I dont like looking at it lol
04:53:23FromDiscord<impbox [ftsf]> is it just json?
04:53:29FromDiscord<impbox [ftsf]> put it in a json file and read it
04:53:29FromDiscord<retkid> but its really big and ugly
04:53:41FromDiscord<retkid> easier to just keep it int he code
04:53:43FromDiscord<impbox [ftsf]> then you can edit the json without recompiling
04:53:50FromDiscord<Yardanico> yeah
04:53:56FromDiscord<Yardanico> and then use strutils.formats
04:53:57FromDiscord<Yardanico> (edit) "strutils.formats" => "strutils.format"
04:54:03FromDiscord<Yardanico> to insert needed dynamic stuff like the query
04:54:03FromDiscord<Rika> What is that?
04:54:16FromDiscord<Yardanico> In reply to @Rika "What is that?": https://nim-lang.org/docs/strutils.html#format%2Cstring%2Cvarargs%5Bstring%2C%5D
04:54:21FromDiscord<Yardanico> the %
04:54:21FromDiscord<Rika> No
04:54:26FromDiscord<Rika> Not what I mean
04:54:30FromDiscord<Rika> The json body
04:54:34FromDiscord<Rika> What is that supposed to be
04:54:41FromDiscord<retkid> why does it annoy me?
04:54:44FromDiscord<impbox [ftsf]> nutrients
04:54:46FromDiscord<retkid> or why does it look like that man?
04:54:52FromDiscord<retkid> thats how the api wants me to do shit
04:54:54FromDiscord<retkid> dont complain at me
04:54:57FromDiscord<Rika> No I mean what is it
04:54:59FromDiscord<Rika> Okay
04:55:14FromDiscord<retkid> oh its just accessing a neutritional database
04:55:16FromDiscord<retkid> (edit) "neutritional" => "nutritional"
04:55:24FromDiscord<retkid> they wont let me download it
04:55:28FromDiscord<impbox [ftsf]> steal all their nutrients
04:55:32FromDiscord<retkid> basically
04:55:43FromDiscord<enthus1ast> a nutritional database \:)
04:55:51FromDiscord<enthus1ast> sounds familiar \:)
04:55:53FromDiscord<retkid> yummy
04:56:03FromDiscord<retkid> im using www.foodrepo.org
04:56:07FromDiscord<enthus1ast> are you english speaking? US even?
04:56:17FromDiscord<enthus1ast> ah
04:56:18FromDiscord<retkid> I am yes
04:56:18FromDiscord<enthus1ast> ok
04:56:25FromDiscord<retkid> but im not doing FDA because that stuff is nonsense
04:56:39FromDiscord<enthus1ast> ah i see
04:56:49FromDiscord<retkid> dunno just didn't like it lol
04:57:01NimEventerNew thread by Jorjun_arch: GPU leverage , see https://forum.nim-lang.org/t/8494
04:57:13FromDiscord<retkid> CUDA time
04:57:18FromDiscord<enthus1ast> i also """bought""" a german food database with nim ;)
04:57:29FromDiscord<retkid> """BOUGHT?"""
04:57:45FromDiscord<retkid> you can just pay for one
04:57:53FromDiscord<retkid> specifically from germany
04:58:11FromDiscord<retkid> It would be cool of walmart or tesco let me just ping into theirs and steal it all
04:58:16FromDiscord<retkid> life would be a lot easier
04:58:19FromDiscord<enthus1ast> bought with programming time i mean
04:58:24FromDiscord<retkid> ah
04:58:31FromDiscord<retkid> time == money
04:58:36FromDiscord<enthus1ast> yes \:)
04:58:37FromDiscord<retkid> (edit)
04:59:33FromDiscord<enthus1ast> maybe you can combine the idea from @impbox [ftsf] with yours
04:59:56FromDiscord<enthus1ast> maybe during development have it as a json file, then when its done, staticRead it into your executable
05:00:09FromDiscord<retkid> i just dont have a need for that
05:00:27FromDiscord<retkid> im not trying to ping this api all the time so im making my own database from their database
05:00:31FromDiscord<retkid> so its like a compile time thing
05:01:13FromDiscord<enthus1ast> do you build the client api from the json with macros?
05:01:22FromDiscord<enthus1ast> like json schema or so?
05:01:34FromDiscord<retkid> the client api isn't written yet
05:01:37FromDiscord<impbox [ftsf]> or just leave it as is
05:01:39FromDiscord<retkid> server is being worked on
05:01:55FromDiscord<impbox [ftsf]> doesn't seem like a big problem
05:01:56FromDiscord<retkid> i plan to just communicate to my sever via json files
05:02:07FromDiscord<impbox [ftsf]> solve it with your editor
05:02:23FromDiscord<retkid> i could just hide the function unless i need to edit the json
05:02:37FromDiscord<impbox [ftsf]> or just jump over them unless you need to look at them
05:03:07FromDiscord<impbox [ftsf]> also that's a huge font!
05:03:13FromDiscord<retkid> im blind
05:03:17FromDiscord<impbox [ftsf]> fair
05:03:52FromDiscord<retkid> think my inteliji is larger even
05:10:25FromDiscord<enthus1ast> @retkid\: they have json dumps (\~4 years old though) on their github https://github.com/digitalepidemiologylab/foodrepo_api/tree/master/data
05:18:34FromDiscord<retkid> In reply to @enthus1ast "<@217459674700578816>\: they have json": 4 year old json dumps are suboptimal
05:18:49FromDiscord<retkid> seeing as how its community driven and theres no way to really know how big the DB is now
05:19:06FromDiscord<retkid> it says like 744K but who actually knows
05:21:28FromDiscord<enthus1ast> But could serve as a starting point
05:21:49FromDiscord<enthus1ast> And you can see the db structure
05:23:06FromDiscord<enthus1ast> Then you also could do a json to sql conversion (for the schema) https://www.convertjson.com/json-to-sql.htm
05:23:43FromDiscord<enthus1ast> I've build my nutrition db this way
05:27:40FromDiscord<Rainbow Asteroids> how long have y'all been hiding `nim secret` from me
05:27:56FromDiscord<impbox [ftsf]> ssh
05:28:09FromDiscord<Rika> Itā€™s a secret
05:28:13FromDiscord<enthus1ast> i like to use inim if i want to have a repl
05:28:37FromDiscord<Rainbow Asteroids> it wasn't much of a secret because pressing shift+enter in vscode automatically opens it up
05:29:13FromDiscord<NullCode> https://media.discordapp.net/attachments/371759389889003532/897355200900239360/unknown.png
05:29:16FromDiscord<NullCode> what the fuck thats cool
05:29:43FromDiscord<enthus1ast> but it is very limited as its just the nim vm
05:29:59FromDiscord<NullCode> i see
05:30:09FromDiscord<enthus1ast> in constrast to inim, which compiles in the background (but is slower)
05:30:10FromDiscord<impbox [ftsf]> great as a calculator
05:30:27FromDiscord<enthus1ast> qalc ftw ;)
05:30:33FromDiscord<impbox [ftsf]> or expression checker
05:31:00FromDiscord<impbox [ftsf]> except with nim syntax
05:45:15FromDiscord<Rika> I use speedcrunch for calculation
05:48:55FromDiscord<enthus1ast> nice
05:51:04FromDiscord<retkid> I nim is cool
05:51:09FromDiscord<retkid> (edit) "I nim" => "Inim"
05:51:23FromDiscord<retkid> i use it when i have to use [x .. y]
05:51:27FromDiscord<retkid> because i cant wrap my head around that
06:12:23*max22- joined #nim
06:34:38*Mister_Magister quit (*.net *.split)
06:34:39*nisstyre quit (*.net *.split)
06:34:39*systemdsucks quit (*.net *.split)
06:34:39*FromDiscord quit (*.net *.split)
06:34:39*Freneticks quit (*.net *.split)
06:34:39*mst quit (*.net *.split)
06:37:45*PMunch joined #nim
06:56:18*Mister_Magister joined #nim
06:56:18*nisstyre joined #nim
06:56:18*systemdsucks joined #nim
06:56:18*FromDiscord joined #nim
06:56:18*Freneticks joined #nim
06:56:18*mst joined #nim
07:36:58*Gustavo6046 quit (Ping timeout: 252 seconds)
07:38:15*Gustavo6046 joined #nim
07:57:59*Vladar joined #nim
08:01:27FromDiscord<Yardanico> heh https://github.com/qb-0/NimbleImGui
08:01:29nrds<R2D299> itHub: 7"ImGui Interface for Nimble"
08:01:32FromDiscord<Yardanico> nice little thingie
08:02:35FromDiscord<Yardanico> although glfw's transparency doesn't really work (maybe it only works under wayland, not sure)
08:02:51FromDiscord<Yardanico> so instead of nice transparent window you get this https://media.discordapp.net/attachments/371759389889003532/897393863453470760/unknown.png
08:08:28*nicoty joined #nim
08:14:05*Guest84 joined #nim
08:14:50*Guest84 quit (Client Quit)
08:15:01*Guest4439 joined #nim
08:15:10*Guest4439 quit (Client Quit)
08:16:32*nicoty left #nim (#nim)
08:22:34*cvemys joined #nim
08:34:29*Guest9067 joined #nim
08:35:13*Guest9067 quit (Client Quit)
08:37:31PMunchHmm, interesting. Installed latest devel and echo seems a bit broken
08:38:01PMunchhttp://ix.io/3Bv5
08:44:21FromDiscord<sheldon> ䷎
08:45:43FromDiscord<Yardanico> In reply to @PMunch "Hmm, interesting. Installed latest": oof, report that
08:51:43*cvemys quit (Ping timeout: 252 seconds)
08:53:53*cvemys joined #nim
08:54:16PMunchHmm, can't quite manage to reproduce it..
08:54:32PMunchI mean it happens ever time in this specific project
08:54:45PMunchBut getting a smaller case is hard..
09:27:56PMunch@Yardanico, turned out to be something completely different once I managed to boil it down: https://github.com/nim-lang/Nim/issues/18986
09:48:01FromDiscord<baalajimaestro> I checked out nim supports M1 but when I tried to install with choosenim, I got an error saying choosenim isn't supported for macosx\_arm
09:51:27FromDiscord<Rika> Nim does, choose Nim probably doesnā€™t for now
09:51:34FromDiscord<Rika> You will need to manually install
09:53:39FromDiscord<baalajimaestro> Manually in the sense, compile from sources?
09:59:43FromDiscord<Rika> Not sure but there should be releases in the GitHub releases page
10:01:20FromDiscord<xflywind> https://nim-lang.org/install.html
10:01:29FromDiscord<xflywind> https://github.com/nim-lang/nightlies/releases
10:02:45FromDiscord<baalajimaestro> The one on nim-lang.com points to installation with brew while i am against using it
10:04:39FromDiscord<pietroppeter> In reply to @baalajimaestro "I checked out nim": I followed this to use Nim on a M1: https://forum.nim-lang.org/t/8181#52631
10:04:52FromDiscord<xflywind> In reply to @baalajimaestro "The one on nim-lang.com": well, there are releases on that page if you scroll it
10:05:08FromDiscord<baalajimaestro> sent a code paste, see https://play.nim-lang.org/#ix=3Bvt
10:05:41FromDiscord<xflywind> https://media.discordapp.net/attachments/371759389889003532/897424777910829077/unknown.png
10:05:57FromDiscord<baalajimaestro> which page?
10:06:13FromDiscord<xflywind> https://nim-lang.org/install.html
10:06:33FromDiscord<Rika> Seems like you do have to build from source for M1?
10:06:36FromDiscord<baalajimaestro> Exact issue is Darwin arm64 binary being unavailable
10:06:50FromDiscord<baalajimaestro> Ummm looks like yea
10:07:01FromDiscord<baalajimaestro> Ill try following what @pietroppeter said
10:23:04*cvemys quit (Ping timeout: 252 seconds)
10:35:43*Vladar quit (Ping timeout: 252 seconds)
10:37:24*arkurious joined #nim
11:18:12*NeoCron joined #nim
11:20:16FromDiscord<dom96> In reply to @baalajimaestro "I checked out nim": This should have been fixed
11:20:42FromDiscord<dom96> Can you have a look at the bash script and see why it fails? Would appreciated it šŸ™‚
11:21:23FromDiscord<baalajimaestro> You mean choosenim?
11:21:50FromDiscord<dom96> Yep
11:22:09FromDiscord<dom96> The init.sh script should install the amd64 choosenim binary
11:25:51FromDiscord<baalajimaestro> while i actually prefer it to install the arm64 variant
11:26:14FromDiscord<baalajimaestro> Tho rosetta is perfectly fine, i am preferring native binaries as much as i can
11:26:18*Vladar joined #nim
11:26:45FromDiscord<baalajimaestro> Screenshot 2021-10-12 at 4.56.27 PM.png https://media.discordapp.net/attachments/371759389889003532/897445180507037726/Screenshot_2021-10-12_at_4.56.27_PM.png
11:26:51FromDiscord<baalajimaestro> This is the exact error i get when I try using choosenim
11:27:37PMunchHmm dom, while you're here. I have a use-case that would be great for async stuff, and I was wondering how hard it would be to write an async module for it
11:28:52PMunchBasically it's a device that requires writing/reading and some special polling logic to make it work like an async thing
11:30:02PMunchI'm guessing addRead and addWrite from the asyncdispatch module would be the key to make this work
11:40:34*Vladar quit (Ping timeout: 252 seconds)
11:44:26FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3BvP
11:44:30FromDiscord<Yardanico> it should compile pretty quickly on an m1 mac
11:47:14FromDiscord<dom96> In reply to @baalajimaestro "Screenshot 2021-10-12 at 4.56.27": Hm. Guess my fix failed šŸ™‚
11:50:00*Vladar joined #nim
11:50:52FromDiscord<baalajimaestro> yep it didā†µ(@Yardanico)
11:52:32FromDiscord<dom96> In reply to @PMunch "Basically it's a device": Hmm. How do you read from this device? Do you use a file descriptor?
11:53:03PMunchYes, it's a SCSI device so it's a normal file descriptor
11:53:37PMunchYou can either send commands via IOCTL, or you can write a command and then wait for it to be readable and read the result
11:54:53PMunchYou can also write a limited amount of commands simultaneously and then read them out later
11:55:28*luis_ joined #nim
11:57:48*max22- quit (Ping timeout: 268 seconds)
12:06:01*supakeen quit (Quit: WeeChat 3.3)
12:06:31*supakeen joined #nim
12:09:37FromDiscord<baalajimaestro> On adding to path, i see a reference to `~/.nimble`, is that also need aside from Nim/bin
12:09:49FromDiscord<baalajimaestro> On adding to path, i see a reference to `~/.nimble`, is that also needed aside from `Nim/bin`
12:11:35*luis_ quit (Ping timeout: 250 seconds)
12:11:53FromDiscord<Yardanico> ~/.nimble/bin is needed, yes
12:11:57FromDiscord<Yardanico> not ~/.nimble itself
12:12:04FromDiscord<Yardanico> but it'll only be required if you install some nimble package that has a binary
12:13:57*neurocyte0132889 joined #nim
12:13:57*neurocyte0132889 quit (Changing host)
12:13:57*neurocyte0132889 joined #nim
12:14:33PMunch(note that some tools install binaries and use them during compile-times, e.g. Futhark)
12:19:53FromDiscord<retkid> Is there an NLTK like thing
12:19:54FromDiscord<retkid> for nim
12:22:55FromDiscord<retkid> im not opposed to doing it in kotlin or python
12:26:36FromDiscord<dom96> PMunch: then I would encourage you to use `asyncfile` and improve it so that it's actually async šŸ™‚
12:27:08PMunchActually async?
12:27:25FromDiscord<impbox [ftsf]> aasync
12:28:40FromDiscord<impbox [ftsf]> I guess handing it off to the OS to read rather than having to do it in your app?
12:28:48FromDiscord<retkid> as opposed to that fake async
12:29:47PMunch"Handing it off to the OS" - isn't this exactly what the async library does?
12:30:23FromDiscord<impbox [ftsf]> hopefully, i'm not sure what dom96 is referring to if not that
12:31:27FromDiscord<impbox [ftsf]> https://github.com/nim-lang/Nim/issues/6054 perhaps
12:31:55FromDiscord<impbox [ftsf]> or https://github.com/nim-lang/Nim/issues/11564
12:32:34PMunchHmm
12:33:20FromDiscord<juan_carlos> Does `getAllocStats()` works with ARC/ORC ?, compiling with `-d:nimAllocStats`, but always shows `0` deallocs (but is not leaking, is simple example code).
12:34:01FromDiscord<cabboose> Itā€™s a template iirc
12:34:27FromDiscord<cabboose> So you put your code as itā€™s body and itā€™ll print the allocations on completion of the body
12:36:01FromDiscord<Yardanico> not related to nim directly, but apparently sciter's creator is in the talks with some big financial company from wall street which wants to open source sciter to use it in their projects, so there's a possibility that it'll be open sourced under some company like "sciter foundation" - https://habr.com/ru/company/ruvds/blog/565818/ (russian article, but autotranslate should do the job)
12:36:17FromDiscord<Yardanico> if that happens, sciter will instantly become one of the best choices for cross-platform desktop UIs
12:36:58FromDiscord<Yardanico> i mean, it's already popular for AV vendors (almost all of big ones use sciter including avast, norton, etc), also teamviewer uses it
12:37:07FromDiscord<Yardanico> but it's closed source at the end of the day (unless you buy a license)
12:40:58FromDiscord<juan_carlos> No, is the `proc` one, not the template one, the one that returns the `AllocStats` object. ORC makes like 16 alloc for 2 variables, I think is not reporting correctly.
12:42:24FromDiscord<xflywind> sent a code paste, see https://play.nim-lang.org/#ix=3Bwb
12:42:37FromDiscord<xflywind> maybe there some issues regarding your example
12:42:58FromDiscord<xflywind> with `nim c --gc:orc -d:nimAllocStats`, give `(allocCount: 201, deallocCount: 201)`.
12:46:56FromDiscord<cabboose> Echos and what not count too right? So maybe youā€™re getting thrown off by that?
12:58:23FromDiscord<retkid> nimpy is fucking magic
12:58:52FromDiscord<dom96> PMunch: from what I recall, asyncfile actually blocks in certain circumstances
12:58:59FromDiscord<dom96> might work for your use case though
12:59:03PMunchWell that's not great..
12:59:13PMunchI mean I could just write my own polling loop as well..
12:59:30FromDiscord<dom96> I mean you could, but why not improve the stdlib while you're at it?
12:59:35PMunchThe other thing I'm interacting with is X11, which doesn't have an async wrapper either :P
12:59:38FromDiscord<dom96> it might turn out that it works fine for what you're doing
13:02:36PMunchI think I should be able to do it with addWrite and addRead
13:02:43PMunchAnd a little bit of extra logic
13:03:59FromDiscord<satyrn> is there any difference in performance between the sort() and sorted() procs?
13:04:13FromDiscord<Yardanico> In reply to @satyrn "is there any difference": yes, sorted will be slower because it's out-of-place
13:04:22FromDiscord<satyrn> alright
13:04:29FromDiscord<Rika> extra copying for sorted
13:04:57FromDiscord<satyrn> the sequence im using is ~1.2mil strings long
13:05:30FromDiscord<Yardanico> then surely it'll be much slower
13:05:39mstPMunch: get it all working first, then consider whether you can write a small wrapper to integrate more nicely with the existing async infrea
13:05:56mstPMunch: "one bastard annoying problem at a time" tends to be a good rule :D
13:06:09PMunchmst, I have the interaction working with ioctl
13:06:29PMunchBut to make it async I need to split it into read and write with polling
13:06:47PMunchAnd I think I can do it with async and a bit of logic
13:06:58PMunchOtherwise I'll have to essentially build my own async system..
13:07:27mstworst case scenario, you could offload it to a separate thread and have the read/write/poll stuff be internal comms
13:08:02mstI've seen that done for name resolution because the POSIX APIs are kinda resistant to async
13:08:25PMunchYeah, that's always an option
13:08:44mstI'm not saying it's a perfect option
13:09:07mstonly that it might be a good way to hack sync code into an otherwise async system while you test everything else
13:09:13PMunchBasically the goal here is to handle the X11 loop until the epaper display is ready for another update, then push the cumulated changes while processing further X11 events
13:09:17mstand then you can do things better as a later step
13:10:09mstnote: I like async systems, but I also skew pragmatist over purist, and I don't mind interim nasty hacks while I fix my other mistakes
13:10:34PMunchObviously, a hack is nice to get a proof of concept
13:11:21mstalso when I'm trying to make two complicated things talk to each other, interim hacks to avoid half the problems while I work on the other half are *great*
13:24:04*ox is now known as oz
13:27:37FromDiscord<Kiloneie> Any macro guys know my issue here ? im learning D:ā†µhttps://play.nim-lang.org/#ix=3Bwr
13:28:52FromDiscord<Yardanico> uhm
13:28:55FromDiscord<Yardanico> what is this macro supposed to do?
13:29:10FromDiscord<Kiloneie> just a + b for integers and float
13:29:16FromDiscord<Kiloneie> but float isnt working
13:29:19FromDiscord<Yardanico> but that's not a macro's job, is it
13:29:23FromDiscord<Kiloneie> idk
13:29:31FromDiscord<enthus1ast> first, change the return to typed, then create a literal
13:29:34FromDiscord<Yardanico> your "echo sumMacro(1, 4)" will just make
13:29:36FromDiscord<Yardanico> "echo 1 + 4"
13:29:57FromDiscord<Kiloneie> ? it outputs 5
13:30:03FromDiscord<Yardanico> read what I wrote
13:30:12PMunchWhat is your goal here?
13:30:21FromDiscord<Yardanico> in `echo sumMacro(1, 4)` sumMacro will be expanded into `1 + 4` so you get `echo 1 + 4`
13:30:31FromDiscord<Yardanico> I mean, it's a macro, but I just don't see what you're trying to do with it
13:30:46FromDiscord<Yardanico> if you want to calculate values right in the macro, that's not the way to do it, as you're effectively outputting the same AST you got
13:32:08PMuncha.intVal <- extracts the integer from an intLit node. Then you do newIntLitNode with the value, which just creates a new one..
13:32:19FromDiscord<Kiloneie> how do you do it then ? im just trying to make a macro that works for any type a + b that simple
13:32:28FromDiscord<Yardanico> but what do you want it to do?
13:32:30FromDiscord<Yardanico> calculate a + b?
13:32:34FromDiscord<Yardanico> at compile time?
13:32:37FromDiscord<Kiloneie> yes
13:33:10FromDiscord<Yardanico> you can just go by the path of least resistancve
13:33:12FromDiscord<Yardanico> (edit) "resistancve" => "resistance"
13:33:30FromDiscord<Yardanico> :D
13:33:34FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Bwt
13:34:15PMunchAlternatively: https://play.nim-lang.org/#ix=3Bwu
13:34:24FromDiscord<Yardanico> yeah, that's actually better
13:34:40FromDiscord<Yardanico> as my macro will error out if you have something that can't be summed at compile-time
13:35:49PMunchI mean mine will too
13:35:58FromDiscord<Yardanico> well, but the error will be better at least :P
13:36:20FromDiscord<Kiloneie> okay, but, i still don't know why my weirdo macro works for integers but at floats it just oO
13:36:39FromDiscord<Yardanico> because you're getting a float64
13:36:39PMunchThe one you wrote can do 1 + 0.5 though, mine won't do that *shrugs*
13:36:40FromDiscord<Yardanico> not float
13:36:46FromDiscord<Kiloneie> oh
13:36:53FromDiscord<Kiloneie> i nnever checked the result...
13:37:02FromDiscord<Yardanico> you should've checked $a.getTypeInst :)
13:37:10FromDiscord<Kiloneie> yeh...
13:37:28FromDiscord<Kiloneie> i just assumed that since integer is usually int64 that float would also..
13:37:32FromDiscord<Kiloneie> <.<
13:38:18FromDiscord<Kiloneie> Thanks, now i can proceed with whatever the hell im getting at
13:38:46FromDiscord<Yardanico> In reply to @Kiloneie "i just assumed that": `int` in Nim is architecture-dependent - it's 32-bit on 32-bit architectures but 64-bit on 64-bit architectures
13:38:51FromDiscord<Yardanico> `float` on the other hand always defaults to `float64`
13:39:03FromDiscord<Kiloneie> okay
13:39:06nrds<Prestige99> Why is that? (the latter)
13:39:10FromDiscord<Kiloneie> didn't know that part
13:39:58FromDiscord<Yardanico> @Prestige I think it's because floats aren't really tied to the typical architecture bitness (float vs double), but I don't really know a lot of it
13:40:08FromDiscord<Yardanico> maybe someone who knows a bit about CPUs can explain :D
13:40:22FromDiscord<dom96> > I think I should be able to do it with addWrite and addRead
13:40:29FromDiscord<dom96> PMunch: yes, but then you're just reimplementing asyncfile
13:40:44FromDiscord<dom96> asyncfile already does this on fds
13:41:29FromDiscord<Kiloneie> looking at the manual, float says Default floating point type, that's all it says, echoing float gives float, echoing float.type gives float, echoing float.type.repr gives float, so yeah never seen float64 like that before
13:43:37*Vladar quit (Remote host closed the connection)
13:46:40FromDiscord<Yardanico> @PMunch btw, does futhark work with headers that include other headers? also does it correctly understand text replacement #define s?
13:52:12PMunchYes, and yes
13:52:28*xet7 quit (Quit: Leaving)
13:52:30FromDiscord<Yardanico> hmm i'll try it with sciter's headers to see how far it goes
13:52:40PMunchBy default it doesn't define import anything further than one level which isn't explicitly used though
13:52:59FromDiscord<Yardanico> right now I'm getting weird Fatal: 'limits.h' file not found though
13:53:04FromDiscord<Yardanico> even though I added /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include
13:53:07FromDiscord<Yardanico> as absPath
13:53:12PMunchTry adding include-fixed as well
13:53:23PMunchAt least on my system that was a thing
13:53:31FromDiscord<Yardanico> include-fixed ?
13:53:48FromDiscord<Yardanico> ah the directory
13:53:52PMunchYup
13:53:58*xet7 joined #nim
13:54:08FromDiscord<Yardanico> yeah that brings it further and it actually errors out in header code :)
13:54:17PMunchWhat's the error?
13:54:32*Vladar joined #nim
13:54:48FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/897482434285830154/unknown.png
13:55:16PMunchAah..
13:55:25FromDiscord<Yardanico> does it understand definitions like that? https://media.discordapp.net/attachments/371759389889003532/897482593145061396/unknown.png
13:55:44PMunchIt should
13:56:18PMunchBut it probably created `importc: "som_asset_t"` instead of `importc: "struct som_asset_h"`
13:57:26PMunchOr something along those lines..
13:57:39PMunchDo you have a link to the Sciter C API and a small C sample I can try and port?
13:59:29PMunchI've gotta run, but if you do have something I can try just create an issue on GitHub and I'll have a look :)
13:59:44FromDiscord<Yardanico> okay :)
13:59:47*PMunch quit (Quit: leaving)
14:08:25FromDiscord<retkid> is nimpy dependency independent?
14:08:40FromDiscord<Yardanico> what?
14:08:58*max22- joined #nim
14:09:03FromDiscord<Yardanico> if you mean nim dependencies, it only uses nim stdlib
14:09:07FromDiscord<Yardanico> but it requires CPython to be available of course
14:09:11FromDiscord<Yardanico> for it to work
14:09:12FromDiscord<retkid> no i mean when import a library
14:09:13FromDiscord<retkid> from my pc
14:09:30FromDiscord<retkid> if i distribute it do i have to make sure they have the same modules
14:09:47FromDiscord<retkid> or is the python in the machine code?
14:10:19FromDiscord<Yardanico> In reply to @retkid "if i distribute it": same python modules, yes
14:10:31FromDiscord<Yardanico> In reply to @retkid "or is the python": no, it's not a part of the resulting nim binary
14:10:37FromDiscord<retkid> ah
14:10:43FromDiscord<retkid> welpppp
14:12:18FromDiscord<retkid> wonder if you could use cython to get it into the binary somehow
14:12:48FromDiscord<retkid> If they could they probably would've done it by now
14:12:53FromDiscord<retkid> dunno
14:25:53*kayabaNerve joined #nim
14:26:22*kayabaNerve_ quit (Ping timeout: 260 seconds)
14:27:47FromDiscord<Yardanico> fun stuff
14:27:51FromDiscord<Yardanico> sent a long message, see http://ix.io/3BwK
14:27:59FromDiscord<Yardanico> maybe it hits some recursive loop inside, idk
15:09:46FromDiscord<NullCode> man battalarm was a big success
15:09:52FromDiscord<NullCode> atleast for me
15:10:00FromDiscord<NullCode> so whats happening here
15:16:34FromDiscord<Qaz> I'm trying to import `osproc` but doing that results in getting `Error: VM does not support 'cast' from tyPointer to tyProc`, what am I doing wrong?
15:16:59FromDiscord<enthus1ast> where do you do this?
15:17:10FromDiscord<Qaz> in the second line
15:17:33FromDiscord<enthus1ast> in a normal nim file?
15:17:45FromDiscord<Qaz> sent a code paste, see https://play.nim-lang.org/#ix=3Bxv
15:17:46FromDiscord<Qaz> In reply to @enthus1ast "in a normal nim": Yes
15:18:00FromDiscord<Qaz> (edit) "Yes" => "`.nims`"
15:18:10FromDiscord<Qaz> Should I use `.nim`?
15:18:12FromDiscord<enthus1ast> nims is a nim script file
15:18:17FromDiscord<enthus1ast> yes
15:19:53FromDiscord<Qaz> Thanks!
15:20:10FromDiscord<enthus1ast> np
15:20:21FromDiscord<gerwy> anyone knows what happens to simd and threads when compiled using `-d:emscripten` ?
15:20:48FromDiscord<Qaz> In reply to @enthus1ast "np": I just tried nim today and it looks pretty nice
15:22:20FromDiscord<Qaz> I wanted to create a program that produced a slim, stand-alone executable so using kotlin wasn't really an option.
15:22:33FromDiscord<Qaz> Kotlin/Native performance is still pretty bad
15:25:20FromDiscord<Qaz> In reply to @enthus1ast "np": Is it possible to specify types for variables?
15:25:38FromDiscord<enthus1ast> sure
15:25:45FromDiscord<enthus1ast> var foo\: string
15:25:56FromDiscord<enthus1ast> you should read through the manual, though
15:26:22FromDiscord<Qaz> oh it's lowercase
15:26:23FromDiscord<Yardanico> @Qaz it's better if you read the https://narimiran.github.io/nim-basics/ and then nim tutorials
15:26:49FromDiscord<Qaz> (edit) "lowercase" => "lowercase, it was a typo"
15:26:59FromDiscord<Qaz> In reply to @Yardanico "<@!275948425126871041> it's better if": I'll do
15:35:04FromDiscord<NullCode> can you link nim tutorials
15:35:09FromDiscord<NullCode> i already read nim basics
15:36:30FromDiscord<Qaz> In reply to @Yardanico "<@!275948425126871041> it's better if": I can't seem to find how to remove elements from sequences
15:36:43FromDiscord<Yardanico> delete
15:36:52FromDiscord<Yardanico> https://nim-lang.org/docs/system.html#delete%2Cseq%5BT%5D%2CNatural
15:37:14FromDiscord<Yardanico> or https://nim-lang.org/docs/system.html#del%2Cseq%5BT%5D%2CNatural if you don't need to preserve the order
15:37:32FromDiscord<NullCode> In reply to @Qaz "I can't seem to": `seq.delete index`
15:37:43FromDiscord<NullCode> man how i love the universal proc calling
15:37:52FromDiscord<NullCode> wait whats it called
15:38:15FromDiscord<Yardanico> MCS in Nim
15:38:18FromDiscord<Yardanico> UFCS in D
15:38:45FromDiscord<NullCode> ah right
15:38:50FromDiscord<NullCode> universal func call syntax
15:38:55FromDiscord<Yardanico> method call syntax
15:39:04FromDiscord<NullCode> thats for nim?
15:39:05FromDiscord<NullCode> oh
15:42:47*luis_ joined #nim
15:44:15FromDiscord<Qaz> sent a code paste, see https://play.nim-lang.org/#ix=3BxK
15:44:34FromDiscord<Qaz> (edit) "https://play.nim-lang.org/#ix=3BxK" => "https://play.nim-lang.org/#ix=3BxL"
15:45:18FromDiscord<Yardanico> just saying that this won't work anyway as you're removing elements while iterating over the seq
15:45:29FromDiscord<Yardanico> so your `i` will be wrong after your first removal
15:45:49FromDiscord<Yardanico> where do you get that seq from? usually you can detect empty lines before adding them to the seq
15:46:14FromDiscord<Qaz> In reply to @Yardanico "where do you get": `let outp: string = execProcess("choco", args=["list", "-lo"], options={poUsePath}).strip()`
15:46:20FromDiscord<Yardanico> oh, like that
15:46:27FromDiscord<Yardanico> (btw, "string" here as a type is optional)
15:46:44FromDiscord<Yardanico> and then you split?
15:47:01FromDiscord<Qaz> In reply to @Yardanico "(btw, "string" here as": I know but I'm just adding while I'm learning to make sure I understand what is in each type
15:47:05FromDiscord<Qaz> In reply to @Yardanico "and then you split?": Yes
15:47:23FromDiscord<Qaz> (edit) "type" => "variable"
15:47:28FromDiscord<Yardanico> did you declare your seq `var` or `let` btw?
15:47:32FromDiscord<Qaz> let
15:47:38FromDiscord<Yardanico> `let` in Nim is immutable, it's not like in TypeScript or JavaScript
15:47:47FromDiscord<Yardanico> it's better to read nim basics as it explains those things too
15:47:52FromDiscord<Yardanico> var - runtime value, mutable
15:47:55FromDiscord<Yardanico> let - runtime, immutable
15:47:58FromDiscord<Qaz> In reply to @Yardanico "`let` in Nim is": I know, but I thought it's references could be mutated
15:47:58FromDiscord<Yardanico> const - compile time, immutable
15:48:05FromDiscord<Qaz> In reply to @Qaz "I know, but I": Like kotlin
15:48:05FromDiscord<Yardanico> sequences are value types in Nim
15:48:11FromDiscord<NullCode> In reply to @Qaz "I'm getting `type mismatch:": var a = 0ā†µvar len = lines.lenā†µfor ab in 0 .. lines.len:
15:48:21FromDiscord<Qaz> (edit) "kotlin" => "JVM languages"
15:48:36FromDiscord<Yardanico> Nim is pretty different from JVM as most basic types aren't boxed
15:48:50FromDiscord<Yardanico> they're value types (like int or bool), seq and strings also act like value types although they're not internally
15:49:34FromDiscord<NullCode> kinda lazy idea
15:49:35FromDiscord<NullCode> sent a code paste, see https://play.nim-lang.org/#ix=3BxN
15:49:51FromDiscord<Yardanico> nonono, why
15:50:05FromDiscord<NullCode> dude my brain thinks of the worst possible methods
15:50:07FromDiscord<NullCode> but hey they work
15:50:14FromDiscord<Yardanico> if you want to stick to your way of removing post-adding one way would be to `let noEmptyLines = lines.filterIt(it != "")` with `import std/sequtils`
15:50:37FromDiscord<Yardanico> yes, that'll involve creating a new seq
15:50:39FromDiscord<Qaz> In reply to @NullCode "dude my brain thinks": I'm just thinking `list.filter { it != "" }`
15:50:44FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3BxO
15:50:51FromDiscord<Rika> In reply to @Qaz "I'm just thinking `list.filter": you can do that
15:50:54FromDiscord<Rika> in sequtils
15:50:56FromDiscord<Yardanico> as I just showed
15:50:57FromDiscord<Yardanico> rika
15:51:04FromDiscord<Qaz> In reply to @Rika "you can do that": Nice
15:51:05FromDiscord<Rika> didnt realise
15:51:09FromDiscord<Yardanico> In reply to @NullCode "but hey they work": @Qaz
15:51:09FromDiscord<Rika> not in code block
15:51:14FromDiscord<Qaz> In reply to @Yardanico "<@!275948425126871041>": Yes?
15:51:14FromDiscord<Yardanico> In reply to @Yardanico "if you want to": @Qaz
15:51:20FromDiscord<Yardanico> did you skip that message? :D
15:51:41FromDiscord<Yardanico> https://nim-lang.org/docs/sequtils.html#filterIt.t%2Cuntyped%2Cuntyped
15:51:44FromDiscord<NullCode> In reply to @Yardanico "if you want to": i havent looked at sequtils closely enough
15:51:48FromDiscord<NullCode> damn it
15:51:59FromDiscord<Qaz> In reply to @Yardanico "did you skip that": I didn't see it
15:52:07FromDiscord<NullCode> will i continue to be such a noob at nim lmfao
15:52:18FromDiscord<Rika> yes if you dont read anything
15:52:21FromDiscord<Rika> or code anything
15:54:27FromDiscord<NullCode> In reply to @Rika "yes if you dont": indeed
15:54:31FromDiscord<NullCode> i need to read harder
15:54:35FromDiscord<NullCode> and no not joking
15:54:40FromDiscord<Rika> no you need to read thoroughly
15:54:43FromDiscord<NullCode> dk how else to phrase it
15:54:48FromDiscord<NullCode> In reply to @Rika "no you need to": yeah that
15:59:21FromDiscord<NullCode> `welcome to humiliating oneself - featuring NullCode`
15:59:38FromDiscord<NullCode> I'm gonna catch retkid's anxiety if i keep talking here
15:59:39FromDiscord<NullCode> cya
16:00:08FromDiscord<Rika> man fuck that all of us were at your point
16:00:20FromDiscord<Rika> its just that for my case i didnt chat here until i was pretty competent alreaady
16:15:59*luis_ quit (Ping timeout: 250 seconds)
16:23:28*stkrdknmibalz quit (Ping timeout: 265 seconds)
16:45:26FromDiscord<whisperdev> I am thinking about serving lots of pictures and occasionally gifs and videos on low resource VMs.Would Nim be ideal for that or Go is more mature for this?
16:49:36nrds<Prestige99> Like a webserver that streams files? My first thought was jester but it looks like there's an issue about this.. https://github.com/dom96/jester/issues/181
17:06:09*redj quit (Ping timeout: 265 seconds)
17:06:43*redj joined #nim
17:07:33FromDiscord<treeform> Does any one know what can cause c source files to not cache.
17:08:03FromDiscord<treeform> I am looking at `{.compile: bearCodecPath & "ccopy.c".}`
17:08:23FromDiscord<treeform> for other `{.compile` C files usually cache too well
17:08:32FromDiscord<treeform> but for some reason for this library they don't
17:08:56FromDiscord<treeform> its not using any config.nims which might contain a -f switch
17:09:03FromDiscord<treeform> but I just don't know what to look for
17:09:07FromDiscord<treeform> any one had issues like that?
17:13:11FromDiscord<juan_carlos> c preprocessor ?
17:27:35FromDiscord<treeform> but how can it change the files?
17:29:15*pro joined #nim
18:22:50*pro quit (Quit: WeeChat 3.3)
18:23:17FromDiscord<sealmove> Since Nim exposes its AST to the user, it is safe to assume a tool like C# Roslyn would be quite easy to implement? Then we can start getting awesome IDE features?
18:25:02FromDiscord<haxscramper> no, it is not safe to assume
18:25:37FromDiscord<haxscramper> roslyn uses CAAS architecture and generally was designed with incremental IDE analysis in mind
18:26:20FromDiscord<haxscramper> Exposure of the AST via macros has nothing to do with quality of the tooling
18:26:47FromDiscord<haxscramper> `import compiler` is also possible, but it only allows for external static code analysis tools like haxdoc etc.
18:37:36*Gustavo6046 quit (Ping timeout: 245 seconds)
18:54:38*max22- quit (Remote host closed the connection)
18:56:23FromDiscord<sealmove> hmm
18:59:25FromDiscord<haxscramper> IC would allow "awesome IDE features", like working autocomplete for example
19:02:19*max22- joined #nim
19:16:00*PMunch joined #nim
19:36:57FromDiscord<exelotl> oh, I found the answer to the bitwise XOR equivalent I was looking for the other day
19:37:11FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3Bz0
19:48:01*Gustavo6046 joined #nim
19:48:30*Figworm quit (Quit: Figworm)
19:57:28*FromDiscord quit (Remote host closed the connection)
19:57:42*FromDiscord joined #nim
20:07:18nrds<Prestige99> Is there a proper way to have a nil-able proc as a property other than creating a ref object that has an update proc as a property?
20:07:26nrds<Prestige99> maybe would be easier to expalin with code
20:07:33nrds<Prestige99> explain*
20:10:20nrds<Prestige99> https://play.nim-lang.org/#ix=3Bz9 I can do it like this with an option but it feels messy
20:12:20FromDiscord<Elegantbeef> Procs are nilable by default
20:13:02nrds<Prestige99> well hell I didn't know that :P
20:13:30FromDiscord<Elegantbeef> they're a pointer type in this context
20:15:36*Vladar quit (Quit: Leaving)
20:17:32FromDiscord<tandy> what type is this? {"x"\: "y", ...}
20:17:43FromDiscord<tandy> openArray[(string, string)]?
20:17:51FromDiscord<Elegantbeef> An `array[len, (string, string)]`
20:17:53FromDiscord<tandy> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/897578756540071946): what type is this? `{"x": "y", ...}`
20:17:55FromDiscord<ynfle (ynfle)> Ya
20:17:58FromDiscord<tandy> ohhh
20:18:20FromDiscord<Elegantbeef> the table constructor is a shorthand to an array of tuples
20:19:25FromDiscord<ynfle (ynfle)> Is there a way to programmatically get the hints and warnings from the compiler? `nimsuggest`?
20:20:01FromDiscord<Elegantbeef> Yea nimsuggest might be the way if you want to give a line/column and get back a hint/warning
20:20:16FromDiscord<Elegantbeef> Otherwise `nim check`
20:39:06FromDiscord<tandy> `cannot generate VM code for len`
20:39:35FromDiscord<ynfle (ynfle)> What are you trying to do?
20:40:23FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3Bzg
20:40:33FromDiscord<tandy> tryin to store http headers in a nice way
20:41:34FromDiscord<ynfle (ynfle)> arrays have to have a compile time proc
20:41:48FromDiscord<ynfle (ynfle)> Have a generic param
20:42:01FromDiscord<tandy> how?
20:42:16FromDiscord<ynfle (ynfle)> Do you know the len before hand?
20:43:07FromDiscord<tandy> no sadly, it could be 1 or 2
20:43:10FromDiscord<Elegantbeef> use a `seq[(string, string)]` and do `@{"a": "b", "c": "d"}`
20:43:31FromDiscord<Elegantbeef> the `len` was just due to me not knowing your array entries so just gave a pseudo size
20:43:49FromDiscord<Elegantbeef> array's need a compile time known length and if yours is dynamically sized used a seq
20:44:20FromDiscord<ynfle (ynfle)> Or you can use Json
20:44:33FromDiscord<tandy> this is nice ty
20:44:34FromDiscord<Elegantbeef> I hate you and everything you stand for ynfle
20:44:39FromDiscord<tandy> lmao
20:45:20FromDiscord<Elegantbeef> Using json for this is like using a rocketship to deliver pizza
20:46:16FromDiscord<ynfle (ynfle)> Something elon musk would do to show off
20:46:24FromDiscord<ynfle (ynfle)> So ynfle == elonMush
20:46:28FromDiscord<Elegantbeef> And if elon does it you know you shouldnt do it
20:46:30FromDiscord<ynfle (ynfle)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/897586020097359913): So ynfle == elonMusK
20:46:33FromDiscord<ynfle (ynfle)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/897586020097359913): So ynfle == elonMusk
20:46:46FromDiscord<ynfle (ynfle)> What? Become a billionare?
20:47:08FromDiscord<Elegantbeef> Exactly
20:48:13FromDiscord<ynfle (ynfle)> Y not?
20:48:21FromDiscord<ynfle (ynfle)> Then nim could get some funding
20:48:31FromDiscord<ynfle (ynfle)> And we'll become what rust should've been
20:49:29FromDiscord<ynfle (ynfle)> beef, what do I stand for that you hate?
20:49:57FromDiscord<Elegantbeef> Using json for a problem that it isnt needed
20:51:23FromDiscord<ynfle (ynfle)> It's just easy to work with
21:18:13*PMunch quit (Quit: leaving)
21:26:30FromDiscord<reilly> sent a code paste, see https://play.nim-lang.org/#ix=3Bzr
21:30:34FromDiscord<reilly> Right, so, imports with quotes aren't exactly "search in the same folder," but honestly, that shouldn't matter. I have the INCLUDE path set, so why is it not working?
21:51:31FromDiscord<reilly> Specifying the directory with the `-I` flag also does not do anything.
21:53:09FromDiscord<impbox [ftsf]> Are you using it with `--passC:-I< include path>` ?
21:59:45FromDiscord<reilly> In reply to @impbox "Are you using it": `nim c --cc:clang --passC:"-I/Users/reillymoore/Documents/Repos/nanolab-gui/gui/lib" ./src/gui.nim`
22:00:57NimEventerNew thread by Swend: Child process shows exit code -1 when peeked, though it has definitely ended., see https://forum.nim-lang.org/t/8495
22:19:34*pch_ quit (Ping timeout: 260 seconds)
23:04:25*max22- quit (Remote host closed the connection)