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:10 | FromDiscord | <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:40 | FromDiscord | <Elegantbeef> I'll help in a few minutes |
00:33:44 | FromDiscord | <mattrb> Tyvm :) |
00:37:32 | FromDiscord | <Elegantbeef> Move the object type down and the value stuff ub then put a `import chunk` above the object type stuff |
00:37:38 | FromDiscord | <Elegantbeef> It might work, though looks like it may not |
00:37:45 | FromDiscord | <Elegantbeef> Ah nvm it's not going to |
00:38:46 | FromDiscord | <Elegantbeef> Perhaps a `Obj[T]` then instantiate it with `Chunk`? |
00:38:52 | FromDiscord | <Elegantbeef> I dont know this is an odd structure to get around |
00:41:15 | FromDiscord | <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:36 | FromDiscord | <Elegantbeef> Well this is cyclical in a typedefinition and also across a module |
00:42:14 | FromDiscord | <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:23 | FromDiscord | <Elegantbeef> So a generic might be the way around this, or put them all together |
00:44:31 | FromDiscord | <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:44 | FromDiscord | <mattrb> I'm guessing that's going to be the least hacky way though |
00:46:18 | FromDiscord | <Elegantbeef> I mean generic isnt that hacky 😛 |
00:47:03 | FromDiscord | <mattrb> Not too hacky, but requires some extra contextual overhead wherever I instantiate Obj |
00:47:06 | FromDiscord | <mattrb> Right? |
00:47:48 | FromDiscord | <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:15 | NimEventer | New thread by Mardiyah: Default argument in a template,, see https://forum.nim-lang.org/t/8999 |
01:17:46 | NimEventer | New 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:18 | FromDiscord | <Elegantbeef> @mattrb\: another hack would be to `ref tuple[code: seq[Byte], lines: seq[int], constants: seq[Value]` 😛 |
01:51:26 | FromDiscord | <Elegantbeef> Still looking at the code |
01:54:54 | FromDiscord | <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:06 | FromDiscord | <Patitotective> (edit) "form" => "from" |
01:55:19 | FromDiscord | <Elegantbeef> `discard seq.pop` |
01:55:33 | FromDiscord | <Patitotective> thanks lol |
01:57:00 | FromDiscord | <Elegantbeef> you can also do `seq.setLen(seq.len - 1)` |
01:57:13 | FromDiscord | <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:50 | FromDiscord | <dangbinghoo> hi, I have problems: |
02:22:03 | FromDiscord | <huantian> I have problems too |
02:22:14 | FromDiscord | <Elegantbeef> Sadly this isnt therapy |
02:22:14 | FromDiscord | <dangbinghoo> sent a code paste, see https://play.nim-lang.org/#ix=3RV2 |
02:22:51 | FromDiscord | <Elegantbeef> `eval` runs with nimscript iirc |
02:22:56 | FromDiscord | <Elegantbeef> so `stdout` doesnt exist |
02:23:41 | FromDiscord | <huantian> yep https://media.discordapp.net/attachments/371759389889003532/951666690754752532/unknown.png |
02:24:38 | FromDiscord | <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:41 | nrds | <Prestige99> How do you check the os name? |
05:02:52 | FromDiscord | <Elegantbeef> `HostOs` |
05:03:50 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/distros.html or this |
05:03:51 | nrds | <Prestige99> Thanks |
05:04:34 | nrds | <Prestige99> Neat thank you |
05:06:39 | FromDiscord | <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:58 | NimEventer | New thread by Oyster: Any compressed package supports password on Windows?, see https://forum.nim-lang.org/t/9000 |
05:07:06 | FromDiscord | <michaelb.eth> (edit) "project:" => "project:↵https://github.com/mratsim/Arraymancer" |
05:09:42 | FromDiscord | <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:50 | FromDiscord | <retkid> I would need to read at least a few books first |
05:10:43 | FromDiscord | <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:52 | FromDiscord | <retkid> and also I don't really care if its in Nim or not |
05:11:18 | FromDiscord | <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:47 | FromDiscord | <michaelb.eth> In reply to @retkid "and also, that has": fair enough, my apologies then for pinging you with something irrelevant |
05:12:10 | FromDiscord | <michaelb.eth> (edit) "detecting" => "detecting/engaging" |
05:12:57 | FromDiscord | <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:49 | nrds | <Prestige99> Why can't we use creatDir with nimscript? |
06:45:19 | FromDiscord | <Elegantbeef> Cause it wasnt interopped |
06:45:33 | FromDiscord | <Elegantbeef> you use `mkDir` in nimscript |
06:46:01 | nrds | <Prestige99> Where is that defined? |
06:46:08 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/nimscript.html |
06:46:10 | FromDiscord | <Rika> module nimscript |
06:46:19 | nrds | <Prestige99> neat ty |
06:46:53 | FromDiscord | <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:04 | FromDiscord | <Дуб> 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:48 | FromDiscord | <Rika> So you want Nim to input a string into an arbitrary terminal input? I’m not sure |
08:22:03 | FromDiscord | <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:44 | FromDiscord | <Elegantbeef> Yea if Nim didnt start the process there is no easy way to do it really |
08:22:46 | FromDiscord | <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:28 | FromDiscord | <Дуб> i start ssh connection in nim |
08:26:42 | FromDiscord | <Дуб> and trying to exec command on remote machine |
08:27:06 | FromDiscord | <Дуб> 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:25 | FromDiscord | <Elegantbeef> Then you should be able to send input if you use `startProcess` |
08:27:48 | FromDiscord | <Дуб> some example? :hmm: |
08:30:17 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3RVW |
08:31:08 | FromDiscord | <Elegantbeef> Though you may want to consider using libssh |
08:31:22 | FromDiscord | <Дуб> sent a code paste, see https://play.nim-lang.org/#ix=3RVX |
08:31:22 | FromDiscord | <Elegantbeef> https://github.com/ba0f3/libssh2.nim exists for instance |
08:31:44 | FromDiscord | <Elegantbeef> Yea `execShellCmd` isnt ideal for this |
08:31:57 | FromDiscord | <Elegantbeef> It runs a single command and blocks until it terminates |
08:32:03 | FromDiscord | <Дуб> meh |
08:32:24 | FromDiscord | <Дуб> 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:54 | FromDiscord | <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:25 | FromDiscord | <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:44 | FromDiscord | <Дуб> big tnx! will test this then |
08:56:05 | FromDiscord | <Require Support> trying to transform this cast from c to nim `(const char )` but keep getting errors, please help |
08:56:57 | FromDiscord | <Elegantbeef> What's the C code and what's the Nim code? |
09:00:48 | FromDiscord | <Require Support> sent a code paste, see https://paste.rs/jF8 |
09:00:58 | FromDiscord | <Elegantbeef> remove the `const` |
09:01:18 | FromDiscord | <Elegantbeef> `const T` isnt a thing Nim concerns itself with |
09:01:19 | FromDiscord | <Rika> Nim has not “constant pointers” |
09:01:58 | FromDiscord | <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:09 | FromDiscord | <Require Support> (edit) "cost" => "const" |
09:02:37 | FromDiscord | <Elegantbeef> If those are strings you should just do `cstring sModuleName` and `cstring pEntry.BaseDllName.Buffer` |
09:02:50 | FromDiscord | <Elegantbeef> The warning is just to say "Hey depending on the program the Cstring might be unsafe" |
09:03:13 | FromDiscord | <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:54 | FromDiscord | <Schelz> In reply to @Дуб "defact it looks like:": This works with linux terminal ? |
09:30:28 | FromDiscord | <Elegantbeef> It runs it in your shell |
09:36:17 | FromDiscord | <Require Support> is pointer arithmetic supported by nim ? |
09:36:38 | FromDiscord | <Recruit_main707> Yes, you can do it |
09:37:11 | FromDiscord | <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:10 | FromDiscord | <Дуб> In reply to @Schelz "This works with linux": yeap |
09:54:29 | * | krux02 joined #nim |
10:10:25 | * | Guest46 joined #nim |
10:10:37 | Guest46 | hello |
10:10:59 | FromDiscord | <fbpyr> sent a code paste, see https://play.nim-lang.org/#ix=3RWl |
10:11:01 | * | Guest46 quit (Client Quit) |
10:14:15 | FromDiscord | <Rika> https://nim-lang.org/docs/widestrs.html#WideCString |
10:18:19 | FromDiscord | <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:39 | FromDiscord | <Elegantbeef> dereference and cast that to a `ptr wchar_t` |
10:21:15 | FromDiscord | <fbpyr> oh wow it just worked when I changed the type signature of print\_cstring\_to\_console - thank you so much!! |
10:21:28 | FromDiscord | <Elegantbeef> Seems they already have it handled |
10:21:34 | FromDiscord | <fbpyr> yay! 🎉 🙂 |
10:22:29 | FromDiscord | <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:45 | FromDiscord | <Elegantbeef> Sure, not that you need a template for it |
10:23:11 | FromDiscord | <fbpyr> I see - I just had found it on the forum.. 🙂 |
10:24:00 | FromDiscord | <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:34 | FromDiscord | <hmmm> "Warning: See corresponding Defect; IndexError is deprecated [Deprecated]" |
11:08:42 | FromDiscord | <hmmm> what should I use instead 🤔 |
11:12:38 | FromDiscord | <pointystick> It seems to be an alias for IndexDefect, so presumably that: https://nim-lang.org/docs/system.html#IndexError |
11:15:33 | FromDiscord | <hmmm> yea changing to indexdefect worked, still an ugly hack but now without warning 😊 |
11:16:59 | FromDiscord | <ynfle> In reply to @hmmm "yea changing to indexdefect": Why is it a hack? |
11:17:46 | FromDiscord | <hmmm> hmm because I wanted to check the index normally but IIRC the program exploded so I used try / error |
11:18:26 | FromDiscord | <hmmm> another question bros, what can I use to swap an element of a seq with the following one |
11:18:28 | FromDiscord | <ynfle> In reply to @hmmm "hmm because I wanted": You can check with ifs |
11:18:44 | FromDiscord | <ynfle> In reply to @hmmm "another question bros, what": There is a swap proc in system I think |
11:18:55 | FromDiscord | <hmmm> hmm seems it works on normal vars |
11:18:59 | FromDiscord | <hmmm> I need for seqs |
11:19:13 | FromDiscord | <Rika> it works for seqs |
11:19:21 | FromDiscord | <hmmm> ah really? naisu I'll check |
11:19:46 | FromDiscord | <Rika> swap(sq[1], sq[0]) |
11:21:02 | FromDiscord | <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:27 | FromDiscord | <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:47 | Amun-Ra | create a variable and do the export |
13:16:59 | Amun-Ra | (or function returning plugin name) |
13:26:10 | FromDiscord | <fbpyr> sent a code paste, see https://play.nim-lang.org/#ix=3RWS |
13:29:20 | FromDiscord | <Rika> defines need emit i believe |
13:31:10 | FromDiscord | <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:41 | FromDiscord | <Дуб> 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:40 | FromDiscord | <hmmm> bois how can I eval stuff in the chat I want to check something with ya |
15:51:01 | FromDiscord | <hmmm> it's unicode weirdery |
15:54:25 | FromDiscord | <demotomohiro> !eval import unicode; doAssert "こんばんは".runeLen == 5 |
15:54:27 | NimBot | <no output> |
15:54:38 | FromDiscord | <hmmm> hmm |
15:55:02 | FromDiscord | <demotomohiro> !eval import unicode; echo "こんばんは".runeLen |
15:55:06 | NimBot | 5 |
15:55:23 | FromDiscord | <hmmm> !eval echo "\u2794" |
15:55:25 | NimBot | ➔ |
15:55:44 | FromDiscord | <hmmm> !eval echo "\u1F87A" |
15:55:46 | NimBot | ᾇA |
15:55:50 | FromDiscord | <hmmm> SEE! |
15:55:56 | FromDiscord | <hmmm> they are both supposed to be right arrows |
15:56:40 | FromDiscord | <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:11 | FromDiscord | <demotomohiro> echo "\u1f87a" doesn't print right arrow on my Linux terminal. |
16:00:01 | FromDiscord | <hmmm> https://media.discordapp.net/attachments/371759389889003532/951872130910408784/wot.png |
16:00:13 | FromDiscord | <huantian> I’d assume \\u only looks at the next 4 chars |
16:00:18 | FromDiscord | <hmmm> wot |
16:00:23 | FromDiscord | <hmmm> 👀 |
16:00:55 | FromDiscord | <huantian> Try |
16:01:22 | FromDiscord | <huantian> !eval echo “\u{11111}” |
16:01:24 | NimBot | Compile failed: /usercode/in.nim(1, 9) Error: undeclared identifier: '\' |
16:01:43 | FromDiscord | <huantian> Mobile keyboard be like |
16:01:54 | FromDiscord | <huantian> https://nim-lang.github.io/Nim/manual.html#lexical-analysis-string-literals |
16:02:21 | FromDiscord | <huantian> See this |
16:02:31 | FromDiscord | <hmmm> "unicode codepoint with hex value HHHH; exactly four hex digits are allowed" |
16:02:33 | FromDiscord | <hmmm> jeesus |
16:02:34 | FromDiscord | <hmmm> why |
16:02:42 | FromDiscord | <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:15 | FromDiscord | <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:21 | FromDiscord | <demotomohiro> !eval echo "\u{1F87A}" |
16:03:24 | NimBot | 🡺 |
16:03:25 | FromDiscord | <huantian> Guess when the Unicode hex ends randomly? |
16:03:28 | FromDiscord | <hmmm> HA! |
16:03:32 | FromDiscord | <hmmm> genius demo |
16:03:49 | FromDiscord | <huantian> … that’s literally what I said to do |
16:04:03 | FromDiscord | <huantian> And what the manual says |
16:04:05 | FromDiscord | <Rika> xd |
16:04:13 | FromDiscord | <demotomohiro> I just tried what @huantian said. |
16:04:29 | FromDiscord | <hmmm> genus huan too |
16:04:57 | FromDiscord | <demotomohiro> But I still don't see right arrow. maybe my browser dont have the corresponding font. |
16:05:17 | FromDiscord | <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:26 | FromDiscord | <huantian> In reply to @demotomohiro "But I still don't": Yeah broken on discord mobile too |
16:07:40 | FromDiscord | <Rika> i see it on mine |
16:07:49 | FromDiscord | <Rika> though im on linux so that explains a whole lot |
16:08:08 | FromDiscord | <huantian> I had to install a font for it to show all the emojis on arch for me |
16:10:28 | FromDiscord | <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:31 | FromDiscord | <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:49 | FromDiscord | <wsantos> Sure let me tri I think I can use `ident` or `BindSys` if I use a macro |
16:21:27 | FromDiscord | <wsantos> inside a macro ` return ident"string"` this works for string, I'll play around, thank you |
16:39:13 | FromDiscord | <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:54 | FromDiscord | <System64 ~ Flandre Scarlet> (and why there is no embed ?) |
16:49:08 | FromDiscord | <Rika> What encoding is that |
16:52:48 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Rika "What encoding is that": ASCII |
16:52:59 | FromDiscord | <Rika> Doesn’t look like it |
16:53:06 | FromDiscord | <Rika> ASCII is 7 bit technically |
16:53:29 | FromDiscord | <System64 ~ Flandre Scarlet> Extended ASCII ? |
16:53:32 | FromDiscord | <Rika> Which one |
16:53:48 | FromDiscord | <Rika> There are 172 billion of those |
16:54:02 | FromDiscord | <System64 ~ Flandre Scarlet> Hummm Ansi I think ? |
16:54:14 | FromDiscord | <System64 ~ Flandre Scarlet> I looked up ASCII table |
16:55:31 | FromDiscord | <Rika> Well just look for the characters you need in Unicode instead |
16:56:05 | FromDiscord | <Rika> Finding out the exact kind of ascii that that is isn’t gonna help much I’d say |
16:57:39 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/951886633018486844/Ascii_table-1.png |
16:58:41 | FromDiscord | <Rika> “Extended ASCII” really says nothing |
16:59:52 | FromDiscord | <System64 ~ Flandre Scarlet> I don't know what are thoses too↵Lemme search |
17:00:54 | FromDiscord | <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:21 | FromDiscord | <System64 ~ Flandre Scarlet> Okay found out |
17:01:26 | FromDiscord | <System64 ~ Flandre Scarlet> It's ansi |
17:01:53 | FromDiscord | <Rika> I have no idea what “ANSI extended ASCII” is |
17:02:13 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/951887782878519326/ref04.gif |
17:02:35 | FromDiscord | <System64 ~ Flandre Scarlet> Thoses are ANSI |
17:04:39 | FromDiscord | <Rika> That’s not what I mean |
17:05:09 | FromDiscord | <Rika> Okay, codepage 1252 |
17:05:25 | FromDiscord | <Rika> Wait no |
17:05:31 | FromDiscord | <huantian> Why are we using codepages in 2022 |
17:05:53 | FromDiscord | <Rika> Don’t ask me |
17:05:56 | FromDiscord | <Rika> Ask the lad above |
17:06:15 | FromDiscord | <Rika> Just get the characters on the thing you want and search what it is in Unicode really |
17:06:54 | FromDiscord | <demotomohiro> Windows command prompts default code page is not unicode even in 2022 for backward compatibility. |
17:07:15 | FromDiscord | <System64 ~ Flandre Scarlet> So, what does Windows use ? |
17:07:27 | FromDiscord | <Rika> Holy FUCK I found the one you’re referring to |
17:07:32 | FromDiscord | <Rika> Windows uses 1252 |
17:07:36 | FromDiscord | <Rika> The one you sent is 850 |
17:07:40 | FromDiscord | <Rika> (Old as fuck) |
17:07:44 | FromDiscord | <Rika> Use Unicode please |
17:08:13 | FromDiscord | <Rika> It is Unicode on the modern Windows Terminal which is slated to replace command prompt I believe |
17:08:31 | FromDiscord | <demotomohiro> Which code page windows use depends on which language you use. |
17:08:35 | FromDiscord | <Rika> Nim sets it to Unicode as well from what I believe |
17:09:38 | FromDiscord | <demotomohiro> Yes. Nim on windows change code page to unicode at start. |
17:10:06 | FromDiscord | <Rika> Reference if needed https://en.m.wikipedia.org/wiki/Code_page_850 |
17:10:46 | FromDiscord | <Rika> It was a miracle that I found this really |
17:11:13 | FromDiscord | <System64 ~ Flandre Scarlet> sent a long message, see http://ix.io/3RXZ |
17:12:29 | FromDiscord | <System64 ~ Flandre Scarlet> But weird ASCII is only 7 bits |
17:13:18 | FromDiscord | <System64 ~ Flandre Scarlet> And I think Char is unsigned ? |
17:13:31 | FromDiscord | <Rika> What? |
17:13:38 | FromDiscord | <Rika> I’m not sure what you mean anymore |
17:13:54 | FromDiscord | <System64 ~ Flandre Scarlet> The Char type is unsigned right ? |
17:14:41 | FromDiscord | <Rika> Yes |
17:14:57 | FromDiscord | <demotomohiro> !eval echo char.high, ", ", char.low |
17:14:59 | NimBot | �, |
17:17:34 | FromDiscord | <Rika> What does happen if I print a character over 128 |
17:17:45 | FromDiscord | <Rika> !eval echo char 200 |
17:17:47 | NimBot | � |
17:18:28 | FromDiscord | <demotomohiro> Nimbot is sleeping? |
17:18:40 | FromDiscord | <Scoobydoo (Owner)> Yha |
17:18:48 | FromDiscord | <Rika> No sorry I think I hit them in the head with a bat a little too hard this time |
17:21:00 | FromDiscord | <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:54 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "If you don't want": Ah alright !↵↵And then it Will use the right one ? |
17:26:21 | FromDiscord | <demotomohiro> Compiling Nim with `-d:nimDontSetUtf8CodePage` just stop Nim changing code page. It doesn't change how Nim string works. |
17:28:55 | FromDiscord | <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:32 | FromDiscord | <Rika> I know but what is printed is what I mean |
18:38:43 | * | pro joined #nim |
18:52:02 | FromDiscord | <System64 ~ Flandre Scarlet> and is it possible to choose a specific codepage? |
19:00:09 | * | pro left #nim (#nim) |
19:01:36 | FromDiscord | <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:52 | FromDiscord | <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:29 | FromDiscord | <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:55 | FromDiscord | <Sense> lemme open paint or something |
19:06:02 | FromDiscord | <Sense> so i can show my wacky idea |
19:06:57 | * | rockcavera quit (Remote host closed the connection) |
19:07:54 | FromDiscord | <Sense> Well, I suck at drawing still |
19:08:43 | FromDiscord | <Sense> sent a code paste, see https://paste.rs/s2N |
19:10:07 | FromDiscord | <ajusa> gotcha, let me throw something together for you to get started |
19:10:33 | FromDiscord | <Sense> you can import from std the base64 link |
19:12:02 | FromDiscord | <ajusa> https://gist.github.com/ajusa/21f772ac03b8fe8a4a6065bc69d3c126 |
19:12:28 | FromDiscord | <ajusa> https://media.discordapp.net/attachments/371759389889003532/951920562865852476/unknown.png |
19:12:34 | FromDiscord | <Sense> >one file↵↵wow |
19:12:46 | FromDiscord | <Sense> That's impressive |
19:13:06 | FromDiscord | <ajusa> thanks lol. I've been experimenting with Nim for webdev for a while now, so I've gotten decent at it |
19:13:30 | FromDiscord | <Sense> Yeah, but now another thing is need to get the decrypt one |
19:13:40 | FromDiscord | <Sense> (i feel like i am the dumbass, lol) |
19:14:13 | FromDiscord | <Sense> I feel like a one because I can't write instantly code, like you spent for about two minutes |
19:14:21 | FromDiscord | <Sense> To throw a template for me xD |
19:16:59 | FromDiscord | <Sense> But what about decode one though? |
19:17:39 | FromDiscord | <ajusa> updated the gist |
19:17:45 | FromDiscord | <ajusa> https://media.discordapp.net/attachments/371759389889003532/951921887968129144/unknown.png |
19:17:53 | FromDiscord | <ajusa> hopefully that's a good enough starting point for you! |
19:18:22 | FromDiscord | <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:36 | FromDiscord | <Sense> lolol thank you ^_^ |
19:18:58 | FromDiscord | <Sense> It's really impressive to see one file |
19:29:04 | FromDiscord | <Sense> Hm... |
19:29:28 | FromDiscord | <Sense> How could I do write a link, and then it automatically sends you encrypted base64 and vice versa |
19:45:56 | FromDiscord | <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:02 | FromDiscord | <ajusa> (edit) "inout" => "input" |
19:47:02 | FromDiscord | <Sense> Now I need to try to make a separate page for bulk encryption/decryption |
19:47:34 | FromDiscord | <Sense> by idea it will be in↵`example.org/bulk/encrypt`↵`example.org/bulk/decrypt` |
19:47:39 | FromDiscord | <Sense> (edit) "in↵`example.org/bulk/encrypt`↵`example.org/bulk/decrypt`" => "like↵`example.org/bulk/encrypt`↵`example.org/bulk/decrypt`" |
20:00:10 | FromDiscord | <Sense> Actually, first thing is about port. |
20:00:54 | FromDiscord | <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:53 | FromDiscord | <Sense> sent a code paste, see https://play.nim-lang.org/#ix=3RYC |
20:20:07 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3RYD |
20:21:33 | FromDiscord | <Sense> gotcha |
20:55:24 | FromDiscord | <System64 ~ Flandre Scarlet> is there a convert proc for chars only instead of strings? |
21:02:35 | FromDiscord | <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:53 | Amun-Ra | that would be outside of char range |
21:14:00 | * | krux02 joined #nim |
21:15:51 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Amun-Ra "that would be outside": I convert to IBM437 format |
21:16:12 | FromDiscord | <System64 ~ Flandre Scarlet> which have 255 characters |
21:16:32 | Amun-Ra | yes, still you can't have 'ó' as char |
21:17:21 | Amun-Ra | utf-8 for "Φ" is 0x03a6, char high is 0xff |
21:18:42 | Amun-Ra | you really want strings and perhaps Runes (encodings module) |
21:20:59 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Amun-Ra "yes, still you can't": https://media.discordapp.net/attachments/371759389889003532/951952905936732160/unknown.png |
21:22:27 | Amun-Ra | that's ibm437 "byte" table |
21:22:41 | FromDiscord | <System64 ~ Flandre Scarlet> yeah, I want to use this table |
21:22:48 | Amun-Ra | you can't have the exact equivalent of utf-8 as 'char' |
21:23:01 | FromDiscord | <System64 ~ Flandre Scarlet> Ah I see |
21:23:23 | FromDiscord | <System64 ~ Flandre Scarlet> This is my char table https://media.discordapp.net/attachments/371759389889003532/951953507613818940/unknown.png |
21:23:32 | Amun-Ra | check "encodings" module |
21:24:50 | FromDiscord | <System64 ~ Flandre Scarlet> https://nim-lang.org/docs/encodings.html↵I'm here |
21:26:21 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @System64 "This is my char": And which table is it? |
21:26:34 | Amun-Ra | https://nim-lang.org/docs/encodings.html#convert%2Cstring%2Cstring%2Cstring |
21:27:25 | Amun-Ra | import encodings; echo "\xc0\xc1".convert("UTF-8", "IBM437") |
21:30:16 | FromDiscord | <System64 ~ Flandre Scarlet> So I guess I have to convert the entire string? |
21:34:17 | Amun-Ra | you can convert one char length strings too |
21:36:00 | FromDiscord | <System64 ~ Flandre Scarlet> ah I see↵and is a text conversion fast? |
21:38:11 | Amun-Ra | depends on what you mean by fast; but you shouldn't be worried about the speed |
21:38:41 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright |
21:42:55 | * | wyrd quit (Ping timeout: 240 seconds) |
21:45:50 | FromDiscord | <System64 ~ Flandre Scarlet> Yeah! Text mode! https://media.discordapp.net/attachments/371759389889003532/951959157135794287/unknown.png |
21:47:15 | FromDiscord | <Recruit_main707> nice |
21:48:53 | * | wyrd joined #nim |
21:50:36 | Amun-Ra | doesn't look like one |
21:57:11 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Amun-Ra "doesn't look like one": Changing mode mid-frame |
21:57:15 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/951962033518174279/unknown.png |
21:57:40 | Amun-Ra | mid-frame as in mid-char? |
21:57:59 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Amun-Ra "mid-frame as in mid-char?": Nah, I change layers mid-frame |
22:00:45 | FromDiscord | <Forest> https://forum.nim-lang.org/t/5903 hm i just saw this, does it still apply nowadays? |
22:00:52 | FromDiscord | <Forest> (edit) "nowadays?" => "now?" |
22:01:13 | FromDiscord | <Elegantbeef> Which part? |
22:02:38 | Amun-Ra | System64 - this is my icedraw format reader, written in nim: https://postimg.cc/06CrxfW5 |
22:03:05 | FromDiscord | <Forest> The part about being able to define a compiler via passes.nim |
22:03:24 | FromDiscord | <Elegantbeef> I believe so |
22:03:48 | FromDiscord | <Forest> Nice, I'll do some research into that |
22:04:00 | FromDiscord | <Forest> Because i hate myself a lot i'ma try Python then Lua :D |
22:06:37 | FromDiscord | <Forest> Y'know what, i might as well just use the Nim debug build thingy |
22:06:51 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Amun-Ra "System64 - this is": I love that kind of art! |
22:08:19 | FromDiscord | <auxym> check out https://ansiwave.net/, it's in nim |
22:08:51 | FromDiscord | <System64 ~ Flandre Scarlet> Oh I'll sure love this! |
22:10:33 | FromDiscord | <System64 ~ Flandre Scarlet> It reminds me the cracking groups art |
22:11:55 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @auxym "check out https://ansiwave.net/, it's": was it hard to make? |
22:16:28 | FromDiscord | <System64 ~ Flandre Scarlet> wtf it looks like MML https://media.discordapp.net/attachments/371759389889003532/951966866358804550/unknown.png |
22:23:01 | FromDiscord | <auxym> I didn't make it, check out this talk by the author: https://www.youtube.com/watch?v=cBqBfPRWla8 |
22:24:38 | FromDiscord | <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:16 | FromDiscord | <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:55 | FromDiscord | <dilawar (Dilawar Singh)> How to capture output written to stdout or using `logging` module during `testament all`? |
23:48:06 | FromDiscord | <Elegantbeef> You can test the stdout of a test inside the file https://nim-lang.org/docs/testament.html#unitests-examples |
23:54:52 | FromDiscord | <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:29 | FromDiscord | <Elegantbeef> Isnt the stdout hidden by default? |
23:57:45 | FromDiscord | <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:05 | FromDiscord | <Elegantbeef> You did make a console logger right? |
23:59:00 | FromDiscord | <dilawar (Dilawar Singh)> I don't think so. reading about it now.. `newConsoleLogger` seems to be neccessary in every test file. |
23:59:20 | FromDiscord | <Elegantbeef> Well if you're testing stdout it's kinda a requirement to log to the stdout |