<< 11-03-2022 >>

00:03:00*Gustavo6046 quit (Remote host closed the connection)
00:03:42*Gustavo6046 joined #nim
00:18:12*krux02 quit (Ping timeout: 240 seconds)
00:33:10FromDiscord<mattrb> Hey @ElegantBeef, you've helped me deal with some cyclic dependency issues before. I'm hoping you can help me again, if you have a minute :)↵I'd like to add a new ObjectType here, where the Obj variant has a Chunk field, where Chunk is defined in chunk.nim https://github.com/mattrberry/crim-lox/blob/master/nlox/src/nlox/value.nim#L14-L19↵Since chunk.nim already depends on value.nim, it seems like I can't get this to work
00:33:40FromDiscord<Elegantbeef> I'll help in a few minutes
00:33:44FromDiscord<mattrb> Tyvm :)
00:37:32FromDiscord<Elegantbeef> Move the object type down and the value stuff ub then put a `import chunk` above the object type stuff
00:37:38FromDiscord<Elegantbeef> It might work, though looks like it may not
00:37:45FromDiscord<Elegantbeef> Ah nvm it's not going to
00:38:46FromDiscord<Elegantbeef> Perhaps a `Obj[T]` then instantiate it with `Chunk`?
00:38:52FromDiscord<Elegantbeef> I dont know this is an odd structure to get around
00:41:15FromDiscord<mattrb> Yeah I think I tried that since that's what worked last time, but it doesn't seem to be working here :/
00:41:36FromDiscord<Elegantbeef> Well this is cyclical in a typedefinition and also across a module
00:42:14FromDiscord<Elegantbeef> So `Obj` has to be declared with or above `Value` but Obj has to appear after Value so you can import Value from Chunk and import Chunk for Obj
00:42:23FromDiscord<Elegantbeef> So a generic might be the way around this, or put them all together
00:44:31FromDiscord<mattrb> I was able to get it working with a separate `types.nim` file like I've done before, but I was hoping to avoid that :/
00:44:44FromDiscord<mattrb> I'm guessing that's going to be the least hacky way though
00:46:18FromDiscord<Elegantbeef> I mean generic isnt that hacky 😛
00:47:03FromDiscord<mattrb> Not too hacky, but requires some extra contextual overhead wherever I instantiate Obj
00:47:06FromDiscord<mattrb> Right?
00:47:48FromDiscord<mattrb> Compared to just throwing it in a types.nim, which will require an additional import and will further separate the data from the operations on it which I don't love, but that's it
00:49:32*jmdaemon joined #nim
00:52:15NimEventerNew thread by Mardiyah: Default argument in a template,, see https://forum.nim-lang.org/t/8999
01:17:46NimEventerNew question by pooooky: How to get what is on the terminal in Nim lang, see https://stackoverflow.com/questions/71432607/how-to-get-what-is-on-the-terminal-in-nim-lang
01:17:57*jmdaemon quit (Ping timeout: 252 seconds)
01:42:43*jmdaemon joined #nim
01:51:18FromDiscord<Elegantbeef> @mattrb\: another hack would be to `ref tuple[code: seq[Byte], lines: seq[int], constants: seq[Value]` 😛
01:51:26FromDiscord<Elegantbeef> Still looking at the code
01:54:54FromDiscord<Patitotective> is there a procedure to remove the last element form a seq? or do i need to do `seq.delete(seq.high)`?
01:55:06FromDiscord<Patitotective> (edit) "form" => "from"
01:55:19FromDiscord<Elegantbeef> `discard seq.pop`
01:55:33FromDiscord<Patitotective> thanks lol
01:57:00FromDiscord<Elegantbeef> you can also do `seq.setLen(seq.len - 1)`
01:57:13FromDiscord<Elegantbeef> or of course `seq.setLen(seq.high)`
02:15:16*vicecea quit (Remote host closed the connection)
02:15:46*vicecea joined #nim
02:21:50FromDiscord<dangbinghoo> hi, I have problems:
02:22:03FromDiscord<huantian> I have problems too
02:22:14FromDiscord<Elegantbeef> Sadly this isnt therapy
02:22:14FromDiscord<dangbinghoo> sent a code paste, see https://play.nim-lang.org/#ix=3RV2
02:22:51FromDiscord<Elegantbeef> `eval` runs with nimscript iirc
02:22:56FromDiscord<Elegantbeef> so `stdout` doesnt exist
02:23:41FromDiscord<huantian> yep https://media.discordapp.net/attachments/371759389889003532/951666690754752532/unknown.png
02:24:38FromDiscord<dangbinghoo> In reply to @huantian "yep": thanks!
02:56:46*arkurious quit (Quit: Leaving)
03:06:12*Gustavo6046_ joined #nim
03:06:31*Gustavo6046 is now known as Guest2768
03:06:31*Gustavo6046_ is now known as Gustavo6046
03:09:57*Guest2768 quit (Ping timeout: 240 seconds)
03:20:50*Gustavo6046 quit (Remote host closed the connection)
03:21:06*Gustavo6046 joined #nim
04:07:23*Gustavo6046_ joined #nim
04:07:32*Gustavo6046 is now known as Guest9267
04:07:32*Gustavo6046_ is now known as Gustavo6046
04:08:36*Guest9267 quit (Ping timeout: 240 seconds)
04:37:00*jmdaemon quit (Ping timeout: 240 seconds)
04:48:50*rockcavera quit (Remote host closed the connection)
04:56:12*jmdaemon joined #nim
04:59:41nrds<Prestige99> How do you check the os name?
05:02:52FromDiscord<Elegantbeef> `HostOs`
05:03:50FromDiscord<Elegantbeef> https://nim-lang.org/docs/distros.html or this
05:03:51nrds<Prestige99> Thanks
05:04:34nrds<Prestige99> Neat thank you
05:06:39FromDiscord<michaelb.eth> In reply to @retkid "well, I dont wanna": not sure if it fits your use case/s, but maybe look into this nim project:
05:06:58NimEventerNew thread by Oyster: Any compressed package supports password on Windows?, see https://forum.nim-lang.org/t/9000
05:07:06FromDiscord<michaelb.eth> (edit) "project:" => "project:↵https://github.com/mratsim/Arraymancer"
05:09:42FromDiscord<retkid> In reply to @michaelb.eth "not sure if it": I've tried to use Arraymancer, I am not an AI programmer and I do not understand this
05:09:50FromDiscord<retkid> I would need to read at least a few books first
05:10:43FromDiscord<retkid> and also, that has nothing to do with the topic because I want to learn more about gpu acceleration scalable parallel computations
05:10:52FromDiscord<retkid> and also I don't really care if its in Nim or not
05:11:18FromDiscord<michaelb.eth> me too 😄↵I'm just aware that as a Nim lib it can do a lot for you re: things like detecting processor support for AVX2, etc.
05:11:47FromDiscord<michaelb.eth> In reply to @retkid "and also, that has": fair enough, my apologies then for pinging you with something irrelevant
05:12:10FromDiscord<michaelb.eth> (edit) "detecting" => "detecting/engaging"
05:12:57FromDiscord<michaelb.eth> (edit) "me" => "> I would need to read at least a few books first↵me"
05:13:49*slowButPresent quit (Quit: leaving)
06:16:56*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
06:18:36*jmdaemon joined #nim
06:44:49nrds<Prestige99> Why can't we use creatDir with nimscript?
06:45:19FromDiscord<Elegantbeef> Cause it wasnt interopped
06:45:33FromDiscord<Elegantbeef> you use `mkDir` in nimscript
06:46:01nrds<Prestige99> Where is that defined?
06:46:08FromDiscord<Elegantbeef> https://nim-lang.org/docs/nimscript.html
06:46:10FromDiscord<Rika> module nimscript
06:46:19nrds<Prestige99> neat ty
06:46:53FromDiscord<Elegantbeef> Or if you built your compiler with libffi support you just go full steam ahead using any C api 😛
07:08:29*jjido joined #nim
07:23:24*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
07:24:46*koltrast joined #nim
07:38:25*jjido joined #nim
08:19:04FromDiscord<Дуб> bello! is there some way catch stdin and put my string to it? example, i use ssh to connect for remote machine, it expect password from me. can i put it automatic by nim? tnx! (expect not installed on endless machine, sshpass too. there is no physical possibility to install them <:PES3_Smile:771029769268494378> )
08:21:48FromDiscord<Rika> So you want Nim to input a string into an arbitrary terminal input? I’m not sure
08:22:03FromDiscord<Rika> Maybe via a virtual key press
08:22:09*Gustavo6046 quit (Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world. <screw you aloo_shu my old line was better and more creative!>)
08:22:44FromDiscord<Elegantbeef> Yea if Nim didnt start the process there is no easy way to do it really
08:22:46FromDiscord<Elegantbeef> Atleast that i know of
08:25:06*oisota4 joined #nim
08:25:47*blackbeard420 quit (Quit: ZNC 1.8.2 - https://znc.in)
08:25:56*blackbeard420 joined #nim
08:26:28FromDiscord<Дуб> i start ssh connection in nim
08:26:42FromDiscord<Дуб> and trying to exec command on remote machine
08:27:06FromDiscord<Дуб> by using ssh. execShellCmd, thats things)
08:27:20*oisota quit (Ping timeout: 256 seconds)
08:27:21*oisota4 is now known as oisota
08:27:25FromDiscord<Elegantbeef> Then you should be able to send input if you use `startProcess`
08:27:48FromDiscord<Дуб> some example? :hmm:
08:30:17FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3RVW
08:31:08FromDiscord<Elegantbeef> Though you may want to consider using libssh
08:31:22FromDiscord<Дуб> sent a code paste, see https://play.nim-lang.org/#ix=3RVX
08:31:22FromDiscord<Elegantbeef> https://github.com/ba0f3/libssh2.nim exists for instance
08:31:44FromDiscord<Elegantbeef> Yea `execShellCmd` isnt ideal for this
08:31:57FromDiscord<Elegantbeef> It runs a single command and blocks until it terminates
08:32:03FromDiscord<Дуб> meh
08:32:24FromDiscord<Дуб> In reply to @Elegantbeef "https://github.com/ba0f3/libssh2.nim exists for ins": so this can help right? there is standart ssh with all things?
08:32:54FromDiscord<Elegantbeef> https://github.com/ba0f3/libssh2.nim/blob/master/examples/ssh_exec.nim i mean there is a full example of them executing code remotely i believe
08:33:25FromDiscord<Elegantbeef> It's a low level api so not ideal, but it's more sensible if your goal is to ssh into a device through code
08:35:44FromDiscord<Дуб> big tnx! will test this then
08:56:05FromDiscord<Require Support> trying to transform this cast from c to nim `(const char )` but keep getting errors, please help
08:56:57FromDiscord<Elegantbeef> What's the C code and what's the Nim code?
09:00:48FromDiscord<Require Support> sent a code paste, see https://paste.rs/jF8
09:00:58FromDiscord<Elegantbeef> remove the `const`
09:01:18FromDiscord<Elegantbeef> `const T` isnt a thing Nim concerns itself with
09:01:19FromDiscord<Rika> Nim has not “constant pointers”
09:01:58FromDiscord<Require Support> ye works with no cost but got this warning ` Warning: implicit conversion to 'cstring' from a non-const location: cast[ptr char](sModuleName); this will become a compile time error in the future` so was worried there might be another solution
09:02:09FromDiscord<Require Support> (edit) "cost" => "const"
09:02:37FromDiscord<Elegantbeef> If those are strings you should just do `cstring sModuleName` and `cstring pEntry.BaseDllName.Buffer`
09:02:50FromDiscord<Elegantbeef> The warning is just to say "Hey depending on the program the Cstring might be unsafe"
09:03:13FromDiscord<Require Support> ok cool thanks 🙏
09:16:37*jmdaemon quit (Read error: Connection reset by peer)
09:17:58*jmdaemon joined #nim
09:26:27*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
09:29:54FromDiscord<Schelz> In reply to @Дуб "defact it looks like:": This works with linux terminal ?
09:30:28FromDiscord<Elegantbeef> It runs it in your shell
09:36:17FromDiscord<Require Support> is pointer arithmetic supported by nim ?
09:36:38FromDiscord<Recruit_main707> Yes, you can do it
09:37:11FromDiscord<Elegantbeef> Nim doesnt by default have pointer arithemetic it's suggested to either cast to `ptr UncheckedArray[T]` or use a library like `ptrmath`
09:40:10FromDiscord<Дуб> In reply to @Schelz "This works with linux": yeap
09:54:29*krux02 joined #nim
10:10:25*Guest46 joined #nim
10:10:37Guest46hello
10:10:59FromDiscord<fbpyr> sent a code paste, see https://play.nim-lang.org/#ix=3RWl
10:11:01*Guest46 quit (Client Quit)
10:14:15FromDiscord<Rika> https://nim-lang.org/docs/widestrs.html#WideCString
10:18:19FromDiscord<fbpyr> @Rika\: thank you! 🙂↵with `uc.print_cstring_to_console(newWideCString("widestring_test"))`↵I get a `WideCStringObj` how would I turn that into this const character\ or const wchar\_t\ ?
10:20:39FromDiscord<Elegantbeef> dereference and cast that to a `ptr wchar_t`
10:21:15FromDiscord<fbpyr> oh wow it just worked when I changed the type signature of print\_cstring\_to\_console - thank you so much!!
10:21:28FromDiscord<Elegantbeef> Seems they already have it handled
10:21:34FromDiscord<fbpyr> yay! 🎉 🙂
10:22:29FromDiscord<fbpyr> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: out of curiousity - that would have been something like?\:↵`template abom(x: untyped): untyped = cast[ptr wchar_t](x)`
10:22:45FromDiscord<Elegantbeef> Sure, not that you need a template for it
10:23:11FromDiscord<fbpyr> I see - I just had found it on the forum.. 🙂
10:24:00FromDiscord<Elegantbeef> I forgot references were just managed pointers so it's safe to go ref -\> ptr assuming the called procedure doesnt outlive the `ref`
10:50:54*jmdaemon quit (Read error: Connection reset by peer)
10:52:11*jmdaemon joined #nim
11:08:34FromDiscord<hmmm> "Warning: See corresponding Defect; IndexError is deprecated [Deprecated]"
11:08:42FromDiscord<hmmm> what should I use instead 🤔
11:12:38FromDiscord<pointystick> It seems to be an alias for IndexDefect, so presumably that: https://nim-lang.org/docs/system.html#IndexError
11:15:33FromDiscord<hmmm> yea changing to indexdefect worked, still an ugly hack but now without warning 😊
11:16:59FromDiscord<ynfle> In reply to @hmmm "yea changing to indexdefect": Why is it a hack?
11:17:46FromDiscord<hmmm> hmm because I wanted to check the index normally but IIRC the program exploded so I used try / error
11:18:26FromDiscord<hmmm> another question bros, what can I use to swap an element of a seq with the following one
11:18:28FromDiscord<ynfle> In reply to @hmmm "hmm because I wanted": You can check with ifs
11:18:44FromDiscord<ynfle> In reply to @hmmm "another question bros, what": There is a swap proc in system I think
11:18:55FromDiscord<hmmm> hmm seems it works on normal vars
11:18:59FromDiscord<hmmm> I need for seqs
11:19:13FromDiscord<Rika> it works for seqs
11:19:21FromDiscord<hmmm> ah really? naisu I'll check
11:19:46FromDiscord<Rika> swap(sq[1], sq[0])
11:21:02FromDiscord<hmmm> yea it's perfect 🥳
11:27:21*jmdaemon quit (Ping timeout: 252 seconds)
11:32:32*acidsys quit (Excess Flood)
11:33:05*acidsys joined #nim
11:35:24*jjido joined #nim
12:06:31*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
12:44:56*krux02 quit (Quit: Leaving)
12:57:27FromDiscord<fbpyr> when compiling to c++ is there a way to create something in nim,↵that (without `{.emit.}`) results in cpp like this ?\:↵`#define PLUGIN_NAME L"a_nim_cpp_plugin"`
13:16:47Amun-Racreate a variable and do the export
13:16:59Amun-Ra(or function returning plugin name)
13:26:10FromDiscord<fbpyr> sent a code paste, see https://play.nim-lang.org/#ix=3RWS
13:29:20FromDiscord<Rika> defines need emit i believe
13:31:10FromDiscord<fbpyr> ah ok. then I guess I will not change it. ↵I just though I had seen a pragma or something for it somewhere, ↵but I may be misremembering.. 🙂
13:36:22*slowButPresent joined #nim
13:38:43*rockcavera joined #nim
13:38:44*rockcavera quit (Changing host)
13:38:44*rockcavera joined #nim
14:21:41FromDiscord<Дуб> cmd
14:22:45*arkurious joined #nim
14:58:13*termer quit (Ping timeout: 240 seconds)
14:58:16*termer_ joined #nim
15:13:37*jjido joined #nim
15:31:49*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
15:50:40FromDiscord<hmmm> bois how can I eval stuff in the chat I want to check something with ya
15:51:01FromDiscord<hmmm> it's unicode weirdery
15:54:25FromDiscord<demotomohiro> !eval import unicode; doAssert "こんばんは".runeLen == 5
15:54:27NimBot<no output>
15:54:38FromDiscord<hmmm> hmm
15:55:02FromDiscord<demotomohiro> !eval import unicode; echo "こんばんは".runeLen
15:55:06NimBot5
15:55:23FromDiscord<hmmm> !eval echo "\u2794"
15:55:25NimBot
15:55:44FromDiscord<hmmm> !eval echo "\u1F87A"
15:55:46NimBotᾇA
15:55:50FromDiscord<hmmm> SEE!
15:55:56FromDiscord<hmmm> they are both supposed to be right arrows
15:56:40FromDiscord<hmmm> the first one has no corresponding left up and down so I'm forced to use the second, but it displays random trash 😦
15:59:11FromDiscord<demotomohiro> echo "\u1f87a" doesn't print right arrow on my Linux terminal.
16:00:01FromDiscord<hmmm> https://media.discordapp.net/attachments/371759389889003532/951872130910408784/wot.png
16:00:13FromDiscord<huantian> I’d assume \\u only looks at the next 4 chars
16:00:18FromDiscord<hmmm> wot
16:00:23FromDiscord<hmmm> 👀
16:00:55FromDiscord<huantian> Try
16:01:22FromDiscord<huantian> !eval echo “\u{11111}”
16:01:24NimBotCompile failed: /usercode/in.nim(1, 9) Error: undeclared identifier: '\'
16:01:43FromDiscord<huantian> Mobile keyboard be like
16:01:54FromDiscord<huantian> https://nim-lang.github.io/Nim/manual.html#lexical-analysis-string-literals
16:02:21FromDiscord<huantian> See this
16:02:31FromDiscord<hmmm> "unicode codepoint with hex value HHHH; exactly four hex digits are allowed"
16:02:33FromDiscord<hmmm> jeesus
16:02:34FromDiscord<hmmm> why
16:02:42FromDiscord<wsantos> I'm creating a config nim file for my app, and I need to store typedesc in tuple but I'm receiving a error, how can I do it ? can I store a string and convert that string to typedesc ?
16:03:15FromDiscord<huantian> In reply to @hmmm "why": What is it supposed to do consume the entire rest of the string as a Unicode character
16:03:21FromDiscord<demotomohiro> !eval echo "\u{1F87A}"
16:03:24NimBot🡺
16:03:25FromDiscord<huantian> Guess when the Unicode hex ends randomly?
16:03:28FromDiscord<hmmm> HA!
16:03:32FromDiscord<hmmm> genius demo
16:03:49FromDiscord<huantian> … that’s literally what I said to do
16:04:03FromDiscord<huantian> And what the manual says
16:04:05FromDiscord<Rika> xd
16:04:13FromDiscord<demotomohiro> I just tried what @huantian said.
16:04:29FromDiscord<hmmm> genus huan too
16:04:57FromDiscord<demotomohiro> But I still don't see right arrow. maybe my browser dont have the corresponding font.
16:05:17FromDiscord<huantian> But anyways who said it doesn’t matter, Nim just needs a way to know when the Unicode hex ends which is why you need {}
16:05:26FromDiscord<huantian> In reply to @demotomohiro "But I still don't": Yeah broken on discord mobile too
16:07:40FromDiscord<Rika> i see it on mine
16:07:49FromDiscord<Rika> though im on linux so that explains a whole lot
16:08:08FromDiscord<huantian> I had to install a font for it to show all the emojis on arch for me
16:10:28FromDiscord<demotomohiro> In reply to @wsantos "I'm creating a config": I think if you store type name as const variable, you might able to convert it to typedesc using macro. But I don't know how to do it.
16:17:31FromDiscord<demotomohiro> Maybe you can use `parseExpr` or `parseStmt` in macro module to convert const string to a type.
16:18:35*jjido joined #nim
16:20:49FromDiscord<wsantos> Sure let me tri I think I can use `ident` or `BindSys` if I use a macro
16:21:27FromDiscord<wsantos> inside a macro ` return ident"string"` this works for string, I'll play around, thank you
16:39:13FromDiscord<System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/582152637009494026/951877331784466512/BvgT0.png↵↵Why can't I print thoses caractèrs on a Terminal ?
16:39:54FromDiscord<System64 ~ Flandre Scarlet> (and why there is no embed ?)
16:49:08FromDiscord<Rika> What encoding is that
16:52:48FromDiscord<System64 ~ Flandre Scarlet> In reply to @Rika "What encoding is that": ASCII
16:52:59FromDiscord<Rika> Doesn’t look like it
16:53:06FromDiscord<Rika> ASCII is 7 bit technically
16:53:29FromDiscord<System64 ~ Flandre Scarlet> Extended ASCII ?
16:53:32FromDiscord<Rika> Which one
16:53:48FromDiscord<Rika> There are 172 billion of those
16:54:02FromDiscord<System64 ~ Flandre Scarlet> Hummm Ansi I think ?
16:54:14FromDiscord<System64 ~ Flandre Scarlet> I looked up ASCII table
16:55:31FromDiscord<Rika> Well just look for the characters you need in Unicode instead
16:56:05FromDiscord<Rika> Finding out the exact kind of ascii that that is isn’t gonna help much I’d say
16:57:39FromDiscord<System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/951886633018486844/Ascii_table-1.png
16:58:41FromDiscord<Rika> “Extended ASCII” really says nothing
16:59:52FromDiscord<System64 ~ Flandre Scarlet> I don't know what are thoses too↵Lemme search
17:00:54FromDiscord<Rika> The reason it’s not working is because most likely the terminal you have used Unicode and Unicode doesn’t match that table
17:01:21FromDiscord<System64 ~ Flandre Scarlet> Okay found out
17:01:26FromDiscord<System64 ~ Flandre Scarlet> It's ansi
17:01:53FromDiscord<Rika> I have no idea what “ANSI extended ASCII” is
17:02:13FromDiscord<System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/951887782878519326/ref04.gif
17:02:35FromDiscord<System64 ~ Flandre Scarlet> Thoses are ANSI
17:04:39FromDiscord<Rika> That’s not what I mean
17:05:09FromDiscord<Rika> Okay, codepage 1252
17:05:25FromDiscord<Rika> Wait no
17:05:31FromDiscord<huantian> Why are we using codepages in 2022
17:05:53FromDiscord<Rika> Don’t ask me
17:05:56FromDiscord<Rika> Ask the lad above
17:06:15FromDiscord<Rika> Just get the characters on the thing you want and search what it is in Unicode really
17:06:54FromDiscord<demotomohiro> Windows command prompts default code page is not unicode even in 2022 for backward compatibility.
17:07:15FromDiscord<System64 ~ Flandre Scarlet> So, what does Windows use ?
17:07:27FromDiscord<Rika> Holy FUCK I found the one you’re referring to
17:07:32FromDiscord<Rika> Windows uses 1252
17:07:36FromDiscord<Rika> The one you sent is 850
17:07:40FromDiscord<Rika> (Old as fuck)
17:07:44FromDiscord<Rika> Use Unicode please
17:08:13FromDiscord<Rika> It is Unicode on the modern Windows Terminal which is slated to replace command prompt I believe
17:08:31FromDiscord<demotomohiro> Which code page windows use depends on which language you use.
17:08:35FromDiscord<Rika> Nim sets it to Unicode as well from what I believe
17:09:38FromDiscord<demotomohiro> Yes. Nim on windows change code page to unicode at start.
17:10:06FromDiscord<Rika> Reference if needed https://en.m.wikipedia.org/wiki/Code_page_850
17:10:46FromDiscord<Rika> It was a miracle that I found this really
17:11:13FromDiscord<System64 ~ Flandre Scarlet> sent a long message, see http://ix.io/3RXZ
17:12:29FromDiscord<System64 ~ Flandre Scarlet> But weird ASCII is only 7 bits
17:13:18FromDiscord<System64 ~ Flandre Scarlet> And I think Char is unsigned ?
17:13:31FromDiscord<Rika> What?
17:13:38FromDiscord<Rika> I’m not sure what you mean anymore
17:13:54FromDiscord<System64 ~ Flandre Scarlet> The Char type is unsigned right ?
17:14:41FromDiscord<Rika> Yes
17:14:57FromDiscord<demotomohiro> !eval echo char.high, ", ", char.low
17:14:59NimBot�,
17:17:34FromDiscord<Rika> What does happen if I print a character over 128
17:17:45FromDiscord<Rika> !eval echo char 200
17:17:47NimBot
17:18:28FromDiscord<demotomohiro> Nimbot is sleeping?
17:18:40FromDiscord<Scoobydoo (Owner)> Yha
17:18:48FromDiscord<Rika> No sorry I think I hit them in the head with a bat a little too hard this time
17:21:00FromDiscord<demotomohiro> In reply to @System64 "It's not that simple": If you don't want Nim change code page, compile your code with `-d:nimDontSetUtf8CodePage`.
17:23:54FromDiscord<System64 ~ Flandre Scarlet> In reply to @demotomohiro "If you don't want": Ah alright !↵↵And then it Will use the right one ?
17:26:21FromDiscord<demotomohiro> Compiling Nim with `-d:nimDontSetUtf8CodePage` just stop Nim changing code page. It doesn't change how Nim string works.
17:28:55FromDiscord<demotomohiro> In reply to @Rika "What does happen if": char value higher than 127 are bytes not beginning of UTF-8 encoded charactor.
17:31:32FromDiscord<Rika> I know but what is printed is what I mean
18:38:43*pro joined #nim
18:52:02FromDiscord<System64 ~ Flandre Scarlet> and is it possible to choose a specific codepage?
19:00:09*pro left #nim (#nim)
19:01:36FromDiscord<Sense> So I have an idea to create a web service on Nim which will provide via webui a simple way to encrypt/decrypt base64 links. Can anyone lead me which library to use to build this kind of stuff?
19:04:52FromDiscord<ajusa> In reply to @Sense "So I have an": I'd recommend using Nimja and Jester. Jester is a web framework, and Nimja is a templating library (for creating HTML)
19:05:29FromDiscord<Sense> In reply to @ajusa "I'd recommend using Nimja": I hope I will be able to create something useful out of this lol
19:05:55FromDiscord<Sense> lemme open paint or something
19:06:02FromDiscord<Sense> so i can show my wacky idea
19:06:57*rockcavera quit (Remote host closed the connection)
19:07:54FromDiscord<Sense> Well, I suck at drawing still
19:08:43FromDiscord<Sense> sent a code paste, see https://paste.rs/s2N
19:10:07FromDiscord<ajusa> gotcha, let me throw something together for you to get started
19:10:33FromDiscord<Sense> you can import from std the base64 link
19:12:02FromDiscord<ajusa> https://gist.github.com/ajusa/21f772ac03b8fe8a4a6065bc69d3c126
19:12:28FromDiscord<ajusa> https://media.discordapp.net/attachments/371759389889003532/951920562865852476/unknown.png
19:12:34FromDiscord<Sense> >one file↵↵wow
19:12:46FromDiscord<Sense> That's impressive
19:13:06FromDiscord<ajusa> thanks lol. I've been experimenting with Nim for webdev for a while now, so I've gotten decent at it
19:13:30FromDiscord<Sense> Yeah, but now another thing is need to get the decrypt one
19:13:40FromDiscord<Sense> (i feel like i am the dumbass, lol)
19:14:13FromDiscord<Sense> I feel like a one because I can't write instantly code, like you spent for about two minutes
19:14:21FromDiscord<Sense> To throw a template for me xD
19:16:59FromDiscord<Sense> But what about decode one though?
19:17:39FromDiscord<ajusa> updated the gist
19:17:45FromDiscord<ajusa> https://media.discordapp.net/attachments/371759389889003532/951921887968129144/unknown.png
19:17:53FromDiscord<ajusa> hopefully that's a good enough starting point for you!
19:18:22FromDiscord<ajusa> https://htmx.org/, https://github.com/dom96/jester, and https://github.com/enthus1ast/nimja will all be helpful if you want to continue down that path
19:18:36FromDiscord<Sense> lolol thank you ^_^
19:18:58FromDiscord<Sense> It's really impressive to see one file
19:29:04FromDiscord<Sense> Hm...
19:29:28FromDiscord<Sense> How could I do write a link, and then it automatically sends you encrypted base64 and vice versa
19:45:56FromDiscord<ajusa> Hm, you'd need to read HTMX docs for that. I think you put hx-post on the input, then an hx-trigger to have it fire on inout
19:46:02FromDiscord<ajusa> (edit) "inout" => "input"
19:47:02FromDiscord<Sense> Now I need to try to make a separate page for bulk encryption/decryption
19:47:34FromDiscord<Sense> by idea it will be in↵`example.org/bulk/encrypt`↵`example.org/bulk/decrypt`
19:47:39FromDiscord<Sense> (edit) "in↵`example.org/bulk/encrypt`↵`example.org/bulk/decrypt`" => "like↵`example.org/bulk/encrypt`↵`example.org/bulk/decrypt`"
20:00:10FromDiscord<Sense> Actually, first thing is about port.
20:00:54FromDiscord<Sense> I would like to have a thing which will first parse the enviroment setting of port, and if port doesn't exist in env then just use default port
20:02:24*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
20:10:53FromDiscord<Sense> sent a code paste, see https://play.nim-lang.org/#ix=3RYC
20:20:07FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3RYD
20:21:33FromDiscord<Sense> gotcha
20:55:24FromDiscord<System64 ~ Flandre Scarlet> is there a convert proc for chars only instead of strings?
21:02:35FromDiscord<System64 ~ Flandre Scarlet> like ``myText..convert("IBM437", "UTF-8")`` but for char
21:06:32*Gustavo6046 joined #nim
21:07:39*Gustavo6046 quit (Remote host closed the connection)
21:07:58*Gustavo6046 joined #nim
21:13:53Amun-Rathat would be outside of char range
21:14:00*krux02 joined #nim
21:15:51FromDiscord<System64 ~ Flandre Scarlet> In reply to @Amun-Ra "that would be outside": I convert to IBM437 format
21:16:12FromDiscord<System64 ~ Flandre Scarlet> which have 255 characters
21:16:32Amun-Rayes, still you can't have 'ó' as char
21:17:21Amun-Rautf-8 for "Φ" is 0x03a6, char high is 0xff
21:18:42Amun-Rayou really want strings and perhaps Runes (encodings module)
21:20:59FromDiscord<System64 ~ Flandre Scarlet> In reply to @Amun-Ra "yes, still you can't": https://media.discordapp.net/attachments/371759389889003532/951952905936732160/unknown.png
21:22:27Amun-Rathat's ibm437 "byte" table
21:22:41FromDiscord<System64 ~ Flandre Scarlet> yeah, I want to use this table
21:22:48Amun-Rayou can't have the exact equivalent of utf-8 as 'char'
21:23:01FromDiscord<System64 ~ Flandre Scarlet> Ah I see
21:23:23FromDiscord<System64 ~ Flandre Scarlet> This is my char table https://media.discordapp.net/attachments/371759389889003532/951953507613818940/unknown.png
21:23:32Amun-Racheck "encodings" module
21:24:50FromDiscord<System64 ~ Flandre Scarlet> https://nim-lang.org/docs/encodings.html↵I'm here
21:26:21FromDiscord<System64 ~ Flandre Scarlet> In reply to @System64 "This is my char": And which table is it?
21:26:34Amun-Rahttps://nim-lang.org/docs/encodings.html#convert%2Cstring%2Cstring%2Cstring
21:27:25Amun-Raimport encodings; echo "\xc0\xc1".convert("UTF-8", "IBM437")
21:30:16FromDiscord<System64 ~ Flandre Scarlet> So I guess I have to convert the entire string?
21:34:17Amun-Rayou can convert one char length strings too
21:36:00FromDiscord<System64 ~ Flandre Scarlet> ah I see↵and is a text conversion fast?
21:38:11Amun-Radepends on what you mean by fast; but you shouldn't be worried about the speed
21:38:41FromDiscord<System64 ~ Flandre Scarlet> ah alright
21:42:55*wyrd quit (Ping timeout: 240 seconds)
21:45:50FromDiscord<System64 ~ Flandre Scarlet> Yeah! Text mode! https://media.discordapp.net/attachments/371759389889003532/951959157135794287/unknown.png
21:47:15FromDiscord<Recruit_main707> nice
21:48:53*wyrd joined #nim
21:50:36Amun-Radoesn't look like one
21:57:11FromDiscord<System64 ~ Flandre Scarlet> In reply to @Amun-Ra "doesn't look like one": Changing mode mid-frame
21:57:15FromDiscord<System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/951962033518174279/unknown.png
21:57:40Amun-Ramid-frame as in mid-char?
21:57:59FromDiscord<System64 ~ Flandre Scarlet> In reply to @Amun-Ra "mid-frame as in mid-char?": Nah, I change layers mid-frame
22:00:45FromDiscord<Forest> https://forum.nim-lang.org/t/5903 hm i just saw this, does it still apply nowadays?
22:00:52FromDiscord<Forest> (edit) "nowadays?" => "now?"
22:01:13FromDiscord<Elegantbeef> Which part?
22:02:38Amun-RaSystem64 - this is my icedraw format reader, written in nim: https://postimg.cc/06CrxfW5
22:03:05FromDiscord<Forest> The part about being able to define a compiler via passes.nim
22:03:24FromDiscord<Elegantbeef> I believe so
22:03:48FromDiscord<Forest> Nice, I'll do some research into that
22:04:00FromDiscord<Forest> Because i hate myself a lot i'ma try Python then Lua :D
22:06:37FromDiscord<Forest> Y'know what, i might as well just use the Nim debug build thingy
22:06:51FromDiscord<System64 ~ Flandre Scarlet> In reply to @Amun-Ra "System64 - this is": I love that kind of art!
22:08:19FromDiscord<auxym> check out https://ansiwave.net/, it's in nim
22:08:51FromDiscord<System64 ~ Flandre Scarlet> Oh I'll sure love this!
22:10:33FromDiscord<System64 ~ Flandre Scarlet> It reminds me the cracking groups art
22:11:55FromDiscord<System64 ~ Flandre Scarlet> In reply to @auxym "check out https://ansiwave.net/, it's": was it hard to make?
22:16:28FromDiscord<System64 ~ Flandre Scarlet> wtf it looks like MML https://media.discordapp.net/attachments/371759389889003532/951966866358804550/unknown.png
22:23:01FromDiscord<auxym> I didn't make it, check out this talk by the author: https://www.youtube.com/watch?v=cBqBfPRWla8
22:24:38FromDiscord<System64 ~ Flandre Scarlet> Oh I didn't know Nim had a YouTube channel
22:26:49*jmdaemon joined #nim
22:31:32*Goodbye_Vincent4 joined #nim
22:32:26*lucerne8 joined #nim
22:33:38*koltrast_ joined #nim
22:35:50*mahlon_ joined #nim
22:39:44*koltrast quit (*.net *.split)
22:39:44*def- quit (*.net *.split)
22:39:44*rb quit (*.net *.split)
22:39:44*flynn quit (*.net *.split)
22:39:44*Goodbye_Vincent quit (*.net *.split)
22:39:45*ssiyad quit (*.net *.split)
22:39:45*tinystoat quit (*.net *.split)
22:39:45*mahlon quit (*.net *.split)
22:39:45*lucerne quit (*.net *.split)
22:39:45*adium quit (*.net *.split)
22:39:46*Goodbye_Vincent4 is now known as Goodbye_Vincent
22:39:47*lucerne8 is now known as lucerne
22:45:26*def- joined #nim
22:45:26*rb joined #nim
22:45:26*flynn joined #nim
22:45:26*ssiyad joined #nim
22:45:26*tinystoat joined #nim
22:46:07*flynn quit (Max SendQ exceeded)
22:47:15*flynn joined #nim
22:47:25*adium joined #nim
22:57:16FromDiscord<dilawar (Dilawar Singh)> not for all packages. E.g. `cpack` from `cmake` conflicts with `cpack` from choco. So `cmake` is not added to path by default (I think there is a special installargs to do this). Also package `visualstudio2019community` is not added to PATH.
23:14:25*jmdaemon quit (Ping timeout: 256 seconds)
23:31:32*acidsys quit (Quit: I love you.)
23:31:47*acidsys joined #nim
23:31:54*acidsys quit (Excess Flood)
23:32:30*acidsys joined #nim
23:33:24*jjido joined #nim
23:33:55FromDiscord<dilawar (Dilawar Singh)> How to capture output written to stdout or using `logging` module during `testament all`?
23:48:06FromDiscord<Elegantbeef> You can test the stdout of a test inside the file https://nim-lang.org/docs/testament.html#unitests-examples
23:54:52FromDiscord<dilawar (Dilawar Singh)> > You can test the stdout of a test inside the file https://nim-lang.org/docs/testament.html#unitests-examples↵Thanks. I assumed wrongly that echo to stdout will be hidden by default. Like `cargo test` in rust.
23:55:29FromDiscord<Elegantbeef> Isnt the stdout hidden by default?
23:57:45FromDiscord<dilawar (Dilawar Singh)> `echo 'x'` is showing up in `testament pattern "tests/test.nim"` output but `logger.info('x')` is not (maybe I am not initializing logger properly). Anyway `echo` is good enough for now.
23:58:05FromDiscord<Elegantbeef> You did make a console logger right?
23:59:00FromDiscord<dilawar (Dilawar Singh)> I don't think so. reading about it now.. `newConsoleLogger` seems to be neccessary in every test file.
23:59:20FromDiscord<Elegantbeef> Well if you're testing stdout it's kinda a requirement to log to the stdout