00:12:54 | FromDiscord | <nikki> https://media.discordapp.net/attachments/371759389889003532/770077459315294228/unknown.png |
00:13:06 | FromDiscord | <nikki> benchmark of fib(42) in nim->js->browser, plain js->browser, and nim->c->wasm->browser |
00:13:17 | FromDiscord | <nikki> browser is firefox here. chromium had different results but same ordering |
00:13:23 | FromDiscord | <nikki> (edit) "results" => "numbers" |
00:13:35 | FromDiscord | <ElegantBeef> Nikki you have a problem ๐ |
00:13:51 | FromDiscord | <ElegantBeef> From the outside it looks like you like Nim, but are attempting to validate your usage of it ๐ |
00:13:56 | FromDiscord | <nikki> sorry that i'm not doing exactly what you're doing lol |
00:14:07 | FromDiscord | <ElegantBeef> Huh? |
00:14:14 | FromDiscord | <nikki> using nimvm ๐
|
00:14:18 | FromDiscord | <ElegantBeef> It's unrealted to nimvm |
00:14:39 | FromDiscord | <ElegantBeef> But hey i'm finding bugs left and right in it, so hey, i'll take it! |
00:14:46 | FromDiscord | <nikki> xD |
00:15:07 | FromDiscord | <nikki> yeah currently the main thing i'm intersted in abt nim is the reflective and metaprogramming capabilities making it easier to have eg. automatic editor ui for my game components and whatnot |
00:15:37 | FromDiscord | <nikki> i do that in my c++ engine but it could be so much more ... relaxed. with nim |
00:15:56 | FromDiscord | <ElegantBeef> Yea plus nim macros are nicer to look at compared to C++ metaprogramming |
00:16:01 | FromDiscord | <nikki> definitely |
00:18:46 | FromDiscord | <ElegantBeef> Being able to annotate using `{.serialized.}` or equivelent on fields you want in your editor will be cool |
00:19:12 | FromDiscord | <nikki> yeah would be p awesome ๐ฎ |
00:19:35 | FromDiscord | <nikki> i'm wondering if to do the editor ui stuff in karax from nim-js, but then yeah the gameplay itself is nim-c (and also thus runs as a native desktop app and mobile app) |
00:20:03 | FromDiscord | <nikki> game state would be marshalable and passable between the nim-c and nim-js in editor |
00:20:19 | FromDiscord | <ElegantBeef> Yea we're resolving similar issues |
00:20:24 | FromDiscord | <ElegantBeef> Gotta do the same here aswell |
00:20:44 | FromDiscord | <ElegantBeef> One way i've got sofar is https://media.discordapp.net/attachments/371759389889003532/770079425756004352/unknown.png |
00:20:45 | * | hyiltiz quit (Ping timeout: 240 seconds) |
00:21:11 | FromDiscord | <ElegantBeef> But i'm also working on a project where the game uses scripting so i dont want to expose everything |
00:23:35 | FromDiscord | <nikki> that's pretty nice |
00:23:59 | FromDiscord | <nikki> yeah i keep doing this same thing over and over again. the earliest was c++<->python in https://github.com/nikki93/grall2/blob/68171f4cdad871ca11d749b68d3ef4230a37b8d4/src/Objects/Obstacles/Teleporter.cpp#L181-L186 |
00:24:00 | FromDiscord | <ElegantBeef> The benefit of using nimscript though is i can generate the code using nim's AST/Macros |
00:38:11 | FromDiscord | <nikki> @ElegantBeef to show you what the situation in the c++ stuff looks like |
00:38:13 | FromDiscord | <nikki> https://media.discordapp.net/attachments/371759389889003532/770083829490647071/unknown.png |
00:38:30 | disruptek | please stop. |
00:38:33 | disruptek | i can only get so hard. |
00:38:37 | FromDiscord | <nikki> hahaha |
00:39:02 | FromDiscord | <nikki> @ElegantBeef but yeah this would be sooooooo much more chill as nim lol |
00:39:40 | FromDiscord | <nikki> anyways you can see what the ui stuff looks like bottom right -- adding some custom inspector ui for sprite. but it also does automatic ui for some of the properties like depth. the position component is pretty simple and fully auto ui. they are all jsonable |
00:42:14 | FromDiscord | <nikki> i reduced it as much as possible but there's still so much more noies in c++ than what it'd be like in nim |
00:42:25 | FromDiscord | <nikki> (edit) "noies" => "noise" |
00:42:54 | disruptek | sounds noies to me. |
00:43:13 | FromDiscord | <ElegantBeef> I'm a little interested in if the nimVM can run using WASM |
00:43:36 | FromDiscord | <nikki> like compile the vm itself to wasm or compile nim to wasm bytecode to eval at runtime? |
00:43:44 | FromDiscord | <nikki> i think you can do the former. there'll be so many layers at that point lol but yeah |
00:44:03 | FromDiscord | <nikki> disruptek: tbh, i agree. it's every permutation of the word 'noise' ๐ |
00:46:01 | FromDiscord | <Avatarfighter> @ElegantBeef i am willing to pay you 50$ to find out |
00:46:21 | FromDiscord | <ElegantBeef> I'm the exact wrong person to ask to do that avatar |
00:46:26 | FromDiscord | <Avatarfighter> ok and |
00:46:32 | FromDiscord | <ElegantBeef> I can barely compile nim normally nevermind to WASM ๐ |
00:46:38 | FromDiscord | <Avatarfighter> lmao |
00:47:07 | FromDiscord | <Avatarfighter> compile nimvm using the compiler nlvm and use wasm as a target ๐ค |
00:52:05 | * | mbomba joined #nim |
00:54:05 | * | Tanger joined #nim |
00:58:55 | * | hyiltiz joined #nim |
00:58:55 | * | hyiltiz quit (Changing host) |
00:58:55 | * | hyiltiz joined #nim |
01:00:00 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:01:07 | * | njoseph joined #nim |
01:03:05 | * | hyiltiz quit (Ping timeout: 240 seconds) |
01:03:49 | * | krux02 quit (Remote host closed the connection) |
01:06:48 | FromDiscord | <Avatarfighter> So when is pypi getting ported to nim ๐ค |
01:11:58 | FromDiscord | <ElegantBeef> Bad avatar, bad |
01:21:04 | FromDiscord | <nikki> my nim->c->wasm setup actually compiles the generated c through a cmake setup with other vendored c libs lol |
01:21:18 | ldlework | nim to wasm sounds nice |
01:21:41 | FromDiscord | <nikki> on ios a fib(42) benchmark ran 2x as fast on nim->c->wasm vs nim->js |
01:21:55 | FromDiscord | <nikki> just my goto quick to code benchmark haha |
01:24:45 | FromDiscord | <nikki> sdl rendering is also working |
01:24:51 | FromDiscord | <nikki> (edit) "sdl rendering is also working ... " added "(to canvas)" |
01:31:41 | * | abm quit (Quit: Leaving) |
01:37:26 | * | mbomba quit (Quit: WeeChat 2.9) |
01:37:45 | * | Axiomatic joined #nim |
01:46:14 | * | astronavt quit (Quit: Leaving) |
01:46:32 | * | astronavt joined #nim |
01:49:23 | * | ConfuzzledPython joined #nim |
01:52:00 | ConfuzzledPython | Anyone free for a websocket consult? I'm so completely confused. |
01:52:26 | * | hyiltiz joined #nim |
01:52:26 | * | hyiltiz quit (Changing host) |
01:52:26 | * | hyiltiz joined #nim |
01:53:23 | disruptek | busy trying to find my fingerless gloves. it's 53โ up in this bitch. |
01:53:43 | disruptek | what's the problem, maybe laughter will warm me up. |
01:55:34 | ConfuzzledPython | I feel like fingerless gloves defeat the point of gloves, but then again my fingertips are cold AF. |
01:55:53 | ConfuzzledPython | Lol, basically no matter what I try to do with the ws library I get errors. |
01:56:13 | ConfuzzledPython | I think it is because I'm new to types. |
01:56:31 | ConfuzzledPython | Is there an easy way to paste short code snippits? |
01:56:35 | disruptek | ~playground |
01:56:36 | disbot | playground: 11an online in-the-browser IDE for simple Nim experiments at http://argentina-ni.ml/ -- disruptek |
01:56:36 | disbot | playground: 11https://play.nim-lang.org the official Nim playground, can run Nim in the browser and share snippets |
01:57:10 | Axiomatic | NIice |
01:57:25 | ConfuzzledPython | Sweet |
01:57:25 | ConfuzzledPython | https://play.nim-lang.org/#ix=2C0t |
01:57:59 | disruptek | should that work? |
01:58:19 | ConfuzzledPython | I mean apparently not because the compiler dislikes it. |
01:58:40 | ConfuzzledPython | But I really need to figure out how to use websockets. |
01:59:29 | disruptek | well, you need a tutorial on async first. |
01:59:45 | disruptek | https://play.nim-lang.org/#ix=2C0u |
02:00:00 | disruptek | also, your sense of humor is lousy. i said i wanted to laugh, not cry. |
02:00:48 | disruptek | the first rule of async is, you don't raise exceptions in async. |
02:00:59 | disruptek | the second rule of async is, you don't raise exceptions in async. |
02:01:07 | disruptek | i'll let you guess what the third rule is. |
02:01:23 | Axiomatic | (The 3rd rule is the same, but in French) |
02:01:37 | * | vicfred joined #nim |
02:01:53 | ConfuzzledPython | vous n'levez pas les exceptions a l'async? |
02:02:08 | disruptek | oui oui, vous comprende! |
02:03:53 | ConfuzzledPython | il faut que je vous admette que je suis un newb... |
02:04:25 | disruptek | je ne comprend pas. |
02:04:28 | ConfuzzledPython | Also I hope we don't have to continue in french because I'm only slightly better at that then french. |
02:04:34 | ConfuzzledPython | *than nim/async |
02:04:57 | disruptek | je ne sais pas le francais. i just pretend to pick up chicks. |
02:05:17 | ConfuzzledPython | I said I had to admit that I'm a newb. |
02:05:17 | FromDiscord | <19> xD |
02:05:24 | * | rockcavera joined #nim |
02:05:56 | ConfuzzledPython | @disruptek just say "Je suis excitee a vous rencontrez" and they'll fall in love. |
02:05:59 | FromDiscord | <ElegantBeef> It's ok we forgive you, soon you wont be and will be in disrupteks boots ๐ |
02:06:17 | FromDiscord | <ElegantBeef> You dont want to be in disrupteks boots, he doesnt bathe regularly |
02:07:03 | disruptek | i'm going to freeze to death if i don't make enough money to buy some propane. |
02:07:10 | disruptek | this is ridiculous. |
02:07:29 | FromDiscord | <ElegantBeef> What's cheaper driving south or propane? |
02:07:37 | disruptek | propane. |
02:07:41 | FromDiscord | <19> #support_disruptek |
02:08:49 | ConfuzzledPython | I know a way to keep you warm for the rest of your life, unfortunately it involves self immolation. |
02:09:00 | disruptek | bentley might go for that. |
02:09:09 | disruptek | i'm pretty sure he's gonna eat my face when i die. |
02:09:24 | disruptek | may as well roast it for him. |
02:09:27 | ConfuzzledPython | And Beef if I grow up to be a crusty sea dog that'll be great. |
02:09:46 | * | disruptek kicks off a rust compilation to warm his cores. |
02:10:01 | disruptek | fuck, i wish nim was less efficient. |
02:10:43 | FromDiscord | <ElegantBeef> Just run my code |
02:10:51 | Axiomatic | One of the benefits of using an inefficient language is the extra CPU cycles heat up your apartment. Just saying... |
02:11:09 | ConfuzzledPython | Just multithread everything? |
02:11:16 | FromDiscord | <ElegantBeef> I'm in Canada and it gets like -10 already so not a terrible plan |
02:11:32 | FromDiscord | <ElegantBeef> Need to use inefficient CPU and GPU code |
02:11:55 | Axiomatic | At least put your computer on F@H, and do yourself a favour in heat while searching for a solution to this damn virus. |
02:12:09 | disruptek | it's only about 32โ here right now. gonna be a long winter. |
02:12:33 | FromDiscord | <ElegantBeef> What do you use for power? |
02:12:34 | disruptek | problem is, i only have 10a to power the whole trailer. |
02:13:06 | Axiomatic | Put all 10a through the CPU, heat is heat |
02:13:09 | disruptek | it's on a gfi at least, so when i trip the circuit i don't have to enter the neighbor's house to reset a breaker. |
02:13:40 | FromDiscord | <ElegantBeef> Ah you've got your trailer hooked up to someones house... do they know? |
02:13:49 | disruptek | it's hard to miss my trailer. |
02:13:56 | FromDiscord | <ElegantBeef> Yea but the cable |
02:14:15 | disruptek | the cable is practically buried. |
02:15:20 | ConfuzzledPython | In all sincerity mylar space blankets are like 9 bucks on amazon, you could probably insulate a whole room with a couple packs... |
02:15:27 | FromDiscord | <19> can tell if real or not |
02:15:55 | FromDiscord | <19> (edit) "can" => "cant" |
02:16:33 | disruptek | i was supposed to move but the electric company fucked up and installed the demarc on the neighbor's property, so i'm not about to move somewhere where i can't get power. |
02:17:05 | FromDiscord | <ElegantBeef> Disruptek does live in a trailer with bentley his doggo |
02:17:28 | disruptek | it's the one that says, "Bad Motherfucker" on it. |
02:17:35 | disruptek | like i said. can't miss it. |
02:19:34 | disruptek | i am working on a new, inefficient version of nim called `dim`. |
02:20:12 | * | apahl quit (Ping timeout: 260 seconds) |
02:20:42 | Axiomatic | I've got a fork where the results are never correct, called 'grim'. |
02:21:09 | disruptek | !repo dim |
02:21:09 | disbot | https://github.com/krisppurg/dimscord -- 9dimscord: 11A Discord Bot & REST Library for Nim. 15 43โญ 5๐ด 7& 3 more... |
02:21:16 | disruptek | !repo disruptek/dim |
02:21:16 | disbot | https://github.com/disruptek/dim -- 9dim: 11an experimental language 15 2โญ 0๐ด |
02:21:31 | disruptek | oh i didn't push it. |
02:22:00 | * | apahl joined #nim |
02:26:58 | disruptek | leorize[m]1: is it me or is nimsuggest working much better now? |
02:27:06 | disruptek | in the compiler, i mean. |
02:27:17 | * | arecacea1 quit (Read error: Connection reset by peer) |
02:27:36 | leorize[m]1 | probably the latter |
02:27:38 | * | arecacea1 joined #nim |
02:27:56 | disruptek | good job. |
02:28:03 | disruptek | i'm liking it. |
02:45:01 | ConfuzzledPython | Alright now what am I fucking up? https://play.nim-lang.org/#ix=2C0E |
02:45:29 | ConfuzzledPython | No error, but it doesn't return anything either |
02:47:00 | disruptek | your triple-quoted string literal appears to be missing quotes. |
02:47:55 | disruptek | too damned cold. ima grab a trashbag and go sleep on a heating vent. |
02:49:09 | ConfuzzledPython | Hrm, fixed that, still nothing. It should return a message after I send the auth message. |
02:49:41 | ConfuzzledPython | Okay stupid mistake |
02:49:54 | ConfuzzledPython | It's looking for json so it needed a {} around it |
02:50:10 | ConfuzzledPython | how come it doesn't return an error when I try to send an invalid message? |
02:50:16 | ConfuzzledPython | Like shouldn't it scream at me? |
02:58:38 | leorize[m]1 | disruptek: any suggestions for me to make this output simpler? https://play.nim-lang.org/#ix=2C0G |
02:59:21 | leorize[m]1 | currently I have to generate two templates because I can't just do a newCall with a sym I already have laying around |
03:00:55 | * | shuji joined #nim |
03:02:05 | * | hyiltiz quit (Ping timeout: 240 seconds) |
03:02:24 | leorize[m]1 | @Clyybber can you look at that ^ as well |
03:06:20 | FromDiscord | <Rika> ConfuzzledPython: wdym? that's the API's job, not Nim's |
03:06:44 | FromDiscord | <Rika> if you send the API an invalid message you check the response for an error message or something |
03:06:49 | FromDiscord | <Rika> nim cant catch thta |
03:07:07 | ConfuzzledPython | Fair. |
03:10:57 | * | arecacea1 quit (Remote host closed the connection) |
03:11:59 | * | arecacea1 joined #nim |
03:12:47 | * | hyiltiz joined #nim |
03:12:47 | * | hyiltiz quit (Changing host) |
03:12:48 | * | hyiltiz joined #nim |
03:14:08 | jonjitsu[m] | Is there another library besides this for xcb? https://github.com/adrianperreault/nim-xcb |
03:18:45 | * | hyiltiz quit (Ping timeout: 240 seconds) |
03:22:02 | * | muffindrake quit (Ping timeout: 260 seconds) |
03:22:12 | * | ConfuzzledPython quit (Remote host closed the connection) |
03:24:14 | * | muffindrake joined #nim |
03:26:03 | * | hyiltiz joined #nim |
03:26:03 | * | hyiltiz quit (Changing host) |
03:26:03 | * | hyiltiz joined #nim |
03:28:06 | disruptek | leorize[m]1: output simpler? |
03:30:45 | * | hyiltiz quit (Ping timeout: 240 seconds) |
03:30:47 | disruptek | you can do things like ... result = newCall(x.strVal, y.strVal, commandLine, args) |
03:31:04 | leorize[m]1 | those stuff are gensym-ed |
03:31:14 | leorize[m]1 | so my macro generates an another macro |
03:31:21 | disruptek | yes, well i don't really understand what getAst is doing for you. |
03:31:28 | leorize[m]1 | and I want it to bind to the symbols I gensym-ed earlier |
03:31:39 | disruptek | use bindSym? |
03:32:17 | leorize[m]1 | that doesn't work, bindSym doesn't take symbols (funnily) |
03:32:34 | * | shuji quit (Ping timeout: 245 seconds) |
03:33:05 | disruptek | if you have the symbol, why not just use it? |
03:33:32 | leorize[m]1 | the symbol is not in a nimnode, so newCall can't use it |
03:34:07 | disruptek | what is it, then? |
03:34:22 | leorize[m]1 | my macro generates a helper `_wrapper` (gensym-ed) and a macro. |
03:34:54 | disruptek | okay, but gensym yields a nimnode. |
03:35:27 | disruptek | anyway, if you can get the name via repr or something, then you can use that to bind. but this just seems way more boilerplate than you need. i think i'm missing some key abstraction. |
03:35:45 | disruptek | what do the templates do for you? |
03:36:33 | disruptek | why create the tmp_...36, for example. |
03:36:34 | leorize[m]1 | yep, but if you slot the gensym-ed symbol into the AST of the `exec` macro (that macro is generated by the macro that generates `_wrapper`), then it becomes a symbol of type `proc(Module, cstring, varargs[cstring, cstring])`, not a NimNode |
03:36:55 | leorize[m]1 | the template is my "hack". I can obtain a NimNode using `getAst` on a template |
03:37:16 | disruptek | madness. |
03:37:27 | disruptek | can i see the generator? |
03:40:49 | disruptek | is this really how normal people write macros? |
03:40:56 | disruptek | this is why dim needs to exist. |
03:41:22 | disruptek | someone must have just used the :disruptek: emote. |
03:41:34 | disruptek | i felt that little twinge in my left testicle. |
03:42:03 | leorize | looks like matrix got laggy again |
03:42:28 | disruptek | it's 40-something degrees in here. |
03:42:57 | leorize | here's the very ugly generator: https://github.com/alaviss/setup-nim/blob/ng/src/private/utils.nim#L107 |
03:43:02 | disruptek | about 10โ for you chuckleheads. |
03:43:34 | disruptek | hmm, expectKind ftw |
03:43:51 | leorize | I use expectKind for user facing code |
03:43:56 | disruptek | rude. |
03:44:21 | leorize | the generator powers this stuff: https://github.com/alaviss/setup-nim/blob/ng/src/private/actions/core.nim |
03:44:35 | leorize | basically a typesafe wrapper thingy for js modules |
03:45:02 | disruptek | fucking () |
03:45:05 | disruptek | use command syntax. |
03:45:31 | disruptek | i get wrapSym now, at least. |
03:46:33 | leorize | I get a lot more compiler issues writing this macro than I'd like tbh |
03:47:08 | disruptek | now you know why i think macros should be removed. |
03:47:32 | * | hyiltiz joined #nim |
03:47:32 | * | hyiltiz quit (Changing host) |
03:47:32 | * | hyiltiz joined #nim |
03:48:05 | leorize | as long as you make it so that I can still write generators like those, I'm fine with it |
03:48:48 | disruptek | lol |
03:48:59 | disruptek | it's a much thornier problem, honestly. |
03:49:07 | disruptek | i'm just naive about the solution. |
03:49:37 | disruptek | it took a decade to get nim to this point. i just see what remains, not how far it has come. |
03:50:00 | disruptek | but i stand by my position: macros are mad. |
03:50:44 | disruptek | what happens if you just ident(wrapper.repr)? |
03:50:53 | disruptek | you're going to have output by then, right? |
03:51:02 | disruptek | i'm asking because i've never used this hack. |
03:51:18 | disruptek | i'm wondering if this is how i do it. |
03:52:52 | leorize | got undeclared identifier, which makes sense since genSym symbols can only be bound if you have the symbol |
03:53:12 | disruptek | what does the output look like? |
03:53:32 | disruptek | how could it be undeclared? |
03:54:16 | disruptek | you used repr and not $, right? |
03:54:36 | disruptek | because $ just emits the name while repr emits the gensym'd identifier... |
03:54:57 | leorize | https://play.nim-lang.org/#ix=2C0N |
03:55:17 | disruptek | yeah, you don't need bindsym here. |
03:55:28 | disruptek | just the identifier as ident(wrapper.repr) |
03:55:30 | disruptek | or w/e. |
03:55:47 | leorize | I need bindSym, the _wrapper version is not exported |
03:56:12 | disruptek | oh christ. |
03:56:28 | disruptek | so why doesn't it work with bindsym... grrr. |
03:57:10 | leorize | just genSym things I guess |
03:57:31 | disruptek | silly. |
03:58:05 | leorize | my walkaround do function at least. The thing looks ugly as hell but at least it works and generates small js |
03:58:51 | disruptek | well, i think it's a defect but there's just so much stuff like this. |
03:59:26 | disruptek | you generate all this output in a single macro? |
04:00:27 | leorize | it's splitted into multiple helpers |
04:00:45 | disruptek | oh you might be dynamicBindSym actually. |
04:01:00 | disruptek | s/be/need/ |
04:01:36 | disruptek | but the preamble is definitely typed by the time your macro is run, right? |
04:01:42 | disruptek | sem'd? |
04:01:58 | leorize | nope, I take untyped |
04:02:17 | disruptek | so how could this work? |
04:02:27 | leorize | typed is a land of madness and I would very much like to not touch it again |
04:02:28 | disruptek | you can't bind to symbols that don't exist. |
04:02:34 | disruptek | dude. |
04:02:58 | leorize | all of them are in the same AST tree |
04:03:02 | disruptek | put it all in one macro. {.experimental: "dynamicBindSym".} |
04:03:27 | disruptek | they are in the same ast maybe, but that ast, if un-sem'd, may as well be a string. |
04:04:15 | disruptek | i guess your template hack works because it forces everything to get sem'd first. |
04:05:15 | disruptek | i have drank the kool-aid, but if you don't want to go that route, i think your approach is good enough. |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:08 | leorize | dynamicBindSym works... until it met a symbol with {.varargs.} |
04:06:29 | leorize | I guess will have to make do with my approach for now |
04:06:43 | * | supakeen joined #nim |
04:07:20 | disruptek | varargs pragma? what is that? |
04:07:32 | * | mbomba joined #nim |
04:09:31 | leorize[m]1 | translate to varargs in the target language |
04:09:43 | disruptek | oh right. |
04:10:01 | disruptek | i wonder how much of a future our js backend has. |
04:10:32 | leorize[m]1 | I think it's plenty useful |
04:11:13 | leorize[m]1 | at least now I can write my setup-nim action in Nim |
04:11:26 | disruptek | we need some killer apps else some of this stuff could get axed easily in the name of progress. |
04:12:14 | leorize[m]1 | flywind is playing with it, I think something cool will come around soon |
04:15:08 | FromDiscord | <iWonderAboutTuatara> Would just a general utils module be acceptable for fusion? |
04:15:11 | * | arecacea1 quit (Remote host closed the connection) |
04:15:36 | * | arecacea1 joined #nim |
04:15:51 | FromDiscord | <iWonderAboutTuatara> I have quite a few algorithm implementations and such that I use for some competitive programming problems in Nim, like qsort, bsort, etc |
04:19:20 | disruptek | good. we need some wins. |
04:21:17 | * | rockcavera quit (Remote host closed the connection) |
04:23:59 | * | mbomba quit (Quit: WeeChat 2.9) |
04:30:25 | * | fredrikhr quit (Read error: Connection reset by peer) |
04:30:39 | * | fredrikhr joined #nim |
04:34:27 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2C0S |
04:36:25 | FromDiscord | <Gyllou> any game recommendations for good arena shooters.... |
04:36:46 | FromDiscord | <Gyllou> ๐ |
04:37:00 | FromDiscord | <Gyllou> or am i like 20 years too late for that |
04:39:48 | mipri | tinygiant: https://play.nim-lang.org/#ix=2C0T |
04:41:00 | FromDiscord | <tinygiant> Thanks for the help and quick response! |
04:43:43 | FromDiscord | <InventorMatt> you can also do this https://play.nim-lang.org/#ix=2C0U |
04:47:25 | * | hyiltiz quit (Ping timeout: 240 seconds) |
04:49:02 | * | hyiltiz joined #nim |
04:49:03 | * | hyiltiz quit (Changing host) |
04:49:03 | * | hyiltiz joined #nim |
04:51:58 | * | bung quit (Quit: Lost terminal) |
05:10:26 | * | solitudesf joined #nim |
05:19:39 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
05:30:50 | FromDiscord | <tinygiant> @InventorMatt Awesome, thanks! |
05:49:11 | * | NimBot joined #nim |
06:06:27 | * | hyiltiz quit (Ping timeout: 240 seconds) |
06:08:40 | * | solitudesf quit (Ping timeout: 256 seconds) |
06:15:01 | * | Axiomatic quit (Remote host closed the connection) |
06:17:23 | * | Axiomatic joined #nim |
06:31:49 | * | hyiltiz joined #nim |
06:31:50 | * | hyiltiz quit (Changing host) |
06:31:50 | * | hyiltiz joined #nim |
06:51:59 | * | narimiran joined #nim |
06:54:25 | * | hyiltiz quit (Ping timeout: 240 seconds) |
06:55:45 | Yardanico | !status |
06:55:47 | FromDiscord | Uptime - 5 days, 11 hours, and 19 minutes |
06:56:08 | * | BarrOff joined #nim |
06:59:57 | * | hyiltiz joined #nim |
06:59:57 | * | hyiltiz quit (Changing host) |
06:59:57 | * | hyiltiz joined #nim |
07:00:50 | FromDiscord | <Yardanico> everyone's sleeping ๐ค |
07:02:20 | FromDiscord | <alehander42> :)) |
07:02:22 | FromDiscord | <alehander42> noooo |
07:02:32 | FromDiscord | <alehander42> east europe awaek |
07:03:36 | * | PMunch joined #nim |
07:05:50 | PMunch | Good morning everyone :) |
07:07:10 | supakeen | Morning PMunch! |
07:07:25 | supakeen | PMunch: I worked on the PEG parser for CLI a tiny bit: https://github.com/supakeen/clip |
07:09:13 | FromDiscord | <PizzaFox> does using `result` over return have worse performance? |
07:09:41 | FromDiscord | <PizzaFox> looking at the C code nim generates it has a new param for `result` which seems like it would be slightly slower |
07:09:53 | FromDiscord | <Rika> result over return usually has better performance |
07:10:16 | FromDiscord | <Rika> that is called NRVO in C++ and it's considered an optimization |
07:11:31 | FromDiscord | <PizzaFox> interesting |
07:11:35 | PMunch | Essentially by using result you can directly set the fields of the object on the stack where the return value would be |
07:11:49 | PMunch | Instead of building your object and then copying it over into the return position |
07:12:20 | FromDiscord | <PizzaFox> does GCC and nim optimize my code to be as fast as using `result` anyway |
07:12:27 | PMunch | supakeen, cool! |
07:12:43 | PMunch | What do you mean by "Support GNU parsing (mostly)" though :P |
07:12:55 | FromDiscord | <lqdev> i'm still wondering what that "observable stores to 'variable'" warning is |
07:13:04 | FromDiscord | <lqdev> there was gonna be a blog post about it |
07:13:10 | FromDiscord | <Rika> > does GCC and nim optimize my code to be as fast as using `result` anywayโตthink about this, it can be faster with result ๐ |
07:13:12 | FromDiscord | <lqdev> it still isn't there |
07:13:16 | FromDiscord | <nikki> @PizzaFox the result param is a pointer to the original loc on stack where the return value was going to bubble up to |
07:13:19 | supakeen | PMunch: There's one super annoying bit in GNU's style of arguments and that's short options with a value such as `-bfoo` where foo is the value for -b. |
07:13:31 | PMunch | Aaah |
07:13:38 | FromDiscord | <Rika> > i'm still wondering what that "observable stores to 'variable'" warning isโตjust a warning about possibly inconsistent behavior when an exception is raised |
07:13:41 | FromDiscord | <Rika> afaik? |
07:13:44 | FromDiscord | <Rika> or maybe im mistaken |
07:13:52 | FromDiscord | <lqdev> it's related to NRVO |
07:13:57 | supakeen | Since you're also allowed to pass multiple flags with `-abc` so I have to do some research to look at how they implement this. |
07:14:07 | FromDiscord | <nikki> @PizzaFox you can see oldschool C APIs for vector math do sth like this manually by passing out-param pointers |
07:14:28 | FromDiscord | <Rika> yeah basically when you raise you would expect the variable to be unmodified but it might be modified due to nrvo or so |
07:14:39 | FromDiscord | <Rika> is what i recall, at least |
07:14:44 | FromDiscord | <Rika> might be mistaken, as ive said |
07:14:52 | FromDiscord | <nikki> @lqdev basically it means if you partially write to result then except, after the exception is caught the partially written state of result is visible |
07:15:08 | FromDiscord | <nikki> (for example -- including other ways to observe) |
07:15:13 | FromDiscord | <Rika> thanks for confirming that i aint a dumbass lol |
07:15:36 | PMunch | supakeen, AFAIK it's just if option 'a' has an argument then it has to be last in a list of short opts immediately followed by the value. |
07:15:59 | FromDiscord | <nikki> under the model of result where result is a new temporary that is atomically copied over the return value only in the end, this wouldn't be observed. so it's leaking that result is an alias of the final return value location |
07:16:09 | supakeen | PMunch: Yea so it means I need to 'invert' how it's currently laid out, currently my idea is to have a set of parsers that parse into a table (or perhaps a tree) and then have constraints applied on that. |
07:16:23 | supakeen | However, it seems better to reverse that and have constraints and generate a parser based on those :) |
07:16:40 | PMunch | Yeah |
07:18:50 | FromDiscord | <PizzaFox> i will award a gold star to anyone who can make a nim arg parser that can emit a man page or bash/fish/zsh completions |
07:20:16 | PMunch | PizzaFox, oh that's not a bad idea |
07:20:39 | FromDiscord | <PizzaFox> this could be yours โญ |
07:20:48 | PMunch | Shiny! |
07:21:05 | FromDiscord | <Rika> bsah/fish/zsh completions ๐ |
07:21:10 | FromDiscord | <Rika> i'd love that |
07:21:33 | FromDiscord | <PizzaFox> i know fish can read man pages to provide autocompletions, not sure if other shells do that |
07:21:45 | FromDiscord | <PizzaFox> emitting per-shell completions sounds annoying and prone to errors |
07:22:00 | FromDiscord | <PizzaFox> but i've seen other non-nim libraries that can do it |
07:22:36 | FromDiscord | <Rika> sounds like a library needs to have functionality to customize the autocompletions as well |
07:31:32 | * | vicfred quit (Quit: Leaving) |
07:31:38 | FromDiscord | <PizzaFox> rust has clap and clap_generate for arg parsing and shell completions, respectively https://docs.rs/clap_generate/3.0.0-beta.2/clap_generate/ |
07:35:06 | PMunch | Nim of course can output these on compile-time automatically :) |
07:35:20 | FromDiscord | <Rika> but no one has made it, no? |
07:37:05 | PMunch | No.. |
07:41:29 | supakeen | mrm clap vs clip |
07:52:46 | PMunch | Hmm, when making PRs to the Nim repo now should I make them towards master or devel |
07:54:20 | narimiran | PMunch: huh? |
07:55:58 | FromDiscord | <Yardanico> @PMunch master doesn't exist anymore |
07:56:17 | FromDiscord | <Yardanico> well it does, but it's dead |
07:56:27 | * | Jjp137 quit (Ping timeout: 260 seconds) |
07:57:44 | FromDiscord | <lqdev> @nikki ah, thanks |
07:58:16 | PMunch | Oh really? Okay |
07:59:59 | * | BarrOff quit (Ping timeout: 260 seconds) |
08:00:07 | narimiran | PMunch: who are you and where is the real PMunch? |
08:00:19 | PMunch | Haha, what do you mean? |
08:00:19 | * | mmohammadi9812 joined #nim |
08:00:33 | narimiran | i wouldn't expect of you to ask that kind of questions |
08:00:56 | PMunch | Haha, I don't actually make that many PRs to Nim itself |
08:06:42 | * | hyiltiz quit (Ping timeout: 256 seconds) |
08:08:00 | * | mbomba joined #nim |
08:13:21 | * | hyiltiz joined #nim |
08:13:21 | * | hyiltiz quit (Changing host) |
08:13:21 | * | hyiltiz joined #nim |
08:13:56 | * | mbomba quit (Quit: WeeChat 2.9) |
08:15:46 | FromDiscord | <alehander42> i think to `devel` |
08:16:15 | FromDiscord | <alehander42> oh |
08:16:26 | FromDiscord | <alehander42> working in my |
08:16:29 | FromDiscord | <alehander42> nilcheck things |
08:16:34 | FromDiscord | <alehander42> trying to see why a test fails |
08:16:52 | FromDiscord | <alehander42> hopefully in the evening, would try more on optimization |
08:24:40 | FromDiscord | <PizzaFox> im interesting in playing around with nim documentation generation, does nim have some way to generate json instead of html so i can make my own docs? |
08:25:05 | FromDiscord | <PizzaFox> i have found it https://nim-lang.org/docs/docgen.html#document-types-json |
08:33:15 | Oddmonger | hello archlinux users: is nim 1.4.0 package ok ? I had switched to gitnim when there were troubles with arch package, but it seems history |
08:33:48 | FromDiscord | <Yardanico> arch package has bugs generally |
08:33:57 | Oddmonger | ah |
08:33:57 | FromDiscord | <Yardanico> but they probably won't affect you |
08:34:13 | FromDiscord | <Yardanico> https://bugs.archlinux.org/?project=5&string=nim cross-compilation and no nimsuggest source files |
08:34:21 | Oddmonger | i've seen git nim 1.4rc was 1.3.7 |
08:34:41 | FromDiscord | <Yardanico> well yes that's right |
08:34:50 | FromDiscord | <Yardanico> nim development versions have odd versions |
08:34:56 | FromDiscord | <Yardanico> 1.3.1, 1.3.3, 1.3.5, 1.3.7 etc |
08:35:01 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:36:00 | Oddmonger | i mean, arch ยซnim -vยป says 1.4.0, and git nim -v says: 1.3.7 (but it is in 1.4rc branch) |
08:36:37 | FromDiscord | <Yardanico> well for gitnim you should ask @disruptek :) |
08:36:48 | FromDiscord | <Yardanico> but it should have 1.4 already |
08:36:55 | Oddmonger | ah he's the evil man behind this :) |
08:37:09 | FromDiscord | <Yardanico> !repo gitnim |
08:37:10 | disbot | https://github.com/disruptek/gitnim -- 9gitnim: 11choosenim for choosey nimions 15 6โญ 0๐ด |
08:37:13 | FromDiscord | <Yardanico> exactly |
08:45:14 | * | hyiltiz quit (Ping timeout: 256 seconds) |
08:51:14 | FromDiscord | <Yardanico> https://youtrack.jetbrains.com/issue/NIM-3 |
08:51:20 | FromDiscord | <Yardanico> sent a long message, see http://ix.io/2C4M |
09:00:05 | * | stisa[m] quit (Quit: Idle for 30+ days) |
09:05:07 | Araq | PizzaFox: yeah indeed it has but I still consider it a bad idea |
09:05:34 | FromDiscord | <PizzaFox> why |
09:05:36 | Araq | instead parse the HTML, it's a tree structure of a markup language so stuff like **bold** becomes <b>bold</b> |
09:06:03 | FromDiscord | <PizzaFox> that seems bad |
09:06:09 | Araq | wheras in JSON is becomes either **bold** or <b>bold</b> |
09:06:19 | Araq | neither of which are JSON. |
09:06:36 | FromDiscord | <Yardanico> @PizzaFox nim's generated HTML is strict |
09:06:40 | FromDiscord | <PizzaFox> the json has html in it?? |
09:06:41 | FromDiscord | <PizzaFox> what? |
09:06:51 | Araq | so JSON is by design an incomplete format for this purpose |
09:07:03 | FromDiscord | <Yardanico> you know that nim's docs are XHTML right? @PizzaFox |
09:07:10 | FromDiscord | <Yardanico> so they are easy to correctly parse |
09:07:32 | FromDiscord | <PizzaFox> not as easy as json |
09:07:39 | Araq | instead of parsing HTML you would parse JSON, except that the JSON is incomplete, by construction. A bad idea. |
09:07:48 | FromDiscord | <PizzaFox> looking at tools from other ecosystems (ex. typedoc) |
09:07:51 | FromDiscord | <PizzaFox> you can generate json instead of html |
09:08:04 | Araq | but do what you want, I failed to convince others before |
09:08:05 | FromDiscord | <PizzaFox> their html generator is just a single implementation of a json consumer |
09:08:13 | Araq | yeah yeah yeah |
09:08:18 | FromDiscord | <PizzaFox> this seems like a failing on nim's part |
09:08:28 | Araq | 1. we do support 'nim jsondoc' |
09:08:38 | Araq | 2. I personally think it's a bad idea. |
09:09:03 | FromDiscord | <hobbledehoy> Brings back the pain of converting the html in json to discord markdownโตfound it good though since I could keep the formatting of the docs |
09:09:26 | FromDiscord | <PizzaFox> i will take this into consideration |
09:09:32 | FromDiscord | <PizzaFox> next question |
09:09:53 | FromDiscord | <PizzaFox> i have looked at the js code in nim docs and i am not pleased |
09:10:03 | FromDiscord | <PizzaFox> i will make a PR to make it awesome |
09:10:18 | FromDiscord | <PizzaFox> however, the more awesome the JS code gets the less browser compatibility you get |
09:10:28 | FromDiscord | <Yardanico> wdym by "awesome" though? |
09:10:38 | FromDiscord | <Yardanico> better performance? |
09:10:41 | FromDiscord | <PizzaFox> in ES2015 (ES6) the const and let operators were added |
09:10:56 | FromDiscord | <PizzaFox> prior to that variables were declared with `var` and are totally mutable |
09:10:58 | FromDiscord | <Yardanico> yes, so how this will make it better? :) |
09:11:20 | FromDiscord | <PizzaFox> (edit) "const" => "`const`" | "let" => "`let`" |
09:11:30 | Araq | instead rewrite the JS code to be Nim code |
09:11:35 | Araq | ;-) |
09:11:39 | FromDiscord | <Yardanico> yeah I wanted to say that too |
09:11:41 | FromDiscord | <Yardanico> nim has a js backend |
09:11:44 | FromDiscord | <PizzaFox> if you think i am upset with the state of the current js code |
09:11:48 | FromDiscord | <haxscramper> @PizzaFox you might try to just write own documentation generator. I'm thinking about doing it too, so far I only wrote example for compiler pass: https://gist.github.com/haxscramper/8821819221b1d73866e4aed306147f0c - maybe you can go from here |
09:12:06 | FromDiscord | <PizzaFox> the nim js target is very bad at generating efficient js code |
09:12:11 | FromDiscord | <Yardanico> is it? |
09:12:13 | FromDiscord | <PizzaFox> yes |
09:12:23 | Araq | no it isn't. |
09:12:24 | FromDiscord | <Yardanico> karax is on-par with other similar frameworks by performance for example |
09:12:26 | FromDiscord | <haxscramper> Or maybe not, I'm not sure if I made this thing even works correctly |
09:12:29 | FromDiscord | <Yardanico> don't look at the JS itself |
09:12:31 | FromDiscord | <Yardanico> look at the performance |
09:12:35 | FromDiscord | <Yardanico> more code != less performance |
09:12:42 | FromDiscord | <PizzaFox> not necessarily true |
09:12:48 | FromDiscord | <Yardanico> but not necessarily false |
09:13:00 | FromDiscord | <PizzaFox> if you are declaring a billion typed array variables at the top at every nim js file you are going to get worse performance |
09:13:01 | FromDiscord | <Yardanico> nim's JS is mostly statically typed so it's much easier for JITs to optimize it |
09:13:25 | Araq | PizzaFox: top level statements are executed *once* |
09:13:38 | FromDiscord | <PizzaFox> let me play around with the JS snippet on the docs page |
09:13:50 | FromDiscord | <PizzaFox> i will come back with awesome es2020 code and potentially awesome nim code |
09:14:32 | FromDiscord | <PizzaFox> btw |
09:14:35 | FromDiscord | <PizzaFox> regardless of what happens |
09:14:43 | FromDiscord | <PizzaFox> i am submitting a PR that fixes the dark theme bug on theindex.html |
09:15:09 | Araq | ok, thanks |
09:15:40 | FromDiscord | <flywind> How can I manage the states between different components in Karax? I'm write a UI framework based on `Karax`. โตI want to pass `index` from `Menu` to `MenuItem` interally. React use `useState` to pass Context. Are there some solutions? |
09:15:50 | FromDiscord | <flywind> sent a code paste, see https://play.nim-lang.org/#ix=2C4V |
09:16:23 | Araq | flywind: I don't know. Use a global variable? lol |
09:17:51 | Araq | I never got the point of stateful components, they don't work well with DOM diffing and they don't make anything easier to manage. Feels like turning into the dark ages of OOP where you can "hide" state but never its resulting bugs |
09:20:50 | FromDiscord | <flywind> `MenuItem` needs to know whether itself is selected from parent VNode `Menu`. Then It could trigger some callbacks. |
09:21:52 | FromDiscord | <flywind> Ok, I will just do some style things. States will be solved by users. |
09:25:57 | FromGitter | <timotheecour> > Use a global variable โ โ that works well in practice |
09:31:41 | FromDiscord | <flywind> I don't think that will work for a UI library. Users may use `Menu` many times. Each `Menu` need a context object. It can't be controlled by UI framework unless allowing ugly styles. |
09:32:32 | FromDiscord | <flywind> for example `Menu` return `(VNode, ctx)`. Or let users to create `ctx` to `Menu` function. |
09:32:57 | FromDiscord | <flywind> (edit) "for example `Menu` return `(VNode, ctx)`. Or let users to create `ctx` ... to" added "and pass that" |
09:34:40 | FromDiscord | <flywind> Like this: |
09:34:42 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/770218834752962570/unknown.png |
09:36:22 | * | Tanger quit (Quit: Leaving) |
09:36:24 | FromDiscord | <flywind> I can't use `template` as item in Karax. Otherwise I can `inject` ctx object. So children node can use this context object. |
09:36:46 | FromDiscord | <PizzaFox> here is my awesome es2020 rewrite of the js to run on doc pages https://play.nim-lang.org/#ix=2C55 |
09:38:00 | FromDiscord | <PizzaFox> this will cut your browser support to only people running very recent versions of browsers |
09:38:44 | FromDiscord | <PizzaFox> https://zws.im/โโโโโโโโโโโโโโโโ |
09:38:47 | FromDiscord | <PizzaFox> optional chaining ftw |
09:39:03 | FromDiscord | <PizzaFox> if you tell me minimum javascript version to support |
09:39:06 | FromDiscord | <PizzaFox> i will rewrite this |
09:39:07 | FromDiscord | <Yardanico> I don't think that we want cutting off support of older browsers |
09:39:13 | FromDiscord | <PizzaFox> tell me an ecmascript version |
09:39:17 | FromDiscord | <Yardanico> Nim is about supporting a lot of platforms |
09:39:45 | FromDiscord | <Yardanico> Well, ask @Araq :) |
09:40:40 | FromDiscord | <PizzaFox> so do we just wait until he responds or |
09:41:28 | FromDiscord | <Yardanico> but generally what about not changing the requirements for that js? There's not much of it anyway |
09:41:35 | FromDiscord | <PizzaFox> that is true |
09:41:41 | FromDiscord | <PizzaFox> syntactic sugar is fun tho |
09:41:41 | * | fxn joined #nim |
09:41:44 | FromDiscord | <PizzaFox> i will rewrite for es2015 |
09:41:50 | FromDiscord | <PizzaFox> aka when js got good |
09:42:10 | * | natrys joined #nim |
09:42:15 | * | hyiltiz joined #nim |
09:42:15 | * | hyiltiz quit (Changing host) |
09:42:15 | * | hyiltiz joined #nim |
09:42:17 | FromDiscord | <PizzaFox> 92% of browsers support it, compared to the 80% from above |
09:42:20 | FromDiscord | <hobbledehoy> what about writing it in nim? |
09:42:25 | FromDiscord | <Yardanico> ^^ |
09:42:35 | FromDiscord | <Yardanico> nim's js backend is not as bad as you think it is |
09:42:44 | FromDiscord | <PizzaFox> i am the javascript understander |
09:43:04 | FromDiscord | <PizzaFox> and it is my firm belief that this nim compiler automaton can not produce better code than me, an intellectual js dev |
09:43:06 | FromDiscord | <hobbledehoy> couldn't be too difficult to write the bindings for localStorage? |
09:43:23 | FromDiscord | <Yardanico> I just don't see the need for newer JS sugar for that simple small js script |
09:43:28 | FromDiscord | <PizzaFox> i am not defending the js sugar |
09:43:33 | FromDiscord | <Yardanico> It would make more sense to rewrite it in Nim |
09:43:42 | fxn | hi, I am doing the hello world in exercism.io, and example code has a procedure with a string literal in the body, and that works. Why? I know about the result variable, and about the return statement, but have not seen in the docs last expressions documented as they work in Perl or Ruby |
09:43:48 | FromDiscord | <PizzaFox> localstorage returns null or string for the `.get()` call, not sure the best way to type that in nim |
09:44:01 | FromDiscord | <PizzaFox> (edit) "localstorage" => "`localStorage`" | "null" => "`null`" | "string" => "`string`" | "`.get()`" => "`localStorage.get()`" |
09:44:32 | FromDiscord | <Yardanico> Check out https://nim-lang.org/docs/jsffi.html |
09:44:32 | FromDiscord | <hobbledehoy> Option[string] wouldn't it be? |
09:45:01 | FromDiscord | <PizzaFox> that seems like a logical way to do that, but idk if that compiles to a null check in js @hobbledehoy |
09:46:33 | FromDiscord | <PizzaFox> i will work on this rn and report my findings |
09:50:58 | FromDiscord | <Rika> fxn nim also has implicit return or whatever its called, like in rust |
09:53:18 | fxn | gotcha! may send a doc patch then |
09:54:53 | FromDiscord | <Rika> im pretty sure its documented in the manual, unless you're changing another doc |
09:56:40 | fxn | I could not find it, neither in the tutorials not in the reference manual, maybe I missed it |
09:57:38 | fxn | another question, does `func` improve performance (generally speaking) because the compiler can assume stuff? or is it just a defensive way to say: it should not, if it does please do not compile |
09:58:46 | fxn | in principle I guess I'd write `func` unless there are side-effects, also signals no side effects to readers of the code |
09:59:58 | FromDiscord | <PizzaFox> how can i type `document.documentElement` as an `Element` with nim to js compiler |
10:00:07 | FromDiscord | <PizzaFox> types for `Document` are missing it |
10:00:35 | FromDiscord | <PizzaFox> despite it being around since chrome version 1 |
10:02:34 | FromDiscord | <hobbledehoy> @PizzaFox don't know about that issue but here is how to use local storageโตhttps://play.nim-lang.org/#ix=2C5kโตnull checks just become nil checks |
10:02:41 | FromDiscord | <PizzaFox> yeah i have already solved that issue |
10:02:49 | FromDiscord | <hobbledehoy> ah ok then |
10:02:50 | FromDiscord | <PizzaFox> now i am dealing with nim types of js things being very broken |
10:02:58 | FromDiscord | <PizzaFox> Element is also missing the `dataset` property |
10:03:04 | FromDiscord | <PizzaFox> (edit) "Element is also missing the `dataset` property ... " added "as well" |
10:04:03 | * | abm joined #nim |
10:05:59 | FromDiscord | <PizzaFox> also is it cooler to write `thing == nil` or `thing.isNil()` |
10:07:58 | * | Jjp137 joined #nim |
10:09:16 | mipri | PizzaFox: something like https://play.nim-lang.org/#ix=2C5p |
10:09:39 | FromDiscord | <PizzaFox> is there no way to extend the type of the actual document or smth |
10:09:54 | FromDiscord | <PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2C5q |
10:10:13 | mipri | no AFAIK, but if you define a proc that takes a Document, UFCS will get you most of the way there |
10:10:44 | Araq | fxn, complex question. 'func' is also inferred for you as .noSideEffect. .noSideEffect is increasingly used by the optimizer but I doubt it's currently measurable |
10:13:28 | * | mmohammadi9812 quit (Ping timeout: 256 seconds) |
10:15:24 | * | mmohammadi9812 joined #nim |
10:20:14 | * | krux02 joined #nim |
10:20:45 | FromDiscord | <PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2C5y |
10:21:42 | FromDiscord | <PizzaFox> i decided not to do mipri's ufcs idea because it even after marking the procs as inline they still werent getting optimized to the proper js code |
10:24:13 | * | stefantalpalaru quit (Ping timeout: 264 seconds) |
10:26:38 | * | GuestBased joined #nim |
10:27:05 | FromDiscord | <PizzaFox> sent a code paste, see https://paste.rs/sT4 |
10:27:05 | FromDiscord | <PizzaFox> this should be valid nim code |
10:27:23 | FromDiscord | <PizzaFox> but something is deeply fucked with the types for `event.target` |
10:28:31 | narimiran | 18,000 commits!!! |
10:28:32 | * | nclark joined #nim |
10:28:46 | FromDiscord | <PizzaFox> 18000 commits and js types are still broken |
10:28:48 | narimiran | congrats beef331 |
10:29:50 | * | nclark quit (Client Quit) |
10:31:13 | * | nrclark joined #nim |
10:31:30 | * | agent0x00 joined #nim |
10:31:53 | nrclark | so I'm just getting started with Nim, and Im |
10:32:07 | nrclark | *I'm having some problems getting my toolchain up and running |
10:32:22 | * | mmohammadi9812 quit (Ping timeout: 246 seconds) |
10:33:24 | * | mmohammadi9812 joined #nim |
10:33:36 | nrclark | When I install the toolchain (either using ./install.sh or using ./koch install), none of the companion tools (nimble, nimpretty, etc) get installed |
10:34:23 | fxn | @Araq awesome, so I do not know what's idiomatic, but like the idea of defining pure procedures with func so that readers of the code know upfront there are no side-effect, and use `proc` only if there are |
10:34:36 | FromDiscord | <Rika> > 18000 commits and js types are still brokenโตbecause it isnt really the priority right now |
10:35:53 | nrclark | running "./install.sh $SOME_DIR" creates "$SOME_DIR/nim/", with a subdirectory of "$SOME_DIR/nim/bin/". And in that folder, the nim compiler is installed. So that all seems OK. But none of the tools are installed along with it :( |
10:36:17 | FromDiscord | <BAsedCeo> ahem |
10:37:29 | narimiran | nrclark: what about `./koch tools`? |
10:37:50 | nrclark | narimiran: that compiles the tools OK. But it doesn't install them. |
10:37:57 | Araq | fxn, it is idiomatic to that yes, plenty of people prefer 'func' too. |
10:38:20 | Araq | nrclark, while you're not supposed to ever use 'install.sh', there might a problem here indeed |
10:38:32 | narimiran | nrclark: so, they are there, but not in the correct `bin` folder? |
10:38:38 | Araq | as install.sh is the blueprint for package managers... |
10:38:51 | nrclark | Here's a pastebin for the steps I ran, starting from an empty folder |
10:38:53 | nrclark | https://pastebin.com/VXADtgte |
10:39:52 | nrclark | at the end of that, the tools are built and live in bin/ inside of the git directory |
10:39:58 | nrclark | but they don't get installed into the install directory |
10:44:00 | * | GuestBased quit (Quit: Connection closed) |
10:44:14 | * | Vladar joined #nim |
10:44:40 | nrclark | Araq "install.sh $SOME_DIR" and "./koch install $SOME_DIR" behave the same way, as far as whether the tools get installed |
10:45:05 | nrclark | also this is true for me using the binary tarball from nim-lang.org |
10:46:18 | narimiran | `cd dir_you want`, and then to the remaining steps? :) |
10:46:32 | * | lritter joined #nim |
10:52:06 | FromDiscord | <BAsedCeo> hey @PizzaFox may I ask you something about JS, since you seem so knoweldgeable |
10:54:00 | FromDiscord | <PizzaFox> yeah sure |
10:54:22 | FromDiscord | <PizzaFox> i am the js understander |
10:54:25 | FromDiscord | <BAsedCeo> @PizzaFox, you bubbling lowlife nigger faggot with 3 neurons and 2 synapses, you creation of kikery and satan, waste of God, drooling retard, mentally damaged faggot that likes nigger cocks up his ass and foreksin down his throat, may your life be miserable in hell you insufferable moron, may you take JS with you, and get fucked by it in the afterlife |
10:54:37 | FromDiscord | <PizzaFox> what |
10:54:46 | Araq | moderation! |
10:58:14 | PMunch | Unfortunately I'm only a moderator here on IRC and not on Discord.. |
10:58:37 | * | natrys quit (Ping timeout: 246 seconds) |
10:59:46 | FromGitter | <gogolxdong> Is there a way to get strVal of untyped in template? |
11:01:09 | Araq | what's the context? |
11:01:59 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f96aca7c990bb1c3931632a] |
11:02:14 | * | stefantalpalaru joined #nim |
11:03:40 | FromGitter | <gogolxdong> Construct variable and literal value at the same time in a template . |
11:04:58 | FromGitter | <gogolxdong> It also hints invalid token: _ (\95) if I want `name _demuxer_class` |
11:06:09 | FromGitter | <gogolxdong> call as : `aa(h264)` |
11:10:31 | * | fxn quit (Remote host closed the connection) |
11:11:43 | Araq | I'd use a macro instead |
11:15:55 | FromDiscord | <Vindaar> doesn't `astToStr` work in this case? |
11:16:03 | FromGitter | <Araq> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f96aff2eb82301c1a4db8cf] |
11:16:57 | Araq | Vindaar: yeah but the underscore separator doesn't work either and who knows how complex this thing will become |
11:17:08 | Araq | so a macro seemed appropriate |
11:18:53 | FromDiscord | <Vindaar> Yes, I agree |
11:20:06 | * | dddddd quit (Ping timeout: 260 seconds) |
11:20:59 | FromDiscord | <flywind> I add lots of blocks to the code that `Karax` generates. And now it works. |
11:21:04 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/770245604977934356/unknown.png |
11:21:52 | narimiran | i should probably know this, but.... is there a way to specify which nim executable to use when doing `koch boot`? |
11:22:34 | FromGitter | <gogolxdong> astToStr doesn't work , hints undeclared indentifier: 'h264', I'm trying to write what expanded in C macros. Macros construction are still hard to remember in Nim, though I've write a similiar one. |
11:30:39 | * | dddddd joined #nim |
11:34:22 | * | hyiltiz quit (Ping timeout: 260 seconds) |
11:34:27 | * | agent0x00 quit (Quit: WeeChat 1.9.1) |
11:45:46 | * | mmohammadi9812 quit (Ping timeout: 256 seconds) |
11:45:54 | * | mmohammadi9812 joined #nim |
11:48:25 | * | rockcavera joined #nim |
11:53:02 | * | mmohammadi9812 quit (Ping timeout: 260 seconds) |
11:56:45 | * | nrclark quit (Quit: My MacBook has gone to sleep. ZZZzzzโฆ) |
11:57:04 | * | mmohammadi9812 joined #nim |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:37 | * | supakeen joined #nim |
12:12:42 | * | hyiltiz joined #nim |
12:12:42 | * | hyiltiz quit (Changing host) |
12:12:42 | * | hyiltiz joined #nim |
12:18:06 | * | Vladar quit (Remote host closed the connection) |
12:19:24 | * | hyiltiz quit (Ping timeout: 272 seconds) |
12:19:36 | * | BarrOff joined #nim |
12:35:15 | PMunch | https://github.com/nim-lang/Nim/pull/15729 |
12:35:16 | disbot | โฅ Implements streams for sockets |
12:48:56 | Zevv | and we want them async |
12:49:05 | Zevv | \o/ |
12:50:36 | PMunch | Should be very simple to do |
13:12:18 | PMunch | Wait, is there an async stream API? |
13:20:06 | Araq | yes there is and it considered broken by some people |
13:20:11 | Araq | *it is |
13:20:18 | Araq | (but then what isn't...) |
13:25:39 | * | hyiltiz joined #nim |
13:25:39 | * | hyiltiz quit (Changing host) |
13:25:39 | * | hyiltiz joined #nim |
13:26:19 | * | TomDotTom joined #nim |
13:27:32 | PMunch | Error: type mismatch: got <proc (s: Stream){.gcsafe, locks: <unknown>.}> but expected 'proc (s: Stream){.nimcall, gcsafe.}' |
13:27:32 | PMunch | .tag effects differ |
13:27:34 | PMunch | Uhm.. |
13:32:25 | * | hyiltiz quit (Ping timeout: 240 seconds) |
13:45:40 | disruptek | chrome will save us all. |
13:46:10 | PMunch | Huh? |
13:46:54 | disruptek | it puts heat into my 10โ trailer. |
13:47:32 | disruptek | a nimble rant might generate some warmth, too. which do you prefer? |
13:49:32 | PMunch | Haha, are you using Chrome as a heat source? :P |
13:49:44 | disruptek | ungoogled-chromium compilation, yes. |
13:49:55 | PMunch | Aah compiling it! |
13:50:01 | PMunch | Yeah that'll output some heat |
13:50:08 | disruptek | running it just isn't very inefficient, but compiling it is. |
13:55:25 | PMunch | Is it inefficient, or is there just a lot to compile? |
13:55:56 | disruptek | most of what we compile, we don't use. face it. |
13:58:14 | disruptek | PMunch: what are you doing here, dude? i, like, never see you. |
13:58:17 | * | hyiltiz joined #nim |
13:58:18 | * | hyiltiz quit (Changing host) |
13:58:18 | * | hyiltiz joined #nim |
13:58:33 | PMunch | What do you mean? I'm here almost every single day :P |
13:58:42 | disruptek | you're avoiding me, then. |
13:58:59 | PMunch | I'm not! |
13:59:01 | disruptek | is it dark all the time or light all the time, where you are? |
13:59:05 | disruptek | i can't remember. |
13:59:21 | PMunch | Right now we're in the transition period |
13:59:28 | PMunch | From light to dark |
13:59:31 | disruptek | hold on, i gotta drain the main vein into a bottle. brb |
13:59:51 | PMunch | So days are getting shorter and shorter every single day |
14:00:38 | ForumUpdaterBot | New thread by Clonk: Testament & module, see https://forum.nim-lang.org/t/6987 |
14:01:44 | disruptek | what activities do you have in the permadark that you don't have elsewhen? |
14:02:01 | PMunch | Depression and staying indoors pretty much |
14:02:24 | PMunch | I mean it's dark and cold outside, so what else would you do |
14:02:26 | disruptek | same. |
14:03:05 | * | hyiltiz quit (Ping timeout: 240 seconds) |
14:04:08 | disruptek | i think we should come up with some activities for you folks. |
14:04:22 | disruptek | stuff that you can look forward to when the sun is shining. |
14:07:10 | FromDiscord | <tinygiant> sent a long message, see http://ix.io/2C6C |
14:07:51 | disruptek | i've done a parseUrl and then check to see if scheme exists. |
14:07:57 | disruptek | no scheme, no url. |
14:08:16 | FromDiscord | <tinygiant> Ok, thanks, I'll give that a shot. |
14:08:50 | disruptek | it's lazy but it basically works. |
14:09:28 | * | arecacea1 quit (Remote host closed the connection) |
14:09:32 | disruptek | if your paths are well-formed, you can just check for //. |
14:09:58 | * | arecacea1 joined #nim |
14:11:39 | PMunch | Be a touch careful with that if you plan on running it on Windows though: https://play.nim-lang.org/#ix=2C6D |
14:11:47 | PMunch | Scheme will return the drive letter |
14:12:01 | disruptek | awesome, thanks. |
14:14:35 | FromDiscord | <tinygiant> PMunch, yup, just figured that out. It's marking my paths as urls. |
14:15:06 | FromDiscord | <ThothLoki> sent a code paste, see https://play.nim-lang.org/#ix=2C6F |
14:16:30 | FromDiscord | <lqdev> that's because `PEXA_BTC` isn't a string. |
14:16:57 | FromDiscord | <lqdev> have you looked at jsonutils yet? https://nim-lang.org/docs/jsonutils.html |
14:17:27 | disruptek | jsonutils should be dragged out behind the barn and told to put its head down. |
14:17:46 | Prestige | that bad eh? |
14:18:33 | PMunch | Why don't you like it disruptek? |
14:18:35 | FromDiscord | <ThothLoki> i have not looked at jsonutils. i am just importing json right now |
14:19:09 | disruptek | i think the main reason i hate it so much is that i read the source. |
14:19:39 | * | hyiltiz joined #nim |
14:19:39 | * | hyiltiz quit (Changing host) |
14:19:39 | * | hyiltiz joined #nim |
14:19:39 | PMunch | Haha :P |
14:19:59 | disruptek | i honestly have no idea what it does. |
14:20:29 | disruptek | it's dogshit, through and through, balls to bones. |
14:21:37 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2C6H |
14:22:24 | FromDiscord | <ThothLoki> @lqdev so PEXA_BTC isnt a string, from what i can see, it should return an array. does that sound correct to you? |
14:22:39 | PMunch | What's so bad about it? (Haven't looked at the source in case it's blatantly obvious) |
14:22:40 | FromDiscord | <lqdev> @ThothLoki `getStr` returns a string. |
14:23:25 | FromDiscord | <ThothLoki> i know but `let name = parsedObject["PEXA_BTC"].getStr()` (nix the getStr()) should be returning an array based on the json that is coming out |
14:23:40 | FromDiscord | <ThothLoki> does that sound correct to you? |
14:23:54 | FromDiscord | <lqdev> no |
14:23:55 | FromDiscord | <lqdev> https://nim-lang.org/docs/json.html#getStr%2CJsonNode%2Cstring |
14:23:58 | FromDiscord | <lqdev> it returns a string |
14:24:01 | FromDiscord | <lqdev> always |
14:24:55 | FromDiscord | <ThothLoki> sent a code paste, see https://play.nim-lang.org/#ix=2C6L |
14:25:26 | FromDiscord | <lqdev> yea it it |
14:25:27 | FromDiscord | <lqdev> (edit) "it" => "is" |
14:25:41 | FromDiscord | <lqdev> https://nim-lang.org/docs/json.html#%5B%5D%2CJsonNode%2Cint |
14:25:49 | FromDiscord | <lqdev> you can index a JSON array using [] |
14:25:55 | FromDiscord | <tinygiant> No expert here, but I just went through something like this. Doesn't it return a JsonNode (possibly Jobject or JArray)? |
14:26:13 | FromDiscord | <ThothLoki> thats my thought too |
14:26:45 | FromDiscord | <ThothLoki> i wonder if i need to go the way of `let name = parsedObject["PEXA_BTC"].newJIArray()` |
14:26:56 | FromDiscord | <ThothLoki> then handle the array |
14:29:55 | * | solitudesf joined #nim |
14:30:24 | FromDiscord | <lqdev> no. |
14:30:32 | FromDiscord | <lqdev> it will just return a JsonNode whose kind is JArray |
14:30:39 | FromDiscord | <lqdev> because that's what your damn JSON is |
14:31:16 | FromDiscord | <ThothLoki> i just removed `getStr()` and it is spitting out what i want |
14:31:22 | disruptek | HOLY SHIT |
14:32:26 | Zevv | wut |
14:34:28 | * | stefantalpalaru quit (Changing host) |
14:34:28 | * | stefantalpalaru joined #nim |
14:35:39 | FromDiscord | <ThothLoki> he is probably just making fun of my slow learning of this language |
14:39:22 | Prestige | disruptek: bottle overflow? |
14:40:19 | disruptek | i'm at about 2850ml. well within safe capacity limits. |
14:40:40 | PMunch | Do I even want to know what's in the bottle? |
14:41:16 | disruptek | you'd be pissed. |
14:42:11 | FromDiscord | <ThothLoki> "pissed" |
14:44:54 | FromDiscord | <tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2C6Q |
14:47:05 | FromDiscord | <ThothLoki> well, it looks like it actually parsed the url |
14:48:14 | FromDiscord | <tinygiant> There's something wonky about the `path` variable in the first example. the `url.path` is showing the entire url in quotation marks, where the second example does not have quotation marks around the values. |
14:48:44 | FromDiscord | <ThothLoki> i wonder if it is taking the `path` as a string literal and not seeing it as a url |
14:49:11 | disruptek | of course. |
14:49:23 | disruptek | don't $ your json string, getStr it. |
14:49:38 | FromDiscord | <tinygiant> Will do, thanks. |
14:49:52 | disruptek | you're not trying to /render it as json/, you're trying to /get the string value of it/ |
14:50:17 | disruptek | !repo jsonconvert |
14:50:18 | disbot | https://github.com/disruptek/jsonconvert -- 9jsonconvert: 11lazy json node conversion 15 2โญ 0๐ด |
14:50:22 | disruptek | don't use it, but learn from it. |
14:50:23 | FromDiscord | <tinygiant> Worked! Shoving a tiny bit of wisdom into my cranium every day. Thanks. |
14:51:46 | FromDiscord | <tinygiant> Nice. Thanks, standard nim documentation doesn't necessarily show the difference bewteen the $ and getStr methods. Good to learn. |
14:52:19 | disruptek | there's getBool, getInt, getFloat, etc. |
14:53:03 | FromDiscord | <tinygiant> Yep. It makes way more sense that way. `$` if you just want to see it, `get` if you actually want to use it for anything. |
14:54:29 | * | hnOsmium0001 joined #nim |
15:02:24 | disruptek | well, $ is for rendering, not converting per se. |
15:02:33 | disruptek | across all types, that is. |
15:02:46 | disruptek | you can use `string` for conversion. |
15:05:19 | FromDiscord | <tinygiant> Cool, thanks for the learning point. I'll have to go back through some of my "code" and change a few things. |
15:06:47 | disruptek | repr() is like an internal renderer impl for /everything/ -- it's useful, but generally the wrong tool for production. |
15:12:13 | * | solitudesf quit (Ping timeout: 264 seconds) |
15:12:26 | mipri | especially as its output varies by --gc |
15:12:56 | rockcavera | Is anyone else seeing the documentation all messed up? https://snipboard.io/uFjLq1.jpg |
15:13:40 | mipri | yes, that's fixed the devel |
15:15:45 | * | nclark joined #nim |
15:28:51 | ForumUpdaterBot | New thread by Xigoi: Square brackets for generics, see https://forum.nim-lang.org/t/6988 |
15:30:05 | * | waleee-cl joined #nim |
15:34:39 | * | luis_ joined #nim |
15:34:40 | * | solitudesf joined #nim |
15:35:03 | * | leorize quit (Ping timeout: 240 seconds) |
15:35:27 | * | solitudesf quit (Remote host closed the connection) |
15:37:29 | * | leorize joined #nim |
15:43:51 | luis_ | hi all, are there any modules to quickly create tempfiles, similar to mktemp? |
15:46:22 | luis_ | just found: https://github.com/OpenSystemsLab/tempfile.nim |
15:46:34 | luis_ | sorry for not googling hard enough |
15:46:41 | luis_ | ๐๏ธ |
15:50:47 | disruptek | i only found one fingerless glove. |
15:51:00 | * | unihernandez22 joined #nim |
15:51:06 | disruptek | it's incredible how lucky i am. |
15:51:09 | supakeen | Good, now throw it away. |
15:52:15 | * | solitudesf joined #nim |
15:54:20 | * | unihernandez22 quit (Client Quit) |
16:00:11 | * | VijayMarupudi[m] quit (Quit: Idle for 30+ days) |
16:03:23 | disruptek | wut |
16:03:36 | disruptek | these gloves were handmade for me. |
16:03:45 | supakeen | Too bad. |
16:03:45 | disruptek | no fucking way am i letting them go, ever. |
16:03:48 | supakeen | It's a crime. |
16:04:00 | disruptek | then call me a criminal. |
16:06:00 | disruptek | i do wish they were in a darker color, though. |
16:06:25 | disruptek | i don't mind being homeless, but i don't like /looking/ like i'm homeless. |
16:07:04 | disruptek | i mean, it's not shame, really. it's just that once you've been hit in the eye with a quarter, you stop wishing people would throw change at you. |
16:08:49 | * | nclark quit (Quit: My MacBook has gone to sleep. ZZZzzzโฆ) |
16:09:55 | * | nclark joined #nim |
16:16:45 | * | nclark quit (Quit: My MacBook has gone to sleep. ZZZzzzโฆ) |
16:18:53 | * | nclark joined #nim |
16:30:01 | * | nclark quit (Quit: Textual IRC Client: www.textualapp.com) |
16:33:02 | * | narimiran quit (Ping timeout: 260 seconds) |
16:35:01 | * | solitudesf quit (Remote host closed the connection) |
16:35:07 | * | luis_ quit (Quit: luis_) |
16:35:18 | * | solitudesf joined #nim |
16:41:03 | * | luis_ joined #nim |
16:43:03 | FromDiscord | <Recruit_main707> when printing the ast of a type section, it does this:โต`type`โต` BoostPadState = object of FlatObj`โตcan you avoid it so that it doesnt write it in a separate line? |
16:43:38 | FromDiscord | <Yardanico> replace it yourself :P |
16:43:50 | FromDiscord | <Yardanico> but really I don't see much use for it except for some hacks |
16:44:25 | FromDiscord | <Recruit_main707> its just that i prefer it the other way, nothing very important |
16:45:42 | FromDiscord | <alehander42> @BAsedCeo you need help, mate |
16:46:10 | * | tane joined #nim |
16:53:25 | * | BarrOff quit (Ping timeout: 240 seconds) |
17:03:35 | * | natrys joined #nim |
17:07:20 | * | narimiran joined #nim |
17:16:46 | * | NimBot joined #nim |
17:25:23 | FromDiscord | <MiniApple> how to make local function in nim |
17:30:01 | * | luis_ quit (Quit: luis_) |
17:30:34 | * | luis_ joined #nim |
17:31:13 | FromDiscord | <Yardanico> @MiniApple if you mean "how to make a procedure inside of other procedure" - just do it |
17:31:14 | FromDiscord | <Yardanico> it'll just work (TM) |
17:31:23 | FromDiscord | <Yardanico> syntax is the same |
17:34:20 | FromDiscord | <MiniApple> Ok |
17:34:25 | FromDiscord | <MiniApple> I see |
17:34:41 | FromDiscord | <brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=2C7M |
17:34:46 | FromDiscord | <alehander42> https://github.com/Yardanico/ircord/#ircord---discord---irc-bridge-written-in-nim PMunch you can ban ppl from irc |
17:35:33 | FromDiscord | <alehander42> (i can't seem to see your discord account, so assume you are only in irc ) |
17:35:57 | FromDiscord | <Avatarfighter> yo yo what is up everyone |
17:40:48 | FromDiscord | <nikki> just hangin' wbu |
17:41:26 | FromDiscord | <Avatarfighter> well not much tbh im bored so im making a program to eat all my pcs memory |
17:41:45 | FromDiscord | <nikki> doesn't that already exist and is called google chrome xD |
17:41:45 | FromDiscord | <Rika> Are you also using your pc as a space heater |
17:42:30 | FromDiscord | <nikki> i just got past the interop chapter in dom's nim book and only the metaprogramming one is left so i'm excited |
17:42:53 | Zevv | I sometimes boot my laptop into memtest86+ when waiting for a train at winter time |
17:49:55 | * | luis_ quit (Quit: luis_) |
17:53:57 | FromDiscord | <Avatarfighter> @Rika funny enough i actually am lmao |
18:12:09 | * | arecacea1 quit (Remote host closed the connection) |
18:12:32 | * | arecacea1 joined #nim |
18:13:03 | * | solitudesf quit (Remote host closed the connection) |
18:14:34 | * | solitudesf joined #nim |
18:16:26 | FromDiscord | <alehander42> heyy |
18:19:40 | * | BarrOff joined #nim |
18:22:44 | * | vicfred joined #nim |
18:22:56 | FromDiscord | <krisppurg> In https://play.nim-lang.org/#ix=2C7X, whenever you either write with `addr`ing a string how come it segfaults what is the solution to this problem? |
18:24:09 | Zevv | addr tmp[0] |
18:26:05 | * | TomDotTom quit (Ping timeout: 240 seconds) |
18:26:45 | FromDiscord | <krisppurg> done that |
18:26:49 | FromDiscord | <krisppurg> index out of bounds |
18:26:55 | FromDiscord | <krisppurg> @Zevv |
18:26:58 | Zevv | http://zevv.nl/nim-memory/#_strings_and_seqs |
18:27:09 | Zevv | your string data does not live at s.addr but at s[0].addr |
18:28:00 | FromDiscord | <krisppurg> ? |
18:28:32 | FromDiscord | <Yardanico> Nim strings aren't just "array of chars" |
18:28:42 | FromDiscord | <Yardanico> They have size and capacity fields just like seqs |
18:28:51 | FromDiscord | <krisppurg> right |
18:28:58 | Zevv | But what are you trying to do here, you're bigEndian64-ing a string |
18:29:05 | FromDiscord | <krisppurg> oh oops |
18:29:06 | Zevv | but you're not checking if the string is 8 bytes long |
18:29:10 | Zevv | how is that supposed to work? |
18:29:21 | FromDiscord | <krisppurg> made a mistake there |
18:29:56 | Zevv | shit happens, right |
18:30:28 | FromDiscord | <krisppurg> yup |
18:31:41 | FromDiscord | <alehander42> guys |
18:34:41 | Zevv | zup |
18:42:13 | FromDiscord | <alehander42> whats up |
18:51:02 | * | Jesin quit (Quit: Leaving) |
19:00:29 | * | mbomba joined #nim |
19:02:07 | FromDiscord | <Idefau> my cpu temperature |
19:02:30 | * | Jesin joined #nim |
19:02:35 | FromDiscord | <ache of head> F |
19:03:19 | planetis[m] | Could some admin add hacktoberfest topic to fusion, plz? |
19:12:13 | * | apahl quit (Ping timeout: 272 seconds) |
19:12:38 | * | apahl joined #nim |
19:21:43 | Araq | planetis[m], ping Miran tomorrow please |
19:28:06 | FromDiscord | <Recruit_main707> so, i was using MTuner to check if there were any leaks in my regions vs none vs arc tests, but they all seemed to have the same number of allocations and deallocations, even none, why? |
19:28:29 | disruptek | nothing is being deallocated? |
19:28:58 | FromDiscord | <alehander42> why |
19:29:05 | FromDiscord | <alehander42> not ellectoral college for GC |
19:29:38 | disruptek | because then the republicans would corrupt memory. |
19:30:13 | FromDiscord | <alehander42> but democrats are already mismanaging it and leaking it |
19:30:24 | FromDiscord | <alehander42> vote libertarian, vote for no allocator |
19:30:32 | FromDiscord | <Recruit_main707> ^ |
19:30:36 | disruptek | so what? i would rather suffer a little leakage than corruption. |
19:30:52 | disruptek | corruption means that no one can agree on the state. |
19:31:05 | FromDiscord | <Recruit_main707> but seriously though, why would arc and none have the same number of allocations and deallocations |
19:31:17 | disruptek | maybe they are the same. |
19:32:10 | * | TomDotTom joined #nim |
19:32:40 | FromDiscord | <alehander42> corruption is rampant sadly |
19:33:06 | FromDiscord | <alehander42> time for bath |
19:35:42 | FromDiscord | <nikki> @Recruit_main707 it might be only allocs for the underlying allocator itself, the nim allocator may just get slabs of mem from the os allocator and free them at end |
19:36:09 | FromDiscord | <krisppurg> bruh alehander I'm going to have a bath in like 10mins |
19:36:13 | FromDiscord | <nikki> if that's the case, your tool would be unaware of the allocation model nim has on top of that base memory |
19:36:14 | FromDiscord | <krisppurg> anyways |
19:36:31 | FromDiscord | <krisppurg> How would I send a udp packet to the udp socket? |
19:38:04 | FromDiscord | <krisppurg> I've used `ws` newWebsocket and I awaited for it which is connecting to the socket, and I got no response at all, in Discord API I was told that UDP and websocket are different so I thought you don't need to use `ws` hence ^^^^ |
19:40:02 | blackbeard420 | when using async httpclient, and running with valgrind i get a bunch of "Conditional jump or move depends on uninitialised value(s)". the test program does nothing more then call newAsyncHttpClient() and then client.getContent(). is this normal? |
19:43:45 | FromDiscord | <Avatarfighter> @krisppurg UDP is a connectionless protocol that allows you to send off packets, the docs give an example here: https://nim-lang.org/docs/net.html#examples-connecting-to-a-server |
19:44:07 | FromDiscord | <krisppurg> thank you |
19:45:31 | FromDiscord | <Avatarfighter> I explained what UDP is really badly but wikipedia explains it in greater detail! https://en.wikipedia.org/wiki/User_Datagram_Protocol |
19:48:14 | * | mmohammadi9812 quit (Read error: Connection reset by peer) |
19:48:50 | * | mmohammadi9812 joined #nim |
19:52:57 | * | luis_ joined #nim |
20:10:29 | * | luis_ quit (Ping timeout: 272 seconds) |
20:10:55 | * | narimiran quit (Ping timeout: 246 seconds) |
20:12:29 | FromDiscord | <Recruit_main707> @nikki i think you are right, useMalloc shows some more realistic results |
20:12:34 | * | TomDotTom quit (Quit: Leaving) |
20:12:49 | * | TomDotTom joined #nim |
20:22:22 | * | lritter quit (Quit: Leaving) |
20:27:43 | * | natrys quit (Ping timeout: 246 seconds) |
20:28:11 | * | natrys joined #nim |
20:28:19 | * | luis_ joined #nim |
20:32:15 | * | mbomba quit (Quit: WeeChat 2.9) |
20:40:38 | * | luis_ quit (Quit: luis_) |
20:40:41 | * | luis_ joined #nim |
20:43:51 | * | Kaivo quit (Ping timeout: 260 seconds) |
20:45:08 | * | krux02 quit (*.net *.split) |
20:45:08 | * | lum[m] quit (*.net *.split) |
20:45:08 | * | reversem3 quit (*.net *.split) |
20:45:08 | * | lnxw37d4 quit (*.net *.split) |
20:45:08 | * | skelett quit (*.net *.split) |
20:45:08 | * | euantorano quit (*.net *.split) |
20:45:08 | * | blackbeard420 quit (*.net *.split) |
20:45:21 | * | euantorano joined #nim |
20:45:30 | * | blackbeard420 joined #nim |
20:45:34 | * | skelett joined #nim |
20:45:36 | * | krux02 joined #nim |
20:46:34 | * | Kaivo joined #nim |
20:50:57 | * | lum[m] joined #nim |
20:52:20 | * | reversem3 joined #nim |
20:52:42 | * | lnxw37d4 joined #nim |
20:53:50 | * | luis_ quit (Quit: luis_) |
21:01:25 | * | kinkinkijkin joined #nim |
21:01:44 | * | kinkinkijkin quit (Client Quit) |
21:02:04 | * | kinkinkijkin joined #nim |
21:05:51 | * | shu65 joined #nim |
21:08:46 | * | shu65 quit (Remote host closed the connection) |
21:09:12 | * | kinkinkijkin quit (Ping timeout: 260 seconds) |
21:11:36 | * | arecacea1 quit (Remote host closed the connection) |
21:12:17 | * | arecacea1 joined #nim |
21:13:17 | * | kinkinkijkin joined #nim |
21:15:30 | FromDiscord | <dom96> blackbeard420: valgrind gets confused by Nim's default allocator |
21:16:25 | FromDiscord | <nikki> is there a standard allocation benchmark with minimal dependencies to try out? to decide whether to use `useMalloc` or not in the context i'm running in (emscripten) |
21:16:56 | FromDiscord | <nikki> maybe i can just copy thavlak from nim's repo into my code |
21:26:47 | FromDiscord | <nikki> yeah that worked. nice |
21:29:11 | * | solitudesf- joined #nim |
21:31:46 | * | solitudesf quit (Ping timeout: 256 seconds) |
21:32:29 | * | natrys quit (Quit: natrys) |
21:35:35 | * | luis_ joined #nim |
21:41:13 | * | luis_ quit (Quit: luis_) |
21:44:34 | FromDiscord | <mratsim> for allocation you have to use your own app for benching |
21:45:47 | * | BarrOff quit (Ping timeout: 258 seconds) |
21:45:48 | FromDiscord | <mratsim> The profile between a tree algorithm that is destroyed/created often, string processing, a parser, matrices in sequences is completely different and depends on your application |
21:46:20 | FromDiscord | <mratsim> It also depends on the default malloc implementation on your system |
21:56:40 | FromDiscord | <tinygiant> Anyone have any advice on building a form-based/console application with a nim backend? Possible? Too difficult? Stupid idea? VS .net + nim? Just do it in c#, you idiot? I don't really have direction yet, just random thoughts for an upcoming project and wanted to see what the more experienced guys thought. |
21:58:17 | FromDiscord | <ElegantBeef> Are you asking about a GUI library similar to WPF? |
22:00:51 | FromGitter | <awr1> @tinygiant Nim has multiple interesting UI solutions. It depends on what you want. |
22:01:04 | FromGitter | <awr1> the community has not really centralized around any one of them though |
22:01:24 | FromGitter | <awr1> Personally I am partial to the imgui-based approach. |
22:01:33 | FromDiscord | <ElegantBeef> I'm partial to Fidget |
22:01:51 | FromGitter | <awr1> https://github.com/johnnovak/illwill Might be of use if you want to do terminal UI |
22:02:17 | FromDiscord | <Avatarfighter> fidget has my heart |
22:02:44 | FromDiscord | <Avatarfighter> !repo fidget |
22:02:45 | disbot | https://github.com/treeform/fidget -- 9fidget: 11Figma based UI library for nim, with HTML and OpenGL backends. 15 318โญ 12๐ด 7& 1 more... |
22:03:58 | * | solitudesf- quit (Ping timeout: 246 seconds) |
22:07:27 | FromDiscord | <tinygiant> Primarily looking for a forms bad interface that would allow users to open json/table (2d array) files into tree-view like controls and modify values across multiple files. I'll take a look at those ui suggestions. Thanks! |
22:08:01 | FromDiscord | <tinygiant> (edit) "bad" => "based" |
22:08:15 | FromDiscord | <Avatarfighter> @tinygiant you might like this library then https://github.com/trustable-code/NiGui |
22:08:59 | FromDiscord | <Avatarfighter> I would check out nimble's website and just look at whichever you like the most https://nimble.directory/search?query=gui |
22:09:45 | FromDiscord | <tinygiant> Thanks, didn't even know you could search nimble by category. |
22:10:07 | FromDiscord | <Avatarfighter> That search is just for everything with "gui" in the name and description I believe |
22:10:12 | FromDiscord | <Avatarfighter> I wish you could do category though! |
22:10:51 | FromDiscord | <scott> what's going on here? https://play.nim-lang.org/#ix=2C90 |
22:11:43 | FromDiscord | <Avatarfighter> that's a great question because that error only occurs when the regex is in a const |
22:11:45 | FromDiscord | <Avatarfighter> wtf |
22:11:57 | leorize[m]1 | you can't store the regex in a const |
22:11:58 | FromDiscord | <scott> woah, weird |
22:12:04 | leorize[m]1 | Nim's `re` uses libpcre |
22:12:07 | FromDiscord | <Avatarfighter> ah |
22:12:12 | FromDiscord | <scott> oh ok that makes sense |
22:12:15 | FromDiscord | <Avatarfighter> leorize to the rescue ๐ |
22:12:25 | disruptek | use nre if you must re. |
22:12:29 | disruptek | from stdlib. |
22:12:37 | leorize[m]1 | there's nim-regex if you're into compile-time regexes |
22:12:41 | disruptek | ideally, use the native nim impl outside of stdlib. |
22:13:03 | disruptek | better than ideal is to not use regular expressions at all. |
22:13:06 | leorize[m]1 | though at that point you can also use npeg :P |
22:13:14 | disruptek | great minds. |
22:13:53 | * | tane quit (Quit: Leaving) |
22:19:09 | FromDiscord | <tinygiant> @ElegantBeef can you point me at wpf? |
22:19:34 | FromDiscord | <ElegantBeef> I was talking about windows presentation form, the C# API for windows applications |
22:30:09 | Zevv | PMunch: talking bout npeg: did it all work out for you? |
22:30:35 | * | abm quit (Quit: Leaving) |
22:30:54 | * | abm joined #nim |
22:37:01 | FromDiscord | <tinygiant> @ElegantBeef Ok, thanks. Yeah, looking for something similar as far as presentation, but wanted to keep going in nim, if that was possible. fidget sounds promising. Still need to look at the other options. |
22:51:18 | FromDiscord | <Gyllou> @mratsim hiya! |
22:51:45 | FromDiscord | <Gyllou> oh sad face, been trying to catch you to ask you some things about arraymancer |
23:04:16 | * | arecacea1 quit (Quit: WeeChat 2.0.1) |
23:15:40 | * | mbomba joined #nim |
23:52:49 | * | jxy quit (Ping timeout: 246 seconds) |