<< 10-06-2024 >>

00:01:42*gst quit (Ping timeout: 250 seconds)
00:12:45*xet7 quit (Ping timeout: 272 seconds)
01:17:47*krux02_ quit (Remote host closed the connection)
02:28:39FromDiscord<xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=AMgNvZEW
02:30:45FromDiscord<xkonti> In reply to @xkonti "I can't find any": Ok found it after all. I was one step away. `fullSet` in `std/setutils`.
02:30:57FromDiscord<graveflo> have you tried `let a = set[1..4].high`
02:31:06FromDiscord<graveflo> oh ok nvm
02:33:33FromDiscord<basilajith> In reply to @elegantbeef "format time": This is only done after the fact, right? How can I get the current time with milliseconds?
02:34:32FromDiscord<basilajith> How can I call `now()` from `std/times` with milliseconds in the value?
02:36:58FromDiscord<ElegantBeef> In reply to @xkonti "I can't find any": Technically you can just do `let bleh = {range[1..4](1)..4}`
02:39:53FromDiscord<ElegantBeef> In reply to @basilajith "How can I call": It has milisecond https://play.nim-lang.org/#pasty=BdaNlaHb
02:39:53FromDiscord<anuke> Is there any alternative to the Nim VSCode plugins that isn't broken? I have tried the nimsaem and official ones with a variety of configuration options (lsp, nimsuggest, check/not check), and both are basically unusable. Both often crash or give out complete nonsense errors in a wide variety of situations.↵↵I'd make a bug report, but there are so many problems that I'm not even sure where to start (and it's not easy to make a minimal
02:40:26FromDiscord<graveflo> In reply to @elegantbeef "It has milisecond https://play.nim-lang.org/#pasty=": careful though. is that "in milis" or just the millisecond component of the date time
02:40:28FromDiscord<ElegantBeef> I just use kate with nimlangserver and for my projects it works fineish
02:40:47FromDiscord<xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=esyGFCOx
02:40:58FromDiscord<ElegantBeef> `const`
02:41:18FromDiscord<ElegantBeef> `const weekCount = 4i8`
02:41:56FromDiscord<ElegantBeef> Const's work silly at times
02:42:11FromDiscord<xkonti> @ElegantBeef Oh no... I guess I need to find a different approach. Can't have it constant :/
02:42:21FromDiscord<ElegantBeef> What?
02:42:37FromDiscord<xkonti> Depending on the run the range might be different.
02:42:46FromDiscord<ElegantBeef> So use an intset
02:42:49FromDiscord<basilajith> In reply to @elegantbeef "It has milisecond https://play.nim-lang.org/#pasty=": I wanted a value like this: "2024-06-04 11:05:48.791403+00"
02:42:54FromDiscord<ElegantBeef> Right so print that out
02:42:59FromDiscord<ElegantBeef> The data is there
02:43:02FromDiscord<ElegantBeef> Write your own formatter
02:43:55FromDiscord<ElegantBeef> In reply to @graveflo "careful though. is that": If you run the code you'll see it's the ms amount
02:45:11FromDiscord<basilajith> In reply to @elegantbeef "Write your own formatter": I meant, when I call `now()`, I wanted a value exactly like: "2024-06-04 11:05:48.791403+00"; this is to insert into a Postgres database.
02:45:17FromDiscord<ElegantBeef> So format it
02:45:33FromDiscord<ElegantBeef> `x.format(myFormatStringThatIncludesMS)`
02:46:17FromDiscord<anuke> In reply to @elegantbeef "I just use kate": Are there any specific configuration options I should know about to make it more... sane? I have my project defined, and yet I get random errors all over my codebase at random times with gibberish messages
02:47:06FromDiscord<ElegantBeef> Have a single entry, have the files inside the main project module graph
02:48:04FromDiscord<anuke> All the files I'm using should be in the module graph
02:48:38FromDiscord<anuke> unfortunately, https://media.discordapp.net/attachments/371759389889003532/1249555795209621675/image.png?ex=6667bb05&is=66666985&hm=4dd0dc191877b16e88848a604d5374693028ff42254c9ebd540e0332ddc7f100&
02:48:53FromDiscord<ElegantBeef> Are you using choosenim?
02:49:01FromDiscord<ElegantBeef> Supposedly choosenim causes issues
02:49:05FromDiscord<anuke> yes - is it broken there?
02:49:23FromDiscord<ElegantBeef> Supposedly the dummy file choosenim makes can cause issues with zombie processes
02:51:21FromDiscord<basilajith> In reply to @elegantbeef "`x.format(myFormatStringThatIncludesMS)`": What I wanted: 2024-06-04 11:05:48.91669+00↵↵I tried it with: `echo now().format("YYYY-MM-dd HH:mm:ss.fffff")` However it says that the `.` is invalid and that I'm not getting that "+00".
02:52:08FromDiscord<ElegantBeef> >Other strings can be inserted by putting them in ''. For example hh'->'mm will give 01->56. The following characters can be inserted without quoting them: : - ( ) / [ ] ,. A literal ' can be specified with ''.
02:52:10FromDiscord<xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=UJZrXFsx
02:52:52FromDiscord<basilajith> In reply to @elegantbeef ">Other strings can be": Do I have to escape the `.`?
02:52:59FromDiscord<ElegantBeef> Read the docs
02:53:30FromDiscord<ElegantBeef> If you cannot put `.` in make an issue and escape them
02:53:31FromDiscord<anuke> In reply to @xkonti "<@123539225919488000> This is my": Which extension do you use? Official?
02:54:39FromDiscord<xkonti> @anuke Yes. The `nim-lang.org`. Literally today I posted a video showing how to switch from choosenim to manual nim install (on Windows): https://www.youtube.com/watch?v=sT8-Oz7k-VU
02:54:55FromDiscord<anuke> I'll try that and see if it helps, thanks
02:55:07FromDiscord<basilajith> In reply to @elegantbeef "If you cannot put": When I call `now()` I get "2024-06-10T02:53:54+00:00", all I want is to add the milliseconds value to that "54" seconds.
02:59:34FromDiscord<ElegantBeef> I'll say it one final time
02:59:35FromDiscord<ElegantBeef> format it
03:01:50FromDiscord<xkonti> @basilajith This should get you started: https://nim-by-example.github.io/string_formatting/
03:02:02FromDiscord<basilajith> In reply to @elegantbeef "format it": I tried different ways from [here](https://nim-lang.org/docs/times.html#parsing-and-formatting-dates), it's still not giving me that `.`.
03:02:45FromDiscord<xkonti> @basilajith Can you share the formatting string?
03:05:05FromDiscord<xkonti> @basilajith Try wrapping the `.` with single quotes: `'.'`. Under the table there's a section about special characters:↵↵Other strings can be inserted by putting them in `''`. For example `hh'->'mm` will give `01->56`. The following characters can be inserted without quoting them: `: - ( ) / [ ] ,`. A literal `'` can be specified with `''`.
03:05:14FromDiscord<basilajith> This finally worked: `now().format(&"YYYY-MM-dd HH:mm:ss'.'ffffffzzz")`
03:05:41FromDiscord<ElegantBeef> Now make an issue that `.` needs to be escaped 😄
03:05:59FromDiscord<basilajith> ?
03:06:14FromDiscord<ElegantBeef> Nevermind
03:06:31FromDiscord<ElegantBeef> I misread it earlier
03:07:19FromDiscord<basilajith> All I was trying to emulate was Golang's `time.Now()`.
03:09:45FromDiscord<anuke> In reply to @xkonti "<@123539225919488000> This is my": Tried deleting the old Nim version installed from choosenim, applying your config and restarting, no luck. I'm still getting spurious errors, albeit different ones.
03:10:02FromDiscord<anuke> Guess I'm cursed.
03:10:19FromDiscord<xkonti> @anuke Are you on Windows or Linux?
03:10:36FromDiscord<anuke> Linux
03:11:02FromDiscord<ElegantBeef> Are you using methods?
03:11:09FromDiscord<anuke> nope
03:11:26FromDiscord<anuke> Zero methods in the entire codebase and dependency tree as far as I'm aware
03:12:09FromDiscord<xkonti> I know it's a stupid question: Is `nim --version` working for you? I wonder if there some issue with paths.
03:12:21FromDiscord<anuke> One of the errors in question↵↵This has never displayed errors before and I have had no issues with this template before, ever https://media.discordapp.net/attachments/371759389889003532/1249561763230388235/image.png?ex=6667c094&is=66666f14&hm=a0f54d1dcf35582cc0d78def8484c0a939570ca9db6fecbd0bcfb62b1ee5953b&
03:12:29FromDiscord<anuke> (it compiles fine and always has)
03:12:45FromDiscord<anuke> str is `static string`
03:12:49FromDiscord<anuke> In reply to @xkonti "I know it's a": Yes
03:13:04FromDiscord<anuke> `which nim` points to the right binary in the expected location (not choosenim's)
03:13:14FromDiscord<xkonti> I'm out of my league to help here I'm afraid 😦
03:13:24FromDiscord<anuke> sent a code paste, see https://play.nim-lang.org/#pasty=uOOuUwao
03:13:27*lucasta quit (Quit: Leaving)
03:13:33FromDiscord<anuke> In reply to @xkonti "I'm out of my": Well, thanks for helping at least!
03:14:19FromDiscord<xkonti> One thing I would probably do is to delete the `.nimble` directory and reinstall the language server after that `nimble install nimlangserver --accept`
03:15:48FromDiscord<anuke> oof, my packages
03:16:54FromDiscord<xkonti> Not sure if that would do anything though. No idea if changing Nim's version does anything to already installed packages etc.
03:19:56FromDiscord<saiplayz1138> yo
03:20:05FromDiscord<saiplayz1138> can anyone help the new guy out?
03:20:32FromDiscord<saiplayz1138> im trying to put a program i made into a webserver but dont know how to make it funciton
03:20:39FromDiscord<saiplayz1138> (edit) "funciton" => "function properly"
04:38:52FromDiscord<user2m> In reply to @saiplayz1138 "yo": any more details?
04:39:44FromDiscord<saiplayz1138> In reply to @user2m "any more details?": i was using jester but for some reason it doesnt show any website. just gives me a 404
04:40:06FromDiscord<user2m> In reply to @saiplayz1138 "i was using jester": code?
04:40:27FromDiscord<saiplayz1138> https://github.com/xytrux/Pinnim/blob/main/main.nim
04:40:41FromDiscord<saiplayz1138> keyword: WAS
04:50:49FromDiscord<user2m> In reply to @saiplayz1138 "keyword: WAS": not sure what I'm looking at here I don't see any web server code like routes, etc
04:51:47FromDiscord<saiplayz1138> oh i didnt push my changes
04:53:50FromDiscord<saiplayz1138> In reply to @user2m "not sure what I'm": check now
05:08:22FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=wxXvGUlP
05:08:57FromDiscord<user2m> (edit) "https://play.nim-lang.org/#pasty=vkcfbeGk" => "https://play.nim-lang.org/#pasty=htQVxnrR"
05:21:46FromDiscord<saiplayz1138> In reply to @user2m "1. change `/{user}` to": i know i can get mine and another users profile but nobody else
05:21:49FromDiscord<saiplayz1138> no clue why
05:23:05FromDiscord<saiplayz1138> In reply to @user2m "1. change `/{user}` to": this didnt work btw
05:23:15FromDiscord<saiplayz1138> https://clickette.net/u/vivaldi_ZYeop3bKuE.png
05:26:22FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=tRnCqcZD
05:26:31FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=tXnWlTvL
05:26:41FromDiscord<user2m> https://media.discordapp.net/attachments/371759389889003532/1249595571556057128/image.png?ex=6667e010&is=66668e90&hm=b3ffb806b6bf69d70c7da8fe6d7320eb6509b86df6f9aa1a08cb3753e482604d&
05:28:13FromDiscord<user2m> In reply to @saiplayz1138 "this didnt work btw": seems to work for me . your firewall might be blcoking access?
05:28:43FromDiscord<saiplayz1138> In reply to @user2m "seems to work for": i dont know
05:29:12FromDiscord<user2m> In reply to @saiplayz1138 "i dont know": did you compile with ssl? `nim c -r -d:ssl main.nim`
05:29:31FromDiscord<user2m> In reply to @saiplayz1138 "i dont know": what is the error msg in your terminal?
05:29:57FromDiscord<saiplayz1138> In reply to @user2m "what is the error": thats the thing
05:30:02FromDiscord<saiplayz1138> i dont get any
05:30:13FromDiscord<saiplayz1138> https://clickette.net/u/Code_y02Wt0ABOU.png
05:30:56FromDiscord<user2m> In reply to @saiplayz1138 "thats the thing": what version of nim are you running? `nim -v`
05:31:18FromDiscord<saiplayz1138> sent a code paste, see https://play.nim-lang.org/#pasty=XJNvcyws
05:33:42FromDiscord<user2m> 1. try a different browser 2. try `http://localhost:5000/xytrux`
05:34:50FromDiscord<saiplayz1138> In reply to @user2m "1. try a different": none of those works
05:37:05FromDiscord<user2m> open up the network tab in chrome dev tools in vivaldi https://media.discordapp.net/attachments/371759389889003532/1249598187316969502/image.png?ex=6667e280&is=66669100&hm=77b17d37ec518e1ef863d7f04094ccd598e20fb49a67a04304dec930e3027366&
05:37:15FromDiscord<user2m> lets see what ist's aying
05:38:15FromDiscord<saiplayz1138> https://clickette.net/u/vivaldi_TS4wjR9ynK.png
05:38:43FromDiscord<saiplayz1138> https://clickette.net/u/vivaldi_LmkwaeY6Od.png
05:39:32FromDiscord<user2m> widen up the CDT and click xytux https://media.discordapp.net/attachments/371759389889003532/1249598808380411906/image.png?ex=6667e314&is=66669194&hm=748d4945941089062193f2690b40db93ee99fd80f01418832fc47c31acf664a4&
05:41:06FromDiscord<saiplayz1138> https://clickette.net/u/vivaldi_SR5g4Jqu3d.png
05:43:29FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=wDpMRWZQ
05:44:08FromDiscord<user2m> https://media.discordapp.net/attachments/371759389889003532/1249599961067163650/image.png?ex=6667e427&is=666692a7&hm=e3a159bdbed3d31a9d31a6bfa1aa6d7a8902050d7d6bdc076724e91fb980c73d&
05:44:29FromDiscord<saiplayz1138> In reply to @user2m "try this as a": on a seperate file?
05:44:50FromDiscord<user2m> no just comment stuff out https://media.discordapp.net/attachments/371759389889003532/1249600136330346496/image.png?ex=6667e450&is=666692d0&hm=9375a6b8642fa309a5fc5abf4206cbe181a1c70e35ba9608812b1f34f4ef433c&
05:45:37FromDiscord<saiplayz1138> alr
05:46:07FromDiscord<saiplayz1138> In reply to @user2m "no just comment stuff": still nothin
05:46:58FromDiscord<saiplayz1138> weird part about is that it even prompt me for network access
05:47:02FromDiscord<saiplayz1138> and i allowed it
05:47:44FromDiscord<user2m> In reply to @saiplayz1138 "still nothin": still the 404? then it's some sort of issue with your machine. what other browser other than vivaldi did you try?
05:47:53FromDiscord<saiplayz1138> In reply to @user2m "still the 404? then": edge
05:48:01FromDiscord<saiplayz1138> i dont have any other browser installed
05:49:05FromDiscord<saiplayz1138> maybe ill try rebooting my machine and test after?
05:49:10FromDiscord<saiplayz1138> and see if that works
05:50:53FromDiscord<user2m> In reply to @saiplayz1138 "and see if that": open up power shell and try this command `Invoke-WebRequest -Uri http://127.0.0.1:5000/xytux -Method Get`
05:51:16FromDiscord<user2m> make sure your jester server is running
05:51:57FromDiscord<user2m> you should get something that looks like this https://media.discordapp.net/attachments/371759389889003532/1249601929739505715/image.png?ex=6667e5fc&is=6666947c&hm=8cf915900c4ac12b76c685c2c30e327001ca0ccaf9060246c32f05e757270177&
05:52:24FromDiscord<saiplayz1138> https://clickette.net/u/WindowsTerminal_DfQ7meRuFI.png
05:52:34FromDiscord<saiplayz1138> hm
05:52:48FromDiscord<saiplayz1138> its supposed to be running
05:52:55FromDiscord<saiplayz1138> but for some reason, its not???
05:53:33FromDiscord<user2m> In reply to @saiplayz1138 "but for some reason,": No it's runnig if it wasn't runnig the msg would be `Invoke-WebRequest : Unable to connect to the remote server`
05:54:05FromDiscord<saiplayz1138> what else could be the problem?
05:54:43FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=AWzGyMEo
05:54:52FromDiscord<saiplayz1138> so heres the thing
05:54:59FromDiscord<saiplayz1138> it already is in a seperate file
05:55:32FromDiscord<saiplayz1138> oh wait i think i may know the problem
05:56:43FromDiscord<saiplayz1138> no i dont
05:57:29FromDiscord<saiplayz1138> well if its working for other people, then i guess ill just worry about problem #2 which is
05:57:41FromDiscord<saiplayz1138> the index out of bounds error
05:58:44FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=hHHoftJS
05:59:24FromDiscord<user2m> it should look something like this https://media.discordapp.net/attachments/371759389889003532/1249603806094954507/image.png?ex=6667e7bb&is=6666963b&hm=806d7dfb6c656791cdf07f9cf57ca321872d5f7d16cd59f66ba6c9797c010cd8&
05:59:36FromDiscord<saiplayz1138> https://clickette.net/u/vivaldi_EYEn8uZ86W.png
05:59:38FromDiscord<saiplayz1138> huh...
05:59:48FromDiscord<saiplayz1138> DEBUG GET /↵DEBUG 200 OK {"content-type": @["text/html;charset=utf-8"]}↵DEBUG GET /favicon.ico↵DEBUG 404 Not Found {"content-type": @["text/html;charset=utf-8"]}
05:59:56FromDiscord<user2m> ok so iit's a port issue
06:00:06FromDiscord<user2m> you already have some process running on 5000
06:00:16FromDiscord<saiplayz1138> i guess so
06:00:36FromDiscord<saiplayz1138> so i just have to change the port
06:00:39FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=NSeJvWtn
06:01:21FromDiscord<saiplayz1138> sent a long message, see https://pasty.ee/ukSkkxtd
06:01:27FromDiscord<saiplayz1138> you forgot to declare my routeer
06:01:57FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=XeFRnwqQ
06:02:46FromDiscord<saiplayz1138> https://clickette.net/u/vivaldi_g7xIYqecc9.png
06:02:53FromDiscord<saiplayz1138> 100% a port issue then
06:04:11FromDiscord<saiplayz1138> https://clickette.net/u/vivaldi_BNdi0GqDPI.png
06:04:12FromDiscord<saiplayz1138> well there we go we figured it out
06:04:51FromDiscord<saiplayz1138> guess its time to fix error #2
06:05:06FromDiscord<user2m> In reply to @saiplayz1138 "well there we go": boom. looks like it only works for the username "xytrux" tho. not sure if tthat's on purpose
06:05:21FromDiscord<saiplayz1138> In reply to @user2m "boom. looks like it": it only works for xytrux and thrzl
06:05:28FromDiscord<saiplayz1138> dunno why it doesnt work for others
06:06:20FromDiscord<saiplayz1138> maybe you have an idea?
06:11:01FromDiscord<saiplayz1138> could it be because of rate limits? @user2m
06:14:38FromDiscord<user2m> In reply to @saiplayz1138 "could it be because": Don't think so. You're probably just parsing the html incorrectly. It's sending you html that you're assuming has some tag that it doesn't. Print out the HTML then try and paste it in a separate file to see where you're going wrong
06:14:57FromDiscord<saiplayz1138> In reply to @user2m "Don't think so. You're": I've done that already
06:15:08FromDiscord<saiplayz1138> and im pretty sure they should be correct
06:27:58FromDiscord<saiplayz1138> In reply to @user2m "Don't think so. You're": i double checked just now
06:28:16FromDiscord<saiplayz1138> and yeah, every GitHub user has the same tag/class
07:01:10*marcus quit (Remote host closed the connection)
07:03:21*marcus joined #nim
07:13:13*ntat joined #nim
07:25:25NimEventerNew thread by physicphy: Could Nim be used as the front-end for Taichi-lang?, see https://forum.nim-lang.org/t/11736
08:04:50*PMunch joined #nim
08:20:25FromDiscord<nnsee> In reply to @saiplayz1138 "and yeah, every GitHub": avoid the insanity of trying to parse HTML (which may change and break your code at any moment) and instead, use the API
08:20:49FromDiscord<nnsee> for example, to get information on an user (in an easy-to-parse, stable json format), see https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-a-user
10:16:02*ntat quit (Quit: Leaving)
10:32:11*beholders_eye joined #nim
11:14:49FromDiscord<basilajith> sent a long message, see https://pasty.ee/BpHFZwVK
11:30:59FromDiscord<basilajith> sent a code paste, see https://play.nim-lang.org/#pasty=jFMGxsAg
11:31:37FromDiscord<basilajith> The large file has 0.5 million rows and over 20 columns (a few of the columns are not relevant).
11:41:12PMunchNim is definitely up for the job. But it might be that the XML library isn't
11:41:19PMunchHow big is the file, in bytes
11:46:35FromDiscord<basilajith> In reply to @PMunch "How big is the": ~118 MB
11:47:59FromDiscord<ringabout> Perhaps you should try https://github.com/mashingan/excelin or https://github.com/khchen/xl which are more up-to-date
11:50:07*xet7 joined #nim
11:59:14FromDiscord<basilajith> I think xlsx works fine for reading the file. I think the program is taking some time to insert the values into the Postgres database (on Amazon Aurora).
12:05:29FromDiscord<rohanvashisht> I am getting error:↵↵cannot open file: pkg/cookiejar
12:05:34FromDiscord<rohanvashisht> how to fix this>
12:05:37FromDiscord<rohanvashisht> (edit) "this>" => "this?"
12:05:48*xet7 quit (Quit: Leaving)
12:08:51PMunchSeems like a bug with a package you're using
12:09:00PMunchOr you're missing something in your nimble file
12:11:57FromDiscord<rohanvashisht> I have clone this:↵https://github.com/planety/prologue
12:12:13FromDiscord<rohanvashisht> and running this example:↵https://github.com/planety/prologue/tree/devel/examples/blog
12:12:21FromDiscord<rohanvashisht> (edit) "clone" => "cloned"
12:19:04*krux02 joined #nim
12:21:14FromDiscord<nervecenter> In reply to @basilajith "I think xlsx works": You can try to batch your inserts up to a limit
12:22:08FromDiscord<basilajith> In reply to @nervecenter "You can try to": How do I do that? Within the loop? Do you have some examples to point to?
12:23:29FromDiscord<nervecenter> No examples, just logically it makes sense. Maybe have an inner loop that builds a SQL statement, and adds 1000 inserts before sending it to the server. I'm just spitballing.
12:23:59FromDiscord<nervecenter> If you're not supposed to build big SQL statements then someone let me know, I haven't done databases in some time
12:31:48*beholders_eye quit (Read error: Connection reset by peer)
12:37:29*beholders_eye joined #nim
12:39:05FromDiscord<basilajith> Yeah, I think that makes sense. What I've been doing is to begin the transaction, insert one record, end the transaction within one iteration of the loop.
12:39:43FromDiscord<basilajith> (edit) "Yeah, I think that makes sense. What I've been doing is to begin the transaction, insert one record, ... end" added "and finally"
12:40:01FromDiscord<basilajith> (edit) "is to" => "was that I"
12:41:42FromDiscord<nnsee> In reply to @rohanvashisht "and running this example:": have you executed `nimble install -d` to install prologue's dependencies?
12:42:07FromDiscord<rohanvashisht> In reply to @nnsee "have you executed `nimble": Error: Could not find a file with a .nimble extension inside the specified directory:
12:42:31FromDiscord<nnsee> well yes, you have to be in the root directory for the repo
12:42:34FromDiscord<nnsee> where the .nimble file is
12:43:31FromDiscord<rohanvashisht> I fixed that issue, installed dependencies still have this issue: Error: cannot open file: std/db_sqlite
12:44:47FromDiscord<rohanvashisht> standard library should be the part of nim itself right?
12:45:15FromDiscord<rohanvashisht> still unable to find std/db_sqlite
12:45:23FromDiscord<nnsee> run `nimble install db_connector`
12:45:39FromDiscord<nnsee> db_sqlite and the rest of db_connector cruft was moved to a separate project outside the stdlib
12:45:57FromDiscord<rohanvashisht> and is it required for me to install sql as well?
12:46:03FromDiscord<rohanvashisht> (edit) "sql" => "sqlite"
12:46:23FromDiscord<nnsee> you may need to update the `import` line as well to import `db_connector/db_sqlite` instead of `std/db_sqlite` (maybe)
12:46:27FromDiscord<nnsee> In reply to @rohanvashisht "and is it required": aye
12:50:20FromDiscord<rohanvashisht> In reply to @nnsee "aye": ok, thanks a lot, now everything is working
12:51:00FromDiscord<rohanvashisht> should I make a pr to tell them this? (about sql being shifted from std)
12:52:20FromDiscord<nnsee> did you actually have to change the import line or did it also work with std? the main problem here is that the example project doesn't have a .nimble file at all, so it doesn't declare its dependencies anywhere, and sqlite itself isn't a dependency of prologue so it doesn't get installed when you install prologue's dependencies
12:52:41FromDiscord<rohanvashisht> I had to change the import line for it to work
12:53:01FromDiscord<nnsee> definitely submit an issue on GH then, the example is outdated
12:53:06FromDiscord<rohanvashisht> Error: cannot open file: std/db_sqlite
12:53:22FromDiscord<rohanvashisht> In reply to @nnsee "definitely submit an issue": yes, I am making a pr instead 👍
12:53:26FromDiscord<nnsee> awesome
13:19:05FromDiscord<basilajith> sent a code paste, see https://play.nim-lang.org/#pasty=lgEQMiat
13:20:56FromDiscord<basilajith> Basically, I don't want the value to be in RAM while I do some evaluations.
13:21:28FromDiscord<basilajith> Should I manually/dynamically manage memory here?
13:26:37FromDiscord<nnsee> not really sure what you're trying to do here, is this for security reasons, ie is this some sort of cryptographic key that you want do zero out in memory? or is this more of a memory usage thing?
13:41:19FromDiscord<basilajith> In reply to @nnsee "not really sure what": Memory usage thing. I don't want the file to be in RAM for the time some other calculations and stuff are being done. The calculations and stuff are based on the length of the file's rows (it's an Excel file). Once those calculations are done, I need the contents of the file later.
13:44:23FromDiscord<nnsee> make a procedure that returns the length? once your `value` goes out of scope, it is freed?
13:44:34FromDiscord<demotomohiro> In reply to @basilajith "Is there some way": Put your statements under block statement or procedure.↵Heap memory used by these variable will be freed on exit the scope as long as it is not referenced by other variable outside the scope.
13:56:30FromDiscord<basilajith> 👍🏼
14:01:03*beholders_eye quit (Ping timeout: 255 seconds)
14:12:10FromDiscord<rohanvashisht> In reply to @nnsee "db_sqlite and the rest": https://github.com/planety/prologue/pull/241#issuecomment-2158295047
14:12:47*PMunch quit (Quit: Leaving)
14:15:31FromDiscord<basilajith> Is calling `-d:release` and `-d:danger` in the same build statement (nimble) necessary for good optimisation?↵↵Like this?↵`nimble build -d:release -d:danger --opt:speed -d:lto --gc:arc`
14:19:23*ntat joined #nim
14:22:22FromDiscord<Phil> In reply to @basilajith "Is calling `-d:release` and": If you go danger you do everything release does
14:22:34FromDiscord<Phil> It won't break anything but having release in there won't help either
14:22:59FromDiscord<Phil> The same might be true for opt speed, not sure
14:23:19FromDiscord<odexine> the same is true with opt speed
14:23:34FromDiscord<odexine> personally i would advise against danger
14:26:34FromDiscord<Phil> I would pull out danger when performance is so important you're counting microseconds or maybe even individual milliseconds.↵In general I think release does the job
14:30:15*dtomato quit (Quit: The Lounge - https://thelounge.chat)
14:33:21FromDiscord<odexine> i would pull out danger when safety is irrelevant
14:34:25*syl quit (Quit: C-x C-c)
14:35:08*dtomato joined #nim
14:56:23FromDiscord<ringabout> release for production, danger for microbenchmark games
14:58:43*rockcavera joined #nim
15:02:40NimEventerNew thread by kobi: Raising the IC feature again, see https://forum.nim-lang.org/t/11741
15:12:49FromDiscord<asbjorn2> What is the idiomatic way of making a copy of a `cstring`?↵↵I'm doing a lot of c++ interop, and I think that I have a problem related to the original memory of the `cstring` being freed when it goes out of scope, which it does before the thread worker (which `mmap`s a file) goes out of scope.
15:26:37*dtomato quit (Quit: The Lounge - https://thelounge.chat)
15:27:08FromDiscord<saiplayz1138> In reply to @nnsee "avoid the insanity of": using the API would require the user to use a token. which I don't want. Also, its as simple as just checking to see if the pinned repo has 0 stars
15:46:16*krux02_ joined #nim
15:47:01FromDiscord<fabric.input_output> would be cool if for `A: object`, `a: A`, `B of A`, `B(a)` would create an object `B` and copy the fields of `A` over
15:49:27*krux02 quit (Ping timeout: 272 seconds)
15:59:35FromDiscord<nervecenter> In reply to @asbjorn2 "What is the idiomatic": As I understand it, `a_foreign_string.string` does a copy to put it into a Nim fat string. So you might be able to do something like `a_foreign_string.string.cstring`.
16:06:59*beholders_eye joined #nim
16:32:59*beholders_eye quit (Ping timeout: 268 seconds)
16:47:47*disso-peach joined #nim
16:50:56*disso-peach quit (Client Quit)
16:59:59*coldfeet joined #nim
17:31:14FromDiscord<nnsee> In reply to @saiplayz1138 "using the API would": no it wouldn't? https://media.discordapp.net/attachments/371759389889003532/1249777909149859880/Screenshot_20240610-203019_Termux2.png?ex=666889e1&is=66673861&hm=e5a8dc0c9b1a1144e597cdc814495cb79e1ed213c9b8ead43dc81164e77875a7&
17:52:59*PMunch joined #nim
18:21:19*beholders_eye joined #nim
18:23:22PMunchIs there a way to work around this until it lands in the latest version? https://github.com/nim-lang/nimble/commit/ed0b6eea0c8c8db590e8e3491732cd63dec82a25
18:40:03*ntat quit (Quit: Leaving)
19:08:04FromDiscord<demotomohiro> Add `--path:/path/to/Nim`?
19:09:31FromDiscord<pmunch> Hmm, that would work?
19:14:57FromDiscord<pmunch> @ElegantBeef, just realised that pointers can't be shared in data stored in shared memory. Because each program `mmap`'s the data to a different location in their own address space
19:15:17FromDiscord<pmunch> So you'd need to offset the pointers or just use arrays and indexes
19:32:03*beholders_eye quit (Ping timeout: 256 seconds)
19:55:09*PMunch quit (Quit: leaving)
20:08:04FromDiscord<ElegantBeef> In reply to @pmunch "<@145405730571288577>, just realised that": That s why I was saying the programs might need to be a child of another program, though that still might not make the address space accessible 😄
20:08:18FromDiscord<ElegantBeef> I do not know OS memory models well enough
20:20:51FromDiscord<pmunch> Well the entire goal is to have them be separate
20:21:36FromDiscord<pmunch> Basically the reason I'm doing this is to be able to create independent programs that can pipe data through
20:21:40FromDiscord<ElegantBeef> Yea, I guess you really need to write your own allocator to do the sharing of pointers and references 😄
20:22:59FromDiscord<pmunch> Nah, I'll just say that each pipe has a type, so the entire memory region is one big ring buffer of that type
20:23:23FromDiscord<ElegantBeef> I do partially want to try replacing malloc for shits and giggles
20:23:49FromDiscord<pmunch> Haha, I mean go for it. Would be a really cool demo if nothing else
20:24:12FromDiscord<pmunch> Seamlessly share data between two independent Nim programs? How cool wouldn't that be
20:24:25FromDiscord<ElegantBeef> between any independent programs
20:24:31FromDiscord<ElegantBeef> As long as it used malloc
20:25:05FromDiscord<pmunch> Oh yeah, it wouldn't need to tie into Nims garbage collector, just malloc
20:25:09FromDiscord<pmunch> Even cooler!
20:45:23*coldfeet quit (Remote host closed the connection)
20:46:03FromDiscord<saiplayz1138> i need some help
20:46:57FromDiscord<saiplayz1138> https://github.com/xytrux/Pinnim/blob/main/main.nim↵↵i have this here code, but for some reason, when i go on the site, the json has an "@" symbol.
20:54:21FromDiscord<pmunch> Which JSON?
20:54:36FromDiscord<pmunch> There's no code to generate JSON in the snippet you shared
20:56:01FromDiscord<saiplayz1138> nevermind i managed to figure it out
21:30:39FromDiscord<saiplayz1138> anyone know how to deploy a nim project? im using jester
21:36:38*beholders_eye joined #nim
21:40:18FromDiscord<frusadev> Hey everyone. How to structure tests with nimble ?
21:54:22FromDiscord<ElegantBeef> Make a `tests` folder and start the tests with `t`
21:58:12FromDiscord<frusadev> Thanks