<< 25-09-2022 >>

01:28:47*arkurious quit (Remote host closed the connection)
01:41:23FromDiscord<peterson21> Thank me later https://t.me/+kaz97seJgx9jNTNh
01:43:45*def- quit (Quit: -)
01:43:52FromDiscord<Patitotective> In reply to @peterson21 "Thank me later https://t.me/+kaz97seJgx9jNTNh": why not now? <@&371760044473319454>
01:43:56*def- joined #nim
01:47:29FromDiscord<ChocolettePalette> > Pavel (the founder of telegram) completed a course at the department of military training, specializing in “Propaganda and psychological warfare”.↵Sounds like I should be afraid to enter my phone number to register there, what could possibly go wrong? \:/
01:49:48qwrwho knows, but telegram has very original protocol, enough NIH crypto that it feels a bit uncomfortable security wise
01:51:05NimEventerNew Nimble package! kdl - KDL document language Nim implementation, see https://github.com/Patitotective/kdl-nim
01:52:06qwrand for chatting here, old IRC can be used as well, works-for-me ;)
01:52:17FromDiscord<Elegantbeef> But but multimedia! 😛
01:56:49FromDiscord<Patitotective> In reply to @NimEventer "New Nimble package! kdl": :]
01:57:12FromDiscord<Elegantbeef> Good that you put nim in it so when we search the nimble directory we know it's a nim package
02:16:38FromDiscord<Bung> how does it look ? "field access 'result.bar' conflicts with procedure call 'bar', rename the field or call as 'bar(result,...)'"
02:22:12*wallabra quit (Ping timeout: 260 seconds)
02:35:21*rockcavera quit (Remote host closed the connection)
04:02:41FromDiscord<!&luke> What’s a good nim orm
04:02:47FromDiscord<!&luke> Other than norm
05:01:41FromDiscord<evil> sent a code paste, see https://play.nim-lang.org/#ix=4blB
05:02:11FromDiscord<Elegantbeef> You have to use allocators
05:04:44FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/BRk
05:09:48FromDiscord<Elegantbeef> To elaborate `string` is GC'd, and `cstring(myString)` does not copy it's practically `myString[0].addr`
05:10:33FromDiscord<Elegantbeef> So when you return that cstring the automatic memory management will free it basically instantly
05:22:50FromDiscord<evil> ok that makes sense, how would I cast an unchecked array when calling it through dynlib? since that type isn't available for var
05:23:08FromDiscord<Elegantbeef> It's a `ptr UncheckedArray`
05:24:01FromDiscord<Elegantbeef> If you do have a `seq[cstring]` you'd do `cast[ptr UncheckedArray](mySeq[0].addr)`
06:00:58*kenran joined #nim
07:37:48FromDiscord<xTrayambak> I fixed that bloody segfault!
07:38:24FromDiscord<xTrayambak> Turns out assigning a value `nil` isn't the best way to go around this.
07:38:33FromDiscord<xTrayambak> Especially with Python objects.
07:38:44FromDiscord<Bung> https://github.com/nim-lang/Nim/issues/10833 @ElegantBeef after my PR cause other generic test fails, I realize the problem int literal `1` should remain same , not just `system.int` , right ?
07:40:27FromDiscord<Elegantbeef> Yea static generic parameters need to be values
07:42:34FromDiscord<Bung> okay, think I'll fix it soon
07:43:07FromDiscord<Elegantbeef> And be sure to test with more complicated types like `seq[int]` `string` and custom objects
07:43:59FromDiscord<Bung> hmm, the issue example is custom type, if it works, I think others works so ?
07:44:22FromDiscord<Elegantbeef> no i mean a user defined type for the static parameter
07:45:04FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bm5
07:45:07FromDiscord<Bung> oh, I see
07:45:38FromDiscord<Elegantbeef> Nim tests are sadly purpose built for issues most of the time and do not properly test that things actually work
07:48:15FromDiscord<xTrayambak> How can I store functions in a sequence?
07:48:25FromDiscord<Elegantbeef> You just do
07:48:39FromDiscord<Elegantbeef> `seq[proc()\`
07:48:42FromDiscord<Elegantbeef> `seq[proc()]`
07:49:00FromDiscord<xTrayambak> I meant an array, sorry.
07:49:03FromDiscord<xTrayambak> My bad.
07:49:06FromDiscord<Elegantbeef> Same thing
07:49:12FromDiscord<xTrayambak> Same thing?
07:49:25FromDiscord<Elegantbeef> Yep but array and length parameter
07:50:58FromDiscord<xTrayambak> sent a code paste, see https://play.nim-lang.org/#ix=4bm6
07:51:12FromDiscord<Elegantbeef> No
07:51:21FromDiscord<Elegantbeef> Two `= seq[proc]` is incorrect
07:51:21FromDiscord<Elegantbeef> `let` is immutable for one
07:51:36FromDiscord<xTrayambak> Oh, yeah. `let` is immutable.
07:51:37FromDiscord<Elegantbeef> Three `proc` is a typeclass and not `proc()`
07:51:48FromDiscord<Elegantbeef> Four you do `.add` to add to a sequence not `[0] =`
07:52:06FromDiscord<xTrayambak> What if I want to store 256 `proc`(s) in a sequence?
07:52:21FromDiscord<xTrayambak> Does `seq.add` let me add infinite items?
07:52:54FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bm7
07:53:04FromDiscord<xTrayambak> Oh, alright.
07:53:44FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bm8
07:53:48FromDiscord<xTrayambak> Thanks.
07:54:13FromDiscord<xTrayambak> Does `seq.add` have no limit?
07:54:28FromDiscord<xTrayambak> I don't really need a 256 limit, I'm just adding it because that seems sane.
07:54:44FromDiscord<Elegantbeef> sequences are growable arrays
07:54:58FromDiscord<xTrayambak> So they aren't fixed in size at compile time?
07:55:01FromDiscord<Elegantbeef> Their limit is your memory
07:56:03FromDiscord<xTrayambak> What about `method`(s), btw?
07:56:07FromDiscord<xTrayambak> Those won't work, right?
07:56:28FromDiscord<Elegantbeef> They dont make any sense to store in a sequence, so I do not know
07:56:41FromDiscord<xTrayambak> Alright, thank you.
07:57:41FromDiscord<xTrayambak> In reply to @Elegantbeef "Their limit is your": The limit is your imagination™️
08:03:37FromDiscord<Elegantbeef> well that and 2^64 / sizeof(yourType)
08:08:45FromDiscord<ravinder387> can i compile nim's httpclient in javascript
08:08:56FromDiscord<Elegantbeef> No
08:10:27FromDiscord<Mrcool> <https://github.com/juancarlospaco/nodejs/blob/5ec588ba00f1ff1d5763ed052c4076734598c00c/src/nodejs/jsutils.nim#L21> what is the trick here with imprtcpp?
08:10:36FromDiscord<Mrcool> https://media.discordapp.net/attachments/371759389889003532/1023506795320332308/unknown.png
08:10:57FromDiscord<Mrcool> it seems like its eqivalent to importjs: "#.encode(#)"
08:11:03FromDiscord<Mrcool> (edit) "importjs: "#.encode(#)"" => "`importjs: "#.encode(#)"`"
08:11:11FromDiscord<Mrcool> (edit) "eqivalent" => "equivalent" | "equivalentto `importjs: "#.encode(#)"` ... " added "?"
08:11:13FromDiscord<Elegantbeef> Yea that's it
08:11:35FromDiscord<Mrcool> is that inteded ? what does c ++ have to do with this xD
08:11:38FromDiscord<Mrcool> (edit) "inteded" => "intended"
08:12:20FromDiscord<Elegantbeef> They're just using the importcpp mechanics for this
08:12:27FromDiscord<Elegantbeef> No clue why
08:18:06FromDiscord<Mrcool> sent a code paste, see https://play.nim-lang.org/#ix=4bmf
08:18:22FromDiscord<Elegantbeef> That code runs in docgen
08:19:35FromDiscord<Mrcool> it creates the doc, but I don't see the echo https://media.discordapp.net/attachments/371759389889003532/1023509054452146186/unknown.png https://media.discordapp.net/attachments/371759389889003532/1023509054917718016/unknown.png
08:20:05FromDiscord<Elegantbeef> No clue if it redirects it
08:20:23FromDiscord<Mrcool> I tried also doAssert 4 == 5 and I see no error
08:21:25FromDiscord<Elegantbeef> Works here
08:26:00FromDiscord<Mrcool> works now someehow
08:29:05FromDiscord<Mrcool> so runnableExamples is like a keyword that gets detected by doc ?, is there something similar for tests?
08:29:41FromDiscord<Elegantbeef> There are test libraries. Testament, balls, unittest, ....
08:30:51FromDiscord<Mrcool> I just want inline test exactly like runnableExamples, ah I thought nim wold have a test subcommand
08:32:07FromDiscord<Elegantbeef> Tests generally are not written in source files
08:32:12FromDiscord<Mrcool> What I saw is things like <https://github.com/juancarlospaco/nodejs/blob/5ec588ba00f1ff1d5763ed052c4076734598c00c/src/nodejs/jsutils.nim#L199> seems to be the inline test utility that's being used but it still feels weird that it generates docs
08:32:55FromDiscord<Elegantbeef> I mean you can use docgen for that, but yea it's code to emit tested codeblocks in the docgen
08:34:24FromDiscord<Mrcool> Ok one more thing, currently the examples are being run with node but I want to run with deno, can I configure this?
08:34:42FromDiscord<Elegantbeef> I dont know
08:34:43FromDiscord<Elegantbeef> I dont use JS
08:35:48FromDiscord<pouriya.jamshidi> hi↵do `-mm` and `-gc` flags of `nim c` command serve different purposes? ↵I am using Nim 1.7.1
08:36:05FromDiscord<Elegantbeef> gc is the new name for mm cause orc/arc arent technically GCs
08:36:15FromDiscord<Elegantbeef> i mean mm is the new name 😄
08:36:45FromDiscord<pouriya.jamshidi> interesting. in Nim 1.7.1, if you pass the mm flag, it does not apply it
08:36:58FromDiscord<pouriya.jamshidi> I was doing some benchmarks and came across this
08:36:59FromDiscord<Elegantbeef> That's a bug then
08:37:11FromDiscord<pouriya.jamshidi> I will open an issue on GitHub
08:37:18FromDiscord<Elegantbeef> Make sure you update your devel
08:37:28FromDiscord<pouriya.jamshidi> it is updated. 1.7.1
08:37:43FromDiscord<Elegantbeef> 1.6.1 means nothing
08:37:45FromDiscord<Elegantbeef> whoops
08:37:48FromDiscord<Elegantbeef> 1.7.1\
08:37:56FromDiscord<Mrcool> do you know where does nim calls node in the codebase? https://media.discordapp.net/attachments/371759389889003532/1023513674041794620/unknown.png
08:38:35FromDiscord<pouriya.jamshidi> I am running choosenim update devel everyday. I think it should be updated enough?
08:39:50FromDiscord<Elegantbeef> Yea, i was just saying that saying it's 1.7.1 means nothing 😄
08:40:44FromDiscord<pouriya.jamshidi> gotcha
08:42:41FromDiscord<flywind> In reply to @pouriya.jamshidi "interesting. in Nim 1.7.1,": Do you mean gc flags works?
08:46:13FromDiscord<flywind> Btw the devel branch has already defaulted to ORC.
08:52:53FromDiscord<flywind> In reply to @pouriya.jamshidi "hi do `-mm` and": You should pass `--mm` instead of `-mm`
08:53:29FromDiscord<flywind> `-m` somehow compiles
08:59:44FromDiscord<flywind> It does give you a warning:
08:59:47FromDiscord<flywind> `command line(1, 2) Warning: 'm' is deprecated, now a noop [Deprecated]↵command line(1, 2) Warning: 'm' is deprecated, now a noop [Deprecated]`
09:03:36*kenran quit (Quit: WeeChat info:version)
09:04:34FromDiscord<flywind> It seems that `-gc:orc` is interpreted as `-g:orc` and the parts between the first char and `:` are ignored.
09:06:50FromDiscord<pouriya.jamshidi> you are right. thanks!
09:12:50FromDiscord<Mrcool> In reply to @Mrcool "do you know where": its not currently configurable <https://github.com/nim-lang/Nim/blob/1e0165186bb8539cfd8aca1a7af8d01dc278bd46/compiler/nim.nim#L101>
09:14:50FromDiscord<flywind> Nim supports nodejs only for making testing JS code easier.
09:17:16FromDiscord<Mrcool> I think it can be made it configurable though, I have a module for deno backend and the hardcoding of node make it not testable easily
09:17:30FromDiscord<Mrcool> Also I imagine someelse might want to write bun backend
09:17:41FromDiscord<Mrcool> (edit) "backend" => "module"
09:28:38FromDiscord<Mrcool> It <https://nim-lang.org/docs/jsutils.html> not meant to depend on ? because its under private?
09:43:38FromDiscord<Mrcool> sent a code paste, see https://play.nim-lang.org/#ix=4bmt
09:45:06FromDiscord<hotdog> In reply to @Mrcool "<@472459996068839424> can I use": No that won’t work
09:46:18FromDiscord<hotdog> You could create an init proc that calls it though
09:57:22FromDiscord<Forest [She/Her]> In reply to @Mrcool "I think it can": Why not use the Node polyfills on Deno?
09:58:22FromDiscord<Mrcool> why would I do that when I can easily wrap deno apis
10:03:21FromDiscord<Forest [She/Her]> For things like `require`
10:03:39FromDiscord<Forest [She/Her]> Actually nvm i realised i was wrong lol
10:18:35FromDiscord<Mrcool> sent a code paste, see https://play.nim-lang.org/#ix=4bmy
10:20:10*arkurious joined #nim
10:22:21FromDiscord<Forest [She/Her]> Use the `static` block iirc
10:22:45FromDiscord<Forest [She/Her]> But some methods don't work at compile time, i think `echo` one of them? Can't remember
10:23:27FromDiscord<Mrcool> seems to work thanks
10:23:34FromDiscord<Forest [She/Her]> Np ^^
10:32:32FromDiscord<Rika> In reply to @Event Horizon "But some methods don't": That does work
10:32:43FromDiscord<Forest [She/Her]> Ah
10:34:17FromDiscord<Mrcool> I have , but `get` actually returns `string | undefined` https://media.discordapp.net/attachments/371759389889003532/1023542954322837554/unknown.png
10:36:09FromDiscord<Mrcool> I can see this here <https://github.com/nim-lang/Nim/blob/338d69c15ad02e528e44b332f2e4893e26450696/lib/js/jsre.nim#L40> https://media.discordapp.net/attachments/371759389889003532/1023543424579805294/unknown.png
10:36:57FromDiscord<Mrcool> but it feels like a hack
10:39:11FromDiscord<hotdog> In reply to @Mrcool "but it feels like": Probably better than having possibly-undefined values floating around in your nim code I suppose
10:39:20FromDiscord<hotdog> But let me think of an alternative
10:39:29FromDiscord<PyryTheBurger> Bruh how do i install nim on linux? choosenim failed and on manu8al installation nimble couldn't find some random libraries
10:40:15FromDiscord<Rika> Why is it failing
10:40:21FromDiscord<Rika> The first one I mean
10:40:32FromDiscord<PyryTheBurger> wiat i will paste it
10:40:54FromDiscord<PyryTheBurger> this chmod: cannot access '/tmp/choosenim-0.8.4_linux_amd64': No such file or directory
10:41:08FromDiscord<hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4bmC
10:41:52FromDiscord<hotdog> In reply to @PyryTheBurger "this chmod: cannot access": What's the output if you do `ls /tmp/choosenim` ?
10:42:18FromDiscord<PyryTheBurger> In reply to @hotdog "What's the output if": ls: cannot access '/tmp/choosenim': No such file or directory
10:43:50FromDiscord<hotdog> In reply to @PyryTheBurger "ls: cannot access '/tmp/choosenim*':": Were there any errors/warnings before the final error?
10:43:59FromDiscord<PyryTheBurger> no i dont think so
10:44:00FromDiscord<hotdog> When you run the installer I mean
10:44:27FromDiscord<PyryTheBurger> idid this command: curl https://nim-lang.org/choosenim/init.sh -sSf | sh
10:45:28FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bmD
10:50:59FromDiscord<hotdog> In reply to @PyryTheBurger "the whole output is": Do you have curl and/or wget installed?
10:51:15FromDiscord<PyryTheBurger> i think curl
10:51:55FromDiscord<hotdog> Can you run `curl -v`?
10:51:57FromDiscord<PyryTheBurger> sent a code paste, see https://paste.rs/ccx
10:52:03FromDiscord<hotdog> Ok cool
10:52:20FromDiscord<hotdog> What's the output if you run `curl -sSfL https://nim-lang.org/choosenim/stable`
10:52:36FromDiscord<PyryTheBurger> nothing
10:53:13FromDiscord<PyryTheBurger> no wait
10:53:21FromDiscord<PyryTheBurger> i think it says 0.8.4
10:53:28FromDiscord<hotdog> Ok that's good
10:53:34FromDiscord<hotdog> 1 sec
10:56:15FromDiscord<hotdog> What if you run `curl -sSfL "https://github.com/dom96/choosenim/releases/download/v0.8.4/choosenim-0.8.4_linux_amd64" -o "/tmp/choosenim-0.8.4_linux_amd64"` @PyryTheBurger
10:56:42FromDiscord<PyryTheBurger> no output
10:58:32FromDiscord<hotdog> Does it create the file in /tmp?
10:59:16FromDiscord<PyryTheBurger> what name file
10:59:35FromDiscord<PyryTheBurger> there are a bunch of files with random wierd names in here
11:00:01FromDiscord<hotdog> /tmp/choosenim-0.8.4_linux_amd64
11:00:11FromDiscord<PyryTheBurger> no
11:00:36FromDiscord<hotdog> Ok
11:00:57FromDiscord<hotdog> Something is up
11:01:59FromDiscord<hotdog> There were no errors from the curl command?
11:02:02FromDiscord<hotdog> Can you run it again?
11:02:06FromDiscord<Forest [She/Her]> If i have a method that takes `curPos: var int`, and then do `var startPos = curPos`, would that make a copy of curPos?
11:02:10FromDiscord<PyryTheBurger> no output
11:02:14FromDiscord<PyryTheBurger> no errors no nothing
11:02:17FromDiscord<Forest [She/Her]> In reply to @PyryTheBurger "no": What OS are you on? Architecture?
11:02:29FromDiscord<PyryTheBurger> kubuntu 22.04.1 i think
11:02:37FromDiscord<Forest [She/Her]> Hm, amd64?
11:02:46FromDiscord<PyryTheBurger> 64 bit yeah
11:02:52FromDiscord<PyryTheBurger> nvidia
11:02:53FromDiscord<Forest [She/Her]> Hm that's really odd then
11:03:07FromDiscord<PyryTheBurger> and intelö prcessor
11:03:10FromDiscord<hotdog> Do you have room left on the disk?
11:03:15FromDiscord<hotdog> Run `df -h`
11:03:16FromDiscord<PyryTheBurger> 431gb
11:03:31FromDiscord<hotdog> In reply to @Event Horizon "If i have a": Yea
11:03:59FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bmJ
11:04:00FromDiscord<hotdog> What if you run `echo "hello" > /tmp/test`
11:04:05FromDiscord<hotdog> Does the test file appear?
11:04:20FromDiscord<Forest [She/Her]> In reply to @hotdog "Yea": Okay good
11:04:33FromDiscord<PyryTheBurger> In reply to @hotdog "Does the test file": nope
11:04:39FromDiscord<Require Support> how to find memory leaks on nim binaries created for windows? If im too dumb to use windbg or IDA
11:04:42FromDiscord<PyryTheBurger> nvm yes it does
11:06:11FromDiscord<Require Support> (edit) "windbg or IDA" => "an actual debugger 🙂"
11:07:24FromDiscord<hotdog> @PyryTheBurger can you run `curl -L "https://github.com/dom96/choosenim/releases/download/v0.8.4/choosenim-0.8.4_linux_amd64" -o "/tmp/choosenim-0.8.4_linux_amd64"`
11:16:11FromDiscord<Mrcool> @hotdog I tried adding another method , but I get an error https://media.discordapp.net/attachments/371759389889003532/1023553497511243828/unknown.png https://media.discordapp.net/attachments/371759389889003532/1023553497934868620/unknown.png
11:19:00FromDiscord<hotdog> In reply to @Mrcool "<@472459996068839424> I tried adding": I didn't try running it my bad, try `T(o)`
11:19:55FromDiscord<hotdog> Also just my opinion but I wouldn't call it Option as that may lead to confusion with std/options, especially if they both end up used in the same module
11:23:04*jmdaemon quit (Ping timeout: 246 seconds)
11:23:56FromDiscord<Mrcool> whats the right way to write this ↵` raise newException(string, "error!")`
11:24:03FromDiscord<Mrcool> (edit) "↵` raise" => "↵`raise"
11:24:39*vicecea quit (Remote host closed the connection)
11:24:39FromDiscord<Mrcool> do I have to create a random type for it?
11:25:07*vicecea joined #nim
11:25:36FromDiscord<Mrcool> ah it seems I can use `Defect`
11:29:30FromDiscord<hotdog> In reply to @Mrcool "do I have to": Or use valueerror, ioerror etc
11:30:35FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bmP
11:30:53FromDiscord<hotdog> In reply to @PyryTheBurger "i got this as": And it definitely doesn’t write out the file?
11:31:11FromDiscord<PyryTheBurger> yup it doesnt atleast in the tmp
11:31:25FromDiscord<hotdog> Try changing it to a different dir
11:31:32FromDiscord<hotdog> And try different urls
11:31:48FromDiscord<hotdog> There’s something odd going on there you need to figure out
11:32:35FromDiscord<hotdog> Or modify the init.sh script to just use wget, if wget works on your machine
11:33:42FromDiscord<PyryTheBurger> nah i give up
12:22:19FromDiscord<PyryTheBurger> i think the problem is it doesnt hve permission
12:22:41FromDiscord<PyryTheBurger> i tried creating the directory in my tmp flder then runnning the choosenim install and it said permission denied
12:23:22FromDiscord<hotdog> In reply to @PyryTheBurger "i think the problem": But the echo test worked
12:23:29FromDiscord<PyryTheBurger> yup
12:23:46FromDiscord<hotdog> And curl should throw an error if it doesn’t have write permission
12:24:13FromDiscord<PyryTheBurger> it only threw the error if i manually created the folder in there
12:24:41FromDiscord<hotdog> What’s the error and how did you create the folder
12:25:28FromDiscord<PyryTheBurger> just went to the tmp folder and created a new folder with the name /tmp/choosenim-0.8.4_linux_amd64
12:25:40FromDiscord<PyryTheBurger> no with the name choosenim-0.8.4_linux_amd64
12:26:16FromDiscord<hotdog> And what’s the curl error
12:26:37FromDiscord<hotdog> Because if curl is trying to write a file with the same name as that folder it’s not going to work
12:26:38FromDiscord<PyryTheBurger> the error is like this: sh: 77: /tmp/choosenim-0.8.4_linux_amd64: Permission denied
12:27:14FromDiscord<PyryTheBurger> but if i didn't create that folder it complains about the folder being missing
12:27:26FromDiscord<hotdog> In reply to @PyryTheBurger "but if i didn't": Where does it complain?
12:27:46FromDiscord<hotdog> Curl is downloading a file not a folder
12:28:18FromDiscord<PyryTheBurger> it just says after the 'installing choosenim' that tmp doesn't contain a folder with that name
12:29:06FromDiscord<hotdog> In reply to @PyryTheBurger "it just says after": Does it? Can you paste the message?
12:29:47FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bn0
12:29:59FromDiscord<hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4bn1
12:30:06FromDiscord<PyryTheBurger> oh
12:30:06FromDiscord<hotdog> It’s looking for the file curl was supposed to write out
12:30:34FromDiscord<hotdog> That’s just chmod saying “there’s nothing there”
12:31:24FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bn2
12:31:59FromDiscord<hotdog> How did you create the file
12:32:20FromDiscord<PyryTheBurger> just clicked create new text file and made its name choosenim-0.8.4_linux_amd64
12:32:40FromDiscord<hotdog> Ok 😂 but that’s an empty file not the choosenim executable
12:32:46FromDiscord<PyryTheBurger> bruh
12:32:54FromDiscord<PyryTheBurger> where di u get the executable
12:33:04FromDiscord<hotdog> That’s what the curl command is doing
12:33:14FromDiscord<PyryTheBurger> wll its not doing it
12:33:15FromDiscord<hotdog> The one that’s supposed to write out that file
12:33:18FromDiscord<hotdog> Yes
12:33:28FromDiscord<hotdog> That is the problem that I said you need to figure out
12:33:45FromDiscord<hotdog> Or download it manually and follow the steps that the init.sh script does
12:34:12FromDiscord<PyryTheBurger> i tried to download it manualy and nim command worked but nimble command didnt
12:34:40FromDiscord<hotdog> In reply to @PyryTheBurger "i tried to download": What didn’t work with nimble? It’s probably a path error
12:34:54FromDiscord<hotdog> Check if the init.sh script does anything to set up the path
12:35:04FromDiscord<PyryTheBurger> i just tried nimble in the terminal and it spat out something about a missing .so file
12:35:05FromDiscord<hotdog> I’m on phone can’t check at the moment
12:35:29FromDiscord<hotdog> In reply to @PyryTheBurger "i just tried nimble": Maybe openssl?
12:35:36FromDiscord<PyryTheBurger> whta is that
12:36:41FromDiscord<hotdog> Something that nimble needs
12:36:58FromDiscord<hotdog> Was that what it was complaining about?
12:39:32FromDiscord<PyryTheBurger> lmao now it works
12:39:42FromDiscord<PyryTheBurger> its not complaining about nothing
12:41:28FromDiscord<PyryTheBurger> wiat
12:41:54FromDiscord<PyryTheBurger> when i restart my terminal the nim bin folder disappears from my path variable
12:41:55FromDiscord<PyryTheBurger> burh
12:47:43FromDiscord<hotdog> In reply to @PyryTheBurger "when i restart my": Put the modification in bashrc or similar
12:49:46FromDiscord<PyryTheBurger> /etc/bash.bashrc?
12:50:31FromDiscord<PyryTheBurger> or /home/pyryrin/.bashrc?
12:52:13FromDiscord<ChocolettePalette> Both are kinda ok but wrong, there should be a distro specific way to put more stuff into your path variable
12:53:46FromDiscord<PyryTheBurger> is that ok
12:53:48FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4bn6
12:54:10FromDiscord<Forest [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4bn7
12:55:02FromDiscord<ChocolettePalette> U sure about the quotes? I mean they could be single ticks ', you should check if yours are appropriate↵(@PyryTheBurger)
12:55:02FromDiscord<Forest [She/Her]> Since i want it to pass `a` as the first argument for `isEmptyOrWhitespace`
12:55:04FromDiscord<PyryTheBurger> In reply to @PyryTheBurger "so now my .bashrc": well, this at least seems to woek
12:56:12FromDiscord<PyryTheBurger> In reply to @ChocolettePalette "U sure about the": why not ""
12:56:13FromDiscord<Forest [She/Her]> In reply to @Event Horizon "How would i do": Maybe `case a with` would be a small macro i could make lmao
12:57:33FromDiscord<PyryTheBurger> wait but now anything else is not a pathj variable??
12:57:42FromDiscord<PyryTheBurger> i cant even clear my bash terminal anymore
12:58:05FromDiscord<PyryTheBurger> now nim is my only path?? what??
12:59:14FromDiscord<PyryTheBurger> if i add the nim path line in to my .bashrc, every other path disappers
12:59:56FromDiscord<Forest [She/Her]> That's an issue i had too
13:00:01FromDiscord<Forest [She/Her]> I just added my entire path
13:00:08FromDiscord<Forest [She/Her]> It's not Nim specific
13:00:12FromDiscord<Forest [She/Her]> Just weirdness
13:00:25FromDiscord<PyryTheBurger> how do i fixed that
13:00:29FromDiscord<PyryTheBurger> In reply to @Event Horizon "I just added my": oh
13:00:58FromDiscord<ChocolettePalette> Should be single quotes then↵(@PyryTheBurger)
13:01:08FromDiscord<PyryTheBurger> i did put in single quotes
13:02:27FromDiscord<PyryTheBurger> In reply to @ChocolettePalette "Should be single quotes": BRUH IT WORKED IF I PUT IN DOUBLE QUOTES
13:02:29FromDiscord<PyryTheBurger> liar
13:02:50FromDiscord<PyryTheBurger> heheh always dont trust in people
13:03:11FromDiscord<ChocolettePalette> Uhh then should be double quotes
13:03:21FromDiscord<PyryTheBurger> yeah
13:07:32FromDiscord<hotdog> Yeah it needs to be double quotes so the $PATH in the string is expanded
13:07:38FromDiscord<hotdog> All working now @PyryTheBurger
13:07:40FromDiscord<hotdog> ?
13:16:42FromDiscord<PyryTheBurger> yup
13:55:57FromDiscord<ache of head> In reply to @Event Horizon "How would i do": i realise this might not be your actual usecase, but wouldn't just using an if statement be simpler in this example?
13:57:47FromDiscord<ache of head> sent a code paste, see https://play.nim-lang.org/#ix=4bnm
13:57:56FromDiscord<ache of head> given you import `strutils`
13:58:07FromDiscord<ache of head> which contains the set `Whitespace`
13:58:33FromDiscord<Forest [She/Her]> In reply to @c1m5j "i realise this might": In this example yeah, but in my code i'm doing a lot of checks for many different values, but it's all good since now i'm just making it use an if statement
13:58:38FromDiscord<Forest [She/Her]> Thanks ^^
13:58:54FromDiscord<Forest [She/Her]> The lexer for Stellar is actually going alright haha
13:59:10FromDiscord<ache of head> yeah in general if you want to test for some special behavior, not just equality, in a case-of statement then you can put in a wildcard and then add an if statement after that
13:59:16FromDiscord<ache of head> like `of x if <something boolean with x>`
14:00:10FromDiscord<ache of head> also can a char be empty?
14:00:17FromDiscord<ache of head> oh no wait that was a string
14:00:18FromDiscord<ache of head> whoops
14:00:22FromDiscord<ache of head> i thought it was a char
14:00:46FromDiscord<Forest [She/Her]> In reply to @c1m5j "yeah in general if": thanks!
14:02:47FromDiscord<Patitotective> In reply to @Elegantbeef "Good that you put": sorry? https://media.discordapp.net/attachments/371759389889003532/1023595425393037312/unknown.png
14:03:06FromDiscord<Patitotective> only the repo is called kdl-nim :p
14:03:43FromDiscord<ravinder387> proc hello(ctx: context.Context) {.async.} =↵ resp htmlResponse(createDom())
14:03:48FromDiscord<ravinder387> it return future
14:04:57FromDiscord<ravinder387> I want to force Nim to execute this function ---> execute other function
14:05:05FromDiscord<ravinder387> how can i do it
14:08:07FromDiscord<Patitotective> In reply to @ravinder387 "proc hello*(ctx: context.Context) {.async.}": what is resp?
14:08:18FromDiscord<Patitotective> In reply to @ravinder387 "I want to force": from what i can see you're already doing it
14:09:19FromDiscord<ache of head> In reply to @ravinder387 "I want to force": wdym?
14:10:34FromDiscord<Forest [She/Her]> https://hastebin.com/ebigitemot.properties I think this enters an infinite loop but i'm not sure where?
14:10:58FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4bnv
14:11:12FromDiscord<ravinder387> i want to run draw() function before response
14:12:22FromDiscord<ravinder387> i got blank img tag https://media.discordapp.net/attachments/371759389889003532/1023597835213619280/2022-09-25.png
14:12:43FromDiscord<Patitotective> In reply to @Event Horizon "https://hastebin.com/ebigitemot.properties I think ": there are three while loops (and one is `while true`), its not that hard :p
14:12:45FromDiscord<Forest [She/Her]> In reply to @Event Horizon "https://hastebin.com/ebigitemot.properties I think ": I've added some print statements but it seems to be printing nothing
14:13:45FromDiscord<Forest [She/Her]> In reply to @Patitotective "there are three while": Yeah i'm trying to look through it
14:14:13FromDiscord<Forest [She/Her]> Aaaah
14:14:19FromDiscord<Forest [She/Her]> Nvm ik where now
14:14:29FromDiscord<Forest [She/Her]> Weird that the else statement isn't getting triggered tho
14:15:43FromDiscord<Forest [She/Her]> It was my bad code lol
14:15:49FromDiscord<Forest [She/Her]> Forgot to increment the counter
14:15:55FromDiscord<Patitotective> In reply to @Event Horizon "https://hastebin.com/ebigitemot.properties I think ": i recently made a lexer for kdl so if you want to look through it https://github.com/Patitotective/kdl-nim/blob/main/src/kdl/lexer.nim
14:16:14FromDiscord<Forest [She/Her]> Oh neat
14:17:02FromDiscord<Forest [She/Her]> These are all the new lines? what? `["\c\l", "\r", "\n", "\u0085", "\f", "\u2028", "\u2029"]`
14:17:19FromDiscord<Patitotective> https://github.com/kdl-org/kdl/blob/main/SPEC.md#newline
14:17:53FromDiscord<Forest [She/Her]> also why do you do `{0x0009, 0x0020, 0x00A0, 0x1680, 0x2000..0x200A, 0x202F, 0x205F, 0x3000}` and just use `Whitespace` from strutils
14:17:56FromDiscord<Forest [She/Her]> Ah
14:18:25FromDiscord<Patitotective> the spec says specifically the unicode runes that should be treated as whitespaces or newlines
14:18:38FromDiscord<Forest [She/Her]> Ah aight then
14:21:39FromDiscord<!&luke> In reply to @ripluke "What’s a good nim": Anyone got any ideas
14:30:42FromDiscord<ChocolettePalette> I'm not implying anything, but every PHP programmer has their own ORM...
14:35:03FromDiscord<exelotl> norm is the only one I could make sense of
14:36:17FromDiscord<exelotl> if you have problems with norm then it would probably be better to get involved and improve it rather than make your own 😅
14:36:28FromDiscord<Patitotective> https://github.com/moigagoo/norm/
14:38:36*wallabra joined #nim
14:56:52*marderIII joined #nim
15:10:35FromDiscord<01> is it practically possible to use Nim to program arduinos?
15:14:05FromDiscord<exelotl> yes, you can use Nim anywhere you'd use C
15:15:23FromDiscord<01> if i just include a C header, is that it and i can use a C (header only) library?
15:15:29FromDiscord<01> or do i need extra steps
15:15:36FromDiscord<01> to call c functions
15:20:30NimEventerNew thread by Oliver: Cross-Compiling gintro/GTK4, see https://forum.nim-lang.org/t/9492
15:20:35FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=4bo0
15:21:08FromDiscord<01> so there is some additional step
15:23:12FromDiscord<exelotl> Yes, but there are tools you can use to help automate this process: `c2nim` is a command line tool that works pretty well for converting C headers to Nim.↵Also there's Futhark which does the whole conversion on the fly, which is apparently quite good but I haven't tried it myself: https://github.com/PMunch/futhark
15:24:03FromDiscord<exelotl> (edit) "Nim.↵Also" => "Nim: https://github.com/nim-lang/c2nim↵Also"
15:26:16FromDiscord<pmunch> Futhark is pretty good indeed
15:27:41FromDiscord<Forest [She/Her]> I wonder how difficult a Nim interpreter would be ngl
15:27:48FromDiscord<Forest [She/Her]> Without using any of the compiler library
15:28:05FromDiscord<Forest [She/Her]> Macros would probably break tho lol
15:28:41FromDiscord<Rainbow Asteroids> why would macros break in an interpreted nim?
15:28:41FromDiscord<huantian> In reply to @pmunch "Futhark is pretty good": I heard the person who made it is also cool
15:28:47FromDiscord<Patitotective> haha
15:43:08*wallabra_ joined #nim
15:44:06*wallabra quit (Ping timeout: 265 seconds)
15:45:20*wallabra_ is now known as wallabra
15:46:40FromDiscord<redstonekasi> Hey there! Is there any way to have a hybrid package that can be imported without the pkg suffix? I tried to just rename to directory but that gave me the warning in the bottom screenshot? https://media.discordapp.net/attachments/371759389889003532/1023621566615007352/unknown.png https://media.discordapp.net/attachments/371759389889003532/1023621566937960480/unknown.png
15:46:43FromDiscord<redstonekasi> (edit) "screenshot?" => "screenshot."
15:46:47FromDiscord<redstonekasi> Is it not possible?
15:54:25FromDiscord<Patitotective> In reply to @redstonekasi "Hey there! Is there": you just rename the `kelppkg` folder to whatever you want iirc
15:55:11FromDiscord<redstonekasi> Yes it works (see the bottom screenshot), but it also gives me a warning which I would like to avoid since it's going to be an error in the future.
15:58:12FromDiscord<Patitotective> dont really know https://github.com/nim-lang/nimble/issues/308
16:04:07*wallabra quit (Ping timeout: 246 seconds)
16:17:04FromDiscord<Mrcool> how to slice seq?
16:17:24FromDiscord<Mrcool> a = @[1,2] ↵a[1:] ?
16:17:33FromDiscord<Mrcool> (edit)
16:23:40FromDiscord<ravinder387> when i click button it changes the data in server-side https://media.discordapp.net/attachments/371759389889003532/1023630874438271038/yy.mp4
16:24:08FromDiscord<ravinder387> sent a long message, see http://ix.io/4bob
16:29:04FromDiscord<Patitotective> In reply to @Mrcool "how to slice seq?": `a[0..0]` it is inclusive
16:34:14FromDiscord<jos> inclusive ranges by default is pretty scuffed
16:34:34FromDiscord<jos> im fixing a bunch of bugs in my code because of it rn
16:44:41FromDiscord<Mrcool> does nim always have to recompile, can it not detect if a file has been changed?
16:46:33FromDiscord<hotdog> In reply to @Mrcool "does nim always have": You mean like a watch mode?
16:46:51FromDiscord<huantian> In reply to @jos "inclusive ranges by default": I don’t think it’s scuffed it’s just different
16:47:36FromDiscord<Mrcool> In reply to @hotdog "You mean like a": I mean If I compile a file, then don't make changes to it
16:47:45FromDiscord<Mrcool> nim c still compiles it again
16:48:10FromDiscord<hotdog> Incremental compilation is a WIP
16:58:39*wallabra joined #nim
17:03:33FromDiscord<jos> In reply to @huantian "I don’t think it’s": there's a pretty strong argument for exclusive ranges just composing better
17:03:35FromDiscord<jos> https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html
17:03:51FromDiscord<jos> among other pretty obvious reasons
17:06:17FromDiscord<Require Support> if i initialize for example an object like `AsyncHttpClient` should I do it with `let` or `var` if i will be changing object fields like `AsyncHttpClient.headers`
17:11:52FromDiscord<jos> why tf do test files need to start with a t
17:12:06FromDiscord<jos> this language is so good but also so strange
17:12:46FromDiscord<jos> ls
17:13:41FromDiscord<huantian> In reply to @jos "there's a pretty strong": Interesting
17:14:33FromDiscord<huantian> In reply to @jos "why tf do test": I think you can change that? Unless you mean the tests for the compiler↵I agree though it’s interesting
17:14:41FromDiscord<huantian> (edit) "interesting" => "a weird choice"
17:15:34FromDiscord<jos> i'm struggling to understand how to use testament in general
17:15:51FromDiscord<huantian> I personally skipped that step and just used balls
17:16:02FromDiscord<jos> balls
17:16:25FromDiscord<jos> is there any testing framework that's rust style? like allows you to just stick the tests in the same file as the impl
17:16:29FromDiscord<jos> i always really liked that
17:16:47FromDiscord<huantian> The best you can do is probably runnableExamples
17:17:02FromDiscord<jos> oh wow balls looks pretty cool
17:17:09FromDiscord<huantian> Though I feel like that kind of test should be possible as well
17:17:32FromDiscord<jos> mm it might
17:17:44FromDiscord<jos> i'll play around with balls
17:17:48FromDiscord<jos> :cheeseCarter:
17:17:52FromDiscord<huantian> 😏
17:18:02FromDiscord<huantian> Iirc it used to be called testes
17:18:04FromDiscord<MolassesLover> What did I join in on ☹️
17:18:10*marderIII quit (Quit: leaving)
17:18:16FromDiscord<MolassesLover> Concern
17:24:46FromDiscord<Forest [She/Her]> In reply to @Rainbow Asteroids "why would macros break": Different interpreter with different way of parsing and handling
17:25:14FromDiscord<Forest [She/Her]> Unless i design it in such a way where macros are explicitly supported
17:27:17FromDiscord<Forest [She/Her]> In reply to @MolassesLover "What did I join": No idea
17:40:38FromDiscord<Forest [She/Her]> Anyone know why https://hastebin.com/ziduxeveli.properties isn't working? It seems to skip over the `(` token in my code that I'm trying to lex and idk why?
17:41:19FromDiscord<Forest [She/Her]> Aaaaah nvm okay ik the issue
17:44:40FromDiscord<Le Toaster> Are there any reasons I should use methods instead of procs?
17:45:30FromDiscord<jos> nice i got inline tests working with balls 🙂
17:45:35FromDiscord<jos> it's configured a little jank but whatever
17:46:13FromDiscord<Forest [She/Her]> In reply to @Event Horizon "Aaaaah nvm okay ik": Nvm now i have another issue, the issue is that it tries to access `index 35` in my string but idk how to fix that... Unless i take index errors as "we've finished lexing"
17:46:33FromDiscord<Forest [She/Her]> Actually that wouldn't work since incomplete tokens
17:46:43FromDiscord<Forest [She/Her]> In reply to @Le Toaster "Are there any reasons": Iirc, for dynamic dispatching
17:50:49FromDiscord<Forest [She/Her]> Fixed
17:52:46FromDiscord<planetis> In reply to @jos "https://www.cs.utexas.edu/users/EWD/transcriptions/": I have read that and I was not convinced, its a very subjective matter. But whatever. ..< looks better than ..=
17:55:53FromDiscord<planetis> and besides programmers, I don't think people count like that.
17:57:00FromDiscord<planetis> (edit) "and besides programmers, I don't think ... peoplethink" added "most" | "count" => "think"
17:59:26*pech is now known as disso_pch
18:01:25FromDiscord<Forest [She/Her]> Would `hello.world` be one token or two in a lexer?
18:01:32FromDiscord<Forest [She/Her]> For accessing keys of a dictionary for example
18:01:35FromDiscord<Forest [She/Her]> (Lua)
18:02:15FromDiscord<jos> In reply to @planetis "I have read that": I think Dijkstra's arguments there are not only greater than yours in quantity, but empirical examples and experience
18:02:37FromDiscord<jos> but to each their own.. ofc
18:03:42FromDiscord<planetis> oh wow such pompous response. sure he's a great scientist but this particular letter is subjective that's all I am saying.
18:04:06FromDiscord<planetis> I am not going to fight over the internet about a..b-1
18:04:22FromDiscord<jos> it's not really, in a language with zero indexed collections, you'll have off by one errors by default
18:04:33FromDiscord<jos> it seems completely objective and sensible
18:05:19FromDiscord<jos> there's a ton of wisdom from the golden age of compiler design way back when that's lost nowadays
18:06:42FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4boJ
18:08:06FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=4boJ" => "https://play.nim-lang.org/#ix=4boK"
18:08:50FromDiscord<planetis> In reply to @jos "it's not really, in": so it's hard to use ..< instead of .. when converting code to Nim?
18:09:17FromDiscord<Generic> In reply to @Event Horizon "Would `hello.world` be one": it would be three
18:09:34FromDiscord<jos> in the eyes of someone thinking about language design, having the default/most terse syntax for ranges introduce an off-by-one error when iterating over a collection
18:09:41FromDiscord<jos> is just wrong
18:09:53FromDiscord<jos> it's not "hard" to use
18:10:00FromDiscord<jos> it's just not ideal
18:10:23FromDiscord<planetis> so Natural = range[0..high(int)] would be what with exclusive ranges?
18:11:10FromDiscord<jos> who cares
18:11:26FromDiscord<jos> is that the most common use case for ranges? no
18:11:41FromDiscord<planetis> so the default is off by one now...
18:11:56FromDiscord<jos> yeah, in a pretty rare case
18:12:10FromDiscord<jos> funnily enough Guido thinks the half open interval in python ranges was a mistake
18:15:00FromDiscord<jos> idk I mean I've been programming for like 15+ years and I've never had to write the line of code you wrote there
18:15:16FromDiscord<Forest [She/Her]> In reply to @Generic "it would be three": Ah yeah three not two
18:15:16FromDiscord<jos> so if I had to pick a way to introduce bugs for devs who never read the docs on ranges in my lang
18:15:19FromDiscord<Forest [She/Her]> Thanks!
18:15:26FromDiscord<jos> I would def pick half open intervals by default
18:16:19FromDiscord<!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4boL
18:17:41FromDiscord<planetis> it's also common for arrays. I would like 1 based indexed lang better but that's not how computers work so whatever.
18:19:21FromDiscord<!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4boO
18:20:04*pro joined #nim
18:30:16FromDiscord<!&luke> Tm is an object
18:32:53FromDiscord<Bung> you can't use variable out of scope
18:53:53*jmdaemon joined #nim
18:57:56*Guest7131 joined #nim
18:58:08*Guest7131 quit (Client Quit)
18:59:16*krux02 joined #nim
19:10:15FromDiscord<4zv4l> how can I compile my program for `macOS` from `Linux` ?
19:10:52FromDiscord<4zv4l> I never really needed and still don't need, just thought about it because in Go it's easy to do↵but I didn't find how to do in the Nim doc
19:11:12qwrthat would be tricky, in theory it might be possible, but you would need C cross compiler and macosx libc at least
19:12:38FromDiscord<4zv4l> why isn't there a kind of `mingw` but for macOS ?
19:13:09qwrseems that there is - darling: https://stackoverflow.com/questions/39409082/cross-compiling-for-os-x-from-linux
19:14:08FromDiscord<4zv4l> lmao I thought you were calling me darling at first xD
19:15:29FromDiscord<redstonekasi> In reply to @redstonekasi "Hey there! Is there": Can anybody answer this question? Sorry if I'm being annoying by mentioning it again.
19:17:57FromDiscord<Varriount> Anyone know what the "O" in "ORC" stands for? Object? Optimized? Original?
19:18:19qwrpun for (freeing) circles
19:18:46FromDiscord<Varriount> In reply to @jos "funnily enough Guido thinks": Huh, I thought he wrote an article justifying half-open ranges.
19:19:53qwrarc (pure deferred reference counting) is unable to free cyclic data structures, orc adds cycle (O) detector
19:20:10FromDiscord<Varriount> In reply to @redstonekasi "Can anybody answer this": Why do you need a hybrid package?
19:21:31FromDiscord<redstonekasi> Because I want my program to also be usable as a library.
19:24:16qwrmake a library and separate small program that uses it?
19:25:05FromDiscord<redstonekasi> Ah, I hadn't even thought of that, thanks.
19:27:49FromDiscord<Forest [She/Her]> Is there a Nim library for generating HTML and CSS?
19:28:12FromDiscord<Forest [She/Her]> I don't want to write either by hand because of how annoying it is haha, I've written them before but bleh
19:30:33qwrnot sure about css, but for html there is https://nim-lang.org/docs/htmlgen.html
19:33:42qwralso searching web for nim html finds some other libraries
19:45:55FromDiscord<4zv4l> where is the doc for `httpx` ?
19:45:57FromDiscord<Forest [She/Her]> Thanks!
19:46:07FromDiscord<4zv4l> I don't find how to change the default port and ip to listen
19:50:32FromDiscord<redstonekasi> In reply to @4zv4l "I don't find how": I don't use httpx but I assume you just pass the Settings object as a parameter to `run` https://media.discordapp.net/attachments/371759389889003532/1023682941714448394/unknown.png
19:50:44FromDiscord<redstonekasi> https://media.discordapp.net/attachments/371759389889003532/1023682991534383144/unknown.png
19:56:11*pro quit (Quit: pro)
19:56:35*xaltsc joined #nim
19:58:46FromDiscord<4zv4l> I tried but maybe that's just me xD
19:58:59FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4brd
19:59:10FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4bre
19:59:29FromDiscord<4zv4l> oooh that's : and not = maybe
19:59:45FromDiscord<4zv4l> indeed
19:59:47FromDiscord<4zv4l> my bad sorry
20:11:44*nullsh quit (Quit: WeeChat 3.5)
20:13:24FromDiscord<jos> In reply to @Varriount "Huh, I thought he": i think ur right, I misread something or other
20:23:15FromDiscord<Mrcool> sent a long message, see http://ix.io/4brm
20:24:39FromDiscord<Mrcool> I finally ported a random deno script btw <https://github.com/sigmaSd/deno-nim/blob/master/examples/deno_show.nim> it only took so long
20:27:19FromDiscord<Forest [She/Her]> In reply to @Mrcool "My 2 days experience": Use the lsp btw, it works better for me tbh
20:27:40FromDiscord<Forest [She/Her]> The only backends that are going to be officially supported is the js backend the C family backends
20:27:47FromDiscord<sOkam!> the lsp is pretty decent, yep
20:28:33FromDiscord<Forest [She/Her]> And yeah error msgs are a bit rip
20:28:33FromDiscord<Mrcool> I'm using the lsp, but on some files it just stops working
20:28:41FromDiscord<Forest [She/Her]> Ah fair, I've had that issue too
20:28:57FromDiscord<Forest [She/Her]> I'm slowly working on a Java backend for Nim actually
20:29:11FromDiscord<Forest [She/Her]> I'm just taking a break from it rn because i can only do so much lmao
20:29:44FromDiscord<Mrcool> nimpretty makes my code not compile because it messes indentation up, hopefully it get some love as well
20:30:59FromDiscord<Mrcool> do you have the code for java backend somewhere, I want to see how do that looks like? (adding a new backend)
20:31:59FromDiscord<Mrcool> (edit) "like?" => "like"
20:34:33FromDiscord<planetis> Thats like everyones experience 🤣 tooling totally sucks
20:40:24FromDiscord<Forest [She/Her]> In reply to @Mrcool "nimpretty makes my code": Yeah I've had that issue too haha
20:41:17*LuxuryMode joined #nim
20:41:26FromDiscord<Forest [She/Her]> sent a long message, see http://ix.io/4brp
20:41:35FromDiscord<Forest [She/Her]> It shouldn't be too hard to port to Nim, compiler hasn't diverged that much yet
20:41:41FromDiscord<Forest [She/Her]> Also note the code is currently broken lmao
20:42:35FromDiscord<Mrcool> thanks
20:43:38FromDiscord<Mrcool> you have target lua xD I'm already trying to write my neovim config with nim using nim->js->typescript-to-lua transplier, it seems it can work
20:44:52FromDiscord<Forest [She/Her]> In reply to @Mrcool "thanks": No worries!
20:45:11FromDiscord<Forest [She/Her]> Haha yeah, i really think a Lua backend could work tbh
20:45:42FromDiscord<Forest [She/Her]> I'd need to do some cursed stuff to get around the lack of continue statements in Lua tho, if I want Lua 5.1 to be supported (mainly for ComputerCraft)
20:46:45FromDiscord<Forest [She/Her]> Hm, yeah thinking about it now, it's probably doable
20:47:22FromDiscord<Forest [She/Her]> The main issue is performance tbh, i could do a lot of string eval to get it so i make a 'pseudo-interpreter'
20:47:45FromDiscord<Mrcool> cool
20:48:05FromDiscord<Mrcool> is there a way I can make a variable name not mangled
20:48:40FromDiscord<Forest [She/Her]> Yeah, it should be `cdecl`?
20:48:49FromDiscord<Forest [She/Her]> for the pragma
20:49:24FromDiscord<Mrcool> it says invalid pragma https://media.discordapp.net/attachments/371759389889003532/1023697754444275762/unknown.png
20:53:02FromDiscord<Mrcool> {.exportc.}
20:56:16FromDiscord<Forest [She/Her]> Hm
20:56:21FromDiscord<Forest [She/Her]> Aah yeah exportc, sorry
20:59:35FromDiscord<Mrcool> np thanks anyway
20:59:44FromDiscord<Mrcool> next step is how to generate javascript export
21:00:06FromDiscord<Mrcool> as in `let setup =` becomes `export var setup =`
21:01:36FromDiscord<Forest [She/Her]> No worries haha
21:01:49FromDiscord<!&luke> In reply to @Bung "you can't use variable": Wym I have the file where that is defined included into the file with the jester server
21:02:04FromDiscord<Forest [She/Her]> Yeah Nim constants and `let`s just become JS vars
21:02:46FromDiscord<Forest [She/Her]> If you really wanted to, probably could make a macro for doing something like `jsLet` or `jsConst variableName = value`
21:04:46FromDiscord<Mrcool> I'll need help with that one xD
21:05:58FromDiscord<Mrcool> next problem , I want to pass an empty object, but it gets transpiled to an object with m_type https://media.discordapp.net/attachments/371759389889003532/1023701919593681017/unknown.png https://media.discordapp.net/attachments/371759389889003532/1023701919966965931/unknown.png
21:06:20FromDiscord<Mrcool> I'm using it like `call(a,b,VimOpts())`
21:08:10FromDiscord<Forest [She/Her]> In reply to @Mrcool "I'll need help with": Fair xD
21:08:29FromDiscord<Forest [She/Her]> In reply to @Mrcool "next problem , I": I don't understand?
21:08:35FromDiscord<Forest [She/Her]> m_type?
21:08:49FromDiscord<Forest [She/Her]> You could just emit JS code directly?
21:09:56FromDiscord<4zv4l> how can I get the parameters in `POST` with `httpx` ?
21:10:01FromDiscord<4zv4l> I really don't find any doc for that thing
21:10:08FromDiscord<Forest [She/Her]> `{.emit: """js code here""".}`
21:10:10FromDiscord<Mrcool> I want to emit an empty object {} but nim is adding that mtype thing
21:10:25FromDiscord<Mrcool> I even tried but its still htere https://media.discordapp.net/attachments/371759389889003532/1023703041716797601/unknown.png
21:10:28FromDiscord<Mrcool> (edit) "htere" => "there"
21:10:34FromDiscord<Forest [She/Her]> Would `{.emit: """{}""".}` not work?
21:10:42FromDiscord<Forest [She/Her]> In reply to @Mrcool "I even tried but": Ah
21:11:01FromDiscord<Forest [She/Her]> Hm idk, could be because it's an object of JsRoot, but no idea
21:12:53FromDiscord<Forest [She/Her]> In reply to @Mrcool "I even tried but": Does that raise an error or would it still work?
21:13:36FromDiscord<Mrcool> the type thing messes my nvim api expectation
21:13:46FromDiscord<Mrcool> found a workaround `var empty {.importjs: "{}"}: JsObject`
21:15:06FromDiscord<Mrcool> ok now the only missing part is adding `export`
21:16:26FromDiscord<Mrcool> close but far xD https://media.discordapp.net/attachments/371759389889003532/1023704554652577792/unknown.png https://media.discordapp.net/attachments/371759389889003532/1023704555529191474/unknown.png
21:17:14FromDiscord<Elegantbeef> `codegendecl`
21:17:53FromDiscord<Mrcool> nice
21:18:14FromDiscord<Mrcool> works thanks
21:18:59FromDiscord<Forest [She/Her]> In reply to @Mrcool "the type thing messes": Ah
21:23:38FromDiscord<Mrcool> why does this codgen into an array var h = [fn] instead of var h = fn https://media.discordapp.net/attachments/371759389889003532/1023706367523037356/unknown.png https://media.discordapp.net/attachments/371759389889003532/1023706367900520448/unknown.png
21:23:52FromDiscord<Mrcool> (edit) "var" => "`var" | "[fn]" => "[fn]`" | "var" => "`var" | "fn" => "fn`"
21:24:17FromDiscord<Elegantbeef> Pointer semantics
21:24:28FromDiscord<Elegantbeef> Nim has pointers JS doesnt so it emulates them
21:24:43FromDiscord<Elegantbeef> An pointer type is turned into an array
21:24:46FromDiscord<Elegantbeef> any\
21:25:05FromDiscord<Elegantbeef> you can see this with `var hello = new int`
21:26:05FromDiscord<Mrcool> I see, is there a way to workarond this to make transpile to fn
21:26:26FromDiscord<Elegantbeef> Not that i know of
21:26:35FromDiscord<Elegantbeef> Other than using codegendecl
21:26:36FromDiscord<Elegantbeef> It's needed for Nim semantics
21:27:43FromDiscord<Mrcool> I found a workaround https://media.discordapp.net/attachments/371759389889003532/1023707394548707388/unknown.png
21:28:42FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4brB
21:29:17FromDiscord<Elegantbeef> I mean you likely get a single error 😄
21:29:32FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4brC
21:29:46FromDiscord<4zv4l> and I don't know what's wrong
21:29:51FromDiscord<4zv4l> I took the example from the github
21:30:43FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4brD
21:30:47FromDiscord<4zv4l> so valid json
21:34:15FromDiscord<Elegantbeef> I just tested and payload is empty
21:34:36FromDiscord<4zv4l> I don't even know how it works there is no doc
21:34:47FromDiscord<4zv4l> what is the diff between @payload and body ?
21:36:06FromDiscord<4zv4l> ooooh
21:36:22FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4brF
21:36:23FromDiscord<4zv4l> this gives me a bit at least
21:41:13FromDiscord<4zv4l> this works !
21:41:17FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4brI
21:42:05FromDiscord<Mrcool> first hello world nvim plugin with nim works! https://media.discordapp.net/attachments/371759389889003532/1023711012110745702/unknown.png
21:42:29FromDiscord<Mrcool> https://media.discordapp.net/attachments/371759389889003532/1023711111792578662/unknown.png
21:46:18FromDiscord<Salir> Hi
21:46:29FromDiscord<Salir> Why i can't use tabs?
21:46:48FromDiscord<Elegantbeef> It was decided to use the least abrasive indentiation
21:47:16FromDiscord<Elegantbeef> Tabs are less supported and more tedious in many things to customise, as such they were not chosen and the only indentation allowed
21:50:38FromDiscord<Xenon> to be fair though, i dont really understand the tab-space argument
21:50:58FromDiscord<Xenon> just about any IDE or text editor nowadays has a setting to make tab insert spaces
21:51:05FromDiscord<Elegantbeef> Tabs are good as they give users customisabillity
21:51:18FromDiscord<Xenon> thing is, spaces do to
21:51:30FromDiscord<Elegantbeef> The downside is that people feel the need align code, which means when you customise indentation it is not readable
21:51:33FromDiscord<Elegantbeef> No spaces are not customisable
21:51:42FromDiscord<Elegantbeef> To change indentation size you have to edit the source file
21:51:44FromDiscord<Xenon> in VsCode for example, i have my tab size set to 2 spaces, with spaces auto-inserted
21:51:55FromDiscord<Salir> I can use #? replace("\t", " ")
21:52:07FromDiscord<Elegantbeef> spaces are equivalent to embedding the font in the source file, and having to change that to change the font rendered
21:52:18FromDiscord<Xenon> https://media.discordapp.net/attachments/371759389889003532/1023713582044684378/unknown.png
21:52:21FromDiscord<Elegantbeef> I mean you can use source code filters but it's just best to use spaces
21:52:26FromDiscord<Salir> In reply to @Salir "I can use #?": But why
21:52:29FromDiscord<Elegantbeef> I dislike spaces aswell but as a pragmatist it only makes sense
21:52:43FromDiscord<huantian> I'm indifferent as long as it's consistent
21:52:43FromDiscord<Xenon> i mean, the argument is kinda pointless
21:52:45FromDiscord<Xenon> spaces won
21:52:49FromDiscord<huantian> which enforcing spaces only works for me
21:53:03FromDiscord<huantian> (edit) "only" => "does, so it"
21:53:28FromDiscord<huantian> people that don't configure their editors properly and mix spaces and tabs anger me
21:53:36FromDiscord<Xenon> yeah lol
21:54:00FromDiscord<Salir> In reply to @huantian "people that don't configure": And?
21:54:02FromDiscord<Elegantbeef> The annoying part is really people who align code on non indents
21:54:08FromDiscord<Xenon> i have my editor set to 2 spaces for all files except python(in which PEP prefers 4-space)
21:54:19FromDiscord<Xenon> In reply to @Elegantbeef "The annoying part is": nah
21:54:23FromDiscord<Xenon> i do that all the time
21:54:41FromDiscord<Elegantbeef> "I use spaces to align code horizontally to make it tedious for anyone else"
21:54:42FromDiscord<Elegantbeef> Just align on an indent and carry on
21:54:43FromDiscord<Salir> It isn't nim creators problem
21:55:24FromDiscord<Elegantbeef> The tab vs space arguments have happened forever with Nim, just use spaces and carry on
21:55:38FromDiscord<Xenon> In reply to @Elegantbeef "The annoying part is": https://media.discordapp.net/attachments/371759389889003532/1023714422138609787/unknown.png
21:56:02FromDiscord<Xenon> lol
21:56:09FromDiscord<huantian> 😔
21:56:15FromDiscord<huantian> that extra space ah
21:56:19FromDiscord<huantian> I don't like it lol
21:57:11FromDiscord<Salir> Why you're bot?
21:57:19FromDiscord<Xenon> but being real here, the only time i actually do that is variables
21:57:21FromDiscord<huantian> it's a really good ai
21:57:47FromDiscord<huantian> In reply to @Xenon "but being real here,": but you're going against NEP-1 checkmate 🤓
21:57:51FromDiscord<Elegantbeef> The compiler chose a single significant white space character for good reason
21:58:00FromDiscord<Elegantbeef> Next indent align and carry on
21:58:00FromDiscord<Elegantbeef> That's what i do↵(@Xenon)
21:58:30FromDiscord<Xenon> In reply to @Elegantbeef "The compiler chose a": personally, i like to indent my code using 16 spaces\
21:58:51FromDiscord<Xenon> like this
21:58:52FromDiscord<Xenon> a
21:58:54FromDiscord<Elegantbeef> I was looking at the left
21:58:54FromDiscord<Elegantbeef> Yea horizontally aligned code can die in a fire for all i care
21:58:55FromDiscord<Xenon> discord
21:58:55FromDiscord<Xenon> why
21:59:02FromDiscord<Xenon> why strip leading spaces
21:59:39FromDiscord<Elegantbeef> Cause my parents didnt love me
22:00:10FromDiscord<Xenon> in one of my .nimble files
22:00:10FromDiscord<Salir> You type so quickly
22:00:12FromDiscord<Xenon> https://media.discordapp.net/attachments/371759389889003532/1023715570996224070/unknown.png
22:00:16FromDiscord<Elegantbeef> You can be a chucklefuck all day long
22:00:16FromDiscord<Elegantbeef> This is why tabs are better
22:00:23FromDiscord<Elegantbeef> Chucklefuck protection
22:01:05FromDiscord<Elegantbeef> We get it xenon you hate others
22:01:14FromDiscord<Xenon> In reply to @Elegantbeef "We get it xenon": nah, just myself
22:01:25FromDiscord<Xenon> because i manually go in and edit .nimble files
22:01:41FromDiscord<Xenon> and set them to be exactly the correct number of spaces
22:03:13FromDiscord<Elegantbeef> I'm sorry for your loss
22:07:23FromDiscord<Le Toaster> Whenever I try to get a value from a table and assign it to a variable of the same type, I get an error saying that the received type `T` does not match the expected type.
22:07:37FromDiscord<Le Toaster> Does anyone know how I can fix this?
22:07:43FromDiscord<Elegantbeef> Code?
22:07:51FromDiscord<Elegantbeef> Or error?
22:08:45FromDiscord<Le Toaster> Error: `type mismatch: got 'T' for 'species["A"]' but expected 'Species = object'`
22:10:04FromDiscord<Elegantbeef> Ah that error isnt helping anyone, so code 😄
22:11:03*attah quit (Ping timeout: 268 seconds)
22:15:03FromDiscord<Le Toaster> Oh never mind, I figured out the error.
22:21:25*wallabra quit (Ping timeout: 246 seconds)
22:23:17*wallabra joined #nim
22:41:55*attah joined #nim
23:26:08*krux02 quit (Remote host closed the connection)
23:34:58*arkurious quit (Remote host closed the connection)