00:00:16 | * | abm quit (Ping timeout: 256 seconds) |
00:05:22 | * | mbomba joined #nim |
00:18:11 | FromDiscord | <Relix> is this the right channel to ask for help? |
00:26:26 | FromDiscord | <Yardanico> yes |
00:28:45 | FromDiscord | <Relix> sent a code paste, see https://play.nim-lang.org/#ix=2CPS |
00:28:47 | FromDiscord | <Yardanico> hmm, interesting, I didn't work with nimgl but I'll try to run this, how would I go about calling that proc? |
00:28:59 | FromDiscord | <Yardanico> also yeah, I've seen you typing this on your stream :) |
00:32:40 | * | mbomba quit (Quit: WeeChat 2.9) |
00:35:05 | lmariscal | Hi Relix |
00:35:22 | lmariscal | I'm the maintainer (need to maintain more) of nimgl |
00:39:27 | lmariscal | @Relix what I'm seeing different from some other of my projects is that you are passing the addr of the data directly instead of the first object addr |
00:39:33 | FromDiscord | <Relix> turns out i was trying to create an image before initializing opengl, false alarm ๐ |
00:40:37 | lmariscal | Oh, okay. If you still have issues with the image data try passing it with `data[0].addr` |
00:40:50 | lmariscal | ๐ |
00:41:15 | FromDiscord | <Relix> but apparently it still crashes on linux, and i think you were right, that was also one of the problems ๐ thank you! |
00:43:04 | FromDiscord | <Yardanico> @lmariscal yeah that fixed crashes on linux :P |
00:44:18 | lmariscal | Yeah, I should make more precise typing, but as auto-generated bindings it is still too difficult ๐ will have to experiment some |
00:44:26 | lmariscal | Btw, where is Relix streaming atm?\ |
00:45:28 | FromDiscord | <Yardanico> https://www.twitch.tv/moscowwbish |
01:28:17 | * | Tanger joined #nim |
01:42:50 | * | krux02 quit (Remote host closed the connection) |
01:52:23 | * | opal quit (Ping timeout: 240 seconds) |
01:55:21 | FromDiscord | <notchris> Hey all, im getting an error on this procedure, I think it's because of the nesting? I included the error, any idea how to work around it? https://play.nim-lang.org/#ix=2CQ8 |
01:55:22 | * | opal joined #nim |
01:55:44 | ForumUpdaterBot | New post on r/nim by Lassii-: How to get the text inside a tag from parsed HTML?, see https://www.reddit.com/r/nim/comments/jn1hnn/how_to_get_the_text_inside_a_tag_from_parsed_html/ |
01:55:44 | FromDiscord | <notchris> `illegal capture 'cb' because 'innercallback' has the calling convention: <cdecl>` |
01:56:53 | FromDiscord | <notchris> If i remove the for statement, and just echo a string, it doesn't complain |
01:58:00 | mipri | cb closes over the 'this' variable in watch |
01:58:08 | mipri | which makes it a closure, a function + environment |
01:58:12 | mipri | C doesn't support such things. |
01:58:49 | mipri | so you need to find some other way to pass that information to the callback |
01:59:17 | FromDiscord | <notchris> ugh |
01:59:22 | FromDiscord | <notchris> I was afraid of that |
01:59:33 | notchris | ty mipri |
02:01:36 | FromDiscord | <Yardanico> @notchris one way would be to have a global variable |
02:01:41 | FromDiscord | <Yardanico> that's how it's usually done in C I think |
02:01:52 | FromDiscord | <Yardanico> well, some libs provide special arguments you can use for your own data |
02:01:55 | FromDiscord | <Yardanico> but some don't |
02:02:57 | FromDiscord | <notchris> @Yardanico I was doing that originally, but I wanted to have the logic within the init procedure. It's not out of the question though, since it looks like a better way might be hard to find |
02:03:17 | FromDiscord | <Yardanico> well you can use the {.global.} pragma, but having an explicit global var would look better |
02:03:27 | FromDiscord | <Yardanico> I mean it'll work more predictably |
02:04:43 | FromDiscord | <notchris> That's true |
02:11:42 | * | apahl quit (Ping timeout: 260 seconds) |
02:13:16 | * | apahl joined #nim |
02:25:57 | ForumUpdaterBot | New post on r/nim by asdaat: Multi-Insert Postgres Module, see https://www.reddit.com/r/nim/comments/jn1yxg/multiinsert_postgres_module/ |
02:41:30 | FromDiscord | <dk> templates and async still don't mix well |
02:43:17 | FromDiscord | <Yardanico> use mixin |
02:43:57 | FromDiscord | <UNIcodeX> @Yardanico thanks. Was one char in middle of string. Had to go take care of a last minute client request so I didn't have time to keep at it. |
02:44:14 | FromDiscord | <Yardanico> well maybe you didn't get what I mean |
02:44:21 | FromDiscord | <Yardanico> if you have "mystrCHARmystr" then you can just do |
02:44:23 | FromDiscord | <Yardanico> "mystr$+mystr" |
02:44:29 | FromDiscord | <Yardanico> $+ will mach for 1 char too |
02:44:33 | FromDiscord | <Yardanico> (edit) "mach" => "match" |
02:52:51 | FromDiscord | <Theodore> @Theodore@PMunch yes |
02:53:26 | FromDiscord | <Theodore> IRC is good and that means bad |
02:55:32 | FromDiscord | <UNIcodeX> I was trying `"$i$+$i` to match something like "8e5", for example. I think it was possibly parsing properly at that point, but I'm not sure I had the correct type passed into `scanf`. It was giving me a type error on variable set to `char` type.โต I'll probably mess with it some more tomorrow. |
02:56:23 | FromDiscord | <UNIcodeX> (edit) "`"$i$+$i`" => "`"$i$+$i"`" |
03:04:35 | FromDiscord | <Yardanico> you know you can parse floats right? |
03:04:47 | FromDiscord | <Yardanico> I mean strscans has $f for parsing a float |
03:04:49 | disruptek | since when? |
03:05:16 | FromDiscord | <Yardanico> since the module was created |
03:05:22 | disruptek | all this time? |
03:05:26 | FromDiscord | <Yardanico> yes |
03:05:34 | disruptek | holy shit, we should tell someone. |
03:05:35 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/commit/b357e8083340ac707acd466493f36e6422ecff07#diff-41b140463ade4172a3e99093d63aca84dbac00662419fc28e0d0b5f14887634eR35 |
03:09:11 | FromDiscord | <UNIcodeX> It's not a float. Looks like one though. It's short for 1/8 note, E, 5th octave. |
03:09:43 | disruptek | are you rewriting S.C.O.R.E? |
03:12:57 | * | muffindrake quit (Ping timeout: 260 seconds) |
03:14:52 | * | madpata_ joined #nim |
03:15:12 | FromDiscord | <UNIcodeX> This post came across my browser and I thought it looked like it would be fun to play around with. https://zserge.com/posts/nokia/ |
03:15:12 | * | muffindrake joined #nim |
03:17:54 | FromDiscord | <notchris> Is there a way to say, capture a webcam stream via nim, looking at os |
03:18:04 | disruptek | looking at os? |
03:18:26 | * | madpata quit (Ping timeout: 256 seconds) |
03:18:48 | FromDiscord | <notchris> Ah sorry, that's the part of the doc im currently looking in, wasn't sure if it was already built in somewhere |
03:23:35 | FromDiscord | <Yardanico> well not via the stdlib for sure, maybe opencv or something |
03:38:18 | FromDiscord | <Avatarfighter> if you're on UNIX I wouldn't be surprised if you can open the file descriptor for the camera and read the data straight from it tbh |
03:38:33 | disruptek | the what |
03:38:42 | FromDiscord | <Avatarfighter> idk the terms |
03:38:48 | FromDiscord | <Avatarfighter> /device/somethinghere |
03:39:17 | FromDiscord | <Avatarfighter> /dev/video I guess |
03:40:00 | FromDiscord | <Avatarfighter> I guess what would've been more correct is you can open the file path for the camera and just read raw data from it |
03:40:06 | notchris | hmmmm |
03:40:36 | FromDiscord | <notchris> @Avatarfighter But how would i invoke capture? |
03:41:27 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5fa0d167f2fd4f60fc4dc77c] |
03:41:59 | FromDiscord | <Avatarfighter> @notchris I think its just as easy as opening the device with `open("path_to_device")` and reading |
03:42:52 | FromDiscord | <Avatarfighter> You can probably take this https://gist.github.com/mike168m/6dd4eb42b2ec906e064d and convert it straight to nim |
03:43:07 | FromDiscord | <Avatarfighter> but that's linux specific so idk if you're on linux |
03:43:21 | FromGitter | <gogolxdong> Any way to raise singal correctly with Sighandler? |
03:49:24 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5fa0d344dc70b5159aeb3812] |
03:49:48 | FromGitter | <gogolxdong> seems have to use {.noconv.} pragma? |
03:53:03 | * | eburk quit (Quit: WeeChat 2.9) |
04:03:42 | FromDiscord | <notchris> Hey all, not sure what happened, I'm on OSX, whenever I try to run a nim app, im now getting `error: unable to open output file '/Users/chris/.cache/nim/main_d/stdlib_system.nim.c.o':โต 'Operation not permitted'` out of the blue |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:34 | * | supakeen joined #nim |
04:09:22 | jonjitsu[m] | What's the easiest way to turn a homogenous tuple of strings into a seq/array to run strutils.join on? |
04:19:06 | FromDiscord | <ElegantBeef> Uncertain if this is a good method but i'd imagine something like this is fine https://play.nim-lang.org/#ix=2CQs |
04:23:11 | FromDiscord | <notchris> Ah fixed, it was my cache |
05:28:24 | * | apahl quit (Ping timeout: 240 seconds) |
05:29:34 | * | apahl joined #nim |
06:06:00 | * | Tlangir joined #nim |
06:08:37 | * | Tanger quit (Ping timeout: 264 seconds) |
06:17:24 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:18:53 | * | narimiran joined #nim |
06:37:30 | * | solitudesf joined #nim |
07:05:05 | * | tane joined #nim |
07:12:04 | FromDiscord | <tinygiant> sent a long message, see http://ix.io/2CQN |
07:15:03 | FromDiscord | <ElegantBeef> `var.typeof` |
07:15:36 | FromDiscord | <ElegantBeef> Unless i misunderstand |
07:17:07 | FromDiscord | <tinygiant> @ElegantBeef thanks. I'm done for the night, but I'll try again in the morning. I did a lot of searching and never hit on that one. I guess my search skills are waning in my old age. |
07:24:34 | FromDiscord | <nikki> is there a reasonable way to return a 'readonly view' into a seq that's in an object? |
07:25:01 | FromDiscord | <nikki> could return `openArray[Elem]` with the new view borrow stuff ... but i haven't enabled that |
07:25:44 | FromDiscord | <nikki> i guess `seq` is already by reference so i could just return that and just strongly recommend not modifying it :p |
07:34:17 | * | Vladar joined #nim |
07:34:47 | FromDiscord | <ElegantBeef> Isnt `lent` just a feature of 1.4.0? |
07:46:05 | FromDiscord | <nikki> i'm not sure but i think returning a view type counts as 'assigning to a local variable' in https://nim-lang.github.io/Nim/manual_experimental.html#view-types -- or at least, i just get "result can't be assigned to" |
07:46:13 | FromDiscord | <nikki> so; that would need the experimental feature |
07:47:01 | FromDiscord | <ElegantBeef> Ah yea it seems you're right, i havent read much about the ownership system |
07:48:11 | FromDiscord | <ElegantBeef> Clearly you just make a distinct type and override assignment to say "Bitch you thought" |
08:01:39 | * | lritter joined #nim |
08:06:21 | * | lritter quit (Client Quit) |
08:06:39 | * | lritter joined #nim |
08:07:30 | * | vicfred quit (Remote host closed the connection) |
08:07:56 | * | vicfred joined #nim |
08:10:31 | * | krux02 joined #nim |
08:28:44 | * | apahl quit (Ping timeout: 240 seconds) |
08:31:02 | * | apahl joined #nim |
08:35:08 | * | PMunch joined #nim |
08:38:39 | * | tane quit (Quit: Leaving) |
08:44:11 | PMunch | Hmm @dom96, what happened to my IRCLogs redesign? |
08:49:23 | * | vicfred quit (Quit: Leaving) |
08:53:20 | Yardanico | !status |
08:53:22 | FromDiscord | Uptime - 1 week, 6 days, 13 hours, and 16 minutes |
08:59:25 | PMunch | This DBUS bug still annoys me.. |
09:19:59 | PMunch | Ah, it appears to be a threading bug |
09:20:18 | PMunch | Apparently the dbus library is threaded, but the Nim dbus wrapper doesn't take this into account |
09:22:38 | PMunch | So the seq in the object that is only passed around by a pointer is at some point touched by the GC and that messes things up |
09:22:42 | PMunch | Which makes sense |
09:23:06 | PMunch | --gc:arc makes the bug disappear, but I'm not confident it's not just hiding.. |
09:23:57 | FromDiscord | <Varriount> Gotta make sure to increment and decrement those references at the right time |
09:24:49 | FromDiscord | <Varriount> Surely dbus has some sort of mechanism to free user allocated memory at the correct time? |
09:24:56 | FromDiscord | <lqdev> how does tuple comparison work? so, for instance, how am i able to do `NimVersion >= (1, 4, 0)`? what does `>=` return in that case? |
09:27:08 | PMunch | Varriount, well it's a bit of a mess. I can pass it a void* into it's handler thing. Then when it calls any of the registered procedures it will call the procedure with that pointer as the argument |
09:27:28 | PMunch | Currently the implementation has a sequence in the object it passes along with the nil pointer |
09:29:52 | PMunch | It has a maxWatches of 128 though, so I could really just allocate a 128 pointer array... |
09:33:46 | narimiran | @lqdev we ususally do `when (NimMajor, NimMinor) >= (1, 3)`, and it works by comparing the first fields, then the second fields, then the third, etc. |
09:34:13 | FromDiscord | <lqdev> yea i found it in system.nim's source |
09:34:19 | FromDiscord | <lqdev> i half-expected it to be a magic |
09:40:21 | * | Tlangir quit (Quit: Leaving) |
09:44:42 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:46:44 | FromDiscord | <Varriount> PMunch: Can't you just increment the reference count of the reference object holding the sequence? |
09:46:58 | PMunch | There is no reference object |
09:47:23 | PMunch | This is the code: https://github.com/zielmicha/nim-dbus/blob/master/dbus/loop.nim#L4 |
09:48:19 | PMunch | As you can see in create (L28-L40) it calls `create` on MainLoop (and changing it to `createShared` doesn't help) and then passes that pointer to the dbus procedure) |
09:49:27 | FromDiscord | <Varriount> Where is the MainLoop object created? |
09:51:29 | * | David0 joined #nim |
09:52:02 | * | David0 quit (Remote host closed the connection) |
09:52:02 | FromDiscord | <Varriount> I mean, I see `create(MainLoop)`, but that appears to be a infinitely recursive call |
09:53:32 | PMunch | No, that is create from system |
09:53:45 | PMunch | Which takes a typedesc and allocates memory |
09:53:54 | PMunch | But it is owned by the current thread |
09:54:30 | Zevv | Don't do threading kids. It's bad for you |
09:54:36 | Zevv | mkaaaay |
09:55:30 | PMunch | Haha :P |
09:55:44 | PMunch | Unfortunately this is wrapping a C library, so I don't have much choice in the matter |
09:55:46 | FromDiscord | <Varriount> PMunch: Would incrementing the reference count of the sequence work? |
09:55:54 | PMunch | Dunno, maybe |
09:56:19 | PMunch | But the fact that I don't know kinda rubs me the wrong way |
09:56:20 | FromDiscord | <Varriount> ^ The universal answer |
09:56:35 | PMunch | And where would I increase it? |
09:56:40 | FromDiscord | <Varriount> Isn't there some sort of GC debug define? |
09:56:57 | PMunch | Good question actually |
09:59:48 | PMunch | This works: http://ix.io/2CRq |
10:00:02 | PMunch | Simply by not using GCed memory in that object |
10:00:39 | PMunch | But this should potentially have some `setupForeignThreadGC` statements sprinkled around as well.. |
10:00:51 | PMunch | Not quite sure what dbus' threading model is |
10:01:23 | FromDiscord | <Varriount> Another way would be to have a double reference to the sequence |
10:02:27 | FromDiscord | <Varriount> One reference in the object, that is incref'd, and which references memory that contains the sequence. |
10:02:57 | PMunch | But how would you keep track of when to deref it? |
10:03:11 | PMunch | Not that the MainLoop object is ever free'd.. |
10:03:46 | FromDiscord | <Varriount> type SeqRef[T] = ref Seq[T] |
10:04:22 | FromDiscord | <Varriount> PMunch: To be honest, I would try to rewrite all that code to be a bit more safe. |
10:04:50 | FromDiscord | <Varriount> No calls to create, just allocate a regular reference |
10:05:11 | PMunch | Yeah.. The whole thing is a bit hairy.. |
10:05:40 | FromDiscord | <Varriount> cast the pointer to a reference when dbus calls the callback, though that assumes it's calling it in the correct thread |
10:05:59 | PMunch | Mhm, which it might not afaik |
10:06:45 | PMunch | Oh wait.. |
10:06:59 | PMunch | Dbus itself doesn't actually seem to be threaded.. |
10:07:30 | PMunch | But why does it mess up the seq then? |
10:09:27 | PMunch | Because the seq is directly in the object? |
10:10:17 | FromDiscord | <Varriount> Does create return zero'd memory? |
10:10:29 | PMunch | Yup |
10:10:43 | PMunch | And it messes it up mid-program |
10:11:04 | PMunch | All of a sudden the seq reports a len of 121 and some of the arguments are obviously corrupted |
10:11:39 | FromDiscord | <Varriount> Also, I'm unclear what happens to the reference count when, say, `add` is called on a sequence that is nil, and so it allocates the sequences |
10:11:58 | Araq | seqs in arc don't have a refcount btw |
10:11:59 | FromDiscord | <Varriount> allocates memory for the sequence |
10:12:21 | FromDiscord | <Varriount> Because MainLoop is a pointer |
10:12:23 | Araq | also we need a good name for the "hash table of bitsets" |
10:12:28 | Araq | see https://github.com/nim-lang/Nim/pull/15564 |
10:12:29 | disbot | โฅ Make IntSet a generic ordinal set OrdSet[A] |
10:12:45 | Araq | I think BitSet is a bit too misleading, system.set is a bitset |
10:12:54 | FromDiscord | <Varriount> BitSoup |
10:13:03 | Araq | our IntSet is a two level data structure |
10:13:20 | FromDiscord | <Varriount> BitTable? |
10:14:07 | PMunch | What do you mean they don't have a refcout? |
10:14:09 | Araq | well the interface is set-like, not table-like |
10:14:17 | FromDiscord | <Varriount> PMunch: I don't know if you saw it, but I made a comment above |
10:14:30 | Araq | PMunch, well they don't. it's not like they need it, you know |
10:14:54 | PMunch | Well, I don't know.. I haven't really read up on how ARC actually works |
10:15:03 | PMunch | At the moment I just treat is as dark magic |
10:15:36 | FromDiscord | <Varriount> PMunch: If `add` is called on a nil sequence, it allocates memory for the sequence and increments its reference count. |
10:16:26 | FromDiscord | <Varriount> But that might not hold true, when the sequence is being held in memory pointed to by a pointer |
10:16:57 | FromDiscord | <Varriount> Araq would know |
10:17:20 | FromDiscord | <Varriount> Goodnight |
10:17:41 | PMunch | Oh yeah, I know that part |
10:17:43 | PMunch | Good night |
10:17:47 | Araq | HashBitSet? |
10:17:53 | PMunch | Hmm, a RefSeq didn't work.. |
10:18:04 | PMunch | HashedBitSet? |
10:19:11 | PMunch | Hmm, GC_ref on the RefSeq works, but that's nasty |
10:19:23 | PMunch | Still not 100% sure why this is a problem though |
10:19:33 | PMunch | Oh wait |
10:19:57 | PMunch | Is it because since MainLoop is allocated with `create` it can't be traversed by the GC? |
10:20:06 | PMunch | So it never finds the reference to the seq and frees it |
10:24:08 | FromDiscord | <lqdev> FastSet? |
10:26:11 | FromDiscord | <ElegantBeef> HashFlags, BitFlags, HashBitSet |
10:30:53 | * | madpata_ quit (Ping timeout: 260 seconds) |
10:31:12 | FromDiscord | <Varriount> SetBucket, BitBuckets (heh) |
10:32:12 | FromDiscord | <Varriount> Maybe something using the noun "sheet" (like spreadsheet)? |
10:32:27 | FromDiscord | <Varriount> BitSheet? |
10:36:03 | FromDiscord | <flywind> sent a code paste, see https://play.nim-lang.org/#ix=2CRE |
10:36:52 | FromDiscord | <flywind> This is rendered results from `liftLambdas` function. |
10:50:38 | Araq | well it's a nkVarSection so that's where the C codegen handles it |
10:51:50 | FromDiscord | <flywind> Thanks! Could JS backend handle clousre? |
10:52:22 | * | Tanger joined #nim |
10:54:10 | FromDiscord | <flywind> Yea JS backend can't handle closure after `liftLambdas`. |
10:54:54 | FromDiscord | <flywind> I will look into `vmgen` instead. |
10:57:21 | ForumUpdaterBot | New thread by Fxn: Idiomatic function call coding style?, see https://forum.nim-lang.org/t/7025 |
11:13:43 | FromDiscord | <Recruit_main707> how can you skip the next iteration of a for loop? |
11:14:47 | FromDiscord | <lqdev> `continue` |
11:15:44 | FromDiscord | <Recruit_main707> doesnt `continue` skip the rest of the current one? |
11:16:15 | FromDiscord | <Rika> it skips everything in the for but below the continue |
11:16:23 | FromDiscord | <Rika> (edit) "but" => "that is also" |
11:28:07 | * | madpata joined #nim |
11:39:13 | FromDiscord | <Yardanico> @Recruit_main707 for that you'll need to have some intermediate variable |
11:39:16 | FromDiscord | <Yardanico> Like I |
11:39:19 | FromDiscord | <Yardanico> i |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:32 | * | supakeen joined #nim |
12:17:07 | * | Vladar quit (Remote host closed the connection) |
12:23:39 | * | Vladar joined #nim |
12:36:45 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2CSb |
12:36:57 | FromDiscord | <tinygiant> (edit) "https://play.nim-lang.org/#ix=2CSb" => "https://play.nim-lang.org/#ix=2CSc" |
12:38:11 | FromDiscord | <Rika> what issues are you having? |
12:38:15 | FromDiscord | <Rika> like errors i mean |
12:40:43 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2CSf |
12:41:03 | FromGitter | <gogolxdong> https://play.nim-lang.org/#ix=2CSg |
12:41:29 | FromGitter | <gogolxdong> Isn't cstring array expected to work with [] indexing operator? |
12:43:35 | FromDiscord | <Rika> gogolxdong yes it should, thats a strange error you are getting |
12:44:00 | FromDiscord | <Rika> @tinygiant well what is the error exactly? |
12:51:09 | * | mmohammadi9812 quit (Quit: Quit) |
12:51:24 | * | mmohammadi9812 joined #nim |
12:52:39 | * | mmohammadi9812 quit (Client Quit) |
12:52:55 | * | mmohammadi9812 joined #nim |
13:05:47 | * | abm joined #nim |
13:06:12 | * | mmohammadi9812 quit (Ping timeout: 260 seconds) |
13:09:00 | * | mmohammadi9812 joined #nim |
13:11:49 | FromDiscord | <tinygiant> One sec, have to step away for an unexpected occurrence. Be back in about 45 minutes. Thane for the replies. |
13:17:14 | PMunch | Sorry everyone, my bedroom is on fire, AFK |
13:17:56 | Zevv | If that came from disdruptek I would not be worried |
13:18:02 | FromDiscord | <Rika> pmunch are you serious |
13:18:06 | FromDiscord | <Vindaar> "my bedroom is on fire" eh, I hope you're kidding, otherwise all the best mate! |
13:18:18 | PMunch | Haha, it's an old IRC meme :P |
13:18:25 | FromDiscord | <Vindaar> oh haha |
13:18:37 | PMunch | http://bash.org/?60469 |
13:19:03 | Zevv | ooh he knows bash.org |
13:19:28 | PMunch | Pfft, I keep a local copy of the top 200 in case the site goes doewn :P |
13:19:40 | PMunch | http://bash.org/?top http://bash.org/?top2 <- for the uninitiated |
13:20:18 | FromDiscord | <lqdev> oh yes bash.org |
13:21:10 | Zevv | how do all the kids know that stuff |
13:21:11 | FromDiscord | <lqdev> the second top one reminds me of r/SUBREDDITNAME |
13:21:27 | PMunch | I still use hunter2 for all my throwaway and default passwords :P |
13:21:31 | FromDiscord | <lqdev> Zevv: idk, somebody posted it somewhere and that's how i found out about it |
13:21:41 | FromDiscord | <lqdev> i don't remember |
13:21:57 | PMunch | Haha, what is that subreddit :P |
13:22:28 | PMunch | I think they teach it in history classes now Zevv |
13:22:53 | PMunch | I'm actually surprised the site is still up |
13:26:12 | Oddmonger | disruptek , excuse me to disturb you but i have an issue with gitnim : a nimble package tests if nim's version >= 1.4.0 . I'm using the latest available on gitnim (1.4rc) , but this one returns 1.3.7 as version number. What can i do (except modify the check in the nimble package config) ? Thank you |
13:33:28 | Zevv | disruptek is asleep |
13:34:21 | FromGitter | <gogolxdong> How to declare an empty enum? |
13:35:19 | mipri | a type with no possible values? why? |
13:36:52 | * | mipri tries it with 'void' ... void gets redefined as the single value of the enum |
13:37:30 | FromGitter | <gogolxdong> because enum with values are in a invalid order, and it's an field of an object. |
13:38:22 | mipri | I don't follow. so you do have an enum that does have values? |
13:39:01 | FromGitter | <gogolxdong> actually an unordered enum would help. Is there unordered enum? |
13:39:47 | mipri | do you mean a *range* of enum values that doesn't have to be ordered? no. but maybe you can make do with a set of enum |
13:42:58 | PMunch | gogolxdong, what are you trying to do? |
13:48:51 | FromDiscord | <Vindaar> @tinygiant I don't quite understand the problem you have. Why are the accessors generic if `FieldType` is just an enum? This works: https://play.nim-lang.org/#ix=2CSz |
13:52:06 | * | Tlangir joined #nim |
13:54:38 | * | Tanger quit (Ping timeout: 264 seconds) |
14:18:43 | jonjitsu[m] | is it possible to name a module the same as a core module? Like can I create my own sequtils module and call it that and still be able to import it somehow? |
14:19:51 | * | NimBot joined #nim |
14:25:59 | narimiran | yes |
14:29:22 | jonjitsu[m] | so if I create my own sequtils.nim and want to import the core sequtils how would I reference it? It gives me a circular dependency error... |
14:30:16 | FromDiscord | <Rika> `import std/sequtils` |
14:33:08 | * | Vladar quit (Remote host closed the connection) |
14:35:27 | jonjitsu[m] | thx |
14:46:05 | ForumUpdaterBot | New thread by Vitaliy: SIGSEGV on Android, see https://forum.nim-lang.org/t/7026 |
14:48:07 | jonjitsu[m] | How do we run runnableExamples? |
14:48:22 | Yardanico | jonjitsu[m]: nim doc file.nim |
14:48:31 | Yardanico | they are tested when you make documentation |
14:48:38 | * | Tlangir quit (Ping timeout: 264 seconds) |
14:54:53 | * | JStoker quit (*.net *.split) |
14:55:45 | * | madpata quit (Ping timeout: 240 seconds) |
14:55:53 | * | JStoker joined #nim |
14:56:10 | * | JStoker quit (Max SendQ exceeded) |
14:56:34 | * | JStoker joined #nim |
14:57:09 | * | unclechu quit (Ping timeout: 246 seconds) |
14:57:26 | * | themoon[m] quit (Ping timeout: 268 seconds) |
14:57:26 | * | BitPuffin quit (Ping timeout: 240 seconds) |
14:57:29 | * | lum[m] quit (Ping timeout: 270 seconds) |
14:57:29 | * | Avatarfighter[m] quit (Ping timeout: 244 seconds) |
14:57:30 | * | leorize[m]1 quit (Ping timeout: 270 seconds) |
14:57:30 | * | leorize[m] quit (Ping timeout: 270 seconds) |
14:57:37 | * | lnxw37d4 quit (Ping timeout: 260 seconds) |
14:57:57 | * | Helios quit (Ping timeout: 272 seconds) |
14:59:07 | * | reversem3 quit (Ping timeout: 244 seconds) |
14:59:15 | * | planetis[m] quit (Ping timeout: 246 seconds) |
14:59:37 | * | nikki93[m] quit (Ping timeout: 246 seconds) |
14:59:37 | * | hnOsmium0001[m] quit (Ping timeout: 246 seconds) |
14:59:56 | * | MTRNord[m] quit (Ping timeout: 240 seconds) |
15:00:35 | * | GitterIntegratio quit (Ping timeout: 244 seconds) |
15:00:40 | * | jonjitsu[m] quit (Ping timeout: 244 seconds) |
15:00:40 | * | ee7[m] quit (Ping timeout: 244 seconds) |
15:00:40 | * | Jitty[m] quit (Ping timeout: 244 seconds) |
15:00:45 | * | jrhawley[m] quit (Ping timeout: 240 seconds) |
15:00:56 | * | inamiyar[m] quit (Ping timeout: 240 seconds) |
15:16:30 | * | waleee-cl joined #nim |
15:26:42 | * | themoon[m] joined #nim |
15:26:59 | * | lnxw37d4 joined #nim |
15:27:03 | * | unclechu joined #nim |
15:27:24 | * | lum[m] joined #nim |
15:27:27 | * | Avatarfighter[m] joined #nim |
15:27:32 | * | leorize[m] joined #nim |
15:27:55 | * | leorize[m]1 joined #nim |
15:29:44 | * | tane joined #nim |
15:30:22 | * | nikki93[m] joined #nim |
15:31:54 | * | planetis[m] joined #nim |
15:32:04 | * | BitPuffin joined #nim |
15:32:10 | * | Helios joined #nim |
15:35:22 | * | natrys joined #nim |
15:41:57 | * | jrhawley[m] joined #nim |
15:42:03 | * | ee7[m] joined #nim |
15:42:08 | * | Jitty[m] joined #nim |
15:42:12 | * | jonjitsu[m] joined #nim |
15:42:19 | * | inamiyar[m] joined #nim |
15:43:38 | * | reversem3 joined #nim |
15:47:01 | * | lnxw37d4 quit (Quit: Bridge terminating on SIGTERM) |
15:47:02 | * | unclechu quit (Quit: Bridge terminating on SIGTERM) |
15:47:02 | * | leorize[m] quit (Quit: Bridge terminating on SIGTERM) |
15:47:02 | * | lum[m] quit (Quit: Bridge terminating on SIGTERM) |
15:47:02 | * | leorize[m]1 quit (Quit: Bridge terminating on SIGTERM) |
15:47:02 | * | themoon[m] quit (Quit: Bridge terminating on SIGTERM) |
15:47:02 | * | Avatarfighter[m] quit (Quit: Bridge terminating on SIGTERM) |
15:47:03 | * | BitPuffin quit (Quit: Bridge terminating on SIGTERM) |
15:47:03 | * | planetis[m] quit (Quit: Bridge terminating on SIGTERM) |
15:47:05 | * | ee7[m] quit (Quit: Bridge terminating on SIGTERM) |
15:47:05 | * | jonjitsu[m] quit (Client Quit) |
15:47:09 | * | nikki93[m] quit (Quit: Bridge terminating on SIGTERM) |
15:47:09 | * | jrhawley[m] quit (Quit: Bridge terminating on SIGTERM) |
15:47:09 | * | inamiyar[m] quit (Client Quit) |
15:47:09 | * | Helios quit (Quit: Bridge terminating on SIGTERM) |
15:47:10 | * | Jitty[m] quit (Quit: Bridge terminating on SIGTERM) |
15:47:10 | * | reversem3 quit (Client Quit) |
15:49:13 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5fa17bf9dc70b5159aed2c3d] |
15:51:29 | * | vicfred joined #nim |
15:57:06 | FromGitter | <gogolxdong> and koch errors ``` โ /mnt/c/Nim/koch temp c ffplay.nim โ /mnt/c/Nim/tools/kochdocs.nim(200) kochdocs โ /mnt/c/Nim/lib/pure/os.nim(2139) getDocList โ /mnt/c/Nim/lib/pure/includes/oserr.nim(94) raiseOSError ... [https://gitter.im/nim-lang/Nim?at=5fa17dd1d37a1a13d68401c6] |
15:59:15 | * | inamiyar[m] joined #nim |
16:03:40 | * | habamax joined #nim |
16:12:27 | FromDiscord | <tinygiant> @Vindaar It's an enum, but the accessor function uses it to define a pointer. The data is kept in a binary file and different types of data are stored in different areas of the files. Sending the type tells the accessor tells the function where to look within the binary file for that particular type of data. |
16:12:37 | disruptek | oddmonger: the latest gitnim release is 1.4, not 1.4rc. |
16:12:52 | FromDiscord | <tinygiant> (edit) "tells" => "to" |
16:13:01 | Yardanico | who is disruptek |
16:13:04 | disruptek | oddmonger: i'm not allowed to talk about nimble bugs anymore. |
16:13:29 | FromDiscord | <Vindaar> @tinygiant sorry, without more context I don't understand |
16:13:50 | FromDiscord | <tinygiant> Yep, I'm going to try a couple more experiments and then write up a better problem statement. |
16:13:58 | FromDiscord | <Vindaar> sounds good! |
16:15:16 | * | natrys quit (Ping timeout: 246 seconds) |
16:20:27 | * | narimiran quit (Ping timeout: 260 seconds) |
16:21:42 | disruptek | oddmonger: i just pushed 1.0.10, 1.2.8, 1.4.1, 1.5.1 releases. |
16:22:44 | * | themoon[m] joined #nim |
16:22:44 | * | hnOsmium0001[m] joined #nim |
16:22:44 | * | brainbomb[m] joined #nim |
16:22:45 | * | reversem3 joined #nim |
16:22:45 | * | lnxw37d4 joined #nim |
16:22:45 | * | planetis[m] joined #nim |
16:22:45 | * | Helios joined #nim |
16:22:45 | * | leorize[m]1 joined #nim |
16:22:45 | * | stisa[m] joined #nim |
16:22:45 | * | BitPuffin joined #nim |
16:22:45 | * | Avatarfighter[m] joined #nim |
16:22:45 | * | MTRNord[m] joined #nim |
16:22:45 | * | unclechu joined #nim |
16:22:45 | * | leorize[m] joined #nim |
16:22:45 | * | jaens[m] joined #nim |
16:22:45 | * | GitterIntegratio joined #nim |
16:22:45 | * | k0mpjut0r joined #nim |
16:22:50 | * | solitudesf1 joined #nim |
16:22:51 | * | ee7[m] joined #nim |
16:22:51 | * | nikki93[m] joined #nim |
16:22:51 | * | jonjitsu[m] joined #nim |
16:22:51 | * | guelosk[m] joined #nim |
16:22:51 | * | Jitty[m] joined #nim |
16:22:51 | * | lum[m] joined #nim |
16:22:52 | * | jrhawley[m] joined #nim |
16:22:52 | * | VijayMarupudi[m] joined #nim |
16:30:16 | disruptek | also removed 1.4rc tag since i guess it confuses people. |
16:31:08 | * | natrys joined #nim |
16:43:48 | Oddmonger | thank you disruptek |
16:46:33 | * | habamax quit (Ping timeout: 265 seconds) |
16:53:45 | * | hnOsmium0001 joined #nim |
17:02:56 | * | NimBot joined #nim |
17:07:14 | * | TomDotTom quit (Ping timeout: 264 seconds) |
17:15:06 | FromDiscord | <Recruit_main707> toSeq could convert an iterator to a sequence right? |
17:17:25 | FromDiscord | <traveledit> fat discord mods |
17:17:45 | FromDiscord | <traveledit> dead server |
17:18:19 | FromDiscord | <Zachary Carter> I think you mean phat discord mods |
17:20:21 | FromDiscord | <Zachary Carter> @Recruit_main707 yes |
17:20:34 | FromDiscord | <Zachary Carter> it will transform iterables to sequences |
17:21:35 | FromDiscord | <Recruit_main707> ok thanks |
17:21:40 | FromDiscord | <Zachary Carter> No problem |
17:39:51 | * | PMunch quit (Quit: leaving) |
17:40:43 | FromDiscord | <exelotl> phat bass |
17:40:53 | FromDiscord | <Avatarfighter> Has anyone here used nim-libp2p and have written code with it |
17:55:11 | * | NimBot joined #nim |
18:00:55 | FromDiscord | <Avatarfighter> lmao did <@!529028553896099850>join to shit on the mods and leave |
18:00:56 | * | narimiran joined #nim |
18:01:15 | FromDiscord | <Zachary Carter> well in all fairness, he shit on the server as well |
18:01:34 | FromDiscord | <Zachary Carter> (edit) "he" => "they" |
18:01:35 | FromDiscord | <Recruit_main707> he didnt leave though |
18:01:42 | FromDiscord | <Avatarfighter> yeah he did |
18:01:42 | FromDiscord | <Recruit_main707> so ban him :P |
18:01:44 | FromDiscord | <Zachary Carter> they logged off apparently |
18:01:55 | FromDiscord | <Avatarfighter> https://media.discordapp.net/attachments/371759389889003532/773245585032871936/Screen_Shot_2020-11-03_at_10.01.50_AM.png |
18:02:03 | FromDiscord | <Recruit_main707> if you can ping him he is inside i think |
18:02:06 | FromDiscord | <Avatarfighter> no |
18:02:13 | FromDiscord | <Avatarfighter> its because I pinged manually |
18:02:15 | FromDiscord | <Zachary Carter> meh, I don't think what they did was necessarily a bannable offense |
18:02:23 | FromDiscord | <Recruit_main707> @dtracers#1111 |
18:02:27 | FromDiscord | <Avatarfighter> this is a manual ping `<@214051108107059200>` |
18:02:30 | FromDiscord | <Recruit_main707> ah |
18:02:42 | FromDiscord | <Avatarfighter> replace the numbers with the users discord id |
18:02:50 | FromDiscord | <Avatarfighter> and then it'll ping |
18:02:54 | FromDiscord | <Avatarfighter> you can also do channels |
18:02:59 | FromDiscord | <Avatarfighter> like this |
18:03:02 | FromDiscord | <Avatarfighter> #moderator-only |
18:03:12 | FromDiscord | <Recruit_main707> oof |
18:03:25 | FromDiscord | <Avatarfighter> `#moderator-only` |
18:03:30 | FromDiscord | <Avatarfighter> that is for channels |
18:04:00 | FromDiscord | <Recruit_main707> how do you get the numbers though |
18:04:31 | FromDiscord | <Avatarfighter> turn on developer mode in discord and then right click on anything and do "Copy ID" |
18:05:56 | FromDiscord | <Yardanico> @Zachary Carter we had two similar ones |
18:06:07 | FromDiscord | <Zachary Carter> ah |
18:07:11 | disruptek | Oddmonger: i didn't realize someone was using gitnim or i'd be more religious about tracking releases and nightlies, etc. |
18:07:45 | FromDiscord | <Recruit_main707> is Oddmonger speaking? |
18:08:28 | FromDiscord | <Yardanico> no, disruptek is replying to old messages |
18:08:51 | Zevv | he's a bit slow |
18:08:56 | FromDiscord | <Recruit_main707> lol |
18:09:32 | disruptek | it's hard to internet without electricity. |
18:09:55 | Zevv | on cloudy days disruptek is at 300bps |
18:10:05 | FromDiscord | <Recruit_main707> make your hamster run faster |
18:10:31 | FromDiscord | <nikki> is there a way to get the refcount of a given ref, if i'm using arc? or is that just not exposed |
18:10:44 | Oddmonger | disruptek: i'm sure i'm not the only one to use it :) |
18:10:56 | Oddmonger | i've found gitnim very handy and easy to use |
18:10:56 | ForumUpdaterBot | New thread by CHEEMS96: How exactly do i start?, see https://forum.nim-lang.org/t/7027 |
18:11:13 | disruptek | neat. |
18:11:28 | disruptek | has it ever not worked? |
18:12:59 | disruptek | adfbe7c664c619980779f30ebd64c2db63c13d49 was the first 1.5.1 dist, btw. |
18:13:29 | * | habamax joined #nim |
18:14:01 | disruptek | nikki: there are some templates to interact with the rc. in the manual, i think. |
18:14:24 | disruptek | ~gitnim |
18:14:25 | disbot | gitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek |
18:14:32 | disruptek | more use reports, please. super fun. |
18:15:37 | Zevv | on cloudy days disruptek is at 300bps |
18:15:49 | FromDiscord | <nikki> will look ... another possibility is also if you can have a weak ref that can "know" its target was destroyed |
18:15:55 | disruptek | how'd you know it was cloudy? |
18:16:14 | disruptek | no, we don't have those really-rather-not-weak refs. |
18:16:31 | FromDiscord | <nikki> the usecase is to have a cache of resoursces by name that i can return a ref from in the "manager," but if everyone else dropped refs then the manager drops it from the cache |
18:16:50 | disruptek | well, again, you can look at the counter. |
18:16:58 | FromDiscord | <nikki> i could just remove from cache in the =destroy of the resource ๐ค and keep the cache one a cursors |
18:17:02 | FromDiscord | <nikki> yeah will check that out |
18:20:18 | disruptek | clyybber: i made a new project that demonstrates one of the typed macro problems. it's of much narrower scope than cps, so you may find it helpful. |
18:20:21 | disruptek | !repo carnac |
18:20:22 | disbot | https://github.com/disruptek/carnac -- 9carnac: 11magical function memoization across runtimes 15 0โญ 0๐ด |
18:23:17 | disruptek | or maybe i will find it helpful, if you can point out my mistake. |
18:23:25 | disruptek | it's cloudy today. |
18:25:44 | FromDiscord | <Avatarfighter> disruptek: are you using cellular for internet ? |
18:25:54 | disruptek | nope. |
18:26:27 | FromDiscord | <Avatarfighter> Have you considered getting a plan at Straight Talk or Google Fi for basically unlimited data? |
18:26:55 | disruptek | no, lte service is very spotty here. |
18:27:08 | FromDiscord | <Avatarfighter> Straight Talk caps at 2TB of data while Google Fi unlimited plan is unlimited till they decide you've used too much, you'll probably get better speeds that what you currently have |
18:27:15 | FromDiscord | <Avatarfighter> T-Mobile is spotty where you're at? |
18:27:47 | disruptek | afaik, yes. but i haven't researched it very deeply because it's pointless. |
18:28:01 | disruptek | all my hopes and prayers rest with starlink. |
18:28:12 | FromDiscord | <Avatarfighter> Dude I'm so hyped for starlink |
18:28:30 | FromDiscord | <Avatarfighter> I'm literally moving to the middle of nowhere in a forest if it works well |
18:28:42 | disruptek | yeah, that's about where i am. |
18:29:19 | FromDiscord | <Avatarfighter> So what I'm hearing is I'm moving in with you ๐ |
18:29:21 | disruptek | thinking about digging a hole to canada, depending on how this thing goes. |
18:29:43 | * | opal quit (Ping timeout: 240 seconds) |
18:29:46 | disruptek | this forest isn't big enough for the both of us. |
18:30:00 | FromDiscord | <Avatarfighter> ๐ |
18:30:20 | disruptek | don't worry, as far as you're concerned, that's a good thing. |
18:31:05 | FromDiscord | <Avatarfighter> lmaooo |
18:31:43 | * | opal joined #nim |
18:32:16 | disruptek | this is crazy. |
18:32:23 | disruptek | how do i not have inkscape installed? |
18:32:36 | FromDiscord | <Avatarfighter> this is a great question |
18:32:45 | FromDiscord | <Avatarfighter> better warm up that 300kbps connection to get it |
18:33:00 | disruptek | hell no, that's 1.5hrs on the bike. |
18:33:15 | FromDiscord | <Avatarfighter> rip |
18:33:23 | disruptek | no software is worth pedalling. i save my bandwidth for porn. |
18:33:43 | FromDiscord | <Avatarfighter> How far are you from a net cafe disruptek |
18:33:49 | disruptek | a what? |
18:33:59 | FromDiscord | <Avatarfighter> and that answers my question |
18:34:07 | FromDiscord | <Avatarfighter> lmaoo |
18:34:22 | disruptek | kids today. |
18:34:44 | FromDiscord | <Avatarfighter> my bad |
18:34:56 | supakeen | ok gramps |
18:35:33 | supakeen | huh i guess disruptek *is* the gramps of the nim community |
18:35:48 | FromDiscord | <Avatarfighter> don't disrespect our elders supakeen smh |
18:36:08 | supakeen | always a bit angry, doesn't like new things, has been here forever |
18:36:39 | disruptek | i will be two in nim years in april. |
18:36:51 | disruptek | the terrible twos, they call it. |
18:37:32 | FromDiscord | <Avatarfighter> i wonder when i first appeared in the irc logs |
18:37:41 | FromDiscord | <Avatarfighter> i think its been like a year and half since |
18:38:19 | Zevv | irc/2019/01/18:08:29 #nim: < FromDiscord_> <Avatarfighter> Is there an equivalent of getattr from python in nim? What I'm trying to do is get a type's field with a string version of the fields name but i'm having trouble actually using the string to get anything from the type. |
18:38:29 | FromDiscord | <Avatarfighter> lmao |
18:38:32 | FromDiscord | <Avatarfighter> welp that's embarrasing |
18:39:20 | disruptek | i had to read it three times before i understood it. |
18:39:26 | FromDiscord | <Avatarfighter> same |
18:39:27 | FromDiscord | <Avatarfighter> I think someone told me that with templates I can do `type.fields` |
18:39:40 | Zevv | irc/2017/07/13:12:50 #nim: < Zevv> Hi, is the documentation on https://nim-lang.org/docs/httpclient.html#AsyncResponse compatible with Nim 0.16.0? I'm trying to get async HTTP requests working, but I get the error "Error: invalid pragma: async" |
18:39:41 | FromDiscord | <Avatarfighter> English has never been my strongest language |
18:39:54 | FromDiscord | <Avatarfighter> awwww |
18:40:02 | FromDiscord | <Avatarfighter> Zevv's first steps with async ๐ |
18:40:17 | Zevv | that's how it all got started. That was my first hour if Nim :) |
18:40:19 | FromDiscord | <lqdev> Zevv: i wanna know where i appeared |
18:40:28 | FromDiscord | <lqdev> when |
18:40:29 | Zevv | you had too many nicks |
18:40:35 | FromDiscord | <lqdev> lqdev was my first one |
18:40:53 | disruptek | what's the significance of liquid? |
18:41:05 | disruptek | i can almost grok the meaning of `dev`. |
18:41:21 | FromDiscord | <lqdev> it's none. it's just a word that sounded cool to me back in 2014. |
18:41:46 | disruptek | man, you have so many more cool words in store for you. |
18:41:46 | FromDiscord | <Avatarfighter> I cannot wait for when nim-libp2p gets detailed docs |
18:41:52 | Zevv | not liquid600pgm? |
18:41:57 | disruptek | try this one: RIM JOB |
18:42:06 | disruptek | i mean, it's two words, really. |
18:42:12 | disruptek | but, awesome, right? |
18:42:15 | FromDiscord | <lqdev> Zevv: that may be the case |
18:42:18 | Zevv | irc/2019/03/05:17:50 #nim: < FromGitter> <liquid600pgm> hello! |
18:42:20 | FromDiscord | <lqdev> yeah i think you're right |
18:42:29 | Zevv | see, that's a friendly guy |
18:42:41 | FromDiscord | <Avatarfighter> hey disruptek have you used nim-libp2p |
18:42:48 | disruptek | nope. |
18:43:02 | disruptek | i'm gonna port gun. |
18:43:14 | disruptek | that will be my p2p lib. |
18:43:23 | FromDiscord | <Avatarfighter> gun? |
18:43:29 | disruptek | yeah. |
18:43:31 | FromDiscord | <Avatarfighter> 9mm or a real library |
18:44:01 | FromDiscord | <Avatarfighter> 5.56 or 7.62 or .45 ? |
18:44:04 | disruptek | https://gun.eco/ |
18:44:24 | * | casaca quit (Remote host closed the connection) |
18:44:35 | FromDiscord | <Avatarfighter> ah so its not a firearm |
18:44:45 | disruptek | not this one. |
18:44:51 | disruptek | you said person to person, right? |
18:45:11 | FromDiscord | <Avatarfighter> yeah |
18:45:12 | disruptek | i don't gun p2p. i'm more of a ratta-tatt-tatt-blamo. |
18:45:14 | FromDiscord | <Avatarfighter> peer-to-peer |
18:45:18 | FromDiscord | <Avatarfighter> :L |
18:45:37 | disruptek | oh, fuck my peers. what have they ever done for me? |
18:47:58 | FromDiscord | <Avatarfighter> good question |
18:52:59 | ForumUpdaterBot | New thread by G5becks: Nim control flow based type analysis, see https://forum.nim-lang.org/t/7028 |
18:59:16 | disruptek | when you use gitnim, you don't have a single version of nim. you have all versions of nim. |
19:03:49 | Prestige | The code in that thread is weird, I'm curious about it, too |
19:04:30 | disruptek | what thread? |
19:04:35 | Prestige | https://forum.nim-lang.org/t/7028 |
19:05:17 | FromDiscord | <Avatarfighter> good thing the nimions are on it |
19:05:26 | disruptek | it's a guy trying to reduce a test. |
19:05:32 | Prestige | ah I see |
19:07:10 | FromDiscord | <Avatarfighter> i am so excited for nim-libp2p guys |
19:07:27 | disruptek | oh yeah? |
19:08:02 | FromDiscord | <Avatarfighter> im literally reading the code as if its a book |
19:08:07 | FromDiscord | <Avatarfighter> im SO excited |
19:08:33 | FromDiscord | <Avatarfighter> as soon as the DHT capabilities are added I'm done in life |
19:10:24 | FromDiscord | <Avatarfighter> im going to make the worst p2p chat client known to man once DHT is supported |
19:10:38 | * | MultDiv joined #nim |
19:11:44 | MultDiv | Does anyone know what algorithm is used for floating point multiplication/division in Nim? |
19:11:58 | MultDiv | I tried to look into the source code and couldn't really tell. |
19:13:03 | FromDiscord | <lqdev> it's CPU-dependent |
19:14:40 | MultDiv | Okay, gotcha. Was just absentmindedly profiling them to see if there is a way to get speed gains. |
19:15:24 | disruptek | there is, but they beat you to it: change the cpu. |
19:16:38 | MultDiv | lol, fair. |
19:17:22 | MultDiv | I'm used to python so Nim is blazing fast, hell I think I could code using an arduino and I'd still think nim was performant as hell. |
19:17:41 | disruptek | yeah, when you come from python there's a shitload of headroom. |
19:19:06 | disruptek | what's great about nim, though, is that you can write idiomatic code /and it's fast/ -- it's fast to read, fast to write, and runs fast. |
19:19:37 | disruptek | it's not like you're paying penalties to write what you want. |
19:19:49 | disruptek | that's what drove me nuts about python. |
19:20:08 | disruptek | i can either write elegant, expressive code, or i can write fast code. never both. |
19:26:17 | MultDiv | Yeah I do like that idiomatic code is fast. I'm just playing around with learning closer to realtime/high frequency stuff so I'm trying to be conscious of speed. |
19:30:49 | disruptek | it makes sense. nim is a game of cycles. |
19:30:57 | disruptek | !repo criterion |
19:30:58 | disbot | https://github.com/LemonBoy/criterion.nim -- 9criterion.nim: 11Statistic-driven micro-benchmark framework 15 37โญ 4๐ด 7& 1 more... |
19:31:05 | disruptek | !repo disruptek/criterion |
19:31:05 | disbot | https://github.com/disruptek/criterion -- 9criterion: 11statistics-driven micro-benchmarking framework 15 8โญ 0๐ด |
19:31:08 | disruptek | use my fork. |
19:31:37 | FromDiscord | <Avatarfighter> lmao |
19:31:59 | MultDiv | lol what's in your fork that isn't in the original? |
19:32:08 | FromDiscord | <Avatarfighter> his name top left |
19:32:23 | MultDiv | lol |
19:32:30 | FromDiscord | <Avatarfighter> jokes ofc |
19:32:36 | disruptek | i fixed a couple things, and it's in important packages so we can keep it working. |
19:32:58 | disruptek | lemonboy is the finest nim programmer that i've ever seen. |
19:33:08 | MultDiv | Yeah I was using nimbench but I like that this gives more data. |
19:34:27 | FromDiscord | <Avatarfighter> looks like lemonboy is using zig now |
19:34:35 | disruptek | yeah. |
19:34:47 | FromDiscord | <Recruit_main707> who? |
19:35:06 | FromDiscord | <Avatarfighter> https://github.com/LemonBoy |
19:36:43 | FromDiscord | <Recruit_main707> i have opposite but strong feelings right now, he made a hombrew loader for the wii, used nim, but uses zig.... |
19:36:56 | FromDiscord | <Recruit_main707> (edit) "hombrew" => "homebrew" |
19:37:00 | narimiran | he was a great contributor to nim |
19:38:46 | FromDiscord | <Rika> Did he just move on or did something specific happen |
19:38:49 | FromDiscord | <nikki> how strict are the rules for accessing unexported (no ``) fields outside of the module? it seems like ... i'm able to access it |
19:39:03 | narimiran | politics |
19:39:06 | FromDiscord | <Rika> Youโre not supposed to be able to access it |
19:39:33 | FromDiscord | <Rika> Nikki did you include it or import it |
19:39:45 | FromDiscord | <nikki> import |
19:40:47 | disruptek | that would be very odd if true. |
19:40:55 | FromDiscord | <nikki> i have a global `var` of type `T` exported out of a module, and `T` has some unexported field that i'm able to access |
19:41:10 | FromDiscord | <nikki> lemme see if i can make a minimal repro case that i can post |
19:44:08 | FromDiscord | <nikki> ah hmm is it bc. the code is written in a body passed to a template that's defined in that module ๐ฎ |
19:44:47 | disruptek | templates aren't dirty by default. |
19:45:09 | disruptek | but that said, it could be a bug. |
19:45:19 | FromDiscord | <nikki> yeah repro'd with the template thing in a minimal example |
19:45:45 | disruptek | hmm, that's... really tricky. |
19:46:13 | disruptek | you can put any code you want in there. |
19:46:19 | disruptek | spooky action at a distance. |
19:47:46 | FromDiscord | <nikki> https://gist.github.com/nikki93/1081cb653455b7bb2145db4af04b46f3 |
19:47:47 | FromDiscord | <nikki> the example |
19:48:19 | FromDiscord | <nikki> disruptek: do you know if i can somehow explicitly tell the template to ... not do that |
19:48:22 | disruptek | if i bindsym in a passed template body... where am i bindsym'ing? |
19:48:31 | disruptek | it has to be the original code, right? |
19:48:51 | disruptek | where else? |
19:48:57 | * | mbomba joined #nim |
19:49:26 | disruptek | so now i can import that into your module and monkey-patch it. |
19:49:50 | * | lritter quit (Ping timeout: 264 seconds) |
19:50:45 | FromDiscord | <nikki> by 'original' do you mean the use-site or the defn-site of the template |
19:51:08 | FromDiscord | <nikki> depends on perspective haha so can't tell |
19:51:11 | disruptek | i guess we can control this with typed/untyped. |
19:51:53 | * | MultDiv quit (Remote host closed the connection) |
19:51:58 | FromDiscord | <nikki> hmm. i guess if i did this as a `do` parameter to a proc then it wouldn't have the issue |
19:52:35 | disruptek | you pull these bound symbols in at the declaration site, so that's fine. they will fail in a typed version. |
19:53:25 | FromDiscord | <nikki> oh interesting, yeah in 'typed' it works out |
19:53:35 | FromDiscord | <nikki> i should really read up on the difference across those... |
19:54:01 | disruptek | typed is the exciting part, but it's a super tiny needle right now. |
19:54:29 | disruptek | i should probably stream bugfixing it. |
19:54:31 | * | TomDotTom joined #nim |
19:54:42 | FromDiscord | <Avatarfighter> yes |
19:54:44 | FromDiscord | <Avatarfighter> yes you should |
19:54:55 | FromDiscord | <Avatarfighter> disruptek when is the youtube channel getting created ๐ค |
19:55:08 | disruptek | starlink first. |
19:55:24 | FromDiscord | <Avatarfighter> ok |
19:55:36 | FromDiscord | <Avatarfighter> did you sign up for the public beta? |
19:55:45 | disruptek | yeah. |
19:55:51 | disruptek | a couple times. ๐ |
19:56:08 | FromDiscord | <Avatarfighter> ok that's exciting I hope they pick you for the next rounds of the beta |
19:56:24 | FromDiscord | <nikki> maybe i should just make everything typed until i find that i'm not able to write some code i want to write with some given template xD |
19:56:51 | disruptek | most people don't even give their templates argument types. |
19:57:14 | disruptek | maybe i look like an asshole for doing it. |
19:57:21 | FromDiscord | <nikki> i see. so ... my usecase here was kind of for a control structure, that doesn't really do anything anaphoric or anything |
19:57:40 | disruptek | hold-on, lemme look up anaphoric. |
19:57:52 | mipri | unhygienic macro |
19:57:59 | disruptek | ahhh, triple-letter, double word score. |
19:58:09 | FromDiscord | <nikki> do i win |
19:58:17 | disruptek | it would be hard for me to catch up. |
19:58:26 | FromDiscord | <nikki> i'll remember this one |
20:20:18 | notchris | dom96: is it expected that nim open-cv cant access the osx camera |
20:22:22 | FromDiscord | <dom96> Possibly, wouldn't be surprised if Apple has locked down things |
20:22:38 | FromDiscord | <dom96> But that wouldn't be specific to Nim |
20:24:05 | FromDiscord | <Avatarfighter> opencv can in python |
20:24:09 | FromDiscord | <Avatarfighter> its probably the wrapper |
20:26:40 | FromDiscord | <dom96> I would find a sample in C and compare to the Nim version |
20:26:42 | FromDiscord | <Avatarfighter> Or Python's opencv wrapper has custom code but idk |
20:26:47 | FromDiscord | <Avatarfighter> yeah |
20:26:48 | FromDiscord | <dom96> (assuming the C one works) |
20:40:46 | FromDiscord | <nikki> is it safe to remove elements from a `Table[T, U]` by key while iterating through it |
20:41:21 | mipri | it should be, but I believe there's an assertion that'll complain |
20:41:47 | mipri | you can push to-be-removed keys to a seq and remove elements in a separate pass |
20:47:41 | FromDiscord | <notchris> @dom96 I think it'd because it uses new methods to access the camera, there was a warning about the current wrapper having deprecated methods |
20:47:52 | FromDiscord | <notchris> (edit) "it'd" => "it's" |
20:48:27 | FromDiscord | <notchris> And to be clear it didn't error, it simply just came back nil for the camera source |
20:50:00 | FromDiscord | <notchris> I feel like Apple has locked things down though, I was telling my coworkers today about how I cant run execProcess or execCmd to start an application and keep it running, it will instantly close |
20:50:09 | FromDiscord | <notchris> while in a normal shell (outside of vscode) it works fine |
20:50:25 | FromDiscord | <notchris> Thats after giving vscode full permissions etc |
20:50:51 | FromDiscord | <dom96> The wrapper is like 4 years old+, but updating shouldn't be too bad. PRs appreciated |
20:51:04 | FromDiscord | <notchris> Ill do my best, might be above my skill level |
20:51:17 | FromDiscord | <notchris> Ill try and check it out after work today |
20:55:30 | * | narimiran quit (Ping timeout: 258 seconds) |
21:06:34 | * | habamax quit (Ping timeout: 260 seconds) |
21:14:13 | * | casaca joined #nim |
21:14:43 | FromDiscord | <nikki> is there a way to specify flags like `--gc:arc` from within the file itself? would be nice for one-off test files in this sandbox directory where i'm playing with nim |
21:14:49 | FromDiscord | <nikki> like some sort of pragma or sth |
21:16:01 | * | casaca quit (Remote host closed the connection) |
21:16:30 | disruptek | not yet. |
21:16:53 | mipri | you can put that in a nim.cfg in the directory with that file |
21:16:53 | FromDiscord | <Recruit_main707> no, i just make a main file that compiles and runs the code i want to test with different flags |
21:17:07 | FromDiscord | <Yardanico> yes, you can do that |
21:17:22 | FromDiscord | <nikki> @Yardanico how? |
21:17:43 | FromDiscord | <nikki> mipri: oh yeah; aware of that approach. just wanted to see if there was a lightweight within-file way for silly test files |
21:17:46 | FromDiscord | <Yardanico> oh |
21:17:48 | FromDiscord | <Yardanico> there's no way for that |
21:18:18 | mipri | if you use nimcr you can pass flags on the second line |
21:18:27 | mipri | https://github.com/PMunch/nimcr - last part, Options for the nim compiler |
21:18:50 | FromDiscord | <nikki> oh cool ๐ฎ |
21:19:29 | * | natrys quit (Quit: natrys) |
21:19:59 | mipri | the final thing you can do is throw tasks in a yourmod.nimble that selfExec to compile with whatever flags |
21:20:22 | disruptek | that would be too obvious. |
21:20:42 | FromDiscord | <nikki> disruptek: i wasn't able to find a way to get the rc on nim refs, but i did a wrapper 'holder' object with the referred obj maintaining my own refcount: https://play.nim-lang.org/#ix=2CVK |
21:21:11 | FromDiscord | <nikki> the usecase is basically for resources in this game engine thing; where game objects can ask the graphics manager for an image handle given a file path, and if the image is already loaded it just returns a handle to that |
21:21:56 | FromDiscord | <nikki> i want to do the pass of going over and clearing away 0-refcount images explicitly in a cleanup phase at the end of the frame, so the common scenario of exiting a scene and loading a new one doesn't lead you to unload and reload images that are common between the scenes |
21:22:15 | FromDiscord | <nikki> (or eg. it still stores images around in the cache for a few frames / some time or something) |
21:22:38 | FromDiscord | <nikki> still a nim n00b so the code probs sux in some ways lolz |
21:24:00 | * | casaca joined #nim |
21:24:18 | FromDiscord | <lqdev> you could just assign the values nil |
21:24:31 | FromDiscord | <lqdev> and load them lazily |
21:24:41 | FromDiscord | <lqdev> but i guess then unloading is a problem |
21:25:05 | FromDiscord | <nikki> which values? but yeah unloading is half or more than half of the point of the impl |
21:25:13 | FromDiscord | <lqdev> values in the table |
21:25:28 | FromDiscord | <lqdev> like {"myresource": nil} |
21:25:32 | FromDiscord | <lqdev> and fetching would load the resource |
21:25:32 | FromDiscord | <nikki> ah and then load if not loaded when rendering? sure that's fine |
21:25:56 | FromDiscord | <lqdev> i generally prefer loading resources at the start of the application |
21:26:07 | FromDiscord | <nikki> but yeah unloading automatically when game objects don't exist anymore is definitely part of the idea |
21:26:08 | FromDiscord | <lqdev> it's an easier approach that has faster performance |
21:26:31 | FromDiscord | <nikki> oh ok. that's interesting bc. your suggestion was to make it lazy haha |
21:26:31 | FromDiscord | <lqdev> but uses more memory |
21:26:32 | * | madpata joined #nim |
21:26:41 | * | ChanServ quit (shutting down) |
21:27:05 | FromDiscord | <nikki> yeah the main thing is to give a flexible api where; if you wanted to load everything upfront you just create and have a bunchof holders that live forever |
21:27:35 | FromDiscord | <nikki> maybe i'll just do the load everything approach now tho -- not sure bc. the art in the game is a lot of hand-drawn stuff that is kinda high-res |
21:30:00 | FromDiscord | <nikki> this is more for the gpu texture resource than the image data in memory itself. i might still just have all the image data in memory at start anyways |
21:38:05 | FromDiscord | <whisperdev> I just noticed D has a crown on it on reddit |
21:44:15 | * | mbomba quit (Quit: WeeChat 2.9) |
21:50:01 | * | solitudesf quit (Ping timeout: 264 seconds) |
22:09:11 | * | tane quit (Quit: Leaving) |
22:22:40 | FromDiscord | <ElegantBeef> Anyone else think that โต`import module` instead of `import module` followed by `export module` is a nice idea? |
22:26:26 | * | krux02 quit (Quit: Leaving) |
22:28:09 | * | Jesin quit (Quit: Leaving) |
22:37:09 | * | Jesin joined #nim |
22:39:33 | FromGitter | <jrfondren> is there something lost in translation there? |
22:39:51 | FromGitter | <jrfondren> are those two 'import module's not supposed to be the same? |
22:43:41 | FromDiscord | <ElegantBeef> I mean my point is using the export marker instead of the follow up of export |
22:43:58 | FromDiscord | <ElegantBeef> When using the entire module/exporting it it reduces redundant typing but contains the same information |
22:44:35 | FromGitter | <jrfondren> ok, so what's lost in translation is an asterisk |
22:45:01 | FromDiscord | <ElegantBeef> ah yes irc logs show a > instead |
22:45:25 | FromGitter | <jrfondren> I don't have any strong feelings about it. |
22:46:37 | FromDiscord | <ElegantBeef> I suppose a more reasonable alternative is simply just a `ximport` or similarly named macro |
22:47:24 | FromGitter | <jrfondren> I'd see that a much less reasonable alternative actually. how many times a day are you exporting modules? |
22:48:03 | FromDiscord | <ElegantBeef> I dont think that matters as much as the fact it's sort annoying to have to rewrite what you've already written but slightly different |
22:48:13 | FromGitter | <jrfondren> well the nice thing with templates is that you can define them on the spot where you use them |
22:48:47 | FromDiscord | <ElegantBeef> Well a template wouldnt work afaik since the import needs a path and the export is just the module name |
22:49:31 | FromGitter | <jrfondren> ah yeah |
22:49:34 | FromDiscord | <ElegantBeef> But eitherway was more of a question of "What's the feeling towards an import/export" |
22:56:00 | FromDiscord | <ElegantBeef> It's very much just a case of as i'm working on this game project i have a lot of `import` followed by `export` without any selective exporting, so seems very redundant |
23:00:26 | FromGitter | <sealmove> what are all the available types for a discriminator? |
23:01:08 | FromGitter | <sealmove> int from 0 to 65535, string, what else? |
23:01:47 | FromDiscord | <ElegantBeef> For object variants? |
23:03:10 | FromDiscord | <ElegantBeef> sent a long message, see http://ix.io/2CWi |
23:03:15 | FromGitter | <sealmove> yes |
23:03:30 | FromDiscord | <ElegantBeef> So seems ordinals and strings? |
23:03:50 | mipri | an enum. not a pointer. if you're wanting to discriminate on a pointer being null, look at the source to std/options |
23:04:10 | FromGitter | <sealmove> i know you can only use ordinals in range 0 .. 65535 and that you can also use strings |
23:05:24 | FromGitter | <sealmove> wait, does string work? not sure actually |
23:07:55 | * | mbomba joined #nim |
23:08:03 | FromGitter | <sealmove> hmm ok I guess only ordinal in range 0 .. 65535; basically intended for enums only |
23:10:50 | FromDiscord | <ElegantBeef> Yea and bools only work due to the fact they're actually ordinals |
23:11:23 | FromGitter | <sealmove> yeah, and specifically in range 0 .. 65535 |
23:11:59 | FromGitter | <sealmove> Is there an alternative to object variants for runtime typing? |
23:12:16 | FromGitter | <sealmove> I really love them but this limitation is important for my use case |
23:12:23 | mipri | OOP, I suppose. |
23:12:44 | FromGitter | <sealmove> methods don't work at CT |
23:13:51 | FromGitter | <sealmove> oh never mind |
23:14:09 | FromGitter | <sealmove> hmm ok I will check if OOP is suitable, thx |
23:22:01 | FromGitter | <jrfondren> ah man, what a painful error |
23:22:18 | FromGitter | <jrfondren> I changed an array[4096, char] out for a newString(4096) |
23:22:27 | FromGitter | <jrfondren> but still passed buf.addr as the thing to be written to |
23:31:55 | FromDiscord | <Gyllou> hiya |
23:39:20 | FromDiscord | <ElegantBeef> Hello |
23:46:35 | FromGitter | <sealmove> hmm i can create artificial enums that correspond to specific values of the "real" discriminator |
23:48:39 | FromGitter | <sealmove> for example if I want to switch types depends on whether a string has the value "hey", "hoy" or "hiy", I could make an `artificialEnum = enum case0, case1, case2` and when creating the object, if the string has the value "hey" then I use artificialEnum.case0, if it has the value "hoy" then use artificialEnum.case1, and so on. |
23:49:44 | FromDiscord | <ElegantBeef> Time to go make the macro to make the (string, enum) table, and the enums ๐ |
23:50:39 | FromGitter | <sealmove> yup, takes more work to generate this kind of code, but it gives true type switching with a discriminator or arbitrary type |
23:57:16 | FromGitter | <sealmove> this kind of code: https://play.nim-lang.org/#ix=2CWq |