<< 08-09-2023 >>

00:13:05FromDiscord<taperfade> in wNim what is wWindow ?
01:17:41FromDiscord<taperfade>
01:30:00*marcus quit (Remote host closed the connection)
01:31:50*marcus joined #nim
01:41:02FromDiscord<taperfade> nim is so cool i wish i could learn it fastetr
02:39:53FromDiscord<xtrayambak> Try out this: https://nim-by-example.github.io/getting_started/
02:40:20FromDiscord<xtrayambak> It's a good resource for learning the basics in a short amount of time.
02:58:32FromDiscord<taperfade> whats the difference between const var and let
02:58:37FromDiscord<taperfade> and when do i use which
03:12:01FromDiscord<taperfade>
03:12:21FromDiscord<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:03FromDiscord<graveflo> (edit) "variables" => "values"
03:27:15FromDiscord<graveflo> has anyone else had an issue with atlas cloning packages outside the `deps` directory?
03:41:52*disso-peach joined #nim
03:53:00FromDiscord<mrgaturus> In reply to @taperfade "whats the difference between": var, let as said graveflo and const is a compile time constant
03:53:19FromDiscord<mrgaturus> (edit) "In reply to @taperfade "whats the difference between": var, let as ... said" added "graveflo" | removed "graveflo"
03:54:55FromDiscord<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:56FromDiscord<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:17NimEventerNew Nimble package! forge - basic toolchain to forge (cross-compile) your multi-platform nim binaries, see https://github.com/daylinmorgan/forge
05:08:32FromDiscord<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:58FromDiscord<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:06FromDiscord<Phil> In reply to @jviega "Not everything is a": ~~The man is wrong, everything's a dictionary!~~
05:13:12FromDiscord<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:43FromDiscord<toma400> sent a long message, see http://ix.io/4FGB
05:17:13FromDiscord<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:34FromDiscord<sOkam! 🫐> const is initialized once ever, let is initialized every run of the app
05:18:00FromDiscord<Elegantbeef> Const isnt technically ever intialised if we're playing correct the pedant
05:18:10FromDiscord<sOkam! 🫐> tru
05:18:12FromDiscord<Phil> sent a long message, see http://ix.io/4FGE
05:18:32FromDiscord<Phil> (edit) "http://ix.io/4FGE" => "http://ix.io/4FGF"
05:18:40FromDiscord<Elegantbeef> Const is a compile time constant, let is a runtime constant, var is a mutable variable
05:19:48FromDiscord<Phil> (edit) "http://ix.io/4FGF" => "http://ix.io/4FGG"
05:41:56FromDiscord<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:54FromDiscord<taperfade> ill just use let and var
05:42:58FromDiscord<taperfade> idk what const is good for
05:45:03FromDiscord<Phil> Makes some things faster
05:45:41FromDiscord<Phil> If you wanna go in with need for speed then using const as much as you can is good
05:46:00FromDiscord<taperfade> okie
05:46:06FromDiscord<taperfade> i need som help
05:46:20FromDiscord<taperfade> i have this thing that echoes out the key i press
05:46:21FromDiscord<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:29FromDiscord<taperfade> with the windows that im in rn
05:46:29FromDiscord<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:18FromDiscord<nnsee> that smells suspiciously like you're writing a keylogger
05:48:24FromDiscord<nnsee> we will not help with that
05:49:03FromDiscord<taperfade> nope
05:49:22FromDiscord<taperfade> also im fixing the thing myself
05:49:50FromDiscord<taperfade> i dont need help false alarm
05:52:48*advesperacit joined #nim
05:55:23FromDiscord<taperfade> i want to make a simple chat
05:55:26FromDiscord<taperfade> thingy
05:56:18FromDiscord<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:03FromDiscord<taperfade> not sure
06:46:45*PMunch joined #nim
06:49:07FromDiscord<toma400> sent a code paste, see https://play.nim-lang.org/#ix=4FH0
06:49:44FromDiscord<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:28PMunchThey should be just as fast
06:53:32FromDiscord<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:36PMunchBut benchmark if you're curious
06:54:18FromDiscord<ieltan> Yeah, I think it's a negligible difference anyways
06:54:23PMunchIf you're worried about speed though returning an OrderedTable is not what you want to do :P
06:54:40PMunchI assume you're coming from Python and want to return a dict?
06:54:50FromDiscord<toma400> In reply to @PMunch "If you're worried about": Out of curiosity, what would you recommend for that?
06:55:00FromDiscord<toma400> In reply to @PMunch "I assume you're coming": And yeah, for both answers XD
06:55:27PMunchHaha a common pattern in Python which isn't all that common in Nim. What are you actually trying to do?
06:57:01PMunchIt 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:02FromDiscord<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:40PMunchYeah I can see what the code does, but what do you want to do with this table?
06:57:51PMunchLike what is the problem you're trying to solve by creating this matrix
06:58:08PMunchAnd why does the order matter?
06:59:28FromDiscord<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:38FromDiscord<toma400> (edit) "first." => "everytime."
06:59:57FromDiscord<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:57FromDiscord<toma400> (edit) "this" => "their"
07:03:38PMunchtoma400, so if you're storing a full image, why aren't you just using `array[height, array[width, ColorRGBX]]`?
07:04:07PMunchOr `seq[seq[ColorRGBX]]` if you don't know the size during compilation.
07:05:09PMunchA 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:35FromDiscord<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:25FromDiscord<ieltan> So that you're not reallocating everytime you add a pixel
07:07:39FromDiscord<ieltan> (edit) "So that you're not reallocating everytime you add a pixel ... " added "after a certain threshold"
07:09:52FromDiscord<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:00FromDiscord<odexine> Probably because of the move optimisation
07:11:03FromDiscord<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:06PMunchtoma400, 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:15FromDiscord<odexine> In reply to @toma400 "Hmm, I pick most": No it won’t
07:11:23FromDiscord<odexine> Immutability is a property of the variable and not the type
07:11:33FromDiscord<ieltan> In reply to @toma400 "Interesting, so it looks": Damn my guess was kinda right
07:11:37PMunchIt would require a static size though
07:17:49*ntat joined #nim
07:24:23FromDiscord<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:49FromDiscord<toma400> In reply to @odexine "Immutability is a property": Thanks for confirmation ❤️
07:24:57FromDiscord<toma400> (edit) "confirmation" => "information"
07:25:20FromDiscord<odexine> In reply to @toma400 "Does that make benchmarking": It can, there are ways to make them more reliable
07:25:35FromDiscord<odexine> But you basically have to make two programs then run the test multiple times
07:33:51FromDiscord<System64 ~ Flandre Scarlet> In reply to @odexine "Immutability is a property": Everything but consts can be mutable if you use pointers
07:34:10FromDiscord<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:17FromDiscord<odexine> In reply to @sys64 "Everything but consts can": The value of the pointer (the address) is immutable
07:35:28FromDiscord<odexine> Indirection doesn’t currently
07:35:33FromDiscord<odexine> I sent that by mistake
07:37:46PMunchtoma400, that's probably within margin of error
07:38:10PMunchNow try a seq[seq[]] or array
07:54:50FromDiscord<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:06PMunchHmm, is there any way I can throw a defect from C code?
08:24:29PMunchBasically I'm trying to figure out a more graceful way to perform an `exit`
08:24:38FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "<@656540400546480128>, that's probably within": Isn't it better to flatten arrays/seqs?
08:25:19PMunchSystem64_~_Flandre_Scarlet, arrays would have absolutely no benefit, their nesting is purely syntactic. For sequences there might be some benefit
08:28:07FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "System64_~_Flandre_Scarlet, arrays would have": Oh alright, so compilers flattens Arrays automatically?
08:32:18FromDiscord<odexine> arrays are flat in the first place
08:32:50PMunchYeah, arrays are just syntax sugar, so nested arrays are exactly the same in memory as flat arrays
08:33:39PMunchThe 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:35PMunchHowever since array sizes are static the C compiler will likely speed up some of your math in those cases anyways
08:44:14PMunchHmm, `OutOfMemoryDefect` is mentioned in the Exception hierarchy, but doesn't seem to actually be defined anywhere, or used anywhere
08:47:08FromDiscord<nnsee> In reply to @PMunch "Hmm, is there any": set up a SIGSEGV handler and deliberately make it access a null pointer
08:47:20FromDiscord<nnsee> 😇
08:47:31PMunchAt that point I could just as well call exit..
08:47:40FromDiscord<nnsee> where's the fun in that?
08:48:28FromDiscord<Elegantbeef> I think you can make a proc that throws a defect, but you will need to annotate it `raise: [YourDefect]`
08:48:46FromDiscord<nnsee> this is usually (a part of) how i do control flow obfuscation in my "evil" implants
08:48:51PMunchI tried that, but couldn't get it to work
08:48:53FromDiscord<nnsee> always fun seeing blue teams try to reverse engineer it
08:49:09PMunchThe thing is called from C code completely oblivious to the fact that this is Nim
08:49:21PMunchSo I'm afraid that the Nim error check thing doesn't happen
08:49:31FromDiscord<Elegantbeef> Right if the exception handler isnt being used it will not be caught
08:50:00PMunchSo I'm wondering if I can trigger the Nim exception handling before I get back to Nim code
08:50:16PMunchLike can I run `nimErrCheck` or whatever it is called in C code manually?
08:50:33FromDiscord<Elegantbeef> Probably
08:50:39FromDiscord<jviega> If you use the setjmp() exception handling, get access to the jmp_buf?
09:03:17PMunchNice, I managed to get it working with `defer: {.emit: "nimTestErrorFlag()".}` before throwing my exception
09:06:25PMunchNow 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:32PMunchIt might immediately crash out anyways
09:06:59FromDiscord<Elegantbeef> Raise a preallocated exception
09:07:06FromDiscord<Elegantbeef> Nim atleast has a out of memory hook
09:07:10FromDiscord<Elegantbeef> Not that it's sensible to use
09:08:13PMunchWell the thing is that I'm trying to replace a C function which looks like this: http://ix.io/4FHj
09:08:42PMunchThe C function takes in a cstring and displays it using fprintf before running exit
09:08:55FromDiscord<taperfade> guyserm
09:09:11FromDiscord<odexine> ?
09:09:20FromDiscord<Elegantbeef> Instead of exit you want to properly raise an exception to end the program that way
09:09:31FromDiscord<Elegantbeef> So you have to preallocate that exception then raise it
09:09:40FromDiscord<taperfade> are yall like
09:09:56FromDiscord<taperfade> against making malware with nim ?
09:10:04PMunchElegantbeef, but I can't pre-allocate something with a string that I receive at runtime..
09:10:11FromDiscord<nnsee> Yes.
09:10:29PMunchI guess I could create the exception with a `newString(<some buffer size>)` message
09:10:32FromDiscord<Elegantbeef> You can preallocate the exception that has a cstring as a msg
09:10:32FromDiscord<Elegantbeef> well a `cstringMsg` field
09:10:38FromDiscord<nnsee> note that I make "malware" in Nim, but that's literally my job, I work in a security company
09:10:39FromDiscord<odexine> In reply to @taperfade "against making malware with": most people here would be
09:10:50FromDiscord<taperfade> In reply to @odexine "most people here would": whys that
09:10:56FromDiscord<Elegantbeef> If this fails due to OOM you cannot really copy to a native Nim string anyway
09:11:00PMunchElegantbeef, oh a custom Defect for this
09:11:22FromDiscord<Elegantbeef> the message will not be presented if it's a defect
09:11:27PMunchIf the string is allocated with `newString` couldn't I copyMem the cstring into the string buffer manually?
09:11:40FromDiscord<Elegantbeef> Assuming it's the right size of course
09:11:44FromDiscord<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:46PMunchOf course
09:12:07PMunchnnsee, "a period", I believe we are still in this period..
09:12:09FromDiscord<jviega> You could pre-alloc the string, and then slam the pointer into the string structure, no??
09:12:24FromDiscord<taperfade> In reply to @nnsee "because it's 1) illegal": oh wow
09:12:26FromDiscord<taperfade> thats bad
09:12:46FromDiscord<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:06FromDiscord<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:09FromDiscord<nnsee> (edit) "haha(" => "haha)"
09:14:08FromDiscord<_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:15FromDiscord<nnsee> something I just compiled and tested, for example: https://www.virustotal.com/gui/file/764045d6dfce5cb7ddd2805201d8f8a7a2d7ca43db0d93f6e2692ad319032a06
09:15:40FromDiscord<jviega> I want to essentially memcpy a ref object; I assume that's what shallowCopy used to do, does anything replace that??
09:16:00FromDiscord<Elegantbeef> @frobnicate\: github has templates atleast
09:16:33FromDiscord<frobnicate> wait what?
09:16:36FromDiscord<frobnicate> really?
09:16:45FromDiscord<Elegantbeef> https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-template-repository
09:17:32FromDiscord<Elegantbeef> It's practically just a git repo that collapses the git history and changes the origin
09:17:44FromDiscord<Elegantbeef> It's nothing really 'github' centric just they put a fancy interface on top
09:17:54FromDiscord<frobnicate> Handy
09:18:16FromDiscord<frobnicate> So if I wanted I could just make a script that does the same I suppose
09:19:08FromDiscord<taperfade> In reply to @_nenc "I think we all": what
09:33:12FromDiscord<nnsee> really? https://github.com/senzur/nim-discord-keylogger https://media.discordapp.net/attachments/371759389889003532/1149638557275791401/Screenshot_20230908-123215_Chrome.png
09:33:25FromDiscord<nnsee> > last commit 20 minutes ago
09:34:55FromDiscord<odexine> xd
09:36:30FromDiscord<odexine> i think this would be caught easily by antivirus anyway
09:37:40FromDiscord<odexine> that code for writing headers, kinda funny lmao
09:37:48FromDiscord<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:04FromDiscord<odexine> oh it uses puppy
09:56:00PMunchnnsee, oh that's great :)
10:02:21PMunchjviega, 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:09FromDiscord<jviega> Aren't you dying there??
10:03:31FromDiscord<jviega> Swap the pointer back when you're done 🙂
10:03:46FromDiscord<taperfade> i like malware its rlly cool
10:03:51FromDiscord<taperfade> kind of my dream to make some
10:04:00FromDiscord<taperfade> doesnt justify my action tho
10:04:01FromDiscord<taperfade> sorry
10:09:24PMunchjviega, oh for sure, this is right before throwing a Defect which will very likely kill the program anyways
10:13:01PMunchNames over the IRC bridge is so confusing..
10:13:15FromDiscord<jviega> How so?
10:14:01PMunchLike 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:12FromDiscord<nnsee> oh, it uses usernames?
10:14:17PMunchApparently
10:14:30*cnx quit (Ping timeout: 255 seconds)
10:14:32PMunchSo when you shared that screenshot I had no idea who either person there was :P
10:14:46FromDiscord<nnsee> ah, sorry :D
10:14:51FromDiscord<jviega> Ah, yeah, the recent discord switch
10:14:55FromDiscord<nnsee> or, well, not sure what for, but still
10:15:09PMunchNo problem, not your fault the bot uses a different name for you :P
10:15:35FromDiscord<taperfade> In reply to @PMunch "Like Rika on Discord": this is me https://media.discordapp.net/attachments/371759389889003532/1149649223457984573/image.png
10:17:02PMunchAnyways, 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:22FromDiscord<taperfade> idk i rlly like it
10:18:38FromDiscord<taperfade> as a kid i discovered virus showcase vids
10:18:46FromDiscord<taperfade> and i was fascinated by it kinda
10:18:50FromDiscord<taperfade> i loved watching them
10:18:55FromDiscord<taperfade> i wna make a virus
10:19:05FromDiscord<taperfade> not rlly focused on stealing data
10:19:08FromDiscord<taperfade> but more like
10:19:18FromDiscord<taperfade> jumpscaring u
10:19:19FromDiscord<nnsee> right, that's why you decided to make a _keylogger_
10:19:23FromDiscord<taperfade> i think its pretty funny
10:19:27FromDiscord<nnsee> that exfils data over discord
10:19:33FromDiscord<taperfade> yep
10:19:37FromDiscord<nnsee> because you're not really focused on stealing data.
10:19:39FromDiscord<nnsee> right.
10:19:40FromDiscord<taperfade> i like that kind of stuff too
10:19:59FromDiscord<taperfade> ras maybe you shouldn literally interrupt me while im explaining something
10:20:09FromDiscord<taperfade> i wna be mean but i also dont wna get banned
10:20:45FromDiscord<taperfade> In reply to @taperfade "jumpscaring u": so yeah
10:20:51FromDiscord<taperfade> i wna make some dubious software
10:20:53FromDiscord<nnsee> how is sending a message in any way "interrupting you"?
10:21:00FromDiscord<taperfade> jumpscarey or data stealing stuff
10:21:02FromDiscord<nnsee> it's not like you have to stop writing when you see that i've sent a message
10:21:03FromDiscord<taperfade> its silly i like it
10:21:24FromDiscord<taperfade> In reply to @nnsee "it's not like you": ok
10:21:26FromDiscord<taperfade> anyway
10:21:31FromDiscord<Chronos [She/Her]> In reply to @taperfade "jumpscarey or data stealing": That's against ToS to talk about I'm p sure
10:21:42FromDiscord<taperfade> yup
10:22:03FromDiscord<finnt730> ah, mass removing your own messages
10:22:10FromDiscord<taperfade> i dont wna get banned silly
10:22:23FromDiscord<finnt730> I think this server has a logger bot....
10:22:33FromDiscord<taperfade> In reply to @finnt730 "I think this server": yeah well
10:22:34FromDiscord<Chronos [She/Her]> Messages posted to IRC can't be deleted
10:22:35FromDiscord<odexine> it kinda technically does
10:22:39FromDiscord<Chronos [She/Her]> And since the channel is bridged
10:22:45FromDiscord<odexine> its at least not on discord though
10:22:46FromDiscord<taperfade> oh god
10:22:58FromDiscord<finnt730> most big server have a logging system in place
10:22:58FromDiscord<Chronos [She/Her]> Yeah you're fucked™️
10:23:01PMunchIRC sees everything: https://irclogs.nim-lang.org/08-09-2023.html#10:18:22
10:23:09FromDiscord<taperfade> oki
10:23:15FromDiscord<taperfade> its not against the rules of the server
10:23:41FromDiscord<odexine> to what
10:23:41FromDiscord<Chronos [She/Her]> Discord's ToS is more important there
10:23:53FromDiscord<Chronos [She/Her]> Discuss the creation of malware and key loggers
10:24:14FromDiscord<odexine> not who i was asking
10:24:18FromDiscord<taperfade> i tried avoidin it
10:24:28FromDiscord<taperfade> also i just read tos its not against it
10:24:29FromDiscord<Chronos [She/Her]> Ah
10:24:38FromDiscord<taperfade> oh wait i read guidelines
10:26:06FromDiscord<taperfade> so in the "deine inhalte" section
10:26:21FromDiscord<taperfade> it doesnt say anything against discussing the creation of malware
10:26:48FromDiscord<taperfade> i hate this
10:27:02FromDiscord<taperfade> im gonna leave soon
10:27:06FromDiscord<odexine> what
10:27:07FromDiscord<odexine> why
10:27:15FromDiscord<System64 ~ Flandre Scarlet> Hi, do you know how I can deploy a program to a distant Linux machine please?
10:27:27FromDiscord<Chronos [She/Her]> Via ssh?
10:27:29FromDiscord<odexine> In reply to @sys64 "Hi, do you know": depends on what you can do with that machine
10:27:30FromDiscord<taperfade> In reply to @odexine "why": bcs im overwhelmed
10:27:32FromDiscord<Chronos [She/Her]> Ssh + Sftp are pretty common
10:27:38FromDiscord<odexine> In reply to @taperfade "bcs im overwhelmed": take a breather then
10:27:46FromDiscord<System64 ~ Flandre Scarlet> In reply to @odexine "depends on what you": Game server
10:27:51FromDiscord<System64 ~ Flandre Scarlet> My game
10:27:54FromDiscord<taperfade> In reply to @odexine "take a breather then": nope
10:28:02FromDiscord<nnsee> In reply to @sys64 "Hi, do you know": describe your architecture
10:28:04FromDiscord<taperfade> wasting my time on discord is my no.1 hobby
10:28:07FromDiscord<odexine> In reply to @sys64 "Game server": ssh or sftp not good enouhgh?
10:28:51FromDiscord<System64 ~ Flandre Scarlet> In reply to @odexine "ssh or sftp not": Is it possible to automate via a powershell script ?
10:28:53FromDiscord<taperfade> what does kanon mean
10:29:03FromDiscord<odexine> anime girl name
10:29:14FromDiscord<nnsee> In reply to @sys64 "Is it possible to": yes? windows has openssh built in
10:29:17FromDiscord<taperfade> im guessing the one in ur pfp right
10:29:17FromDiscord<odexine> In reply to @sys64 "Is it possible to": sure, i dont have experience though
10:29:21FromDiscord<odexine> yes
10:29:29FromDiscord<nnsee> or like
10:29:29FromDiscord<taperfade> woah buddy
10:29:31FromDiscord<taperfade> ur weird
10:29:35FromDiscord<nnsee> what exactly are you trying to achieve
10:29:39FromDiscord<odexine> who isnt weird
10:30:28FromDiscord<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:35FromDiscord<taperfade> In reply to @odexine "who isnt weird": me
10:30:37FromDiscord<taperfade> im sane and normal
10:30:49FromDiscord<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:59FromDiscord<nnsee> i meant more like
10:31:35FromDiscord<taperfade> i feel like rassie boo will no longer help me do anything with nim
10:31:37FromDiscord<taperfade> aka ras
10:31:52FromDiscord<odexine> In reply to @taperfade "i feel like rassie": whos to blame for that
10:31:55FromDiscord<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:39FromDiscord<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:28FromDiscord<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:29FromDiscord<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:35FromDiscord<nnsee> ninja'd
10:34:41FromDiscord<Chronos [She/Her]> Lol
10:34:56FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "if it has to": Woops, ARM?
10:35:00FromDiscord<nnsee> yes.
10:35:05FromDiscord<nnsee> but it's... crazy powerful
10:35:08FromDiscord<Chronos [She/Her]> ARM CPUs yeah, but crosscompiling exists sooo
10:35:21FromDiscord<System64 ~ Flandre Scarlet> And should I do a docker image ?
10:35:39FromDiscord<nnsee> you get 24G of ram and 4 cores
10:35:46FromDiscord<System64 ~ Flandre Scarlet> Pretty good
10:36:04FromDiscord<Chronos [She/Her]> I need to get my credit card sorted out to get one tbh
10:36:08FromDiscord<Chronos [She/Her]> Rn it's all a bit fucked
10:36:12FromDiscord<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:18FromDiscord<System64 ~ Flandre Scarlet> I also use LibSodium and Tilengine as C libraries
10:36:54FromDiscord<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:41FromDiscord<nnsee> In reply to @sys64 "And should I do": probably, yeah, if for nothing else, it makes it easy to deploy
10:38:55FromDiscord<nnsee> but it's not exactly required
10:39:11FromDiscord<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:36FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "probably, yeah, if for": Oh god↵ARM docker image↵I can feel the pain
10:40:09FromDiscord<frobnicate> 💪
10:40:12FromDiscord<nnsee> actually buildx is really nice and makes cross "compilation" pretty easy
10:40:13FromDiscord<frobnicate> Geddit
10:40:14FromDiscord<kingterrytheterrible12> @Chronos [She/Her] hows debian
10:40:15FromDiscord<frobnicate> Arm
10:40:41FromDiscord<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:06FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "It literally killed itself": How do distros kill themselves for you
10:41:10FromDiscord<kingterrytheterrible12> It never happened to me
10:41:11FromDiscord<Chronos [She/Her]> The install was just overall fucked
10:41:19FromDiscord<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:20FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "The install was just": Probably usb is borked
10:41:21FromDiscord<nnsee> however
10:41:25FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "actually buildx is really": What is that?
10:41:34FromDiscord<nnsee> a docker component
10:41:35FromDiscord<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:43FromDiscord<kingterrytheterrible12> xd
10:42:02FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "a docker component": Ah alright so I need to build inside the docker?
10:42:22FromDiscord<nnsee> not sure what you mean
10:42:38FromDiscord<nnsee> or, just so i have context, have you used docker before?
10:42:45FromDiscord<nnsee> to build stuff, not just to run images
10:43:18FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "to build stuff, not": Never really understood how it works
10:43:41FromDiscord<System64 ~ Flandre Scarlet> I once used it for building C# server
10:43:55FromDiscord<System64 ~ Flandre Scarlet> Wait no↵To deploy
10:49:18FromDiscord<nnsee> sent a long message, see http://ix.io/4FHE
10:49:28FromDiscord<nnsee> https://git.dog/xx/notifier/src/branch/master/Dockerfile - here's an example where I "build" a Python project
10:50:28FromDiscord<nnsee> once you have this Dockerfile, you tell docker you want to build an image according to the Dockerfile
10:50:42FromDiscord<nnsee> once this image is built, you can simply `docker run` it anywhere
10:50:50FromDiscord<kingterrytheterrible12> Also docker is very fucking good for development
10:51:07FromDiscord<kingterrytheterrible12> To prevent "it works on my machine but not on my freinds machine"
10:51:24FromDiscord<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:41FromDiscord<nnsee> welllll
10:51:52FromDiscord<nnsee> if you upload your image to a registry, yes
10:51:54FromDiscord<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:04FromDiscord<kingterrytheterrible12> In reply to @raynei486 "I heard that docker": Pretty much
10:52:24FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "if you upload your": À registry?↵And what about this Oracle server ?
10:52:25FromDiscord<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:01FromDiscord<System64 ~ Flandre Scarlet> Oh god I'd have to build Tilengine for ARM too aaah!
10:53:01FromDiscord<nnsee> a registry is a place where you can upload docker images that have already been built (and download them for running)
10:53:14FromDiscord<nnsee> for example, dockerhub is a registry
10:53:34FromDiscord<nnsee> https://ghcr.io is github's registry
10:53:45FromDiscord<System64 ~ Flandre Scarlet> And is it free?
10:54:01FromDiscord<nnsee> github's is, but i don't really know the exact limits
10:54:03FromDiscord<nnsee> i host my own
10:54:08FromDiscord<nnsee> it's very easy to host your own
10:54:18FromDiscord<System64 ~ Flandre Scarlet> And I can run the server with that?
10:54:37FromDiscord<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:43FromDiscord<nnsee> i don't see why not
10:55:17FromDiscord<System64 ~ Flandre Scarlet> So the oracle server downloads the image, right?
10:55:25FromDiscord<nnsee> yes
10:55:30FromDiscord<nnsee> (or builds it from source)
10:55:44FromDiscord<System64 ~ Flandre Scarlet> Better to build from source
10:56:39FromDiscord<System64 ~ Flandre Scarlet> And is the lag between the computer and the server big?
10:56:54FromDiscord<nnsee> you mean for actually playing the game?
10:56:58FromDiscord<System64 ~ Flandre Scarlet> Yeah
10:57:17FromDiscord<nnsee> depends entirely on the pc's home connection and where (geographically) the oracle server is deployed
10:57:39FromDiscord<nnsee> mine is in amsterdam for example, and in tallinn i get an average ping of around 30-40ms
10:57:56FromDiscord<System64 ~ Flandre Scarlet> Is there servers in Belgium? Or at least Europe?↵↵Oh, it's decent I think
10:58:15FromDiscord<System64 ~ Flandre Scarlet> The lag won't be that horrid, even without correction
10:59:07FromDiscord<kingterrytheterrible12> In reply to @sys64 "Is there servers in": Rent a server from hetzner
10:59:09FromDiscord<kingterrytheterrible12> Or netcup
10:59:17FromDiscord<System64 ~ Flandre Scarlet> Is it paid?
10:59:23FromDiscord<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:25FromDiscord<nnsee> scroll down for the table
10:59:43FromDiscord<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:15FromDiscord<System64 ~ Flandre Scarlet> Will try to register
11:03:05FromDiscord<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:11FromDiscord<nnsee> right
11:03:54FromDiscord<nnsee> and make sure you select the ARM/Ampere machine (with four vCPUs)
11:04:08FromDiscord<nnsee> they also offer a x86 free tier, but it's extremely weak sauce compared to the ARM offering
11:07:05FromDiscord<kingterrytheterrible12> In reply to @sys64 "Is it paid?": Off
11:07:09FromDiscord<kingterrytheterrible12> (edit) "Off" => "Ofc"
11:09:26FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "and make sure you": Where can I choose that?↵I selected Amsterdam
11:09:47FromDiscord<nnsee> i can't exactly remember if it was during registration or after that
11:10:08FromDiscord<nnsee> but basically you search for "compute" in the cloud web panel and set up a new compute instance with those parameters
11:11:11FromDiscord<System64 ~ Flandre Scarlet> Can débit cards work?
11:11:30FromDiscord<nnsee> maybe ¯\_(ツ)_/¯
11:11:38FromDiscord<odexine> I’ll say unlikely
11:11:46FromDiscord<odexine> Free things usually don’t accept debit cards
11:11:54FromDiscord<odexine> In my experience
11:12:03FromDiscord<nnsee> i'm not sure if i even had a credit card back when i registered
11:12:03FromDiscord<kingterrytheterrible12> In reply to @odexine "Free things usually don’t": They have to
11:12:14FromDiscord<kingterrytheterrible12> So when you ddos they can arrest you
11:12:37FromDiscord<System64 ~ Flandre Scarlet> My card isn't even visa so I'm screwed!
11:12:43FromDiscord<nnsee> oof
11:13:38FromDiscord<System64 ~ Flandre Scarlet> Well I'll have to host at home then
11:13:52FromDiscord<odexine> In reply to @kingterrytheterrible12 "They have to": No they don’t, they could just limit it to credit cards no?
11:13:53FromDiscord<kingterrytheterrible12> Use a paid service
11:14:01FromDiscord<kingterrytheterrible12> Nothing is free in life
11:14:41FromDiscord<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:53FromDiscord<kingterrytheterrible12> In reply to @sys64 "Problem is 1 it's": So
11:14:56FromDiscord<kingterrytheterrible12> Pay for it
11:15:06FromDiscord<kingterrytheterrible12> Or buy a server for 1000 dollars
11:15:22FromDiscord<kingterrytheterrible12> Or if your load is not so high make a raspberry pi cluster
11:15:26FromDiscord<kingterrytheterrible12> Or orange pi cluster
11:16:15FromDiscord<Chronos [She/Her]> What's the difference with orange pis? Are they even any good compared to an RPI?
11:16:15FromDiscord<System64 ~ Flandre Scarlet> I have a raspberry at home, can work
11:16:22FromDiscord<odexine> I doubt load will be high enough to matter, self host is fine
11:16:41FromDiscord<System64 ~ Flandre Scarlet> It's just a school projet so yeah
11:16:45FromDiscord<Chronos [She/Her]> Also clusters only give benefits with applications that have multiprocessing
11:16:50FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "What's the difference with": China raspberry pi basically
11:17:22FromDiscord<kingterrytheterrible12> And yes they are good
11:17:43FromDiscord<kingterrytheterrible12> Raspberry pi is open source so china made a clone of it
11:18:16FromDiscord<nnsee> i've found used PCs to be much better bang for buck for server machines
11:18:54FromDiscord<kingterrytheterrible12> In reply to @nnsee "i've found used PCs": no
11:19:02FromDiscord<kingterrytheterrible12> Unless you have like 3 concurrent users
11:19:05FromDiscord<kingterrytheterrible12> It aint gonna work
11:19:29FromDiscord<Chronos [She/Her]> In reply to @nnsee "i've found used PCs": Not great for the electricity bill tho lol
11:19:45FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Not great for the": Bro pcs dont use much electricity
11:19:57FromDiscord<kingterrytheterrible12> Compared to your air conditioner it uses nothing
11:20:18FromDiscord<nnsee> In reply to @chronos.vitaqua "Not great for the": it's pretty negligible
11:20:20FromDiscord<System64 ~ Flandre Scarlet> Any Linux OS for servering?
11:20:26FromDiscord<kingterrytheterrible12> In reply to @sys64 "Any Linux OS for": Debian
11:20:28FromDiscord<nnsee> debian is fine
11:20:38FromDiscord<kingterrytheterrible12> As long as it isnt ubuntu
11:21:18FromDiscord<kingterrytheterrible12> Even arch works too
11:21:21FromDiscord<Chronos [She/Her]> In reply to @nnsee "it's pretty negligible": Hm
11:21:36FromDiscord<System64 ~ Flandre Scarlet> In reply to @kingterrytheterrible12 "As long as it": Ubuntu bad ?
11:21:43FromDiscord<nnsee> ubuntu is also _fine_, I've just found that the company behind it generally doesn't make the best decisions
11:21:43FromDiscord<kingterrytheterrible12> In reply to @sys64 "Ubuntu bad ?": Ye for servers
11:21:59FromDiscord<nnsee> i used ubuntu for my servers for years and it worked absolutely fine
11:22:06FromDiscord<kingterrytheterrible12> Until it doesnt
11:22:12FromDiscord<kingterrytheterrible12> And suddenly you have downtime
11:22:24FromDiscord<nnsee> had 0 downtime related to me running ubuntu
11:22:36FromDiscord<kingterrytheterrible12> For how many years
11:22:57FromDiscord<nnsee> server was up for 4 consecutive years
11:23:02FromDiscord<nnsee> have the uptime screenshot somewhere
11:23:14FromDiscord<kingterrytheterrible12> Fair enough
11:23:26FromDiscord<nnsee> in fact I'd say I had less downtime with Ubuntu than with Debian because ubuntu had livepatch
11:23:39FromDiscord<System64 ~ Flandre Scarlet> I can use noIp.com as dynDNS
11:23:48FromDiscord<kingterrytheterrible12> Just use cloudflare
11:23:57FromDiscord<System64 ~ Flandre Scarlet> It's paid too I think
11:24:04FromDiscord<kingterrytheterrible12> is it?
11:24:53FromDiscord<System64 ~ Flandre Scarlet> No idea
11:28:55FromDiscord<nnsee> In reply to @sys64 "I can use noIp.com": maybe have a look at https://www.duckdns.org/
11:30:07FromDiscord<System64 ~ Flandre Scarlet> Oh it's dyndns, I'll have a look!
11:30:19FromDiscord<System64 ~ Flandre Scarlet> Oof↵50ms is like 20fps
11:34:10FromDiscord<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:02FromDiscord<taperfade> i want to ask something but im kinda like
12:06:03FromDiscord<taperfade> bad
12:06:09FromDiscord<taperfade> so i will make something
12:10:42FromDiscord<taperfade> is this possible https://media.discordapp.net/attachments/371759389889003532/1149678195990335579/image.png
12:10:52FromDiscord<taperfade> jumping to random lines in code
12:10:53FromDiscord<taperfade> or
12:10:54FromDiscord<odexine> what in the hell
12:10:57FromDiscord<odexine> no
12:11:01FromDiscord<odexine> you cant goto in nim
12:11:18FromDiscord<taperfade> damn
12:11:25FromDiscord<taperfade> my funny project wont work
12:11:41FromDiscord<taperfade> i want to do something like erm
12:11:46FromDiscord<taperfade> you enter a word
12:11:59FromDiscord<taperfade> it outputs a random int
12:12:02FromDiscord<odexine> you dont need to hide it if its still the keylogger
12:12:11FromDiscord<taperfade> then it waits for your input again
12:12:23FromDiscord<taperfade> In reply to @odexine "you dont need to": i swear it isnt one
12:12:23FromDiscord<odexine> that just sounds like a regulra loop
12:12:44FromDiscord<odexine> In reply to @taperfade "i swear it isnt": most people wouldnt trust you even if you said that
12:12:48FromDiscord<taperfade> damn
12:12:51FromDiscord<taperfade> will you ?
12:12:55*edr joined #nim
12:13:03FromDiscord<odexine> i personally dont mind
12:15:41*lumo_e quit (Ping timeout: 246 seconds)
12:15:50*lumo_e joined #nim
12:15:58FromDiscord<odexine> so about what you wanted to achieve
12:16:13FromDiscord<taperfade> does this work ? https://media.discordapp.net/attachments/371759389889003532/1149679582442684486/image.png
12:16:29FromDiscord<odexine> if its to the same line, that just sounds like a loop
12:16:30FromDiscord<taperfade> it would exit that loop if the input was smth like exit
12:16:40FromDiscord<taperfade> yay
12:17:35*jmdaemon quit (Ping timeout: 258 seconds)
12:17:44FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4FIc
12:17:58FromDiscord<odexine> (edit) "https://play.nim-lang.org/#ix=4FIc" => "https://play.nim-lang.org/#ix=4FId"
12:18:51FromDiscord<taperfade> i made a funny little thing
12:18:58FromDiscord<taperfade> now i know arrays :3
12:19:06FromDiscord<taperfade> bcs i was like
12:19:16FromDiscord<taperfade> i could spam if statements
12:19:20FromDiscord<taperfade> or i could be smart
12:19:36FromDiscord<taperfade> now i wna try to add output lines
12:19:55FromDiscord<taperfade> but it says the amount of stuff a array can hold is constant and cant be changed
12:20:08FromDiscord<taperfade> very sad
12:21:02FromDiscord<odexine> sequences
12:21:14FromDiscord<odexine> i need to go
12:40:30*lumo_e quit (Ping timeout: 255 seconds)
12:44:38FromDiscord<.maverk> hello people
13:03:39FromDiscord<kingterrytheterrible12> In reply to @odexine "you cant goto in": yes you fucking can
13:03:50FromDiscord<kingterrytheterrible12> there are macros that manipulate AST
13:03:55FromDiscord<kingterrytheterrible12> you can make your own goto
13:04:04FromDiscord<odexine> That is not exactly goto in the traditional sense
13:04:25FromDiscord<kingterrytheterrible12> how bout you goto some bitches
13:04:32FromDiscord<odexine> Lol
13:04:44FromDiscord<kingterrytheterrible12> but yeah i dont think there is anything preventing you from making goto in macros
13:04:51FromDiscord<kingterrytheterrible12> its gonna be a nightmare to debug LOL
13:05:04FromDiscord<odexine> Go to in the first place is a nightmare to debug
13:05:15FromDiscord<kingterrytheterrible12> In reply to @odexine "Go to in the": its used everywhere in linux kernel
13:05:26FromDiscord<odexine> In a controlled manner
13:05:29FromDiscord<kingterrytheterrible12> yesd
13:05:30FromDiscord<kingterrytheterrible12> (edit) "yesd" => "yes"
13:05:31FromDiscord<kingterrytheterrible12> so
13:06:58FromDiscord<ieltan> it's not goto in the traditional sense but you can use the `{.goto.}` if you need state machine like semantics
13:07:30FromDiscord<ieltan> and `{.computedGoto.}` if you're cooking something like an interpreter
13:07:51FromDiscord<ieltan> (or `cps` if you really want labeled gotos)
13:08:00FromDiscord<ieltan> but it's still not goto like in c though
13:09:50FromDiscord<ieltan> In reply to @kingterrytheterrible12 "its used everywhere in": it's used for cleaning up memory or error handling right ?
13:10:05FromDiscord<ieltan> just use what nim gives you instead, it's 10000x better
13:12:45FromDiscord<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:25FromDiscord<odexine> I think you can, I remember seeing discussion about being able to
13:14:35FromDiscord<odexine> But if you tried and you can’t then I guess you can’t
13:16:09FromDiscord<frobnicate> sent a code paste, see https://play.nim-lang.org/#ix=4FIv
13:17:06FromDiscord<frobnicate> It will say something like `Expression: destroy(window)↵ [1] window: proc (event`gensym207: Event): WindowEventPtr{.noSideEffect, gcsafe.}`
13:17:34FromDiscord<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:32FromDiscord<.maverk> does nim support annonymous functions ?
13:37:19FromDiscord<kingterrytheterrible12> In reply to @.maverk "does nim support annonymous": like lambdas?
13:37:30FromDiscord<.maverk> In reply to @kingterrytheterrible12 "like lambdas?": yes
13:37:58FromDiscord<kingterrytheterrible12> i think so yes
13:38:27FromDiscord<.maverk> with ``proc`` or there is a keyword for that ?
13:41:56FromDiscord<kingterrytheterrible12> In reply to @.maverk "yes": i cant find anything on it
13:43:27FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4FIJ
13:43:56FromDiscord<taperfade> tomorrow i will make my first muahahaha-ware
13:45:27ormirethttps://nim-lang.org/docs/sugar.html#%3D%3E.m%2Cuntyped%2Cuntyped
13:45:50FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4FIL
13:49:43FromDiscord<taperfade> is there a way to add elements to a array
13:50:35FromDiscord<kingterrytheterrible12> ....
13:50:36FromDiscord<kingterrytheterrible12> ........
13:50:39FromDiscord<kingterrytheterrible12> ...........
13:50:43FromDiscord<_nenc> use seq
13:50:43FromDiscord<_nenc> array have fixed length
13:50:50FromDiscord<kingterrytheterrible12> or add them by index
13:51:14FromDiscord<kingterrytheterrible12> ye bro you gotta start learning basic programming @taperfade
13:53:28FromDiscord<taperfade> In reply to @kingterrytheterrible12 "ye bro you gotta": nah
13:53:37FromDiscord<taperfade> i learn stuff by doing outrageous things
13:54:04FromDiscord<taperfade> and picking up stuff while trying to do i
13:54:05FromDiscord<taperfade> it
13:54:13FromDiscord<taperfade> :3
13:54:17PMunchA small quite technical article to tide you over the weekend: https://peterme.net/teaching-old-c-code-new-tricks-with-nim.html
13:54:44PMunch.maverk, you can do it with `proc` or have a look at the `sugar` module (or did it get renamed to `future`)
13:54:47FromDiscord<taperfade> pmunch why don u use discord
13:55:03FromDiscord<pmunch> What do you mean?
13:55:28FromDiscord<_nenc> wow, you load discord so fast (just joke
13:55:41FromDiscord<taperfade> why do u use irc
13:55:53FromDiscord<pmunch> IRC?
13:55:59FromDiscord<kingterrytheterrible12> he is on everywhere
13:56:03FromDiscord<kingterrytheterrible12> irc matrix discord
13:56:05FromDiscord<taperfade> matrix too
13:56:09FromDiscord<kingterrytheterrible12> look @pmunch there is discord
13:56:10FromDiscord<kingterrytheterrible12> xd
13:56:17FromDiscord<taperfade> yeah but why are u on irc that often
13:56:21FromDiscord<taperfade> or like only
13:56:23FromDiscord<taperfade> on irc
13:56:32FromDiscord<kingterrytheterrible12> In reply to @taperfade "yeah but why are": bro you dont know pmunch
13:56:36FromDiscord<kingterrytheterrible12> this is THE pmunch
13:56:40FromDiscord<kingterrytheterrible12> he is the legend on nim
13:56:42FromDiscord<taperfade> who is pmunch
13:56:55FromDiscord<kingterrytheterrible12> https://github.com/PMunch
13:57:03FromDiscord<kingterrytheterrible12> his libs frequently saved my ass
13:57:10FromDiscord<taperfade> In reply to @kingterrytheterrible12 "ye bro you gotta": i made a keylogger and calculator in python and then started with nim
13:57:23FromDiscord<taperfade> sorry that i havent memorized every single thing
13:57:28FromDiscord<taperfade> like sequ
13:57:30FromDiscord<taperfade> stuff
13:57:39FromDiscord<taperfade> 🙄
13:57:40FromDiscord<taperfade> nerd
13:57:50FromDiscord<taperfade> wow https://media.discordapp.net/attachments/371759389889003532/1149705152262049862/image.png
13:57:56FromDiscord<kingterrytheterrible12> also in your keylogger
13:58:06FromDiscord<taperfade> hm
13:58:07FromDiscord<kingterrytheterrible12> why dont you send ascii characters then decode there
13:58:14FromDiscord<_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:25FromDiscord<kingterrytheterrible12> damn
13:58:30FromDiscord<taperfade> ily nenc
13:58:39FromDiscord<taperfade> babypoo were in this together
13:58:47FromDiscord<taperfade> yeah also i never did anything with c
13:58:59FromDiscord<taperfade> but i made something rlly complex called meowsay
13:59:14FromDiscord<kingterrytheterrible12> meowsay
13:59:58FromDiscord<taperfade> https://github.com/senzur/meowsay
14:00:11FromDiscord<kingterrytheterrible12> bruh
14:00:38FromDiscord<kingterrytheterrible12> https://media.discordapp.net/attachments/371759389889003532/1149705860344463390/image.png
14:01:08FromDiscord<taperfade> wtf
14:01:14FromDiscord<taperfade> they stole my idea and made cowsay
14:01:31FromDiscord<taperfade> also pop os
14:01:35FromDiscord<kingterrytheterrible12> this was made probably before when you was born
14:01:37FromDiscord<taperfade> i use debian
14:01:43FromDiscord<kingterrytheterrible12> idgaf
14:01:49FromDiscord<taperfade> yea u should
14:01:53FromDiscord<taperfade> im better
14:01:55FromDiscord<taperfade> smarter
14:01:56FromDiscord<kingterrytheterrible12> ok
14:01:58FromDiscord<kingterrytheterrible12> comr
14:02:03FromDiscord<kingterrytheterrible12> (edit) "comr" => "cope"
14:02:03FromDiscord<taperfade> comr
14:02:07FromDiscord<taperfade> cope
14:02:12FromDiscord<kingterrytheterrible12> its hard to type with 1 hand
14:02:18FromDiscord<taperfade> weirdo
14:02:21FromDiscord<kingterrytheterrible12> bro
14:02:28FromDiscord<kingterrytheterrible12> i vaping with other hand
14:02:38FromDiscord<taperfade> cringe
14:02:49FromDiscord<taperfade> real ppl dont vape
14:02:53FromDiscord<kingterrytheterrible12> ok
14:02:58FromDiscord<taperfade> ur fake rn
14:02:59FromDiscord<kingterrytheterrible12> its better than smoking
14:03:00FromDiscord<taperfade> cringe
14:03:06FromDiscord<taperfade> try carts
14:03:10FromDiscord<taperfade> muahahahahaha
14:04:42PMunchOh kingterrytheterrible12, you're gonna make me blush :P
14:04:57PMunchBut to answer the question, I just prefer IRC
14:05:10FromDiscord<taperfade> i feel like ur a nerd
14:05:21FromDiscord<kingterrytheterrible12> he is married
14:05:22*ntat joined #nim
14:05:25FromDiscord<taperfade> no way
14:05:31PMunchThe 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:37PMunchWait, I am?
14:05:44FromDiscord<kingterrytheterrible12> now you are 😈
14:05:57PMunchI think I have to go home and tell my girlfriend..
14:06:04FromDiscord<taperfade> nerd married and dementia
14:06:07FromDiscord<kingterrytheterrible12> come on she doesnt have to know
14:06:09FromDiscord<taperfade> w combo
14:06:12FromDiscord<kingterrytheterrible12> what she doesnt know isnt here problem
14:06:17FromDiscord<kingterrytheterrible12> (edit) "here" => "her"
14:06:27*PMunch quit (Quit: Leaving)
14:08:04FromDiscord<kingterrytheterrible12> https://youtu.be/BsnCpESUEqM?t=221
14:08:15FromDiscord<kingterrytheterrible12> does anyone know whats this plugin called?
14:10:36FromDiscord<taperfade> this server is so cool
14:10:49FromDiscord<taperfade> me someone that doesnt know what a sequ is
14:11:03FromDiscord<taperfade> talking to ppl that are so smart
14:11:17FromDiscord<kingterrytheterrible12> we all stupid here
14:11:20FromDiscord<kingterrytheterrible12> maybe araq isnt
14:11:21FromDiscord<taperfade> nooo
14:11:27FromDiscord<taperfade> u all r smart
14:11:28FromDiscord<taperfade> im dum
14:11:30FromDiscord<taperfade> tbh
14:11:32FromDiscord<taperfade> :(
14:11:36FromDiscord<kingterrytheterrible12> no you just need to learn
14:11:45FromDiscord<kingterrytheterrible12> bro i started like you at some point
14:11:45FromDiscord<taperfade> guh
14:11:53FromDiscord<kingterrytheterrible12> now i can say im alright at programming
14:11:54FromDiscord<taperfade> when did u start
14:11:59FromDiscord<kingterrytheterrible12> when i was 17
14:12:01FromDiscord<kingterrytheterrible12> now im 20
14:12:05FromDiscord<taperfade> wowzers
14:13:57FromDiscord<kingterrytheterrible12> i think im just gonna learn zig
14:13:59FromDiscord<kingterrytheterrible12> as a safer C
14:14:14FromDiscord<.maverk> zig is really hard
14:14:26FromDiscord<.maverk> you know what ``comptime`` is ?
14:14:33FromDiscord<kingterrytheterrible12> In reply to @.maverk "you know what ``comptime``": compile time yes
14:14:39FromDiscord<kingterrytheterrible12> like constexpr in C++
14:14:56FromDiscord<.maverk> yeah
14:15:35FromDiscord<.maverk> is the spaceship necessary to use ?
14:16:23FromDiscord<kingterrytheterrible12> what
14:16:40FromDiscord<taperfade> live love nim
14:16:57FromDiscord<kingterrytheterrible12> yeah nim is good
14:17:01FromDiscord<kingterrytheterrible12> until you want no GC
14:23:55FromDiscord<m4ul3r> nim's none memory management has been good to me when i've needed to nuke gc on some embedded work
14:39:11FromDiscord<catnowblue> sent a code paste, see https://play.nim-lang.org/#ix=4FIW
14:39:21FromDiscord<Chronos [She/Her]> In reply to @m4ul3r "nim's none memory management": Oh? Is arc not suitable for embedded work?
14:39:22FromDiscord<catnowblue> (edit) "https://play.nim-lang.org/#ix=4FIW" => "https://play.nim-lang.org/#ix=4FIX"
14:40:02FromDiscord<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:13FromDiscord<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:19FromDiscord<Chronos [She/Her]> In reply to @m4ul3r "arc is super suitable,": Ah fair
14:40:59FromDiscord<odexine> In reply to @chronos.vitaqua "Does it give any": Token is probably a sequence
14:41:11FromDiscord<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:25FromDiscord<.maverk> i want to tell ``assert`` to check variables at compile time how ?
14:41:26FromDiscord<catnowblue> could be the value being a sequence instead of string
14:41:39FromDiscord<.maverk> assert is checking at run-time only
14:42:29FromDiscord<odexine> In reply to @.maverk "i want to tell": Are the variables also compile time
14:42:49FromDiscord<.maverk> In reply to @odexine "Are the variables also": i am not sure
14:42:54FromDiscord<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:45FromDiscord<.maverk> oky i could fix it
14:44:58FromDiscord<.maverk> i found a way how to do it
14:45:23FromDiscord<catnowblue> In reply to @catnowblue "could be the value": so is there any solutions?
14:46:11FromDiscord<Chronos [She/Her]> In reply to @catnowblue "so is there any": We'd need more code tbh
14:46:15FromDiscord<Chronos [She/Her]> Can't really see the issue
14:46:23FromDiscord<Chronos [She/Her]> Where is `token` defined
14:46:37FromDiscord<catnowblue> it's... stored in .env
14:47:02FromDiscord<catnowblue> https://media.discordapp.net/attachments/371759389889003532/1149717537341329428/image.png
14:47:30FromDiscord<catnowblue> and the token is string, not a sequence
14:49:48FromDiscord<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:57FromDiscord<Chronos [She/Her]> Hm
14:49:59FromDiscord<catnowblue> I don't know how http headers in http client works
14:50:10FromDiscord<Chronos [She/Her]> I'm not sure then, sorry
14:50:55FromDiscord<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:13FromDiscord<Chronos [She/Her]> Hm
15:03:40FromDiscord<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:18FromDiscord<odexine> In reply to @chronos.vitaqua "I have a question:": is there a problem with that
15:08:14FromDiscord<odexine> i think the problem is that your token is probably wrong
15:10:56FromDiscord<catnowblue> In reply to @odexine "i think the problem": my token is fine, I implemented websocket and it runs just fine
15:12:53FromDiscord<.maverk> why am i getting this result ? https://media.discordapp.net/attachments/371759389889003532/1149724042417406012/444.PNG
15:13:23FromDiscord<odexine> In reply to @.maverk "why am i getting": cast is bitwise reinterpret. use `float64(11)`
15:13:58NimEventerNew thread by PMunch: Teaching old C code new tricks with Nim, see https://forum.nim-lang.org/t/10467
15:14:48FromDiscord<.maverk> In reply to @odexine "cast is bitwise reinterpret.": what do you mean by ``bitwise reinterpret`` ?
15:15:23FromDiscord<odexine> it's not what you want
15:16:05FromDiscord<.maverk> In reply to @odexine "it's not what you": yes but i want to understand what ``bitwise reinterpret`` is
15:16:50FromDiscord<odexine> interpret the binary for `11` of type int as a float64 instead
15:17:53FromDiscord<odexine> 11 ---int to bin--> binary ---bin to float--> the result
15:18:14FromDiscord<.maverk> aaaah
15:18:46FromDiscord<.maverk> it casts any type to another type in binary ?
15:19:17FromDiscord<odexine> it reinterprets the bits of one type into another type
15:22:32FromDiscord<.maverk> i am confused
15:22:38FromDiscord<.maverk> i get different output
15:25:45*anddam joined #nim
15:42:00FromDiscord<m4ul3r> Floats have a different binary representation than ints
15:42:25FromDiscord<m4ul3r> here's an example https://media.discordapp.net/attachments/371759389889003532/1149731475256782970/image.png
15:44:34FromDiscord<.maverk> this is python
15:44:47FromDiscord<m4ul3r> yes, but the idea translates
15:45:18FromDiscord<.maverk> i understand that ``cast`` casts from one type to another
15:45:37FromDiscord<.maverk> but when i cast floats it becomes something weird
15:45:42anddamcast from python to nim
15:46:07FromDiscord<m4ul3r> because the binary representation of the float "11" is different than the binary representation of the int "11"
15:46:39FromDiscord<.maverk> why does it work with float64 ?
15:46:51FromDiscord<Chronos [She/Her]> In reply to @odexine "is there a problem": No just wondering since it seems a bit odd
15:51:25FromDiscord<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:15NimEventerNew thread by maverk: What are the equivalent libraries to these ?, see https://forum.nim-lang.org/t/10468
15:52:19FromDiscord<m4ul3r> https://towardsdatascience.com/binary-representation-of-the-floating-point-numbers-77d7364723f1
15:54:17FromDiscord<.maverk> so it works with all types except floats ?
15:54:49FromDiscord<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:50FromDiscord<.maverk> winim is equivalet to winim ?
15:56:41FromDiscord<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:49FromDiscord<m4ul3r> In reply to @.maverk "winim is equivalet to": https://github.com/khchen/winim
16:00:01FromDiscord<.maverk> thanks
16:00:33anddamdo you know an example of a simple HTTP revproxy in nim?
16:00:45anddamakin to https://www.sipios.com/blog-tech/a-simple-reverse-proxy-in-python (speaking of python) but in nim
16:01:11FromDiscord<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:36FromDiscord<.maverk> In reply to @m4ul3r "<@1021771961040375900> here would be": may i know why you add ``&`` ?
16:10:59FromDiscord<.maverk> can you please paste the code you wrote here
16:11:26FromDiscord<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:52FromDiscord<m4ul3r> it is the same as doing `echo "int binary: " & i.toBin(64)`
16:12:07FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4FJp
16:12:14FromDiscord<.maverk> In reply to @m4ul3r "I'm using strformat, which": thank you so much man
16:18:33FromDiscord<demotomohiro> If you want to learn how bits in float works: https://en.m.wikipedia.org/wiki/IEEE_754
16:19:48FromDiscord<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:42FromDiscord<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:00FromDiscord<0ffh> In reply to @m4ul3r "https://nim-lang.org/docs/strformat.html you're rig": Ah, yes, that was it!
16:22:01FromDiscord<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:51FromDiscord<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:28FromDiscord<vindaar> In reply to @demotomohiro "If you want to": https://ciechanow.ski/exposing-floating-point/ <-- good article too
16:25:43FromDiscord<kingterrytheterrible12> In reply to @0ffh "Yeah, I also prefer": you can use `fmt`
16:26:21FromDiscord<kingterrytheterrible12> sent a code paste, see https://play.nim-lang.org/#ix=4FJy
16:38:01FromDiscord<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:20FromDiscord<kingterrytheterrible12> fmt makes more sense ngl
16:38:25FromDiscord<kingterrytheterrible12> its more redable
16:39:19FromDiscord<0ffh> In reply to @kingterrytheterrible12 "its more redable": Meh, I don't much like red anyways. 🤷‍♂️
16:42:31NimEventerNew thread by hevaf: How to properly set environment variables, see https://forum.nim-lang.org/t/10469
16:47:02FromDiscord<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:21FromDiscord<kingterrytheterrible12> fmt means format
16:47:24FromDiscord<kingterrytheterrible12> & means and
16:47:26FromDiscord<kingterrytheterrible12> makes no sense
16:47:38FromDiscord<m4ul3r> but in context infront of a string it means format
16:48:24FromDiscord<odexine> In reply to @kingterrytheterrible12 "fmt makes more sense": yes with the caveat that your string is forced to be raw
16:53:09FromDiscord<kingterrytheterrible12> In reply to @odexine "yes with the caveat": you like it raw?
16:57:36FromDiscord<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:17FromDiscord<Chronos [She/Her]> What is even needed for a choosenim alternative hm
17:04:05FromDiscord<griffith1deadly> there may be a new binding coming out soon for https://github.com/webview/webview
17:29:17FromDiscord<Schelz> sent a code paste, see https://play.nim-lang.org/#ix=4FJO
17:29:37FromDiscord<Schelz> (edit) "https://play.nim-lang.org/#ix=4FJO" => "https://play.nim-lang.org/#ix=4FJP"
17:31:46FromDiscord<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:01FromDiscord<griffith1deadly> In reply to @m4ul3r "looks like there's one": oskca - very old binding, neroist - a very different approach than this library.
17:34:12FromDiscord<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:25FromDiscord<Chronos [She/Her]> Idk what project to work on hm...
18:07:36FromDiscord<demotomohiro> In reply to @Schelz "I try do decipher": I think it is same to `cast[ptr ptr pointer](thisptr)[]`.
18:09:29FromDiscord<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:48FromDiscord<Chronos [She/Her]> There's multiple options of course but not really sure which one would be the best
18:11:57FromDiscord<Chronos [She/Her]> I'd prefer a library that's asynchronous too
18:15:26*rockcavera joined #nim
18:37:00FromDiscord<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:15FromDiscord<Phil> Other than that my personal choice would be prologue because I don't like jesters macro magic
18:37:39FromDiscord<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:59FromDiscord<Phil> Oh, also prologue has better docs than jester
18:38:04FromDiscord<Chronos [She/Her]> Fair, will look at happyX maybe
18:38:19FromDiscord<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:28NimEventerNew thread by maverk: Why float casting is not working ?, see https://forum.nim-lang.org/t/10470
19:05:58FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "What would y'all say": mummy
19:06:10FromDiscord<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:13FromDiscord<Phil> (edit) "webdev" => "#webdev"
19:07:04FromDiscord<kingterrytheterrible12> is it just me or is C++ much easier than C
19:07:19FromDiscord<kingterrytheterrible12> the oop'ness of C++ makes development so much easier
19:09:19FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "mummy": Async programming
19:09:30FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Async programming": sex
19:09:32FromDiscord<kingterrytheterrible12> (edit) "sex" => "idk"
19:09:41FromDiscord<kingterrytheterrible12> async sucks
19:09:47FromDiscord<kingterrytheterrible12> mulithreading is the wya
19:09:50FromDiscord<kingterrytheterrible12> (edit) "wya" => "way"
19:10:47FromDiscord<Chronos [She/Her]> Why does it suck?
19:11:34FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Why does it suck?": because i like to use all my server's cores
19:11:46FromDiscord<kingterrytheterrible12> or what good are they
19:20:00FromDiscord<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:18FromDiscord<leorize> you just have to use cps \:p
19:20:35FromDiscord<Phil> Sure because learning continuation passing style is such a trivial matter 😛
19:21:03FromDiscord<leorize> you can try using nim-sys \:P
19:21:04FromDiscord<Phil> I'm happy I just barely understood disrupteks description (I think it was disrupteks lib at least? I forgot)
19:21:19FromDiscord<Phil> That actually doesn't tell me anything
19:21:35FromDiscord<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:26FromDiscord<Phil> Oh lord that'd mean I'd need to know what I'm doing in regards to a webserver
19:22:39FromDiscord<leorize> yea we definitely flunked the doc for cps itself
19:22:41FromDiscord<Phil> Just put something in front of me that is fast and routes well
19:23:03FromDiscord<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:14FromDiscord<Phil> The images helped a fuckton
19:23:30FromDiscord<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:43FromDiscord<leorize> I think internal details of how cps worked is nice but we really haven&#x27;t put out some practical demos↵(@Phil)
19:25:27FromDiscord<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:02FromDiscord<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:25FromDiscord<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:37FromDiscord<Phil> (edit) "because its" => "that offset it looking"
19:26:40FromDiscord<leorize> https://github.com/disruptek/background \<- this is an application of cps that's easy to understand
19:26:52FromDiscord<.maverk> is there a difference between ``type()`` and ``typeof()`` ?
19:27:03termerleorize "yea we definitely flunked the doc for cps itself" The docs for cps are awesome
19:27:11FromDiscord<.maverk> they both produce the type of an object
19:27:12termermaybe not as formal as they should be, but the tutorials are excellent
19:27:41FromDiscord<.maverk> are you replying me ?
19:27:43*ntat quit (Quit: leaving)
19:27:49FromDiscord<leorize> they&#x27;re the same↵(@.maverk)
19:27:56FromDiscord<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:57FromDiscord<leorize> please use `typeof`, though
19:27:59FromDiscord<Chronos [She/Her]> Oh well
19:28:00termerI'm replying to an earlier comment by leorize, .maverk
19:28:15FromDiscord<.maverk> ok
19:28:23FromDiscord<.maverk> In reply to @leorize "please use `typeof`, though": ok bro thanks
19:28:23FromDiscord<leorize> that&#x27;s like, the whole premise around cps \:)↵(@Chronos [She/Her])
19:29:01FromDiscord<Chronos [She/Her]> I do not understand the lower level stuff and do not have the energy for it xD
19:29:13termerCPS makes async Nim feel like Go
19:29:32termerI don't know if you've ever used Go, but that's the easiest I can describe it
19:29:44termerunless you've used Kotlin, whose coroutines are also very similar
19:29:52FromDiscord<Chronos [She/Her]> I only very briefly used Go, is that a good thing or bad thing
19:29:57termerGood thing
19:30:04FromDiscord<Chronos [She/Her]> Hm
19:30:21FromDiscord<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:44termerCPS lets you implement coroutines/green threads
19:31:05FromDiscord<Chronos [She/Her]> What do those actually mean...? :P
19:31:06FromDiscord<Phil> Which didn't help me at all when I didn't know (and still don't know) either of those concepts 😄
19:31:39FromDiscord<leorize> you have "threads" that are fully controlled by the application
19:31:39FromDiscord<Phil> Dang should've written myself a Zettelkasten source note to link to the original repo
19:31:57FromDiscord<leorize> whether it's "async" or "real threads" is just implementation details
19:32:22FromDiscord<Chronos [She/Her]> Okay that part makes sense
19:32:26FromDiscord<Phil> https://github.com/nim-works/cps/blob/master/tutorial/README.md↵There @Chronos [She/Her] , it's pretty okay
19:32:32FromDiscord<Phil> (edit) "okay" => "decent an explainer"
19:32:35FromDiscord<Chronos [She/Her]> Wrong account lmao but thanks!
19:32:43FromDiscord<Chronos [She/Her]> I should probably leave the server on my old account
19:33:09termerI should have recorded the livestream I did where I went over the coroutines tutorial on it
19:33:21termerenough people have asked about it that it would have been useful lol
19:33:22FromDiscord<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:31termersay what
19:33:53FromDiscord<Phil> Chronos, directed at Chronos
19:34:03FromDiscord<Phil> She just said she has 2 accounts on this server with the same name ^^
19:34:05FromDiscord<leorize> a recorded demo is gonna be great
19:34:25termerI can only see names from IRC land
19:34:56FromDiscord<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:09FromDiscord<Phil> That'd be fire
19:36:05termerthat'd work
19:36:43FromDiscord<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:43termerIt's intuitive once you actually have something to do with it
19:37:51termerwhich is where you can use a lib like nim-sys
19:38:05termerthe issue is that nim-sys doesn't really have docs or examples
19:38:21FromDiscord<Chronos [She/Her]> Certainly interesting
19:38:24FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FKt
19:38:40FromDiscord<Phil> No wait... background wraps the proc?
19:38:41FromDiscord<Chronos [She/Her]> In reply to @isofruit "I'mma do coin flips": Could you perhaps kick it? :P
19:38:56FromDiscord<Chronos [She/Her]> In reply to @chronos.vitaqua "Certainly interesting": CPS, that is
19:39:07FromDiscord<Chronos [She/Her]> @Chronos [She/Her], yu.vitaqua.fer.chronos-
19:40:05FromDiscord<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:12termernot sure what "background" is
19:40:56FromDiscord<Phil> https://github.com/disruptek/background↵Leorize posted that as a CPS useage example
19:41:59FromDiscord<Phil> Ohhhhhhhh now I get it
19:42:09FromDiscord<Phil> the Function call is immediately executed and pushed onto the new thread
19:42:49FromDiscord<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:25FromDiscord<Phil> (edit) removed "executed and" | "new" => "background" | "pushed onto thebackgroundthread ... " added "and starts executing"
19:44:11FromDiscord<Phil> So that's kinda async but the syntax is far easier to look at
19:44:45FromDiscord<Phil> Wait, this is disruptek, how does the name not have to do with genitalia
19:45:25termersay what
19:45:47FromDiscord<Phil> Wasn't it disruptek that is infamous to name his libs constantly stuff like "balls"
19:45:57termeroh yeah
19:46:14FromDiscord<leorize> he have a lot more normal-sounding stuff than the contrary
19:46:25FromDiscord<Phil> The legend has been shattered
19:46:37FromDiscord<leorize> and like, testes/balls is literally the only thing with that kind of name
19:48:08FromDiscord<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:30FromDiscord<Phil> background now being the 4th
19:48:52FromDiscord<leorize> https://github.com/disruptek \<- here's the full list for you
19:48:52FromDiscord<Chronos [She/Her]> In reply to @isofruit "This is the latest": Mhm correct
19:49:39FromDiscord<leorize> he makes a lot of neat stuff, none of which are in nimble directory, of course
19:50:40FromDiscord<Chronos [She/Her]> What happened to Disruptek? Did he just move to Nimskull?
19:51:17FromDiscord<Chronos [She/Her]> He stopped talking here one day and haven't seen him since besides my brief venture into Nimskull
19:51:24FromDiscord<leorize> he got banned from the nim community
19:51:31FromDiscord<leorize> so you'll never see him here again
19:52:31FromDiscord<Chronos [She/Her]> Ah... any reason why or?
19:53:27FromDiscord<leorize> he aired his frustration with the nim core devs in, uh, not very nice words
19:53:39FromDiscord<Chronos [She/Her]> Ah rip
19:53:44FromDiscord<leorize> if you trace nim's IRC logs you will probably find the message leading to the ban
20:17:28termerthat's funnty
20:17:31termer*funny
20:18:24termerI love heated IRC arguments
20:18:42termerthey're hilarious and fun but not great for something semi-professional
20:19:11termerbeing banned over insults sucks, I empathize with disruptek LOL
20:22:48FromDiscord<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:32FromDiscord<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:56FromDiscord<leorize> from my recent-ish experience, araq and dom seemed to get to ban whenever
20:26:16FromDiscord<leorize> and like, there's no public info about how modding even works here
20:26:25termerI've heard people complain about Dom but I got into any drama or whatever so I can't say for certain
20:26:26FromDiscord<leorize> get the hammer and you're gone for good
20:26:33termerban evasion is easy
20:26:39termerjust saying
20:27:07FromDiscord<leorize> it's trivial, of course
20:27:08termerBanning and being banned is more of an ego thing than anything else in most cases
20:27:20FromDiscord<leorize> but it's a sign that the people managing the place don't want you here
20:27:22FromDiscord<leorize> so why bother
20:27:30termeryou lose your reputation, and that too yeah
20:27:37FromDiscord<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:47FromDiscord<Phil> So 🤷
20:28:14termerWhat if I called the administration retards on IRC
20:28:18termerwould I get banned
20:28:54FromDiscord<leorize> cabboose got banned w/o timeouts during some cps talks so...
20:29:01FromDiscord<leorize> can't say I trust the guidelines
20:29:04termercabboose?
20:29:32FromDiscord<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:41FromDiscord<leorize> author of https://github.com/nim-works/loony
20:29:43FromDiscord<Phil> (edit) "this" => "these"
20:29:56termerI don't dislike any of the staff by the way
20:30:03termerI just like giving this question to people to see what they say
20:30:11FromDiscord<leorize> I'm pretty much over it by now
20:30:18FromDiscord<leorize> I just don't participate much anymore
20:30:37termerI'm in here primarily to ask and answer questions
20:30:56termersince 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:00FromDiscord<Chronos [She/Her]> What is the `secretKey` and `reusePort` settings for Prologue actually do?-
20:31:11termerreusePort lets you listen on the same port over multiple threads
20:31:14FromDiscord<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:16termernot sure what secretKey is
20:31:27FromDiscord<Chronos [She/Her]> Fair, thanks Termer 07
20:31:29FromDiscord<Phil> (edit) "chill" => "chill,"
20:31:31FromDiscord<Chronos [She/Her]> o7
20:31:33termerPhil, sounds reasonable
20:33:07termerOn 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:20termermade me a bit disappointed because CPS is so slow right now
20:33:26termerslow to compile I mean
20:33:26FromDiscord<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:01FromDiscord<Phil> (edit) "than" => "then"
20:34:11termershow me your forum profile so I can ridicule your post stats
20:34:30FromDiscord<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:41termerYeah
20:34:48termerit was so close to being put into the compiler
20:34:59termerreading the graveyard of those RFCs and discussions saddens me
20:35:19FromDiscord<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:46termeroh ok, you're isofruit
20:35:57FromDiscord<Phil> So have fun, though I'll likely be sleeping either way 😛
20:37:01FromDiscord<Phil> Actually, regarding CPS and your earlier background example leorize
20:38:28FromDiscord<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:23FromDiscord<leorize> background is more or less a demo, I think it's already been succeeded by other libs
20:39:27FromDiscord<Chronos [She/Her]> TOML or JSON for config hm...
20:40:03FromDiscord<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:28FromDiscord<Phil> Oh so CPS is what makes this pseudo-waitFor possible that is returned by "background"
20:41:02FromDiscord<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:11FromDiscord<Chronos [She/Her]> Fair enough
20:41:27FromDiscord<leorize> you can comment in toml and the syntax is human-friendly for the most part
20:41:31FromDiscord<Chronos [She/Her]> I'll have to use JSON anyway for data over the web so I'll use JSON via Jsony
20:41:39FromDiscord<Phil> Okay comments is a fair point
20:42:10FromDiscord<leorize> toml appeal is quite literally ini with a spec
20:42:15FromDiscord<Chronos [She/Her]> Does Jsony support default values in the procs hm...
20:42:34FromDiscord<Chronos [She/Her]> May use TOML, still can go either way for now
20:53:39FromDiscord<.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:27FromDiscord<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:55FromDiscord<.maverk> In reply to @isofruit "You can achieve the": i will try ##
20:55:36FromDiscord<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:51FromDiscord<Phil> Nim just happens to have in-built tooling to generate HTML-pages out of those docs
20:56:11FromDiscord<.maverk> In reply to @isofruit "You can achieve the": no
20:56:14FromDiscord<.maverk> it doesn't work
20:56:27FromDiscord<.maverk> let me show you
20:56:32FromDiscord<Phil> Define "it doesn't work"↵Ah thansk
20:57:08FromDiscord<.maverk> https://media.discordapp.net/attachments/371759389889003532/1149810673619058788/331.PNG
20:57:13FromDiscord<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:16FromDiscord<.maverk> just white screen
20:57:22FromDiscord<.maverk> the text is not printed
20:57:43FromDiscord<.maverk> i think ##[]## is for making html documentation files
20:58:24FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4FKU
20:58:45FromDiscord<.maverk> i see
21:04:23FromDiscord<.maverk> In reply to @isofruit "I mean, depends on": this one can be used for both ? i mean ##
21:04:31FromDiscord<.maverk> html and normal comment ?
21:04:44FromDiscord<Phil> I think both can be used for both
21:31:35FromDiscord<.e.l.i> Is there any difference between returning nothing and returning void?
21:32:27FromDiscord<.e.l.i> (edit) "returning nothing and" => "omitting the return type or"
21:41:03FromDiscord<jviega> You can't omit the return type if you're returning anything 🙂
21:48:30FromDiscord<amjadhd> sent a code paste, see https://play.nim-lang.org/#ix=4FL5
21:52:54FromDiscord<.e.l.i> In reply to @jviega "You can't omit the": I meant if the proc doesn't return anything.
21:53:12FromDiscord<jviega> void is the same thing in that instance.
21:53:37FromDiscord<.e.l.i> I see. Then what is the use for void
21:54:01FromDiscord<jviega> It's most useful imho when using the sugar module to write compact function pointer types.
21:54:22FromDiscord<jviega> `var callback = (int, string) -> void`
21:54:35FromDiscord<jviega> (edit) "callback =" => "callback:"
21:55:15FromDiscord<jviega> Is much more readable than specifying a proc line, especially as signatures get more complex
21:56:11FromDiscord<.e.l.i> Interesting.
21:57:45*advesperacit quit ()
22:02:57NimEventerNew 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:07NimEventerNew thread by c4UlMu: Get C code output, see https://forum.nim-lang.org/t/10471
22:13:03FromDiscord<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