<< 21-03-2020 >>

00:02:15*filcuc quit (Quit: Konversation terminated!)
00:02:28*filcuc joined #nim
00:03:06*krux02_ joined #nim
00:06:04*krux02 quit (Ping timeout: 256 seconds)
00:07:25*filcuc quit (Quit: Konversation terminated!)
00:07:38*filcuc joined #nim
00:12:37*filcuc quit (Quit: Konversation terminated!)
00:12:49*filcuc joined #nim
00:21:54*tane quit (Quit: Leaving)
00:24:09dwdvcollect(for i in 1..3: i) is interesting, almost exactly matches ada's new aggregate expressions (for i in 1..3 => i) syntax. So, when are delta aggregates (mySeq with delta 1..2 => 42) coming to nim? :)
00:25:47*jjido joined #nim
00:26:54leorizewhen someone think that it's a good idea I guess :P
00:27:49leorizeit's purely coincidental that collect() matches ada syntax :)
00:28:59FromDiscord<Rika> what do delta aggregates do
00:29:02dwdvHey, hey, they're even usable with record/objects and arrays. And they even infer their result type.
00:29:34leorizewelcome to macros :)
00:29:41dwdvSimilar to js triple dot operator or whatever it's called. Updating a structure/record/...
00:30:26dwdvleorize: Well, the above isn't true for nim's collect sugar as of now, is it?
00:30:39dwdvOr rather doable.
00:30:50*filcuc quit (Ping timeout: 246 seconds)
00:31:12*ggibson joined #nim
00:31:25leorizedwdv: I don't quite follow
00:31:53leorizewhat I meant was that you can implement all of these with macros :)
00:35:13*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:35:17ggibsonAny ideas why this line causes Illegal Storage Access segfault in a dumb one-line fn in a nim dll? "var server = newAsyncHttpServer()"
00:41:14leorizehave you called NimMain() from your dll?
00:41:30ggibsonleorize
00:41:30leorizeif you haven't, the GC will not be activated, and your code won't work
00:41:33ggibsonYes.
00:41:48ggibsonNimMain(); dumbFn();
00:42:05leorizehow did you call your dll?
00:43:08ggibsonIt's a shared library, the header is included in an extern "C" block, and then I just call the function. A simple hello world nim fn works okay, but not the server declaration.
00:43:58ggibsonThis is from c++.
00:44:56leorizeyou should add {.cdecl.} to dumbFn()
00:45:13leorizeon windows the default calling convention is fastcall
00:45:20leorizefor Nim procs
00:45:32leorizeso changing it to {.cdecl.} first should help
00:46:03ggibsonahh, good idea; I'll try that.
00:49:35ggibson@leorize shoot, no luck with cdecl, stdcall, or noconv.
00:50:51ggibsonKnow of any projects that have c/c++ calling code in a nim lib? I haven't found any actual projects that feature this.
00:51:26*krux02_ quit (Remote host closed the connection)
00:53:32*oculux quit (Ping timeout: 250 seconds)
00:55:17*oculux joined #nim
00:56:07*disrupteq joined #nim
00:58:29*gangstacat quit (Ping timeout: 246 seconds)
00:59:47FromDiscord<Rika> is there a defect for "not implemented" stuff?
01:00:24*gangstacat joined #nim
01:02:42*chemist69 quit (Ping timeout: 260 seconds)
01:03:23leorize@Rika: no
01:03:42*chemist69 joined #nim
01:03:54leorizeggibson: shashlick is the expert on this front :P
01:04:32leorizeggibson: I actually have a library too, though it's on linux and things are much simpler over here
01:04:50FromDiscord<Rika> leorize, you know why there isnt any? or did no one think of it
01:05:07leorize@Rika: because people actually implements their functions? :p
01:05:15FromDiscord<Rika> smh
01:05:16ggibsonHah, true. I'll try it on linux and at least get this working there if I can.
01:05:24FromDiscord<Rika> what if i didnt wanna HMMMM
01:05:38leorizeRika: the short answer is that people don't need it :P
01:05:52*dadada quit (Ping timeout: 256 seconds)
01:05:58leorizebut if you do, you can make your own Defect by inheriting from Defect
01:06:29leorizeI think typically people just use doAssert false, "not implemented"
01:07:22*dadada joined #nim
01:07:45*dadada is now known as Guest84077
01:09:00leorize!repo liblinux_sched
01:09:00disbothttps://github.com/alaviss/liblinux_sched -- 9liblinux_sched: 11A simple library that wraps the sched_* syscalls for musl libc to make schedtool work again. 15 0⭐ 0🍴
01:09:07leorizeggibson: ^ that's my library
01:09:12leorizethough I'm the only user :P
01:10:17ggibsonThanks! Hah yeah I know how that goes.
01:10:32leorizeyou can ignore some complicated stuff in there, since I ported most of the manual work I did to the compiler
01:11:04leorizethe entire codegenDecl part can be turned into dynlib now
01:22:22ggibson@leorize What's the "extern __attribute__..." part for?
01:22:43*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
01:23:53ggibson@leorize You were right - it works like a charm in linux. So it's some sort of fnCall pragma voodoo I probably need to make it work in windows.
01:24:28ggibsonThat or gcc options to do with ffi.
01:26:23leorize[m]ggibson: it's dynlib
01:27:02ggibsonoh, I see. wow.
01:27:17ggibsonThanks for adding dynlib!
01:29:07leorize[m]I and timotheecour fixed it :p it's always been there, just wasn't working correctly
01:31:25*onionhammer joined #nim
01:47:01*dwdv quit (Ping timeout: 264 seconds)
01:52:14FromGitter<KingDarBoja> Quick question, is there any recommended text editor for Nim? Currently VSCode Nim extension has some issues
01:52:28shashlickWhat kind of issues
01:52:48shashlickWorks well for me on windows and Linux as well as remote ssh
01:53:49FromGitter<KingDarBoja> Maybe as I am newbie on Nim but for example, declaring a type and importing on another module, while hitting ctrl + s (save) on moduleA, will cause syntax errors on ModuleB and viceversa
01:54:02*disrupteq quit (Ping timeout: 256 seconds)
01:54:34FromGitter<KingDarBoja> And the error always shows on the other module as `This might be caused by a recursive module dependency:`
01:54:36FromDiscord<Rika> huh? probably actual syntax errors
01:54:51FromDiscord<Rika> you're probably actually doing circular imports
01:55:06FromGitter<KingDarBoja> Ummmmm
01:55:08FromDiscord<Rika> try running your code
01:56:16FromDiscord<Rika> can you post code snippets?
01:56:35FromGitter<KingDarBoja> I wanted to create a type on moduleA, let's call it `Foo` and define another type on ModuleB, let's call it Foo.
01:56:42FromGitter<KingDarBoja> Sure
01:57:30FromGitter<KingDarBoja> source.nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e75748abef4313854450232]
01:57:52FromGitter<KingDarBoja> location.nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e75749f672fdb1545b5bbf5]
01:58:05ggibsonAnd Visual Studio works okay. So I'm left trying to get mingw-gcc c++ calling the nim lib correctly.
01:58:31ggibson(the worst place to be)
01:58:33FromGitter<KingDarBoja> Oh, there is a discord channel
01:59:35shashlickNim doesn't support circular dependencies
02:00:12FromDiscord<Rika> move `from location import SourceLocation, newSourceLocation` below `type Source* ...`
02:00:17FromDiscord<Rika> then it should work
02:00:51FromDiscord<Rika> KingDarBoja ^
02:02:52FromGitter<KingDarBoja> Okie Dokie, didn't know about that
02:07:06FromGitter<KingDarBoja> Ummm still moving the import below `type Source*` triggers some error after hitting save on `location.nim`
02:07:43FromGitter<KingDarBoja> But this time, saving `source.nim` doesn't trigger error on `location.nim`
02:09:04FromGitter<KingDarBoja> Better move all logic from Source `getLocation` proc into Location
02:10:49FromDiscord<KingDarBoja> Hi
02:10:56FromDiscord<KingDarBoja> Managed to found the discord, 😄
02:13:03FromDiscord<KingDarBoja> Anyway, moved the logic and now getting `undeclared field: 'body' for type source.Source` :/
02:13:31FromDiscord<Rika> i mean
02:13:35FromDiscord<Rika> below the whole declaration
02:13:38FromDiscord<KingDarBoja> `var lines: seq[string] = source.body[0..^position].splitLines` maybe this isn't the proper way to get the type prop
02:13:57FromDiscord<KingDarBoja> The whole declaration?
02:14:12FromDiscord<Rika> below `locationOffset: Location`
02:14:24FromDiscord<Rika> the import below the whole type declaration
02:14:37FromDiscord<Rika> so above newsource
02:14:55leorize@KingDarBoja you should avoid circular dependency altogether...
02:14:59FromDiscord<KingDarBoja> That's what I did and once again, when saving `location` , start showing syntax errors
02:15:16FromDiscord<KingDarBoja> 🤔
02:15:30ggibson@leorize FYI I solved my issue - turned out I forgot I had installed ccache months ago, and the compile cache was dirty. yay no nim problems!
02:15:41leorizeggibson: yay
02:15:53leorizejust don't use ccache :p
02:16:14ggibson...yeah seems to be the lesson (it doesn't really help anyway)
02:16:15FromDiscord<Rika> body isnt public
02:16:28FromDiscord<Rika> `body: string` -> `body*: string`
02:16:41FromDiscord<Rika> yes, fields of an object need to publicized
02:16:49FromDiscord<KingDarBoja> Ohhhhhhhhhh
02:17:07FromDiscord<KingDarBoja> That's it!
02:17:26FromDiscord<KingDarBoja> Thanks @Rika and leorize!
02:17:33FromDiscord<Rika> i dont think you also publicized the getLocation procs? not sure
02:18:00FromDiscord<KingDarBoja> No but better avoid the circular thing and declare public the `body` prop
02:18:07FromDiscord<KingDarBoja> Now everything is okay 😄
02:19:02FromDiscord<KingDarBoja> Sorry for that, I am usually coding on Python, didn't expect everything is "private" by default
02:19:50FromDiscord<KingDarBoja> The tutorial part I doesn't seem to mention that
02:20:18FromDiscord<KingDarBoja> I am reading this -> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers#self__init__
02:20:43leorizeI think the wiki is free for all to edit :)
02:20:55leorizefeel free to add in any information that you deem missing
02:21:33FromDiscord<Rika> `initX` for `object`s, `newX` for `ref object`s
02:21:43leorizeit's not too weird that we got people coming from python and they got confused with now Nim works
02:21:52*ggibson quit (Remote host closed the connection)
02:22:14leorizeNim only looks like python in certain syntactic elements
02:22:40leorizeso if you got any questions, feel free to ask here :)
02:22:46FromDiscord<KingDarBoja> So I do better use `initX` on my current code ugh?
02:22:55FromDiscord<Rika> haha 😛
02:22:58*rnrwashere quit (Remote host closed the connection)
02:22:59FromDiscord<KingDarBoja> Was going to ask the difference between proc / func too lol
02:23:36FromDiscord<Rika> func is proc with `noSideEffects`
02:23:46FromDiscord<KingDarBoja> > `initX` for `object`s, `newX` for `ref object`s
02:23:46FromDiscord<KingDarBoja> @Rika Tell me 😛 😆
02:24:10*chemist69 quit (Ping timeout: 246 seconds)
02:24:17FromDiscord<Rika> proc is `def a(): print("nice")`, func cannot print normally
02:24:24FromDiscord<Rika> because printing edits stdout
02:24:27FromDiscord<Rika> and that is a side effect
02:24:34leorizefunc is basically proc but you don't get to access states outside of your parameters
02:24:39FromDiscord<Rika> that
02:24:52FromDiscord<Rika> outside parameters and result
02:24:59FromDiscord<KingDarBoja> Oh
02:25:28*chemist69 joined #nim
02:25:37FromDiscord<Rika> i recommend using func if needed
02:26:18FromDiscord<KingDarBoja> Okie Dokie 😄 Btw anyone uses vscode-icons (icon theme) ?
02:26:23FromDiscord<Rika> i tried it
02:27:50FromDiscord<KingDarBoja> Well the nim icon is being updated soon, no more black-gold crown lol
02:28:20FromDiscord<Rika> i assume thanks to some KDB
02:28:36FromDiscord<KingDarBoja> 😍
02:29:36FromDiscord<Rika> oh also `decorator` is called `pragma` here
02:29:55leorizenah
02:30:08leorizewe don't have any syntax similar to decorator :P
02:30:16FromDiscord<Rika> no i mean the naming
02:30:27FromDiscord<Rika> i mean more of functionality-similarity-wise
02:30:39leorizebut macros is superior
02:30:45leorizeit's not pragmas, they are macros
02:30:57FromDiscord<Rika> i mean, theyre called pragmas here
02:31:03FromDiscord<KingDarBoja> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers#decorators What Leorize said...
02:31:45*Kaivo quit (Quit: WeeChat 2.7.1)
02:31:54FromDiscord<Rika> we both know our shit, pragmas are basically macros which take a function
02:32:18FromDiscord<Rika> but the syntax for using them is pragma syntax, not macro syntax
02:32:20FromDiscord<Benumbed> Does anyone know where things stand in terms of stream procs gaining an understanding of endianness? I found the issue in Github but it's languishing 😦
02:32:39FromDiscord<Rika> i understood nothing of what you just said
02:32:59FromDiscord<Benumbed> streams have procs to extract things like uint32s and such
02:33:06FromDiscord<Benumbed> Those have no concept of endianness
02:33:25FromDiscord<Benumbed> meaning if you're streaming something from a network, on a little-endian machine, well, you're going to have a bad time 😄
02:33:33FromDiscord<Benumbed> (at least if you're using those procs)
02:33:48FromDiscord<Rika> well, how exactly do you tell something is little endian or big endian given only the data
02:33:57FromDiscord<Rika> or do you mean as an argument?
02:34:02FromDiscord<Benumbed> The latter
02:34:47FromDiscord<Rika> i got no clue right now since im kinda loopy maybe someone else can help
02:35:02FromDiscord<Benumbed> so someStream.readUint32 would have some way of hinting what ordering was in use so it can be converted to native endianness
02:36:08FromDiscord<Benumbed> The issue in question (RFC) is https://github.com/nim-lang/RFCs/issues/27
02:36:09disbot[RFC] Option for endianness in streams
02:36:59FromDiscord<Benumbed> More interested to see if there's any progress being made on it, or if I should just continue writing my own extractors for streams
02:37:09*Hideki_ joined #nim
02:37:44FromDiscord<Benumbed> Oh and BTW, I meant to say this last night, but got distracted by stuff, this is probably the nicest language community I've been in, it's awesome, thank you 🙂
02:39:10FromDiscord<KingDarBoja> ❤️
02:39:38*chemist69 quit (Ping timeout: 246 seconds)
02:40:56FromDiscord<KingDarBoja> Quick question, the tutorial shows how to raise an error, is there a quick way to do it inside a if statement or I must create the following:
02:40:56FromDiscord<KingDarBoja> ```nim
02:40:56FromDiscord<KingDarBoja> if some_check:
02:40:57FromDiscord<KingDarBoja> var e: ref ValueError
02:40:57FromDiscord<KingDarBoja> new(e)
02:40:57FromDiscord<KingDarBoja> e.msg = "you failed this city"
02:40:57FromDiscord<KingDarBoja> raise e
02:40:59FromDiscord<KingDarBoja> ```
02:41:33FromDiscord<Rika> raise newException(ValueError, msg)
02:41:41FromDiscord<Benumbed> You should be able to just do newException(ExceptionT.... yes that ^ haha
02:41:46FromDiscord<Rika> heh 🙂
02:41:48*chemist69 joined #nim
02:42:14FromDiscord<Rika> i may be sleepy and slow now but my typing is probably not inhibited enough to slow down significantly
02:42:26FromDiscord<KingDarBoja> Ohhhh!!
02:42:28FromDiscord<KingDarBoja> Thank you!
02:43:02FromDiscord<Benumbed> I'm sitting at a weird angle at my desk and watching a detailing video for a Skyline R32 V-spec while reading chat... that's my excuse 😄
02:43:14FromDiscord<Rika> ooh, R32s are nice
02:43:26FromDiscord<Rika> i'm undecided on which looks nicer, the R32 or the R34
02:43:32FromDiscord<KingDarBoja> I'm playing World of Tnaks Blitz while coding
02:43:36FromDiscord<Benumbed> Aye... apparently this one had 100 hrs of detail time spent on it
02:43:54FromDiscord<Rika> if only i had the money to buy something that expensive...
02:43:56FromDiscord<Benumbed> It's cathartic, and given all the crazy shit going down in the world, I need stuff like that
02:44:21FromDiscord<Rika> i'm doing absolutely nothing aside from reading chat
02:44:50FromDiscord<Benumbed> Just this chat, or all your Discord chats?
02:44:59FromDiscord<KingDarBoja> I'm playing World of Tanks Blitz while coding
02:45:16FromDiscord<KingDarBoja> We can go to #offtopic :v
02:46:12FromDiscord<Benumbed> Well that's really all I had to say 🙂
02:47:21FromDiscord<Rika> a lot of discord chats
02:47:34FromDiscord<Benumbed> Ok, I was about to say you must be horribly bored
02:47:52FromDiscord<KingDarBoja> COVID-19 intensifies*
02:48:47FromDiscord<Rika> i am, i've been chipping away at some gigantic library in python im converting to nim but its hard
02:48:52FromDiscord<Rika> because its math heavy
02:49:00FromDiscord<Rika> and also parser heavy
02:49:04*abm quit (Read error: Connection reset by peer)
02:49:12FromDiscord<Benumbed> Ohhh, which lib (if it's public)?
02:49:47FromDiscord<Rika> https://github.com/llllllllll/slider/
02:50:00FromDiscord<Benumbed> Ahhh, neat!
02:50:18FromDiscord<KingDarBoja> I am doing my first steps on Nim, by converting GraphqlJS (or Graphql-python) into nim
02:50:21FromDiscord<Rika> my port is https://github.com/de-odex/circa, i havent committed in a while but i've been working on it nonetheless
02:50:31FromDiscord<Benumbed> I'm writing an AMQP client library in pure Nim from the spec... as my first project in Nim... lol
02:50:33FromDiscord<Rika> sounds painful really
02:50:39FromDiscord<KingDarBoja> I am doing my first steps on Nim, by converting GraphQL-JS (or Graphql-python) into nim
02:50:51FromDiscord<Rika> this was my first project but its not my first project to finish
02:51:12FromDiscord<KingDarBoja> 😄
02:54:22disruptekthose are a couple great projects.
02:55:11*Hideki_ quit (Remote host closed the connection)
02:55:14FromDiscord<KingDarBoja> I am contributing to graphql-python but wanted to try something new and found nim 😄
02:55:21FromDiscord<KingDarBoja> I am contributing to graphql-python but wanted to try something new and found Nim 😄
02:56:31disruptekwe need a native graphql for github actions and packages.
02:56:46*Hideki_ joined #nim
02:57:07FromDiscord<Rika> kinda wished my projects were as useful as you 2s
02:57:09FromDiscord<Rika> lmao
02:57:27FromDiscord<Benumbed> It's nice to have a systems language I like using. I know C++ pretty well, but its heavy, Go is ... well lets not talk about Go
02:58:01FromDiscord<Benumbed> @Rika Hey, you're helping build the ecosystem around Nim, that's valuable
02:58:04FromDiscord<Rika> Rust?
02:58:04FromDiscord<KingDarBoja> > <disruptek> we need a native graphql for github actions and packages.
02:58:04FromDiscord<KingDarBoja> @gitterirc What do you mean by native¡
02:58:09FromDiscord<KingDarBoja> > <disruptek> we need a native graphql for github actions and packages.
02:58:09FromDiscord<KingDarBoja> @gitterirc What do you mean by native?
02:58:11FromDiscord<Rika> native nim
02:58:21FromDiscord<Benumbed> Haven't used Rust beyond an initial inspection
02:58:26FromDiscord<KingDarBoja> @Rika every package can be useful
02:58:33FromDiscord<Rika> recently ive been heavily self deprecative though i dont know why
02:59:41FromDiscord<KingDarBoja> Have you seen npm packages? There are tons and several of them are very tiny stuff but still people love to publish them and are useful on its own niche
02:59:42FromDiscord<Benumbed> Happens to me a lot Rika, my fixes aren't healthy though, shove it in a mental corner and try to find something that sparks my interest so I can continue to ignore it
03:00:32FromDiscord<Rika> @KingDarBoja thats a whole nother story isnt it
03:00:43FromDiscord<Benumbed> I write Node for work, right now... the microservices I work on have thousands of packages listed in their lock files... it's unnerving
03:00:54*Hideki_ quit (Ping timeout: 240 seconds)
03:00:58FromDiscord<Rika> how's auditing : )
03:01:01disruptekyeah, i hate the js ecosystem.
03:01:11disruptekso liberating to be free of that.
03:01:19FromDiscord<KingDarBoja> xD
03:01:23FromDiscord<Benumbed> Actually we're undergoing a huge audit right now, it's not pleasant
03:01:27FromDiscord<Rika> js is the reason stdlibs need to be strong and useful
03:01:40FromDiscord<KingDarBoja> I use TypeScript and Python at work
03:01:43FromDiscord<Benumbed> Yeah I got yanked from a Python team to a Node team because I have an unusual set of skills
03:01:45FromDiscord<Rika> i'm not working yet
03:01:48FromDiscord<KingDarBoja> Thank god it isn't plain JS
03:01:56FromDiscord<Rika> @Benumbed ??? what skills 😮
03:02:00FromDiscord<Benumbed> Node was not on my list of things to learn... ever lol
03:02:22FromDiscord<Rika> i've tried typescript, its like a weaker and more confusing version of nim
03:02:42FromDiscord<Rika> never gonna memorize the difference of for of and for in
03:02:52FromDiscord<Benumbed> @Rika I'm a software engineer by trade, but I have 5 years of SRE experience as well, so I'm very familiar with how to build infrastructure, particularly in an automated way
03:02:56FromDiscord<KingDarBoja> Ah...
03:03:04FromDiscord<Rika> thats interesting
03:03:15FromDiscord<KingDarBoja> SRE?
03:03:22disrupteksite reliability
03:03:24FromDiscord<Benumbed> I'm on Disney's cloud team, our products manage the entire company's cloud presence across all 3 major vendors
03:03:35FromDiscord<KingDarBoja> @Rika I have never understood the difference between call and bind so...
03:03:48FromGitter<zetashift> hopefully somebody can sneak in some Nim code into Disney's codebase
03:03:50FromDiscord<Rika> i dont even know what call or bind do
03:04:01FromDiscord<Benumbed> zetashift: Working on it! 😄
03:04:12disruptekcall is what you do to get her over to your place, and bind is what you do to keep her there.
03:04:15FromGitter<zetashift> Ooooo
03:04:18FromDiscord<Rika> you can use code to make node code 🙂
03:04:24FromDiscord<Rika> do it do it
03:04:30FromDiscord<Rika> ok
03:04:34FromDiscord<Rika> i didnt say nim somehow
03:04:37FromDiscord<KingDarBoja> LOL
03:04:41FromDiscord<Rika> you can use nim code to make node code
03:04:49FromDiscord<Rika> im very sleepy zzz
03:05:07FromDiscord<Benumbed> There's talk of converting our services to Go, which, having actually learned Go... I'm not entirely pleased about either haha
03:05:10FromDiscord<KingDarBoja> Now think about JS community with those frameworks, libraries, etc
03:05:23FromDiscord<Benumbed> Gp
03:05:28FromDiscord<Rika> Gp?
03:05:34FromDiscord<Benumbed> err Go's package ecosystem is a nightmare
03:05:36FromGitter<zetashift> Yeah I think Go is Nim's biggest contender in the space Nim wants to occupy
03:05:38FromDiscord<Rika> yeah
03:05:45FromDiscord<KingDarBoja> What about Rust?
03:05:49FromDiscord<Rika> heard of Go's package system and hhhhh
03:05:55*actuallybatman left #nim (#nim)
03:05:58FromDiscord<Rika> Rust is an okay package system from what i tried
03:06:03FromDiscord<Benumbed> Rust is too high of a learning curve for what we do
03:06:06FromDiscord<Benumbed> and also overkill
03:06:07FromGitter<zetashift> If they can live with a GC, I think you'd want to avoid rust
03:06:10FromDiscord<KingDarBoja> Rust has Cargo, Go?
03:06:16FromDiscord<Rika> go has uh
03:06:21FromDiscord<Rika> forgot the name
03:06:33FromDiscord<Benumbed> dammit I know this... Go modules or something
03:06:36FromGitter<zetashift> iirc they were working on it
03:06:39FromDiscord<KingDarBoja> Oh yeah
03:06:44FromDiscord<KingDarBoja> Go modules
03:06:45FromDiscord<Rika> TBH Cargo sounds more like a Go package manager than a Rust one, because, uh, carGO
03:07:00FromDiscord<Benumbed> I was using them right before I moved my efforts to Nim
03:07:20FromDiscord<KingDarBoja> Go has several package managers as far as I know
03:07:23FromDiscord<Benumbed> The Go modules are out of beta in 1.13 (latest) I think
03:07:30FromDiscord<KingDarBoja> Then they went to only one trying to standarize it
03:07:41disruptek!repo nimph
03:07:43disbothttps://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 54⭐ 3🍴 7& 1 more...
03:07:56FromDiscord<Rika> most people say that Go is too simplistic making it boilerplate heavy
03:07:56FromDiscord<KingDarBoja> Wait what?
03:08:09FromDiscord<Rika> yeah disruptek made another package manager
03:08:13FromDiscord<KingDarBoja> Where is nimble lol
03:08:15FromDiscord<Rika> never used it
03:08:16FromDiscord<Benumbed> lol
03:08:31FromDiscord<Benumbed> nimble drives me nuts when it comes to how it handles tests
03:08:35FromDiscord<Rika> nimble is the one packaged with nim
03:08:37FromDiscord<Rika> why so?
03:08:48FromDiscord<Benumbed> I have an item in my list of TODOs to figure out how to make it better
03:08:52FromGitter<zetashift> Rika, I think you have to choose your projects for Go, for web services seems great
03:08:55FromDiscord<KingDarBoja> Neither I but hopefully it doesn't become too many of them
03:09:00FromDiscord<Benumbed> Nimble doesn't traverse directory structures to run tests
03:09:02*rnrwashere joined #nim
03:09:07*rnrwashere quit (Remote host closed the connection)
03:09:08FromDiscord<Benumbed> it just looks in the root of the test directory
03:09:17FromDiscord<Benumbed> also, it likes to write the executable next to the .nim
03:09:20FromDiscord<KingDarBoja> As JS has npm, yarn, pnpm, etc
03:09:22FromDiscord<Rika> maybe testament fixes what unittest lacks
03:09:31FromDiscord<Benumbed> which makes .gitignores a nightmare trying to not check in executables
03:09:54FromGitter<zetashift> @Benumbed try to open an issue, iirc the people working on nimble are open for ideas
03:09:55FromDiscord<Rika> i think theres a parameter for that
03:10:03FromDiscord<Rika> --out was it? not sure
03:10:09FromDiscord<Rika> outDir? dunno
03:10:20FromGitter<zetashift> yea
03:10:25FromDiscord<Benumbed> zetashift: I was going to try and actually figure a better way out myself and then submit an MR
03:10:28FromGitter<zetashift> `nim c -o:path`
03:10:38FromDiscord<KingDarBoja> 😮
03:10:45FromGitter<zetashift> man I read that as submit an MRI
03:10:55FromDiscord<Benumbed> Heavy stuff... O_o 😄
03:11:08FromDiscord<Rika> only reason i understood MR is because MR sounds like (mer)ge
03:11:25FromDiscord<Benumbed> I use 'MR' because not everyone uses Github 🙂
03:11:59FromGitter<zetashift> fair
03:12:15FromDiscord<Benumbed> I do actually use -o all the time (I compile to a build/ directory so I can just gitignore it), but it only works for single files
03:12:31FromDiscord<Benumbed> What would be helpful is a 'write all binaries to <this> dir' argument
03:12:46FromGitter<zetashift> might be able to do it with nimscript
03:13:18FromDiscord<Rika> anyone here who can help me out with my endeavor to translate this lib though (i mean, less of those who can read python and more of those who are knowledgeable on osu core functionality, as the library i'm translating has errors in the code)
03:13:19FromGitter<zetashift> I'm not sure though, most people here are EU so they can't weigh in cause they're sleeping :(
03:13:25FromDiscord<Benumbed> I'll probably look into a 'fix' once I get to the point with the AMQP client where I have a bunch of tests that I want to build
03:13:55FromDiscord<Benumbed> Not I unfortunately, the closest I get to osu is watching vids on YouTube
03:14:30FromGitter<zetashift> osu as in the rhythm game?
03:14:34FromDiscord<Rika> yep
03:14:45FromGitter<zetashift> yea also youtube vids for me
03:14:55FromDiscord<Rika> xdddd
03:15:21FromDiscord<Rika> okay ill just ask this then, what's the best approach for me to parse a file that looks like a windows INI file but isnt exactly one?
03:16:29FromDiscord<Benumbed> That is the sort of stuff that ends up irking me lol
03:16:29FromGitter<zetashift> Is there an existing implementation in another language maybe?
03:16:52FromDiscord<Benumbed> Can you pre-process the file down to legit INI syntax, then use an INI parser?
03:17:08FromDiscord<Benumbed> Can you pre-process the file down to actual INI syntax, then use an INI parser?
03:17:22FromDiscord<Benumbed> Shit, forgot I'm not supposed to edit, sorry IRC folks
03:17:31FromDiscord<KingDarBoja> OOOHHH it is that tap game!
03:17:38FromDiscord<Benumbed> Discord and Slack habits are engrained in me
03:17:41FromDiscord<Rika> THAT TAP GAME
03:18:25FromDiscord<Rika> i guess ill just uh look elsewhere
03:19:15FromDiscord<Benumbed> Hey, I made a suggestion! Sorta... 😄
03:20:10FromDiscord<KingDarBoja> I am very tired, gotta go 😄 see ya tomorrow!
03:20:32FromDiscord<Benumbed> nn
03:20:42FromDiscord<KingDarBoja> nn?
03:20:46FromDiscord<Benumbed> nightnight
03:21:14FromDiscord<KingDarBoja> Ah! ... _Buenas noches_ (good night in spanish)
03:21:22FromDiscord<Benumbed> Oy it's 2021... I should probably eat something O_O
03:21:29FromDiscord<Rika> it's 2020
03:21:35FromDiscord<Benumbed> Cute
03:21:48FromDiscord<Rika> god please add colons to your times
03:21:52FromDiscord<Rika> or a T suffix
03:22:00FromDiscord<Rika> prefix rather
03:22:02FromDiscord<Benumbed> Butbut...
03:22:11FromDiscord<Rika> 2021 looks like a year
03:22:12FromDiscord<Benumbed> *sigh* fiiiiine
03:22:27disruptekbenumbed: --outdir
03:23:16FromDiscord<Benumbed> disruptek: Huh... I didn't even know that was a thing!
03:23:27disruptek--fullhelp
03:23:28FromDiscord<Rika> hey i called it
03:24:07FromDiscord<Benumbed> Well gee, I feel like a double dumbass, thanks
03:24:09FromDiscord<Benumbed> 😄
03:24:36FromDiscord<Rika> what exactly is a closure iterator
03:24:52FromDiscord<Rika> and how do i distinguish a regular one from a closure one
03:24:56disrupteklike a python generator, an iterator that you can iterate on demand.
03:25:15FromDiscord<Benumbed> Wouldn't that just be a closure that `yeild`s?
03:25:22FromDiscord<Benumbed> yield dammit fingers
03:25:53FromDiscord<Rika> well is it possible to convert a regular iterator to a closure iterator
03:26:18FromDiscord<Rika> w/o editing the source of the regular iterator
03:28:35FromDiscord<Rika> nvm
03:28:38FromDiscord<Rika> lmao
03:28:45FromDiscord<Rika> i'm very loopy today it seems
03:32:07*Hideki_ joined #nim
03:32:48FromGitter<zetashift> Everyone has those days
03:47:14*Hideki_ quit (Ping timeout: 240 seconds)
03:58:19*muffindrake quit (Ping timeout: 246 seconds)
04:00:45*muffindrake joined #nim
04:21:02*rockcavera quit (Remote host closed the connection)
04:54:46*andinus joined #nim
05:20:40*NimBot joined #nim
05:29:26*rnrwashere joined #nim
05:31:28rayman22201@Benumbed re: endian the stuff. Status has a good package for it: https://github.com/status-im/nim-stew/blob/1c4293b3e754b5ea68a188b60b192801162cd44e/stew/endians2.nim
05:35:29FromDiscord<Benumbed> rayman22201: Oh cool, thanks for the link 🙂
05:37:28FromDiscord<Rika> ah, converting python code that relies heavily on the dynamic typing is such a pain
05:37:41rayman22201NP 👍 Also check out their stream impl https://github.com/status-im/nim-faststreams
05:38:08FromDiscord<Benumbed> Neat
05:40:24*dddddd quit (Ping timeout: 250 seconds)
05:48:43*opal quit (Ping timeout: 240 seconds)
05:51:13*rnrwashere quit (Remote host closed the connection)
05:51:38*rnrwashere joined #nim
05:51:50*opal joined #nim
06:19:02*opal quit (Ping timeout: 240 seconds)
06:19:02*leorize quit (Ping timeout: 240 seconds)
06:20:00*opal joined #nim
06:24:29*leorize joined #nim
06:35:42*rnrwashere quit (Remote host closed the connection)
06:41:58*solitudesf joined #nim
06:47:40*rnrwashere joined #nim
06:52:25*rnrwashere quit (Ping timeout: 264 seconds)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:51*gmpreussner joined #nim
07:17:43*leorize quit (Ping timeout: 240 seconds)
07:18:02*opal quit (Read error: Connection reset by peer)
07:18:14*opal joined #nim
07:28:51*leorize joined #nim
07:44:36*Hideki_ joined #nim
07:48:54*Hideki_ quit (Ping timeout: 240 seconds)
07:51:16FromDiscord<Benumbed> Does anyone not use VSC to edit their Nim code?
07:51:22FromDiscord<Benumbed> If so, what do you use?
07:57:04FromDiscord<Rika> a lot of us use vscode
07:57:11FromDiscord<Rika> many also use vim
07:57:27FromDiscord<Rika> afaik vscode and vim are the most used
07:57:40FromDiscord<Rika> theres another one but i forgot the name
07:57:57FromDiscord<Rika> i havent slept since i last spoke her
07:57:58FromDiscord<Rika> e
08:00:40*natrys joined #nim
08:02:18FromDiscord<Benumbed> You should really go get some sleep @Rika O_O
08:37:31*narimiran joined #nim
08:38:09*jjido joined #nim
08:45:34*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:01:00*jjido joined #nim
09:03:57Araqthe joys of build systems
09:04:15AraqTo build Z3, open a [Visual Studio x64 Command Prompt], then
09:04:15Araqtype 'cd C:\Users\rumpf\projects\z3\build && nmake'
09:04:29Araq... hours later ...
09:04:40Araqshell\datalog_frontend.obj : fatal error LNK1112:
09:05:04Araqnow how do I tell this set of python scripts to build via GCC
09:05:10Araqwho knows...
09:05:33*filcuc joined #nim
09:09:49Araqand why does it take 10_000 lines of Python code to produce a 5000 LOC makefile?
09:11:17*s4mu3lbk joined #nim
09:11:19Araqit's a bunch of C++ files, you compile them, you link them together, just how hard can you make that...
09:32:20*Trustable joined #nim
09:34:13*s4mu3lbk quit (Quit: WeeChat 2.3)
09:47:23*dwdv joined #nim
09:56:15lqdev[m]that's why I use meson. simple to configure, simple to compile with. don't know why anyone would want more than that.
10:02:59*andinus quit (Remote host closed the connection)
10:04:19Araqinterestingly, the bug seems to be unreported
10:07:21*JustASlacker joined #nim
10:08:34*filcuc quit (Ping timeout: 240 seconds)
10:10:44*filcuc joined #nim
10:14:40*filcuc quit (Remote host closed the connection)
10:14:43*andinus joined #nim
10:15:23*couven92 joined #nim
10:16:11*filcuc joined #nim
10:16:14*krux02 joined #nim
10:29:29*zahary joined #nim
10:41:44FromGitter<timotheecour> @araq https://github.com/nim-lang/Nim/pull/13714 is ready for review
10:41:47disbot[WIP] VM callbacks can now raise (and be caught, or show their stacktrace) ; snippet at 12https://play.nim-lang.org/#ix=2ePp
10:59:07FromDiscord<Stuffe> is hot code reloading supposed to be working yet?
11:06:08*tane joined #nim
11:13:05*narimiran quit (Read error: Connection reset by peer)
11:14:50*JustASlacker quit (Ping timeout: 246 seconds)
11:27:55*JustASlacker joined #nim
11:29:15*narimiran joined #nim
11:37:56*JustASlacker quit (Ping timeout: 246 seconds)
11:46:06*Hideki_ joined #nim
11:48:09*zahary quit (Quit: Leaving.)
11:50:14*Hideki_ quit (Ping timeout: 240 seconds)
11:50:23FromDiscord<Varriount> @Stuffe It should
11:53:03FromDiscord<Stuffe> @Varriount I tried following https://nim-lang.org/docs/hcr.html but it complains that "libnimhcr.dylib" doesn't exist. Could it be that it only works on Windows or Linux and not macOS?
11:56:42Araqtests are green on osx too
11:57:01Araqbut you need to do some bananaPATH dancing
11:57:04*lritter joined #nim
11:57:11Araq(forgot the correct terms)
12:02:46Guest84077lqdev[m]: +1 for meson!
12:02:49*Guest84077 is now known as dadada
12:03:39FromDiscord<Stuffe> Araq, hmm I am not wure what that means
12:04:40*dddddd joined #nim
12:07:09*pbb quit (Ping timeout: 272 seconds)
12:07:55*pbb joined #nim
12:10:37*chemist69 quit (Ping timeout: 260 seconds)
12:11:17*chemist69 joined #nim
12:16:54AraqStuffe: --passL:-rpath --passL:@loader_path
12:16:59AraqI'm talking about this one
12:17:27Araqand you might need to set your LD_LIBRARY_PATH
12:19:01*natrys quit (Ping timeout: 250 seconds)
12:19:56*natrys joined #nim
12:24:27FromDiscord<Stuffe> @Araq I just searched my whole system for libnimhcr.dylib but it doesn't seem to exist. Where would I find it?
12:27:50*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:28:30*sagax joined #nim
12:29:52Araq --hotcodereloading:on is supposed to create it
12:33:13*zacharycarter quit (Ping timeout: 264 seconds)
12:33:44FromDiscord<Stuffe> Im trying: nim c -r --hotcodereloading:on --passL:-rpath --passL:@loader_path mymain.nim
12:33:57FromDiscord<Stuffe> And I'm getting: could not load: libnimhcr.dylib
12:34:18FromDiscord<Stuffe> And I searched the whole system, libnimhcr.dylib doesn't seem to exist anywhere
12:36:18jkenAnyone have assimp running in modern nim project? The package in the nimble directory is pretty out of date https://github.com/barcharcraz/nim-assimp
12:36:25*narimiran quit (Quit: leaving)
12:39:30federico3jken: there are no releases tagged on github
12:40:27AraqStuffe: all I can say that I personally used it on Windows and we test all major OSes
12:40:45Araqand I need to go, can investigate on my OSX machine later
12:55:43*filcuc quit (Remote host closed the connection)
12:56:57*filcuc joined #nim
13:05:14*filcuc quit (Ping timeout: 240 seconds)
13:07:56FromDiscord<Spy653> Hi, don't know if I asked the other day but would you guys mind if I asked you to fill out a survey (not now but in general)? I'm doing some research for a personal project of mine
13:09:06FromDiscord<Spy653> tag on reply, if you can, as it's quiet
13:13:34*couven92 quit (Ping timeout: 240 seconds)
13:16:14*JustASlacker joined #nim
13:20:08*Kaivo joined #nim
13:24:23*nixfreak quit (Quit: WeeChat 2.5)
13:28:15*JustASlacker quit (Read error: Connection timed out)
13:28:44*JustASlacker joined #nim
13:31:39*rockcavera joined #nim
13:32:55FromGitter<geotre> @Spy653 sure, what's the project?
13:33:20*sleepyqt joined #nim
13:36:09FromDiscord<Spy653> Rip guess the bot can't tag
13:38:12FromDiscord<Spy653> It's a hardware/software IoT-like solution for people who want more than the currently available shit tier products
13:40:17*Vladar joined #nim
13:40:48*krux02 quit (Remote host closed the connection)
13:40:54*JustASlacker quit (Ping timeout: 240 seconds)
13:41:46*filcuc joined #nim
13:45:53FromDiscord<Spy653> The current IoT market makes you pick between an iMac or a DIY kit, I want to give people something better
13:58:53*jjido joined #nim
14:06:52*zacharycarter joined #nim
14:10:25*filcuc quit (Ping timeout: 264 seconds)
14:11:52*JustASlacker joined #nim
14:17:29*Vladar quit (Quit: Leaving)
14:31:40*zacharycarter quit (Ping timeout: 250 seconds)
14:31:59*PMunch joined #nim
14:37:14*Kaivo quit (Quit: WeeChat 2.7.1)
14:41:07*Hideki_ joined #nim
14:56:31*Hideki_ quit (Remote host closed the connection)
14:57:07*Hideki_ joined #nim
15:01:31*Hideki_ quit (Ping timeout: 250 seconds)
15:04:55*oculuxe joined #nim
15:05:28*vesper11 quit (Read error: Connection reset by peer)
15:06:13*oculux quit (Ping timeout: 264 seconds)
15:07:08*vesper11 joined #nim
15:07:58*Hideki_ joined #nim
15:10:29*Hideki_ quit (Remote host closed the connection)
15:10:46*Hideki_ joined #nim
15:11:39*Hideki_ quit (Remote host closed the connection)
15:11:54*Hideki_ joined #nim
15:13:05*Hideki_ quit (Client Quit)
15:23:37FromDiscord<mratsim> iMac = IoT?
15:23:38*filcuc joined #nim
15:24:39FromDiscord<Spy653> Not literal iMac, figurative
15:26:46FromDiscord<Spy653> Very expensive item that you have very limited control over and is considered a joke by most
15:27:18FromDiscord<Spy653> Good at what it does sure, but still very restrictive
15:34:15FromDiscord<Skaruts> how do you use the keyword `any`?
15:34:48FromDiscord<Skaruts> seen this in python before, but I totally forgot how it works
15:35:17leorizeit's a generic typeclass in Nim
15:35:27leorizebasically: "match everything"
15:37:49*rnrwashere joined #nim
15:38:15FromDiscord<Spy653> Does nim have anything regarding writing strings with wildcard characters or would you just concat a string with variables in it
15:42:28leorizeit depends what you passes the string to
15:42:30*rnrwashere quit (Ping timeout: 256 seconds)
15:42:42leorizebut strings don't care about what data is in it
15:52:34*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:54:54*filcuc quit (Ping timeout: 240 seconds)
15:57:14axionif i do `a[4..7] = [1,2,3,4]` to populate a static array, are there any temporary sequences being allocated on the heap in this process? I'm not very familiar with ranges
16:00:37leorizeno
16:01:10axionno even for [1..4] on the rhs?
16:01:48leorizeof course, you wanted to modify the array directly, why would we make a temporary buffer?
16:01:58leorizehttps://github.com/nim-lang/Nim/blob/version-1-0/lib/system.nim#L4012
16:02:06leorize^ that's the operator doing the copy
16:02:54leorizeoh I misread
16:03:08leorizethe rhs there will be a constant buffer in your program, on the stack
16:03:18axionthat's pretty nice. thanks
16:05:37*lritter quit (Ping timeout: 264 seconds)
16:05:48axionOnly thing I wish for is a syntax for combined slices. like a[1..3,10..12] = [1..6]. maybe i'll have to write a macro for this some day
16:11:06*dddddd_ joined #nim
16:11:31*lritter joined #nim
16:11:58leorizeaxion: is this what you want? :P https://play.nim-lang.org/#ix=2eRW
16:12:20*dddddd quit (Ping timeout: 246 seconds)
16:12:35*dddddd_ is now known as dddddd
16:13:54axionsyntactically, yes. Though, I'd have to check the assembly to see if that's doing what i'd expect
16:14:16axionI'm not very familiar with Nim yet to know if that function call overhead will get folded away
16:18:00disruptek~stream
16:18:01disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
16:18:09disruptekmore obs plugin hacking to add dbus support.
16:28:14axionleorize: actually, no, because it's not symmetrical, but that should be an easy fix.
16:35:12leorizeaxion: yea I can see what you meant, so here's a tip when you implement that: use toOpenArray for copy-less slicing :)
16:49:25*JustASlacker quit (Ping timeout: 264 seconds)
16:49:39disruptekeveryone check this amazing package out:
16:49:53disruptek!repo juancarlospaco/nimbug
16:49:55disbothttps://github.com/juancarlospaco/nimbug -- 9nimbug: 11Nim Semi-Auto Bug Report Tool 15 1⭐ 0🍴
16:50:56leorizenice
16:51:03*arecaceae quit (Remote host closed the connection)
16:51:10disruptekyeah, i love it.
16:51:29*arecaceae joined #nim
16:51:42dadadais juan also in IRC?
16:51:54disruptekhe's on the stream.
16:52:13disrupteki think we came up with this idea yesterday and he already built the tool.
16:52:20dadadanifty
16:55:00dadadasufficiently loud
16:55:36*sleepyqt quit (Ping timeout: 256 seconds)
17:04:03*JustASlacker joined #nim
17:11:08*JustASlacker quit (Ping timeout: 246 seconds)
17:14:20dadadadisruptek: nice music
17:19:11*natrys quit (Ping timeout: 246 seconds)
17:26:05*JustASlacker joined #nim
17:34:51shashlickwhere can i find examples of forward declarations in C headers for types
17:37:47FromGitter<kristianmandrup> @alehander92 I fixed the react code so it can now compile and be used. Still some way to go to make it "fully functional" in a real app though
17:44:34*sleepyqt joined #nim
17:45:59FromDiscord<KingDarBoja> Wow, Latin American power!
17:46:28FromDiscord<KingDarBoja> I got another Python related question
17:46:48FromDiscord<KingDarBoja> Anyone has used Enums on Python like assigning a string value instead of a integer one
17:47:10FromDiscord<KingDarBoja> Can I do the same in Nim? so far looks like no 🤔
17:48:04disruptektype MyEnum = enum Value1 = "firstValue", Value2 = "2ndValue"
17:48:22FromDiscord<KingDarBoja> Oh!
17:48:59FromDiscord<KingDarBoja> From the tutorial part I:
17:48:59FromDiscord<KingDarBoja> > _A variable of an enumeration type can only be assigned one of the enumeration's specified values. These values are a set of ordered symbols. Each symbol is mapped to an integer value internally._
17:49:28FromDiscord<KingDarBoja> I got confused by the mapping part
17:49:41disruptekyes. but what you're doing here is syntactically providing a string constant for the enum.
17:49:52disrupteksuch that $Value1 == "firstValue"
17:50:01disruptekit is otherwise an integer.
17:50:08disruptek^ordinal, rather.
17:50:32FromDiscord<KingDarBoja> Thanks once again!
17:50:43FromDiscord<KingDarBoja> Do you have a GitHub so I can follow u? D:
17:51:28disruptekyep.
17:51:39disruptekor you can watch me code right now.
17:51:40disruptek~stream
17:51:41disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
17:53:08FromDiscord<KingDarBoja> Awesome! _Mr. Robot intensifies_
18:05:47*krux02 joined #nim
18:13:55FromDiscord<KingDarBoja> Another question but related to Nim, how to do a test suite? Like python has pytest (or unittest)
18:15:21FromGitter<zetashift> Nim has unittest
18:15:32FromGitter<zetashift> and you can run your tests with nimble test
18:15:39FromGitter<zetashift> If that is what you mean
18:15:59FromDiscord<KingDarBoja> https://nim-lang.org/docs/unittest.html this one u mean?
18:16:39dadadaKingDarBoja: yes, I'm using it right now, it's simple
18:17:32FromDiscord<Recruit_main707> how can i compile my program so that its 32bit instead of 64?
18:18:02FromDiscord<KingDarBoja> Gonna try it, if any question, I will return, thanks 😄
18:22:31FromGitter<kaushalmodi> Recruit_main707: `nim c --cpu:i386 --passC:-m32 --passL:-m32 foo.nim`
18:22:57FromGitter<kaushalmodi> https://scripter.co/notes/nim/#compiling-in-32-bit-mode
18:23:03PMunchDoesn't --cpu:i386 set the m flags?
18:23:10leorizenope
18:23:46leorizethough we can certainly make it do so
18:24:42PMunchIs there a reason why it doesn't?
18:26:10FromDiscord<KingDarBoja> Ummm having problems to import some module
18:26:53FromDiscord<KingDarBoja> If my dir structure is like:
18:26:53FromDiscord<KingDarBoja> - src
18:26:53FromDiscord<KingDarBoja> -- dirA
18:26:53FromDiscord<KingDarBoja> --- moduleA.nim
18:26:53FromDiscord<KingDarBoja> --- moduleB.nim
18:26:54FromDiscord<KingDarBoja> - test
18:26:54FromDiscord<KingDarBoja> -- some_file.nim
18:27:08FromDiscord<KingDarBoja> I want to import moduleA stuff on some_file inside my test dir
18:36:47leorizeimport dirA / moduleA
18:37:26FromDiscord<KingDarBoja> Without the src part?
18:39:52FromDiscord<KingDarBoja> https://github.com/nim-lang/nimble#tests I added this but without success
18:40:38FromDiscord<KingDarBoja> Nevermind, looks like it is VSCode once again showing errors on save after switching files
18:48:55FromDiscord<KingDarBoja> `Error: invalid module name: .nim` wut? After running nimble test
18:48:59*rnrwashere joined #nim
18:52:21FromDiscord<KingDarBoja> Had to provide whole path to the nim file including the test file name
18:53:06FromDiscord<KingDarBoja> It is possible to run all tests inside the `tests` folder? Or I have to specify each one on my test task?
18:54:04FromDiscord<Recruit_main707> compilation failed, it could be that i call kernel.dll?
18:55:43axionHow would I construct a large array of all zeros in a let binding without specifying all the values?
18:55:44leorize@KingDarBoja: import without the .nim part :P
18:55:57leorizeaxion: use default(T)
18:56:08axionhmm
18:56:59axionI'm not familiar with how to use that
18:57:25leorize!eval let array = default(array[100, int]); echo array
18:57:28NimBot[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
18:58:06axionI see. and if I wanted non-zero I'd have to use algorithm.fill?
18:58:26FromDiscord<KingDarBoja> Arhhh have no idea how to compare a Enum value with a string
18:58:58FromDiscord<KingDarBoja> Like `x = south` (from the tutorial example), want to do `check(x == "south")`
18:59:07FromDiscord<KingDarBoja> But doesn't work (error on the console)
18:59:19leorizeaxion: yea
18:59:26leorizethough it'll look like this instead:
18:59:34disruptek$someEnum == "some string"
18:59:34FromDiscord<KingDarBoja> `Error: type mismatch: got <Direction, string> but expected one of:proc ==[Enum: enum](x, y: Enum): bool`
19:00:06leorizeimport algorithm, sugar; let array = default(array[100, int]).dup(fill(10)); echo array
19:00:14FromDiscord<KingDarBoja> 🤦‍♂️ Ah...
19:00:34leorizeaxion: that snippet requires devel though
19:00:45axionah i have to look up dup
19:00:55FromDiscord<KingDarBoja> What about:
19:00:55FromDiscord<KingDarBoja> > It is possible to run all tests inside the tests folder? Or I have to specify each one on my test task?
19:01:02*rnrwashere quit (Remote host closed the connection)
19:01:03leorizeaxion: https://nim-lang.github.io/Nim/sugar.html#dup.m%2CT%2Cvarargs%5Buntyped%5D
19:01:33axionwhy copy?
19:01:39*rnrwashere joined #nim
19:01:52leorizeaxion: you want to do it all in a let
19:01:59leorizethen that's the best solution :P
19:02:27*ehmry quit (Remote host closed the connection)
19:02:33leorizeor this: let array = (var a: array[100, int]; a.fill(10); a)
19:02:37leorizeworks the same
19:03:07leorizeside effects is that it might confuse beginners
19:03:51*ehmry joined #nim
19:04:45*JustASlacker quit (Ping timeout: 256 seconds)
19:05:09FromDiscord<KingDarBoja> ugh, running `nim c -r tests/somepath/somemodule` generates a .exe file
19:05:56*rnrwashere quit (Ping timeout: 246 seconds)
19:11:49FromDiscord<KingDarBoja> The docs on nimble website are outdated, they still showing `--path` inside`nim.cfg` but it should be `switch("path", "$projectDir/../src")` on `config.nims`
19:13:11leorizenim.cfg is still supported
19:13:23*luis_ joined #nim
19:14:02FromDiscord<KingDarBoja> I mean, the readme points to some `config.nims` as it was changed 8 days ago...
19:14:46leorizeoh lol, then you should PR in an edit to change that
19:16:01FromDiscord<KingDarBoja> Errr I got worng, it was changed at Nov 2019 lol
19:16:07FromDiscord<KingDarBoja> https://github.com/nim-lang/nimble/commit/16ba5db44e0a9132f966a2082012cc3520bfec06
19:17:03federico3koch attempts to git pull / git clone a lot of stuff without asking permission. This should not happen
19:42:58*luis_ quit (Ping timeout: 246 seconds)
19:51:59*luis_ joined #nim
19:58:01*couven92 joined #nim
20:00:34*couven92 quit (Read error: Connection reset by peer)
20:01:15*couven92 joined #nim
20:07:30FromDiscord<Recruit_main707> i get this error when trying to compile to 32bits `cannot find -lmsvcrt`
20:16:38*luis_ quit (Ping timeout: 246 seconds)
20:22:55*rnrwashere joined #nim
20:44:19PMunchSo you're missing the msvcrt library
20:44:37*NimBot joined #nim
20:44:48PMunchProbably a library that you have the 64-bit version of, but not the 32-bit one
20:44:54PMunchRecruit_main707 ^
20:45:07FromDiscord<Recruit_main707> hmmm
20:45:18FromDiscord<Rika> ms visual c runtime
20:45:47FromDiscord<Rika> well, visual c++
20:45:56FromDiscord<Recruit_main707> i guess ill stick to 64bit, thanks both though!
20:51:55*rnrwashere quit (Remote host closed the connection)
20:55:40*rnrwashere joined #nim
20:59:36*andinus quit (Quit: ERC (IRC client for Emacs 26.3))
21:25:39disruptekleorize! this new pragma positioning! argggh!
21:26:42FromDiscord<Rika> what new pragma positioning
21:26:45*rnrwashere quit (Remote host closed the connection)
21:26:50*luis_ joined #nim
21:28:22disruptekin the nvim.nim nim.nvim w/e
21:29:00leorize[m]disruptek: sounds like a bug, do you have a clip about it?
21:29:07disruptekit's on stream if you want.
21:30:08FromDiscord<Rika> what if he doesnt huhhh
21:30:47leorize[m]I'm not watching atm, sorry
21:30:50disruptekkk
21:41:01*rnrwashere joined #nim
21:58:34*solitudesf quit (Ping timeout: 240 seconds)
21:59:41disruptekthere's some kind of bug with pathsubs now.
21:59:59disrupteki don't understand these changes to the default config file handling.
22:08:24FromDiscord<Kenran> I'm trying to do something with the `sdl2` library. While copying the example code, I got "type mismatch: got <Bool32> but expected 'bool'" in `while pollEvent(evt):`. `pollEvent` does indeed return `Bool32`. How can I get out of that?
22:09:13*vesper11 quit (Ping timeout: 250 seconds)
22:10:35FromDiscord<Kenran> Oh, nevermind, I could get rid of the error by changing my `from sdl2 import nil` to `import sdl2` on a hunch. I still don't understand why that fixes it, though. Any hint?
22:11:48*vesper11 joined #nim
22:13:15YardanicoProbably because sdl2 module contains a converter which converts Bool32 to bool automatically
22:13:31Yardanicohttps://github.com/nim-lang/sdl2/blob/master/src/sdl2.nim#L351
22:13:49Yardanicoalso I'd recommend to use https://github.com/Vladar4/sdl2_nim for sdl2 in nim :)
22:15:14*dadada quit (Ping timeout: 240 seconds)
22:18:53FromDiscord<Kenran> thanks, and noted 🙂 I'll try that one tomorrow
22:19:26FromDiscord<Kenran> I have a small problem with not being able to start my executable (can't find `libSDL2.so`), but I'm pretty sure that's coming from NixOS
22:21:08FromGitter<zetashift> does nixos have the sdl2-dev library?
22:21:22Yardanico@Kenran it's probably due to NixOS not following the FHS
22:21:56*dadada joined #nim
22:21:57Yardanicoyou might need to use patchelf on NixOS to run your compiled binaries
22:22:19*dadada is now known as Guest54208
22:24:53*SenasOzys joined #nim
22:30:27*couven92 quit (Read error: Connection reset by peer)
22:32:37*Guest54208 quit (Ping timeout: 264 seconds)
22:36:52*dadada joined #nim
22:37:15*dadada is now known as Guest30874
22:44:22*Guest30874 quit (Ping timeout: 250 seconds)
22:49:29*filcuc joined #nim
22:51:55*dadada__ joined #nim
23:15:31*dadada__ quit (Ping timeout: 250 seconds)
23:17:20*tane quit (Quit: Leaving)
23:19:58*luis_ quit (Ping timeout: 246 seconds)
23:21:54*dadada__ joined #nim
23:24:45*drewr quit (Ping timeout: 240 seconds)
23:25:32*lritter quit (Ping timeout: 250 seconds)
23:40:32*hugh joined #nim
23:44:14*hugh quit (Quit: Leaving)
23:45:28*dadada__ quit (Ping timeout: 250 seconds)
23:46:36*dadada joined #nim
23:46:59*dadada is now known as Guest9949
23:53:14*dwdv quit (Quit: quit)
23:58:55*rnrwashere quit (Remote host closed the connection)