00:00:16 | krux02 | you could use a very cryptic identifier within the for loop so that other people won't meet this bug as I did. |
00:00:33 | krux02 | wouldn't solve it, but make it less visible. |
00:01:15 | krux02 | as long as the workaround works, I am fine |
00:01:51 | Araq | I won't introduce a hacky workaround |
00:03:17 | * | couven92 quit (Quit: Client disconnecting) |
00:04:51 | * | jh32 quit (Ping timeout: 245 seconds) |
00:21:59 | krux02 | when you are working on the generated names from the compiler, it would be nice, when the compiler would generate names, that encode some readable information, for example the argument types for functions |
00:22:38 | krux02 | but you probably already know that |
00:23:11 | * | bjz_ quit (Ping timeout: 264 seconds) |
00:23:46 | * | bjz joined #nim |
00:24:32 | krux02 | foo_int32_int23_abc123xyz for proc foo(a,b: int32) |
00:27:32 | krux02 | ok, I quit for today. Was nice to talk to you, good night |
00:28:11 | * | yglukhov quit (Remote host closed the connection) |
00:29:00 | * | devted joined #nim |
00:41:15 | * | krux02 quit (Quit: Leaving) |
00:43:52 | niv | finish.exe with the windows nim distro says "No compatible MingW candidates found", but i have mingw and gcc installed in the path the program listed. It doesn't really give any indication what's wrong with it. so, what do I need to run nim on windows? |
00:57:25 | Xe | i'm getting a compiler segfault trying to compile the tests for the rethinkdb library: https://github.com/OpenSystemsLab/rethinkdb.nim |
00:59:19 | Xe | https://gist.github.com/Xe/840d59a60bd78ecb0f944f10731b7568 |
01:00:27 | Xe | https://gist.github.com/Xe/2b57dbfe6cb050291311ea60164ff1c9 |
01:14:24 | * | libman joined #nim |
01:28:41 | * | yglukhov joined #nim |
01:34:51 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
01:39:43 | * | Kingsquee quit (Read error: Connection reset by peer) |
01:40:04 | * | Kingsquee joined #nim |
01:50:31 | * | reactormonk quit (Ping timeout: 248 seconds) |
01:51:40 | * | bjz joined #nim |
01:52:13 | * | reactormonk joined #nim |
01:57:08 | FromGitter | <Varriount> Xe: Could you compile the Nim compiler in debug mode, and give us the resulting stack trace? |
01:58:48 | * | gokr quit (Ping timeout: 240 seconds) |
02:01:37 | Xe | Varriount: how? |
02:03:26 | * | yglukhov quit (Ping timeout: 260 seconds) |
02:05:00 | FromGitter | <Varriount> Xe: `koch boot --stackTrace:on --lineTrace:on` |
02:05:33 | FromGitter | <Varriount> Or my personal favorite, `koch boot --stackTrace:on --lineTrace:on -d:release` |
02:06:10 | Xe | https://gist.github.com/Xe/687c4853c2a5a3161ff7ad07cdebc77c |
02:07:37 | FromGitter | <Varriount> Xe: I think you can turn the verbosity down. |
02:08:02 | Xe | https://gist.github.com/d6c54133e219de01ea3d3002ac009668 |
02:08:06 | FromGitter | <Varriount> Anyway, if you can develop a minimal test case that causes that same stack trace, and file an issue, then that would be great. |
02:09:00 | FromGitter | <Varriount> It looks like something is going wrong with object cases? Are you using object variants at all? |
02:12:43 | Xe | i am not sure if the author of this library used that or not |
02:13:33 | Xe | however, the line of code that is compiled last before nim segfaults is https://github.com/OpenSystemsLab/rethinkdb.nim/blob/master/private/rql.nim#L268 |
02:13:52 | Xe | https://github.com/OpenSystemsLab/rethinkdb.nim/blob/master/private/queries/writing.nim |
02:14:48 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:20:49 | * | Pisuke quit (Excess Flood) |
02:20:53 | * | chemist69 quit (Disconnected by services) |
02:20:58 | * | chemist69_ joined #nim |
02:21:58 | * | Pisuke joined #nim |
02:36:23 | * | arnetheduck quit (Ping timeout: 248 seconds) |
02:40:38 | FromGitter | <endragor> /mark- |
02:50:09 | * | kulelu88 quit (Quit: Leaving) |
02:54:22 | FromGitter | <endragor> @dom96 so in your chat client example 1) there is up to 500ms delay from the moment the line is read till the moment it's processed; 2) there is a race condition - the flow var can get ready before the connect() is finished, so you would send to not connected socket. |
02:59:22 | FromGitter | <endragor> (1) could be "fixed" by using `poll(1)` but that's not a natural flow and wastes CPU time. AsyncEvents allow to have a pool of threads that do async IO and communicate with each other naturally. |
03:17:03 | * | ludocode quit (Disconnected by services) |
03:17:04 | * | ludocode_ joined #nim |
03:56:11 | * | brson quit (Quit: leaving) |
03:58:33 | * | def-pri-pub quit (Ping timeout: 252 seconds) |
03:58:52 | * | libman2 joined #nim |
04:00:13 | * | def-pri-pub joined #nim |
04:00:16 | * | yglukhov joined #nim |
04:01:02 | * | libman quit (Ping timeout: 256 seconds) |
04:05:00 | FromGitter | <zacharycarter> think I figured it out |
04:06:18 | * | yglukhov quit (Ping timeout: 276 seconds) |
04:18:11 | * | libman2 quit (Ping timeout: 260 seconds) |
04:23:36 | * | libman joined #nim |
04:28:11 | * | libman quit (Ping timeout: 245 seconds) |
04:35:08 | * | def-pri-pub quit (Quit: leaving) |
04:46:27 | * | devted quit (Quit: Sleeping.) |
04:47:45 | * | libman joined #nim |
04:52:11 | * | libman quit (Ping timeout: 240 seconds) |
05:07:15 | * | manjaroi3 quit (Quit: leaving) |
05:12:51 | FromGitter | <barcharcraz> is there a way to set the directory that nim outputs to, not the output filename? |
05:13:12 | FromGitter | <barcharcraz> just setting --out to a directory works but the exe name becomes the first module compiled (so like stdlib_system.exe) |
05:21:23 | FromGitter | <vegansk> @barcharcraz , just set it with the desired filename. We use it like this in config.nims: ``switch "out", binDir / outFileName.toExe`` |
05:21:55 | FromGitter | <barcharcraz> right but I want my whole tree to ALWAYS output to a given location |
05:22:04 | FromGitter | <barcharcraz> even when I'm just compiling to make sure codegen and stuff works |
05:26:31 | FromGitter | <vegansk> @barcharcraz , create function for it. Here is the example of build config. All test produces executables in the ``bin`` directory. https://github.com/vegansk/nimboost/blob/master/config.nims#L49 |
05:28:09 | FromGitter | <barcharcraz> do you have to execute that with nim e? |
05:28:27 | FromGitter | <barcharcraz> I could not get my compiler to pick up nims files when just running nim c {somefile} |
05:41:25 | FromGitter | <vegansk> @barcharcraz , nim help shows you all build targest. Then run nim ``target``, for example ``nim test`` runs this task (https://github.com/vegansk/nimboost/blob/master/config.nims#L72). It's documented here: http://nim-lang.org/docs/nims.html |
05:42:02 | FromGitter | <vegansk> Build file must be named ``config.nims`` |
06:03:14 | * | yglukhov joined #nim |
06:07:37 | * | yglukhov quit (Ping timeout: 255 seconds) |
06:09:25 | FromGitter | <Varriount> Nimscript documentation need better visibility/discoverability |
06:11:08 | FromGitter | <khchen> @Varriount just want to say thank you. I use your nimlime a lot. |
06:26:49 | cheatfate | khchen, what features of NimLime your are use most often? |
06:35:11 | FromGitter | <khchen> highlight and compile, lol |
06:51:41 | FromGitter | <dom96> @endragor imo the solution here is for the channels module to get a async recv proc. I don't know how difficult that is but I'm sure it's doable. Using asyncdispatch from multiple threads seems like a good way to shoot yourself in the foot. I disagree that using AsyncEvent is natural. |
06:52:32 | * | nsf joined #nim |
06:55:01 | FromGitter | <dom96> Nice catch on the race condition. For simplicity's sake I'm willing to take that risk though. |
06:55:11 | cheatfate | dom96: combining `channels` and `asyncdispatch` is not natural, because you can't poll() for async events and channels at the same time... |
06:55:15 | FromGitter | <Varriount> What are the plans for async + threads in the future? It's an obvious step forward, but one that's architecturally difficult to do without severely limiting end users. |
06:55:40 | FromGitter | <Varriount> @khchen Thanks. :D |
06:55:57 | Araq | plans? it needs to work. |
06:56:46 | cheatfate | Araq, what must work? channels and async? |
06:57:09 | Araq | yes |
06:57:17 | cheatfate | start using pipes |
06:57:36 | FromGitter | <dom96> @cheatfate it is perfectly natural. I'm sure whatever way channels are implemented supports polling via epoll et al. |
06:57:42 | FromGitter | <Varriount> @Araq I was more asking about the asynchronous stuff in general. Current the implementation is single threaded. |
06:58:47 | cheatfate | dom96, interesting do we support epoll only? or we need to support kqueue/epoll/iocp? |
06:59:18 | FromGitter | <dom96> I'm not sure yet (!). But I think that async won't automatically start parallelising your code. |
06:59:55 | FromGitter | <dom96> @cheatfate "et al. "! |
07:00:13 | FromGitter | <dom96> Maybe etc would have been clearer |
07:00:22 | * | Vladar joined #nim |
07:00:23 | cheatfate | dom96, sorry but english not my own language, i dont know what is "et al." |
07:00:25 | FromGitter | <Varriount> @dom96 No, that's not the way to go. But there should certainly be the option. |
07:01:02 | FromGitter | <dom96> I am well aware that we support those. But since I am on my phone I don't feel like writing them down. |
07:01:05 | FromGitter | <Varriount> @dom96 I think you meant 'etc'. 'et al.' is for a group of people. |
07:01:29 | FromGitter | <dom96> Yeah. I just woke up :) |
07:01:43 | cheatfate | dom96, on posix systems kqueue/epoll doesn't support any notifications on posix events/threads/mutexes and other shit |
07:02:03 | FromGitter | <Varriount> Though, wiktionary tells me both can be used more or less interchangeably, there's still a de facto usage. |
07:02:23 | FromGitter | <Varriount> https://dbsoundworks.bandcamp.com/album/crypt-of-the-necrodancer-amplified-ost |
07:02:25 | cheatfate | dom96, if you want to start using signals to notify about data available in channel, then it will be large overhead... |
07:02:45 | cheatfate | dom96, and this overhead will be much more then just using pipes (asyncpipes) |
07:02:56 | FromGitter | <dom96> @Varriount :D |
07:03:34 | FromGitter | <dom96> Perhaps the underlying implementation should be AsyncEvent. I don't know. |
07:04:24 | FromGitter | <Varriount> @dom96 This might give you ideas: http://pyparallel.org/ |
07:04:29 | FromGitter | <dom96> @Varriount is C#'s async automatically parallel? |
07:05:40 | cheatfate | Araq, the best way to replace AsyncEvent + channels is to use AsyncPipes, maybe you will need to get some marshalling code from channels and just use asyncpipes as data transfer channel... |
07:06:24 | FromGitter | <Varriount> @dom96 Wrong person to ask. I could google it though. |
07:06:47 | FromGitter | <dom96> The answer is no :p |
07:07:20 | FromGitter | <dom96> That :P emote on gutter |
07:07:31 | FromGitter | <dom96> *gitter is horrifying. |
07:07:50 | FromGitter | <dom96> Also. Auto complete on my phone fails miserably with these programming terms. |
07:08:04 | FromGitter | <dom96> Time for work |
07:08:14 | FromGitter | <Varriount> @dom96 The easiest way (for both the implementation and end-user api) might be to just have multiple threads that each run their own loop |
07:08:41 | FromGitter | <Varriount> And maybe some way for multiple loops to share certain resources (like listening on a port for new connections) |
07:08:48 | FromGitter | <dom96> Or you could just let the user do that themselves |
07:09:14 | FromGitter | <Varriount> I don't know if the async framework exposes enough for that to be currently done. |
07:09:35 | FromGitter | <dom96> Then it should |
07:09:54 | FromGitter | <dom96> But it shouldn't automatically parallelize stuff as I've said |
07:10:05 | FromGitter | <Varriount> And I agree. |
07:10:25 | FromGitter | <Varriount> But provided a nice way for users to start a loop in a new thread, and allow for sharing of resources... |
07:10:30 | FromGitter | <Varriount> *providing |
07:12:01 | FromGitter | <Varriount> I envision it as some server having a main thread that spawns off 4+ worker threads, each handling a client pool. |
07:12:30 | FromGitter | <Varriount> Perhaps with the main thread containing "global" state that all threads need. |
07:26:56 | * | filcuc joined #nim |
07:28:34 | FromGitter | <barcharcraz> wow I need to sleep |
07:29:05 | FromGitter | <barcharcraz> tomorrow I think I'll have a library where you can write stuff like ⏎ ⏎ ```db.exec(sql"select * from test 1``` [https://gitter.im/nim-lang/Nim?at=5889a540c19662f15390aea3] |
07:29:15 | FromGitter | <Varriount> No rest for the wicked. Or in my case, for the one who needs to both study for a german course and do 12 hours of work for his job. |
07:30:25 | FromGitter | <barcharcraz> yeah same |
07:30:33 | FromGitter | <barcharcraz> It's 2:30 AM here |
07:31:02 | FromGitter | <barcharcraz> but I have a plan for how to write an sql library that makes nim literally easier to do sql in than plpgsql |
07:31:19 | FromGitter | <barcharcraz> *assuming you know your schema at compile time* |
07:37:12 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
07:38:45 | FromGitter | <barcharcraz> it'll get all the types right too |
07:39:44 | FromGitter | <barcharcraz> and allow the user to define their own types per column (for example maybe I want some blob column to convert to an image type) |
07:40:59 | FromGitter | <Varriount> @barcharcraz I recommend starting with a small, well-developed base, and go from there. |
07:41:15 | FromGitter | <barcharcraz> yeah I am |
07:41:46 | FromGitter | <barcharcraz> getting simple mapping to native types (BLOB to seq[uint8], text to string, etc) working first |
07:41:54 | FromGitter | <barcharcraz> also not doing inserts to start |
07:43:48 | FromGitter | <barcharcraz> I'd like to allow something like "INSERT INTO table (something) VALUES (:myvariable)" to just automatically generate the binding code to bind a nim variable named myvariable to the :myvariable parameter |
07:45:14 | FromGitter | <barcharcraz> using staticExec LIBERALLY |
07:45:53 | * | Kingsquee joined #nim |
07:49:36 | FromGitter | <barcharcraz> @dom96 c#'s async is not parallel afaik |
07:55:26 | * | Guest89004 joined #nim |
08:02:10 | * | gokr joined #nim |
08:02:23 | * | libman joined #nim |
08:11:49 | FromGitter | <endragor> @dom96 asyncdispatch works from multiple threads just fine, and it's not uncommon in other systems for threads to have their own event loops and asyncdispatch is designed to support that. `asyncRecv` for channels would have to use AsyncEvents or some analogy anyway. What I use, specifically, is a wrapper that holds a pair of Channel[T] and AsyncEvent. And it looks/works pretty naturally. ⏎ Channel doesn't use anything related to IO or |
08:11:49 | FromGitter | ... epoll - it's based on mutexes and condition variables. |
08:13:43 | cheatfate | endragor: for such situation its much better to use https://github.com/cheatfate/asynctools/blob/master/asynctools/asyncpipe.nim |
08:17:45 | * | jh32 joined #nim |
08:18:43 | FromGitter | <endragor> @cheatfate 1) the API is too low-level, Channels support passing GCed objects, while this just supports passing bytes, so I would have to reimplement/copy a part of channels implementation for that to work. 2) pretty sure it would be slower as data is passed through IO pipeline instead of plain memory copying. |
08:20:45 | * | yglukhov joined #nim |
08:21:12 | cheatfate | 1) agree 2) i dont think it would be slower, because i know how AsyncEvent is implemented... |
08:22:00 | cheatfate | in your situation it will be slower for big chunks of data |
08:22:17 | cheatfate | which will be more then pipe buffer data |
08:22:24 | FromGitter | <endragor> yes, that's what I mean |
08:23:25 | * | yglukhov_ joined #nim |
08:23:25 | * | yglukhov quit (Read error: No route to host) |
08:26:31 | * | libman quit (Ping timeout: 245 seconds) |
08:31:30 | * | yglukhov_ quit (Remote host closed the connection) |
08:31:50 | cheatfate | endragor: but you need to understand that pipes are not files and don't use IO pipeline, pipe operations mostly looks like (lock, copy data to userspace/kernelspace, unlock) |
08:32:00 | * | libman joined #nim |
08:34:19 | FromGitter | <endragor> @cheatfate ok, I might benchmark that when I have time. but anyway AsyncEvent+Channel works pretty well, except for the problem that I mentioned yesterday which is not really about AsyncEvents, but about asyncdispatch's support for multithreading. |
08:44:51 | * | Andris_zbx joined #nim |
08:45:58 | * | yglukhov joined #nim |
08:47:21 | * | cyraxjoe quit (Ping timeout: 255 seconds) |
08:47:51 | FromGitter | <dom96> @endragor it might work just fine but it wasn't designed for it. |
08:48:22 | * | cyraxjoe joined #nim |
08:48:56 | FromGitter | <dom96> And I bet it's not exactly stable as a result of that. |
08:53:40 | FromGitter | <endragor> @dom96 what was not designed for it, exactly? |
08:54:50 | FromGitter | <dom96> I never placed too much emphasis on threading while designing it, so it wasn't designed for it. |
08:57:07 | FromGitter | <endragor> that's a characteristic of Nim's stdlib in general, and that is also an important direction for improvement |
08:57:42 | FromGitter | <dom96> sure, and that's because threading was implemented relatively late in Nim's development. |
09:03:21 | FromGitter | <dom96> But okay, keep using AsyncEvent just keep in mind that the API of upcoming can still change. |
09:04:43 | FromGitter | <endragor> sure, just as any other stdlib API :) I'm fine with that. thanks for your interest and arguments! |
09:04:52 | FromGitter | <dom96> I still need to thoroughly look through that code, but based on a quick look I can already see that the ``addEvent`` proc should return a ``Future`` instead of taking a callback. |
09:05:02 | FromGitter | <dom96> hehe, sure. |
09:08:45 | * | Andris_zbx quit (Ping timeout: 256 seconds) |
09:09:13 | * | Andris_zbx joined #nim |
09:19:36 | * | hendi_ joined #nim |
09:21:38 | cheatfate | dom96, really? maybe you want to change addRead/addWrite to return Future too? |
09:24:29 | FromGitter | <dom96> oh. That makes sense :) |
09:24:52 | * | PMunch joined #nim |
09:26:24 | * | yglukhov quit (Remote host closed the connection) |
09:26:29 | * | PMunch quit (Client Quit) |
09:26:37 | * | PMunch joined #nim |
09:27:34 | cheatfate | i have made my additions named `addXXX` because i can't always understand your `naming conventions`... also addEvent its more suitable to have callback interface, because event can be signaled many times... but Future is one-time only |
09:30:32 | FromGitter | <dom96> You've done it correctly. Are you suggesting that my naming conventions don't make sense? |
09:35:10 | cheatfate | Just remember or disputes on `sleepAsync` vs `asyncSleep`... also i think asyncCheck must be renamed to something else, because nobody uses it for `check`, everybody uses it for just spawning not controlled task |
09:38:10 | cheatfate | maybe spawnAsync or asyncSpawn will be nice name for asyncCheck |
09:39:20 | Araq | ^ yup. asyncCheck is misnamed |
09:39:37 | Araq | it should be spawnAsync |
09:39:50 | Araq | or asyncSpawn ... lol |
09:39:55 | * | yglukhov joined #nim |
09:40:53 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
09:41:06 | PMunch | Hi, I'm looking at some older Nim code (2014) which now throws some errors |
09:41:44 | PMunch | Specifically "discard selector.register(self.socket.getFD, {EvRead}, nil)" which throws "Error: expression '...' has no type (or is ambiguous)" |
09:44:29 | FromGitter | <dom96> cheatfate: Araq: Nope. asyncCheck makes sense. it doesn't spawn anything, it checks for exceptions in the returned future. |
09:44:50 | FromGitter | <dom96> "Spawning" occurs when you call an async procedure |
09:44:58 | Araq | PMunch: so remove the 'discard' |
09:45:02 | Araq | the API changed. |
09:45:19 | FromGitter | <dom96> PMunch: it means that register no longer has a return type |
09:45:27 | Araq | what it does surely looks like spawning to me |
09:45:33 | PMunch | Aah, that would explain it |
09:45:44 | PMunch | According to the docs it still has one: http://nim-lang.org/docs/selectors.html#register,Selector,SocketHandle,set[Event],SelectorData |
09:45:51 | PMunch | That's why I was confused :P |
09:46:09 | Araq | maybe the windows version wasn't updated |
09:46:14 | Araq | the docs are build on windows |
09:46:17 | Araq | *built |
09:46:38 | FromGitter | <dom96> Araq: even more reason to keep the name... |
09:46:57 | FromGitter | <dom96> Have you ever looked at the implementation of ``asyncCheck``? |
09:47:15 | FromGitter | <dom96> The only thing that might change is that it will become implicit. |
09:47:22 | FromGitter | <endragor> @cheatfate so `proc close*(dispatcher: PDispatcher)` would call `selector.close()` on non-Windows and do nothing on Windows, right? or is there anything to be done on Windows? |
09:47:25 | FromGitter | <dom96> But I'm not sure what effect that will have yet |
09:48:00 | Araq | so what's the proper way to spawn an async task? you know, somehow I need to call the .async proc |
09:49:08 | cheatfate | Araq, asyncCheck, lol :) |
09:50:04 | PMunch | Wow, the Nim version in the Ubuntu repositories is super old :S |
09:50:33 | Araq | surprise. |
09:50:50 | PMunch | Haha, guess not. One of the reasons why I've moved on from it.. |
09:50:55 | Araq | news: Linux package management is stupid. |
09:51:12 | PMunch | Ey, Linux package management is great |
09:51:36 | Araq | sure, if you want to conflate OS updates with software updates... |
09:51:45 | PMunch | It's just that distributions like Ubuntu with a high focus on stability typically ends up freezing all updates.. |
09:51:50 | cheatfate | endragor: there is a problem, because if something registered left inside of IOCP port it will not be closed with closeHandle(), and there can be pending IO operations which must be cancelled with CancelIO, and if there pending timers/process/event waiters it must be unregistered |
09:52:32 | PMunch | Ah, yes that is one of the things that is a bit annoying. But then again, on Linux the line between OS and installed programs is pretty blured in many cases |
09:53:20 | PMunch | For example I can install a distribution with Gnome, and then later on install e.g. KDE and remove Gnome completely. |
09:54:07 | PMunch | So suddenly the entire machine has changed it's look and feel, menues, and many background things. The way to install packages might even have changed. |
09:55:20 | FromGitter | <endragor> @cheatfate hmm, maybe in such case it would be a good idea to raise exception from close() because it would mean the developer didn't cleanup the handles properly. |
09:55:58 | Araq | dom96: your async work is superb but asyncCheck really is misnamed. |
09:56:10 | Araq | you named it from the implementation perspective. |
09:56:26 | Araq | for a poor user the "spawn" aspect is what matters, not the checking aspect |
09:57:44 | FromGitter | <endragor> but the "spawn" happens just when you call the async procedure, as @dom96 said. even if you `discard someAsync()` - the procedure will still execute, you just will never know the results |
09:58:18 | FromGitter | <dom96> exactly |
09:58:45 | Araq | hmmm true |
09:59:00 | Araq | the spawn is the proc call. |
10:01:37 | * | couven92 joined #nim |
10:05:23 | PMunch | Quick note, here http://nim-lang.org/download.html it really should be ./koch tools as koch isn't added to path |
10:08:21 | couven92 | PMunch, works fine on windows with the ./ ! :P |
10:08:29 | couven92 | s/with/without |
10:09:11 | couven92 | so, from my point of view a .\koch might be a good idea! :D |
10:09:17 | PMunch | Yeah, because Windows treats wd as part of the path |
10:09:38 | PMunch | But these are the Linux/Mac OSX install instructions |
10:09:39 | Araq | on my Unix systems I have '.' in my PATH too |
10:09:42 | PMunch | So this is a moot point.. |
10:10:53 | couven92 | Anyways, I have always wondered, why don't we put koch into the bin folder next to the nim binary? Because I do that by running >nim c -d:release -o:bin\koch koch |
10:11:00 | couven92 | Then it would also be in the PATH |
10:11:16 | PMunch | Yeah, that would be better. Now it puts it in the working directory? |
10:11:28 | couven92 | Ah wait... koch needs you to be at the Nim source root, right? |
10:12:02 | PMunch | So if you follow the instructions to the letter you have probably gone out to ~ to change .bashrc and when you then run the command koch ends up in ~ |
10:20:17 | FromGitter | <dom96> You usually only need to use koch once. |
10:20:30 | FromGitter | <dom96> So I don't think adding it to the PATH is necessary. |
10:21:03 | couven92 | @dom96 whaaat? I use it ALL the time! :P (Because I compile Nim from source way too often!) :D |
10:22:03 | FromGitter | <dom96> That's usually preceded by a ``git pull`` for me, and since I need to be in Nim's directory for that anyway... |
10:23:06 | couven92 | Is this maybe a good solution?: ./koch boot -nimroot:./Source/GitHub/nim-lang/Nim |
10:23:36 | couven92 | i.e. having an arg to koch to specify where it should do its work from? |
10:29:01 | cheatfate | dom96, i just want to make everything async named without any suffixes and prefixes and all sync shit must be named with readSync, writeSync :) |
10:29:31 | cheatfate | we need to deprecate all sync functions :) |
11:01:08 | * | NhanH quit (Quit: Connection closed for inactivity) |
11:02:32 | * | yglukhov quit (Remote host closed the connection) |
11:05:08 | * | gangstacat quit (Quit: Ĝis) |
11:08:21 | * | gangstacat joined #nim |
11:12:38 | * | bjz_ joined #nim |
11:13:03 | * | bjz quit (Ping timeout: 252 seconds) |
11:14:51 | PMunch | Hmm, any examples of how to use the Jester settings macro? |
11:17:33 | * | yglukhov joined #nim |
11:19:25 | PMunch | Never mind, found something in tests/alltest.nim .. |
11:39:34 | * | arnetheduck joined #nim |
11:44:52 | * | Andris_zbx quit (Remote host closed the connection) |
11:46:21 | * | yglukhov quit (Remote host closed the connection) |
11:50:06 | * | Andris_zbx joined #nim |
12:03:13 | * | Snircle joined #nim |
12:03:34 | * | yglukhov joined #nim |
12:06:51 | * | djellemah quit (Remote host closed the connection) |
12:12:07 | * | rokups joined #nim |
12:18:38 | * | vlad1777d joined #nim |
12:19:47 | * | krux02 joined #nim |
12:38:36 | * | gokr quit (Ping timeout: 240 seconds) |
12:48:55 | demi- | what is the proper way to have a return value be discarded? I'm using os.splitFile(), which seems to return a tuple `(dir, name, ext)` and I'm only interested in the file extension itself, in python i'd write this as `_, _, ext = os.splitFile()` but i'm unsure how to get that same behavior in nim -- i've just tried to use `_` as a variable for the first two values there and it seems to compile and run fine but |
12:48:57 | demi- | i'm not sure if that is correct. |
12:50:08 | * | devted joined #nim |
13:01:45 | * | byte512 joined #nim |
13:06:34 | * | gokr joined #nim |
13:17:15 | * | yglukhov quit (Remote host closed the connection) |
13:17:28 | * | gokr quit (Read error: Connection reset by peer) |
13:17:59 | PMunch | demi-, http://nim-lang.org/docs/tut1.html#advanced-types-tuples |
13:18:11 | PMunch | As you can see your syntax will just assign everything to ext |
13:18:15 | PMunch | And not actually split it |
13:18:24 | * | yglukhov joined #nim |
13:19:47 | demi- | sorry, in nim i've written it as `(_, _, ext)` |
13:28:29 | * | rupil joined #nim |
13:28:40 | PMunch | Ah good |
13:29:27 | demi- | so that is correct, the single underscore for both means they will get discarded? |
13:30:32 | PMunch | I believe so, yes |
13:31:01 | PMunch | Can't find much in the docs but googling around it seems like that's the way to do it |
13:32:28 | demi- | ok, cool. Thanks! |
13:34:40 | rokups | is there any way to check on backend compiler defines? i need different behavior when glibc is used. `defined()` appears to be working only with nim stuff though |
13:36:08 | hohlerde | is there a way to fully dynamically use a shared library in nim, i.e. getting address of function via symAddr and pass any number of arguments as needed? |
13:37:27 | rokups | certainly |
13:38:06 | hohlerde | I only found examples casting the pointer returned by symAddr to the desired function |
13:38:51 | rokups | dll loading is OS stuff, consult your OS documentations on how its done. then these calls will be importc-pragma-away |
13:40:21 | demi- | I am noticing that the nim compiler (transpiler??) is inlining all the procs (in the generated binary) instead of defining them as separate functions, is there a way to disable this behavior? |
13:41:05 | rokups | tried disabling optimizations? |
13:42:29 | demi- | This is from just running `nim compile foo.nim` |
13:44:19 | * | yglukhov quit (Remote host closed the connection) |
13:44:51 | * | yglukhov joined #nim |
13:47:27 | * | gokr joined #nim |
13:51:25 | * | chemist69_ quit (Quit: WeeChat 1.6) |
13:51:43 | * | chemist69 joined #nim |
13:52:17 | * | gokr quit (Ping timeout: 255 seconds) |
13:58:51 | chemist69 | Hi Araq, on Github you mentioned the possibility to upload windows binaries for libui (libui.dll). Could you still do that, if possible compiled without debug symbols (because with debug symbols I need additional libs to run it on windows). I tried the binary from https://github.com/rjopek/hbui/tree/master/docs/tutorial#binary-download, but it does work in my hands. My programs directly quit again without |
13:58:53 | chemist69 | showing a GUI and show no error messages on the win console, either. |
14:05:55 | * | yglukhov quit (Remote host closed the connection) |
14:06:07 | * | yglukhov joined #nim |
14:09:44 | cheatfate | demi-, it looks like you are macos professional could i ask you some tech questions i'm interested in? |
14:09:50 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:12:13 | demi- | lol, i can try |
14:18:01 | cheatfate | demi-, most interesting question is how macos ui event loop is implemented internally, is it possible somehow to catch ui events with `kqueue`? |
14:20:09 | * | gokr joined #nim |
14:20:24 | demi- | https://opensource.apple.com/source/CF/CF-855.17/CFRunLoop.c <- this is how the native UI event loops are done, we have thread 0 (main thread) dedicated to UI work specifically. All other work gets done on separate threads and calls to update the UI by redrawing the display are dispatched to this main ththread that has this runloop. |
14:20:56 | demi- | this is to always have a responsive UI, regardless of any amount of processing or work the system might be involved in. |
14:21:29 | * | gokr quit (Read error: Connection reset by peer) |
14:26:03 | cheatfate | demi-, it looks like all this threads are communicating with main thread using machport or machports |
14:26:07 | cheatfate | am i right? |
14:26:14 | demi- | yeah |
14:28:22 | cheatfate | macos' kqueue supports mach ports, so somehow i can catch this events with kqueue |
14:28:36 | cheatfate | so question number 2 is there any ways to get this machport from thread? |
14:29:37 | cheatfate | maybe some `hack` ways? :) |
14:29:42 | * | michael_campbell joined #nim |
14:30:06 | demi- | are you talking about a process you start up and own? |
14:30:30 | cheatfate | yep |
14:32:28 | demi- | these two pages will probably be helpful for you: http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/ https://developer.apple.com/library/content/documentation/Darwin/Conceptual/KernelProgramming/Mach/Mach.html |
14:33:43 | demi- | this is an aspect that apple doesn't directly document (at all) so here be dragons even though it is how it is officially/formally done. |
14:34:46 | cheatfate | thanks for help |
14:36:03 | demi- | no problem! |
14:38:05 | * | yglukhov quit (Remote host closed the connection) |
14:38:40 | * | yglukhov joined #nim |
14:40:49 | * | gokr joined #nim |
14:43:06 | * | yglukhov quit (Ping timeout: 240 seconds) |
14:49:35 | * | arnetheduck quit (Ping timeout: 264 seconds) |
14:59:25 | * | yglukhov joined #nim |
15:08:08 | * | yglukhov quit (Remote host closed the connection) |
15:13:08 | * | yglukhov joined #nim |
15:32:06 | * | filcuc quit (Ping timeout: 240 seconds) |
15:34:54 | demi- | ok my earlier question about `proc`s becoming inlined is starting to bother me more -- i don't know how nim defines scoping and when variables will be shadowed due to scope when using sequtils.filter/map/apply. |
15:50:06 | * | Guest89004 quit (Ping timeout: 240 seconds) |
15:52:56 | * | devted quit (Read error: Connection reset by peer) |
16:00:07 | cheatfate | demi-, actually map/filter/apply is declared as {.inline.} its why it inlined |
16:01:36 | * | yglukhov quit (Remote host closed the connection) |
16:02:33 | * | PMunch quit (Quit: leaving) |
16:03:09 | cheatfate | or you talking about your `proc` passed to map/filter/apply? |
16:07:22 | * | yglukhov joined #nim |
16:16:58 | * | nsf quit (Quit: WeeChat 1.7) |
16:18:13 | * | pregressive joined #nim |
16:22:20 | * | pregressive quit (Client Quit) |
16:22:48 | * | Trustable joined #nim |
16:26:50 | * | rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:27:47 | Araq | chemist69: http://nim-lang.org/download/libui.dll sorry for the delay |
16:27:51 | Araq | that's the 32bit version |
16:27:56 | Araq | works for me |
16:40:05 | gangstacat | could not load: libui.dll (installed in both the folder with the controlgallery exe and in system32) -d:nimDebugDlOpen doesn't give anything |
16:40:41 | * | hendi_ quit (Quit: hendi_) |
16:44:42 | Araq | hmmm |
16:45:16 | Araq | let me build a non-debug DLL then |
16:46:02 | cheatfate | Araq, for some reason libui.dll you placed has dependency on uxtheme.dll |
16:46:35 | Araq | what's that? windows 10 specific? |
16:49:19 | * | brson joined #nim |
16:50:02 | cheatfate | i dont know but looks like it uses too much dlls |
16:53:53 | Araq | yay and ofc cmake -DCMAKE_BUILD_TYPE=Release .. does not work |
16:54:17 | Araq | not too mention that's like the most obscure command to produce a release build ... why do people use cmake? |
16:54:50 | krux02 | because the alternatives are even worse? |
16:54:54 | GaveUp | ^ |
16:55:26 | krux02 | autotools, scons, qmake, ... |
16:55:26 | cheatfate | looks like cmake is not better then make :) |
16:55:39 | krux02 | cmake is even more verbose that make |
16:56:45 | krux02 | I think instead of cmake, they should just have made a facade for the visual studio compiler, to understand gcc/clang/intel compiler option syntax |
16:56:55 | krux02 | then just make everywhere |
16:57:30 | Araq | the idea to produce makefiles is already bonkers |
16:57:49 | Araq | the make "algorithm" is like 100 lines of code. |
16:57:53 | krux02 | fun fact, my most stared project on github is https://github.com/krux02/minimal_cmake_example |
16:58:13 | Araq | I have implemented it twice. |
16:58:28 | krux02 | yes exactly what I think, too |
16:58:43 | krux02 | and it is super indirect |
16:59:24 | krux02 | I write procedural code, that writes configurations for build targets that then get compiled to make files that then should compile the project |
16:59:26 | krux02 | yay |
16:59:56 | krux02 | why not just code that compiles my files? |
17:00:03 | krux02 | that would be too complicated |
17:02:20 | cheatfate | i think somebody must just write smartMake program which just follow #include headers will compile everything without any specific instructions |
17:03:00 | krux02 | no, someone should replace c++ with a language, that just compiles |
17:03:17 | cheatfate | c++ already replaced many times... |
17:03:34 | cheatfate | i'm looking for smartMake for C |
17:03:56 | krux02 | forget it |
17:04:01 | krux02 | C is not a smart language |
17:04:40 | cheatfate | i dont need smart language |
17:04:43 | cheatfate | i need to be smart |
17:04:49 | cheatfate | not language |
17:06:02 | Araq | I'm trying to build it directly now via .compile pragmas |
17:06:23 | krux02 | in C you can always recompile everything |
17:06:26 | Araq | Nim is often better at building C/C++ code than "tools" that claim to do that |
17:06:52 | krux02 | don't make yourself dependent on environment variables (I hate those people who make me depend on them) |
17:07:07 | Araq | ha me too. |
17:07:15 | krux02 | and only introduce modules, when you really need to split the build to be more incremental |
17:07:24 | gangstacat | Araq, is nim c controlgallery.nim enough to use your provided dll on Windows? |
17:07:43 | Araq | gangstacat: yes but just wait |
17:07:54 | Araq | I'm trying to directly embed the C code |
17:08:03 | gangstacat | yes no worry, just wondered of there was a switch to add or something |
17:08:08 | gangstacat | if* |
17:10:18 | * | yglukhov quit (Remote host closed the connection) |
17:10:27 | cheatfate | Araq, if i have test: tioselectors.nim and i want to run 2 tests with it like `nim c --threads:on -d:threadsafe tioselectors` and `nim c tioselectors` is it possible? |
17:11:00 | * | yglukhov joined #nim |
17:11:25 | Araq | cheatfate: yes but you need to touch categories.nim for that |
17:11:40 | cheatfate | Araq, omg again |
17:11:53 | cheatfate | Is it possible to make via .nims file or .cfg? |
17:11:59 | Araq | bbl |
17:14:56 | * | yglukhov quit (Remote host closed the connection) |
17:15:10 | * | yglukhov joined #nim |
17:16:20 | * | yglukhov quit (Remote host closed the connection) |
17:25:17 | * | Andris_zbx quit (Remote host closed the connection) |
17:31:27 | demi- | cheatfate: I mean my regular `proc`s are being inlined based on the code in the generated binary |
17:32:30 | cheatfate | demi-, i think it was inlined because you are used not `proc` but `iterator`, but i'm mostly low-level guy, so you need to ask Araq about this |
17:32:50 | demi- | ok i should make an example for this |
17:40:11 | demi- | oh, hmmm, i think i am mistaken and misread the asm; i guess i don't have a problem after all. |
17:40:13 | * | askatasuna joined #nim |
17:42:36 | * | vlad1777d quit (Remote host closed the connection) |
17:44:49 | * | vlad1777d joined #nim |
17:51:01 | demi- | if i'm building a nim executable binary by transpiling to C, then compiling that using clang -- should i be able to use clang's tooling to perform additional validation such as ASAN or TSAN or the static analyzer to track down additional issues with my code, or would that more likely turn up false results due to nim's implementation? |
17:51:03 | * | hcorion joined #nim |
18:01:06 | * | nsf joined #nim |
18:02:03 | cheatfate | demi-, sometimes we have memory troubles too, so i think it will be interesting, but compiler must be modified to implement such step |
18:02:26 | demi- | ah, ok |
18:03:41 | * | yglukhov joined #nim |
18:04:35 | enthus1ast|trave | Varriount, that sublime bug is still in there its popping up randomly, no clear way to reproduce it so far.. |
18:08:11 | * | yglukhov quit (Ping timeout: 240 seconds) |
18:09:55 | Araq | demi-: the static analyser will likely only produce garbage |
18:10:07 | demi- | :( |
18:10:12 | Araq | since it doesn't know there is a GC involved etc |
18:10:21 | chemist69 | I don't know, but my Win apps don't work anymore with the new libui.dll. They immediately quit without any error messages and are not showing any GUI. |
18:10:36 | Araq | chemist69: yes, working on it |
18:10:37 | chemist69 | The Linux versions run fine. |
18:10:48 | chemist69 | Ah, ok. Thanks a ton!!! |
18:30:57 | krux02 | Varriount: I think I can write you, but I don't get your answer in irc |
18:31:11 | krux02 | it is one way only |
18:31:47 | krux02 | unless there is some logic that detects that I have both open, and then does what it currently does, but I doubt that |
18:33:02 | krux02 | Varriount @Varriount 19:18 |
18:33:02 | krux02 | enthus1ast: I might be able to give you a modified version of the core ST plugin module that can at least print stack traces to the console. |
18:33:02 | krux02 | enthus1ast: What version of ST are you using? |
18:33:02 | krux02 | Varriount @Varriount 19:26 |
18:33:02 | krux02 | enthus1ast|trave: Could you go into C:\Program Files\Sublime Text\ and find the sublime.py and sublime_plugin.py modules, and gist their contents? I can modify them to show stack traces when used, and that should at least show when certain functions are called. |
18:35:59 | * | libman2 joined #nim |
18:36:17 | * | libman quit (Ping timeout: 240 seconds) |
18:39:16 | * | enthus1ast|trave quit (Ping timeout: 258 seconds) |
18:41:34 | * | enthus1ast joined #nim |
18:49:47 | * | libman2 quit (Ping timeout: 240 seconds) |
18:53:03 | * | stisa joined #nim |
19:02:05 | * | rokups quit (Quit: Connection closed for inactivity) |
19:06:44 | stisa | I think the mailing list mirroring has been broken since beginning of January, eg: http://www.freelists.org/post/nim-dev/Nim-threads-vs-Pthreads , where should I report it? |
19:07:31 | krux02 | stisa: that, too? |
19:08:54 | stisa | krux02 sorry? |
19:09:30 | * | yglukhov joined #nim |
19:09:42 | krux02 | it's just that I just wrote about that the gitter irc bridge doesn't work anymore |
19:09:46 | krux02 | yes report it |
19:10:04 | krux02 | maybe in the issue tracker on github |
19:11:01 | stisa | I guess it should go in nimforum issues? |
19:11:19 | Araq | I still get the nimforum emails |
19:11:27 | Araq | works for me (tm) |
19:12:25 | krux02 | I made an issue for the nimbot |
19:13:22 | Araq | BlaXpirit created the gitter bridge for us, iirc |
19:13:37 | cheatfate | Araq, Nim Manual can't be edited? |
19:13:58 | cheatfate | i dont see `edit` button here |
19:14:03 | krux02 | yes that with the nim manual is also something I noticed |
19:14:22 | Araq | yeah well. I don't know where to put the "edit" button |
19:14:24 | krux02 | there were times I was missing that feature, where I just wanted to an some little information |
19:14:53 | Araq | the edit feature for all the other docs is not exactly used that much -.- |
19:15:11 | cheatfate | ; |
19:15:52 | krux02 | The entire language is not used that much, but that never stopped you from making it |
19:16:14 | Araq | lol yes |
19:16:43 | Araq | but I could have fixed a bug instead in this time |
19:17:15 | krux02 | I think the edit button is a valuable feature that will pay off, when there are more people. |
19:17:38 | krux02 | It's like wikipedia |
19:17:44 | krux02 | people like to share knowledge |
19:18:03 | krux02 | when the entrace barrier is low, it will help |
19:21:46 | krux02 | I remember that I once wanted to clarify that `object` is like a `struct` type because I got that wrong the first time I read the manual |
19:22:17 | krux02 | then I went to the manual and wanted to edit, I didn't find the edit button and then the edit just didn't happen |
19:25:54 | Araq | so patch the docgen |
19:27:03 | * | adeohluwa joined #nim |
19:37:38 | * | dv- joined #nim |
19:37:56 | euantor | Is there are guarantee as to whether code after a `yield` in an iterator will be ran? |
19:38:23 | Araq | yeah well, it's a "return and continue afterwards" |
19:38:24 | euantor | EG: If the called does something with a yielded value and produces an exception, will code after the `yield` that does cleanup definitely be ran? |
19:38:46 | Araq | that's why we have 'finally' |
19:39:31 | euantor | And finally will work inside an iterator context? |
19:39:59 | euantor | The use case is: https://github.com/euantorano/serialport.nim/blob/master/private/list_serialports_win.nim#L66 |
19:40:20 | euantor | I want to make sure that `SetupDiDestroyDeviceInfoList` will be ran. I'll try using try/finally |
19:41:43 | * | FromGitter quit (Ping timeout: 256 seconds) |
19:41:56 | euantor | Yep, that works. Thanks! |
19:42:01 | Araq | oh what is wrong with this world |
19:42:17 | Araq | I cannot download a recent mingw anymore |
19:42:22 | euantor | I was wondering if the codegen maybe did that on its own, but wasn't sure |
19:58:46 | * | zetashift joined #nim |
20:00:15 | * | byte512 quit (Ping timeout: 260 seconds) |
20:01:26 | * | adeohluwa_ joined #nim |
20:03:36 | * | adeohluwa quit (Ping timeout: 245 seconds) |
20:07:14 | * | bjz joined #nim |
20:15:21 | * | stisa2 joined #nim |
20:16:35 | * | stisa quit (Ping timeout: 255 seconds) |
20:23:29 | * | yglukhov quit (Read error: Connection reset by peer) |
20:24:03 | * | yglukhov joined #nim |
20:46:19 | * | couven92 quit (Quit: Client disconnecting) |
21:04:23 | federico3 | is xomachine around? |
21:14:29 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:24:59 | * | stisa2 quit (Ping timeout: 264 seconds) |
21:25:21 | * | adeohluwa_ quit (Remote host closed the connection) |
21:28:11 | BlaXpirit | krux02, Araq, hm gitter.im does not respond at all from both my location and my server's location. can't do anything with the bridge |
21:28:37 | Araq | do you think it's a temporary problem? |
21:30:06 | zetashift | gitter.im does not work for me either |
21:35:13 | * | stisa joined #nim |
21:41:31 | * | stisa quit (Ping timeout: 245 seconds) |
21:41:36 | BlaXpirit | well hopefully gitter being down is a temporary problem..... |
21:41:54 | zetashift | https://twitter.com/gitchat |
21:42:02 | zetashift | seems temporarily |
21:43:05 | * | stisa joined #nim |
21:56:36 | * | stisa quit (Ping timeout: 256 seconds) |
21:57:05 | * | zetashift quit (Quit: Leaving) |
21:57:28 | dom96 | This is why IRC rules :P |
21:58:08 | GaveUp | where else can you have idling competitions? |
21:58:47 | * | Matthias247 joined #nim |
21:59:28 | * | kulelu88 joined #nim |
22:00:34 | dom96 | GaveUp: Exactly! |
22:00:41 | * | chemist69 quit (Ping timeout: 245 seconds) |
22:03:22 | * | stisa joined #nim |
22:03:40 | * | stisa2 joined #nim |
22:05:38 | * | Vladar quit (Quit: Leaving) |
22:06:19 | * | jjido joined #nim |
22:07:33 | * | stisa quit (Ping timeout: 252 seconds) |
22:15:23 | * | stisa2 quit (Ping timeout: 264 seconds) |
22:17:54 | * | stisa joined #nim |
22:27:57 | * | chemist69 joined #nim |
22:39:22 | * | Trustable quit (Remote host closed the connection) |
22:41:36 | * | Kingsquee joined #nim |
22:46:39 | * | nsf quit (Quit: WeeChat 1.7) |
22:47:36 | * | yglukhov quit (Remote host closed the connection) |
22:48:30 | * | couven92 joined #nim |
23:08:11 | * | jjido quit (Ping timeout: 264 seconds) |
23:37:36 | niv | dom96: can i bother you for a sec? im having a nimble noob issue |
23:38:19 | niv | what do i need to do to make nimble packages with native C files added via {.compile: } work? |
23:38:37 | niv | when pulled in locally/directly with import, it works, but if installed as a nimble package it fails |
23:48:08 | * | yglukhov joined #nim |
23:49:24 | krux02 | niv: that's not a trivial question. It is best when you provide example code in some form |
23:52:11 | * | yglukhov quit (Ping timeout: 240 seconds) |