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:16 | FromDiscord | <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:45 | FromDiscord | <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:18 | FromDiscord | <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:37 | FromDiscord | <Varriount> @KingDarBoja How are things coming? |
03:10:07 | FromDiscord | <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:43 | FromDiscord | <KingDarBoja> What about you? |
03:16:12 | FromDiscord | <KingDarBoja> Just took a break to finish my CV on english |
03:16:20 | FromDiscord | <Varriount> I've successfully converted Go's filepath module to Nim, however I'm still going through it to make it idiomatic |
03:16:26 | FromDiscord | <Varriount> CV? |
03:16:40 | FromDiscord | <Varriount> Curriculum Vitae? |
03:16:43 | FromDiscord | <KingDarBoja> Curriculum Vitae |
03:16:57 | FromDiscord | <KingDarBoja> That's sounds cool! |
03:17:24 | * | uu91 quit (Remote host closed the connection) |
03:17:26 | FromDiscord | <KingDarBoja> Haven't tried GO but looks like a nightmare to work with |
03:17:53 | FromDiscord | <Varriount> Eh, it's not too bad. My biggest complaint is the lack of good code-generation tools |
03:18:16 | FromDiscord | <Varriount> Go is kinda the opposite of Nim, in that in relies quite a bit on runtime type information. |
03:18:45 | FromDiscord | <KingDarBoja> Wait, isn't supposed to rely on compile time? |
03:18:47 | FromDiscord | <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:07 | FromDiscord | <KingDarBoja> I thought it was statically typed and also compile time checks were made |
03:19:34 | FromDiscord | <Varriount> Yes, but it's polymorphic dispatch mechanisms rely heavily on runtime type information. |
03:24:08 | * | endragor joined #nim |
03:28:50 | FromDiscord | <Rika> interface{} |
03:28:55 | FromDiscord | <Rika> or whatever its called |
03:29:11 | FromDiscord | <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:13 | FromDiscord | <KingDarBoja> My internet is trash right now |
03:29:23 | FromDiscord | <Varriount> University internet? |
03:29:47 | FromDiscord | <KingDarBoja> No, home internet, thrid world internet lol |
03:34:19 | * | videofile joined #nim |
03:35:34 | videofile | hello |
03:35:41 | videofile | why is & the concat operator instead of + |
03:36:20 | FromDiscord | <Rika> because + is for arithmetic |
03:36:37 | FromDiscord | <Rika> & makes more sense cognitively does it not |
03:36:39 | videofile | yeah, but curious why the distinction between strings and arithmetic |
03:36:53 | FromDiscord | <Rika> have you ever arithmetically added a string? |
03:37:09 | videofile | well, is most of the languages I've used (which is not tens of them), '+' is overloaded to support strings by default :) |
03:37:35 | FromDiscord | <Rika> it should cause less confusion regards js' '0'+1 == ???? |
03:37:41 | videofile | because nim syntax seems to resemble py a lot |
03:37:42 | videofile | oh |
03:37:53 | FromDiscord | <Rika> it RESEMBLES python |
03:37:55 | FromDiscord | <Rika> thats it |
03:37:55 | videofile | weak typing is a sin anyway |
03:38:04 | videofile | pls resemble it moar xD |
03:38:13 | FromDiscord | <Rika> there are limits |
03:38:19 | FromDiscord | <Rika> like that & operator |
03:38:28 | videofile | I assume this has to do with compiler right |
03:38:32 | videofile | not a willful choice maybe |
03:38:33 | FromDiscord | <Rika> i dont think + is a great idea for strings anyway |
03:38:35 | FromDiscord | <Rika> no |
03:38:41 | videofile | ok all is forgiven! |
03:38:41 | FromDiscord | <Rika> its a willful choice im pretty sure |
03:38:43 | FromDiscord | <Rika> the & |
03:38:48 | videofile | heretics |
03:38:51 | videofile | >:( |
03:39:01 | FromDiscord | <Rika> you'll grow to love it |
03:39:05 | videofile | I hope so! |
03:39:09 | FromDiscord | <Rika> i never liked adding strings |
03:39:26 | FromDiscord | <Rika> btw what happens if i play you in a media player |
03:39:33 | FromDiscord | <Rika> what shows up π |
03:39:41 | videofile | true, but with a little stretch of imagination (I remember my java class), you can assume adding == concat |
03:39:47 | videofile | I play darude-sandstorm :P |
03:40:22 | FromDiscord | <Rika> hm anyway if you need more help just ask lol |
03:40:50 | videofile | yessir |
03:41:10 | videofile | just woke up from a nightmare so I decided to continue learning nim \shrug |
03:41:24 | FromDiscord | <KingDarBoja> lol |
03:41:38 | * | FromDiscord <KingDarBoja> living is a nightmare |
03:41:47 | videofile | I hope you're not implying i jumped into another nightmare haha |
03:41:55 | videofile | ouch that's too deep |
03:42:35 | videofile | do you guys see nim replacing C in the next decade, instead of golang? |
03:42:42 | videofile | not entirely |
03:42:48 | videofile | as much as realistically posible |
03:43:03 | FromDiscord | <KingDarBoja> Errr Rust is supposed to replace C (?) |
03:43:07 | FromDiscord | <Rika> not really |
03:43:07 | FromDiscord | <MapleSyrup> @Varriount hello |
03:43:18 | FromDiscord | <KingDarBoja> Variount, Maple has issues with unicode |
03:43:23 | FromDiscord | <MapleSyrup> is nim handling of unicode similar to runes in golang? @Varriount |
03:43:26 | FromDiscord | <Rika> i dont see Rust replacing C either |
03:43:31 | FromDiscord | <Rika> @MapleSyrup yes |
03:43:43 | FromDiscord | <Rika> we also call them runes at leeast |
03:43:43 | videofile | go too I guess |
03:43:53 | FromDiscord | <Rika> import the `unicode` module and read the docs |
03:43:54 | videofile | and that's where the similarities end?? |
03:44:04 | FromDiscord | <Rika> no clue if thats where the similarities end |
03:44:05 | videofile | okok, I just hate having to handle unicode |
03:44:12 | FromDiscord | <Rika> https://nim-lang.org/docs/unicode.html |
03:44:15 | videofile | unicode can go off itself |
03:44:24 | FromDiscord | <Rika> unicode is a blessing |
03:44:31 | videofile | s/unicode/unicode handling |
03:44:36 | FromDiscord | <Rika> imagine needing to handle 15 different encodings for 15 different languages |
03:44:48 | FromDiscord | <Rika> that would be much worse dont you think |
03:44:49 | videofile | did our grandparents do that? |
03:44:55 | videofile | before unicode |
03:45:10 | FromDiscord | <Rika> japanese had 2 major encodings for its one language before |
03:45:18 | videofile | oof |
03:45:27 | * | silvernode joined #nim |
03:45:30 | videofile | I hate python2's unicode stuff but yeah |
03:45:49 | FromDiscord | <Rika> i think its easier in nim |
03:45:54 | FromDiscord | <Rika> since nim is so damn flexible |
03:45:56 | FromDiscord | <Rika> man i love it |
03:46:17 | videofile | I hope I will find it like that for me too |
03:46:24 | FromDiscord | <KingDarBoja> Python 3 handles unicodes and ASCII under the hood |
03:46:25 | videofile | tired of switching languages man |
03:46:35 | FromDiscord | <KingDarBoja> So devs haven't to worry about it |
03:46:36 | videofile | yeah, that's python3, but python2 SUCKED at it |
03:46:46 | FromDiscord | <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:47 | FromDiscord | <KingDarBoja> That's why Python 3 came out |
03:46:49 | videofile | had a TON of issues porting python2 unicode stuff to 3 |
03:46:58 | FromDiscord | <KingDarBoja> I get sick of that typing support too |
03:47:01 | videofile | Rikaaaaaa |
03:47:06 | FromDiscord | <Rika> eyyo |
03:47:08 | FromDiscord | <KingDarBoja> That's why I code on TypeScript instead of JavaScript |
03:47:33 | videofile | the 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:37 | FromDiscord | <Rika> lmao |
03:47:43 | videofile | King why do you js? |
03:47:46 | videofile | web stuff? |
03:47:55 | FromDiscord | <Rika> `if type() is int: do this else: do that` |
03:48:07 | FromDiscord | <Rika> maybe its their main language |
03:48:08 | videofile | looks hacky amirite |
03:48:22 | FromDiscord | <Rika> you can still do it in nim |
03:48:28 | FromDiscord | <Rika> its just on compile time |
03:48:36 | FromDiscord | <KingDarBoja> Yeah |
03:48:51 | FromDiscord | <KingDarBoja> But jumped right inot Angular/TypeScript at my current (and first) job |
03:48:55 | FromDiscord | <Rika> `proc a(something: int or string) = when a is int: do this else: do that` |
03:48:55 | * | nsf joined #nim |
03:49:12 | videofile | hmmmm |
03:49:15 | FromDiscord | <Rika> oops, something, not a |
03:49:16 | FromDiscord | <KingDarBoja> lol wut |
03:49:17 | videofile | wish generics was more flexible |
03:49:23 | videofile | oh I see |
03:49:26 | * | ljoonal quit (Quit: ljoonal.xyz) |
03:49:31 | videofile | so where do you use nim then king |
03:49:36 | videofile | hobby stuff? |
03:49:39 | FromDiscord | <Rika> i dont see what you mean by "wish generics were more flexible" |
03:49:48 | FromDiscord | <Rika> theyre pretty damn flexible |
03:49:59 | FromDiscord | <KingDarBoja> I always get triggered by union types on proc xD |
03:50:00 | videofile | was thinking of golang |
03:50:08 | FromDiscord | <KingDarBoja> As I am noobish handling that |
03:50:15 | * | ljoonal joined #nim |
03:50:15 | videofile | union types |
03:50:16 | videofile | say what |
03:50:34 | FromDiscord | <KingDarBoja> Yeah, hobby stuff, I discovered Nim because someone wanted to change the old Nim icon with the new goldish one |
03:50:36 | FromDiscord | <Rika> `int or string` is a union type i think |
03:50:55 | videofile | oh thus began your headfirst dive into nim eh? |
03:50:57 | videofile | ah ok rika |
03:51:04 | FromDiscord | <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:06 | videofile | idk why but your name sounds pokemon-ish |
03:51:24 | FromDiscord | <KingDarBoja> Yeah, what Rika-sensei said, union types aka `or` `|` |
03:51:32 | videofile | I guess dynamic typing is a plus for beginners? |
03:51:36 | videofile | hehe |
03:51:44 | FromDiscord | <KingDarBoja> That's why Python is so popular |
03:51:58 | FromDiscord | <KingDarBoja> Because it is so high level and pretty much anyone can jump into Python and do stuff |
03:52:05 | FromDiscord | <KingDarBoja> Like data science, web development, etc |
03:52:18 | videofile | true, I felt like I was invincible when I picked up python haha |
03:52:19 | FromDiscord | <KingDarBoja> Bu try using it for mobile development |
03:52:30 | videofile | mobile dev be damned lol |
03:52:31 | FromDiscord | <KingDarBoja> Or making it optimal for embedded systems |
03:53:00 | videofile | if nim covered data science and ML stuff, it would be much more versatile than python for sure |
03:53:22 | FromDiscord | <Rika> arraymancer |
03:53:29 | videofile | just curious, is the mentioning of type after identifier a consequence of having 'dynamic typing' in nim? |
03:53:41 | videofile | yeah I saw the latest benchmarks, really good but we're not there yet |
03:53:44 | FromDiscord | <Rika> what do you mean |
03:53:51 | videofile | variable_name string |
03:53:56 | FromDiscord | <Varriount> videofile: It's a consequence of Nim being statically typed. |
03:53:57 | videofile | instead of string variable_name |
03:54:18 | FromDiscord | <Varriount> Oh, before or after, that's just a syntactic difference. |
03:54:19 | videofile | doesn't C do it the other way around? |
03:54:27 | videofile | oh that's odd |
03:54:46 | videofile | because iirc the golang creators provided that as a justification for having to mention the type after the identifier |
03:54:57 | videofile | compiler limitations |
03:55:09 | videofile | type inference != dynamic typing? |
03:55:11 | FromDiscord | <Varriount> Hm, I don't see how that impacts things. |
03:55:13 | FromDiscord | <Rika> yes |
03:55:15 | FromDiscord | <Rika> !- |
03:55:16 | videofile | at least by some stretch? |
03:55:18 | FromDiscord | <Rika> !=* |
03:55:26 | videofile | why not |
03:55:31 | videofile | is dynamic typing run-time only? |
03:55:41 | FromDiscord | <Rika> type inference doesnt allow you to change the type after assigning |
03:55:46 | FromDiscord | <Rika> dynamic does |
03:55:57 | videofile | ah silly me |
03:56:01 | FromDiscord | <Rika> dynamic doesnt care what kinda type you put into a var |
03:56:12 | FromDiscord | <Rika> you can put whatever, before or after assignment |
03:56:17 | * | d10n quit (Quit: why all the #hashtags #lol #hackers #overheard) |
03:56:58 | videofile | aaand that's where the bugs hide |
03:57:09 | FromDiscord | <KingDarBoja> Lol I distract a little to play music and this happens |
03:57:16 | videofile | what happens |
03:57:19 | videofile | and what music |
03:57:25 | videofile | and why distract |
03:57:33 | FromDiscord | <KingDarBoja> Discussing about GO lol |
03:57:45 | FromDiscord | <KingDarBoja> Playing the weekend - michael gray |
03:57:48 | videofile | GhOst has GO in it |
03:57:50 | FromDiscord | <Varriount> It's just "Go" or "Golang" |
03:57:53 | FromDiscord | <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:05 | videofile | oh I thought you were playing a musical instrument, my bad |
03:58:06 | FromDiscord | <KingDarBoja> I type GO because the icon lol |
03:58:15 | videofile | go GO |
03:58:25 | videofile | I haven't really checked out nim logo brb |
03:58:43 | videofile | it's either a crown or a bearded guy with a crown |
03:59:27 | FromDiscord | <KingDarBoja> A crown |
03:59:33 | FromDiscord | <KingDarBoja> A goldish crown |
03:59:34 | videofile | no man? |
03:59:43 | FromDiscord | <KingDarBoja> Nope, it is REX logo |
03:59:57 | videofile | what it mean |
04:00:26 | videofile | happy monday everyone |
04:02:46 | FromDiscord | <KingDarBoja> It's 11 PM here |
04:03:10 | videofile | happy monday in 1 hour |
04:03:13 | FromDiscord | <KingDarBoja> π |
04:04:25 | videofile | so...why was it called nimrod |
04:04:34 | FromDiscord | <KingDarBoja> Same question |
04:04:51 | videofile | Rikk |
04:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:03 | videofile | oh and btw where can I find count of total num of nimble packages |
04:06:17 | videofile | total num of packages on nimble to be specific |
04:06:42 | * | supakeen joined #nim |
04:07:27 | FromDiscord | <Rika> parse the nimble json packages file lol |
04:07:42 | FromDiscord | <Rika> theres a little over a thousand |
04:08:02 | videofile | I havent even written a single line of nim yet... |
04:08:03 | videofile | ok |
04:08:04 | videofile | ! |
04:08:06 | FromDiscord | <KingDarBoja> https://github.com/nim-lang/packages/blob/master/packages.json |
04:08:13 | FromDiscord | <KingDarBoja> I was going to suggest the same lool |
04:08:20 | videofile | tyty |
04:08:27 | FromDiscord | <KingDarBoja> Use json module |
04:08:44 | videofile | I do not like this increasing dependencey of langs on github, just a pet peeve of mine |
04:08:54 | videofile | :/ |
04:09:07 | FromDiscord | <KingDarBoja> The best way to start learning is by reading the tutorials and using the playground π |
04:09:22 | videofile | im a quarter through the Nim in Action book |
04:11:35 | videofile | anyway I can parse webcam feed in nim? |
04:11:49 | videofile | manipulation of web cam feed, rather |
04:12:38 | FromDiscord | <Rika> well, whats the feed in? |
04:12:42 | FromDiscord | <Rika> and how is it sent |
04:12:53 | videofile | uh video stream? |
04:13:02 | videofile | just hoping there's a lib out there to interface with my laptop webcam |
04:13:10 | FromDiscord | <Rika> dont know |
04:13:18 | videofile | :) |
04:13:21 | videofile | *:( |
04:13:27 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:16:52 | videofile | is it ok if I can only donate $10? |
04:17:16 | videofile | no income atm and basically subsisting on ramen rn :P |
04:17:40 | Prestige | Take care of yourself first videofile |
04:17:48 | FromDiscord | <Rika> sure why not but think about it first |
04:18:07 | videofile | nothing has made me so excited in quite a while |
04:19:36 | FromDiscord | <KingDarBoja> Lol calm down, first live then help others |
04:19:51 | FromDiscord | <KingDarBoja> Also, got another power outage... Again |
04:20:00 | videofile | okok once Im back on my feet |
04:20:12 | videofile | power outage?? |
04:20:15 | FromDiscord | <KingDarBoja> Probably going to have a bad night again |
04:20:36 | FromDiscord | <KingDarBoja> Yeah, energy is off at my neighborhood |
04:20:56 | videofile | is it common? in my area I've never had an outage....yet |
04:24:27 | videofile | custom array ranges sounds so unique |
04:24:41 | videofile | I think the name nimrod is applicable here |
04:25:35 | leorize | custom array range is something taken from pascal I think |
04:25:52 | videofile | ohh good to know! |
04:26:06 | videofile | it really seems like nim has cherrypicked a lot of good stuff from many langs |
04:27:27 | leorize | that's how many started |
04:27:43 | videofile | true |
04:28:09 | videofile | but this particular collection seems a bit dare I say..eclectic |
04:28:14 | videofile | a touch more than other languages |
04:28:25 | videofile | it's like a huge sandbox |
04:28:36 | videofile | oop, fp, imperative, you do whatever you want yadda yadda |
04:29:16 | leorize | well everyone else wanted to be a C replacement |
04:30:29 | Prestige | Is there a place to look up x11 code docs |
04:30:51 | leorize | usually giving up is a good option :P |
04:31:00 | Prestige | I can see declared types and such in nim (for the wrapper) but no actual documentation |
04:31:06 | Prestige | eh I'm no good at that |
04:31:09 | leorize | but there's a huge set of man pages for them |
04:31:43 | leorize | it depends on what component of the x11 wrapper do you use |
04:31:55 | leorize | yea, the x11 module is just a wrapper |
04:32:02 | FromDiscord | <KingDarBoja> I live on Colombia, South AmΓ©rica, it's pretty common here |
04:32:23 | FromDiscord | <KingDarBoja> And every language always try to pick the best thing |
04:32:41 | leorize | well "best" is subjective |
04:32:51 | leorize | that's why we ended up with so many different ones |
04:33:00 | videofile | I love me some competition |
04:33:01 | FromDiscord | <KingDarBoja> Yup |
04:33:08 | silvernode | Well 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:10 | Prestige | leorize: 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:27 | silvernode | learn* |
04:33:42 | videofile | hey why is https://github.com/VPashkov/awesome-nim archived? |
04:33:46 | videofile | nothing awesome in a while or what |
04:34:40 | FromDiscord | <KingDarBoja> Let's go older and code on Perl |
04:34:59 | leorize | videofile: probably the author don't want to maintain it anymore |
04:35:17 | videofile | aww that sucks |
04:35:22 | videofile | would 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:49 | silvernode | player.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:22 | videofile | no idea how to do that but can I have a look at your source code, if it's open source? |
04:39:28 | videofile | first time hearing of a game in nim |
04:39:51 | FromDiscord | <Rika> tie everything to the grid? |
04:40:02 | silvernode | videofile: yeah I will give you the github link |
04:40:11 | FromDiscord | <Rika> id do this: A position type, with the position fields ofc and a ref to the grid |
04:40:39 | FromDiscord | <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:06 | FromDiscord | <Rika> then you can make a move proc that takes a Position, and refers to pos.grid[].bounds or something like that |
04:41:19 | FromDiscord | <Rika> of course, check if grid is nil too |
04:41:23 | silvernode | Rika, hmm, I never thought of a type for position |
04:41:45 | FromDiscord | <KingDarBoja> It should be like Coordinates |
04:41:56 | FromDiscord | <KingDarBoja> Position stores x, y |
04:42:00 | FromDiscord | <Rika> yeah name it Position or Coordinates |
04:42:03 | silvernode | videofile: https://github.com/silvernode/space-nim/tree/experimental |
04:42:09 | videofile | ty |
04:42:37 | FromDiscord | <KingDarBoja> Then ofc the grid should be an array of positions |
04:42:45 | silvernode | I have code that hasn't been commited yet but I removed the location property of the Character type and added x, y |
04:43:12 | silvernode | All of my types are in the entities file |
04:43:19 | FromDiscord | <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:34 | FromDiscord | <KingDarBoja> On Harvard website, it is free yo access |
04:43:37 | FromDiscord | <KingDarBoja> To* |
04:43:42 | silvernode | Oh nice |
04:44:14 | FromDiscord | <KingDarBoja> It is called Game development using Love (Lua 2D frameworks) |
04:44:17 | videofile | starred repo very nice |
04:44:19 | FromDiscord | <KingDarBoja> I think. |
04:44:26 | videofile | love2d? |
04:44:44 | FromDiscord | <KingDarBoja> But the explanation is pretty much what you looking for on Game Dev design |
04:44:52 | FromDiscord | <KingDarBoja> Like colissions, grid, etc |
04:45:00 | silvernode | videofile: Love2d is awesome but I really want to make a text based game in nim |
04:45:20 | silvernode | Taking notes of people's suggestions here |
04:46:59 | FromDiscord | <KingDarBoja> I have several notes but will share tomorrow |
04:47:21 | FromDiscord | <KingDarBoja> As still have no energy hence no pc |
04:47:44 | silvernode | About 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:36 | FromDiscord | <Rika> im just here improving my image dithering program π |
04:49:48 | silvernode | Pushed changes to experimental branch |
04:50:02 | silvernode | I basically added early movement |
04:50:25 | FromDiscord | <KingDarBoja> Oww |
04:50:27 | silvernode | but a lot of work needs to be done in order to actually do this on the grid. |
04:50:54 | FromDiscord | <KingDarBoja> Scrap z axis and go full Gravity Zero |
04:50:57 | silvernode | just getting down the concepts right now. Makes me feel dumb at programming lol |
04:51:00 | FromDiscord | <KingDarBoja> XD joking |
04:51:23 | silvernode | :) |
04:53:25 | silvernode | ugh, 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:52 | silvernode | I'm off the next 2 nights after this though |
04:59:28 | * | silvernode quit (Ping timeout: 256 seconds) |
05:01:57 | videofile | goodbye |
05:05:11 | FromDiscord | <Rika> what do yall recommend for CLI interfacing? is parseopt good enough? |
05:05:37 | leorize | iffy/nim-argparse or c-blake/cligen |
05:06:33 | FromDiscord | <Rika> which is better in your opinion |
05:13:14 | * | solitudesf joined #nim |
05:15:05 | videofile | i dont quite understand blocks in nim |
05:19:35 | FromDiscord | <Rika> theyre just like "if True:"s in python |
05:19:39 | FromDiscord | <Rika> whats there to not understand? |
05:19:47 | videofile | nono |
05:19:54 | videofile | the breaking out of nested loops using block labels |
05:20:35 | FromDiscord | <Rika> break label will jump to the end of the block w/ the label |
05:21:11 | videofile | but you have to indent after the block right? |
05:21:13 | videofile | just confirming |
05:22:20 | FromDiscord | <Rika> yeah because its like if True: |
05:22:26 | videofile | oh thats what you meant |
05:22:27 | videofile | gotcha |
05:22:51 | FromDiscord | <Rika> block label: (since theres a colon, next line must be indented |
05:23:05 | videofile | +1 |
05:23:12 | videofile | is there no namespace prefix for imports? |
05:23:30 | FromDiscord | <Rika> no need |
05:23:35 | videofile | why not |
05:23:40 | videofile | creates confusion :/ |
05:23:44 | FromDiscord | <Rika> not really |
05:23:50 | FromDiscord | <Rika> from experience, it doesnt |
05:24:02 | FromDiscord | <Rika> if you want to force it do `from module import nil` |
05:24:20 | videofile | if I see os.walkFiles, I'll know quickly that it's from the stdlib! |
05:24:22 | FromDiscord | <Rika> you can also use it with `import module` but its not forced then |
05:24:40 | videofile | oh it's optional then? |
05:24:43 | FromDiscord | <Rika> yes |
05:24:46 | videofile | that's nice |
05:24:50 | videofile | very flexible |
05:24:54 | FromDiscord | <Rika> π |
05:25:32 | leorize | @Rika: it depends on what you want |
05:25:46 | FromDiscord | <Rika> what does it depend on? |
05:26:22 | leorize | just look at both module |
05:26:28 | leorize | one let you quickly prototype |
05:26:38 | leorize | the other let you carefully craft your cli experience :P |
05:26:56 | FromDiscord | <Rika> okay |
05:27:07 | FromDiscord | <Rika> ill go with the carefully craft one |
05:30:17 | * | narimiran joined #nim |
05:33:55 | videofile | lol having levenshtein dist is so random haha |
05:37:04 | videofile | is mixing of datatypes in a sequence only possible in dynamically typed langs? |
05:37:16 | videofile | like i cant do discard @[1,"a"] |
05:37:54 | narimiran | videofile: use json for that |
05:38:21 | videofile | oh nice |
05:43:01 | FromDiscord | <KingDarBoja> Yeah |
05:43:37 | FromDiscord | <KingDarBoja> But not willing to use json as better keep using the same type on the sequence |
05:44:08 | videofile | ah ok makes sense |
05:44:12 | videofile | was just cruoius |
05:44:13 | videofile | curious |
05:44:24 | videofile | wow im butchering spelling which means i should probably sleep |
05:44:29 | videofile | https://robert-mcdermott.gitlab.io/posts/speeding-up-python-with-nim/ is very interesting! |
05:54:24 | videofile | WAIT |
05:54:26 | FromDiscord | <KingDarBoja> It is good but still as every post, it talks about benefits but not contras |
05:54:29 | videofile | you can disable the gc entirely? |
05:54:40 | videofile | contras? |
05:54:52 | videofile | contras == cons? |
05:56:36 | videofile | ok gonna nap |
05:56:37 | videofile | gnight |
05:56:42 | * | videofile quit (Quit: Going offline, see ya! (www.adiirc.com)) |
05:56:52 | FromDiscord | <KingDarBoja> Same, good night |
06:10:29 | * | myphs joined #nim |
06:10:42 | * | dddddd quit (Remote host closed the connection) |
06:13:02 | myphs | hello everyone: can i pass variables from a template to the body without declaring them in the calling block? |
06:14:39 | FromDiscord | <Rika> ? |
06:14:52 | FromDiscord | <Rika> Declare the template as dirty |
06:15:01 | FromDiscord | <Rika> {.dirtt.} |
06:15:05 | FromDiscord | <Rika> Oops, dirty |
06:19:24 | * | Vladar joined #nim |
06:19:39 | myphs | is this documented somewhere? |
06:20:03 | myphs | probably nooby, but this explains it, i hope: https://play.nim-lang.org/#ix=2hOJ |
06:21:02 | myphs | the syntax is wrong of course |
06:22:24 | narimiran | try with `for i {.inject.} in 0 .. nr` |
06:23:34 | solitudesf | https://play.nim-lang.org/#ix=2hOL |
06:24:30 | narimiran | or simply as that :) |
06:25:57 | * | xcm quit (Ping timeout: 250 seconds) |
06:27:54 | * | xcm joined #nim |
06:28:55 | myphs | interesting! thank you a lot, solitudesf! i had something similar, but `iter: int`. why wouldn't that work? |
06:29:19 | myphs | * had tried |
06:38:33 | * | lritter quit (Quit: Leaving) |
06:41:07 | solitudesf | because 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:15 | FromDiscord | <Benumbed> Anyone know off the top of their head if Nim keeps track of the EOL characters for the current platform? |
09:17:45 | FromDiscord | <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:30 | FromDiscord | <Rika> maybe look at the `lexbase` module |
09:21:14 | FromDiscord | <Rika> @Benumbed |
09:21:57 | FromDiscord | <Benumbed> Yeah unfortunately it's a static const in there π¦ |
09:22:11 | FromDiscord | <Benumbed> was hoping for platform detection, but looks like I'm out of luck |
09:22:17 | Zevv | Benumbed: it might be the best to be newline agnostic, just make sure you accept both |
09:22:30 | Zevv | because on platform X you still might want to ingest a file created on platform Y |
09:23:01 | FromDiscord | <Rika> also i am not sure of any platform that isnt either crln or ln |
09:23:11 | FromDiscord | <Benumbed> But I liiiike throwing errors at the people who write files in Windows.... πΎ |
09:23:20 | FromDiscord | <Rika> i mean crlf |
09:23:37 | * | ikan_keli quit (Ping timeout: 264 seconds) |
09:24:00 | Zevv | Benumbed: well you can just properly lex all newlines and still throw random "Unknown error" message every now and then |
09:24:17 | FromDiscord | <Benumbed> lol I like you Zevv you're alright π |
09:24:32 | Zevv | yeah, that's what I always say. |
09:25:11 | FromDiscord | <Rika> how do you use lexbase anyway... |
09:25:22 | FromDiscord | <Rika> theres not much instruction on how |
09:26:23 | Zevv | mumble mumble npeg mumble mumble |
09:27:18 | narimiran | !repo npeg |
09:27:30 | Zevv | disbot is dead, long live disbot |
09:27:49 | Zevv | he's in lockdown together with disruptek. They both come out ravingly mad, I bet |
09:30:22 | FromDiscord | <Benumbed> annd the sneaky case non-sensitivity just bit me in the ass >.<, albeit lightly |
09:31:14 | Zevv | well, 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:54 | FromDiscord | <Benumbed> why not take it like a woman? |
09:33:04 | FromDiscord | <Benumbed> They're far better at pain management after all π |
09:33:10 | Zevv | fair enough |
09:33:37 | dzamo[m] | 098poiPOI)(* |
09:33:50 | FromDiscord | <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:30 | Zevv | @leorize ping |
09:36:55 | FromDiscord | <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:56 | FromDiscord | <Rika> @Benumbed what did you type to make it bite you |
09:37:00 | FromDiscord | <Rika> its never bitten me |
09:37:16 | FromDiscord | <Rika> @kodkuce you can base on httpbeast |
09:37:46 | FromDiscord | <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:56 | FromDiscord | <Benumbed> Compiler said "NO" and slapped me |
09:38:37 | FromDiscord | <Rika> it should be okay |
09:38:45 | FromDiscord | <Rika> since Streamer != streamer anyway |
09:38:50 | FromDiscord | <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:54 | FromDiscord | <Benumbed> Tell that to the compiler π |
09:39:00 | FromDiscord | <Rika> its legit |
09:39:29 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2hPz works |
09:39:31 | FromDiscord | <Benumbed> oh wait no, it's more likely the module name |
09:39:35 | FromDiscord | <Benumbed> which is also 'streamer' |
09:39:43 | FromDiscord | <Rika> thats the issue there π |
09:39:43 | FromDiscord | <Benumbed> It's very late, and I am tired |
09:39:55 | FromDiscord | <Benumbed> Waiting for my damn sheets to dry so I can go to bed |
09:41:02 | Zevv | yeah. 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:05 | Zevv | What is it then?! |
09:42:00 | FromDiscord | <Benumbed> No idea |
09:42:05 | FromDiscord | <Benumbed> Technically it's a module |
09:42:10 | FromDiscord | <Benumbed> But modules are not a type |
09:42:12 | FromDiscord | <Rika> i just echoed the repr of streamer in the link i sent |
09:42:16 | FromDiscord | <Rika> what do you mean |
09:42:33 | FromDiscord | <Rika> or do you ask benum |
09:43:28 | Zevv | I guess it's kind of rhetorical |
09:43:45 | Zevv | although I do not know the answer. It's something voidish, but not quite |
09:46:11 | Zevv | https://play.nim-lang.org/#ix=2hPB |
09:48:52 | FromGitter | <faulander> question: if i use locally declared variables in an imported proc will that work? |
09:51:59 | narimiran | nimporter is on HN frontpage: https://news.ycombinator.com/item?id=22850374 |
09:53:58 | FromDiscord | <kodkuce> i have no hw acount to spam π |
09:54:37 | narimiran | and let's keep it that way ;) |
10:01:32 | FromDiscord | <__ibrahim__> I was looking for some guidance on using nim without GC for realtime 3D rendering. |
10:01:33 | FromDiscord | <__ibrahim__> the only thing I could find was this: |
10:01:33 | FromDiscord | <__ibrahim__> https://rosettacode.org/wiki/Pointers_and_references#Nim |
10:01:33 | FromDiscord | <__ibrahim__> is it better to use `--gc:arc` than `--gc:none`? |
10:03:29 | FromDiscord | <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:45 | narimiran | use `--gc:arc` |
10:04:14 | FromDiscord | <__ibrahim__> ok cool, no need for memory management! yay |
10:04:22 | FromDiscord | <__ibrahim__> ok cool, no need for manual memory management! yay |
10:05:00 | FromDiscord | <kodkuce> @__ibrahim__ you making some game engine or what? |
10:05:09 | FromDiscord | <demotomohiro> if I remember correctly, Nim's gc works only when you try to allocate memory |
10:07:09 | FromDiscord | <__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:18 | FromDiscord | <__ibrahim__> but the main goal is to do rtx raytracing in real-time |
10:10:48 | * | myphs quit (Quit: Leaving) |
10:11:57 | FromDiscord | <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:02 | FromDiscord | <__ibrahim__> i am new to nim too and been only coding for 2 years. |
10:14:02 | FromDiscord | <__ibrahim__> i only drew my first opengl triangle by porting this tutorial to nim: |
10:14:02 | FromDiscord | <__ibrahim__> www.learnopengl.com |
10:16:26 | FromDiscord | <Recruit_main707> its a good start |
10:17:06 | FromDiscord | <__ibrahim__> thank you very much, and nim has such nice syntax it was really easy porting the "ugly" c++ source |
10:17:07 | Northstrider | https://github.com/nim-lang/Nim/blob/devel/compiler/extccomp.nim#L94 What is "nintendoSwitchGCC"? A joke? |
10:17:16 | FromDiscord | <clyybber> Nope |
10:17:33 | FromDiscord | <clyybber> Its a platform nim can target |
10:17:41 | FromDiscord | <Recruit_main707> its for creating nintendo switch games lol |
10:17:45 | Northstrider | Oh, fair |
10:18:18 | FromGitter | <faulander> can someone tell me, why this code doesn't work? https://play.nim-lang.org/#ix=2hPO |
10:20:22 | FromDiscord | <Recruit_main707> it seems to work even in the playground |
10:20:28 | FromDiscord | <__ibrahim__> here is the opengl triangle if anyone is interested: |
10:20:28 | FromDiscord | <__ibrahim__> https://pastebin.com/NTBesm5M |
10:21:14 | FromGitter | <faulander> @Recruit_main707: It should only return the last path part, not the whole path, right? |
10:21:27 | FromDiscord | <Recruit_main707> idk about that then :p |
10:22:07 | FromGitter | <faulander> (https://files.gitter.im/nim-lang/Nim/tpft/image.png) |
10:22:24 | FromGitter | <faulander> This is what it should return, but it returns the whole string. |
10:22:28 | FromDiscord | <Asmodeus> Doesn't seem to handle windows paths very well |
10:23:20 | FromDiscord | <__ibrahim__> you're right, it worked perfectly with "/" |
10:23:41 | FromGitter | <faulander> yes, it works with *nix paths, but not with windows |
10:24:08 | FromDiscord | <__ibrahim__> maybe create a replace proc then last path part then revert to original |
10:24:32 | FromGitter | <faulander> yes, i'll write my own proc, but the function should still work. where to i post a bug report? |
10:24:41 | FromGitter | <faulander> to = do |
10:27:17 | * | chemist69 quit (Ping timeout: 260 seconds) |
10:27:48 | * | chemist69 joined #nim |
10:33:40 | FromDiscord | <Rika> I think it only works with windows paths if you run it in a windows target |
10:34:41 | FromDiscord | <Recruit_main707> makes sense i guess |
10:35:00 | FromDiscord | <kodkuce> can i do html alert whout js? |
10:35:01 | FromDiscord | <Asmodeus> Oh hey think I found the commit where the pascal source was converted to nim |
10:35:01 | FromDiscord | <Asmodeus> https://github.com/nim-lang/Nim/tree/e254741541b0389dfb0b675116c76a6a144b90b7 |
10:37:37 | FromDiscord | <Recruit_main707> ive seen this on the nim official page: |
10:37:37 | FromDiscord | <Recruit_main707> `Macros cannot change Nim's syntax because there is no need for it β the syntax is flexible enough.` |
10:37:37 | FromDiscord | <Recruit_main707> is it completely true? and why not? |
10:38:25 | FromDiscord | <Recruit_main707> id say it would be a cool |
10:38:29 | FromDiscord | <Recruit_main707> feature |
10:42:11 | FromGitter | <faulander> @Rika: i AM running on a windows machine |
10:42:35 | * | narimiran quit (Ping timeout: 260 seconds) |
10:42:50 | FromDiscord | <Recruit_main707> !test echo("is this working?") |
10:42:56 | FromDiscord | <Recruit_main707> nope |
10:43:48 | FromDiscord | <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:41 | FromDiscord | <Rika> it's eval |
10:52:43 | FromDiscord | <Rika> not test |
10:52:46 | FromDiscord | <Rika> !eval echo "nice" |
10:52:49 | NimBot | nice |
10:53:18 | FromDiscord | <Rika> and also yes, you cannot change Nim's syntax (as in the structure); you can exploit it, though |
10:53:55 | FromDiscord | <Rika> faula...: then damn i dont got a clue |
10:54:07 | * | uvegbot quit (Ping timeout: 260 seconds) |
10:54:17 | FromDiscord | <Rika> @Asmodeus comments are stripped from parsing, theyre not part of the AST |
10:54:21 | FromDiscord | <Rika> only doc comments are part |
10:54:34 | FromDiscord | <Rika> you can put comments anywhere, but not doc comments |
10:55:04 | FromDiscord | <Recruit_main707> i dont understand this: https://play.nim-lang.org/#ix=2hQ5 |
10:55:37 | FromDiscord | <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:42 | FromDiscord | <Rika> part of the lexer |
10:56:57 | FromDiscord | <Rika> im pretty sure thats part of the lexer |
10:57:36 | FromDiscord | <Rika> @Recruit_main707 a is a set containing the type int16 (or an int that can range from 0 to 65535) |
10:58:42 | FromDiscord | <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:33 | FromDiscord | <Recruit_main707> @Rika does it work like in c++? |
10:59:42 | FromDiscord | <Rika> wdym? |
11:00:13 | FromDiscord | <Recruit_main707> i know very little about cpp, but ive seen some things like `{12, 21, 32}` |
11:00:52 | FromDiscord | <Rika> thats an array |
11:00:53 | * | PMunch joined #nim |
11:01:11 | FromDiscord | <Recruit_main707> oh, ok |
11:01:21 | FromGitter | <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:36 | solitudesf | faulander, 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:05 | livcd | faukabder: probably it gets treated as linux path in playground? |
11:23:04 | dom96 | kodkuce: you should learn about software licensing |
11:23:06 | FromGitter | <faulander> yes, it does. but i used a hardcoded windows path |
11:23:09 | dom96 | Jester is MIT |
11:23:16 | FromDiscord | <kodkuce> ye i know |
11:23:23 | FromDiscord | <kodkuce> but i am polite |
11:23:29 | FromDiscord | <kodkuce> π |
11:23:52 | FromGitter | <faulander> @SolitudeSF but it doesn't in the playground, neither on my windows machine |
11:23:59 | livcd | faulander: What do you mean by "hardcoded windows path"? It works fine when executed locally |
11:24:00 | FromDiscord | <kodkuce> and ofc wanted to harass you for explanation for some parts xD |
11:24:41 | FromDiscord | <kodkuce> anywya i go now on run while there is still sun outside |
11:24:44 | FromGitter | <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:25 | FromGitter | <faulander> just try this playground: https://play.nim-lang.org/#ix=2hQa |
11:25:42 | livcd | faulander: that code works on my windows machine |
11:27:12 | FromGitter | <faulander> @livcd: it doesn't on mine :) |
11:28:40 | livcd | faulander: and are you on Windows? |
11:28:43 | livcd | https://play.nim-lang.org/#ix=2hQq |
11:29:39 | FromGitter | <faulander> you are using "/" as DirSep, which is *nix, Windows uses "\" |
11:29:57 | FromGitter | <faulander> as i mentioned, it works on *nix |
11:30:54 | FromGitter | <faulander> i already wrote my own proc for it, it still is strange |
11:31:19 | FromGitter | <faulander> my own proc works btw, on *nix and Windows |
11:31:27 | livcd | faulander: 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:11 | livcd | faulander: i am on 1.2.0 |
11:34:20 | FromGitter | <faulander> wait ... does it make a difference which shell i use to run the program? |
11:34:53 | FromGitter | <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:45 | FromGitter | <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:13 | FromDiscord | <Rika> because nim doesnt distinguish the target os with the string you pass in |
11:44:41 | FromDiscord | <Rika> it does matter, since git bash essentially tells whatever programs it runs that the os is not windows |
11:45:10 | FromDiscord | <Rika> nim doesnt care what string you give it, it doesnt use that to check what os its on when it compiles |
11:47:01 | FromDiscord | <Rika> faulander ^ forgot to ping |
11:47:04 | FromGitter | <faulander> ah ... ok, i try powershell as shell in visual studio |
11:53:45 | FromGitter | <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:07 | audiofile | hullo |
11:54:17 | audiofile | π |
11:54:18 | * | dddddd joined #nim |
11:54:34 | * | pbb joined #nim |
11:55:52 | * | krux02 joined #nim |
11:56:51 | FromGitter | <faulander> any clue what the macros error means? |
11:58:09 | FromGitter | <alehander92> you need a traceback |
11:58:15 | FromGitter | <alehander92> it probably comes from |
11:58:32 | FromGitter | <alehander92> some code that is expanded using a macro |
11:58:45 | audiofile | tf is a gitter |
11:59:50 | FromGitter | <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:01 | FromDiscord | <arnetheduck> `nlvm` at 1.2, and llvm 10 |
12:00:04 | * | jjido joined #nim |
12:00:47 | FromDiscord | <clyybber> nice |
12:00:47 | livcd | faulander: are you trying the same code? |
12:02:09 | audiofile | PMunch whoa is this you? https://news.ycombinator.com/item?id=21057751 amazing answer :D |
12:02:09 | livcd | faulander: dont you have a typo somewhere for ext/exe ? |
12:02:31 | FromGitter | <faulander> found it. livecd you're a genius. |
12:03:11 | livcd | faulander: You have a typo in my handle. It's livcd not livecd. |
12:03:29 | PMunch | audiofile, haha yes that's me |
12:03:34 | PMunch | And thanks :) |
12:04:14 | audiofile | was 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:02 | PMunch | Oh 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:10 | FromGitter | <faulander> @livcd: With our without 'e': genius, i said to you, not to me ;) |
12:11:20 | FromDiscord | <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:41 | audiofile | discord peeps if you see this say hi |
12:23:05 | FromGitter | <alehander92> @faulander sorry |
12:23:20 | FromGitter | <alehander92> it is only automatic |
12:23:34 | FromGitter | <alehander92> if you compile for debug mode |
12:23:35 | FromGitter | <alehander92> i think |
12:23:49 | FromGitter | <alehander92> and macros expand on compile time, so this kind of traceback is |
12:23:53 | FromGitter | <alehander92> a bit different |
12:23:58 | FromGitter | <alehander92> do you have an example we can run |
12:25:11 | FromGitter | <jorjun_twitter> Any wisdom on threejs and nim? Can I easily target a three.js canvas with a nim setup? |
12:25:37 | FromDiscord | <Rika> we can hear stuff on discord, just not send (we can here, not in nim offtopic) |
12:25:40 | PMunch | jorjun_twitter, shouldn't be hard |
12:25:45 | FromDiscord | <Rika> because the bridge is still funky over there |
12:26:10 | PMunch | You can tell Nim code to run JS functions, so you can just use the three.js functions directly |
12:27:11 | FromGitter | <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:23 | krux02 | @jorjun fromIRC is not a user, it is a bridge |
12:31:34 | krux02 | it is a bot sending stuff that is written on IRC |
12:31:42 | krux02 | my user name is krux02 |
12:31:43 | FromGitter | <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:47 | krux02 | ok |
12:31:54 | krux02 | I don't see that bot message |
12:32:12 | krux02 | are you on twitter? |
12:32:20 | FromGitter | <jorjun_twitter> I edited my message, but that didnβt work. Yep @jorjun |
12:32:58 | krux02 | interesting, because I see your message from as FromGitter and then with the username <jorjun_twitter> |
12:33:01 | krux02 | double indirection |
12:33:30 | FromGitter | <jorjun_twitter> Currently using Mac OS X Gitter client, authorised by my twitter a/c |
12:33:56 | FromGitter | <jorjun_twitter> More convenient option ? |
12:34:07 | krux02 | not really. |
12:34:15 | krux02 | I just use IRC. |
12:34:57 | krux02 | I recently was on the Telegram Nim channel (that one is unconnected), and it is too much visual communication for me. |
12:35:03 | krux02 | I prefer pure text. |
12:35:14 | krux02 | but it is a mess. |
12:35:32 | krux02 | whenever somebody posts source code on gitter, it is really ugly to read here. |
12:36:11 | krux02 | and when I post source code, I put it on a pastebin service (ix.io), because IRC isn't made for large messages. |
12:36:33 | krux02 | IRC even actively slows you down if you post too fast. It is to prevent spammers. |
12:36:37 | FromGitter | <jorjun_twitter> maybe discord is better for not spamming othersβ¦ canβt see other channels in here. |
12:37:30 | krux02 | I really do like IRC, because it is one fast ancient client that works for many opensource projects. |
12:37:41 | krux02 | And when I have a question, I can just enter the channel. |
12:38:09 | * | blackbeard420 joined #nim |
12:38:13 | krux02 | I mean Discord really gains popularity recently. But it is closed source software. |
12:39:56 | * | lbart_ is now known as lbart |
12:41:47 | FromGitter | <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:12 | PMunch | krux02, 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:23 | dom96 | how's everybody doing? |
12:48:55 | PMunch | I'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:05 | FromGitter | <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:05 | FromGitter | ... `seq[byte]` instead? |
12:49:43 | PMunch | jorjun_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:50 | FromGitter | <sealmove> PMunch :O getaway? |
12:50:03 | PMunch | It should at least point you in the right direction in regards to how to call JS functions from Nim. |
12:50:17 | PMunch | sealmove, 45 minutes by car out to a cabin in the middle of no-where :P |
12:50:36 | FromGitter | <sealmove> that's still great |
12:51:40 | FromDiscord | <nord501> https://www.youtube.com/watch?v=4o_tmccinds - Exporting C APIs from Zig, D, and Nim |
12:52:53 | FromDiscord | <Rika> nice, did you make that? |
12:52:57 | PMunch | sealmove, yeah I thought you were criticising me for travelling during the pandemic :P |
12:53:48 | FromGitter | <sealmove> nah, just jealous |
12:54:25 | krux02 | @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:46 | krux02 | But 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:51 | dadada | irssi is not crap |
12:57:32 | * | ljoonal quit (Quit: ljoonal.xyz) |
12:58:08 | FromDiscord | <clyybber> weechat isn't either |
12:58:25 | FromDiscord | <clyybber> but yeah both have commands as the main interface |
13:00:04 | FromGitter | <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:52 | kungtotte | For a non-op user, the only commands you ever use are /connect, /join, /part, /quit, /msg, /me, and possibly /ignore |
13:01:27 | FromGitter | <sealmove> So anyone has an opinion on what I wrote above? :3 |
13:01:32 | kungtotte | Connect can be skipped if you set up auto-connect |
13:01:57 | FromDiscord | <Rika> i use string instead of seq[byte] and have had no issues |
13:03:13 | PMunch | sealmove, 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:30 | PMunch | But you can cast between string and seq[byte] just fine |
13:03:42 | Zevv | *for now* |
13:03:51 | PMunch | For now? |
13:04:06 | Zevv | strings are not seq[bytes] for a reason |
13:04:40 | dom96 | Yeah, I would avoid doing this |
13:04:55 | dom96 | Things might change between Nim versions or implementations of Nim |
13:04:57 | FromDiscord | <Rika> what would you recommend for the missing procs then? |
13:05:19 | FromDiscord | <clyybber> maybe we should add a stringtoSeq to the stdlib then |
13:05:20 | Zevv | the 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:23 | FromDiscord | <Rika> if something changes then thats for sure on a 2.0 and not a 1.4 up no? |
13:05:23 | FromDiscord | <clyybber> so as to abstract the cast away |
13:05:57 | Zevv | never finished it, though |
13:06:03 | FromDiscord | <Rika> clyybber you can always do toSeq().mapIt(it.byte) (is it byte??) or something no? |
13:06:36 | FromDiscord | <clyybber> Yeah, but a cast is faster I think |
13:08:19 | FromGitter | <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:36 | FromDiscord | <clyybber> I'm not sure its bad. Measure it I guess. |
13:08:39 | FromDiscord | <clyybber> Both should do a copy |
13:09:33 | FromDiscord | <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:54 | krux02 | clyybber: I would not disagree to support conversions like ``seq[byte](myString)`` and ``string(myByteSeq)`` |
13:11:08 | FromDiscord | <clyybber> Hmm |
13:11:08 | krux02 | but don't introduce new names to Nim. Especially not in system.nim |
13:11:08 | FromGitter | <sealmove> krux02 yes!! I'd love this |
13:11:23 | FromDiscord | <clyybber> krux02: Yeah, I wouldn't like a new name either |
13:11:30 | FromDiscord | <clyybber> Maybe a converter really is best here? |
13:11:32 | dom96 | krux02, that would be a great feature |
13:11:47 | dom96 | clyybber: no. Implicit conversions are always risky |
13:11:53 | FromDiscord | <clyybber> True |
13:12:03 | Zevv | The 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:19 | Zevv | /when that changes/ |
13:12:30 | FromDiscord | <clyybber> dom96: I forgot that converters enable implicit conversion |
13:12:51 | FromDiscord | <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:23 | krux02 | clyybber: builtin type conversions always require a compiler patch |
13:15:00 | FromDiscord | <clyybber> Not really |
13:15:19 | FromDiscord | <clyybber> Assuming we could restrict converters to explicit conversion only |
13:15:20 | krux02 | In Nim? yes. |
13:15:47 | krux02 | C++ 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:52 | FromGitter | <sealmove> `seq[byte](myString)` not working is just a limitation. There are no drawbacks for enabling this. |
13:29:16 | FromGitter | <sealmove> Even if it needs a compiler patch I think it's worth it. |
13:34:26 | FromGitter | <sealmove> And also additions to `streams` module are also good idea I think |
13:34:55 | PMunch | Zevv, wouldn't that be useful for seqs as well though? The short strings on stack thing |
13:34:59 | FromGitter | <sealmove> for example we have `newStringStream` |
13:35:19 | FromGitter | <sealmove> why not have `newBytesStream` or something? |
13:35:36 | FromGitter | <sealmove> `newByteStream` * |
13:36:33 | Zevv | PMunch: 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:57 | Zevv | so for seq[byte] it would make sense, but not for seq[SomeObj], usually |
13:37:55 | PMunch | Oooh, that would be a neat optimisation indeed |
13:37:56 | * | Guest85 quit (Quit: My Mac Pro has gone to sleep. ZZZzzzβ¦) |
13:38:26 | PMunch | But yeah it would make sense for SomeObj as long as sizeof(SomeObj)<=[15|7] |
13:40:05 | FromDiscord | <KingDarBoja> https://github.com/epiphone/serverless-nim |
13:40:55 | * | nsf quit (Quit: WeeChat 2.8) |
13:44:49 | Zevv | anyway, I looked into this once but Ar4q discouraged me and told me to go fix slicing |
13:44:56 | Zevv | which is of course way over my head so I never got anywhere |
13:49:24 | * | sagax quit (Ping timeout: 258 seconds) |
13:49:53 | FromDiscord | <arnetheduck> short strings: https://github.com/elliotgoodrich/SSO-23 |
13:51:59 | FromDiscord | <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:06 | FromDiscord | <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:55 | audiophile | sorry, first time hearing of it! :( |
14:10:08 | FromDiscord | <Recruit_main707> not blaming you |
14:10:15 | FromDiscord | <Rika> its like the sister of protobuf no? |
14:10:23 | FromDiscord | <Rika> sounds interesting |
14:10:33 | FromDiscord | <Rika> im no pmunch but maybe ill try it out some time |
14:10:38 | PMunch | Hih? |
14:10:38 | FromDiscord | <Recruit_main707> i think its actually older, (not sure at all) |
14:10:48 | FromDiscord | <Rika> whoops, irc lol |
14:11:00 | PMunch | Haha :P |
14:11:07 | PMunch | I like to know when I'm mentioned |
14:11:45 | FromDiscord | <Recruit_main707> also, making some noise in here would be nice guys: https://github.com/google/flatbuffers/issues/5855 |
14:11:48 | PMunch | Feel free to shamelessly copy from the protobuf module if you want to implement flatbuffers |
14:12:28 | FromDiscord | <Recruit_main707> the protobuf nim module? |
14:13:09 | FromDiscord | <Rika> PMunch: ooh can i? TuT |
14:13:19 | PMunch | Recruit_main707, yes |
14:13:24 | FromDiscord | <Rika> @Recruit_main707 ill try working on it tomorro |
14:13:24 | PMunch | Rika, of course, it's MIT :P |
14:14:00 | FromDiscord | <Recruit_main707> @Rika there is a flatbuffers implementation for nim, but it cant parse .fbs files to my known |
14:14:03 | FromDiscord | <Rika> PMunch: actually, why aren't you making one? |
14:14:13 | FromDiscord | <Rika> what is an fbs file |
14:15:17 | PMunch | Rike, never had the use for one |
14:15:17 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzzβ¦) |
14:15:21 | FromDiscord | <Recruit_main707> https://github.com/RLBot/RLBot/blob/master/src/main/flatbuffers/rlbot.fbs |
14:15:21 | FromDiscord | <Recruit_main707> and then, the thing is that this gets transpiled for nim to be used |
14:15:26 | FromDiscord | <Rika> i am now Rike |
14:15:26 | PMunch | I mostly make modules that I think I'll need :P |
14:15:52 | FromDiscord | <Rika> Rike sounds like a horrible version of Mike |
14:18:05 | FromDiscord | <Recruit_main707> PMunch: were is the protobuf thing? |
14:18:19 | PMunch | https://github.com/PMunch/protobuf-nim I'd guess |
14:18:43 | FromDiscord | <Recruit_main707> thanks |
14:18:47 | PMunch | Damn, got it right :) |
14:19:02 | FromDiscord | <Recruit_main707> can it do what i said about the .fbs files though? |
14:27:28 | FromDiscord | <Rika> its for protobuf, not flatbuffer |
14:27:35 | * | hoijui joined #nim |
14:28:31 | FromDiscord | <Recruit_main707> so sad |
14:28:38 | FromGitter | <geotre> Has anyone got a decent guide on setting up neovim to edit nim? |
14:29:50 | FromGitter | <zacharycarter> Recruit_main707 - why not try wrapping: https://github.com/dvidelabs/flatcc |
14:30:38 | FromGitter | <zacharycarter> Nimterop can probably help here |
14:33:00 | * | Trustable joined #nim |
14:33:09 | FromGitter | <Yardanico> http://nibblestew.blogspot.com/2020/04/your-statement-is-100-correct-but.html |
14:37:19 | FromGitter | <sealmove> @Rika @Recruit_main707 if you are into these stuff, check out Kaitai Struct ;) |
14:37:43 | FromGitter | <sealmove> https://github.com/kaitai-io/kaitai_struct/issues/619 https://ci.kaitai.io/ |
14:38:08 | FromDiscord | <Recruit_main707> sadly, i need flatbuffers because its a framework |
14:38:34 | FromDiscord | <Rika> sealmove: ive been looking for an efficient binary data transmission format yeah |
14:38:54 | FromGitter | <sealmove> when you say "efficient"? |
14:39:21 | FromGitter | <sealmove> KS is focused on expressiveness and ease of use. It's not focused much on performance. |
14:39:33 | FromDiscord | <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:44 | FromDiscord | <Rika> (from yardanico's link) |
14:40:00 | FromDiscord | <Rika> sealmove: size and speed efficient |
14:40:07 | FromDiscord | <Recruit_main707> lmao |
14:40:16 | FromDiscord | <Rika> size and speed efficiency doesnt imply difficulty of use though |
14:41:14 | FromGitter | <zetashift> yea I saw that post on lobster, funny but true |
14:43:35 | FromDiscord | <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:27 | FromGitter | <zetashift> Did Nim get accepted for GSoC? |
14:47:35 | * | sagax joined #nim |
14:48:49 | livcd | Can I somehow tell from a Nim binary if it uses ARC? |
14:49:01 | livcd | What I mean. I can trivially find out? |
14:49:05 | livcd | Can I* |
14:49:07 | FromDiscord | <Rika> not reliably i dont think |
14:51:01 | livcd | https://github.com/juancarlospaco/plz -> outrageous claims! |
14:52:00 | FromDiscord | <Rika> that icon though... |
14:52:07 | FromGitter | <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:07 | FromGitter | ... simple, so some optimizations are discouraged and/or hard to integrate into the current codebase. |
14:53:15 | FromDiscord | <Rika> h-how?! |
14:53:15 | FromDiscord | <Rika> https://cdn.discordapp.com/attachments/371759389889003532/699270984582168606/unknown.png |
14:55:17 | FromGitter | <sealmove> kodkuce: your example should be as efficient as it gets |
14:55:29 | FromDiscord | <Rika> sealmove: okay, doesnt matter, ill take a look at it |
14:56:22 | * | xcm quit (Remote host closed the connection) |
14:57:04 | FromGitter | <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:22 | FromDiscord | <Asmodeus> Which compiler does nim include/use by default? |
14:58:33 | * | xcm joined #nim |
14:58:34 | livcd | The one that you have installed! |
14:58:55 | FromDiscord | <Asmodeus> Oh it just calls out to one? I assumed it bundled one by default |
14:58:56 | dzamo[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:00 | FromGitter | <geotre> @dzamo yeah I'm having trouble finding the right combination of plugins to get everything to work |
15:01:20 | FromDiscord | <Asmodeus> Does nim compile out to a single .c/.h file? And does it use libc? |
15:02:17 | FromDiscord | <Rika> nim on windows uses mingw if you tell it to install with that |
15:02:18 | FromDiscord | <clyybber> it compiles to multiple .c files |
15:02:40 | livcd | see nimcache |
15:02:59 | FromDiscord | <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:14 | livcd | anyone thought about implementing an rdp client in Nim? |
15:28:34 | FromDiscord | <Rika> rdp? |
15:29:02 | livcd | microsoft remote desktop |
15:32:39 | FromDiscord | <clyybber> why tho |
15:32:54 | FromDiscord | <clyybber> Windows has its own RDP server and client |
15:33:41 | shashlick | Recruit_main707: do you want flatcc wrapped? |
15:35:50 | livcd | clyyber: for automation ofc |
15:37:09 | * | hax-scramper quit (Ping timeout: 250 seconds) |
15:37:27 | FromDiscord | <Recruit_main707> shashlick, i want a flatbuffer parser for nim |
15:38:48 | * | hax-scramper joined #nim |
15:39:33 | shashlick | does https://github.com/dvidelabs/flatcc meet your needs? |
15:39:40 | * | myphs joined #nim |
15:40:16 | FromDiscord | <Recruit_main707> if it was done for nim, yes |
15:40:41 | FromDiscord | <Rika> its in c |
15:40:47 | FromDiscord | <Rika> wrappers are easy enough |
15:40:47 | livcd | shashlick will do his magic wrapping :) |
15:40:51 | shashlick | i'm asking if you want it wrapped, which means you are okay with the functionality it offers |
15:40:57 | shashlick | not reimplementing the whole thing in Nim |
15:41:31 | * | Guest85 joined #nim |
15:41:35 | FromDiscord | <Recruit_main707> then no |
15:41:52 | * | myphs__ joined #nim |
15:41:58 | FromDiscord | <Recruit_main707> Rika, doesnt that kind of make it losse the point? |
15:42:11 | FromDiscord | <Rika> why? |
15:42:39 | FromDiscord | <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:35 | shashlick | http://ix.io/2hSy/nim is the wrapper output for flatcc |
16:14:32 | FromGitter | <zetashift> Did you just wrap flatcc like that using nimterop? :O |
16:14:46 | shashlick | yep |
16:15:47 | FromGitter | <kaushalmodi> shashlick: does Nim playground have nimterop installed? |
16:15:57 | FromGitter | <kaushalmodi> if so, it would be cool to share short nimterop recipes |
16:16:26 | FromGitter | <kaushalmodi> *hmm, but it might not be able to do the git pulling of the header files* |
16:17:02 | FromDiscord | <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:00 | FromDiscord | <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:30 | shashlick | http://ix.io/2hSB/nim is the nimterop wrapper itself which also builds the library static or dynamic |
16:18:39 | shashlick | only tested on linux so far |
16:18:42 | * | thomasross joined #nim |
16:19:08 | FromDiscord | <Recruit_main707> but this is the flatcc one, isnt it? |
16:20:06 | FromGitter | <geotre> @dzamo what did you put in coc-settings.json to hook up nimlsp? I can't get it to work |
16:20:08 | shashlick | ya, and it only wraps flatcc.h - was there something else you wanted? |
16:20:51 | FromDiscord | <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:35 | FromDiscord | <Recruit_main707> this one i think... https://github.com/google/flatbuffers/tree/master/include/flatbuffers |
16:22:58 | dzamo[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:14 | FromDiscord | <Recruit_main707> CoC XD |
16:23:35 | FromDiscord | <Recruit_main707> (im sorry) |
16:23:44 | * | Guest85 joined #nim |
16:23:53 | shashlick | flatbuffers is C++, nimterop doesn't support C++ |
16:24:05 | FromGitter | <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:06 | shashlick | and flatcc has a compiler and runtime stuff |
16:24:15 | shashlick | i'll recommend you see all the functionality it offers |
16:24:41 | FromDiscord | <Recruit_main707> i will |
16:25:07 | shashlick | cause it is pure C and easy to wrap |
16:25:11 | FromGitter | <zetashift> @geotre any reason you can't use https://github.com/alaviss/nim.nvim ? |
16:25:26 | dzamo[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:23 | FromGitter | <geotre> @dzamo good point, that's probably it |
16:28:30 | FromGitter | <geotre> @zetashift it didn't work for me |
16:29:31 | * | Kaivo joined #nim |
16:30:24 | FromDiscord | <kodkuce> how to write forward slash in string |
16:30:58 | FromDiscord | <Rika> just type it |
16:31:00 | FromDiscord | <Rika> "/" |
16:31:27 | FromDiscord | <Rika> backslash needs escaping, with another backslash "\\" |
16:31:33 | FromDiscord | <Rika> damn it discord |
16:31:37 | aEverr | "\\" |
16:31:45 | aEverr | just double it damn it |
16:31:58 | FromDiscord | <Rika> or you can do r"\" |
16:31:59 | FromDiscord | <Recruit_main707> `"\\"` |
16:32:00 | FromDiscord | <Rika> AUFYBN |
16:32:06 | FromDiscord | <Rika> `r"\"` |
16:34:45 | * | xcm quit (Read error: Connection reset by peer) |
16:36:43 | FromGitter | <geotre> @dzamo that was the problem. Thanks for the help! |
16:38:06 | * | xcm joined #nim |
16:38:10 | dzamo[m] | @geotre nice :) |
16:39:21 | FromGitter | <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:36 | FromDiscord | <kodkuce> hmm |
16:42:22 | dzamo[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:25 | FromDiscord | <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:32 | FromDiscord | <Recruit_main707> now** |
16:42:34 | dzamo[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:30 | dzamo[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:16 | dzamo[m] | So I used the one here IIRC https://github.com/baabelfish/nvim-nim |
16:46:04 | FromGitter | <geotre> I just found the same thing |
16:46:16 | FromGitter | <geotre> But copying the function into that file seems to stop it complaining |
17:04:10 | dzamo[m] | <FromGitter "<geotre> But copying the functio"> Oh cool I'll go back and give that a try then, thanks |
17:07:39 | FromDiscord | <Recruit_main707> id like to see something to clear the nimcache |
17:07:58 | FromDiscord | <Recruit_main707> kind of `nim --clearcache` or something |
17:08:09 | Yardanico | --forceBuild ? |
17:08:19 | FromDiscord | <Recruit_main707> that does it? |
17:08:45 | Yardanico | fully rebuilds everything |
17:08:59 | Yardanico | "-f, --forceBuild:on|off force rebuilding of all modules" |
17:09:01 | FromGitter | <mantielero> Hello |
17:09:17 | Zevv | hi mantielero |
17:09:23 | FromGitter | <mantielero> I am having an issue with a macro |
17:09:30 | FromDiscord | <Recruit_main707> that doesnt delete the cache files whose projects might have been deleted |
17:09:55 | Yardanico | ah well I just do rm -rf ~/.cache/nim if I need to "clear the cache" :P |
17:10:26 | FromDiscord | <Recruit_main707> ok |
17:11:11 | FromGitter | <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:13 | FromGitter | <mantielero> The problem dissapear when I comment: https://github.com/mantielero/ipopt.nim/blob/master/src/ipopt.nim#L473 |
17:12:27 | FromGitter | <mantielero> Which doesn't makes much sense to me :o/ |
17:12:45 | * | xcm quit (Remote host closed the connection) |
17:13:27 | FromGitter | <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:56 | Zevv | mantielero: hard to debug that for us, it's pretty big like this. |
17:14:07 | Zevv | I'll take a peek but no promises. |
17:14:24 | FromGitter | <mantielero> I understand |
17:14:25 | Zevv | If you suspect you found a bug, it pays to reduce the size of your problem to the bare reproducable minimum |
17:14:40 | FromGitter | <mantielero> I don't think it is a bug |
17:15:02 | * | xcm joined #nim |
17:16:00 | FromDiscord | <Recruit_main707> some nimterop gurus that might be able to help me? |
17:17:31 | Yardanico | ask any question right away :P |
17:17:36 | Yardanico | https://dontasktoask.com/ |
17:18:24 | FromDiscord | <Recruit_main707> idont know how to use nimterop :p i need to wrap some headers |
17:18:57 | FromDiscord | <Recruit_main707> lets call them `header1.h` to `header5.h` |
17:18:59 | FromGitter | <mantielero> I would start first with c2nim (IMHO) |
17:19:30 | FromDiscord | <Recruit_main707> could try |
17:19:35 | Yardanico | @Recruit_main707 well nimterop isn't hard |
17:19:46 | Yardanico | see https://github.com/Yardanico/nim-libvlc/blob/master/src/libvlc.nim |
17:19:58 | Yardanico | you can ignore the symbol stuff and cPlugin and cOverride for now |
17:20:07 | Yardanico | the main thing is just "cImport(baseDir / "include" / "vlc" / "vlc.h", recurse = true, dynlib = "dynvlc")" |
17:20:26 | FromGitter | <mantielero> Take a look at the documented templates: https://github.com/nimterop/nimterop/blob/master/nimterop/template.nim |
17:31:05 | FromGitter | <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:12 | FromDiscord | <Recruit_main707> sorry, i had to leave, i will have a look, thanks |
17:33:00 | FromDiscord | <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:18 | FromGitter | <zetashift> @faulander do you mean the binary that is created when using WSL doesn't do anything? |
17:45:12 | shashlick | ya just ask your questions on nimterop - will reply |
17:45:53 | shashlick | Yardanico: can you test your libvlc wrapper with ast2? |
17:46:22 | Yardanico | shashlick: sure |
17:46:27 | Yardanico | how to? :P |
17:46:55 | FromGitter | <zetashift> WSL hello world runs fine for me |
17:47:14 | Yardanico | -f:ast2 ? |
17:47:53 | shashlick | yes - just add flags = "-f:ast2" |
17:47:57 | shashlick | to cImport |
17:48:06 | shashlick | of course, will help most if you have real tests π |
17:48:55 | FromDiscord | <kodkuce> dom96: how to reed data form this multypart thingy |
17:50:01 | * | gmpreussner quit (Ping timeout: 265 seconds) |
17:50:08 | Yardanico | shashlick: should I install @#head ? |
17:50:17 | Yardanico | or just "nimble install nimterop" |
17:51:27 | FromDiscord | <kodkuce> MultiData is some orderdTable but i cant do md[4] or md["mykey"] |
17:51:39 | Yardanico | did you do "import tables"? |
17:52:12 | shashlick | you'll need #head |
17:52:21 | shashlick | ast2 is not tagged yet |
17:53:30 | FromDiscord | <kodkuce> beh i am tard, yep frogot to import |
17:53:37 | Yardanico | well it's not intuitive really |
17:54:33 | Yardanico | shashlick: got an error :) |
17:54:56 | Yardanico | "Error: unhandled exception: getters.nim(117, 12) `name.nBl` Blank identifier error [AssertionError] [AssertionError]" |
17:55:26 | Yardanico | how do I make a usable stack trace for you? |
17:55:50 | Yardanico | https://gist.github.com/Yardanico/756cc013510352e1b3f1704794a8164b this is what I get |
17:56:09 | shashlick | nice - try with -d |
17:56:15 | shashlick | will tell whicih specific symbol |
17:56:20 | * | myphs quit (Remote host closed the connection) |
17:57:13 | Yardanico | https://gist.github.com/Yardanico/71bdc412caeb5bd91dc174a0c2080beb full output |
17:57:28 | Yardanico | guess it's vlc_Log ? |
17:58:20 | Yardanico | https://git.videolan.org/?p=vlc.git;a=blob;f=include/vlc_messages.h;h=b6d5843985dccfad5d24a6d7ae1e4a4728023ccd;hb=HEAD#l122 the source |
18:00:11 | Yardanico | "struct vlc_logger *const *logger" it can't parse this argument maybe? |
18:01:38 | FromDiscord | <kodkuce> grrrrrrrrrrrrrrrrrr that multypart parses skips filename π¦ will need to beat it more |
18:02:01 | shashlick | Yardanico: are you running this on command line with toast |
18:02:05 | shashlick | or with cImport |
18:02:11 | Yardanico | with cImport |
18:02:22 | shashlick | how come VLC_API isn't stripped? |
18:02:54 | Yardanico | wdym? I only remove libvlc_ prefix in my onSymbol |
18:02:55 | shashlick | hah, also varargs which isn't supported |
18:03:37 | shashlick | cImport always calls the preprocessor so VLC_API should have been processed |
18:05:17 | * | gmpreussner joined #nim |
18:06:26 | shashlick | okay let's come back to libvlc - might be biting off more than I can chew at the moment |
18:09:00 | Yardanico | shashlick: 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:39 | videofile | yay discord is back up again |
18:09:49 | videofile | welcome back discord gang |
18:09:56 | Yardanico | ? |
18:10:03 | videofile | the relay was broken |
18:10:15 | Yardanico | doesn't seem so |
18:10:20 | videofile | omg youre the nimexpr guy |
18:10:26 | Yardanico | I acn see messages just fine in Discord, even those before your messages |
18:10:30 | Yardanico | *can |
18:10:36 | Yardanico | videofile: well yes but it's a simple lib really |
18:10:41 | Yardanico | and not that efficient since it's recursive |
18:10:46 | videofile | huh but it didnt show up in irc for a while |
18:11:27 | FromDiscord | <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:44 | FromDiscord | <kodkuce> StringTableRef = ref StringTableObj |
18:11:48 | Yardanico | so? |
18:11:51 | Yardanico | "data" is private |
18:12:01 | FromDiscord | <kodkuce> oh |
18:12:06 | Yardanico | Why would you want to access it though? |
18:12:09 | Yardanico | you can iterate over all values |
18:12:36 | FromDiscord | <kodkuce> i am trying to do that just duno how |
18:13:00 | shashlick | Yardanico - no worries - will be good to test all existing wrappers with ast2 before final release |
18:13:24 | Yardanico | @kodkuce for (key, val) in yourTable: do stuff |
18:13:39 | Yardanico | or you can use "keys" and "values" iterators if you need only keys or only values |
18:13:44 | shashlick | will get back to you when I have time to focus on fixing specific bugs |
18:13:47 | Yardanico | also for string table you need "strtabs" not "tables" |
18:14:37 | FromGitter | <awr1> hello |
18:15:51 | FromDiscord | <kodkuce> i have both i think i am getting how it works |
18:16:00 | FromGitter | <zetashift> hiya aw1 |
18:16:54 | FromDiscord | <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:45 | FromDiscord | <kodkuce> yey got it wokring ty |
18:19:08 | shashlick | sure, we can chat here or the nimterop room in gitter |
18:20:18 | FromDiscord | <Recruit_main707> I will go into the gitter room |
18:20:41 | shashlick | cool |
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:58 | FromDiscord | <Varriount> I'm so lonely, no one's on Discord or Mumble. π¦ |
19:04:06 | FromDiscord | <Varriount> *Discord Voice chat |
19:04:28 | * | JohnAD joined #nim |
19:05:59 | * | Minimisthupper joined #nim |
19:11:04 | * | jjido joined #nim |
19:20:28 | videofile | what dyou wanna talkaboot |
19:20:53 | FromDiscord | <Varriount> Hm.. I don't actually know. -_- |
19:22:15 | videofile | :P |
19:22:35 | videofile | talk about gc vs arc? |
19:22:48 | FromDiscord | <Recruit_main707> but thats an easy one |
19:22:54 | * | Minimisthupper quit (Remote host closed the connection) |
19:27:32 | FromDiscord | <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:57 | videofile | Recruit tldr version? |
19:29:25 | FromDiscord | <Recruit_main707> ?? |
19:29:51 | * | kungtotte joined #nim |
19:31:49 | * | PMunch quit (Quit: leaving) |
19:32:06 | * | hoijui quit (Quit: Leaving) |
19:32:08 | Prestige | Varriount can you make a post about it? Or show how you benchmarked them? |
19:32:40 | FromGitter | <awr1> did you turn on the optimizer |
19:34:56 | * | MightyJoe joined #nim |
19:36:55 | * | cyraxjoe quit (Ping timeout: 260 seconds) |
19:40:47 | FromGitter | <zetashift> @Varriount maybe one can find out looking at the assembly or generated C code? e.g.: https://godbolt.org/z/AqiD9Y |
19:53:26 | FromDiscord | <Varriount> Prestige, awr1, zetashift: https://gist.github.com/Varriount/d7c3961f95870a1c6520523131c3971e |
19:53:50 | FromDiscord | <Varriount> I used "nim c -d:release --linedir:on --debugger:native" |
19:54:04 | FromDiscord | <Varriount> Actually, "-d:danger" |
19:55:00 | Prestige | On line 86, is there no way to just get the name of the proc? |
19:55:19 | FromDiscord | <Varriount> Not at runtime, no |
19:55:32 | FromDiscord | <Varriount> Actually, there might, but I couldn't be bothered. |
19:58:37 | FromDiscord | <kodkuce> can i chain sortedByIt or do i have to wirte cmp myself |
19:58:53 | FromDiscord | <Varriount> What do you mean by chain? |
20:00:13 | FromDiscord | <kodkuce> like sort first by name then sort by age if name is same |
20:00:33 | FromDiscord | <Varriount> Oh, you mean, is the sort stable |
20:00:52 | FromDiscord | <Varriount> I don't really know... Does the documentation state that it is? |
20:01:27 | FromDiscord | <kodkuce> what, i used this before for my poker obj |
20:01:28 | FromDiscord | <kodkuce> https://play.nim-lang.org/#ix=2hUP |
20:01:33 | leorize | Zevv: did you ping me? |
20:01:50 | FromDiscord | <kodkuce> just duno how to do same for tuple |
20:03:23 | FromDiscord | <kodkuce> anyway i go sleep my eyes are burning |
20:06:20 | * | lritter joined #nim |
20:12:44 | FromDiscord | <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:13 | videofile | is there any recommended resource on templating, macros and metaprogramming? I want to know what all the fuss is about |
20:22:32 | FromDiscord | <Varriount> videofile: The manual is a good place to start. |
20:22:43 | videofile | the docs? |
20:23:05 | FromDiscord | <Varriount> https://nim-lang.org/docs/manual.html |
20:23:30 | FromDiscord | <Varriount> videofile: For macros, general reading on what an AST (abstract syntax tree) is will help. |
20:23:50 | FromDiscord | <Varriount> https://en.wikipedia.org/wiki/Abstract_syntax_tree |
20:23:53 | videofile | gotcha, I do remember a little from my python days |
20:23:57 | videofile | it's from teh parse tree right? |
20:23:59 | videofile | ok thanks! |
20:24:33 | FromDiscord | <Varriount> I don't know if Python uses a separate tree structure for parsing information. Nim doesn't. |
20:24:43 | videofile | slightly offtopic but does FFI mean I can use C functions directly in nim? |
20:24:59 | videofile | I see |
20:25:07 | FromDiscord | <Varriount> Yes. |
20:25:19 | FromDiscord | <Varriount> Well, when compiling Nim to C/C++, anyway. |
20:25:21 | videofile | only C or is CPP also included? |
20:25:21 | * | cyraxjoe joined #nim |
20:25:24 | videofile | ah yes |
20:25:26 | videofile | of course |
20:25:43 | FromDiscord | <Varriount> Obviously you can't easily do that when compiling to, say, javascript. |
20:26:00 | videofile | 'easily' meaning it can still be done? |
20:26:46 | FromGitter | <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:34 | videofile | INTERESTING |
20:32:37 | videofile | that manual is so extensive |
20:34:24 | FromDiscord | <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:59 | Prestige | When 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:30 | FromGitter | <zetashift> @Varriount oooh my ASM isn't that strong, that's good to know |
20:47:50 | FromDiscord | <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:15 | FromGitter | <zetashift> yeah Nim and documentation don't go well together currently |
20:48:23 | * | narimiran quit (Ping timeout: 258 seconds) |
20:48:30 | FromGitter | <zetashift> It's getting better though |
20:48:56 | Prestige | Perhaps 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:52 | Prestige | Can #[ ... ]# be used for docs, or is it only ##? Would be nice to have multiline |
20:53:30 | leorize | Prestige: `##[ ]##` can be used |
20:53:36 | leorize | but we don't usually use it :P |
20:53:59 | FromGitter | <zetashift> docgen guide doesn't even mention it |
20:54:41 | FromDiscord | <Varriount> zetashift: Ah, I might have been wrong, actually. |
20:54:48 | Prestige | Hm okay I'm not sure how I feel about it anymore, lol |
20:55:18 | FromDiscord | <Varriount> Because Nim now treats a nil string as equal to "", looping over a nil string just skips over the loop |
20:56:03 | FromDiscord | <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:13 | FromGitter | <awr1> that was pre 1.0 |
21:18:36 | FromGitter | <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:47 | FromDiscord | <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:40 | leorize | FutureStream kinda resembles io_uring :P |
21:49:27 | * | inv2004 quit (Ping timeout: 260 seconds) |
21:52:31 | FromDiscord | <Recruit_main707> Can you create a sequence of static strings? |
21:53:05 | leorize | you can create a static sequence of strings :) |
21:53:56 | FromDiscord | <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:27 | leorize | yes, but I gotta warn you about how static strings don't really work as you'd expect them to |
21:54:50 | leorize | static[T] semantics is so weird that I don't really know how it actually composes with Nim |
21:55:21 | FromDiscord | <Recruit_main707> Well, it's not my function, just a fancy thing to keep the code clear |
21:55:29 | FromDiscord | <Recruit_main707> I will try it tomorrow |
21:58:06 | FromDiscord | <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:45 | leorize | I'm not surprised :P |
21:58:51 | FromDiscord | <Recruit_main707> But it doesn't seem like Google wants to do it by their self :p |
21:59:44 | leorize | not too surprising :P |
21:59:52 | FromDiscord | <Recruit_main707> Well, something is something I guess, so @Rika if you ever finish/start that, have it in mind |
22:00:28 | leorize | google wanna push adoption by implementing it for a bunch of langs |
22:00:49 | leorize | and I'd say that the Nim community is too small for them to bother |
22:01:01 | companion_cube | so flatbuffer is the next protobuf? |
22:03:19 | * | natrys quit (Quit: natrys) |
22:04:27 | FromDiscord | <Varriount> What's flatbuffers? |
22:05:35 | FromGitter | <zetashift> I think some grpc thing just like protobuf |
22:06:21 | FromGitter | <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:03 | FromGitter | <zetashift> this page has some why's: http://google.github.io/flatbuffers/ |
22:07:12 | Yardanico | wow they have a .github.io page |
22:07:22 | Yardanico | i mean google |
22:08:29 | FromGitter | <zetashift> I guess some team decided why not |
22:10:56 | companion_cube | I 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:14 | videofile | test |
22:25:48 | dadada | so 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:45 | dadada | there'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:27 | dadada | 6000 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:45 | dadada | I'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:32 | dadada | I 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:23 | FromGitter | <zetashift> adding a SWIG wrapper or adding support for C++ using nimterop, which one would be better? |
22:41:29 | dadada | starting 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:04 | dadada | zetashift: 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:04 | FromDiscord | <Recruit_main707> SWIG? Like, the python CPP thing? |
22:43:04 | * | hipoint-yc9 joined #nim |
22:43:10 | dadada | zetashift: 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:18 | dadada | zetashift: 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:44 | leorize | well we do have a c++ parser that can do just that :P |
22:44:56 | dadada | leorize: you mean clang? |
22:45:08 | leorize | yea, and tree-sitter, though I won't count of that |
22:45:10 | leorize | on* |
22:45:16 | FromGitter | <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:37 | leorize | well swig is pretty mature |
22:45:59 | dadada | zetashift: yes, and that's possible because it creates wrappers for X lang |
22:46:01 | leorize | the only problem is that if someone wanna add nim support they gotta write a lump of c++ :P |
22:46:18 | Yardanico | go big brain and write it in Nim instead |
22:46:20 | Yardanico | by wrapping swig xDD |
22:46:21 | videofile | anyone heard of any mention of vtk library in nim? |
22:46:34 | videofile | I'd love to finish my final project in nim instead of python |
22:47:13 | Yardanico | videofile: only found this https://github.com/Psirus/Nimfem/blob/6dd0d7b31209c70d8b2e565a387dad86cc42dffc/io.nim#L6 |
22:47:27 | dadada | leorize: 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:50 | videofile | ooooh nice find Yardanico ty! |
22:47:54 | FromGitter | <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:54 | FromGitter | ... everyones staying healthy |
22:48:29 | leorize | dadada: you focused on the wrong part :P the problem is "lump of c++" |
22:48:38 | FromGitter | <tervay> ah perhaps the IRC is more active |
22:48:43 | Yardanico | we see IRC |
22:48:48 | leorize | tervay: don't worry we see you |
22:48:52 | Yardanico | from* |
22:48:52 | FromGitter | <tervay> Oh dope |
22:48:56 | FromDiscord | <Avatarfighter> Hello everyone π |
22:49:10 | videofile | hullo |
22:49:20 | videofile | from the other side |
22:49:24 | leorize | dadada: it's not hard, but you gotta convince someone to do it or do it yourself |
22:49:28 | videofile | is this bridge written in nim? |
22:49:32 | leorize | nope |
22:49:35 | dadada | leorize: 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:35 | Yardanico | videofile: no |
22:49:46 | Yardanico | you can help the pure-nim one by contributing to https://github.com/Yardanico/ircord |
22:49:58 | Yardanico | most of it works but need to fix discordnim closing connections |
22:50:14 | leorize | also if you can get pinging to work that'd be awesome |
22:50:31 | Yardanico | I think I can |
22:50:41 | FromGitter | <zetashift> if it's easy for beginners I'd love to help :P |
22:50:42 | leorize | the discord to matrix bridge can do this and it's dope |
22:51:03 | leorize | esp once you bridge the room to irc discord users show up as irc users |
22:51:14 | Yardanico | well that wouldn't really be possible in freenode |
22:51:18 | Yardanico | since every nickname has to be registered |
22:51:22 | Yardanico | well I mean for most channels |
22:51:24 | FromDiscord | <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:33 | leorize | Yardanico: not #nim :P |
22:51:45 | leorize | yea but it's definitely a problem with #nim-offtopic |
22:51:45 | Yardanico | @Avatarfighter https://github.com/Yardanico/ircord |
22:52:08 | Yardanico | well guess I can try fixing some ircord |
22:52:17 | Yardanico | I'm sad Discord doesn't have any kind of json schema or something like that |
22:52:34 | Yardanico | so I can generate nim type definitions programatically |
22:53:06 | videofile | macros? |
22:53:15 | videofile | id love to contribute but im a noob right now |
22:53:25 | Yardanico | no, it can be possible without macros |
22:53:31 | FromDiscord | <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:34 | Yardanico | well I'll try to work on ircord right now a bit |
22:53:38 | dadada | leorize: 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:42 | Yardanico | I'll test it in #nim-offtopic as usual |
22:53:44 | dadada | much relevant C++ code out there |
22:54:05 | videofile | well, InventorMatt, sorry to let your hopes down but I'm no expert in vtk and nim :/ |
22:54:21 | leorize | dadada: well you gotta advertise it on the forum |
22:54:41 | videofile | was just hoping someone had started and maybe had some clear way for noobs to contribute haha |
22:55:22 | leorize | dadada: there's a better chance of finding someone interested there than here |
22:55:25 | FromDiscord | <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:30 | FromDiscord | <Recruit_main707> In fact, it seems like a good way for using flatbuffers (when their structure files are considerably big) |
22:56:57 | leorize | dadada: also note that Nim can interact directly with C++ templates, something that the majority of language supported by Swig can't do |
22:57:47 | dadada | Recruit_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:11 | dadada | leorize: noted! |
22:58:28 | leorize | I don't know if swig still do that "generate c++ -> c wrapper library then wrap that library for the target language" flow |
22:58:33 | FromDiscord | <Recruit_main707> dadada: there are also c flatbuffers |
22:58:54 | dadada | leorize: from the go code it looked like it |
22:59:09 | FromDiscord | <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:57 | leorize | dadada: 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:18 | dadada | leorize: 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:12 | FromDiscord | <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:36 | dadada | leorize: 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:23 | FromDiscord | <mratsim> i.e. similar to this thread: https://forum.nim-lang.org/t/6164#38091 |
23:03:27 | dadada | leorize: 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:36 | dadada | I mean it should be optional |
23:03:48 | leorize | please don't |
23:04:19 | dadada | don't what? |
23:04:23 | leorize | support for the hypothetical case can always come later |
23:04:47 | dadada | it's not really hypothetical, I currently compile my Nim stuff to C |
23:04:48 | leorize | well but now you gotta find someone willing to write some C++ for swig :) |
23:04:51 | leorize | that's the hard part |
23:07:44 | dadada | we need a billionaire financing Nim, how can we get Zuckerberg or the like to pay attention |
23:07:59 | videofile | any interest expressed in a telegram client for nim? |
23:08:13 | FromDiscord | <Recruit_main707> Nah, Zuckerberg no, Elon musk better |
23:08:29 | videofile | zuck has monay |
23:08:31 | dadada | I mean, there are so many great project ideas for Nim, but not enough people that can dedicate time tothem |
23:08:39 | videofile | true |
23:08:46 | videofile | we crossed 1250 modules recently I think |
23:09:00 | videofile | ππ |
23:09:23 | dadada | Recruit_main707: I named him cause fb financed a shit ton of FOSS projects, and some languages too |
23:09:35 | videofile | graphql is a good one yeah |
23:11:27 | dadada | it really doesn't matter who, Nim needs a sugardaddy or mommy |
23:11:30 | FromDiscord | <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:05 | dadada | Recruit_main707: nice |
23:13:54 | FromGitter | <zetashift> I was just about to start Rocket League |
23:18:42 | * | inv2004 joined #nim |
23:19:14 | inv2004 | Hello, I am trying to use threadpool, but a bit confised with the following error: flowVar of type: CountTable[system.int] |
23:19:35 | inv2004 | Error, maybe is clear, but how to resolve it? :) |
23:21:57 | FromGitter | <zetashift> can you show your code using play.nim-lang.org? |
23:24:16 | inv2004 | let me try to create one |
23:26:14 | videofile | any thoughts on interfacing nim with autohotkey? |
23:26:52 | FromDiscord | <Recruit_main707> Sounds very painful the least |
23:28:17 | inv2004 | here it is: https://gist.github.com/74b7067050f3d1421e95b967f493d377 |
23:32:24 | shashlick | @Recruit_main707 why did you need to change your project structure? |
23:36:48 | FromDiscord | <Recruit_main707> wdym? I was using a python middle man to connect with the framework, but that was way too slow |
23:38:14 | FromDiscord | <Recruit_main707> This new general sockets support would firstly be official (that means I don't have to work :p ) |
23:38:14 | FromDiscord | <Recruit_main707> secondly, it would be directly done by the framework, therefore performance would not be a problem |
23:40:07 | leorize[m] | general sockets? |
23:40:09 | shashlick | your comment about nimterop |
23:40:45 | * | zacharycarter quit (Ping timeout: 250 seconds) |
23:41:00 | FromDiscord | <Recruit_main707> I was gonna tell you tomorrow, cOncludeDir doesn't seem to work on windows |
23:41:57 | shashlick | dadada: if someone adds nim support to swig, i'll be happy to archive toast |
23:42:19 | * | inv2004 quit (Quit: Leaving) |
23:43:25 | FromDiscord | <Recruit_main707> That's more or less what I was doing my macros for |
23:43:26 | shashlick | i looked at swig in detail recently and it does provide a lot of nice info, more than tree-sitter and even clang |
23:43:37 | FromDiscord | <Recruit_main707> Not with swig, but bare python.h |
23:44:05 | dadada | shashlick: yeah, it's purposebuilt...! |
23:44:59 | dadada | shashlick: 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:28 | dadada | although even clang/gcc are sometimes behind it, to be fair to swig |
23:46:27 | shashlick | there is some frustration around that in swig world from what little i read |
23:46:33 | shashlick | keeping up is impossible |
23:47:07 | dadada | it's the same reason why people like myself think that you'll have an extremely tough time to get nimterop C++ ready |
23:47:13 | dadada | C++ is simply a monster :-) |
23:47:31 | shashlick | all said and done, the fact that you have multiple compilers, besides clang, it doesn't help to focus on just that |
23:47:39 | dadada | although I don't doubt you could do it |
23:47:57 | shashlick | i have no illusions about it, 4raq warned me years ago |
23:48:15 | shashlick | but i am doing this for fun anyway |
23:48:32 | shashlick | the ultimate goal is to push the envelope within Nim |
23:48:36 | dadada | oh, fully understand that! |
23:49:06 | shashlick | like the text editor i spent several months on, it gave us a plugin system which is now usable standalone |
23:49:29 | shashlick | likewise with nimterop - it can show what's possible and then someone can use portions or ideas in other things |
23:49:35 | shashlick | ultimately, the real deliverable is nim itself |
23:50:00 | dadada | true |
23:50:13 | shashlick | tools can come and go |
23:50:51 | leorize[m] | I really need some motivation to work on more nim projects |
23:51:21 | shashlick | leorize: help me! i need to get nimterop for C done so that we can move onto C++ π |
23:51:26 | dadada | the 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:48 | leorize[m] | dadada: just wrapping is not enough |
23:52:05 | leorize[m] | it has to feel like you're writing Nim |
23:52:12 | leorize[m] | and not many people can spend time doing so |
23:53:19 | leorize[m] | shashlick: that's a good motivation :P |
23:54:12 | leorize[m] | there are so many things in the stdlib that I wanna rework... |
23:54:32 | leorize[m] | how can people balance working on multiple projects? |
23:54:51 | shashlick | one at a time is all i can say |
23:55:22 | shashlick | otherwise mind is all over the place and one i get out of a project, i have high inertia going back into it |
23:56:20 | dadada | sometimes it's good to step away from a project to get a better perspective |
23:56:49 | dadada | indeed, 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:58 | leorize[m] | my problem is that my focus is all over the place :/ |
23:57:19 | dadada | leorize[m]: it's really hard not to be in times of YouTube and 24/7 news :-) |
23:58:24 | leorize[m] | it's more that I work on one project then I suddenly jump to another when they come to mind :) |
23:58:44 | shashlick | only suggestion would be to push and then move on |
23:58:56 | shashlick | and you can only push if it is working |
23:59:55 | leorize[m] | yea that doesn't sound too bad |