00:03:45 | * | noeontheend quit (Ping timeout: 250 seconds) |
00:21:57 | * | theelous3_ quit (Ping timeout: 246 seconds) |
00:34:33 | I_Right_I | can anyone tell me off hand the nim syntax for incrementing a pointer address by size char(x) |
00:35:26 | dom96 | I_Right_I: You should probably cast to an array and use the `[]` operator instead of doing pointer arithmetic |
00:36:16 | I_Right_I | but over cast the array size |
00:36:50 | I_Right_I | cast[ptr array[100000000,int]] |
00:38:57 | * | lritter quit (Quit: Leaving) |
00:44:08 | I_Right_I | so something like this ----> zeroMem(addr cast[ptr array[512,char]](readBuf)[i],len) |
00:44:59 | I_Right_I | if 'i' is never larger then 511 |
00:53:55 | disruptek | Araq: maybe that would allow nimble to layer over it explicitly, which would help adoption. |
01:18:03 | * | rnrwashere quit (Remote host closed the connection) |
01:22:55 | * | sealmove quit (Quit: WeeChat 2.4) |
01:35:46 | I_Right_I | so I've done a bit of testing and this thread pooled UDP socket library I wrote the other day seems stable...ish I am going to clean up the code maybe write a small game to go with it. |
01:37:16 | I_Right_I | I have to give it to you guys nim is pretty cool. |
01:37:38 | * | rnrwashere joined #nim |
01:38:14 | * | rnrwashere quit (Remote host closed the connection) |
01:38:30 | * | rnrwashere joined #nim |
01:44:41 | ryukoposting | based |
01:56:10 | * | rnrwashere quit (Remote host closed the connection) |
01:56:58 | * | rnrwashere joined #nim |
01:57:09 | * | noeontheend joined #nim |
01:57:28 | * | rnrwashere quit (Remote host closed the connection) |
02:02:21 | * | rnrwashere joined #nim |
02:04:41 | * | theelous3_ joined #nim |
02:05:02 | * | rnrwashere quit (Remote host closed the connection) |
02:07:02 | * | couven92 quit (Quit: Client Disconnecting) |
02:09:37 | * | theelous3_ quit (Ping timeout: 255 seconds) |
02:25:43 | * | rnrwashere joined #nim |
02:29:29 | * | rnrwashere quit (Remote host closed the connection) |
02:30:10 | * | rnrwashere joined #nim |
02:41:59 | * | rnrwashere quit (Remote host closed the connection) |
02:45:33 | * | rnrwashere joined #nim |
02:46:16 | * | rnrwashere quit (Remote host closed the connection) |
02:46:53 | * | rnrwashere joined #nim |
02:48:15 | ryukoposting | check out this gorgeous codegen https://dailyprog.org/f/md1v |
02:51:01 | * | rnrwashere quit (Ping timeout: 250 seconds) |
02:54:19 | * | ryukoposting quit (Quit: WeeChat 1.6) |
02:58:40 | * | MightyJoe quit (Ping timeout: 255 seconds) |
02:58:52 | * | cyraxjoe joined #nim |
03:02:24 | * | sealmove joined #nim |
03:02:52 | sealmove | guys I am having issue with something |
03:03:40 | sealmove | I use dumpTree to print AST, but when I use "*" I get an error (usually saying "wrong indentation") |
03:05:57 | * | banc quit (Quit: Bye) |
03:07:17 | sealmove | generally when I get errors while using dumpTree, does this mean Nim can't parse the syntax, and that I can't use this syntax for my macro? |
03:26:47 | * | banc joined #nim |
03:27:18 | * | I_Right_I quit (Remote host closed the connection) |
03:28:54 | * | rnrwashere joined #nim |
04:15:42 | * | chemist69 quit (Ping timeout: 268 seconds) |
04:17:10 | * | chemist69 joined #nim |
04:56:26 | * | sealmove quit (Quit: WeeChat 2.4) |
04:57:09 | * | MightyJoe joined #nim |
04:57:10 | * | cyraxjoe quit (Ping timeout: 246 seconds) |
05:15:29 | * | vlad1777d joined #nim |
05:18:55 | * | shashlick quit (Remote host closed the connection) |
05:19:19 | * | shashlick joined #nim |
05:23:17 | * | dddddd quit (Remote host closed the connection) |
05:39:44 | * | nsf joined #nim |
05:49:15 | * | kapil____ joined #nim |
06:27:23 | * | narimiran joined #nim |
06:42:22 | * | arecacea1 quit (Remote host closed the connection) |
06:42:40 | * | arecacea1 joined #nim |
06:47:32 | * | rnrwashere quit (Remote host closed the connection) |
06:48:03 | * | rnrwashere joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:40 | * | gmpreussner joined #nim |
07:09:38 | * | solitudesf joined #nim |
07:26:06 | Araq | arnetheduck: use rtarrays.nim |
07:27:03 | Araq | well ... I mean use the ideas from rtarrays.nim for a SmallSeq[T] implementation |
07:29:17 | Araq | or put your recursion inside a GC_disable(); body; GC_enable() |
07:29:43 | Araq | so that the GC doesn't kick in your recursive case with an expensive conservative stack scan |
07:51:14 | * | rnrwashere quit (Remote host closed the connection) |
07:58:14 | * | kapil____ quit (Quit: Connection closed for inactivity) |
08:23:10 | * | nsf quit (Quit: WeeChat 2.4) |
08:31:20 | * | aziz joined #nim |
08:35:20 | * | stefanos82 joined #nim |
08:38:15 | * | aziz quit (Ping timeout: 246 seconds) |
08:51:33 | * | aziz joined #nim |
08:56:27 | * | aziz quit (Ping timeout: 246 seconds) |
09:01:23 | * | Vladar joined #nim |
09:06:46 | * | narimiran quit (Ping timeout: 255 seconds) |
09:10:08 | * | aziz joined #nim |
09:11:03 | * | solitudesf quit (Ping timeout: 250 seconds) |
09:15:28 | * | jjido joined #nim |
09:30:13 | planetis[m] | sealmove: it means both, and usally it's a parser error, so you need to think of a different syntax |
09:34:27 | planetis[m] | and looks like you are having same problem with the export marker so take a look here: https://forum.nim-lang.org/t/4735 |
09:35:56 | * | Perkol joined #nim |
09:35:59 | planetis[m] | mind blown |
09:36:25 | * | kapil____ joined #nim |
09:36:33 | Perkol | https://bpaste.net/show/46e9d974678c I get this error, even though i specified the type. What to do? |
09:37:49 | * | nsf joined #nim |
09:38:47 | * | aziz quit (Ping timeout: 250 seconds) |
09:51:20 | * | aziz joined #nim |
10:03:29 | * | aziz quit (Ping timeout: 250 seconds) |
10:09:45 | * | neceve joined #nim |
10:12:41 | * | neceve quit (Remote host closed the connection) |
10:16:10 | * | aziz joined #nim |
10:16:50 | * | neceve joined #nim |
10:21:52 | * | clyybber joined #nim |
10:24:50 | * | neceve quit (Remote host closed the connection) |
10:25:28 | leorize | Perkol: |
10:26:00 | * | nc-x joined #nim |
10:26:05 | * | neceve joined #nim |
10:26:13 | leorize | & is not the address operator in Nim |
10:26:19 | * | nc-x quit (Client Quit) |
10:33:07 | * | Perkol quit (Quit: Leaving) |
10:36:14 | * | Perkol joined #nim |
11:03:46 | * | aziz quit (Ping timeout: 255 seconds) |
11:07:50 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:16:44 | * | aziz joined #nim |
11:26:16 | * | Perkol quit (Remote host closed the connection) |
11:30:35 | * | aziz quit (Ping timeout: 250 seconds) |
11:43:54 | * | aziz joined #nim |
11:44:27 | * | MightyJoe quit (Ping timeout: 250 seconds) |
11:44:47 | * | cyraxjoe joined #nim |
11:46:04 | * | nsf quit (Quit: WeeChat 2.4) |
12:00:37 | * | natrys joined #nim |
12:16:49 | * | dddddd joined #nim |
12:25:51 | * | sealmove joined #nim |
12:26:38 | Araq | sealmove: https://github.com/b3liever/protocoled |
12:26:55 | Araq | b3liever already did what I tried to tell you :-) |
12:28:55 | sealmove | Hi, he showed me 2-3 days ago but I only understood his macro yesterday when I was thinking about what you said |
12:30:24 | * | krux02 joined #nim |
12:30:42 | * | aziz quit (Ping timeout: 250 seconds) |
12:31:05 | sealmove | I've been thinking about exportation. In his macro the interface and implementation is 1 macro. Typically we want to be able to seperate those, so we can have the interface in 1 file and implementation in others? |
12:34:15 | sealmove | Araq, btw b3liever is planetis in here |
12:43:52 | * | aziz joined #nim |
12:49:29 | * | Arlenx joined #nim |
12:52:44 | * | lf-araujo joined #nim |
12:56:43 | lf-araujo | Hi all, what libraries should I look for web scraping? |
12:57:03 | lf-araujo | So far I found httpclient, are there others? |
12:57:57 | * | aziz quit (Ping timeout: 246 seconds) |
13:00:23 | * | rnrwashere joined #nim |
13:03:11 | FromGitter | <mratsim> @lf-araujo: https://forum.nim-lang.org/t/4731#29520 |
13:03:16 | * | jjido joined #nim |
13:03:56 | lf-araujo | thank you |
13:04:37 | * | rnrwashere quit (Ping timeout: 250 seconds) |
13:08:00 | * | jjido quit (Client Quit) |
13:09:38 | sealmove | Araq: the closure pattern has its merits. It doesn't not expose hierarchies to the user. |
13:10:34 | sealmove | The concrete values are hidden well from the user, but I am starting to think that this is actually good. |
13:11:08 | * | aziz joined #nim |
13:12:09 | * | aziz quit (Remote host closed the connection) |
13:15:43 | sealmove | I mean, there are no hierarchies at all! I think this captures the meaning of an "interface" much better. |
13:25:14 | FromGitter | <raydf> Hello everyone |
13:25:35 | FromGitter | <raydf> how can i create a property for a object for handling union types? |
13:25:40 | * | lf-araujo quit (Read error: Connection reset by peer) |
13:26:39 | FromGitter | <raydf> found it https://forum.nim-lang.org/t/4496#28099 |
13:32:29 | * | lf-araujo joined #nim |
13:36:55 | FromDiscord | <Zireael> hm, is there another way of telling nim that I am using package x and y as dependencies apart from making my program (very very WIP) a package (by adding a .nimble file)? I don't want stuff published on nimble as it's very very early work, but I do need a way to make sure my users have the required dependencies... |
13:47:48 | leorize | you don't have to publish it |
13:47:49 | leorize | just add a `.nimble` file and it should work |
13:49:40 | FromDiscord | <Zireael> great, thanks - I was under the impression a .nimble file made it automatically a package ;P |
13:49:54 | * | theelous3_ joined #nim |
13:59:35 | * | Vladar quit (Remote host closed the connection) |
14:01:04 | planetis[m] | sealmove: there is another one here: https://github.com/andreaferretti/interfaced |
14:01:55 | * | lf-araujo left #nim (#nim) |
14:02:35 | * | Trustable joined #nim |
14:04:40 | * | kapil____ quit (Quit: Connection closed for inactivity) |
14:14:30 | * | clyybber quit (Quit: WeeChat 2.4) |
14:29:52 | * | cyraxjoe quit (Ping timeout: 250 seconds) |
14:29:56 | * | MightyJoe joined #nim |
14:34:12 | * | nsf joined #nim |
14:36:12 | * | MightyJoe quit (Ping timeout: 244 seconds) |
14:36:41 | * | cyraxjoe joined #nim |
14:43:13 | * | MightyJoe joined #nim |
14:43:18 | * | cyraxjoe quit (Ping timeout: 250 seconds) |
15:06:44 | * | seerix joined #nim |
15:11:53 | * | stefanos82 quit (Remote host closed the connection) |
15:14:04 | * | kapil____ joined #nim |
15:14:24 | * | narimiran joined #nim |
15:33:40 | * | solitudesf joined #nim |
15:33:53 | * | I_Right_I joined #nim |
15:35:31 | * | NimBot joined #nim |
15:37:43 | * | lritter joined #nim |
15:38:23 | Zevv | why is it that repr does not simply use `$` where available? for example, I just noticed there is two different pieces of code for converting a seq[T] to a text representation? |
15:42:46 | Araq | repr uses RTTI and the RTTI has no VTable entry for $ |
15:44:49 | * | rnrwashere joined #nim |
15:47:21 | Zevv | ah ok, that makes sense, thanks |
15:50:33 | Zevv | but then again, could `$` not delegate to repr where appropriate? |
15:51:42 | * | vlad1777d quit (Ping timeout: 245 seconds) |
16:01:37 | krux02 | Zevv you can overload `$` to use `repr` if you want that. |
16:02:50 | krux02 | But I personally don't do that, I use `repr` for printing ast macros exclusively. |
16:03:06 | krux02 | everything else is `$` |
16:10:28 | Zevv | I just happened to look at the set dumpers. I was trying to make sets with adjecent values print more friendly, so {3..50} instead of enumerating all members of the set. Then I found I need to do that twice |
16:11:01 | * | neceve quit (Read error: Connection reset by peer) |
16:49:59 | * | sokos joined #nim |
16:51:28 | sokos | hello i am having a problem. I tried installing different libraries for nim sdl/sdl2 and they all say that couldn't load SDL2.dll |
16:51:38 | sokos | windows 10 64 bit |
16:51:52 | * | Tyresc joined #nim |
16:52:12 | dom96 | sokos, do you have sdl2.dll in your path? |
16:52:13 | krux02 | which sdl binding do you use? |
16:52:54 | sokos | wow thx for the quick response no i don't have sd2 in my path i didn't think that i should do that |
16:53:01 | sokos | sorry trying it now |
16:53:10 | krux02 | Zevv: sorry about that. ``repr`` is historical baggage. It is still there, it still works, but ``$`` basically replaced it. |
16:54:47 | sokos | wait i have sdl2.dll in C:\nim-0.19.4\bin which it is in my path should i have it like this "C:\nim-0.19.4\bin\sdl2.dll"? |
16:55:21 | krux02 | you should put the dll next to the executable |
16:55:46 | krux02 | it is abuot the library path (different from the PATH where the executables are) |
16:56:25 | krux02 | with executable I mean your program executable not nim.exe |
16:57:18 | sokos | aaaaah thank you yes that worked i thought if i putted globally it should work too but its ok |
16:57:56 | Zevv | krux02: no needs to apologize :) I was just wondering about the why, and this makes perfect sense |
17:12:46 | I_Right_I | sokos: Just wondering if you have every tried Raylib? |
17:13:03 | sokos | no is it good? i want to |
17:13:28 | sokos | just another silly question the dlls have to be 64 bit ? or can they be 32? |
17:14:09 | I_Right_I | if your making a 2d game raylibs awesome |
17:14:31 | I_Right_I | I havent done 3d with it yet |
17:14:43 | sokos | i am making a copy of powder toy to learn nim better i have the basics ready but i want more |
17:14:51 | sokos | so i will give it a try now |
17:15:27 | I_Right_I | do you know c? |
17:17:21 | sokos | yes and c++ not too advanced though just enough for pointers threads e.t.c |
17:17:49 | sokos | right now i was trying to use nico |
17:17:50 | I_Right_I | okay I figured if you were good with sdl2 |
17:18:03 | sokos | yesh |
17:18:19 | * | stefanos82 joined #nim |
17:18:37 | I_Right_I | but just in case they were sdl2 nim tutorials you were going off from |
17:21:12 | sokos | i know the basics of sdl2 the problem is that for some reason windows 10 are slow to understand that the path variable has changed or there are more files there and sometimes when i was installing nim and trying to run nim/nimble it was saying it doesn't exist while paths were correct. after some time i just run it again and it works |
17:21:25 | sokos | so 80% a windows problem |
17:28:31 | sokos | yep its a windows problem everything works fine now btw i LOVE nim good work on making this incredible language |
17:30:47 | * | uptime quit (Ping timeout: 252 seconds) |
17:35:17 | * | Trustable quit (Remote host closed the connection) |
17:36:51 | * | Jesin quit (Quit: Leaving) |
17:38:26 | I_Right_I | sokos: I think these are the bindings I used for raylib ---> https://github.com/r00ster91/raylib-Nim |
17:39:13 | * | uptime joined #nim |
17:40:24 | sokos | I_Right_I: wow I wish I knew that Raylib existed back then when I was learning sfml and sdl/sdl2 thanks still thought its really nice library |
17:41:53 | * | jjido joined #nim |
17:43:24 | sealmove | planetis: Wow, "interfaced" looks really cool! I still don't understand the business with VTable. Time to study it! |
17:43:35 | * | Jesin joined #nim |
17:44:15 | I_Right_I | sokos: so the bindings that I used are ---> https://github.com/define-private-public/raylib-Nim |
17:45:08 | I_Right_I | but the other one I havent tried is a fork an seams to be more up to date |
17:45:52 | sokos | will test them thank you |
17:47:10 | * | noeontheend quit (Ping timeout: 250 seconds) |
17:49:14 | I_Right_I | sokos: Also I have written a thread pooled UDP socket library in nim with a very simple interface. I should be publishing it in a few days, if you interested. |
17:50:17 | sokos | I don't think I will be at the moment but for sure in the future |
17:53:14 | I_Right_I | sokos: well happy coding! |
17:54:04 | sokos | you too and everyone :D thank you for your help |
17:58:12 | * | enthus1ast joined #nim |
18:07:43 | * | sokos quit (Quit: Page closed) |
18:10:12 | FromDiscord | <Skaruts> is it possible to make a proc that accepts an argument of unknown type? |
18:11:08 | FromDiscord | <Skaruts> I'm trying to make a callback functionality for ui buttons |
18:14:11 | FromDiscord | <Skaruts> and I'm thinking, anything could be thrown at a button for a callback... (or at least that how python made me think of it) |
18:14:48 | FromDiscord | <Skaruts> and I'm thinking, anything could be thrown at a button for a callback, alongside arguments of any type... (or at least that how python made me think of it) |
18:22:38 | Araq | callbacks usually use closures |
18:23:55 | Araq | that can capture stuff and hide it in the closure, type erasure |
18:29:37 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:32:04 | sealmove | hey I have a simple question. what's the difference between `ref object` and `ref object of RootObj`? |
18:33:58 | * | nsf quit (Quit: WeeChat 2.4) |
18:35:07 | Zevv | ha ha |
18:35:43 | xace | hahahaha |
18:36:04 | sealmove | :3 what? |
18:36:11 | Zevv | I wondered that for a long time, why does an object need to be of RootObj to be inheritable. I stopped using inheritance anyway :) |
18:37:07 | Zevv | And why {.base.}? |
18:37:16 | * | Arlenx quit (Ping timeout: 268 seconds) |
18:37:34 | Zevv | I believe Araq himself is not too happy with that as well |
18:41:43 | sealmove | I haven't used objects much, so it was a genuine question :p From what you said, `of RootObj` means it becomes inheritable (it's not by default?). Well, if that's the case, maybe it's not that bad to be explicit about it. |
18:43:07 | sealmove | I think documentation (Nim Manual) doesn't explain it clearly though |
18:47:29 | FromDiscord | <Skaruts> basically I'd like to store arbitrary functions in a sequence, and their corresponding arbitrary arguments in another, and call them whenever the button gets hit |
18:48:44 | FromDiscord | <Skaruts> that's how I did it in python |
18:49:47 | FromDiscord | <Skaruts> I just managed to make a test callback work in Nim, but I'm kinda confused about how to make something that resembled what I made in python |
18:51:04 | FromDiscord | <Skaruts> I just managed to make a test callback work in Nim, but I'm kinda confused about how to make something that resembles what I made in python |
18:53:58 | sealmove | oh, krux explained vtable 3 years ago: https://forum.nim-lang.org/t/2422 |
19:01:45 | * | sealmove quit (Quit: WeeChat 2.4) |
19:10:10 | * | clyybber joined #nim |
20:02:41 | * | clyybber quit (Quit: WeeChat 2.4) |
20:17:09 | * | rnrwashere quit (Remote host closed the connection) |
20:17:59 | * | rnrwashere joined #nim |
20:20:33 | * | noonien quit (Ping timeout: 252 seconds) |
20:21:30 | * | noonien joined #nim |
20:23:37 | * | Trustable joined #nim |
20:27:28 | * | lf-araujo joined #nim |
20:31:28 | * | noeontheend joined #nim |
20:32:45 | * | abm joined #nim |
20:39:04 | * | natrys quit (Ping timeout: 250 seconds) |
20:42:23 | * | natrys joined #nim |
20:54:10 | * | abm quit (Ping timeout: 255 seconds) |
21:09:30 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
21:10:00 | * | rnrwashere quit (Remote host closed the connection) |
21:14:10 | * | bobby quit (Ping timeout: 250 seconds) |
21:14:48 | * | bobby joined #nim |
21:28:51 | * | bobby quit (Remote host closed the connection) |
21:30:01 | * | bobby joined #nim |
21:31:44 | * | Trustable quit (Remote host closed the connection) |
21:40:28 | * | jjido joined #nim |
21:43:40 | * | bobby quit (Remote host closed the connection) |
21:44:15 | * | lf-araujo quit (Read error: Connection reset by peer) |
21:44:31 | * | narimiran quit (Remote host closed the connection) |
21:44:51 | * | bobby joined #nim |
22:06:14 | * | rnrwashere joined #nim |
22:12:29 | * | theelous3_ quit (Ping timeout: 268 seconds) |
22:45:02 | * | natrys quit (Quit: natrys) |
22:48:03 | * | solitudesf quit (Ping timeout: 246 seconds) |
22:56:04 | * | krux02 quit (Remote host closed the connection) |
22:57:52 | * | rnrwashere quit (Remote host closed the connection) |
23:13:22 | * | lf-araujo joined #nim |
23:21:23 | * | Snircle joined #nim |
23:31:55 | * | lf-araujo quit (Ping timeout: 246 seconds) |
23:34:39 | * | kapil____ quit (Quit: Connection closed for inactivity) |
23:34:50 | * | lf-araujo joined #nim |
23:41:57 | * | sentreen quit (Ping timeout: 246 seconds) |
23:42:11 | * | sentreen joined #nim |
23:43:46 | * | rnrwashere joined #nim |
23:45:42 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:49:23 | * | sentreen_ joined #nim |
23:52:20 | * | sentreen quit (Ping timeout: 250 seconds) |