<< 12-09-2016 >>

00:10:24*brechtm_ quit (Read error: Connection reset by peer)
00:10:34*brechtm joined #nim
00:33:10*yglukhov joined #nim
00:39:23*yglukhov quit (Ping timeout: 244 seconds)
00:53:27*Karma-Five-Ohm joined #nim
00:56:03*ftsf joined #nim
01:06:38*chemist69 quit (Ping timeout: 265 seconds)
01:16:26*yglukhov joined #nim
01:17:43*rtr_ quit (Remote host closed the connection)
01:19:35*chemist69 joined #nim
01:20:43*yglukhov quit (Ping timeout: 244 seconds)
01:26:38*ftsf quit (Ping timeout: 250 seconds)
01:37:59*ftsf joined #nim
02:01:03*Karma-Five-Ohm quit (Quit: My Mac has gone to sleep. ZZZzzz…)
02:11:13*Karma-Five-Ohm joined #nim
02:11:18*krux02 quit (Remote host closed the connection)
02:15:48*brechtm quit (Read error: Connection reset by peer)
02:15:54*brechtm_ joined #nim
02:19:30*ftsf quit (Ping timeout: 250 seconds)
02:19:48*yglukhov joined #nim
02:22:16*desophos quit (Read error: Connection reset by peer)
02:25:49*yglukhov quit (Ping timeout: 244 seconds)
02:30:56*ftsf joined #nim
02:50:04*brechtm joined #nim
02:50:33*brechtm_ quit (Read error: Connection reset by peer)
02:56:08*bjz joined #nim
03:09:25*pie_ quit (Changing host)
03:09:25*pie_ joined #nim
03:17:56*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:23:16*yglukhov joined #nim
03:27:49*yglukhov quit (Ping timeout: 244 seconds)
03:41:40*Karma-Five-Ohm left #nim ("Textual IRC Client: www.textualapp.com")
03:42:24*spindle joined #nim
03:58:42*Sentreen quit (Ping timeout: 265 seconds)
04:05:24*yglukhov joined #nim
04:09:40*yglukhov quit (Ping timeout: 244 seconds)
04:11:05*Sentreen joined #nim
04:17:45*kulelu88 quit (Quit: Leaving)
04:33:20ftsfhmm, how would you make a registry of classes in nim? I want to make a list of subclasses that the user can instantiate at will
04:34:36ftsfcan a variable be of type type?
04:40:21ftsfI guess i could make a seq of procs that return an instance of that class
04:43:15*spindle is now known as spindle_
04:44:19*spindle_ is now known as spindle__
04:45:38*spindle__ is now known as spindle
04:46:10*yglukhov joined #nim
04:50:29*yglukhov quit (Ping timeout: 244 seconds)
05:04:00*ARCADIVS joined #nim
05:07:54*chemist69 quit (Ping timeout: 260 seconds)
05:14:14*chemist69 joined #nim
05:17:37*space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…)
05:17:46*rtr_ joined #nim
05:25:27*brechtm quit (Read error: Connection reset by peer)
05:26:43mccftsf: there's this typedesc thing, I do not fully understand what uses of it are allowed however
05:28:20*brechtm joined #nim
05:28:31*yglukhov joined #nim
05:32:51*yglukhov quit (Ping timeout: 244 seconds)
05:40:20ftsfmcc, hmm didn't see that before, but reading the docs for it hurts my head =\
05:40:20ftsfbut yes, sounds like it might be useful for such a thing
05:41:08ftsfbut the seq of procs returning an instance works
05:41:39*brechtm quit (Read error: Connection reset by peer)
05:42:15*brechtm joined #nim
05:47:29mccftsf: my assumption is procs returning an instance would be better anyway because the builtin "constructors" for classes are just sorta field values
05:47:34mccright?
05:47:44mccso if you wanted any initialization at all, you'd have to write a constructor proc anyway
05:48:26ftsfyeah
05:48:54ftsfi use an init method that gets called on each thing though
05:49:38ftsfbut yeah, proc returning instance seems like the nimmy solution
05:49:43ftsfnimonic?
05:52:59mccit sounds sensible
06:02:53*rtr_ quit (Remote host closed the connection)
06:19:06*rtr_ joined #nim
06:26:18*rtr_ quit (Remote host closed the connection)
06:31:34*planhths joined #nim
06:40:01*filcuc joined #nim
06:46:58*Trustable joined #nim
06:47:10flyxftsf: just out of curiosity, what is the use-case for such a registry? I mean, why not just provide a constructor proc for each subclass? what is this seq for?
06:47:42ftsfflyx, there is a constructor proc for each subclass. but I want the user to be able to select which one to instantiate from a list
06:48:17ftsfmy use case is a music studio, they can instantiate different instruments and effects
06:48:45flyxhmm, okay. well, a seq of procs might be sensible then
06:48:46ftsfso i could hardcode the list, but i'd like for each instrument to be self contained and register itself
06:49:33flyxyou could declare all the constructors within a block which is passed to a macro, and then have the macro generate all necessary code
06:49:33*pafmaf joined #nim
06:50:57ftsfseems to overcomplicate things
06:51:49*Arrrr joined #nim
06:51:49*Arrrr quit (Changing host)
06:51:49*Arrrr joined #nim
06:54:48flyxwell, it would need to do litte more than to add a code line after the proc that adds it to the seq,
06:55:40ftsfmm i just do `registerMachine("foo", newFoo)`
06:55:50ftsfso a macro seems unnecessary
07:09:19*gokr joined #nim
07:22:42*Arrrr quit (Remote host closed the connection)
07:29:59*akaisora joined #nim
07:33:24*Andris_zbx joined #nim
07:37:39*chemist69 quit (Ping timeout: 265 seconds)
07:39:40*chemist69 joined #nim
08:01:11*ftsf quit (Quit: :q!)
08:13:45*mcc quit (Quit: Connection closed for inactivity)
08:25:43*fredrik92 joined #nim
08:28:58*bjz_ joined #nim
08:32:40*bjz quit (Ping timeout: 265 seconds)
08:33:00*fredrik92 quit (Quit: Leaving.)
08:33:52*fredrik92 joined #nim
08:45:58*bjz_ quit (Read error: Connection reset by peer)
08:46:29*yglukhov joined #nim
08:47:14*bjz joined #nim
09:10:02*Demon_Fox quit (Quit: Leaving)
09:16:03*ARCADIVS quit (Quit: ARCADIVS)
09:26:21*GangstaCat joined #nim
09:36:01*planhths quit (Quit: Konversation terminated!)
09:42:47*chemist69 quit (Ping timeout: 250 seconds)
09:42:51*nsf joined #nim
09:45:45*rtr_ joined #nim
09:47:20*fredrik92 quit (Read error: Connection reset by peer)
09:47:44*nicanaca0 quit (Remote host closed the connection)
09:48:02*chemist69 joined #nim
09:49:56cheatfatedom96, what do you think if i add function getSelector(disp: PDispatcher): pointer to asycndispatch?
09:51:24*nicanaca0 joined #nim
10:04:31*irrequietus joined #nim
10:07:54*Kaini quit (Remote host closed the connection)
10:08:33*Kaini joined #nim
10:09:14*Kaini quit (Remote host closed the connection)
10:09:57*Kaini joined #nim
10:10:06*xet7 quit (Quit: Leaving)
10:11:18*Kaini quit (Remote host closed the connection)
10:17:20*woggy joined #nim
10:24:16*opi quit (Quit: ZNC - http://znc.in)
10:31:04*irrequietus quit (Ping timeout: 264 seconds)
10:34:38*HollyRain joined #nim
10:36:28*Kaini joined #nim
10:36:52*brechtm_ joined #nim
10:39:47*fredrik92 joined #nim
10:40:40*brechtm quit (Ping timeout: 264 seconds)
11:01:44HollyRainis possible to use Nim to create a library to be able to be binded from different languages?
11:02:10*Snircle joined #nim
11:02:47Araqyes.
11:03:17HollyRainbut isn't it problematic? mainly because everything relies on garbage collection
11:04:41Araqnot particularly more problematic than anything else that uses its own memory manager.
11:06:05Araqyou can also use --gc:stack (which we use in production) to build DLLs that don't have any GC whatsoever.
11:06:38HollyRaininteresting
11:06:52*irrequietus joined #nim
11:07:04HollyRainand how does Nim compares to Crystal?
11:09:59AraqI don't really know. Crystal is single threaded with Boehm GC.
11:10:31HollyRainand nim is not also single threaded?
11:10:44flyxAraq: what actually happens with --gc:stack? without GC, wouldn't all allocated structures leak memory?
11:11:58Araqflyx: you free the entire region with a single proc call.
11:12:05AraqHollyRain: no, it's not.
11:12:39flyxAraq: hm okay, but that means, I actually need to modify the Nim code
11:12:54*krux02 joined #nim
11:13:47Araqflyx: var x: MemRegion; withRegion(x): .... not need to modify the stdlib, if that's what you mean
11:13:56Araqbut it's really unsafe ;-)
11:14:18flyxAraq: no, I meant, I need to modify *my* code. so it is not as simple as compiling it with --gc:stack
11:14:40flyx(I with http://nim-lang.org/docs/gc.html would explain more about it)
11:14:48HollyRainAraq, then Nim is multi-threading?
11:15:42*nairobi joined #nim
11:20:41*HollyRain left #nim (#nim)
11:23:57*spindle quit (Quit: Leaving)
11:36:37*brechtm_ quit (Remote host closed the connection)
11:37:12*brechtm joined #nim
11:39:53FromGitter<endragor> HollyRain: see http://nim-lang.org/docs/manual.html#threads
12:04:56*pafmaf quit (Ping timeout: 265 seconds)
12:10:39*akaisora quit (Ping timeout: 265 seconds)
12:13:32FromGitter<BontaVlad> In nim do we have something similar to `dir` in python?
12:14:42FromGitter<BontaVlad> for those who don't know what `dir` is in python: `dir` will display private, public attributes, method of the object in question, super useful in checking out the object
12:15:26cheatfateBontaVlad: try `repr`
12:17:30flyxBontaVlad: since Nim is statically typed, you can just look at the source code (or the generated documentation)
12:17:49FromGitter<BontaVlad> what is the difference between `$` and `repr`?
12:18:05FromGitter<BontaVlad> @flyx I see
12:18:26flyxBontaVlad: in general, you do have the scenario where you have a variable and want to inspect its type, because you already know the type
12:18:28FromGitter<BontaVlad> @flyx, @cheatfate thx for the response
12:18:38flyx*you do not
12:20:08flyxBontaVlad: but it is possible to use the iterators fields() and fieldPairs() to iterate over fields of an object. this is mainly useful for generics and implementing serialization
12:23:12flyxBontaVlad: and lastly, there's the typeinfo module for inspection, but it is low-level and unsafe
12:29:14FromGitter<BontaVlad> great, thx again :)
12:29:40flyxBontaVlad: about `$` and `repr`: `$` is a toString operator which is defined for most basic Nim types. however, it is not available for all types, and if you want to have it on your own type, you have to implement it
12:30:30flyxBontaVlad: `repr` is a low-level proc which is available for every type and just displays a representation of its internal structure. useful for debugging purposes, but you usually would not want to generate end-user output with it
12:30:57FromGitter<endragor> iirc `$` is available for all types in `experimental` mode. the default implementation would print all fields
12:31:29*arnetheduck quit (Remote host closed the connection)
12:31:46flyxendragor: how does it handle pointer types?
12:32:37hohlerdeI am working on some old nim code (worked with compiler 0.12.x). Actually it looks like that "ref object" types and var parameters of procedures don't work anymore?
12:32:38hohlerdehttps://zerobin.tarakis.de/?d1bad41c0ba97bc8#SDDHTSXq9tOai0bMRRvg5+14d/BDAoqkqdCFcAMw4kE=
12:33:08*arnetheduck joined #nim
12:33:44*coffeepot joined #nim
12:33:56flyxhohlerde: you do not need `var` for ref types, they are inherently modifyable
12:33:58FromGitter<endragor> @flyx: it dereferences them
12:34:16flyxendragor: wouldn't that be dangerous for cyclic structures
12:36:38hohlerdeflyx: ok, but to me it looks like according to the compiler error that a "ref object" is not compatible with the same var definition in a procedure's signature. I mean, isn't a ref type also a var type?
12:37:22FromGitter<endragor> flyx: it seems it turns into noop for cyclic types. and, well, it’s in `experimental` for a reason
12:38:01flyxhohlerde: well that was just a note, not a problem solution. the problem is that you pass a CustomRequest but the proc expects a Request
12:38:06flyxthese are different types
12:38:29flyxI guess using `method` will fix it
12:40:23hohlerdeflyx: Unfortunately the compiler still complains with "method"
12:40:55flyxI am not sure whether the compiler should really reject the proc
12:41:01flyxthis may be a bug
12:41:35flyxwell you can always cast result to Request
12:41:39flyxerr, convert
12:41:51hohlerdejep, I have done taht
12:41:54hohlerdethat works
12:42:13hohlerdethanks for the clarification
12:42:59flyxit is not that obvious for me. maybe everything should work and this is a really basic bug
12:43:22*flyx seldom uses inheritance
12:44:51hohlerdeI'll file a bug report
12:46:43*fredrik92 quit (Quit: Leaving.)
12:48:55coffeepothey guys, this produces a cgen error, anyone know if there's an existing issue for this or does it need a new one https://gist.github.com/coffeepots/1122e6aeef686266c6d42861e47ae134
12:54:18arnetheduckcoffeepot, works with nlvm ;)
12:58:02coffeepotarnetheduck good stuff :) Any idea why it doesn't work on devel? Unless it's been updated over the weekend, my Nim is from friday
12:58:11*GustavoLapasta joined #nim
12:58:28coffeepotIt's not a problem for me, just thought i better report cgen issues
12:59:39arnetheduckcoffeepot, no idea, but coincidentally I'm adding support for that stuff right now ;)
13:06:54coffeepotawesome! :D
13:09:45*fredrik92 joined #nim
13:11:41*PMunch_ joined #nim
13:11:59*PMunch_ is now known as PMunch
13:21:23yglukhovdom96: ping
13:21:40*woggy quit (Disconnected by services)
13:21:52cheatfateyglukhov, hows your windows tests?
13:22:09yglukhovcheatfate: argh, havent done yet
13:36:03*nairobi quit (Remote host closed the connection)
13:37:28*ftsf joined #nim
13:38:46ftsfmenu.items.add(item) Error: internal error: expr(skField); unknown symbol No stack traceback available
13:38:55ftsfanyone encountered this before?
13:43:07ftsfahh, was using {.this:self.} and menu was self.menu, when i specified self.menu it worked
13:47:25*irrequietus quit (Ping timeout: 252 seconds)
13:48:42*gokr quit (Ping timeout: 244 seconds)
13:58:09yglukhovcheatfate: first bad commit: https://github.com/nim-lang/Nim/commit/87eb3a105d4a2b6f9e9fd18bc6cca18d458d1cca
13:58:18yglukhovping dom96 as well
13:59:54*samuell joined #nim
14:02:21hohlerdemhmm, looks like asyncdispatch doesn't run in thread context at all
14:03:22*alexsystemf___ quit (Quit: Connection closed for inactivity)
14:05:12cheatfateyglukhov, so weird changes
14:05:24cheatfateyglukhov, i'm giving up
14:05:38cheatfatelet people made this changes to fix their work
14:12:45*foocraft joined #nim
14:14:01FromGitter<endragor> @Araq is it by design that `marshal` expects each `string` in an object to be valid UTF-8 string? atm it either crashes or produces invalid results when string stores binary data, because `escapeJson` is used. Perhaps it would make sense to store strings as arrays of charcodes? that would produce stable results regardless of string contents
14:17:47*pregressive joined #nim
14:18:50*M-Quora quit (Read error: Connection reset by peer)
14:18:51*hohlerde quit (Read error: Connection reset by peer)
14:18:51*TheManiac quit (Read error: Connection reset by peer)
14:19:47flyxendragor: strings are UTF-8 strings by convention. if you store binary data in a string, you are using it against this convention.
14:20:19flyxendragor: I think string is just the wrong type to use for binary data
14:29:06FromGitter<endragor> flyx: even stdlib itself uses strings against this convention (e.g. system.readAll, asyncdispatch.send, asyncdispatch.recv). `seq[byte]` would probably make more sense for that, but I haven’t found a single mention of it in stdlib.
14:32:14FromGitter<endragor> so far stdlib just uses `string` as `seq[byte]` and assumes UTF-8 encoding whenever string semantics is actually required
14:34:05Araqyeah well, I remember this problem and have no solution.
14:34:19FromGitter<endragor> which problem, exactly?
14:34:36Araqmarshal fucking up with my precious binary data :-)
14:34:59FromGitter<endragor> how about storing strings as arrays?
14:36:10AraqI don't know what marshal should do. your solution is cool but then marshal doesn't use JSON anymore or does it
14:36:29Araqand Nim's Json has the same problems anyway
14:37:04AraqJson has no real support for Blobs I guess and an array of byte codes is just too messy to work with
14:42:22*planhths joined #nim
14:43:17*samuell quit (Quit: Hejdå)
14:46:33FromGitter<endragor> I think it’s the cleanest solution JSON-wise. for `json` module it’s probably OK to assume `string` as UTF-8 encoded string
14:48:58Araqendragor: ok, PR welcome.
14:49:20*akaisora joined #nim
14:49:21*hohlerde joined #nim
14:50:17*csoriano_ joined #nim
14:51:06*space-wizard joined #nim
14:51:24*Sentreen quit (Ping timeout: 244 seconds)
14:53:07*chemist69 quit (Ping timeout: 255 seconds)
14:54:19ftsfwhat makes a capture legal or not?
14:56:12*chemist69 joined #nim
14:58:54yglukhovftsf: from my observation - everything except `result` ;)
14:59:43yglukhov* everything is legal except `result`
15:00:48ftsfhmm i just encountered another instance
15:00:51ftsfi'll try and distill it
15:02:24FromGitter<endragor> Araq: hmm, on the second thought, this could be fixed on `json` level. There is no sense in escaping stuff the way it escapes. JSON is already UTF-8 so the Nim string could be written as-is. The only thing that should be escaped is control-characters. That should work both for binary and non-binary data, because control characters are < 0x20 and parts UTF-8 rune must never contain control characters (they are always > 0x7F).
15:02:38ftsfnope. no idea =\
15:03:32yglukhovftsf: gist?
15:03:49Araqftsf: result and openarray and var parameters
15:04:08yglukhovright...
15:04:23*Sentreen joined #nim
15:04:34Araqendragor: json is not utf-8, it's unicode, so it requires \u<16 bit number> afaik
15:06:35dom96cheatfate: yes, but maybe return something more concrete than just `pointer`.
15:07:14ftsfhttps://gist.github.com/ftsf/4a20a1d406982d3a37d545951d5f74b5 machines is a global var
15:07:46cheatfatedom96, pointer is the only way to be compatible on all OS, and pointer cause programmers to watch at source code, so when they start to use this function it will be not a problem for them...
15:08:05ftsfif i define a var targetMachine = machine outside the inner loop and use that it's fine
15:09:02hohlerdeI am trying to use niv's websocket implementation in a thread. I have changed a global var definition to use a {.threadvar.} and could eliminate one compile error. however, I am getting a second one:
15:09:03hohlerdelib/pure/asyncdispatch.nim(1596, 8) Error: 'cb' is not GC-safe as it accesses 'nameIterVar' which is a global using GC'ed memory
15:09:04hohlerdeis there a way to get some more information from the compiler?
15:09:24FromGitter<endragor> Araq: yeah, the RFC doesn’t strictly specify encoding, saying UTF-8 is the most widespread. But the current implementation of `json` module assumes it’s UTF-8 (or ASCII?), because it uses single-byte representation for everything
15:10:14dom96cheatfate: you should return a different pointer for each OS, like when defined(linux): ptr EpollFd elif defined(bsd): ptr kselectFD
15:10:18dom96or something similar
15:10:20dom96at least
15:10:20*miere joined #nim
15:10:37yglukhovdom96: there you are
15:10:39yglukhov=)
15:10:44dom96yglukhov: is it just my commit, or was it all the changes introduced by https://github.com/nim-lang/Nim/pull/4683 ?
15:10:54planhthshello I am currently taking the 6.00.1x course on edX, If you are interested, I posted code in nim here: https://github.com/konqoro/Course_6001x
15:11:06yglukhovdom96: can you review my pr to jester please?
15:11:07cheatfatedom96, but for posix compatible os there only one return value - `ptr Selector`
15:11:19dom96planhths: that's awesome, thanks for sharing
15:11:25dom96yglukhov: not right now, sorry
15:11:36yglukhovdom96: thats what git bisect showed on devel. so i guess its just your commit
15:12:21dom96cheatfate: okay, then use `ptr Selector`
15:12:37dom96still better than `pointer`
15:13:03csoriano_if I understood correctly, a non ref object would need an init constructor, and a ref object a new constructor right? and onyl do the object() inside this init or new.
15:13:06csoriano_?
15:13:51dom96yglukhov: any chance you could test https://github.com/nim-lang/Nim/commit/3760a8b973781ac3a9b06fa1c054c489f9c7ce3e ?
15:15:15cheatfatedom96, really don't understand you... all systems now have appropriate function declaration which are compatible. Mostly they are not usable, and even if somebody wants to use it they need to know what they want, so there will be not a problem to cast[ptr Selector](pointer) or cast[Handle](pointer) for this people.
15:15:40yglukhovdom96: lets trade. you merge my pr, i test the commit? ;) this pr is really important to me to say the least. were going production today. and theres no way in jester to observe the exceptions.
15:16:13*SunDwarf quit (Remote host closed the connection)
15:16:39yglukhovdom96: btw sending exception stack trace along with 502 response doesnt really work for ajax :(
15:16:56hohlerdecsoriano_: those are best practices and yes, refs should be created by a newXXX(...) and value objects by a initXXX(...) procs
15:17:11yglukhovdom96: when cors is messed with
15:17:23dom96yglukhov: merged
15:17:33yglukhovhey, thanks a bunch!
15:17:38dom96I don't think any web frameworks handle this well
15:17:46csoriano_hohlerde: I see thanks. I saw some code from some nim developer posted on nim twitter and was not following this practices, and confused me a little :)
15:17:49dom96I guess a setting for it would be nice though
15:17:57dom96Anyway, I need to go now.
15:18:04yglukhovdom96: ok, see you
15:18:16hohlerdecsoriano_: you may want to take a look at http://nim-lang.org/docs/nep1.html
15:18:32csoriano_hohlerde: ah cool, didn't see that. Thanks much
15:18:33dom96I'll be back on Wednesday (might be around earlier for a bit)
15:19:13csoriano_oh yeah this code https://github.com/nim-lang/Nim/blob/devel/web/bountysource.nim
15:19:50csoriano_exactly https://github.com/nim-lang/Nim/blob/devel/web/bountysource.nim#L128
15:20:07csoriano_on the other hand was warned it was a little dirty code, so I guess that's it
15:21:09*gokr joined #nim
15:24:12hohlerdecsoriano_: as I said, it is not a strict rule to use newXXX and initXXX, especially if you use your own objects internally. furthermore, if your objects don't need any "special" initialization, one may want to omit special constructor procs.
15:25:01ftsfsomething weird going on with my app =( memory corruption of some kind.. any advice on how to track it down? is it possible to get valgrind to show nim line numbers / function names?
15:25:28csoriano_hohlerde: hm...experience taugh me to be consistent, or pay on maintenance. But yeah I understand it's not required.
15:26:06*SunDwarf joined #nim
15:26:06hohlerdecsoriano_: I agree
15:26:58cheatfateyglukhov, let me know about your tests
15:28:59yglukhovcheatfate: ok, will take about an hour
15:32:43yglukhovdom96, cheatfate: done. everything is fine with 3760a8b973781ac3a9b06fa1c054c489f9c7ce3e
15:34:55cheatfateyglukhov, then i think this is new proxy `send()` problem
15:38:04ftsfdo I need to run setupForeignThreadGc for SDL audio callback (which runs in an externally created thread)? if so, where do I run setupForeignThreadGc?
15:39:24*HollyRain joined #nim
15:40:54*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
15:41:21ftsfGC seems to be clobbering something, when I disable the GC it seems to be stable (but leaking)
15:41:26hohlerdeI guess yes
15:41:46hohlerdeI had to use it in my proc which is called by a windows thread
15:41:58hohlerdeftsf: at the very beginning of the proc
15:42:37*gokr quit (Ping timeout: 255 seconds)
15:43:08ftsfhohlerde, hmm tried that, but still seeing memory issues.
15:43:10hohlerdeare you running on windows or linux/mac?
15:43:14ftsflinux
15:43:31hohlerdeok, on windows I also had to set tlsEmulation to off
15:43:35flyxAraq, endragor: what about defining `type blob: distinct string`, provide a converter from string to blob and then replace the places in stdlib that use string as binary data with blob?
15:43:52ftsfhohlerde, yeah tested with that on and off
15:44:49ftsfok, maybe it's something different and not the audio callback
15:44:58ftsf(just disabled that and it's still having issues)
15:45:03flyxthen, the marshaler can differentiate between an actual string and some binary data
15:49:15*GustavoLapasta quit (Read error: Connection reset by peer)
15:50:22*filcuc quit (Read error: Connection reset by peer)
16:00:14*PMunch quit (Quit: leaving)
16:01:51*Andris_zbx quit (Remote host closed the connection)
16:02:40*akaisora quit (Ping timeout: 244 seconds)
16:06:44*HollyRain quit (Quit: Leaving)
16:11:56*vktec left #nim ("So long and thanks for all the fish")
16:18:19*desophos joined #nim
16:21:16*akaisora joined #nim
16:32:19*arnetheduck quit (Ping timeout: 250 seconds)
16:39:08*xet7 joined #nim
16:42:49*brechtm_ joined #nim
16:43:04*fredrik92 quit (Quit: Leaving.)
16:46:04*planhths quit (Remote host closed the connection)
16:46:14nivhohlerde: you called? :)
16:46:43*brechtm quit (Ping timeout: 265 seconds)
16:47:04*brechtm_ quit (Ping timeout: 240 seconds)
16:51:24*nairobi joined #nim
16:53:36SentreenI see that the `func` keyword is reserved for use by the compiler. Does it indicate side-effect free procs (as discuced here: https://github.com/nim-lang/Nim/issues/2716) or is it just there for future use?
16:55:31*nairobi quit (Ping timeout: 252 seconds)
17:08:50*yglukhov quit (Ping timeout: 244 seconds)
17:24:46*fredrik92 joined #nim
17:28:56*fredrik92 quit (Client Quit)
17:33:39hohlerdeHi niv
17:34:07hohlerdeniv: moment pls
17:34:27nivhohlerde: hi. havent looked into websockets.nim in a while. i suspect its broken on nim 0.14.2?
17:36:35hohlerdeniv: a bit, but it's simple. randomize() has been moved to package random
17:36:50hohlerdeniv: so adding that fixed the import error for me
17:37:44hohlerdeniv: the other errors I encountered deal with threads, so probably not really errors of your websocket module
17:38:19nivah. i'll look into updating it soon then. and yes, websockets.nim was never designed to be used in multiple threads, its based on that asyncnet stuff
17:38:31hohlerdeniv: for instance shared.nim uses a global reqPing variable, which doens't work when using in a thread
17:39:02nivoops? i was a pretty big noob when writing it. i still am, but i was back then too :D
17:39:05hohlerdeniv: and it looks like that the securehash module doesn't like threads
17:39:27hohlerdeniv: nono, the websocket module is great. I am glad you wrote it :)
17:39:49hohlerdeniv: I am just trying to get it running in one of my threads :-)
17:40:31nivi faintly remember seeing a unfixed bug where this assert ( https://github.com/niv/websocket.nim/blob/master/websocket/shared.nim#L74 ) triggers for masked frames
17:40:37nivin debug mode anyways.
17:41:39*rtr_ quit (Remote host closed the connection)
17:42:07hohlerdeniv: I'll investigate securehash further and see if I can get it run in a thread and hopefully I'll be able then to use your websocket module.
17:42:38nivappreciate the effort. please let me know if you make it work (or run into issues)
17:42:55hohlerdeniv: sure, will do.
17:43:01nivhttps://github.com/niv/websocket.nim/commit/e8effbeae5fd13278e8c71027b95a712700766ee
17:43:08nivmight want to pull this in too
17:43:16nivotherwise client sockets will assert always, i think
17:44:29flyxso I am getting one of those pesky `type mismatch` errors on proc types that are identical
17:45:02hohlerdeniv: thanks, missed that
17:45:11flyxwhat is the set of annotation I can add to my proc so that it conforms with „invisible“ pragmas that are expected on it?
17:47:50nivhohlerde: no you didnt, i just pushed it :)
17:49:53*rtr_ joined #nim
17:50:08*JustATest joined #nim
17:51:22hohlerdeniv: alright :-)
17:52:04*yglukhov joined #nim
17:52:23*Matthias247 joined #nim
17:52:33*JustATest quit (Client Quit)
17:54:12flyxhmm, it says it expects the proc to have {.closure.}, but I cannot add that to my procs because apparently, that is invalid for top-level procs
17:54:28flyxwhy is it expecting {.closure.}? I did not add that to the proc type
17:56:52*yglukhov quit (Ping timeout: 264 seconds)
18:00:35hohlerdeflyx: that sounds strange. I think I read somewhere on the forum that top level procs can never be closures
18:08:20*yglukhov joined #nim
18:08:27*M-Quora joined #nim
18:08:34*TheManiac joined #nim
18:21:04flyxhmm, the problem seems to be with generics
18:21:34flyxit fails because the proc is generic. it instantiates another generic proc, and the proc in its body instantiates the original proc again
18:22:05flyxthis works if used without any pragmas on the proc type I assign to, but fails when I use {.raises: YamlLexerError.}
18:31:47*yglukhov quit (Remote host closed the connection)
18:40:02*nairobi joined #nim
18:44:48*nairobi quit (Ping timeout: 276 seconds)
18:47:18*akaisora quit (Read error: No route to host)
18:53:13*PMunch joined #nim
18:57:08*abeaumont_ joined #nim
19:01:56FromGitter<moigagoo> Possibly a silly question, but could we ditch IRC in favour of Gitter for good? Since this bot started posting messages from IRC to Gitter, this channel became a mess. I honestly stopped coming here because of how repelling the chat looks now: 90% of messages posted by the same account, visual garbage everywhere. ⏎ ⏎ I know a lot of people feel nostalgic and sentimental about IRC, but with all honesty, it is not proper medium for
19:01:56FromGitter... 2016. ⏎ ⏎ Sorry for the rant, but I'm genuinely worried about this channel's attractiveness for the newcomers. [https://gitter.im/nim-lang/Nim?at=57d6fba4b8d4c1384089d049]
19:04:16cheatfatethere is no nostalgic and sentiments about IRC, and there no need to have webbrowser to chat...
19:14:12ehmrywhat is the proper medium for 2016? is it not more visual garbage everywhere?
19:17:18*lenstr quit (Ping timeout: 244 seconds)
19:17:45*LeNsTR joined #nim
19:18:14*Ven joined #nim
19:18:32FromGitter<moigagoo> @ehmry Gitter is. There's persistent history, notifications about missed messages, MD, mentions, and apps for every platform. ⏎ ⏎ WRT visual garbage, compared to IRC within Gitter, vanilla Gitter is much cleaner :-)
19:19:26FromGitter<moigagoo> @cheatface Well, you don't need a browser to chat with Gitter as well.
19:19:37cheatfatemoigagoo there no apps for every platform... thereis one more Google Chrome browser for every platform
19:21:13FromGitter<moigagoo> @cheatfate Sorry, I don't follow. Gitter apps are all built with Electron, so yeah, they all basically render the web version. But does that matter? I mean, does the technology behind the app matter as far as it does the job?
19:21:21ehmrylol, where are those ⏎ ⏎ coming from
19:21:57cheatfatemoigagoo: its like using cannons to shoot flies...
19:21:59FromGitter<moigagoo> @ehmry Apparently, that's how this IRC bridge renders edited messages :-)
19:22:50cheatfatemoigagoo: all other benefits you mentioned can be made inside of IRC client with plugins...
19:23:52ehmryI just had to hear the word electron
19:24:01ehmrymy mind is made up
19:24:49FromGitter<moigagoo> Urgh :-) OK then :-)
19:28:30cheatfatemoigagoo: you know, webbrowser as chat -> more electricity used -> more CO2 goes to atmosphere -> more warm summers -> more usage of conditioners -> more electricity used -> .... -> mankind is going to Mars :)
19:30:02*yglukhov joined #nim
19:30:04*PMunch quit (Quit: leaving)
19:33:51ehmrydoes the technology behind the app matter as far as it does the job? <-- now we know how you feel about security
19:37:32*elrood joined #nim
19:58:05*Ven quit (Read error: Connection reset by peer)
19:58:34*Ven joined #nim
19:59:16*Ven quit (Read error: Connection reset by peer)
19:59:32*irrequietus joined #nim
20:00:14*Ven joined #nim
20:03:52hohlerdeis gitter open source?
20:04:09hohlerdeor is it a walled garden like slack & co?
20:05:09cheatfatehohlerde, of course it closed source... and even with closed protocol, but i think it with xmpp inside
20:05:58*Ven quit (Read error: Connection reset by peer)
20:06:29*Ven joined #nim
20:12:56*foocraft quit (Quit: Leaving)
20:16:58*PMunch joined #nim
20:17:56*fredrik92 joined #nim
20:18:57*fredrik92 quit (Client Quit)
20:19:54*fredrik92 joined #nim
20:20:07*fredrik92 quit (Client Quit)
20:20:32*gokr joined #nim
20:20:57*fredrik92 joined #nim
20:22:45cheatfateAraq, how can i make with nimscript configuration file which first compiles module1.nim and module2.nim and then it compiles manager.nim
20:22:46cheatfate?
20:28:14*nairobi joined #nim
20:32:44*nairobi quit (Ping timeout: 244 seconds)
20:49:11*miere quit (Read error: Connection reset by peer)
20:53:24*yglukhov quit (Remote host closed the connection)
20:55:17*yglukhov joined #nim
20:55:43*fredrik92 quit (Read error: Connection reset by peer)
20:56:03*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:57:46*_stowa joined #nim
20:59:43*spindle joined #nim
21:01:23Araqcheatfate: you really shouldn't attempt this stunt
21:01:49Araqwhy hardcode compilation order?
21:04:14krux02how can I eveluta a template from within a macro with a NimNode as argument
21:04:43krux02something like getAst(myTemplate(nimNodeArg))
21:04:57*yglukhov quit (Remote host closed the connection)
21:05:08krux02nimNodeArg is local to the current scope, and myTemplate is in the same module as the macro
21:05:08AraqI don't think that's possible
21:05:17krux02hmm /
21:05:19*PMunch quit (Read error: Connection reset by peer)
21:05:24*PMunch_ joined #nim
21:05:50Araqon the other hand ... I think that just works?
21:06:01Araqnever thought about it, my getAst+templ always works
21:06:10*_stowa quit (K-Lined)
21:06:23Araqmake the templ take 'untyped' parameters and it works
21:06:43krux02I always get Error: wrong number of arguments
21:07:04Araqso give it the correct number of arguments
21:07:07krux02ok that's something that I can't do sadly
21:07:19Araqlol
21:07:47krux02because I use templates to simulate what I would do in c++ with typedefs in classes
21:08:03*nairobi joined #nim
21:08:42Araqhttps://blogs.msdn.microsoft.com/brada/2005/02/11/resource-management/
21:08:50krux02template glslName(t: typedesc[Texture2D]): string = "sampler2D"
21:09:21*yglukhov joined #nim
21:10:00*fredrik92 joined #nim
21:10:39*akaisora joined #nim
21:10:40*yglukhov quit (Remote host closed the connection)
21:11:08krux02normally when I have the incorrect number of arguments it at least tells me what I was trying to call, and what the alternatives are, but this time I did get no information of that kind
21:11:12krux02that was a bit sad
21:11:26*yglukhov joined #nim
21:13:38krux02I guess I have to generate code again that calls a macro
21:14:48AraqgetAst is specialized in the compiler
21:14:58Araqincluding its error reporting
21:15:04Araqmaybe that's why
21:17:45krux02now I have to think a bit how I can do it, when I can't use getAst, it seems like I have to restructure a bit of my code :/
21:18:00krux02not impossible
21:18:41*yglukhov quit (Remote host closed the connection)
21:19:23*PMunch_ is now known as PMunch
21:20:23Araqread the article please
21:23:20*Trustable quit (Remote host closed the connection)
21:24:17*yglukhov joined #nim
21:30:52*yglukhov quit (Remote host closed the connection)
21:43:24*yglukhov joined #nim
21:52:35*Jesin quit (Quit: Leaving)
21:54:22*fredrik92 quit (Quit: Leaving.)
21:55:04*fredrik92 joined #nim
21:55:46*pregressive quit (Remote host closed the connection)
21:56:19*pregressive joined #nim
22:00:34*pregressive quit (Ping timeout: 244 seconds)
22:06:00*nairobi quit (Remote host closed the connection)
22:06:37*nairobi joined #nim
22:10:49*Matthias247 quit (Read error: Connection reset by peer)
22:11:02*nairobi quit (Ping timeout: 265 seconds)
22:21:30*yglukhov_ joined #nim
22:21:30*yglukhov quit (Read error: Connection reset by peer)
22:23:52*yglukhov_ quit (Read error: Connection reset by peer)
22:23:54*yglukhov joined #nim
22:30:28*yglukhov quit (Ping timeout: 252 seconds)
22:35:42*yglukhov joined #nim
22:36:56*mcc joined #nim
22:45:18*yglukhov quit (Ping timeout: 276 seconds)
22:49:17*yglukhov joined #nim
23:03:32*CcxCZ quit (Ping timeout: 240 seconds)
23:06:07*elrood quit (Quit: Leaving)
23:10:04*chemist69 quit (Ping timeout: 264 seconds)
23:11:05*MyMind joined #nim
23:14:33*Sembei quit (Ping timeout: 276 seconds)
23:14:50*akaisora quit (Remote host closed the connection)
23:15:33krux02Araq: I read the article now.
23:17:15krux02If you want my opinion about it, I can only give you my very biased opinion about it, because I only see my use case and my way of programming, and I only have datastructures, wher the ownership of objects to other objects is clear.
23:18:23krux02I realized that shared ownership is a very rare case, and only in case of shared ownership someone would need something like locked reference counting
23:18:53krux02in most cases it is totally sufficint to embed the type by value in the owning datastructure
23:19:02krux02so either it is a seq type, or another object
23:19:38krux02I really like the c++ unique_ptr concept, even though I don't like it's verbose name
23:20:36krux02but I realized that in modern c++ most pointers and references are still non owning, and they are still just pointers or reference types
23:22:26krux02but when c++ is used well, I don't need to write a single destructor, because finalization is automatically bounded to the owner
23:24:19krux02The problem is just, that c++ is very bad at encouraging the programmer to go the safe way. It let's the programmer make horrible mistakes that might be very painful in the end.
23:26:07krux02I mean the c++ model is not perfect, I can still screw things up, for example I can pass a global variable as reference and then invalidate that reference from within the call
23:26:13krux02there is no protection
23:26:36*irrequietus quit ()
23:27:02krux02I like the idea to have moveable types, that are non-copyable
23:27:45*CcxCZ joined #nim
23:29:06*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:29:39krux02To sum it up, I was missing the concept of ownership mentioned in that article. Ok it is older, and maybe it wasn't that well understood or known back then, but I honestly don't agree that most objects need to be activated for garbage collection
23:36:38*chemist69 joined #nim
23:38:43*rtr_ quit (Remote host closed the connection)