00:06:18 | * | couven92 quit (Quit: Client Disconnecting) |
00:17:36 | * | cyberjpn quit (Ping timeout: 258 seconds) |
00:31:02 | * | ng0 quit (Remote host closed the connection) |
00:32:03 | * | ng0 joined #nim |
00:43:05 | * | cyberjpn joined #nim |
01:05:17 | shashlick_ | something in devel has broken winim - https://github.com/khchen/winim/issues/39 |
01:19:42 | * | deech quit (Ping timeout: 258 seconds) |
01:22:03 | * | libman[m] quit (Ping timeout: 248 seconds) |
01:22:04 | * | Miguelngel[m] quit (Ping timeout: 248 seconds) |
01:22:04 | * | isaac[m]1 quit (Ping timeout: 248 seconds) |
01:22:05 | * | serialdev[m] quit (Ping timeout: 248 seconds) |
01:22:05 | * | TheKing[m] quit (Ping timeout: 248 seconds) |
01:22:07 | * | flaviut[m] quit (Ping timeout: 252 seconds) |
01:22:08 | * | junk[m] quit (Ping timeout: 252 seconds) |
01:22:11 | * | gh0st[m] quit (Ping timeout: 252 seconds) |
01:22:11 | * | Connor[m] quit (Ping timeout: 252 seconds) |
01:22:11 | * | xomachine[m] quit (Ping timeout: 252 seconds) |
01:22:14 | * | zielmicha[m]1 quit (Ping timeout: 250 seconds) |
01:22:14 | * | yglukhov[m] quit (Ping timeout: 250 seconds) |
01:22:14 | * | narimiran[m] quit (Ping timeout: 250 seconds) |
01:22:18 | * | sg-james[m] quit (Ping timeout: 252 seconds) |
01:22:18 | * | federico3[m] quit (Ping timeout: 252 seconds) |
01:22:18 | * | leorize[m] quit (Ping timeout: 252 seconds) |
01:22:30 | * | jugash[m] quit (Ping timeout: 252 seconds) |
01:22:30 | * | GitterIntegrati4 quit (Ping timeout: 252 seconds) |
01:22:30 | * | dyce[m] quit (Ping timeout: 275 seconds) |
01:22:36 | * | Demos[m] quit (Ping timeout: 248 seconds) |
01:22:40 | * | macsek1911[m] quit (Ping timeout: 252 seconds) |
01:22:40 | * | xylef quit (Ping timeout: 252 seconds) |
01:22:45 | * | Manny8888 quit (Ping timeout: 250 seconds) |
01:22:50 | * | TheManiac[m] quit (Ping timeout: 252 seconds) |
01:22:53 | * | k0mpjut0r quit (Ping timeout: 264 seconds) |
01:22:54 | * | sendell[m] quit (Ping timeout: 264 seconds) |
01:22:54 | * | BitPuffin quit (Ping timeout: 264 seconds) |
01:23:02 | * | lqdev[m] quit (Ping timeout: 276 seconds) |
01:23:02 | * | spymasterd[m] quit (Ping timeout: 276 seconds) |
01:23:02 | * | forkbomb9[m] quit (Ping timeout: 276 seconds) |
01:23:07 | * | pqflx3[m] quit (Ping timeout: 248 seconds) |
01:23:07 | * | ArchieT[m] quit (Ping timeout: 248 seconds) |
01:23:40 | * | planetis[m] quit (Ping timeout: 276 seconds) |
01:27:20 | * | rnrwashere joined #nim |
01:31:45 | * | rnrwashere quit (Ping timeout: 250 seconds) |
01:36:48 | * | rnrwashere joined #nim |
01:41:57 | * | beatmox_ joined #nim |
01:42:04 | * | sendell[m] joined #nim |
01:42:04 | * | euantor quit (Ping timeout: 264 seconds) |
01:42:20 | * | euantor joined #nim |
01:42:40 | * | AlexMax quit (Ping timeout: 264 seconds) |
01:43:16 | * | odc quit (Ping timeout: 264 seconds) |
01:46:03 | * | odc joined #nim |
01:48:06 | * | AlexMax joined #nim |
01:48:33 | * | l1x quit (*.net *.split) |
01:48:33 | * | xace quit (*.net *.split) |
01:48:33 | * | bobby quit (*.net *.split) |
01:48:33 | * | beatmox quit (*.net *.split) |
01:48:33 | * | deepend quit (*.net *.split) |
01:48:33 | * | joshbaptiste quit (*.net *.split) |
01:48:33 | * | Lord_Nightmare quit (*.net *.split) |
01:48:33 | * | ikan-keli_ quit (*.net *.split) |
01:48:33 | * | jxy quit (*.net *.split) |
01:48:33 | * | hogeland quit (*.net *.split) |
01:48:33 | * | sknebel quit (*.net *.split) |
01:52:23 | FromGitter | <jrfondren> @lqdev, are you sure you're using the right library? that's appropriate for `regex` but not for `re` |
01:54:03 | * | deech joined #nim |
01:54:42 | * | cyberjpn quit (Ping timeout: 246 seconds) |
01:58:53 | * | leorize[m] joined #nim |
02:01:10 | * | banc quit (Quit: Bye) |
02:02:51 | * | federico3[m] joined #nim |
02:05:28 | * | sg-james[m] joined #nim |
02:08:56 | FromDiscord | <Avatarfighter> dom96, if you're still here can I ask you some questions about the pcap wrapper on your github by any chance? I'm trying to add more types to the wrapper, but I just wanted to know how you were able to identify when to set a type to be a pointer of an object versus just setting a type to be an object.? |
02:09:00 | * | dyce[m] joined #nim |
02:11:34 | * | pqflx3[m] joined #nim |
02:13:36 | * | Connor[m] joined #nim |
02:13:49 | * | gh0st[m] joined #nim |
02:14:16 | * | narimiran[m] joined #nim |
02:15:18 | * | xomachine[m] joined #nim |
02:15:39 | * | ArchieT[m] joined #nim |
02:16:34 | * | flaviut[m] joined #nim |
02:16:43 | * | zielmicha[m]1 joined #nim |
02:16:58 | * | BitPuffin joined #nim |
02:16:59 | * | serialdev[m] joined #nim |
02:17:17 | * | yglukhov[m] joined #nim |
02:17:24 | * | isaac[m]1 joined #nim |
02:17:50 | * | Miguelngel[m] joined #nim |
02:18:54 | * | macsek1911[m] joined #nim |
02:19:13 | * | libman[m] joined #nim |
02:19:17 | * | TheKing[m] joined #nim |
02:20:29 | * | k0mpjut0r joined #nim |
02:21:25 | * | GitterIntegrati4 joined #nim |
02:23:38 | * | banc joined #nim |
02:23:52 | * | Manny8888 joined #nim |
02:24:05 | * | jugash[m] joined #nim |
02:24:07 | * | planetis[m] joined #nim |
02:25:24 | * | junk[m] joined #nim |
02:25:33 | * | Demos[m] joined #nim |
02:25:39 | * | xylef joined #nim |
02:25:56 | * | TheManiac[m] joined #nim |
02:26:50 | * | spymasterd[m] joined #nim |
02:26:52 | * | lqdev[m] joined #nim |
02:27:47 | * | forkbomb9[m] joined #nim |
02:32:15 | * | rnrwashere quit (Remote host closed the connection) |
02:45:16 | * | l1x joined #nim |
02:45:17 | * | xace joined #nim |
02:45:17 | * | bobby joined #nim |
02:45:17 | * | deepend joined #nim |
02:45:17 | * | joshbaptiste joined #nim |
02:45:17 | * | Lord_Nightmare joined #nim |
02:45:17 | * | ikan-keli_ joined #nim |
02:45:17 | * | jxy joined #nim |
02:45:17 | * | hogeland joined #nim |
02:45:17 | * | sknebel joined #nim |
02:49:33 | * | rnrwashere joined #nim |
02:55:21 | shashlick_ | He must be asleep - what line you looking at |
02:57:11 | * | cornfeedhobo quit (Remote host closed the connection) |
03:01:15 | * | kapilp joined #nim |
03:04:21 | * | rnrwashere quit (Remote host closed the connection) |
03:05:42 | * | cornfeedhobo joined #nim |
03:18:26 | * | deech quit (Remote host closed the connection) |
03:18:50 | * | deech joined #nim |
03:19:32 | * | rnrwashere joined #nim |
03:20:54 | * | rnrwashere quit (Remote host closed the connection) |
03:22:36 | * | rnrwashere joined #nim |
03:42:16 | * | deech quit (Ping timeout: 255 seconds) |
04:19:34 | * | rnrwashere quit () |
04:56:18 | * | rnrwashere joined #nim |
05:05:16 | * | narimiran joined #nim |
05:44:22 | * | rnrwashere quit (Remote host closed the connection) |
05:44:58 | * | rnrwashere joined #nim |
05:49:24 | * | rnrwashere quit (Ping timeout: 252 seconds) |
05:53:38 | FromGitter | <Bennyelg> How Do I get the template / proc Name on compilation time |
05:57:38 | shashlick_ | https://github.com/nimterop/nimterop/blob/master/nimterop/cimport.nim#L204 |
05:57:46 | shashlick_ | that's how i did it in nimterop |
06:09:58 | FromDiscord | <Avatarfighter> shashlick are you still here by any chance? |
06:10:22 | FromDiscord | <Avatarfighter> just kidding got it |
06:12:25 | shashlick_ | i'm here regardless 🙂 |
06:19:46 | * | cyberjpn2 joined #nim |
06:30:57 | FromDiscord | <Avatarfighter> So basically what I learned is that if a C header file has something along the lines of `typedef struct pcap pcap_t` when defining it as a type you have to set it equal to `ptr object` and when something says `struct pcap_stat` it should be set to an object |
06:33:19 | leorize | Avatarfighter: actually those two are the same kind of definitions... |
06:33:23 | * | solitudesf joined #nim |
06:33:25 | FromDiscord | <Avatarfighter> ah |
06:33:27 | FromDiscord | <Avatarfighter> welp |
06:33:30 | FromDiscord | <Avatarfighter> til |
06:33:32 | leorize | they should both be an object |
06:33:40 | FromDiscord | <Avatarfighter> Alrighty uhm |
06:33:43 | FromDiscord | <Avatarfighter> can I ask a question then |
06:33:48 | leorize | typedef is C version of `type Alias = int` in Nim |
06:33:50 | leorize | sure |
06:34:22 | FromDiscord | <Avatarfighter> why is this(https://github.com/dom96/pcap/blob/master/src/pcap/wrapper.nim#L13) set as a pointer of an object |
06:34:25 | * | cyberjpn2 quit (Ping timeout: 258 seconds) |
06:35:05 | FromDiscord | <Avatarfighter> the header file defines it as `typedef struct pcap pcap_t;` |
06:35:32 | shashlick_ | seems wrong |
06:35:55 | FromDiscord | <Avatarfighter> huh |
06:36:10 | FromDiscord | <Avatarfighter> ok |
06:36:19 | FromDiscord | <Avatarfighter> I guess I'll write that down, thank you guys 😄 |
06:36:38 | leorize | yea that's wrong |
06:36:54 | leorize | I guess the rationale was that the ptr is always used |
06:37:08 | leorize | but I don't think Nim works like that |
06:37:10 | * | cyberjpn2 joined #nim |
06:38:00 | FromDiscord | <Avatarfighter> That kind of makes sense lol |
06:38:24 | leorize | shashlick_: is there any notable changes in nimterop? :p I haven't used it for awhile |
06:39:10 | shashlick_ | i made several improvements last week |
06:40:07 | shashlick_ | https://github.com/nimterop/nimterop/commits/master |
06:40:11 | shashlick_ | many since may 4th |
06:40:53 | shashlick_ | several bug fixes, output cleanup, render comments in output |
06:41:02 | shashlick_ | dynlib support |
06:41:11 | FromDiscord | <Avatarfighter> I wonder if one could make jailbreak tweaks using nim |
06:41:22 | FromDiscord | <Avatarfighter> since it compiles to objc you could probably do it |
06:41:39 | shashlick_ | starter templates |
06:43:58 | FromDiscord | <Avatarfighter> alrighty guys ground breaking news |
06:44:26 | FromDiscord | <Avatarfighter> you definitely need `ptr object` or less nim will spit out so many errors you'll actually cry |
06:45:00 | leorize | if you remove `ptr` from pcap_t, prepend it to every instance of pcap_t in the wrapper :p |
06:46:04 | * | rnrwashere joined #nim |
06:46:16 | FromDiscord | <Avatarfighter> that also works |
06:46:18 | FromDiscord | <Avatarfighter> wow |
06:46:26 | FromDiscord | <Avatarfighter> Which is considered more correct though? |
06:46:41 | leorize | the prepend `ptr` to everything I believe |
06:46:57 | FromDiscord | <Avatarfighter> I'm assuming prepending ptr is because of how you guys said that `ptr object` was incorrect |
06:47:12 | FromDiscord | <Avatarfighter> alrighty thank you guys 😄 |
06:47:35 | shashlick_ | @leorize - any of those features of interest to you? i like the comment feature - makes wrappers very interesting |
06:47:49 | leorize | hmm, I thought {.header.} + {.importc.} would replace the identifier with the importc-ed identifier |
06:48:17 | leorize | never thought you could put `ptr object` to convert it to `ptr pcap_t` |
06:48:30 | shashlick_ | check out the llvm wrapper it came up with - http://ix.io/1Itq/nim |
06:48:39 | leorize | shashlick_: I'm looking at the code :P |
06:48:48 | leorize | why would you want to run configure though? |
06:49:09 | shashlick_ | when you check out code from github, you need to configure it for your local system |
06:49:22 | leorize | not really |
06:49:25 | shashlick_ | sometimes you need some header.h to be generated |
06:49:41 | shashlick_ | i was hard-coding in nimgen and few nimterop wrappers |
06:49:48 | leorize | I think it'd be nice to be able to pass arguments to configure |
06:49:51 | shashlick_ | is easier with configure, at least on posix |
06:49:59 | leorize | sometimes you'd need `--enable-sdl` for example |
06:50:01 | shashlick_ | i agree - need to add that |
06:50:26 | leorize | the comment feature looks cool |
06:50:39 | leorize | now we only need a doxygen parser to convert those into Nim :p |
06:52:22 | leorize | shashlick_: does nimterop support `ptr ptr` yet? |
06:52:33 | shashlick_ | yes |
06:52:40 | shashlick_ | but not ptr ptr ptr 😛 |
06:52:54 | leorize | nice, also is there anyway to omit the `{.header.}`? |
06:53:05 | shashlick_ | if you use dynlib, header goes away |
06:53:06 | leorize | at least I could now get rid of the 10 manually imported symbols :P |
06:53:16 | shashlick_ | header is also only once at the top |
06:53:35 | shashlick_ | unless symbols get renamed |
06:53:36 | leorize | nice, I wanted to try the cpp backend but `{.header.}` gets in the way |
06:55:30 | * | kapilp quit (Quit: Connection closed for inactivity) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:02:16 | * | rnrwashe_ joined #nim |
07:04:23 | * | rnrwashere quit (Ping timeout: 258 seconds) |
07:04:45 | * | gmpreussner joined #nim |
07:12:02 | * | kapilp joined #nim |
07:16:40 | * | rnrwashe_ quit (Remote host closed the connection) |
07:19:17 | FromDiscord | <Avatarfighter> I have a silly question, if I want to pass the pointer of an object to a proc do I pass it as `addr(object)` or is there another way, the object in question is defined by me in a variable |
07:19:36 | leorize | addr |
07:19:43 | leorize | that's the correct way |
07:19:56 | FromDiscord | <Avatarfighter> sweet, thank you |
07:20:14 | narimiran | Avatarfighter what are you trying to do with that object in your proc? just modify some fields? |
07:21:14 | FromDiscord | <Avatarfighter> im not entirely sure tbh, its a wrapper for the function https://www.tcpdump.org/manpages/pcap_compile.3pcap.html I just saw that it needed a ptr for a bpf_program and that is what i'm supplying atm |
07:21:20 | * | arecaceae quit (Remote host closed the connection) |
07:21:33 | FromDiscord | <Avatarfighter> or at least trying to supply lol |
07:21:39 | * | arecaceae joined #nim |
07:21:57 | narimiran | ah, ok. i was going to suggest trying with `var MyObject` |
07:22:27 | FromDiscord | <Avatarfighter> I thought about that haha |
07:23:47 | FromDiscord | <Avatarfighter> I just gotta figure out why nim is crying about bpf.h now :L |
07:23:51 | leorize | shashlick_: looks like nimterop can't translate this: |
07:23:52 | leorize | Error: target STRING not available |
07:23:54 | leorize | ack |
07:23:58 | leorize | struct kmod_ctx *kmod_new(const char *dirname, const char * const *config_paths); |
07:25:57 | FromDiscord | <Avatarfighter> have any of you guys had issues with compiling a wrapped c lib and the compiler says that its unhappy bc of `error: unknown type name 'u_short'` |
07:26:26 | leorize | nope, but the issue seems to be from the wrapper |
07:26:44 | FromDiscord | <Avatarfighter> lit lmoa |
07:26:47 | leorize | change it into cushort |
07:28:28 | FromDiscord | <Avatarfighter> hmm the issue persists, i think its an issue with my type but it should be correct :L |
07:28:29 | shashlick_ | @leorize -seems to work fine here in isolation |
07:29:05 | shashlick_ | proc kmod_new*(dirname: cchar, config_paths: cstring): ptr kmod_ctx {.impaC.} |
07:29:05 | leorize | hmm, weird |
07:29:17 | shashlick_ | what are you wrapping |
07:29:22 | leorize | kmod |
07:29:32 | shashlick_ | what's the full error? |
07:29:37 | leorize | it should also be available on your pc if you're running linux |
07:29:44 | leorize | there aren't any error, the symbol is not there |
07:30:21 | leorize | shashlick_: also that's a wrong translation |
07:30:57 | shashlick_ | what's your wrapper look like |
07:31:40 | leorize | http://ix.io/1IMq |
07:32:13 | shashlick_ | meh i don't have libkmod on ubuntu? |
07:32:28 | leorize | you should |
07:32:33 | leorize | it's already installed by default |
07:32:39 | shashlick_ | ok i had to install headers |
07:37:16 | * | nsf joined #nim |
07:40:36 | FromDiscord | <Avatarfighter> Could you guys tell me if the type I defined in https://hastebin.com/oricuhewov.cpp is the same as the struct above it, I'm getting a compilation issue but i'm pretty sure that it's the same thing |
07:41:49 | FromDiscord | <Avatarfighter> bpf_u_int32 is a typedef of uint32 |
07:45:06 | shashlick_ | @leorize - compiles for me |
07:45:51 | shashlick_ | http://ix.io/1IMs/Nim |
07:46:34 | leorize | shashlick_: kmod_new is missing |
07:47:28 | * | dddddd quit (Remote host closed the connection) |
07:50:27 | narimiran | "lib/pure/hashes.nim(188, 7) Error: redefinition of 'i'; previous declaration here: lib/pure/hashes.nim(188, 6)" !?!? no, it was not defined one character before |
07:52:04 | shashlick_ | @leorize - i think it worked earlier since i hadn't recompiled toast on my linux machine |
07:52:09 | shashlick_ | looks like something is broken |
07:56:56 | FromGitter | <mratsim> So now nimterop has ./configure support? |
07:56:58 | FromGitter | <mratsim> nice |
08:02:31 | shashlick_ | @leorize - i missed two of the * in your code paste, that's why it worked |
08:02:38 | shashlick_ | `const char * const *` |
08:04:43 | * | tdc joined #nim |
08:05:17 | shashlick_ | does this wrapper look right - `struct kmod_ctx *kmod_new(const char *dirname, const char * const *config_paths);` |
08:05:48 | shashlick_ | => `proc kmod_new*(dirname: cstring, config_paths: ptr cstring): ptr kmod_ctx {.impcC.}` |
08:05:53 | FromDiscord | <Avatarfighter> omg |
08:05:57 | FromDiscord | <Avatarfighter> i solveed my issue |
08:06:08 | FromDiscord | <Avatarfighter> wasn't even a wrapper issue 😎 |
08:13:31 | FromDiscord | <Avatarfighter> Do any of yall know what generally causes this type of error? `malloc: *** error for object 0x408: pointer being freed was not allocated` |
08:16:19 | shashlick_ | @leorize - i'm pushing tht fix for now, let me know if any concerns - time for bed |
08:16:57 | FromDiscord | <Avatarfighter> cya shashlick, it was nice meeting you today |
08:17:05 | shashlick_ | tc |
08:18:16 | FromGitter | <mratsim> @Avatarfighter, double free |
08:19:53 | FromGitter | <mratsim> !eval let p = alloc(10); dealloc(p); dealloc(p) |
08:19:55 | NimBot | <no output> |
08:20:45 | FromGitter | <mratsim> mmm does Nimbot redirect stderr? |
08:24:51 | * | tdc quit (Ping timeout: 244 seconds) |
08:25:07 | * | tdc joined #nim |
08:28:48 | * | jjido joined #nim |
08:32:49 | narimiran | hey @mratsim! i need your help: i'm trying to make new hashing work in VM, but i'm getting some strange errors when bootstraping |
08:33:38 | narimiran | i'm not sure what's wrong. should i ditch templates and just use procs, would that make any difference? |
08:35:26 | shashlick_ | @leorize - updated wrapper with fix - http://ix.io/1IMN/nim |
08:43:58 | * | cyberjpn2 quit (Ping timeout: 244 seconds) |
08:51:29 | * | cyberjpn2 joined #nim |
09:01:01 | * | cyberjpn2 quit (Ping timeout: 244 seconds) |
09:03:17 | * | xet7 quit (Quit: Leaving) |
09:12:00 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:28:53 | * | neceve joined #nim |
09:31:45 | * | neceve quit (Remote host closed the connection) |
09:32:23 | * | neceve joined #nim |
09:34:07 | * | jjido joined #nim |
09:41:20 | * | laaron quit (Remote host closed the connection) |
09:41:22 | * | narimiran quit (Ping timeout: 255 seconds) |
09:44:05 | * | laaron joined #nim |
09:55:42 | * | clyybber joined #nim |
09:58:02 | * | stefanos82 joined #nim |
09:59:39 | clyybber | narimiran: Those test failures really don't make too much sense... |
10:05:30 | * | kapilp quit (Quit: Connection closed for inactivity) |
10:16:57 | * | nsf quit (Quit: WeeChat 2.4) |
10:37:56 | * | cyberjpn2 joined #nim |
11:02:25 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:22:31 | * | cyberjpn2 quit (Ping timeout: 246 seconds) |
11:34:02 | * | dddddd joined #nim |
11:37:25 | * | clyybber quit (Quit: WeeChat 2.4) |
11:47:41 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
11:49:48 | * | laaron joined #nim |
12:14:11 | * | clyybber joined #nim |
12:16:01 | * | Kaivo_ joined #nim |
12:17:22 | * | Kaivo quit (Remote host closed the connection) |
12:18:25 | * | Kaivo_ quit (Client Quit) |
12:19:50 | * | Kaivo joined #nim |
12:21:30 | * | nsf joined #nim |
12:22:40 | * | bars0 joined #nim |
12:24:23 | * | xet7 joined #nim |
12:35:57 | * | bars0 quit (Ping timeout: 244 seconds) |
12:41:34 | * | theelous3 joined #nim |
12:43:08 | * | nsf quit (Quit: WeeChat 2.4) |
12:44:36 | * | cyberjpn2 joined #nim |
13:02:08 | dom96 | Quiet here today, how's everybody doing? |
13:12:50 | leorize | dom96: how do you think about making nimble work regardless of where you are in your project? |
13:14:10 | dom96 | I'm a little against it, https://github.com/nim-lang/nimble/issues/518 |
13:14:19 | FromGitter | <zetashift> @dom86 finally got time for programming again! I'm trying to get the warning `{.this.} pragma is deprecated` off godot-nim and learning Elixir, how about you? |
13:14:41 | FromGitter | <zetashift> Also did some bioinformatics with Nim instead of python which is always great |
13:15:55 | dom96 | Nice :) |
13:19:18 | * | theelous3 quit (Ping timeout: 246 seconds) |
13:19:29 | dom96 | I'm trying to stop myself procrastinating |
13:19:33 | dom96 | and work on one of my projects |
13:25:29 | FromGitter | <jrfondren> try playing chicken with your procrastination. If you needed to cut some wood, this would mean getting dressed up, grabbing an axe, going to where the wood is, stacking a piece up to cut, and then--either cutting the wood, or setting the axe down and going back inside to do something else. |
13:25:51 | FromGitter | <jrfondren> as long as you keep it in mind that you aren't *necessarily* going to cut anything, the earlier steps are easy. You picked up the axe--so what? You can just put it back down again. |
13:26:32 | FromGitter | <jrfondren> But as you get closer to the cutting, just going ahead with that will seem like the easier course of action. You'd feel silly just stopping at the end. And by then there's a lot of work you have to do just to do something else. |
13:27:38 | FromGitter | <jrfondren> the usual danger is not that you'll start and then stop, but that you'll never start at all. Or that you'll pretend that some delaying tactic is a preparation tactic. The woodcutting isn't delayed by the sharpening of the axe, but it's certainly delayed by admiring the axe, or by going handle shopping. |
13:29:52 | FromGitter | <mratsim> "The woodcutting isn't delayed by the sharpening of the axe." --> lovely Chinese proverb |
13:31:30 | FromGitter | <mratsim> @dom96: Try scheduling hackernews at specific times :P |
13:33:49 | * | Kaivo quit (Quit: WeeChat 2.4) |
13:35:21 | * | Kaivo joined #nim |
13:38:08 | * | nsf joined #nim |
13:38:59 | * | abm joined #nim |
13:40:56 | * | vlad1777d_ joined #nim |
13:41:42 | * | nsf quit (Client Quit) |
13:41:56 | * | laaron quit (Remote host closed the connection) |
13:42:38 | * | nsf joined #nim |
13:44:13 | * | laaron joined #nim |
13:45:46 | dom96 | jrfondren: wow, great advice :) |
13:48:32 | dom96 | @mratsim: are you spying on me?! :O |
13:54:07 | FromGitter | <mratsim> When you don't tart discussions about Nim, you start them about an article you read on HN ;) |
13:54:17 | dom96 | lol |
13:56:59 | FromGitter | <arnetheduck> @narimiran a bunch of nice showstopper fixes just made it to devel.. is there a plan for backporting? how do backports get selected/nominated in general? |
13:57:33 | FromGitter | <mratsim> @arnetheduck @narimiran asked on Friday if we wanted some fixes in the 0.19.6 backport |
13:59:06 | * | traviss joined #nim |
14:01:32 | FromGitter | <arnetheduck> oh, missed that.. well, clyybber did a bunch, like https://github.com/nim-lang/Nim/issues/9684, https://github.com/nim-lang/Nim/issues/9844, https://github.com/nim-lang/Nim/issues/9825 .. but the point was more whether there's some established way of nominating them - asking in gitter seems demonstrably fragile :) |
14:02:30 | FromGitter | <mratsim> Maybe when backport season is up, @narimiran should open a pinned issue so that everyone can see and ask for backports |
14:02:54 | dom96 | Thought there was going to be a 0.20 release today, guess now D: |
14:02:56 | FromGitter | <mratsim> or have one always open, that we close upon release and we open a new one |
14:02:58 | dom96 | *guess not |
14:03:16 | FromGitter | <mratsim> no 0.20 is delayed by the new TODO list on destructors that Araq posted on Thursday |
14:03:22 | FromGitter | <mratsim> only 0.19.6 I think |
14:05:01 | * | laaron quit (Remote host closed the connection) |
14:05:41 | * | traviss quit (Quit: Leaving) |
14:06:13 | * | traviss joined #nim |
14:06:45 | * | laaron joined #nim |
14:07:01 | * | cyberjpn2 quit (Ping timeout: 246 seconds) |
14:07:17 | FromGitter | <arnetheduck> even with 0.20 out, backports are useful if ever you want to show projects that they can start relying on nim for slightly longer term stuff |
14:08:02 | dom96 | Indeed |
14:08:07 | FromGitter | <mratsim> They won't disappear |
14:08:32 | * | nsf quit (Quit: WeeChat 2.4) |
14:09:09 | FromGitter | <arnetheduck> and fwiw, yes, we're changing the `async` api - another reason that we forked and renamed it - it's easier to develop the library to where we want it if we don't have to consider backwards compat |
14:12:49 | * | clyybber quit (Quit: WeeChat 2.4) |
14:14:20 | * | sz0 joined #nim |
14:22:17 | * | xet7 quit (Remote host closed the connection) |
14:23:31 | dom96 | Nim compiler messages really are improving, thank you to those that made those improvements |
14:23:43 | dom96 | Beautiful: "Error: not all cases are covered; missing: {Disconnect}" |
14:25:33 | Zevv | arnetheduck: is there a roadplan or description somewhere for the async reworking? |
14:28:20 | leorize | dom96: I kinda want the nimble feature so that I could figure out what is the project file for me to run nimsuggest on |
14:29:22 | dom96 | leorize: I see. I wouldn't mind including that as its own command |
14:31:04 | leorize | we could expand `nimble dump` to include this information (+ a flag to have nimble search up for a .nimble file) |
14:31:50 | dom96 | `nimble path` might be better |
14:31:59 | dom96 | It already gives you the path to a .nimble file for an installed package |
14:32:06 | * | tdc quit (Ping timeout: 246 seconds) |
14:32:11 | FromGitter | <arnetheduck> Zevv - there's https://github.com/status-im/nim-chronos but it's not up to date, we'll be rewriting it soon.. basically, we're adapting it to the p2p use case where connections are more long-lived and layering it a bit (starting with transports) so one can build streaming protocols easily and a few other things.. |
14:33:27 | Zevv | Ah I looked into chronos a few days ago. So the plan is to integrate chronos into the Nim stdlib? |
14:34:18 | FromGitter | <arnetheduck> presently, no. |
14:37:23 | * | al_ joined #nim |
14:57:31 | FromGitter | <arnetheduck> (you can just get it from that repo, there's no need for std lib integration to use it) |
15:01:28 | * | rnrwashere joined #nim |
15:03:28 | * | rnrwashe_ joined #nim |
15:06:51 | * | rnrwashere quit (Ping timeout: 250 seconds) |
15:09:16 | FromDiscord | <Avatarfighter> Hello everyone! |
15:09:33 | FromGitter | <mratsim> hey |
15:10:51 | FromDiscord | <Avatarfighter> would anyone be able to help me with a wrapper? It's producing a malloc error but I'm not advanced enough to actually debug it |
15:12:24 | FromGitter | <jrfondren> just replicate the bug with as little code as possible and ask about it |
15:12:53 | FromDiscord | <Avatarfighter> I can do that I think haha |
15:13:16 | FromGitter | <mratsim> if it's the one from this morning, you're trying to free a pointer while it doesn't refer to allocated memory |
15:13:28 | FromGitter | <mratsim> or not allocated by the proper process |
15:13:51 | FromDiscord | <Avatarfighter> Yeah its the one from this morning, I don't know what is causing that though I'm not doing anything specific with the pointer :L |
15:15:09 | * | neceve quit (Remote host closed the connection) |
15:15:37 | FromDiscord | <Avatarfighter> here is my wrapper, I'm pretty sure the error is caused by me doing `var filter: bpf_program` but i'm why :L |
15:15:37 | FromDiscord | <Avatarfighter> |
15:15:37 | FromDiscord | <Avatarfighter> https://ghostbin.com/paste/4xsje |
15:18:16 | FromGitter | <mratsim> the first thing that jumps to me is uint, it probably should be uint32 or cuint |
15:18:50 | FromGitter | <mratsim> unless what you're wrapping is uint32 on 32-bit and uint64 on 64-bit |
15:19:33 | FromDiscord | <Avatarfighter> What do you mean by "uint32 on 32-bit and uint64 on 64-bit"? |
15:22:08 | FromGitter | <mratsim> uint and int in Nim are platform dependent |
15:22:37 | FromDiscord | <Avatarfighter> Oh, I didn't realize that, that's pretty cool |
15:22:38 | FromGitter | <mratsim> on 64-bit platforms they are 64-bit and on 32-bit they are 32-bit. Rationale is having the same size as pointers |
15:23:53 | FromGitter | <mratsim> and your bpf_program is using uint, hence why it may break |
15:24:20 | leorize | Avatarfighter: if you want C's uint, use cuint |
15:25:42 | FromDiscord | <Avatarfighter> I'll try with cuints, I need to look into if I'm actually calling the stuff correctly, it might not be my wrapper is wrong it might be that I need a running pcap to actually make a filter expression |
15:25:49 | FromGitter | <mratsim> Also this is wrong "pcap_create(defaultIfName, addr(err))" |
15:26:14 | FromGitter | <mratsim> if you want to pass a pointer to the first element of an array or a string use err[0].addr |
15:26:52 | FromGitter | <mratsim> you probably should use a seq\[byte\] as buffer instead of a string btw |
15:27:19 | leorize | mratsim: the errbuffer is for error messages I think |
15:27:35 | FromGitter | <mratsim> ah I see, then strings are good |
15:27:50 | leorize | anyhow, that errbuf is supposed to be a cstring, not a pointer |
15:29:03 | FromDiscord | <Avatarfighter> I actually have a question about that, would `PCAP_API pcap_t *pcap_create(const char *, char *);` mean that the second parameter is a cstring pointer or just a cstring? |
15:29:08 | FromGitter | <mratsim> is libpcap installed by default on Linux? |
15:29:27 | FromGitter | <mratsim> no second is "pointer" and will accept any pointer |
15:29:38 | leorize | all of them are cstring |
15:29:56 | FromGitter | <mratsim> I have it on my system, should be quick to fix |
15:29:58 | FromDiscord | <Avatarfighter> libpcap should be on linux |
15:30:23 | leorize | in C typed pointers are not much different from untyped one anw :p |
15:30:32 | leorize | well but they should all be cstring |
15:30:58 | FromDiscord | <Avatarfighter> ok 😄 |
15:31:43 | FromDiscord | <Avatarfighter> oh god i think i fixed my issue |
15:31:46 | FromDiscord | <Avatarfighter> this is so dumb |
15:32:17 | FromDiscord | <Avatarfighter> I had to read libpcap docs, basically for pcap_compile to even work you need to pcap_activate a pcap bc pcap_compile needs to know what linklayer to use |
15:32:45 | leorize | nice! but fix your types :p |
15:33:37 | FromDiscord | <Avatarfighter> I fixed them as per your recommendations, thank you guys for taking time to help me it really means a lot ! |
15:34:54 | leorize | looks like using set[enum] for interfacing with C's bitfield is a part of the spec now: https://nim-lang.github.io/Nim/manual#set-type-bit-fields |
15:35:14 | FromGitter | <zetashift> @endragor sorry for the ping but do you have time to look at this PR (again): https://github.com/pragmagic/godot-nim/pull/42 ? |
15:35:24 | * | jjido joined #nim |
15:37:45 | * | al_ quit (Quit: al_) |
15:38:28 | * | nsf joined #nim |
15:39:18 | FromGitter | <mratsim> @Avatarfight, I don't know why libpcap is still using u_int instead of unsigned int in their typedef, can't compile on Linux |
15:39:34 | FromDiscord | <Avatarfighter> oh yeah |
15:39:39 | FromDiscord | <Avatarfighter> go to the header file bpf.h |
15:39:58 | FromGitter | <mratsim> I would probably start with something like that: https://gist.github.com/mratsim/dcc8aa5772357a916e0457cf3be2471d |
15:40:25 | FromDiscord | <Avatarfighter> add `#ifdef __APPLE__ #include <sys/types.h> #end` but change apple to w/e your system is |
15:40:26 | FromGitter | <mratsim> what is strange is that there is nothing to allocate/create a bpf_program? You can pass a nil pointer just like that? |
15:41:01 | FromDiscord | <Avatarfighter> the compile function allocates to bpf_program iirc |
15:41:54 | * | clyybber joined #nim |
15:43:34 | FromDiscord | <Avatarfighter> the man page for it describes the process in the description |
15:43:35 | FromDiscord | <Avatarfighter> https://www.tcpdump.org/manpages/pcap_compile.3pcap.html |
15:43:48 | FromDiscord | <Avatarfighter> all i need to do is pass a pointer and compile does the rest |
15:48:40 | FromDiscord | <Avatarfighter> wow guys thank you so much for the help, I'm actually so excited right now I'm one step closing to having a radar for a game lol |
15:50:25 | * | nsf quit (Quit: WeeChat 2.4) |
15:50:30 | * | Trustable joined #nim |
15:53:14 | * | rnrwashe_ quit (Remote host closed the connection) |
15:54:53 | FromGitter | <mratsim> you're welcome |
15:56:34 | * | sealmove joined #nim |
16:08:19 | * | rnrwashere joined #nim |
16:13:13 | * | vivus joined #nim |
16:13:49 | vivus | hello all. what is the most efficient way to read and open a big file(>500MB) in Nim? |
16:15:24 | sealmove | depends on what file/what you want to do with it |
16:15:24 | * | rnrwashere quit (Remote host closed the connection) |
16:16:18 | vivus | It is a CSV file and I want to extract data from it based on the results of a specific column |
16:19:18 | vivus | it looks like this: 1808 eng He's already a man. CK \N 2010-10-13 15:43:35 (each big gap represents tab separation) and I want to extract all lines that contain the [eng] keyword. I am looking for an efficient way to do this before trying to run my program on a 600MB file |
16:22:37 | leorize | parsecsv supports streams right? |
16:23:09 | leorize | you can try memfiles to create a mmap stream |
16:32:39 | * | rnrwashere joined #nim |
16:37:01 | * | abm quit (Ping timeout: 258 seconds) |
16:38:51 | FromGitter | <jrfondren> @vivus, how bad is a straightforward use of parsecsv? try it with -d:release. if p.row[1] != "eng": continue |
16:39:45 | Zevv | vivus: on a modern machime you should probably not care too much about memory |
16:39:53 | Zevv | reading 600MB is peanuts in 2019 |
16:42:31 | FromGitter | <jrfondren> > insert dbNull into SQLite table ⏎ >value is stored as the string 'dbNull' |
16:48:32 | vivus | @jrfondren `continue` ? |
16:48:41 | vivus | just verifying that that isn't a keyword |
16:48:50 | FromGitter | <jrfondren> as in, skip the current loop if you're not looking at an eng row |
16:48:57 | FromGitter | <jrfondren> it is a keyword |
16:49:21 | vivus | so I use an if, else with the continue keyword? |
16:49:45 | FromGitter | <jrfondren> you use it within a loop to skip the rest of the body of the loop, |
16:50:00 | FromGitter | <jrfondren> so in your while p.readRow(): loop, you'll stop processing the current line and start looking at the next one. |
16:50:34 | vivus | alright I get you. |
16:50:45 | vivus | Does Nim support "and" "or" ? |
16:51:01 | vivus | oh it does |
16:53:43 | * | rnrwashere quit (Remote host closed the connection) |
16:59:12 | sealmove | guys is owned refs prototype ready? also is there a place other than irc where I can check the progress? |
16:59:45 | * | rnrwashere joined #nim |
17:00:22 | FromGitter | <jrfondren> you can try it with --newruntime on a devel build. you could track updates on github. |
17:02:13 | * | vivus quit (Remote host closed the connection) |
17:02:36 | FromGitter | <jrfondren> in particular, https://github.com/Nim-lang/Nim/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+newruntime |
17:03:14 | sealmove | oh there is https://github.com/nim-lang/Nim/issues/11217 nice! |
17:05:10 | sealmove | so it seems ready for testing, exciting! |
17:07:35 | * | leorize quit (Ping timeout: 256 seconds) |
17:12:39 | * | abm joined #nim |
17:21:29 | * | rnrwashere quit (Remote host closed the connection) |
17:21:50 | * | bars0 joined #nim |
17:22:20 | * | rnrwashere joined #nim |
17:30:01 | * | bars0 quit (Ping timeout: 246 seconds) |
17:39:43 | * | rnrwashere quit (Remote host closed the connection) |
17:42:01 | * | rnrwashere joined #nim |
17:55:37 | FromGitter | <liquid600pgm> is there any way to obtain the nimble version of my program as a string? |
17:55:58 | FromGitter | <liquid600pgm> so that I can print it in --help |
17:56:18 | shashlick_ | I think nimble dump prints it? |
17:59:28 | FromGitter | <liquid600pgm> yeah, it does |
17:59:31 | FromGitter | <liquid600pgm> thanks |
18:00:32 | * | sz0 quit (Quit: Connection closed for inactivity) |
18:02:30 | FromGitter | <jrfondren> `const VERSION {.strdefine.} = "UNKNOWN VERSION"` |
18:02:44 | FromGitter | <jrfondren> then pass -d:version:v1.2.3 |
18:03:16 | FromGitter | <liquid600pgm> yeah, but I'd like to pull it from my .nimble file for convenience |
18:21:06 | * | rockcavera joined #nim |
18:21:30 | * | abm quit (Quit: Leaving) |
18:24:29 | Zevv | Read and eval your .nimble at compile time. Kind of sucks, though |
18:25:34 | FromGitter | <jrfondren> seems like a common enough thing to want to do that I'd rather suggest that nimble add a -d: by default when it builds |
18:27:47 | * | rockcavera is now known as Guest15222 |
18:27:47 | * | Guest15222 quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
18:29:51 | * | rnrwashere quit (Remote host closed the connection) |
18:30:27 | * | vlad1777d_ quit (Ping timeout: 246 seconds) |
18:31:02 | * | rockcavera joined #nim |
18:31:42 | * | rnrwashere joined #nim |
18:44:20 | Zevv | true |
18:52:01 | FromDiscord | <Avatarfighter> silly question but do you guys know if there is a lib that adds a canvas to draw stuff on ? I can't seem to find one but I could just be blind lol |
18:55:55 | FromDiscord | <Avatarfighter> I'll probably use an sdl2 binding |
18:57:14 | * | rnrwashere quit (Remote host closed the connection) |
19:03:44 | * | rnrwashere joined #nim |
19:10:53 | * | rnrwashere quit (Remote host closed the connection) |
19:14:52 | FromDiscord | <exelotl> Yeah that seems to be the best way to go |
19:20:34 | * | couven92 joined #nim |
19:21:23 | * | couven92 quit (Client Quit) |
19:24:36 | * | narimiran joined #nim |
19:26:11 | FromGitter | <liquid600pgm> you could also use nimterop to wrap cairo, it might be more comfortable since it has more features |
19:28:31 | * | traviss quit (Quit: Leaving) |
19:30:32 | * | xet7 joined #nim |
19:40:11 | * | couven92 joined #nim |
19:40:36 | * | couven92 quit (Remote host closed the connection) |
19:41:51 | * | rnrwashere joined #nim |
19:42:27 | * | nsf joined #nim |
19:46:08 | * | rnrwashere quit (Ping timeout: 252 seconds) |
20:02:56 | * | nsf quit (Quit: WeeChat 2.4) |
20:08:43 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:10:39 | * | Trustable quit (Remote host closed the connection) |
20:20:26 | * | narimiran quit (Ping timeout: 244 seconds) |
20:23:46 | * | jjido joined #nim |
20:42:51 | FromGitter | <zetashift> welp can't figure out how to get fix the warning for godot-nim :( |
21:12:26 | * | abm joined #nim |
21:17:46 | * | xet7 quit (Quit: Leaving) |
21:17:56 | * | sealmove quit (Quit: WeeChat 2.4) |
21:33:11 | * | rnrwashere joined #nim |
21:33:14 | * | vlad1777d_ joined #nim |
21:36:12 | clyybber | zetashift: Which warning? |
21:37:36 | * | rnrwashere quit (Ping timeout: 252 seconds) |
21:38:48 | dom96 | {.this.} has been deprecated warning IIRC |
21:39:51 | clyybber | Should be easy to fix, right? |
21:39:54 | FromDiscord | <treeform> @Avatarfighter are you drawing stuff in real time, or do you want to draw to images? |
21:40:30 | FromDiscord | <treeform> @Avatarfighter I have a cairo wrapper: https://github.com/treeform/quickcairo with many examples |
21:40:37 | * | solitudesf quit (Ping timeout: 258 seconds) |
21:40:56 | FromDiscord | <treeform> including real time hookups to SDL2, GLUT or GLFW. |
21:49:06 | * | rnrwashere joined #nim |
21:59:29 | * | deech joined #nim |
22:04:51 | FromGitter | <deech> Why does the following give me: `invalid expression: mixin a`? ⏎ ⏎ ```proc f() = ⏎ mixin a ⏎ echo a()``` [https://gitter.im/nim-lang/Nim?at=5cd898835d48a24fd0b92f85] |
22:05:17 | * | deech quit (Remote host closed the connection) |
22:11:44 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
22:24:11 | clyybber | deech: What happens when you actually define a afterwards? |
22:38:49 | FromGitter | <deech> Same: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cd8a079da34620ff92f1e75] |
22:50:17 | * | laaron quit (Remote host closed the connection) |
22:51:52 | * | laaron joined #nim |
22:59:34 | FromGitter | <deech> Found the issue, not sure if it's a bug: https://github.com/nim-lang/Nim/issues/11237#issuecomment-491636460. |
22:59:38 | clyybber | Just recently when I tried to use mixin I had gotten the same error. |
23:00:07 | clyybber | But I didn't investigate further, because it turned out that mixin was just a result of my bogus code :D |
23:01:59 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:07:44 | * | abm quit (Quit: Leaving) |
23:19:30 | clyybber | good night |
23:19:32 | * | clyybber quit (Quit: WeeChat 2.4) |
23:37:56 | * | rnrwashere quit (Remote host closed the connection) |
23:38:03 | FromDiscord | <Avatarfighter> @treeform im trying to draw shapes and edit their positions in realtime, I'll check out your lib, it looks exactly like what I need |
23:42:57 | * | rnrwashere joined #nim |
23:53:27 | * | rnrwashere quit (Remote host closed the connection) |
23:54:33 | * | rnrwashere joined #nim |