<< 06-09-2023 >>

00:04:45*jmdaemon quit (Ping timeout: 255 seconds)
00:20:18*jmdaemon joined #nim
00:29:34*Mister_Magister quit (*.net *.split)
00:29:34*madprops quit (*.net *.split)
00:29:34*om3ga quit (*.net *.split)
00:29:34*armin quit (*.net *.split)
00:29:46*armin joined #nim
00:29:50*madprops joined #nim
00:30:15*om3ga joined #nim
00:30:28*madprops quit (Changing host)
00:30:28*madprops joined #nim
00:30:49*Mister_Magister joined #nim
00:57:12FromDiscord<jaar23> In reply to @enthus1ast "<@614403538172379156> you can run": Yes, trying to look into this today.
01:03:08FromDiscord<sOkam! 🫐> is it possible to get the lenght of a cstring in some way?
01:04:44FromDiscord<Elegantbeef> If it's null terminated `len` exists
01:04:47FromDiscord<Elegantbeef> If it's not null terminated, nope
01:06:05FromDiscord<sOkam! 🫐> im trying to creat an opengl shader with it, and the code works for string, but for cstring it segfaults
01:07:27FromDiscord<sOkam! 🫐> this, basically:↵https://github.com/heysokam/glFB/blob/98e83c1a9f222284db8f2f6e8fd768a5c0922307/src/glFB/gl/shader.nim#L60-L69
01:11:28FromDiscord<sOkam! 🫐> oh, seems like glClearColor is failing the same. i think opengl is not being loaded
01:11:54FromDiscord<Elegantbeef> the length there isnt for the size of the shader, it's the length of the array
01:12:20FromDiscord<Elegantbeef> Ah nvm I'm wrong
01:15:44FromDiscord<sOkam! 🫐> lol I hadn't `opengl.loadExtensions()` 🙈🙈
01:15:53FromDiscord<sOkam! 🫐> my brain sometimes is just.....
01:16:30FromDiscord<Elegantbeef> Typestate apis when 😄
01:44:30FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4FtY
01:44:43FromDiscord<Elegantbeef> Nothing
01:44:50FromDiscord<sOkam! 🫐> so they are the same?
01:45:09FromDiscord<Elegantbeef> Ranges determin the start and end index for an array
01:45:13FromDiscord<Elegantbeef> 0..max is the same as `max + 1`
01:45:23FromDiscord<sOkam! 🫐> ic
01:45:30FromDiscord<sOkam! 🫐> yeah i should max-1
01:46:06FromDiscord<Elegantbeef> There is of course a different when it's a non zero start
01:46:08FromDiscord<sOkam! 🫐> or `[1..Max]` i guess 🤔↵does that work too? does the array start at 0 too?
01:46:13FromDiscord<Elegantbeef> like `array[3..5, 10]`
01:46:26FromDiscord<Elegantbeef> nope cause now the lowest index is `1`
01:46:31FromDiscord<sOkam! 🫐> kk
01:46:37FromDiscord<sOkam! 🫐> i should -1 then
01:48:21*jmdaemon quit (Ping timeout: 245 seconds)
02:42:00FromDiscord<sOkam! 🫐> is `defer` and `try` usable without exceptions in gcnone? 🤔↵i'm imagining its not, but just in case
02:42:13FromDiscord<Elegantbeef> it should be usable
02:42:24FromDiscord<sOkam! 🫐> what does it do when there are no exceptions?
02:42:24FromDiscord<Elegantbeef> `try finally` is afterall just flow control
02:42:49FromDiscord<Elegantbeef> Check if there is an exception raised, then do nothing
02:43:05FromDiscord<sOkam! 🫐> but if exceptions are not used, because they are GC'ed...
02:43:38FromDiscord<Elegantbeef> if no exception is raised nothing special happens
02:43:41FromDiscord<sOkam! 🫐> i figure i could write my own template for it, but just in case
02:44:01FromDiscord<Elegantbeef> I mean you can make your own try finally, but if you are not raising exceptions it's practically the same
02:44:38FromDiscord<sOkam! 🫐> but i could catch some custom effect, and redirect to my non-assert functions
02:44:55FromDiscord<Elegantbeef> Effects are static they are not raised
02:45:19FromDiscord<sOkam! 🫐> what does that mean? not sure i follow what static means there
02:45:30FromDiscord<Elegantbeef> An effect is extra type information
02:45:38FromDiscord<sOkam! 🫐> ah
02:45:41FromDiscord<Elegantbeef> Something cannot 'raise' a tag
02:45:53FromDiscord<Elegantbeef> You can only statically allow or disallow procedures with a given tag
03:16:24*jmdaemon joined #nim
03:58:48NimEventerNew thread by nnahito: Is it possible to use the haggling face model in the Nim language?, see https://forum.nim-lang.org/t/10462
04:56:30*ntat joined #nim
05:14:47NimEventerNew question by Flare: Type mismatch when setting table value, see https://stackoverflow.com/questions/77049156/type-mismatch-when-setting-table-value
05:15:59FromDiscord<sOkam! 🫐> Is the example at @ https://nim-lang.org/docs/destructors.html#motivating-example usable for any arbitrary type, such that customly allocated types could be integrated with arc/orc by doing explicit memory management in there?↵Or is it just a mockup example of how the underlying tech works for the GC?
05:18:13FromDiscord<Elegantbeef> Yes the point of the example is to show how to implement hooks for your own types
05:18:36FromDiscord<sOkam! 🫐> damn thats powerful
05:19:00FromDiscord<Elegantbeef> Repeat after me "--mm\:none, is pointless"
05:21:41FromDiscord<sOkam! 🫐> Repeat after me "fun learning is not pointless"
05:23:32FromDiscord<Elegantbeef> I mean you can do all the same as you're doing but just use arc and not have to manually call your free/copy/move
05:24:39FromDiscord<sOkam! 🫐> except where is the learning in that
05:25:02FromDiscord<Elegantbeef> You learn memory management and move semantics for custom types inside Nim
05:25:18FromDiscord<sOkam! 🫐> you can do the same as C malloc/free of char by using `std::string` and `std::vector`... yet... you learn nothing by using them
05:26:07FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "You learn memory management": i can see the benefit of integrating custom types with the gc. but i see that as gc:none driven development, not the other way around 🤷‍♂️
05:26:10*advesperacit joined #nim
05:26:22FromDiscord<sOkam! 🫐> (for this learning, i mean)
05:26:24FromDiscord<odexine> what is "gc:none driven development"
05:26:49FromDiscord<Elegantbeef> You learn the exact same things as no memory management if you build your own types with arc
05:26:56FromDiscord<sOkam! 🫐> basically writing manually managed types, that you then create an interface with hooks so that arc/orc can do what you manually do to the types
05:27:11FromDiscord<sOkam! 🫐> instead of writing with hooks for arc directly
05:27:14FromDiscord<odexine> why not just skip the middleman
05:27:19FromDiscord<sOkam! 🫐> so no manual interface at all
05:27:26FromDiscord<odexine> what difference is there to the approaches yeah
05:27:39FromDiscord<sOkam! 🫐> In reply to @odexine "why not just skip": because the middleman is handholding you, and you learn more by doing it manually
05:27:49FromDiscord<sOkam! 🫐> and then implementing the api
05:27:56FromDiscord<Elegantbeef> I mean it's not hand holding you really
05:28:05FromDiscord<sOkam! 🫐> than working with the api directly, leaving you without the manual part
05:28:21FromDiscord<odexine> i would think that you go through the same process even if you dont do it manually
05:28:25FromDiscord<Elegantbeef> If you make a sequence in Nim without a custom copyhook and want to treat it like a value type you'll get double frees
05:28:33FromDiscord<sOkam! 🫐> again, this is just for fun, so i see you guys point. i wouldn't do this for serious stuff, its just for casual learning
05:28:51FromDiscord<sOkam! 🫐> i do believe wholeheartedly in orc being my main target, this is just for learning
05:29:10FromDiscord<odexine> well as long as this is code that you're not shipping who cares what you do with it
05:29:14FromDiscord<Elegantbeef> Everything you learn from doing C style Nim you get inside Arc custom types cause it's quite literally C style Nim
05:29:18FromDiscord<sOkam! 🫐> exactly
05:29:27FromDiscord<Elegantbeef> I was just joshing you with my response
05:29:52FromDiscord<sOkam! 🫐> whats different between arc/orc though, in this context
05:30:01FromDiscord<sOkam! 🫐> like doesn't arc also do almost everything orc does?
05:30:08FromDiscord<Elegantbeef> You wouldnt write a `=trace` and would have to handle cycle collection yourself
05:30:24FromDiscord<Elegantbeef> Arc really doesnt do anything if you're writing your own hooks
05:30:33FromDiscord<odexine> who is josh and why are you using them
05:30:37FromDiscord<Elegantbeef> So to say it's handle holding is an overstatement
05:30:38FromDiscord<odexine> :baqua:
05:31:04FromDiscord<sOkam! 🫐> doesn't arc call the hooks when it has to?
05:31:25FromDiscord<sOkam! 🫐> like if the type goes out of scope, isn't arc there to free the memory with the hooks?
05:31:31FromDiscord<sOkam! 🫐> even if you wrote them, it still does the cleaning, right?
05:31:35FromDiscord<arathanis> i think orc and arc are equivalent but orc has a cycle collector so it periodically can check for recursive references and free orphaned cyclic reference graphs
05:31:49FromDiscord<Elegantbeef> Right, but I wouldnt declare that's hand holdy
05:31:49FromDiscord<arathanis> arc does not do that, but you can build the logic into your own hooks to handle it
05:32:08FromDiscord<Elegantbeef> Given you need to write the hooks yourself, you're actively doing the same thing as inside 'C style' code
05:32:17FromDiscord<arathanis> thats how i understood it at least, orc is just arc + cycle collector
05:32:35FromDiscord<sOkam! 🫐> well its holding your hand more than none, where you have to learn the patterns of writing with that in mind↵compared to just forgetting about it and let arc do the dirty bookkeeping
05:32:46FromDiscord<arathanis> lets you freely make cyclic references without leaks
05:33:32FromDiscord<sOkam! 🫐> whats the trace hook for, btw?
05:33:42FromDiscord<Elegantbeef> Orc
05:33:56FromDiscord<sOkam! 🫐> yeah but the purpose of it, what does it do
05:33:57FromDiscord<Elegantbeef> It's used for handling cyclical types
05:34:06FromDiscord<sOkam! 🫐> its going a bit over my head, in obtuse sokam way
05:34:26FromDiscord<sOkam! 🫐> yeah i get that much, but how does it do it?
05:34:41FromDiscord<Elegantbeef> You call the underlying `=trace` that actually does something if it's `ref`
05:34:55FromDiscord<Elegantbeef> Otherwise it's your own implementation which should be empty if it's not gc'd
05:35:51FromDiscord<Elegantbeef> Basically if the type isn't cyclical and not a container you'll never need trace
05:36:13FromDiscord<sOkam! 🫐> lets say you have a node that can contain itself as a type. that's a cycle, right?
05:36:17FromDiscord<sOkam! 🫐> what does trace do to that type?
05:36:19FromDiscord<Elegantbeef> Yes
05:36:36FromDiscord<Elegantbeef> Again it's an internal proc that's only implemented for the `ref` types
05:36:51FromDiscord<Elegantbeef> So it's only used in the mark and sweep algorithim
05:37:03FromDiscord<Elegantbeef> I do not know what it actually does, cause it's an implementation detail
05:37:13FromDiscord<sOkam! 🫐> ic
05:39:40*tiorock joined #nim
05:39:40*tiorock quit (Changing host)
05:39:40*tiorock joined #nim
05:39:40*rockcavera quit (Killed (iridium.libera.chat (Nickname regained by services)))
05:39:40*tiorock is now known as rockcavera
05:39:49FromDiscord<arathanis> I expect under the hood nim does magic with the env pointer in `=trace` that lets it keep track of traced memory addresses so it can see something is cyclic when during the tracing pass it encounters the same memory address twice
05:40:22FromDiscord<arathanis> then it can mark a cycle there so the cycle collector can collect that memory automatically if it ever becomes an orphaned reference graph
06:23:06*azimut joined #nim
06:36:51*PMunch joined #nim
07:08:43*ntat quit (Quit: leaving)
07:19:28NimEventerNew Nimble package! crockfordb32 - A simple implementation of Crockford Base32., see https://github.com/Yu-Vitaqua-fer-Chronos/Crockford-Base32-Nim
07:20:58FromDiscord<Chronos [She/Her]> Just renamed it aha but thanks!
07:43:47NimEventerNew thread by kittekat: Select version of documentation, see https://forum.nim-lang.org/t/10463
08:31:29*rockcavera quit (Remote host closed the connection)
08:37:12*krux02 quit (Remote host closed the connection)
08:46:19FromDiscord<System64 ~ Flandre Scarlet> Why encoding to base 32 or base 64? It takes more space, no?
08:47:17PMunchHmm, this might be a very dumb idea, but I wonder if it's possible to monitor the stderr of the current program
08:47:43PMunchMAPM doesn't really have any error handling facility, it writes to stderr and just returns a valid number 0
08:47:59PMunchSo I kinda want to intercept stderr and turn those messages into exceptions
09:01:06PMunchHmm, probably easier to just replace that file before I build the library..
09:09:32PMunchRight, so I managed to find a pretty hacky way to achieve this
09:09:50PMunchUsing the linkers `--wrap` command to wrap the call from the library
09:10:19PMunchOf course the compiler could've inlined calls to this function, so it still might call it..
09:14:08*ntat joined #nim
09:14:40*ntat quit (Client Quit)
09:24:50FromDiscord<Chronos [She/Her]> In reply to @sys64 "Why encoding to base": Base32 is URL-safe for one
09:25:14FromDiscord<Chronos [She/Her]> Also I did base32 bc of ULID's ID format too (which is base32)
09:26:27FromDiscord<Chronos [She/Her]> https://github.com/Yu-Vitaqua-fer-Chronos/NULID is the library
09:53:48FromDiscord<toma400> sent a code paste, see https://play.nim-lang.org/#ix=4FvT
09:55:46FromDiscord<odexine> for i in i_list.mitems:
10:10:29FromDiscord<toma400> In reply to @odexine "for i in i_list.mitems:": Thank you so much ❤️
10:24:03FromDiscord<jaar23> In reply to @enthus1ast "<@614403538172379156> you can run": yea, it magically fixed today, the single core machine run successfully, didn't make any code change but provison a new nanonode from linode... ↵weird environment.
10:24:44FromDiscord<jaar23> and yes, single core running multi thread has no problem at all. just that performance is not really that good.
10:31:56PMunchjaar23, it could also just be a race condition..
10:32:16PMunchIf you don't change anything but things suddenly start working it's time to get suspicious
10:58:37FromDiscord<jaar23> In reply to @PMunch "<@614403538172379156>, it could also": hmm, there is possibility for race condition. the only problem is only happens on a lower end machine (1 cpu 1gb ram). have to troubleshoot there and find out..
11:01:35FromDiscord<jaar23> i don't believe in magic either, but want to find out the piece that causing it 🤔
11:15:03*blop quit (Read error: Connection reset by peer)
11:15:03*azimut quit (Write error: Connection reset by peer)
11:15:32*blop_ joined #nim
11:15:36*azimut joined #nim
11:23:30PMunchHmm, I don't think my GC hooks are quite right still..
11:23:52PMunchTried to replace floats with Mapm in my rather complex calculator application. And I get the strangest errors..
11:28:47FromDiscord<enthus1ast> i mean, your client handling threads seem not to do much work, they mostly wait for io↵(@jaar23)
11:30:44FromDiscord<enthus1ast> is it better than url encode?↵(@Chronos [She/Her])
11:30:58FromDiscord<enthus1ast> at least url encode is still readable by humans
11:33:49FromDiscord<kingterrytheterrible12> How to detect memory leak with nim orc gc
11:35:23PMunchvalgrind and --useMalloc
11:35:24FromDiscord<enthus1ast> maybe with valgrind's memcheck
12:15:07FromDiscord<odexine> In reply to @enthus1ast "is it better than": Base 64 is better if your data isn’t human readable (binary)
12:24:44*ntat joined #nim
12:47:40FromDiscord<vindaar> also check out `heaptrack` https://github.com/KDE/heaptrack if valgrind is too slow. Has come in handy for me multiple times lately↵(@kingterrytheterrible12)
12:49:34FromDiscord<kingterrytheterrible12> In reply to @vindaar "also check out `heaptrack`": Will do
12:49:37FromDiscord<kingterrytheterrible12> Thank you all
12:51:54*blop_ quit (Remote host closed the connection)
12:52:24*blop_ joined #nim
13:00:19*lumo_e joined #nim
13:14:12FromDiscord<enthus1ast> @odexine\: i meant base32
13:19:25FromDiscord<odexine> In reply to @enthus1ast "<@259277943275126785>\: i meant base32": I did too I’m dumb lol, IIRC if it’s binary the expansion factor for URL encoding would be bigger than 4/3
13:20:17FromDiscord<enthus1ast> i think i missed half of the discussion (maybe bridge issue)
13:29:29FromDiscord<nnsee> no, i'm on discord and i'm lost too
13:40:27FromDiscord<odexine> Now I’m lost, I don’t understand
13:46:54*edr joined #nim
13:54:26FromDiscord<jaar23> In reply to @enthus1ast "i mean, your client": yes, it is a while loop waiting for io. I used a channel.recv() there.↵i realized the issues has to do with the utilization of cpu. when i run on nanonode, (1cpu 1gb ram), at max i can run up to 5 threads when i start the process. Anything more than that will be hanging, which is causing the error i face.
13:56:13FromDiscord<jaar23> then i have a question, running a while loop with channel.recv(), is this very expensive task? ↵since it took up 1 cpu (100%) with only 5 threads like this.↵My local pc, which is an i5 core, running 5 threads took only 6.2% cpu, but i still think it is very high for a long running task..
13:59:44FromDiscord<jaar23> sent a code paste, see https://play.nim-lang.org/#ix=4Fx6
14:02:06*lumo_e quit (Quit: Quit)
14:03:18*marcus quit (Remote host closed the connection)
14:03:38FromDiscord<odexine> Probably add a sleep to limit how often you poll the channel?
14:04:05FromDiscord<jaar23> yup, i did. but it only help with 1 more extra thread.
14:04:35FromDiscord<jaar23> obviously i'm not doing something right here, but i can't spot it
14:04:46*marcus joined #nim
14:13:50*PMunch quit (Quit: Leaving)
14:25:31*rockcavera joined #nim
14:52:28FromDiscord<enthus1ast> Mhh recv should block on it's own, no need to peek first
15:03:56FromDiscord<jaar23> In reply to @enthus1ast "Mhh recv should block": Trying to see if that reduce some cpu power, haha. But not
15:08:06FromDiscord<Chronos [She/Her]> In reply to @enthus1ast "is it better than": Read up on Crockford Base32, it explains it pretty well
15:08:34FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4Fxr
15:15:26FromDiscord<odexine> a seq, sure why not?
15:31:27*cornfeedhobo quit (Server closed connection)
15:42:35FromDiscord<enthus1ast> When you just wait for io, you should have next to zero cpu utilization↵(@jaar23)
15:46:59*cornfeedhobo joined #nim
15:49:12FromDiscord<jaar23> In reply to @enthus1ast "When you just wait": Yes, I assume that too. Just waiting at the recv(). But is not.↵I tried to disabled channel and the cpu usage is gone. So the while true loop is fine.
16:05:01FromDiscord<kingterrytheterrible12> is `{.thread.} ` required for a function thats gonna be multithreaded?
16:05:43FromDiscord<kingterrytheterrible12> In reply to @jaar23 "the code is looking": there is a way to let the OS tell you to when you got a message
16:05:59FromDiscord<kingterrytheterrible12> you dont keep checking the mailbox to see when your mail is there
16:06:04FromDiscord<kingterrytheterrible12> you tell the mailman to tell you
16:06:20FromDiscord<kingterrytheterrible12> use epoll
16:07:30FromDiscord<odexine> epoll on a channel? channels are not file descriptors
16:08:09FromDiscord<kingterrytheterrible12> there is a way but i forgot
16:08:36FromDiscord<saint._._.> https://media.discordapp.net/attachments/371759389889003532/1149013284880654406/image.png
16:08:38FromDiscord<kingterrytheterrible12> you can make it an interrupt
16:08:42FromDiscord<saint._._.> Is this example correct?
16:08:52FromDiscord<saint._._.> From the nim docs
16:10:50FromDiscord<saint._._.> https://media.discordapp.net/attachments/371759389889003532/1149013849526243338/image.png
16:11:09FromDiscord<saint._._.> Also can someone explain to me how on earth this example demonstrates the functionality of fieldPairs?
16:12:15FromDiscord<odexine> In reply to @saint._._. "Also can someone explain": what are you confused by here?
16:12:20FromDiscord<odexine> In reply to @saint._._. "": this looks wrong
16:12:34FromDiscord<saint._._.> In reply to @odexine "what are you confused": Like how does it demonstrate iterating
16:12:59FromDiscord<saint._._.> What does it mean by "every field of x and y"
16:13:02FromDiscord<odexine> In reply to @saint._._. "Like how does it": it iterates over the fields of a1 and a2 right?
16:13:09FromDiscord<saint._._.> What does it mean by fields
16:13:14FromDiscord<odexine> x1 is a field
16:13:16FromDiscord<odexine> x2 is a field
16:13:28FromDiscord<saint._._.> Is it the keys or the values
16:13:42FromDiscord<odexine> name will be the name of the field
16:13:46FromDiscord<saint._._.> Or both
16:13:55FromDiscord<odexine> v1 and v2 will be the field, so the value
16:14:18FromDiscord<odexine> you can set the field and it will propagate to the original object
16:14:25FromDiscord<odexine> (if it's var)
16:14:37FromDiscord<saint._._.> does v1 and v2 have to be the same type then?
16:14:41FromDiscord<odexine> `fields` is value only↵`fieldPairs` will have the name
16:14:42FromDiscord<odexine> yes
16:15:04FromDiscord<odexine> actually huh, it doesnt seem like they have to be the same tpye
16:15:08FromDiscord<odexine> not sure what criteria there is
16:15:18FromDiscord<odexine> but i'd say its a safe assumption that theyd need to be the same type
16:15:21FromDiscord<saint._._.> Okay then why can you do something like `for key, val in x.fieldPairs:`
16:15:27FromDiscord<saint._._.> When x is just a regular object
16:15:34FromDiscord<odexine> you can do that too yes
16:15:39FromDiscord<odexine> what's the weird part about that?
16:16:02FromDiscord<odexine> https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CT
16:16:29FromDiscord<saint._._.> Hmm okay
16:16:39FromDiscord<saint._._.> So why can it iterate over two objects and one
16:16:49FromDiscord<saint._._.> Like is there a specific reason for doing two
16:16:53FromDiscord<saint._._.> Why not three for example
16:17:23FromDiscord<odexine> three is prolly not implemented because there's no usecase for it
16:17:35FromDiscord<odexine> two is because maybe you want to copy fields from one object to another
16:17:37FromDiscord<odexine> or something similar
16:17:47FromDiscord<saint._._.> Okay gotcha
16:17:51FromDiscord<saint._._.> Thanks @odexine
16:18:10FromDiscord<saint._._.> Do you think I could possibly like submit a PR for updating the documentation to make it a bit clearer
16:18:35FromDiscord<saint._._.> Not saying it would have to be accepted or anything, but I think I can describe it a bit more clearly
16:18:51FromDiscord<odexine> you can sure, it would be a good place to discuss whether it should be added
16:19:39FromDiscord<saint._._.> Sounds good thanks!
16:20:00FromDiscord<saint._._.> Are the docs open to more than one example for a proc
16:20:16FromDiscord<odexine> not sure if its implemented
16:20:51FromDiscord<saint._._.> Because for example it would be really useful to just show like what it would print out just iterating over two objects
16:20:59FromDiscord<saint._._.> That would make it really easy to see what it does
16:21:31FromDiscord<saint._._.> And then the second example could be what people might think is the common usecase which is copying fields from one object to another
16:21:35FromDiscord<saint._._.> Does that make sense?
16:22:18FromDiscord<odexine> i'm honestly not sure what other common use cases there are; i havent really seen it in the wild either, i usually see the single object one
16:22:35FromDiscord<odexine> maybe beef can give some insight lol
16:23:35FromDiscord<saint._._.> Well even if that's the common use case it would be cool just to show first what the function actually does, like how it iterates, instead of jumping first into this copy example
16:23:43FromDiscord<saint._._.> Also explaining that the example is a copy example
16:23:54FromDiscord<saint._._.> It's really not clear to me anyways when you look at it that it's describing iterating
16:24:02FromDiscord<saint._._.> Also here: https://nim-lang.org/docs/strutils.html#formatEng%2CBiggestFloat%2Crange%5B%5D%2Cbool%2Cbool%2Cstring%2Cchar
16:24:15FromDiscord<saint._._.> This proc seems to have multiple examples although they aren't labelled as examples
16:24:40FromDiscord<odexine> theyre embedded into the document as code blocks
16:25:01FromDiscord<saint._._.> Yeah I am not saying like how it is done
16:25:11FromDiscord<saint._._.> Rather like, whether it's going against convention to include multiple "examples"
16:25:51FromDiscord<saint._._.> https://nim-lang.org/docs/tables.html#basic-usage-counttable
16:25:57FromDiscord<saint._._.> Okay here there are two examples as well
16:27:43FromDiscord<odexine> that one is part of the top level documentation so it's not using the system procs use to embed examples
16:27:53FromDiscord<odexine> (edit) "system" => "thing"
16:30:11FromDiscord<saint._._.> Seems like it's plural "runnableExamples"
16:30:19FromDiscord<saint._._.> So should be okay to add multiple
16:30:36FromDiscord<odexine> yeah it would be in the sample block
16:30:44FromDiscord<odexine> same i dont know why i wrote sample
16:39:39FromDiscord<jaar23> In reply to @kingterrytheterrible12 "there is a way": If you are able to tell me how. But seems like using channel like this way would not go far for me now..
17:16:51FromDiscord<enthus1ast> @jaar23\: do you have the complete code somewhere?
17:25:29*PMunch joined #nim
17:33:02*junaid_ joined #nim
17:34:04FromDiscord<jaar23> In reply to @enthus1ast "<@614403538172379156>\: do you have": yea, it's here. https://github.com/jaar23/octoque↵still in progress
17:35:29FromDiscord<jaar23> i thinking the notifier may works, but still need to figure a way to temporary store the messages...
17:52:33*jjido joined #nim
17:53:42*junaid_ quit (Remote host closed the connection)
18:00:57FromDiscord<enthus1ast> @jaar23\: could it be this? https://github.com/jaar23/octolog/blob/ac2df06bb2fb6f874472b4c3d4ef7f5e910a8dac/src/octolog.nim#L178
18:01:17FromDiscord<enthus1ast> tryRecv in w while
18:03:50FromDiscord<enthus1ast> yes
18:03:55FromDiscord<enthus1ast> thats the issue
18:04:27FromDiscord<jmgomez> sent a long message, see http://ix.io/4Fy7
18:06:38FromDiscord<enthus1ast> btw nice project @jaar23, have something similar rotting in my project folder, i called it "miniredis"
18:10:12FromDiscord<jmgomez> In reply to @jmgomez "hey <@107140179025735680> pixie breaks": The CI passes on Windows and I cant repro it on local Ubuntu or MacOs
18:12:37FromDiscord<treeform> In reply to @jmgomez "hey <@107140179025735680> pixie breaks": Sure I can help you debug any pixie related problem. I don't understand that is going on in this PR? Maybe DM or voice chat?
18:24:03FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4Fya
18:24:55FromDiscord<saint._._.> Why does this not work?
18:24:55FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4Fyb
18:25:20FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4Fyc
18:25:43FromDiscord<saint._._.> Also doesn't work
18:25:44FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4Fyd
18:26:13FromDiscord<saint._._.> (edit) "https://play.nim-lang.org/#ix=4Fyb" => "https://play.nim-lang.org/#ix=4Fyf"
18:26:23FromDiscord<saint._._.> (edit) "https://play.nim-lang.org/#ix=4Fyd" => "https://play.nim-lang.org/#ix=4Fyg"
18:34:08FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4Fyh
18:36:13FromDiscord<enthus1ast> i think because fieldPairs is a magic
18:42:02FromDiscord<saint._._.> Ohh I see
18:42:11FromDiscord<saint._._.> So how can I use collect over an object
18:42:43FromDiscord<saint._._.> @enthus1ast
18:45:15FromDiscord<saint._._.> I guess I can't
18:45:18FromDiscord<saint._._.> (edit) "I guess I can't ... " added "?"
18:46:04FromDiscord<saint._._.> sent a code paste, see https://play.nim-lang.org/#ix=4Fyl
18:48:10FromDiscord<enthus1ast> i put a↵`echo repr result`↵into the sugar.nim collectImpl macro
18:48:35FromDiscord<enthus1ast> https://github.com/nim-lang/Nim/blob/18e62ad13699cc054e087fd63e75183d3076de60/lib/pure/sugar.nim#L344C6-L344C17
18:49:04FromDiscord<enthus1ast> no idea↵(@saint._._.)
18:49:05*rhoman joined #nim
18:49:43FromDiscord<saint._._.> In reply to @enthus1ast "https://github.com/nim-lang/Nim/blob/18e62ad13699cc": ohh wow okay
18:49:44FromDiscord<saint._._.> (edit) "okay" => "okay!"
18:49:58FromDiscord<saint._._.> In reply to @enthus1ast "no idea (<@890692135827959919>)": Yeah I guess I'll do it manually without collect
18:51:51*rhoman quit (Client Quit)
19:29:45*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
19:51:27FromDiscord<Chronos [She/Her]> Is there a visual novel engine in Nim? Or at least one with Nim bindings?
20:07:01FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Is there a visual": it makes zero sense to use nim in a VN
20:07:13FromDiscord<kingterrytheterrible12> its just very basic programming
20:07:29FromDiscord<kingterrytheterrible12> its just displaying pics and animations which all read from disk
20:07:30FromDiscord<Chronos [She/Her]> Access to libraries is an important thing
20:07:52FromDiscord<Chronos [She/Her]> Also I'll be rendering 3D models and animating every single scene too
20:08:01FromDiscord<Chronos [She/Her]> Stuff like RenPy is not suited for that
20:08:01FromDiscord<kingterrytheterrible12> use a game engine then
20:08:21FromDiscord<kingterrytheterrible12> you want to make an AVN
20:08:33FromDiscord<Chronos [She/Her]> Yeah
20:08:39FromDiscord<Chronos [She/Her]> Idk what game engine to use tbh hm
20:08:44FromDiscord<kingterrytheterrible12> In reply to @chronos.vitaqua "Idk what game engine": renpy
20:08:50FromDiscord<kingterrytheterrible12> can i dm you
20:08:59FromDiscord<kingterrytheterrible12> idk if nsfw stuff is allowed here
20:09:03FromDiscord<Chronos [She/Her]> Sure
20:09:08FromDiscord<kingterrytheterrible12> alright
20:09:18FromDiscord<Chronos [She/Her]> Issue with RenPy is that animations require videos and can't be done there directly
20:17:43*ntat quit (Quit: leaving)
20:18:45FromDiscord<kingterrytheterrible12> who knew that the game turing complete was made in nim
20:40:23FromDiscord<enthus1ast> godot?
20:45:43FromDiscord<enthus1ast> I think it makes sense to use nim for everything \:D↵(@kingterrytheterrible12)
20:46:01FromDiscord<kingterrytheterrible12> In reply to @enthus1ast "I think it makes": na bro
20:46:20FromDiscord<enthus1ast> maybe you could do such a game even in nimib
20:47:25FromDiscord<enthus1ast> why not? Build some small dsl (or even a small script lang) then show your images or animations
20:48:00FromDiscord<enthus1ast> show image123.png↵say[Peter]\: Foo Baa Baz
20:48:37FromDiscord<toma400> In reply to @enthus1ast "I think it makes": 💯
20:49:17FromDiscord<toma400> Also I love that Godot has Nim code support in unofficial plugin, and this is considered as one of the most supported languages by community ❤️
20:49:51FromDiscord<kingterrytheterrible12> In reply to @enthus1ast "maybe you could do": bro what matrix client are you using
20:49:55FromDiscord<kingterrytheterrible12> im moving out of discord
20:50:55FromDiscord<enthus1ast> element
20:51:03FromDiscord<enthus1ast> but its mediocre
20:51:11FromDiscord<kingterrytheterrible12> In reply to @enthus1ast "but its mediocre": electron stupid
20:51:14FromDiscord<enthus1ast> imho there are no really good matrix clients
20:51:21FromDiscord<kingterrytheterrible12> neochat?
20:52:09FromDiscord<enthus1ast> never used it
20:52:18FromDiscord<enthus1ast> can it do e2e?
20:52:20FromDiscord<kingterrytheterrible12> its time to make one
20:52:21FromDiscord<kingterrytheterrible12> in nim
20:52:43FromDiscord<kingterrytheterrible12> In reply to @enthus1ast "can it do e2e?": yes
20:53:04emerythere are no good matrix clients because matrix is not good
20:53:36FromDiscord<kingterrytheterrible12> In reply to @emery "there are no good": the IRC agents have invaded
20:53:42FromDiscord<enthus1ast> its the best free proto we have...
20:53:55FromDiscord<enthus1ast> IRC is not good enough for todays tasks
20:54:03FromDiscord<kingterrytheterrible12> whar are todays tasks
20:54:07emerysure buddy
20:54:23FromDiscord<enthus1ast> mobile, multi clients, e2e, voice shat, video chat
20:54:26FromDiscord<enthus1ast> send code
20:54:29FromDiscord<enthus1ast> send images
20:54:40FromDiscord<enthus1ast> offline messages
20:54:49FromDiscord<kingterrytheterrible12> im literally gonna move to a nokia soon
20:54:53FromDiscord<enthus1ast> =\> IRC is not good enough sorry ;)
20:54:56FromDiscord<kingterrytheterrible12> mobile phones are just spyware
20:55:19FromDiscord<enthus1ast> shat...
20:55:22FromDiscord<enthus1ast> chat
20:55:28FromDiscord<kingterrytheterrible12> huh
20:55:35FromDiscord<kingterrytheterrible12> who even texts nowdays
20:55:41FromDiscord<kingterrytheterrible12> if you need something call me
20:57:06FromDiscord<raynei486> what if someone wants to leave you a message without interrupting you?
20:57:28FromDiscord<kingterrytheterrible12> In reply to @raynei486 "what if someone wants": sms
20:57:29FromDiscord<enthus1ast> so the thing is, when we as the foss/hacker community cannot build a better protocol than matrix, then its no wonder why everyone uses discord or whatsapp or telegram
20:57:48FromDiscord<enthus1ast> so its basically our faul \:)
20:57:50FromDiscord<kingterrytheterrible12> In reply to @enthus1ast "so the thing is,": we can
20:57:51FromDiscord<enthus1ast> t
20:57:55FromDiscord<enthus1ast> what?
20:57:56FromDiscord<kingterrytheterrible12> its called signal
20:58:00FromDiscord<kingterrytheterrible12> and its done
20:58:05FromDiscord<enthus1ast> signal is foss?
20:58:09FromDiscord<kingterrytheterrible12> yes
20:58:15FromDiscord<kingterrytheterrible12> whatsapp is a fork of signal
20:58:24FromDiscord<varriount> What's the difference between a variable marked with the `cursor` pragma and and one that's a `ptr`?
20:58:26FromDiscord<enthus1ast> what??↵(@kingterrytheterrible12)
20:58:27FromDiscord<kingterrytheterrible12> in signal all messages are encrypted
20:58:55FromDiscord<kingterrytheterrible12> even if the glow boys send a subpoena to signal all they get is encrypted data that nobody but you and the sender can decrypt
21:00:00FromDiscord<kingterrytheterrible12> In reply to @enthus1ast "what?? (<@655759729477287956>)": nvm i was misinformed about the whatsapp thing
21:00:45FromDiscord<raynei486> In reply to @kingterrytheterrible12 "sms": true, but it sucks wheb everyone can't agree on a single method, whether it's sms or messenger or Instagram or whatever
21:01:20FromDiscord<kingterrytheterrible12> In reply to @raynei486 "true, but it sucks": because consumers are stupid
21:01:34FromDiscord<kingterrytheterrible12> they go after the thing thats marketed the most not the thing that functions the best
21:02:06FromDiscord<kingterrytheterrible12> absolutely no reason to use whatsapp over signal
21:02:39FromDiscord<kingterrytheterrible> i am in matrix
21:03:27*azimut quit (Ping timeout: 246 seconds)
21:03:38FromDiscord<enthus1ast> mh where is the matrix server code?
21:03:55FromDiscord<enthus1ast> https://github.com/signalapp/Signal-Server ?
21:04:30FromDiscord<kingterrytheterrible> i dont understand what you mean
21:04:49FromDiscord<enthus1ast> signal not matrix...
21:05:48FromDiscord<kingterrytheterrible> isnt it this
21:07:16*PMunch quit (Quit: leaving)
21:09:21FromDiscord<enthus1ast> will have a closer look at this one day, maybe i can get my familie+friends to use signal
21:09:45FromDiscord<kingterrytheterrible> you cannot
21:10:29FromDiscord<kingterrytheterrible> your family is too interdependent on each other and there is one person who will insist on using whatsapp and therefore the rest will do so
21:10:47FromDiscord<kingterrytheterrible> the average person is not concerned about their privacy
21:11:09FromDiscord<enthus1ast> i had my familie so far on trying matrix, but element on mobile was total $hit compared to whatsapp
21:12:15FromDiscord<kingterrytheterrible> signal is very good
21:13:39FromDiscord<kingterrytheterrible> in my case, i must continue using whatsapp. although i abstain from saying anything that might get me in jail
21:13:45FromDiscord<kingterrytheterrible> and also whatsapp claims they are E2E encrypted, does anyone know if the glow boys have any backdoors on their app?
21:13:48*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
21:14:07*jmdaemon joined #nim
21:14:16FromDiscord<enthus1ast> i think noone really thinks whatsapp is secure
21:15:49FromDiscord<kingterrytheterrible> we cannot say for sure, due to meta having a bad history with privacy, i expect my information is being collected. it is better if we treat whatsapp like this "if you dont want the cops to hear it then do not say it"
21:16:07FromDiscord<kingterrytheterrible> and also its closed source we dont know whats happening in there
21:19:35FromDiscord<kingterrytheterrible> enthus1ast\: https://www.youtube.com/watch?v=3oPeIbpA5x8&ab_channel=MentalOutlaw
21:20:14*advesperacit quit ()
21:23:05FromDiscord<kingterrytheterrible> and i also cannot understand why whatsapp is not open source? you can still make the same money from it
21:23:50FromDiscord<enthus1ast> when i do another chat proto, then i host the server myself (at my home)
21:24:05FromDiscord<enthus1ast> i do the same with matrix server
21:24:18FromDiscord<kingterrytheterrible> you host your own matrix server?
21:24:21FromDiscord<enthus1ast> yes
21:24:26FromDiscord<enthus1ast> matrix.code0.xyz is at my home
21:24:53FromDiscord<kingterrytheterrible> excellent
21:24:59FromDiscord<kingterrytheterrible> i would also like to home host these type of things but i dont have the resources to do so
21:25:31FromDiscord<enthus1ast> yeah the "official" matrix server needs some ressources unfortunately
21:26:00FromDiscord<kingterrytheterrible> its mostly bandwidth related
21:26:07FromDiscord<kingterrytheterrible> and space as well
21:26:42FromDiscord<kingterrytheterrible> i doubt 100 mbps internet can handle it, also my service provider does not offer static ip to consumers
21:26:58FromDiscord<enthus1ast> i have 100 down 40 up
21:27:10FromDiscord<kingterrytheterrible> oh neat the same as i am
21:27:42FromDiscord<kingterrytheterrible> enthus1ast\: what kind of hardware is your server(s)?
21:30:58FromDiscord<enthus1ast> 64 gb ram / AMD Ryzen 9 5900X 12-Core / GeForce GTX 1080 / 6 hdds as zraid / 2 nvme ssd as mirror
21:31:26FromDiscord<enthus1ast> and its a proxmox
21:31:38FromDiscord<kingterrytheterrible> nice
21:31:49FromDiscord<kingterrytheterrible> did you consider upgrading to a threadripper?
21:31:51FromDiscord<enthus1ast> nope
21:31:58FromDiscord<enthus1ast> its beefy enough for me \:)
21:32:30FromDiscord<kingterrytheterrible> do you use cloudflare to prevent DOS attacl?
21:32:51FromDiscord<enthus1ast> no i only use cloudflare as dyndns
21:33:04FromDiscord<kingterrytheterrible> then how do you prevent DOS attacks?
21:33:10FromDiscord<enthus1ast> i dont \:)
21:33:37FromDiscord<kingterrytheterrible> it doesnt take much bandwidth to take down your server you know
21:33:44FromDiscord<kingterrytheterrible> you should find a way to prevent DOS attacks
21:34:03FromDiscord<enthus1ast> I do dyndns with this tool\:↵https://nim-lang.org/blog/2021/04/02/this-month-with-nim.html↵https://github.com/enthus1ast/nimCloudflareDynDns
21:34:58FromDiscord<enthus1ast> yeah, i dont care, what a waste of time
21:35:18FromDiscord<kingterrytheterrible> its a waste of time for you
21:35:39FromDiscord<kingterrytheterrible> all it takes is 10 mins to launch an attack and it takes hours for you to fix
21:35:42*jmdaemon quit (Ping timeout: 246 seconds)
21:35:48FromDiscord<enthus1ast> what why?
21:36:17FromDiscord<enthus1ast> i would just wait until they stop, or also geoblock http/s in my firewall
21:36:27FromDiscord<kingterrytheterrible> because you must find a way to setup DOS mitigation on your server
21:36:33FromDiscord<enthus1ast> why?
21:36:41FromDiscord<kingterrytheterrible> that does not work
21:36:52FromDiscord<kingterrytheterrible> i can just keep rotating ip's to never end
21:38:28FromDiscord<enthus1ast> most of the botnet ips are no german ips, and eg for ssh they're geoblocked
21:38:36FromDiscord<kingterrytheterrible> but i mean in general nobody bothers DOSing home servers unless provoked
21:38:55FromDiscord<enthus1ast> and for http i don't care much, would just disable it and wait
21:39:38FromDiscord<enthus1ast> and i also have a fallback tor entry, so i could also nullroute the dns that points to my home
21:40:19FromDiscord<kingterrytheterrible> or
21:40:20FromDiscord<enthus1ast> or even enable cloudflare
21:40:38FromDiscord<kingterrytheterrible> just take the 10 mins to setup cloudflare
21:40:41FromDiscord<enthus1ast> it IS on cloudflare, i don't want to proxy through them though
21:41:05FromDiscord<kingterrytheterrible> why not
21:41:25FromDiscord<enthus1ast> why should i proxy my private stuff through an us company, would be crazy
21:41:31FromDiscord<enthus1ast> and stupid
21:41:42FromDiscord<kingterrytheterrible> how else can you prevent dos attacks
21:41:50FromDiscord<enthus1ast> well, i dont \:)
21:42:13FromDiscord<kingterrytheterrible> alright
21:43:19FromDiscord<enthus1ast> so far i had a better uptime than cloudflare itself btw
21:43:47FromDiscord<kingterrytheterrible> lmao
21:44:00FromDiscord<kingterrytheterrible> you must have been hosting that shit for 10 years
21:44:07FromDiscord<enthus1ast> longer
21:44:24FromDiscord<kingterrytheterrible> wow alright
21:44:43FromDiscord<kingterrytheterrible> do you even self host emails too?
21:44:50FromDiscord<kingterrytheterrible> do you just self host anything that can be self hosted
21:45:43FromDiscord<enthus1ast> no email is too much trouble and do not work correctly, thanks to the big monopolists, but i try to be as independant as possible, i host everything i need myself
21:46:06FromDiscord<kingterrytheterrible> yeah scammers ruined it for us all
21:50:13FromDiscord<Chronos [She/Her]> In reply to @enthus1ast "maybe you could do": Complete with animation and physics? Definitely not aha, decided to go with Unity so
21:50:38FromDiscord<kingterrytheterrible> good choice↵(@Chronos [She/Her])
21:51:09FromDiscord<enthus1ast> physics? In a porn game? \:D
21:51:24FromDiscord<enthus1ast> yeah i guess there are some use cases
21:51:32FromDiscord<Elegantbeef> You need physically accurate jiggle physics
21:51:44FromDiscord<enthus1ast> yeah
21:52:20FromDiscord<Elegantbeef> Also need drastically daring dangle direction
21:53:05FromDiscord<enthus1ast> beef you always speak in slang i do not understand
21:53:54FromDiscord<Elegantbeef> That's not really slang as much as a forced alliteration
21:54:21FromDiscord<enthus1ast> well, its late and work tomorrow, g8 all
21:54:44FromDiscord<Elegantbeef> Buh bye
21:54:48FromDiscord<kingterrytheterrible> dont think its porn
21:55:02FromDiscord<kingterrytheterrible> i was giving examples on what porn games use renpy for 3d
22:02:24FromDiscord<kingterrytheterrible> or jiggle physics
22:29:48FromDiscord<kingterrytheterrible12> https://media.discordapp.net/attachments/371759389889003532/1149109218788507700/Screenshot_20230907_012921_X.jpg?ex=64fa4edb&is=64f8fd5b&hm=06d2e103081dba768c5cab2d46d929b6fc2d2b9a524aebe6ed49f66fcc1f3531& https://media.discordapp.net/attachments/371759389889003532/1149109219086311444/Screenshot_20230907_012918_X.jpg?ex=64fa4edb&is=64f8fd5b&hm=c707960953524a14101b9186c89273fde097b8c8a2fa9ad293804400f9c4761c&
22:29:50FromDiscord<kingterrytheterrible12> Wonder how real this is
22:30:22FromDiscord<.maverk> is ``of`` a keyword or an operator ?
22:30:54FromDiscord<Elegantbeef> Both
22:32:03FromDiscord<.maverk> ok thanks
22:43:33FromDiscord<kingterrytheterrible> https://www.youtube.com/watch?v=hO9LeHgwUAU&ab_channel=MentalOutlaw
22:43:44FromDiscord<kingterrytheterrible> guys we have open source mcgriddle
22:48:42FromDiscord<Elegantbeef> There's a memes channel for shitposting
22:48:59FromDiscord<Elegantbeef> Don't think it's bridge
22:49:00FromDiscord<Elegantbeef> bridged\
23:02:34FromDiscord<.maverk> is float type a mchine dependent ?
23:09:51FromDiscord<vindaar> In reply to @.maverk "is float type a": no, it's an alias to `float64`
23:11:34FromDiscord<.maverk> In reply to @vindaar "no, it's an alias": aah oky so it is the same as 64
23:11:45FromDiscord<.maverk> using float or float64 is the same
23:12:43FromDiscord<vindaar> yup
23:12:48FromDiscord<.maverk> thanks bro
23:13:34FromDiscord<vindaar> https://github.com/nim-lang/Nim/blob/devel/lib/system/basic_types.nim#L15
23:13:41FromDiscord<vindaar> so you don't have to trust my word 😉
23:25:34FromDiscord<.maverk> thanks
23:41:28NimEventerNew post on r/nim by mjnd7263: what is the difference between these two declarations ?, see https://reddit.com/r/nim/comments/16c01qm/what_is_the_difference_between_these_two/
23:54:30*jmdaemon joined #nim