00:05:35 | * | arkurious quit (Ping timeout: 264 seconds) |
00:08:01 | * | arkurious joined #nim |
01:50:59 | FromDiscord | <Iliketwertles> whats the proper way to read from stdin when used in a pipe like this ↵`some-command | nim-project` |
02:02:44 | * | sagax quit (Quit: Konversation terminated!) |
02:21:24 | * | azimut_ quit (Quit: ZNC - https://znc.in) |
02:21:56 | * | azimut joined #nim |
02:46:50 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4q3o |
02:52:02 | NimEventer | New thread by ringabout: My Nim Development Weekly Report (3/5), see https://forum.nim-lang.org/t/9970 |
02:55:23 | FromDiscord | <Iliketwertles> In reply to @amadan "You can just treat": that works but what theres more than one line? |
02:57:02 | FromDiscord | <Rika> Then read more lines, what exactly is the problem? |
03:00:56 | FromDiscord | <Iliketwertles> i want it to always read every line, and some commands id be running before it dont just output everything at once |
03:01:11 | FromDiscord | <Iliketwertles> like installing a package for example takes multiple lines and isnt all at once |
03:02:20 | FromDiscord | <Iliketwertles> i want it to read every line as its printed |
03:02:36 | FromDiscord | <Iliketwertles> and output the line after going through the filtering |
03:02:40 | FromDiscord | <Iliketwertles> if that makes sense |
03:08:25 | FromDiscord | <Rika> Do you want to do anything while there are no lines to print or is that all you want to do |
03:08:43 | FromDiscord | <Iliketwertles> thats it |
03:09:03 | FromDiscord | <Rika> Then probably literally a for loop of just read line would work |
03:09:12 | FromDiscord | <Iliketwertles> simply put its a text filter that reads the input and changes parts then re-prints it |
03:09:55 | FromDiscord | <Rika> Why not learn how to use sed so you don't have to make this program? Idk |
03:10:17 | FromDiscord | <Iliketwertles> cause i would rather make the program? |
03:19:19 | FromDiscord | <amadan> There is also `readAll` which can be used to read all of the stdin input↵But that isn't as memory efficient as reading lines if you are just operating on each line |
03:24:36 | FromDiscord | <Iliketwertles> also doesnt output per-line which for the rare actual use of it isnt important but a downside |
03:25:11 | FromDiscord | <Iliketwertles> cause tbh itll just be a thing used with like cat or something like that |
03:29:49 | FromDiscord | <mk-fg> Don't forget to do flush when printing lines to stdout, or change buffering there |
03:38:34 | FromDiscord | <Iliketwertles> flush? |
03:38:55 | FromDiscord | <Iliketwertles> @mk-fg forgive my ignorance but what is that |
03:39:32 | FromDiscord | <mk-fg> <https://nim-lang.org/docs/io.html#flushFile%2CFile> <--- this thing |
03:40:37 | FromDiscord | <Iliketwertles> so at the end `flushFile(stdin)`? |
03:40:42 | FromDiscord | <Iliketwertles> or whatever i set the variable to? |
03:40:59 | FromDiscord | <mk-fg> Not sure if nim might handle stdout buffering in some special way (didn't check), but normally libc can enable it with non-tty outputs (e.g. to a file) |
03:42:03 | FromDiscord | <mk-fg> So if you want lines to be actually output in real-time, and not batched together in one big buffer, might want to do that |
03:42:32 | FromDiscord | <mk-fg> You'd do on buffered outputs, not on stdin, but yeah, pretty much |
03:42:46 | FromDiscord | <Iliketwertles> so your saying, loop through the lines then flush after every line? |
03:43:56 | FromDiscord | <mk-fg> Yeah, unless output is always a terminal, which I think is always line-buffered |
03:51:11 | FromDiscord | <Iliketwertles> ok my thing kinda works? |
03:51:52 | FromDiscord | <jtv> You can unbuffer a terminal, just requires some ioctl voodoo |
03:52:29 | FromDiscord | <Iliketwertles> kinda weird https://media.discordapp.net/attachments/371759389889003532/1082148669685518376/screenshot_2023-03-05-225210.png |
03:52:37 | FromDiscord | <Iliketwertles> same file but one goes through my thing one doesnt |
03:53:34 | FromDiscord | <Iliketwertles> its repeating some things |
03:53:52 | FromDiscord | <Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4q3v |
03:54:20 | FromDiscord | <Iliketwertles> using write instead of echo to not have a trailing \n |
03:55:52 | FromDiscord | <Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4q3w |
03:59:41 | FromDiscord | <jtv> It looks like somehow you're getting the terminal echo from the cat command and the output from your program. Does it do the same thing if you do ./owo < ~/ai-prompts/rick.txt ?? |
04:00:48 | FromDiscord | <Iliketwertles> yea the exact same thing |
04:02:00 | FromDiscord | <Iliketwertles> my old code works fine tho in that regard |
04:02:19 | FromDiscord | <Iliketwertles> just doesnt post anything till after stdin stops getting info or whatever |
04:02:26 | FromDiscord | <jtv> And what if you do `stty -echo` first to turn off echo? That is no solution, just trying to help myself understand |
04:03:26 | FromDiscord | <Iliketwertles> sent a code paste, see https://paste.rs/CGQ |
04:03:49 | FromDiscord | <Iliketwertles> its correct |
04:03:58 | FromDiscord | <Iliketwertles> but it doesnt have the new lines i dont think |
04:04:21 | FromDiscord | <Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4q3z |
04:04:46 | FromDiscord | <Iliketwertles> but some of the stuff isnt filtered correctly |
04:04:53 | FromDiscord | <jtv> So I'm not worried about that. That's your entire program??? |
04:05:00 | FromDiscord | <Iliketwertles> yea |
04:05:01 | FromDiscord | <Iliketwertles> lol |
04:05:50 | FromDiscord | <Iliketwertles> wait |
04:05:56 | FromDiscord | <Iliketwertles> something isnt adding up |
04:06:00 | FromDiscord | <Iliketwertles> (in my head) |
04:07:10 | FromDiscord | <jtv> Call setStdIoUnbuffered() before reading from stdin. Copy and write one character at a time |
04:07:19 | FromDiscord | <jtv> The flush shouldn't be needed btw |
04:08:02 | FromDiscord | <jtv> You could still call readLine() really |
04:11:42 | FromDiscord | <Iliketwertles> ok its better but theres a more fundamental flaw lol unrelated to reading from stdin |
04:12:00 | FromDiscord | <Iliketwertles> its only doing one of the if statements but im 99% sure ik how to fix |
04:12:09 | FromDiscord | <Iliketwertles> make all the ifs seperate? |
04:12:28 | FromDiscord | <jtv> Well, no, that's going to print the line out multiple times, once for each match |
04:12:49 | FromDiscord | <Iliketwertles> continue after the write()? |
04:12:57 | FromDiscord | <Iliketwertles> (edit) "continue" => "`continue`" | "write()?" => "`write()`?" |
04:13:05 | FromDiscord | <Iliketwertles> does that even apply? |
04:13:24 | FromDiscord | <jtv> No, read into a variable, and keep replacing the variable, write it out once. |
04:13:34 | FromDiscord | <jtv> After you've made every substitution for the line |
04:13:39 | FromDiscord | <Iliketwertles> oh so something like (im making it rn) |
04:13:58 | FromDiscord | <jtv> The reason you aren't getting newlines is because your "write(stdout, "\n") isn't indented when it should be so it's not printing for each line |
04:14:39 | FromDiscord | <Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4q3C |
04:14:42 | FromDiscord | <jtv> And your original pasted code works fine (i.e., doesn't dupe), you must have been running something that was doing something slightly off |
04:14:46 | FromDiscord | <Iliketwertles> then at the end print the line? |
04:14:51 | FromDiscord | <jtv> Sure |
04:15:18 | FromDiscord | <jtv> Tho it has to be line = line.replace(...) |
04:15:28 | FromDiscord | <jtv> And why the & " "??? |
04:16:40 | FromDiscord | <Iliketwertles> i dont even remember tbh but it was working |
04:16:43 | FromDiscord | <Iliketwertles> ¯\_(ツ)_/¯ |
04:16:49 | FromDiscord | <Iliketwertles> ill try without and see ig |
04:17:02 | FromDiscord | <Iliketwertles> oh cause it used to split at " " |
04:17:08 | FromDiscord | <Iliketwertles> i had to add it back |
04:17:13 | FromDiscord | <Iliketwertles> idk why i kept it tho |
04:18:02 | FromDiscord | <Iliketwertles> ok its filtering everything now |
04:19:26 | FromDiscord | <Iliketwertles> everything works now i think |
04:20:38 | FromDiscord | <Iliketwertles> doesnt keep color but it also breaks when theres more complex stuff going on with text, not worried about that last bit tho https://media.discordapp.net/attachments/371759389889003532/1082155753084825650/screenshot_2023-03-05-231959.png |
04:25:41 | FromDiscord | <Iliketwertles> thanks @jtv |
04:50:40 | FromDiscord | <jtv> Np |
05:00:26 | * | rockcavera quit (Remote host closed the connection) |
05:21:56 | * | arkurious quit (Quit: Leaving) |
06:00:16 | NimEventer | New thread by sls1005: Overflow Checks, see https://forum.nim-lang.org/t/9971 |
06:09:21 | * | advesperacit joined #nim |
06:17:27 | FromDiscord | <ShalokShalom> In reply to @ieltan "i've found https://nim-lang.github.io/fusion/src/fu": the author is here on the server↵↵https://github.com/haxscramper/hmatching |
06:19:02 | * | kenran joined #nim |
06:19:07 | FromDiscord | <ShalokShalom> In reply to @Iliketwertles "yea normally its ": you're ≠ your 😛 |
06:47:25 | FromDiscord | <ajusa> Does anyone know why the first block here passes and the second block fails with an exception? I would expect them to have the same behavior: https://play.nim-lang.org/#ix=4q3Q |
06:55:20 | FromDiscord | <Elegantbeef> God i wouldnt use elvis regardless |
06:55:36 | FromDiscord | <Elegantbeef> It uses templates for all the operations, which means each `?:` invokes the expression multiple times |
06:56:43 | FromDiscord | <ajusa> Are there any alternatives? |
06:57:19 | FromDiscord | <ajusa> Also I think the expression would still only be called once right? I don't see why it would be evaluated multiple times |
06:57:49 | FromDiscord | <Elegantbeef> `(if ?l: l else: r)` |
06:58:04 | FromDiscord | <Elegantbeef> you need to check if it's truthy and then return l if it is |
06:58:09 | FromDiscord | <ajusa> ah once to see if it is truthy, and once again for the actual value |
06:58:25 | FromDiscord | <Elegantbeef> And you cannot cache it cause what if `l` raises an exception |
06:58:52 | FromDiscord | <Elegantbeef> It's all correct but for something like this you're evaluating the filter and indexing it |
06:59:35 | FromDiscord | <Elegantbeef> not failing for the int example is odd |
07:00:36 | FromDiscord | <ajusa> Here is my even more minimal example: https://play.nim-lang.org/#ix=4q3S |
07:01:01 | FromDiscord | <ajusa> (in my specific case the performance doesn't matter, it's on a list of <10 items) |
07:01:55 | FromDiscord | <Elegantbeef> This does give me an idea for a new forloop macro though |
07:03:50 | FromDiscord | <ajusa> what's the idea? |
07:04:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4q3V |
07:04:18 | FromDiscord | <Elegantbeef> replace `first` with sensible name |
07:05:01 | FromDiscord | <ajusa> basically a for else construct huh? |
07:05:20 | FromDiscord | <ajusa> that would be my exact use case at least |
07:05:36 | FromDiscord | <ajusa> though I was hoping to use elvis for a couple other "truthy" checks |
07:06:11 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4q3W |
07:06:27 | FromDiscord | <Elegantbeef> The way elvis is written prevents it from being used that way |
07:06:52 | FromDiscord | <Elegantbeef> You need something like `wrapnils` `?.` which rewrites the entire statement |
07:07:13 | FromDiscord | <Elegantbeef> Since you need to do a truthy check on each step |
07:09:28 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4q3Z |
07:09:42 | FromDiscord | <Elegantbeef> `?:` could do this of course, but it needs to be a macro |
07:10:08 | FromDiscord | <Elegantbeef> Where it breaks apart the expressions on the left into each step |
07:10:16 | FromDiscord | <Elegantbeef> It's not that complicated to write |
07:12:01 | FromDiscord | <Elegantbeef> Assuming you write the code so move semantics can kick in it also wouldnt be too costly |
07:12:13 | FromDiscord | <Elegantbeef> \ajusa now regrets asking about elivs |
07:15:27 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=4q40 |
07:15:38 | FromDiscord | <ajusa> (edit) |
07:16:24 | FromDiscord | <Elegantbeef> But the learning experience! |
07:20:17 | FromDiscord | <ajusa> i'm tired of learning |
07:20:25 | FromDiscord | <Elegantbeef> Uh oh |
07:20:36 | FromDiscord | <Elegantbeef> When you're tired of learning, you're dead |
07:33:39 | * | Notxor joined #nim |
07:40:14 | FromDiscord | <Hourglass [She/Her]> Is it even worth it to make an EC system for a text adventure game? |
07:40:33 | FromDiscord | <Elegantbeef> No just use a generic |
07:40:42 | FromDiscord | <Elegantbeef> Why do you need composition for a text adventure |
07:42:26 | FromDiscord | <Hourglass [She/Her]> I don't tbf, was just wondering if there's any point to doing it |
08:01:28 | FromDiscord | <PunchCake> is `proc` any different from `func`? |
08:03:25 | Amun-Ra | PunchCake: func is a proc with no side effects |
08:03:34 | FromDiscord | <ringabout> A func cannot access global variables.↵A func cannot have side effect, such as printing to the standard output or reading the standard input. |
08:04:50 | FromDiscord | <PunchCake> whaat func cant get input from the console? |
08:04:57 | FromDiscord | <PunchCake> welp imma stick with proc then |
08:05:03 | FromDiscord | <Elegantbeef> Of course not that's mutating global state |
08:05:12 | FromDiscord | <Elegantbeef> The entire point of a procedure is to limit the mutation of global state |
08:07:19 | FromDiscord | <Elegantbeef> a function\ |
08:24:44 | * | azimut quit (Quit: ZNC - https://znc.in) |
08:25:15 | * | azimut joined #nim |
08:51:18 | FromDiscord | <Phil> In reply to @PunchCake "whaat func cant get": "func" is a function in the mathematical sense.↵All it does is map inputs to outputs. It will always return the same output for the same input.↵It will not cause any actions to trigger, it's purely a conversion |
08:51:42 | FromDiscord | <Phil> It makes sense to use both. Funcs give you guarantees that you're not about to get side-effects thrown at you |
09:01:50 | * | azimut quit (Ping timeout: 255 seconds) |
09:02:52 | FromDiscord | <j-james> well, depends on how you define side effects 🙃 |
09:03:13 | FromDiscord | <j-james> but yea |
09:03:16 | FromDiscord | <Elegantbeef> Lol |
09:03:38 | FromDiscord | <Elegantbeef> I do always love to unfaithfully argue "Even growing the stack is a side effect" 😄 |
09:04:16 | FromDiscord | <j-james> exceptions count, and i think infinite loops typically count, (and debugEcho counts) but those are very reasonable to not include |
09:04:35 | FromDiscord | <j-james> i'll be stealing that one 👀 |
09:04:51 | FromDiscord | <Elegantbeef> I mean with dangling pointers it's provable 😛 |
09:06:35 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4q4f |
09:07:33 | FromDiscord | <Elegantbeef> But i always argue it more like a devils advocate cause i actually like code that does something 😄 |
09:21:59 | * | advesperacit quit (Ping timeout: 255 seconds) |
09:22:54 | * | advesperacit joined #nim |
09:49:47 | * | ltriant_ joined #nim |
09:50:01 | * | ltriant quit (Ping timeout: 268 seconds) |
09:54:20 | * | randomuser464876 joined #nim |
10:22:57 | * | randomuser464876 quit (Quit: Client closed) |
10:29:24 | FromDiscord | <jmgomez> did you end up switching to it? |
10:29:52 | FromDiscord | <jmgomez> In reply to @Gumbercules "RemedyBG is pretty nice": did you end up switching to it? |
10:32:12 | FromDiscord | <thebluepandabear> Voice message.ogg https://media.discordapp.net/attachments/371759389889003532/1082249261787389952/Voice_message.ogg |
10:42:21 | * | junaid_ joined #nim |
10:42:48 | FromDiscord | <Phil> Erm |
10:42:59 | FromDiscord | <Phil> We have the political goal of being a programming language? |
10:44:04 | FromDiscord | <Phil> That's pretty much it as far as I'm aware, vindaar or Pmunch may correct me on that one |
10:45:39 | * | junaid_ quit (Remote host closed the connection) |
10:51:18 | FromDiscord | <thebluepandabear> Voice message.ogg https://media.discordapp.net/attachments/371759389889003532/1082254071848783903/Voice_message.ogg |
10:52:45 | FromDiscord | <Phil> Is there a chance for you to type out instead of voice messaging?↵I'm in a public space with requirements to be quiet and listening almost 2 minutes is not quite something I'm a fan of here 😅 |
10:53:52 | FromDiscord | <ringabout> In reply to @thebluepandabear "Voice message.ogg": Nope, not what I'm aware of. |
10:54:18 | FromDiscord | <thebluepandabear> OK thanks. |
11:15:43 | * | junaid_ joined #nim |
11:41:35 | * | advesperacit quit (Read error: Connection reset by peer) |
11:43:05 | * | advesperacit joined #nim |
11:43:18 | FromDiscord | <pmunch> What kind of political goals would we have? |
11:43:37 | FromDiscord | <pmunch> Araq for president? Don't think he'd appreciate that much |
11:44:45 | * | junaid_ quit (Remote host closed the connection) |
12:09:10 | FromDiscord | <thebluepandabear> black lives matter, or LGBT stuff. I'm a christian and lgbt goes against my beliefs and its not the right place to push these social issues |
12:11:20 | FromDiscord | <thebluepandabear> anyways, don't want to cause a political argument here, but it's good that Nim is not woke per se lol |
12:12:57 | FromDiscord | <ringabout> Yeah, this is a programming channel anyway |
12:21:02 | FromDiscord | <pmunch> That being said you aren't entitled to your opinion any more than e.g. LGBT supporters are here. So if you where to start attacking community members for anything like that you would get banned. |
12:21:58 | FromDiscord | <thebluepandabear> Understood. I have nothing against LGBT People, or anything like that, I just don't like when it involves into programming. |
12:22:33 | FromDiscord | <thebluepandabear> It mostly just goes against my Christian beliefs and stuff, that I have issue with it , but I would never harrass anyone for being LGBT , that would be unchristian like to do lol |
12:22:46 | FromDiscord | <Hourglass [She/Her]> Then why bring it up at all? |
12:23:23 | FromDiscord | <Hourglass [She/Her]> Can just, not talk about it in #main, considering it, as pmunch and ringabout said, is a channel for programming |
12:23:25 | FromDiscord | <thebluepandabear> because I dont want it to be involved into programming I was just ensuring that the language has no political goals |
12:23:32 | FromDiscord | <thebluepandabear> anyways lets stop this now before it gets into politics this was not my intention |
12:23:35 | FromDiscord | <thebluepandabear> yeah lets' just stop |
12:23:41 | FromDiscord | <pmunch> Unfortunately a lot of your peers have forgotten that last part.. |
12:25:13 | FromDiscord | <ShalokShalom> In reply to @pmunch "Araq for president? Don't": Araq for the BDFL of Cuba |
12:43:12 | NimEventer | New Nimble package! unibs - binary de-/serialization that works on js, c and VM (compiletime), see https://github.com/choltreppe/unibs |
12:49:32 | FromDiscord | <jmgomez> hey @ringabout just saw this https://github.com/nim-lang/Nim/pull/21481, does it improves auto inference? |
12:50:38 | FromDiscord | <jmgomez> Like sometimes you have to specify the type in `(a : TypeHere) => someCode)` in order to deduce `a:auto => auto` |
12:51:15 | FromDiscord | <ringabout> In reply to @jmgomez "hey <@658563905425244160> just saw": I haven't figured out whether it's worth allowing this kind of inference in thta issue. Probably we should somehow disallow this case. |
12:51:42 | FromDiscord | <ringabout> (edit) "thta" => "that" |
12:54:11 | FromDiscord | <jmgomez> In reply to @ringabout "I haven't figured out": Ok, Im not really referring to that particular issue, but to the another auto pass part |
12:56:40 | FromDiscord | <ringabout> Yeah, adding another pass will allow the type of returns being inferred beforehand/ |
12:56:48 | FromDiscord | <ringabout> (edit) "Yeah, adding" => "Adding" | "beforehand/" => "beforehand." |
12:57:13 | FromDiscord | <ringabout> I have no idea on how it will affect the case you mentioned. |
13:53:32 | * | rockcavera joined #nim |
14:33:33 | FromDiscord | <Nerve> Is there some kind of compiler flag I can use to force my compiled executable to look for shared libraries in a directory I specify? I want to distribute my application with some shared libraries and I'd like to not have to specify LD_LIBRARY_PATH every time |
14:33:46 | FromDiscord | <Nilts> In reply to @jmgomez "did the source map": Still have no idea what that is, but i fixed the issue |
14:35:44 | * | kenran quit (Remote host closed the connection) |
14:43:53 | FromDiscord | <jmgomez> In reply to @not logged in "Still have no idea": You mentioned that the debugger didnt stop for you. Source maps is what enables the debugger (i.e. chrome debugger) to map between the generated js code to the Nim one. Last time I checked they didnt work, but I saw that it got some work some time ago.↵The question is if the debugger did stop in your Nim code or did you fix your issues without debugging? |
15:07:16 | * | arkurious joined #nim |
15:07:36 | * | arkurious quit (Remote host closed the connection) |
16:03:50 | FromDiscord | <isofruit> test |
16:03:55 | FromDiscord | <Phil> Okay, that works |
16:04:34 | FromDiscord | <Phil> test2 |
16:08:39 | FromDiscord | <Rika> Damn so you’re moving to matrix too |
16:11:28 | FromDiscord | <Phil> Mostly want to be able to access it when necessary, I recall the last nimconf being done via a matrix channel |
16:50:23 | FromDiscord | <haxscramper> In reply to @ieltan "is it still safe": 1. Not 'deprecated', just there are no people at the moment who want to work on this ↵2. It is 'safe' in a sense that it won't suddenly change↵3. Gara and Patty libraries, but they also haven't seen any development in a couple of years. So they are also just as 'safe' |
17:24:54 | FromDiscord | <Pietro Peterlongo> I think that was the nim devroom at fosdem which was Feb 2022. Nim conf (Oct 22) was on youtube with youtube chat |
18:01:36 | * | rockcavera quit (Ping timeout: 248 seconds) |
18:11:22 | * | rockcavera joined #nim |
18:11:22 | * | rockcavera quit (Changing host) |
18:11:22 | * | rockcavera joined #nim |
18:12:15 | * | azimut joined #nim |
18:29:26 | * | zgasma joined #nim |
18:30:33 | * | zgasma quit (Client Quit) |
18:32:09 | * | zgasma joined #nim |
18:45:15 | FromDiscord | <tfp> @beef guy on IRC: are there any docs for micros? |
18:45:21 | FromDiscord | <tfp> i'm looking at it now looks very cool from the example |
18:46:20 | FromDiscord | <tfp> it's just kind of like a bunch of helpers you can call at compile time right? |
18:49:09 | FromDiscord | <Phil> In reply to @tfp "it's just kind of": You know how every syntax pattern in nim is basically a fixed pattern of Nodes?↵Instead of all of that being vague, micros types that stricter, so that you can only generate sequences of nodes that evaluate to valid language constructs |
18:49:38 | FromDiscord | <Phil> So you get better type-safety when generating code like that |
18:50:48 | FromDiscord | <tfp> yeah that's what i grokked but i am struggling to read all the little source files |
18:52:20 | FromDiscord | <tfp> or like high level concepts in general i guess, like what is a RoutineNode |
18:52:25 | FromDiscord | <Phil> I think this is one of those situations where having more extensive documentation like, say, for example in a nimibook, could really help here |
18:52:52 | FromDiscord | <tfp> a documented example could work too |
18:52:56 | FromDiscord | <tfp> i am rly just genuinely trying to use it |
18:53:39 | FromDiscord | <Phil> That was me trying to no wave with an entire fence (if that saying exists in english) at beef once he reads this 😛 |
18:54:37 | FromDiscord | <Phil> But yeah, if you want you can do what I'm doing with owlkettle and hound the creator with questions and write docs for yourself.↵I'd be happy to help with setting up nimibook docs.↵For reference:↵It's basically just writing markdown, but the code examples you put in actually run and compile so you know that your examples are valid |
18:55:15 | FromDiscord | <Phil> (edit) "But yeah, if you want you can do what I'm doing with owlkettle and hound the creator with questions and write docs for yourself.↵I'd be happy to help with setting up nimibook docs.↵For reference:↵It's basically just writing markdown, but the code examples you put in actually run and compile so you know that your examples are valid" => "sent a long message, see http://ix.io/4q6P" |
18:55:28 | FromDiscord | <Phil> (edit) "http://ix.io/4q6P" => "http://ix.io/4q6Q" |
18:56:35 | FromDiscord | <tfp> i mean maybe it will help me learn |
18:56:42 | FromDiscord | <tfp> i could try it |
18:56:57 | FromDiscord | <Phil> It did for me with owlkettle, that's for sure. |
18:57:30 | FromDiscord | <Phil> Want a small crash course on how to set up a nimibook as well as a github workflow file that'll automatically compile it and publish it to github pages? |
18:57:57 | FromDiscord | <Phil> (edit) "pages?" => "pages (whenever you push a commit to the main branch)?" |
18:59:54 | FromDiscord | <tfp> i think i got it working |
19:00:02 | FromDiscord | <tfp> i can set up a workflow if i ever make any progress |
19:00:21 | FromDiscord | <tfp> appreciate the offer ofc but i dont have that much time to work on this project rn |
19:01:02 | FromDiscord | <Phil> I tend to offer my help with setting up github workflows that I know because those workflows tend to be insanely annoying, at least they always were to me |
19:01:27 | FromDiscord | <Phil> So I was quite happy once I found out a few github actions that worked for me |
19:02:14 | FromDiscord | <Phil> Always happy to share that knowledge, as imo they're super useful and can add quite a bit to the quality of a project, but also super time consuming for first setup and annoying to deal with |
19:09:46 | FromDiscord | <tfp> ye i actually really disliked github actions when i used it last |
19:10:11 | FromDiscord | <tfp> found it really limited, like there wasn't an easy way to link up steps and pass artifacts between them? |
19:10:11 | FromDiscord | <tfp> and you couldn't work around it because the declarative format was limiting |
19:10:32 | FromDiscord | <tfp> but nimibook is working already so it's actually kind of nice to use to hack on the examples |
19:10:35 | FromDiscord | <tfp> thanks for showing me |
19:20:29 | FromDiscord | <Phil> Happy to do so, I've set up multiple documentations with it already and it works quite nicely |
19:21:08 | FromDiscord | <Phil> Now if I could have simpler way to have specific lines not get executed when the code is run and have the ability to fold-in sections in the sidebar... 😛 |
19:21:39 | FromDiscord | <Phil> (That first bit is pretty relevant when your example e.g. compile small GUI apps, daemons or webservers that then try to run) |
19:22:17 | FromDiscord | <Hourglass [She/Her]> I made such a hacky fix for my issue |
19:22:28 | FromDiscord | <Phil> ? |
19:22:39 | FromDiscord | <Hourglass [She/Her]> Where shared libraries can't use `AsyncSocket.send` |
19:24:01 | FromDiscord | <Hourglass [She/Her]> Basically, from the main app, I define a proc that's literally just `proc(socket: AsyncSocket, data: string, flags = {SafeDisconn}) {.async.} = await s.send(data, flags)` to a `setSendProc` function in the shared library |
19:25:09 | FromDiscord | <Hourglass [She/Her]> sent a code paste, see https://paste.rs/KYY |
19:25:40 | FromDiscord | <Hourglass [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4q70 |
19:25:44 | FromDiscord | <Hourglass [She/Her]> It works which is even better |
19:26:21 | FromDiscord | <Hourglass [She/Her]> Does Nim have a way to exclude certain procs from being imported? |
19:27:01 | FromDiscord | <Phil> import bla except x |
19:27:08 | FromDiscord | <Hourglass [She/Her]> Neat, thanks! |
19:28:26 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4q72 |
19:28:57 | FromDiscord | <Hourglass [She/Her]> Thanks Phil! |
19:32:00 | * | PMunch joined #nim |
19:32:59 | PMunch | Hmm, anyone got a good explanation of what's going on in this thread? https://www.reddit.com/r/nim/comments/11is9ki/cant_compile_hello_world_on_windows/ |
19:33:44 | * | oddish_ joined #nim |
19:35:58 | * | mal``` joined #nim |
19:36:37 | * | oprypin_ joined #nim |
19:37:41 | * | mal`` quit (Ping timeout: 248 seconds) |
19:37:41 | * | Amun-Ra quit (Ping timeout: 248 seconds) |
19:37:41 | * | oprypin quit (Ping timeout: 248 seconds) |
19:37:41 | * | oddish quit (Ping timeout: 248 seconds) |
19:38:19 | * | Amun-Ra joined #nim |
19:48:12 | FromDiscord | <Phil> I'll have to tap out here, no windows |
19:48:23 | FromDiscord | <Phil> Not even in my walls |
19:50:20 | PMunch | Haha, just big gaping holes? |
19:51:30 | FromDiscord | <Phil> With blankets in front of them |
19:54:57 | PMunch | Fancy |
19:55:10 | PMunch | I think I would literally die if I had that in my house :P |
19:55:12 | PMunch | Too cold up here |
19:56:59 | FromDiscord | <Phil> Nah man |
19:57:01 | FromDiscord | <Phil> You'd be cool |
20:04:51 | FromDiscord | <Elegantbeef> But the hole in the wall is the window, the glass is the window pane↵(@Phil) |
20:05:16 | FromDiscord | <Phil> The hole in the wall is large enough to walk through and reaches the ground floor, it is a door with a blanket in front! |
20:08:54 | PMunch | What's the threshold for a hole in the wall to be called a window? |
20:09:11 | PMunch | I mean if I punch a hole in my wall, is that a window? |
20:11:54 | FromDiscord | <Elegantbeef> Any hole in the wall is indistinguishable from a window - Arthur C Clarke |
20:13:23 | FromDiscord | <auxym> In reply to @PMunch "Hmm, anyone got a": Saw that and no idea. The log seems really cursed `In file included In file included InIn ff frrfiooilmmle` |
20:14:01 | PMunch | Yeah, I'm a bit stumped |
20:14:16 | FromDiscord | <auxym> `In file included In file included InIn ff frrfiooilmmle e CC:i: \n\iUcUnslsceuelrdrsseu\\ddzz frrerxxdo\\ mnnf iirCmmcaco:chm ae\Cc\h:hUw\es_U\edshrs\w_ez\@m..@rx\nirsdmcache\h\asdf\nw_d\@[email protected]..@s\.@..@[email protected]\L..ha@.@nswsgL_.sad.@ng@s\ss.@@[email protected]@@[email protected]@.10s..@[email protected]@[email protected]@[email protected]@scdss:@ny7sis:0m-1.tp:6er` like wtf |
20:14:46 | FromDiscord | <auxym> either a bad copy-paste job or someone is very wrong with this person's computer/OS/terminal/something |
20:14:47 | PMunch | I just assumed that was some kind of Windows colour code stuff |
20:16:01 | FromDiscord | <auxym> IIRC windows doesn't use "escape codes" for terminal colors |
20:29:43 | * | PMunch quit (Quit: leaving) |
20:55:50 | * | advesperacit quit () |
21:28:59 | FromDiscord | <Dudugz> In reply to @auxym "either a bad copy-paste": No, this happens to me on some errors that Nim gives too. Some errors look like this and even if you recompile it appears like this, it happened using powershell in vscode |
21:29:54 | FromDiscord | <Dudugz> At least in terms of errors I didn't find Nim so clear, if it gives an error in an async proc it doesn't say which was the proc just that it gave an error in asyncdispatch.nim in some line |
21:46:50 | FromDiscord | <Hourglass [She/Her]> What does `arc` and `orc` stand for? I know they're both reference collectors, `orc` handling cyclic references but idk what the first letter in both of them mean |
21:49:50 | FromDiscord | <Elegantbeef> Automatic reference counting and cyclical reference counting |
21:50:57 | FromDiscord | <Hourglass [She/Her]> The `o` means cyclical? |
21:51:38 | FromDiscord | <Elegantbeef> Yes |
21:52:39 | FromDiscord | <Hourglass [She/Her]> Fair enough |
22:32:46 | * | zgasma quit (Quit: Lost terminal) |
22:42:26 | FromDiscord | <Nilts> In reply to @jmgomez "You mentioned that the": It stopped in the generated js, there was no debugging the nim code directly |
23:09:06 | FromDiscord | <Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4q7G |
23:09:34 | FromDiscord | <Nilts> (edit) "https://play.nim-lang.org/#ix=4q7G" => "https://play.nim-lang.org/#ix=4q7H" |
23:10:01 | FromDiscord | <Nilts> (edit) "https://play.nim-lang.org/#ix=4q7H" => "https://play.nim-lang.org/#ix=4q7I" |
23:11:28 | FromDiscord | <Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4q7J |
23:16:14 | FromDiscord | <jtv> Well, I don't remember all the rules w/ undefined vs null in Javascript, but x && b is the same as if (x) { b } for sure. |
23:20:36 | FromDiscord | <Nilts> In reply to @jtv "Well, I don't remember": oh, well in that case it is ok, but why does it still throw a error saying replit is undefined instead of running history.back() |
23:24:02 | FromDiscord | <Elegantbeef> @ajusa\: https://github.com/mattaylor/elvis/pull/12/files#diff-4bc9841992f7da8b3c2dc34bf6af9037c890b3a3b85048837f10b48c1ff1081fR261 there you go |
23:27:35 | FromDiscord | <ajusa> In reply to @Elegantbeef "<@102899813149855744>\: https://github.com/mattaylo": I saw that, thank you so much for finding the issue, and fixing it 😃 |
23:28:17 | FromDiscord | <Elegantbeef> It was an inherit problem with their setup, hopefully they apply this to `?` aswell |
23:28:49 | FromDiscord | <Elegantbeef> Your issue and #10 are identical for all intents and purposes |
23:29:01 | FromDiscord | <Elegantbeef> It's an issue with the fact `?` only does the entire expression and not each sub expression |
23:31:12 | FromDiscord | <Elegantbeef> Perhaps with this rewrite you could learn and do the `?` operator in a similar way |
23:32:34 | * | Notxor quit (Remote host closed the connection) |