00:00:29 | * | NimBot joined #nim |
00:01:12 | * | junland joined #nim |
00:01:35 | * | zedeus joined #nim |
00:11:32 | * | NimBot joined #nim |
00:19:44 | Avatarfighter | What is up party people :D |
00:20:21 | * | fredrikhr joined #nim |
00:21:54 | FromDiscord | <Elegant Beef> Also leorize i dont know if you seen me ask about if you used picom with rounded edges when you had the xorg leak |
00:22:16 | FromDiscord | <Elegant Beef> (edit) 'edges' => 'corners' |
00:22:44 | * | NimBot joined #nim |
00:23:37 | * | abm quit (Quit: Leaving) |
00:25:01 | * | bung joined #nim |
00:30:03 | * | NimBot joined #nim |
00:43:44 | * | NimBot joined #nim |
00:46:15 | disruptek | and iirc, koa is pretty decent. |
00:50:07 | * | zacharycarter quit (Ping timeout: 260 seconds) |
00:54:30 | * | NimBot joined #nim |
00:57:49 | voltist | Is it OK to use creative common images in a GNU GPL project? |
00:58:08 | voltist | creative commons* |
01:02:39 | * | theelous3 quit (Read error: Connection reset by peer) |
01:05:39 | * | NimBot joined #nim |
01:07:11 | FromDiscord | <19> hello, has anyone ran into this issue while running `nimble install nimlsp`↵https://ibb.co/X5WTcTY |
01:07:35 | Yardanico | that's some issue with your C compiler |
01:07:45 | Yardanico | I don't think it's related to nimlsp |
01:07:56 | FromDiscord | <19> my C:\MinGW |
01:07:57 | FromDiscord | <19> ? |
01:07:59 | Yardanico | libmpfr-6 is required by GCC |
01:08:08 | Yardanico | yes, mingw (mingw is gcc for windows) |
01:08:12 | * | chemist69 quit (Ping timeout: 246 seconds) |
01:08:31 | FromDiscord | <19> any idea how i can fix it? |
01:08:39 | Yardanico | how did you install mingw? from where? |
01:09:38 | FromDiscord | <19> from sourceforge |
01:09:45 | Yardanico | uhh |
01:10:22 | * | chemist69 joined #nim |
01:10:47 | Yardanico | well honestly I can't help a lot, but either use mingw shipped with choosenim or mingw-w64 from sourceforge :) |
01:11:02 | leorize[m] | @Beef I use regular picom |
01:11:27 | FromDiscord | <19> it's okay, how can i detect which mingw it is using |
01:11:39 | FromDiscord | <19> (edit) 'it' => 'nim' |
01:11:45 | Yardanico | it's using whatever "gcc" you have in $PATH |
01:15:07 | voltist | Anybody know whats up with the nimble error ` Invalid section: .`? |
01:15:19 | voltist | I'm using the example from the nimble README |
01:15:27 | voltist | But with my own values pasted in |
01:15:37 | Yardanico | what's your nim version? |
01:15:49 | voltist | 1.2.0 |
01:15:49 | Yardanico | hm |
01:16:12 | Yardanico | that error shouldn't happen on 1.2.0 really |
01:16:22 | Yardanico | can you show your example btw? |
01:16:45 | * | NimBot joined #nim |
01:16:50 | FromDiscord | <Elegant Beef> Ah i updated to the rounded corners version and started getting system lock ups and high memory usage |
01:16:51 | FromDiscord | <Elegant Beef> So weird |
01:16:53 | voltist | Oh could it be because I haven't actually made the version tag yet? |
01:17:07 | Yardanico | voltist: oh yeah it's invalid |
01:17:25 | voltist | Ok I'll fix that now |
01:17:27 | Yardanico | there's no "name" variable in nimble |
01:17:32 | Yardanico | also it tells you that in the error |
01:17:35 | Yardanico | "/home/dian/Stuff/inumon/inumon_9049.nims(7, 1) Error: undeclared identifier: 'name'" |
01:17:54 | voltist | Oh whoops |
01:18:16 | Yardanico | also with GPLv3 you're forcing everyone to keep their code open source and compatible with GPL :P but again, it's your own choice of course |
01:18:35 | FromDiscord | <Elegant Beef> Permissive licensing! 😛 |
01:19:22 | voltist | "you're forcing everyone to keep their code open source and compatible with GPL" yeah thats the point :P |
01:19:32 | Yardanico | and that's why I would never use it :P |
01:20:01 | Yardanico | but really, I don't understand the point of GPLv3 for libraries like that |
01:20:07 | Yardanico | I understand GPLv3 for big libraries/projects |
01:20:58 | FromDiscord | <Elegant Beef> I see GPLv3 most important for things like games that decided to open source or completed software tools made by big companies |
01:21:17 | FromDiscord | <Elegant Beef> I get the free software reasoning, but it's a detractor from actual use |
01:21:49 | FromDiscord | <Elegant Beef> I personally dislike non permissive licenses since they're intrinsictly not free |
01:21:53 | voltist | If there was a license that allowed users to use a different license of their choice as long as it was open source, I would use it |
01:22:05 | Yardanico | voltist: there's MPL |
01:22:20 | Yardanico | which allows people to use your code in proprietary apps but they still have to contribute changes (if they made any) |
01:22:24 | Yardanico | Mozilla Public License |
01:22:28 | Yardanico | changes to the code of the library itself |
01:22:44 | FromDiscord | <Elegant Beef> Thing gplv2 is like that no? |
01:22:46 | Yardanico | no |
01:22:54 | Yardanico | libraries as in source-code too |
01:22:59 | Yardanico | not just linking (that's lgpl) |
01:23:05 | FromDiscord | <Elegant Beef> ah |
01:23:08 | FromDiscord | <Elegant Beef> That's it |
01:23:13 | Yardanico | MPL is a middle ground between MIT/Apache/BSD-2 and GPL |
01:23:35 | Yardanico | https://www.mozilla.org/en-US/MPL/2.0/FAQ/ |
01:24:06 | FromDiscord | <exelotl> If I wanted to make share my textadept configuration on github, but one of the modules is GPL, what does that mean for me? |
01:24:29 | shashlick | @leorize not sure what you mean, can you explain |
01:24:44 | FromDiscord | <Elegant Beef> Well you can license as MIT as long as you dont include the dependancy directly AFAIK |
01:25:32 | voltist | Is a non-NIT license a turn off for many people when it comes to libraries? |
01:25:35 | voltist | MIT* |
01:25:42 | Yardanico | something like GPLv3 - yes |
01:25:56 | FromDiscord | <Elegant Beef> i dont believe `nimble build` counts as distrobution and the user should look at the source of each dep |
01:25:56 | FromDiscord | <Rika> not-MIT or apache |
01:25:56 | Yardanico | even LGPLv3 |
01:26:03 | Yardanico | because when you compile it in one binary LGPL and GPL are the same |
01:26:20 | FromDiscord | <exelotl> The problem is this module only exists in a larger package which is all under GPL, but I just want to copy-paste the one module into my repo |
01:26:32 | FromDiscord | <Elegant Beef> Well then you have to abide by that license |
01:26:37 | FromDiscord | <Rika> then it still has to be GPL |
01:26:44 | Yardanico | LGPL only matters if you create a shared library or a separate object file |
01:26:44 | FromDiscord | <exelotl> That's bullshit lol |
01:26:52 | FromDiscord | <Elegant Beef> I mean that's how licensing works |
01:27:06 | Yardanico | well I don't think your repo has to be gpl, no |
01:27:30 | * | NimBot joined #nim |
01:27:32 | FromDiscord | <Elegant Beef> The entire repo doesnt as you say |
01:27:35 | FromDiscord | <Rika> *unless you use that module in other modules |
01:27:35 | FromDiscord | <exelotl> Right, I can live with that |
01:27:43 | FromDiscord | <Rika> GPL is a viral license |
01:27:52 | FromDiscord | <Elegant Beef> And this is the fucking issue with non permissive licensing |
01:28:07 | FromDiscord | <Elegant Beef> You want to include it but you have to walk around its licenses |
01:28:32 | FromDiscord | <Rika> ~~you can get away with it if the repos are small enough~~ |
01:28:36 | FromDiscord | <Elegant Beef> Lol |
01:29:33 | Yardanico | i mean some people use GPLv3 just because a friend or someone else told them that "it's a cool open source license" |
01:29:37 | FromDiscord | <exelotl> Wait so, if my main config file says `require "somegplmodule"` does the whole repo then have to be GPL? |
01:29:41 | Yardanico | others use it because of their beliefs (which is no wrong) |
01:29:51 | FromDiscord | <Rika> afaik yes |
01:29:57 | FromDiscord | <Rika> not sure on requires |
01:30:10 | Yardanico | @exelotl it doesn't have to be GPL |
01:30:14 | Yardanico | but it has to be GPL-compatible :P |
01:30:28 | Yardanico | IANAL anyway |
01:30:29 | FromDiscord | <Elegant Beef> Really even if you dont distribute |
01:30:39 | voltist | Hmm this is legit hard choice. I want people to use my work, and then maybe contribute to it and increase the shared benefits; but I also don't want to endorse/support closed-source, however drop-in-the-oceany it might be |
01:31:04 | FromDiscord | <Elegant Beef> I mean if you're for free software that should be free for anyone that wants it imo, minus the CCP 😛 |
01:31:17 | Yardanico | voltist: did you check the MPL FAQ? |
01:31:45 | Yardanico | it's exactly for people who want contributions but don't want to limit the freedom too much |
01:32:45 | voltist | Hmmm not *exactly* what I want |
01:32:51 | voltist | But close enough |
01:32:59 | Yardanico | i mean if you really don't want people to use your lib in closed-source, use GPL |
01:33:06 | Yardanico | it's well-known and stuff |
01:34:53 | FromDiscord | <Rika> hm, ill ask the original creator of slider if i can retroactively change circa to use MPL |
01:35:47 | voltist | I want it to be used only in open source, but I don't want the people who do use it in open-source to be restricted to any one restrictive license |
01:35:50 | voltist | Idk if that makes sense |
01:36:00 | voltist | Looks like MPL is the closest I will get for now |
01:36:10 | FromDiscord | <Yardanico> Well they can still use MIT for their code |
01:36:17 | FromDiscord | <Yardanico> Since MIT is GPL compatible |
01:36:31 | FromDiscord | <Yardanico> The thing is that it has to be open source |
01:36:46 | FromDiscord | <Yardanico> With any GPL compatible license |
01:36:56 | voltist | "MIT is GPL compatible" in which direction? |
01:37:47 | FromDiscord | <Yardanico> "MIT licensed software can be re-licensed as GPL software, and integrated with other GPL software, but not the other way around." |
01:38:55 | voltist | Oh right yeah |
01:39:20 | * | NimBot joined #nim |
01:39:42 | FromDiscord | <Yardanico> "Many of the most common free software licenses, such as the original MIT/X license, ... are "GPL-compatible". That is, their code can be combined with a program under the GPL without conflict (the new combination would have the GPL applied to the whole)." |
01:40:10 | FromDiscord | <Yardanico> So the app can be MIT but the whole package of the app + library is still GPL |
01:42:27 | * | Jjp137_ joined #nim |
01:42:42 | * | Jjp137 quit (Read error: Connection reset by peer) |
01:43:50 | voltist | I think I'll use MPL |
01:49:38 | FromDiscord | <19> seems like i have a problem 😆 ↵https://ibb.co/0DYmtSb |
01:51:30 | FromDiscord | <Cut a weeb and a pedo bleeds> Hi, are there `[]` iterators in system.nim? |
01:51:57 | * | NimBot joined #nim |
01:52:34 | FromDiscord | <Cut a weeb and a pedo bleeds> In other words, does `for it in someSeq[1..^1]` allocate a new seq? |
01:54:18 | FromDiscord | <Technisha Circuit> How would i wrap https://github.com/hjson/hjson-cpp for use in the C backend? |
01:54:20 | Prestige | Anyone familiar with the deprecated pragma syntax {.deprecated: [FooOld: FooNew].}? Someone is suggesting it for a PR but I'm getting linting errors. Also haven't seen any docs on it |
01:54:45 | FromDiscord | <Technisha Circuit> Sorry, no idea |
01:55:15 | FromDiscord | <Rika> Technisha it needs a c wrapper first AFAIK? |
01:55:47 | FromDiscord | <Rika> Prestige I don't think that exists yet |
01:56:06 | FromDiscord | <Rika> @Cut a weeb and a pedo bleeds it does AFAIK |
01:56:14 | FromDiscord | <Rika> [] is a proc |
01:56:36 | Prestige | @Rika Hm well that's interesting. Here's the PR if you want to see the discussion.. https://github.com/nim-lang/x11/pull/33 |
01:56:37 | disbot | ➥ Removed `T` prefix for types. |
01:56:45 | Prestige | Idk who timotheecour is on irc/discord |
01:56:47 | voltist | @Technisha Circuit Currently the wrapping of c++ libraries is very limited |
01:57:49 | FromDiscord | <Technisha Circuit> > Technisha it needs a c wrapper first AFAIK?↵It doesn't have a C wrapper really, just something similar which isn't as good at the hjson module/packages |
01:57:52 | FromDiscord | <Technisha Circuit> (edit) 'module/packages' => 'module/package' |
01:57:58 | FromDiscord | <Rika> Prestige, that's his name on irc AFAIK |
01:58:16 | voltist | Does the nimble `publish` command work well? Fork, clone, modify, add, commit, push and make a pull request seems like a lot of steps that could go wrong when automated |
01:58:21 | Prestige | ah, haven't seen him talk here I guess |
01:58:35 | FromDiscord | <Technisha Circuit> > @Technisha Circuit Circuit Currently the wrapping of c++ libraries is very limited↵How limited? |
01:59:38 | voltist | @Technisha Circuit I hope shashlick wouldn't mind me saying that their Nimterop is currently the state of the art when it comes to wrapping things in Nim |
01:59:48 | voltist | But it doesn't support c++ yet |
02:00:04 | voltist | So you will have to use c2nim, which has limitations |
02:00:17 | FromDiscord | <Technisha Circuit> Oh okay |
02:02:28 | voltist | You could make a poor-man's 'wrapper' and impliment various useful functions in c++, then call them from Nim |
02:02:49 | * | NimBot joined #nim |
02:03:25 | FromDiscord | <Technisha Circuit> How would i do that voltist? |
02:03:30 | FromDiscord | <Technisha Circuit> Using importcpp? |
02:03:39 | FromDiscord | <Technisha Circuit> How does it work? :P |
02:03:45 | voltist | Yep https://nim-lang.org/docs/backends.html |
02:04:00 | Prestige | I thought that was about deprecatedAlias |
02:04:19 | Prestige | no idea why he would tell me to use the syntax if it wasn't currently a part of nim, though |
02:05:56 | voltist | @Technisha Circuit Ping me if you need any help with that |
02:06:15 | FromDiscord | <Technisha Circuit> Thanks! |
02:11:46 | leorize[m] | voltist: GPL3 is much stricter about the "not let people use your code in closed source software" part |
02:12:37 | voltist | I am aware, but I'd like people to be able to use whatever license they would like as long as it is open source. There isn |
02:12:53 | voltist | 't a license that does that yet, so MPL is close enough for now |
02:13:16 | * | NimBot joined #nim |
02:13:17 | voltist | I thought it does? |
02:13:36 | leorize[m] | nope |
02:13:54 | FromGitter | <tulayang> Hello, please can someone tell me how to determine whether the function imported by ffi exists? Like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5edc4d603ffa6106f1fca72d] |
02:14:34 | leorize[m] | you can't other than just knowing that the underlying OS supports it |
02:14:46 | leorize[m] | see posix.nim in `devel` for how accept4 is imported |
02:15:02 | voltist | leorize "if you release the modified version to the public in some way, the GPL requires you to make the modified source code available to the program's users, under the GPL." |
02:15:08 | leorize[m] | well actually you can but it's not really that nice... |
02:15:26 | leorize[m] | voltist: well the same applies to mpl |
02:15:31 | leorize[m] | it's how copyleft work |
02:15:45 | leorize[m] | and actually it doesn't have to be under gpl |
02:15:52 | leorize[m] | it can be anything that's gpl-compatible |
02:15:57 | voltist | Only if it is modified |
02:16:07 | leorize[m] | see how many of the linux kernel modules are actually MIT |
02:16:36 | leorize[m] | voltist: wdym? |
02:17:32 | voltist | MPL only requires open publication of modified source |
02:18:28 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:18:37 | voltist | My understanding is that if I was to use a library licensed under MPL, I could use any compatible license on my project as long as I published any modifications to the library under MPL |
02:18:59 | leorize[m] | the same applies to gpl |
02:19:56 | leorize[m] | GPL applies to the concept of "Software", MPL applies to files |
02:20:03 | leorize[m] | that's the difference between them |
02:20:12 | voltist | I don't see how it allows you to use any license |
02:20:16 | voltist | Reading from here https://www.gnu.org/licenses/gpl-faq.html#GPLRequireSourcePostedPublic |
02:20:44 | * | muffindrake joined #nim |
02:21:16 | leorize[m] | that means if anyone modifies your library, they gotta release it to the public under gpl |
02:22:10 | leorize[m] | https://www.mozilla.org/en-US/MPL/2.0/FAQ/#distribute-binaries-from-modified-source |
02:22:40 | leorize[m] | ^ the same applies to MPL, if you modify the MPL code, you gotta release it as MPL-compatible |
02:22:42 | FromGitter | <tulayang> devel/posix.nim ? thanks, I got it. |
02:22:42 | * | FromDiscord quit (Remote host closed the connection) |
02:22:55 | * | FromDiscord joined #nim |
02:23:26 | voltist | leorize[m]: https://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL |
02:23:27 | * | FromDiscord quit (Remote host closed the connection) |
02:24:24 | voltist | Oh |
02:24:45 | voltist | I had no idea the list of GPL-compatible licenses is so huge |
02:25:54 | * | NimBot joined #nim |
02:26:00 | voltist | Maybe I will switch back to GPL |
02:26:58 | leorize[m] | just remember to pick the license wisely, once it goes open and people contributes to it, relicensing will be a pain |
02:27:05 | voltist | Better do that before I submit it to the nimble repository |
02:27:06 | voltist | Yeah |
02:27:25 | FromGitter | <tulayang> I see this code snippet in devel: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Is there any way to check if this function exists at runtime? [https://gitter.im/nim-lang/Nim?at=5edc508c225dc25f54cee594] |
02:27:55 | leorize[m] | well... no |
02:28:07 | leorize[m] | yet |
02:28:23 | leorize[m] | it's possible to make it auto-detect |
02:28:41 | FromGitter | <tulayang> This solution seems to check the version of the operating system. |
02:28:45 | leorize[m] | but it's kinda complicated so no one does that |
02:29:12 | leorize[m] | (in Nim, that is) |
02:33:21 | leorize[m] | if you want it to auto detect, then you can generate a C file at compile time importing and trying to use the function |
02:33:25 | leorize[m] | then try to compile it |
02:33:56 | voltist | leorize[m]: My concern is that the trend in Nim is to use non-restrictive licenses like MIT, so licensing under GPL might limit adoptability |
02:33:58 | leorize[m] | if it compiles without any errors then the function exists |
02:34:04 | voltist | The Nim community* |
02:34:33 | leorize[m] | voltist: it's to allow Nim to be adopted by companies and/or their employees |
02:34:52 | leorize[m] | corporate say no to any hint of GPL |
02:35:52 | voltist | Yeah that's why I was thinking MPL; it allows closed-source use as long as the source is not modified |
02:36:08 | voltist | Kind of a middle-ground that still encourages contribution |
02:37:24 | leorize[m] | there's still a loophole for closed-source modification :P |
02:37:40 | * | NimBot joined #nim |
02:37:43 | voltist | Especially for a library |
02:38:34 | voltist | I do not care a bit if someone just uses it because its convenient, but I do care if they are improving it and not sharing those improvements with the world |
02:38:46 | voltist | Well I do care for that first one |
02:38:58 | voltist | But not enough to outweigh the adoptability thing |
02:41:04 | voltist | Oh gee here I for my third relicensing in one day |
02:41:10 | voltist | here I go* |
02:43:55 | FromGitter | <tulayang> I see, thank you. By the way, I am just writing a network framework, and I hope to be as compatible as possible in the program, without considering the operating system version. For example, ``epoll_create1`` and ``epoll_create``; ``accept4`` and ``accept``; ``pipe``, ``pipe2`` and ``eventfd``. It would be nice if there could be a runtime check, just like the C language. ⏎ ⏎ ```code paste, see link``` |
02:43:55 | FromGitter | ... [https://gitter.im/nim-lang/Nim?at=5edc546b7f08394226cfc2de] |
02:48:04 | * | NimBot joined #nim |
02:48:48 | * | fredrikhr quit (Ping timeout: 260 seconds) |
02:56:29 | FromGitter | <gogolxdong> Do we have bigint implementation? |
02:56:55 | zedeus | https://github.com/status-im/nim-stint |
02:57:46 | FromGitter | <gogolxdong> Thanks ! |
03:00:14 | * | NimBot joined #nim |
03:11:57 | * | NimBot joined #nim |
03:24:26 | * | NimBot joined #nim |
03:25:54 | leorize[m] | @tulayang I'd advise that you write higher level abstractions for them |
03:26:46 | leorize[m] | also when you're writing a network library, it's crucial to detect the OS, since what the API do depends entirely on what's underneath |
03:36:03 | * | NimBot joined #nim |
03:46:53 | * | NimBot joined #nim |
03:58:40 | * | NimBot joined #nim |
03:58:50 | * | silvernode joined #nim |
04:01:59 | voltist | How would I go about casting a TaintedString into the equivalent of a char* ? |
04:03:03 | shashlick | cstring |
04:03:22 | shashlick | No need to cast |
04:03:50 | voltist | Ah actually nimterop has wrapped it to a `ptr cuchar` |
04:04:00 | voltist | So I presume I do need to cast it to that? |
04:05:02 | shashlick | Yep that's not char * |
04:05:43 | * | silvernode_ joined #nim |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:14 | * | silvernode quit (Ping timeout: 264 seconds) |
04:06:38 | * | supakeen joined #nim |
04:07:24 | voltist | shashlick: Hmm still not working. I'll put more details on the gitter since it's nimterop related |
04:09:03 | shashlick | Cool |
04:10:39 | * | NimBot joined #nim |
04:21:18 | * | NimBot joined #nim |
04:27:18 | silvernode_ | good morning |
04:27:36 | silvernode_ | one more night of work and then 3 days of Nim programming |
04:27:49 | Prestige | sup silvernode_ |
04:29:13 | silvernode_ | Working on this text adventure game. I was making a space game but got stuck and started another project in the meantime to hopefully learn other stuff to bring back to the space game. |
04:30:30 | silvernode_ | Elegant Beef made a nice menu system but I ended up not using it since I can't figure out how to use it properly. |
04:31:08 | silvernode_ | It's supposed to wait for input but does not do that in practice. |
04:31:45 | silvernode_ | So I am just going with a simple proc of my own |
04:33:54 | * | NimBot joined #nim |
04:34:17 | silvernode_ | but I am printing the index of an array and trying to figure out how to stop printing index 0. I don't want my menu to start at 0. |
04:36:41 | Prestige | I can help if u can show your code |
04:37:03 | silvernode_ | I think if I can set i to a range starting from 1 to infinity, that might work |
04:37:15 | silvernode_ | that way the menu starts at 1 when printed out. |
04:37:37 | silvernode_ | Let me paste it |
04:38:42 | silvernode_ | https://play.nim-lang.org/#ix=2ot1 |
04:41:09 | silvernode_ | I forgot to remove that i= |
04:41:29 | silvernode_ | I was trying stuff out |
04:42:04 | silvernode_ | I also forgot to import strformat |
04:42:34 | silvernode_ | https://play.nim-lang.org/#ix=2ot3 |
04:44:35 | Prestige | you could just add 1 to i? |
04:44:47 | Prestige | like when you're printing it out |
04:45:24 | silvernode_ | so echo fmt"{i+1}" |
04:45:56 | * | NimBot joined #nim |
04:46:31 | silvernode_ | I wouldn't have thought it would work out like that and still show the text that would have otherwise been at index 0 |
04:46:42 | silvernode_ | but it works! |
04:47:45 | Prestige | yep, cuz you're printing the current index + 1 |
04:49:04 | silvernode_ | yeah it makes sense but at the same time doesn't. I would expect index 0 not to show up while also hiding whatever text was there too. |
04:49:47 | silvernode_ | well....*sigh*, time to clock into work. have a good day/night |
04:49:51 | silvernode_ | thanks for the help |
04:54:01 | * | silvernode_ quit (Ping timeout: 246 seconds) |
04:58:23 | * | NimBot joined #nim |
05:05:20 | * | solitudesf- joined #nim |
05:06:21 | Zevv | wth is pmunch compiling?! |
05:07:19 | voltist | https://imgur.com/a/E3Z8n1c Deffo not the helix nebula. I think my JPEG reader needs some work |
05:09:50 | Prestige | Zevv: another reality |
05:10:24 | * | NimBot joined #nim |
05:19:39 | Zevv | How cool is that. Afraid one is enough for me |
05:20:50 | * | NimBot joined #nim |
05:28:54 | voltist | Ok here is a fun challenge: WTF has to go wrong for the image on the left to become the image on the right - https://i.imgur.com/uku77rv.jpg |
05:32:14 | * | NimBot joined #nim |
05:34:28 | Zevv | With coordinates going from -1.0 to +1.0 and wrapping occuring, the right seems to have been stransformed (x,y) -> (1.0/x,1.0/y) |
05:34:34 | Zevv | or similar |
05:34:41 | Zevv | does that make any sense at all? |
05:35:24 | Zevv | well, not quite now that I look at it. But there's something getting 1/-ed somewhere |
05:38:17 | voltist | Zevv: I have no idea how that would manifest through code that reshapes a flattened image into a (width,height,channels) one |
05:38:42 | Zevv | what is the code *supposed* to do then? |
05:42:14 | voltist | libjpeg outputs a flattened image (<row1col1channel1>, <row1col1channel2>,<row1col1channel3>,<row1col2channel1>,...) and I'm turning that into a tensor of shape [height, width, channels] |
05:44:05 | voltist | Zevv: code looks like this https://gist.github.com/dizzyliam/c7c795289c4c2bc3be346f0a055f90c5 |
05:44:58 | * | NimBot joined #nim |
05:48:26 | voltist | Zevv: It's possible that I'm misunderstanding how libjpeg outputs data, but I'd like to rule out a shoddy algorithm first |
05:58:29 | * | NimBot joined #nim |
05:59:45 | Zevv | and it might be that you need a stride (line width) which is not necessarily the same as image width, but that depends on your decoder lib |
06:15:34 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:16:42 | Zevv | voltist: fixed it? |
06:33:22 | voltist | Sorry went to peel potatoes |
06:33:33 | voltist | Zevv: Of course, thats my problem! |
06:33:36 | voltist | Silly mistake |
06:34:41 | voltist | Zevv: Yep it works now. Thanks for spotting my error :) |
06:34:47 | Zevv | been there more then once :) |
06:35:01 | voltist | We all have |
06:42:12 | * | B4s1l3 joined #nim |
06:42:16 | * | B4s1l3 is now known as opDispatch |
06:42:35 | voltist | Well now it's time for jpeg writing |
06:42:39 | voltist | More fun no doubt |
07:11:52 | voltist | Any reason why `fp.write(cast[string](output))` would throw the error `Error: unhandled exception: errno: 14 `Bad address` [IOError]` |
07:12:01 | voltist | Where output is of type `ptr cuchar` |
07:23:49 | Zevv | yeah, tons :) |
07:24:12 | Zevv | a string is a tuple of a pointer to the data and its length |
07:24:28 | Zevv | you lie to NIm, telling it that your 'output' is a string. But it's not. |
07:25:34 | Zevv | you want to do fp.writeBuffer(output, len) |
07:25:39 | Zevv | https://nim-lang.github.io/Nim/io.html#writeBuffer%2CFile%2Cpointer%2CNatural |
07:26:03 | Zevv | if you cast, you better be sure what you are doing because the compiler will no longer protect you |
07:33:03 | * | dddddd quit (Ping timeout: 256 seconds) |
07:40:02 | * | kenran joined #nim |
07:44:35 | bung | what's the equal operator `features[:, 0]` compare to mxnet's nd |
07:59:20 | * | opDispatch quit (Quit: Konversation terminated!) |
08:00:19 | voltist | Zevv: Yeah that worked out, thanks |
08:00:35 | voltist | Well, I mean i've got other problems now |
08:00:38 | voltist | But not that one |
08:01:32 | voltist | And now no problems |
08:01:48 | voltist | Inumon will support JPEG read/write as soon as I can commit and push |
08:03:30 | bung | pure nim lib ? |
08:04:27 | voltist | Unfortunately not; it wraps the common libpng and libjpeg-boost |
08:04:46 | * | kenran quit (Ping timeout: 256 seconds) |
08:04:47 | voltist | For IO |
08:10:08 | * | JStoker quit (Ping timeout: 256 seconds) |
08:11:00 | * | JStoker joined #nim |
08:19:20 | * | zielmicha___ joined #nim |
08:19:33 | * | zielmicha__ quit (Ping timeout: 256 seconds) |
08:19:33 | * | zielmicha___ is now known as zielmicha__ |
08:21:36 | bung | ok, there are wrapers for image processing. |
08:26:29 | voltist | I'm yet to find one that makes me want to use it |
08:46:20 | FromGitter | <mattrberry> Hi! I'm struggling to read an entire file into a seq[uint8]. How would I go about this? I'm just trying to use readBytes, but I'm getting an "index out of bounds, the container is empty" |
08:49:45 | Prestige | Can you show the code on play.nim-lang.org? |
08:51:51 | FromGitter | <mattrberry> https://play.nim-lang.org/#ix=2otD |
08:53:02 | bung | rom is empty |
08:55:37 | FromGitter | <mattrberry> Ah, didn't realize I needed newSeq |
08:55:38 | FromGitter | <mattrberry> Thanks |
08:58:07 | voltist | Is everyone unsure of how to version their projects or is it just me? |
09:03:28 | FromGitter | <mattrberry> What's the preferred ide for nim? I'm trying to use some vscode extension, but it really sucks at formatting |
09:05:28 | bung | as far as I know vscode extension using nimpretty for formatting |
09:05:53 | bung | I use https://github.com/bung87/vscode-nim-lsp for myself |
09:14:42 | * | snowolf quit (Ping timeout: 260 seconds) |
09:18:37 | * | jjido joined #nim |
09:19:33 | * | jjido quit (Client Quit) |
09:28:15 | * | clemens3 quit (Ping timeout: 260 seconds) |
09:48:13 | * | chemist69 quit (Ping timeout: 272 seconds) |
09:48:37 | * | chemist69 joined #nim |
09:55:59 | * | kenran joined #nim |
09:58:50 | * | fredrikhr joined #nim |
10:01:30 | * | lritter joined #nim |
10:03:50 | * | kenran quit (Ping timeout: 264 seconds) |
10:05:38 | * | neceve_ joined #nim |
10:10:47 | FromGitter | <sheerluck> voltist I like the youtube-dl way: youtube-dl-2020.05.29, youtube-dl-2020.06.06 |
10:26:07 | * | team\andinus joined #nim |
11:04:55 | * | Guest58273 quit (Ping timeout: 256 seconds) |
11:06:30 | * | dadada joined #nim |
11:06:53 | * | dadada is now known as Guest4954 |
11:09:49 | * | fredrikhr quit (Ping timeout: 264 seconds) |
11:11:17 | * | tane joined #nim |
11:14:25 | * | clemens3 joined #nim |
11:23:54 | * | dddddd joined #nim |
11:25:49 | * | haxscramper joined #nim |
11:30:38 | * | arecaceae quit (Remote host closed the connection) |
11:31:01 | * | arecaceae joined #nim |
11:37:27 | haxscramper | How I can convert `PNode` (from `compiler/ast`) back intro string representation? In `macros` module it is implemented using `repr` but for `PNode` this does not generate string representation. |
11:51:53 | * | Senketsu quit (Quit: WeeChat 2.8) |
11:52:56 | * | Senketsu joined #nim |
12:00:45 | * | xet7 quit (Quit: Leaving) |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:38 | * | supakeen joined #nim |
12:07:02 | * | xet7 joined #nim |
12:24:49 | * | PMunch joined #nim |
12:31:59 | PMunch | Anyone know what might be causing these issues: https://github.com/PMunch/nimlsp/issues/53#issuecomment-640210897 |
12:32:01 | disbot | ➥ Error: cannot export: Suggest ; snippet at 12https://play.nim-lang.org/#ix=2ouO |
12:53:56 | * | nc-x joined #nim |
12:54:19 | bung | mine thoughts same as yours first comment |
12:54:45 | nc-x | haxscramper: what are you trying to do? anyways, iirc renderer.nim contains `$` implementation for PNode. |
12:55:25 | * | Senketsu quit (Ping timeout: 256 seconds) |
12:57:18 | * | Senketsu joined #nim |
12:58:21 | nc-x | @mattrberry it is best to disable nimpretty (formatting) in vscode nim extension settings. AFAICT, nimpretty works for simple programs, but I have had issues with it on big pieces of code. |
12:59:37 | nc-x | PMunch: maybe something changed between 1.2 and devel? because vitreo12 is using v1.2 with sources pointed to devel. |
13:02:06 | * | nc-x quit (Remote host closed the connection) |
13:13:10 | haxscramper | nc-x: I'm trying to take `PNode` and get string representation from it - this is the end goal for now. `renderer.$` throws `IndexError` when I try to use it. |
13:13:10 | haxscramper | |
13:48:49 | haxscramper | It was mistake on my part - I was compiling with `--define:nimpretty`. Without it everything works fine. |
13:50:50 | * | Vladar joined #nim |
14:07:31 | FromGitter | <deech> I keep getting bit by the kind of early template resolution issues that mratsim has compiled ( https://github.com/nim-lang/Nim/issues/8677 ) . Is there an effort underway to fix this? |
14:07:32 | disbot | ➥ [Meta] Generics/Static early symbol resolution |
14:08:46 | * | krux02 joined #nim |
14:09:11 | FromGitter | <deech> To clarify, I would like to help with such an effort. |
14:11:05 | * | silvernode_ joined #nim |
14:22:25 | * | krisppurg joined #nim |
14:28:49 | aeverr | apparently the discord bot died lol |
14:28:50 | FromGitter | <Willyboar> federico3 here? |
14:34:24 | aeverr | yardanico: discord to irc dead, both ways |
14:34:33 | Yardanico | huh |
14:34:50 | Yardanico | !status |
14:34:57 | Yardanico | !ping |
14:34:57 | NimBot | pong |
14:35:06 | aeverr | thonk |
14:35:50 | Yardanico | well idk why it stopped |
14:35:58 | * | FromDiscord joined #nim |
14:36:00 | Yardanico | I had a while true loop in a script for restarts |
14:36:04 | Yardanico | idk how it ended :D |
14:36:16 | Yardanico | started now |
14:36:50 | Yardanico | and no one noticed :D |
14:36:56 | Yardanico | for quite some hours |
14:44:39 | * | clemens3 quit (Quit: WeeChat 2.7) |
14:44:53 | bung | maybe you could use a master process monitor it |
14:45:07 | Yardanico | bung: as I said, I just have an external bash script |
14:45:13 | * | silvernode_ quit (Ping timeout: 264 seconds) |
14:45:23 | Yardanico | which will just start ircord again if it crashes |
14:46:08 | bung | ok, idk now. |
14:51:36 | aeverr | make that bash script loop execute a bash script that loop executes the irc server :D |
14:51:43 | Yardanico | lmao |
14:51:47 | aeverr | i mean, bridge |
14:57:39 | * | HannahGem joined #nim |
14:58:59 | FromDiscord | <KrispPurg> I did notice tho. |
15:02:34 | * | idxu quit (Ping timeout: 256 seconds) |
15:02:45 | * | HannahGem quit (Ping timeout: 265 seconds) |
15:03:03 | Zevv | why does it need a restart script in the first place? |
15:05:29 | aeverr | its just thats cuffed |
15:05:31 | aeverr | scuffec |
15:05:49 | Zevv | fix your code! :) |
15:17:22 | * | clemens3 joined #nim |
15:17:38 | FromDiscord | <KrispPurg> I'm sure Dimscord will be stable on the latest branch I think. |
15:17:57 | FromDiscord | <KrispPurg> or at least the unpushed commit. |
15:35:30 | Prestige | I'm trying to create a wrapper for Xft which has references to other libs (like fontconfig). It needs a few things from fontconfig like enums and simple data types. Should I be creating an entire wrapper for fontconfig as well? |
15:37:05 | Yardanico | why? |
15:37:11 | Yardanico | if you don't use them in your code you don't need to |
15:37:25 | federico3 | Willyboar: huh? |
15:37:47 | Prestige | I was going to make a PR for x11 Yardanico to include the xft wrapper, since it is complete |
15:40:11 | Prestige | Just seems weird having a few things from fontconfig and freetype declared inside of xft.nim but if they aren't implemented yet, idk if that really matters |
15:43:03 | FromDiscord | <willyboar> Federico3 sorry for the double ping discord not crashed |
15:43:27 | federico3 | np |
15:48:04 | disruptek | !last disruptek |
15:48:05 | disbot | disruptek spoke in 12#nim 15 hours ago 12https://irclogs.nim-lang.org/07-06-2020.html#00:46:15 |
15:48:09 | disruptek | where is that asshole? |
15:49:35 | haxscramper | How I can check if code runs at compile time vs runtime? Something like `when defined(nimscript)` but for complile/run-time. |
15:49:36 | haxscramper | |
15:50:23 | FromDiscord | <Recruit_main707> considering you specify when your code runs at compile time, it shouldnt be too hard |
15:54:04 | haxscramper | Is there a `define` that is at compile time? I want to write `static: test()` and `test()` so each one would do different things. Something like https://play.nim-lang.org/#ix=2ovR but replace `when defined(compiletime)` witch necessary check. |
15:54:51 | disruptek | add the .compileTime pragma to a proc. |
15:55:22 | disruptek | there's `when nimvm` but don't use it. |
15:57:40 | haxscramper | I need execute it at runtime too. And `when nimvm` works like exactly as I need - is there a reason not to use it? |
15:58:09 | disruptek | yeah. |
16:03:16 | Zevv | isn't he lovely |
16:05:18 | * | waleee-cl joined #nim |
16:09:05 | * | luis_ joined #nim |
16:09:27 | Zevv | dear disruptek |
16:09:32 | Zevv | what is the reason not to use it |
16:09:40 | Zevv | love, zevv |
16:10:23 | * | xet7 quit (Quit: Leaving) |
16:11:00 | * | luis_ quit (Client Quit) |
16:13:02 | * | Vladar quit (Quit: Leaving) |
16:34:47 | federico3 | https://blog.min.io/intel_vs_gravitron/ |
16:36:30 | federico3 | ^^^ as the average number of cores keeps increasing, Nim needs a good parallelism paradigm more urgently |
16:37:05 | disruptek | working on it. |
16:37:17 | disruptek | the reason not to use it is that `when` is for chumps. |
16:37:41 | disruptek | it breaks assumptions otherwise enjoyed by programmer and compiler. |
16:38:19 | disruptek | i mean, peeps are working on the parallelism problem. |
16:38:30 | disruptek | i'm working on man boobs. |
16:42:20 | * | Vladar joined #nim |
16:53:37 | FromGitter | <Willyboar> federico3 ready |
16:55:32 | disruptek | if you listen closely, you can actually hear me getting fatter. |
16:56:20 | FromGitter | <Willyboar> The stretching sound? |
16:56:30 | * | arecaceae quit (Remote host closed the connection) |
16:56:53 | * | arecaceae joined #nim |
16:56:54 | disruptek | adjusting the suspenders. |
17:01:59 | * | Vladar quit (Quit: Leaving) |
17:14:08 | FromDiscord | <Shucks> ```case health:↵ of 66..100:``` |
17:14:29 | FromDiscord | <Shucks> Why is not just `> 66` accepted? |
17:14:55 | FromDiscord | <él liquido> because that's not how a `case…of` works |
17:15:00 | FromDiscord | <él liquido> it operates on sets |
17:15:05 | FromDiscord | <él liquido> not expressions |
17:15:24 | FromDiscord | <él liquido> `of 66..100` is just syntax sugar for `of {66..100}` |
17:15:31 | FromDiscord | <él liquido> or, well, they have the exact same effect |
17:15:43 | disruptek | you're giving me indigestion. |
17:15:46 | FromDiscord | <él liquido> that's why you can also define a set in a const and then use it as a `case` statement branch |
17:16:53 | FromDiscord | <Shucks> Im wondering if a `if` statement would be compiled into more efficient code then |
17:17:06 | FromDiscord | <él liquido> doubt it. |
17:17:17 | FromDiscord | <él liquido> they're probably about the same perf. |
17:17:17 | disruptek | use a range instead. |
17:19:11 | * | natrys joined #nim |
17:19:19 | FromDiscord | <él liquido> well if you have a `Player` object and there's a `health` field that you want to check, an `if` is probably the way to go. |
17:19:55 | FromDiscord | <él liquido> just do `if health > 66`, it will save you a lot of headaches in the end. esp if your health somehow exceeds 100 |
17:20:37 | FromDiscord | <Shucks> > well if you have a `Player` object and there's a `health` field that you want to check, an `if` is probably the way to go.↵yup thats what im doing. Thank you |
17:20:50 | disruptek | !repo disruptek/criterion |
17:20:51 | disbot | no results 😢 |
17:20:55 | disruptek | WHAT THE FUCK |
17:21:08 | disruptek | disbot: are you out to get me? |
17:21:09 | disbot | yep. 😊 |
17:25:02 | FromGitter | <Willyboar> disbot: better hear what disruptek says... |
17:25:58 | disruptek | you wouldn't like me when i'm angry. |
17:26:05 | disruptek | narrator: he's always angry. |
17:26:07 | shashlick | @voltist please use ast2 for your wrappers |
17:35:50 | * | silvernode_ joined #nim |
17:42:11 | * | krisppurg quit (Quit: Connection closed for inactivity) |
17:53:09 | * | jjido joined #nim |
17:55:00 | * | jjido quit (Client Quit) |
17:56:34 | * | Faulander_ quit (Ping timeout: 240 seconds) |
17:59:52 | * | team\andinus quit (Quit: ERC (IRC client for Emacs 26.3)) |
18:00:59 | * | team\andinus joined #nim |
18:28:52 | * | jjido joined #nim |
18:34:50 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
18:40:14 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:41:09 | federico3 | leorize[m]: https://securesocketapi.org/ now, that's a good idea finally |
18:42:36 | * | abm joined #nim |
18:44:14 | * | waleee-cl joined #nim |
18:44:31 | FromDiscord | <Elegant Beef> Well disruptek im writting down today as the day the robots uprising began |
18:44:52 | disruptek | i started years ago. |
18:45:32 | FromDiscord | <Elegant Beef> Yea clearly, you probably started when you dad gave your mom a grown up hug |
18:46:07 | disruptek | is that what your sister calls your snuggle struggle? |
18:46:45 | FromDiscord | <Elegant Beef> Dude you're closer to alabama than I, you'd know better |
18:46:53 | disruptek | concepts are broken. |
18:47:06 | disruptek | i don't know how anyone is supposed to use this half-assed feature. |
18:47:33 | disruptek | it shouldn't exist in this state; calling it experimental is unfair. |
18:50:17 | FromDiscord | <Elegant Beef> I still dont understand what they're for 😄 |
18:51:37 | * | Trustable joined #nim |
18:53:15 | disruptek | araq felt there weren't enough complaints in #nim. |
18:54:04 | silvernode_ | is there a special way to do order of operations in nim? |
18:54:27 | * | kenran joined #nim |
18:54:49 | silvernode_ | var sum = (5 - 2) 5/9 # does not work |
18:55:12 | silvernode_ | Can't seem to find documentation on that |
18:56:26 | FromDiscord | <Elegant Beef> In what way doesnt that work? |
18:56:38 | FromDiscord | <Elegant Beef> 3 * 5/9 = 1.6 |
18:56:51 | FromDiscord | <Elegant Beef> Cmon 😄 |
18:57:15 | disruptek | !eval echo (5 -2) 5/9 |
18:57:16 | NimBot | Compile failed: /usercode/in.nim(1, 7) Error: in expression '5 -2': identifier expected, but found '5' |
18:57:36 | silvernode_ | yep |
18:57:55 | FromDiscord | <Elegant Beef> I assumed they removed an asterix |
18:58:23 | disruptek | !eval echo `*`((5 -2) 5/9) |
18:58:25 | NimBot | Compile failed: /usercode/in.nim(1, 11) Error: in expression '5 -2': identifier expected, but found '5' |
18:58:37 | disruptek | !eval echo `*`((5-2),5/9) |
18:58:39 | NimBot | 1.666666666666667 |
18:58:40 | FromDiscord | <Elegant Beef> There isnt an implicit operator for two floating values next to eachother |
18:59:13 | FromDiscord | <Elegant Beef> it's like `"asdsa" "gjkjklkj"` and expecting it to concat together |
18:59:24 | silvernode_ | I was just trying to do temperature conversion. F to C |
18:59:38 | disruptek | no point. |
18:59:51 | FromDiscord | <Elegant Beef> Just measure in celcius first 😛 |
19:00:03 | disruptek | there are no thermometers in hell. |
19:00:20 | FromDiscord | <Elegant Beef> I've been there and cant confirm |
19:00:32 | FromDiscord | <Elegant Beef> Hitler had one, stalin had one, mao had one |
19:01:07 | silvernode_ | I just tried it the way the formula was put on google which I think worked fine one time in python so I tried it in Nim and thought it would work similar |
19:01:29 | FromDiscord | <Elegant Beef> Ah |
19:01:47 | FromDiscord | <Elegant Beef> Python has implicit operators for floating values? |
19:02:05 | silvernode_ | So in Nim we have to use * ? |
19:02:11 | FromDiscord | <Elegant Beef> Yea |
19:02:25 | silvernode_ | hmm, ok then. I will try it |
19:02:40 | FromDiscord | <Elegant Beef> That doesnt work in python |
19:02:49 | silvernode_ | kind of reminds me of how bash would want it |
19:02:59 | silvernode_ | I left python behind |
19:03:06 | silvernode_ | the community is toxic |
19:03:16 | FromDiscord | <Elegant Beef> I mean have you met disruptek |
19:03:42 | silvernode_ | I should clarify, a large portion of the community appears to be toxic |
19:03:42 | FromDiscord | <Elegant Beef> I never liked the dynamically typed and intepreted part |
19:04:26 | * | jjido joined #nim |
19:06:24 | silvernode_ | so now I tried: var sum = `*`((5 -2) 5/9) and pretty much get the same error |
19:06:52 | silvernode_ | also copy and pasted the example written above in chat |
19:07:05 | silvernode_ | go an error for that too |
19:07:30 | shashlick | ) * 5 |
19:12:09 | * | Jesin quit (Quit: Leaving) |
19:13:13 | FromDiscord | <Rika> just do (5 - 2) * 5 / 9 or something how hard is that T_T |
19:13:30 | FromDiscord | <Rika> and the reason what you sent didnt work is because it is missing a comman |
19:13:32 | FromDiscord | <Rika> comma |
19:16:49 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:19:19 | leorize[m] | federico3: nice |
19:19:39 | * | NimBot joined #nim |
19:20:14 | leorize[m] | they could've chosen something other than openssl as a base though :P |
19:20:33 | * | Jesin joined #nim |
19:25:36 | * | kenran quit (Ping timeout: 256 seconds) |
19:28:22 | * | luis_ joined #nim |
19:29:05 | luis_ | Hi everyone, did anyone create a makefile for crosscompile from linux to win using zig cc? |
19:30:13 | silvernode_ | @Rika lol I think that's what shashlick was trying to tell me, I wasn't multiplying when I should have been.... |
19:30:30 | silvernode_ | it's always dumb stuff with me lol |
19:30:35 | FromDiscord | <Rika> thats fine |
19:30:40 | FromDiscord | <Rika> are you still learning? |
19:30:46 | FromDiscord | <Rika> if so then at least youre learning 😛 |
19:32:23 | silvernode_ | @Rika Yeah I have been programming on the weekends since like 2011 but only started Nim back in December. |
19:33:00 | silvernode_ | I usually catch small errors like that but I rarely use that formula and forgot I needed to multiply |
19:33:28 | silvernode_ | Since 2011, I learned bash for the most part and a tiny amount of Python and Lua. |
19:33:52 | silvernode_ | With a dash of C and C++ but not enough to write anything useful. |
19:34:13 | silvernode_ | I know more Nim now than C/C++ |
19:35:04 | silvernode_ | same goes for Python, I haven't spent months straight learning those like I have with Nim. |
19:37:07 | silvernode_ | Anyway, I can write the formula just as in python, it was an error on my part and did not need to do `*` as disruptek did. |
19:37:13 | disruptek | but what do you know about animal husbandry? |
19:37:18 | * | jjido joined #nim |
19:37:28 | FromDiscord | <Elegant Beef> When you're level 4 on rexxar |
19:37:36 | silvernode_ | disruptek, ha, I know nothing |
19:38:42 | silvernode_ | So side note, I am outside on my laptop and have been for a few hours now because the roomate locked the door when she left the house (and passed by me mind you) |
19:39:15 | silvernode_ | Tried calling and texting her, and got no reply. |
19:44:05 | * | idxu joined #nim |
19:50:09 | * | idxu quit (Quit: ZNC - https://znc.in) |
19:51:54 | FromDiscord | <codic> Jester allows you to have a static directory but it doesn't use all files in all direcotries inside the static dir (it's not recursive). can i make it recursive somehow? |
19:51:58 | FromDiscord | <Rika> how're you charging the laptop if ever |
19:52:09 | * | zedeus_ joined #nim |
19:52:23 | FromDiscord | <codic> all i need to do is serve everything in public/src tbh |
19:54:07 | silvernode_ | @Rika I have a ThinkPad dock that is always plugged in outside on the screened in deck. |
19:54:28 | FromDiscord | <Rika> thats odd lol |
19:54:34 | * | zedeus quit (Ping timeout: 240 seconds) |
19:55:06 | * | zedeus_ is now known as zedeus |
19:55:08 | silvernode_ | @Rika I also have a thinkpad charger inside at 2 locations. |
19:55:21 | silvernode_ | Also multiple thinkpads |
19:55:30 | FromDiscord | <Rika> thinkpad addict |
19:56:14 | silvernode_ | @Rika I blame my friend for showing me his used T420 that he got on Ebay for $140 back in 2016. The rest is history |
19:56:24 | FromDiscord | <codic> Thiiiiiiiiinkpad |
19:56:50 | silvernode_ | I even picked up 2 standalone thinkpad battery chargers just because they exist. |
19:57:03 | * | idxu joined #nim |
19:57:12 | FromDiscord | <codic> so, can i serve everything in the static dir (public by default) recursively in jester? thinkpads are awesome, i own a x230 myself |
19:57:52 | FromDiscord | <Elegant Beef> Are lenovo thinkpads as good as their IBM counterparts? 😄 |
19:58:04 | FromDiscord | <Elegant Beef> And by that i mean has the quality gone down |
19:58:06 | silvernode_ | I have 2 T420 models including the original T420 that my friend introduced me to years ago since he has decided he does not want it anymore. |
19:58:46 | silvernode_ | I think the quality has gone down, that's why a lot of people still go for the T420 and similar older models. |
19:59:26 | silvernode_ | I can have 16 gb of ram in this thing, Linux works great, MacOS works pretty great on it too if I ever need it. |
20:00:15 | silvernode_ | There is a Github project to boot MacOS on the T420, I have done it for fun and was very impressed. |
20:00:32 | FromDiscord | <Elegant Beef> I mean seems like a lot of work when elementary OS exists 😛 |
20:00:58 | FromDiscord | <Elegant Beef> I honestly sorta want a trackpoint on my desktop keyboard |
20:00:59 | silvernode_ | It's not much work actually if you really need MacOS for something. |
20:01:51 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:02:42 | silvernode_ | I actually loaded stock MacOS on here before adding the T420 boot files and it actually installed and had native resolution. |
20:03:17 | FromDiscord | <codic> eh. everything on mac is usually available on windows |
20:03:27 | * | krux02 quit (Remote host closed the connection) |
20:03:31 | FromDiscord | <codic> and a windows vm / dualboot is easier and legal |
20:03:39 | FromDiscord | <codic> also, shouldn't this be in #offtopic/#nim-offtopic? |
20:03:40 | silvernode_ | True, but the fact that it works on here is still pretty cool. |
20:04:24 | FromDiscord | <codic> Yeah |
20:05:17 | silvernode_ | I honestly didn't know there was an offtopic channel |
20:08:06 | * | silvernode_ quit (Quit: Leaving) |
20:08:20 | * | silvernode_ joined #nim |
20:08:31 | PMunch | @codic, as long as there isn't anyone trying to discuss Nim stuff in here then it's fine to go off-topic |
20:08:40 | * | Trustable quit (Ping timeout: 256 seconds) |
20:08:54 | PMunch | The other day off-topic was talking about Nim and this channel was off-topic :P |
20:09:41 | silvernode_ | I figure it is generally ok to go off topic when nobody is asking for help or information about Nim. |
20:10:02 | silvernode_ | as soon as someone comes here for help, all off topic talk has to stop |
20:12:29 | * | silvernode_ quit (Client Quit) |
20:13:30 | * | silvernode joined #nim |
20:13:46 | * | Jesin quit (Ping timeout: 256 seconds) |
20:14:54 | * | tane quit (Ping timeout: 256 seconds) |
20:15:18 | * | tane joined #nim |
20:16:50 | FromDiscord | <Elegant Beef> Imagine using Mac/Windows for development, brought to you by the freebsd gang |
20:16:54 | FromDiscord | <Elegant Beef> Now if only that wasnt a joke |
20:17:04 | FromDiscord | <Technisha Circuit> How would i "import" a .so file in Nim? |
20:17:26 | FromDiscord | <Technisha Circuit> @Elegant Beef I'm actually going to try Debian BSD :P |
20:17:30 | clemens3 | silvernode: but that is irc, different conversations intertwined, where is the problem |
20:17:57 | clemens3 | btw, is there a nim offtopic channel? |
20:18:05 | FromDiscord | <Elegant Beef> Yea |
20:18:12 | disruptek | ##rust |
20:18:15 | clemens3 | yey |
20:18:22 | silvernode | clemens3, its in the topic header for this channel on IRC |
20:18:23 | FromDiscord | <Elegant Beef> #golang |
20:18:48 | clemens3 | i am in tty with classical 80 columns, must be in the other 920 ones then.. |
20:19:17 | * | sschwarzer joined #nim |
20:19:22 | FromDiscord | <Technisha Circuit> > How would i "import" a .so file in Nim? |
20:20:02 | PMunch | silvernode, exactly |
20:20:36 | PMunch | clemens3, it's #nim-offtopic |
20:20:41 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import |
20:20:46 | PMunch | There's also #nim-nologs |
20:20:49 | sschwarzer | For this code, https://play.nim-lang.org/#ix=2oza , I get a compiler error "/usercode/in.nim(140, 5) Error: invalid type: 'var seq[NodeAction[xmltree.XmlNode]]' in this context: 'Iter[xmltree.XmlNode]' for var" - and I have _no_ idea what this is trying to tell me, let alone fix it. Can please someone explain the compiler message? |
20:20:51 | PMunch | #nim-gamedev |
20:21:03 | PMunch | And probably more :P |
20:21:16 | silvernode | I tried to join with /join then again with my client but had to right click the link in the header and join that way. Weird when stuff like that doesn't work |
20:21:36 | * | Senny joined #nim |
20:21:38 | clemens3 | PMunch: ah, coulda guess it.. but thanks! |
20:21:51 | * | luis_ quit (Ping timeout: 256 seconds) |
20:21:51 | * | Senketsu quit (Ping timeout: 256 seconds) |
20:22:18 | silvernode | I should have read the header or at least assumed there was an offtopic channel since most communities have them |
20:22:28 | FromDiscord | <Technisha Circuit> > https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import↵@Elegant Beef thanks! |
20:22:48 | * | sentreen quit (Quit: sentreen) |
20:25:47 | sschwarzer | In case it helps: The last thing was that I added the `var` for the seq in line 37. I need this for line 67. Before, instantiation of the iterator was working. So it seems somehow related to the `var` for the `seq`. |
20:25:58 | * | sentreen joined #nim |
20:29:12 | FromDiscord | <Rika> sschwarzer: ill try understanding, one moment |
20:29:53 | sschwarzer | Rika: Thanks in advance :) |
20:30:25 | sschwarzer | I also tried a web search, of course. |
20:30:51 | FromDiscord | <Rika> this is massive code btw T_T |
20:31:31 | sschwarzer | Rika: I can _try_ to reduce it. Already removed a bit. |
20:32:01 | sschwarzer | Or did you mean something else with "massive"? (It's probably not the most trivial code, admittedly :) ) |
20:32:20 | * | sentreen quit (Quit: sentreen) |
20:32:28 | FromDiscord | <codic> PMunch: true, but I was trying to ask a question :P |
20:32:34 | FromDiscord | <Rika> its complex, ills till try it this way tho |
20:33:36 | sschwarzer | Rika: "ills till try it"? I don't understand. Should I try something, or are you going to try something? |
20:33:38 | FromDiscord | <Rika> found it lol |
20:33:44 | sschwarzer | Rika: Wow! :-) |
20:33:47 | FromDiscord | <Rika> ills till -> i'll still |
20:34:06 | FromDiscord | <Rika> line 37, you cant have a var field `nodeActions: var seq[NodeAction[N]]` -> `nodeActions: seq[NodeAction[N]]` |
20:34:09 | FromDiscord | <codic> now that we are on topic i can ask!so, can i serve everything in the static dir (public by default) recursively in jester? |
20:34:10 | FromDiscord | <Rika> all fields are var |
20:34:30 | FromDiscord | <Rika> maybe you mean export, in which case do `nodeActions*: seq[NodeAction[N]]` |
20:35:22 | FromDiscord | <Rika> sschwarzer ^ |
20:35:24 | sschwarzer | Rika: Hm, ok, I was also wondering because I hadn't seen this before. I added the `var` only because of some other message and that message went away after I added the `var`. |
20:35:38 | FromDiscord | <Rika> hm? is there a new issue? |
20:35:39 | * | sentreen joined #nim |
20:35:46 | FromDiscord | <Rika> let me run it |
20:35:53 | FromDiscord | <Rika> it compiels without the var... |
20:35:57 | FromDiscord | <Rika> compiles |
20:36:07 | * | sentreen quit (Client Quit) |
20:36:11 | FromDiscord | <Rika> update me on the new issue if ever |
20:37:12 | sschwarzer | Yes, it compiles. The compile error was triggered by a call of `deleteNode` in line 64. |
20:37:45 | FromDiscord | <Rika> well nice that it works now |
20:38:34 | sschwarzer | Rika: I added the previous message as a comment under https://play.nim-lang.org/#ix=2ozh . |
20:39:15 | sschwarzer | So if I remove the var I'll get the other compile error again (see the comment). That compiler output was the reason why I added the `var`. |
20:39:25 | * | sentreen joined #nim |
20:40:10 | sschwarzer | Rika: The problem somehow is with the `seq.add` in line 67 |
20:41:15 | FromDiscord | <Rika> you make the nodeInfo var, so on line 64 |
20:41:21 | FromDiscord | <Rika> `func deleteNode*[N](nodeInfo: var NodeInfo[N]) =` |
20:41:46 | FromDiscord | <Rika> since all arguments (unless theyre ref types) are immutable |
20:42:20 | sschwarzer | Rika: I'll try ... |
20:46:25 | sschwarzer | Rika: I changed the signature of `deleteNode` to func deleteNode*[N](nodeInfo: var NodeInfo[N]) = (added the `var`). Now I get ... |
20:48:49 | sschwarzer | (Meta problem: irssi asks me to press ctrl-k to paste 5 lines, but readline(?) asks for a digraph if I press ctrl-k XD |
20:49:50 | FromDiscord | <Rika> dont paste 5 lines here then LOL |
20:50:16 | sschwarzer | Rika: makes perfectly sense ;-) I thought 5 lines were ok. :) |
20:50:20 | sschwarzer | Wait a second ... |
20:50:37 | FromDiscord | <Rika> i have waited a second |
20:50:50 | sschwarzer | Here's the error: https://play.nim-lang.org/#ix=2ozj |
20:51:31 | sschwarzer | Rika: Seems you need to wait more than one second, which includes one second, so I wasn't wrong. ;-) |
20:51:51 | * | jjido joined #nim |
20:51:55 | * | jjido quit (Client Quit) |
20:52:19 | FromDiscord | <Rika> so where is this deletenode being called |
20:52:25 | FromDiscord | <Rika> i kinda also need source for that |
20:52:35 | FromDiscord | <Rika> i cant find it in the old sources you sent |
20:54:15 | FromGitter | <ynfle> Can I unpack a defsection? https://play.nim-lang.org/#ix=2ozk |
20:54:19 | FromDiscord | <Rika> basically if you have something like `proc something(somenodeinfo:NodeInfo) = somenodeinfo.deletenode` then you need to `var` that too |
20:54:40 | FromDiscord | <Rika> or if its `let nodeinfo = returnsanodeinfo; nodeinfo.deletenode` then you need to `var` instead of `let` |
20:56:50 | FromDiscord | <Rika> @ynfle not that i am aware of |
20:57:06 | FromDiscord | <Rika> unpacking is tuple only (not even arrays have them) so |
20:57:29 | sschwarzer | Rika: I think I have the code at https://play.nim-lang.org/#ix=2ozm , but interestingly I only get a different error message here in the playground. I don't know if I made an error when combining the files or if it's something with the Nim version. But my Nim version is 1.2.0, hm. |
20:57:52 | FromDiscord | <Rika> haa, now this code is even more massive now |
20:58:13 | FromDiscord | <Rika> anyway see my older messages |
20:58:25 | FromDiscord | <Rika> you'll be able to fix your issues yourself that way |
20:58:29 | sschwarzer | Rika: I only added the test code, so you have it one "file" :) |
20:58:46 | sschwarzer | Rika: I'll try it. :-) |
20:59:09 | FromDiscord | <Rika> and to codic that was just typing a moment ago, i dont know how to solve your issue |
20:59:20 | FromDiscord | <Rika> (you can see if someone is typing in discord) |
20:59:58 | FromGitter | <ynfle> @Rika, thx |
21:03:00 | FromDiscord | <codic> i was? |
21:03:01 | FromDiscord | <codic> i wasn't |
21:03:05 | FromDiscord | <codic> probably a discord bug |
21:03:08 | FromDiscord | <codic> I was in another server lol |
21:03:45 | * | neceve_ quit (Read error: Connection reset by peer) |
21:03:58 | FromDiscord | <Rika> discord dumb then |
21:04:00 | * | haxscram` joined #nim |
21:04:15 | sschwarzer | Hm, I now need a `var NodeInfo` to call `deleteNode` on, but the `nodeInfo` instance is from an iterator, and if I add `var` to the iterator "return value", I get the compiler error "Error: expression has no address". That's understandable when looking at the iterator code. I'll try to find a fix/workaround. |
21:05:17 | FromDiscord | <Rika> if you think aboutt it, how would you delete (mutate) data from an immutable nodeInfo |
21:05:18 | FromDiscord | <Rika> 😛 |
21:05:29 | sschwarzer | Rika: but actually I should anyway have access to the `NodeInfo` instance via the `lastNodeInfoOption` and that isn't set yet in this version of the code. I'm in the process of a larger modification, phew. |
21:05:44 | * | haxscramper quit (Ping timeout: 265 seconds) |
21:05:51 | sschwarzer | Rika: Yep, that's my point (of my last IRC message) :-D |
21:06:39 | * | haxscram` quit (Remote host closed the connection) |
21:07:02 | sschwarzer | I want to keep a "reference" to the yielded `nodeInfo`, so the next time the iterator (i. e. `nextNodeInfoOption`) is called it can check what I called on the previously yielded `NodeInfo` object. It's not trivial, yes. ;-) |
21:07:10 | * | solitudesf- quit (Ping timeout: 260 seconds) |
21:08:09 | FromDiscord | <Rika> in one ear out the other @_@ |
21:08:13 | sschwarzer | Did I ever mention that I'd like recursive iterators in Nim? ;-/ Then this convoluted stuff wouldn't be necessary. (Although maybe what I'm trying to do can be achieved in some simpler way.) |
21:08:24 | sschwarzer | Rika :D |
21:09:15 | FromDiscord | <Rika> man i just make simple ass libraries |
21:09:24 | sschwarzer | Rika: To "see" changes to the yielded object in the next iteration, I have the `lastNodeInfoOption` in the iterator. But it isn't set yet. :) |
21:09:50 | FromDiscord | <Rika> have i mentioned that im still not following? |
21:10:03 | FromDiscord | <Rika> i kinda dont wanna since im already overloaded with trying to learn kubernetes |
21:10:53 | sschwarzer | Rika: Anyway, I got it to compile now! :-) |
21:11:02 | FromDiscord | <Rika> congrats |
21:11:38 | sschwarzer | With changing the yield to `yield rootIter.lastNodeInfoOption.get()`, so this refers to the actual object/field in the iterator. |
21:11:59 | FromGitter | <cyberlis> Where can I read about `{.dirty.}`, `{.cursor.}` and `<//>` ? |
21:12:00 | sschwarzer | Rika: When I have this working, i. e. with passing unit tests, I'll try to simplify the code. |
21:12:22 | FromDiscord | <Rika> <//> is owned |
21:12:22 | sschwarzer | Rika: thanks a lot! |
21:12:30 | FromDiscord | <Rika> old syntax for 0.19 compat |
21:12:36 | disruptek | cyberlis: doc/destructors.rst |
21:12:37 | FromDiscord | <Rika> no clue on cursor |
21:12:49 | FromDiscord | <Rika> guess thatll answer everything else 😛 |
21:13:08 | FromGitter | <cyberlis> thank you all :) |
21:18:40 | * | lritter quit (Ping timeout: 256 seconds) |
21:19:39 | sschwarzer | Rika: And have fun with Kubernetes :) |
21:20:22 | FromDiscord | <Rika> im dying already 🙂 |
21:33:03 | FromDiscord | <Recruit_main707> can you convert a cstring or a ptr UncheckedArray[char] into an string easily? |
21:33:11 | FromDiscord | <Recruit_main707> and fast specially |
21:34:19 | * | silvernode quit (Quit: Leaving) |
21:35:53 | FromDiscord | <Generic> afaik in this direction you need a copy |
21:36:35 | FromDiscord | <Generic> since strings are managed by Nim, you can't create ones from some random memory |
21:36:57 | FromDiscord | <Generic> though you can create an openArray without any copies |
21:38:29 | * | silvernode joined #nim |
21:39:18 | * | tane quit (Quit: Leaving) |
21:40:05 | leorize[m] | @Recruit_main707 no you can't |
21:40:19 | leorize[m] | you can just use an openArray though |
21:43:57 | * | Senny quit (Ping timeout: 260 seconds) |
21:52:01 | PMunch | And that seems like a good time as any to call it the night! |
21:52:38 | PMunch | (For those not on IRC, they just said they had to reroute some servers and that it would be noisy, so the bots might behave weirdly/not bridge things properly for a while) |
21:52:41 | * | PMunch quit (Quit: leaving) |
21:53:09 | * | kragil[m] quit (*.net *.split) |
21:53:09 | * | oneark quit (*.net *.split) |
21:53:11 | * | j4nvkvc quit (*.net *.split) |
21:53:11 | * | koltrast_ quit (*.net *.split) |
21:53:38 | * | oneark joined #nim |
21:53:38 | * | kragil[m] joined #nim |
21:53:38 | * | j4nvkvc joined #nim |
21:53:38 | * | koltrast_ joined #nim |
21:53:51 | * | disbot quit (*.net *.split) |
21:53:51 | * | aeverr quit (*.net *.split) |
21:53:51 | * | letto quit (*.net *.split) |
21:53:51 | * | anti[m] quit (*.net *.split) |
21:53:51 | * | nekits quit (*.net *.split) |
21:53:51 | * | nikita` quit (*.net *.split) |
21:53:52 | * | sz0 quit (*.net *.split) |
21:53:52 | * | msmorgan quit (*.net *.split) |
21:53:52 | * | d10n-work quit (*.net *.split) |
21:53:53 | * | dgb quit (*.net *.split) |
21:53:53 | * | hpyc9 quit (*.net *.split) |
21:54:15 | * | disbot joined #nim |
21:54:15 | * | aeverr joined #nim |
21:54:15 | * | letto joined #nim |
21:54:15 | * | anti[m] joined #nim |
21:54:15 | * | nekits joined #nim |
21:54:15 | * | sz0 joined #nim |
21:54:15 | * | nikita` joined #nim |
21:54:15 | * | d10n-work joined #nim |
21:54:15 | * | msmorgan joined #nim |
21:54:15 | * | dgb joined #nim |
21:54:15 | * | hpyc9 joined #nim |
21:54:26 | * | natrys quit (Quit: natrys) |
21:54:33 | * | d10n-work quit (Max SendQ exceeded) |
21:55:10 | * | stefantalpalaru quit (*.net *.split) |
21:55:10 | * | kitech1 quit (*.net *.split) |
21:55:10 | * | def- quit (*.net *.split) |
21:55:11 | * | FromGitter quit (*.net *.split) |
21:55:11 | * | WilhelmVonWeiner quit (*.net *.split) |
21:55:11 | * | Cthalupa quit (*.net *.split) |
21:55:12 | * | blueberrypie quit (*.net *.split) |
21:55:12 | * | screens_ quit (*.net *.split) |
21:55:32 | * | stefantalpalaru joined #nim |
21:55:32 | * | kitech1 joined #nim |
21:55:32 | * | def- joined #nim |
21:55:32 | * | FromGitter joined #nim |
21:55:32 | * | WilhelmVonWeiner joined #nim |
21:55:32 | * | Cthalupa joined #nim |
21:55:32 | * | blueberrypie joined #nim |
21:55:32 | * | screens_ joined #nim |
21:55:44 | * | kitech1 quit (Max SendQ exceeded) |
21:55:56 | * | kungtotte quit (*.net *.split) |
21:55:56 | * | neceve quit (*.net *.split) |
21:55:56 | * | beatmox quit (*.net *.split) |
21:55:56 | * | qwertfisch quit (*.net *.split) |
21:55:57 | * | matthias[m]3 quit (*.net *.split) |
21:55:59 | * | watzon quit (*.net *.split) |
21:55:59 | * | sepples quit (*.net *.split) |
21:55:59 | * | Northstrider quit (*.net *.split) |
21:56:05 | * | kitech1 joined #nim |
21:56:07 | * | kitech1 quit (Changing host) |
21:56:07 | * | kitech1 joined #nim |
21:56:18 | * | neceve joined #nim |
21:56:18 | * | kungtotte joined #nim |
21:56:18 | * | beatmox joined #nim |
21:56:18 | * | qwertfisch joined #nim |
21:56:18 | * | matthias[m]3 joined #nim |
21:56:18 | * | watzon joined #nim |
21:56:18 | * | Northstrider joined #nim |
21:56:18 | * | sepples joined #nim |
21:56:18 | * | nikita` quit (Ping timeout: 245 seconds) |
21:56:36 | * | skrylar[m] quit (*.net *.split) |
21:56:36 | * | drewr quit (*.net *.split) |
21:56:38 | * | codic quit (*.net *.split) |
21:56:39 | * | TheManiac[m] quit (Ping timeout: 244 seconds) |
21:56:40 | * | lqdev[m] quit (Ping timeout: 244 seconds) |
21:56:40 | * | salotz[m] quit (Ping timeout: 244 seconds) |
21:56:40 | * | Jjp137_ quit (Ping timeout: 264 seconds) |
21:56:40 | * | msmorgan quit (Ping timeout: 246 seconds) |
21:56:45 | * | j4nvkvc quit (Ping timeout: 244 seconds) |
21:56:47 | * | matthias[m]3 quit (Ping timeout: 252 seconds) |
21:57:00 | * | sz0 quit (Ping timeout: 246 seconds) |
21:57:08 | * | sendell quit (Ping timeout: 260 seconds) |
21:57:08 | * | dannyfritz[m] quit (Ping timeout: 260 seconds) |
21:57:09 | * | k0mpjut0r quit (Ping timeout: 260 seconds) |
21:57:39 | * | msmorgan joined #nim |
21:57:52 | * | gangstacat quit (*.net *.split) |
21:57:52 | * | bbarker quit (*.net *.split) |
21:57:52 | * | bjornroberg quit (*.net *.split) |
21:57:53 | * | planetis[m] quit (*.net *.split) |
21:57:53 | * | ormiret quit (*.net *.split) |
21:57:53 | * | crem quit (*.net *.split) |
21:57:53 | * | casaca quit (*.net *.split) |
21:57:54 | * | tyler569 quit (*.net *.split) |
21:57:54 | * | bozaloshtsh_ quit (*.net *.split) |
21:57:54 | * | Cadey quit (*.net *.split) |
21:58:14 | * | gangstacat joined #nim |
21:58:14 | * | bbarker joined #nim |
21:58:14 | * | bjornroberg joined #nim |
21:58:14 | * | planetis[m] joined #nim |
21:58:14 | * | ormiret joined #nim |
21:58:14 | * | crem joined #nim |
21:58:14 | * | casaca joined #nim |
21:58:14 | * | tyler569 joined #nim |
21:58:14 | * | bozaloshtsh_ joined #nim |
21:58:14 | * | Cadey joined #nim |
21:58:33 | * | nisstyre quit (*.net *.split) |
21:58:35 | * | shodan45 quit (*.net *.split) |
21:58:35 | * | nickster quit (*.net *.split) |
21:58:35 | * | Mister_Magister quit (*.net *.split) |
21:58:35 | * | jxy quit (*.net *.split) |
21:58:35 | * | acidx quit (*.net *.split) |
21:59:51 | * | nisstyre joined #nim |
21:59:51 | * | shodan45 joined #nim |
21:59:51 | * | nickster joined #nim |
21:59:51 | * | Mister_Magister joined #nim |
21:59:51 | * | jxy joined #nim |
21:59:51 | * | acidx joined #nim |
21:59:54 | * | unclechu quit (Ping timeout: 244 seconds) |
21:59:55 | * | watzon quit (Ping timeout: 252 seconds) |
21:59:55 | * | drewr joined #nim |
21:59:56 | * | sschwarzer quit (Quit: leaving) |
22:00:06 | * | neceve quit (Ping timeout: 252 seconds) |
22:00:06 | * | nisstyre quit (Max SendQ exceeded) |
22:00:15 | * | dzamo[m] quit (Ping timeout: 244 seconds) |
22:00:51 | * | planetis[m] quit (Ping timeout: 246 seconds) |
22:00:51 | * | anti[m] quit (Ping timeout: 246 seconds) |
22:00:51 | * | kragil[m] quit (Ping timeout: 244 seconds) |
22:00:52 | * | oneark quit (Ping timeout: 244 seconds) |
22:01:12 | * | khanate[m]0 quit (Ping timeout: 260 seconds) |
22:01:22 | * | nikita` joined #nim |
22:01:37 | * | BitPuffin quit (Ping timeout: 272 seconds) |
22:01:37 | * | nisstyre joined #nim |
22:03:49 | * | sz0 joined #nim |
22:05:01 | * | d10n-work joined #nim |
22:06:13 | * | TheManiac[m] joined #nim |
22:06:16 | * | lqdev[m] joined #nim |
22:07:16 | * | dannyfritz[m] joined #nim |
22:07:24 | * | sendell joined #nim |
22:12:18 | * | neceve joined #nim |
22:13:17 | * | dzamo[m] joined #nim |
22:13:22 | * | Jesin joined #nim |
22:14:26 | * | khanate[m]0 joined #nim |
22:15:04 | * | kragil[m] joined #nim |
22:15:04 | * | oneark joined #nim |
22:15:24 | * | planetis[m] joined #nim |
22:15:38 | * | anti[m] joined #nim |
22:16:12 | * | BitPuffin joined #nim |
22:16:44 | * | matthias[m]3 joined #nim |
22:16:46 | * | salotz[m] joined #nim |
22:16:50 | * | everfree joined #nim |
22:17:09 | * | everfree is now known as arty |
22:18:19 | * | j4nvkvc joined #nim |
22:21:12 | FromGitter | <cyberlis> If I want to write linked list (I now about `lists` module in standard lib), I have to know about `owned`, `{.cursor.}` and everything about new destructors (`sink`, `destory` etc) ? Are there a way to write it simply ? |
22:21:32 | * | skrylar[m] joined #nim |
22:26:04 | disruptek | just write it normally. |
22:26:54 | * | codic joined #nim |
22:27:31 | * | drewr quit (Remote host closed the connection) |
22:27:58 | leorize[m] | @cyberlis all those stuff are implementation details atm |
22:28:18 | disruptek | well, optimizations. |
22:28:27 | leorize[m] | until the new GC can be transitioned to take the default spot, I wouldn't care too much about them |
22:28:46 | * | drewr joined #nim |
22:31:32 | * | k0mpjut0r joined #nim |
22:34:22 | * | ldlework joined #nim |
22:34:32 | ldlework | Is there a favorite library for writing CLI tools? |
22:35:06 | * | watzon joined #nim |
22:35:23 | * | unclechu joined #nim |
22:41:35 | leorize[m] | my personal favorite is argparse, but many people swear by cligen |
22:42:22 | leorize[m] | and the terminal module provides a good set of tools to craft your own I/O styling |
22:42:31 | ldlework | nimble.directory seems to be having some troubles |
22:47:37 | Prestige | I'm trying to draw a string with xft, and getting strange results. I think I may be casting a string incorrectly for the type. The first character is always correct, but the rest are wrong and different on each run: https://github.com/avahe-kellenberger/x11/blob/master/examples/xftex.nim#L84 |
22:48:09 | Prestige | The second to last param was a ptr cchar but I've changed it to a cstring, which I think is fine.. not sure what's going wrong, if someone can help? |
22:48:22 | leorize[m] | Prestige: displayString[0].addr |
22:48:27 | leorize[m] | or `cstring(displayString)` |
22:49:05 | Prestige | aha thanks! |
22:49:15 | Prestige | It's working |
22:49:53 | Araq | random idea: can we make 'func' enforce writes through 'var' parameters? many people seem to want even more "Purity" |
22:50:02 | * | cyraxjoe joined #nim |
22:50:38 | Araq | this implies 'proc .noSidEffect' would be less strict than 'func' |
22:50:48 | disruptek | i want var refs to mean something first. |
22:52:15 | disruptek | really failing hard on concepts, too. |
22:52:23 | leorize[m] | they shouldn't use `var` if they want purity... |
23:01:57 | FromDiscord | <Technisha Circuit> When i use dynlib to import a .so file, does the proc just act as a namespace for the imported.so file? |
23:02:04 | FromDiscord | <Technisha Circuit> (edit) 'imported.so' => 'imported .so' |
23:02:17 | FromDiscord | <Technisha Circuit> (edit) '.so' => '`.so`' | '.so' => '`.so`' |
23:02:18 | * | abm quit (Quit: Leaving) |
23:03:14 | leorize[m] | wdym namespace? |
23:03:31 | ldlework | How do you get the cli args? |
23:03:53 | leorize[m] | os.commandLineParams, os.paramCount, os.paramStr |
23:03:56 | leorize[m] | your choice :P |
23:05:28 | ldlework | thanks |
23:05:48 | * | MightyJoe joined #nim |
23:06:22 | FromDiscord | <Rika> has anyone used redis in nim? which do yall use, (x)monade(r)'s module or the official one? |
23:06:52 | FromDiscord | <Technisha Circuit> Namespace as in a class sort of thing |
23:07:00 | FromDiscord | <Technisha Circuit> Or like a placeholder |
23:07:09 | FromDiscord | <Technisha Circuit> Also, where do i get cdecl from? |
23:07:57 | ldlework | What's a nice library for easily executing external commands? |
23:08:07 | * | cyraxjoe quit (Ping timeout: 272 seconds) |
23:08:36 | ldlework | shell looks nice |
23:08:57 | FromDiscord | <Rika> osproc? |
23:09:28 | leorize[m] | my library but you gotta wait since I haven't got it out :P |
23:10:15 | leorize[m] | @Technisha I still don't understand your question |
23:10:25 | leorize[m] | cdecl is a pragma thing |
23:10:36 | FromDiscord | <Technisha Circuit> Yeah, it says it's not defined |
23:10:41 | ldlework | shell is a little complicated actually |
23:10:47 | FromDiscord | <Technisha Circuit> I need to know what to import to be able to use it |
23:11:02 | FromDiscord | <Technisha Circuit> ```↵/data/data/com.termux/files/home/nim_stuff/dynlibTesting/test.nim(3, 13) Error: invalid pragma: cdecl``` |
23:11:13 | ldlework | it'll do though |
23:11:27 | FromDiscord | <Technisha Circuit> ```nim↵import dynlib↵var name* {.cdecl, exportc, dynlib.}: string = "This is a test"``` |
23:11:30 | FromDiscord | <Technisha Circuit> That's the code |
23:12:11 | leorize[m] | remove cdecl |
23:12:19 | FromDiscord | <Technisha Circuit> Oh okay |
23:12:25 | leorize[m] | it's only applicable to procs |
23:12:53 | FromDiscord | <Technisha Circuit> Oh okay |
23:12:56 | FromDiscord | <Technisha Circuit> Thanks! |
23:14:30 | ldlework | It's too bad there's no way to make shell execute the stuff quietly |
23:14:59 | ldlework | oh you can |
23:15:33 | ldlework | nice |
23:20:22 | FromDiscord | <Elegant Beef> Holy shit ldlework |
23:20:31 | FromDiscord | <Elegant Beef> Atleast i assume it's you from GDL |
23:20:46 | * | ldlework waves. |
23:21:14 | FromDiscord | <Elegant Beef> So leorize how do i use the master file with the PTY, do i open the file descriptor and read/write that file |
23:21:23 | FromDiscord | <Elegant Beef> Cause i've tried a variety of things but.. no cigar |
23:21:40 | FromDiscord | <Elegant Beef> There is actually a surprising amount of users from the GDL discord to here |
23:21:52 | leorize[m] | master file? |
23:21:57 | FromDiscord | <Rika> gdl => game dev, lol |
23:21:58 | leorize[m] | what are you trying to do? |
23:22:04 | FromDiscord | <Rika> (i am joking) |
23:22:21 | FromDiscord | <Elegant Beef> Currently attempting to interact with the slave |
23:22:31 | FromDiscord | <Elegant Beef> https://hatebin.com/dhqtjbhqae |
23:22:35 | FromDiscord | <Elegant Beef> Current state of it |
23:22:48 | FromDiscord | <Elegant Beef> Nothing has changed much |
23:23:01 | FromDiscord | <Elegant Beef> Although it seems the bash invoktion is working but in certain |
23:23:23 | FromDiscord | <Elegant Beef> (edit) 'in certain' => 'im uncertain' |
23:24:03 | leorize[m] | whatever you write to the PT master will be the input |
23:24:07 | FromDiscord | <Elegant Beef> Yea i know |
23:24:12 | FromDiscord | <Elegant Beef> But how do i open the PT master in nim |
23:24:30 | FromDiscord | <Elegant Beef> Using the file descriptor as a filehandle only lets me open it as fmread |
23:24:38 | leorize[m] | use posix.open() |
23:24:44 | leorize[m] | oh wait you don't have to lmao |
23:24:54 | leorize[m] | it's already opened |
23:25:02 | FromDiscord | <Elegant Beef> Then how do i write to it? |
23:25:15 | FromDiscord | <Elegant Beef> Do i change my std streams to it? |
23:25:17 | leorize[m] | posix.write :) |
23:25:41 | FromDiscord | <Elegant Beef> I really hope that isnt that easy 😄 |
23:25:53 | ldlework | If I wanted to bypass nimble completely, and download my dependencies directly from github to disk, how do I arrange things so I can compile my app and nim will find the depenencies |
23:26:12 | ldlework | just use -p? |
23:27:13 | leorize[m] | yea, or use `nimph` |
23:27:32 | leorize[m] | it lets you vendor packages afaik |
23:27:48 | leorize[m] | !repo nimph |
23:27:50 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 65⭐ 4🍴 7& 1 more... |
23:33:29 | ldlework | how do I prevent nim from creating .cache/nim/nixt_d ? |
23:33:40 | ldlework | nm |
23:35:10 | ldlework | nice i can build nim stuff in nix now |
23:35:27 | FromDiscord | <Elegant Beef> Using nixos? |
23:35:30 | ldlework | ya |
23:35:44 | ldlework | I need a nimble2nix :P |
23:35:49 | FromDiscord | <Elegant Beef> I only know that it has an interesting pkgmanager |
23:35:57 | FromDiscord | <Elegant Beef> Never looked into it |
23:36:37 | ldlework | It's a functionally pure package manager |
23:36:45 | ldlework | It has unprecedented reproducability guarantees |
23:37:04 | ldlework | The learning curve is absolute hell though if you're new to functionalshit like I was |
23:37:14 | FromDiscord | <Elegant Beef> As a numpty using ubuntu derived |
23:37:16 | FromDiscord | <Elegant Beef> Think ill pass |
23:37:16 | ldlework | But my workstation and servers are so gd nicce now |
23:37:18 | FromDiscord | <Elegant Beef> 😄 |
23:39:28 | ldlework | is there a nimble lock file? |
23:39:37 | ldlework | i'll rtfm |
23:41:05 | leorize[m] | nope there aren't any atm |
23:42:20 | ldlework | Well that explains why there is no nimble2nix yet ^_^' |
23:52:55 | FromDiscord | <Elegant Beef> Well go make a PR 😛 |
23:53:08 | FromDiscord | <Elegant Beef> Coming from a man that cant make a terminal emullator |
23:53:12 | FromDiscord | <Elegant Beef> (edit) 'emullator' => 'emulator' |
23:55:54 | * | Jjp137_ joined #nim |