<< 12-05-2019 >>

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:17shashlick_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:23FromGitter<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:56FromDiscord<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:21shashlick_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:38FromGitter<Bennyelg> How Do I get the template / proc Name on compilation time
05:57:38shashlick_https://github.com/nimterop/nimterop/blob/master/nimterop/cimport.nim#L204
05:57:46shashlick_that's how i did it in nimterop
06:09:58FromDiscord<Avatarfighter> shashlick are you still here by any chance?
06:10:22FromDiscord<Avatarfighter> just kidding got it
06:12:25shashlick_i'm here regardless 🙂
06:19:46*cyberjpn2 joined #nim
06:30:57FromDiscord<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:19leorizeAvatarfighter: actually those two are the same kind of definitions...
06:33:23*solitudesf joined #nim
06:33:25FromDiscord<Avatarfighter> ah
06:33:27FromDiscord<Avatarfighter> welp
06:33:30FromDiscord<Avatarfighter> til
06:33:32leorizethey should both be an object
06:33:40FromDiscord<Avatarfighter> Alrighty uhm
06:33:43FromDiscord<Avatarfighter> can I ask a question then
06:33:48leorizetypedef is C version of `type Alias = int` in Nim
06:33:50leorizesure
06:34:22FromDiscord<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:05FromDiscord<Avatarfighter> the header file defines it as `typedef struct pcap pcap_t;`
06:35:32shashlick_seems wrong
06:35:55FromDiscord<Avatarfighter> huh
06:36:10FromDiscord<Avatarfighter> ok
06:36:19FromDiscord<Avatarfighter> I guess I'll write that down, thank you guys 😄
06:36:38leorizeyea that's wrong
06:36:54leorizeI guess the rationale was that the ptr is always used
06:37:08leorizebut I don't think Nim works like that
06:37:10*cyberjpn2 joined #nim
06:38:00FromDiscord<Avatarfighter> That kind of makes sense lol
06:38:24leorizeshashlick_: is there any notable changes in nimterop? :p I haven't used it for awhile
06:39:10shashlick_i made several improvements last week
06:40:07shashlick_https://github.com/nimterop/nimterop/commits/master
06:40:11shashlick_many since may 4th
06:40:53shashlick_several bug fixes, output cleanup, render comments in output
06:41:02shashlick_dynlib support
06:41:11FromDiscord<Avatarfighter> I wonder if one could make jailbreak tweaks using nim
06:41:22FromDiscord<Avatarfighter> since it compiles to objc you could probably do it
06:41:39shashlick_starter templates
06:43:58FromDiscord<Avatarfighter> alrighty guys ground breaking news
06:44:26FromDiscord<Avatarfighter> you definitely need `ptr object` or less nim will spit out so many errors you'll actually cry
06:45:00leorizeif 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:16FromDiscord<Avatarfighter> that also works
06:46:18FromDiscord<Avatarfighter> wow
06:46:26FromDiscord<Avatarfighter> Which is considered more correct though?
06:46:41leorizethe prepend `ptr` to everything I believe
06:46:57FromDiscord<Avatarfighter> I'm assuming prepending ptr is because of how you guys said that `ptr object` was incorrect
06:47:12FromDiscord<Avatarfighter> alrighty thank you guys 😄
06:47:35shashlick_@leorize - any of those features of interest to you? i like the comment feature - makes wrappers very interesting
06:47:49leorizehmm, I thought {.header.} + {.importc.} would replace the identifier with the importc-ed identifier
06:48:17leorizenever thought you could put `ptr object` to convert it to `ptr pcap_t`
06:48:30shashlick_check out the llvm wrapper it came up with - http://ix.io/1Itq/nim
06:48:39leorizeshashlick_: I'm looking at the code :P
06:48:48leorizewhy would you want to run configure though?
06:49:09shashlick_when you check out code from github, you need to configure it for your local system
06:49:22leorizenot really
06:49:25shashlick_sometimes you need some header.h to be generated
06:49:41shashlick_i was hard-coding in nimgen and few nimterop wrappers
06:49:48leorizeI think it'd be nice to be able to pass arguments to configure
06:49:51shashlick_is easier with configure, at least on posix
06:49:59leorizesometimes you'd need `--enable-sdl` for example
06:50:01shashlick_i agree - need to add that
06:50:26leorizethe comment feature looks cool
06:50:39leorizenow we only need a doxygen parser to convert those into Nim :p
06:52:22leorizeshashlick_: does nimterop support `ptr ptr` yet?
06:52:33shashlick_yes
06:52:40shashlick_but not ptr ptr ptr 😛
06:52:54leorizenice, also is there anyway to omit the `{.header.}`?
06:53:05shashlick_if you use dynlib, header goes away
06:53:06leorizeat least I could now get rid of the 10 manually imported symbols :P
06:53:16shashlick_header is also only once at the top
06:53:35shashlick_unless symbols get renamed
06:53:36leorizenice, 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:17FromDiscord<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:36leorizeaddr
07:19:43leorizethat's the correct way
07:19:56FromDiscord<Avatarfighter> sweet, thank you
07:20:14narimiranAvatarfighter what are you trying to do with that object in your proc? just modify some fields?
07:21:14FromDiscord<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:33FromDiscord<Avatarfighter> or at least trying to supply lol
07:21:39*arecaceae joined #nim
07:21:57narimiranah, ok. i was going to suggest trying with `var MyObject`
07:22:27FromDiscord<Avatarfighter> I thought about that haha
07:23:47FromDiscord<Avatarfighter> I just gotta figure out why nim is crying about bpf.h now :L
07:23:51leorizeshashlick_: looks like nimterop can't translate this:
07:23:52leorizeError: target STRING not available
07:23:54leorizeack
07:23:58leorizestruct kmod_ctx *kmod_new(const char *dirname, const char * const *config_paths);
07:25:57FromDiscord<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:26leorizenope, but the issue seems to be from the wrapper
07:26:44FromDiscord<Avatarfighter> lit lmoa
07:26:47leorizechange it into cushort
07:28:28FromDiscord<Avatarfighter> hmm the issue persists, i think its an issue with my type but it should be correct :L
07:28:29shashlick_@leorize -seems to work fine here in isolation
07:29:05shashlick_proc kmod_new*(dirname: cchar, config_paths: cstring): ptr kmod_ctx {.impaC.}
07:29:05leorizehmm, weird
07:29:17shashlick_what are you wrapping
07:29:22leorizekmod
07:29:32shashlick_what's the full error?
07:29:37leorizeit should also be available on your pc if you're running linux
07:29:44leorizethere aren't any error, the symbol is not there
07:30:21leorizeshashlick_: also that's a wrong translation
07:30:57shashlick_what's your wrapper look like
07:31:40leorizehttp://ix.io/1IMq
07:32:13shashlick_meh i don't have libkmod on ubuntu?
07:32:28leorizeyou should
07:32:33leorizeit's already installed by default
07:32:39shashlick_ok i had to install headers
07:37:16*nsf joined #nim
07:40:36FromDiscord<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:49FromDiscord<Avatarfighter> bpf_u_int32 is a typedef of uint32
07:45:06shashlick_@leorize - compiles for me
07:45:51shashlick_http://ix.io/1IMs/Nim
07:46:34leorizeshashlick_: kmod_new is missing
07:47:28*dddddd quit (Remote host closed the connection)
07:50:27narimiran"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:04shashlick_@leorize - i think it worked earlier since i hadn't recompiled toast on my linux machine
07:52:09shashlick_looks like something is broken
07:56:56FromGitter<mratsim> So now nimterop has ./configure support?
07:56:58FromGitter<mratsim> nice
08:02:31shashlick_@leorize - i missed two of the * in your code paste, that's why it worked
08:02:38shashlick_`const char * const *`
08:04:43*tdc joined #nim
08:05:17shashlick_does this wrapper look right - `struct kmod_ctx *kmod_new(const char *dirname, const char * const *config_paths);`
08:05:48shashlick_=> `proc kmod_new*(dirname: cstring, config_paths: ptr cstring): ptr kmod_ctx {.impcC.}`
08:05:53FromDiscord<Avatarfighter> omg
08:05:57FromDiscord<Avatarfighter> i solveed my issue
08:06:08FromDiscord<Avatarfighter> wasn't even a wrapper issue 😎
08:13:31FromDiscord<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:19shashlick_@leorize - i'm pushing tht fix for now, let me know if any concerns - time for bed
08:16:57FromDiscord<Avatarfighter> cya shashlick, it was nice meeting you today
08:17:05shashlick_tc
08:18:16FromGitter<mratsim> @Avatarfighter, double free
08:19:53FromGitter<mratsim> !eval let p = alloc(10); dealloc(p); dealloc(p)
08:19:55NimBot<no output>
08:20:45FromGitter<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:49narimiranhey @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:38narimirani'm not sure what's wrong. should i ditch templates and just use procs, would that make any difference?
08:35:26shashlick_@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:39clyybbernarimiran: 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:08dom96Quiet here today, how's everybody doing?
13:12:50leorizedom96: how do you think about making nimble work regardless of where you are in your project?
13:14:10dom96I'm a little against it, https://github.com/nim-lang/nimble/issues/518
13:14:19FromGitter<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:41FromGitter<zetashift> Also did some bioinformatics with Nim instead of python which is always great
13:15:55dom96Nice :)
13:19:18*theelous3 quit (Ping timeout: 246 seconds)
13:19:29dom96I'm trying to stop myself procrastinating
13:19:33dom96and work on one of my projects
13:25:29FromGitter<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:51FromGitter<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:32FromGitter<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:38FromGitter<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:52FromGitter<mratsim> "The woodcutting isn't delayed by the sharpening of the axe." --> lovely Chinese proverb
13:31:30FromGitter<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:46dom96jrfondren: wow, great advice :)
13:48:32dom96@mratsim: are you spying on me?! :O
13:54:07FromGitter<mratsim> When you don't tart discussions about Nim, you start them about an article you read on HN ;)
13:54:17dom96lol
13:56:59FromGitter<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:33FromGitter<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:32FromGitter<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:30FromGitter<mratsim> Maybe when backport season is up, @narimiran should open a pinned issue so that everyone can see and ask for backports
14:02:54dom96Thought there was going to be a 0.20 release today, guess now D:
14:02:56FromGitter<mratsim> or have one always open, that we close upon release and we open a new one
14:02:58dom96*guess not
14:03:16FromGitter<mratsim> no 0.20 is delayed by the new TODO list on destructors that Araq posted on Thursday
14:03:22FromGitter<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:17FromGitter<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:02dom96Indeed
14:08:07FromGitter<mratsim> They won't disappear
14:08:32*nsf quit (Quit: WeeChat 2.4)
14:09:09FromGitter<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:31dom96Nim compiler messages really are improving, thank you to those that made those improvements
14:23:43dom96Beautiful: "Error: not all cases are covered; missing: {Disconnect}"
14:25:33Zevvarnetheduck: is there a roadplan or description somewhere for the async reworking?
14:28:20leorizedom96: 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:22dom96leorize: I see. I wouldn't mind including that as its own command
14:31:04leorizewe could expand `nimble dump` to include this information (+ a flag to have nimble search up for a .nimble file)
14:31:50dom96`nimble path` might be better
14:31:59dom96It already gives you the path to a .nimble file for an installed package
14:32:06*tdc quit (Ping timeout: 246 seconds)
14:32:11FromGitter<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:27ZevvAh I looked into chronos a few days ago. So the plan is to integrate chronos into the Nim stdlib?
14:34:18FromGitter<arnetheduck> presently, no.
14:37:23*al_ joined #nim
14:57:31FromGitter<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:16FromDiscord<Avatarfighter> Hello everyone!
15:09:33FromGitter<mratsim> hey
15:10:51FromDiscord<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:24FromGitter<jrfondren> just replicate the bug with as little code as possible and ask about it
15:12:53FromDiscord<Avatarfighter> I can do that I think haha
15:13:16FromGitter<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:28FromGitter<mratsim> or not allocated by the proper process
15:13:51FromDiscord<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:37FromDiscord<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:37FromDiscord<Avatarfighter>
15:15:37FromDiscord<Avatarfighter> https://ghostbin.com/paste/4xsje
15:18:16FromGitter<mratsim> the first thing that jumps to me is uint, it probably should be uint32 or cuint
15:18:50FromGitter<mratsim> unless what you're wrapping is uint32 on 32-bit and uint64 on 64-bit
15:19:33FromDiscord<Avatarfighter> What do you mean by "uint32 on 32-bit and uint64 on 64-bit"?
15:22:08FromGitter<mratsim> uint and int in Nim are platform dependent
15:22:37FromDiscord<Avatarfighter> Oh, I didn't realize that, that's pretty cool
15:22:38FromGitter<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:53FromGitter<mratsim> and your bpf_program is using uint, hence why it may break
15:24:20leorizeAvatarfighter: if you want C's uint, use cuint
15:25:42FromDiscord<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:49FromGitter<mratsim> Also this is wrong "pcap_create(defaultIfName, addr(err))"
15:26:14FromGitter<mratsim> if you want to pass a pointer to the first element of an array or a string use err[0].addr
15:26:52FromGitter<mratsim> you probably should use a seq\[byte\] as buffer instead of a string btw
15:27:19leorizemratsim: the errbuffer is for error messages I think
15:27:35FromGitter<mratsim> ah I see, then strings are good
15:27:50leorizeanyhow, that errbuf is supposed to be a cstring, not a pointer
15:29:03FromDiscord<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:08FromGitter<mratsim> is libpcap installed by default on Linux?
15:29:27FromGitter<mratsim> no second is "pointer" and will accept any pointer
15:29:38leorizeall of them are cstring
15:29:56FromGitter<mratsim> I have it on my system, should be quick to fix
15:29:58FromDiscord<Avatarfighter> libpcap should be on linux
15:30:23leorizein C typed pointers are not much different from untyped one anw :p
15:30:32leorizewell but they should all be cstring
15:30:58FromDiscord<Avatarfighter> ok 😄
15:31:43FromDiscord<Avatarfighter> oh god i think i fixed my issue
15:31:46FromDiscord<Avatarfighter> this is so dumb
15:32:17FromDiscord<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:45leorizenice! but fix your types :p
15:33:37FromDiscord<Avatarfighter> I fixed them as per your recommendations, thank you guys for taking time to help me it really means a lot !
15:34:54leorizelooks 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:14FromGitter<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:18FromGitter<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:34FromDiscord<Avatarfighter> oh yeah
15:39:39FromDiscord<Avatarfighter> go to the header file bpf.h
15:39:58FromGitter<mratsim> I would probably start with something like that: https://gist.github.com/mratsim/dcc8aa5772357a916e0457cf3be2471d
15:40:25FromDiscord<Avatarfighter> add `#ifdef __APPLE__ #include <sys/types.h> #end` but change apple to w/e your system is
15:40:26FromGitter<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:01FromDiscord<Avatarfighter> the compile function allocates to bpf_program iirc
15:41:54*clyybber joined #nim
15:43:34FromDiscord<Avatarfighter> the man page for it describes the process in the description
15:43:35FromDiscord<Avatarfighter> https://www.tcpdump.org/manpages/pcap_compile.3pcap.html
15:43:48FromDiscord<Avatarfighter> all i need to do is pass a pointer and compile does the rest
15:48:40FromDiscord<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:53FromGitter<mratsim> you're welcome
15:56:34*sealmove joined #nim
16:08:19*rnrwashere joined #nim
16:13:13*vivus joined #nim
16:13:49vivushello all. what is the most efficient way to read and open a big file(>500MB) in Nim?
16:15:24sealmovedepends on what file/what you want to do with it
16:15:24*rnrwashere quit (Remote host closed the connection)
16:16:18vivusIt is a CSV file and I want to extract data from it based on the results of a specific column
16:19:18vivusit 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:37leorizeparsecsv supports streams right?
16:23:09leorizeyou 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:51FromGitter<jrfondren> @vivus, how bad is a straightforward use of parsecsv? try it with -d:release. if p.row[1] != "eng": continue
16:39:45Zevv vivus: on a modern machime you should probably not care too much about memory
16:39:53Zevvreading 600MB is peanuts in 2019
16:42:31FromGitter<jrfondren> > insert dbNull into SQLite table ⏎ >value is stored as the string 'dbNull'
16:48:32vivus@jrfondren `continue` ?
16:48:41vivusjust verifying that that isn't a keyword
16:48:50FromGitter<jrfondren> as in, skip the current loop if you're not looking at an eng row
16:48:57FromGitter<jrfondren> it is a keyword
16:49:21vivusso I use an if, else with the continue keyword?
16:49:45FromGitter<jrfondren> you use it within a loop to skip the rest of the body of the loop,
16:50:00FromGitter<jrfondren> so in your while p.readRow(): loop, you'll stop processing the current line and start looking at the next one.
16:50:34vivusalright I get you.
16:50:45vivusDoes Nim support "and" "or" ?
16:51:01vivusoh it does
16:53:43*rnrwashere quit (Remote host closed the connection)
16:59:12sealmoveguys 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:22FromGitter<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:36FromGitter<jrfondren> in particular, https://github.com/Nim-lang/Nim/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+newruntime
17:03:14sealmoveoh there is https://github.com/nim-lang/Nim/issues/11217 nice!
17:05:10sealmoveso 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:37FromGitter<liquid600pgm> is there any way to obtain the nimble version of my program as a string?
17:55:58FromGitter<liquid600pgm> so that I can print it in --help
17:56:18shashlick_I think nimble dump prints it?
17:59:28FromGitter<liquid600pgm> yeah, it does
17:59:31FromGitter<liquid600pgm> thanks
18:00:32*sz0 quit (Quit: Connection closed for inactivity)
18:02:30FromGitter<jrfondren> `const VERSION {.strdefine.} = "UNKNOWN VERSION"`
18:02:44FromGitter<jrfondren> then pass -d:version:v1.2.3
18:03:16FromGitter<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:29ZevvRead and eval your .nimble at compile time. Kind of sucks, though
18:25:34FromGitter<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:20Zevvtrue
18:52:01FromDiscord<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:55FromDiscord<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:52FromDiscord<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:11FromGitter<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:51FromGitter<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:12clyybberzetashift: Which warning?
21:37:36*rnrwashere quit (Ping timeout: 252 seconds)
21:38:48dom96{.this.} has been deprecated warning IIRC
21:39:51clyybberShould be easy to fix, right?
21:39:54FromDiscord<treeform> @Avatarfighter are you drawing stuff in real time, or do you want to draw to images?
21:40:30FromDiscord<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:56FromDiscord<treeform> including real time hookups to SDL2, GLUT or GLFW.
21:49:06*rnrwashere joined #nim
21:59:29*deech joined #nim
22:04:51FromGitter<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:11clyybberdeech: What happens when you actually define a afterwards?
22:38:49FromGitter<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:34FromGitter<deech> Found the issue, not sure if it's a bug: https://github.com/nim-lang/Nim/issues/11237#issuecomment-491636460.
22:59:38clyybberJust recently when I tried to use mixin I had gotten the same error.
23:00:07clyybberBut 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:30clyybbergood night
23:19:32*clyybber quit (Quit: WeeChat 2.4)
23:37:56*rnrwashere quit (Remote host closed the connection)
23:38:03FromDiscord<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