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:57 | zachcarter | http://imgur.com/a/BBIfb |
04:42:01 | zachcarter | letterboxing working well |
04:54:57 | * | gokr joined #nim |
04:56:25 | * | gokr quit (Client Quit) |
04:58:30 | * | bjz joined #nim |
05:18:25 | zachcarter | just need invaderz now |
05:18:26 | zachcarter | http://imgur.com/a/uTjQZ |
05:52:52 | FromGitter | <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:13 | zachcarter | okay |
05:53:35 | zachcarter | good call you’re right |
06:16:40 | zachcarter | Varriount: down scaling means I need mipmaps now :P |
06:16:48 | zachcarter | not quite sure how to generate them with bgfx |
06:17:22 | FromGitter | <Varriount> What's normally done - generating mipmaps beforehand, or at runtime? |
06:18:03 | zachcarter | in my experience they’re created at runtime when you create the opengl texture |
06:18:07 | zachcarter | but I know they can also be created offline |
06:19:08 | FromGitter | <Varriount> Would creating them beforehand have any benefit? |
06:19:33 | zachcarter | not sure, I need to do more research I think |
06:19:35 | zachcarter | these are good questions though |
06:30:06 | * | xmonader2 joined #nim |
06:52:18 | * | rokups joined #nim |
07:07:53 | shashlick | can I return an object that I instantiate in a proc to the caller as a return value? |
07:26:03 | FromGitter | <Varriount> Shashlick: Yes. What sensible language doesn't allow that? |
07:26:29 | shashlick | well I was doing that and was segfaulting |
07:27:30 | shashlick | working with a dll, send the addr to that data structure to the dll, it comes back fine |
07:27:35 | shashlick | i read and use it no issue |
07:27:58 | shashlick | but if i return it back as part of a tuple return, i was segfaulting at the caller line |
07:28:17 | FromGitter | <Varriount> Shashlick: Code? |
07:28:19 | shashlick | illegal storage access |
07:30:06 | FromGitter | <Varriount> I mean, post your code. Memory access problems can be caused by anything. |
07:31:42 | shashlick | https://pastebin.com/HEtwe2L1 |
07:36:04 | shashlick | i'm specifically talking about the rinfo variable in find_mic() |
07:36:37 | shashlick | if I return that as a 3rd return value in the tuple, program crashes on line 101 |
07:40:16 | shashlick | even 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:55 | shashlick | https://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:11 | FromGitter | <Varriount> Hm |
08:13:34 | FromGitter | <Varriount> If there's no traceback, the crash is probably happening inside the library |
08:14:28 | * | xet7 joined #nim |
08:16:23 | FromGitter | <Varriount> sashlick: You're using 'bass.h' as the file your translating? |
08:19:42 | * | Arrrr joined #nim |
08:20:06 | FromGitter | <Varriount> sashlick: You there? |
08:26:55 | shashlick | sorry, didn't see this |
08:27:17 | shashlick | no bass.h isn't handled well by c2nim |
08:27:52 | shashlick | i just manually wrote the procs i needed |
08:27:55 | shashlick | in the same pastebin |
08:30:07 | FromGitter | <Varriount> Hm |
08:31:00 | FromGitter | <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:21 | FromGitter | <Varriount> That would cause the stack to become corrupted. |
08:32:12 | shashlick | I agree, still not very confident at that |
08:33:02 | shashlick | https://www.un4seen.com/doc/ <= see BASS/Recording for the functions I've wrapped |
08:34:24 | FromGitter | <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:56 | shashlick | typedef struct { |
08:35:56 | shashlick | char *name; |
08:35:56 | shashlick | char *driver; |
08:35:56 | shashlick | DWORD flags; |
08:35:56 | shashlick | } BASS_DEVICEINFO; |
08:36:20 | shashlick | i've defined them as cstring |
08:37:12 | FromGitter | <Varriount> My version of the header file is different. |
08:39:33 | shashlick | what does it look like for you? |
08:39:52 | shashlick | the call works fine, I get the device name and can print it |
08:40:51 | FromGitter | <Varriount> https://gist.github.com/Varriount/ba4b1adeb46b2e01deeba79db7b69bb4 |
08:42:20 | FromGitter | <Varriount> shashlick: That's what I get from the latest website download. |
08:43:19 | shashlick | i'm not using DWORD for name and driver, i'm using cstring |
08:43:59 | shashlick | that's what I see in the header file too, i just pasted it from the documentation |
08:44:13 | FromGitter | <Varriount> Ah, I was misreading. |
08:45:15 | shashlick | but i agree i am doing something bogus somewhere, messing up the stack |
08:45:28 | shashlick | just don't have the eye yet to figure it out |
08:48:01 | FromGitter | <Varriount> sashlick: What system are you compiling this on? |
08:49:04 | dom96 | shashlick: seems your pastebin has expired |
08:49:21 | shashlick | whoops |
08:49:34 | FromGitter | <Varriount> shashlick: RECORDPROC looks suspicious. |
08:49:49 | FromGitter | <Varriount> You're giving it a 'closure' calling convention, which is Nim-specific. |
08:50:07 | shashlick | https://pastebin.com/PEpNCaDZ |
08:50:24 | shashlick | i didn't see any good examples to do a callback so that's very suspect |
08:50:48 | * | filcuc joined #nim |
08:50:49 | FromGitter | <Varriount> Closures are represented by pairs of pointers, one to the procedure, the other to the closure's scope/environment |
08:51:54 | FromGitter | <Varriount> Give the type a 'cdecl' calling convention, and just pass an address to the callback in. |
08:56:58 | shashlick | i've set RECORDPROC to {.cdecl.} |
08:57:20 | shashlick | but not sure what to do in the RecordStart() line |
08:57:45 | shashlick | is my signature to RecordStart() wrong? |
08:58:35 | FromGitter | <Varriount> No. Just pass in the callpack |
08:59:32 | shashlick | then i get a compile error |
08:59:34 | shashlick | solo.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:34 | shashlick | but expected one of: |
08:59:34 | shashlick | proc BASS_RecordStart(freq, chans, flags: DWORD; callback: RECORDPROC; user: pointer): DWORD |
09:01:15 | FromGitter | <Varriount> Have you annotated your callback with the cdecl annotation too? |
09:03:02 | FromGitter | <Varriount> And actually, you'll need to use stdcall on windows, not cdecl |
09:03:18 | FromGitter | <Varriount> https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx#callback |
09:03:44 | FromGitter | <Varriount> shashlick: If you give me a bit, I can try running C2Nim on it. |
09:04:19 | shashlick | sure that will be great |
09:04:40 | shashlick | i tried cdecl, it works but my callback only gets called once and not again |
09:05:20 | * | Tiberium joined #nim |
09:06:18 | dom96 | shashlick: maybe you need to return 'true' from your callback? |
09:06:29 | dom96 | the BOOL probably determines whether it should be called again |
09:07:05 | shashlick | i am returning 1 |
09:07:21 | FromGitter | <Varriount> dom96: c2nim fails to compile with the current 'compiler' package from Nimble - I get Error: cannot open 'etcpriv' |
09:07:50 | dom96 | I think you need to compile it using 'koch tools' |
09:08:03 | FromGitter | <Varriount> c2nim isn't part of the Nim repository |
09:10:20 | Tiberium | oh no |
09:10:27 | Tiberium | scala somehow got more votes than Nim |
09:10:29 | dom96 | In that case, try 'nimble install compiler@#head' |
09:10:35 | Tiberium | we're on the third place again :( |
09:10:37 | dom96 | and then try installing c2nim again |
09:10:41 | dom96 | Tiberium: heh, yeah, I saw. |
09:10:48 | dom96 | Perhaps I should tweet about this with @nim_lang |
09:11:08 | FromGitter | <Varriount> Where can I vote? |
09:11:23 | dom96 | https://replit.canny.io/languages-requests |
09:11:58 | shashlick | dom96: I see what you are saying, I thought I had set the callback return back to 1, but it was 0 |
09:12:10 | shashlick | it is now running until i hit ctrl-c |
09:12:18 | dom96 | shashlick: great :) |
09:12:26 | dom96 | Why are you returning an int? |
09:12:28 | shashlick | but now when you do ctrl-c, it crashes |
09:12:43 | Tiberium | shashlick, hmm, are you affiliated with http://www.shashlik.io/ ? |
09:12:51 | Tiberium | just your nickname is very similar :) |
09:13:15 | Tiberium | shashlick, (i know that шашлык is a russian word) |
09:13:44 | shashlick | Tiberium: no affiliation :) just a silly name I thought up years ago |
09:13:51 | Tiberium | shashlick, lol, ok |
09:14:45 | * | yglukhov joined #nim |
09:15:07 | shashlick | dom96: i guess i should set BOOL to bool instead of cint? |
09:15:10 | * | yglukhov quit (Remote host closed the connection) |
09:15:14 | FromGitter | <Varriount> cbool |
09:15:32 | dom96 | there is no such thing as cbool |
09:15:34 | dom96 | bool is fine |
09:15:37 | * | yglukhov joined #nim |
09:16:56 | shashlick | okay fixed that |
09:17:06 | shashlick | now why is the program crashing on CTRL-C? |
09:17:26 | dom96 | dunno, how is it crashing? |
09:17:28 | shashlick | i just get a popup that solo.exe crashed, no details of any sort |
09:17:41 | dom96 | oh, well that can happen |
09:17:50 | dom96 | I don't think you need to worry about it |
09:17:58 | dom96 | try exiting the application using quit() |
09:18:11 | dom96 | CTRL-C sometimes triggers the Windows crash dialog |
09:18:14 | dom96 | because Windows is silly |
09:18:24 | shashlick | solo.exe has stopped working, A problem caused blah blah |
09:19:25 | shashlick | i have a ctrl-c handler to clean up before exit |
09:19:37 | shashlick | it doesn't get called for some reason |
09:20:05 | * | yglukhov quit (Ping timeout: 260 seconds) |
09:20:46 | FromGitter | <Varriount> shashlick: Almost done, however I need to get to bed. |
09:21:22 | FromGitter | <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:27 | shashlick | it's 4:20am here, i need to go to bed too! |
09:21:40 | shashlick | can 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:47 | FromGitter | <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:27 | FromGitter | <Varriount> C2Nim can't handle ifdefs inside structure definitions, so you have to rewrite them |
09:28:05 | FromGitter | <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:04 | FromGitter | <Varriount> shashlick: Rarely is C2Nim able to wrap a file without some editing first |
09:34:24 | shashlick | makes sense |
09:34:31 | dom96 | Varriount: did my suggestion help you compile c2nim? |
09:35:20 | shashlick | dom96: i have filled out handleControlC() but it isn't getting called |
09:35:33 | * | Arrrr quit (Ping timeout: 258 seconds) |
09:35:38 | dom96 | "filled out"? |
09:35:42 | FromGitter | <Bennyelg> from X import Y dosent work? |
09:35:54 | FromGitter | <Bennyelg> Error: undeclared identifier: (the proc name here) |
09:36:36 | shashlick | sorry, i've setup a hook to intercept and cleanly exit from ctrl-c |
09:36:42 | dom96 | Bennyelg: 'import X' is the same as 'from X import *' |
09:36:43 | shashlick | setControlCHook() |
09:36:58 | shashlick | but it isn't getting called and my program crashes on ctrl-c like i described |
09:37:04 | Tiberium | Bennyelg - is proc that you're trying to import exported? |
09:37:14 | Tiberium | like "proc someName()*" notice an asterisk here |
09:37:22 | Tiberium | oh sorry |
09:37:28 | Tiberium | "proc someName*()" |
09:37:42 | * | yglukhov quit (Ping timeout: 240 seconds) |
09:38:04 | dom96 | actually yeah, what Tiberium says. |
09:38:16 | FromGitter | <Bennyelg> gotcha! it's the * |
09:38:17 | FromGitter | <Bennyelg> lol |
09:38:21 | Tiberium | :) |
09:38:25 | FromGitter | <Bennyelg> donnu why we need this (I came from python) |
09:38:39 | FromGitter | <Bennyelg> this should be deprecated i guess |
09:38:41 | Tiberium | private/public functions |
09:38:48 | Tiberium | like you're doing _some_name in python |
09:38:58 | dom96 | hah, definitely shouldn't be deprecated |
09:39:30 | dom96 | It 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:10 | dom96 | The 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:49 | Tiberium | @Bennyelg: comparing (performance) to (development speed) ratio nim vs python, I think Nim wins |
09:49:14 | FromGitter | <Varriount> @Bennyelg having a public/private distinction in Nim is much more important |
09:49:23 | FromGitter | <Bennyelg> Yea you right |
09:49:46 | Tiberium | don't forget that Nim is compiled to C :) |
09:49:59 | FromGitter | <Varriount> For more than merely stylistic reasons. |
09:50:11 | FromGitter | <Bennyelg> And we all love C :) |
09:50:16 | FromGitter | <Bennyelg> but with better styling. :D |
09:50:52 | Tiberium | and with good stdlib :) |
09:51:51 | FromGitter | <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:27 | FromGitter | <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:43 | Tiberium | yeah, there's not many nim libraries |
09:52:53 | FromGitter | <Varriount> Nim is good as a C interface |
09:53:06 | Tiberium | and there's, sadly, no libraries like pandas/matplotlib/etc |
09:53:13 | FromGitter | <Varriount> I mean, it can be used as a C library. |
09:53:13 | Tiberium | (for big data) |
09:53:16 | FromGitter | <Bennyelg> The question is what google -trends predict for us |
09:53:32 | FromGitter | <Bennyelg> is nim going to be the raising star or forgotten language. |
09:55:00 | * | fastrom joined #nim |
09:55:21 | FromGitter | <Varriount> All we can do is continue on and do our best |
09:55:27 | * | Arrrr quit (Ping timeout: 255 seconds) |
09:55:58 | FromGitter | <stisa> Tiberium : there's https://github.com/bluenote10/NimData that's similar to pandas, and a gnuplot wrapper for plotting |
09:56:14 | Tiberium | wow then :) |
09:56:34 | shashlick | Bennyelg: I say who cares - glad I discovered it :) |
09:56:59 | FromGitter | <Bennyelg> :dancer: |
09:57:37 | FromGitter | <Varriount> @Bennyelg It would help if we had a large corporate sponsor. :< |
09:57:45 | Tiberium | ok, and one missing field is machine learning :) |
09:58:08 | Tiberium | (for example, I translated pure python simplest neural network in 20-30 mins from Python to Nim) |
09:58:14 | Tiberium | no github sadly |
09:58:22 | Tiberium | but it works at least |
09:58:49 | Tiberium | I translated this - https://github.com/jhoward/Python-Neural-Network |
09:58:52 | Tiberium | it's very small |
10:00:29 | shashlick | okay, new question - i'm reading data from microphone, if I try to poll faster than every 100 ms (using sleeps), nim crashes |
10:01:03 | Tiberium | maybe this is a library limitation? |
10:01:06 | FromGitter | <Varriount> Any stacktrace? |
10:02:20 | shashlick | nope |
10:02:26 | shashlick | same popup from windows |
10:02:41 | Tiberium | run from console |
10:02:51 | Tiberium | (I mean run your file from console) |
10:02:52 | Tiberium | without GUI |
10:03:05 | Tiberium | open cmd, and run exe here |
10:03:18 | FromGitter | <Varriount> If I had to guess, there isn't enough data in some buffer, and something is tripping over that. |
10:03:48 | FromGitter | <Varriount> I mean, enough sound data from the microphone |
10:03:51 | shashlick | i'm running from the console |
10:04:14 | shashlick | actually, it's independent of the sleep/poll duration |
10:04:22 | shashlick | after it reads a certain amount, it crashes |
10:04:26 | FromGitter | <Varriount> shashlick: Try using gdb to get a stacktrace |
10:04:31 | Tiberium | hmm |
10:04:37 | Tiberium | if you run your exe from cmd |
10:04:38 | shashlick | this is if i poll instead of using the callback mechanism |
10:04:44 | Tiberium | can you run other commands in this cmd? |
10:04:50 | Tiberium | or it blocks until your exe crashes? |
10:05:34 | shashlick | it blocks |
10:05:41 | Tiberium | hmm, I don't know then |
10:05:42 | * | yglukhov joined #nim |
10:05:43 | shashlick | Varriount: no stacktrace in gdb |
10:05:47 | FromGitter | <Varriount> Tiberium: That's the way the Windows console works. |
10:05:54 | Tiberium | Varriount: I know |
10:05:57 | shashlick | here's my build flags: -r --debugger:native --threads:on --debuginfo --lineDir:on --tlsEmulation:off --stackTrace:on --lineTrace:on solo.nim |
10:06:18 | FromGitter | <Varriount> shashlich: Has the bass dll been compiled in debug mode, by GCC? |
10:06:47 | Tiberium | but 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:04 | FromGitter | <Varriount> You mean, compile it as a gui application? |
10:08:08 | Tiberium | yeah |
10:08:12 | Tiberium | that's why I was asking him |
10:08:57 | shashlick | Varriount: i've downloaded it from un4seen.com, i don't think there's a debug version |
10:09:11 | Tiberium | compile it by yourself |
10:09:38 | Tiberium | or there's no src? |
10:09:49 | FromGitter | <Varriount> Then my guess is the crash is happening inside the library. |
10:09:59 | shashlick | could be ya |
10:09:59 | FromGitter | <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:07 | shashlick | are my build flags good? |
10:10:16 | Tiberium | ah, yes, BASS is closed-source |
10:10:18 | Tiberium | very sadly |
10:10:28 | Tiberium | BASS 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:56 | Tiberium | for example, you must buy "shareware" license for all platforms separately |
10:11:03 | Tiberium | shashlick: maybe you can use another library? |
10:12:04 | shashlick | ya i considered portaudio |
10:12:19 | shashlick | but wanted to try bass instead since portaudio already has nim bindings :P |
10:12:33 | Tiberium | but it's very hard to do if bass is closed-source |
10:12:53 | Tiberium | I mean it's harder than if bass was open source |
10:14:35 | FromGitter | <Bennyelg> count repeated chars on nim? |
10:14:40 | FromGitter | <Bennyelg> from string |
10:15:06 | FromGitter | <Varriount> What do you mean, total number, or continuous runs? |
10:15:29 | Tiberium | he wants to count chars in string |
10:15:36 | FromGitter | <Bennyelg> benny => b 1 e: 1 n 2 y 1 |
10:15:37 | * | Sentreen quit (Ping timeout: 260 seconds) |
10:15:42 | FromGitter | <Bennyelg> I can do some bad fors |
10:16:10 | Tiberium | pls no |
10:17:10 | * | fastrom quit (Quit: Leaving.) |
10:17:21 | FromGitter | <Bennyelg> in python you do map and then reduceByKey |
10:17:25 | FromGitter | <Bennyelg> same in scala |
10:18:19 | Tiberium | in python you can use Counter from collections |
10:18:29 | dom96 | In Nim you should use a for loop |
10:19:03 | Tiberium | dom96, but there was some library in nim |
10:19:36 | dom96 | perhaps, but this is counting characters in a string. Don't add a library for every little thing you want to do. |
10:20:16 | FromGitter | <Bennyelg> its exactly the "Wordcount" game from strin |
10:20:17 | FromGitter | <Bennyelg> g |
10:20:27 | FromGitter | <Bennyelg> or hadoop map reduce like :smile: |
10:21:20 | Tiberium | can I install all "requires" from .nimble file without installing project itself? |
10:22:10 | Tiberium | ah, doesn't matter anyway |
10:22:12 | * | filcuc quit (Ping timeout: 240 seconds) |
10:29:31 | * | Sentreen joined #nim |
10:31:00 | shashlick | no 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:15 | shashlick | not sure what to make of it |
10:31:16 | FromGitter | <Varriount> Sounds like a buffer overrun |
10:31:37 | FromGitter | <Varriount> Something uses up the buffer every loop, until it goes past the buffer |
10:33:08 | shashlick | every time i run the ChannelGetData() function, i get a chunk out of the buffer |
10:33:32 | shashlick | i can monitor the buffer and can keep it from filling up too much |
10:33:46 | shashlick | so i don't think it is a buffer overrun within bass.dll |
10:34:05 | shashlick | but like you've all said, it's just guesswork now, hard to tell if my nim code is crashing or bass is |
10:34:50 | FromGitter | <Varriount> Are you sure you want to use this sound library? What kind of capabilities do you need? |
10:35:30 | shashlick | nothing exotic - read from mic input and run some ffts |
10:35:35 | shashlick | this lib has ffts built in |
10:36:32 | shashlick | but can only access the fft data via polling |
10:36:49 | shashlick | guess i'll just use the callback mechanism and use kissfft |
10:38:50 | FromGitter | <Varriount> Shashlick: What about portaudio? |
10:42:16 | * | rokups quit (Quit: Connection closed for inactivity) |
10:43:00 | FromGitter | <Varriount> There's http://fftw.org for a fast Fourier transform lib, although that's licensed under GPL |
10:44:43 | FromGitter | <mratsim> Hey folks |
10:44:52 | FromGitter | <Varriount> Hi |
10:46:21 | FromGitter | <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:31 | FromGitter | <mratsim> lining -> linalg |
10:48:20 | FromGitter | <Varriount> @mratsim No using the existing linalg library? |
10:48:29 | FromGitter | <mratsim> Feel free to comment on code style, tests, potential issues (I need to use pointer arithmetics for BLAS interface) |
10:49:12 | FromGitter | <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:06 | FromGitter | <Varriount> So what does this library do differently? |
10:56:51 | FromGitter | <mratsim> Vector, Matrices, 3D, … N-dimensional arrays are unified in a single Tensor type |
10:57:52 | FromGitter | <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:19 | shashlick | have posted on the bass.dll forum, let's see => https://www.un4seen.com/forum/?topic=17618.0 |
11:02:30 | shashlick | i'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:39 | shashlick | thanks for all the help guys! |
11:39:50 | ftsf | shashlick, 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:12 | zachcarter | morning all |
13:30:38 | FromGitter | <mratsim> hello zach |
13:30:50 | * | nsf joined #nim |
13:31:34 | zachcarter | o/ mratsim |
13:35:42 | * | couven92 joined #nim |
13:43:51 | ftsf | o/ |
13:44:24 | zachcarter | ftsf: congrats on getting on greenlight |
13:44:40 | ftsf | cheers, doesn't take much to put it on there, hopefully it'll get approved soon =) |
13:44:52 | zachcarter | still big accomplishment finishing a game |
13:45:10 | zachcarter | or getting a game to the point where it’s ready to be put on GL |
13:45:17 | ftsf | not quite finished but hoping in less than a month it'll be releasable |
13:45:26 | zachcarter | nice! |
13:46:14 | ftsf | which platform are you on zachcarter? |
13:46:19 | zachcarter | osx |
14:14:56 | * | devted joined #nim |
14:22:19 | * | nsf quit (Quit: WeeChat 1.7) |
14:46:16 | zachcarter | sweet 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:21 | zachcarter | http://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:13 | ftsf | is 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:04 | FromGitter | <mratsim> if args were in a tuple you could use tuple deconstruction |
15:28:22 | ftsf | this 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:08 | ftsf | i'm guessing it would be pretty trivial to do with a macro/template |
15:29:10 | FromGitter | <mratsim> I don’t use objects :P |
15:29:20 | FromGitter | <TiberiumPY> What are you using! |
15:29:22 | FromGitter | <TiberiumPY> ? |
15:29:32 | FromGitter | <TiberiumPY> Sorry, I'm from phone now |
15:29:46 | ldlework | ftsf, you put nimsynth on greenlight? |
15:29:53 | ftsf | ldlework, no, my game |
15:30:18 | ftsf | nimsynth is just a side project |
15:30:23 | ldlework | the pico thing? |
15:30:34 | ftsf | http://steamcommunity.com/sharedfiles/filedetails/?id=905664367 racing game |
15:31:05 | FromGitter | <TiberiumPY> I hope it's not Windows only? |
15:31:15 | ftsf | never! |
15:31:29 | FromGitter | <mratsim> @TiberiumPY , joking. I use do use them but very very little |
15:31:30 | ftsf | i do all my dev on linux, and cross compile for windows and osx |
15:32:16 | FromGitter | <mratsim> I’m working on a n-dimensional array library right now so that’s the only object I have |
15:32:36 | FromGitter | <TiberiumPY> Lol, you can cross compile Nim for Windows from Linux? |
15:32:52 | FromGitter | <TiberiumPY> (i mean programs in Nim) |
15:33:00 | ftsf | sure |
15:33:00 | Vladar | TiberiumPY, there's wine you know… |
15:33:07 | FromGitter | <TiberiumPY> I know |
15:33:23 | ftsf | gcc and clang can cross compile to other targets |
15:33:29 | FromGitter | <TiberiumPY> I wonder if this can be automated by travis |
15:33:32 | FromGitter | <mratsim> From the docs it says that the C code is already specialized |
15:33:42 | ftsf | should be able to, i'd like to get that set up |
15:34:15 | FromGitter | <TiberiumPY> ftsf - do you have any specific articles for this |
15:34:18 | FromGitter | <TiberiumPY> ? |
15:34:40 | ftsf | i don't, i haven't seen any specific for nim, but i should write something up about it |
15:35:17 | ftsf | you need to build a c cross compiler first, i'm using mingw32 for windows, and osxcross for osx |
15:35:42 | ftsf | then you can use nim.cfg to define settings for each target, eg. which compiler and settings to use |
15:36:54 | ftsf | libraries can be a bit tricky/different on osx |
15:37:31 | ftsf | https://gist.github.com/ftsf/169688c59fdc9084c1d009fe5d8779b5 eg |
15:38:08 | demi- | tbh, you cannot trust non-apple provided compilers to build libraries correctly on OS X |
15:39:03 | ftsf | i wouldn't trust apple provided anything ;) |
15:39:36 | demi- | why, or are you just being snarky |
15:39:42 | ftsf | apple uses clang however |
15:39:54 | demi- | yeah but there is no published binary spec for mach-o |
15:40:12 | demi- | so apple's tools are the only reliable source for things that will work |
15:40:18 | ftsf | because 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:34 | ftsf | demi-, i tested it and it works |
15:40:53 | demi- | ftsf: that doesn't change what i just said |
15:41:01 | FromGitter | <TiberiumPY> demi-: but mingw isn't official Microsoft software too |
15:41:04 | FromGitter | <TiberiumPY> But it works |
15:41:08 | * | Tiberium joined #nim |
15:41:22 | demi- | TiberiumPY, but microsoft publishes their binary spec, do they not? |
15:41:25 | ftsf | ahh you did say on OSX. but not sure why that matters? |
15:41:44 | ftsf | i've never used a non-apple compiler (other than clang) on OSX. |
15:42:25 | demi- | 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:35 | subsetpark | Do I need to do something special to import an overloaded operator from a different module? |
15:42:40 | ftsf | demi-, why? i can just test it on a mac? |
15:42:51 | Tiberium | subsetpark, no, but this operator must be exported |
15:43:02 | subsetpark | Yeah, it's the exporting that breaks things... |
15:43:08 | Tiberium | noo |
15:43:10 | Tiberium | I mean |
15:43:16 | Tiberium | e.g "proc `+`*(a, b: MyType)", you must have "*" there |
15:43:18 | demi- | 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:23 | subsetpark | Tiberium: that's what I mean too |
15:43:30 | Tiberium | demi-, but what to do then? |
15:43:35 | Tiberium | buy Mac to build things? |
15:43:43 | subsetpark | Error: ambiguous call; both system.$(x: float) and op.$(n: Num) match for: (float) |
15:43:50 | Tiberium | then use |
15:43:53 | demi- | Tiberium: that is what apple wants, since they are in the market of selling hardware |
15:43:55 | Tiberium | op.$(your object) |
15:44:33 | Tiberium | but generally $ operator converts nim objects to strings |
15:44:41 | subsetpark | You need a `$` there - but I get the same ambiguous call error |
15:44:55 | subsetpark | Well no, scratch that - different place I call $ |
15:45:38 | FromGitter | <mratsim> @subsetpark: https://github.com/nim-lang/Nim/issues/5645 |
15:45:38 | subsetpark | But one of the places is in a strutils call, so I can' tsimply replace all instances of $ with mymodule.`$` |
15:46:19 | subsetpark | mratsim: Yes, looks just like the same issue! |
15:48:07 | subsetpark | I 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:41 | FromGitter | <Varriount> ftsf: Regarding your object construction question, there is no shortcut, however you can use the `Type(field: value)` notation |
17:19:43 | ftsf | yes, 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:53 | FromGitter | <TiberiumPY> Sometimes? |
17:26:10 | ftsf | well it seems to work fine sometimes specifying in the wrong order |
17:26:26 | ftsf | but in one instance i've found it made a difference depending on the order |
17:26:41 | FromGitter | <TiberiumPY> Maybe it's a compiler magic |
17:27:09 | FromGitter | <TiberiumPY> So it can figure fields based on field types |
17:39:02 | dom96 | ftsf: can you reproduce it with a small code sample? |
17:49:39 | * | Nobabs27 joined #nim |
18:04:50 | Tiberium | does aporia support nimsuggest? |
18:05:52 | Tiberium | and how to enable it |
18:07:59 | Tiberium | "Could not find nimsuggest in path" |
18:11:13 | Tiberium | wow |
18:11:14 | Tiberium | it works now |
18:11:22 | Tiberium | (had to set up nim path manually in config) |
18:11:41 | Tiberium | wat! even for built-in types |
18:12:10 | Tiberium | and how to use suggest feature? |
18:17:35 | * | babs_ joined #nim |
18:19:51 | * | Nobabs27 quit (Ping timeout: 260 seconds) |
18:23:12 | dom96 | it still works? wow, i'm surprised. |
18:23:39 | ldlework | is 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:04 | dom96 | ldlework: 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:16 | Tiberium | wat! it's very easy to cross-compile nim programs for windows |
20:49:32 | Tiberium | by easy i mean VERY easy (since I luckily have mingw in my distro repos) |
20:49:44 | Tiberium | nim c --os:windows --gcc.linkerexe:"x86_64-w64-mingw32-gcc" --gcc.exe:"x86_64-w64-mingw32-gcc" vkbot |
20:49:53 | Tiberium | sure 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:24 | pydsigner | Interesting |
21:00:30 | FromGitter | <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) |