00:13:05 | FromDiscord | <taperfade> in wNim what is wWindow ? |
01:17:41 | FromDiscord | <taperfade> |
01:30:00 | * | marcus quit (Remote host closed the connection) |
01:31:50 | * | marcus joined #nim |
01:41:02 | FromDiscord | <taperfade> nim is so cool i wish i could learn it fastetr |
02:39:53 | FromDiscord | <xtrayambak> Try out this: https://nim-by-example.github.io/getting_started/ |
02:40:20 | FromDiscord | <xtrayambak> It's a good resource for learning the basics in a short amount of time. |
02:58:32 | FromDiscord | <taperfade> whats the difference between const var and let |
02:58:37 | FromDiscord | <taperfade> and when do i use which |
03:12:01 | FromDiscord | <taperfade> |
03:12:21 | FromDiscord | <graveflo> In reply to @taperfade "whats the difference between": https://nim-lang.org/docs/tut1.html#constants↵`var` for variables that might change, `let` otherwise. `const` if you know what you are doing |
03:12:41 | * | rockcavera quit (Remote host closed the connection) |
03:13:03 | FromDiscord | <graveflo> (edit) "variables" => "values" |
03:27:15 | FromDiscord | <graveflo> has anyone else had an issue with atlas cloning packages outside the `deps` directory? |
03:41:52 | * | disso-peach joined #nim |
03:53:00 | FromDiscord | <mrgaturus> In reply to @taperfade "whats the difference between": var, let as said graveflo and const is a compile time constant |
03:53:19 | FromDiscord | <mrgaturus> (edit) "In reply to @taperfade "whats the difference between": var, let as ... said" added "graveflo" | removed "graveflo" |
03:54:55 | FromDiscord | <mrgaturus> var is like a mutable variable and let is like an inmutable variable |
04:40:22 | * | arkanoid quit (Ping timeout: 245 seconds) |
04:47:56 | FromDiscord | <kots> In reply to @graveflo "has anyone else had": I've had atlas clone packages into the root of my workspace instead of into my configured deps directory when doing `atlas use`, is that the kind of thing you mean? It's fixed in atlas head from what I can tell. |
04:56:51 | * | disso-peach quit (Remote host closed the connection) |
05:03:17 | NimEventer | New Nimble package! forge - basic toolchain to forge (cross-compile) your multi-platform nim binaries, see https://github.com/daylinmorgan/forge |
05:08:32 | FromDiscord | <toma400> In reply to @taperfade "inever had to worry": It's exactly why I love Nim, I really missed possibility to "close" variable, so it never get changed, or to see difference between initialisation and change 🥰 |
05:11:58 | FromDiscord | <toma400> Also heard Mojo got released and I see its devs benchmarked it as "35.000x faster than Python" which really gets me feel like it's a scam. Is this really possible even to reach such number? |
05:12:06 | FromDiscord | <Phil> In reply to @jviega "Not everything is a": ~~The man is wrong, everything's a dictionary!~~ |
05:13:12 | FromDiscord | <Phil> In reply to @gbolahan "Who here uses vscode": I will agree that it's pretty bad and that I've basically gone over to just not rely on that kind of tooling because of how unreliable it is |
05:16:43 | FromDiscord | <toma400> sent a long message, see http://ix.io/4FGB |
05:17:13 | FromDiscord | <sOkam! 🫐> In reply to @toma400 "1. `var` is just": 3 is more than that. it cannot even be taken the address of, while let does have an address |
05:17:34 | FromDiscord | <sOkam! 🫐> const is initialized once ever, let is initialized every run of the app |
05:18:00 | FromDiscord | <Elegantbeef> Const isnt technically ever intialised if we're playing correct the pedant |
05:18:10 | FromDiscord | <sOkam! 🫐> tru |
05:18:12 | FromDiscord | <Phil> sent a long message, see http://ix.io/4FGE |
05:18:32 | FromDiscord | <Phil> (edit) "http://ix.io/4FGE" => "http://ix.io/4FGF" |
05:18:40 | FromDiscord | <Elegantbeef> Const is a compile time constant, let is a runtime constant, var is a mutable variable |
05:19:48 | FromDiscord | <Phil> (edit) "http://ix.io/4FGF" => "http://ix.io/4FGG" |
05:41:56 | FromDiscord | <nnsee> to put into layman's terms, the value of a `const` needs to be known to the compiler when your program is compiled, before it ever runs. The value of a `let` can be anything depending on how your program actually runs, but once assigned, it cannot be modified. `var` is the same as `let`, except it _can_ be modified after being assigned |
05:42:54 | FromDiscord | <taperfade> ill just use let and var |
05:42:58 | FromDiscord | <taperfade> idk what const is good for |
05:45:03 | FromDiscord | <Phil> Makes some things faster |
05:45:41 | FromDiscord | <Phil> If you wanna go in with need for speed then using const as much as you can is good |
05:46:00 | FromDiscord | <taperfade> okie |
05:46:06 | FromDiscord | <taperfade> i need som help |
05:46:20 | FromDiscord | <taperfade> i have this thing that echoes out the key i press |
05:46:21 | FromDiscord | <nnsee> it's in the name - it's for defining constant values that never change (but are used throughout your program). Imagine if you have many procedures that use Pi - it wouldn't make much sense to write out 3.1415... every time, you'd just do `const pi = 3.14159` and just use the name `pi` everywhere instead of typing it out every time |
05:46:29 | FromDiscord | <taperfade> with the windows that im in rn |
05:46:29 | FromDiscord | <nnsee> simplified example, but you get it |
05:47:07 | * | Arthur quit (Quit: Ping timeout (120 seconds)) |
05:47:27 | * | Arthur joined #nim |
05:48:18 | FromDiscord | <nnsee> that smells suspiciously like you're writing a keylogger |
05:48:24 | FromDiscord | <nnsee> we will not help with that |
05:49:03 | FromDiscord | <taperfade> nope |
05:49:22 | FromDiscord | <taperfade> also im fixing the thing myself |
05:49:50 | FromDiscord | <taperfade> i dont need help false alarm |
05:52:48 | * | advesperacit joined #nim |
05:55:23 | FromDiscord | <taperfade> i want to make a simple chat |
05:55:26 | FromDiscord | <taperfade> thingy |
05:56:18 | FromDiscord | <Phil> Ohhh cool idea!↵You plan on having a program that talks with an existing chat program or do you want to write your own entirely? |
06:07:11 | * | azimut joined #nim |
06:26:03 | FromDiscord | <taperfade> not sure |
06:46:45 | * | PMunch joined #nim |
06:49:07 | FromDiscord | <toma400> sent a code paste, see https://play.nim-lang.org/#ix=4FH0 |
06:49:44 | FromDiscord | <toma400> For some reason I feel like first one is better (?) despite second using `let`? But it's only intuition and I'm curious if it's correct or not at all |
06:53:28 | PMunch | They should be just as fast |
06:53:32 | FromDiscord | <ieltan> I would say the latter because even though you're creating the `ex` `ey` everytime, it looks like the compiler could optimize a move there since it's not used afterwards while the former looks like you're reusing memory but you're actually making a copy everytime you're assigning to `result` |
06:53:36 | PMunch | But benchmark if you're curious |
06:54:18 | FromDiscord | <ieltan> Yeah, I think it's a negligible difference anyways |
06:54:23 | PMunch | If you're worried about speed though returning an OrderedTable is not what you want to do :P |
06:54:40 | PMunch | I assume you're coming from Python and want to return a dict? |
06:54:50 | FromDiscord | <toma400> In reply to @PMunch "If you're worried about": Out of curiosity, what would you recommend for that? |
06:55:00 | FromDiscord | <toma400> In reply to @PMunch "I assume you're coming": And yeah, for both answers XD |
06:55:27 | PMunch | Haha a common pattern in Python which isn't all that common in Nim. What are you actually trying to do? |
06:57:01 | PMunch | It might be that OrderedTable is the right thing to return in this case, but it can be a bit expensive if you don't need it |
06:57:02 | FromDiscord | <toma400> Create a hash where coordinates (tuple of ints) get assigned colour object, and are ordered in a way they are added in ^^ |
06:57:40 | PMunch | Yeah I can see what the code does, but what do you want to do with this table? |
06:57:51 | PMunch | Like what is the problem you're trying to solve by creating this matrix |
06:58:08 | PMunch | And why does the order matter? |
06:59:28 | FromDiscord | <toma400> It's for referencing and editing, all objects my library draws iterate over this matrix, you can also edit specific pixels by editing matrix.↵And order matters when converting matrix into PNG, since this allows me for easy iteration without trying to order them first. |
06:59:38 | FromDiscord | <toma400> (edit) "first." => "everytime." |
06:59:57 | FromDiscord | <ieltan> I've seen people do unspeakable things to use matrixes efficiently like arrays of array and concepts, depending on your use case you could optimize it crazily |
06:59:57 | FromDiscord | <toma400> (edit) "this" => "their" |
07:03:38 | PMunch | toma400, so if you're storing a full image, why aren't you just using `array[height, array[width, ColorRGBX]]`? |
07:04:07 | PMunch | Or `seq[seq[ColorRGBX]]` if you don't know the size during compilation. |
07:05:09 | PMunch | A table such as this works well if you only ever set one pixel here and there, ie. sparsely populated, but if you have all the pixels in an image it would be way faster to use arrays or seqs |
07:06:35 | FromDiscord | <ieltan> if you go for `seq` keep in mind you should preallocate the entire matrix by getting the image `height` and `width` and use `newSeqOfCap` |
07:07:25 | FromDiscord | <ieltan> So that you're not reallocating everytime you add a pixel |
07:07:39 | FromDiscord | <ieltan> (edit) "So that you're not reallocating everytime you add a pixel ... " added "after a certain threshold" |
07:09:52 | FromDiscord | <toma400> Interesting, so it looks like there is almost no difference in small matrixes, but `let` scales up quite strongly the bigger the surface 🤔 https://media.discordapp.net/attachments/371759389889003532/1149602484919218296/benchmark.png |
07:11:00 | FromDiscord | <odexine> Probably because of the move optimisation |
07:11:03 | FromDiscord | <toma400> In reply to @PMunch "<@656540400546480128>, so if you're": Hmm, I pick most of my structuring of data by simplicity to read, so that's may be one thing I need to rethink 😅 that's quite interesting way to put those, however wouldn't array make ColorRGBX immutable? |
07:11:06 | PMunch | toma400, note that if you are running them at the same time after one another in the procedure you might be running into cache prewarming |
07:11:15 | FromDiscord | <odexine> In reply to @toma400 "Hmm, I pick most": No it won’t |
07:11:23 | FromDiscord | <odexine> Immutability is a property of the variable and not the type |
07:11:33 | FromDiscord | <ieltan> In reply to @toma400 "Interesting, so it looks": Damn my guess was kinda right |
07:11:37 | PMunch | It would require a static size though |
07:17:49 | * | ntat joined #nim |
07:24:23 | FromDiscord | <toma400> In reply to @PMunch "<@656540400546480128>, note that if": Does that make benchmarking unreliable? Sorry for so many questions, but I'm still feeling like newbie 😅 |
07:24:49 | FromDiscord | <toma400> In reply to @odexine "Immutability is a property": Thanks for confirmation ❤️ |
07:24:57 | FromDiscord | <toma400> (edit) "confirmation" => "information" |
07:25:20 | FromDiscord | <odexine> In reply to @toma400 "Does that make benchmarking": It can, there are ways to make them more reliable |
07:25:35 | FromDiscord | <odexine> But you basically have to make two programs then run the test multiple times |
07:33:51 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Immutability is a property": Everything but consts can be mutable if you use pointers |
07:34:10 | FromDiscord | <toma400> sent a code paste, see https://play.nim-lang.org/#ix=4FH6 |
07:34:35 | * | alice quit (Server closed connection) |
07:35:06 | * | alice joined #nim |
07:35:17 | FromDiscord | <odexine> In reply to @sys64 "Everything but consts can": The value of the pointer (the address) is immutable |
07:35:28 | FromDiscord | <odexine> Indirection doesn’t currently |
07:35:33 | FromDiscord | <odexine> I sent that by mistake |
07:37:46 | PMunch | toma400, that's probably within margin of error |
07:38:10 | PMunch | Now try a seq[seq[]] or array |
07:54:50 | FromDiscord | <toma400> In reply to @PMunch "Now try a seq[seq[]]": Will do later in a week definitely, I just got into nerding mode right before my trip 😅 will give update for sure tho! |
08:22:33 | * | ntat quit (Quit: leaving) |
08:24:06 | PMunch | Hmm, is there any way I can throw a defect from C code? |
08:24:29 | PMunch | Basically I'm trying to figure out a more graceful way to perform an `exit` |
08:24:38 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "<@656540400546480128>, that's probably within": Isn't it better to flatten arrays/seqs? |
08:25:19 | PMunch | System64_~_Flandre_Scarlet, arrays would have absolutely no benefit, their nesting is purely syntactic. For sequences there might be some benefit |
08:28:07 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "System64_~_Flandre_Scarlet, arrays would have": Oh alright, so compilers flattens Arrays automatically? |
08:32:18 | FromDiscord | <odexine> arrays are flat in the first place |
08:32:50 | PMunch | Yeah, arrays are just syntax sugar, so nested arrays are exactly the same in memory as flat arrays |
08:33:39 | PMunch | The only benefit you could get from a flattened array would be if you could be clever about increasing your index in a hot loop |
08:35:35 | PMunch | However since array sizes are static the C compiler will likely speed up some of your math in those cases anyways |
08:44:14 | PMunch | Hmm, `OutOfMemoryDefect` is mentioned in the Exception hierarchy, but doesn't seem to actually be defined anywhere, or used anywhere |
08:47:08 | FromDiscord | <nnsee> In reply to @PMunch "Hmm, is there any": set up a SIGSEGV handler and deliberately make it access a null pointer |
08:47:20 | FromDiscord | <nnsee> 😇 |
08:47:31 | PMunch | At that point I could just as well call exit.. |
08:47:40 | FromDiscord | <nnsee> where's the fun in that? |
08:48:28 | FromDiscord | <Elegantbeef> I think you can make a proc that throws a defect, but you will need to annotate it `raise: [YourDefect]` |
08:48:46 | FromDiscord | <nnsee> this is usually (a part of) how i do control flow obfuscation in my "evil" implants |
08:48:51 | PMunch | I tried that, but couldn't get it to work |
08:48:53 | FromDiscord | <nnsee> always fun seeing blue teams try to reverse engineer it |
08:49:09 | PMunch | The thing is called from C code completely oblivious to the fact that this is Nim |
08:49:21 | PMunch | So I'm afraid that the Nim error check thing doesn't happen |
08:49:31 | FromDiscord | <Elegantbeef> Right if the exception handler isnt being used it will not be caught |
08:50:00 | PMunch | So I'm wondering if I can trigger the Nim exception handling before I get back to Nim code |
08:50:16 | PMunch | Like can I run `nimErrCheck` or whatever it is called in C code manually? |
08:50:33 | FromDiscord | <Elegantbeef> Probably |
08:50:39 | FromDiscord | <jviega> If you use the setjmp() exception handling, get access to the jmp_buf? |
09:03:17 | PMunch | Nice, I managed to get it working with `defer: {.emit: "nimTestErrorFlag()".}` before throwing my exception |
09:06:25 | PMunch | Now of course there is the issue that these errors are really only thrown when `malloc` returns nil, so I'm not sure how much of this error handler would actually be able to run.. |
09:06:32 | PMunch | It might immediately crash out anyways |
09:06:59 | FromDiscord | <Elegantbeef> Raise a preallocated exception |
09:07:06 | FromDiscord | <Elegantbeef> Nim atleast has a out of memory hook |
09:07:10 | FromDiscord | <Elegantbeef> Not that it's sensible to use |
09:08:13 | PMunch | Well the thing is that I'm trying to replace a C function which looks like this: http://ix.io/4FHj |
09:08:42 | PMunch | The C function takes in a cstring and displays it using fprintf before running exit |
09:08:55 | FromDiscord | <taperfade> guyserm |
09:09:11 | FromDiscord | <odexine> ? |
09:09:20 | FromDiscord | <Elegantbeef> Instead of exit you want to properly raise an exception to end the program that way |
09:09:31 | FromDiscord | <Elegantbeef> So you have to preallocate that exception then raise it |
09:09:40 | FromDiscord | <taperfade> are yall like |
09:09:56 | FromDiscord | <taperfade> against making malware with nim ? |
09:10:04 | PMunch | Elegantbeef, but I can't pre-allocate something with a string that I receive at runtime.. |
09:10:11 | FromDiscord | <nnsee> Yes. |
09:10:29 | PMunch | I guess I could create the exception with a `newString(<some buffer size>)` message |
09:10:32 | FromDiscord | <Elegantbeef> You can preallocate the exception that has a cstring as a msg |
09:10:32 | FromDiscord | <Elegantbeef> well a `cstringMsg` field |
09:10:38 | FromDiscord | <nnsee> note that I make "malware" in Nim, but that's literally my job, I work in a security company |
09:10:39 | FromDiscord | <odexine> In reply to @taperfade "against making malware with": most people here would be |
09:10:50 | FromDiscord | <taperfade> In reply to @odexine "most people here would": whys that |
09:10:56 | FromDiscord | <Elegantbeef> If this fails due to OOM you cannot really copy to a native Nim string anyway |
09:11:00 | PMunch | Elegantbeef, oh a custom Defect for this |
09:11:22 | FromDiscord | <Elegantbeef> the message will not be presented if it's a defect |
09:11:27 | PMunch | If the string is allocated with `newString` couldn't I copyMem the cstring into the string buffer manually? |
09:11:40 | FromDiscord | <Elegantbeef> Assuming it's the right size of course |
09:11:44 | FromDiscord | <nnsee> In reply to @taperfade "whys that": because it's↵1) illegal↵2) immoral↵3) causes grief for the Nim community as a whole - there was a period where any Nim binary was detected by certain AV products as "malware", even if it was entirely benign |
09:11:46 | PMunch | Of course |
09:12:07 | PMunch | nnsee, "a period", I believe we are still in this period.. |
09:12:09 | FromDiscord | <jviega> You could pre-alloc the string, and then slam the pointer into the string structure, no?? |
09:12:24 | FromDiscord | <taperfade> In reply to @nnsee "because it's 1) illegal": oh wow |
09:12:26 | FromDiscord | <taperfade> thats bad |
09:12:46 | FromDiscord | <frobnicate> I know this isn't a Nim question but I don't know other smart people: If I want to use a git repo as a template, I should fork it for each project? Or clone it, delete the git folder, new git project? Reason why I'm asking is because the succeeding project might also become a template so `base template -> project specific template -> project` |
09:13:06 | FromDiscord | <nnsee> In reply to @PMunch "<@961485620075720734>, "a period", I": from what I've seen, most AVs aren't as trigger happy for regular Nim binaries these days (and I've done pretty extensive testing, for pretty obvious reasons haha( |
09:13:09 | FromDiscord | <nnsee> (edit) "haha(" => "haha)" |
09:14:08 | FromDiscord | <_nenc> I think we all know malware developers are not good people! What will Guido say when he is asked about mal python |
09:15:15 | FromDiscord | <nnsee> something I just compiled and tested, for example: https://www.virustotal.com/gui/file/764045d6dfce5cb7ddd2805201d8f8a7a2d7ca43db0d93f6e2692ad319032a06 |
09:15:40 | FromDiscord | <jviega> I want to essentially memcpy a ref object; I assume that's what shallowCopy used to do, does anything replace that?? |
09:16:00 | FromDiscord | <Elegantbeef> @frobnicate\: github has templates atleast |
09:16:33 | FromDiscord | <frobnicate> wait what? |
09:16:36 | FromDiscord | <frobnicate> really? |
09:16:45 | FromDiscord | <Elegantbeef> https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-template-repository |
09:17:32 | FromDiscord | <Elegantbeef> It's practically just a git repo that collapses the git history and changes the origin |
09:17:44 | FromDiscord | <Elegantbeef> It's nothing really 'github' centric just they put a fancy interface on top |
09:17:54 | FromDiscord | <frobnicate> Handy |
09:18:16 | FromDiscord | <frobnicate> So if I wanted I could just make a script that does the same I suppose |
09:19:08 | FromDiscord | <taperfade> In reply to @_nenc "I think we all": what |
09:33:12 | FromDiscord | <nnsee> really? https://github.com/senzur/nim-discord-keylogger https://media.discordapp.net/attachments/371759389889003532/1149638557275791401/Screenshot_20230908-123215_Chrome.png |
09:33:25 | FromDiscord | <nnsee> > last commit 20 minutes ago |
09:34:55 | FromDiscord | <odexine> xd |
09:36:30 | FromDiscord | <odexine> i think this would be caught easily by antivirus anyway |
09:37:40 | FromDiscord | <odexine> that code for writing headers, kinda funny lmao |
09:37:48 | FromDiscord | <nnsee> i'm more upset about the fact that after offering my help, they still had the gall to bullshit me right to my face when asked a direct question |
09:38:04 | FromDiscord | <odexine> oh it uses puppy |
09:56:00 | PMunch | nnsee, oh that's great :) |
10:02:21 | PMunch | jviega, well if I put something which is not a Nim managed pointer into a Nim object it would probably trip up the garbage collector |
10:03:09 | FromDiscord | <jviega> Aren't you dying there?? |
10:03:31 | FromDiscord | <jviega> Swap the pointer back when you're done 🙂 |
10:03:46 | FromDiscord | <taperfade> i like malware its rlly cool |
10:03:51 | FromDiscord | <taperfade> kind of my dream to make some |
10:04:00 | FromDiscord | <taperfade> doesnt justify my action tho |
10:04:01 | FromDiscord | <taperfade> sorry |
10:09:24 | PMunch | jviega, oh for sure, this is right before throwing a Defect which will very likely kill the program anyways |
10:13:01 | PMunch | Names over the IRC bridge is so confusing.. |
10:13:15 | FromDiscord | <jviega> How so? |
10:14:01 | PMunch | Like Rika on Discord is odexine on IRC, Ras on Discord is nnsee on IRC, sz in Discord is taperfade, and you jtv are jviega. |
10:14:12 | FromDiscord | <nnsee> oh, it uses usernames? |
10:14:17 | PMunch | Apparently |
10:14:30 | * | cnx quit (Ping timeout: 255 seconds) |
10:14:32 | PMunch | So when you shared that screenshot I had no idea who either person there was :P |
10:14:46 | FromDiscord | <nnsee> ah, sorry :D |
10:14:51 | FromDiscord | <jviega> Ah, yeah, the recent discord switch |
10:14:55 | FromDiscord | <nnsee> or, well, not sure what for, but still |
10:15:09 | PMunch | No problem, not your fault the bot uses a different name for you :P |
10:15:35 | FromDiscord | <taperfade> In reply to @PMunch "Like Rika on Discord": this is me https://media.discordapp.net/attachments/371759389889003532/1149649223457984573/image.png |
10:17:02 | PMunch | Anyways, why do you dream of making malware? I get the allure of programming in an adversarial context, I sometimes design systems like that in my head, but what would the goal be of actually writing it? |
10:17:52 | * | cnx joined #nim |
10:18:22 | FromDiscord | <taperfade> idk i rlly like it |
10:18:38 | FromDiscord | <taperfade> as a kid i discovered virus showcase vids |
10:18:46 | FromDiscord | <taperfade> and i was fascinated by it kinda |
10:18:50 | FromDiscord | <taperfade> i loved watching them |
10:18:55 | FromDiscord | <taperfade> i wna make a virus |
10:19:05 | FromDiscord | <taperfade> not rlly focused on stealing data |
10:19:08 | FromDiscord | <taperfade> but more like |
10:19:18 | FromDiscord | <taperfade> jumpscaring u |
10:19:19 | FromDiscord | <nnsee> right, that's why you decided to make a _keylogger_ |
10:19:23 | FromDiscord | <taperfade> i think its pretty funny |
10:19:27 | FromDiscord | <nnsee> that exfils data over discord |
10:19:33 | FromDiscord | <taperfade> yep |
10:19:37 | FromDiscord | <nnsee> because you're not really focused on stealing data. |
10:19:39 | FromDiscord | <nnsee> right. |
10:19:40 | FromDiscord | <taperfade> i like that kind of stuff too |
10:19:59 | FromDiscord | <taperfade> ras maybe you shouldn literally interrupt me while im explaining something |
10:20:09 | FromDiscord | <taperfade> i wna be mean but i also dont wna get banned |
10:20:45 | FromDiscord | <taperfade> In reply to @taperfade "jumpscaring u": so yeah |
10:20:51 | FromDiscord | <taperfade> i wna make some dubious software |
10:20:53 | FromDiscord | <nnsee> how is sending a message in any way "interrupting you"? |
10:21:00 | FromDiscord | <taperfade> jumpscarey or data stealing stuff |
10:21:02 | FromDiscord | <nnsee> it's not like you have to stop writing when you see that i've sent a message |
10:21:03 | FromDiscord | <taperfade> its silly i like it |
10:21:24 | FromDiscord | <taperfade> In reply to @nnsee "it's not like you": ok |
10:21:26 | FromDiscord | <taperfade> anyway |
10:21:31 | FromDiscord | <Chronos [She/Her]> In reply to @taperfade "jumpscarey or data stealing": That's against ToS to talk about I'm p sure |
10:21:42 | FromDiscord | <taperfade> yup |
10:22:03 | FromDiscord | <finnt730> ah, mass removing your own messages |
10:22:10 | FromDiscord | <taperfade> i dont wna get banned silly |
10:22:23 | FromDiscord | <finnt730> I think this server has a logger bot.... |
10:22:33 | FromDiscord | <taperfade> In reply to @finnt730 "I think this server": yeah well |
10:22:34 | FromDiscord | <Chronos [She/Her]> Messages posted to IRC can't be deleted |
10:22:35 | FromDiscord | <odexine> it kinda technically does |
10:22:39 | FromDiscord | <Chronos [She/Her]> And since the channel is bridged |
10:22:45 | FromDiscord | <odexine> its at least not on discord though |
10:22:46 | FromDiscord | <taperfade> oh god |
10:22:58 | FromDiscord | <finnt730> most big server have a logging system in place |
10:22:58 | FromDiscord | <Chronos [She/Her]> Yeah you're fucked™️ |
10:23:01 | PMunch | IRC sees everything: https://irclogs.nim-lang.org/08-09-2023.html#10:18:22 |
10:23:09 | FromDiscord | <taperfade> oki |
10:23:15 | FromDiscord | <taperfade> its not against the rules of the server |
10:23:41 | FromDiscord | <odexine> to what |
10:23:41 | FromDiscord | <Chronos [She/Her]> Discord's ToS is more important there |
10:23:53 | FromDiscord | <Chronos [She/Her]> Discuss the creation of malware and key loggers |
10:24:14 | FromDiscord | <odexine> not who i was asking |
10:24:18 | FromDiscord | <taperfade> i tried avoidin it |
10:24:28 | FromDiscord | <taperfade> also i just read tos its not against it |
10:24:29 | FromDiscord | <Chronos [She/Her]> Ah |
10:24:38 | FromDiscord | <taperfade> oh wait i read guidelines |
10:26:06 | FromDiscord | <taperfade> so in the "deine inhalte" section |
10:26:21 | FromDiscord | <taperfade> it doesnt say anything against discussing the creation of malware |
10:26:48 | FromDiscord | <taperfade> i hate this |
10:27:02 | FromDiscord | <taperfade> im gonna leave soon |
10:27:06 | FromDiscord | <odexine> what |
10:27:07 | FromDiscord | <odexine> why |
10:27:15 | FromDiscord | <System64 ~ Flandre Scarlet> Hi, do you know how I can deploy a program to a distant Linux machine please? |
10:27:27 | FromDiscord | <Chronos [She/Her]> Via ssh? |
10:27:29 | FromDiscord | <odexine> In reply to @sys64 "Hi, do you know": depends on what you can do with that machine |
10:27:30 | FromDiscord | <taperfade> In reply to @odexine "why": bcs im overwhelmed |
10:27:32 | FromDiscord | <Chronos [She/Her]> Ssh + Sftp are pretty common |
10:27:38 | FromDiscord | <odexine> In reply to @taperfade "bcs im overwhelmed": take a breather then |
10:27:46 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "depends on what you": Game server |
10:27:51 | FromDiscord | <System64 ~ Flandre Scarlet> My game |
10:27:54 | FromDiscord | <taperfade> In reply to @odexine "take a breather then": nope |
10:28:02 | FromDiscord | <nnsee> In reply to @sys64 "Hi, do you know": describe your architecture |
10:28:04 | FromDiscord | <taperfade> wasting my time on discord is my no.1 hobby |
10:28:07 | FromDiscord | <odexine> In reply to @sys64 "Game server": ssh or sftp not good enouhgh? |
10:28:51 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "ssh or sftp not": Is it possible to automate via a powershell script ? |
10:28:53 | FromDiscord | <taperfade> what does kanon mean |
10:29:03 | FromDiscord | <odexine> anime girl name |
10:29:14 | FromDiscord | <nnsee> In reply to @sys64 "Is it possible to": yes? windows has openssh built in |
10:29:17 | FromDiscord | <taperfade> im guessing the one in ur pfp right |
10:29:17 | FromDiscord | <odexine> In reply to @sys64 "Is it possible to": sure, i dont have experience though |
10:29:21 | FromDiscord | <odexine> yes |
10:29:29 | FromDiscord | <nnsee> or like |
10:29:29 | FromDiscord | <taperfade> woah buddy |
10:29:31 | FromDiscord | <taperfade> ur weird |
10:29:35 | FromDiscord | <nnsee> what exactly are you trying to achieve |
10:29:39 | FromDiscord | <odexine> who isnt weird |
10:30:28 | FromDiscord | <Chronos [She/Her]> In reply to @sys64 "Is it possible to": Yeah but I wouldn't know how, online probably has some tutorials for writing a script like that |
10:30:35 | FromDiscord | <taperfade> In reply to @odexine "who isnt weird": me |
10:30:37 | FromDiscord | <taperfade> im sane and normal |
10:30:49 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "describe your architecture": Both communicates with Netty↵The server listens on port 51730 and 51731 to 51731 + 256 |
10:30:59 | FromDiscord | <nnsee> i meant more like |
10:31:35 | FromDiscord | <taperfade> i feel like rassie boo will no longer help me do anything with nim |
10:31:37 | FromDiscord | <taperfade> aka ras |
10:31:52 | FromDiscord | <odexine> In reply to @taperfade "i feel like rassie": whos to blame for that |
10:31:55 | FromDiscord | <nnsee> where is this "distant" machine and how you're building the game server (is it a compiled binary? is it your own or is someone else distributing it? etc) |
10:33:39 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "where is this "distant"": I think the distant server will be at home, unless you know a free service for hosting my server?↵↵I'm building the server on Windows, for Windows↵It's my own |
10:34:28 | FromDiscord | <Chronos [She/Her]> I mean, Oracle has a free VM but you need to use a credit card for the initial sign-up |
10:34:29 | FromDiscord | <nnsee> if it has to be windows, then i don't know of a free service, but if it's linux, then oracle's ARM _free tier_ offerings are really good |
10:34:35 | FromDiscord | <nnsee> ninja'd |
10:34:41 | FromDiscord | <Chronos [She/Her]> Lol |
10:34:56 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "if it has to": Woops, ARM? |
10:35:00 | FromDiscord | <nnsee> yes. |
10:35:05 | FromDiscord | <nnsee> but it's... crazy powerful |
10:35:08 | FromDiscord | <Chronos [She/Her]> ARM CPUs yeah, but crosscompiling exists sooo |
10:35:21 | FromDiscord | <System64 ~ Flandre Scarlet> And should I do a docker image ? |
10:35:39 | FromDiscord | <nnsee> you get 24G of ram and 4 cores |
10:35:46 | FromDiscord | <System64 ~ Flandre Scarlet> Pretty good |
10:36:04 | FromDiscord | <Chronos [She/Her]> I need to get my credit card sorted out to get one tbh |
10:36:08 | FromDiscord | <Chronos [She/Her]> Rn it's all a bit fucked |
10:36:12 | FromDiscord | <nnsee> and, if 7z's benchmarks are to be believed, it's overall more powerful than my laptop, and I don't exactly have a cheap one |
10:36:18 | FromDiscord | <System64 ~ Flandre Scarlet> I also use LibSodium and Tilengine as C libraries |
10:36:54 | FromDiscord | <nnsee> i run my blog https://nns.ee and my gitea instance https://git.dog on it and have for a few years now, no issues |
10:38:41 | FromDiscord | <nnsee> In reply to @sys64 "And should I do": probably, yeah, if for nothing else, it makes it easy to deploy |
10:38:55 | FromDiscord | <nnsee> but it's not exactly required |
10:39:11 | FromDiscord | <nnsee> you can also go the old fashioned way and set it up on the host directly, manage it with systemd unit files, etc |
10:39:36 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "probably, yeah, if for": Oh god↵ARM docker image↵I can feel the pain |
10:40:09 | FromDiscord | <frobnicate> 💪 |
10:40:12 | FromDiscord | <nnsee> actually buildx is really nice and makes cross "compilation" pretty easy |
10:40:13 | FromDiscord | <frobnicate> Geddit |
10:40:14 | FromDiscord | <kingterrytheterrible12> @Chronos [She/Her] hows debian |
10:40:15 | FromDiscord | <frobnicate> Arm |
10:40:41 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "<@524288464422830095> hows debian": It literally killed itself lmao, I'm just using Arco again (an Arch distro) |
10:41:06 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "It literally killed itself": How do distros kill themselves for you |
10:41:10 | FromDiscord | <kingterrytheterrible12> It never happened to me |
10:41:11 | FromDiscord | <Chronos [She/Her]> The install was just overall fucked |
10:41:19 | FromDiscord | <nnsee> In reply to @sys64 "Oh god ARM docker": it's literally just `docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7` to build multi-images |
10:41:20 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "The install was just": Probably usb is borked |
10:41:21 | FromDiscord | <nnsee> however |
10:41:25 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "actually buildx is really": What is that? |
10:41:34 | FromDiscord | <nnsee> a docker component |
10:41:35 | FromDiscord | <Chronos [She/Her]> Usermod didn't exist, adding myself to the sudo group didn't work, the wheel group didn't exist, visudo didn't exist |
10:41:43 | FromDiscord | <kingterrytheterrible12> xd |
10:42:02 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "a docker component": Ah alright so I need to build inside the docker? |
10:42:22 | FromDiscord | <nnsee> not sure what you mean |
10:42:38 | FromDiscord | <nnsee> or, just so i have context, have you used docker before? |
10:42:45 | FromDiscord | <nnsee> to build stuff, not just to run images |
10:43:18 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "to build stuff, not": Never really understood how it works |
10:43:41 | FromDiscord | <System64 ~ Flandre Scarlet> I once used it for building C# server |
10:43:55 | FromDiscord | <System64 ~ Flandre Scarlet> Wait no↵To deploy |
10:49:18 | FromDiscord | <nnsee> sent a long message, see http://ix.io/4FHE |
10:49:28 | FromDiscord | <nnsee> https://git.dog/xx/notifier/src/branch/master/Dockerfile - here's an example where I "build" a Python project |
10:50:28 | FromDiscord | <nnsee> once you have this Dockerfile, you tell docker you want to build an image according to the Dockerfile |
10:50:42 | FromDiscord | <nnsee> once this image is built, you can simply `docker run` it anywhere |
10:50:50 | FromDiscord | <kingterrytheterrible12> Also docker is very fucking good for development |
10:51:07 | FromDiscord | <kingterrytheterrible12> To prevent "it works on my machine but not on my freinds machine" |
10:51:24 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "once this image is": So on my distant server with ssh I just do docker-run? |
10:51:41 | FromDiscord | <nnsee> welllll |
10:51:52 | FromDiscord | <nnsee> if you upload your image to a registry, yes |
10:51:54 | FromDiscord | <raynei486> In reply to @kingterrytheterrible12 "To prevent "it works": I heard that docker is just "It works on my machine, so I'll send you my machine" |
10:52:04 | FromDiscord | <kingterrytheterrible12> In reply to @raynei486 "I heard that docker": Pretty much |
10:52:24 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "if you upload your": À registry?↵And what about this Oracle server ? |
10:52:25 | FromDiscord | <nnsee> if you don't, then you have to `docker build` on that machine so the image exists locally, but generally that's not an issue |
10:53:01 | FromDiscord | <System64 ~ Flandre Scarlet> Oh god I'd have to build Tilengine for ARM too aaah! |
10:53:01 | FromDiscord | <nnsee> a registry is a place where you can upload docker images that have already been built (and download them for running) |
10:53:14 | FromDiscord | <nnsee> for example, dockerhub is a registry |
10:53:34 | FromDiscord | <nnsee> https://ghcr.io is github's registry |
10:53:45 | FromDiscord | <System64 ~ Flandre Scarlet> And is it free? |
10:54:01 | FromDiscord | <nnsee> github's is, but i don't really know the exact limits |
10:54:03 | FromDiscord | <nnsee> i host my own |
10:54:08 | FromDiscord | <nnsee> it's very easy to host your own |
10:54:18 | FromDiscord | <System64 ~ Flandre Scarlet> And I can run the server with that? |
10:54:37 | FromDiscord | <nnsee> the oracle server is your "base" machine that has docker installed. that's pretty much all you need to have on that machine if you plan on using docker for everything |
10:54:43 | FromDiscord | <nnsee> i don't see why not |
10:55:17 | FromDiscord | <System64 ~ Flandre Scarlet> So the oracle server downloads the image, right? |
10:55:25 | FromDiscord | <nnsee> yes |
10:55:30 | FromDiscord | <nnsee> (or builds it from source) |
10:55:44 | FromDiscord | <System64 ~ Flandre Scarlet> Better to build from source |
10:56:39 | FromDiscord | <System64 ~ Flandre Scarlet> And is the lag between the computer and the server big? |
10:56:54 | FromDiscord | <nnsee> you mean for actually playing the game? |
10:56:58 | FromDiscord | <System64 ~ Flandre Scarlet> Yeah |
10:57:17 | FromDiscord | <nnsee> depends entirely on the pc's home connection and where (geographically) the oracle server is deployed |
10:57:39 | FromDiscord | <nnsee> mine is in amsterdam for example, and in tallinn i get an average ping of around 30-40ms |
10:57:56 | FromDiscord | <System64 ~ Flandre Scarlet> Is there servers in Belgium? Or at least Europe?↵↵Oh, it's decent I think |
10:58:15 | FromDiscord | <System64 ~ Flandre Scarlet> The lag won't be that horrid, even without correction |
10:59:07 | FromDiscord | <kingterrytheterrible12> In reply to @sys64 "Is there servers in": Rent a server from hetzner |
10:59:09 | FromDiscord | <kingterrytheterrible12> Or netcup |
10:59:17 | FromDiscord | <System64 ~ Flandre Scarlet> Is it paid? |
10:59:23 | FromDiscord | <nnsee> In reply to @sys64 "Is there servers in": https://docs.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm pick your poison |
10:59:25 | FromDiscord | <nnsee> scroll down for the table |
10:59:43 | FromDiscord | <nnsee> some regions aren't available in the free tier but i'm not 100% sure which ones |
11:00:22 | * | lumo_e joined #nim |
11:01:15 | FromDiscord | <System64 ~ Flandre Scarlet> Will try to register |
11:03:05 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "https://docs.oracle.com/en-us/iaas/Content/General/": What I'm looking for is Oracle Cloud, right? |
11:03:11 | FromDiscord | <nnsee> right |
11:03:54 | FromDiscord | <nnsee> and make sure you select the ARM/Ampere machine (with four vCPUs) |
11:04:08 | FromDiscord | <nnsee> they also offer a x86 free tier, but it's extremely weak sauce compared to the ARM offering |
11:07:05 | FromDiscord | <kingterrytheterrible12> In reply to @sys64 "Is it paid?": Off |
11:07:09 | FromDiscord | <kingterrytheterrible12> (edit) "Off" => "Ofc" |
11:09:26 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "and make sure you": Where can I choose that?↵I selected Amsterdam |
11:09:47 | FromDiscord | <nnsee> i can't exactly remember if it was during registration or after that |
11:10:08 | FromDiscord | <nnsee> but basically you search for "compute" in the cloud web panel and set up a new compute instance with those parameters |
11:11:11 | FromDiscord | <System64 ~ Flandre Scarlet> Can débit cards work? |
11:11:30 | FromDiscord | <nnsee> maybe ¯\_(ツ)_/¯ |
11:11:38 | FromDiscord | <odexine> I’ll say unlikely |
11:11:46 | FromDiscord | <odexine> Free things usually don’t accept debit cards |
11:11:54 | FromDiscord | <odexine> In my experience |
11:12:03 | FromDiscord | <nnsee> i'm not sure if i even had a credit card back when i registered |
11:12:03 | FromDiscord | <kingterrytheterrible12> In reply to @odexine "Free things usually don’t": They have to |
11:12:14 | FromDiscord | <kingterrytheterrible12> So when you ddos they can arrest you |
11:12:37 | FromDiscord | <System64 ~ Flandre Scarlet> My card isn't even visa so I'm screwed! |
11:12:43 | FromDiscord | <nnsee> oof |
11:13:38 | FromDiscord | <System64 ~ Flandre Scarlet> Well I'll have to host at home then |
11:13:52 | FromDiscord | <odexine> In reply to @kingterrytheterrible12 "They have to": No they don’t, they could just limit it to credit cards no? |
11:13:53 | FromDiscord | <kingterrytheterrible12> Use a paid service |
11:14:01 | FromDiscord | <kingterrytheterrible12> Nothing is free in life |
11:14:41 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @kingterrytheterrible12 "Use a paid service": Problem is↵1 it's for school↵2 I'm under good administrator so it will be more complex |
11:14:53 | FromDiscord | <kingterrytheterrible12> In reply to @sys64 "Problem is 1 it's": So |
11:14:56 | FromDiscord | <kingterrytheterrible12> Pay for it |
11:15:06 | FromDiscord | <kingterrytheterrible12> Or buy a server for 1000 dollars |
11:15:22 | FromDiscord | <kingterrytheterrible12> Or if your load is not so high make a raspberry pi cluster |
11:15:26 | FromDiscord | <kingterrytheterrible12> Or orange pi cluster |
11:16:15 | FromDiscord | <Chronos [She/Her]> What's the difference with orange pis? Are they even any good compared to an RPI? |
11:16:15 | FromDiscord | <System64 ~ Flandre Scarlet> I have a raspberry at home, can work |
11:16:22 | FromDiscord | <odexine> I doubt load will be high enough to matter, self host is fine |
11:16:41 | FromDiscord | <System64 ~ Flandre Scarlet> It's just a school projet so yeah |
11:16:45 | FromDiscord | <Chronos [She/Her]> Also clusters only give benefits with applications that have multiprocessing |
11:16:50 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "What's the difference with": China raspberry pi basically |
11:17:22 | FromDiscord | <kingterrytheterrible12> And yes they are good |
11:17:43 | FromDiscord | <kingterrytheterrible12> Raspberry pi is open source so china made a clone of it |
11:18:16 | FromDiscord | <nnsee> i've found used PCs to be much better bang for buck for server machines |
11:18:54 | FromDiscord | <kingterrytheterrible12> In reply to @nnsee "i've found used PCs": no |
11:19:02 | FromDiscord | <kingterrytheterrible12> Unless you have like 3 concurrent users |
11:19:05 | FromDiscord | <kingterrytheterrible12> It aint gonna work |
11:19:29 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "i've found used PCs": Not great for the electricity bill tho lol |
11:19:45 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Not great for the": Bro pcs dont use much electricity |
11:19:57 | FromDiscord | <kingterrytheterrible12> Compared to your air conditioner it uses nothing |
11:20:18 | FromDiscord | <nnsee> In reply to @chronos.vitaqua "Not great for the": it's pretty negligible |
11:20:20 | FromDiscord | <System64 ~ Flandre Scarlet> Any Linux OS for servering? |
11:20:26 | FromDiscord | <kingterrytheterrible12> In reply to @sys64 "Any Linux OS for": Debian |
11:20:28 | FromDiscord | <nnsee> debian is fine |
11:20:38 | FromDiscord | <kingterrytheterrible12> As long as it isnt ubuntu |
11:21:18 | FromDiscord | <kingterrytheterrible12> Even arch works too |
11:21:21 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "it's pretty negligible": Hm |
11:21:36 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @kingterrytheterrible12 "As long as it": Ubuntu bad ? |
11:21:43 | FromDiscord | <nnsee> ubuntu is also _fine_, I've just found that the company behind it generally doesn't make the best decisions |
11:21:43 | FromDiscord | <kingterrytheterrible12> In reply to @sys64 "Ubuntu bad ?": Ye for servers |
11:21:59 | FromDiscord | <nnsee> i used ubuntu for my servers for years and it worked absolutely fine |
11:22:06 | FromDiscord | <kingterrytheterrible12> Until it doesnt |
11:22:12 | FromDiscord | <kingterrytheterrible12> And suddenly you have downtime |
11:22:24 | FromDiscord | <nnsee> had 0 downtime related to me running ubuntu |
11:22:36 | FromDiscord | <kingterrytheterrible12> For how many years |
11:22:57 | FromDiscord | <nnsee> server was up for 4 consecutive years |
11:23:02 | FromDiscord | <nnsee> have the uptime screenshot somewhere |
11:23:14 | FromDiscord | <kingterrytheterrible12> Fair enough |
11:23:26 | FromDiscord | <nnsee> in fact I'd say I had less downtime with Ubuntu than with Debian because ubuntu had livepatch |
11:23:39 | FromDiscord | <System64 ~ Flandre Scarlet> I can use noIp.com as dynDNS |
11:23:48 | FromDiscord | <kingterrytheterrible12> Just use cloudflare |
11:23:57 | FromDiscord | <System64 ~ Flandre Scarlet> It's paid too I think |
11:24:04 | FromDiscord | <kingterrytheterrible12> is it? |
11:24:53 | FromDiscord | <System64 ~ Flandre Scarlet> No idea |
11:28:55 | FromDiscord | <nnsee> In reply to @sys64 "I can use noIp.com": maybe have a look at https://www.duckdns.org/ |
11:30:07 | FromDiscord | <System64 ~ Flandre Scarlet> Oh it's dyndns, I'll have a look! |
11:30:19 | FromDiscord | <System64 ~ Flandre Scarlet> Oof↵50ms is like 20fps |
11:34:10 | FromDiscord | <odexine> In reply to @sys64 "Oof 50ms is like": You are not getting any better than that latency |
11:35:12 | * | azimut quit (Ping timeout: 246 seconds) |
12:06:02 | FromDiscord | <taperfade> i want to ask something but im kinda like |
12:06:03 | FromDiscord | <taperfade> bad |
12:06:09 | FromDiscord | <taperfade> so i will make something |
12:10:42 | FromDiscord | <taperfade> is this possible https://media.discordapp.net/attachments/371759389889003532/1149678195990335579/image.png |
12:10:52 | FromDiscord | <taperfade> jumping to random lines in code |
12:10:53 | FromDiscord | <taperfade> or |
12:10:54 | FromDiscord | <odexine> what in the hell |
12:10:57 | FromDiscord | <odexine> no |
12:11:01 | FromDiscord | <odexine> you cant goto in nim |
12:11:18 | FromDiscord | <taperfade> damn |
12:11:25 | FromDiscord | <taperfade> my funny project wont work |
12:11:41 | FromDiscord | <taperfade> i want to do something like erm |
12:11:46 | FromDiscord | <taperfade> you enter a word |
12:11:59 | FromDiscord | <taperfade> it outputs a random int |
12:12:02 | FromDiscord | <odexine> you dont need to hide it if its still the keylogger |
12:12:11 | FromDiscord | <taperfade> then it waits for your input again |
12:12:23 | FromDiscord | <taperfade> In reply to @odexine "you dont need to": i swear it isnt one |
12:12:23 | FromDiscord | <odexine> that just sounds like a regulra loop |
12:12:44 | FromDiscord | <odexine> In reply to @taperfade "i swear it isnt": most people wouldnt trust you even if you said that |
12:12:48 | FromDiscord | <taperfade> damn |
12:12:51 | FromDiscord | <taperfade> will you ? |
12:12:55 | * | edr joined #nim |
12:13:03 | FromDiscord | <odexine> i personally dont mind |
12:15:41 | * | lumo_e quit (Ping timeout: 246 seconds) |
12:15:50 | * | lumo_e joined #nim |
12:15:58 | FromDiscord | <odexine> so about what you wanted to achieve |
12:16:13 | FromDiscord | <taperfade> does this work ? https://media.discordapp.net/attachments/371759389889003532/1149679582442684486/image.png |
12:16:29 | FromDiscord | <odexine> if its to the same line, that just sounds like a loop |
12:16:30 | FromDiscord | <taperfade> it would exit that loop if the input was smth like exit |
12:16:40 | FromDiscord | <taperfade> yay |
12:17:35 | * | jmdaemon quit (Ping timeout: 258 seconds) |
12:17:44 | FromDiscord | <odexine> sent a code paste, see https://play.nim-lang.org/#ix=4FIc |
12:17:58 | FromDiscord | <odexine> (edit) "https://play.nim-lang.org/#ix=4FIc" => "https://play.nim-lang.org/#ix=4FId" |
12:18:51 | FromDiscord | <taperfade> i made a funny little thing |
12:18:58 | FromDiscord | <taperfade> now i know arrays :3 |
12:19:06 | FromDiscord | <taperfade> bcs i was like |
12:19:16 | FromDiscord | <taperfade> i could spam if statements |
12:19:20 | FromDiscord | <taperfade> or i could be smart |
12:19:36 | FromDiscord | <taperfade> now i wna try to add output lines |
12:19:55 | FromDiscord | <taperfade> but it says the amount of stuff a array can hold is constant and cant be changed |
12:20:08 | FromDiscord | <taperfade> very sad |
12:21:02 | FromDiscord | <odexine> sequences |
12:21:14 | FromDiscord | <odexine> i need to go |
12:40:30 | * | lumo_e quit (Ping timeout: 255 seconds) |
12:44:38 | FromDiscord | <.maverk> hello people |
13:03:39 | FromDiscord | <kingterrytheterrible12> In reply to @odexine "you cant goto in": yes you fucking can |
13:03:50 | FromDiscord | <kingterrytheterrible12> there are macros that manipulate AST |
13:03:55 | FromDiscord | <kingterrytheterrible12> you can make your own goto |
13:04:04 | FromDiscord | <odexine> That is not exactly goto in the traditional sense |
13:04:25 | FromDiscord | <kingterrytheterrible12> how bout you goto some bitches |
13:04:32 | FromDiscord | <odexine> Lol |
13:04:44 | FromDiscord | <kingterrytheterrible12> but yeah i dont think there is anything preventing you from making goto in macros |
13:04:51 | FromDiscord | <kingterrytheterrible12> its gonna be a nightmare to debug LOL |
13:05:04 | FromDiscord | <odexine> Go to in the first place is a nightmare to debug |
13:05:15 | FromDiscord | <kingterrytheterrible12> In reply to @odexine "Go to in the": its used everywhere in linux kernel |
13:05:26 | FromDiscord | <odexine> In a controlled manner |
13:05:29 | FromDiscord | <kingterrytheterrible12> yesd |
13:05:30 | FromDiscord | <kingterrytheterrible12> (edit) "yesd" => "yes" |
13:05:31 | FromDiscord | <kingterrytheterrible12> so |
13:06:58 | FromDiscord | <ieltan> it's not goto in the traditional sense but you can use the `{.goto.}` if you need state machine like semantics |
13:07:30 | FromDiscord | <ieltan> and `{.computedGoto.}` if you're cooking something like an interpreter |
13:07:51 | FromDiscord | <ieltan> (or `cps` if you really want labeled gotos) |
13:08:00 | FromDiscord | <ieltan> but it's still not goto like in c though |
13:09:50 | FromDiscord | <ieltan> In reply to @kingterrytheterrible12 "its used everywhere in": it's used for cleaning up memory or error handling right ? |
13:10:05 | FromDiscord | <ieltan> just use what nim gives you instead, it's 10000x better |
13:12:45 | FromDiscord | <frobnicate> If I make a symbol in a try, I can't then clean it up in a finally? It needs to exist outside of the try-finally? |
13:14:25 | FromDiscord | <odexine> I think you can, I remember seeing discussion about being able to |
13:14:35 | FromDiscord | <odexine> But if you tried and you can’t then I guess you can’t |
13:16:09 | FromDiscord | <frobnicate> sent a code paste, see https://play.nim-lang.org/#ix=4FIv |
13:17:06 | FromDiscord | <frobnicate> It will say something like `Expression: destroy(window)↵ [1] window: proc (event`gensym207: Event): WindowEventPtr{.noSideEffect, gcsafe.}` |
13:17:34 | FromDiscord | <frobnicate> (edit) "It will say something like `Expression: destroy(window)↵ [1] window: proc (event`gensym207: Event): WindowEventPtr{.noSideEffect, gcsafe.}`" => "sent a code paste, see https://play.nim-lang.org/#ix=4FIw" |
13:19:50 | * | edr quit (Read error: Connection reset by peer) |
13:29:51 | * | azimut joined #nim |
13:36:32 | FromDiscord | <.maverk> does nim support annonymous functions ? |
13:37:19 | FromDiscord | <kingterrytheterrible12> In reply to @.maverk "does nim support annonymous": like lambdas? |
13:37:30 | FromDiscord | <.maverk> In reply to @kingterrytheterrible12 "like lambdas?": yes |
13:37:58 | FromDiscord | <kingterrytheterrible12> i think so yes |
13:38:27 | FromDiscord | <.maverk> with ``proc`` or there is a keyword for that ? |
13:41:56 | FromDiscord | <kingterrytheterrible12> In reply to @.maverk "yes": i cant find anything on it |
13:43:27 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4FIJ |
13:43:56 | FromDiscord | <taperfade> tomorrow i will make my first muahahaha-ware |
13:45:27 | ormiret | https://nim-lang.org/docs/sugar.html#%3D%3E.m%2Cuntyped%2Cuntyped |
13:45:50 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4FIL |
13:49:43 | FromDiscord | <taperfade> is there a way to add elements to a array |
13:50:35 | FromDiscord | <kingterrytheterrible12> .... |
13:50:36 | FromDiscord | <kingterrytheterrible12> ........ |
13:50:39 | FromDiscord | <kingterrytheterrible12> ........... |
13:50:43 | FromDiscord | <_nenc> use seq |
13:50:43 | FromDiscord | <_nenc> array have fixed length |
13:50:50 | FromDiscord | <kingterrytheterrible12> or add them by index |
13:51:14 | FromDiscord | <kingterrytheterrible12> ye bro you gotta start learning basic programming @taperfade |
13:53:28 | FromDiscord | <taperfade> In reply to @kingterrytheterrible12 "ye bro you gotta": nah |
13:53:37 | FromDiscord | <taperfade> i learn stuff by doing outrageous things |
13:54:04 | FromDiscord | <taperfade> and picking up stuff while trying to do i |
13:54:05 | FromDiscord | <taperfade> it |
13:54:13 | FromDiscord | <taperfade> :3 |
13:54:17 | PMunch | A small quite technical article to tide you over the weekend: https://peterme.net/teaching-old-c-code-new-tricks-with-nim.html |
13:54:44 | PMunch | .maverk, you can do it with `proc` or have a look at the `sugar` module (or did it get renamed to `future`) |
13:54:47 | FromDiscord | <taperfade> pmunch why don u use discord |
13:55:03 | FromDiscord | <pmunch> What do you mean? |
13:55:28 | FromDiscord | <_nenc> wow, you load discord so fast (just joke |
13:55:41 | FromDiscord | <taperfade> why do u use irc |
13:55:53 | FromDiscord | <pmunch> IRC? |
13:55:59 | FromDiscord | <kingterrytheterrible12> he is on everywhere |
13:56:03 | FromDiscord | <kingterrytheterrible12> irc matrix discord |
13:56:05 | FromDiscord | <taperfade> matrix too |
13:56:09 | FromDiscord | <kingterrytheterrible12> look @pmunch there is discord |
13:56:10 | FromDiscord | <kingterrytheterrible12> xd |
13:56:17 | FromDiscord | <taperfade> yeah but why are u on irc that often |
13:56:21 | FromDiscord | <taperfade> or like only |
13:56:23 | FromDiscord | <taperfade> on irc |
13:56:32 | FromDiscord | <kingterrytheterrible12> In reply to @taperfade "yeah but why are": bro you dont know pmunch |
13:56:36 | FromDiscord | <kingterrytheterrible12> this is THE pmunch |
13:56:40 | FromDiscord | <kingterrytheterrible12> he is the legend on nim |
13:56:42 | FromDiscord | <taperfade> who is pmunch |
13:56:55 | FromDiscord | <kingterrytheterrible12> https://github.com/PMunch |
13:57:03 | FromDiscord | <kingterrytheterrible12> his libs frequently saved my ass |
13:57:10 | FromDiscord | <taperfade> In reply to @kingterrytheterrible12 "ye bro you gotta": i made a keylogger and calculator in python and then started with nim |
13:57:23 | FromDiscord | <taperfade> sorry that i havent memorized every single thing |
13:57:28 | FromDiscord | <taperfade> like sequ |
13:57:30 | FromDiscord | <taperfade> stuff |
13:57:39 | FromDiscord | <taperfade> 🙄 |
13:57:40 | FromDiscord | <taperfade> nerd |
13:57:50 | FromDiscord | <taperfade> wow https://media.discordapp.net/attachments/371759389889003532/1149705152262049862/image.png |
13:57:56 | FromDiscord | <kingterrytheterrible12> also in your keylogger |
13:58:06 | FromDiscord | <taperfade> hm |
13:58:07 | FromDiscord | <kingterrytheterrible12> why dont you send ascii characters then decode there |
13:58:14 | FromDiscord | <_nenc> i don't mean to be offensive in any terms, but tbh, my programming knowledge is too poor to get involved in discusses like ORM or C interop, so only talking when @sz is online, because sz has not many experience with Nim, can make me happy🥲 |
13:58:25 | FromDiscord | <kingterrytheterrible12> damn |
13:58:30 | FromDiscord | <taperfade> ily nenc |
13:58:39 | FromDiscord | <taperfade> babypoo were in this together |
13:58:47 | FromDiscord | <taperfade> yeah also i never did anything with c |
13:58:59 | FromDiscord | <taperfade> but i made something rlly complex called meowsay |
13:59:14 | FromDiscord | <kingterrytheterrible12> meowsay |
13:59:58 | FromDiscord | <taperfade> https://github.com/senzur/meowsay |
14:00:11 | FromDiscord | <kingterrytheterrible12> bruh |
14:00:38 | FromDiscord | <kingterrytheterrible12> https://media.discordapp.net/attachments/371759389889003532/1149705860344463390/image.png |
14:01:08 | FromDiscord | <taperfade> wtf |
14:01:14 | FromDiscord | <taperfade> they stole my idea and made cowsay |
14:01:31 | FromDiscord | <taperfade> also pop os |
14:01:35 | FromDiscord | <kingterrytheterrible12> this was made probably before when you was born |
14:01:37 | FromDiscord | <taperfade> i use debian |
14:01:43 | FromDiscord | <kingterrytheterrible12> idgaf |
14:01:49 | FromDiscord | <taperfade> yea u should |
14:01:53 | FromDiscord | <taperfade> im better |
14:01:55 | FromDiscord | <taperfade> smarter |
14:01:56 | FromDiscord | <kingterrytheterrible12> ok |
14:01:58 | FromDiscord | <kingterrytheterrible12> comr |
14:02:03 | FromDiscord | <kingterrytheterrible12> (edit) "comr" => "cope" |
14:02:03 | FromDiscord | <taperfade> comr |
14:02:07 | FromDiscord | <taperfade> cope |
14:02:12 | FromDiscord | <kingterrytheterrible12> its hard to type with 1 hand |
14:02:18 | FromDiscord | <taperfade> weirdo |
14:02:21 | FromDiscord | <kingterrytheterrible12> bro |
14:02:28 | FromDiscord | <kingterrytheterrible12> i vaping with other hand |
14:02:38 | FromDiscord | <taperfade> cringe |
14:02:49 | FromDiscord | <taperfade> real ppl dont vape |
14:02:53 | FromDiscord | <kingterrytheterrible12> ok |
14:02:58 | FromDiscord | <taperfade> ur fake rn |
14:02:59 | FromDiscord | <kingterrytheterrible12> its better than smoking |
14:03:00 | FromDiscord | <taperfade> cringe |
14:03:06 | FromDiscord | <taperfade> try carts |
14:03:10 | FromDiscord | <taperfade> muahahahahaha |
14:04:42 | PMunch | Oh kingterrytheterrible12, you're gonna make me blush :P |
14:04:57 | PMunch | But to answer the question, I just prefer IRC |
14:05:10 | FromDiscord | <taperfade> i feel like ur a nerd |
14:05:21 | FromDiscord | <kingterrytheterrible12> he is married |
14:05:22 | * | ntat joined #nim |
14:05:25 | FromDiscord | <taperfade> no way |
14:05:31 | PMunch | The UI freedom is nice, and right now I'm able to see all the way back to when you asked who I am on a normal laptop screen without having to scroll up |
14:05:37 | PMunch | Wait, I am? |
14:05:44 | FromDiscord | <kingterrytheterrible12> now you are 😈 |
14:05:57 | PMunch | I think I have to go home and tell my girlfriend.. |
14:06:04 | FromDiscord | <taperfade> nerd married and dementia |
14:06:07 | FromDiscord | <kingterrytheterrible12> come on she doesnt have to know |
14:06:09 | FromDiscord | <taperfade> w combo |
14:06:12 | FromDiscord | <kingterrytheterrible12> what she doesnt know isnt here problem |
14:06:17 | FromDiscord | <kingterrytheterrible12> (edit) "here" => "her" |
14:06:27 | * | PMunch quit (Quit: Leaving) |
14:08:04 | FromDiscord | <kingterrytheterrible12> https://youtu.be/BsnCpESUEqM?t=221 |
14:08:15 | FromDiscord | <kingterrytheterrible12> does anyone know whats this plugin called? |
14:10:36 | FromDiscord | <taperfade> this server is so cool |
14:10:49 | FromDiscord | <taperfade> me someone that doesnt know what a sequ is |
14:11:03 | FromDiscord | <taperfade> talking to ppl that are so smart |
14:11:17 | FromDiscord | <kingterrytheterrible12> we all stupid here |
14:11:20 | FromDiscord | <kingterrytheterrible12> maybe araq isnt |
14:11:21 | FromDiscord | <taperfade> nooo |
14:11:27 | FromDiscord | <taperfade> u all r smart |
14:11:28 | FromDiscord | <taperfade> im dum |
14:11:30 | FromDiscord | <taperfade> tbh |
14:11:32 | FromDiscord | <taperfade> :( |
14:11:36 | FromDiscord | <kingterrytheterrible12> no you just need to learn |
14:11:45 | FromDiscord | <kingterrytheterrible12> bro i started like you at some point |
14:11:45 | FromDiscord | <taperfade> guh |
14:11:53 | FromDiscord | <kingterrytheterrible12> now i can say im alright at programming |
14:11:54 | FromDiscord | <taperfade> when did u start |
14:11:59 | FromDiscord | <kingterrytheterrible12> when i was 17 |
14:12:01 | FromDiscord | <kingterrytheterrible12> now im 20 |
14:12:05 | FromDiscord | <taperfade> wowzers |
14:13:57 | FromDiscord | <kingterrytheterrible12> i think im just gonna learn zig |
14:13:59 | FromDiscord | <kingterrytheterrible12> as a safer C |
14:14:14 | FromDiscord | <.maverk> zig is really hard |
14:14:26 | FromDiscord | <.maverk> you know what ``comptime`` is ? |
14:14:33 | FromDiscord | <kingterrytheterrible12> In reply to @.maverk "you know what ``comptime``": compile time yes |
14:14:39 | FromDiscord | <kingterrytheterrible12> like constexpr in C++ |
14:14:56 | FromDiscord | <.maverk> yeah |
14:15:35 | FromDiscord | <.maverk> is the spaceship necessary to use ? |
14:16:23 | FromDiscord | <kingterrytheterrible12> what |
14:16:40 | FromDiscord | <taperfade> live love nim |
14:16:57 | FromDiscord | <kingterrytheterrible12> yeah nim is good |
14:17:01 | FromDiscord | <kingterrytheterrible12> until you want no GC |
14:23:55 | FromDiscord | <m4ul3r> nim's none memory management has been good to me when i've needed to nuke gc on some embedded work |
14:39:11 | FromDiscord | <catnowblue> sent a code paste, see https://play.nim-lang.org/#ix=4FIW |
14:39:21 | FromDiscord | <Chronos [She/Her]> In reply to @m4ul3r "nim's none memory management": Oh? Is arc not suitable for embedded work? |
14:39:22 | FromDiscord | <catnowblue> (edit) "https://play.nim-lang.org/#ix=4FIW" => "https://play.nim-lang.org/#ix=4FIX" |
14:40:02 | FromDiscord | <m4ul3r> In reply to @chronos.vitaqua "Oh? Is arc not": arc is super suitable, just the need i was using it for, I had managed memory myself |
14:40:13 | FromDiscord | <Chronos [She/Her]> In reply to @catnowblue "I'll never understand how": Does it give any errors with this? And could you be using the wrong header? |
14:40:19 | FromDiscord | <Chronos [She/Her]> In reply to @m4ul3r "arc is super suitable,": Ah fair |
14:40:59 | FromDiscord | <odexine> In reply to @chronos.vitaqua "Does it give any": Token is probably a sequence |
14:41:11 | FromDiscord | <catnowblue> In reply to @chronos.vitaqua "Does it give any": I don't think there's wrong header, the API documentation told me to put x-session-token and the error is http code 401 unauthorized |
14:41:25 | FromDiscord | <.maverk> i want to tell ``assert`` to check variables at compile time how ? |
14:41:26 | FromDiscord | <catnowblue> could be the value being a sequence instead of string |
14:41:39 | FromDiscord | <.maverk> assert is checking at run-time only |
14:42:29 | FromDiscord | <odexine> In reply to @.maverk "i want to tell": Are the variables also compile time |
14:42:49 | FromDiscord | <.maverk> In reply to @odexine "Are the variables also": i am not sure |
14:42:54 | FromDiscord | <odexine> You can’t check variables that aren’t compile time on compile time because… they aren’t compile time, they don’t have values on compile time |
14:44:45 | FromDiscord | <.maverk> oky i could fix it |
14:44:58 | FromDiscord | <.maverk> i found a way how to do it |
14:45:23 | FromDiscord | <catnowblue> In reply to @catnowblue "could be the value": so is there any solutions? |
14:46:11 | FromDiscord | <Chronos [She/Her]> In reply to @catnowblue "so is there any": We'd need more code tbh |
14:46:15 | FromDiscord | <Chronos [She/Her]> Can't really see the issue |
14:46:23 | FromDiscord | <Chronos [She/Her]> Where is `token` defined |
14:46:37 | FromDiscord | <catnowblue> it's... stored in .env |
14:47:02 | FromDiscord | <catnowblue> https://media.discordapp.net/attachments/371759389889003532/1149717537341329428/image.png |
14:47:30 | FromDiscord | <catnowblue> and the token is string, not a sequence |
14:49:48 | FromDiscord | <catnowblue> I tried to force set key for x-session-token something like this `header.table["x-session-token"] = string`. It only accepts seq of string |
14:49:57 | FromDiscord | <Chronos [She/Her]> Hm |
14:49:59 | FromDiscord | <catnowblue> I don't know how http headers in http client works |
14:50:10 | FromDiscord | <Chronos [She/Her]> I'm not sure then, sorry |
14:50:55 | FromDiscord | <catnowblue> well ok, I'll figured out somewhere else, the API doc just request http header. How's not that possible in nim? |
15:02:13 | FromDiscord | <Chronos [She/Her]> Hm |
15:03:40 | FromDiscord | <Chronos [She/Her]> In reply to @catnowblue "I'll never understand how": I have a question: Why aren't you passing the http headers as a parameter? |
15:07:18 | FromDiscord | <odexine> In reply to @chronos.vitaqua "I have a question:": is there a problem with that |
15:08:14 | FromDiscord | <odexine> i think the problem is that your token is probably wrong |
15:10:56 | FromDiscord | <catnowblue> In reply to @odexine "i think the problem": my token is fine, I implemented websocket and it runs just fine |
15:12:53 | FromDiscord | <.maverk> why am i getting this result ? https://media.discordapp.net/attachments/371759389889003532/1149724042417406012/444.PNG |
15:13:23 | FromDiscord | <odexine> In reply to @.maverk "why am i getting": cast is bitwise reinterpret. use `float64(11)` |
15:13:58 | NimEventer | New thread by PMunch: Teaching old C code new tricks with Nim, see https://forum.nim-lang.org/t/10467 |
15:14:48 | FromDiscord | <.maverk> In reply to @odexine "cast is bitwise reinterpret.": what do you mean by ``bitwise reinterpret`` ? |
15:15:23 | FromDiscord | <odexine> it's not what you want |
15:16:05 | FromDiscord | <.maverk> In reply to @odexine "it's not what you": yes but i want to understand what ``bitwise reinterpret`` is |
15:16:50 | FromDiscord | <odexine> interpret the binary for `11` of type int as a float64 instead |
15:17:53 | FromDiscord | <odexine> 11 ---int to bin--> binary ---bin to float--> the result |
15:18:14 | FromDiscord | <.maverk> aaaah |
15:18:46 | FromDiscord | <.maverk> it casts any type to another type in binary ? |
15:19:17 | FromDiscord | <odexine> it reinterprets the bits of one type into another type |
15:22:32 | FromDiscord | <.maverk> i am confused |
15:22:38 | FromDiscord | <.maverk> i get different output |
15:25:45 | * | anddam joined #nim |
15:42:00 | FromDiscord | <m4ul3r> Floats have a different binary representation than ints |
15:42:25 | FromDiscord | <m4ul3r> here's an example https://media.discordapp.net/attachments/371759389889003532/1149731475256782970/image.png |
15:44:34 | FromDiscord | <.maverk> this is python |
15:44:47 | FromDiscord | <m4ul3r> yes, but the idea translates |
15:45:18 | FromDiscord | <.maverk> i understand that ``cast`` casts from one type to another |
15:45:37 | FromDiscord | <.maverk> but when i cast floats it becomes something weird |
15:45:42 | anddam | cast from python to nim |
15:46:07 | FromDiscord | <m4ul3r> because the binary representation of the float "11" is different than the binary representation of the int "11" |
15:46:39 | FromDiscord | <.maverk> why does it work with float64 ? |
15:46:51 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "is there a problem": No just wondering since it seems a bit odd |
15:51:25 | FromDiscord | <m4ul3r> In reply to @.maverk "why does it work": Because of how a float is represented in binary ↵like rika mentioned you need to do type conversion https://media.discordapp.net/attachments/371759389889003532/1149733739182698526/image.png |
15:52:15 | NimEventer | New thread by maverk: What are the equivalent libraries to these ?, see https://forum.nim-lang.org/t/10468 |
15:52:19 | FromDiscord | <m4ul3r> https://towardsdatascience.com/binary-representation-of-the-floating-point-numbers-77d7364723f1 |
15:54:17 | FromDiscord | <.maverk> so it works with all types except floats ? |
15:54:49 | FromDiscord | <m4ul3r> In reply to @NimEventer "New thread by maverk:": @.maverk is this you? ↵To answer this question if so, on the windows side. `winim` wraps the windows API and com - so most of the windows headers.↵for the others, they are part of the c stdlib - which nim has most of the functionality in nim's stdlib - else you can import from the header file with nim's FFI |
15:55:50 | FromDiscord | <.maverk> winim is equivalet to winim ? |
15:56:41 | FromDiscord | <m4ul3r> In reply to @.maverk "so it works with": You can cast "most types" to another type as it just uses the bit for bit representation↵https://nim-lang.org/docs/manual.html#statements-and-expressions-type-casts |
15:56:49 | FromDiscord | <m4ul3r> In reply to @.maverk "winim is equivalet to": https://github.com/khchen/winim |
16:00:01 | FromDiscord | <.maverk> thanks |
16:00:33 | anddam | do you know an example of a simple HTTP revproxy in nim? |
16:00:45 | anddam | akin to https://www.sipios.com/blog-tech/a-simple-reverse-proxy-in-python (speaking of python) but in nim |
16:01:11 | FromDiscord | <m4ul3r> In reply to @m4ul3r "here's an example": @.maverk here would be a nim example of this python code to help your understanding https://media.discordapp.net/attachments/371759389889003532/1149736199213301800/image.png |
16:10:36 | FromDiscord | <.maverk> In reply to @m4ul3r "<@1021771961040375900> here would be": may i know why you add ``&`` ? |
16:10:59 | FromDiscord | <.maverk> can you please paste the code you wrote here |
16:11:26 | FromDiscord | <m4ul3r> In reply to @.maverk "may i know why": I'm using strformat, which `&` is short for `fmt`. It allows me to use `{ <data> }` to throw it in the string |
16:11:52 | FromDiscord | <m4ul3r> it is the same as doing `echo "int binary: " & i.toBin(64)` |
16:12:07 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4FJp |
16:12:14 | FromDiscord | <.maverk> In reply to @m4ul3r "I'm using strformat, which": thank you so much man |
16:18:33 | FromDiscord | <demotomohiro> If you want to learn how bits in float works: https://en.m.wikipedia.org/wiki/IEEE_754 |
16:19:48 | FromDiscord | <0ffh> In reply to @m4ul3r "I'm using strformat, which": iirc there's a subtle difference between fmt" and &" - unfortunately I can't remember what it was 😂 |
16:20:42 | FromDiscord | <m4ul3r> In reply to @0ffh "iirc there's a subtle": https://nim-lang.org/docs/strformat.html you're right, https://nim-lang.org/docs/strformat.html.↵fmt is a raw string. |
16:21:00 | FromDiscord | <0ffh> In reply to @m4ul3r "https://nim-lang.org/docs/strformat.html you're rig": Ah, yes, that was it! |
16:22:01 | FromDiscord | <m4ul3r> I've just been in the habit of using & because it's easier on my eyes. just like↵`f"{val}"` in python vs `"{}".format(val)` |
16:22:51 | FromDiscord | <0ffh> In reply to @m4ul3r "I've just been in": Yeah, I also prefer the &, but mostly because I'm a lazy typer. 😅 |
16:23:28 | FromDiscord | <vindaar> In reply to @demotomohiro "If you want to": https://ciechanow.ski/exposing-floating-point/ <-- good article too |
16:25:43 | FromDiscord | <kingterrytheterrible12> In reply to @0ffh "Yeah, I also prefer": you can use `fmt` |
16:26:21 | FromDiscord | <kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4FJy |
16:38:01 | FromDiscord | <0ffh> In reply to @kingterrytheterrible12 "you can use `fmt`": Yeah, I know, thanks!↵We were just talking about the difference between fmt and &, and our respective reasons for preferring &. 😂 |
16:38:20 | FromDiscord | <kingterrytheterrible12> fmt makes more sense ngl |
16:38:25 | FromDiscord | <kingterrytheterrible12> its more redable |
16:39:19 | FromDiscord | <0ffh> In reply to @kingterrytheterrible12 "its more redable": Meh, I don't much like red anyways. 🤷♂️ |
16:42:31 | NimEventer | New thread by hevaf: How to properly set environment variables, see https://forum.nim-lang.org/t/10469 |
16:47:02 | FromDiscord | <m4ul3r> In reply to @kingterrytheterrible12 "fmt makes more sense": & is easier to use if you're formatting with escape sequences and is just as readable imo |
16:47:21 | FromDiscord | <kingterrytheterrible12> fmt means format |
16:47:24 | FromDiscord | <kingterrytheterrible12> & means and |
16:47:26 | FromDiscord | <kingterrytheterrible12> makes no sense |
16:47:38 | FromDiscord | <m4ul3r> but in context infront of a string it means format |
16:48:24 | FromDiscord | <odexine> In reply to @kingterrytheterrible12 "fmt makes more sense": yes with the caveat that your string is forced to be raw |
16:53:09 | FromDiscord | <kingterrytheterrible12> In reply to @odexine "yes with the caveat": you like it raw? |
16:57:36 | FromDiscord | <Phil> Hmmm I wonder if micros allows for easy checking if a node is a symnode of a typedef of an object variant |
17:00:17 | FromDiscord | <Chronos [She/Her]> What is even needed for a choosenim alternative hm |
17:04:05 | FromDiscord | <griffith1deadly> there may be a new binding coming out soon for https://github.com/webview/webview |
17:29:17 | FromDiscord | <Schelz> sent a code paste, see https://play.nim-lang.org/#ix=4FJO |
17:29:37 | FromDiscord | <Schelz> (edit) "https://play.nim-lang.org/#ix=4FJO" => "https://play.nim-lang.org/#ix=4FJP" |
17:31:46 | FromDiscord | <m4ul3r> In reply to @griffith1deadly "there may be a": looks like there's one from years ago: https://github.com/oskca/webview↵and a more recent one https://github.com/neroist/webview ↵↵from that github link |
17:34:01 | FromDiscord | <griffith1deadly> In reply to @m4ul3r "looks like there's one": oskca - very old binding, neroist - a very different approach than this library. |
17:34:12 | FromDiscord | <griffith1deadly> i was able to build a working bindings to Nim on the latest version of Webview2, and am testing for now. it's likely that I'll publish this as a library |
17:43:35 | * | Guest86 joined #nim |
17:45:37 | * | Guest86 quit (Client Quit) |
18:07:25 | FromDiscord | <Chronos [She/Her]> Idk what project to work on hm... |
18:07:36 | FromDiscord | <demotomohiro> In reply to @Schelz "I try do decipher": I think it is same to `cast[ptr ptr pointer](thisptr)[]`. |
18:09:29 | FromDiscord | <Chronos [She/Her]> What would y'all say is the best library to use for building a REST API specifically? No HTML or other content is being served |
18:11:48 | FromDiscord | <Chronos [She/Her]> There's multiple options of course but not really sure which one would be the best |
18:11:57 | FromDiscord | <Chronos [She/Her]> I'd prefer a library that's asynchronous too |
18:15:26 | * | rockcavera joined #nim |
18:37:00 | FromDiscord | <Phil> Honestly I'd say go mummy because I think it might handle threads better, that is based on no proof or hard data whatsoever |
18:37:15 | FromDiscord | <Phil> Other than that my personal choice would be prologue because I don't like jesters macro magic |
18:37:39 | FromDiscord | <Phil> No clue on how well happyX would handle being a REST API, though the docs state it would handle that perfectly fine |
18:37:59 | FromDiscord | <Phil> Oh, also prologue has better docs than jester |
18:38:04 | FromDiscord | <Chronos [She/Her]> Fair, will look at happyX maybe |
18:38:19 | FromDiscord | <Chronos [She/Her]> Issue with Mummy is that I'm planning on using async libraries so |
18:45:04 | * | lucerne joined #nim |
18:48:42 | * | lucerne quit (Client Quit) |
18:49:51 | * | lucerne joined #nim |
18:54:28 | NimEventer | New thread by maverk: Why float casting is not working ?, see https://forum.nim-lang.org/t/10470 |
19:05:58 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "What would y'all say": mummy |
19:06:10 | FromDiscord | <Phil> In reply to @chronos.vitaqua "Issue with Mummy is": Sidenote, the Xth repetition of my webdev thoughts is also readable in webdev 😛 |
19:06:13 | FromDiscord | <Phil> (edit) "webdev" => "#webdev" |
19:07:04 | FromDiscord | <kingterrytheterrible12> is it just me or is C++ much easier than C |
19:07:19 | FromDiscord | <kingterrytheterrible12> the oop'ness of C++ makes development so much easier |
19:09:19 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "mummy": Async programming |
19:09:30 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Async programming": sex |
19:09:32 | FromDiscord | <kingterrytheterrible12> (edit) "sex" => "idk" |
19:09:41 | FromDiscord | <kingterrytheterrible12> async sucks |
19:09:47 | FromDiscord | <kingterrytheterrible12> mulithreading is the wya |
19:09:50 | FromDiscord | <kingterrytheterrible12> (edit) "wya" => "way" |
19:10:47 | FromDiscord | <Chronos [She/Her]> Why does it suck? |
19:11:34 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "Why does it suck?": because i like to use all my server's cores |
19:11:46 | FromDiscord | <kingterrytheterrible12> or what good are they |
19:20:00 | FromDiscord | <Phil> That reasoning is a tad flawed.↵You can do that just as well if not better with async.↵The problem is more that async starts to become really damn complicated to do right if you have as much low level access as nim has. |
19:20:18 | FromDiscord | <leorize> you just have to use cps \:p |
19:20:35 | FromDiscord | <Phil> Sure because learning continuation passing style is such a trivial matter 😛 |
19:21:03 | FromDiscord | <leorize> you can try using nim-sys \:P |
19:21:04 | FromDiscord | <Phil> I'm happy I just barely understood disrupteks description (I think it was disrupteks lib at least? I forgot) |
19:21:19 | FromDiscord | <Phil> That actually doesn't tell me anything |
19:21:35 | FromDiscord | <leorize> https://git.termer.net/termer/nim-sys-fun/src/branch/master/src/nim_sys_fun.nim \<- here's someone writing a basic webserver |
19:22:26 | FromDiscord | <Phil> Oh lord that'd mean I'd need to know what I'm doing in regards to a webserver |
19:22:39 | FromDiscord | <leorize> yea we definitely flunked the doc for cps itself |
19:22:41 | FromDiscord | <Phil> Just put something in front of me that is fast and routes well |
19:23:03 | FromDiscord | <Phil> In reply to @leorize "yea we definitely flunked": I wouldn't say that actually. I just find CPS in general is hard to understand, at least that's the impression I got from it |
19:23:14 | FromDiscord | <Phil> The images helped a fuckton |
19:23:30 | FromDiscord | <jmgomez> > The cpp backend often doesn't work, particularly due to faulty codegen but also, perhaps, due to exceptions:goto assumptions that we rely upon.↵Do they still use `goto` exceptions? I wanted to give them a shot but not cpp support turned me off |
19:24:43 | FromDiscord | <leorize> I think internal details of how cps worked is nice but we really haven't put out some practical demos↵(@Phil) |
19:25:27 | FromDiscord | <leorize> I mean, we have a bunch of libraries that let you move computations across threads, but nothing that adds I/O into the mix yet |
19:26:02 | FromDiscord | <Phil> In reply to @leorize "I think internal details": That actually is fair. I have like a theoretical concept on how I'd assume CPS would be used but nothing that'd make me think "Oh, this is easy to use in general and not just for edgecases because its complicated to maintain" |
19:26:25 | FromDiscord | <Phil> (edit) "In reply to @leorize "I think internal details": That actually is fair. I have like a theoretical concept on how I'd assume CPS would be used but nothing that'd make me think "Oh, this is easy to use in general and not just for edgecases ... because" added "where it brings tremendous benefits" |
19:26:37 | FromDiscord | <Phil> (edit) "because its" => "that offset it looking" |
19:26:40 | FromDiscord | <leorize> https://github.com/disruptek/background \<- this is an application of cps that's easy to understand |
19:26:52 | FromDiscord | <.maverk> is there a difference between ``type()`` and ``typeof()`` ? |
19:27:03 | termer | leorize "yea we definitely flunked the doc for cps itself" The docs for cps are awesome |
19:27:11 | FromDiscord | <.maverk> they both produce the type of an object |
19:27:12 | termer | maybe not as formal as they should be, but the tutorials are excellent |
19:27:41 | FromDiscord | <.maverk> are you replying me ? |
19:27:43 | * | ntat quit (Quit: leaving) |
19:27:49 | FromDiscord | <leorize> they're the same↵(@.maverk) |
19:27:56 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "That reasoning is a": If only async + threading could be done together somehow to get the best of both worlds |
19:27:57 | FromDiscord | <leorize> please use `typeof`, though |
19:27:59 | FromDiscord | <Chronos [She/Her]> Oh well |
19:28:00 | termer | I'm replying to an earlier comment by leorize, .maverk |
19:28:15 | FromDiscord | <.maverk> ok |
19:28:23 | FromDiscord | <.maverk> In reply to @leorize "please use `typeof`, though": ok bro thanks |
19:28:23 | FromDiscord | <leorize> that's like, the whole premise around cps \:)↵(@Chronos [She/Her]) |
19:29:01 | FromDiscord | <Chronos [She/Her]> I do not understand the lower level stuff and do not have the energy for it xD |
19:29:13 | termer | CPS makes async Nim feel like Go |
19:29:32 | termer | I don't know if you've ever used Go, but that's the easiest I can describe it |
19:29:44 | termer | unless you've used Kotlin, whose coroutines are also very similar |
19:29:52 | FromDiscord | <Chronos [She/Her]> I only very briefly used Go, is that a good thing or bad thing |
19:29:57 | termer | Good thing |
19:30:04 | FromDiscord | <Chronos [She/Her]> Hm |
19:30:21 | FromDiscord | <Phil> CPS is kind of like hacking your proc into its individual control-flow blocks, turning those into individual procs that link to each other in their order and return the next proc to execute and an object that stores said proc... or sth lik eit |
19:30:44 | termer | CPS lets you implement coroutines/green threads |
19:31:05 | FromDiscord | <Chronos [She/Her]> What do those actually mean...? :P |
19:31:06 | FromDiscord | <Phil> Which didn't help me at all when I didn't know (and still don't know) either of those concepts 😄 |
19:31:39 | FromDiscord | <leorize> you have "threads" that are fully controlled by the application |
19:31:39 | FromDiscord | <Phil> Dang should've written myself a Zettelkasten source note to link to the original repo |
19:31:57 | FromDiscord | <leorize> whether it's "async" or "real threads" is just implementation details |
19:32:22 | FromDiscord | <Chronos [She/Her]> Okay that part makes sense |
19:32:26 | FromDiscord | <Phil> https://github.com/nim-works/cps/blob/master/tutorial/README.md↵There @Chronos [She/Her] , it's pretty okay |
19:32:32 | FromDiscord | <Phil> (edit) "okay" => "decent an explainer" |
19:32:35 | FromDiscord | <Chronos [She/Her]> Wrong account lmao but thanks! |
19:32:43 | FromDiscord | <Chronos [She/Her]> I should probably leave the server on my old account |
19:33:09 | termer | I should have recorded the livestream I did where I went over the coroutines tutorial on it |
19:33:21 | termer | enough people have asked about it that it would have been useful lol |
19:33:22 | FromDiscord | <Phil> I'mma do coin flips on which account gets used for pinging you next, whether that chance of that reaching you or not is 50% or 100% is your choice 😛 |
19:33:31 | termer | say what |
19:33:53 | FromDiscord | <Phil> Chronos, directed at Chronos |
19:34:03 | FromDiscord | <Phil> She just said she has 2 accounts on this server with the same name ^^ |
19:34:05 | FromDiscord | <leorize> a recorded demo is gonna be great |
19:34:25 | termer | I can only see names from IRC land |
19:34:56 | FromDiscord | <Phil> Do a livestream, if you're feeling particularly willing to put in effort see if you can edit it down maybe to cut out the slow bits and upload it somewhere... that somewhere likely being youtube for max audience if desired |
19:35:09 | FromDiscord | <Phil> That'd be fire |
19:36:05 | termer | that'd work |
19:36:43 | FromDiscord | <Phil> My main issue atm with CPS is I have a "conscious" model of how it works, as in I have a bunch of rules and how things are supposed to interact, but it's by far not intuitive and not at the level where I'd draw conclusions on its implications etc. |
19:37:43 | termer | It's intuitive once you actually have something to do with it |
19:37:51 | termer | which is where you can use a lib like nim-sys |
19:38:05 | termer | the issue is that nim-sys doesn't really have docs or examples |
19:38:21 | FromDiscord | <Chronos [She/Her]> Certainly interesting |
19:38:24 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FKt |
19:38:40 | FromDiscord | <Phil> No wait... background wraps the proc? |
19:38:41 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "I'mma do coin flips": Could you perhaps kick it? :P |
19:38:56 | FromDiscord | <Chronos [She/Her]> In reply to @chronos.vitaqua "Certainly interesting": CPS, that is |
19:39:07 | FromDiscord | <Chronos [She/Her]> @Chronos [She/Her], yu.vitaqua.fer.chronos- |
19:40:05 | FromDiscord | <Phil> In reply to @yu.vitaqua.fer.chronos "I'm using it to": This is the latest message from that account.↵If it's the right one this shouldn't have pinged you, that correct? |
19:40:12 | termer | not sure what "background" is |
19:40:56 | FromDiscord | <Phil> https://github.com/disruptek/background↵Leorize posted that as a CPS useage example |
19:41:59 | FromDiscord | <Phil> Ohhhhhhhh now I get it |
19:42:09 | FromDiscord | <Phil> the Function call is immediately executed and pushed onto the new thread |
19:42:49 | FromDiscord | <Phil> And the result of background is assigned to a variable which is a proc.↵You can execute that proc to essentially "waitFor" for the background proc to finish executing in a thread-blocking manner |
19:43:25 | FromDiscord | <Phil> (edit) removed "executed and" | "new" => "background" | "pushed onto thebackgroundthread ... " added "and starts executing" |
19:44:11 | FromDiscord | <Phil> So that's kinda async but the syntax is far easier to look at |
19:44:45 | FromDiscord | <Phil> Wait, this is disruptek, how does the name not have to do with genitalia |
19:45:25 | termer | say what |
19:45:47 | FromDiscord | <Phil> Wasn't it disruptek that is infamous to name his libs constantly stuff like "balls" |
19:45:57 | termer | oh yeah |
19:46:14 | FromDiscord | <leorize> he have a lot more normal-sounding stuff than the contrary |
19:46:25 | FromDiscord | <Phil> The legend has been shattered |
19:46:37 | FromDiscord | <leorize> and like, testes/balls is literally the only thing with that kind of name |
19:48:08 | FromDiscord | <Phil> In that case I shall stand corrected.↵CPS was pretty much my third package total I've seen from him after testes and balls |
19:48:30 | FromDiscord | <Phil> background now being the 4th |
19:48:52 | FromDiscord | <leorize> https://github.com/disruptek \<- here's the full list for you |
19:48:52 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "This is the latest": Mhm correct |
19:49:39 | FromDiscord | <leorize> he makes a lot of neat stuff, none of which are in nimble directory, of course |
19:50:40 | FromDiscord | <Chronos [She/Her]> What happened to Disruptek? Did he just move to Nimskull? |
19:51:17 | FromDiscord | <Chronos [She/Her]> He stopped talking here one day and haven't seen him since besides my brief venture into Nimskull |
19:51:24 | FromDiscord | <leorize> he got banned from the nim community |
19:51:31 | FromDiscord | <leorize> so you'll never see him here again |
19:52:31 | FromDiscord | <Chronos [She/Her]> Ah... any reason why or? |
19:53:27 | FromDiscord | <leorize> he aired his frustration with the nim core devs in, uh, not very nice words |
19:53:39 | FromDiscord | <Chronos [She/Her]> Ah rip |
19:53:44 | FromDiscord | <leorize> if you trace nim's IRC logs you will probably find the message leading to the ban |
20:17:28 | termer | that's funnty |
20:17:31 | termer | *funny |
20:18:24 | termer | I love heated IRC arguments |
20:18:42 | termer | they're hilarious and fun but not great for something semi-professional |
20:19:11 | termer | being banned over insults sucks, I empathize with disruptek LOL |
20:22:48 | FromDiscord | <leorize> this was before any mod guidelines were present (and I'm not sure if they are present now, but I do know a mod team exists) |
20:23:32 | FromDiscord | <Phil> In reply to @leorize "this was before any": For context, they do now, though I'm definitely not perfect at following them albeit getting better |
20:25:56 | FromDiscord | <leorize> from my recent-ish experience, araq and dom seemed to get to ban whenever |
20:26:16 | FromDiscord | <leorize> and like, there's no public info about how modding even works here |
20:26:25 | termer | I've heard people complain about Dom but I got into any drama or whatever so I can't say for certain |
20:26:26 | FromDiscord | <leorize> get the hammer and you're gone for good |
20:26:33 | termer | ban evasion is easy |
20:26:39 | termer | just saying |
20:27:07 | FromDiscord | <leorize> it's trivial, of course |
20:27:08 | termer | Banning and being banned is more of an ego thing than anything else in most cases |
20:27:20 | FromDiscord | <leorize> but it's a sign that the people managing the place don't want you here |
20:27:22 | FromDiscord | <leorize> so why bother |
20:27:30 | termer | you lose your reputation, and that too yeah |
20:27:37 | FromDiscord | <Phil> In reply to @leorize "get the hammer and": Hmm we have somewhat of an escalation ladder which includes timeouts and temp-bans |
20:27:47 | FromDiscord | <Phil> So 🤷 |
20:28:14 | termer | What if I called the administration retards on IRC |
20:28:18 | termer | would I get banned |
20:28:54 | FromDiscord | <leorize> cabboose got banned w/o timeouts during some cps talks so... |
20:29:01 | FromDiscord | <leorize> can't say I trust the guidelines |
20:29:04 | termer | cabboose? |
20:29:32 | FromDiscord | <Phil> I mean we can get into that argument but its post work and I really don't feel like getting into hypothetical debates.↵And I can't say I know everything about anyone... yknow what I just give up if that's what's required of me to participate in this talks given the faction I somewhat represent. |
20:29:41 | FromDiscord | <leorize> author of https://github.com/nim-works/loony |
20:29:43 | FromDiscord | <Phil> (edit) "this" => "these" |
20:29:56 | termer | I don't dislike any of the staff by the way |
20:30:03 | termer | I just like giving this question to people to see what they say |
20:30:11 | FromDiscord | <leorize> I'm pretty much over it by now |
20:30:18 | FromDiscord | <leorize> I just don't participate much anymore |
20:30:37 | termer | I'm in here primarily to ask and answer questions |
20:30:56 | termer | since I have actual software and investment into the Nim ecosystem, I prefer not to get into silly arguments that risk reputation damage for no good reason |
20:31:00 | FromDiscord | <Chronos [She/Her]> What is the `secretKey` and `reusePort` settings for Prologue actually do?- |
20:31:11 | termer | reusePort lets you listen on the same port over multiple threads |
20:31:14 | FromDiscord | <Phil> In reply to @termer "What if I called": In my eyes primarily something between nothing and an encouragement to chill a first warning for repeat offending. |
20:31:16 | termer | not sure what secretKey is |
20:31:27 | FromDiscord | <Chronos [She/Her]> Fair, thanks Termer 07 |
20:31:29 | FromDiscord | <Phil> (edit) "chill" => "chill," |
20:31:31 | FromDiscord | <Chronos [She/Her]> o7 |
20:31:33 | termer | Phil, sounds reasonable |
20:33:07 | termer | On the topic of CPS, someone brought it up in the Nim 2.0.0 announcement thread and Araq said it could be considered in 3.0.0 somewhat sarcastically lol |
20:33:20 | termer | made me a bit disappointed because CPS is so slow right now |
20:33:26 | termer | slow to compile I mean |
20:33:26 | FromDiscord | <Phil> How quickly the severity jumps up is immensely vibes based. I'd jump far quicker to a warning if its very specifically targeted insults etc.↵That is pretty much unavoidable given that there is no "universal severity ranking for types of insults"↵~~And if there were than yo momma jokes would be on top of that list~~ |
20:34:01 | FromDiscord | <Phil> (edit) "than" => "then" |
20:34:11 | termer | show me your forum profile so I can ridicule your post stats |
20:34:30 | FromDiscord | <leorize> here's a fun trivia\: CPS was actually conceived from a paper Araq shared to us as "the way forward" for async |
20:34:41 | termer | Yeah |
20:34:48 | termer | it was so close to being put into the compiler |
20:34:59 | termer | reading the graveyard of those RFCs and discussions saddens me |
20:35:19 | FromDiscord | <Phil> In reply to @termer "show me your forum": I run by isofruit, used to run here under that name as well until I wanted folks to have the chance to recognize this profile if they stumble over nim via SO |
20:35:46 | termer | oh ok, you're isofruit |
20:35:57 | FromDiscord | <Phil> So have fun, though I'll likely be sleeping either way 😛 |
20:37:01 | FromDiscord | <Phil> Actually, regarding CPS and your earlier background example leorize |
20:38:28 | FromDiscord | <Phil> How did particularly CPS help there?↵It pushes a proc onto a separate thread and makes it possible to "wait" for that proc to finish (or "recover the output" to reuse the wording)↵What part of that is helped by splicing a proc into individual control-flow blocks and executing them one at a time? |
20:39:23 | FromDiscord | <leorize> background is more or less a demo, I think it's already been succeeded by other libs |
20:39:27 | FromDiscord | <Chronos [She/Her]> TOML or JSON for config hm... |
20:40:03 | FromDiscord | <leorize> but to answer your question, with integration into a event queue, cps can do an "async" wait when you call for output recovery |
20:40:28 | FromDiscord | <Phil> Oh so CPS is what makes this pseudo-waitFor possible that is returned by "background" |
20:41:02 | FromDiscord | <Phil> In reply to @chronos.vitaqua "TOML or JSON for": Honestly I'd use JSON but I guess some people like TOML for some reason |
20:41:11 | FromDiscord | <Chronos [She/Her]> Fair enough |
20:41:27 | FromDiscord | <leorize> you can comment in toml and the syntax is human-friendly for the most part |
20:41:31 | FromDiscord | <Chronos [She/Her]> I'll have to use JSON anyway for data over the web so I'll use JSON via Jsony |
20:41:39 | FromDiscord | <Phil> Okay comments is a fair point |
20:42:10 | FromDiscord | <leorize> toml appeal is quite literally ini with a spec |
20:42:15 | FromDiscord | <Chronos [She/Her]> Does Jsony support default values in the procs hm... |
20:42:34 | FromDiscord | <Chronos [She/Her]> May use TOML, still can go either way for now |
20:53:39 | FromDiscord | <.maverk> is this what ``##[]##`` suppose to do ? allows me to create an html page as a documentation and no code will be cosidered there ? https://media.discordapp.net/attachments/371759389889003532/1149809795281461318/rsr.PNG |
20:54:27 | FromDiscord | <Phil> In reply to @.maverk "is this what ``##[]##``": You can achieve the same thing with ## I think, ##[]## may just be nicer to deal with afaik |
20:54:55 | FromDiscord | <.maverk> In reply to @isofruit "You can achieve the": i will try ## |
20:55:36 | FromDiscord | <Phil> I haven't stumbled over a meaningful difference between the two.↵And it's less that you write those comments for HTML pages, it is that these are doc-comments and you write them to document to yourself what exact behaviour of a proc is and what job it finished with notes on things that require special consideration. |
20:55:51 | FromDiscord | <Phil> Nim just happens to have in-built tooling to generate HTML-pages out of those docs |
20:56:11 | FromDiscord | <.maverk> In reply to @isofruit "You can achieve the": no |
20:56:14 | FromDiscord | <.maverk> it doesn't work |
20:56:27 | FromDiscord | <.maverk> let me show you |
20:56:32 | FromDiscord | <Phil> Define "it doesn't work"↵Ah thansk |
20:57:08 | FromDiscord | <.maverk> https://media.discordapp.net/attachments/371759389889003532/1149810673619058788/331.PNG |
20:57:13 | FromDiscord | <Phil> Because I know for sure you can get docs from it in general.↵May be that specific kinds of docs may not work like paragraphs at the start of a module which basically just document module overviews |
20:57:16 | FromDiscord | <.maverk> just white screen |
20:57:22 | FromDiscord | <.maverk> the text is not printed |
20:57:43 | FromDiscord | <.maverk> i think ##[]## is for making html documentation files |
20:58:24 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FKU |
20:58:45 | FromDiscord | <.maverk> i see |
21:04:23 | FromDiscord | <.maverk> In reply to @isofruit "I mean, depends on": this one can be used for both ? i mean ## |
21:04:31 | FromDiscord | <.maverk> html and normal comment ? |
21:04:44 | FromDiscord | <Phil> I think both can be used for both |
21:31:35 | FromDiscord | <.e.l.i> Is there any difference between returning nothing and returning void? |
21:32:27 | FromDiscord | <.e.l.i> (edit) "returning nothing and" => "omitting the return type or" |
21:41:03 | FromDiscord | <jviega> You can't omit the return type if you're returning anything 🙂 |
21:48:30 | FromDiscord | <amjadhd> sent a code paste, see https://play.nim-lang.org/#ix=4FL5 |
21:52:54 | FromDiscord | <.e.l.i> In reply to @jviega "You can't omit the": I meant if the proc doesn't return anything. |
21:53:12 | FromDiscord | <jviega> void is the same thing in that instance. |
21:53:37 | FromDiscord | <.e.l.i> I see. Then what is the use for void |
21:54:01 | FromDiscord | <jviega> It's most useful imho when using the sugar module to write compact function pointer types. |
21:54:22 | FromDiscord | <jviega> `var callback = (int, string) -> void` |
21:54:35 | FromDiscord | <jviega> (edit) "callback =" => "callback:" |
21:55:15 | FromDiscord | <jviega> Is much more readable than specifying a proc line, especially as signatures get more complex |
21:56:11 | FromDiscord | <.e.l.i> Interesting. |
21:57:45 | * | advesperacit quit () |
22:02:57 | NimEventer | New post on r/nim by PMunch: Teaching old C code new tricks with Nim, see https://reddit.com/r/nim/comments/16dnp8k/teaching_old_c_code_new_tricks_with_nim/ |
22:05:07 | NimEventer | New thread by c4UlMu: Get C code output, see https://forum.nim-lang.org/t/10471 |
22:13:03 | FromDiscord | <m4ul3r> In reply to @.maverk "i think ##[]## is": This is a a multi line doc string, similar to how #[]# is a multi line comment |
22:25:30 | * | azimut quit (Ping timeout: 246 seconds) |
23:33:34 | * | lumo_e joined #nim |