<< 16-04-2017 >>

00:12:50*bjz joined #nim
00:28:49*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:28:53*arnetheduck joined #nim
01:03:48*bjz joined #nim
01:04:22*bjz quit (Client Quit)
01:39:31*devted quit (Quit: Sleeping.)
01:41:47*Nobabs27 joined #nim
01:53:21*chemist69 quit (Ping timeout: 252 seconds)
01:58:58*babs_ joined #nim
02:01:36*Nobabs27 quit (Ping timeout: 252 seconds)
02:07:02*chemist69 joined #nim
02:35:52*vlad1777d quit (Remote host closed the connection)
02:54:24*gokr quit (Ping timeout: 240 seconds)
02:59:52*xmonader2 quit (Ping timeout: 240 seconds)
03:00:21*fastrom joined #nim
03:09:27*babs__ joined #nim
03:12:13*babs_ quit (Ping timeout: 258 seconds)
03:12:15*Nobabs27 joined #nim
03:13:33*cspar joined #nim
03:14:41*babs__ quit (Ping timeout: 260 seconds)
03:20:29*babs_ joined #nim
03:23:05*Nobabs27 quit (Ping timeout: 260 seconds)
03:44:02*shashlick quit (Ping timeout: 240 seconds)
03:44:44*shashlick joined #nim
03:49:12*babs_ quit (Quit: Leaving)
03:49:38*babs_ joined #nim
04:36:32*babs_ quit (Quit: Leaving)
04:37:42*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:41:57zachcarterhttp://imgur.com/a/BBIfb
04:42:01zachcarterletterboxing working well
04:54:57*gokr joined #nim
04:56:25*gokr quit (Client Quit)
04:58:30*bjz joined #nim
05:18:25zachcarterjust need invaderz now
05:18:26zachcarterhttp://imgur.com/a/uTjQZ
05:52:52FromGitter<Varriount> zachcarter: might want to scale down that ship in the main game screen. The size relative to the bullets and blocks makes it seem huge.
05:53:13zachcarterokay
05:53:35zachcartergood call you’re right
06:16:40zachcarterVarriount: down scaling means I need mipmaps now :P
06:16:48zachcarternot quite sure how to generate them with bgfx
06:17:22FromGitter<Varriount> What's normally done - generating mipmaps beforehand, or at runtime?
06:18:03zachcarterin my experience they’re created at runtime when you create the opengl texture
06:18:07zachcarterbut I know they can also be created offline
06:19:08FromGitter<Varriount> Would creating them beforehand have any benefit?
06:19:33zachcarternot sure, I need to do more research I think
06:19:35zachcarterthese are good questions though
06:30:06*xmonader2 joined #nim
06:52:18*rokups joined #nim
07:07:53shashlickcan I return an object that I instantiate in a proc to the caller as a return value?
07:26:03FromGitter<Varriount> Shashlick: Yes. What sensible language doesn't allow that?
07:26:29shashlickwell I was doing that and was segfaulting
07:27:30shashlickworking with a dll, send the addr to that data structure to the dll, it comes back fine
07:27:35shashlicki read and use it no issue
07:27:58shashlickbut if i return it back as part of a tuple return, i was segfaulting at the caller line
07:28:17FromGitter<Varriount> Shashlick: Code?
07:28:19shashlickillegal storage access
07:30:06FromGitter<Varriount> I mean, post your code. Memory access problems can be caused by anything.
07:31:42shashlickhttps://pastebin.com/HEtwe2L1
07:36:04shashlicki'm specifically talking about the rinfo variable in find_mic()
07:36:37shashlickif I return that as a 3rd return value in the tuple, program crashes on line 101
07:40:16shashlickeven without that, i'm still crashing once RecordStart() is called, there's something fundamentally wrong, i don't have a stack trace anymore
08:04:55shashlickhttps://forum.nim-lang.org/t/2572 <= I'm seeing the same issue as LeuGim at the bottom
08:04:56*Vladar joined #nim
08:13:11FromGitter<Varriount> Hm
08:13:34FromGitter<Varriount> If there's no traceback, the crash is probably happening inside the library
08:14:28*xet7 joined #nim
08:16:23FromGitter<Varriount> sashlick: You're using 'bass.h' as the file your translating?
08:19:42*Arrrr joined #nim
08:20:06FromGitter<Varriount> sashlick: You there?
08:26:55shashlicksorry, didn't see this
08:27:17shashlickno bass.h isn't handled well by c2nim
08:27:52shashlicki just manually wrote the procs i needed
08:27:55shashlickin the same pastebin
08:30:07FromGitter<Varriount> Hm
08:31:00FromGitter<Varriount> I'm trying to think what bug could be caused on return from a procedure, and the only thing I think of is that a procedure is being improperly wrapped.
08:31:21FromGitter<Varriount> That would cause the stack to become corrupted.
08:32:12shashlickI agree, still not very confident at that
08:33:02shashlickhttps://www.un4seen.com/doc/ <= see BASS/Recording for the functions I've wrapped
08:34:24FromGitter<Varriount> Are you sure you're wrap of BASS_DEVICEINFO is correct? The `name` and `driver` members are either 16 bits or 8 bits wide, but DWORD is 32 bits
08:35:56shashlicktypedef struct {
08:35:56shashlick char *name;
08:35:56shashlick char *driver;
08:35:56shashlick DWORD flags;
08:35:56shashlick} BASS_DEVICEINFO;
08:36:20shashlicki've defined them as cstring
08:37:12FromGitter<Varriount> My version of the header file is different.
08:39:33shashlickwhat does it look like for you?
08:39:52shashlickthe call works fine, I get the device name and can print it
08:40:51FromGitter<Varriount> https://gist.github.com/Varriount/ba4b1adeb46b2e01deeba79db7b69bb4
08:42:20FromGitter<Varriount> shashlick: That's what I get from the latest website download.
08:43:19shashlicki'm not using DWORD for name and driver, i'm using cstring
08:43:59shashlickthat's what I see in the header file too, i just pasted it from the documentation
08:44:13FromGitter<Varriount> Ah, I was misreading.
08:45:15shashlickbut i agree i am doing something bogus somewhere, messing up the stack
08:45:28shashlickjust don't have the eye yet to figure it out
08:48:01FromGitter<Varriount> sashlick: What system are you compiling this on?
08:49:04dom96shashlick: seems your pastebin has expired
08:49:21shashlickwhoops
08:49:34FromGitter<Varriount> shashlick: RECORDPROC looks suspicious.
08:49:49FromGitter<Varriount> You're giving it a 'closure' calling convention, which is Nim-specific.
08:50:07shashlickhttps://pastebin.com/PEpNCaDZ
08:50:24shashlicki didn't see any good examples to do a callback so that's very suspect
08:50:48*filcuc joined #nim
08:50:49FromGitter<Varriount> Closures are represented by pairs of pointers, one to the procedure, the other to the closure's scope/environment
08:51:54FromGitter<Varriount> Give the type a 'cdecl' calling convention, and just pass an address to the callback in.
08:56:58shashlicki've set RECORDPROC to {.cdecl.}
08:57:20shashlickbut not sure what to do in the RecordStart() line
08:57:45shashlickis my signature to RecordStart() wrong?
08:58:35FromGitter<Varriount> No. Just pass in the callpack
08:59:32shashlickthen i get a compile error
08:59:34shashlicksolo.nim(106, 26) Error: type mismatch: got (DWORD, DWORD, DWORD, proc (handle: DWORD, buffer: pointer, length: DWORD, user: pointer): BOOL{.gcsafe, locks: 0.}, pointer)
08:59:34shashlickbut expected one of:
08:59:34shashlickproc BASS_RecordStart(freq, chans, flags: DWORD; callback: RECORDPROC; user: pointer): DWORD
09:01:15FromGitter<Varriount> Have you annotated your callback with the cdecl annotation too?
09:03:02FromGitter<Varriount> And actually, you'll need to use stdcall on windows, not cdecl
09:03:18FromGitter<Varriount> https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx#callback
09:03:44FromGitter<Varriount> shashlick: If you give me a bit, I can try running C2Nim on it.
09:04:19shashlicksure that will be great
09:04:40shashlicki tried cdecl, it works but my callback only gets called once and not again
09:05:20*Tiberium joined #nim
09:06:18dom96shashlick: maybe you need to return 'true' from your callback?
09:06:29dom96the BOOL probably determines whether it should be called again
09:07:05shashlicki am returning 1
09:07:21FromGitter<Varriount> dom96: c2nim fails to compile with the current 'compiler' package from Nimble - I get Error: cannot open 'etcpriv'
09:07:50dom96I think you need to compile it using 'koch tools'
09:08:03FromGitter<Varriount> c2nim isn't part of the Nim repository
09:10:20Tiberiumoh no
09:10:27Tiberiumscala somehow got more votes than Nim
09:10:29dom96In that case, try 'nimble install compiler@#head'
09:10:35Tiberiumwe're on the third place again :(
09:10:37dom96and then try installing c2nim again
09:10:41dom96Tiberium: heh, yeah, I saw.
09:10:48dom96Perhaps I should tweet about this with @nim_lang
09:11:08FromGitter<Varriount> Where can I vote?
09:11:23dom96https://replit.canny.io/languages-requests
09:11:58shashlickdom96: I see what you are saying, I thought I had set the callback return back to 1, but it was 0
09:12:10shashlickit is now running until i hit ctrl-c
09:12:18dom96shashlick: great :)
09:12:26dom96Why are you returning an int?
09:12:28shashlickbut now when you do ctrl-c, it crashes
09:12:43Tiberiumshashlick, hmm, are you affiliated with http://www.shashlik.io/ ?
09:12:51Tiberiumjust your nickname is very similar :)
09:13:15Tiberiumshashlick, (i know that шашлык is a russian word)
09:13:44shashlickTiberium: no affiliation :) just a silly name I thought up years ago
09:13:51Tiberiumshashlick, lol, ok
09:14:45*yglukhov joined #nim
09:15:07shashlickdom96: i guess i should set BOOL to bool instead of cint?
09:15:10*yglukhov quit (Remote host closed the connection)
09:15:14FromGitter<Varriount> cbool
09:15:32dom96there is no such thing as cbool
09:15:34dom96bool is fine
09:15:37*yglukhov joined #nim
09:16:56shashlickokay fixed that
09:17:06shashlicknow why is the program crashing on CTRL-C?
09:17:26dom96dunno, how is it crashing?
09:17:28shashlicki just get a popup that solo.exe crashed, no details of any sort
09:17:41dom96oh, well that can happen
09:17:50dom96I don't think you need to worry about it
09:17:58dom96try exiting the application using quit()
09:18:11dom96CTRL-C sometimes triggers the Windows crash dialog
09:18:14dom96because Windows is silly
09:18:24shashlicksolo.exe has stopped working, A problem caused blah blah
09:19:25shashlicki have a ctrl-c handler to clean up before exit
09:19:37shashlickit doesn't get called for some reason
09:20:05*yglukhov quit (Ping timeout: 260 seconds)
09:20:46FromGitter<Varriount> shashlick: Almost done, however I need to get to bed.
09:21:22FromGitter<Varriount> It will need some cleaning up, as I don't have the Windows SDK on hand to use to partially preprocess the file.
09:21:27shashlickit's 4:20am here, i need to go to bed too!
09:21:40shashlickcan you please share the steps you used to convert it? will help in the future
09:22:26*fastrom quit (Quit: Leaving.)
09:24:53*nightmared quit (Ping timeout: 252 seconds)
09:26:27*gokr joined #nim
09:26:27*yglukhov joined #nim
09:26:47FromGitter<Varriount> changed some of the "defines" to defs, rewrote structure definitions so that macro ifdefs decide the entire structure layout, rather than a single member
09:27:27FromGitter<Varriount> C2Nim can't handle ifdefs inside structure definitions, so you have to rewrite them
09:28:05FromGitter<Varriount> I also had to remove calling convention specifiers from callback types, so those might need to be added back in manually.
09:32:36*nightmared joined #nim
09:34:04FromGitter<Varriount> shashlick: Rarely is C2Nim able to wrap a file without some editing first
09:34:24shashlickmakes sense
09:34:31dom96Varriount: did my suggestion help you compile c2nim?
09:35:20shashlickdom96: i have filled out handleControlC() but it isn't getting called
09:35:33*Arrrr quit (Ping timeout: 258 seconds)
09:35:38dom96"filled out"?
09:35:42FromGitter<Bennyelg> from X import Y dosent work?
09:35:54FromGitter<Bennyelg> Error: undeclared identifier: (the proc name here)
09:36:36shashlicksorry, i've setup a hook to intercept and cleanly exit from ctrl-c
09:36:42dom96Bennyelg: 'import X' is the same as 'from X import *'
09:36:43shashlicksetControlCHook()
09:36:58shashlickbut it isn't getting called and my program crashes on ctrl-c like i described
09:37:04TiberiumBennyelg - is proc that you're trying to import exported?
09:37:14Tiberiumlike "proc someName()*" notice an asterisk here
09:37:22Tiberiumoh sorry
09:37:28Tiberium"proc someName*()"
09:37:42*yglukhov quit (Ping timeout: 240 seconds)
09:38:04dom96actually yeah, what Tiberium says.
09:38:16FromGitter<Bennyelg> gotcha! it's the *
09:38:17FromGitter<Bennyelg> lol
09:38:21Tiberium:)
09:38:25FromGitter<Bennyelg> donnu why we need this (I came from python)
09:38:39FromGitter<Bennyelg> this should be deprecated i guess
09:38:41Tiberiumprivate/public functions
09:38:48Tiberiumlike you're doing _some_name in python
09:38:58dom96hah, definitely shouldn't be deprecated
09:39:30dom96It allows you to specify which of your procedures are part of the public API of your module
09:39:59*bjz_ joined #nim
09:40:10dom96The compiler enforces this, whereas in Python you can access "private" fields even though it's frowned upon :)
09:42:26*bjz quit (Ping timeout: 260 seconds)
09:45:53*Arrrr joined #nim
09:45:53*Arrrr quit (Changing host)
09:45:53*Arrrr joined #nim
09:48:49Tiberium@Bennyelg: comparing (performance) to (development speed) ratio nim vs python, I think Nim wins
09:49:14FromGitter<Varriount> @Bennyelg having a public/private distinction in Nim is much more important
09:49:23FromGitter<Bennyelg> Yea you right
09:49:46Tiberiumdon't forget that Nim is compiled to C :)
09:49:59FromGitter<Varriount> For more than merely stylistic reasons.
09:50:11FromGitter<Bennyelg> And we all love C :)
09:50:16FromGitter<Bennyelg> but with better styling. :D
09:50:52Tiberiumand with good stdlib :)
09:51:51FromGitter<Bennyelg> I still dont think I can covert my work to nim since I am working as a Big-data developer where Python/ scala is the strongest in the field
09:52:27FromGitter<Bennyelg> etls in python. apache spark in scala. ⏎ But I may starting look for another positions after I'll learn nim because I freaking loved it.
09:52:43Tiberiumyeah, there's not many nim libraries
09:52:53FromGitter<Varriount> Nim is good as a C interface
09:53:06Tiberiumand there's, sadly, no libraries like pandas/matplotlib/etc
09:53:13FromGitter<Varriount> I mean, it can be used as a C library.
09:53:13Tiberium(for big data)
09:53:16FromGitter<Bennyelg> The question is what google -trends predict for us
09:53:32FromGitter<Bennyelg> is nim going to be the raising star or forgotten language.
09:55:00*fastrom joined #nim
09:55:21FromGitter<Varriount> All we can do is continue on and do our best
09:55:27*Arrrr quit (Ping timeout: 255 seconds)
09:55:58FromGitter<stisa> Tiberium : there's https://github.com/bluenote10/NimData that's similar to pandas, and a gnuplot wrapper for plotting
09:56:14Tiberiumwow then :)
09:56:34shashlickBennyelg: I say who cares - glad I discovered it :)
09:56:59FromGitter<Bennyelg> :dancer:
09:57:37FromGitter<Varriount> @Bennyelg It would help if we had a large corporate sponsor. :<
09:57:45Tiberiumok, and one missing field is machine learning :)
09:58:08Tiberium(for example, I translated pure python simplest neural network in 20-30 mins from Python to Nim)
09:58:14Tiberiumno github sadly
09:58:22Tiberiumbut it works at least
09:58:49TiberiumI translated this - https://github.com/jhoward/Python-Neural-Network
09:58:52Tiberiumit's very small
10:00:29shashlickokay, new question - i'm reading data from microphone, if I try to poll faster than every 100 ms (using sleeps), nim crashes
10:01:03Tiberiummaybe this is a library limitation?
10:01:06FromGitter<Varriount> Any stacktrace?
10:02:20shashlicknope
10:02:26shashlicksame popup from windows
10:02:41Tiberiumrun from console
10:02:51Tiberium(I mean run your file from console)
10:02:52Tiberiumwithout GUI
10:03:05Tiberiumopen cmd, and run exe here
10:03:18FromGitter<Varriount> If I had to guess, there isn't enough data in some buffer, and something is tripping over that.
10:03:48FromGitter<Varriount> I mean, enough sound data from the microphone
10:03:51shashlicki'm running from the console
10:04:14shashlickactually, it's independent of the sleep/poll duration
10:04:22shashlickafter it reads a certain amount, it crashes
10:04:26FromGitter<Varriount> shashlick: Try using gdb to get a stacktrace
10:04:31Tiberiumhmm
10:04:37Tiberiumif you run your exe from cmd
10:04:38shashlickthis is if i poll instead of using the callback mechanism
10:04:44Tiberiumcan you run other commands in this cmd?
10:04:50Tiberiumor it blocks until your exe crashes?
10:05:34shashlickit blocks
10:05:41Tiberiumhmm, I don't know then
10:05:42*yglukhov joined #nim
10:05:43shashlickVarriount: no stacktrace in gdb
10:05:47FromGitter<Varriount> Tiberium: That's the way the Windows console works.
10:05:54TiberiumVarriount: I know
10:05:57shashlickhere's my build flags: -r --debugger:native --threads:on --debuginfo --lineDir:on --tlsEmulation:off --stackTrace:on --lineTrace:on solo.nim
10:06:18FromGitter<Varriount> shashlich: Has the bass dll been compiled in debug mode, by GCC?
10:06:47Tiberiumbut if his exe would be compiled with "windows" flag (I forgot the name - it just disables console from popping up), his cmd wouldn't block
10:08:04FromGitter<Varriount> You mean, compile it as a gui application?
10:08:08Tiberiumyeah
10:08:12Tiberiumthat's why I was asking him
10:08:57shashlickVarriount: i've downloaded it from un4seen.com, i don't think there's a debug version
10:09:11Tiberiumcompile it by yourself
10:09:38Tiberiumor there's no src?
10:09:49FromGitter<Varriount> Then my guess is the crash is happening inside the library.
10:09:59shashlickcould be ya
10:09:59FromGitter<Varriount> You might email them and ask for a debug dll built by Mingw
10:10:03*yglukhov quit (Ping timeout: 258 seconds)
10:10:07shashlickare my build flags good?
10:10:16Tiberiumah, yes, BASS is closed-source
10:10:18Tiberiumvery sadly
10:10:28TiberiumBASS is free for non-commercial use. If you are a non-commercial entity (eg. an individual) and you are not making any money from your product (through sales, advertising, etc), then you can use BASS in it for free. Otherwise, one of the following licences will be required.
10:10:56Tiberiumfor example, you must buy "shareware" license for all platforms separately
10:11:03Tiberiumshashlick: maybe you can use another library?
10:12:04shashlickya i considered portaudio
10:12:19shashlickbut wanted to try bass instead since portaudio already has nim bindings :P
10:12:33Tiberiumbut it's very hard to do if bass is closed-source
10:12:53TiberiumI mean it's harder than if bass was open source
10:14:35FromGitter<Bennyelg> count repeated chars on nim?
10:14:40FromGitter<Bennyelg> from string
10:15:06FromGitter<Varriount> What do you mean, total number, or continuous runs?
10:15:29Tiberiumhe wants to count chars in string
10:15:36FromGitter<Bennyelg> benny => b 1 e: 1 n 2 y 1
10:15:37*Sentreen quit (Ping timeout: 260 seconds)
10:15:42FromGitter<Bennyelg> I can do some bad fors
10:16:10Tiberiumpls no
10:17:10*fastrom quit (Quit: Leaving.)
10:17:21FromGitter<Bennyelg> in python you do map and then reduceByKey
10:17:25FromGitter<Bennyelg> same in scala
10:18:19Tiberiumin python you can use Counter from collections
10:18:29dom96In Nim you should use a for loop
10:19:03Tiberiumdom96, but there was some library in nim
10:19:36dom96perhaps, but this is counting characters in a string. Don't add a library for every little thing you want to do.
10:20:16FromGitter<Bennyelg> its exactly the "Wordcount" game from strin
10:20:17FromGitter<Bennyelg> g
10:20:27FromGitter<Bennyelg> or hadoop map reduce like :smile:
10:21:20Tiberiumcan I install all "requires" from .nimble file without installing project itself?
10:22:10Tiberiumah, doesn't matter anyway
10:22:12*filcuc quit (Ping timeout: 240 seconds)
10:29:31*Sentreen joined #nim
10:31:00shashlickno idea on this crash - if I sleep every 5ms, it crashes very fast, if i set to 100ms between polls, it crashes after a few iterations, if i increase to 1sec poll, it crashes much later
10:31:15shashlicknot sure what to make of it
10:31:16FromGitter<Varriount> Sounds like a buffer overrun
10:31:37FromGitter<Varriount> Something uses up the buffer every loop, until it goes past the buffer
10:33:08shashlickevery time i run the ChannelGetData() function, i get a chunk out of the buffer
10:33:32shashlicki can monitor the buffer and can keep it from filling up too much
10:33:46shashlickso i don't think it is a buffer overrun within bass.dll
10:34:05shashlickbut like you've all said, it's just guesswork now, hard to tell if my nim code is crashing or bass is
10:34:50FromGitter<Varriount> Are you sure you want to use this sound library? What kind of capabilities do you need?
10:35:30shashlicknothing exotic - read from mic input and run some ffts
10:35:35shashlickthis lib has ffts built in
10:36:32shashlickbut can only access the fft data via polling
10:36:49shashlickguess i'll just use the callback mechanism and use kissfft
10:38:50FromGitter<Varriount> Shashlick: What about portaudio?
10:42:16*rokups quit (Quit: Connection closed for inactivity)
10:43:00FromGitter<Varriount> There's http://fftw.org for a fast Fourier transform lib, although that's licensed under GPL
10:44:43FromGitter<mratsim> Hey folks
10:44:52FromGitter<Varriount> Hi
10:46:21FromGitter<mratsim> Following my issues to use lining Vectors and Matrices types for my Deep Learning lib, I started my own ndarray/tensor library. I’m pretty happy with what I managed to accomplish in 3 days. It’s pretty rough yet, but here it is: https://github.com/mratsim/Arraymancer
10:46:31FromGitter<mratsim> lining -> linalg
10:48:20FromGitter<Varriount> @mratsim No using the existing linalg library?
10:48:29FromGitter<mratsim> Feel free to comment on code style, tests, potential issues (I need to use pointer arithmetics for BLAS interface)
10:49:12FromGitter<mratsim> @Varriount: no, I couldn’t get it to type check. And anyway I would need 3D, 4D and 5D tensors/ndarrays for Deep Learning
10:56:06FromGitter<Varriount> So what does this library do differently?
10:56:51FromGitter<mratsim> Vector, Matrices, 3D, … N-dimensional arrays are unified in a single Tensor type
10:57:52FromGitter<mratsim> Also it supports types other than floats, you can use a matrices of objects/strings/tuples. (I don’t need it but it works so …)
10:58:56*dddddd joined #nim
11:02:19shashlickhave posted on the bass.dll forum, let's see => https://www.un4seen.com/forum/?topic=17618.0
11:02:30shashlicki'll look into portaudio if i cannot get the fft working
11:02:31*Snircle joined #nim
11:03:05*yglukhov joined #nim
11:07:17*xmonader3 joined #nim
11:08:50*xmonader2 quit (Ping timeout: 252 seconds)
11:09:54*xmonader3 is now known as xmonader
11:13:23*xmonader2 joined #nim
11:16:56*xmonader quit (Ping timeout: 260 seconds)
11:17:25*yglukhov quit (Read error: Connection reset by peer)
11:21:47*couven92 joined #nim
11:27:39shashlickthanks for all the help guys!
11:39:50ftsfshashlick, whatcha trying to do?
11:47:54*krux02 joined #nim
12:09:54*zachcarter quit (Quit: zachcarter)
12:26:03*krux02 quit (Remote host closed the connection)
12:29:39*yglukhov joined #nim
12:33:03*couven92 quit (Read error: Connection reset by peer)
12:34:07*yglukhov quit (Ping timeout: 240 seconds)
12:43:44*vlad1777d joined #nim
12:59:45*zachcarter joined #nim
13:30:12zachcartermorning all
13:30:38FromGitter<mratsim> hello zach
13:30:50*nsf joined #nim
13:31:34zachcartero/ mratsim
13:35:42*couven92 joined #nim
13:43:51ftsfo/
13:44:24zachcarterftsf: congrats on getting on greenlight
13:44:40ftsfcheers, doesn't take much to put it on there, hopefully it'll get approved soon =)
13:44:52zachcarterstill big accomplishment finishing a game
13:45:10zachcarteror getting a game to the point where it’s ready to be put on GL
13:45:17ftsfnot quite finished but hoping in less than a month it'll be releasable
13:45:26zachcarternice!
13:46:14ftsfwhich platform are you on zachcarter?
13:46:19zachcarterosx
14:14:56*devted joined #nim
14:22:19*nsf quit (Quit: WeeChat 1.7)
14:46:16zachcartersweet collision detection is working
14:46:27*Sembei quit (Quit: WeeChat 1.6-dev)
14:51:20*Sentreen quit (Read error: Connection reset by peer)
14:51:55*Sentreen joined #nim
15:01:43*xmonader3 joined #nim
15:04:32*xmonader2 quit (Ping timeout: 240 seconds)
15:14:21zachcarterhttp://imgur.com/a/RHvYb
15:15:51*zachcarter quit (Read error: Connection reset by peer)
15:15:55*rokups joined #nim
15:16:10*zachcarter joined #nim
15:26:13ftsfis there a way to assign to many fields of an object based on a proc's arguments? https://gist.github.com/ftsf/3255940b739740ca3e32e019512161f5
15:27:04FromGitter<mratsim> if args were in a tuple you could use tuple deconstruction
15:28:22ftsfthis seems like a pretty common way to initialise an object, seems there should be a nice way without having to write everything out multiple times
15:29:08ftsfi'm guessing it would be pretty trivial to do with a macro/template
15:29:10FromGitter<mratsim> I don’t use objects :P
15:29:20FromGitter<TiberiumPY> What are you using!
15:29:22FromGitter<TiberiumPY> ?
15:29:32FromGitter<TiberiumPY> Sorry, I'm from phone now
15:29:46ldleworkftsf, you put nimsynth on greenlight?
15:29:53ftsfldlework, no, my game
15:30:18ftsfnimsynth is just a side project
15:30:23ldleworkthe pico thing?
15:30:34ftsfhttp://steamcommunity.com/sharedfiles/filedetails/?id=905664367 racing game
15:31:05FromGitter<TiberiumPY> I hope it's not Windows only?
15:31:15ftsfnever!
15:31:29FromGitter<mratsim> @TiberiumPY , joking. I use do use them but very very little
15:31:30ftsfi do all my dev on linux, and cross compile for windows and osx
15:32:16FromGitter<mratsim> I’m working on a n-dimensional array library right now so that’s the only object I have
15:32:36FromGitter<TiberiumPY> Lol, you can cross compile Nim for Windows from Linux?
15:32:52FromGitter<TiberiumPY> (i mean programs in Nim)
15:33:00ftsfsure
15:33:00VladarTiberiumPY, there's wine you know…
15:33:07FromGitter<TiberiumPY> I know
15:33:23ftsfgcc and clang can cross compile to other targets
15:33:29FromGitter<TiberiumPY> I wonder if this can be automated by travis
15:33:32FromGitter<mratsim> From the docs it says that the C code is already specialized
15:33:42ftsfshould be able to, i'd like to get that set up
15:34:15FromGitter<TiberiumPY> ftsf - do you have any specific articles for this
15:34:18FromGitter<TiberiumPY> ?
15:34:40ftsfi don't, i haven't seen any specific for nim, but i should write something up about it
15:35:17ftsfyou need to build a c cross compiler first, i'm using mingw32 for windows, and osxcross for osx
15:35:42ftsfthen you can use nim.cfg to define settings for each target, eg. which compiler and settings to use
15:36:54ftsflibraries can be a bit tricky/different on osx
15:37:31ftsfhttps://gist.github.com/ftsf/169688c59fdc9084c1d009fe5d8779b5 eg
15:38:08demi-tbh, you cannot trust non-apple provided compilers to build libraries correctly on OS X
15:39:03ftsfi wouldn't trust apple provided anything ;)
15:39:36demi-why, or are you just being snarky
15:39:42ftsfapple uses clang however
15:39:54demi-yeah but there is no published binary spec for mach-o
15:40:12demi-so apple's tools are the only reliable source for things that will work
15:40:18ftsfbecause all the apple stuff in clang is horrible from what i've seen, so i wouldn't trust them
15:40:19*Tiberium quit (Read error: Connection reset by peer)
15:40:34ftsfdemi-, i tested it and it works
15:40:53demi-ftsf: that doesn't change what i just said
15:41:01FromGitter<TiberiumPY> demi-: but mingw isn't official Microsoft software too
15:41:04FromGitter<TiberiumPY> But it works
15:41:08*Tiberium joined #nim
15:41:22demi-TiberiumPY, but microsoft publishes their binary spec, do they not?
15:41:25ftsfahh you did say on OSX. but not sure why that matters?
15:41:44ftsfi've never used a non-apple compiler (other than clang) on OSX.
15:42:25demi-ftsf: that's my point, if you are building software for OS X, you need to build it on OS X with apple's tools to ensure your binary will work correctly
15:42:35subsetparkDo I need to do something special to import an overloaded operator from a different module?
15:42:40ftsfdemi-, why? i can just test it on a mac?
15:42:51Tiberiumsubsetpark, no, but this operator must be exported
15:43:02subsetparkYeah, it's the exporting that breaks things...
15:43:08Tiberiumnoo
15:43:10TiberiumI mean
15:43:16Tiberiume.g "proc `+`*(a, b: MyType)", you must have "*" there
15:43:18demi-you can, but that doesn't mean it will continue to work in the future, since there is no spec that is published that describes how the executable binary should be constructed
15:43:23subsetparkTiberium: that's what I mean too
15:43:30Tiberiumdemi-, but what to do then?
15:43:35Tiberiumbuy Mac to build things?
15:43:43subsetparkError: ambiguous call; both system.$(x: float) and op.$(n: Num) match for: (float)
15:43:50Tiberiumthen use
15:43:53demi-Tiberium: that is what apple wants, since they are in the market of selling hardware
15:43:55Tiberiumop.$(your object)
15:44:33Tiberiumbut generally $ operator converts nim objects to strings
15:44:41subsetparkYou need a `$` there - but I get the same ambiguous call error
15:44:55subsetparkWell no, scratch that - different place I call $
15:45:38FromGitter<mratsim> @subsetpark: https://github.com/nim-lang/Nim/issues/5645
15:45:38subsetparkBut one of the places is in a strutils call, so I can' tsimply replace all instances of $ with mymodule.`$`
15:46:19subsetparkmratsim: Yes, looks just like the same issue!
15:48:07subsetparkI guess the workaround is just to repeat the overloading in each module...
16:07:05*krux02 joined #nim
16:11:30*Arrrr joined #nim
16:15:09*krux02 quit (Quit: I am out)
16:25:54*Tiberium quit (Remote host closed the connection)
16:26:08*Tiberium joined #nim
16:30:16*yglukhov joined #nim
16:32:53*gokr quit (Quit: Leaving.)
16:34:35*yglukhov quit (Ping timeout: 255 seconds)
16:44:42*Arrrr quit (Ping timeout: 240 seconds)
16:51:07*Arrrr joined #nim
16:51:07*Arrrr quit (Changing host)
16:51:07*Arrrr joined #nim
16:58:45*dddddd quit (Remote host closed the connection)
17:01:54*couven92 quit (Quit: Disconnecting)
17:02:56*nightmared quit (Ping timeout: 255 seconds)
17:08:22*nightmared joined #nim
17:18:41FromGitter<Varriount> ftsf: Regarding your object construction question, there is no shortcut, however you can use the `Type(field: value)` notation
17:19:43ftsfyes, i've used that a little... i think i just discovered a bug(?) in it... fields need to be specified in the correct order... sometimes?
17:25:53FromGitter<TiberiumPY> Sometimes?
17:26:10ftsfwell it seems to work fine sometimes specifying in the wrong order
17:26:26ftsfbut in one instance i've found it made a difference depending on the order
17:26:41FromGitter<TiberiumPY> Maybe it's a compiler magic
17:27:09FromGitter<TiberiumPY> So it can figure fields based on field types
17:39:02dom96ftsf: can you reproduce it with a small code sample?
17:49:39*Nobabs27 joined #nim
18:04:50Tiberiumdoes aporia support nimsuggest?
18:05:52Tiberiumand how to enable it
18:07:59Tiberium"Could not find nimsuggest in path"
18:11:13Tiberiumwow
18:11:14Tiberiumit works now
18:11:22Tiberium(had to set up nim path manually in config)
18:11:41Tiberiumwat! even for built-in types
18:12:10Tiberiumand how to use suggest feature?
18:17:35*babs_ joined #nim
18:19:51*Nobabs27 quit (Ping timeout: 260 seconds)
18:23:12dom96it still works? wow, i'm surprised.
18:23:39ldleworkis aporia abandoned?
18:33:21*babs__ joined #nim
18:36:11*babs_ quit (Ping timeout: 260 seconds)
18:38:20*babs_ joined #nim
18:39:44*Trustable joined #nim
18:40:37*babs__ quit (Ping timeout: 240 seconds)
18:57:19*babs__ joined #nim
19:00:06*babs_ quit (Ping timeout: 260 seconds)
19:00:20*babs_ joined #nim
19:02:56*babs__ quit (Ping timeout: 252 seconds)
19:05:19*babs__ joined #nim
19:05:25*xmonader3 quit (Ping timeout: 255 seconds)
19:08:16*babs_ quit (Ping timeout: 260 seconds)
19:13:04dom96ldlework: for now it's in a hiatus.
19:21:49*babs_ joined #nim
19:24:20*Nobabs27 joined #nim
19:24:25*babs__ quit (Ping timeout: 260 seconds)
19:26:45*babs_ quit (Ping timeout: 260 seconds)
19:27:27*Nobabs27 quit (Client Quit)
19:27:43*Nobabs27 joined #nim
19:34:50*babs_ joined #nim
19:37:11*athaudia quit (Ping timeout: 240 seconds)
19:37:29*Nobabs27 quit (Ping timeout: 260 seconds)
19:37:48*babs__ joined #nim
19:40:21*babs_ quit (Ping timeout: 260 seconds)
19:42:04*athie joined #nim
19:42:20*Spume joined #nim
19:45:07*Spume quit (Client Quit)
19:48:51*babs_ joined #nim
19:51:11*babs__ quit (Ping timeout: 240 seconds)
19:51:52*babs__ joined #nim
19:54:38*babs_ quit (Ping timeout: 252 seconds)
20:08:40*gokr joined #nim
20:08:52*babs__ quit (Quit: Leaving)
20:13:49*Arrrr quit (Quit: Leaving.)
20:16:42*yglukhov joined #nim
20:31:39*yglukhov quit (Remote host closed the connection)
20:32:30*vlad1777d quit (Remote host closed the connection)
20:36:22*xmonader3 joined #nim
20:40:16*heinrich5991 quit (Read error: Connection timed out)
20:45:29*heinrich5991 joined #nim
20:46:55*yglukhov joined #nim
20:49:16Tiberiumwat! it's very easy to cross-compile nim programs for windows
20:49:32Tiberiumby easy i mean VERY easy (since I luckily have mingw in my distro repos)
20:49:44Tiberiumnim c --os:windows --gcc.linkerexe:"x86_64-w64-mingw32-gcc" --gcc.exe:"x86_64-w64-mingw32-gcc" vkbot
20:49:53Tiberiumsure this can be placed into nim.cfg
20:54:21*Tiberium quit (Remote host closed the connection)
20:55:28*devted quit (Quit: Sleeping.)
20:56:24pydsignerInteresting
21:00:30FromGitter<TiberiumPY> And it works (tested with wine)
21:01:29*fastrom joined #nim
21:02:34*fastrom quit (Client Quit)
21:04:10*fastrom joined #nim
21:15:27*fastrom quit (Quit: Leaving.)
21:31:49*nsf joined #nim
21:33:20*Vladar quit (Remote host closed the connection)
21:39:28*xmonader3 quit (Read error: Connection reset by peer)
21:41:03*xmonader3 joined #nim
21:42:16*rokups quit (Quit: Connection closed for inactivity)
21:44:08*devted joined #nim
21:50:12*xmonader2 joined #nim
21:50:14*gokr quit (Ping timeout: 260 seconds)
21:53:26*xmonader3 quit (Ping timeout: 252 seconds)
21:56:23*xmonader3 joined #nim
21:59:34*xmonader2 quit (Ping timeout: 260 seconds)
22:04:14*xmonader3 quit (Ping timeout: 260 seconds)
22:06:14*Trustable quit (Remote host closed the connection)
22:12:43*xmonader3 joined #nim
22:19:53*xmonader3 quit (Ping timeout: 260 seconds)
22:36:49*fastrom joined #nim
22:54:35*nsf quit (Quit: WeeChat 1.7)
23:00:52*yglukhov quit (Remote host closed the connection)
23:32:16*yglukhov joined #nim
23:36:35*yglukhov quit (Ping timeout: 258 seconds)