<< 13-04-2020 >>

00:05:14*axion quit (Quit: WeeChat 2.6)
00:10:49*videofile quit (Quit: Going offline, see ya! (www.adiirc.com))
00:13:12*inv2004 quit (Quit: Leaving)
00:25:37*Tyresc quit (Quit: WeeChat 2.7-dev)
00:27:14*nixfreak quit (Ping timeout: 240 seconds)
00:33:16FromDiscord<KingDarBoja> Well another power outage
00:35:27*axion joined #nim
00:36:30*leorize joined #nim
00:39:57*nixfreak joined #nim
00:45:45FromDiscord<KingDarBoja> I am back!
00:46:00*axion is now known as mfiano
00:46:23*mfiano quit (Changing host)
00:46:23*mfiano joined #nim
00:47:42*mfiano left #nim ("WeeChat 2.8")
00:48:24*axion joined #nim
00:49:44*krux02 quit (Remote host closed the connection)
01:13:05*chemist69 quit (Ping timeout: 265 seconds)
01:14:59*chemist69 joined #nim
01:16:18FromDiscord<KingDarBoja> I just noticed that the manual uses `divmod` as example but can't find it on the search, only div and mod as separated
01:18:35*hpyc9 quit (Quit: ZNC 1.7.5 - https://znc.in)
01:18:47*hpyc9 joined #nim
01:30:56*lritter quit (Ping timeout: 256 seconds)
01:31:22*lritter joined #nim
01:34:13*ikan_keli joined #nim
01:59:28*arecaceae quit (Remote host closed the connection)
01:59:50*arecaceae joined #nim
02:06:15*Hexeratops quit (Read error: Connection reset by peer)
02:09:33*Hexeratops joined #nim
02:25:47*muffindrake quit (Ping timeout: 246 seconds)
02:28:02*muffindrake joined #nim
02:55:08*Hexeratops quit (Quit: Leaving)
03:09:37FromDiscord<Varriount> @KingDarBoja How are things coming?
03:10:07FromDiscord<KingDarBoja> So far so good, been passing tests and doing well, still need to see if I can replace the Options by multiple procs
03:13:23*chemist69 quit (Ping timeout: 246 seconds)
03:14:34*chemist69 joined #nim
03:15:43FromDiscord<KingDarBoja> What about you?
03:16:12FromDiscord<KingDarBoja> Just took a break to finish my CV on english
03:16:20FromDiscord<Varriount> I've successfully converted Go's filepath module to Nim, however I'm still going through it to make it idiomatic
03:16:26FromDiscord<Varriount> CV?
03:16:40FromDiscord<Varriount> Curriculum Vitae?
03:16:43FromDiscord<KingDarBoja> Curriculum Vitae
03:16:57FromDiscord<KingDarBoja> That's sounds cool!
03:17:24*uu91 quit (Remote host closed the connection)
03:17:26FromDiscord<KingDarBoja> Haven't tried GO but looks like a nightmare to work with
03:17:53FromDiscord<Varriount> Eh, it's not too bad. My biggest complaint is the lack of good code-generation tools
03:18:16FromDiscord<Varriount> Go is kinda the opposite of Nim, in that in relies quite a bit on runtime type information.
03:18:45FromDiscord<KingDarBoja> Wait, isn't supposed to rely on compile time?
03:18:47FromDiscord<Varriount> Which is fine, it means that it's quite easy to work with varying types, however there's a performance cost for such things.
03:19:07FromDiscord<KingDarBoja> I thought it was statically typed and also compile time checks were made
03:19:34FromDiscord<Varriount> Yes, but it's polymorphic dispatch mechanisms rely heavily on runtime type information.
03:24:08*endragor joined #nim
03:28:50FromDiscord<Rika> interface{}
03:28:55FromDiscord<Rika> or whatever its called
03:29:11FromDiscord<Varriount> @KingDarBoja For example, if you were to write a JSON serialization procedure in Nim, you might use a macro to generate the struct->json logic at compile-time. In Go, you use type information available at runtime.
03:29:13FromDiscord<KingDarBoja> My internet is trash right now
03:29:23FromDiscord<Varriount> University internet?
03:29:47FromDiscord<KingDarBoja> No, home internet, thrid world internet lol
03:34:19*videofile joined #nim
03:35:34videofilehello
03:35:41videofilewhy is & the concat operator instead of +
03:36:20FromDiscord<Rika> because + is for arithmetic
03:36:37FromDiscord<Rika> & makes more sense cognitively does it not
03:36:39videofileyeah, but curious why the distinction between strings and arithmetic
03:36:53FromDiscord<Rika> have you ever arithmetically added a string?
03:37:09videofilewell, is most of the languages I've used (which is not tens of them), '+' is overloaded to support strings by default :)
03:37:35FromDiscord<Rika> it should cause less confusion regards js' '0'+1 == ????
03:37:41videofilebecause nim syntax seems to resemble py a lot
03:37:42videofileoh
03:37:53FromDiscord<Rika> it RESEMBLES python
03:37:55FromDiscord<Rika> thats it
03:37:55videofileweak typing is a sin anyway
03:38:04videofilepls resemble it moar xD
03:38:13FromDiscord<Rika> there are limits
03:38:19FromDiscord<Rika> like that & operator
03:38:28videofileI assume this has to do with compiler right
03:38:32videofilenot a willful choice maybe
03:38:33FromDiscord<Rika> i dont think + is a great idea for strings anyway
03:38:35FromDiscord<Rika> no
03:38:41videofileok all is forgiven!
03:38:41FromDiscord<Rika> its a willful choice im pretty sure
03:38:43FromDiscord<Rika> the &
03:38:48videofileheretics
03:38:51videofile>:(
03:39:01FromDiscord<Rika> you'll grow to love it
03:39:05videofileI hope so!
03:39:09FromDiscord<Rika> i never liked adding strings
03:39:26FromDiscord<Rika> btw what happens if i play you in a media player
03:39:33FromDiscord<Rika> what shows up πŸ˜›
03:39:41videofiletrue, but with a little stretch of imagination (I remember my java class), you can assume adding == concat
03:39:47videofileI play darude-sandstorm :P
03:40:22FromDiscord<Rika> hm anyway if you need more help just ask lol
03:40:50videofileyessir
03:41:10videofilejust woke up from a nightmare so I decided to continue learning nim \shrug
03:41:24FromDiscord<KingDarBoja> lol
03:41:38*FromDiscord <KingDarBoja> living is a nightmare
03:41:47videofileI hope you're not implying i jumped into another nightmare haha
03:41:55videofileouch that's too deep
03:42:35videofiledo you guys see nim replacing C in the next decade, instead of golang?
03:42:42videofilenot entirely
03:42:48videofileas much as realistically posible
03:43:03FromDiscord<KingDarBoja> Errr Rust is supposed to replace C (?)
03:43:07FromDiscord<Rika> not really
03:43:07FromDiscord<MapleSyrup> @Varriount hello
03:43:18FromDiscord<KingDarBoja> Variount, Maple has issues with unicode
03:43:23FromDiscord<MapleSyrup> is nim handling of unicode similar to runes in golang? @Varriount
03:43:26FromDiscord<Rika> i dont see Rust replacing C either
03:43:31FromDiscord<Rika> @MapleSyrup yes
03:43:43FromDiscord<Rika> we also call them runes at leeast
03:43:43videofilego too I guess
03:43:53FromDiscord<Rika> import the `unicode` module and read the docs
03:43:54videofileand that's where the similarities end??
03:44:04FromDiscord<Rika> no clue if thats where the similarities end
03:44:05videofileokok, I just hate having to handle unicode
03:44:12FromDiscord<Rika> https://nim-lang.org/docs/unicode.html
03:44:15videofileunicode can go off itself
03:44:24FromDiscord<Rika> unicode is a blessing
03:44:31videofiles/unicode/unicode handling
03:44:36FromDiscord<Rika> imagine needing to handle 15 different encodings for 15 different languages
03:44:48FromDiscord<Rika> that would be much worse dont you think
03:44:49videofiledid our grandparents do that?
03:44:55videofilebefore unicode
03:45:10FromDiscord<Rika> japanese had 2 major encodings for its one language before
03:45:18videofileoof
03:45:27*silvernode joined #nim
03:45:30videofileI hate python2's unicode stuff but yeah
03:45:49FromDiscord<Rika> i think its easier in nim
03:45:54FromDiscord<Rika> since nim is so damn flexible
03:45:56FromDiscord<Rika> man i love it
03:46:17videofileI hope I will find it like that for me too
03:46:24FromDiscord<KingDarBoja> Python 3 handles unicodes and ASCII under the hood
03:46:25videofiletired of switching languages man
03:46:35FromDiscord<KingDarBoja> So devs haven't to worry about it
03:46:36videofileyeah, that's python3, but python2 SUCKED at it
03:46:46FromDiscord<Rika> i was sick of python's lack of static typing, so i was pretty much hooked on to nim from the start
03:46:47FromDiscord<KingDarBoja> That's why Python 3 came out
03:46:49videofilehad a TON of issues porting python2 unicode stuff to 3
03:46:58FromDiscord<KingDarBoja> I get sick of that typing support too
03:47:01videofileRikaaaaaa
03:47:06FromDiscord<Rika> eyyo
03:47:08FromDiscord<KingDarBoja> That's why I code on TypeScript instead of JavaScript
03:47:33videofilethe number of times I had to do type(reference) to find out what was in that was too damn high in python lol
03:47:37FromDiscord<Rika> lmao
03:47:43videofileKing why do you js?
03:47:46videofileweb stuff?
03:47:55FromDiscord<Rika> `if type() is int: do this else: do that`
03:48:07FromDiscord<Rika> maybe its their main language
03:48:08videofilelooks hacky amirite
03:48:22FromDiscord<Rika> you can still do it in nim
03:48:28FromDiscord<Rika> its just on compile time
03:48:36FromDiscord<KingDarBoja> Yeah
03:48:51FromDiscord<KingDarBoja> But jumped right inot Angular/TypeScript at my current (and first) job
03:48:55FromDiscord<Rika> `proc a(something: int or string) = when a is int: do this else: do that`
03:48:55*nsf joined #nim
03:49:12videofilehmmmm
03:49:15FromDiscord<Rika> oops, something, not a
03:49:16FromDiscord<KingDarBoja> lol wut
03:49:17videofilewish generics was more flexible
03:49:23videofileoh I see
03:49:26*ljoonal quit (Quit: ljoonal.xyz)
03:49:31videofileso where do you use nim then king
03:49:36videofilehobby stuff?
03:49:39FromDiscord<Rika> i dont see what you mean by "wish generics were more flexible"
03:49:48FromDiscord<Rika> theyre pretty damn flexible
03:49:59FromDiscord<KingDarBoja> I always get triggered by union types on proc xD
03:50:00videofilewas thinking of golang
03:50:08FromDiscord<KingDarBoja> As I am noobish handling that
03:50:15*ljoonal joined #nim
03:50:15videofileunion types
03:50:16videofilesay what
03:50:34FromDiscord<KingDarBoja> Yeah, hobby stuff, I discovered Nim because someone wanted to change the old Nim icon with the new goldish one
03:50:36FromDiscord<Rika> `int or string` is a union type i think
03:50:55videofileoh thus began your headfirst dive into nim eh?
03:50:57videofileah ok rika
03:51:04FromDiscord<KingDarBoja> And I started to read the website and I thought it was going to be way better than Python due to its static typing
03:51:06videofileidk why but your name sounds pokemon-ish
03:51:24FromDiscord<KingDarBoja> Yeah, what Rika-sensei said, union types aka `or` `|`
03:51:32videofileI guess dynamic typing is a plus for beginners?
03:51:36videofilehehe
03:51:44FromDiscord<KingDarBoja> That's why Python is so popular
03:51:58FromDiscord<KingDarBoja> Because it is so high level and pretty much anyone can jump into Python and do stuff
03:52:05FromDiscord<KingDarBoja> Like data science, web development, etc
03:52:18videofiletrue, I felt like I was invincible when I picked up python haha
03:52:19FromDiscord<KingDarBoja> Bu try using it for mobile development
03:52:30videofilemobile dev be damned lol
03:52:31FromDiscord<KingDarBoja> Or making it optimal for embedded systems
03:53:00videofileif nim covered data science and ML stuff, it would be much more versatile than python for sure
03:53:22FromDiscord<Rika> arraymancer
03:53:29videofilejust curious, is the mentioning of type after identifier a consequence of having 'dynamic typing' in nim?
03:53:41videofileyeah I saw the latest benchmarks, really good but we're not there yet
03:53:44FromDiscord<Rika> what do you mean
03:53:51videofilevariable_name string
03:53:56FromDiscord<Varriount> videofile: It's a consequence of Nim being statically typed.
03:53:57videofileinstead of string variable_name
03:54:18FromDiscord<Varriount> Oh, before or after, that's just a syntactic difference.
03:54:19videofiledoesn't C do it the other way around?
03:54:27videofileoh that's odd
03:54:46videofilebecause iirc the golang creators provided that as a justification for having to mention the type after the identifier
03:54:57videofilecompiler limitations
03:55:09videofiletype inference != dynamic typing?
03:55:11FromDiscord<Varriount> Hm, I don't see how that impacts things.
03:55:13FromDiscord<Rika> yes
03:55:15FromDiscord<Rika> !-
03:55:16videofileat least by some stretch?
03:55:18FromDiscord<Rika> !=*
03:55:26videofilewhy not
03:55:31videofileis dynamic typing run-time only?
03:55:41FromDiscord<Rika> type inference doesnt allow you to change the type after assigning
03:55:46FromDiscord<Rika> dynamic does
03:55:57videofileah silly me
03:56:01FromDiscord<Rika> dynamic doesnt care what kinda type you put into a var
03:56:12FromDiscord<Rika> you can put whatever, before or after assignment
03:56:17*d10n quit (Quit: why all the #hashtags #lol #hackers #overheard)
03:56:58videofileaaand that's where the bugs hide
03:57:09FromDiscord<KingDarBoja> Lol I distract a little to play music and this happens
03:57:16videofilewhat happens
03:57:19videofileand what music
03:57:25videofileand why distract
03:57:33FromDiscord<KingDarBoja> Discussing about GO lol
03:57:45FromDiscord<KingDarBoja> Playing the weekend - michael gray
03:57:48videofileGhOst has GO in it
03:57:50FromDiscord<Varriount> It's just "Go" or "Golang"
03:57:53FromDiscord<KingDarBoja> Cuz I want the next weekend to start
03:58:02*d10n joined #nim
03:58:02*d10n quit (Changing host)
03:58:02*d10n joined #nim
03:58:05videofileoh I thought you were playing a musical instrument, my bad
03:58:06FromDiscord<KingDarBoja> I type GO because the icon lol
03:58:15videofilego GO
03:58:25videofileI haven't really checked out nim logo brb
03:58:43videofileit's either a crown or a bearded guy with a crown
03:59:27FromDiscord<KingDarBoja> A crown
03:59:33FromDiscord<KingDarBoja> A goldish crown
03:59:34videofileno man?
03:59:43FromDiscord<KingDarBoja> Nope, it is REX logo
03:59:57videofilewhat it mean
04:00:26videofilehappy monday everyone
04:02:46FromDiscord<KingDarBoja> It's 11 PM here
04:03:10videofilehappy monday in 1 hour
04:03:13FromDiscord<KingDarBoja> πŸ˜„
04:04:25videofileso...why was it called nimrod
04:04:34FromDiscord<KingDarBoja> Same question
04:04:51videofileRikk
04:06:02*supakeen quit (Quit: WeeChat 1.9.1)
04:06:03videofileoh and btw where can I find count of total num of nimble packages
04:06:17videofiletotal num of packages on nimble to be specific
04:06:42*supakeen joined #nim
04:07:27FromDiscord<Rika> parse the nimble json packages file lol
04:07:42FromDiscord<Rika> theres a little over a thousand
04:08:02videofileI havent even written a single line of nim yet...
04:08:03videofileok
04:08:04videofile!
04:08:06FromDiscord<KingDarBoja> https://github.com/nim-lang/packages/blob/master/packages.json
04:08:13FromDiscord<KingDarBoja> I was going to suggest the same lool
04:08:20videofiletyty
04:08:27FromDiscord<KingDarBoja> Use json module
04:08:44videofileI do not like this increasing dependencey of langs on github, just a pet peeve of mine
04:08:54videofile:/
04:09:07FromDiscord<KingDarBoja> The best way to start learning is by reading the tutorials and using the playground πŸ˜„
04:09:22videofileim a quarter through the Nim in Action book
04:11:35videofileanyway I can parse webcam feed in nim?
04:11:49videofilemanipulation of web cam feed, rather
04:12:38FromDiscord<Rika> well, whats the feed in?
04:12:42FromDiscord<Rika> and how is it sent
04:12:53videofileuh video stream?
04:13:02videofilejust hoping there's a lib out there to interface with my laptop webcam
04:13:10FromDiscord<Rika> dont know
04:13:18videofile:)
04:13:21videofile*:(
04:13:27*waleee-cl quit (Quit: Connection closed for inactivity)
04:16:52videofileis it ok if I can only donate $10?
04:17:16videofileno income atm and basically subsisting on ramen rn :P
04:17:40PrestigeTake care of yourself first videofile
04:17:48FromDiscord<Rika> sure why not but think about it first
04:18:07videofilenothing has made me so excited in quite a while
04:19:36FromDiscord<KingDarBoja> Lol calm down, first live then help others
04:19:51FromDiscord<KingDarBoja> Also, got another power outage... Again
04:20:00videofileokok once Im back on my feet
04:20:12videofilepower outage??
04:20:15FromDiscord<KingDarBoja> Probably going to have a bad night again
04:20:36FromDiscord<KingDarBoja> Yeah, energy is off at my neighborhood
04:20:56videofileis it common? in my area I've never had an outage....yet
04:24:27videofilecustom array ranges sounds so unique
04:24:41videofileI think the name nimrod is applicable here
04:25:35leorizecustom array range is something taken from pascal I think
04:25:52videofileohh good to know!
04:26:06videofileit really seems like nim has cherrypicked a lot of good stuff from many langs
04:27:27leorizethat's how many started
04:27:43videofiletrue
04:28:09videofilebut this particular collection seems a bit dare I say..eclectic
04:28:14videofilea touch more than other languages
04:28:25videofileit's like a huge sandbox
04:28:36videofileoop, fp, imperative, you do whatever you want yadda yadda
04:29:16leorizewell everyone else wanted to be a C replacement
04:30:29PrestigeIs there a place to look up x11 code docs
04:30:51leorizeusually giving up is a good option :P
04:31:00PrestigeI can see declared types and such in nim (for the wrapper) but no actual documentation
04:31:06Prestigeeh I'm no good at that
04:31:09leorizebut there's a huge set of man pages for them
04:31:43leorizeit depends on what component of the x11 wrapper do you use
04:31:55leorizeyea, the x11 module is just a wrapper
04:32:02FromDiscord<KingDarBoja> I live on Colombia, South AmΓ©rica, it's pretty common here
04:32:23FromDiscord<KingDarBoja> And every language always try to pick the best thing
04:32:41leorizewell "best" is subjective
04:32:51leorizethat's why we ended up with so many different ones
04:33:00videofileI love me some competition
04:33:01FromDiscord<KingDarBoja> Yup
04:33:08silvernodeWell Here I am working on Space Nim again. I got a 2d grid going and my character type has x and y coordinate properties. Time to larn how to plot my character and space stations on the grid and add boundries so that th playr cannot go off grid
04:33:10Prestigeleorize: I've just been reading https://tronche.com/gui/x/xlib/introduction/overview.html to get an idea of what these types/classes are
04:33:27silvernodelearn*
04:33:42videofilehey why is https://github.com/VPashkov/awesome-nim archived?
04:33:46videofilenothing awesome in a while or what
04:34:40FromDiscord<KingDarBoja> Let's go older and code on Perl
04:34:59leorizevideofile: probably the author don't want to maintain it anymore
04:35:17videofileaww that sucks
04:35:22videofilewould be nice if it were updated
04:35:58*d10n quit (Quit: why all the #hashtags #lol #hackers #overheard)
04:37:00*d10n joined #nim
04:37:00*d10n quit (Changing host)
04:37:00*d10n joined #nim
04:38:49silvernodeplayer.x += 1 and player.y += 1 is the basic concept for moving around but at this point it is arbitrary and not connected to the grid at all. I am trying to think of how I would tie everything to the grid. Any good websites to go read just so I can at least get the basic concepts down?
04:39:22videofileno idea how to do that but can I have a look at your source code, if it's open source?
04:39:28videofilefirst time hearing of a game in nim
04:39:51FromDiscord<Rika> tie everything to the grid?
04:40:02silvernodevideofile: yeah I will give you the github link
04:40:11FromDiscord<Rika> id do this: A position type, with the position fields ofc and a ref to the grid
04:40:39FromDiscord<Rika> the grid type doesnt have to be ref, but whatever field itll be in on the Position type should be a ref Grid
04:41:06FromDiscord<Rika> then you can make a move proc that takes a Position, and refers to pos.grid[].bounds or something like that
04:41:19FromDiscord<Rika> of course, check if grid is nil too
04:41:23silvernodeRika, hmm, I never thought of a type for position
04:41:45FromDiscord<KingDarBoja> It should be like Coordinates
04:41:56FromDiscord<KingDarBoja> Position stores x, y
04:42:00FromDiscord<Rika> yeah name it Position or Coordinates
04:42:03silvernodevideofile: https://github.com/silvernode/space-nim/tree/experimental
04:42:09videofilety
04:42:37FromDiscord<KingDarBoja> Then ofc the grid should be an array of positions
04:42:45silvernodeI have code that hasn't been commited yet but I removed the location property of the Character type and added x, y
04:43:12silvernodeAll of my types are in the entities file
04:43:19FromDiscord<KingDarBoja> You could try to read the CS50 course on Game Dev, it has good suggestions :)
04:43:22*thomasross quit (Ping timeout: 256 seconds)
04:43:34FromDiscord<KingDarBoja> On Harvard website, it is free yo access
04:43:37FromDiscord<KingDarBoja> To*
04:43:42silvernodeOh nice
04:44:14FromDiscord<KingDarBoja> It is called Game development using Love (Lua 2D frameworks)
04:44:17videofilestarred repo very nice
04:44:19FromDiscord<KingDarBoja> I think.
04:44:26videofilelove2d?
04:44:44FromDiscord<KingDarBoja> But the explanation is pretty much what you looking for on Game Dev design
04:44:52FromDiscord<KingDarBoja> Like colissions, grid, etc
04:45:00silvernodevideofile: Love2d is awesome but I really want to make a text based game in nim
04:45:20silvernodeTaking notes of people's suggestions here
04:46:59FromDiscord<KingDarBoja> I have several notes but will share tomorrow
04:47:21FromDiscord<KingDarBoja> As still have no energy hence no pc
04:47:44silvernodeAbout to commit the stuf I just wrote so that you can all see where I am at right now. I am still learning programming in general btw
04:48:36FromDiscord<Rika> im just here improving my image dithering program πŸ˜›
04:49:48silvernodePushed changes to experimental branch
04:50:02silvernodeI basically added early movement
04:50:25FromDiscord<KingDarBoja> Oww
04:50:27silvernodebut a lot of work needs to be done in order to actually do this on the grid.
04:50:54FromDiscord<KingDarBoja> Scrap z axis and go full Gravity Zero
04:50:57silvernodejust getting down the concepts right now. Makes me feel dumb at programming lol
04:51:00FromDiscord<KingDarBoja> XD joking
04:51:23silvernode:)
04:53:25silvernodeugh, well as some of you might know, I generally work on this game while waiting to clock in at work. Sadly it is time for me to clock in. Thank you all for the suggestions. ttyl
04:53:52silvernodeI'm off the next 2 nights after this though
04:59:28*silvernode quit (Ping timeout: 256 seconds)
05:01:57videofilegoodbye
05:05:11FromDiscord<Rika> what do yall recommend for CLI interfacing? is parseopt good enough?
05:05:37leorizeiffy/nim-argparse or c-blake/cligen
05:06:33FromDiscord<Rika> which is better in your opinion
05:13:14*solitudesf joined #nim
05:15:05videofilei dont quite understand blocks in nim
05:19:35FromDiscord<Rika> theyre just like "if True:"s in python
05:19:39FromDiscord<Rika> whats there to not understand?
05:19:47videofilenono
05:19:54videofilethe breaking out of nested loops using block labels
05:20:35FromDiscord<Rika> break label will jump to the end of the block w/ the label
05:21:11videofilebut you have to indent after the block right?
05:21:13videofilejust confirming
05:22:20FromDiscord<Rika> yeah because its like if True:
05:22:26videofileoh thats what you meant
05:22:27videofilegotcha
05:22:51FromDiscord<Rika> block label: (since theres a colon, next line must be indented
05:23:05videofile+1
05:23:12videofileis there no namespace prefix for imports?
05:23:30FromDiscord<Rika> no need
05:23:35videofilewhy not
05:23:40videofilecreates confusion :/
05:23:44FromDiscord<Rika> not really
05:23:50FromDiscord<Rika> from experience, it doesnt
05:24:02FromDiscord<Rika> if you want to force it do `from module import nil`
05:24:20videofileif I see os.walkFiles, I'll know quickly that it's from the stdlib!
05:24:22FromDiscord<Rika> you can also use it with `import module` but its not forced then
05:24:40videofileoh it's optional then?
05:24:43FromDiscord<Rika> yes
05:24:46videofilethat's nice
05:24:50videofilevery flexible
05:24:54FromDiscord<Rika> πŸ˜›
05:25:32leorize@Rika: it depends on what you want
05:25:46FromDiscord<Rika> what does it depend on?
05:26:22leorizejust look at both module
05:26:28leorizeone let you quickly prototype
05:26:38leorizethe other let you carefully craft your cli experience :P
05:26:56FromDiscord<Rika> okay
05:27:07FromDiscord<Rika> ill go with the carefully craft one
05:30:17*narimiran joined #nim
05:33:55videofilelol having levenshtein dist is so random haha
05:37:04videofileis mixing of datatypes in a sequence only possible in dynamically typed langs?
05:37:16videofilelike i cant do discard @[1,"a"]
05:37:54narimiranvideofile: use json for that
05:38:21videofileoh nice
05:43:01FromDiscord<KingDarBoja> Yeah
05:43:37FromDiscord<KingDarBoja> But not willing to use json as better keep using the same type on the sequence
05:44:08videofileah ok makes sense
05:44:12videofilewas just cruoius
05:44:13videofilecurious
05:44:24videofilewow im butchering spelling which means i should probably sleep
05:44:29videofilehttps://robert-mcdermott.gitlab.io/posts/speeding-up-python-with-nim/ is very interesting!
05:54:24videofileWAIT
05:54:26FromDiscord<KingDarBoja> It is good but still as every post, it talks about benefits but not contras
05:54:29videofileyou can disable the gc entirely?
05:54:40videofilecontras?
05:54:52videofilecontras == cons?
05:56:36videofileok gonna nap
05:56:37videofilegnight
05:56:42*videofile quit (Quit: Going offline, see ya! (www.adiirc.com))
05:56:52FromDiscord<KingDarBoja> Same, good night
06:10:29*myphs joined #nim
06:10:42*dddddd quit (Remote host closed the connection)
06:13:02myphshello everyone: can i pass variables from a template to the body without declaring them in the calling block?
06:14:39FromDiscord<Rika> ?
06:14:52FromDiscord<Rika> Declare the template as dirty
06:15:01FromDiscord<Rika> {.dirtt.}
06:15:05FromDiscord<Rika> Oops, dirty
06:19:24*Vladar joined #nim
06:19:39myphsis this documented somewhere?
06:20:03myphsprobably nooby, but this explains it, i hope: https://play.nim-lang.org/#ix=2hOJ
06:21:02myphsthe syntax is wrong of course
06:22:24narimirantry with `for i {.inject.} in 0 .. nr`
06:23:34solitudesfhttps://play.nim-lang.org/#ix=2hOL
06:24:30narimiranor simply as that :)
06:25:57*xcm quit (Ping timeout: 250 seconds)
06:27:54*xcm joined #nim
06:28:55myphsinteresting! thank you a lot, solitudesf! i had something similar, but `iter: int`. why wouldn't that work?
06:29:19myphs* had tried
06:38:33*lritter quit (Quit: Leaving)
06:41:07solitudesfbecause you need to pass identifier, not value
06:45:40*tane joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:48*gmpreussner joined #nim
07:06:18*hpyc9 quit (Killed (Sigyn (Stay safe off irc)))
07:17:21*ljoonal quit (Quit: ljoonal.xyz)
07:23:44*opal quit (Remote host closed the connection)
07:23:58*opal joined #nim
07:48:33*ljoonal joined #nim
07:51:49*oculux quit (Ping timeout: 264 seconds)
07:56:49*oculux joined #nim
08:00:34*ljoonal quit (Ping timeout: 256 seconds)
08:04:27*ljoonal joined #nim
08:11:24*jjido joined #nim
08:28:39*xcm quit (Remote host closed the connection)
08:30:59*xcm joined #nim
08:34:02*dzamo[m] joined #nim
08:36:18*dwdv joined #nim
08:51:20*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:17:15FromDiscord<Benumbed> Anyone know off the top of their head if Nim keeps track of the EOL characters for the current platform?
09:17:45FromDiscord<Benumbed> I'm writing a lexer and would rather just reference something provided by the compiler to find line endings if I can
09:20:30FromDiscord<Rika> maybe look at the `lexbase` module
09:21:14FromDiscord<Rika> @Benumbed
09:21:57FromDiscord<Benumbed> Yeah unfortunately it's a static const in there 😦
09:22:11FromDiscord<Benumbed> was hoping for platform detection, but looks like I'm out of luck
09:22:17ZevvBenumbed: it might be the best to be newline agnostic, just make sure you accept both
09:22:30Zevvbecause on platform X you still might want to ingest a file created on platform Y
09:23:01FromDiscord<Rika> also i am not sure of any platform that isnt either crln or ln
09:23:11FromDiscord<Benumbed> But I liiiike throwing errors at the people who write files in Windows.... 😾
09:23:20FromDiscord<Rika> i mean crlf
09:23:37*ikan_keli quit (Ping timeout: 264 seconds)
09:24:00ZevvBenumbed: well you can just properly lex all newlines and still throw random "Unknown error" message every now and then
09:24:17FromDiscord<Benumbed> lol I like you Zevv you're alright πŸ˜„
09:24:32Zevvyeah, that's what I always say.
09:25:11FromDiscord<Rika> how do you use lexbase anyway...
09:25:22FromDiscord<Rika> theres not much instruction on how
09:26:23Zevvmumble mumble npeg mumble mumble
09:27:18narimiran!repo npeg
09:27:30Zevvdisbot is dead, long live disbot
09:27:49Zevvhe's in lockdown together with disruptek. They both come out ravingly mad, I bet
09:30:22FromDiscord<Benumbed> annd the sneaky case non-sensitivity just bit me in the ass >.<, albeit lightly
09:31:14Zevvwell, if you're new to Nim you're allowed to complain about that for the first few days. But after that you should just keep silent and take the pain like a man.
09:32:54FromDiscord<Benumbed> why not take it like a woman?
09:33:04FromDiscord<Benumbed> They're far better at pain management after all πŸ˜„
09:33:10Zevvfair enough
09:33:37dzamo[m]098poiPOI)(*
09:33:50FromDiscord<Benumbed> Also, this is the first time it's bitten me, up until this point I haven't used anything name-wise to cause me to notice it
09:34:30Zevv@leorize ping
09:36:55FromDiscord<kodkuce> dom96: @dom96 can i steal your parseMultiPart from utils jester, will comment "Stolen from dom96" am trying to make a simpleHTTPserver like pythone one and kinda sux for it to depend on jester, plan to copy paste your proc and hack it little cuz i dont want table as result
09:36:56FromDiscord<Rika> @Benumbed what did you type to make it bite you
09:37:00FromDiscord<Rika> its never bitten me
09:37:16FromDiscord<Rika> @kodkuce you can base on httpbeast
09:37:46FromDiscord<Benumbed> @Rika I had a struct in one file named 'Streamer' and created a variable in a file that imported it called 'streamer'
09:37:56FromDiscord<Benumbed> Compiler said "NO" and slapped me
09:38:37FromDiscord<Rika> it should be okay
09:38:45FromDiscord<Rika> since Streamer != streamer anyway
09:38:50FromDiscord<kodkuce> httpbeast is only linux, i allreayd got all working just mising multpart and dont really want to read whole rfc to parse it myself xD
09:38:54FromDiscord<Benumbed> Tell that to the compiler πŸ™‚
09:39:00FromDiscord<Rika> its legit
09:39:29FromDiscord<Rika> https://play.nim-lang.org/#ix=2hPz works
09:39:31FromDiscord<Benumbed> oh wait no, it's more likely the module name
09:39:35FromDiscord<Benumbed> which is also 'streamer'
09:39:43FromDiscord<Rika> thats the issue there πŸ˜›
09:39:43FromDiscord<Benumbed> It's very late, and I am tired
09:39:55FromDiscord<Benumbed> Waiting for my damn sheets to dry so I can go to bed
09:41:02Zevvyeah. speaking of which, what is the type of 'streamer' here then. I can't echo it. I can't repr it. I can't typeof() it.
09:41:05ZevvWhat is it then?!
09:42:00FromDiscord<Benumbed> No idea
09:42:05FromDiscord<Benumbed> Technically it's a module
09:42:10FromDiscord<Benumbed> But modules are not a type
09:42:12FromDiscord<Rika> i just echoed the repr of streamer in the link i sent
09:42:16FromDiscord<Rika> what do you mean
09:42:33FromDiscord<Rika> or do you ask benum
09:43:28ZevvI guess it's kind of rhetorical
09:43:45Zevvalthough I do not know the answer. It's something voidish, but not quite
09:46:11Zevvhttps://play.nim-lang.org/#ix=2hPB
09:48:52FromGitter<faulander> question: if i use locally declared variables in an imported proc will that work?
09:51:59narimirannimporter is on HN frontpage: https://news.ycombinator.com/item?id=22850374
09:53:58FromDiscord<kodkuce> i have no hw acount to spam πŸ™‚
09:54:37narimiranand let's keep it that way ;)
10:01:32FromDiscord<__ibrahim__> I was looking for some guidance on using nim without GC for realtime 3D rendering.
10:01:33FromDiscord<__ibrahim__> the only thing I could find was this:
10:01:33FromDiscord<__ibrahim__> https://rosettacode.org/wiki/Pointers_and_references#Nim
10:01:33FromDiscord<__ibrahim__> is it better to use `--gc:arc` than `--gc:none`?
10:03:29FromDiscord<Recruit_main707> gc:none wont let you use a lot of things such as echo() or slices or strings or sequences, arc is already fast enough i think
10:03:45narimiranuse `--gc:arc`
10:04:14FromDiscord<__ibrahim__> ok cool, no need for memory management! yay
10:04:22FromDiscord<__ibrahim__> ok cool, no need for manual memory management! yay
10:05:00FromDiscord<kodkuce> @__ibrahim__ you making some game engine or what?
10:05:09FromDiscord<demotomohiro> if I remember correctly, Nim's gc works only when you try to allocate memory
10:07:09FromDiscord<__ibrahim__> @kodkuce well, i really like opengl directx and vulkan, so i am playing around with opengl for now to make nice stuff, then i want to add animation and maybe then some physics etc... so it may end up to be a miniature game engine. thats why i am asking if i should use manual memory management.
10:08:18FromDiscord<__ibrahim__> but the main goal is to do rtx raytracing in real-time
10:10:48*myphs quit (Quit: Leaving)
10:11:57FromDiscord<kodkuce> smart wize i cant help you i am moste uneducated person here πŸ™‚ , tough should play more with vulkan guessing it is the future, 1 day i want to try to make a Game engine but i am long long long looooong awya form that
10:14:02FromDiscord<__ibrahim__> i am new to nim too and been only coding for 2 years.
10:14:02FromDiscord<__ibrahim__> i only drew my first opengl triangle by porting this tutorial to nim:
10:14:02FromDiscord<__ibrahim__> www.learnopengl.com
10:16:26FromDiscord<Recruit_main707> its a good start
10:17:06FromDiscord<__ibrahim__> thank you very much, and nim has such nice syntax it was really easy porting the "ugly" c++ source
10:17:07Northstriderhttps://github.com/nim-lang/Nim/blob/devel/compiler/extccomp.nim#L94 What is "nintendoSwitchGCC"? A joke?
10:17:16FromDiscord<clyybber> Nope
10:17:33FromDiscord<clyybber> Its a platform nim can target
10:17:41FromDiscord<Recruit_main707> its for creating nintendo switch games lol
10:17:45NorthstriderOh, fair
10:18:18FromGitter<faulander> can someone tell me, why this code doesn't work? https://play.nim-lang.org/#ix=2hPO
10:20:22FromDiscord<Recruit_main707> it seems to work even in the playground
10:20:28FromDiscord<__ibrahim__> here is the opengl triangle if anyone is interested:
10:20:28FromDiscord<__ibrahim__> https://pastebin.com/NTBesm5M
10:21:14FromGitter<faulander> @Recruit_main707: It should only return the last path part, not the whole path, right?
10:21:27FromDiscord<Recruit_main707> idk about that then :p
10:22:07FromGitter<faulander> (https://files.gitter.im/nim-lang/Nim/tpft/image.png)
10:22:24FromGitter<faulander> This is what it should return, but it returns the whole string.
10:22:28FromDiscord<Asmodeus> Doesn't seem to handle windows paths very well
10:23:20FromDiscord<__ibrahim__> you're right, it worked perfectly with "/"
10:23:41FromGitter<faulander> yes, it works with *nix paths, but not with windows
10:24:08FromDiscord<__ibrahim__> maybe create a replace proc then last path part then revert to original
10:24:32FromGitter<faulander> yes, i'll write my own proc, but the function should still work. where to i post a bug report?
10:24:41FromGitter<faulander> to = do
10:27:17*chemist69 quit (Ping timeout: 260 seconds)
10:27:48*chemist69 joined #nim
10:33:40FromDiscord<Rika> I think it only works with windows paths if you run it in a windows target
10:34:41FromDiscord<Recruit_main707> makes sense i guess
10:35:00FromDiscord<kodkuce> can i do html alert whout js?
10:35:01FromDiscord<Asmodeus> Oh hey think I found the commit where the pascal source was converted to nim
10:35:01FromDiscord<Asmodeus> https://github.com/nim-lang/Nim/tree/e254741541b0389dfb0b675116c76a6a144b90b7
10:37:37FromDiscord<Recruit_main707> ive seen this on the nim official page:
10:37:37FromDiscord<Recruit_main707> `Macros cannot change Nim's syntax because there is no need for it β€” the syntax is flexible enough.`
10:37:37FromDiscord<Recruit_main707> is it completely true? and why not?
10:38:25FromDiscord<Recruit_main707> id say it would be a cool
10:38:29FromDiscord<Recruit_main707> feature
10:42:11FromGitter<faulander> @Rika: i AM running on a windows machine
10:42:35*narimiran quit (Ping timeout: 260 seconds)
10:42:50FromDiscord<Recruit_main707> !test echo("is this working?")
10:42:56FromDiscord<Recruit_main707> nope
10:43:48FromDiscord<Asmodeus> Heck, comments are included as part of the nim grammar? I thought they were usually filtered out during lexing
10:49:15*zyklon joined #nim
10:52:41FromDiscord<Rika> it's eval
10:52:43FromDiscord<Rika> not test
10:52:46FromDiscord<Rika> !eval echo "nice"
10:52:49NimBotnice
10:53:18FromDiscord<Rika> and also yes, you cannot change Nim's syntax (as in the structure); you can exploit it, though
10:53:55FromDiscord<Rika> faula...: then damn i dont got a clue
10:54:07*uvegbot quit (Ping timeout: 260 seconds)
10:54:17FromDiscord<Rika> @Asmodeus comments are stripped from parsing, theyre not part of the AST
10:54:21FromDiscord<Rika> only doc comments are part
10:54:34FromDiscord<Rika> you can put comments anywhere, but not doc comments
10:55:04FromDiscord<Recruit_main707> i dont understand this: https://play.nim-lang.org/#ix=2hQ5
10:55:37FromDiscord<Asmodeus> @Rika What are the COMMENT fields in https://github.com/nim-lang/Nim/blob/devel/doc/grammar.txt ?
10:55:41*jjido joined #nim
10:55:57*pbb quit (Remote host closed the connection)
10:56:42FromDiscord<Rika> part of the lexer
10:56:57FromDiscord<Rika> im pretty sure thats part of the lexer
10:57:36FromDiscord<Rika> @Recruit_main707 a is a set containing the type int16 (or an int that can range from 0 to 65535)
10:58:42FromDiscord<Asmodeus> @Rika ah looks like the parser handles it https://github.com/nim-lang/Nim/blob/devel/compiler/parser.nim#L319
10:58:44*pbb joined #nim
10:59:33FromDiscord<Recruit_main707> @Rika does it work like in c++?
10:59:42FromDiscord<Rika> wdym?
11:00:13FromDiscord<Recruit_main707> i know very little about cpp, but ive seen some things like `{12, 21, 32}`
11:00:52FromDiscord<Rika> thats an array
11:00:53*PMunch joined #nim
11:01:11FromDiscord<Recruit_main707> oh, ok
11:01:21FromGitter<faulander> same problem with splitFile, doesn't work on windows: https://play.nim-lang.org/#ix=2hQa
11:04:37*natrys joined #nim
11:08:05*liblq-dev joined #nim
11:10:36solitudesffaulander, works fine under wine
11:14:03*opal quit (Ping timeout: 240 seconds)
11:14:07*pbb quit (Quit: No Ping reply in 180 seconds.)
11:20:18*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:22:05livcdfaukabder: probably it gets treated as linux path in playground?
11:23:04dom96kodkuce: you should learn about software licensing
11:23:06FromGitter<faulander> yes, it does. but i used a hardcoded windows path
11:23:09dom96Jester is MIT
11:23:16FromDiscord<kodkuce> ye i know
11:23:23FromDiscord<kodkuce> but i am polite
11:23:29FromDiscord<kodkuce> πŸ™‚
11:23:52FromGitter<faulander> @SolitudeSF but it doesn't in the playground, neither on my windows machine
11:23:59livcdfaulander: What do you mean by "hardcoded windows path"? It works fine when executed locally
11:24:00FromDiscord<kodkuce> and ofc wanted to harass you for explanation for some parts xD
11:24:41FromDiscord<kodkuce> anywya i go now on run while there is still sun outside
11:24:44FromGitter<faulander> @livcd: with hardcoded i mean i gave a string as argument like: var fullFile = r"c:\users\xxx\Pictures\2019 - Scotland the beautiful\img-001.jpg"
11:25:03*pbb joined #nim
11:25:25FromGitter<faulander> just try this playground: https://play.nim-lang.org/#ix=2hQa
11:25:42livcdfaulander: that code works on my windows machine
11:27:12FromGitter<faulander> @livcd: it doesn't on mine :)
11:28:40livcdfaulander: and are you on Windows?
11:28:43livcdhttps://play.nim-lang.org/#ix=2hQq
11:29:39FromGitter<faulander> you are using "/" as DirSep, which is *nix, Windows uses "\"
11:29:57FromGitter<faulander> as i mentioned, it works on *nix
11:30:54FromGitter<faulander> i already wrote my own proc for it, it still is strange
11:31:19FromGitter<faulander> my own proc works btw, on *nix and Windows
11:31:27livcdfaulander: right I am just telling you I get the same output on Windows with "\" as I do with "/" on *nix as shown in playground
11:34:11livcdfaulander: i am on 1.2.0
11:34:20FromGitter<faulander> wait ... does it make a difference which shell i use to run the program?
11:34:53FromGitter<faulander> i am using git-shell inside visual studio code, how does the os module gets the DirSep constant?
11:35:18*hpyc9 joined #nim
11:36:45FromGitter<faulander> and why doesn't it work in playground if i use the hardcoded windows path?
11:40:57*pbb quit (Remote host closed the connection)
11:44:13FromDiscord<Rika> because nim doesnt distinguish the target os with the string you pass in
11:44:41FromDiscord<Rika> it does matter, since git bash essentially tells whatever programs it runs that the os is not windows
11:45:10FromDiscord<Rika> nim doesnt care what string you give it, it doesnt use that to check what os its on when it compiles
11:47:01FromDiscord<Rika> faulander ^ forgot to ping
11:47:04FromGitter<faulander> ah ... ok, i try powershell as shell in visual studio
11:53:45FromGitter<faulander> on cmd i now get: C:\Users\xxx\scoop\apps\nim\current\lib\core\macros.nim(557, 8) Error: undeclared field: 'exe'
11:54:03*audiofile joined #nim
11:54:07audiofilehullo
11:54:17audiofileπŸ‘‘
11:54:18*dddddd joined #nim
11:54:34*pbb joined #nim
11:55:52*krux02 joined #nim
11:56:51FromGitter<faulander> any clue what the macros error means?
11:58:09FromGitter<alehander92> you need a traceback
11:58:15FromGitter<alehander92> it probably comes from
11:58:32FromGitter<alehander92> some code that is expanded using a macro
11:58:45audiofiletf is a gitter
11:59:50FromGitter<faulander> @alehander92 how do i get a traceback? i still have to say sorry, i am into nim since 3 days and still used to python. traceback is automatic there.
12:00:01FromDiscord<arnetheduck> `nlvm` at 1.2, and llvm 10
12:00:04*jjido joined #nim
12:00:47FromDiscord<clyybber> nice
12:00:47livcdfaulander: are you trying the same code?
12:02:09audiofilePMunch whoa is this you? https://news.ycombinator.com/item?id=21057751 amazing answer :D
12:02:09livcdfaulander: dont you have a typo somewhere for ext/exe ?
12:02:31FromGitter<faulander> found it. livecd you're a genius.
12:03:11livcdfaulander: You have a typo in my handle. It's livcd not livecd.
12:03:29PMunchaudiofile, haha yes that's me
12:03:34PMunchAnd thanks :)
12:04:14audiofilewas referenced in https://www.zdnet.com/article/python-inspired-nim-version-1-0-of-the-programming-language-launches/ if you're interested in seeing how far it's gone!
12:05:02PMunchOh fun :)
12:06:02*supakeen quit (Quit: WeeChat 1.9.1)
12:06:45*supakeen joined #nim
12:08:58*pbb quit (Ping timeout: 265 seconds)
12:10:55*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:11:10FromGitter<faulander> @livcd: With our without 'e': genius, i said to you, not to me ;)
12:11:20FromDiscord<arnetheduck> Sure, if you stay with 1.0, programs won't break πŸ˜‚
12:12:44*dadada quit (Ping timeout: 256 seconds)
12:13:16*lbart_ joined #nim
12:13:19*lbart quit (Ping timeout: 265 seconds)
12:14:04*dadada joined #nim
12:14:27*dadada is now known as Guest22484
12:22:41audiofilediscord peeps if you see this say hi
12:23:05FromGitter<alehander92> @faulander sorry
12:23:20FromGitter<alehander92> it is only automatic
12:23:34FromGitter<alehander92> if you compile for debug mode
12:23:35FromGitter<alehander92> i think
12:23:49FromGitter<alehander92> and macros expand on compile time, so this kind of traceback is
12:23:53FromGitter<alehander92> a bit different
12:23:58FromGitter<alehander92> do you have an example we can run
12:25:11FromGitter<jorjun_twitter> Any wisdom on threejs and nim? Can I easily target a three.js canvas with a nim setup?
12:25:37FromDiscord<Rika> we can hear stuff on discord, just not send (we can here, not in nim offtopic)
12:25:40PMunchjorjun_twitter, shouldn't be hard
12:25:45FromDiscord<Rika> because the bridge is still funky over there
12:26:10PMunchYou can tell Nim code to run JS functions, so you can just use the three.js functions directly
12:27:11FromGitter<jorjun_twitter> @FromIRC Very new to nim and going thru the exercism track right now. But if there is any small sample I can peak at.. I wouldn’t know where to begin right now
12:31:23krux02@jorjun fromIRC is not a user, it is a bridge
12:31:34krux02it is a bot sending stuff that is written on IRC
12:31:42krux02my user name is krux02
12:31:43FromGitter<jorjun_twitter> gathered that from the bot message
12:31:47*hpyc9 quit (Killed (Sigyn (Stay safe off irc)))
12:31:47*blackbeard420 quit (K-Lined)
12:31:47krux02ok
12:31:54krux02I don't see that bot message
12:32:12krux02are you on twitter?
12:32:20FromGitter<jorjun_twitter> I edited my message, but that didn’t work. Yep @jorjun
12:32:58krux02interesting, because I see your message from as FromGitter and then with the username <jorjun_twitter>
12:33:01krux02double indirection
12:33:30FromGitter<jorjun_twitter> Currently using Mac OS X Gitter client, authorised by my twitter a/c
12:33:56FromGitter<jorjun_twitter> More convenient option ?
12:34:07krux02not really.
12:34:15krux02I just use IRC.
12:34:57krux02I recently was on the Telegram Nim channel (that one is unconnected), and it is too much visual communication for me.
12:35:03krux02I prefer pure text.
12:35:14krux02but it is a mess.
12:35:32krux02whenever somebody posts source code on gitter, it is really ugly to read here.
12:36:11krux02and when I post source code, I put it on a pastebin service (ix.io), because IRC isn't made for large messages.
12:36:33krux02IRC even actively slows you down if you post too fast. It is to prevent spammers.
12:36:37FromGitter<jorjun_twitter> maybe discord is better for not spamming others… can’t see other channels in here.
12:37:30krux02I really do like IRC, because it is one fast ancient client that works for many opensource projects.
12:37:41krux02And when I have a question, I can just enter the channel.
12:38:09*blackbeard420 joined #nim
12:38:13krux02I mean Discord really gains popularity recently. But it is closed source software.
12:39:56*lbart_ is now known as lbart
12:41:47FromGitter<jorjun_twitter> ooh long time since I fired irc up. But I am receiving a strong hint .. :D [ going to look at client options ]
12:43:01*jjido joined #nim
12:46:42*audiofile is now known as audiophile
12:47:56*hipoint-yc9 joined #nim
12:48:12PMunchkrux02, on gitter is fine, we just get a line and a link from that. It's the Discord bot which is the problem
12:48:23dom96how's everybody doing?
12:48:55PMunchI'm doing fine :) Just got back from a little Easter getaway, but I think I slept weird because my back is hurting like a motherfucker..
12:49:05FromGitter<sealmove> Guys, currently I am using `string` instead of `seq[byte]` because the procs in `streams` module work with `strings` and do not have equivalent procs for `seq[byte]`. In reality I am fiddling around with sequences of bytes. The string representation often does not make sense for my data. Is it "correct" to keep using `string` despite this, or should I make wrappers for the procs in `streams` module and start using
12:49:05FromGitter... `seq[byte]` instead?
12:49:43PMunchjorjun_twitter, here is a super minimal example from the docs: https://nim-lang.org/docs/backends.html#nim-code-calling-the-backend-javascript-invocation-example
12:49:50FromGitter<sealmove> PMunch :O getaway?
12:50:03PMunchIt should at least point you in the right direction in regards to how to call JS functions from Nim.
12:50:17PMunchsealmove, 45 minutes by car out to a cabin in the middle of no-where :P
12:50:36FromGitter<sealmove> that's still great
12:51:40FromDiscord<nord501> https://www.youtube.com/watch?v=4o_tmccinds - Exporting C APIs from Zig, D, and Nim
12:52:53FromDiscord<Rika> nice, did you make that?
12:52:57PMunchsealmove, yeah I thought you were criticising me for travelling during the pandemic :P
12:53:48FromGitter<sealmove> nah, just jealous
12:54:25krux02@jrjun: All clients to IRC are crap. None of them give you this straight forward experience that you are used to by modern applications.
12:54:46krux02But if you get used to ignoring the UI and just use the commands, then they are all the same and usable.
12:55:40*Guest22484 is now known as dadada
12:55:51dadadairssi is not crap
12:57:32*ljoonal quit (Quit: ljoonal.xyz)
12:58:08FromDiscord<clyybber> weechat isn't either
12:58:25FromDiscord<clyybber> but yeah both have commands as the main interface
13:00:04FromGitter<zetashift> HexChat worked fine for me on Windows, the server configuration etc where the only thing I had to figure out
13:00:34*Vladar quit (Quit: Leaving)
13:00:52kungtotteFor a non-op user, the only commands you ever use are /connect, /join, /part, /quit, /msg, /me, and possibly /ignore
13:01:27FromGitter<sealmove> So anyone has an opinion on what I wrote above? :3
13:01:32kungtotteConnect can be skipped if you set up auto-connect
13:01:57FromDiscord<Rika> i use string instead of seq[byte] and have had no issues
13:03:13PMunchsealmove, I tried to have seq[byte] accepted into the stdlib, but I tagged it onto some other features that people didn't like..
13:03:30PMunchBut you can cast between string and seq[byte] just fine
13:03:42Zevv*for now*
13:03:51PMunchFor now?
13:04:06Zevvstrings are not seq[bytes] for a reason
13:04:40dom96Yeah, I would avoid doing this
13:04:55dom96Things might change between Nim versions or implementations of Nim
13:04:57FromDiscord<Rika> what would you recommend for the missing procs then?
13:05:19FromDiscord<clyybber> maybe we should add a stringtoSeq to the stdlib then
13:05:20Zevvthe implementation is not guarenteed to be castable forever. I once got started moving short strings on the stack, everything up to 15 bytes does not go onto the heap then.
13:05:23FromDiscord<Rika> if something changes then thats for sure on a 2.0 and not a 1.4 up no?
13:05:23FromDiscord<clyybber> so as to abstract the cast away
13:05:57Zevvnever finished it, though
13:06:03FromDiscord<Rika> clyybber you can always do toSeq().mapIt(it.byte) (is it byte??) or something no?
13:06:36FromDiscord<clyybber> Yeah, but a cast is faster I think
13:08:19FromGitter<sealmove> if I made wrappers I would do `.mapIt(it.byte)`, but should I? Performance-wise it's bad, but using strings also feels wrong...
13:08:36FromDiscord<clyybber> I'm not sure its bad. Measure it I guess.
13:08:39FromDiscord<clyybber> Both should do a copy
13:09:33FromDiscord<clyybber> sealmove: The best you can do currently is make yourself a stringToSeq proc in which you abstract the cast/mapIt away
13:10:48*ljoonal joined #nim
13:10:54krux02clyybber: I would not disagree to support conversions like ``seq[byte](myString)`` and ``string(myByteSeq)``
13:11:08FromDiscord<clyybber> Hmm
13:11:08krux02but don't introduce new names to Nim. Especially not in system.nim
13:11:08FromGitter<sealmove> krux02 yes!! I'd love this
13:11:23FromDiscord<clyybber> krux02: Yeah, I wouldn't like a new name either
13:11:30FromDiscord<clyybber> Maybe a converter really is best here?
13:11:32dom96krux02, that would be a great feature
13:11:47dom96clyybber: no. Implicit conversions are always risky
13:11:53FromDiscord<clyybber> True
13:12:03ZevvThe current implementation would be free tot do a copyMem(), as long as the binary representation is the same, and any future implementations can do the Right Thing what that changes.
13:12:19Zevv /when that changes/
13:12:30FromDiscord<clyybber> dom96: I forgot that converters enable implicit conversion
13:12:51FromDiscord<clyybber> I was thinking about a way to enable this via a system.nim addition, rather than a compiler patch
13:13:27*ljoonal quit (Client Quit)
13:14:23krux02clyybber: builtin type conversions always require a compiler patch
13:15:00FromDiscord<clyybber> Not really
13:15:19FromDiscord<clyybber> Assuming we could restrict converters to explicit conversion only
13:15:20krux02In Nim? yes.
13:15:47krux02C++ has type conversion operators, but you can't create them for builtin type to builtin type conversions.
13:17:37*narimiran joined #nim
13:26:41*Guest85 joined #nim
13:28:34*NimBot joined #nim
13:28:52FromGitter<sealmove> `seq[byte](myString)` not working is just a limitation. There are no drawbacks for enabling this.
13:29:16FromGitter<sealmove> Even if it needs a compiler patch I think it's worth it.
13:34:26FromGitter<sealmove> And also additions to `streams` module are also good idea I think
13:34:55PMunchZevv, wouldn't that be useful for seqs as well though? The short strings on stack thing
13:34:59FromGitter<sealmove> for example we have `newStringStream`
13:35:19FromGitter<sealmove> why not have `newBytesStream` or something?
13:35:36FromGitter<sealmove> `newByteStream` *
13:36:33ZevvPMunch: as long as it is seqs of very short things. Seqs and string (at least in ARC) now have two longs on the stack: one is the capacity with some flags, the other the pointer. This little block could be used to hold string data by adding a 'short string' flag bit and then using the leftover bytes (15 on x64, 7 on x86) for literal data
13:36:57Zevvso for seq[byte] it would make sense, but not for seq[SomeObj], usually
13:37:55PMunchOooh, that would be a neat optimisation indeed
13:37:56*Guest85 quit (Quit: My Mac Pro has gone to sleep. ZZZzzz…)
13:38:26PMunchBut yeah it would make sense for SomeObj as long as sizeof(SomeObj)<=[15|7]
13:40:05FromDiscord<KingDarBoja> https://github.com/epiphone/serverless-nim
13:40:55*nsf quit (Quit: WeeChat 2.8)
13:44:49Zevvanyway, I looked into this once but Ar4q discouraged me and told me to go fix slicing
13:44:56Zevvwhich is of course way over my head so I never got anywhere
13:49:24*sagax quit (Ping timeout: 258 seconds)
13:49:53FromDiscord<arnetheduck> short strings: https://github.com/elliotgoodrich/SSO-23
13:51:59FromDiscord<arnetheduck> what we do for `string<>seq[byte]` conversion: https://github.com/status-im/nim-stew/blob/master/stew/byteutils.nim#L144 (specially tostring is onerous because of the null byte requirement)
13:55:51*ljoonal joined #nim
13:59:25*waleee-cl joined #nim
14:01:06FromDiscord<Recruit_main707> audiofile: about the offtopic conversation, if you know enough about flatbuffers and think you can use them on nim, i also have a request :p
14:09:55audiophilesorry, first time hearing of it! :(
14:10:08FromDiscord<Recruit_main707> not blaming you
14:10:15FromDiscord<Rika> its like the sister of protobuf no?
14:10:23FromDiscord<Rika> sounds interesting
14:10:33FromDiscord<Rika> im no pmunch but maybe ill try it out some time
14:10:38PMunchHih?
14:10:38FromDiscord<Recruit_main707> i think its actually older, (not sure at all)
14:10:48FromDiscord<Rika> whoops, irc lol
14:11:00PMunchHaha :P
14:11:07PMunchI like to know when I'm mentioned
14:11:45FromDiscord<Recruit_main707> also, making some noise in here would be nice guys: https://github.com/google/flatbuffers/issues/5855
14:11:48PMunchFeel free to shamelessly copy from the protobuf module if you want to implement flatbuffers
14:12:28FromDiscord<Recruit_main707> the protobuf nim module?
14:13:09FromDiscord<Rika> PMunch: ooh can i? TuT
14:13:19PMunchRecruit_main707, yes
14:13:24FromDiscord<Rika> @Recruit_main707 ill try working on it tomorro
14:13:24PMunchRika, of course, it's MIT :P
14:14:00FromDiscord<Recruit_main707> @Rika there is a flatbuffers implementation for nim, but it cant parse .fbs files to my known
14:14:03FromDiscord<Rika> PMunch: actually, why aren't you making one?
14:14:13FromDiscord<Rika> what is an fbs file
14:15:17PMunchRike, never had the use for one
14:15:17*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:15:21FromDiscord<Recruit_main707> https://github.com/RLBot/RLBot/blob/master/src/main/flatbuffers/rlbot.fbs
14:15:21FromDiscord<Recruit_main707> and then, the thing is that this gets transpiled for nim to be used
14:15:26FromDiscord<Rika> i am now Rike
14:15:26PMunchI mostly make modules that I think I'll need :P
14:15:52FromDiscord<Rika> Rike sounds like a horrible version of Mike
14:18:05FromDiscord<Recruit_main707> PMunch: were is the protobuf thing?
14:18:19PMunchhttps://github.com/PMunch/protobuf-nim I'd guess
14:18:43FromDiscord<Recruit_main707> thanks
14:18:47PMunchDamn, got it right :)
14:19:02FromDiscord<Recruit_main707> can it do what i said about the .fbs files though?
14:27:28FromDiscord<Rika> its for protobuf, not flatbuffer
14:27:35*hoijui joined #nim
14:28:31FromDiscord<Recruit_main707> so sad
14:28:38FromGitter<geotre> Has anyone got a decent guide on setting up neovim to edit nim?
14:29:50FromGitter<zacharycarter> Recruit_main707 - why not try wrapping: https://github.com/dvidelabs/flatcc
14:30:38FromGitter<zacharycarter> Nimterop can probably help here
14:33:00*Trustable joined #nim
14:33:09FromGitter<Yardanico> http://nibblestew.blogspot.com/2020/04/your-statement-is-100-correct-but.html
14:37:19FromGitter<sealmove> @Rika @Recruit_main707 if you are into these stuff, check out Kaitai Struct ;)
14:37:43FromGitter<sealmove> https://github.com/kaitai-io/kaitai_struct/issues/619 https://ci.kaitai.io/
14:38:08FromDiscord<Recruit_main707> sadly, i need flatbuffers because its a framework
14:38:34FromDiscord<Rika> sealmove: ive been looking for an efficient binary data transmission format yeah
14:38:54FromGitter<sealmove> when you say "efficient"?
14:39:21FromGitter<sealmove> KS is focused on expressiveness and ease of use. It's not focused much on performance.
14:39:33FromDiscord<Rika> `Python is a complete joke, it will fail hard when you need to process ten million files a second on an embedded microcontroller using at most 2 k of RAM.` LMAO this point though
14:39:44FromDiscord<Rika> (from yardanico's link)
14:40:00FromDiscord<Rika> sealmove: size and speed efficient
14:40:07FromDiscord<Recruit_main707> lmao
14:40:16FromDiscord<Rika> size and speed efficiency doesnt imply difficulty of use though
14:41:14FromGitter<zetashift> yea I saw that post on lobster, funny but true
14:43:35FromDiscord<kodkuce> hmm whats moste efficient way to take part of string, mysting = "abcdiefgejklmopqar" wantIndexedMidlePart = mystring[2..5] ?
14:45:51*gangstacat quit (Quit: Ĝis!)
14:47:27FromGitter<zetashift> Did Nim get accepted for GSoC?
14:47:35*sagax joined #nim
14:48:49livcdCan I somehow tell from a Nim binary if it uses ARC?
14:49:01livcdWhat I mean. I can trivially find out?
14:49:05livcdCan I*
14:49:07FromDiscord<Rika> not reliably i dont think
14:51:01livcdhttps://github.com/juancarlospaco/plz -> outrageous claims!
14:52:00FromDiscord<Rika> that icon though...
14:52:07FromGitter<sealmove> Rika let me explain: During serialization you want your format to be as simple as possible usually, so serialization software can focus on performance rather than features. KS focuses on parsing rather than serialization, so it includes crazy features which enables you to parse very weird/complex formats in an easy way. Also it can produce parsers in ~10 different languages. They try to keep the compiler architecture
14:52:07FromGitter... simple, so some optimizations are discouraged and/or hard to integrate into the current codebase.
14:53:15FromDiscord<Rika> h-how?!
14:53:15FromDiscord<Rika> https://cdn.discordapp.com/attachments/371759389889003532/699270984582168606/unknown.png
14:55:17FromGitter<sealmove> kodkuce: your example should be as efficient as it gets
14:55:29FromDiscord<Rika> sealmove: okay, doesnt matter, ill take a look at it
14:56:22*xcm quit (Remote host closed the connection)
14:57:04FromGitter<sealmove> What I like about it is that you can use it for stuff like this: https://github.com/kaitai-io/kaitai_fs
14:58:22FromDiscord<Asmodeus> Which compiler does nim include/use by default?
14:58:33*xcm joined #nim
14:58:34livcdThe one that you have installed!
14:58:55FromDiscord<Asmodeus> Oh it just calls out to one? I assumed it bundled one by default
14:58:56dzamo[m]<FromGitter "<geotre> Has anyone got a decent"> I installed nimlsp using nimble and pointed coc.nvim at that which got autocompletion going. But to get syntax highlighting I had to pull down and install a separate Vim syntax file
15:00:00FromGitter<geotre> @dzamo yeah I'm having trouble finding the right combination of plugins to get everything to work
15:01:20FromDiscord<Asmodeus> Does nim compile out to a single .c/.h file? And does it use libc?
15:02:17FromDiscord<Rika> nim on windows uses mingw if you tell it to install with that
15:02:18FromDiscord<clyybber> it compiles to multiple .c files
15:02:40livcdsee nimcache
15:02:59FromDiscord<Asmodeus> Ah okay, makes sense, thank you
15:04:27*gangstacat joined #nim
15:18:49*gangstacat quit (Quit: Ĝis!)
15:22:03*gangstacat joined #nim
15:22:40*Kaivo joined #nim
15:28:14livcdanyone thought about implementing an rdp client in Nim?
15:28:34FromDiscord<Rika> rdp?
15:29:02livcdmicrosoft remote desktop
15:32:39FromDiscord<clyybber> why tho
15:32:54FromDiscord<clyybber> Windows has its own RDP server and client
15:33:41shashlickRecruit_main707: do you want flatcc wrapped?
15:35:50livcdclyyber: for automation ofc
15:37:09*hax-scramper quit (Ping timeout: 250 seconds)
15:37:27FromDiscord<Recruit_main707> shashlick, i want a flatbuffer parser for nim
15:38:48*hax-scramper joined #nim
15:39:33shashlickdoes https://github.com/dvidelabs/flatcc meet your needs?
15:39:40*myphs joined #nim
15:40:16FromDiscord<Recruit_main707> if it was done for nim, yes
15:40:41FromDiscord<Rika> its in c
15:40:47FromDiscord<Rika> wrappers are easy enough
15:40:47livcdshashlick will do his magic wrapping :)
15:40:51shashlicki'm asking if you want it wrapped, which means you are okay with the functionality it offers
15:40:57shashlicknot reimplementing the whole thing in Nim
15:41:31*Guest85 joined #nim
15:41:35FromDiscord<Recruit_main707> then no
15:41:52*myphs__ joined #nim
15:41:58FromDiscord<Recruit_main707> Rika, doesnt that kind of make it losse the point?
15:42:11FromDiscord<Rika> why?
15:42:39FromDiscord<Recruit_main707> because if i have to wrap the generated code i could do it in nim (if it was not so big)
15:42:58*aEverr quit (Ping timeout: 256 seconds)
15:44:00*aEverr joined #nim
15:44:37*myphs quit (Ping timeout: 260 seconds)
15:45:22*myphs__ is now known as myphs
15:45:39*Vladar joined #nim
15:47:31*audiophile_ joined #nim
15:49:54*audiophile quit (Ping timeout: 240 seconds)
15:49:56*audiophile_ is now known as audiophile
16:01:33*audiophile is now known as videofile
16:01:37*videofile quit (Changing host)
16:01:37*videofile joined #nim
16:02:35*endragor quit (Remote host closed the connection)
16:08:32*crem quit (Ping timeout: 260 seconds)
16:08:49*xcm is now known as Guest41281
16:08:49*Guest41281 quit (Killed (barjavel.freenode.net (Nickname regained by services)))
16:09:41*crem joined #nim
16:10:11*Kaivo quit (Ping timeout: 260 seconds)
16:10:37*xcm joined #nim
16:12:35shashlickhttp://ix.io/2hSy/nim is the wrapper output for flatcc
16:14:32FromGitter<zetashift> Did you just wrap flatcc like that using nimterop? :O
16:14:46shashlickyep
16:15:47FromGitter<kaushalmodi> shashlick: does Nim playground have nimterop installed?
16:15:57FromGitter<kaushalmodi> if so, it would be cool to share short nimterop recipes
16:16:26FromGitter<kaushalmodi> *hmm, but it might not be able to do the git pulling of the header files*
16:17:02FromDiscord<Recruit_main707> you know, shashlick, could we get to talk in some kind of private msg form so that you help me understand how to wrap the flatbuffers.h file now? that would actually be useful for, and a good idea to even make public at github
16:18:00FromDiscord<Recruit_main707> because based on the size of the flatbuffers.h file and the current nim implementation, i can see it lacks a bunch of things
16:18:13*hoijui quit (Ping timeout: 264 seconds)
16:18:30shashlickhttp://ix.io/2hSB/nim is the nimterop wrapper itself which also builds the library static or dynamic
16:18:39shashlickonly tested on linux so far
16:18:42*thomasross joined #nim
16:19:08FromDiscord<Recruit_main707> but this is the flatcc one, isnt it?
16:20:06FromGitter<geotre> @dzamo what did you put in coc-settings.json to hook up nimlsp? I can't get it to work
16:20:08shashlickya, and it only wraps flatcc.h - was there something else you wanted?
16:20:51FromDiscord<Recruit_main707> flatcc is the compiler i think, i would need the library
16:22:05*Guest85 quit (Quit: My Mac Pro has gone to sleep. ZZZzzz…)
16:22:35FromDiscord<Recruit_main707> this one i think... https://github.com/google/flatbuffers/tree/master/include/flatbuffers
16:22:58dzamo[m]<FromGitter "<geotre> @dzamo what did you put"> @geotre I used the example for Nim here https://github.com/neoclide/coc.nvim/wiki/Language-servers
16:23:14FromDiscord<Recruit_main707> CoC XD
16:23:35FromDiscord<Recruit_main707> (im sorry)
16:23:44*Guest85 joined #nim
16:23:53shashlickflatbuffers is C++, nimterop doesn't support C++
16:24:05FromGitter<geotre> @dzamo weird I tried that but I just get "[coc.nvim] Definition provider not found for current document" when running stuff on a nim file
16:24:06shashlickand flatcc has a compiler and runtime stuff
16:24:15shashlicki'll recommend you see all the functionality it offers
16:24:41FromDiscord<Recruit_main707> i will
16:25:07shashlickcause it is pure C and easy to wrap
16:25:11FromGitter<zetashift> @geotre any reason you can't use https://github.com/alaviss/nim.nvim ?
16:25:26dzamo[m]@geotre I also had to tell Vim that files with a. nim extension have filetype "nim". Try running :set ft=nim in a Nim buffer for a once off test and then look for output in :CocInfo
16:28:23FromGitter<geotre> @dzamo good point, that's probably it
16:28:30FromGitter<geotre> @zetashift it didn't work for me
16:29:31*Kaivo joined #nim
16:30:24FromDiscord<kodkuce> how to write forward slash in string
16:30:58FromDiscord<Rika> just type it
16:31:00FromDiscord<Rika> "/"
16:31:27FromDiscord<Rika> backslash needs escaping, with another backslash "\\"
16:31:33FromDiscord<Rika> damn it discord
16:31:37aEverr"\\"
16:31:45aEverrjust double it damn it
16:31:58FromDiscord<Rika> or you can do r"\"
16:31:59FromDiscord<Recruit_main707> `"\\"`
16:32:00FromDiscord<Rika> AUFYBN
16:32:06FromDiscord<Rika> `r"\"`
16:34:45*xcm quit (Read error: Connection reset by peer)
16:36:43FromGitter<geotre> @dzamo that was the problem. Thanks for the help!
16:38:06*xcm joined #nim
16:38:10dzamo[m]@geotre nice :)
16:39:21FromGitter<geotre> @dzamo what did you use for the syntax highlighting? I guess I can just pull one of the files from the various nim.nvim plugins right?
16:41:36FromDiscord<kodkuce> hmm
16:42:22dzamo[m]<FromGitter "<zetashift> @geotre any reason y"> If you've already got a completion framework like coc installed then you first look for things that work within that I guess
16:42:25FromDiscord<Recruit_main707> @shashlick, i know perfectly understand what i want to do, i dont need to wrap the flatbuffers thing, only the emmited header :smart:
16:42:32FromDiscord<Recruit_main707> now**
16:42:34dzamo[m]<FromGitter "<geotre> @dzamo what did you use"> Yes I took an older one in the end
16:43:07*jjido joined #nim
16:44:30dzamo[m]<FromGitter "<geotre> @dzamo what did you use"> Because the newer one from the nim.nvim repo had dependency on another part of that plugin
16:45:16dzamo[m]So I used the one here IIRC https://github.com/baabelfish/nvim-nim
16:46:04FromGitter<geotre> I just found the same thing
16:46:16FromGitter<geotre> But copying the function into that file seems to stop it complaining
17:04:10dzamo[m]<FromGitter "<geotre> But copying the functio"> Oh cool I'll go back and give that a try then, thanks
17:07:39FromDiscord<Recruit_main707> id like to see something to clear the nimcache
17:07:58FromDiscord<Recruit_main707> kind of `nim --clearcache` or something
17:08:09Yardanico--forceBuild ?
17:08:19FromDiscord<Recruit_main707> that does it?
17:08:45Yardanicofully rebuilds everything
17:08:59Yardanico"-f, --forceBuild:on|off force rebuilding of all modules"
17:09:01FromGitter<mantielero> Hello
17:09:17Zevvhi mantielero
17:09:23FromGitter<mantielero> I am having an issue with a macro
17:09:30FromDiscord<Recruit_main707> that doesnt delete the cache files whose projects might have been deleted
17:09:55Yardanicoah well I just do rm -rf ~/.cache/nim if I need to "clear the cache" :P
17:10:26FromDiscord<Recruit_main707> ok
17:11:11FromGitter<mantielero> I am getting the error: "/home/jose/src/ipopt.nim/src/ipopt.nim(322, 15) Error: type mismatch: got <array[0..1, Number]> but expected 'array[0..0, float]'" when I compile "ex01" from https://github.com/mantielero/ipopt.nim/tree/master/src
17:11:44*hoijui joined #nim
17:12:13FromGitter<mantielero> The problem dissapear when I comment: https://github.com/mantielero/ipopt.nim/blob/master/src/ipopt.nim#L473
17:12:27FromGitter<mantielero> Which doesn't makes much sense to me :o/
17:12:45*xcm quit (Remote host closed the connection)
17:13:27FromGitter<mantielero> Besides, these lines show the content that I am expecting: https://github.com/mantielero/ipopt.nim/blob/master/src/ipopt.nim#L428-L429
17:13:56Zevvmantielero: hard to debug that for us, it's pretty big like this.
17:14:07ZevvI'll take a peek but no promises.
17:14:24FromGitter<mantielero> I understand
17:14:25ZevvIf you suspect you found a bug, it pays to reduce the size of your problem to the bare reproducable minimum
17:14:40FromGitter<mantielero> I don't think it is a bug
17:15:02*xcm joined #nim
17:16:00FromDiscord<Recruit_main707> some nimterop gurus that might be able to help me?
17:17:31Yardanicoask any question right away :P
17:17:36Yardanicohttps://dontasktoask.com/
17:18:24FromDiscord<Recruit_main707> idont know how to use nimterop :p i need to wrap some headers
17:18:57FromDiscord<Recruit_main707> lets call them `header1.h` to `header5.h`
17:18:59FromGitter<mantielero> I would start first with c2nim (IMHO)
17:19:30FromDiscord<Recruit_main707> could try
17:19:35Yardanico@Recruit_main707 well nimterop isn't hard
17:19:46Yardanicosee https://github.com/Yardanico/nim-libvlc/blob/master/src/libvlc.nim
17:19:58Yardanicoyou can ignore the symbol stuff and cPlugin and cOverride for now
17:20:07Yardanicothe main thing is just "cImport(baseDir / "include" / "vlc" / "vlc.h", recurse = true, dynlib = "dynvlc")"
17:20:26FromGitter<mantielero> Take a look at the documented templates: https://github.com/nimterop/nimterop/blob/master/nimterop/template.nim
17:31:05FromGitter<faulander> anyone here compiling with WSL on Windows? Windows Executable works just fine, but the Linux-Version doesn't do anything when run. no compiler errors, no ouput
17:31:12FromDiscord<Recruit_main707> sorry, i had to leave, i will have a look, thanks
17:33:00FromDiscord<kodkuce> i wanted to cheat pars this multypart wasted 2 hours and in end i saw its broken cuz as soon i added second field it doomed me xD
17:33:18FromGitter<zetashift> @faulander do you mean the binary that is created when using WSL doesn't do anything?
17:45:12shashlickya just ask your questions on nimterop - will reply
17:45:53shashlickYardanico: can you test your libvlc wrapper with ast2?
17:46:22Yardanicoshashlick: sure
17:46:27Yardanicohow to? :P
17:46:55FromGitter<zetashift> WSL hello world runs fine for me
17:47:14Yardanico-f:ast2 ?
17:47:53shashlickyes - just add flags = "-f:ast2"
17:47:57shashlickto cImport
17:48:06shashlickof course, will help most if you have real tests πŸ˜„
17:48:55FromDiscord<kodkuce> dom96: how to reed data form this multypart thingy
17:50:01*gmpreussner quit (Ping timeout: 265 seconds)
17:50:08Yardanicoshashlick: should I install @#head ?
17:50:17Yardanicoor just "nimble install nimterop"
17:51:27FromDiscord<kodkuce> MultiData is some orderdTable but i cant do md[4] or md["mykey"]
17:51:39Yardanicodid you do "import tables"?
17:52:12shashlickyou'll need #head
17:52:21shashlickast2 is not tagged yet
17:53:30FromDiscord<kodkuce> beh i am tard, yep frogot to import
17:53:37Yardanicowell it's not intuitive really
17:54:33Yardanicoshashlick: got an error :)
17:54:56Yardanico"Error: unhandled exception: getters.nim(117, 12) `name.nBl` Blank identifier error [AssertionError] [AssertionError]"
17:55:26Yardanicohow do I make a usable stack trace for you?
17:55:50Yardanicohttps://gist.github.com/Yardanico/756cc013510352e1b3f1704794a8164b this is what I get
17:56:09shashlicknice - try with -d
17:56:15shashlickwill tell whicih specific symbol
17:56:20*myphs quit (Remote host closed the connection)
17:57:13Yardanicohttps://gist.github.com/Yardanico/71bdc412caeb5bd91dc174a0c2080beb full output
17:57:28Yardanicoguess it's vlc_Log ?
17:58:20Yardanicohttps://git.videolan.org/?p=vlc.git;a=blob;f=include/vlc_messages.h;h=b6d5843985dccfad5d24a6d7ae1e4a4728023ccd;hb=HEAD#l122 the source
18:00:11Yardanico"struct vlc_logger *const *logger" it can't parse this argument maybe?
18:01:38FromDiscord<kodkuce> grrrrrrrrrrrrrrrrrr that multypart parses skips filename 😦 will need to beat it more
18:02:01shashlickYardanico: are you running this on command line with toast
18:02:05shashlickor with cImport
18:02:11Yardanicowith cImport
18:02:22shashlickhow come VLC_API isn't stripped?
18:02:54Yardanicowdym? I only remove libvlc_ prefix in my onSymbol
18:02:55shashlickhah, also varargs which isn't supported
18:03:37shashlickcImport always calls the preprocessor so VLC_API should have been processed
18:05:17*gmpreussner joined #nim
18:06:26shashlickokay let's come back to libvlc - might be biting off more than I can chew at the moment
18:09:00Yardanicoshashlick: it's okay, thank you for creating nimterop in the first place :) I wish I could help but I'm not good when it comes to C or AST stuff
18:09:39videofileyay discord is back up again
18:09:49videofilewelcome back discord gang
18:09:56Yardanico?
18:10:03videofilethe relay was broken
18:10:15Yardanicodoesn't seem so
18:10:20videofileomg youre the nimexpr guy
18:10:26YardanicoI acn see messages just fine in Discord, even those before your messages
18:10:30Yardanico*can
18:10:36Yardanicovideofile: well yes but it's a simple lib really
18:10:41Yardanicoand not that efficient since it's recursive
18:10:46videofilehuh but it didnt show up in irc for a while
18:11:27FromDiscord<kodkuce> undeclared field: 'data' for type strtabs.StringTableRef [declared in /home/me/.choosenim/toolchains/nim-#devel/lib/pure/strtabs.nim(75, 3)] hmm am i retarded or what
18:11:44FromDiscord<kodkuce> StringTableRef = ref StringTableObj
18:11:48Yardanicoso?
18:11:51Yardanico"data" is private
18:12:01FromDiscord<kodkuce> oh
18:12:06YardanicoWhy would you want to access it though?
18:12:09Yardanicoyou can iterate over all values
18:12:36FromDiscord<kodkuce> i am trying to do that just duno how
18:13:00shashlickYardanico - no worries - will be good to test all existing wrappers with ast2 before final release
18:13:24Yardanico@kodkuce for (key, val) in yourTable: do stuff
18:13:39Yardanicoor you can use "keys" and "values" iterators if you need only keys or only values
18:13:44shashlickwill get back to you when I have time to focus on fixing specific bugs
18:13:47Yardanicoalso for string table you need "strtabs" not "tables"
18:14:37FromGitter<awr1> hello
18:15:51FromDiscord<kodkuce> i have both i think i am getting how it works
18:16:00FromGitter<zetashift> hiya aw1
18:16:54FromDiscord<Recruit_main707> shashlick, i have a multiple directories, only headers project that i need to wrap, but it doesnt stop giving me errors, any help?
18:18:45FromDiscord<kodkuce> yey got it wokring ty
18:19:08shashlicksure, we can chat here or the nimterop room in gitter
18:20:18FromDiscord<Recruit_main707> I will go into the gitter room
18:20:41shashlickcool
18:38:00*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:40:25*xcm quit (Remote host closed the connection)
18:42:54*dddddd quit (Ping timeout: 240 seconds)
18:43:11*xcm joined #nim
18:53:01*kungtotte quit (Ping timeout: 256 seconds)
18:57:44*jjido joined #nim
19:02:31*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:03:58FromDiscord<Varriount> I'm so lonely, no one's on Discord or Mumble. 😦
19:04:06FromDiscord<Varriount> *Discord Voice chat
19:04:28*JohnAD joined #nim
19:05:59*Minimisthupper joined #nim
19:11:04*jjido joined #nim
19:20:28videofilewhat dyou wanna talkaboot
19:20:53FromDiscord<Varriount> Hm.. I don't actually know. -_-
19:22:15videofile:P
19:22:35videofiletalk about gc vs arc?
19:22:48FromDiscord<Recruit_main707> but thats an easy one
19:22:54*Minimisthupper quit (Remote host closed the connection)
19:27:32FromDiscord<Varriount> I did some recent benchmarks on `for element in x` vs `index = ... ; while index <= high(...)`, and somehow the first one come out faster.
19:27:38*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:27:57videofileRecruit tldr version?
19:29:25FromDiscord<Recruit_main707> ??
19:29:51*kungtotte joined #nim
19:31:49*PMunch quit (Quit: leaving)
19:32:06*hoijui quit (Quit: Leaving)
19:32:08PrestigeVarriount can you make a post about it? Or show how you benchmarked them?
19:32:40FromGitter<awr1> did you turn on the optimizer
19:34:56*MightyJoe joined #nim
19:36:55*cyraxjoe quit (Ping timeout: 260 seconds)
19:40:47FromGitter<zetashift> @Varriount maybe one can find out looking at the assembly or generated C code? e.g.: https://godbolt.org/z/AqiD9Y
19:53:26FromDiscord<Varriount> Prestige, awr1, zetashift: https://gist.github.com/Varriount/d7c3961f95870a1c6520523131c3971e
19:53:50FromDiscord<Varriount> I used "nim c -d:release --linedir:on --debugger:native"
19:54:04FromDiscord<Varriount> Actually, "-d:danger"
19:55:00PrestigeOn line 86, is there no way to just get the name of the proc?
19:55:19FromDiscord<Varriount> Not at runtime, no
19:55:32FromDiscord<Varriount> Actually, there might, but I couldn't be bothered.
19:58:37FromDiscord<kodkuce> can i chain sortedByIt or do i have to wirte cmp myself
19:58:53FromDiscord<Varriount> What do you mean by chain?
20:00:13FromDiscord<kodkuce> like sort first by name then sort by age if name is same
20:00:33FromDiscord<Varriount> Oh, you mean, is the sort stable
20:00:52FromDiscord<Varriount> I don't really know... Does the documentation state that it is?
20:01:27FromDiscord<kodkuce> what, i used this before for my poker obj
20:01:28FromDiscord<kodkuce> https://play.nim-lang.org/#ix=2hUP
20:01:33leorizeZevv: did you ping me?
20:01:50FromDiscord<kodkuce> just duno how to do same for tuple
20:03:23FromDiscord<kodkuce> anyway i go sleep my eyes are burning
20:06:20*lritter joined #nim
20:12:44FromDiscord<Varriount> zetashift: Any idea what "test rdi,rdi; je <address of function return instruction>" is meant for? I understand what it does, but not why it's added.
20:22:13videofileis there any recommended resource on templating, macros and metaprogramming? I want to know what all the fuss is about
20:22:32FromDiscord<Varriount> videofile: The manual is a good place to start.
20:22:43videofilethe docs?
20:23:05FromDiscord<Varriount> https://nim-lang.org/docs/manual.html
20:23:30FromDiscord<Varriount> videofile: For macros, general reading on what an AST (abstract syntax tree) is will help.
20:23:50FromDiscord<Varriount> https://en.wikipedia.org/wiki/Abstract_syntax_tree
20:23:53videofilegotcha, I do remember a little from my python days
20:23:57videofileit's from teh parse tree right?
20:23:59videofileok thanks!
20:24:33FromDiscord<Varriount> I don't know if Python uses a separate tree structure for parsing information. Nim doesn't.
20:24:43videofileslightly offtopic but does FFI mean I can use C functions directly in nim?
20:24:59videofileI see
20:25:07FromDiscord<Varriount> Yes.
20:25:19FromDiscord<Varriount> Well, when compiling Nim to C/C++, anyway.
20:25:21videofileonly C or is CPP also included?
20:25:21*cyraxjoe joined #nim
20:25:24videofileah yes
20:25:26videofileof course
20:25:43FromDiscord<Varriount> Obviously you can't easily do that when compiling to, say, javascript.
20:26:00videofile'easily' meaning it can still be done?
20:26:46FromGitter<zetashift> @Varriount sorry I have no idea D:
20:26:54*MightyJoe quit (Ping timeout: 240 seconds)
20:28:34*hipoint-yc9 quit (Killed (Sigyn (Stay safe off irc)))
20:29:14*jjido joined #nim
20:32:34videofileINTERESTING
20:32:37videofilethat manual is so extensive
20:34:24FromDiscord<Varriount> zetashift: Ah, some reading suggests rdi is used to pass the first integer (or pointer?) parameter. The first parameter is a string. Because of the whole "dereferencing null pointers is undefined behavior" thing, the compiler is free to assume that, if the pointer to the string is invalid, it can just immediately return.
20:35:00*crem quit (Ping timeout: 265 seconds)
20:36:24*crem joined #nim
20:40:05*hipoint-yc9 joined #nim
20:46:59PrestigeWhen wrapper are created for libraries (e.g. the x11 wrapper) are they typically documented? I've found some decent docs for x11 elsewhere, but there aren't really docs for our x11 wrapper
20:47:30FromGitter<zetashift> @Varriount oooh my ASM isn't that strong, that's good to know
20:47:50FromDiscord<Varriount> Prestige: If the wrapper is "low level" or "bare" (that is, it replicates the C library API exactly) then there typically isn't much documentation.
20:48:15FromGitter<zetashift> yeah Nim and documentation don't go well together currently
20:48:23*narimiran quit (Ping timeout: 258 seconds)
20:48:30FromGitter<zetashift> It's getting better though
20:48:56PrestigePerhaps I'll open a PR on x11 when I'm done reading this massive webpage about it
20:50:06*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:51:52PrestigeCan #[ ... ]# be used for docs, or is it only ##? Would be nice to have multiline
20:53:30leorizePrestige: `##[ ]##` can be used
20:53:36leorizebut we don't usually use it :P
20:53:59FromGitter<zetashift> docgen guide doesn't even mention it
20:54:41FromDiscord<Varriount> zetashift: Ah, I might have been wrong, actually.
20:54:48PrestigeHm okay I'm not sure how I feel about it anymore, lol
20:55:18FromDiscord<Varriount> Because Nim now treats a nil string as equal to "", looping over a nil string just skips over the loop
20:56:03FromDiscord<Varriount> Or rather, sets the amount of times to loop to 0. The C compiler is smart enough to recognize that if `input_arg == nil`, it should just directly return.
21:10:20*Hexeratops joined #nim
21:13:58*Vladar quit (Quit: Leaving)
21:18:13FromGitter<awr1> that was pre 1.0
21:18:36FromGitter<awr1> and has been around for like a year and a half
21:21:53*solitudesf quit (Ping timeout: 265 seconds)
21:22:44*inv2004 joined #nim
21:23:47FromDiscord<Varriount> awr: Well, yes. I just didn't connect that with the assembly I was seeing, as the assembly was the result of optimizing this fact
21:24:32*liblq-dev quit (Quit: WeeChat 2.7.1)
21:33:33*tane quit (Quit: Leaving)
21:41:10*lain quit (Ping timeout: 256 seconds)
21:42:40*lain joined #nim
21:43:40leorizeFutureStream kinda resembles io_uring :P
21:49:27*inv2004 quit (Ping timeout: 260 seconds)
21:52:31FromDiscord<Recruit_main707> Can you create a sequence of static strings?
21:53:05leorizeyou can create a static sequence of strings :)
21:53:56FromDiscord<Recruit_main707> But then if I need to pass one of those strings to a function that needs static string, will it work?
21:54:27leorizeyes, but I gotta warn you about how static strings don't really work as you'd expect them to
21:54:50leorizestatic[T] semantics is so weird that I don't really know how it actually composes with Nim
21:55:21FromDiscord<Recruit_main707> Well, it's not my function, just a fancy thing to keep the code clear
21:55:29FromDiscord<Recruit_main707> I will try it tomorrow
21:58:06FromDiscord<Recruit_main707> Also, Google contributor has answered the flatbuffers Nim support question, sadly, one of us will need to create it, the only positive thing I can think of is that if someone ever does it, it will be added to the main repo, and maybe attract more people
21:58:45leorizeI'm not surprised :P
21:58:51FromDiscord<Recruit_main707> But it doesn't seem like Google wants to do it by their self :p
21:59:44leorizenot too surprising :P
21:59:52FromDiscord<Recruit_main707> Well, something is something I guess, so @Rika if you ever finish/start that, have it in mind
22:00:28leorizegoogle wanna push adoption by implementing it for a bunch of langs
22:00:49leorizeand I'd say that the Nim community is too small for them to bother
22:01:01companion_cubeso flatbuffer is the next protobuf?
22:03:19*natrys quit (Quit: natrys)
22:04:27FromDiscord<Varriount> What's flatbuffers?
22:05:35FromGitter<zetashift> I think some grpc thing just like protobuf
22:06:21FromGitter<zetashift> "FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serialized data without parsing/unpacking it first, while still having great forwards/backwards compatibility."
22:07:03FromGitter<zetashift> this page has some why's: http://google.github.io/flatbuffers/
22:07:12Yardanicowow they have a .github.io page
22:07:22Yardanicoi mean google
22:08:29FromGitter<zetashift> I guess some team decided why not
22:10:56companion_cubeI guess they didn't want to use capnproto, cause, it's not from google
22:13:07*zacharycarter joined #nim
22:14:00*inv2004 joined #nim
22:21:54*videofile quit (Quit: Going offline, see ya! (www.adiirc.com))
22:22:12*videofile joined #nim
22:22:14videofiletest
22:25:48dadadaso I looked at the go.cxx in swig/source/modules, and there's really a lot of code that a possible nim.cxx could share with it
22:26:45dadadathere's the possibility that a nim version could exist with less code, since in the go module many things are implemented twice: for gco and gccgo
22:28:27dadada6000 lines looked scary at first but a lot of it are helper functions and boiler plate code, so when it comes down to it only about half of the code really deals with creating the wrappers
22:29:25*hipoint-yc9 quit (Killed (Sigyn (Stay safe off irc)))
22:30:45dadadaI'm sure anyone who's versed in Nim/C++ and dedicates enough time will be able to create a swig Nim module, there're standard C++ testunits/examples in swig, and if you can get a module to correctly create wrappers for them all, that should basically be the ticket to getting upstreamed
22:34:05*hipoint-yc9 joined #nim
22:34:32dadadaI bet it wouldn't take someone like say Araq longer than a week to get done, and you'd get creation of nimwrappers for C/C++ libs with very little effort, swig interface files allow for additional specification of how exactly a header/lib should be wrapped, and I think a lot of that could even be further automated by using nim macros that create those swig interface files on the fly
22:36:11*hipoint-yc9 quit (Killed (Sigyn (Stay safe off irc)))
22:41:23FromGitter<zetashift> adding a SWIG wrapper or adding support for C++ using nimterop, which one would be better?
22:41:29dadadastarting by copying the go.cxx is a good idea, since just like go nim supports overloading of procs/funcs and there are some similarities in how types are handled
22:42:04dadadazetashift: you don't understand what swig is, you're not adding a swig wrapper to nim, swig is a universal C++ wrapper creator
22:42:04FromDiscord<Recruit_main707> SWIG? Like, the python CPP thing?
22:43:04*hipoint-yc9 joined #nim
22:43:10dadadazetashift: it's basically what nimterop is, but instead of being specialized for C++->Nim it's generalized for C++->D/Go/Rust , but the end-result, the created wrappers are wrappers in the same vein that nimterop creates them
22:44:12*icebattle joined #nim
22:44:18dadadazetashift: the task/project of creating a C++ parser that extracts all the relevant bits is the hardest in all this, and the swig project is specialized in exactly that, and it also has a series of specialized transformers, that allow to create those wrappers for different languages
22:44:44leorizewell we do have a c++ parser that can do just that :P
22:44:56dadadaleorize: you mean clang?
22:45:08leorizeyea, and tree-sitter, though I won't count of that
22:45:10leorizeon*
22:45:16FromGitter<zetashift> I thought SWIG was just an easy way to get C++ code working with X lang
22:45:18*inv2004 quit (Quit: Leaving)
22:45:37leorizewell swig is pretty mature
22:45:59dadadazetashift: yes, and that's possible because it creates wrappers for X lang
22:46:01leorizethe only problem is that if someone wanna add nim support they gotta write a lump of c++ :P
22:46:18Yardanicogo big brain and write it in Nim instead
22:46:20Yardanicoby wrapping swig xDD
22:46:21videofileanyone heard of any mention of vtk library in nim?
22:46:34videofileI'd love to finish my final project in nim instead of python
22:47:13Yardanicovideofile: only found this https://github.com/Psirus/Nimfem/blob/6dd0d7b31209c70d8b2e565a387dad86cc42dffc/io.nim#L6
22:47:27dadadaleorize: don't know if you read what I wrote just earlier?! but my analysis of the go.cxx swig module clearly indicates that it's far less hard to create such a module than you would think, you can copy a lot of the logic of the go module, and nothing in there really is hard, it's just that someone has to do it, but a really good C++/Nimmer wouldn't need much more than a week in my estimate
22:47:50videofileooooh nice find Yardanico ty!
22:47:54FromGitter<tervay> Hi all, having some troubles with OOP in Nim. Trying to assign a child class to a variable that is specified as the type of the parent class, if that makes sense? Essentially I have an "abstract" class `Skill` that should be able to be subclassed and assigned to different subclasses of `Survivor` https://gist.github.com/tervay/f30176f03f8ed5e75c6af5a685b08a86 Any help would be greatly appreciated. Thank you, hope
22:47:54FromGitter... everyones staying healthy
22:48:29leorizedadada: you focused on the wrong part :P the problem is "lump of c++"
22:48:38FromGitter<tervay> ah perhaps the IRC is more active
22:48:43Yardanicowe see IRC
22:48:48leorizetervay: don't worry we see you
22:48:52Yardanicofrom*
22:48:52FromGitter<tervay> Oh dope
22:48:56FromDiscord<Avatarfighter> Hello everyone πŸ™‚
22:49:10videofilehullo
22:49:20videofilefrom the other side
22:49:24leorizedadada: it's not hard, but you gotta convince someone to do it or do it yourself
22:49:28videofileis this bridge written in nim?
22:49:32leorizenope
22:49:35dadadaleorize: that's exactly what I focused on, the lump of c++ is just a bunch of class member methods and helper functions, those aren't highly specialized C++, everyone with basic knowledge of C++ can both understand and rewrite/write that
22:49:35Yardanicovideofile: no
22:49:46Yardanicoyou can help the pure-nim one by contributing to https://github.com/Yardanico/ircord
22:49:58Yardanicomost of it works but need to fix discordnim closing connections
22:50:14leorizealso if you can get pinging to work that'd be awesome
22:50:31YardanicoI think I can
22:50:41FromGitter<zetashift> if it's easy for beginners I'd love to help :P
22:50:42leorizethe discord to matrix bridge can do this and it's dope
22:51:03leorizeesp once you bridge the room to irc discord users show up as irc users
22:51:14Yardanicowell that wouldn't really be possible in freenode
22:51:18Yardanicosince every nickname has to be registered
22:51:22Yardanicowell I mean for most channels
22:51:24FromDiscord<Avatarfighter> ooo can I get the context behind your conversation leorize and Yardanico it sounds interesting
22:51:30*Trustable quit (Remote host closed the connection)
22:51:33leorizeYardanico: not #nim :P
22:51:45leorizeyea but it's definitely a problem with #nim-offtopic
22:51:45Yardanico@Avatarfighter https://github.com/Yardanico/ircord
22:52:08Yardanicowell guess I can try fixing some ircord
22:52:17YardanicoI'm sad Discord doesn't have any kind of json schema or something like that
22:52:34Yardanicoso I can generate nim type definitions programatically
22:53:06videofilemacros?
22:53:15videofileid love to contribute but im a noob right now
22:53:25Yardanicono, it can be possible without macros
22:53:31FromDiscord<InventorMatt> videofile: I've been contemplating creating a wrapper to bring vtk into nim since I frequently use vtk myself. but I want to see if anyone would help me with it since I am no expert in nim
22:53:34Yardanicowell I'll try to work on ircord right now a bit
22:53:38dadadaleorize: shashlick admitted that it's years away for nimterop to support C++ at the current pace, and I think for a skilled dev the swig module route would be much much faster, since swig supports c++17 and is adding c++20 features that really gets you a lot, while nimterop still can't handle all of C, I don't want to diss nimterop or shashlick, but I'm really impatient for seamless Nim<->C++, there's just so
22:53:42YardanicoI'll test it in #nim-offtopic as usual
22:53:44dadadamuch relevant C++ code out there
22:54:05videofilewell, InventorMatt, sorry to let your hopes down but I'm no expert in vtk and nim :/
22:54:21leorizedadada: well you gotta advertise it on the forum
22:54:41videofilewas just hoping someone had started and maybe had some clear way for noobs to contribute haha
22:55:22leorizedadada: there's a better chance of finding someone interested there than here
22:55:25FromDiscord<Recruit_main707> Despite needing to change a bit the project structure and therefore the headers because the include directory thing doesn't seem to work on windows, nimterop is working like a charm
22:56:30FromDiscord<Recruit_main707> In fact, it seems like a good way for using flatbuffers (when their structure files are considerably big)
22:56:57leorizedadada: also note that Nim can interact directly with C++ templates, something that the majority of language supported by Swig can't do
22:57:47dadadaRecruit_main707: maybe I overinterpreted nimterop github issues about C. But I definitely know there's no easy/seamless way to create wrappers of C++ libs for Nim yet.
22:58:11dadadaleorize: noted!
22:58:28leorizeI don't know if swig still do that "generate c++ -> c wrapper library then wrap that library for the target language" flow
22:58:33FromDiscord<Recruit_main707> dadada: there are also c flatbuffers
22:58:54dadadaleorize: from the go code it looked like it
22:59:09FromDiscord<mratsim> I don't know if I should be happy or appalled but I managed to create working co-recursive concepts and as a bonus I've added types that use the unicode identifier Ξ², ΞΎ, Ξ³ πŸ™‚ (https://github.com/mratsim/constantine/pull/25)
22:59:57leorizedadada: so swig gotta account for the fact that Nim can interface directly with C++ for it to be viable :)
23:00:54*dddddd joined #nim
23:01:18dadadaleorize: I think it's possible now with swig, the C intermediatary wrappers were created for the go swig module, because I think go can't directly deal with C++, I'm pretty sure when I looked at the code I thought to myself, this step can be skipped for Nim (no C wrappers for C++)
23:02:12FromDiscord<mratsim> @InventorMatt when you're stuck, ask in the forum and either have a code snippet that shows the problem (that we can just copy-paste) or have instructions to clone your repo and reproduce the problem if you can't reduce it to a small snippet
23:02:36dadadaleorize: the module is responsible for creating all wrappers (including C intermediary wrappers), so of course you can skip on that, and directly write Nim wrappers to C++
23:03:23FromDiscord<mratsim> i.e. similar to this thread: https://forum.nim-lang.org/t/6164#38091
23:03:27dadadaleorize: but there's a good reason for still creating those C wrappers, since some people might want to compile Nim with a C compiler, that's not a C++ compiler, ...
23:03:36dadadaI mean it should be optional
23:03:48leorizeplease don't
23:04:19dadadadon't what?
23:04:23leorizesupport for the hypothetical case can always come later
23:04:47dadadait's not really hypothetical, I currently compile my Nim stuff to C
23:04:48leorizewell but now you gotta find someone willing to write some C++ for swig :)
23:04:51leorizethat's the hard part
23:07:44dadadawe need a billionaire financing Nim, how can we get Zuckerberg or the like to pay attention
23:07:59videofileany interest expressed in a telegram client for nim?
23:08:13FromDiscord<Recruit_main707> Nah, Zuckerberg no, Elon musk better
23:08:29videofilezuck has monay
23:08:31dadadaI mean, there are so many great project ideas for Nim, but not enough people that can dedicate time tothem
23:08:39videofiletrue
23:08:46videofilewe crossed 1250 modules recently I think
23:09:00videofile🎊🎊
23:09:23dadadaRecruit_main707: I named him cause fb financed a shit ton of FOSS projects, and some languages too
23:09:35videofilegraphql is a good one yeah
23:11:27dadadait really doesn't matter who, Nim needs a sugardaddy or mommy
23:11:30FromDiscord<Recruit_main707> Rocket league bots framework might get a good, acceptable support for Nim soon too! Either by me, or by a general sockets support, and I will make it nimble available once it does, so if anyone has RL and wants to code some bots.
23:12:05dadadaRecruit_main707: nice
23:13:54FromGitter<zetashift> I was just about to start Rocket League
23:18:42*inv2004 joined #nim
23:19:14inv2004Hello, I am trying to use threadpool, but a bit confised with the following error: flowVar of type: CountTable[system.int]
23:19:35inv2004Error, maybe is clear, but how to resolve it? :)
23:21:57FromGitter<zetashift> can you show your code using play.nim-lang.org?
23:24:16inv2004let me try to create one
23:26:14videofileany thoughts on interfacing nim with autohotkey?
23:26:52FromDiscord<Recruit_main707> Sounds very painful the least
23:28:17inv2004here it is: https://gist.github.com/74b7067050f3d1421e95b967f493d377
23:32:24shashlick@Recruit_main707 why did you need to change your project structure?
23:36:48FromDiscord<Recruit_main707> wdym? I was using a python middle man to connect with the framework, but that was way too slow
23:38:14FromDiscord<Recruit_main707> This new general sockets support would firstly be official (that means I don't have to work :p )
23:38:14FromDiscord<Recruit_main707> secondly, it would be directly done by the framework, therefore performance would not be a problem
23:40:07leorize[m]general sockets?
23:40:09shashlickyour comment about nimterop
23:40:45*zacharycarter quit (Ping timeout: 250 seconds)
23:41:00FromDiscord<Recruit_main707> I was gonna tell you tomorrow, cOncludeDir doesn't seem to work on windows
23:41:57shashlickdadada: if someone adds nim support to swig, i'll be happy to archive toast
23:42:19*inv2004 quit (Quit: Leaving)
23:43:25FromDiscord<Recruit_main707> That's more or less what I was doing my macros for
23:43:26shashlicki looked at swig in detail recently and it does provide a lot of nice info, more than tree-sitter and even clang
23:43:37FromDiscord<Recruit_main707> Not with swig, but bare python.h
23:44:05dadadashashlick: yeah, it's purposebuilt...!
23:44:59dadadashashlick: the only downside I see with swig is that it's not clang, and naturally the swig developers will always be a little behind the C++ standard
23:45:28dadadaalthough even clang/gcc are sometimes behind it, to be fair to swig
23:46:27shashlickthere is some frustration around that in swig world from what little i read
23:46:33shashlickkeeping up is impossible
23:47:07dadadait's the same reason why people like myself think that you'll have an extremely tough time to get nimterop C++ ready
23:47:13dadadaC++ is simply a monster :-)
23:47:31shashlickall said and done, the fact that you have multiple compilers, besides clang, it doesn't help to focus on just that
23:47:39dadadaalthough I don't doubt you could do it
23:47:57shashlicki have no illusions about it, 4raq warned me years ago
23:48:15shashlickbut i am doing this for fun anyway
23:48:32shashlickthe ultimate goal is to push the envelope within Nim
23:48:36dadadaoh, fully understand that!
23:49:06shashlicklike the text editor i spent several months on, it gave us a plugin system which is now usable standalone
23:49:29shashlicklikewise with nimterop - it can show what's possible and then someone can use portions or ideas in other things
23:49:35shashlickultimately, the real deliverable is nim itself
23:50:00dadadatrue
23:50:13shashlicktools can come and go
23:50:51leorize[m]I really need some motivation to work on more nim projects
23:51:21shashlickleorize: help me! i need to get nimterop for C done so that we can move onto C++ πŸ˜‰
23:51:26dadadathe only reason I'm bringing up swig is that I want more wrappers to be created sooner rather than later, so Nim becomes more attractive, and more people develop stuff in it, growing the community is what I'm all about
23:51:48leorize[m]dadada: just wrapping is not enough
23:52:05leorize[m]it has to feel like you're writing Nim
23:52:12leorize[m]and not many people can spend time doing so
23:53:19leorize[m]shashlick: that's a good motivation :P
23:54:12leorize[m]there are so many things in the stdlib that I wanna rework...
23:54:32leorize[m]how can people balance working on multiple projects?
23:54:51shashlickone at a time is all i can say
23:55:22shashlickotherwise mind is all over the place and one i get out of a project, i have high inertia going back into it
23:56:20dadadasometimes it's good to step away from a project to get a better perspective
23:56:49dadadaindeed, I do most of my creative thinking when I'm not coding at all, my best ideas come to me in bed or something like that
23:56:58leorize[m]my problem is that my focus is all over the place :/
23:57:19dadadaleorize[m]: it's really hard not to be in times of YouTube and 24/7 news :-)
23:58:24leorize[m]it's more that I work on one project then I suddenly jump to another when they come to mind :)
23:58:44shashlickonly suggestion would be to push and then move on
23:58:56shashlickand you can only push if it is working
23:59:55leorize[m]yea that doesn't sound too bad