00:01:18 | FromDiscord | <__ibrahim__> can nim be used as a purely functional language? |
00:02:31 | leorize | @KingDarBoja: hmm, a question, do you ever throw the base error? |
00:02:45 | leorize | __ibrahim__: no |
00:03:02 | leorize | eventually you gotta do I/O and you can't do that "pure" |
00:03:58 | FromDiscord | <KingDarBoja> Yes |
00:04:08 | FromDiscord | <KingDarBoja> I will but haven't reached that module (execution) |
00:04:40 | FromDiscord | <KingDarBoja> Still thinking about my approach, seems like shorter |
00:04:50 | FromDiscord | <KingDarBoja> seems shorter* |
00:05:12 | FromDiscord | <KingDarBoja> https://imgur.com/b8pXb5l the "messy" one but now I have changed my mind lol |
00:05:21 | FromDiscord | <__ibrahim__> so can do everything pure func but I/O |
00:05:32 | leorize | I'm not sure about that |
00:05:40 | leorize | memory allocation is not really "pure" |
00:05:54 | leorize | but most functional prog lang just assume that it is pure |
00:06:34 | FromDiscord | <__ibrahim__> yes |
00:07:26 | FromDiscord | <exelotl> @__ibrahim__ I guess you can use nim in a purely functional style if you really want to. See e.g. https://github.com/zevv/aoc2019/blob/master/08/main.nim |
00:09:02 | FromDiscord | <__ibrahim__> thats very interesting thank you @exelotl |
00:09:41 | FromDiscord | <exelotl> np :) it's not my cup of tea but it can be done haha |
00:10:11 | * | Hideki_ joined #nim |
00:11:38 | FromDiscord | <__ibrahim__> not mine either, paradigms can-o-worms got me curious |
00:12:04 | FromGitter | <sealmove> disruptek: I worked on the official implementation (in Scala). So we don't have it in CT. You have to generate your parser using the official Kaitai Struct compiler with the argument `-t nim`. |
00:13:10 | FromDiscord | <__ibrahim__> but i think as leorize said, it maybe not pure functional. |
00:14:49 | * | Hideki_ quit (Ping timeout: 265 seconds) |
00:15:58 | FromDiscord | <__ibrahim__> https://min-lang.org |
00:17:21 | Yardanico | yes |
00:17:33 | Yardanico | there's also http://sprylang.se/ |
00:17:56 | Yardanico | or https://github.com/liquid600pgm/rod but it's in relatively early state |
00:19:41 | FromDiscord | <__ibrahim__> fascinating |
00:21:05 | FromDiscord | <__ibrahim__> funny question: could you theortically make nim's keywords use another language? (russian, chinese, etc...) |
00:23:27 | FromGitter | <sealmove> theoretically? of course, why not? |
00:24:01 | FromDiscord | <__ibrahim__> xD |
00:24:18 | FromDiscord | <__ibrahim__> how bout in reality? |
00:25:08 | FromGitter | <sealmove> depends on what you are thinking |
00:25:15 | FromGitter | <sealmove> like a fork on the language? |
00:25:20 | FromGitter | <sealmove> or do it within it? |
00:26:12 | * | Hexeratops quit (Remote host closed the connection) |
00:28:00 | FromDiscord | <__ibrahim__> like replace the keywords so that u can program it in a different language |
00:28:10 | FromDiscord | <__ibrahim__> like translating nim from english to x |
00:28:33 | FromDiscord | <__ibrahim__> same exact functionality, just different unicode characters |
00:29:58 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
00:30:06 | * | njoseph joined #nim |
00:32:04 | FromDiscord | <__ibrahim__> إكو "hello world" |
00:32:09 | FromDiscord | <__ibrahim__> xD |
00:38:34 | FromGitter | <sealmove> You would have to fork the language and change keywords. |
00:39:18 | FromGitter | <sealmove> They are no overridable |
00:42:30 | FromDiscord | <__ibrahim__> that's coool |
00:42:41 | FromDiscord | <__ibrahim__> thanks sealmove |
00:42:58 | * | ryan__ joined #nim |
00:45:45 | * | ryan_ quit (Ping timeout: 265 seconds) |
01:00:35 | FromDiscord | <Skaruts> how to access the elements of a pointer array from C? (in my case a `ptr Color` retrieved by `GetImgeData()`, from Raylib) |
01:02:24 | * | chemist69_ joined #nim |
01:02:31 | * | Hideki_ joined #nim |
01:02:44 | * | Hideki_ quit (Remote host closed the connection) |
01:04:39 | leorize[m] | cast it to ptr UncheckedArray[Color] |
01:05:18 | * | chemist69 quit (Ping timeout: 256 seconds) |
01:08:30 | FromDiscord | <Skaruts> seems to work |
01:08:35 | FromDiscord | <Skaruts> but how do iterate it? |
01:09:20 | FromDiscord | <KingDarBoja> leorize |
01:09:42 | FromDiscord | <KingDarBoja> What is the reasoning behind exception not being `ref` but raise statement requires it lol |
01:10:43 | leorize[m] | Skaruts: uhmm, you got the size, right? then iterate from 0 to size - 1 |
01:11:51 | leorize[m] | @KingDarBoja: historical reason lol |
01:12:31 | FromDiscord | <Skaruts> ah ok, I was thinking in terms of `for x in data` |
01:12:40 | FromDiscord | <Skaruts> thanks |
01:12:51 | Prestige | Elegant Beef: I was able to do this for masks: https://0x0.st/i1_p.txt |
01:13:17 | Prestige | We convert TXEvent.xkey.state and the Mask with this function and compare them |
01:13:46 | FromDiscord | <KingDarBoja> lol ok |
01:14:38 | FromDiscord | <KingDarBoja> At the end, I stick to my first approach, easier IMO |
01:14:41 | FromDiscord | <KingDarBoja> https://github.com/KingDarBoja/Phosphate/blob/master/src/error/syntax_error.nim and works 😄 |
01:15:20 | FromDiscord | <KingDarBoja> I have to admit that not having a `super` call got me out of place |
01:15:34 | disruptek | there's a super call. |
01:16:53 | disruptek | https://nim-lang.github.io/Nim/system.html#procCall%2Cuntyped |
01:18:42 | FromDiscord | <Elegant Beef> Yea i know |
01:18:49 | FromDiscord | <Elegant Beef> I already use them prestige |
01:19:38 | Prestige | I thought ealier you said you used a map for modifiers Elegant Beef |
01:19:49 | FromDiscord | <Elegant Beef> For serializing/deserializing |
01:20:03 | FromDiscord | <Elegant Beef> I have this function, albiet pretty silly |
01:20:03 | FromDiscord | <Elegant Beef> https://hatebin.com/qfmoqheisd |
01:20:21 | FromDiscord | <Elegant Beef> Which is getting key.keycode and key.state |
01:20:30 | FromDiscord | <KingDarBoja> WHAT !?? |
01:21:02 | FromDiscord | <KingDarBoja> Woah woah... I need some example with that procCall |
01:21:10 | FromDiscord | <Elegant Beef> Has to be the worst url on a documentation site |
01:21:10 | FromDiscord | <Elegant Beef> https://cdn.discordapp.com/attachments/371759389889003532/701603334511001671/unknown.png |
01:21:27 | Prestige | ah I'm using a table instead of iterating over the bindings Elegant Beef |
01:21:57 | FromDiscord | <Elegant Beef> I will probably do the same but i couldnt be arsed to find a nice hash and didnt want to use a string |
01:22:22 | FromDiscord | <Elegant Beef> You also dont need to put my name at the end, im on discord that does fuck all 😛 |
01:22:47 | FromDiscord | <KingDarBoja> https://nim-lang.org/docs/manual.html#multiminusmethods-inhibit-dynamic-method-resolution-via-proccall |
01:23:20 | Prestige | Lol oh rip |
01:23:39 | FromDiscord | <Elegant Beef> Sadly this bot doesnt even mention someone if you do @ followed by the persons name |
01:26:56 | disruptek | huh? |
01:27:02 | FromDiscord | <Mask> what is the best way to do this... for abstraction purposes? |
01:27:02 | FromDiscord | <Mask> https://cdn.discordapp.com/attachments/371759389889003532/701604805705203862/unknown.png |
01:27:21 | FromDiscord | <Mask> i tried `let sizeboard = 5` |
01:27:34 | disruptek | const sizeboard |
01:27:38 | FromDiscord | <Mask> ah |
01:27:39 | FromDiscord | <Mask> thaks |
01:28:25 | FromDiscord | <KingDarBoja> Mmmm no idea how to use it to be honest, the procCall |
01:28:42 | disruptek | why do you think you want inheritance? |
01:28:46 | disruptek | (usually, you don't) |
01:31:49 | FromDiscord | <KingDarBoja> Well it is supposed to provide shared props between several inherited types from the base type |
01:32:43 | FromDiscord | <KingDarBoja> And provide the same base logic for those |
01:32:52 | FromDiscord | <KingDarBoja> That's why I needed the super call |
01:33:19 | * | couven92 quit (Ping timeout: 260 seconds) |
01:33:26 | FromDiscord | <KingDarBoja> So my inherited type calls the newParentType proc and perform some setup, then use that for my inherited type setup |
01:33:28 | disruptek | not a good reason, but if you want the complexity, it's there for you. |
01:33:57 | FromDiscord | <KingDarBoja> Once again, making a 1:1 port probably is a complex approach but well, so far so good D: |
01:34:12 | * | ryan__ is now known as number_one |
01:34:17 | FromDiscord | <KingDarBoja> And tbf, I am used to OOP |
01:35:56 | disruptek | sure, but you will have more success if you exploit nim's strengths rather than those of another language. |
01:36:26 | FromDiscord | <KingDarBoja> What do you recommend when dealing with things like inheritance? |
01:36:51 | FromDiscord | <Mask> how can i use operator overloading on `echo`? In python, `print` implicitly calls the parameter's `__str__` function. |
01:37:04 | disruptek | in my experience, it adds needless complexity and subtle bugs. |
01:37:14 | disruptek | echo implicitly applies $ to its arguments. |
01:37:25 | FromDiscord | <KingDarBoja> declare some proc like -> proc `$` () |
01:37:30 | FromDiscord | <Mask> awesome thanks again. |
01:37:34 | FromDiscord | <Mask> very cool |
01:37:34 | FromDiscord | <KingDarBoja> Oops, wait |
01:37:55 | FromDiscord | <Mask> `$` |
01:37:59 | FromDiscord | <Mask> i know |
01:38:02 | FromDiscord | <Mask> ` |
01:38:06 | FromDiscord | <KingDarBoja> Okay... darn formatting |
01:38:10 | FromDiscord | <Mask> yeah lol |
01:38:15 | disruptek | you can impl your own such feature with a varargs[someTypeDesired, someTransformingProc] |
01:38:20 | disruptek | this is how echo is impl. |
01:38:37 | FromDiscord | <Mask> hmmm |
01:38:42 | FromDiscord | <Mask> okay i will look into that |
01:38:45 | disruptek | you can also use converters, but they are a loaded gun to be wielded sparingly. |
01:38:54 | FromDiscord | <Mask> gotcha |
01:39:33 | lmariscal | @dom96 are you there? |
01:40:16 | FromDiscord | <KingDarBoja> What are Nim's strengths (besides macros) ? |
01:40:25 | FromDiscord | <KingDarBoja> Just to keep that in mind |
01:40:41 | disruptek | king: basically, the advice is to try to use variant objects instead. with templates, macros, concepts... variant objects are likely the fastest and slickest solution. |
01:41:58 | disruptek | a strength is that the language is large and powerful and fast. the stdlib doesn't always exploit this, but if the stdlib had what you wanted, you wouldn't be here. |
01:42:32 | disruptek | so, you build a thing. it runs fast. when you are ready to optimize it, it will run like greased lightning. |
01:42:46 | disruptek | make it work, make it correct, make it fast. |
01:43:06 | FromDiscord | <KingDarBoja> That last stmt is true |
01:43:15 | FromDiscord | <KingDarBoja> I am probably missing the make it correct and fast part |
01:43:41 | disruptek | start with stdlib. make it work. everyone goes through a period of chafing against the language. it's normal. |
01:43:48 | leorize | I'm hating windows so much now |
01:44:09 | leorize | their piping system can only do synchronous i/o |
01:44:11 | FromDiscord | <KingDarBoja> That's what I am doing... but not sure how large is the stdlib |
01:44:22 | leorize | and it errors out if you close one end of the pipe :) |
01:44:26 | Prestige | I'm surprised you use windows |
01:44:27 | FromDiscord | <KingDarBoja> And don't get me wrong, I am taking notes of every advice |
01:44:38 | FromDiscord | <KingDarBoja> Bro, I use Windows too 😛 |
01:44:43 | leorize | not that I use windows, but my library has to support windows |
01:44:47 | disruptek | leorize: i think you need ParentStreams. |
01:44:49 | Prestige | ah |
01:45:32 | leorize | nah, the well known "walkaround" is to create a randomly named named pipe |
01:45:35 | leorize | and I hate that |
01:45:59 | leorize | because it's named now I gotta worry about it's access control |
01:46:17 | FromDiscord | <KingDarBoja> But disruptek advice to switch to object variant is giving me the energy to use it lol |
01:46:29 | disruptek | i've been here a year. i'm not a good programmer, but you cannot help but to soak up a knowledge of the language's geography. traps and pitfalls as well as smooth routes. |
01:47:25 | disruptek | leorize: did you try asynctools? |
01:47:43 | disruptek | because it's probably what you want. |
01:47:51 | leorize[m] | yes, but it doesn't have what I want |
01:47:58 | disruptek | i don't believe it. |
01:47:58 | leorize[m] | so I'm building one from scratch |
01:48:32 | disruptek | bad news, good news, i guess. |
01:48:36 | leorize[m] | well I need a piping system that can do both synchronous i/o and async i/o |
01:48:57 | FromDiscord | <KingDarBoja> You speaking to me disrupt? |
01:49:01 | * | lritter joined #nim |
01:49:03 | leorize[m] | I'm making an alternative to osproc, it has to work properly and cover whatever osproc has |
01:49:35 | leorize[m] | and I don't want to pull in deps because I don't trust nimble |
01:49:35 | disruptek | king: not since i pinged leorize. |
01:49:51 | FromDiscord | <KingDarBoja> lol ok 😄 |
01:50:10 | disruptek | you will be fine; just stick to what works. |
01:50:21 | FromDiscord | <KingDarBoja> Wise advice |
01:50:37 | leorize[m] | also asyncpipes doesn't have the kind of api that I want :P |
01:50:38 | FromDiscord | <KingDarBoja> I just tend to seek what's the best approach but you're right, better make it work first then optimize |
01:51:00 | FromDiscord | <KingDarBoja> You can raise issues an all you want 😄 |
01:51:01 | disruptek | it's good to know what's out there, but it's even better to know what works. |
01:52:16 | leorize | Araq: how does `=destroy` attachment work? do I have to export my `=destroy`? |
01:52:25 | FromDiscord | <KingDarBoja> Neither Python nor JS/TS deals with ptr or ref, that's a big game changer for me. |
01:53:05 | disruptek | true. |
01:54:05 | FromDiscord | <Mask> can i create a derivative type of int whose values must be within a certain range |
01:54:14 | disruptek | range[4 .. 6] |
01:54:37 | disruptek | eg. type Foo = range[4 .. 6] |
01:54:46 | FromDiscord | <Elegant Beef> if that huh was to me a while ago disruptek, if an irc uses @Elegant Beef it doesnt ping me in discord |
01:54:52 | FromDiscord | <Mask> wow |
01:54:58 | FromDiscord | <Mask> that was easy |
01:55:17 | FromDiscord | <Mask> i've tried nim before but this is refreshing |
01:55:44 | disruptek | it's nice having all the answers; keep lobbing the easy pitches across the plate and i'll keep crushing them. |
01:56:03 | disruptek | beef: use irc. |
01:56:20 | FromDiscord | <Elegant Beef> None of the clients look good |
01:56:22 | FromDiscord | <Elegant Beef> So no |
01:56:23 | FromDiscord | <Elegant Beef> 😄 |
01:56:24 | FromDiscord | <Mask> yeah i didn't have the discord server last time |
01:56:27 | FromDiscord | <Mask> this is a big help |
01:56:45 | FromDiscord | <Elegant Beef> Go make me a good looking irc client in nim disruptek, and ill consider it |
01:56:55 | disruptek | enums are also a very strong type in nim. |
01:56:58 | leorize | what do you consider good looking? |
01:57:51 | FromDiscord | <Elegant Beef> I dont know something that's not an affront to my retinas |
01:57:52 | disruptek | i thought about it but despite my heavy use, i don't really /need/ a better client. |
01:58:12 | Prestige | how about weechat? |
01:58:24 | disruptek | i might do it on stream; it's the sort of thing that people like to watch for some reason. |
01:59:13 | FromDiscord | <Elegant Beef> Isnt weechat text only? |
01:59:35 | FromDiscord | <Elegant Beef> TUI isnt very nice imo for something that has multimedia support |
02:00:09 | disruptek | multimedia support isn't very nice imo for something that is text-only. |
02:00:15 | Prestige | ^ |
02:00:20 | Prestige | irc is text only isnt it? |
02:00:33 | disruptek | yes. |
02:00:38 | FromDiscord | <Elegant Beef> Well i mean images,and videos get shared |
02:00:52 | disruptek | however, i wouldn't use text-mode in my client. |
02:00:54 | FromDiscord | <Elegant Beef> Be it links or not, seems quite silly to constantly open links in a browser to just close the tab |
02:01:16 | disruptek | that's how i browse. |
02:01:39 | leorize | any web irc client would work for you then |
02:01:54 | leorize | the lounge is the most powerful one, but requires hosting |
02:01:55 | FromDiscord | <Elegant Beef> Also imgui for status bar is silly as hell but is working |
02:01:55 | FromDiscord | <Elegant Beef> https://cdn.discordapp.com/attachments/371759389889003532/701613588191772682/unknown.png |
02:02:01 | disruptek | why would i want that? |
02:02:31 | disruptek | that dog has /seen some shit/ |
02:02:31 | FromDiscord | <Elegant Beef> But with the imgui status bar my wm crashes |
02:02:38 | * | chemist69_ quit (Ping timeout: 256 seconds) |
02:02:39 | FromDiscord | <Elegant Beef> Lol |
02:03:25 | FromDiscord | <Elegant Beef> Can Xephyr emulate a multiple monitor setup? |
02:03:29 | disruptek | i'm glad i gave bentley a run. he'd have been barking his head off if he were awake. |
02:04:39 | FromDiscord | <Mask> can i implicitly cast this integer array to the polyomino array of `Direction`? |
02:04:42 | FromDiscord | <Mask> |
02:04:42 | FromDiscord | <Mask> https://cdn.discordapp.com/attachments/371759389889003532/701614285239091210/unknown.png |
02:04:48 | * | chemist69 joined #nim |
02:05:24 | FromDiscord | <KingDarBoja> How many dogs do you own dis? |
02:05:38 | disruptek | use enums. |
02:05:45 | FromDiscord | <Mask> okay |
02:05:47 | disruptek | one dog is enough when you live in an rv. |
02:05:54 | FromDiscord | <KingDarBoja> Hey Mask, use imgur to upload images 😄 |
02:05:59 | FromDiscord | <KingDarBoja> rv? |
02:06:04 | FromDiscord | <Mask> is it easier to see on gitter or smth? |
02:06:04 | FromDiscord | <KingDarBoja> I have 4 dogs and 2 cats |
02:06:20 | FromDiscord | <KingDarBoja> Images don't get into IRC I think |
02:06:21 | FromDiscord | <Elegant Beef> I mean it sends the discord url AFAIK |
02:06:34 | FromDiscord | <Elegant Beef> It sends the discord upload url, im 99% certain |
02:06:40 | FromDiscord | <Mask> i'll just copy paste the code next time |
02:06:46 | FromDiscord | <Mask> thanks for the tip i was wondering about that |
02:06:47 | FromDiscord | <KingDarBoja> Nooo xD use the playground |
02:06:49 | FromDiscord | <Elegant Beef> *that's even worse* |
02:06:54 | disruptek | ~paste |
02:06:54 | FromDiscord | <Mask> hmm why |
02:06:55 | disbot | paste: 11a frowned-upon behavior in chat; please use a service such as https://play.nim-lang.org/ or http://ix.io/ or https://gist.github.com/ and supply us a URL instead. -- disruptek |
02:07:08 | FromDiscord | <KingDarBoja> 😄 |
02:07:11 | FromDiscord | <Elegant Beef> Muliline messages on irc is cancer afaik |
02:07:17 | FromDiscord | <Mask> lmao |
02:07:25 | FromDiscord | <KingDarBoja> Don't worry bro, welcome 😄 |
02:07:52 | FromDiscord | <KingDarBoja> And yeah, use enums as disrupt3k said |
02:07:52 | disruptek | it's not a big deal. |
02:08:08 | disruptek | 3 lines are fine, five starts to be excessive. |
02:08:11 | FromDiscord | <Mask> how do i get a link from the nim playground |
02:08:14 | FromDiscord | <Mask> to show code |
02:08:17 | FromDiscord | <KingDarBoja> Anyone has used Elixir lang? Man, that's the top notch of Enumerables and pipes |
02:08:22 | disruptek | there's a button. |
02:08:31 | disruptek | Share to ix |
02:08:44 | FromDiscord | <Elegant Beef> Any clues how i should debug my WM crashing on startup? Doesnt crash using xephyr but when using it as a proper wm it crashes |
02:08:48 | FromDiscord | <Mask> i tried i get 502 error |
02:08:51 | disruptek | gdb |
02:09:07 | disruptek | maybe ix is misbehaving. |
02:09:26 | FromDiscord | <KingDarBoja> https://play.nim-lang.org/#ix=25Cj |
02:09:26 | disruptek | try again; it just worked for me. |
02:09:45 | FromDiscord | <Elegant Beef> But how would i use GDB if i dont exactly have a way to attach it to the wm |
02:10:01 | FromDiscord | <Mask> i think it's because i had nothing written in |
02:10:02 | FromDiscord | <Mask> lmao |
02:10:04 | disruptek | you run your wm from gdb. |
02:10:18 | Prestige | you can attach the PID as well |
02:10:58 | disruptek | enums can have ordinal and string values at the same time. |
02:11:57 | disruptek | they can have holes (though it's generally a bad idea), you can easily type-convert them, iterate over their range, and they compose beautifully with sets and case statements. |
02:12:46 | disruptek | case statements can consume sets and ranges as clause determinants. |
02:13:09 | disruptek | ranges work great with enums, too, of course. |
02:15:38 | leorize[m] | @Elegant Beef: https://srain.im/ |
02:15:45 | FromDiscord | <Varriount> I really like sets in Nim. Sure, they are limited in what kinds of data types they can hold, but you usually get very good performance |
02:16:22 | * | endragor joined #nim |
02:16:34 | FromDiscord | <Mask> sets have no duplicates? |
02:16:39 | disruptek | correct. |
02:16:41 | FromDiscord | <Mask> how do you have efficient insertion |
02:16:49 | disruptek | lots of lube. |
02:16:52 | FromDiscord | <Mask> since you have to check every element to make sure no duplicates |
02:16:54 | FromDiscord | <Mask> lol |
02:17:14 | leorize | they are designed as bitsets |
02:17:23 | disruptek | they aren't arrays underneath. |
02:17:33 | FromDiscord | <Elegant Beef> In most cases they're hashmaps |
02:17:36 | FromDiscord | <Mask> ah |
02:17:44 | * | muffindrake quit (Ping timeout: 246 seconds) |
02:18:05 | leorize | found you an IRC client @Beef |
02:18:05 | disruptek | i don't think that's right. |
02:18:12 | leorize | also Nim sets are not hash maps |
02:18:18 | leorize | we have hashsets if you're into that |
02:18:18 | disruptek | iirc, they are a series of integers. |
02:18:35 | FromDiscord | <Elegant Beef> Hey i know nothing of this nim you speak, |
02:19:23 | FromDiscord | <KingDarBoja> Oh god, found another bug due to Python using None for string variable |
02:19:24 | FromDiscord | <KingDarBoja> x.x |
02:19:35 | FromDiscord | <Mask> back to the enum thing. You are saying to use an enum instead of the range[0..4] type? |
02:19:41 | FromDiscord | <KingDarBoja> Yeah |
02:20:04 | FromDiscord | <KingDarBoja> https://nim-lang.org/docs/tut1.html#advanced-types-enumerations |
02:20:05 | FromDiscord | <Mask> does that have any bonus features besides just being more standard? |
02:20:06 | FromDiscord | <Elegant Beef> Never ever use magic unnamed numbers |
02:20:14 | FromDiscord | <KingDarBoja> I feel like you want that |
02:20:14 | * | muffindrake joined #nim |
02:20:20 | disruptek | yes; i just listed the bonus features. |
02:20:26 | FromDiscord | <Mask> oh |
02:20:37 | FromDiscord | <Mask> oh i see |
02:20:38 | FromDiscord | <KingDarBoja> It's basically what you wanted Mask lol |
02:20:42 | FromDiscord | <Mask> the ordinal types things |
02:20:46 | FromDiscord | <Mask> yeah but that wasn't really my issue |
02:20:51 | FromDiscord | <Mask> this is good i will use enums instead |
02:21:01 | disruptek | they are what you want. |
02:21:15 | disruptek | lightweight typed ordinals. |
02:21:15 | FromDiscord | <Mask> but i mean how do i cast the array of `[0, 0, 1]` into the polyomino thing.. Will it do that? |
02:21:49 | disruptek | lemme find the code. |
02:21:50 | FromDiscord | <KingDarBoja> the ord proc can convert it to its underlying integer value. |
02:22:27 | FromDiscord | <KingDarBoja> So `South.ord` yields its integer |
02:23:16 | FromDiscord | <Mask> is there a way to do those things and still use numbers instead of words for the directions? |
02:23:17 | disruptek | that code should work fine. |
02:23:27 | FromDiscord | <Mask> i don't see anything is it going through |
02:23:51 | disruptek | numbers are accepted if they are valid for the type. |
02:24:11 | FromDiscord | <Elegant Beef> Why would you want to use numbers?! |
02:24:17 | disruptek | a /cast/ is a separate thing from mere assignment in nim. |
02:24:39 | disruptek | a cast is you saying, "look, just copy the value without regard to type" |
02:24:48 | disruptek | generally, you won't use a cast. |
02:25:21 | FromDiscord | <Elegant Beef> ~~Unless you use glfw + xlib and have to convert a raw pointer to a TWindow~~ 😄 |
02:26:41 | FromDiscord | <KingDarBoja> @Mask Can you share the code? |
02:26:57 | disruptek | bbiab, i wanna see if this hardware works. |
02:27:05 | FromDiscord | <Mask> yeah i'm reading the anum thing to try to understand what you guys are talking about |
02:27:08 | FromDiscord | <Mask> one moment |
02:27:49 | FromDiscord | <Mask> https://play.nim-lang.org/#ix=2iKU |
02:28:17 | FromDiscord | <Mask> https://play.nim-lang.org/#ix=2iKV |
02:28:27 | FromDiscord | <Mask> i realized the int thing was wrong mb |
02:29:49 | FromDiscord | <KingDarBoja> Gotcha |
02:30:08 | FromDiscord | <KingDarBoja> https://play.nim-lang.org/#ix=2iKV |
02:30:22 | FromDiscord | <Mask> don't you have to share again? |
02:30:25 | FromDiscord | <Mask> it hasn't changed for me |
02:30:26 | FromDiscord | <speckledlemon> Is there really no better way to represent a sum type than this? https://pastebin.com/raw/mE4fujx9 |
02:31:03 | leorize | use discard for that branch if you don't need it |
02:31:27 | leorize | also we have Option[T] |
02:31:38 | FromDiscord | <KingDarBoja> Oh crap |
02:31:49 | FromDiscord | <speckledlemon> I had been trying `discard ""`, didn't know you could have bare discard, thanks |
02:32:11 | FromDiscord | <KingDarBoja> https://play.nim-lang.org/#ix=2gcb |
02:32:16 | FromDiscord | <speckledlemon> I'm not sure yet if Option makes sense, it might, it might not |
02:32:36 | leorize | !repo nim-result |
02:32:46 | leorize | disbot? |
02:32:52 | FromDiscord | <Mask> isn't it tilda |
02:33:01 | FromDiscord | <Mask> ~repo nim-result |
02:33:14 | leorize | for commands it's `!` |
02:33:20 | FromDiscord | <Mask> ah |
02:33:21 | leorize | disruptek probably broke the bot again |
02:33:26 | FromDiscord | <Mask> amh |
02:33:30 | FromDiscord | <Mask> s* |
02:35:37 | FromDiscord | <Mask> so can i do this implicit casting thing? |
02:37:36 | FromDiscord | <Mask> or if it's not called casting then something else |
02:39:00 | skrylar[m] | hmm someone sending me patches for 1.2... guess its time to do the rounds and see what broke this time |
02:40:04 | FromDiscord | <speckledlemon> ah screw it, option is a better solution for now, good call |
02:40:43 | leorize | there's also the nim-result package if you ever need something more complex |
02:40:54 | leorize | I think in nimble it's called results |
02:43:04 | FromDiscord | <speckledlemon> found it https://nimble.directory/pkg/result |
02:44:04 | FromDiscord | <KingDarBoja> It is possible that string can be nuil? |
02:44:21 | FromDiscord | <KingDarBoja> Nil* I know it could be done if using ref (for types for example) |
02:44:22 | leorize | nope |
02:44:29 | leorize | use Option[T] :P |
02:44:33 | FromDiscord | <KingDarBoja> fffffff |
02:48:13 | * | FromDiscord <KingDarBoja> hangs himself |
02:48:36 | FromDiscord | <Mask> could i override nnkBracket to accomplish this? |
02:48:51 | leorize | what are you trying to do? |
02:49:10 | FromDiscord | <Mask> make an array of integers construct an array of range[0..4] |
02:49:12 | FromDiscord | <KingDarBoja> Who? |
02:49:40 | leorize | @Mask: `let arr = [0.Type, 1, 3, 2]` |
02:50:02 | leorize | specify the type for the first element, and everything after will follow suit |
02:50:52 | FromDiscord | <Mask> i don't think that's exactly what i'm looking for |
02:50:52 | FromDiscord | <Mask> https://play.nim-lang.org/#ix=2iL7 |
02:51:48 | leorize | why would you wanna do this? |
02:51:58 | FromDiscord | <Mask> so i can create the polyominoes easier |
02:52:03 | FromDiscord | <Mask> it just looks nicer |
02:52:10 | leorize | you already gave them a name |
02:52:14 | leorize | you can just use the enum names |
02:52:30 | leorize | if you don't wanna use them then why do you even use enums? |
02:53:05 | FromDiscord | <Mask> if i use for example `[n, n, e]` instead the code still won't work |
02:53:14 | FromDiscord | <Mask> `Error: type mismatch: got <array[0..2, Direction]> but expected 'Polyomino[system.int]'` |
02:55:06 | leorize[m] | https://play.nim-lang.org/#ix=2iLa |
02:55:29 | * | xcm quit (Remote host closed the connection) |
02:55:34 | leorize[m] | the static int part is a bit of a gotcha, but you used the `array` part wrong :P |
02:55:53 | FromDiscord | <Mask> oh so i was declaring the array wrong to begin with? |
02:56:12 | leorize[m] | yea, arrays are `array[Idx, T]` |
02:56:25 | FromDiscord | <Mask> i thought that's what i was doing? |
02:56:25 | leorize[m] | you did it the other way around :P |
02:56:33 | FromDiscord | <Mask> bruh |
02:56:41 | FromDiscord | <Mask> i knew that it was just a dumb dumb mistake |
02:56:41 | FromDiscord | <Mask> lol |
02:56:50 | FromDiscord | <Mask> i even wrote it correctly elsewhere in the code |
02:56:50 | FromDiscord | <Mask> thanks |
02:56:58 | leorize[m] | np |
02:57:45 | * | xcm joined #nim |
02:57:56 | * | endragor quit (Remote host closed the connection) |
03:12:00 | * | disruptek quit (Quit: Bye) |
03:12:00 | * | disbot quit (Quit: Bye) |
03:16:12 | * | disbot joined #nim |
03:17:14 | * | disruptek joined #nim |
03:21:16 | leorize | disbot: alive? |
03:21:24 | leorize | ~arc |
03:21:25 | disbot | arc: 11a new memory manager for Nim; see https://forum.nim-lang.org/t/5734 |
03:21:28 | leorize | nice |
03:24:20 | disruptek | i should really move the bot offsite. |
03:25:41 | leorize | maybe you can ask dom96 for a spot on Nim's server? |
03:25:56 | disruptek | i have servers. |
03:26:15 | disruptek | it's just that the bot also throws my notifications and stuff. |
03:26:20 | leorize | why does everyone have a server or two |
03:26:24 | disruptek | so it's convenient to have just one bot local, etc. |
03:26:49 | disruptek | anyone can have a server; just pay a few bucks to amazon or w/e. |
03:27:04 | disruptek | i think a nano is like $45 for 3y. |
03:27:28 | disruptek | that's what i paid, anyway. |
03:32:14 | disruptek | i used to have lots of bigger boxen but i've moved everything to lambda. i only use servers for vpc'ing compiled code into neptune or w/e. |
03:32:58 | skrylar[m] | i used to have one for a site until i couldn't afford it anymore |
03:33:19 | FromDiscord | <Chiqqum_Ngbata> So maybe nimble doesn't have a post-install hook of some kind ? |
03:33:37 | skrylar[m] | theres also places that rent pis/arm so the cost of microservers is really going down |
03:35:43 | disruptek | hmm i cannot build version-1-0 with 0.20.0 because pure/collections/setimpl.nim(41, 24) Error: undeclared identifier: 'isFilledAndValid' |
03:36:48 | FromDiscord | <Mask> https://play.nim-lang.org/#ix=2iLn |
03:36:48 | FromDiscord | <Mask> https://forum.nim-lang.org/t/703 |
03:36:48 | FromDiscord | <Mask> can someone help me understand this template posted here? |
03:36:57 | FromDiscord | <Mask> what does the star in `new*` do? |
03:37:01 | FromDiscord | <Mask> is that like regex or something? |
03:37:10 | FromDiscord | <Mask> i couldn't find anything in the manual or anything |
03:37:26 | FromDiscord | <Mask> and also the difference between the two he has posted |
03:37:36 | disruptek | it's pointless afaict. |
03:37:45 | FromDiscord | <Mask> the star? |
03:38:11 | disruptek | the template. |
03:38:14 | FromDiscord | <Mask> right |
03:38:21 | FromDiscord | <Mask> i got that but what is the point of the star |
03:38:30 | disruptek | the star exports the symbol. |
03:38:45 | disruptek | a la oberon. |
03:39:03 | FromDiscord | <Mask> i'm confused |
03:39:05 | FromDiscord | <Mask> what does export mean in this context. and what symbol? |
03:39:07 | disruptek | else it will be invisible outside the module. |
03:39:13 | FromDiscord | <Mask> oh right |
03:39:17 | disruptek | new is a symbol. |
03:39:17 | FromDiscord | <Mask> i read that somewhere |
03:39:20 | disruptek | an identifier. |
03:39:33 | FromDiscord | <Mask> what is expr |
03:39:38 | FromDiscord | <Mask> is that like `untyped`? |
03:39:49 | disruptek | an expression, yes. |
03:39:55 | disruptek | untyped literally has no type. |
03:39:59 | disruptek | could be anything. |
03:40:03 | disruptek | or nothing. |
03:40:06 | FromDiscord | <Mask> i thought it was just text |
03:40:10 | FromDiscord | <Mask> basically |
03:40:18 | disruptek | could be a block of code. |
03:40:50 | disruptek | well, i shouldn't say it could be nothing. |
03:41:59 | * | FromDiscord <KingDarBoja> socialism? yes |
03:43:29 | disruptek | i wouldn't put much stock in forum posts from 2015. |
03:43:35 | disruptek | the language has changed a lot since then. |
03:44:29 | disruptek | expr is deprecated afaik, for example. |
03:47:11 | disruptek | anyway... i feel like we should be able to bootstrap 1.0. |
03:59:11 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:00:12 | nisstyre | I actually find a lot of old results on google and it's annoying |
04:00:25 | nisstyre | even the date filtering thing on google doesn't work reliably sometimes |
04:00:48 | disruptek | i don't read the forum. 🤷 |
04:01:18 | * | Romanson joined #nim |
04:04:51 | FromDiscord | <UNIcodeX> Duckduckgo !date |
04:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:43 | * | supakeen joined #nim |
04:09:32 | * | nsf joined #nim |
04:11:03 | * | dadada quit (Remote host closed the connection) |
04:15:46 | * | dadada joined #nim |
04:16:11 | * | dadada is now known as Guest82611 |
04:16:28 | FromDiscord | <Varriount> disruptek: typed/untyped was such an improvement over expr/stmt. So much easier to understand |
04:16:49 | FromDiscord | <KingDarBoja> How can I simulate passing arguments like Python partial? I know we dealt with this before but forgot the part of passing another param |
04:17:28 | FromDiscord | <KingDarBoja> I had this -> "let partialValueLiteral = proc(self: Parser): ValueNode = parseValueLiteral(self, false)" |
04:17:47 | FromDiscord | <KingDarBoja> But should provide the bool on the proc argument |
04:18:01 | leorize | wdym? |
04:18:04 | FromDiscord | <KingDarBoja> The idea is calling the function inside another function |
04:18:36 | FromDiscord | <KingDarBoja> You know that Python Partial let's you pass an argument to the function without evaluating |
04:18:59 | leorize | I still don't understand :P need examples |
04:19:42 | FromDiscord | <KingDarBoja> From leorize: _looks like you're having trouble separating functions call and functions as a value_ |
04:19:50 | * | FromDiscord <KingDarBoja> so here's the rule: function name without arguments and/or () = a value |
04:19:57 | * | FromDiscord <KingDarBoja> otherwise it's a call |
04:20:33 | * | endragor joined #nim |
04:20:44 | * | endragor quit (Remote host closed the connection) |
04:20:54 | * | endragor joined #nim |
04:21:13 | FromDiscord | <KingDarBoja> https://imgur.com/RiDpF3Q a refresher |
04:21:56 | FromDiscord | <KingDarBoja> I remember when we tackled this but forgot the other param until I made a test right now |
04:23:18 | FromDiscord | <KingDarBoja> The idea was (still is) pass a proc as argument to another proc BUT only call it on the body of second proc |
04:23:36 | FromDiscord | <KingDarBoja> The idea works if there is no other param besides `self: MyType` |
04:24:13 | FromDiscord | <KingDarBoja> But doesn't seems to work if I try to pass an argument to the proc (being passed as argument to the second proc) 🤔 |
04:33:02 | FromDiscord | <Varriount> @KingDarBoja Their are two ways. The fastest is to create a closure function, the most efficient is to create a callable type containing the parameters required |
04:33:19 | FromDiscord | <Varriount> *fastest as in fastest to write |
04:34:05 | FromDiscord | <KingDarBoja> The callable sounds like what we did that day |
04:34:48 | * | mwbrown quit (Ping timeout: 256 seconds) |
04:34:53 | FromDiscord | <KingDarBoja> https://github.com/KingDarBoja/Phosphate/blob/master/src/language/parser.nim#L143 |
04:35:14 | FromDiscord | <KingDarBoja> https://github.com/KingDarBoja/Phosphate/blob/master/src/language/parser.nim#L723 Used here |
04:35:35 | FromDiscord | <KingDarBoja> But `isConst` param isn't being passed |
04:35:42 | FromDiscord | <KingDarBoja> Which should be... |
04:35:45 | FromDiscord | <Varriount> In pseudocode: `proc wrapFoo(a, b): auto { return proc(): auto { return foo(a, b) } }` |
04:37:51 | FromDiscord | <Varriount> With that method, the compiler creates the data structure required to hold the parameters captured by the inner procedure, and passes it along with a pointer to the inner procedure behind the scenes. |
04:38:09 | FromDiscord | <KingDarBoja> 🤔 |
04:39:07 | * | mwbrown joined #nim |
04:43:40 | FromDiscord | <KingDarBoja> Ok, I declared that |
04:44:21 | FromDiscord | <KingDarBoja> Then in order to pass it to the other proc as param, just use `outerProc(param1: int, param2: wrapFoo(), ...)`? |
04:51:26 | FromDiscord | <Varriount> https://play.nim-lang.org/#ix=2iLL |
04:51:52 | FromDiscord | <KingDarBoja> Checking right now |
04:52:29 | FromDiscord | <Varriount> That is a brief snippet which shows (generally) what the compiler translates closures to. |
04:54:38 | FromDiscord | <Varriount> Note that is an estimation. It gets a lot more intricate when you have scenarios involving closures that share the same parent scope. |
04:55:44 | FromDiscord | <KingDarBoja> Mate, thanks, solved the issue by looking at your sample |
04:55:46 | FromDiscord | <KingDarBoja> 😄 😄 |
04:56:09 | FromDiscord | <KingDarBoja> I almost got the same, but was missing the correct types on the second Proc |
04:58:20 | FromDiscord | <KingDarBoja> I will keep that example somewhere on my project |
05:02:30 | FromDiscord | <KingDarBoja> Quick question, what does auto do? |
05:04:25 | * | narimiran joined #nim |
05:07:58 | FromDiscord | <InventorMatt> according to the nim manual "The auto type can only be used for return types and parameters. For return types it causes the compiler to infer the type from the routine body:" |
05:12:17 | Prestige | nim-lang.org down atm? |
05:12:33 | FromDiscord | <Rika> yes |
05:12:46 | FromDiscord | <KingDarBoja> Thank you |
05:12:55 | FromDiscord | <Rika> oh. no |
05:12:58 | FromDiscord | <Rika> its not down |
05:13:10 | Prestige | seems to be spotty |
05:13:28 | FromDiscord | <Rika> loads just fine for me, switch dns to either googles or cloudflares |
05:20:56 | * | rockcavera quit (Remote host closed the connection) |
05:42:16 | FromDiscord | <Mask> how do i test if a number is within a certain range and return a boolean |
05:43:31 | leorize | num in a..b |
05:43:58 | FromDiscord | <Mask> oh okay i was close |
05:44:04 | FromDiscord | <Mask> num in range[a..b] |
05:45:28 | FromDiscord | <Rika> range[] is a type |
05:51:43 | Prestige | Having a strange issue using a table declared in another file, can anyone take a quick look? https://0x0.st/i19-.png |
05:52:31 | Prestige | same code outside of the file doesn't work as the same code inside the file (where the table is declared) |
05:54:30 | FromDiscord | <Rika> you didnt import tables |
05:54:44 | FromDiscord | <Rika> prestige ^ |
05:55:02 | Prestige | oh I need to also import tables from this file, that makes sense. Thanks Rika |
05:56:18 | FromDiscord | <Rika> classic "forgot that procs arent bound to type" 😛 |
06:10:01 | * | dddddd quit (Ping timeout: 256 seconds) |
06:13:18 | * | solitudesf joined #nim |
06:14:41 | * | chemist69 quit (Ping timeout: 272 seconds) |
06:15:30 | * | chemist69 joined #nim |
06:17:47 | * | opal quit (Remote host closed the connection) |
06:18:02 | * | opal joined #nim |
06:23:24 | FromDiscord | <Varriount> @Rika I like your avatar |
06:28:25 | * | zacharycarter joined #nim |
06:29:25 | * | xcm quit (Remote host closed the connection) |
06:31:29 | * | xcm joined #nim |
06:32:47 | * | zacharycarter quit (Ping timeout: 265 seconds) |
06:34:00 | FromDiscord | <Rika> thanks |
06:34:23 | * | filcuc quit (Ping timeout: 256 seconds) |
06:52:15 | skrylar[m] | i ended up just not using tables and wrote my own hashmap ._. |
06:53:30 | Araq | skrylar[m], why? |
06:55:26 | skrylar[m] | well mine exports the hash function, so you set if you need a security or a speed hash |
06:57:57 | skrylar[m] | i haven't crosstested against stdlib yet https://git.sr.ht/~skrylar/skmap |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:36 | * | kungtotte quit (Ping timeout: 256 seconds) |
07:02:07 | skrylar[m] | although right now it just uses blakes which is overkill because i haven't fixed spooky or finished the xxhash port :/ |
07:04:05 | FromDiscord | <Milerius> nimsh died few hours ago |
07:04:05 | FromDiscord | <Milerius> the installer for linux |
07:04:05 | FromDiscord | <Milerius> ./init.sh |
07:04:05 | FromDiscord | <Milerius> curl: (22) The requested URL returned error: 522 |
07:04:06 | FromDiscord | <Milerius> choosenim-init: Downloading choosenim-_linux_amd64 |
07:04:06 | FromDiscord | <Milerius> curl: (22) The requested URL returned error: 404 Not Found |
07:04:43 | * | gmpreussner joined #nim |
07:08:16 | Araq | skrylar[m], ok well. at least in Nim you can write your own hash tables ;-) |
07:08:47 | skrylar[m] | i feel like you are saying something about javascript here |
07:09:01 | skrylar[m] | beans are for drinking not scripting :leers: |
07:09:08 | * | kungtotte joined #nim |
07:09:37 | * | narimiran quit (Quit: leaving) |
07:11:00 | skrylar[m] | on an unrelated note my poking at the haxe toolchains from the other day lead me on to this gem https://github.com/mapbox/earcut and i see nimble does not list an earcut package. :ponders: |
07:11:06 | * | narimiran joined #nim |
07:22:23 | * | PMunch joined #nim |
07:25:10 | livcd | is nto nimforum today a bit slow? |
07:25:17 | livcd | https://forum.nim-lang.org/t/6236 this took my to open like 6s |
07:25:40 | Araq | livcd, it's slow for me too |
07:41:54 | * | Romanson quit (Quit: Connection closed for inactivity) |
08:08:06 | FromDiscord | <Benumbed> I gotta say, I don't have many gripes with Nim at all, but needing to import something like 'tables' in a module when I'm importing another module that imports it, is not a happy |
08:09:24 | FromDiscord | <Benumbed> The compiler errors if I don't also tend to slow me down and give me pause when it happens. I end up in "What the hell are you talking about?" territory when the proc signatures don't have the expected type (but that is also how I end up remembering to import the other module) |
08:09:30 | skrylar[m] | isn't that only true if you want to interact with the table directly |
08:09:48 | * | Faulander_ quit (Read error: Connection reset by peer) |
08:10:08 | FromDiscord | <Benumbed> It's true in cases where I have a type defined in the other file using a table, then want to assign to that type |
08:10:17 | FromDiscord | <Benumbed> That's really the big bit that throws me |
08:10:54 | skrylar[m] | i *have* gotten bit by it saying there was no `[]=` alternative because i didn't import the robin hash module along with the object using a robin hash, which was a bit derpy... you can export the module explicitly but i dunno |
08:11:18 | FromDiscord | <Benumbed> So `type MethodMap* = Table[uint16, DispatchMethod]` in one module, and the other one imports that module and does `var channelMethodMap* = MethodMap() |
08:11:19 | FromDiscord | <Benumbed> channelMethodMap[11] = channelOpenOk` |
08:11:36 | FromDiscord | <Benumbed> and that will throw weird compiler errors unless you import tables |
08:11:38 | Araq | Benumbed: I agree but don't have a good solution |
08:11:47 | Araq | the module can do 'export tables' though |
08:11:55 | FromDiscord | <Benumbed> Okay, I'll stop bitching then 😄 |
08:12:11 | Araq | IMO it's caused by Nim's childish "let's not attach procs to types" stance |
08:12:28 | skrylar[m] | but i like that part of nim :eyes: |
08:12:45 | Araq | skrylar[m], I know and it's currently very fashionable |
08:12:57 | FromDiscord | <Benumbed> I'm not entirely certain if that's humor or not, given you're the Father of Nim haha |
08:13:05 | Araq | language design is fashion driven |
08:13:29 | skrylar[m] | well, since c# and haxe got extension methods and extension methods aren't uncommon it sort of implies types owning their procs is warm and bad |
08:13:53 | skrylar[m] | hell none of the original OOPs even did that, it was some dumbo bolted on by java |
08:14:02 | skrylar[m] | to make vtables easier i guess |
08:14:18 | FromDiscord | <Benumbed> I'm just used to C/C++ where #include brings the world in from the other file |
08:14:21 | Araq | a hash table is an "abstract data type" and ADTs have little to do with OOP, in fact they are opposites |
08:15:05 | Araq | there is an excellent paper about this from Cook iirc |
08:15:06 | FromDiscord | <Benumbed> TBH I don't even mind needing to import, I think better compiler errors would suffice |
08:15:15 | Araq | fair enough |
08:15:29 | FromDiscord | <Recruit_main707> imho it would be nicer not needing to though |
08:16:10 | FromDiscord | <Benumbed> If I can improve my experience with the core, that's something I'd like to contribute to, clearer compiler errors |
08:16:29 | FromDiscord | <Benumbed> Although that may be a maze of twisty passages I'm talking about getting myself into 😄 |
08:16:31 | skrylar[m] | well. all i'm saying is types owning their procs don't really show up in the classical literature. and 'even' the classical OOPs you didn't even own it, since CLOS you define methods that belong to no-one and objects simply provide implementations for those, and in smalltalk you can bolt any new receiver to any object, i'm not entirely sure if haskell and ocaml even do it, but i haven't used the last two in a long while |
08:17:48 | Araq | https://www.cs.utexas.edu/users/wcook/papers/OOPvsADT/CookOOPvsADT90.pdf this is it. |
08:18:09 | skrylar[m] | could just use a factory method to get around importing table to construct it, but you still need the import to get access to `[]` and `[]=` |
08:18:58 | Araq | well just because we attach procs to types doesn't mean we cannot just leave the Nim syntax as it is |
08:19:28 | Araq | it would solve quite some problems of Nim's design, I suppose I should write an RFC... |
08:20:04 | Araq | for example, it would solve the common gotcha of "gah, I used system.$ instead of the custom $ by accident" |
08:20:47 | skrylar[m] | i'll be verily surprised when i see a time you aren't tripping over your own creation trying to undo it |
08:21:26 | FromDiscord | <Recruit_main707> its not undoing, its maturing i guess |
08:21:55 | Araq | skrylar[m], I call it "progress" |
08:22:02 | Prestige | How do I import modules relative to another in a directory hierarchy? |
08:22:05 | FromDiscord | <Gary M> Hey Araq |
08:22:09 | FromDiscord | <Gary M> https://i.imgur.com/kFACdMq.png |
08:22:29 | FromDiscord | <Gary M> all of these are functionally the same but syntax highlighting it consistently seems impossible... |
08:22:53 | Prestige | I have two sibling directories with a module in each, and I'm trying to import one into the other |
08:23:17 | FromDiscord | <Benumbed> Prestige: Same way you'd ref it on the command line '../<otherdir>/<othermodule' |
08:23:32 | Araq | skrylar[m], and what I have in mind is pretty tame, please relax |
08:23:54 | * | konvertex joined #nim |
08:23:54 | skrylar[m] | i'm not firing up the haxe compiler and porting code just yet |
08:24:22 | Araq | read the article btw, it's good |
08:24:27 | skrylar[m] | it's just that if one wanted a language that was like the others, we'd just use the others. and often times i see you trying to walk back things in to being like all the others. and then eventually fall over and decide not to do it |
08:24:46 | Prestige | Thanks Benumbed I had no idea we could do that |
08:24:56 | * | Vladar joined #nim |
08:25:00 | skrylar[m] | i did, and it just seems like pedantry |
08:25:21 | skrylar[m] | tl;dr just make all the members private and declare the class final, now its an adt |
08:25:41 | FromDiscord | <Gary M> yikes, I came in at the wrong time to ask questions 😅 |
08:25:58 | FromDiscord | <Recruit_main707> Nim is not like the other langs, and Araq has said that could not affect the syntax. |
08:26:29 | Araq | Gary M: care that 'addr x' highlights well, the other syntaxes are not idiomatic |
08:26:51 | FromDiscord | <Recruit_main707> but there is no point in reinventing the wheel now, theres nothing wrong with taking concepts from other languages |
08:27:12 | skrylar[m] | the syntax highlighting looked ok to me, although `addr` shoul dhave been highlighted in the top line |
08:27:46 | FromDiscord | <Gary M> Araq: but isn't addr a procedure technically, or should it be treated as a keyword specifically at all times |
08:28:04 | Araq | skrylar[m], it's an ADT if it lacks inheritance and dynamic method resolution but ok |
08:30:19 | skrylar[m] | yes but in java terms a final class is excluded from being inherited from, and unless it has a parent class the method resolution is not dynamic, and i think hotspot will even recognize this, so in my mind the thesis is to just slap `final class Blah { private: all the shit public: bleh }` ... so basically agreement |
08:38:07 | FromDiscord | <Gary M> https://i.imgur.com/XXEtp6R.png |
08:38:15 | FromDiscord | <Gary M> so this is with addr as a keyword |
08:38:34 | FromDiscord | <Gary M> however echo isn't a keyword in the manual. Should it be left uncolored? |
08:39:06 | skrylar[m] | looks okay |
08:40:17 | skrylar[m] | lucky person getting to play with vulkan :p gles2 here ._. |
08:42:57 | FromDiscord | <Gary M> ha, well only a little bit so far. It really takes a lot just to make anything at all happen |
08:43:08 | FromDiscord | <Gary M> I think I need to define $ as an operator |
08:43:10 | FromDiscord | <Recruit_main707> im gonna say echo should be colored anyway. |
08:43:33 | Araq | argh, don't color 'echo' in any special way, it's not special |
08:43:39 | FromDiscord | <Gary M> lol |
08:43:45 | Araq | color the keywords as they are defined in the manual |
08:43:49 | FromDiscord | <Gary M> I'm going to side with Mr. Araq on this on, sorry Recruit |
08:44:05 | Araq | don't overdo the coloring, right now VSCode gets it super wrong |
08:44:09 | FromDiscord | <Recruit_main707> i might change it in my side then :P |
08:44:19 | FromDiscord | <Gary M> Araq: that's why I'm working on changing it |
08:44:36 | Araq | ah, great! |
08:44:49 | FromDiscord | <Gary M> and so far so good, probably just going to miss a lot of things at the start but people should bug me about it once I get it released |
08:45:32 | FromDiscord | <Gary M> idk if it'll be able to work alongside the current one because I'm not sure if the dev for the current extension is active and/or open to fixes |
08:45:43 | FromDiscord | <Gary M> well less of a fix and more of a full replacement of the textmate grammar file |
08:47:17 | FromGitter | <Vindaar> @Araq Your recent commit that disallows `for a in EnumWithHole` also broke `parseEnum` for enums with holes, since it depends on `low(T) .. high(T)`. Should we add a `listFields` macro to use for this or do you have a different idea? |
08:48:33 | Araq | Vindaar: dammit |
08:48:33 | FromGitter | <mratsim> Why was "-gnu++14" added in 1.2.0 for C++? It brokes cuda compilation for me? |
08:48:59 | FromGitter | <Vindaar> :| |
08:49:13 | Araq | mratsim: we cannot map Nim's exceptions to C++'s effectively otherwise and ensure you can catch C++ based exceptions without .emit |
08:49:18 | FromDiscord | <Gary M> I think what I'll end up doing is just uploading it as a fork, because people might prefer the original albeit messed up syntax highlighting |
08:55:41 | skrylar[m] | hah. --gendeps output format is directly what `redo` likes. (although.. not ninja.) |
08:56:01 | * | skrylar[m] should get back to that nim redo port someday ._. |
08:56:22 | Araq | I cannot see how anybody can like 'proc' having a different color than 'when' |
08:56:53 | skrylar[m] | proc is part of the bedrock, when is a macro? |
08:58:14 | Araq | both are keywords |
08:58:29 | Araq | and 'when' is not exactly "control flow" either |
09:00:32 | FromDiscord | <Benumbed> @Gary M If you fork the existing one, I'd probably contribute... the autocomplete for imports drives me nuts, it's very wrong 🙂 |
09:03:30 | FromDiscord | <Gary M> @Benumbed can you tell me why it's wrong so I can look out for it 😄 |
09:03:46 | FromDiscord | <Benumbed> Sure let me get you a concrete example, 1 sec |
09:04:07 | Araq | can you also change it so that it opens a single nimsuggest instance? |
09:04:34 | FromDiscord | <Gary M> I'm not familiar with the nimsuggest side of things |
09:04:49 | FromDiscord | <Gary M> but I'll look into it |
09:05:01 | FromDiscord | <Gary M> I'm guessing it's opening more than one for some reason? |
09:05:03 | FromDiscord | <Benumbed> So if I start typing 'conn' after 'classes' in the following line, it completes it very incorrectly: `import nim_amqp/classes/src.nim_amqp/classes.connection` |
09:05:37 | FromDiscord | <Benumbed> That's trying to import a module for the tests in the same project |
09:06:02 | FromDiscord | <Gary M> https://i.imgur.com/1nYEcYp.png |
09:06:16 | FromDiscord | <Gary M> this is kinda not very easy to read rn |
09:06:30 | FromDiscord | <Benumbed> Well... gotta kinda give Vulkan some credit for that too 😉 |
09:06:36 | FromDiscord | <Benumbed> Man it is bloody verbose |
09:06:47 | skrylar[m] | i wonder if doing up a thin faceplate for gl would be a waste of time. i use a tiny one (mostly to distinct some glints and replace a lot of gl_stupid_whatever with just id.use) but i could sit and do the whole thing as a nimble package |
09:07:11 | FromDiscord | <Gary M> https://i.imgur.com/ZAZWcqL.png |
09:07:22 | FromDiscord | <Gary M> nevermind it's a little better with a proper : operator highlight |
09:12:02 | FromDiscord | <such father that father not> ...imagine if you were using rust |
09:12:03 | FromDiscord | <such father that father not> lol |
09:12:36 | skrylar[m] | what about rust |
09:12:44 | FromDiscord | <such father that father not> about "not being very easy to read" |
09:12:59 | FromDiscord | <such father that father not> nim is *poetry* in comparison to nim |
09:13:03 | FromDiscord | <such father that father not> rust* |
09:13:47 | FromDiscord | <Recruit_main707> i can read basically any langugage even though i dont know it and understand what it does, except with rust. |
09:14:00 | FromDiscord | <such father that father not> yep |
09:14:13 | FromDiscord | <such father that father not> i feel like it complicates a whole lot of things that don't have to be complicated |
09:14:20 | FromDiscord | <such father that father not> except people love it |
09:14:26 | FromDiscord | <such father that father not> ¯\_(ツ)_/¯ |
09:14:32 | skrylar[m] | to be fair krhonos apis are ugly in every language. its why i do a faceplate :\ |
09:14:42 | FromDiscord | <such father that father not> yeah, that makes sense |
09:15:05 | FromDiscord | <Gary M> yeah I'm just making a vklayer so I never have to look at that fuckin code again |
09:15:06 | FromDiscord | <such father that father not> i mean i'm writing a lexer, right |
09:15:35 | FromDiscord | <such father that father not> tried to write it in rust—didn't finish after 3 hours of hair-pulling over type casts, obscure method chaining and weird syntax |
09:15:38 | FromDiscord | <Gary M> I want to keep it 6 feet under the ground and just poke the api |
09:15:39 | FromDiscord | <such father that father not> wrote it in nim—30 mins |
09:16:00 | skrylar[m] | i could read rust for a while but its obnoxiously verbose |
09:16:07 | FromDiscord | <such father that father not> that's what i mean |
09:16:10 | skrylar[m] | their addiction to keeping floats verbose is gonna keep em out of games |
09:16:28 | FromDiscord | <such father that father not> but i feel that's why people love it |
09:16:33 | FromDiscord | <such father that father not> *because* it's so verbose |
09:16:38 | skrylar[m] | "we did it on purpose" -- rust devs |
09:16:38 | skrylar[m] | "we actually need to use floats all the time" -- game devs |
09:16:38 | skrylar[m] | t o o b a d |
09:16:48 | FromDiscord | <such father that father not> lmao |
09:17:40 | FromDiscord | <such father that father not> **for now** i don't see how rust is better than nim |
09:17:45 | FromDiscord | <such father that father not> but i'll continue writing both |
09:17:48 | FromDiscord | <Gary M> how verbose are floats in Rust? |
09:17:52 | FromDiscord | <such father that father not> but i'll continue writing code in both |
09:18:04 | FromDiscord | <Gary M> I'm used to just doing 5.389f if I have to 😄 |
09:18:07 | FromDiscord | <Recruit_main707> try not to edit messages in discord, it spams irc |
09:18:12 | FromDiscord | <such father that father not> oh, okay |
09:18:12 | FromDiscord | <such father that father not> sorry |
09:18:19 | FromDiscord | <such father that father not> didn't know that 😅 |
09:18:27 | FromDiscord | <Recruit_main707> np |
09:18:42 | skrylar[m] | i would rather deal with haxe's convoluted toolchain of an ocaml compiler building bytecode getting translated to straight c than go back to rust, if only because between those two communities only one of them cares about problems that occur outside of browser code |
09:18:50 | FromDiscord | <Gary M> I think the discord api pushes it as a new message event and if so there's no way to filter a new message from an edited message |
09:19:06 | FromDiscord | <such father that father not> yeah, i guess so |
09:19:21 | skrylar[m] | but the nice parts of rust is the borrow checker does prevent you from doing unsafe code, which can lead you to learn better data structures than trees with pointers everywhere |
09:20:01 | FromDiscord | <such father that father not> i'd still use c if i were to deal with manual memory management and such |
09:20:28 | FromDiscord | <such father that father not> but if i had to use that *and* utilize some new tools, like wasm, i think i'd have to turn to rust |
09:25:33 | Araq | I don't understand why 'unsafe {}' isn't good enough for manual MM |
09:26:45 | * | liblq-dev joined #nim |
09:26:58 | FromDiscord | <such father that father not> i'm not saying it's good enough |
09:27:11 | FromDiscord | <such father that father not> what i mean is i prefer c because it's been through a whole lot more than rust |
09:27:16 | FromDiscord | <such father that father not> (at least i think so) |
09:27:29 | FromDiscord | <such father that father not> also c *is* prettier than rust...? for me at least |
09:27:38 | FromDiscord | <such father that father not> prettier as in more readable |
09:28:36 | FromDiscord | <mratsim> Ironic :p |
09:28:36 | FromDiscord | <mratsim> https://cdn.discordapp.com/attachments/371759389889003532/701726001415192576/unknown.png |
09:28:59 | FromDiscord | <Recruit_main707> lmao |
09:29:19 | FromDiscord | <such father that father not> oof |
09:29:20 | FromDiscord | <mratsim> @skrylar but Rust makes it a pain to implement trees and DAGs |
09:29:26 | FromDiscord | <such father that father not> +1 |
09:30:11 | FromDiscord | <such father that father not> i mean i'm not hating on rust |
09:30:20 | FromDiscord | <such father that father not> it's an amazing piece of software, as every is |
09:30:40 | FromDiscord | <such father that father not> it's just me that's not really fond of writing code with it |
09:31:13 | FromDiscord | <such father that father not> but the work on rust alone—error reporting, amazing extensibility—deserves a huge applause |
09:32:21 | FromDiscord | <mratsim> My issue with Rust was the ceremony, "Derive Clone" is OK, "Derive PartialOrd" is OK, but having to implement Debug or Print for every single type before being able to use my best debugging tool, the debug echo/println is such a huge pain |
09:33:14 | FromDiscord | <such father that father not> yessss |
09:33:16 | FromDiscord | <mratsim> especially for arrays. They still don't have integer generics for arrays bigger than 32 elements .... |
09:33:34 | FromDiscord | <such father that father not> implementing everything for everything is a pain |
09:33:48 | FromDiscord | <such father that father not> *though* yes, that is an advantage in some cases |
09:34:09 | FromDiscord | <such father that father not> actually in most of them if one uses rust for what it's actually made for—low-level, to-the-metal programming |
09:34:53 | FromDiscord | <mratsim> but sometimes you want to whip up a quick low-level script but as soon as you want to add more structure via an object, you start having to "impl" everything |
09:35:46 | FromDiscord | <such father that father not> yeah |
09:35:59 | FromDiscord | <mratsim> the "to-the-metal" improved a lot since I used it in 2016 but at the time I couldn't access SIMD |
09:36:08 | FromDiscord | <such father that father not> i love how this is a nim server and we're discussing rust lol |
09:36:44 | FromDiscord | <mratsim> also that was because I was not familiar with programming concepts but I was completely lost in references, lifetimes and borrow mut and ended up cloning everything |
09:37:02 | FromDiscord | <mratsim> though I guess programming in Nim made me a better Rust dev if needed :p |
09:37:26 | FromDiscord | <mratsim> well we also have andrewrk from Zig and GingerBill from Odin coming saying hi from time to time |
09:38:00 | * | xcm quit (Remote host closed the connection) |
09:40:34 | * | xcm joined #nim |
09:41:28 | Araq | mratsim: what's ironic about it? |
09:42:23 | FromDiscord | <mratsim> Font missing and last commit is about unicode |
09:43:34 | Araq | the best thing about unicode is that there is only one of it |
09:43:59 | FromDiscord | <mratsim> isn't there UTF-8 and UTF-16? |
09:44:31 | FromDiscord | <mratsim> Unicode is probably the last thing I want to deal with. It seems like a mess from the outside |
09:45:09 | Araq | mratsim: yes but it's better than the "code pages" stuff it replaced |
09:46:55 | FromDiscord | <mratsim> oh sure |
09:47:26 | FromDiscord | <mratsim> When I was in China, dealing with codepages was a pain. |
09:59:49 | FromDiscord | <Gary M> should built-in types be colored or not? |
10:00:54 | FromDiscord | <Gary M> for instance: https://i.imgur.com/2y1DCLB.png |
10:01:27 | FromDiscord | <Recruit_main707> yes, ofc (am i wrong?) |
10:01:41 | Araq | no. they are still just types |
10:01:46 | FromDiscord | <Gary M> well, you were wrong about echo 😄 |
10:01:59 | Araq | in general I'm a friend of this rule: |
10:02:19 | Araq | highlighting should only care about how the language's lexer operates |
10:02:25 | FromDiscord | <Recruit_main707> lel, nim is gonna look grayscaled |
10:02:29 | Araq | about tokens |
10:02:41 | FromDiscord | <Gary M> https://i.imgur.com/iJ0b0V6.png |
10:02:47 | FromDiscord | <Gary M> this is hardly grayscaled, my friend 😄 |
10:03:17 | Araq | not about "semantics" because semantics are harder and unreliable inside an editor |
10:03:27 | FromDiscord | <Recruit_main707> you dont statically type their types though |
10:03:38 | FromDiscord | <Gary M> what do you mean |
10:03:49 | FromDiscord | <Recruit_main707> let a: int = 2 |
10:03:49 | FromDiscord | <Recruit_main707> let a = 2 <- |
10:04:39 | FromDiscord | <Gary M> I don't see the issue |
10:04:46 | * | nullwarp quit (Ping timeout: 256 seconds) |
10:05:12 | FromDiscord | <Gary M> https://i.imgur.com/EWsgo9B.png |
10:05:14 | * | nullwarp joined #nim |
10:22:53 | FromGitter | <gogolxdong> Any library to build application on mobile phone? |
10:32:46 | * | tane joined #nim |
10:35:09 | livcd | gogolxdong: yglukhov's libs |
10:36:02 | * | inv2004 joined #nim |
10:37:49 | inv2004 | Hello, are there any way to do variant objects based on C-struct, where kind is not the first field ? |
10:38:52 | * | Vladar quit (Quit: Leaving) |
10:38:58 | PMunch | inv2004, kinda |
10:39:27 | PMunch | What is the memory layout you need to wrap? |
10:40:48 | Araq | https://www.youtube.com/watch?v=W3aieHjyNvw good insights into entity component systems |
10:40:58 | * | solitudesf quit (Read error: Connection reset by peer) |
10:42:49 | skrylar[m] | admittedly i do like webassembly wasm |
10:45:39 | skrylar[m] | altho re: using c again... for a while i wondered about just having a thin layer that turned s-exps in to raw c code, since you could then just start stacking stuff on top of that. i do use a system like this for an unrelated scripting system (where you have to use a very terrible proprietary language) and its working so far... but i'm sure there is a reason we don't write compilers like this -shrug- |
10:46:03 | * | solitudesf joined #nim |
10:46:26 | FromDiscord | <mratsim> there are plenty of tutorial or codegolf challenge to write a Lisp interpreter in C |
10:46:26 | Araq | hint: it has to do with types |
10:46:56 | Araq | type systems are better when they didn't outgrow a system that started as a typeless language |
10:47:23 | skrylar[m] | @mratsim: it's not a lisp interpreter in c; its a C AST in lisp |
10:49:01 | FromDiscord | <mratsim> I'm pretty sure someone wrote a Lisp LLVM frontend and you could output some C |
10:49:19 | skrylar[m] | yes some lispers have done c code gen in ages past, it just always seems to get buried somewhere |
10:49:48 | skrylar[m] | the point is its more like terra/lua where the lisp/lua is 'just' building ASTs it tosses to terra to actually build |
10:50:11 | Araq | does it get more buried than the rest of stuff wirtten in Lisp though? |
10:51:30 | FromGitter | <mratsim> Does Terra still get developed? The main author is working at Facebook on PyTorch since about 2 years ago. |
10:51:50 | skrylar[m] | i dunno, but the concept keeps re-appearing and then getting acquihired away |
10:53:38 | Araq | maybe "small core + macros on top of it" isn't really as easy to do when the end result has to convince consumers |
10:54:05 | skrylar[m] | if i had to guess i'd say its because it melts the brains of average developers whom IBM demonstrated can't even code binary searches |
10:55:06 | skrylar[m] | simple macros have been a persistently hard sell, let alone "so the language is literally a tower of macros." |
10:55:28 | Araq | well not everybody is a fool, yes, it's awesome you can build your own 'async' as a library. it's less awesome that the error messages are weird and stack traces are messed up |
10:55:56 | * | tribly quit (Quit: WeeChat 2.8) |
10:57:37 | * | tribly joined #nim |
10:57:43 | skrylar[m] | well macroexpand at a repl isn't hard to use |
10:57:54 | skrylar[m] | especially macroexpand-1 |
10:59:00 | Araq | you don't have to sell me macro systems, I still like them, but priorities differ among programmers |
11:00:01 | Araq | and "others are just too stupid for Lisp" is not a very useful insight ;-) |
11:00:08 | Araq | bbl |
11:02:24 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
11:06:02 | skrylar[m] | for me its more c isn't too bad but i wish the preprocessor was more amenable to things like "just assume every time i declare a function, i want to add these tracers to it." |
11:06:33 | skrylar[m] | but scripts adding magic to code gives a lot of people problems, so meh. |
11:08:50 | skrylar[m] | @mratsim hey how are you with crazy signal math |
11:17:46 | skrylar[m] | saw some interesting synthesis patents expired recently. slogging through them slowly |
11:18:55 | * | lritter quit (Ping timeout: 265 seconds) |
11:20:34 | * | Vladar joined #nim |
11:21:57 | inv2004 | Is it possible to define proc for one object-variant kind ? |
11:22:20 | FromGitter | <mratsim> I don't know, I can deal with implementing math if I have a reference to test against because quite often papers are completely skimming on the implementation details (looking at you deep learning and crypto papers ...) |
11:22:44 | * | krux02 joined #nim |
11:23:05 | skrylar[m] | inv2004: i don't believe so, you might have to assert the type in the function, since types do not own procs |
11:23:21 | FromGitter | <mratsim> AFAIK it's possible to do it for NimNodes with proc foo(x: untyped{nkIdent}): untyped so the base code is here |
11:23:32 | FromGitter | <mratsim> sorry macros* |
11:23:44 | FromGitter | <mratsim> and there was a RFC to have that |
11:23:46 | skrylar[m] | interesting |
11:24:52 | inv2004 | I still not sure should I use object variants or better to avoid it. Because they looks too duck-typing |
11:25:30 | FromDiscord | <clyybber> if you need them use them |
11:25:41 | inv2004 | :))) |
11:27:24 | skrylar[m] | @mratsim it seems to explain most of it, i just have to take the time to map it all out :/ but he does some interesting stuff breaking samples in to harmonics with filters, then stores 'just' the residuals, and then trains a tiny neural network to re-produce the original dominant frequencies, so it's able to to pitch glide between different samples of the same instruments |
11:27:24 | skrylar[m] | <https://patentimages.storage.googleapis.com/53/c7/69/65c921a09da6d7/US6298322.pdf> |
11:33:22 | * | lritter joined #nim |
11:37:09 | * | filcuc joined #nim |
11:42:31 | inv2004 | is it possible to make enum ord-number to byte ? |
11:43:51 | FromDiscord | <mratsim> yes enum less than 255 are represented as byte in the backend |
11:44:18 | FromDiscord | <mratsim> @skrylar, why is this patentable? this seems like mp3 or AAC which are prior art |
11:48:07 | * | tane quit (Quit: Leaving) |
11:57:00 | inv2004 | A bit confused: the first field after case kind has not the same offset like in plain structure |
11:58:31 | inv2004 | object m: cchar, a: cchar, case kind of kT: tu: cchar . Without kind tu offset is 3, with kind tu offset is 8 |
11:59:49 | * | dddddd joined #nim |
11:59:50 | PMunch | inv2004, because the kind needs space, and because of alignment |
12:00:10 | inv2004 | PMunch, I have kind like byte in plain structure |
12:00:22 | PMunch | What do you mean? |
12:01:12 | inv2004 | I mean - that it uses some space in plain structure, the question is about alignment only or size of enum |
12:02:11 | inv2004 | so, anyway is a bit unclear why there are not aligned the same way |
12:03:37 | * | filcuc quit (Ping timeout: 256 seconds) |
12:05:37 | PMunch | Does this make any of it clearer? https://play.nim-lang.org/#ix=2iNY |
12:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:35 | * | Guest82611 quit (Ping timeout: 260 seconds) |
12:06:42 | * | supakeen joined #nim |
12:07:19 | inv2004 | PMunch, No, I mean it is clear that offset is not the same, but why |
12:08:04 | * | dadada joined #nim |
12:08:15 | PMunch | So in the first example you can see everything alignment as you expect. Adding a simple enum with two fields (Nim is able to detect that this could be stored in a single byte) you end up with the two branches sharing the same memory, and the kind taking one byte. Defining that the kind is 4 bytes leads to it triggering alignment (to speed up the reading of the field, CPU/memory performance reasons) so that enum is now aligned in the struct, |
12:08:15 | PMunch | otherwise nothing changed. |
12:08:26 | * | dadada is now known as Guest65896 |
12:08:37 | PMunch | What offset do you expect to be the same? |
12:09:19 | PMunch | Obj1.offsetOf(c) and Obj2.offsetOf(c), or Obj2.offsetOf(kind) and Obj3.offsetOf(kind)? |
12:10:17 | inv2004 | PMunch, https://play.nim-lang.org/#ix=2iO3 |
12:10:22 | inv2004 | I did not know about size |
12:11:08 | inv2004 | but if I remove it is still correct |
12:11:12 | PMunch | Yes |
12:11:21 | PMunch | Because it only has two values, so it fits in a byte |
12:12:03 | FromDiscord | <mratsim> Nim uses the same alignment as C |
12:12:50 | FromDiscord | <mratsim> if you want packed fields use the {.packed.} pragma but unaligned loads are slower and might not work at all on some architectures |
12:12:52 | PMunch | So if your enum takes more than one byte to store (either because it has too many fields, or some fields have specified values: https://play.nim-lang.org/#ix=2iO6 |
12:13:25 | FromDiscord | <mratsim> and if you work with the raw byte representation of a type for serialization for example, use "offsetOf" to get the field position |
12:14:29 | inv2004 | In your example everything is fine, let me try to copy my code |
12:14:51 | PMunch | Huh, why does Obj3 grow to 6 bytes? https://play.nim-lang.org/#ix=2iO6 |
12:15:04 | PMunch | c and d should share memory.. |
12:16:24 | inv2004 | because looks like 255 is too much |
12:17:11 | * | couven92 joined #nim |
12:18:03 | FromDiscord | <clyybber> Araq: I rebased https://github.com/nim-lang/Nim/pull/12220, should I remove the style changes too (they rely on typeof(typedesc) being a noop and they only look more ugly? |
12:18:06 | disbot | ➥ allow generic typedesc field access ; snippet at 12https://play.nim-lang.org/#ix=2iO7 |
12:19:40 | Araq | you need to remove them so that we see the old variant still works |
12:20:29 | inv2004 | PMunch, https://play.nim-lang.org/#ix=2iO9 sorry, full structure is a bit bigger, I tried to remove a lot |
12:20:48 | inv2004 | anyway you can see that tu and u are not the same offset, which I expected |
12:20:51 | Araq | btw there is network outage which is why the forum is slow |
12:22:55 | PMunch | inv2004, ah, that is because the other fields in the struct force alignment |
12:23:32 | PMunch | The `l` wants to be aligned, and so it forces alignment of the entire memory region |
12:24:13 | * | NimBot joined #nim |
12:24:34 | * | lritter quit (Ping timeout: 256 seconds) |
12:25:11 | PMunch | You can around this if you add {.packed.} to your object |
12:25:34 | PMunch | But keep in mind that `l` will now be unaligned and cause reading to be slower |
12:26:45 | inv2004 | PMunch, ah, I just put something to the l, because I have not converted the type yet :) |
12:27:12 | inv2004 | can I dismiss any fields for variant ? |
12:27:23 | PMunch | What do you mean? |
12:27:46 | inv2004 | I want just remove l:int and make kList ampty |
12:27:48 | inv2004 | empty |
12:28:04 | PMunch | Ah, use `discard` |
12:28:23 | PMunch | So `of kList: discard` |
12:29:12 | PMunch | Those other integers in the struct will likely force alignment still though |
12:29:34 | PMunch | Hmm, they would already be aligned though since you have four bytes ahead of them |
12:30:39 | FromDiscord | <clyybber> Araq: Done |
12:31:42 | inv2004 | I discarded l, but still not aligned :( |
12:33:26 | FromDiscord | <clyybber> @mratsim https://github.com/nim-lang/Nim/issues/14021#issuecomment-616516089 `Tensor` is not the same as `Tensor[int]`? |
12:33:28 | disbot | ➥ `sameType` magic doesn't work for seq (and generics?) ; snippet at 12https://play.nim-lang.org/#ix=2iOf |
12:33:37 | * | zacharycarter joined #nim |
12:35:18 | inv2004 | PMunch, https://play.nim-lang.org/#ix=2iOh |
12:36:13 | inv2004 | How do you detect which field cause the misalign ? |
12:40:35 | Araq | clyybber: merge it once it's green |
12:48:20 | * | rockcavera joined #nim |
12:52:27 | FromDiscord | <clyybber> K |
12:53:02 | FromDiscord | <clyybber> Araq: Btw, does https://github.com/nim-lang/Nim/pull/14028/commits/e8759c44ea65d34c96f205edb8194ac1cfc6c181 mean that we can't catch segfaults anymore? |
12:53:03 | disbot | ➥ refactor system.$ for objects a little; refs #13398 |
12:53:36 | Araq | the segfaults module keeps existing |
12:54:00 | FromDiscord | <clyybber> Ok, nice |
12:54:05 | Araq | --nilchecks:on was something else |
12:55:30 | FromDiscord | <clyybber> @arnetheduck What should be fixed in segfaults.nim ? |
13:00:26 | FromDiscord | <arnetheduck> @clyybber uh well, I don't know where to start even 😉 I mean, what's the objective of `segfaults.nim`? why would you want to use it? |
13:01:22 | FromDiscord | <clyybber> to catch segfaults obviously; Yeah its a bad idea generally, but its still interesting |
13:01:36 | FromDiscord | <clyybber> to catch segfaults obviously :p ; Yeah its a bad idea generally, but its still interesting |
13:03:15 | FromDiscord | <arnetheduck> well, `nilchecks` takes a behaviour and defines it, ostensibly: if you deref a pointer, you can hopefully handle it and the compiler can ensure it works by inserting `if not nil` checks or statically analyze the code |
13:03:23 | FromDiscord | <mratsim> @clyybber, no because I want to handle Tensor[bool] specifically and have a fallback for Tensor and then for the rest |
13:04:02 | FromDiscord | <arnetheduck> raising from inside a segfault handler? you're taking undefined behaviour and use undefined behaviour (raising, allocating and a whole bunch of things that you're not supposed to do in a signal handler) to define it? |
13:04:03 | FromDiscord | <clyybber> @mratsim You should use `is` then and check via sameType for Tensor[bool] specifically |
13:04:14 | FromDiscord | <mratsim> that's what i'm doing |
13:04:46 | FromDiscord | <mratsim> and that's what I said in my first message, currently the solution is to delegate the type processing to "runtime" and `when is` instead of trying to work with types in macros |
13:05:17 | FromDiscord | <arnetheduck> ie `nilchecks` has a chance of being well-defined and therefore a tool that you can rely on - `segfaults`? not so |
13:05:56 | FromDiscord | <mratsim> look at this beautiful type handling that I have to do since I can't do it in macros: https://github.com/mratsim/Arraymancer/pull/434/commits/46d32d98740d5adc3a9092ff2ad4510c1d0e6444#diff-0a37ef587fec15ad8eb65962b6f01f88R253 |
13:05:57 | disbot | ➥ Implement Numpy fancy indexing |
13:06:05 | FromDiscord | <clyybber> @mratsim I'm referring to your last reply in the issue, you are using sameType there to check `Tensor` against `Tensor[int]`, and I'd argue it should return false like it does |
13:06:19 | FromDiscord | <mratsim> `is` returns true |
13:06:37 | FromDiscord | <mratsim> i.e. for the canonical type comparator this should be true |
13:07:04 | FromDiscord | <clyybber> is returns true, but sameType is intuitively true when a is b and b is a |
13:07:31 | FromDiscord | <mratsim> then I need a `is` that works on NimNode |
13:08:31 | PMunch | inv2004, that is a bit strange indeed. It seems like in isn't able to detect that the kind+tu would mean that tr is aligned and thus aligns the whole thing to the next border |
13:08:59 | FromDiscord | <Chiqqum_Ngbata> `when FancyType is (array or seq):` |
13:09:06 | FromDiscord | <Chiqqum_Ngbata> *presses record button on forehead* |
13:09:41 | PMunch | Probably nothing you can do about that though, you might need to use {.packed.} to force it and then just manually verify that it isn't out of alignment (or by some compile-time assert checking) |
13:13:18 | Araq | arnetheduck: I know you don't care but the customer is always right and I was paid to write segfaults. it's also useful during code reviews. if the code contains 'import segfaults' you can fire the person who used it :-) |
13:13:36 | * | liblq-dev joined #nim |
13:14:08 | FromDiscord | <mratsim> "The customer is always right", looks at RFC/feature rebuttal ... --> doesn't compile 😉 |
13:14:58 | FromDiscord | <arnetheduck> well, we're not using it 🙂 it breaks core dumps, and I get no valuable feature in return - I'm a bit sad at seeing `nilchecks` go away though - like I wrote, the compiler _could_ generate the code necessary to allow me to catch nil dereferences at runtime |
13:15:33 | Araq | I want nil checking at compile-time |
13:15:42 | Araq | the run-time mechanisms all suck |
13:16:04 | FromDiscord | <mratsim> btw where is the DrNim repo? |
13:16:05 | FromDiscord | <arnetheduck> so do I, but not all cases can be resolved at compile time, so I'll settle for runtime and defined behaviour |
13:16:37 | FromDiscord | <clyybber> @mratsim DrNim is inside the nim repo afaik |
13:16:51 | Araq | mratsim: it currently lives in the Nim repo as a separate tool, it requires a compiler API extension |
13:17:29 | FromDiscord | <mratsim> looking, looksgood |
13:17:42 | FromDiscord | <mratsim> so it's a DLL that can be added to the compiler? |
13:18:04 | Araq | mratsim: the build is simply 'koch drnim', works for all OSes I tried |
13:18:07 | * | PMunch quit (Quit: leaving) |
13:19:41 | * | PMunch joined #nim |
13:21:40 | Araq | hmmm with the new exception handling impl we could actually turn signals into exceptions |
13:22:19 | FromDiscord | <clyybber> \o/ |
13:22:39 | FromDiscord | <clyybber> Araq: Phi nodes, do they help with reassignments? |
13:23:27 | Araq | clyybber: it's standard SSA |
13:24:48 | Araq | the only difference is that I don't store it in the AST nor in an IR but compute it on-the-fly for the static analyser |
13:26:19 | Araq | but the next step is to intergrate it into our CI and use it for the nim compiler |
13:26:54 | FromDiscord | <clyybber> Cool, I like the on-the-fly approach, and were just read phi node somewhere and figured you had plans to bake it into the ast |
13:27:38 | FromDiscord | <clyybber> The current approach is really nice IMO |
13:31:30 | Araq | the way I do the "versionization" of variables is still wrong |
13:34:31 | FromDiscord | <Gary M> it doesn't mean all that much, but I made the Nim extension go from over 300 files and over 1mb to 14 files and 218kb by properly packing the js 😄 |
13:34:39 | FromDiscord | <Gary M> it doesn't mean all that much, but I made the VS Code Nim extension go from over 300 files and over 1mb to 14 files and 218kb by properly packing the js 😄 |
13:34:46 | FromDiscord | <Gary M> sorry for the edit oops |
13:35:25 | FromDiscord | <clyybber> Oh, btw did you try nimlsp? |
13:35:33 | FromDiscord | <Gary M> no |
13:35:44 | FromDiscord | <Gary M> microsoft's lsp doesn't support syntax highlighting |
13:36:02 | FromDiscord | <Gary M> I ended up rewriting the syntax highlighting for the extension anyways. |
13:36:14 | FromDiscord | <Gary M> A lot of things are now uncolored but it's more idiomatic, I think |
13:36:27 | PMunch | There is an unofficial extension to LSP that offers this. So I'm looking into implementing that in nimlsp |
13:36:34 | FromDiscord | <clyybber> \o/ |
13:37:58 | FromDiscord | <Gary M> https://i.imgur.com/644FlKJ.png |
13:38:11 | FromDiscord | <Gary M> it's not public yet but it should be soon |
13:38:25 | FromDiscord | <clyybber> nice! |
13:38:43 | * | couven92 quit (Quit: Client Disconnecting) |
13:39:13 | FromDiscord | <Gary M> https://i.imgur.com/tBD5tKh.png |
13:39:41 | FromDiscord | <Chiqqum_Ngbata> Link to VS Code Nim extension? |
13:41:54 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
13:42:25 | * | pbb joined #nim |
13:44:36 | FromDiscord | <Gary M> the original or mine? |
13:45:24 | * | kenran joined #nim |
13:45:36 | FromDiscord | <Chiqqum_Ngbata> Damn there's a lot it looks like |
13:45:47 | FromDiscord | <Chiqqum_Ngbata> Yours |
13:45:49 | * | kenran quit (Client Quit) |
13:45:58 | FromDiscord | <Gary M> I said it's not public yet. |
13:46:07 | FromDiscord | <Gary M> I'm making sure it's not all borked before publishing |
13:46:32 | * | kenran joined #nim |
13:49:03 | FromDiscord | <Gary M> @Chiqqum_Ngbata ok I published it but the browser page is currently a 404 😄 |
13:49:11 | FromDiscord | <Gary M> but you might be able to find it searching Nim or Nim alt |
13:49:15 | * | inv2004 quit (Ping timeout: 260 seconds) |
13:49:55 | FromDiscord | <Gary M> if not, it's probably just going to take time to verify the package |
13:50:17 | FromDiscord | <Gary M> https://marketplace.visualstudio.com/items?itemName=garym.nim-alt looks like it's here |
13:52:34 | Araq | oh sorry I was wrong, Clyybber. the way I do PHI nodes is entirely different because ordinary PHI nodes lose information |
13:55:13 | FromGitter | <gogolxdong> @livcd, haha , nimx again |
13:56:52 | * | kenran quit (Quit: leaving) |
13:57:44 | * | kenran joined #nim |
14:00:34 | FromDiscord | <mratsim> now we just need a LLVM IR mapping and we can generate code on GPU |
14:01:08 | Araq | nlvm is that IR mapping you're talking about |
14:01:58 | FromGitter | <bung87> how to pass `ENABLE_STRICT_OBJC_MSGSEND` flag, I googled someone using it in xcode build config, dont know how to pass it during nim build |
14:03:14 | Araq | --passC:-DENABLE_STRICT_OBJC_MSGSEND |
14:05:49 | FromGitter | <bung87> `--passC="-DENABLE_STRICT_OBJC_MSGSEND=0"` I can see it in result command |
14:07:00 | FromGitter | <bung87> but it still static type check msg send |
14:20:07 | FromDiscord | <Recruit_main707> @Gary M why is self highlighted in your plug in? |
14:20:23 | FromDiscord | <Gary M> What? |
14:20:29 | FromGitter | <bung87> I found the solution. |
14:20:36 | FromDiscord | <Recruit_main707> |
14:20:36 | FromDiscord | <Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/701799480445370460/unknown.png |
14:21:03 | FromDiscord | <Gary M> Give me a sec to take a look |
14:21:11 | * | companion_cube quit (Quit: WeeChat 2.3) |
14:21:15 | FromDiscord | <Gary M> As noted colors are going to be different from the other plugin |
14:21:20 | FromDiscord | <Gary M> But I'll look into that |
14:21:26 | FromDiscord | <Recruit_main707> also, the * symbol to determine a function is public is not being highlighted, i dont know if thats not done yet |
14:21:57 | FromDiscord | <Gary M> That's not done at the moment. |
14:22:17 | FromDiscord | <Recruit_main707> ok |
14:22:17 | FromDiscord | <Recruit_main707> the theme is dark+ (i think it comes installed) |
14:22:24 | FromDiscord | <Gary M> I need to do some extra regex magic |
14:22:30 | FromDiscord | <Gary M> Dark+ isn't very good. |
14:22:52 | FromDiscord | <Gary M> Most themed will give you an extra color or two is any given file over the pre-installed themes |
14:23:04 | FromDiscord | <Gary M> Most custom themes* |
14:26:30 | FromDiscord | <Recruit_main707> another big issue ive found, do you have a github for this so that i dont fill the channel? |
14:26:30 | FromDiscord | <Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/701800966789398538/unknown.png |
14:27:42 | FromDiscord | <Gary M> DM me |
14:27:52 | FromDiscord | <Recruit_main707> ok, i will |
14:30:51 | FromDiscord | <clyybber> lol, my github dark theme triggers when searching for github on duckduckgo |
14:31:26 | FromGitter | <gogolxdong> nimx requires Android Studio as far as I know, I remembered someone said he can pack android apk in Nim without Android Studio. |
14:32:09 | FromGitter | <gogolxdong> generate apk |
14:32:18 | zacharycarter | yeah you can |
14:32:27 | zacharycarter | but you still need the android NDK |
14:32:37 | zacharycarter | and cross compilation toolset |
14:32:43 | zacharycarter | which the NDK includes |
14:34:56 | * | abm joined #nim |
14:36:14 | zacharycarter | https://github.com/fragworks/frag-android |
14:36:16 | zacharycarter | might help |
14:36:37 | * | polypoid[m] joined #nim |
14:36:47 | zacharycarter | there's also this - https://forum.nim-lang.org/t/4840 |
14:37:06 | * | kenran quit (Quit: leaving) |
14:38:51 | * | waleee-cl joined #nim |
14:39:44 | * | nsf quit (Quit: WeeChat 2.8) |
14:46:20 | shashlick | @Recruit_main707: did you see my comments on the nimterop group? |
14:54:37 | FromDiscord | <Gary M> ok so my alternate Nim extension for VS code is up so if anyone wants to bug test it go ahead and install it and shoot me some DM's where your syntax coloring isn't what you expect 😄 I haven't covered everything, yet. |
14:56:37 | FromDiscord | <Gary M> and araq or someone is going to have to explain what the problem is with nimsuggest apparently opening more than one instance |
14:59:43 | FromGitter | <bung87> ```code paste, see link``` ⏎ ⏎ what am I missing when I using thread runs a webview? [https://gitter.im/nim-lang/Nim?at=5e9db8dfd240da24338a0fee] |
15:01:32 | FromDiscord | <EdgyNerd> I wanna create a simple compiler in Nim, is there a good library for that? |
15:01:55 | FromDiscord | <mratsim> Do you want it to work at compile-time or runtime? |
15:02:17 | FromDiscord | <EdgyNerd> compile-time probably |
15:04:02 | FromDiscord | <mratsim> I'm certainly not a compiler dev but I have a proof-of-concept of a compiler implemented as macros for an embedded DSL here: https://github.com/numforge/laser/tree/master/laser/lux_compiler |
15:04:37 | FromDiscord | <mratsim> and various experiments that gradually led me to that here: https://github.com/mratsim/compute-graph-optim |
15:05:13 | FromDiscord | <mratsim> if using an embedded DSL, you can skip all the lexing/scanning/tokenizing/parsing and just let Nim macros do it. |
15:05:22 | FromDiscord | <mratsim> you only need to work on the AST. |
15:07:40 | * | Trustable joined #nim |
15:08:31 | zacharycarter | question - I want to be able to mutate a pointer inside of a procedure but `var pointer` seems wrong... Also, I'm unable to pass `nil` to a proc with a `var pointer` parameter - any ideas? |
15:08:55 | FromDiscord | <mratsim> This may also be seen as a compiler. It takes a state machine in a declarative syntax and produces the code: https://github.com/mratsim/Synthesis |
15:09:24 | FromDiscord | <mratsim> I suggest you use `var ptr T` |
15:09:52 | FromDiscord | <mratsim> "pointer" is problematic because it gets implicitly converted and upon conversion it misses the "mutable"/var tag |
15:10:17 | FromDiscord | <mratsim> I've had that issue when implementing channels in Weave |
15:10:39 | zacharycarter | gotcha, I'll do that thanks mratsim! |
15:12:19 | FromDiscord | <mratsim> otherwise you can use ptr pointer or use cast[var pointer](p.addr), there are ways around that be just be aware of the implicit conversion |
15:14:29 | * | inv2004 joined #nim |
15:14:40 | zacharycarter | makes sense |
15:15:24 | * | uvegbot quit (Ping timeout: 258 seconds) |
15:18:52 | * | bra-ket joined #nim |
15:20:00 | * | liblq-dev quit (Ping timeout: 258 seconds) |
15:20:45 | disruptek | ~stream |
15:20:46 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
15:24:53 | disruptek | i need a recommendation for a zoom replacement. |
15:25:03 | disruptek | 3 party video chat. |
15:31:00 | FromGitter | <matrixbot> `Zoom` Jitsi? |
15:31:15 | disruptek | jitsi? |
15:32:02 | disruptek | looks promisin. |
15:32:04 | disruptek | thanks. |
15:32:22 | disruptek | have you used it? |
15:32:30 | disruptek | this has to be used by old people. |
15:37:16 | * | tane joined #nim |
15:37:23 | zacharycarter | we just tried Jitsi lol because zoom was so laggy today and Jitsi noworki |
15:37:32 | disruptek | ugh. |
15:40:41 | FromGitter | <matrixbot> `Zoom` It had some issues with FF so I had to use ungoogled chromium for it. Worked fine. Hope they'll make it work with Firefox |
15:40:45 | FromDiscord | <Recruit_main707> shashlick: right now, thank you, i will have a look at it when i can |
15:40:58 | zacharycarter | I was using the native app |
15:43:23 | shashlick | okay no problem |
15:53:50 | FromGitter | <brentp> this: https://github.com/brentp/somalier/blob/master/somalier.nimble#L5-L10 used to work, but doesn't seem to any longer, apparently due to order in which files are sent to the .nimble install location (?). Is there a reliable way to get the version in a .nimble file without copying it? |
16:00:52 | * | liblq-dev joined #nim |
16:01:37 | FromDiscord | <mratsim> I've noticed that nimble used to use this trick and removed it recently |
16:03:27 | FromGitter | <brentp> exactly. that's where i originally copied it from and also noticed it is now gone. |
16:11:34 | zacharycarter | I want to create an object pool with 16 bit alignment - should I just use alloc / dealloc and pointer arithetic? or is there a better way? |
16:12:41 | zacharycarter | I can specify a capacity for the pool at runtime |
16:12:53 | zacharycarter | and ideally the pool is growable |
16:13:04 | * | nsf joined #nim |
16:18:16 | FromDiscord | <mratsim> use the {.align 16.} pragma |
16:18:51 | FromDiscord | <mratsim> example on my static preallocated pool: https://github.com/mratsim/weave/blob/master/weave/memory/persistacks.nim#L15-L51 |
16:19:00 | zacharycarter | thanks |
16:19:06 | FromDiscord | <Gary M> Gpu stuff? |
16:19:26 | FromDiscord | <mratsim> and my growable pool: https://github.com/mratsim/weave/blob/master/weave/memory/memory_pools.nim#L133 |
16:20:13 | zacharycarter | perfect |
16:20:19 | FromDiscord | <mratsim> in my case the pool design is somewhat complexified by the need to make them thread-safe |
16:20:28 | zacharycarter | thanks mratsim |
16:20:52 | FromDiscord | <mratsim> well "complex", because the only multithreaded part is things that use remoteFree: https://github.com/mratsim/weave/blob/master/weave/memory/memory_pools.nim#L115 |
16:21:30 | FromDiscord | <mratsim> you also have an example of using LLVM/GCC Asan (Address Sanitizer) to make sure you don't introduce memory bugs |
16:22:15 | FromDiscord | <mratsim> https://github.com/mratsim/weave/blob/master/weave/memory/memory_pools.nim#L174-L182 with the wrapper proc here: https://github.com/mratsim/weave/blob/master/weave/instrumentation/sanitizers.nim#L11-L37 |
16:22:53 | zacharycarter | ah cool - I'm just compiling my entire program with those compiler / linker flags |
16:22:58 | FromDiscord | <mratsim> the design is here: https://github.com/mratsim/weave/tree/master/weave/memory#how-does-that-work |
16:23:13 | zacharycarter | but that is nice - I'll use that |
16:23:44 | FromDiscord | <mratsim> one thing of interest to you is that the pool has a "heartbeat" and can trigger heavy/maintenance after a deterministic amount of allocation |
16:25:10 | FromDiscord | <mratsim> so to deal with trillions of tasks allocated in a couple of milliseconds I have a second layer of caching on top of the memory pool, and regularly it calls a heavy maintenance proc to release some of the cached memory to the pool if needed: https://github.com/mratsim/weave/blob/master/weave/memory/lookaside_lists.nim#L101-L102 |
16:25:33 | FromDiscord | <mratsim> (I'm supposing you need that for a game engine that needs to deal with particles for example) |
16:26:04 | FromDiscord | <mratsim> the field is called "hook": https://github.com/mratsim/weave/blob/master/weave/memory/memory_pools.nim#L153-L162 |
16:26:29 | zacharycarter | niceee |
16:27:08 | zacharycarter | right now I'm implementing a job system similar to the one described in naughty dog's slidedeck using fibers as job contexts |
16:27:26 | zacharycarter | but I should just see if the fix for --gc:arc that worked to allow me to use threads also works with weave |
16:28:07 | FromDiscord | <mratsim> I yes I saw that one |
16:29:03 | shashlick | brentp: you might be able to get around that nimble issue with a nim.cfg and a --path: |
16:29:11 | FromDiscord | <mratsim> mmmh having Weave more optimized for games shouldn't be too hard, I've outlined what would be needed here: https://github.com/mratsim/weave/issues/88 |
16:29:12 | disbot | ➥ Latency-optimized / job priorities / soft real-time parallel scheduling |
16:30:26 | FromDiscord | <mratsim> also if you look there: https://github.com/numforge/laser/blob/master/research/runtime_threads_tasks_allocation_NUMA.md I've linked to 2 implementations of Naughty Dogs fibers - https://github.com/RichieSams/FiberTaskingLib, https://github.com/SergeyMakeev/TaskScheduler |
16:30:59 | FromDiscord | <mratsim> I suggest you also look into Intel task scheduler for games: https://github.com/GameTechDev/GTS-GamesTaskScheduler |
16:32:32 | zacharycarter | thanks for the protips |
16:32:38 | * | filcuc joined #nim |
16:33:30 | zacharycarter | btw mratsim: weave seems to work with `--exceptions:setjmp` with `--gc:arc` |
16:33:45 | FromDiscord | <mratsim> if you can comment in the Weave issue about what you care about in games that would help me as well |
16:34:18 | zacharycarter | sure |
16:35:42 | FromDiscord | <mratsim> Weave used to work with arc for all the benchmarks/test suite, the main unknown is Nim seq/strings |
16:36:25 | FromDiscord | <mratsim> well I'm pretty sure they don't work know because I use copyMem without following pointers but, would support be easy enough to add |
16:37:57 | * | Sembei joined #nim |
16:38:34 | * | endragor quit (Remote host closed the connection) |
16:39:30 | * | Intensity quit (Quit: Ping timeout (120 seconds)) |
16:59:28 | * | Intensity joined #nim |
17:14:48 | * | edge joined #nim |
17:14:58 | edge | exit |
17:15:05 | * | edge quit (Client Quit) |
17:15:27 | Yardanico | lol |
17:17:52 | * | konvertex quit (Quit: quit) |
17:29:28 | * | msmorgan quit (Ping timeout: 245 seconds) |
17:30:01 | * | msmorgan joined #nim |
17:41:47 | FromDiscord | <treeform> What is the state of GC arc now? Does it support async stuff? |
17:41:59 | disruptek | yes, but not without leaks. |
17:42:02 | Yardanico | you can *run* async with it, but it'll leak because async has cycles :) |
17:42:07 | Yardanico | or something like that |
17:42:20 | FromDiscord | <Recruit_main707> therefore, not production ready we will call it |
17:42:58 | disruptek | don't count on it working with this async impl. |
17:43:26 | FromDiscord | <Recruit_main707> wdym? async wont work in a close future with arc? |
17:43:39 | disruptek | not in its current form, no. |
17:43:48 | Yardanico | 4raq himself said so, disruptek is right |
17:44:09 | Yardanico | we'll probably need another async impl or really rework this one (which will mean basically the same) :P |
17:44:51 | disruptek | arc is the much more valuable property in nim. |
17:45:01 | * | xcm quit (Remote host closed the connection) |
17:45:13 | * | filcuc quit (Ping timeout: 264 seconds) |
17:45:17 | FromDiscord | <treeform> how well does gc arc work with threads? |
17:45:37 | disruptek | better than gc:ref afaik. |
17:45:42 | disruptek | and improving, still. |
17:46:14 | Yardanico | @treeform you can access GC'd global data from threads :) but it's still not perfect, there are some regressions over refc |
17:46:37 | Yardanico | like https://github.com/nim-lang/Nim/issues/13935 |
17:46:39 | disbot | ➥ SIGSEV encountered when creating threads in a loop w/ --gc:arc ; snippet at 12https://play.nim-lang.org/#ix=2ioe |
17:47:49 | * | xcm joined #nim |
17:49:19 | * | Vladar quit (Quit: Leaving) |
17:57:02 | leorize[m] | #13201 is merged! |
17:57:03 | disbot | https://github.com/nim-lang/Nim/pull/13201 -- 6Make file descriptors from stdlib non-inheritable by default |
17:59:21 | Araq | fwiw I'm continuing my work on the cycle collector |
17:59:31 | leorize | orc? |
17:59:35 | Araq | yeah |
17:59:55 | disruptek | Araq: why can't we use the TInstantiation seq to figure out when new generic type instances are created? |
18:00:00 | leorize | thinout didn't work out? |
18:00:06 | disruptek | thinout works. |
18:00:10 | disruptek | it's just not automagic. |
18:00:20 | disruptek | people hate that. |
18:00:28 | Araq | well currently both thinout and orc have the same underlying bugs |
18:00:56 | Araq | so it doesn't really matter what I work on, the bugs must be fixed |
18:01:22 | leorize | orc can have a flag like -d:printCycles to tell us where to put thinout() :P |
18:01:59 | Araq | hmm |
18:02:14 | Araq | maybe, it's a new idea, congrats |
18:02:37 | disruptek | maybe i should have started here. |
18:03:22 | * | Faulander joined #nim |
18:03:35 | Faulander | hi guys |
18:03:57 | Yardanico | hello |
18:03:59 | disruptek | or maybe that was a response to leorize. |
18:05:44 | Faulander | I have a quick question: i am trying to convert the content of a header to a string, i get it like this var tmpCookie = response.headers["set-cookie"], its of type HttpHeaderValues or something. How to i get the values? |
18:06:09 | leorize | run a for loop on response.headers |
18:06:31 | Araq | there is also a converter to string or something |
18:06:42 | Faulander | i know that its set-cookie, i just need the value :) |
18:06:46 | * | Intensity quit (Ping timeout: 256 seconds) |
18:07:15 | * | nsf quit (Quit: WeeChat 2.8) |
18:07:28 | Yardanico | @Faulander .headers is not a string, it's a sequence by the way |
18:07:32 | Faulander | var tmpCookie = response.headers["set-cookie"] |
18:07:33 | Faulander | echo $tmpCookie, ":", $tmpCookie.type.name |
18:07:34 | Yardanico | becaue there might be more than 1 header of the same name |
18:07:43 | Faulander | and i get: |
18:08:00 | Faulander | SID=AS8q6lmkBLQM6Wg/1uTe2/QpxckqroVl; HttpOnly; path=/HttpHeaderValues |
18:08:04 | Yardanico | for header in response.headers["set-cookie"]: echo header |
18:08:25 | Faulander | yes, then i get exactly that output |
18:08:40 | Faulander | as you see, the type = "HttpHeaderValues" |
18:09:01 | Yardanico | yes, that's "distinct seq[string]" |
18:09:53 | FromDiscord | <Recruit_main707> how can you avoid the ugly error lines when working with threads |
18:09:53 | FromDiscord | <Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/701857177689784340/unknown.png |
18:10:15 | Yardanico | add switch("threads", "on") to your .nims config file |
18:10:19 | Yardanico | or --threads:on to your .cfg file |
18:10:21 | Yardanico | for the project |
18:10:55 | Yardanico | nim.cfg for .cfg, yourfilename.nims for nims (same name as the main file in your project) |
18:11:08 | FromDiscord | <Recruit_main707> i dont have a .nims file, nor a .cfg |
18:11:14 | Yardanico | you need to create one :) |
18:11:35 | disruptek | Araq: ??? |
18:12:27 | disruptek | http headers should be unique UNLESS they are cookies. |
18:12:33 | disruptek | per RFC. |
18:12:47 | Yardanico | disruptek: well sorry but when I made a PR 3 years ago I didn't know about that :P |
18:13:02 | disruptek | i believe it's fixed in 1.2. |
18:14:22 | FromDiscord | <Recruit_main707> Yaradinco: errors at compile time also |
18:14:22 | FromDiscord | <Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/701858310722420807/unknown.png |
18:14:42 | Yardanico | not literally |
18:14:55 | FromDiscord | <Recruit_main707> oh |
18:14:55 | Yardanico | just switch("threads", "on") |
18:15:00 | FromDiscord | <Recruit_main707> i see :P |
18:15:00 | Yardanico | without "just" word ofc |
18:15:10 | FromDiscord | <Recruit_main707> xD |
18:16:39 | Araq | disruptek: we probably can use TInstantiation seq, I simply never tried |
18:16:58 | disruptek | okay. i will mess with it. |
18:32:17 | Faulander | yeah, if i would understand that: Error: implicit object field construction requires a .partial object, but got HttpClientBase:ObjectType |
18:33:05 | Yardanico | црфе фку нщг екнштп ещ вщ, |
18:33:11 | Yardanico | what are you trying to do?* |
18:33:42 | leorize | does it mean exactly that in russian? :P |
18:34:01 | Faulander | no, theres the question mark missing |
18:34:09 | Yardanico | leorize: nothing, I just forgot to switch kbd layout |
18:34:20 | FromDiscord | <Generic> I was about to ask |
18:34:26 | Faulander | let client.headers = newHttpHeaders({ "set-cookie": self.cookie }) |
18:34:33 | FromDiscord | <Recruit_main707> leorize: |
18:34:33 | FromDiscord | <Recruit_main707> https://cdn.discordapp.com/attachments/371759389889003532/701863393304510554/unknown.png |
18:34:47 | FromDiscord | <Generic> even russian there aren't so many words without vocals |
18:35:08 | Faulander | self.cookie is a string, which i got from the login method by parsing the set-cookie from there. |
18:35:38 | Yardanico | "let client.headers " not like that |
18:35:53 | Yardanico | you shoudl first have a client like "var client = newHttpClient()" and then do "client.headers = stuff" |
18:36:03 | Faulander | yes, i have that |
18:36:08 | FromGitter | <brentp> @shashlick, can you expand on that? not sure how to do it |
18:37:09 | Faulander | https://play.nim-lang.org/#ix=2iQU |
18:37:12 | Faulander | part of the code |
18:37:32 | Yardanico | as i said "let client.headers = newHttpHeaders({ "set-cookie": self.cookie })" is not corrent |
18:37:40 | Yardanico | correct* :P |
18:37:48 | Yardanico | "let" or "var" or "const" are for declaring new variables, not modifying existing ones |
18:37:55 | Yardanico | you should remove "let" from this line |
18:38:10 | FromDiscord | <Recruit_main707> happens to the best of us :P |
18:42:13 | shashlick | @brentp so when you install the package, you just need import x/y |
18:42:28 | shashlick | Problem is only when it is not installed and the src directory is present |
18:43:04 | shashlick | So you can create a nim.cfg with --path:src in your project root |
18:43:20 | shashlick | So when you run without install, the same import x/y will work |
18:43:36 | shashlick | No need for any special code in the nimble file to import version |
18:43:46 | Faulander | thanks yardanico, but now i get no connection anymore :) But continue to dig into it. |
18:47:06 | * | Intensity joined #nim |
18:55:17 | leorize | I need help choosing the direction to implement async anonymous pipes for windows |
18:55:47 | FromGitter | <brentp> @shashlick. of course. thank you! will give it a try |
18:55:57 | leorize | I can either implement it using true asynchronous pipes, but then I'll need to use threadpool to implement the async part since those stuff are blocking only |
18:56:24 | leorize | or I can make named pipes and use overlapped i/o for normal async |
18:56:51 | leorize | the bad part of named pipes is that they are inherantly insecure compared to asynchronous pipes |
18:57:06 | leorize | anonymous* |
18:57:23 | leorize | but threadpool will certainly be slower :/ |
18:57:46 | leorize | so it's performance vs security I suppose |
18:58:09 | FromDiscord | <Recruit_main707> who needs security, risk it for the biscuit |
19:00:43 | * | filcuc joined #nim |
19:17:49 | nerdrat[m] | dom96: Just for the record. I just had updated to nim 1.2.0 through choosenim 0.5.1 which I have in the laptop. Choosenim issue #194 does not seem apply to choosenim v0.5.1 |
19:18:12 | leorize | ping shashlick |
19:19:01 | nerdrat[m] | Is shashlick in charge? |
19:20:16 | leorize | I'd say so, dom hasn't been active in development |
19:20:49 | * | abm quit (Quit: Leaving) |
19:28:16 | shashlick | sup |
19:28:27 | shashlick | this is the extraction issue right? |
19:29:18 | shashlick | what's interesting is that nimarchive was introduced in 0.5.0 and nothing was changed in 0.6.0 related to extraction |
19:30:03 | FromDiscord | <Rika> maybe its not triggered in certain cases |
19:30:33 | FromDiscord | <Varriount> leorize: https://stackoverflow.com/questions/60645/overlapped-i-o-on-anonymous-pipe |
19:30:54 | leorize | well I know that |
19:31:09 | leorize | my problem is what approach to go on |
19:31:22 | leorize | whether I value security or performance more |
19:31:36 | leorize | not security but "correctness" or performance |
19:31:53 | FromDiscord | <Varriount> Yeah, but I'm not sure anonymous pipes are intrinsically more secure |
19:32:20 | FromDiscord | <Varriount> They may just be named pipes with a generated name |
19:32:24 | leorize | they are, anon pipes can only be accessed by whoever got the handle |
19:32:32 | leorize | not anymore since windows 7 |
19:32:45 | leorize | named pipes can be accessed by whoever got the rights |
19:33:08 | leorize | heck it can even be accessed over the network |
19:33:27 | leorize | and named pipes also make the distinction of "server" and "client" |
19:34:09 | FromDiscord | <Varriount> https://docs.microsoft.com/en-us/windows/win32/ipc/named-pipe-security-and-access-rights |
19:34:46 | FromDiscord | <Varriount> Oh, hm. The owning account has full control of the pipe |
19:35:05 | FromDiscord | <Varriount> By default, anyway |
19:35:17 | leorize | yep, meaning any process can access the pipe knowing the name |
19:35:21 | leorize | there's a walkaround for that |
19:35:45 | leorize | you can make a pipe bound once |
19:36:06 | leorize | but any user with admin context will be able to modify that :) |
19:36:07 | FromDiscord | <Varriount> leorize: Do you know offhand what rights are required to read process memory or inject a thread into a remote process? |
19:36:25 | dom96 | nerdrat[m], yeah, as shashlick said, that doesn't make sense. Are you sure it happens with 0.6.0 and not 0.5.1 on the same machine? |
19:36:35 | FromDiscord | <Varriount> (read another processes memory under the same user) |
19:37:19 | leorize | not sure, but administrative rights are required |
19:38:34 | dom96 | leorize: what are you using pipes for btw? |
19:38:43 | dom96 | I'd avoid threadpool as hard as I could fwiw |
19:39:00 | leorize | implementing an osproc replacement |
19:39:24 | dom96 | you are aware of the asynctools package right? |
19:39:46 | leorize | it's based of osproc and face the same restrictions |
19:40:03 | dom96 | fork it? AFAIK it implements pipes |
19:40:03 | leorize | and asyncpipe for windows is designed using named pipe |
19:40:18 | leorize | and network access to those pipe is not disabled as well |
19:40:55 | leorize | I can borrow code from it when I need it |
19:41:07 | leorize | but I aim for different things than that project, it's better to start fresh |
19:41:37 | * | filcuc quit (Ping timeout: 256 seconds) |
19:42:35 | * | filcuc joined #nim |
19:44:35 | nerdrat[m] | <shashlick "what's interesting is that nimar"> The thing is, am I the only one getting this choosenim behavior? |
19:44:42 | FromDiscord | <Varriount> leorize: It _seems_ (though I can't test this, so I'm not sure) that a user has full rights to access their own processes |
19:44:44 | PMunch | Hmm, is there a way to turn off "Spacing" warnings in a DSL? |
19:45:49 | Yardanico | well you can always add {.push hint[Something]:off.} and then {.pop.} |
19:45:57 | FromDiscord | <Varriount> And since a process, by default, inherit's a user's rights, one process can call read/witeprocessmemory on another of the user's processes. |
19:46:01 | FromDiscord | <Varriount> https://devblogs.microsoft.com/oldnewthing/20040312-00/?p=40273 |
19:46:12 | leorize | niceeeeee windows |
19:46:36 | Zevv | PMunch: Not that I know of. I need to do {.push warning[Spacing]: off.} all the time :/ |
19:46:46 | leorize | I'd still want to do this thing correctly though, it's better to have less vuln than more |
19:47:00 | Yardanico | Zevv: well if he has a DSL he can put that push to be automatically inserted :P |
19:47:08 | leorize | I think I might have a good enough compromise to use named pipe, but I'm not sure :/ |
19:47:52 | Zevv | Yardanico: I don't think so. Wrong compiler phase. But I'd love to be proven wrong because NPeg also suffers from this |
19:47:52 | PMunch | Yardanico, well the code the macro generate doesn't have the spacing warning, so it wouldn't help to expand to something with the push pragma.. |
19:48:08 | PMunch | Zevv :( |
19:48:15 | FromDiscord | <Varriount> leorize: yeah, but if an enemy process can read another process's memory, it's a moot point |
19:49:58 | * | NimBot joined #nim |
19:50:17 | leorize | it's easier to read from a pipe than from memory :) |
19:50:35 | leorize | but I think I'll settle with named pipes |
19:50:53 | leorize | true anon pipes for synchronous ops |
19:51:04 | leorize | and pseudo anon for async |
19:51:10 | leorize | seems like a good compromise |
19:51:35 | leorize | for short and simple things most people would use synchronous pipes anyway |
19:53:45 | leorize | thanks for the help @Varriount |
20:00:01 | FromDiscord | <Varriount> leorize: Again, I'm not 100% certain. Normally I would test this, but my personal laptop barely stays up for 5 minutes before panicking |
20:00:18 | FromDiscord | <Varriount> I think the hard drive had failed |
20:00:29 | * | Jesin quit (Quit: Leaving) |
20:00:49 | leorize[m] | that's bad |
20:01:36 | leorize[m] | looking at Rust's implementation, I can see that they care about who get the "server" side of the pipe |
20:02:16 | leorize[m] | hmm, what exactly does the owner of the server side of the named pipe have that the client doesn't |
20:02:38 | disruptek | data |
20:03:23 | leorize[m] | not that, I mean whether they have any additional rights or smt like that |
20:03:47 | PMunch | Turned my HackerNews Q&A reply into a post on my site: https://peterme.net/nim-qa-originally-a-hn-reply.html |
20:04:16 | Zevv | hn q&a? Link? |
20:04:28 | Zevv | oh it's in your post :) |
20:04:33 | FromDiscord | <Varriount> PMunch: Should we submit it to HackerNews? 😉 |
20:04:54 | PMunch | Varriount, haha that would be great :P |
20:04:58 | * | Jesin joined #nim |
20:05:11 | PMunch | A HN reply turned article, turned HN post |
20:05:47 | dom96 | ooh submit it :D |
20:07:11 | PMunch | Varriount, you want the honors? :P |
20:07:36 | * | xcm quit (Remote host closed the connection) |
20:07:37 | * | rockcavera quit (Remote host closed the connection) |
20:10:02 | * | xcm joined #nim |
20:12:03 | shashlick | nerdrat[m]: i think this is the second time someone has reported an extraction issue but last time, stuff was not extracted at all |
20:12:13 | shashlick | or maybe i'm misremembering |
20:12:28 | shashlick | regardless, we need your help to root cause this if you can make it fail consistently |
20:12:34 | * | rockcavera joined #nim |
20:12:46 | shashlick | could definitely use the help cause i'm not able to recreate the issue locally |
20:18:12 | * | D_ quit (Ping timeout: 260 seconds) |
20:18:23 | * | D_ joined #nim |
20:19:09 | disruptek | Araq: this is gonna work. |
20:27:19 | * | filcuc quit (Ping timeout: 260 seconds) |
20:27:30 | * | PMunch left #nim ("leaving") |
20:27:47 | * | PMunch joined #nim |
20:35:02 | * | narimiran quit (Ping timeout: 264 seconds) |
20:35:04 | FromGitter | <brentp> anyone got a docker image with the zig CC set up and working for nim static builds? |
20:35:06 | FromGitter | <sealmove> guys would you recommend BSON? |
20:41:54 | Zevv | if you pay enough, sure |
20:42:00 | Zevv | I would recommend anything |
20:42:09 | disruptek | wut |
20:42:20 | disruptek | whore. |
20:45:02 | Yardanico | D: |
20:45:13 | FromDiscord | <Rika> bson sounds good |
20:45:29 | disruptek | what, whores don't sound good? |
20:49:00 | FromDiscord | <IanIAnIAN> I use BSON every day |
20:49:07 | FromDiscord | <IanIAnIAN> it keeps my hair soft any shiny |
20:54:53 | FromGitter | <sealmove> pay enough? |
20:55:09 | disruptek | you don't have to pay much for a whore. |
20:55:10 | FromGitter | <sealmove> sorry Zevv, didn't get your joke :3 |
20:55:37 | disruptek | well, depends on the customer, i guess. |
20:57:01 | PMunch | Wow, that question derailed at record speed :P |
20:57:47 | FromDiscord | <Varriount> @IanIAnIAN I use the all-in-one cant-decide-if-its-a-string-or-a-number YAML |
20:57:47 | * | PMunch quit (Quit: leaving) |
20:58:44 | FromDiscord | <Rika> oh man not yaml |
20:59:02 | FromDiscord | <Rika> easy for humans to read horrible for humans to code a parser |
20:59:11 | Yardanico | really? |
20:59:16 | Prestige | I think yaml is hard to read |
20:59:18 | Yardanico | isn't it just indentation |
20:59:44 | Yardanico | if I need a config for my project I just use TOML |
20:59:53 | Yardanico | it's quite easy to understand and has "parsetoml" nim lib :P |
21:00:05 | disruptek | it cannot read what it writes. |
21:00:08 | disruptek | also it looks like shit. |
21:01:03 | * | inv2004 quit (Read error: Connection reset by peer) |
21:05:21 | FromDiscord | <Varriount> Yardanico: The thing I dislike about TOML is that it's less-than-ideal for storing arbitrarily nested data |
21:05:48 | FromDiscord | <Varriount> For example, a Cloudformation or Terraform template. |
21:07:31 | FromDiscord | <Varriount> (Although I guess those aren't examples of arbitrarily nested data, just heavily nested data) |
21:08:19 | FromDiscord | <Varriount> And the big thing YAML has that I've only ever seen XML have is support for non-native (to the configuration language) data types. |
21:08:44 | disruptek | lua |
21:09:15 | FromDiscord | <Varriount> Lua is a data format? |
21:09:20 | disruptek | dhall |
21:09:27 | * | xet7 quit (Quit: Leaving) |
21:09:33 | disruptek | lua has non-native (to the configuration language) data types. |
21:11:29 | FromDiscord | <Varriount> Oh, this is neat: https://dhall-lang.org/# |
21:12:55 | FromDiscord | <Varriount> I'm not super excited about some of the syntactic constructs, but I guess you have to make tradeoffs somewhere. |
21:17:56 | Araq | ah that again |
21:18:21 | FromDiscord | <Varriount> Oh dear. I'm sure you're going to point out some horrible flaw, aren't you? |
21:18:40 | disruptek | he loves to comment on the whole Turing Complete thing. |
21:18:46 | Araq | ^^ :D |
21:19:04 | Araq | if you bring it up, you have no clue about it. |
21:19:22 | disruptek | not such a hard concept. |
21:19:29 | Araq | apparently it is |
21:19:50 | FromDiscord | <Varriount> Should I care whether it's turing-complete or not? |
21:20:27 | disruptek | it's a bothersome "feature" of a configuration language. |
21:20:32 | disruptek | also, who gives a shit. |
21:20:58 | Araq | you shouldn't care. |
21:21:14 | disruptek | there are better reasons not to use dhall. 😁 |
21:22:51 | Araq | there are instruction sets with 1 instruction that are turing complete. Easy to write an interpreter for. now write "Doom" in it. you can't, why not? because turing completeness doesn't mean you can access the graphical subsystem, for example. TC is not about "arbitrary code execution", that's the job of so called "sand boxing". |
21:23:23 | disruptek | no, the point in dhall is that you can be sure your config will complete execution. |
21:24:15 | disruptek | i'll take "Problems We Don't Have" for $400, Alex. |
21:24:25 | Araq | :-) yes, that's the only thing that is really related to TC. same you can do with other mechanisms though |
21:24:48 | Araq | and arguably via better mechanisms |
21:24:59 | disruptek | such as? |
21:25:08 | FromDiscord | <Rika> what the hell, that hash thing they have in the main page |
21:25:11 | FromDiscord | <Rika> thats funky as fuck |
21:25:24 | Araq | just stop running the VM after N processed instructions, disruptek |
21:25:40 | disruptek | you always fall back on that. |
21:26:00 | Araq | it's the best mechanism, otherwise I can give you the ackermann function |
21:26:19 | Araq | it does terminate. eventually. |
21:26:22 | disruptek | it doesn't feel like the best. |
21:26:38 | disruptek | it feels like it requires knowledge of the code/env that i may not have or be able to presume. |
21:26:45 | disruptek | practically, sure, but impractically? no. |
21:27:10 | Araq | well it's not an important problem to begin with |
21:27:31 | Araq | plenty of systems use Lua for configuration and "omg, does this ever stop" is rarely a problem |
21:27:32 | disruptek | as evidenced by the occassion of your solution in the compiler. 🤣 |
21:27:49 | disruptek | like i said... $400. |
21:28:04 | FromDiscord | <Elegant Beef> Then there is me planning on using nims for configurating my window manager |
21:28:19 | Araq | my solution works well and the VM is used for programming, not for configuration |
21:28:22 | disruptek | use the simplest possible thing. |
21:28:34 | disruptek | nim ships with several config formats. |
21:28:58 | FromDiscord | <Varriount> > nim.cfg, nimble, nimscript... |
21:29:10 | FromDiscord | <Elegant Beef> Yea but none are as fun as using nims for configuring values inside the wm |
21:29:23 | disruptek | "fun" |
21:30:12 | FromDiscord | <Varriount> Elegant Beef: What WM is this? |
21:30:16 | disruptek | know what's fun about wm? |
21:30:21 | disruptek | managing windows. |
21:30:25 | FromDiscord | <Rika> ok |
21:30:27 | FromDiscord | <Elegant Beef> im making my own WM |
21:30:34 | disruptek | embedding the nim vm in your wm... not so much. |
21:30:40 | * | xet7 joined #nim |
21:30:53 | FromDiscord | <Elegant Beef> If only i wasnt forcing the usage of a status bar |
21:31:02 | FromDiscord | <Elegant Beef> Damn, my wm has a forced shitty status bar |
21:31:49 | FromDiscord | <Elegant Beef> Not that it couldnt use another status bar with about 60 seconds of changes |
21:32:13 | FromDiscord | <Varriount> Elegant Beef: What about pluggable toolbars, like internet explorer. |
21:32:24 | FromDiscord | <Elegant Beef> eh? |
21:32:31 | FromDiscord | <Varriount> Just imagine, the fun of misc. toolbars, but for every window. |
21:33:20 | FromDiscord | <Varriount> https://i.stack.imgur.com/pOAAU.jpg |
21:33:28 | FromDiscord | <Elegant Beef> Lol sounds great! |
21:33:40 | FromDiscord | <Rika> make sure you enforce at LEAST 20 |
21:33:47 | FromDiscord | <Elegant Beef> My current issue is with my status bar being silly crashes my wm if i have two open |
21:33:57 | FromDiscord | <Elegant Beef> so dual monitor a no go |
21:34:17 | FromDiscord | <Elegant Beef> *Use imgui, it'd be funny i said* |
21:34:25 | disruptek | lol |
21:34:45 | FromDiscord | <Elegant Beef> But i mean it doesnt look abohrrent |
21:34:45 | FromDiscord | <Elegant Beef> https://cdn.discordapp.com/attachments/371759389889003532/701908739917348946/unknown.png |
21:35:10 | FromDiscord | <Rika> i have a feeling this is abuse of imgui |
21:35:14 | FromDiscord | <Elegant Beef> psh |
21:35:17 | FromDiscord | <Elegant Beef> Totally |
21:36:55 | FromDiscord | <Varriount> Elegant Beef: Of course. Don't you know imgui isn't supposed to be used near cute pictures of dogs? |
21:37:56 | FromDiscord | <Elegant Beef> Cmon guys how could i be abusing imgui it's not like it takes 1.8% of my cpu to draw a single bar |
21:38:27 | Yardanico | limit FPS to like 5 |
21:38:29 | Yardanico | you won't need more anyway |
21:38:34 | FromDiscord | <Elegant Beef> yea i know |
21:38:52 | * | krux02 quit (Remote host closed the connection) |
21:39:23 | FromDiscord | <Elegant Beef> Im only drawing if i get an xevent and if it hasnt drawn within the last x seconds |
21:40:30 | Yardanico | and how do you check if you got an xevent? :D while true? |
21:40:47 | FromDiscord | <Elegant Beef> XCheckMaskEvent, so i dont block |
21:40:59 | FromDiscord | <Elegant Beef> So yes |
21:41:40 | FromDiscord | <Elegant Beef> Anyone else here the screeching of disruptek reading how im handling this status bar? |
21:41:44 | FromDiscord | <Elegant Beef> hear* |
21:43:14 | FromDiscord | <Elegant Beef> Yea im at less or equal to awesomewm now |
21:43:35 | FromDiscord | <Elegant Beef> Also considering how daft i am i dont think ill suggest this to anyone |
21:44:19 | * | opal quit (Excess Flood) |
21:44:32 | FromDiscord | <Varriount> Elegant Beef: What is the 1-9? PTYs? |
21:44:39 | FromDiscord | <Elegant Beef> They're workspaces |
21:44:41 | * | opal joined #nim |
21:44:42 | * | opal quit (Excess Flood) |
21:45:01 | * | opal joined #nim |
21:45:02 | * | opal quit (Excess Flood) |
21:45:21 | * | opal joined #nim |
21:45:23 | * | opal quit (Excess Flood) |
21:45:36 | FromDiscord | <Elegant Beef> Mostly everything there is a button so i can test stuff in xephyr easier |
21:45:43 | * | opal joined #nim |
21:45:44 | * | opal quit (Excess Flood) |
21:45:51 | FromDiscord | <Elegant Beef> since i have the keybinds setup manually, and dont have config loading yet |
21:46:03 | * | opal joined #nim |
21:46:05 | * | opal quit (Excess Flood) |
21:46:23 | * | opal joined #nim |
21:46:25 | * | opal quit (Excess Flood) |
21:46:26 | FromDiscord | <Elegant Beef> And truthfully i do want to use nims for configs, but i do realize how silly it'd be |
21:46:42 | * | opal joined #nim |
21:46:44 | * | opal quit (Excess Flood) |
21:47:02 | FromDiscord | <Varriount> Eh, I don't think its silly. Isn't there a lisp-powered WM out there that essentially does the same thing? |
21:47:02 | * | opal joined #nim |
21:47:04 | * | opal quit (Excess Flood) |
21:47:09 | FromDiscord | <Rika> 5 fps? why not 1 |
21:47:21 | FromDiscord | <Elegant Beef> well there is button highlighting |
21:47:22 | * | opal joined #nim |
21:47:24 | * | opal quit (Excess Flood) |
21:47:25 | FromDiscord | <Elegant Beef> so that will feel a little bad |
21:47:42 | * | opal joined #nim |
21:47:43 | * | opal quit (Excess Flood) |
21:47:46 | FromDiscord | <Elegant Beef> roughly 3-10 fps should be intuitive |
21:48:01 | * | opal joined #nim |
21:48:03 | * | opal quit (Excess Flood) |
21:48:11 | * | hax-scramper joined #nim |
21:48:19 | * | opal joined #nim |
21:48:21 | * | opal quit (Excess Flood) |
21:48:25 | FromDiscord | <Elegant Beef> But my main issue right now is this imgui context shit crashing hard 😄 |
21:52:09 | * | inv2004 joined #nim |
21:55:41 | * | opal joined #nim |
21:55:44 | * | opal quit (Excess Flood) |
21:56:03 | * | opal joined #nim |
21:56:08 | * | opal quit (Excess Flood) |
21:56:58 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
21:57:05 | * | opal joined #nim |
21:57:07 | * | opal quit (Excess Flood) |
21:57:51 | * | opal joined #nim |
22:02:24 | * | inv2004 quit (Read error: Connection reset by peer) |
22:04:05 | * | tane quit (Quit: Leaving) |
22:04:14 | * | zacharycarter quit (Ping timeout: 240 seconds) |
22:04:43 | FromDiscord | <Varriount> This is probably a stupid question, but has anyone written a WM in javascript? |
22:07:42 | Yardanico | well yes there's that thing.. |
22:09:14 | Yardanico | eDEX-UI it's not really a DE though |
22:09:20 | Yardanico | not a WM either |
22:10:47 | Yardanico | found https://github.com/rlamana/Ventus https://github.com/mixu/nwm |
22:11:07 | Yardanico | ah the first one is a wrong one |
22:14:34 | skrylar[m] | @mratsim its from 1999 so it probably would have been the prior art of aac if anything :p |
22:19:22 | * | xcm quit (Remote host closed the connection) |
22:20:15 | * | solitudesf quit (Ping timeout: 260 seconds) |
22:21:36 | * | xcm joined #nim |
22:25:43 | * | companion_cube joined #nim |
22:27:23 | * | opal quit (Ping timeout: 240 seconds) |
22:33:44 | disruptek | hearts and minds, people; hearts and minds! |
22:35:20 | companion_cube | seems like I came back at an inspiring moment |
22:53:21 | Yardanico | yes |
22:57:36 | FromGitter | <sealmove> Sorry this has been asked 3985299 times but what's the best Nim GUI package atm? |
22:59:54 | * | skrylar[m] wonders if nfltk still works |
23:00:42 | skrylar[m] | araq has a libui wrapper if you don't need anything complicated |
23:01:13 | FromDiscord | <InventorMatt> NiGui is pretty good but it missing quite a few widgets still |
23:01:29 | leorize | the libui wrapper is one of the higher quality ones |
23:01:36 | leorize | it feels like native |
23:04:19 | skrylar[m] | it is native |
23:04:29 | Yardanico | @sealmove I think gintro |
23:04:39 | Yardanico | yes its gtk but it's really complete |
23:04:47 | leorize | skrylar[m]: I mean it feels like native Nim |
23:04:55 | skrylar[m] | nfltk works if you don't need to subclass any widgets, but its non-native |
23:05:03 | FromGitter | <sealmove> how about imGui? |
23:05:17 | Yardanico | yeah there are quite good bindings |
23:05:21 | leorize | PMunch/wxnim is there if you want all the features |
23:05:22 | Yardanico | but it doesn't look native either |
23:05:29 | Yardanico | I'd prefer gintro over imgui for GUI apps :P |
23:06:03 | leorize | and wxnim if you need cross-platform |
23:06:10 | leorize | because gtk is terrible cross platform |
23:08:09 | FromDiscord | <Elegant Beef> The best surprisingly depends on you and what you're making 😄 |
23:08:18 | FromGitter | <sealmove> I want something like this: https://ide.kaitai.io/ |
23:08:35 | Yardanico | @Beef, for you gintro might be actually quite a nice choice IMO |
23:08:47 | Yardanico | @sealmove for that imgui will be pretty good |
23:09:02 | FromGitter | <sealmove> Basically turning this to a native app in order to add editting (because hex editing can get pretty heavy for large files) |
23:09:26 | Yardanico | https://github.com/ocornut/imgui#demo |
23:09:35 | Yardanico | https://github.com/ocornut/imgui#gallery |
23:09:42 | FromGitter | <sealmove> Should I use C++ or Nim? |
23:09:53 | Yardanico | Nim, ther is an cimgui wrapper |
23:10:39 | Yardanico | https://github.com/nimgl/imgui |
23:11:04 | FromGitter | <sealmove> Good, thanks guys |
23:11:18 | Yardanico | https://github.com/nimgl/nimgl is a superset, it includes bindings to other libs too |
23:11:36 | Yardanico | like glfw, opengl or vulkan (you'll need at least one of those for imgui) |
23:11:43 | FromDiscord | <Elegant Beef> a gtk based status bar, hmm |
23:11:48 | FromDiscord | <Elegant Beef> Would make widgets easier |
23:12:45 | FromGitter | <sealmove> So how do I approach this? I only have a little experience in Java Swing. Do I start by reading the C++ imGui docs? |
23:12:58 | FromDiscord | <Elegant Beef> I started by using the imgui example |
23:13:08 | FromDiscord | <Elegant Beef> Then just ramming my head into imgui and getting something that works |
23:13:10 | FromGitter | <sealmove> the Nim one? |
23:13:14 | FromDiscord | <Elegant Beef> yeaa |
23:13:21 | Yardanico | see https://github.com/nimgl/nimgl/blob/master/examples/timgui.nim |
23:13:24 | FromDiscord | <Rika> what a big brain move |
23:13:32 | FromDiscord | <Elegant Beef> Im a person that prefers to learn through ramming my head into a wall over reading how to |
23:13:36 | Yardanico | it's not the most high-level wrapper but it's pretty nice nonetheless |
23:13:38 | FromDiscord | <Rika> tbh its what i do for most of my "learning xxx lib" projects |
23:13:51 | FromDiscord | <Rika> though i read docs |
23:13:59 | FromDiscord | <Elegant Beef> I mean it works extrodinarly well for technical art |
23:14:04 | FromDiscord | <Elegant Beef> Breaks down on graphics programming |
23:14:13 | FromDiscord | <Elegant Beef> Since things have to be done in a specific way or it implodes |
23:14:13 | Yardanico | although I've only used imgui once in a C++ program (it was a hack for a game) |
23:14:22 | Yardanico | it worked nicely :P |
23:14:36 | FromDiscord | <Elegant Beef> My status bar works well for 1 monitor 😛 |
23:15:59 | FromDiscord | <Elegant Beef> I was also using imgui for my funky terminal, but that is dead in the water until i learn how pty works |
23:16:30 | FromDiscord | <Elegant Beef> Who would've thought that things like vim dont just use stdin for controls? |
23:16:41 | Yardanico | terminal stuff is really complicated |
23:16:51 | Yardanico | and has a lot of backwards compat stuff you need to deal with :P |
23:16:57 | FromDiscord | <Elegant Beef> Yea another thing you cant exactly just ram you head to get to work |
23:17:26 | FromDiscord | <Elegant Beef> I have a fair bit of vt100 support but the whole properly managing inputs for cli applications is a nogo since i didnt realize i needed a pty |
23:18:25 | FromDiscord | <Elegant Beef> It's a fairly good prototype as it sits |
23:18:26 | FromDiscord | <Elegant Beef> https://streamable.com/5pzu7 |
23:18:51 | Yardanico | but WhY iTsS nOT OpEnSoUrCe?! or is it? |
23:19:02 | FromDiscord | <Elegant Beef> I dont like opening source before it's functional |
23:19:10 | FromDiscord | <Elegant Beef> Weird thing of me |
23:19:28 | FromDiscord | <Elegant Beef> I love OSS but i dont like broken software 😛 |
23:19:45 | Yardanico | well the point of this is that your code might help others :P |
23:19:58 | FromDiscord | <Rika> and vice versa 😛 |
23:20:01 | FromDiscord | <Elegant Beef> A fair bit of my unity technical art stuff is OSS, but that is cause i can wrap it up in a day |
23:20:22 | FromDiscord | <Elegant Beef> Does funky thing, add comments and publish, easy |
23:20:40 | Yardanico | easier: don't add any readme, comments or description :D |
23:21:01 | FromDiscord | <Elegant Beef> Lol, nah i prefer my public repos be a bit more nice looking |
23:21:18 | Yardanico | well I kinda try to do it too |
23:21:42 | FromDiscord | <Elegant Beef> For instance for anything technical art related i tend to include a gif of it in action |
23:21:42 | FromDiscord | <Elegant Beef> https://github.com/beef331/stringlights |
23:22:11 | FromDiscord | <Elegant Beef> My WM is OSS right now cause prestige and i were volleying back and forward in talking about xlib and x |
23:23:04 | Yardanico | well yeah, also I don't like publishing small stuff in separate repos, but for this thing I had to :P https://github.com/Yardanico/nim-strenc/blob/master/src/strenc.nim |
23:24:58 | FromDiscord | <Rika> oh hey its that |
23:25:07 | Yardanico | yes |
23:25:16 | FromDiscord | <Rika> haha, gaEE |
23:25:18 | FromDiscord | <Elegant Beef> Yea i suppose i could have a single repo of "Shaders and shiz" and push there, but eh |
23:25:23 | Yardanico | @Rika that was fully random though :P |
23:25:31 | FromDiscord | <Rika> i was jokin |
23:25:33 | Yardanico | I mean I just mashed on the keyboard a bit |
23:25:41 | FromDiscord | <Elegant Beef> Not truely random |
23:25:42 | FromDiscord | <Rika> it sounds korean tbh |
23:25:48 | Yardanico | although the lib is pretty useless if someone knows a bit of IDA or Ghidra |
23:25:51 | FromDiscord | <Elegant Beef> It's your sub concious coming out |
23:26:05 | Yardanico | just breakpoint where stuff is being printed, find this function and see that it's just simple xor |
23:26:09 | FromDiscord | <Rika> how do you determine whether a string is random or not, given nothing but the string itself |
23:26:09 | Yardanico | still very cool |
23:26:27 | FromDiscord | <Elegant Beef> Well if the string exists it's not random |
23:26:38 | FromDiscord | <Elegant Beef> At most pseudo random 😛 |
23:26:52 | Yardanico | also see https://godbolt.org/z/nyeELQ for the generated assembly |
23:27:22 | Yardanico | and try to remove {.noinline.} from that proc - the assembly listing will become like 3x larger |
23:27:29 | FromDiscord | <Rika> well what i mean is how do you determine whether some value given (by anything, we're in theory world rn) is random or not |
23:27:57 | FromDiscord | <Elegant Beef> Well if someone is giving me value, they surely dont know me |
23:28:40 | FromDiscord | <Elegant Beef> Well you look at the source, if the person is named R. N. Gesus it might be a random valu |
23:29:11 | Yardanico | @Rika https://en.wikipedia.org/wiki/Randomness_tests |
23:29:51 | FromGitter | <sealmove> Elegant Beef wow! looks nice |
23:30:07 | FromDiscord | <Elegant Beef> The console? |
23:30:35 | FromDiscord | <Elegant Beef> Well if anyone wants to do the pty stuff for nim i'll gladly OSS my console 😛 |
23:30:43 | FromDiscord | <exelotl> I can't use `|` to insert a blank line in nim doc :( |
23:31:12 | Yardanico | you just do an empty string |
23:31:16 | Yardanico | ## |
23:32:04 | Yardanico | or two empty lines, I don't exactly remember |
23:33:07 | FromGitter | <sealmove> imgui says: could not load: cimgui.so but in the README.md it doesn't state anything about dependencies. What do I have to install? |
23:33:16 | Yardanico | you have to compile cimgui |
23:33:22 | Yardanico | https://github.com/cimgui/cimgui |
23:34:03 | Yardanico | and since you're on linx you'll have to do LD_LIBRARY_PATH=. ./myapp or LD_PRELOAD=./cimgui.so ./myapp or something like that |
23:34:15 | Yardanico | since library search path doesn't include the current directory on *nix |
23:34:16 | FromDiscord | <Elegant Beef> or if you're a twat copy it to your lib folder |
23:34:27 | FromGitter | <sealmove> sounds complicated |
23:34:32 | FromDiscord | <Elegant Beef> It's rather easy |
23:34:39 | Yardanico | yeah it's really not hard |
23:35:04 | FromDiscord | <Elegant Beef> I mean i copied the .so to my lib folder since im silly and prefer it over having a .so in my git directory |
23:35:18 | FromDiscord | <Elegant Beef> ~~Git ignore's exist~~ |
23:36:00 | Yardanico | btw this simple 6-line string encrypting/decrypting function got compiled into 200 lines of assembly when I added --passC:"-march=native" on godbolt :P |
23:36:14 | Yardanico | it's ~25 lines of assembly without that |
23:36:42 | Yardanico | https://godbolt.org/z/Av2oCV you can scroll a bit down and see a lot of SIMD stuff |
23:38:48 | FromGitter | <sealmove> Yardanico can you elaborate on LD_LIBRARY_PATH=. ./myapp? |
23:38:57 | FromGitter | <sealmove> I compiled cimgui |
23:39:02 | FromDiscord | <exelotl> Yardanico: I mean like this |
23:39:02 | FromDiscord | <exelotl> https://cdn.discordapp.com/attachments/371759389889003532/701940018998149130/unknown.png |
23:39:15 | * | Trustable quit (Remote host closed the connection) |
23:39:56 | Yardanico | @sealmove LD_LIBRARY_PATH specifies additional paths for the OS to try to find libraries in |
23:40:06 | Yardanico | so after you compile your app (and assuming it's in the same folder as cimgui.so) you do |
23:40:11 | Yardanico | LD_LIBRARY_PATH=. ./myapp |
23:41:05 | FromGitter | <sealmove> how comes I have to specify myapp in LD_LIBRARY_PATH instead of imgui? |
23:41:15 | Yardanico | please read it closer |
23:41:38 | Yardanico | LD_LIBRARY_PATH=. ./myapp as in LD_LIBRARY_PATH=<dot><space><dot><slash>myapp |
23:41:56 | FromGitter | <sealmove> ah lol |
23:42:01 | FromDiscord | <exelotl> I wanted to put extra space between the two paragraphs. It seems like `|` is the standard reStructuredText way to do things, but when I put `|` on a line with no text, it gives me a literal `|` |
23:42:01 | FromDiscord | <exelotl> https://cdn.discordapp.com/attachments/371759389889003532/701940768046055454/unknown.png |
23:42:03 | Yardanico | with LD_LIBRARY_PATH=. you specify that the OS should also try to search in the current dir |
23:42:12 | Yardanico | and then just launch your app like ./myapp |
23:42:38 | FromGitter | <sealmove> ohh I see, thanks |
23:43:17 | FromGitter | <sealmove> ok it works |
23:44:12 | FromDiscord | <Elegant Beef> Yea that was an issue i ran into also when starting to us it |
23:44:13 | FromDiscord | <Elegant Beef> Yea that was an issue i ran into also when starting to use it |
23:45:28 | Yardanico | btw your edits on IRC are just sent as new messages :P |
23:47:56 | FromDiscord | <Rika> are |
23:48:00 | FromDiscord | <Rika> they? |
23:48:14 | FromDiscord | <exelotl> lol |
23:48:27 | FromDiscord | <exelotl> quality bridge |
23:48:32 | Yardanico | how would you do it otherwise? |
23:48:44 | Yardanico | diff'ing between text is not easy, and IRC doesn't support any kind of edits |
23:50:53 | FromDiscord | <Elegant Beef> Yea i know they are |
23:50:57 | FromDiscord | <Elegant Beef> It's instinctive to me |
23:51:06 | Yardanico | ? |
23:51:24 | Yardanico | well it's instinctive to me on Telegram too, but I restrain myself when I use Discord for Nim :P |
23:51:34 | FromDiscord | <Elegant Beef> I dont proofread so i instinctively hit up and correct issues |
23:51:56 | FromDiscord | <Elegant Beef> I do attempt to prevent it here but it happens |
23:52:09 | FromDiscord | <exelotl> Yardanico: hmm that's a fair point, could get the bot to give you a notice that edits are ignored |
23:53:11 | Yardanico | good night everyone |
23:53:19 | FromDiscord | <exelotl> is it possible for bots to post messages that only 1 person can see (like Discord's own Clyde messages?) |
23:53:20 | FromDiscord | <Elegant Beef> buh bye |
23:53:33 | Yardanico | @exelotl no, on irc that's not possible |
23:53:34 | FromDiscord | <exelotl> cya |
23:53:53 | FromDiscord | <exelotl> oh I meant on discord |
23:54:09 | FromDiscord | <Yardanico> Ah then it might be possible, I'll check it maybe |
23:54:27 | FromDiscord | <Elegant Beef> If you're suggesting to tell people not to edit, bots can pm users |
23:54:44 | FromDiscord | <Elegant Beef> So a bot could pm a user on their fist edit |
23:55:00 | FromDiscord | <exelotl> Yeah, it could work. I generally don't like being PM'd by bots though x) |
23:55:01 | FromDiscord | <Elegant Beef> Since people dont read 😄 |
23:55:18 | FromDiscord | <exelotl> so an inline message would be much preferred |
23:55:32 | FromDiscord | <Elegant Beef> Yea, i dont know if that's possible |
23:56:29 | FromDiscord | <exelotl> At least a discord bot could post a warning only in the discord channel, and not on IRC. I guess that would be acceptable |
23:56:38 | FromDiscord | <Elegant Beef> > Some people here use an ancient communication service which lacks features, dont do anything but send messages 😄 |
23:57:35 | FromDiscord | <Yardanico> On the other hand it's completely open and has a lot of clients for any possible platform, OS and editor (like emacs) |
23:58:10 | FromDiscord | <Elegant Beef> Yea i dislike discord as much as the next person, but the alternatives arent as fancy imo, riot.im is interesting but still from my understanding video/voice is trash |
23:58:41 | FromDiscord | <Rika> imagine using discord for games |
23:58:43 | FromDiscord | <Elegant Beef> inb4 Use a different application for different services |
23:59:05 | FromDiscord | <Yardanico> And Nim IRC channel was here long before Discord even appeared |
23:59:22 | FromDiscord | <Elegant Beef> Hey i said ancient |
23:59:47 | FromDiscord | <exelotl> I don't mind the lack of features in IRC... except for missing out on messages when you're offline |
23:59:51 | FromDiscord | <Yardanico> You misspelled "battle tested" |
23:59:58 | FromDiscord | <Yardanico> @exelotl for that I have Quassel |