01:34:37 | FromDiscord | <deech> Does Nim have a UUID generator in the standard library? |
01:35:10 | FromDiscord | <flywind> No |
01:36:19 | FromDiscord | <flywind> It has a unique id generator called `oid` though. |
01:39:20 | FromDiscord | <deech> I've never heard of that! Thanks I'll look into it. |
02:29:17 | * | jtdeng joined #nim |
02:32:49 | FromDiscord | <!!sharpcdf!!> does anyone know why i could be getting an IO error when unzipping a zip archive with zippy? |
02:33:20 | FromDiscord | <huantian> Does the ioerror have any addition message |
02:33:28 | FromDiscord | <!!sharpcdf!!> yea let me get it |
02:34:24 | FromDiscord | <!!sharpcdf!!> sent a code paste, see https://play.nim-lang.org/#ix=48if |
02:35:22 | FromDiscord | <!!sharpcdf!!> ive had this for a while, no idea what to make of it :/ |
02:35:36 | FromDiscord | <huantian> Does it work if you change the output path |
02:35:48 | FromDiscord | <!!sharpcdf!!> i manually downloaded the same release and looking in the directory, all that was there were .odin files |
02:35:53 | FromDiscord | <!!sharpcdf!!> In reply to @huantian "Does it work if": ill try |
02:35:56 | FromDiscord | <EyeCon> In reply to @Elegantbeef "Do look at the": Can it be that your macro has a bug where the output is only one line long (a tuple) and there is no responseHandler? I tried many thing which didn't work, then I divided it into 2 lines, then it did work, which doesn't make sense |
02:36:03 | FromDiscord | <huantian> I’m assuming the path it gives you at the end there is where you want it to be crafted to |
02:36:28 | FromDiscord | <!!sharpcdf!!> do you mean instead of ~/.jitter do ~ or something |
02:37:44 | FromDiscord | <ricky> there an ez way u can override a nim stdlib file, maybe a compiler flag? |
02:39:35 | FromDiscord | <!!sharpcdf!!> not that i know of |
02:42:01 | FromDiscord | <!!sharpcdf!!> sent a code paste, see https://play.nim-lang.org/#ix=48ii |
02:43:22 | FromDiscord | <huantian> What is that path on the bottom |
02:43:25 | FromDiscord | <huantian> The printer one |
02:43:36 | FromDiscord | <!!sharpcdf!!> its a path thats inside the zip file |
02:43:56 | FromDiscord | <!!sharpcdf!!> i tried looking in it after extracting it manually, its just some .odin source files |
02:45:09 | FromDiscord | <huantian> Oh huh |
02:45:23 | FromDiscord | <huantian> Maybe there’s like a read only file? |
02:48:14 | FromDiscord | <!!sharpcdf!!> let me see |
02:48:44 | FromDiscord | <!!sharpcdf!!> no they both have user write |
02:49:01 | FromDiscord | <!!sharpcdf!!> https://media.discordapp.net/attachments/371759389889003532/1011104680182554724/unknown.png |
03:12:53 | * | jtdeng quit (Remote host closed the connection) |
04:01:57 | * | jtdeng joined #nim |
04:15:46 | * | jtdeng_ joined #nim |
04:18:28 | * | jtdeng quit (Quit: Client closed) |
04:18:56 | * | jtdeng_ is now known as jtdeng |
04:25:11 | * | jtdeng49 joined #nim |
04:27:20 | * | derpydoo joined #nim |
04:31:38 | * | jtdeng_ joined #nim |
04:32:56 | * | jtdeng_ quit (Client Quit) |
04:36:48 | * | jtdeng thinking |
04:38:25 | * | jtdeng left #nim (#nim) |
04:40:29 | * | jtdeng69 joined #nim |
04:45:12 | * | jtdeng joined #nim |
04:47:36 | FromDiscord | <Elegantbeef> Running |
04:50:12 | * | jtdeng69 quit (Quit: Client closed) |
04:50:33 | * | jtdeng49 quit (Quit: Client closed) |
05:12:46 | * | jtdeng left #nim (#nim) |
05:13:15 | * | jtdeng joined #nim |
05:42:02 | FromDiscord | <Ras> In reply to @sharpcdf "no they both have": just an idea, try moving the zip to a path with no colons |
05:42:09 | FromDiscord | <Ras> it shouldn't matter, but maybe... |
05:43:49 | FromDiscord | <Ras> alternatively, send me the zip and I'll debug it at work |
05:58:37 | FromDiscord | <4zv4l> is there any function for url encode/decode in the stdlib ? |
06:01:13 | FromDiscord | <4zv4l> alright I found in uri |
06:16:27 | FromDiscord | <4zv4l> how can I do a `for .. in ..` but the variable in the for loop is mutable ? |
06:21:13 | * | derfflinger joined #nim |
06:21:27 | FromDiscord | <Elegantbeef> `.mitems` if it's a builtin collection |
06:25:44 | FromDiscord | <Bung> how to know what is nil , when traceback last line is `C:\Users\crc32\.nimble\pkgs\memlib-1.2.0\memlib.nim(1029) CreateCoreWebView2EnvironmentWithOptions` https://media.discordapp.net/attachments/371759389889003532/1011159216066658374/2022-08-22_142440.png |
06:31:52 | * | derfflinger quit (Quit: Leaving) |
06:42:58 | * | jtdeng quit () |
06:53:47 | * | PMunch joined #nim |
06:58:50 | FromDiscord | <4zv4l> In reply to @Elegantbeef "`.mitems` if it's a": thaaanks ^^ |
08:30:31 | * | derpydoo quit (Quit: derpydoo) |
08:30:46 | NimEventer | New thread by Drkameleon: String vs Array concatenation, see https://forum.nim-lang.org/t/9400 |
08:59:53 | * | ggsx joined #nim |
09:13:04 | * | ggsx quit (Quit: Client closed) |
09:26:23 | FromDiscord | <4zv4l> how can I compile my program for MacOS ? |
09:26:32 | FromDiscord | <4zv4l> I don't see that in the Nim Compiler User Guide |
09:29:21 | * | wallabra quit (Ping timeout: 256 seconds) |
09:32:41 | * | vicecea quit (Remote host closed the connection) |
09:32:56 | * | wallabra joined #nim |
09:33:08 | * | vicecea joined #nim |
09:41:21 | FromDiscord | <aruZeta> sent a code paste, see https://paste.rs/TGy |
09:42:47 | FromDiscord | <aruZeta> well, forget it, found the answer |
09:43:00 | FromDiscord | <aruZeta> > Var parameters can be modified by the procedure and the changes are visible to the caller. The argument passed to a var parameter has to be an l-value. Var parameters are implemented as hidden pointers |
09:45:24 | FromDiscord | <Zectbumo> In reply to @4zv4l "how can I compile": I think you are looking to cross compile↵ https://nim-lang.org/docs/nimc.html#crossminuscompilation |
09:47:15 | FromDiscord | <Zectbumo> oh I see what you are saying. There is no macos option. Well, I think that would be difficult without a MacOS.↵In that case you are going to do something like this↵https://stackoverflow.com/questions/693952/how-to-compile-for-os-x-in-linux-or-windows |
09:47:40 | FromDiscord | <4zv4l> yeah it's alright |
09:47:44 | FromDiscord | <4zv4l> I'll keep Linux and Windows |
09:47:51 | FromDiscord | <4zv4l> for now |
09:48:00 | FromDiscord | <4zv4l> now I'm struggling doing a loading bar |
09:48:09 | FromDiscord | <4zv4l> how can I flush stdout to write the line without a newline ? |
09:48:40 | FromDiscord | <Zectbumo> `flushFile` |
09:53:46 | * | rockcavera quit (Remote host closed the connection) |
10:07:02 | FromDiscord | <4zv4l> thanks ^^ |
10:09:21 | FromDiscord | <4zv4l> well I fee sorry in advance because I know the code is awful, I'll probably rewrite it later more clean but what do you think:↵https://github.com/4zv4l/jpscanvf |
10:09:41 | FromDiscord | <!!sharpcdf!!> In reply to @Ras "alternatively, send me the": The zip file is the latest release(dev-2022-08) at https://github.com/odin-lang/Odin |
10:09:54 | FromDiscord | <!!sharpcdf!!> I'll try changing the colors when I'm able |
10:09:59 | FromDiscord | <4zv4l> In reply to @4zv4l "well I fee sorry": I'll probably translate it in full English in the near future xD |
10:10:40 | FromDiscord | <!!sharpcdf!!> (edit) "colors" => "colons" |
10:12:45 | FromDiscord | <Forest> In reply to @Forest "https://hastebin.com/emibolufev.nim": Anyone have an idea? |
10:27:09 | * | sagax quit (Ping timeout: 256 seconds) |
10:32:30 | FromDiscord | <enthus1ast> @4zv4l\: i would add at least a sentence what this is all about ;) |
10:35:52 | FromDiscord | <Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=48ja |
10:36:26 | FromDiscord | <Nalmyth> I want to pass a function of some type to another function, but the main file is tagged as ` {.push raises: [Defect].}` which doesn't seem to propagate to the type as shown above |
10:36:28 | FromDiscord | <4zv4l> In reply to @enthus1ast "<@329196212282458112>\: i would add": I rewrote my friend's bash script to download scans (manga) but in Nim↵so basically you give the program a path to a usb key or a folder and then you can add/del folder or download manga from a website |
10:36:33 | FromDiscord | <Nalmyth> (edit) "` {.push" => "`{.push" |
10:36:43 | FromDiscord | <4zv4l> so I first load all the manga available which sometimes take time |
10:36:56 | FromDiscord | <4zv4l> then have to loop through each chapters and each `.jpg` file |
10:36:59 | FromDiscord | <4zv4l> and then download them to the path |
11:04:11 | * | jmdaemon quit (Ping timeout: 268 seconds) |
11:04:14 | FromDiscord | <4zv4l> I get `could not load: pcre64.dll` |
11:04:21 | FromDiscord | <4zv4l> when compiling for windows with `:mingw` |
11:04:24 | FromDiscord | <4zv4l> (edit) "`:mingw`" => "`-d:mingw`" |
11:05:45 | FromDiscord | <Ras> In reply to @sharpcdf "I'll try changing the": i can reproduce, it isn't the colons |
11:05:53 | FromDiscord | <Ras> i'll debug it a bit what the issue may be |
11:06:08 | FromDiscord | <!!sharpcdf!!> Cool, thanks |
11:08:51 | FromDiscord | <4zv4l> also get `could not load: (libcrypto-1_1-x64|libeay64).dll` |
11:19:52 | FromDiscord | <4zv4l> is there a solution to include ALL the library in the final binary ? |
11:30:49 | FromDiscord | <enthus1ast> sent a long message, see http://ix.io/48jq |
11:32:15 | FromDiscord | <enthus1ast> I personally would put everything in a zip folder and distribute it |
11:34:34 | FromDiscord | <4zv4l> yeah that is a good idea but I would like being able to distribute a single binary |
11:34:37 | FromDiscord | <4zv4l> with all included |
11:34:56 | FromDiscord | <4zv4l> that's the point of static linking, having all in one |
11:38:54 | FromDiscord | <enthus1ast> I can imagine that would would have no fun building eg openssl statically |
11:39:13 | FromDiscord | <enthus1ast> You would |
11:39:19 | FromDiscord | <4zv4l> also wt |
11:39:36 | FromDiscord | <4zv4l> this doesn't work |
11:39:39 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=48js |
11:39:46 | FromDiscord | <4zv4l> https://media.discordapp.net/attachments/371759389889003532/1011238245138440192/unknown.png |
11:39:51 | FromDiscord | <4zv4l> `cls` not found ?? |
11:40:44 | FromDiscord | <enthus1ast> Ah |
11:40:52 | FromDiscord | <4zv4l> In reply to @enthus1ast "I can imagine that": well other languages do it so why not Nim ? I think in Go I already used ssl and without shipping dll |
11:40:58 | FromDiscord | <enthus1ast> You just use the sync http client |
11:41:10 | FromDiscord | <enthus1ast> Then yeah, just swap it out with puppy |
11:41:18 | FromDiscord | <4zv4l> but I use the Download function |
11:41:22 | FromDiscord | <4zv4l> which isn't in puppy I think |
11:41:31 | FromDiscord | <4zv4l> and so `cls` doesn't work |
11:41:34 | FromDiscord | <4zv4l> any idea why ? |
11:41:36 | FromDiscord | <enthus1ast> It just works on windows since it uses winapi |
11:41:50 | FromDiscord | <4zv4l> In reply to @4zv4l "": this is on windows |
11:42:20 | FromDiscord | <4zv4l> `nim c -d:ssl -d:mingw jpscanvf.nim` this is how I compiled it |
11:43:11 | FromDiscord | <enthus1ast> Puppy does not need the -d\:ssl flag |
11:43:39 | FromDiscord | <4zv4l> yeah I know↵but idk how to download file with puppy so for now I try to make it works with the ddl |
11:43:42 | FromDiscord | <4zv4l> (edit) "ddl" => "dll" |
11:43:54 | FromDiscord | <4zv4l> and the issue now is that it doesn't want to execute `cls` |
11:44:14 | FromDiscord | <4zv4l> In reply to @4zv4l "": command not found `cls` ? |
11:49:25 | FromDiscord | <4zv4l> In reply to @enthus1ast "Ah": no idea ? |
11:52:32 | FromDiscord | <Ras> In reply to @sharpcdf "Cool, thanks": zip seems to have an edge case that zippy doesn't handle (but other common unzipping tools do) |
11:52:50 | FromDiscord | <Ras> i patched zippy locally with a fix and it can unzip it fine |
11:52:55 | FromDiscord | <EyeCon> In reply to @4zv4l "command not found `cls`": I think cls is not a command but a built-in |
11:53:01 | FromDiscord | <EyeCon> Use this instead: https://nim-lang.org/docs/terminal.html#eraseScreen%2CFile |
11:53:02 | FromDiscord | <Ras> i can create a PR for zippy |
11:55:58 | FromDiscord | <4zv4l> In reply to @EyeCon "I think cls is": yeah I used `execShellCmd` instead |
11:55:59 | FromDiscord | <4zv4l> which works |
11:56:51 | FromDiscord | <enthus1ast> better use what @EyeCon posted↵(@EyeCon) |
11:57:01 | FromDiscord | <enthus1ast> and for the zip |
11:57:16 | FromDiscord | <enthus1ast> what exactly is the issue? |
11:57:43 | FromDiscord | <enthus1ast> send the webserver the supported zipping algos |
11:57:47 | FromDiscord | <enthus1ast> or none |
12:10:17 | FromDiscord | <Ras> sent a long message, see http://ix.io/48jw |
12:11:23 | FromDiscord | <Ras> other unzip tools/libraries handle this case. I haven't investigated how, but I patched zippy by adding a check for `FileRecord`s: if the filename is the same as the directory name it just created for the file, don't attempt to actually extract the contents |
12:11:24 | FromDiscord | <enthus1ast> ah extracting zip files, not http transfer encoding |
12:11:40 | FromDiscord | <Ras> no, nothing to do with httop |
12:11:41 | FromDiscord | <Ras> (edit) "httop" => "http" |
12:12:10 | FromDiscord | <Phil> Enthus1ast, you done anything with webviews? |
12:13:01 | FromDiscord | <enthus1ast> long ago, with that one https://github.com/oskca/webview |
12:13:44 | FromDiscord | <Phil> How did you troubleshoot if your front-end randomly didn't render? |
12:13:59 | FromDiscord | <Phil> Assume spa front-end framework |
12:14:00 | FromDiscord | <enthus1ast> never had this issue |
12:14:04 | FromDiscord | <enthus1ast> \:) |
12:14:13 | FromDiscord | <Phil> Dangit |
12:14:26 | FromDiscord | <Phil> So generally no js troubleshooting in webview |
12:14:44 | FromDiscord | <enthus1ast> i would↵1. check console output↵2. doublecheck that no http crosstalking occured (hit me a few times with nim webservers) |
12:15:10 | FromDiscord | <Phil> How do you check console output on a webview? |
12:15:41 | FromDiscord | <Phil> Since it isn't a browser I failed to figure out for now where to see the error messages |
12:15:48 | FromDiscord | <enthus1ast> mh |
12:16:23 | FromDiscord | <enthus1ast> if its a chrome(ium) you could try the remote debugger |
12:16:37 | FromDiscord | <enthus1ast> or it maybe even can open the devtools for you |
12:16:58 | FromDiscord | <enthus1ast> which webview do you use? |
12:20:38 | FromDiscord | <Phil> Nim view which I think uses your local os js engine etc |
12:22:35 | FromDiscord | <Ras> In reply to @sharpcdf "Cool, thanks": https://github.com/guzba/zippy/pull/48 |
12:23:34 | FromDiscord | <enthus1ast> @Phil\: startDesktop has a debug flag |
12:24:54 | FromDiscord | <Phil> Already used, didn't open a console |
12:27:06 | FromDiscord | <Phil> I'll experiment more later |
12:27:23 | FromDiscord | <Phil> Basically just want to use angular for front-end and do the rest via webview |
12:29:03 | FromDiscord | <Forest> How does `nim.nim` or `main.nim` tell the compiler that "hey! A file has been passed!"↵I've stripped it down a lot but i may of stripped something needed? I don't understand what though↵↵https://hastebin.com/emibolufev.nim |
12:29:23 | FromDiscord | <Forest> Hold on... |
12:29:41 | FromDiscord | <aruZeta> poor forest, still no answer |
12:29:49 | FromDiscord | <aruZeta> sry I can't help |
12:30:41 | FromDiscord | <Forest> Yeah not understanding it but just tryna make sense |
12:30:56 | FromDiscord | <Forest> In reply to @aruZeta "sry I can't help": Eh it's fine, if people don't know how to answer they won't respond so |
12:31:02 | FromDiscord | <4zv4l> In reply to @enthus1ast "better use what <@191304757195833344>": this doesn't work as expected |
12:31:24 | FromDiscord | <4zv4l> the first clear put the text at the bottom↵the second clear put the text at the top |
12:31:32 | FromDiscord | <4zv4l> idk why the first clear is weird |
12:32:01 | FromDiscord | <Phil> In reply to @Forest "Eh it's fine, if": Allow me to respond! ...↵I don't know the answer |
12:32:20 | FromDiscord | <4zv4l> https://media.discordapp.net/attachments/371759389889003532/1011251475818745866/unknown.png |
12:32:24 | FromDiscord | <4zv4l> even middle sometimes idk |
12:32:27 | FromDiscord | <4zv4l> weird behavior |
12:33:47 | FromDiscord | <Forest> In reply to @Isofruit "Allow me to respond!": Lmao |
12:35:55 | FromDiscord | <aruZeta> maybe the answer could be around here? https://github.com/nim-lang/Nim/blob/devel/compiler/nim.nim#L84 |
12:36:04 | FromDiscord | <!!sharpcdf!!> In reply to @Ras "https://github.com/guzba/zippy/pull/48": Thanks, I thought it was me 😅 |
12:36:10 | FromDiscord | <Forest> Keep getting the error (in my program) `command expects a file name` |
12:36:31 | FromDiscord | <Forest> In reply to @aruZeta "maybe the answer could": Hm yeah poking around that already |
12:37:37 | FromDiscord | <flywind> In reply to @Forest "Keep getting the error": What's your command? |
12:37:44 | FromDiscord | <aruZeta> maybe it's this? https://github.com/nim-lang/Nim/blob/8ccde68f132be4dba330eb6ec50f4679e564efac/compiler/nimfix/nimfix.nim#L81 |
12:40:00 | FromDiscord | <SouperZ> any embeddable scripting langs for nim? |
12:40:28 | FromDiscord | <Forest> In reply to @flywind "What's your command?": I think i figured it out |
12:40:37 | FromDiscord | <Forest> In reply to @SouperZ "any embeddable scripting langs": NimScript is one |
12:40:45 | FromDiscord | <enthus1ast> @SouperZ\: Lua |
12:40:56 | FromDiscord | <Forest> But any scripting language that has a C binding to Nim is usable |
12:41:03 | FromDiscord | <SouperZ> oh |
12:41:10 | FromDiscord | <SouperZ> thank you all |
12:41:16 | FromDiscord | <Forest> Np |
12:41:19 | FromDiscord | <aruZeta> 👍 |
12:41:27 | FromDiscord | <aruZeta> In reply to @Forest "I think i figured": nice |
12:45:31 | * | skandal joined #nim |
12:45:39 | skandal | hello |
12:46:10 | FromDiscord | <aruZeta> 👋 |
12:46:25 | skandal | how i can find node by the attribute name with xml parser? |
12:48:22 | FromDiscord | <aruZeta> are you using the xml parser from the standard library |
12:48:36 | FromDiscord | <Forest> Hm new error: https://hastebin.com/qoseyicufi.properties↵running the program gives `Error: cannot open '/home/raees/projects/Nim/lib/system.nim'` as the error |
12:50:52 | FromDiscord | <SouperZ> wait is there any lua bindings? |
12:51:04 | skandal | aruzeta: Yes. |
12:51:13 | FromDiscord | <enthus1ast> https://github.com/jangko/nimLUA |
12:51:22 | FromDiscord | <enthus1ast> but have not used it in years |
12:57:27 | FromDiscord | <Forest> In reply to @Forest "Hm new error: https://hastebin.com/qoseyicufi.prope": Okay so, putting it in the bin folder of the nim compiler makes it get further |
13:03:21 | FromDiscord | <Forest> https://play.nim-lang.org/#ix=48jI |
13:03:29 | FromDiscord | <Forest> My code now just spits out nothing |
13:04:25 | FromDiscord | <Forest> When passing an empty argument then a valid file |
13:05:29 | FromDiscord | <hotdog> sent a code paste, see https://play.nim-lang.org/#ix=48jM |
13:05:37 | FromDiscord | <hotdog> Just curious, what are you building? |
13:06:18 | FromDiscord | <Forest> Sure |
13:06:56 | FromDiscord | <Forest> In reply to @hotdog "Just curious, what are": Trying to make it so my project spits out a JSON file of everything Nim parses, so enums, objects, ints, strings, procs... Etc |
13:07:48 | FromDiscord | <Forest> In reply to @hotdog "Try sticking an echo": Spits out nothing still |
13:08:39 | FromDiscord | <hotdog> In reply to @Forest "Trying to make it": Interesting. What will you do with the json? |
13:09:11 | FromDiscord | <hotdog> In reply to @Forest "Spits out nothing still": That's odd. I'd probably just add a bunch of echos all over to try to figure out what it's actually executing |
13:10:30 | FromDiscord | <Forest> In reply to @hotdog "Interesting. What will you": My plan is to use the format (which shouldn't change often, even between Nim compiler updates) to be able to generate multiple different types of files for programming languages, like Lua, Python, Java (would be very great, even if hard to implement and work around) |
13:10:37 | FromDiscord | <Forest> In reply to @hotdog "That's odd. I'd probably": Alright then |
13:11:08 | FromDiscord | <4zv4l> how with `htmlparser, xmltree` can I get what's inside the balise ?↵`<a href="">a link</a>` how do I get the `a link` ? |
13:11:10 | FromDiscord | <hotdog> In reply to @Forest "My plan is to": For interop/bindings? |
13:11:37 | FromDiscord | <hotdog> In reply to @4zv4l "how with `htmlparser, xmltree`": https://nim-lang.org/docs/xmltree.html#innerText%2CXmlNode |
13:12:21 | FromDiscord | <Forest> In reply to @hotdog "For interop/bindings?": Nope, to make Nim more portable so it can run in many languages (though, it still could be used for generating bindings automatically if someone wished) |
13:15:35 | FromDiscord | <Forest> In reply to @hotdog "That's odd. I'd probably": Weird, none of my echo statements are even being printed despite a function being called successfully |
13:16:09 | FromDiscord | <Forest> I know that it's being called because the actions it's taking are specific to the function |
13:18:12 | FromDiscord | <hotdog> In reply to @Forest "Nope, to make Nim": Sounds like an interesting challenge |
13:18:23 | FromDiscord | <hotdog> In reply to @Forest "Weird, none of my": How are you running it? |
13:22:46 | FromDiscord | <Forest> `nim c main.nim && echo "==============================" && ~/.choosenim/toolchains/nim-\#devel/bin/n2j placeholderArg test.nim` |
13:23:09 | FromDiscord | <Forest> `main` is symlinked to `~/.choosenim/toolchains/nim-\#devel/bin/n2j` |
13:25:04 | FromDiscord | <Forest> @hotdog (ping just in case) |
13:25:32 | FromDiscord | <hotdog> And you don't get any output from the binary? |
13:27:39 | FromDiscord | <Forest> sent a code paste, see https://play.nim-lang.org/#ix=48jS |
13:27:54 | FromDiscord | <Forest> `⏎` is just a newline put in by fish |
13:28:07 | FromDiscord | <Forest> My echo statements don't get printed |
13:28:09 | FromDiscord | <4zv4l> I can't curl with `puppy` this kind of url with spaces `https://funquizzes.fun/uploads/manga/One Punch Man` I even tried like this `https://funquizzes.fun/uploads/manga/One%20Punch%20Man` but it doesn't work↵I except getting the listing of files |
13:28:31 | FromDiscord | <hotdog> In reply to @Forest "My echo statements don't": So you don't get the "=========="? probably means compilation is failing? |
13:28:38 | FromDiscord | <Forest> In reply to @hotdog "So you don't get": I do |
13:28:49 | FromDiscord | <Forest> That's just the echo statement i put in my shell |
13:29:12 | FromDiscord | <Forest> sent a code paste, see https://play.nim-lang.org/#ix=48jT |
13:29:22 | FromDiscord | <4zv4l> In reply to @4zv4l "I can't curl with": with curl it works tho with %20 |
13:29:30 | FromDiscord | <4zv4l> (edit) "Man`" => "Man/`" | "`https://funquizzes.fun/uploads/manga/One%20Punch%20Man`" => "`https://funquizzes.fun/uploads/manga/One%20Punch%20Man/`" |
13:29:39 | FromDiscord | <hotdog> In reply to @Forest "This is the output": Gotcha |
13:30:01 | FromDiscord | <Forest> Just no idea why it ain't working at all and it's annoying rip |
13:30:36 | * | derpydoo joined #nim |
13:32:34 | FromDiscord | <hotdog> Where did you put echos @Forest ? |
13:32:53 | FromDiscord | <hotdog> In reply to @4zv4l "I can't curl with": What error |
13:33:14 | FromDiscord | <Forest> Okay, I'm writing it to a file instead of using echo |
13:34:17 | FromDiscord | <hotdog> @Forest I just grabbed your code and it works if I put in echos |
13:34:51 | FromDiscord | <Forest> Oh my god I'm so dumb |
13:36:06 | FromDiscord | <Forest> I hardlinked it |
13:36:10 | FromDiscord | <Forest> And the file didn't update |
13:36:22 | FromDiscord | <Forest> Sigh, i was running the same binary again and again expecting different results |
13:36:29 | FromDiscord | <Forest> Anyway, yeah i fixed that issue 😅 |
13:36:34 | FromDiscord | <Rika> Sounds like crazy to me |
13:37:09 | FromDiscord | <hotdog> In reply to @Forest "Sigh, i was running": Ah that would be it 🙂 |
13:38:41 | FromDiscord | <Forest> In reply to @Rika "Sounds like crazy to": You ain't wrong |
13:41:46 | FromDiscord | <Schelz> sent a code paste, see https://play.nim-lang.org/#ix=48jX |
13:43:25 | FromDiscord | <hotdog> In reply to @Schelz "does nim has namespaces": You can do `from mymodule import nil ` to force users to write `mymodule.foo` |
13:43:36 | FromDiscord | <hotdog> (edit) "users to write" => "usage as" |
13:44:02 | FromDiscord | <Rika> If you don’t mind me asking about your use case |
13:44:04 | FromDiscord | <hotdog> But it is not recommended for nim code |
13:47:06 | FromDiscord | <4zv4l> In reply to @hotdog "What error": 404 not found |
13:47:19 | FromDiscord | <4zv4l> but with curl is works so idk |
13:47:57 | FromDiscord | <Forest> In reply to @Rika "If you don’t mind": Me or Schelz? |
13:48:33 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=48jY |
13:48:37 | FromDiscord | <4zv4l> the curl part succeed while the fetch one doesn't |
13:49:52 | FromDiscord | <4zv4l> yeah ? |
13:49:52 | FromDiscord | <hotdog> sent a code paste, see https://play.nim-lang.org/#ix=48jZ |
13:50:19 | FromDiscord | <hotdog> puppy re-encodes spaces in urls to '+', not matter if they are spaces or '%20' in the url parameter |
13:50:37 | FromDiscord | <hotdog> And the server you are requesting from does not seem to handle the '+' correctly |
13:50:49 | FromDiscord | <4zv4l> can I do something about that ? |
13:51:52 | FromDiscord | <Rika> In reply to @Forest "Me or Schelz?": Not you |
13:52:01 | FromDiscord | <Rika> My bad |
13:53:24 | FromDiscord | <hotdog> In reply to @4zv4l "can I do something": Open an issue on the puppy repo |
13:53:51 | FromDiscord | <hotdog> I'm not sure what the correct behavior should be, but I'm sure they will take a look |
13:54:41 | FromDiscord | <hotdog> A quick search suggests that '%20' is the more "correct" encoding for the url path, with '+' being used for form data and query strings |
13:55:04 | FromDiscord | <hotdog> Ping @treeform 🙂 |
13:55:10 | FromDiscord | <Ras> both are correct in this context |
13:55:28 | FromDiscord | <Ras> and `%20` should not be re-encoded to `+` |
13:55:34 | FromDiscord | <Ras> but a plus is also, separately, valid |
13:55:46 | FromDiscord | <4zv4l> In reply to @hotdog "I'm not sure what": just did |
13:55:49 | FromDiscord | <Forest> In reply to @Rika "Not you": Ah okay |
13:56:11 | FromDiscord | <hotdog> In reply to @Ras "but a plus is": It is but it seems some servers won't handle it in the path component |
13:56:25 | FromDiscord | <Ras> that is correct behaviour |
13:56:29 | FromDiscord | <hotdog> So it may be best to switch the default there to %20, and use + in query strings |
13:56:50 | FromDiscord | <Schelz> In reply to @hotdog "You can do `from": good idea thx |
13:58:07 | FromDiscord | <Ras> actually, my bad |
13:58:34 | FromDiscord | <Ras> a `+` for space is _never_ correct for paths in URLs, only `%20` |
13:58:42 | FromDiscord | <4zv4l> wait are you the one who made puppy ? |
13:58:50 | FromDiscord | <Ras> + is correct for space in query parameters and values |
13:59:20 | FromDiscord | <Ras> as per https://www.rfc-editor.org/rfc/rfc3986 |
14:00:24 | FromDiscord | <Ras> `path with space` should NEVER be encoded as `http://example.com/path+with+space/`, only `http://example.com/path%20with%20space/` |
14:00:26 | FromDiscord | <hotdog> In reply to @4zv4l "wait are you the": Puppy is treeform and guzba |
14:00:35 | FromDiscord | <Forest> Okay I need to figure out how to remove the need for the first parameter in the command |
14:01:25 | FromDiscord | <Forest> Just gonna take a break because god back pain sucks |
14:01:36 | FromDiscord | <Ras> `query with space` can be encoded as both `http://example.com?v=query+with+space` and `http://example.com?v=query%20with%20space` |
14:02:05 | FromDiscord | <Ras> (edit) "`http://example.com?v=query+with+space`" => "`http://example.com/?v=query+with+space`" | "`http://example.com?v=query%20with%20space`" => "`http://example.com/?v=query%20with%20space`" |
14:02:57 | FromDiscord | <Ras> so the fact that puppy encodes spaces as `+` in paths can be considered not standard conforming and a bug 🙂 |
14:05:05 | FromDiscord | <4zv4l> well hope that will be fixed soon |
14:05:19 | FromDiscord | <Ras> have you created a bug report? |
14:05:25 | FromDiscord | <Ras> or, like, a github issue |
14:05:46 | FromDiscord | <Rika> It might not be an issue of puppy but the underlying API it uses |
14:06:37 | FromDiscord | <Ras> so urlly |
14:06:43 | FromDiscord | <4zv4l> In reply to @Ras "or, like, a github": github issue |
14:06:56 | FromDiscord | <4zv4l> https://github.com/treeform/puppy/issues/80 |
14:07:57 | FromDiscord | <Ras> the bug is in urlly, i've identified it |
14:07:58 | FromDiscord | <Ras> https://github.com/treeform/urlly/blob/master/src/urlly.nim#L48-L49 |
14:08:22 | FromDiscord | <Ras> it unconditionally converts spaces to `+` |
14:09:02 | FromDiscord | <4zv4l> would be better not converts it and let the user use encodeUrl or putting the url right by itself |
14:12:47 | Amun-Ra | it'd be better to encode it to %20 |
14:13:06 | Amun-Ra | + means space only in x-www-form-urlencoded content |
14:13:27 | Amun-Ra | (iirc) |
14:15:54 | FromDiscord | <Ras> yes, which is only the query part of the URL |
14:16:27 | FromDiscord | <Ras> I also mentioned this in the github issue |
14:16:39 | FromDiscord | <Ras> (which is in the wrong repo but whatever :p ) |
14:16:50 | Amun-Ra | ;> |
14:17:36 | Amun-Ra | %20 works in query part too |
14:23:05 | Amun-Ra | btw, I found few sites that passed email via query string and passed '+' in email as is |
14:33:08 | * | rockcavera joined #nim |
14:33:09 | * | rockcavera quit (Changing host) |
14:33:09 | * | rockcavera joined #nim |
14:34:00 | * | PMunch quit (Quit: Leaving) |
15:18:16 | FromDiscord | <Phil> In reply to @enthus1ast "long ago, with that": One sec... was your JS back then in a separate file or was it all in that one HTML file? |
15:18:25 | FromDiscord | <Phil> that one uses on startup |
15:30:50 | FromDiscord | <aruZeta> hmm, let's say I want to import benchy in my nimble project to use it only in `tests/`, so I don't want to add it to my `.nimble`' require list |
15:30:54 | FromDiscord | <aruZeta> how would I do it? |
15:31:35 | FromDiscord | <aruZeta> just installing it via `nimble install benchy` and `import benchy` without specifying anywhere in my project to install it? |
15:35:26 | FromDiscord | <Phil> I haven't done it myself but that sounds like nim.cfg stuff with a "when" check for `-d:release` |
15:35:58 | FromDiscord | <aruZeta> not `-d:release` at all, since it's only used for tests |
15:36:07 | FromDiscord | <aruZeta> (edit) "not `-d:release` at all, since it's ... only" added "a library I will use" | removed "used" |
15:36:13 | FromDiscord | <auxym> I don't think nimble supports dev dependencies, but this might be relevant: https://github.com/nim-lang/nimble/issues/506 |
15:36:15 | FromDiscord | <aruZeta> testing + benchmark |
15:36:35 | FromDiscord | <auxym> you could also define your own define flag like `-d:benchmark` or something |
15:37:20 | FromDiscord | <aruZeta> ohh |
15:37:25 | FromDiscord | <aruZeta> show me the way master |
15:38:52 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=48kF |
15:39:03 | FromDiscord | <auxym> yeah IIRC thats it |
15:39:14 | FromDiscord | <aruZeta> lemme try, ty :) |
15:39:22 | FromDiscord | <auxym> `"benchmark"` as a string probably |
15:41:31 | FromDiscord | <aruZeta> actually seems to be without the `""` |
15:42:20 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=48kG |
15:42:34 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=48kG" => "https://play.nim-lang.org/#ix=48kH" |
15:44:59 | FromDiscord | <Phil> Definitely without the quotation marks. It's not a string.↵I use it in my own application, though not in a nim.cfg file but in nim code itself:↵` when defined(normdebug):` |
15:45:39 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=48kI |
15:49:23 | FromDiscord | <Phil> I now have the faint hope that maybe the gods (aka marcomq) will answer and maybe there's a way to get angular to work with webviews |
15:50:42 | FromDiscord | <Phil> I don't wanna jump into an entire new frontend framework and switch paradigm for how the application will work in one go =/ |
15:57:40 | FromDiscord | <aruZeta> oh boy benchy is truly great |
15:58:30 | FromDiscord | <aruZeta> and actually didn't expec the shit I made to be so damn fast |
15:58:35 | FromDiscord | <aruZeta> (edit) "expec" => "expect" |
16:23:23 | * | nyeaa4 quit (Quit: Ping timeout (120 seconds)) |
16:23:42 | * | nyeaa4 joined #nim |
16:33:09 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=48kU |
16:33:39 | FromDiscord | <Forest> Hm in my program how would i stop the first param from being needed? |
16:33:52 | FromDiscord | <Forest> The first param being something like `check` or `c` |
16:34:05 | FromDiscord | <Forest> But on my code it needs anything for the first param before passing a file |
16:34:08 | FromDiscord | <Forest> Wanna remove that |
16:34:21 | FromDiscord | <Forest> Or even better, write my own command handler |
16:34:35 | FromDiscord | <Forest> In reply to @Forest "Wanna remove that": I'd prefer this for now tho |
16:34:59 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=48kU" => "https://play.nim-lang.org/#ix=48kV" |
16:35:07 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=48kV" => "https://paste.rs/y3d" |
16:53:41 | * | vsantana joined #nim |
16:57:58 | FromDiscord | <Forest> Really not understanding this lmao |
16:58:05 | * | vsantana quit (Ping timeout: 252 seconds) |
17:02:27 | FromDiscord | <Forest> I've tried fiddling with it for the past 20 mins or so but uh, yeah- https://play.nim-lang.org/ix=48l4 |
17:15:48 | FromDiscord | <Forest> Okay so I don't understand how tf this did it but, removing `compileProject` fixed it??? I'm gonna poke around the source to see what it does |
17:18:16 | FromDiscord | <Forest> Hm, seems like it like, handles the importing of Nim files? |
17:20:25 | FromDiscord | <Forest> I don't understand how to fix this |
17:26:25 | * | jmdaemon joined #nim |
17:28:44 | * | LyndsySimon joined #nim |
17:29:12 | FromDiscord | <Schelz> newbie here; how do you define in nim a void pointer ? |
17:29:32 | Amun-Ra | pointer |
17:29:45 | FromDiscord | <Schelz> and its casted to a void ? |
17:29:48 | Amun-Ra | var p: pointer |
17:29:59 | FromDiscord | <Schelz> nice thx |
17:30:18 | Amun-Ra | is that a C interop? |
17:30:34 | Amun-Ra | if not, you shouldn't use it |
17:32:19 | FromDiscord | <Schelz> i try to make a void ptr for GetProcAddress |
17:32:58 | FromDiscord | <mratsim> In reply to @aruZeta "hmm, let's say I": I just import in the test file the optional dependencies and make sure they are installed in CI |
17:33:28 | FromDiscord | <aruZeta> In reply to @mratsim "I just import in": it's already solved, nvm |
17:39:46 | FromDiscord | <Forest> In reply to @Forest "I don't understand how": If anyone has tips, please let me know lmao |
17:52:18 | FromDiscord | <Phil> In reply to @Forest "I've tried fiddling with": All I see is 404 |
17:58:12 | FromDiscord | <Forest> Uh |
17:58:45 | FromDiscord | <Phil> Is that still the post you earlier posted on hastebin that I wrote to that I can't help? |
17:58:55 | FromDiscord | <Forest> https://play.nim-lang.org/ix=48l9 |
17:58:58 | FromDiscord | <Forest> There |
17:59:02 | FromDiscord | <Forest> In reply to @Isofruit "Is that still the": Probably lmao |
17:59:13 | FromDiscord | <Forest> In reply to @Forest "https://play.nim-lang.org/ix=48l9": Uh what |
17:59:17 | FromDiscord | <Forest> For some reason it isn't working |
18:00:14 | FromDiscord | <Phil> Where is compileProject from? |
18:00:27 | FromDiscord | <Forest> https://hastebin.com/unazewemec.properties |
18:00:41 | FromDiscord | <Forest> In reply to @Isofruit "Where is compileProject from?": compiler/modules.nim |
18:02:59 | FromDiscord | <Phil> And you want to basically provide the first param yourself so that you can programmatically decide what gets to be compiled instead of the user typing that in? |
18:04:02 | * | PMunch joined #nim |
18:05:01 | FromDiscord | <Forest> Kinda yeah, I don't care about the first param at all because it's useless |
18:05:22 | FromDiscord | <Forest> The second param (file name) should be the actual param that the user passes, it's the only important one |
18:05:24 | FromDiscord | <Schelz> I couldnt find out on google, but does nim has GetProcessWindow ? and how do you call it ? |
18:06:08 | FromDiscord | <Phil> In reply to @Forest "Kinda yeah, I don't": Well, more like for you that param is static as "c" right? |
18:06:34 | FromDiscord | <Forest> Yup |
18:08:55 | FromDiscord | <Phil> Do you perchance know where paramCount() comes from? |
18:08:55 | FromDiscord | <Schelz> In reply to @Schelz "I couldnt find out": . |
18:09:10 | FromDiscord | <Forest> Checking on my IDE |
18:09:23 | FromDiscord | <Forest> From `is` |
18:09:30 | FromDiscord | <Forest> `os` |
18:09:33 | FromDiscord | <Phil> Schelz, I'd wait until some folks that are more familiar with native are online. I do not have a clue |
18:09:54 | FromDiscord | <Schelz> ;( ok |
18:10:14 | PMunch | Someone said native? |
18:11:51 | FromDiscord | <Phil> In reply to @Forest "Checking on my IDE": From what I am understanding your program basically gets called with params and with the compile proc you call it basically uses the params your program was called with implicitly |
18:11:53 | FromDiscord | <Phil> (edit) "implicitly" => "implicitly?" |
18:12:17 | FromDiscord | <Phil> I'm about to have bad news for you because I see a decent amount of ways to get the params but no way to change the |
18:12:18 | FromDiscord | <Phil> (edit) "the" => "them" |
18:12:21 | FromDiscord | <Schelz> In reply to @Isofruit "Schelz, I'd wait until": nvm i guess it was a dummy question I have to make it with proc cause its not a windows api |
18:13:14 | FromDiscord | <Phil> Is there a way you can find a proc that does what compileProject does where you can actually control the params it receives? (It is `compileProject` that is bombing for you, right?) |
18:16:17 | FromDiscord | <Forest> In reply to @Isofruit "From what I am": Yup |
18:16:36 | FromDiscord | <Forest> In reply to @Isofruit "I'm about to have": Rip... |
18:16:54 | FromDiscord | <aruZeta> https://github.com/nim-lang/Nim/blob/devel/compiler/nim.nim#L108-L124 maybe is it here what ya searching for ? |
18:16:57 | FromDiscord | <Ras> In reply to @Schelz "nvm i guess it": bruh wtf is that avatar |
18:17:15 | FromDiscord | <Forest> In reply to @Isofruit "Is there a way": Possibly, i could even just copy that myself and modify it but the issue is i don't understand what is causing it |
18:18:39 | FromDiscord | <Schelz> In reply to @Ras "bruh wtf is that": lol I did it in blender at least I tried to hide the nude part |
18:18:56 | FromDiscord | <Schelz> (edit) "In reply to @Ras "bruh wtf is that": lol I did it in blender at least I tried to hide the nude part ... " added "( no nipples allowed )" |
18:19:17 | FromDiscord | <Ras> i think i can definitely see a nipple bro |
18:20:17 | FromDiscord | <Schelz> uff okok I edit it |
18:20:25 | FromDiscord | <aruZeta> lol |
18:20:27 | FromDiscord | <Forest> Lmao where do you even find models like that |
18:20:41 | FromDiscord | <aruZeta> In reply to @aruZeta "https://github.com/nim-lang/Nim/blob/devel/compiler": @Forest did you check it? |
18:20:45 | PMunch | @Forest, have you been on the internet before? |
18:20:49 | FromDiscord | <Schelz> In reply to @Forest "Lmao where do you": daz3d xD |
18:23:37 | FromDiscord | <Phil> I will admit that in my client y'alls avatar are so small I can barely see color blobs |
18:25:43 | FromDiscord | <Forest> In reply to @aruZeta "<@909883978717204561> did you check": Oh sorry just saw now |
18:26:14 | FromDiscord | <Forest> Idk how it'll help me tho |
18:26:25 | FromDiscord | <Forest> In reply to @PMunch "<@909883978717204561>, have you been": Lmao fair enough |
18:26:52 | FromDiscord | <aruZeta> also https://github.com/nim-lang/Nim/blob/b0b9a3e5fade002b8f117f7ffb4d8fb93686401d/compiler/options.nim#L517-L519 |
18:27:37 | FromDiscord | <Forest> Don't think configRef will help in this context, thanks aruZeta! |
18:28:56 | FromDiscord | <Forest> So cmdPrefix? |
18:30:02 | FromDiscord | <aruZeta> im not rly sure, but I would say to tinker it and find out |
18:30:37 | FromDiscord | <Forest> Hm doesn't look applicable to me |
18:31:04 | FromDiscord | <aruZeta> ah well yh, you don't want to parse a first param |
18:37:57 | FromDiscord | <Forest> I want to get rid of the need to provide the first param rip |
18:51:17 | FromDiscord | <aruZeta> take a look here, maybe you find something↵https://github.com/nim-lang/Nim/blob/f443bece06e89495e1f0df63b8372f8a2fb21d6b/compiler/commands.nim#L576↵https://github.com/nim-lang/Nim/blob/f443bece06e89495e1f0df63b8372f8a2fb21d6b/compiler/commands.nim#L479-L481↵https://github.com/nim-lang/Nim/search?q=setCommandEarly |
18:59:30 | NimEventer | New thread by Nya: Fill array in C style, see https://forum.nim-lang.org/t/9403 |
19:12:57 | FromDiscord | <hotdog> sent a code paste, see https://play.nim-lang.org/#ix=48lD |
19:20:06 | Amun-Ra | is that by design? https://play.nim-lang.org/#ix=48lI |
19:21:09 | FromDiscord | <Forest> In reply to @hotdog "<@909883978717204561> try this at": Aight |
19:25:26 | FromDiscord | <Forest> `/home/raees/projects/Nim/Nim2JSON/main.nim(57, 42) Error: undeclared field: 'AbsoluteFile' for type system.string [type declared in /home/raees/.choosenim/toolchains/nim-#devel/lib/system.nim(34, 3)]` |
19:25:28 | FromDiscord | <Forest> @hotdog |
19:26:29 | FromDiscord | <Forest> Fixed, just imported it |
19:26:35 | FromDiscord | <Forest> Oh? I think it may be working? |
19:27:35 | FromDiscord | <Forest> It works as intended! Thanks! |
19:27:53 | * | krux02 joined #nim |
19:28:04 | FromDiscord | <Forest> Now i need to figure out what to do with the module graph 🤣 🤣 😢 😢 😭 😭 |
19:35:14 | FromDiscord | <Forest> How do i stop my IDE giving this error sob https://media.discordapp.net/attachments/371759389889003532/1011357898489737236/unknown.png |
19:35:19 | FromDiscord | <Forest> editor not IDE |
19:36:58 | FromDiscord | <Forest> fixed |
19:37:07 | FromDiscord | <Forest> just did a check for "nimcheck" |
19:39:43 | * | nyeaa4 quit (Quit: The Lounge - https://thelounge.chat) |
19:41:08 | FromDiscord | <Elegantbeef> You dont use error |
19:41:18 | FromDiscord | <Elegantbeef> Error is for compile time errors |
19:42:52 | * | nyeaa4 joined #nim |
19:43:52 | FromDiscord | <demotomohiro> !eval quit "You need to pass a file!" |
19:43:56 | NimBot | You need to pass a file! |
19:47:33 | FromDiscord | <enthus1ast> whats the best way to convert a ( https://nim-lang.org/docs/widestrs.html#Utf16Char ) to a nim string? |
19:47:49 | FromDiscord | <Elegantbeef> `$` |
19:48:12 | FromDiscord | <Elegantbeef> Ah nvm you mean the char |
19:48:17 | FromDiscord | <enthus1ast> yeah |
19:48:29 | FromDiscord | <Elegantbeef> I dont recall how utf8 differs from utf16 so look that up |
19:48:36 | FromDiscord | <enthus1ast> its all shit |
19:48:38 | FromDiscord | <Elegantbeef> Going to have to do some bitwise ops |
19:49:58 | PMunch | I mean you could just have a look at what $ for a WideCString does |
19:50:08 | PMunch | As it loops over the characters |
19:50:40 | PMunch | I guess some characters can't be represented by a single codepoint though, so you might not be able to convert a single character to a meaningful string |
19:52:10 | * | krux02 quit (Remote host closed the connection) |
19:52:52 | * | krux02 joined #nim |
19:58:34 | FromDiscord | <aruZeta> maybe smth like `convert(s, "UTF-8", "UTF-16")` |
19:59:47 | FromDiscord | <aruZeta> from https://nim-lang.org/docs/encodings.html#convert%2Cstring%2Cstring%2Cstring |
20:01:25 | FromDiscord | <enthus1ast> is UTF-16 == windows wide strings? |
20:02:23 | FromDiscord | <aruZeta> idk sry ¯\_(ツ)_/¯ |
20:02:44 | FromDiscord | <enthus1ast> hell, that this is even a thing in 2022 |
20:02:57 | FromDiscord | <aruZeta> just know the function since I used it to convert UTF-8 to ISO 8859-1 |
20:03:12 | PMunch | @enthus1ast, yes UTF-16 is Windows wide strings |
20:03:45 | PMunch | Microsoft decided to adopt Unicode before UTF-8 had won the encoding wars. So they rewrote everything to UTF-16 and are kind of stuck with that :P |
20:03:56 | PMunch | IIRc |
20:05:34 | FromDiscord | <enthus1ast> yes |
20:06:18 | FromDiscord | <auxym> In reply to @enthus1ast "is UTF-16 == windows": sort of. wstrings are UCS-2, which is almost utf16 except some details |
20:06:45 | PMunch | Ah right |
20:06:55 | PMunch | Wait what are the differences between UCS-2 and UTF-16? |
20:08:08 | FromDiscord | <auxym> eh apparently newer windows might be utf16 according to this. one thing is that utf16 has more codepoints. https://newbedev.com/confused-about-c-s-std-wstring-utf-16-utf-8-and-displaying-strings-in-a-windows-gui |
20:09:18 | FromDiscord | <auxym> https://en.wikipedia.org/wiki/Unicode_in_Microsoft_Windows |
20:13:36 | FromDiscord | <demotomohiro> 16bits per character is not enough for unicode and utf16 has surrogate pair. There are 4 bytes charactors in utf16. |
20:14:11 | PMunch | Ah so UCS-2 is the parts of UTF-16 that can fit in a single 16-byte character? |
20:14:14 | FromDiscord | <enthus1ast> argh i actually not wanted to go into the nitty gritty of windows wide strings |
20:14:31 | PMunch | @enthus1ast, you know what the solution is? |
20:16:04 | FromDiscord | <enthus1ast> not yet |
20:16:38 | PMunch | Switch to Linux :D |
20:17:01 | FromDiscord | <enthus1ast> -.- |
20:17:19 | FromDiscord | <enthus1ast> i want to finally patch illwill to be able to use unicode |
20:17:37 | FromDiscord | <Elegantbeef> Doesnt it work with unicode |
20:17:40 | FromDiscord | <enthus1ast> so it will be linux and windows |
20:17:41 | FromDiscord | <enthus1ast> no |
20:17:42 | FromDiscord | <Elegantbeef> UTF8 i mean |
20:18:01 | FromDiscord | <Elegantbeef> There are windows operations for utf16 -\> utf8 |
20:18:07 | FromDiscord | <Elegantbeef> https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte for instance |
20:19:32 | FromDiscord | <enthus1ast> at least inputting |
20:19:53 | FromDiscord | <aruZeta> have you tried `std/encodings` ? |
20:20:08 | FromDiscord | <aruZeta> it _may_ help |
20:20:24 | FromDiscord | <enthus1ast> widestrs should have it |
20:20:24 | FromDiscord | <Elegantbeef> What do you mean by this? |
20:20:26 | FromDiscord | <enthus1ast> but it lacks |
20:20:51 | FromDiscord | <enthus1ast> you cannot read non ascii |
20:20:55 | FromDiscord | <enthus1ast> like öäü |
20:21:46 | FromDiscord | <Elegantbeef> Wouldnt it be the case that you implement a `readInput` or w/e and just put it in a while loop until the codepoint is done |
20:22:07 | FromDiscord | <Elegantbeef> Eh i guess it does non blocking so that's dumb |
20:22:26 | FromDiscord | <enthus1ast> windows is actually much better than posix in this case |
20:22:49 | FromDiscord | <enthus1ast> on posix you parse stuff that is inputted, on windows you call api's |
20:22:52 | FromDiscord | <Elegantbeef> Instead of while loop global state that makes it so `readInput` only returns a completed unicode character |
20:23:24 | FromDiscord | <Elegantbeef> Unicode doesnt exist here so uhh 😛 |
20:23:29 | FromDiscord | <enthus1ast> yeah this |
20:23:46 | FromDiscord | <enthus1ast> but it gives a lot more input for example\: resize events, mouse events etc |
20:23:58 | FromDiscord | <enthus1ast> as structures |
20:24:09 | FromDiscord | <enthus1ast> on posix you parse text soup |
20:24:47 | FromDiscord | <Elegantbeef> I mean eitherway does one really need utf16 for this? |
20:25:08 | FromDiscord | <enthus1ast> https://docs.microsoft.com/en-us/windows/console/key-event-record-str |
20:25:39 | FromDiscord | <Elegantbeef> Read the char to a string, and on `readInput` if the string is a proper rune return it else return a sentinel or an optional |
20:26:53 | FromDiscord | <enthus1ast> ah and windows also gives you what mod key is pressed with the character |
20:27:12 | FromDiscord | <enthus1ast> iirc posix could not handle all cases, but not sure any more |
20:27:39 | FromDiscord | <Elegantbeef> Dont know if my suggestion would work given i hardly ever touch unicode |
20:32:51 | FromDiscord | <enthus1ast> ok its actually quite easy |
20:33:08 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=48lX |
20:35:43 | * | krux02 quit (Remote host closed the connection) |
20:40:23 | * | arkurious quit (Quit: Leaving) |
20:46:07 | FromDiscord | <enthus1ast> ah and it also seems that on linux you cannot easily detect key up events |
20:46:31 | FromDiscord | <enthus1ast> so this means, illwill must be dumped down to posix level ;) |
20:49:13 | FromDiscord | <enthus1ast> dumbed, i mean dumbed |
20:51:23 | FromDiscord | <Forest> In reply to @Elegantbeef "Error is for compile": Yeah figured that out lol |
20:54:19 | * | PMunch quit (Quit: leaving) |
21:10:51 | FromDiscord | <Forest> How do i use `ModuleGraph` to go through each file that's compiled and get the ast from it? :P |
21:11:12 | FromDiscord | <Forest> Don't understand how I'm supposed to use it to generate the json code, just reading through compiler/modulegraphs.nim rn |
21:13:48 | FromDiscord | <Ras> @!!sharpcdf!! zippy should now work |
21:13:57 | FromDiscord | <Ras> the fix has been merged |
21:14:26 | FromDiscord | <!!sharpcdf!!> cool, ill check soon |
21:14:28 | FromDiscord | <!!sharpcdf!!> thanks for the pr |
21:25:50 | FromDiscord | <Forest> Guessing i should look in `ifaces` and then the `module` field |
21:36:46 | * | krux02 joined #nim |
21:50:10 | FromDiscord | <Forest> Everything i do to the module field ends up segfaulting |
22:17:42 | FromDiscord | <SaAnd> how do i generate a c binding with futhark? i want to make sure im not doing anything wrong |
22:18:46 | FromDiscord | <SaAnd> sent a long message, see http://ix.io/48mj |
22:19:24 | FromDiscord | <SaAnd> it put a very wierd looking binding in my .cache |
22:20:45 | FromDiscord | <Elegantbeef> That's about right |
22:22:10 | FromDiscord | <SaAnd> is that normal? |
22:22:11 | FromDiscord | <SaAnd> sent a long message, see http://ix.io/48mk |
22:22:26 | FromDiscord | <Elegantbeef> For futhark yes |
22:22:33 | FromDiscord | <SaAnd> ok sounds good |
22:41:10 | FromDiscord | <d4rckh> Can I have cpython in Nim? |
22:41:19 | FromDiscord | <d4rckh> I want to use it for automating some parts of my program |
22:46:01 | FromDiscord | <demotomohiro> nimpy? |
22:53:09 | FromDiscord | <d4rckh> I don't think cpython relies on a local installation of python |
22:54:16 | FromDiscord | <d4rckh> I mean, i should just run some python code at run time in my Nim program and have the script be able to call some functions i wrote in Nim |
22:54:32 | FromDiscord | <d4rckh> And then i should be able to get the output |
23:14:17 | * | Jovan quit (Ping timeout: 255 seconds) |
23:36:26 | * | Jovan joined #nim |
23:45:31 | * | krux02 quit (Remote host closed the connection) |