<< 17-06-2017 >>

00:15:00*nsf quit (Quit: WeeChat 1.7.1)
00:27:56*planhths quit (Quit: Konversation terminated!)
00:29:13*onionhammer joined #nim
00:29:55*libman joined #nim
00:30:50*onionhammer1 quit (Ping timeout: 268 seconds)
00:46:51*def-pri-pub joined #nim
00:53:49*Elronnd joined #nim
01:04:52*vlad1777d joined #nim
01:05:54Elronndlooking at nim, and it looks cool
01:06:06FromGitter<zacharycarter> o/ Elronnd
01:06:09ElronndBut, is there a way to use braces instead of spaces for indentation?
01:06:40Elronndif not, then are 4 spaces as indentation enforced, or can I use, say, tabs, or 3 spaces?
01:06:40FromGitter<zacharycarter> I do believe Nim supports brace syntax
01:06:48FromGitter<zacharycarter> 2 spaces are preferred
01:06:54FromGitter<zacharycarter> no tabs
01:07:22libmanElronnd: maybe in the future there'll be a way. See https://forum.nim-lang.org/t/2811
01:08:00*libman abandoned his 20-year tabs habit and switched to 2-spaces because of Nim.
01:09:10libmanhttps://github.com/nim-lang/Nim/wiki/Whitespace-FAQ probably needs to be updated.
01:10:37libmanIt takes X days to form a new habit. (Some studies say X=66, but that doesn't matter.) Forming new habits is an important habit. ;)
01:11:17FromGitter<zacharycarter> I like two spaces I like significant whitespace - I'm a believer
01:11:21FromGitter<zacharycarter> I started with C/C++/Java
01:11:28FromGitter<zacharycarter> you get used to it quickly and appreciate it
01:11:45Elronndidk about that
01:11:49ElronndI used python for a while
01:11:54Elronndstarted with it
01:12:07Elronndthen I went to c and c-like languages and never looked back, although I still use python for scripts
01:13:20FromGitter<zacharycarter> eh braces and parens are needless
01:13:35FromGitter<zacharycarter> get an editor that draws lines where your spaces are like vscode
01:13:40FromGitter<zacharycarter> with the nim extension
01:13:42ElronndD:
01:13:44Elronndvim for lyfe
01:13:48Elronndfuck vscode
01:13:54Elronndlooks like it might be possible to add braces syntax using a skin?
01:14:13FromGitter<zacharycarter> vscode is probably the preferred editor atm for Nim
01:14:26FromGitter<zacharycarter> I know it's electron and everything but it has great support for Nim
01:14:41FromGitter<zacharycarter> I don't think syntax skins are a thing - maybe they are bu tI think braces should just work
01:14:48Elronndidgaf. Vim for lyfe
01:15:20FromGitter<zacharycarter> :P
01:15:34Elronndwhere would I put the { and the } in, for instance, a function declaration?
01:16:10Elronndproc add(a: int, b: int): int = { ... } ? That's an error
01:16:14Elronndgtg sorry
01:17:55*Neomex quit (Quit: Leaving)
01:29:35*vlad1777d quit (Remote host closed the connection)
01:42:17*chemist69_ quit (Ping timeout: 255 seconds)
01:56:19*chemist69 joined #nim
02:02:24*arnetheduck joined #nim
02:07:24*couven92 joined #nim
02:07:38*yglukhov quit (Remote host closed the connection)
02:07:48*couven92 quit (Client Quit)
02:14:43FromGitter<zacharycarter> @Araq @dom96 @Varriount this is an extremely naive question - ponylang has an extremely interesting concept you're all familiar with, and I know this is potentially something that would be introduced to Nim some day, but I'm curious as to one would even approach starting such a task / where the change would need to be implemented
02:32:06*bozaloshtsh quit (Quit: ok)
02:34:33*bozaloshtsh joined #nim
02:34:33*bozaloshtsh quit (Changing host)
02:34:34*bozaloshtsh joined #nim
02:36:59*bozaloshtsh quit (Client Quit)
02:38:18*bozaloshtsh joined #nim
02:38:18*bozaloshtsh quit (Changing host)
02:38:18*bozaloshtsh joined #nim
02:48:39FromGitter<zacharycarter> guessing the gc but not sure
02:50:39FromGitter<Varriount> @zacharycarter What's the concept?
02:51:42FromGitter<zacharycarter> https://tutorial.ponylang.org/capabilities/reference-capabilities.html
02:56:37*yglukhov joined #nim
03:46:29*ftsf joined #nim
04:11:12*yglukhov quit (Remote host closed the connection)
04:21:37*rauss joined #nim
04:23:46*def-pri-pub quit (Quit: leaving)
04:24:14*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:49:18*vlad1777d joined #nim
04:59:08libmanA new competitor emerges - Ante, "the compile-time language" - https://github.com/jfecher/ante
05:00:01libmanMight be some similarities with Nim. Might be some ideas for Nim to copy. ;-)
05:07:59*vlad1777d quit (Ping timeout: 246 seconds)
05:09:51*sleepyqt joined #nim
05:40:25Elronnd> the compile-time language
05:40:33Elronndisn't that niche already filled by "d"?
05:49:51Elronndah; it looks like you can use ( ) in place of { } and stuff will work
05:50:06ElronndBUT it won't make it ignore indentation
06:04:16*sleepyqt quit (Ping timeout: 255 seconds)
06:05:06*sleepyqt joined #nim
06:11:46*yglukhov joined #nim
06:15:48*yglukhov quit (Ping timeout: 240 seconds)
06:15:48*ofelas joined #nim
06:38:24ElronndWOOOHOOO!!
06:38:33Elronndit looks like seed7 is what I've been searching for all these years
06:38:34*Elronnd left #nim (#nim)
06:40:31*vlad1777d joined #nim
06:50:17*Elronnd joined #nim
06:59:26FromGitter<mratsim> @libman Ante seems to be written in C++. How long is the compile-time?
07:01:29FromGitter<mratsim> Some examples really looks like Haskell ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5944d3c8e531dbc905f032a2]
07:06:44*vlad1777d quit (Ping timeout: 268 seconds)
07:18:08*rokups joined #nim
07:25:33*sleepyqt quit (Quit: WeeChat 1.8)
07:40:46*pilne quit (Quit: Quitting!)
07:55:27*bahtiyar joined #nim
08:18:55*Matthias247 joined #nim
08:20:54*yglukhov joined #nim
08:23:34*sleepyqt joined #nim
08:25:36*nsf joined #nim
08:28:53*Vladar joined #nim
08:33:22*bahtiyar quit (Ping timeout: 258 seconds)
08:45:24*Trustable joined #nim
09:02:13*libman quit (Quit: Connection closed for inactivity)
09:11:55AraqElronnd really? ok... :-) I looked at it before starting with Nim iirc
09:12:53Araqit's ugly, does metaprogramming wrong and has a mostly unclear way of doing memory management :-)
09:49:27*yglukhov quit (Remote host closed the connection)
10:02:04*Arrrr joined #nim
10:02:04*Arrrr quit (Changing host)
10:02:04*Arrrr joined #nim
10:02:20*sleepyqt quit (Quit: WeeChat 1.8)
10:22:52*yglukhov joined #nim
10:29:28*Snircle joined #nim
10:34:05*nsf quit (Quit: WeeChat 1.7.1)
10:35:16*Matthias247 quit (Read error: Connection reset by peer)
10:36:16FromGitter<TiberiumN> And seed7 is GPL :) @libman
10:37:47*gokr joined #nim
11:02:55*aziz joined #nim
11:15:05*couven92 joined #nim
11:30:52*yglukhov quit (Remote host closed the connection)
11:44:40*yglukhov joined #nim
11:47:57yglukhovHey guys, check out my new toy: https://github.com/yglukhov/ecs
11:54:16*Neomex joined #nim
11:56:12ftsfyglukhov, cool =)
11:57:09ftsfwhy is it a toy? =)
11:57:34ArrrrEcs are overrated. I'd like to see an event system where everything, from life to attacks, are handled like events
11:57:43*rokups quit (Quit: Connection closed for inactivity)
11:58:33ftsfi implemented an ECS for my 3d engine, but it doesn't look as nice to use as that one, but I find using an ECS quite frustrating.
11:59:25federico3hey ftsf, I just added sounds and music to nimachine. Any hint on dynamically shifting pitch on a audio Chunk in sdl?
11:59:43yglukhovftsf: why is it a toy? because it still has some problems unsolved
11:59:46ftsffederico3, audio chunk, do you mean SDL2_mixer?
11:59:55ftsfyglukhov, which problems?
12:00:29ftsffederico3, if you want to do anything interesting with audio you need to drop SDL2_mixer, which is what I'm planning to do with NICO.
12:00:53yglukhovftsf: well I haven't yet figured how to support massive additions/deletions during system run
12:01:49yglukhovand there's "invariance" question which i still have to answer.
12:02:07yglukhove.g. if you get a pointer to a component, how long will it stay valid.
12:02:16ftsfyglukhov, i'd suggest using an incrementing int for the ID instead of the len()
12:03:08federico3ftsf: drop it? What's the alternative?
12:03:22ftsffederico3, use SDL's audio directly
12:03:32ftsfSDL2 mixer is a crappy toy
12:04:08yglukhovftsf: yeah, i will, thanks
12:05:28yglukhovftsf: why do you find ecs frustrating?
12:08:46ftsfyglukhov, hmm well i'm new to the idea so mainly it's just because it's different i guess. i'm used to thinking about a game from a game level rather than a component level.
12:09:30*yglukhov quit (Remote host closed the connection)
12:11:14*yglukhov joined #nim
12:13:17federico3ftsf: I found only tutorials/docs around the mixer - any pointer?
12:13:45yglukhovftsf: well my ultimate goal is to map rod (https://github.com/yglukhov/rod) scene graph to ecs internally so that the user may still observe and manipulate nodes and components as he would do in OOP style.
12:14:26yglukhovbut i'm yet to see where this will lead to =)
12:15:07ftsffederico3, you need to open an audio device and create an audio callback and return samples to play
12:15:26ftsfhttps://github.com/nim-lang/sdl2/blob/master/examples/sdl_audio_callback.nim
12:16:04yglukhovftsf, federico3: are you guys aware of my sound lib?
12:16:11ftsfyglukhov, nope
12:16:32yglukhovwell it might be of interest then
12:16:41yglukhovhttps://github.com/yglukhov/sound
12:17:45ftsfcool, hmm openal, is that still maintained?
12:18:38yglukhovftsf: why? it's native for mac/ios. and for windows we're using it as well, although the dll has to be installed separately.
12:20:07ftsfahh i thought it kind of died once creative took over
12:20:34ftsfbut i guess it does the job
12:21:09ftsfyglukhov, are you building nim stuff for IOS?
12:21:15yglukhovsure
12:21:20ftsfcool
12:21:25ftsfi'll need to do that at some point
12:23:24ftsfneed to get a mac and ios device though I guess
12:23:59*couven92 quit (Ping timeout: 255 seconds)
12:26:48yglukhovftsf: what audio api should be used on windows?
12:26:54yglukhovdirectsound?
12:27:05ftsfi have no idea about windows.
12:27:24ftsfi just use SDL audio which abstracts it all.
12:27:42federico3it needs nim > 0.16.1 :-/
12:28:55ftsffederico3, what does?
12:29:05ftsfyou should probably move to 0.17?
12:29:45federico3unfortunately 0.17 had a regression around newAsyncSmtp that made me rollback
12:31:46*aziz quit (Remote host closed the connection)
12:33:26*chemist69 quit (Ping timeout: 255 seconds)
12:34:36federico3yglukhov: I've built the docs but I'm not seeing anything related to changing pitch
12:35:13ftsffederico3, yeah it doesn't do that (yet!)
12:35:14*gokr quit (Ping timeout: 255 seconds)
12:35:24yglukhovfederico3: there's no such thing, sorry. only play/stop/gain. basic stuff
12:35:59federico3yglukhov: may I suggest giving it a more specific name than "sound" on Nimble?
12:36:44ftsfi'm planning on making a nim based SDL mixer alternative for use in Nico which will support gain and pitch etc but I haven't finished it yet.
12:37:07yglukhovfederico3: why?
12:37:21yglukhovftsf: do you feel like extending my lib? ;)
12:37:54ftsfyglukhov, hmm prefer to just stick with SDL's audio rather than a large number of backends.
12:38:02*chemist69 joined #nim
12:38:04ftsfwell. SDL + WebAudio
12:38:23federico3yglukhov: "sound" is a very generic name and package names in Nimble are unique...
12:38:36yglukhovftsf: "SDL mixer alternative" sounds like avoiding SDL =)
12:38:50ftsfno it's avoiding SDL mixer (which isn't part of SDL despite the name)
12:39:01yglukhovah, ok
12:39:34yglukhovftsf: but which api do you need. what if I provide you with uniform api for all platforms?
12:39:46yglukhovlike init sound with pcm data, etc.
12:42:01ftsfstreamable and fully loaded audio buffers, pitch, gain, pan control, simple oscillators, filters.
12:42:35yglukhovfederico3: I really don't mind, but lets wait until someone else does a lib which will relate better to "sound" than mine does. besides, I still want to extend my lib to the point when it does everything one would expect from a lib with generic "sound" name :D
12:43:07ftsfyglukhov, i'd suggest "audio" instead of sound
12:43:13ftsfbut too late now =)
12:43:23yglukhovftsf: can SDL_audio do all of that?
12:43:50ftsfyglukhov, SDL_audio does nothing except play back data you send to it
12:44:03ftsfyou just give it a bunch of bytes and it sends it to the soundcard
12:44:36yglukhovso back to the point, you're going to write your lib "SDL_mixer" replacement, on top of SDL_audio, right?
12:44:38yglukhov=)
12:44:41ftsfI have a more complex scenario in nimsynth
12:44:45ftsfyep
12:45:16yglukhovso basically the only api you need is feeding data to the buffer, and playing it.
12:45:16yglukhov=)
12:45:20yglukhovso i can do that
12:45:20ftsfyep
12:45:31ftsfyeah can easily be adapted to other backends
12:46:30yglukhovtrue. so my suggestion is: you don't use SDL_audio at all. use my lib, and then your lib will be 100% nim native, no strings attached.
12:46:32yglukhov=)
12:46:56ftsfhmm but your lib is not nim native, it uses openal right?
12:47:23ftsfi see using your lib as adding another dependency in the chain?
12:47:24yglukhovit uses openal where openal is native
12:47:28yglukhovexcept windows =)
12:47:38yglukhovbut i will take care of that eventually
12:48:13dom96federico3: regression in smtp? Did you report it on Github?
12:48:27yglukhovftsf: by
12:48:45yglukhovftsf: by "another dependency" you mean openal+windows?
12:48:46federico3dom96: I didn't have time to investigate it better - see query tho :)
12:49:23yglukhovftsf: i can't understand your concern
12:49:23ftsfi mean, nico-mixer -> SDL vs nico-mixer -> sound -> openal
12:49:53dom96federico3: Just specify the address/port when calling connect?
12:49:53yglukhovftsf: do you count pure nim dependencies as dependencies?
12:50:04dom96This isn't a regression, although it is a breaking change.
12:50:05ftsfyglukhov, yes
12:51:17federico3dom96: without deprecation pragma? pity
12:52:01yglukhovftsf: ah, so now i get your point. but why? nim is not c++ it has automatic dependency management built into its ecosystem. why would anyone care about any dependencies if they are installed/managed automatically?
12:52:30ftsfyglukhov, because more code and more dependencies is bad. more things to go wrong, to keep in sync, etc.
12:52:57ftsfmy aim is to have only a single dependency for Nico (that being SDL)
12:53:32federico3yglukhov: dependencies never come for free, especially if they require external libs not installed through Nimble (see javascript security disasters)
12:54:08yglukhovftsf: SDL is much uglier as a dependency if you think of it. because as just federico3 noted, it requires "external libs not installed through Nimble".
12:54:54ftsfyes one lib, libSDL (and nim's SDL wrapper). it's otherwise standalone.
12:55:02ftsfand ported to many platforms.
12:55:09yglukhovand my lib has an advantage that it is completely installed through nimble, with no external libs. (openal for windows requirement is an exception for now)
12:55:12federico3yglukhov: I'm not getting your point: many games would still need SDL anywmays
12:55:28federico3yglukhov: don't you also need openal on Linux?
12:55:52yglukhovnope, its already there most of the time i guess.
12:56:23federico3this still counts as a dependency :)
12:58:32ftsfyglukhov, anyway, it would be possible to back your lib on to SDL audio as well, but my desired external facing API is different to yours.
12:59:20yglukhovfederico3, ftsf: i'm doing a game in nim. it is almost 100% in nim. of _external_ (out of nim ecosystem) it uses libcrypto (android, ios, windows), libSDL (android, ios, mac, windows, linux), libopenal (windows). and from my experience, it is a pita to make a uniform build process for all of those. because of... wait for it... sdl!
13:00:44yglukhovso currently there's ongoing effort to make nimx completely independent for android, mac/ios, and windows, which is almost done.
13:00:44ftsfhmm, i have no trouble deploying from linux -> linux64/32,windows64/32 and osx with SDL, it's all quite painless (except for the osx cross compiling stuff but that's nothing to do with SDL).
13:01:37ftsfyou could drop the openal dependency and just use SDL audio since you're already depending on libSDL?
13:02:16yglukhovftsf: like i said, thats not for long. sdl dependency will be dropped as well.
13:02:58dom96in what way is SDL a PITA for your build process?
13:05:04yglukhovwell, you have to build it in the first place. for ios and android. then for android you have to put into the gradle build folder, then you have to configure gradle/Android.mk to include it.
13:06:24yglukhovall i'm saying that with an "extra" 50 nim lib dependencies, i would do completely nothing to integrade them. add to nimble file, done. every "foreign ecosystem" dependency requires custom steps to integrate it.
13:07:16yglukhovso i prefer 50 pure nim dependencies over single foreign dependency
13:08:04yglukhovexecutable size benefits a lot from that too.
13:08:16ftsfyglukhov, just distribute the SDL.dll/so binary with your app?
13:10:14yglukhovftsf. - hey guys, my car is broken, help me fix it. - just use the bus. =)
13:11:23yglukhovyeah, thats what i'm doing right now. using the bus (sdl), but i hope that my car will soon be fixed (no need to use sdl).
13:12:06demi-that would mean someone taking on the burden of maintaining those libraries vs something that is known to be compatible?
13:13:41federico3I wish I could easily build stuff for android
13:14:48demi-nothing is easily built for android, especially when it involves the NDK
13:15:43yglukhovclone nimx, nake droid
13:16:22yglukhovyeah, install jdk/sdk/ndk/sdk too
13:17:38ftsfdemi-, sdl2 android was a pleasant process until android-studio which removed support for ant builds. so i'm currently using the old android sdk tools.
13:18:38demi-mmm, my job is build systems; so i'm intimately familiar with how awful things are :)
13:21:20federico3demi-: and they are not getting better :(
13:21:57demi-they really aren't
13:26:13FromGitter<zacharycarter> ECS = shit
13:26:15FromGitter<zacharycarter> btw
13:26:18FromGitter<zacharycarter> just my opinion
13:26:22demi-lol
13:26:29FromGitter<TiberiumN> Hmm, trying to cast int to set of enum values fails: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Should output {Key1, Key2}, but outputs "{Mouse1, Mouse2, 3 (invalid data!), 4 (invalid data!)}" instead [https://gitter.im/nim-lang/Nim?at=59452e04f31c8ced0c4596ff]
13:27:36FromGitter<zacharycarter> you can abstract away the android building difficulties with docker
13:27:41FromGitter<zacharycarter> for end users anyway
13:28:11demi-yeah but that doesn't really solve some of the bad problems with gradle's design
13:28:30FromGitter<TiberiumN> ah, probably my fault again :)
13:28:51FromGitter<TiberiumN> it shouldn't be int, but should be cint instead
13:28:59FromGitter<zacharycarter> gradle also = shit
13:29:04demi-haha, indeed
13:29:48FromGitter<zacharycarter> my horde3d port is going well and so far I've been able to keep a bgfx backend separate from the opengl one
13:30:25FromGitter<TiberiumN> oh wait, it doesn't work :(
13:30:43FromGitter<zacharycarter> it's going to be very interesting to try to fit both APIs into this project since one is declarative and the other is not
13:32:05*xet7 joined #nim
13:32:34*couven92 joined #nim
13:36:21FromGitter<TiberiumN> ok, maybe I need to describe my problem: ⏎ I have integer, which is "Bitwise combination of keys/mouse buttons pressed (M1 = 1, M2 = 2, K1 = 5, K2 = 10)" ⏎ and I want to convert it to set of enum values. Can I do this?
13:36:39FromGitter<TiberiumN> so 15 would be {K1, K2}
13:36:51FromGitter<zacharycarter> sounds like you need a converter maybe?
13:39:20FromGitter<zacharycarter> @krux02 what's going on with glm my man? Looks like stavenko's repo got some love recently. Is it still advisable to use your fork? I'd like the most complete / correct port
13:42:40*pilne joined #nim
13:46:32*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:46:59yglukhovzacharycarter: why ecs = shit?
13:49:59FromGitter<zacharycarter> type ⏎ KeyboardModifier* = enum ⏎ ⏎ ```modAlt = 0, modControl = 1, modShift = 2, modNoRepeat = 14``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=59453387f31c8ced0c45a961]
13:50:05FromGitter<zacharycarter> @TiberiumN
13:50:23FromGitter<zacharycarter> remember to account for this - The compiler transforms val to 1 shl val for set so your enum needs to reflect that.
13:51:01FromGitter<zacharycarter> @yglukhov it's an abstraction that doesn't provide much benefit and in my experience tends to lead to more confusing code than if the code was written without an ECS
13:51:21FromGitter<zacharycarter> I've seen some interesting ECS projects though - but the fundamental pattern doesn't jive with me, this is all personal opinion though
13:51:38yglukhovzacharycarter: what is your favorite then?
13:53:21ftsfzacharycarter, i'm finding the same
13:53:45ftsfit makes each system nice and tidy, but then you find that tidy systems aren't what you want, that just gets in the way. i
13:53:58ftsfi'm sure it's great if you're making generic things for others to use
13:54:08ftsfbut if you want to make a game it's a real pain
13:54:27ftsfsame reason why hard oop tends to suck.
13:55:03FromGitter<zacharycarter> @yglukhov I try to use all sorts of patterns when writing games but I don't try to be as dogmatic as an ECS wants you to be
13:55:25FromGitter<zacharycarter> I tend to lean on - http://gameprogrammingpatterns.com/ when I'm struggling on how to design a certain system or component in my game
13:55:58FromGitter<zacharycarter> he goes over entities and components in that book but he even makes a side comment that ECS's take this decoupling to the extreme
13:56:20FromGitter<zacharycarter> that's my problem with ECS's they impose extremely rigid and often dogmatic design choices about how you structure your game
13:56:26yglukhovzacharycarter: cool, thanks, i have a look
13:56:47FromGitter<zacharycarter> but these design choices don't necessarily lead to cleaner code and can often lead towards event / callback hell when the whole design doesn't suit your needs
13:57:05FromGitter<zacharycarter> I struggled with this especially when writing roguelikes and having to handle things like priority of actions between entities in my game
13:58:19FromGitter<zacharycarter> also @yglukhov - last few paragraphs in this article contain a blurb on ECS's: http://www.randygaul.net/2017/02/24/writing-a-game-engine-in-2017/
13:58:57yglukhovzacharycarter: well as I understand it, ECS doesn't imply that you build different layers of the game in a single ECS. E.g. some core ECS could handle rendering/animation/physics, while some particle emitter could be a completely separate ecs. smth like that.
13:59:47FromGitter<zacharycarter> this is true you can introduce the ecs at whatever level of your game code you'd like to
14:00:46FromGitter<zacharycarter> @yglukhov you're going to probably find as many people that like ECS's vs those who don't so if it's useful for you - I'd use it
14:01:06FromGitter<zacharycarter> and it's not like you're forcing anyone to use the ECS you've built it's there as an option as long as it's not tightly coupled to anything I don't think you time has been wasted by building one
14:01:53FromGitter<zacharycarter> I just personally won't be using yours or anyone else's or even my own :P
14:02:12FromGitter<zacharycarter> this one is curious though - https://github.com/slide-rs/specs
14:03:16yglukhovzacharycarter: thanks, i'm new to ecs, and just playing around with its concepts. still a huge amount of questions. so any decent reads/watches (no more "introduction to ecs" please) are welcome =)
14:03:38FromGitter<zacharycarter> If I come across anything interesting I'll definitely toss it your way
14:03:48ftsflikewise
14:03:59FromGitter<zacharycarter> so who is going to port something like - https://github.com/munificent/wren to Nim?
14:04:03FromGitter<zacharycarter> or finish the Nim VM?
14:04:15FromGitter<zacharycarter> :D
14:04:53FromGitter<zacharycarter> maybe once I finish the Horde3d port...
14:24:19yglukhovzacharycarter: this https://github.com/slide-rs/specs looks a whole lot like my sample: https://github.com/yglukhov/ecs
14:25:28yglukhovexcept my ecs doesnt do parallelism yet :)
14:25:37FromGitter<zacharycarter> yeah that's the one big draw of specs I think
14:25:44FromGitter<zacharycarter> being able to do all that in parallel
14:25:54FromGitter<zacharycarter> either way your ecs looks very clean thus far
14:30:07ftsfyeah nice to do it in templates
14:30:14ftsfmine was all on refs and runtime stuff
14:30:32ftsfyours looks much more efficient
14:34:24*nsf joined #nim
14:48:03FromGitter<TiberiumN> @zacharycarter but I can't use custom values since values are "M1 = 1, M2 = 2, K1 = 5, K2 = 10"
14:48:42FromGitter<TiberiumN> I don't know how can I really can convert 15 (for example) to K1 and K1
14:49:31FromGitter<TiberiumN> case with 4 "of" statements?
14:50:19FromGitter<TiberiumN> or ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=594541ab02c480e6725304a2]
14:50:40FromGitter<zacharycarter> sounds ugly
14:50:53FromGitter<TiberiumN> I can think only of something like this ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=594541cdf31c8ced0c45dca3]
14:51:28FromGitter<TiberiumN> ah, I can't add to set
14:52:22FromGitter<TiberiumN> oh, this will fail
14:52:39FromGitter<TiberiumN> I meant if statements
14:53:01FromGitter<TiberiumN> like "if buttons and 1: ... ⏎ if buttons and 2: ..."
14:55:14*rxi joined #nim
14:56:13*bahtiyar joined #nim
14:56:41rxihey, I had a question about packaging a library for nimble
14:58:14FromGitter<TiberiumN> You can ask here, 100% you will get an answer :)
14:58:21FromGitter<TiberiumN> almost 100%
14:58:41*gokr joined #nim
14:58:56FromGitter<zacharycarter> I don't know @TiberiumN I'm struggling atm myself with using Enums as flags
15:03:42rxiI wanted to wrap my mixer library ( https://github.com/rxi/cmixer ) -- the library itself doesn't depend on anything (writing its output to a int16 buffer), but I would also want to provide support for using it with SDL2. I was thinking I have 2 packages, cmixer and cmixer-sdl2, the latter depending on the former, but I didn't know if that would be too excessive
15:04:15dom96TiberiumN: You can 'incl' into a set.
15:04:35*gokr quit (Ping timeout: 240 seconds)
15:05:30dom96rxi: Feel free to do that, but you will need to name your second package cmixer_sdl2
15:05:33dom96no dashes allowed
15:07:38rxidom96: aces, I was also wondering if its ok to cast a string/seq to `ref RootObj` and store it so it can be passed to gc_ref/gc_unref
15:08:05*xet7 quit (Ping timeout: 240 seconds)
15:08:08FromGitter<TiberiumN> dom96: do I need to resolve conflicts here? ⏎ https://github.com/nim-lang/packages/pull/523
15:08:29dom96rxi: I think you can just gc_ref a string/seq, no?
15:09:11dom96TiberiumN: Would help out, but isn't required.
15:11:54rxidom96: aye, my library wrapper support several different types for the audio data to be passed to it (eg string, seq) and wanted to just store it in one field internally instead of having a separate field for every type the data might be
15:12:45dom96Not sure, sounds risky though :)
15:15:37rxilike it seems to be working but I don't know if that's just luck and the internals of nim will change and it'll break :D
15:22:24FromGitter<TiberiumN> rxi: you can also use object variants (maybe, I'm not sure)
15:24:52*codeiter joined #nim
15:28:19*codeiter left #nim ("Leaving")
15:28:43yglukhovrxi: all refs (strings, seqs, ref object, ref int, etc) are safe to cast to each other for use with GC_ref/GC_unref
15:31:02rxiyglukhov: nice -- so its ok to keep doing what I'm doing. Thanks for the help everyone
15:34:44*gsingh93 quit (Ping timeout: 260 seconds)
15:35:28yglukhovdom96: is {.async.} supposed to work with do lambdas?
15:35:40dom96never tested it
15:36:08dom96Also the future of the 'do' notation is sketchy
15:36:53*gsingh93 joined #nim
15:41:28yglukhovwhat kind of "sketchy"? =)
15:43:05captainkraftWhen I'm using sdl2.nim, I'm getting the warning "expr is depracated" What is the correct way to remove expr but keep the same functionality?
15:46:17yglukhovcaptainkraft: untyped
15:47:00captainkraftThat simple eh? Thanks
15:49:34Arrrrroughly speaking, expr -> typed, stmt -> untyped. But not always
15:59:57dom96yglukhov: It may be deprecated
16:00:51*Matthias247 joined #nim
16:01:10yglukhovdom96: at this point I'm not sure about it... deprecated because there's something more useful?
16:02:14dom96deprecated because it doesn't fit the language, but this is not 100% yet of course. That said, I personally dislike it and Araq does too AFAIK.
16:06:02captainkraftIs there a way to pass an empty array to a constructor? eg Thing(arr: [])
16:06:38yglukhovwell i guess it could be replaced with "proc" keyword somehow...
16:07:16ArrrrThe array will be empty by default anyway
16:08:08captainkraftI see
16:08:59ArrrrBut i think there is no sintaxis for 'empty array'. You could declare one with `var arr: TypeOfArray`, which by default will be empty
16:09:24captainkraftIn sdl2.nim, there is a ``let defaultEvent* = Event(kind: QuitEvent)`` and when you ``var evt = defaultEvent`` in your code using sdl2.nim, you get the warning ``Cannot prove that evt is initialized.``
16:09:32Arrrr*syntax
16:09:44captainkraftI'm not sure how to fix this or why it is a warning when it is obviously initialized.
16:09:59captainkraftEvent is only the kind and padding which is an array
16:10:49ArrrrThe message is a bit broken, sometimes you get it even when there is little you can do. I wouldn't bother for now.
16:11:19ArrrrNim is in development, hence some of the things are still in a rough shape
16:12:27captainkraftOK, thanks
16:15:59dom96captainkraft: Agreed with what Arrrr said, but one thing to add. When you run into something like this please ask about it on Nim's issue tracker or on the forum.
16:16:18dom96Essentially just make sure it's seen to by Araq especially.
16:17:00dom96I ran into similar issues with this init warning. It is something that has a chance of becoming worse, especially if Araq is not made aware of these issues.
16:17:10*arnetheduck quit (Ping timeout: 255 seconds)
16:17:18dom96Although I'm sure he will be able to tell you how to fix it properly :)
16:22:23captainkraftdom96: there is an issue on the sdl2.nim github. Is that sufficient, or should I check the issue tracker as well?
16:29:19*Arrrr quit (Ping timeout: 246 seconds)
16:30:56*WhiskyRyan joined #nim
17:05:27*bahtiyar quit (Ping timeout: 240 seconds)
17:07:31FromGitter<TiberiumN> dom96: ⏎ Is this my issue or compiler issue? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=594561d302c480e672537906]
17:34:57*Arrrr joined #nim
17:34:57*Arrrr quit (Changing host)
17:34:57*Arrrr joined #nim
17:36:27ArrrrI don't understand encodings. If i have a string "çç" and i want to convert it to utf-8, what is the the string's default encoding?
17:38:18*Jesin quit (Quit: Leaving)
17:39:08*chemist69 quit (Ping timeout: 240 seconds)
17:41:36*chemist69 joined #nim
17:42:24*Jesin joined #nim
17:47:27*couven92 quit (Ping timeout: 240 seconds)
17:52:42ArrrrNevermind ... i wasn't aware that i had some files that weren't utf-8, what a pain
17:58:47FromGitter<konqoro> Hey I am trying to build a package but I get .nimble/pkgs/compiler-0.17.1/compiler/commands.nim(60, 16) Error: cannot open '../doc/basicopt.txt' ⏎ what to do?
17:59:44*NimBot joined #nim
18:18:16*xet7 joined #nim
18:21:07*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:26:07*smt joined #nim
18:28:07ArrrrMaybe report it to nimble
18:45:15FromGitter<TiberiumN> dom96: I have an error while using choosenim
18:45:37FromGitter<TiberiumN> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=594578d1e531dbc905f281ef]
18:47:04FromGitter<TiberiumN> on windows
18:48:50*Syneh_ quit (*.net *.split)
18:48:51*subsetpark quit (*.net *.split)
18:48:51*qwertfisch quit (*.net *.split)
18:48:51*huonw_ quit (*.net *.split)
18:48:51*jmkr quit (*.net *.split)
18:49:03*qwertfisch joined #nim
18:49:06*huonw joined #nim
18:49:06*jmkr joined #nim
18:49:25*Syneh_ joined #nim
18:50:12*subsetpark joined #nim
18:53:23dom96konqoro: how did you install Nimble?
18:53:58dom96TiberiumN: D:
18:54:02FromGitter<TiberiumN> dom96: ah, I know the cause of this problem
18:54:15FromGitter<TiberiumN> VSCode vas open, and probably used nimsuggest.exe executable from nim-devel folder
18:54:43dom96TiberiumN: Ahh, the error could be better though. Please report it.
18:59:04FromGitter<TiberiumN> dom96: https://github.com/dom96/choosenim/issues/21
18:59:40dom96thanks!
19:01:26*couven92 joined #nim
19:02:48*libman joined #nim
19:07:39FromGitter<TiberiumN> dom96: also - can I build Nim with Visual Studio Compiler?
19:07:55FromGitter<barcharcraz> yes you can
19:08:04FromGitter<TiberiumN> ok then
19:08:06FromGitter<barcharcraz> you can't use the bootstrap script though
19:08:20FromGitter<barcharcraz> I'd just get a precompiled nim.exe and use that to bootstrap
19:08:43FromGitter<TiberiumN> mostly it doesn't matter anyway, since I compile nim compiler only once and then use cc = vcc in config
19:08:46FromGitter<TiberiumN> in global config
19:09:01FromGitter<TiberiumN> It's awesome that Nim supports different compilers
19:09:06FromGitter<barcharcraz> once you've done that once you can re compile the compiler with vcc
19:09:08FromGitter<TiberiumN> clang/gcc/vcc
19:09:12FromGitter<barcharcraz> and icc!
19:09:23FromGitter<abijahm> guys i cannot use mysql due to libmysql.dll missing i am using 64 bit nim version 0.17
19:09:37FromGitter<barcharcraz> you are gunna need libmysql
19:09:46FromGitter<barcharcraz> it's probably part of the mysql distribution
19:10:07FromGitter<TiberiumN> ah, icc too
19:10:14FromGitter<TiberiumN> but icc is compatilbe with gcc anyways
19:10:22FromGitter<barcharcraz> icc is also compatible with vcc
19:10:27FromGitter<barcharcraz> much like clang
19:10:37FromGitter<TiberiumN> yes :)
19:10:43FromGitter<TiberiumN> not fully though
19:10:52FromGitter<barcharcraz> icc is fully compatible
19:11:02FromGitter<barcharcraz> clang kinda is but you need to link with link.exe afaik
19:11:21FromGitter<barcharcraz> llvm's linker is not really that stable yet
19:11:44FromGitter<TiberiumN> ah, I used wrong way to run icl :)
19:11:52FromGitter<TiberiumN> I used it AS vcc executable, LOL
19:11:55FromGitter<TiberiumN> and it still worked
19:12:22FromGitter<TiberiumN> like "--vcc.exe:icl --vcc.linkerexe:icl"
19:12:27FromGitter<TiberiumN> and it worked somehow
19:12:38FromGitter<barcharcraz> --cc:icc should work as well
19:13:01FromGitter<TiberiumN> ```E:\Projects\OsuReplay>nim c --cc:icc src/osureplay ⏎ Error: unknown C compiler: 'icc'``` [https://gitter.im/nim-lang/Nim?at=59457f3cf31c8ced0c46b504]
19:13:09FromGitter<TiberiumN> I know what on Linux icc works
19:13:13FromGitter<TiberiumN> but i'm on windows :)
19:13:18FromGitter<barcharcraz> try cc:icl
19:13:19FromGitter<barcharcraz> idk
19:13:22FromGitter<TiberiumN> yes, it works
19:13:23FromGitter<barcharcraz> I used to use icc on windows
19:13:32FromGitter<TiberiumN> icl works for me
19:14:36*nsf quit (Quit: WeeChat 1.7.1)
19:15:04FromGitter<abijahm> yah i have mysql installed do i have to move the dll
19:15:12FromGitter<barcharcraz> yeah prolly
19:15:13FromGitter<abijahm> to somewhere
19:15:29FromGitter<barcharcraz> somewhere in your path or next to the exe you're running
19:26:06*vlad1777d joined #nim
19:39:02FromGitter<abijahm> still dont work but sqlite3 works mysql and postgresql dont work due to missing dlls
19:41:49FromGitter<TiberiumN> dom96: another question - how can I name binary files differently depending on platform?
19:42:05FromGitter<TiberiumN> I currently have bin = @["osureader.exe"] in my .nimble file
19:42:16FromGitter<TiberiumN> can I use "when defined(windows): ..." in nimble file?
19:44:08*chemist69 quit (Ping timeout: 240 seconds)
19:48:47*chemist69 joined #nim
20:02:03dom96TiberiumN: `bin` isn't for naming binaries, it's for specifying the nim files that should be built.
20:02:31FromGitter<konqoro> @dom96 I installed nimble through the nim-git AUR package
20:02:58dom96konqoro: that could be the problem, try installing via choosenim
20:03:09FromGitter<konqoro> ok
20:03:20FromGitter<TiberiumN> dom96: ah, thanks :)
20:05:55*Arrrr quit (Disconnected by services)
20:05:55*Arrrr1 joined #nim
20:06:02*Arrrr1 quit (Client Quit)
20:11:20*dexterk_ quit (Ping timeout: 246 seconds)
20:11:34*dexterk_ joined #nim
20:16:36*dexterk_ quit (Remote host closed the connection)
20:19:19*dexterk_ joined #nim
20:19:30*gokr joined #nim
20:23:22*dexterk_ quit (Remote host closed the connection)
20:23:47*dexterk_ joined #nim
20:50:52*ofelas quit (Remote host closed the connection)
20:55:30*PMunch joined #nim
20:55:36libmanhttps://www.reddit.com/r/gamedev/comments/6hvpna/lets_make_a_game_in_nim_part_1_84_min_video/
20:59:28*Vladar quit (Quit: Leaving)
21:03:54*rxi quit (Quit: Leaving)
21:04:44PMunchOoh interesting libman
21:06:58*yglukhov quit (Remote host closed the connection)
21:07:30*ipjk joined #nim
21:08:22FromGitter<zacharycarter> so dom96: nimble compiles / runs nimscript at runtime right
21:08:40FromGitter<zacharycarter> ala https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim ?
21:10:01*WhiskyRyan joined #nim
21:21:49dom96zacharycarter: yep
21:22:02dom96It evaluates the .nimble file at runtime
21:22:22*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:23:07FromGitter<zacharycarter> hrm
21:23:17FromGitter<zacharycarter> sweet thank you
21:23:20*rauss quit (Quit: WeeChat 1.8)
21:23:37FromGitter<zacharycarter> I want to do the same for game scripting
21:24:02dom96That'd be cool
21:24:23FromGitter<zacharycarter> So what we want to do as a community is expand upon Nimscript right?
21:24:37FromGitter<zacharycarter> I've been looking at languages like https://github.com/munificent/wren
21:25:21FromGitter<zacharycarter> and people have talked about writing a scripting language / interpreter for Nim before, but the NimVM / NimScript is already the foundation for all of this right?
21:25:27FromGitter<zacharycarter> I want to make sure I'm not conflating ideas here
21:27:00*couven92 quit (Read error: Connection reset by peer)
21:28:03*yglukhov joined #nim
21:31:08*yglukhov quit (Remote host closed the connection)
21:31:23*yglukhov joined #nim
21:34:08*WhiskyRyan joined #nim
21:40:34dom96zacharycarter: yep
21:41:12dom96I'd really love to see FFI support in Nimscript, but even Araq tried that at one point and decided it was too much work.
21:44:26FromGitter<zacharycarter> hrm
21:44:52FromGitter<zacharycarter> I'll play around with the idea once I finish this horde3d port, hoping to wrap most of it up by the end of this weekend
21:45:35dom96what ever happened to the playground supporting gists or the ability to pass code in the URL?
21:46:14FromGitter<zacharycarter> I just haven't gotten around to working on that project, the game stuff has held my interest more
21:46:27FromGitter<zacharycarter> it'd probably just take a day or so to implement though
21:46:55FromGitter<zacharycarter> alright I'll work on that after the horde3d port and then figure out game scripting
21:51:58*chemist69 quit (Ping timeout: 255 seconds)
21:53:55FromGitter<TiberiumN> wow: I get 300ms speedup on parsing one game replay 125 times with intel compiler ⏎ (0.6s with intel compiler vs 0.9s with visual studio compiler)
21:54:18FromGitter<TiberiumN> with -d:release and "/arch:SSE4.1 /Qparallel" for intel compiler
21:54:46FromGitter<TiberiumN> Anyway, at least I did something good for Nim - https://github.com/nim-lang/Nim/pull/5996 :)
21:56:41*chemist69 joined #nim
21:57:34*Trustable quit (Remote host closed the connection)
21:57:37*yglukhov quit (Remote host closed the connection)
22:08:48*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:15:56dom96zacaharycarter: no worries, I can always create a PR later if you don't have the time to work on it :)
22:17:30dom96TiberiumN: Nice, thanks!
22:18:06dom96TiberiumN: But you need to do it against the devel branch
22:26:54*vivus joined #nim
22:27:00dom96Damn, judging by the amount of PRs/Issues, Nim is getting more popular.
22:27:16dom96I should say, not amount but frequency of creationg
22:27:21dom96*creation
22:37:10FromGitter<zacharycarter> RDISamplerState* = enum ⏎ ⏎ ```SS_ADDRU_CLAMP = 0x0 ⏎ SS_ANISO1 = SS_ADDRU_CLAMP``` [https://gitter.im/nim-lang/Nim?at=5945af1631f589c64fb976b0]
22:37:11FromGitter<zacharycarter> what is up with enum order
22:37:19FromGitter<zacharycarter> no matter how I arrange these enum members, I get invalid order
22:42:27FromGitter<zacharycarter> ah I think I get it
22:46:17*gokr quit (Quit: Leaving.)
23:02:58*nsf joined #nim
23:09:09FromGitter<zacharycarter> anyone have any idea how to deal with
23:09:30FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5945b6aae531dbc905f358bc]
23:09:57FromGitter<zacharycarter> not sure how to deal with that inner anonymous struct
23:10:46FromGitter<zacharycarter> I realize there's the {.union.} pragma
23:11:11FromGitter<zacharycarter> but I'm not sure if that will help me here
23:22:47dom96feed it through c2nim
23:24:05FromGitter<zacharycarter> tried that
23:25:43*PMunch quit (Quit: leaving)
23:25:56FromGitter<zacharycarter> weird
23:26:09FromGitter<zacharycarter> for some reason c2nim wasn't overwriting my file maybe because I had it open doh
23:27:36FromGitter<zacharycarter> thanks @dom96
23:38:05*nsf quit (Quit: WeeChat 1.7.1)
23:58:09*yglukhov joined #nim