00:09:30 | nrds | <Prestige99> I guess so Yard, but there's been an effort to create a standard |
00:09:44 | nrds | <Prestige99> I think github is one of the few that doesn't follow the newline "standard" |
00:10:50 | nrds | <Prestige99> I use sembr to write so it's slightly annoying (https://sembr.org/) |
01:01:29 | FromDiscord | <satyrn> how would i use newAsyncHttpClient() to get the contents of multiple websites asynchronously |
01:13:48 | FromDiscord | <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:07 | FromDiscord | <Gumber> ugh ssl is such a pain to get working on windows |
02:50:21 | FromDiscord | <Gumber> no idea why the nim client won't connect |
02:50:39 | FromDiscord | <Gumber> and Nim basically logs nothing just silently crashes |
02:54:33 | FromDiscord | <exelotl> Someone really wrote an RFC for when to press enter š
|
02:56:25 | FromDiscord | <impbox [ftsf]> with no effect |
03:05:09 | FromDiscord | <Gumber> okay sweet - no idea what I was doing wrong but the ssl socket stuff is working now yay |
03:05:23 | FromDiscord | <Gumber> https://media.discordapp.net/attachments/371759389889003532/897319006573297684/unknown.png |
03:06:14 | FromDiscord | <Gumber> I guess that's not really visible - oh well |
03:07:03 | FromDiscord | <satyrn> how would i check if a website is online without getting content |
03:07:36 | FromDiscord | <satyrn> nvm im sumb |
03:07:38 | FromDiscord | <satyrn> (edit) "sumb" => "dumb" |
03:12:05 | FromDiscord | <impbox [ftsf]> there's a HTTP HEAD request |
03:33:35 | FromDiscord | <Rika> Ping? |
03:36:07 | FromDiscord | <Yardanico> In reply to @Rika "Ping?": http head is exactly "http head" for websites |
03:36:15 | FromDiscord | <Yardanico> if you ping the IP you'll not be checking website availability |
03:36:22 | FromDiscord | <Yardanico> since it can resolve to cloudflare or some other CDN or some shared web hosting |
03:36:24 | FromDiscord | <Rika> Iām not replying to imp |
03:36:30 | FromDiscord | <Yardanico> oh, then why ping? :D |
03:36:31 | FromDiscord | <Rika> I guess so |
03:36:54 | FromDiscord | <Rika> In reply to @Yardanico "since it can resolve": That could still mean the site is āavailableā though |
03:37:00 | FromDiscord | <Rika> Sure I guess a head request will work |
03:37:11 | FromDiscord | <Rika> Implementing ping in code is harder anyway |
03:38:44 | FromDiscord | <Yardanico> In reply to @Rika "That could still mean": not really |
03:38:54 | FromDiscord | <Yardanico> what if it was banned on the shared hosting or cloudflare stopped serving it |
03:39:06 | FromDiscord | <Yardanico> also it can be offline and cloudflare shows you the "live view" page |
03:39:09 | FromDiscord | <Rika> In reply to @Rika "Sure I guess a": Yeah I got that after I sent this |
03:39:24 | FromDiscord | <Rika> You can argue the live view page is available |
03:39:28 | FromDiscord | <Rika> Depending on the website |
03:50:15 | FromDiscord | <satyrn> how would i check if an entire string is alphanumeric |
03:50:28 | FromDiscord | <satyrn> the isAlphaNumeric proc is only for characters so |
03:50:41 | FromDiscord | <Rika> Iterate over the string and you get characters |
03:54:49 | FromDiscord | <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:10 | FromDiscord | <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:10 | FromDiscord | <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:54 | FromDiscord | <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:04 | FromDiscord | <KimJongUnstoppable> (edit) "ProcessStartInfo?" => "ProcessStartInfo from the windows API?" |
04:19:00 | FromDiscord | <impbox [ftsf]> what have you tried and what happens? |
04:21:59 | FromDiscord | <KimJongUnstoppable> sent a long message, see http://ix.io/3BuC |
04:22:57 | FromDiscord | <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:41 | FromDiscord | <impbox [ftsf]> could use just use CreateProcess from window api? |
04:24:02 | FromDiscord | <impbox [ftsf]> or CreatePipe |
04:24:06 | FromDiscord | <impbox [ftsf]> rather than trying to use CLR |
04:24:47 | FromDiscord | <KimJongUnstoppable> CreateProcess might work |
04:25:46 | FromDiscord | <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:04 | FromDiscord | <Yardanico> what exactly do you want to do? |
04:26:19 | FromDiscord | <impbox [ftsf]> you could just use osproc startProcess |
04:26:26 | FromDiscord | <impbox [ftsf]> instead of making it windows specific |
04:26:33 | FromDiscord | <impbox [ftsf]> but yeah, depends what you want to do |
04:26:36 | FromDiscord | <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:52 | FromDiscord | <impbox [ftsf]> https://nim-lang.org/docs/osproc.html is the place to go |
04:26:55 | FromDiscord | <Yardanico> In reply to @KimJongUnstoppable "Start another application if": yeah, you certainly don't need clr for that |
04:26:59 | FromDiscord | <impbox [ftsf]> no need to care about windows |
04:27:03 | FromDiscord | <KimJongUnstoppable> Awesome, thank you both |
04:27:04 | FromDiscord | <Yardanico> but you might need winim |
04:27:17 | FromDiscord | <Yardanico> i don't think nim stdlib has a proc to check if something is running with a specific pid |
04:27:24 | FromDiscord | <impbox [ftsf]> "Checking to see if it's running isn't necessary" |
04:27:59 | FromDiscord | <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:59 | FromDiscord | <impbox [ftsf]> osproc.startProcess |
04:28:00 | FromDiscord | <Yardanico> oh then you just use osproc, yeah |
04:28:14 | FromDiscord | <KimJongUnstoppable> Cool, really appreciate the advice |
04:28:16 | FromDiscord | <KimJongUnstoppable> thank you both |
04:47:55 | FromDiscord | <retkid> so i have a server but i also have a bunch of functions that the server uses |
04:48:16 | FromDiscord | <retkid> does it make sense to put the functions in a separate file called "ServerNamelib" |
04:48:27 | FromDiscord | <retkid> or should i just make due with 400 lines of fluff |
04:49:34 | FromDiscord | <enthus1ast> i like and do both |
04:50:02 | FromDiscord | <retkid> personally my brain tells me to make it separate i dunno |
04:50:21 | FromDiscord | <retkid> API fetching code is verbose |
04:51:17 | FromDiscord | <impbox [ftsf]> i like having everything in one file unless it's going to be used by different apps |
04:51:33 | FromDiscord | <impbox [ftsf]> then split out stuff that would be used by multiple apps to a separate nim file they can both import |
04:51:53 | FromDiscord | <impbox [ftsf]> easier to jump around inside one file than jump around between files |
04:52:02 | FromDiscord | <retkid> apart from some math stuff i ported from other languages i dont think I'll have a use for it |
04:52:05 | FromDiscord | <enthus1ast> when its so verbose, maybe you can make it denser with eg template, macros or (custom) pragmas |
04:52:13 | FromDiscord | <retkid> well its just |
04:52:17 | FromDiscord | <retkid> lemme show you |
04:52:38 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/897345994134528050/unknown.png |
04:52:39 | FromDiscord | <retkid> stuff like this |
04:52:40 | FromDiscord | <retkid> annoys me |
04:52:56 | FromDiscord | <retkid> I dont like looking at it lol |
04:53:23 | FromDiscord | <impbox [ftsf]> is it just json? |
04:53:29 | FromDiscord | <impbox [ftsf]> put it in a json file and read it |
04:53:29 | FromDiscord | <retkid> but its really big and ugly |
04:53:41 | FromDiscord | <retkid> easier to just keep it int he code |
04:53:43 | FromDiscord | <impbox [ftsf]> then you can edit the json without recompiling |
04:53:50 | FromDiscord | <Yardanico> yeah |
04:53:56 | FromDiscord | <Yardanico> and then use strutils.formats |
04:53:57 | FromDiscord | <Yardanico> (edit) "strutils.formats" => "strutils.format" |
04:54:03 | FromDiscord | <Yardanico> to insert needed dynamic stuff like the query |
04:54:03 | FromDiscord | <Rika> What is that? |
04:54:16 | FromDiscord | <Yardanico> In reply to @Rika "What is that?": https://nim-lang.org/docs/strutils.html#format%2Cstring%2Cvarargs%5Bstring%2C%5D |
04:54:21 | FromDiscord | <Yardanico> the % |
04:54:21 | FromDiscord | <Rika> No |
04:54:26 | FromDiscord | <Rika> Not what I mean |
04:54:30 | FromDiscord | <Rika> The json body |
04:54:34 | FromDiscord | <Rika> What is that supposed to be |
04:54:41 | FromDiscord | <retkid> why does it annoy me? |
04:54:44 | FromDiscord | <impbox [ftsf]> nutrients |
04:54:46 | FromDiscord | <retkid> or why does it look like that man? |
04:54:52 | FromDiscord | <retkid> thats how the api wants me to do shit |
04:54:54 | FromDiscord | <retkid> dont complain at me |
04:54:57 | FromDiscord | <Rika> No I mean what is it |
04:54:59 | FromDiscord | <Rika> Okay |
04:55:14 | FromDiscord | <retkid> oh its just accessing a neutritional database |
04:55:16 | FromDiscord | <retkid> (edit) "neutritional" => "nutritional" |
04:55:24 | FromDiscord | <retkid> they wont let me download it |
04:55:28 | FromDiscord | <impbox [ftsf]> steal all their nutrients |
04:55:32 | FromDiscord | <retkid> basically |
04:55:43 | FromDiscord | <enthus1ast> a nutritional database \:) |
04:55:51 | FromDiscord | <enthus1ast> sounds familiar \:) |
04:55:53 | FromDiscord | <retkid> yummy |
04:56:03 | FromDiscord | <retkid> im using www.foodrepo.org |
04:56:07 | FromDiscord | <enthus1ast> are you english speaking? US even? |
04:56:17 | FromDiscord | <enthus1ast> ah |
04:56:18 | FromDiscord | <retkid> I am yes |
04:56:18 | FromDiscord | <enthus1ast> ok |
04:56:25 | FromDiscord | <retkid> but im not doing FDA because that stuff is nonsense |
04:56:39 | FromDiscord | <enthus1ast> ah i see |
04:56:49 | FromDiscord | <retkid> dunno just didn't like it lol |
04:57:01 | NimEventer | New thread by Jorjun_arch: GPU leverage , see https://forum.nim-lang.org/t/8494 |
04:57:13 | FromDiscord | <retkid> CUDA time |
04:57:18 | FromDiscord | <enthus1ast> i also """bought""" a german food database with nim ;) |
04:57:29 | FromDiscord | <retkid> """BOUGHT?""" |
04:57:45 | FromDiscord | <retkid> you can just pay for one |
04:57:53 | FromDiscord | <retkid> specifically from germany |
04:58:11 | FromDiscord | <retkid> It would be cool of walmart or tesco let me just ping into theirs and steal it all |
04:58:16 | FromDiscord | <retkid> life would be a lot easier |
04:58:19 | FromDiscord | <enthus1ast> bought with programming time i mean |
04:58:24 | FromDiscord | <retkid> ah |
04:58:31 | FromDiscord | <retkid> time == money |
04:58:36 | FromDiscord | <enthus1ast> yes \:) |
04:58:37 | FromDiscord | <retkid> (edit) |
04:59:33 | FromDiscord | <enthus1ast> maybe you can combine the idea from @impbox [ftsf] with yours |
04:59:56 | FromDiscord | <enthus1ast> maybe during development have it as a json file, then when its done, staticRead it into your executable |
05:00:09 | FromDiscord | <retkid> i just dont have a need for that |
05:00:27 | FromDiscord | <retkid> im not trying to ping this api all the time so im making my own database from their database |
05:00:31 | FromDiscord | <retkid> so its like a compile time thing |
05:01:13 | FromDiscord | <enthus1ast> do you build the client api from the json with macros? |
05:01:22 | FromDiscord | <enthus1ast> like json schema or so? |
05:01:34 | FromDiscord | <retkid> the client api isn't written yet |
05:01:37 | FromDiscord | <impbox [ftsf]> or just leave it as is |
05:01:39 | FromDiscord | <retkid> server is being worked on |
05:01:55 | FromDiscord | <impbox [ftsf]> doesn't seem like a big problem |
05:01:56 | FromDiscord | <retkid> i plan to just communicate to my sever via json files |
05:02:07 | FromDiscord | <impbox [ftsf]> solve it with your editor |
05:02:23 | FromDiscord | <retkid> i could just hide the function unless i need to edit the json |
05:02:37 | FromDiscord | <impbox [ftsf]> or just jump over them unless you need to look at them |
05:03:07 | FromDiscord | <impbox [ftsf]> also that's a huge font! |
05:03:13 | FromDiscord | <retkid> im blind |
05:03:17 | FromDiscord | <impbox [ftsf]> fair |
05:03:52 | FromDiscord | <retkid> think my inteliji is larger even |
05:10:25 | FromDiscord | <enthus1ast> @retkid\: they have json dumps (\~4 years old though) on their github https://github.com/digitalepidemiologylab/foodrepo_api/tree/master/data |
05:18:34 | FromDiscord | <retkid> In reply to @enthus1ast "<@217459674700578816>\: they have json": 4 year old json dumps are suboptimal |
05:18:49 | FromDiscord | <retkid> seeing as how its community driven and theres no way to really know how big the DB is now |
05:19:06 | FromDiscord | <retkid> it says like 744K but who actually knows |
05:21:28 | FromDiscord | <enthus1ast> But could serve as a starting point |
05:21:49 | FromDiscord | <enthus1ast> And you can see the db structure |
05:23:06 | FromDiscord | <enthus1ast> Then you also could do a json to sql conversion (for the schema) https://www.convertjson.com/json-to-sql.htm |
05:23:43 | FromDiscord | <enthus1ast> I've build my nutrition db this way |
05:27:40 | FromDiscord | <Rainbow Asteroids> how long have y'all been hiding `nim secret` from me |
05:27:56 | FromDiscord | <impbox [ftsf]> ssh |
05:28:09 | FromDiscord | <Rika> Itās a secret |
05:28:13 | FromDiscord | <enthus1ast> i like to use inim if i want to have a repl |
05:28:37 | FromDiscord | <Rainbow Asteroids> it wasn't much of a secret because pressing shift+enter in vscode automatically opens it up |
05:29:13 | FromDiscord | <NullCode> https://media.discordapp.net/attachments/371759389889003532/897355200900239360/unknown.png |
05:29:16 | FromDiscord | <NullCode> what the fuck thats cool |
05:29:43 | FromDiscord | <enthus1ast> but it is very limited as its just the nim vm |
05:29:59 | FromDiscord | <NullCode> i see |
05:30:09 | FromDiscord | <enthus1ast> in constrast to inim, which compiles in the background (but is slower) |
05:30:10 | FromDiscord | <impbox [ftsf]> great as a calculator |
05:30:27 | FromDiscord | <enthus1ast> qalc ftw ;) |
05:30:33 | FromDiscord | <impbox [ftsf]> or expression checker |
05:31:00 | FromDiscord | <impbox [ftsf]> except with nim syntax |
05:45:15 | FromDiscord | <Rika> I use speedcrunch for calculation |
05:48:55 | FromDiscord | <enthus1ast> nice |
05:51:04 | FromDiscord | <retkid> I nim is cool |
05:51:09 | FromDiscord | <retkid> (edit) "I nim" => "Inim" |
05:51:23 | FromDiscord | <retkid> i use it when i have to use [x .. y] |
05:51:27 | FromDiscord | <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:27 | FromDiscord | <Yardanico> heh https://github.com/qb-0/NimbleImGui |
08:01:29 | nrds | <R2D299> itHub: 7"ImGui Interface for Nimble" |
08:01:32 | FromDiscord | <Yardanico> nice little thingie |
08:02:35 | FromDiscord | <Yardanico> although glfw's transparency doesn't really work (maybe it only works under wayland, not sure) |
08:02:51 | FromDiscord | <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:31 | PMunch | Hmm, interesting. Installed latest devel and echo seems a bit broken |
08:38:01 | PMunch | http://ix.io/3Bv5 |
08:44:21 | FromDiscord | <sheldon> ä· |
08:45:43 | FromDiscord | <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:16 | PMunch | Hmm, can't quite manage to reproduce it.. |
08:54:32 | PMunch | I mean it happens ever time in this specific project |
08:54:45 | PMunch | But getting a smaller case is hard.. |
09:27:56 | PMunch | @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:01 | FromDiscord | <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:27 | FromDiscord | <Rika> Nim does, choose Nim probably doesnāt for now |
09:51:34 | FromDiscord | <Rika> You will need to manually install |
09:53:39 | FromDiscord | <baalajimaestro> Manually in the sense, compile from sources? |
09:59:43 | FromDiscord | <Rika> Not sure but there should be releases in the GitHub releases page |
10:01:20 | FromDiscord | <xflywind> https://nim-lang.org/install.html |
10:01:29 | FromDiscord | <xflywind> https://github.com/nim-lang/nightlies/releases |
10:02:45 | FromDiscord | <baalajimaestro> The one on nim-lang.com points to installation with brew while i am against using it |
10:04:39 | FromDiscord | <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:52 | FromDiscord | <xflywind> In reply to @baalajimaestro "The one on nim-lang.com": well, there are releases on that page if you scroll it |
10:05:08 | FromDiscord | <baalajimaestro> sent a code paste, see https://play.nim-lang.org/#ix=3Bvt |
10:05:41 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/897424777910829077/unknown.png |
10:05:57 | FromDiscord | <baalajimaestro> which page? |
10:06:13 | FromDiscord | <xflywind> https://nim-lang.org/install.html |
10:06:33 | FromDiscord | <Rika> Seems like you do have to build from source for M1? |
10:06:36 | FromDiscord | <baalajimaestro> Exact issue is Darwin arm64 binary being unavailable |
10:06:50 | FromDiscord | <baalajimaestro> Ummm looks like yea |
10:07:01 | FromDiscord | <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:16 | FromDiscord | <dom96> In reply to @baalajimaestro "I checked out nim": This should have been fixed |
11:20:42 | FromDiscord | <dom96> Can you have a look at the bash script and see why it fails? Would appreciated it š |
11:21:23 | FromDiscord | <baalajimaestro> You mean choosenim? |
11:21:50 | FromDiscord | <dom96> Yep |
11:22:09 | FromDiscord | <dom96> The init.sh script should install the amd64 choosenim binary |
11:25:51 | FromDiscord | <baalajimaestro> while i actually prefer it to install the arm64 variant |
11:26:14 | FromDiscord | <baalajimaestro> Tho rosetta is perfectly fine, i am preferring native binaries as much as i can |
11:26:18 | * | Vladar joined #nim |
11:26:45 | FromDiscord | <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:51 | FromDiscord | <baalajimaestro> This is the exact error i get when I try using choosenim |
11:27:37 | PMunch | Hmm 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:52 | PMunch | Basically it's a device that requires writing/reading and some special polling logic to make it work like an async thing |
11:30:02 | PMunch | I'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:26 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3BvP |
11:44:30 | FromDiscord | <Yardanico> it should compile pretty quickly on an m1 mac |
11:47:14 | FromDiscord | <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:52 | FromDiscord | <baalajimaestro> yep it didāµ(@Yardanico) |
11:52:32 | FromDiscord | <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:03 | PMunch | Yes, it's a SCSI device so it's a normal file descriptor |
11:53:37 | PMunch | You 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:53 | PMunch | You 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:37 | FromDiscord | <baalajimaestro> On adding to path, i see a reference to `~/.nimble`, is that also need aside from Nim/bin |
12:09:49 | FromDiscord | <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:53 | FromDiscord | <Yardanico> ~/.nimble/bin is needed, yes |
12:11:57 | FromDiscord | <Yardanico> not ~/.nimble itself |
12:12:04 | FromDiscord | <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:33 | PMunch | (note that some tools install binaries and use them during compile-times, e.g. Futhark) |
12:19:53 | FromDiscord | <retkid> Is there an NLTK like thing |
12:19:54 | FromDiscord | <retkid> for nim |
12:22:55 | FromDiscord | <retkid> im not opposed to doing it in kotlin or python |
12:26:36 | FromDiscord | <dom96> PMunch: then I would encourage you to use `asyncfile` and improve it so that it's actually async š |
12:27:08 | PMunch | Actually async? |
12:27:25 | FromDiscord | <impbox [ftsf]> aasync |
12:28:40 | FromDiscord | <impbox [ftsf]> I guess handing it off to the OS to read rather than having to do it in your app? |
12:28:48 | FromDiscord | <retkid> as opposed to that fake async |
12:29:47 | PMunch | "Handing it off to the OS" - isn't this exactly what the async library does? |
12:30:23 | FromDiscord | <impbox [ftsf]> hopefully, i'm not sure what dom96 is referring to if not that |
12:31:27 | FromDiscord | <impbox [ftsf]> https://github.com/nim-lang/Nim/issues/6054 perhaps |
12:31:55 | FromDiscord | <impbox [ftsf]> or https://github.com/nim-lang/Nim/issues/11564 |
12:32:34 | PMunch | Hmm |
12:33:20 | FromDiscord | <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:01 | FromDiscord | <cabboose> Itās a template iirc |
12:34:27 | FromDiscord | <cabboose> So you put your code as itās body and itāll print the allocations on completion of the body |
12:36:01 | FromDiscord | <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:17 | FromDiscord | <Yardanico> if that happens, sciter will instantly become one of the best choices for cross-platform desktop UIs |
12:36:58 | FromDiscord | <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:07 | FromDiscord | <Yardanico> but it's closed source at the end of the day (unless you buy a license) |
12:40:58 | FromDiscord | <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:24 | FromDiscord | <xflywind> sent a code paste, see https://play.nim-lang.org/#ix=3Bwb |
12:42:37 | FromDiscord | <xflywind> maybe there some issues regarding your example |
12:42:58 | FromDiscord | <xflywind> with `nim c --gc:orc -d:nimAllocStats`, give `(allocCount: 201, deallocCount: 201)`. |
12:46:56 | FromDiscord | <cabboose> Echos and what not count too right? So maybe youāre getting thrown off by that? |
12:58:23 | FromDiscord | <retkid> nimpy is fucking magic |
12:58:52 | FromDiscord | <dom96> PMunch: from what I recall, asyncfile actually blocks in certain circumstances |
12:58:59 | FromDiscord | <dom96> might work for your use case though |
12:59:03 | PMunch | Well that's not great.. |
12:59:13 | PMunch | I mean I could just write my own polling loop as well.. |
12:59:30 | FromDiscord | <dom96> I mean you could, but why not improve the stdlib while you're at it? |
12:59:35 | PMunch | The other thing I'm interacting with is X11, which doesn't have an async wrapper either :P |
12:59:38 | FromDiscord | <dom96> it might turn out that it works fine for what you're doing |
13:02:36 | PMunch | I think I should be able to do it with addWrite and addRead |
13:02:43 | PMunch | And a little bit of extra logic |
13:03:59 | FromDiscord | <satyrn> is there any difference in performance between the sort() and sorted() procs? |
13:04:13 | FromDiscord | <Yardanico> In reply to @satyrn "is there any difference": yes, sorted will be slower because it's out-of-place |
13:04:22 | FromDiscord | <satyrn> alright |
13:04:29 | FromDiscord | <Rika> extra copying for sorted |
13:04:57 | FromDiscord | <satyrn> the sequence im using is ~1.2mil strings long |
13:05:30 | FromDiscord | <Yardanico> then surely it'll be much slower |
13:05:39 | mst | PMunch: 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:56 | mst | PMunch: "one bastard annoying problem at a time" tends to be a good rule :D |
13:06:09 | PMunch | mst, I have the interaction working with ioctl |
13:06:29 | PMunch | But to make it async I need to split it into read and write with polling |
13:06:47 | PMunch | And I think I can do it with async and a bit of logic |
13:06:58 | PMunch | Otherwise I'll have to essentially build my own async system.. |
13:07:27 | mst | worst case scenario, you could offload it to a separate thread and have the read/write/poll stuff be internal comms |
13:08:02 | mst | I've seen that done for name resolution because the POSIX APIs are kinda resistant to async |
13:08:25 | PMunch | Yeah, that's always an option |
13:08:44 | mst | I'm not saying it's a perfect option |
13:09:07 | mst | only that it might be a good way to hack sync code into an otherwise async system while you test everything else |
13:09:13 | PMunch | Basically 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:17 | mst | and then you can do things better as a later step |
13:10:09 | mst | note: 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:34 | PMunch | Obviously, a hack is nice to get a proof of concept |
13:11:21 | mst | also 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:37 | FromDiscord | <Kiloneie> Any macro guys know my issue here ? im learning D:āµhttps://play.nim-lang.org/#ix=3Bwr |
13:28:52 | FromDiscord | <Yardanico> uhm |
13:28:55 | FromDiscord | <Yardanico> what is this macro supposed to do? |
13:29:10 | FromDiscord | <Kiloneie> just a + b for integers and float |
13:29:16 | FromDiscord | <Kiloneie> but float isnt working |
13:29:19 | FromDiscord | <Yardanico> but that's not a macro's job, is it |
13:29:23 | FromDiscord | <Kiloneie> idk |
13:29:31 | FromDiscord | <enthus1ast> first, change the return to typed, then create a literal |
13:29:34 | FromDiscord | <Yardanico> your "echo sumMacro(1, 4)" will just make |
13:29:36 | FromDiscord | <Yardanico> "echo 1 + 4" |
13:29:57 | FromDiscord | <Kiloneie> ? it outputs 5 |
13:30:03 | FromDiscord | <Yardanico> read what I wrote |
13:30:12 | PMunch | What is your goal here? |
13:30:21 | FromDiscord | <Yardanico> in `echo sumMacro(1, 4)` sumMacro will be expanded into `1 + 4` so you get `echo 1 + 4` |
13:30:31 | FromDiscord | <Yardanico> I mean, it's a macro, but I just don't see what you're trying to do with it |
13:30:46 | FromDiscord | <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:08 | PMunch | a.intVal <- extracts the integer from an intLit node. Then you do newIntLitNode with the value, which just creates a new one.. |
13:32:19 | FromDiscord | <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:28 | FromDiscord | <Yardanico> but what do you want it to do? |
13:32:30 | FromDiscord | <Yardanico> calculate a + b? |
13:32:34 | FromDiscord | <Yardanico> at compile time? |
13:32:37 | FromDiscord | <Kiloneie> yes |
13:33:10 | FromDiscord | <Yardanico> you can just go by the path of least resistancve |
13:33:12 | FromDiscord | <Yardanico> (edit) "resistancve" => "resistance" |
13:33:30 | FromDiscord | <Yardanico> :D |
13:33:34 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Bwt |
13:34:15 | PMunch | Alternatively: https://play.nim-lang.org/#ix=3Bwu |
13:34:24 | FromDiscord | <Yardanico> yeah, that's actually better |
13:34:40 | FromDiscord | <Yardanico> as my macro will error out if you have something that can't be summed at compile-time |
13:35:49 | PMunch | I mean mine will too |
13:35:58 | FromDiscord | <Yardanico> well, but the error will be better at least :P |
13:36:20 | FromDiscord | <Kiloneie> okay, but, i still don't know why my weirdo macro works for integers but at floats it just oO |
13:36:39 | FromDiscord | <Yardanico> because you're getting a float64 |
13:36:39 | PMunch | The one you wrote can do 1 + 0.5 though, mine won't do that *shrugs* |
13:36:40 | FromDiscord | <Yardanico> not float |
13:36:46 | FromDiscord | <Kiloneie> oh |
13:36:53 | FromDiscord | <Kiloneie> i nnever checked the result... |
13:37:02 | FromDiscord | <Yardanico> you should've checked $a.getTypeInst :) |
13:37:10 | FromDiscord | <Kiloneie> yeh... |
13:37:28 | FromDiscord | <Kiloneie> i just assumed that since integer is usually int64 that float would also.. |
13:37:32 | FromDiscord | <Kiloneie> <.< |
13:38:18 | FromDiscord | <Kiloneie> Thanks, now i can proceed with whatever the hell im getting at |
13:38:46 | FromDiscord | <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:51 | FromDiscord | <Yardanico> `float` on the other hand always defaults to `float64` |
13:39:03 | FromDiscord | <Kiloneie> okay |
13:39:06 | nrds | <Prestige99> Why is that? (the latter) |
13:39:10 | FromDiscord | <Kiloneie> didn't know that part |
13:39:58 | FromDiscord | <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:08 | FromDiscord | <Yardanico> maybe someone who knows a bit about CPUs can explain :D |
13:40:22 | FromDiscord | <dom96> > I think I should be able to do it with addWrite and addRead |
13:40:29 | FromDiscord | <dom96> PMunch: yes, but then you're just reimplementing asyncfile |
13:40:44 | FromDiscord | <dom96> asyncfile already does this on fds |
13:41:29 | FromDiscord | <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:40 | FromDiscord | <Yardanico> @PMunch btw, does futhark work with headers that include other headers? also does it correctly understand text replacement #define s? |
13:52:12 | PMunch | Yes, and yes |
13:52:28 | * | xet7 quit (Quit: Leaving) |
13:52:30 | FromDiscord | <Yardanico> hmm i'll try it with sciter's headers to see how far it goes |
13:52:40 | PMunch | By default it doesn't define import anything further than one level which isn't explicitly used though |
13:52:59 | FromDiscord | <Yardanico> right now I'm getting weird Fatal: 'limits.h' file not found though |
13:53:04 | FromDiscord | <Yardanico> even though I added /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include |
13:53:07 | FromDiscord | <Yardanico> as absPath |
13:53:12 | PMunch | Try adding include-fixed as well |
13:53:23 | PMunch | At least on my system that was a thing |
13:53:31 | FromDiscord | <Yardanico> include-fixed ? |
13:53:48 | FromDiscord | <Yardanico> ah the directory |
13:53:52 | PMunch | Yup |
13:53:58 | * | xet7 joined #nim |
13:54:08 | FromDiscord | <Yardanico> yeah that brings it further and it actually errors out in header code :) |
13:54:17 | PMunch | What's the error? |
13:54:32 | * | Vladar joined #nim |
13:54:48 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/897482434285830154/unknown.png |
13:55:16 | PMunch | Aah.. |
13:55:25 | FromDiscord | <Yardanico> does it understand definitions like that? https://media.discordapp.net/attachments/371759389889003532/897482593145061396/unknown.png |
13:55:44 | PMunch | It should |
13:56:18 | PMunch | But it probably created `importc: "som_asset_t"` instead of `importc: "struct som_asset_h"` |
13:57:26 | PMunch | Or something along those lines.. |
13:57:39 | PMunch | Do you have a link to the Sciter C API and a small C sample I can try and port? |
13:59:29 | PMunch | I'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:44 | FromDiscord | <Yardanico> okay :) |
13:59:47 | * | PMunch quit (Quit: leaving) |
14:08:25 | FromDiscord | <retkid> is nimpy dependency independent? |
14:08:40 | FromDiscord | <Yardanico> what? |
14:08:58 | * | max22- joined #nim |
14:09:03 | FromDiscord | <Yardanico> if you mean nim dependencies, it only uses nim stdlib |
14:09:07 | FromDiscord | <Yardanico> but it requires CPython to be available of course |
14:09:11 | FromDiscord | <Yardanico> for it to work |
14:09:12 | FromDiscord | <retkid> no i mean when import a library |
14:09:13 | FromDiscord | <retkid> from my pc |
14:09:30 | FromDiscord | <retkid> if i distribute it do i have to make sure they have the same modules |
14:09:47 | FromDiscord | <retkid> or is the python in the machine code? |
14:10:19 | FromDiscord | <Yardanico> In reply to @retkid "if i distribute it": same python modules, yes |
14:10:31 | FromDiscord | <Yardanico> In reply to @retkid "or is the python": no, it's not a part of the resulting nim binary |
14:10:37 | FromDiscord | <retkid> ah |
14:10:43 | FromDiscord | <retkid> welpppp |
14:12:18 | FromDiscord | <retkid> wonder if you could use cython to get it into the binary somehow |
14:12:48 | FromDiscord | <retkid> If they could they probably would've done it by now |
14:12:53 | FromDiscord | <retkid> dunno |
14:25:53 | * | kayabaNerve joined #nim |
14:26:22 | * | kayabaNerve_ quit (Ping timeout: 260 seconds) |
14:27:47 | FromDiscord | <Yardanico> fun stuff |
14:27:51 | FromDiscord | <Yardanico> sent a long message, see http://ix.io/3BwK |
14:27:59 | FromDiscord | <Yardanico> maybe it hits some recursive loop inside, idk |
15:09:46 | FromDiscord | <NullCode> man battalarm was a big success |
15:09:52 | FromDiscord | <NullCode> atleast for me |
15:10:00 | FromDiscord | <NullCode> so whats happening here |
15:16:34 | FromDiscord | <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:59 | FromDiscord | <enthus1ast> where do you do this? |
15:17:10 | FromDiscord | <Qaz> in the second line |
15:17:33 | FromDiscord | <enthus1ast> in a normal nim file? |
15:17:45 | FromDiscord | <Qaz> sent a code paste, see https://play.nim-lang.org/#ix=3Bxv |
15:17:46 | FromDiscord | <Qaz> In reply to @enthus1ast "in a normal nim": Yes |
15:18:00 | FromDiscord | <Qaz> (edit) "Yes" => "`.nims`" |
15:18:10 | FromDiscord | <Qaz> Should I use `.nim`? |
15:18:12 | FromDiscord | <enthus1ast> nims is a nim script file |
15:18:17 | FromDiscord | <enthus1ast> yes |
15:19:53 | FromDiscord | <Qaz> Thanks! |
15:20:10 | FromDiscord | <enthus1ast> np |
15:20:21 | FromDiscord | <gerwy> anyone knows what happens to simd and threads when compiled using `-d:emscripten` ? |
15:20:48 | FromDiscord | <Qaz> In reply to @enthus1ast "np": I just tried nim today and it looks pretty nice |
15:22:20 | FromDiscord | <Qaz> I wanted to create a program that produced a slim, stand-alone executable so using kotlin wasn't really an option. |
15:22:33 | FromDiscord | <Qaz> Kotlin/Native performance is still pretty bad |
15:25:20 | FromDiscord | <Qaz> In reply to @enthus1ast "np": Is it possible to specify types for variables? |
15:25:38 | FromDiscord | <enthus1ast> sure |
15:25:45 | FromDiscord | <enthus1ast> var foo\: string |
15:25:56 | FromDiscord | <enthus1ast> you should read through the manual, though |
15:26:22 | FromDiscord | <Qaz> oh it's lowercase |
15:26:23 | FromDiscord | <Yardanico> @Qaz it's better if you read the https://narimiran.github.io/nim-basics/ and then nim tutorials |
15:26:49 | FromDiscord | <Qaz> (edit) "lowercase" => "lowercase, it was a typo" |
15:26:59 | FromDiscord | <Qaz> In reply to @Yardanico "<@!275948425126871041> it's better if": I'll do |
15:35:04 | FromDiscord | <NullCode> can you link nim tutorials |
15:35:09 | FromDiscord | <NullCode> i already read nim basics |
15:36:30 | FromDiscord | <Qaz> In reply to @Yardanico "<@!275948425126871041> it's better if": I can't seem to find how to remove elements from sequences |
15:36:43 | FromDiscord | <Yardanico> delete |
15:36:52 | FromDiscord | <Yardanico> https://nim-lang.org/docs/system.html#delete%2Cseq%5BT%5D%2CNatural |
15:37:14 | FromDiscord | <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:32 | FromDiscord | <NullCode> In reply to @Qaz "I can't seem to": `seq.delete index` |
15:37:43 | FromDiscord | <NullCode> man how i love the universal proc calling |
15:37:52 | FromDiscord | <NullCode> wait whats it called |
15:38:15 | FromDiscord | <Yardanico> MCS in Nim |
15:38:18 | FromDiscord | <Yardanico> UFCS in D |
15:38:45 | FromDiscord | <NullCode> ah right |
15:38:50 | FromDiscord | <NullCode> universal func call syntax |
15:38:55 | FromDiscord | <Yardanico> method call syntax |
15:39:04 | FromDiscord | <NullCode> thats for nim? |
15:39:05 | FromDiscord | <NullCode> oh |
15:42:47 | * | luis_ joined #nim |
15:44:15 | FromDiscord | <Qaz> sent a code paste, see https://play.nim-lang.org/#ix=3BxK |
15:44:34 | FromDiscord | <Qaz> (edit) "https://play.nim-lang.org/#ix=3BxK" => "https://play.nim-lang.org/#ix=3BxL" |
15:45:18 | FromDiscord | <Yardanico> just saying that this won't work anyway as you're removing elements while iterating over the seq |
15:45:29 | FromDiscord | <Yardanico> so your `i` will be wrong after your first removal |
15:45:49 | FromDiscord | <Yardanico> where do you get that seq from? usually you can detect empty lines before adding them to the seq |
15:46:14 | FromDiscord | <Qaz> In reply to @Yardanico "where do you get": `let outp: string = execProcess("choco", args=["list", "-lo"], options={poUsePath}).strip()` |
15:46:20 | FromDiscord | <Yardanico> oh, like that |
15:46:27 | FromDiscord | <Yardanico> (btw, "string" here as a type is optional) |
15:46:44 | FromDiscord | <Yardanico> and then you split? |
15:47:01 | FromDiscord | <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:05 | FromDiscord | <Qaz> In reply to @Yardanico "and then you split?": Yes |
15:47:23 | FromDiscord | <Qaz> (edit) "type" => "variable" |
15:47:28 | FromDiscord | <Yardanico> did you declare your seq `var` or `let` btw? |
15:47:32 | FromDiscord | <Qaz> let |
15:47:38 | FromDiscord | <Yardanico> `let` in Nim is immutable, it's not like in TypeScript or JavaScript |
15:47:47 | FromDiscord | <Yardanico> it's better to read nim basics as it explains those things too |
15:47:52 | FromDiscord | <Yardanico> var - runtime value, mutable |
15:47:55 | FromDiscord | <Yardanico> let - runtime, immutable |
15:47:58 | FromDiscord | <Qaz> In reply to @Yardanico "`let` in Nim is": I know, but I thought it's references could be mutated |
15:47:58 | FromDiscord | <Yardanico> const - compile time, immutable |
15:48:05 | FromDiscord | <Qaz> In reply to @Qaz "I know, but I": Like kotlin |
15:48:05 | FromDiscord | <Yardanico> sequences are value types in Nim |
15:48:11 | FromDiscord | <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:21 | FromDiscord | <Qaz> (edit) "kotlin" => "JVM languages" |
15:48:36 | FromDiscord | <Yardanico> Nim is pretty different from JVM as most basic types aren't boxed |
15:48:50 | FromDiscord | <Yardanico> they're value types (like int or bool), seq and strings also act like value types although they're not internally |
15:49:34 | FromDiscord | <NullCode> kinda lazy idea |
15:49:35 | FromDiscord | <NullCode> sent a code paste, see https://play.nim-lang.org/#ix=3BxN |
15:49:51 | FromDiscord | <Yardanico> nonono, why |
15:50:05 | FromDiscord | <NullCode> dude my brain thinks of the worst possible methods |
15:50:07 | FromDiscord | <NullCode> but hey they work |
15:50:14 | FromDiscord | <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:37 | FromDiscord | <Yardanico> yes, that'll involve creating a new seq |
15:50:39 | FromDiscord | <Qaz> In reply to @NullCode "dude my brain thinks": I'm just thinking `list.filter { it != "" }` |
15:50:44 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3BxO |
15:50:51 | FromDiscord | <Rika> In reply to @Qaz "I'm just thinking `list.filter": you can do that |
15:50:54 | FromDiscord | <Rika> in sequtils |
15:50:56 | FromDiscord | <Yardanico> as I just showed |
15:50:57 | FromDiscord | <Yardanico> rika |
15:51:04 | FromDiscord | <Qaz> In reply to @Rika "you can do that": Nice |
15:51:05 | FromDiscord | <Rika> didnt realise |
15:51:09 | FromDiscord | <Yardanico> In reply to @NullCode "but hey they work": @Qaz |
15:51:09 | FromDiscord | <Rika> not in code block |
15:51:14 | FromDiscord | <Qaz> In reply to @Yardanico "<@!275948425126871041>": Yes? |
15:51:14 | FromDiscord | <Yardanico> In reply to @Yardanico "if you want to": @Qaz |
15:51:20 | FromDiscord | <Yardanico> did you skip that message? :D |
15:51:41 | FromDiscord | <Yardanico> https://nim-lang.org/docs/sequtils.html#filterIt.t%2Cuntyped%2Cuntyped |
15:51:44 | FromDiscord | <NullCode> In reply to @Yardanico "if you want to": i havent looked at sequtils closely enough |
15:51:48 | FromDiscord | <NullCode> damn it |
15:51:59 | FromDiscord | <Qaz> In reply to @Yardanico "did you skip that": I didn't see it |
15:52:07 | FromDiscord | <NullCode> will i continue to be such a noob at nim lmfao |
15:52:18 | FromDiscord | <Rika> yes if you dont read anything |
15:52:21 | FromDiscord | <Rika> or code anything |
15:54:27 | FromDiscord | <NullCode> In reply to @Rika "yes if you dont": indeed |
15:54:31 | FromDiscord | <NullCode> i need to read harder |
15:54:35 | FromDiscord | <NullCode> and no not joking |
15:54:40 | FromDiscord | <Rika> no you need to read thoroughly |
15:54:43 | FromDiscord | <NullCode> dk how else to phrase it |
15:54:48 | FromDiscord | <NullCode> In reply to @Rika "no you need to": yeah that |
15:59:21 | FromDiscord | <NullCode> `welcome to humiliating oneself - featuring NullCode` |
15:59:38 | FromDiscord | <NullCode> I'm gonna catch retkid's anxiety if i keep talking here |
15:59:39 | FromDiscord | <NullCode> cya |
16:00:08 | FromDiscord | <Rika> man fuck that all of us were at your point |
16:00:20 | FromDiscord | <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:26 | FromDiscord | <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:36 | nrds | <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:33 | FromDiscord | <treeform> Does any one know what can cause c source files to not cache. |
17:08:03 | FromDiscord | <treeform> I am looking at `{.compile: bearCodecPath & "ccopy.c".}` |
17:08:23 | FromDiscord | <treeform> for other `{.compile` C files usually cache too well |
17:08:32 | FromDiscord | <treeform> but for some reason for this library they don't |
17:08:56 | FromDiscord | <treeform> its not using any config.nims which might contain a -f switch |
17:09:03 | FromDiscord | <treeform> but I just don't know what to look for |
17:09:07 | FromDiscord | <treeform> any one had issues like that? |
17:13:11 | FromDiscord | <juan_carlos> c preprocessor ? |
17:27:35 | FromDiscord | <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:17 | FromDiscord | <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:02 | FromDiscord | <haxscramper> no, it is not safe to assume |
18:25:37 | FromDiscord | <haxscramper> roslyn uses CAAS architecture and generally was designed with incremental IDE analysis in mind |
18:26:20 | FromDiscord | <haxscramper> Exposure of the AST via macros has nothing to do with quality of the tooling |
18:26:47 | FromDiscord | <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:23 | FromDiscord | <sealmove> hmm |
18:59:25 | FromDiscord | <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:57 | FromDiscord | <exelotl> oh, I found the answer to the bitwise XOR equivalent I was looking for the other day |
19:37:11 | FromDiscord | <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:18 | nrds | <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:26 | nrds | <Prestige99> maybe would be easier to expalin with code |
20:07:33 | nrds | <Prestige99> explain* |
20:10:20 | nrds | <Prestige99> https://play.nim-lang.org/#ix=3Bz9 I can do it like this with an option but it feels messy |
20:12:20 | FromDiscord | <Elegantbeef> Procs are nilable by default |
20:13:02 | nrds | <Prestige99> well hell I didn't know that :P |
20:13:30 | FromDiscord | <Elegantbeef> they're a pointer type in this context |
20:15:36 | * | Vladar quit (Quit: Leaving) |
20:17:32 | FromDiscord | <tandy> what type is this? {"x"\: "y", ...} |
20:17:43 | FromDiscord | <tandy> openArray[(string, string)]? |
20:17:51 | FromDiscord | <Elegantbeef> An `array[len, (string, string)]` |
20:17:53 | FromDiscord | <tandy> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/897578756540071946): what type is this? `{"x": "y", ...}` |
20:17:55 | FromDiscord | <ynfle (ynfle)> Ya |
20:17:58 | FromDiscord | <tandy> ohhh |
20:18:20 | FromDiscord | <Elegantbeef> the table constructor is a shorthand to an array of tuples |
20:19:25 | FromDiscord | <ynfle (ynfle)> Is there a way to programmatically get the hints and warnings from the compiler? `nimsuggest`? |
20:20:01 | FromDiscord | <Elegantbeef> Yea nimsuggest might be the way if you want to give a line/column and get back a hint/warning |
20:20:16 | FromDiscord | <Elegantbeef> Otherwise `nim check` |
20:39:06 | FromDiscord | <tandy> `cannot generate VM code for len` |
20:39:35 | FromDiscord | <ynfle (ynfle)> What are you trying to do? |
20:40:23 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3Bzg |
20:40:33 | FromDiscord | <tandy> tryin to store http headers in a nice way |
20:41:34 | FromDiscord | <ynfle (ynfle)> arrays have to have a compile time proc |
20:41:48 | FromDiscord | <ynfle (ynfle)> Have a generic param |
20:42:01 | FromDiscord | <tandy> how? |
20:42:16 | FromDiscord | <ynfle (ynfle)> Do you know the len before hand? |
20:43:07 | FromDiscord | <tandy> no sadly, it could be 1 or 2 |
20:43:10 | FromDiscord | <Elegantbeef> use a `seq[(string, string)]` and do `@{"a": "b", "c": "d"}` |
20:43:31 | FromDiscord | <Elegantbeef> the `len` was just due to me not knowing your array entries so just gave a pseudo size |
20:43:49 | FromDiscord | <Elegantbeef> array's need a compile time known length and if yours is dynamically sized used a seq |
20:44:20 | FromDiscord | <ynfle (ynfle)> Or you can use Json |
20:44:33 | FromDiscord | <tandy> this is nice ty |
20:44:34 | FromDiscord | <Elegantbeef> I hate you and everything you stand for ynfle |
20:44:39 | FromDiscord | <tandy> lmao |
20:45:20 | FromDiscord | <Elegantbeef> Using json for this is like using a rocketship to deliver pizza |
20:46:16 | FromDiscord | <ynfle (ynfle)> Something elon musk would do to show off |
20:46:24 | FromDiscord | <ynfle (ynfle)> So ynfle == elonMush |
20:46:28 | FromDiscord | <Elegantbeef> And if elon does it you know you shouldnt do it |
20:46:30 | FromDiscord | <ynfle (ynfle)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/897586020097359913): So ynfle == elonMusK |
20:46:33 | FromDiscord | <ynfle (ynfle)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/897586020097359913): So ynfle == elonMusk |
20:46:46 | FromDiscord | <ynfle (ynfle)> What? Become a billionare? |
20:47:08 | FromDiscord | <Elegantbeef> Exactly |
20:48:13 | FromDiscord | <ynfle (ynfle)> Y not? |
20:48:21 | FromDiscord | <ynfle (ynfle)> Then nim could get some funding |
20:48:31 | FromDiscord | <ynfle (ynfle)> And we'll become what rust should've been |
20:49:29 | FromDiscord | <ynfle (ynfle)> beef, what do I stand for that you hate? |
20:49:57 | FromDiscord | <Elegantbeef> Using json for a problem that it isnt needed |
20:51:23 | FromDiscord | <ynfle (ynfle)> It's just easy to work with |
21:18:13 | * | PMunch quit (Quit: leaving) |
21:26:30 | FromDiscord | <reilly> sent a code paste, see https://play.nim-lang.org/#ix=3Bzr |
21:30:34 | FromDiscord | <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:31 | FromDiscord | <reilly> Specifying the directory with the `-I` flag also does not do anything. |
21:53:09 | FromDiscord | <impbox [ftsf]> Are you using it with `--passC:-I< include path>` ? |
21:59:45 | FromDiscord | <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:57 | NimEventer | New 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) |