<< 05-09-2016 >>

00:00:25*Trustable quit (Remote host closed the connection)
00:06:51*endragor joined #nim
00:10:51*fredrik92 quit (Quit: Leaving.)
00:11:03*endragor quit (Ping timeout: 240 seconds)
00:11:14*fredrik92 joined #nim
00:30:36*krux02 joined #nim
00:35:49*ftsf_ joined #nim
00:46:40*chemist69 quit (Ping timeout: 255 seconds)
00:47:28*fredrik92 quit (Quit: Leaving.)
00:47:40*chemist69 joined #nim
00:48:43*endragor joined #nim
00:49:34*fredrik92 joined #nim
00:51:08*endragor quit (Remote host closed the connection)
00:51:24*endragor joined #nim
01:11:50*fredrik92 quit (Read error: Connection reset by peer)
01:13:48*krux02 quit (Quit: Verlassend)
01:14:00*GangstaCat quit (Quit: Leaving)
01:14:16*chemist69 quit (Ping timeout: 264 seconds)
01:16:07*endragor quit (Remote host closed the connection)
01:27:16*chemist69 joined #nim
01:30:28*honkfestival joined #nim
01:31:11kierwhat's the best way to ask Nim to use a different C compiler to the default?
01:31:42kierI can't see an flag in the help, nor does setting the CC env var seem to be doing anything
01:31:53kiers/an flag/a flag/
01:36:52ftsf_kier, nim c -d:gcc.exe mycustomgcc
01:36:59ftsf_http://nim-lang.org/docs/nimc.html
01:37:21ftsf_you might have to tweak a bunch of settings
01:37:26*endragor joined #nim
01:37:28kierftsf_: thanks. I just discovered the --cc option which worked as well
01:38:09ftsf_ooh interesting, that doesn't seem to be documented
01:39:31kierdoesn't look like it. only came across it in a forum post
01:39:55kiermaybe "document all the secret compiler options" should be an issue :p
01:40:23ftsf_=) yeah
01:42:26*endragor quit (Remote host closed the connection)
01:42:46mccThere are lots of docs issues to be raised
01:43:10*endragor joined #nim
01:43:10mccI keep meaning to start filing pull requests whenever i learn something that isn't in the docs *_*
01:45:46*yglukhov joined #nim
01:48:25*PMunch quit (Quit: leaving)
01:50:37*yglukhov quit (Ping timeout: 265 seconds)
01:52:25*endragor quit (Remote host closed the connection)
01:55:00*rtr_ quit (Remote host closed the connection)
02:11:19FromGitter<yuutayamada> seems like nimsuggest repo doesn't activate travis webhook yet
02:13:12*dddddd quit (Ping timeout: 240 seconds)
02:13:14*GangstaCat joined #nim
02:15:58*endragor joined #nim
02:20:52*endragor quit (Ping timeout: 264 seconds)
02:24:46*endragor joined #nim
02:25:05*endragor quit (Client Quit)
02:54:58*rtr_ joined #nim
02:57:01*pie_ quit (Ping timeout: 244 seconds)
02:59:35*rtr__ joined #nim
03:00:38*bungoman joined #nim
03:01:20*rtr_ quit (Ping timeout: 244 seconds)
03:09:44*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:47:32*yglukhov joined #nim
03:51:56*yglukhov quit (Ping timeout: 244 seconds)
04:39:38*fastrom1 quit (Quit: Leaving.)
05:48:52*Demon_Fox quit (Quit: Leaving)
05:49:31*yglukhov joined #nim
05:53:49*yglukhov quit (Ping timeout: 250 seconds)
06:18:10*csoriano joined #nim
06:37:44*chemist69 quit (Ping timeout: 260 seconds)
06:41:54*chemist69 joined #nim
06:43:43*mcc quit (Quit: Connection closed for inactivity)
06:45:06*fastrom joined #nim
06:46:05flyxpong Araq
06:55:50*brechtm_ quit (Read error: Connection reset by peer)
06:55:56*brechtm joined #nim
06:56:19*Trustable joined #nim
07:03:29*lyro joined #nim
07:10:31*Arrrr joined #nim
07:19:10*yglukhov joined #nim
07:25:19*bjz joined #nim
07:40:20*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:41:37*csoriano quit (Quit: csoriano)
07:41:52*csoriano joined #nim
07:42:23ArrrrInteresting that the first dump doesn't work http://pastebin.com/rqgpRyq8
07:42:26ArrrrIs it a bug?
07:48:35*bjz joined #nim
07:51:35flyxArrrr: I'd say that is just invalid syntax
07:52:59ArrrrMmm, it is possible that, in the second case, understands i(int) as the result of a proc call?
07:53:09Arrrri didn't look at i in that way
07:53:37flyxyes
07:54:19*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:54:25flyxbut I am not even sure if that is the problem. `case` afaik wants its of branches indented if the case statement ends with a `:`
07:54:52flyxwhich would explain the „invalid indentation“ error
07:57:28*bjz joined #nim
07:58:11*Arrrr quit (Ping timeout: 250 seconds)
08:02:01*Andris_zbx joined #nim
08:02:10*xet7 quit (Ping timeout: 252 seconds)
08:04:23*Arrrr joined #nim
08:04:23*Arrrr quit (Changing host)
08:04:23*Arrrr joined #nim
08:04:40ArrrrStill i get the same error with and without the last ':'
08:04:50ArrrrSo i suppose you are right here.
08:05:32ArrrrProbably it expects to be inside a type
08:08:58flyxer, no, for that you'd need var, let or const
08:09:04flyxit expects to be inside a `case`
08:09:14*samuell joined #nim
08:09:21flyxthe parser reads `case i:` and then it expects a newline and indented of branches
08:09:25flyxinstead it gets an `int`
08:11:16ArrrrAh, ok, i understand why in this case i get the error. I mean that for case objects i would not get the error, but i'm using it outside a type
08:13:11flyxah, now I understand what you want to do ^^
08:13:31flyxI did not realize you want a variant object case
08:27:26*vegansk joined #nim
08:27:50*vegansk quit (Client Quit)
08:38:17*ftsf_ quit (Remote host closed the connection)
09:08:33euantor@dom96/ or @Araq http://forum.nim-lang.org/t/2514 - spam content on the forum
09:18:14*brechtm_ joined #nim
09:20:14*brechtm__ joined #nim
09:20:14*brechtm__ quit (Read error: Connection reset by peer)
09:21:03*brechtm quit (Ping timeout: 244 seconds)
09:23:20*brechtm joined #nim
09:23:35*brechtm_ quit (Ping timeout: 265 seconds)
09:24:56*brechtm quit (Read error: Connection reset by peer)
09:25:02*brechtm_ joined #nim
09:31:38*brechtm joined #nim
09:33:20*brechtm__ joined #nim
09:34:40*brechtm_ quit (Ping timeout: 264 seconds)
09:36:59*ruslux joined #nim
09:37:03*brechtm quit (Ping timeout: 258 seconds)
09:37:45*ruslux quit (Client Quit)
09:40:06*gokr joined #nim
09:48:08*GangstaCat quit (Quit: Leaving)
10:12:44*fredrik92 joined #nim
10:13:23*fredrik92 quit (Client Quit)
10:14:10*rtr__ quit (Remote host closed the connection)
10:14:44*fredrik92 joined #nim
10:23:07*pafmaf joined #nim
10:38:20*brechtm joined #nim
10:39:00*brechtm quit (Read error: Connection reset by peer)
10:39:06*brechtm_ joined #nim
10:41:53*brechtm__ quit (Ping timeout: 265 seconds)
10:43:38*samuell quit (Quit: Hejdå)
10:44:06*brechtm joined #nim
10:47:15*Snircle joined #nim
10:47:25*brechtm_ quit (Ping timeout: 255 seconds)
10:52:40*foocraft joined #nim
10:54:49*GangstaCat joined #nim
11:06:47*planhths joined #nim
11:12:27*foocraft quit (Remote host closed the connection)
11:16:17*krux02 joined #nim
11:16:48*arnetheduck joined #nim
11:19:58*Arrrr quit (Quit: WeeChat 1.5)
11:21:56*bjz_ joined #nim
11:21:57*bjz quit (Ping timeout: 276 seconds)
11:30:34*csoriano quit (Quit: csoriano)
11:45:44*dddddd joined #nim
11:46:39*chemist69 quit (Ping timeout: 265 seconds)
11:47:02*chemist69 joined #nim
11:47:44*PMunch joined #nim
11:50:33krux02what is the proper way to get 32 random bits as uint32?
11:51:01*dddddd quit (Read error: Connection reset by peer)
11:51:05krux02this one does not compile: random.random[uint32](low(uint32) .. high(uint32))
11:51:30ftsfkrux02, you could just cast an int to uint32
11:51:46ftsfbut your randomness might be off
11:51:57krux02it's important in this case
11:52:35krux02I am implementing a gaussian random number generator
11:55:38krux02not even this compiles: random.random[int32](low(int32) .. high(int32))
11:56:11ftsfhttp://nim-lang.org/docs/random.html#random,int
11:56:24ftsfrandom takes an int: max
11:56:30ftsfand return in 0..max-1
11:56:55ftsfrandom.random(uint32.high.int).uint32
11:57:43ftsfcan test if that gives you a nice distribution or not
11:58:23krux02ftsf: yes random takes an int, but int can be int32 on 32 bit platforms
11:58:38krux02meaning I would kill 32 bit compatibility
11:58:50*brechtm quit (Remote host closed the connection)
11:59:21ftsfkrux02, well you can always implement your own rng
11:59:28*brechtm joined #nim
11:59:34ftsfor modify the stdlib one
11:59:36krux02guess what I am doing at the moment
12:00:13krux02I was missing a gaussian distribution, and wanted to write one that I might add as a pull request.
12:00:47krux02but it turns out that stdlib random is not well thought through at all.
12:01:27krux02I think I have to call random twice to get 32 random bits
12:02:07BlaXpiritkrux02, heh yeah, seems so. cast[uint32](next(state)) would work but it's not public
12:02:22BlaXpiritand yes, gaussian distribution may be too advanced for standard library
12:02:26BlaXpiritshameless plug https://github.com/BlaXpirit/nim-random#random-integers
12:03:55*dddddd joined #nim
12:11:07*fredrik92 quit (Quit: Shutting down...)
12:12:34FromGitter<endragor> @krux02 you could also consider using `mersenne` module. it returns random `uint32`
12:15:49*PMunch quit (Quit: leaving)
12:16:41krux02endragor: thank you I will give it a try
12:17:19krux02the random module even exposes a uint64 as ui but doesn't use it at all in the api
12:19:48krux02I dind't know there was mersenne twister, normally when there is one it is in the random module
12:20:05BlaXpiritkrux02, there was no random module in the past
12:20:46krux02but who wrote it, it has lot's of design crimes
12:21:22krux02the random module should by default use the merenne twister
12:21:55BlaXpiritkrux02, uhm people argue that mersenne twister is outdated
12:22:03BlaXpiritkrux02, earlier question https://github.com/nim-lang/Nim/commits/master/lib/pure/random.nim
12:22:35BlaXpiritmy random module uses mersenne twister by default though :p
12:24:41krux02I am not an export I don't know the details of MT, but I never heared any complains about it, it even got into the c++ standard
12:25:02BlaXpiritkrux02, among so many other things though
12:26:05krux02ok it's not a good argument to say something is good because it is in the c++ standard, but I think the things added recently for c++ are actually really improving on the language
12:26:28krux02but that's another topic on it's own
12:40:42*planhths quit (Ping timeout: 265 seconds)
12:52:06arnetheduckAraq, want a patch that kills off endb too?
12:53:17*planhths joined #nim
12:59:39krux02endragor: thanks for your hint to mersenne module, it now works entirely on it, and the dependency to `random` is removed
12:59:59*pie_ joined #nim
13:00:42*pie_ quit (Changing host)
13:00:42*pie_ joined #nim
13:06:05*xet7_ joined #nim
13:06:22*PMunch joined #nim
13:09:48*xet7 joined #nim
13:13:40*fredrik92 joined #nim
13:19:04*dddddd quit (Ping timeout: 255 seconds)
13:22:40*fredrik92 quit (Quit: changing host)
13:23:05*fredrik92 joined #nim
13:25:08*xet7 quit (Ping timeout: 244 seconds)
13:25:08*yglukhov quit (Ping timeout: 244 seconds)
13:25:26*xet7 joined #nim
13:25:43*yglukhov joined #nim
13:26:17*mcc joined #nim
13:32:31*dddddd joined #nim
13:37:36mccIs it possible to make a macro that "looks like" an object?
13:38:01mccI want to set it up so that if you call gl.someFunction() it gets translated to glSomeFunction() automatically
13:39:23mccIt looks like there are macro hooks for trapping MACRONAME( args ) called like a function, MACRONAME:\r\tblock called like a statement, and invoking a macro on something with a pragma
13:39:43mccBut it doesn't seem like there's anywhere to hook in a macro that looks like MACRONAME.etc
13:40:38mccMaybe a macro is not the best way to do this.
13:43:24*stisa joined #nim
13:43:26mccIt lets me do: macro `gl.`*(x: expr): expr = x
13:43:39FromGitter<vendethiel> why do you want a macro?
13:43:50FromGitter<vendethiel> why not just forward the arguments? Sounds like FFI wrapping 101
13:44:27mcchowever this has no effect, gl.q just says "gl not found"
13:44:42yglukhovmcc: i don't have an answer to your question, but there are portble_gl bindings in nimx, that work in js and natively with zero runtime cost. https://github.com/yglukhov/nimx/blob/master/nimx/portable_gl.nim
13:46:07flyxmcc: you *can* build a macro that does this, but it is probably not as versatile as you think it is, because the compiler must be able to recognize `gl` as some known identifier
13:47:24flyxmcc: see https://gist.github.com/flyx/57c538646826ef2801b948dbfbb17a64
13:48:15BlaXpiritflyx, but can it be done automatically for gl.anything ?
13:48:20mccvendethiel: I am trying to set something up where I can write code which is unified between opengl and javascript. currently i'm generating the gl function calls on the js side from a script that looks at the es2015 definition and using the opengl module on the native side. the js code generates so that things look like gl.clearColor(). The opengl module of
13:48:20mcccourse exports glClearColor(). so I'm trying to figure out how to get something in scope that syntactically looks like an object named `gl`, but which forwards any method calls on it to just calling the glClearColor() function in the opengl module or getting the GL_WHATEVER_WHATEVER constant.
13:48:43mccvendethiel: So ok, I'm FFI wrapping, but I don't know how to wrap things in Nim, I assumed you did that in the macro layer
13:48:52mccglukhov: oh, that is interesting, maybe I shuold just be using that.
13:49:01flyxBlaXpirit: no, that's what I meant by „not as versatile as you think“
13:49:44BlaXpiritwhat about these http://nim-lang.org/docs/manual.html#special-operators-dot-operators
13:50:21mccAnother possibility is if I could do something that at compile-time analyzes the opengl module and generates wrappers for everything exported by it
13:51:09FromGitter<vendethiel> @mcc I'd say you wrap it with functions, as usual
13:51:15flyxBlaXpirit: well either it doesn't work with a macro, or it does work, in which case *every* dot expression that is not resolvable otherwise will suddenly get piped into that macro
13:51:26BlaXpiritgood point
13:51:43mccI think the dot operators would work, but the function name gets converted to a string, whereas i want to resolve it to a symbol
13:52:05mccvendethiel: Is it possible to do this without either writing out all the wrapper functions by hand, or running a script external to nim?
13:53:18*PMunch quit (Quit: leaving)
13:53:38*PMunch joined #nim
13:54:28mccThere's some thing called nimSl which is able to analyze a function at compile time and spit out a string, so one assumes you could do the same thing to a module
13:54:55flyxBlaXpirit: also, the dot notation does not cover gl.someFunction(foo), it would need to be written as (gl.someFunction)(foo)
13:55:08ftsf\o/ just made a subtractive synth in nim :3
13:55:58flyxmcc: a proc is a part of the Nim syntax tree, a module is not
13:56:01mccftsf: cool
13:56:22flyxwell, afaik
13:57:25ftsfgood thing i don't have housemates anymore =)
13:57:33FromGitter<vendethiel> @mcc: yeah, you could write a macro to generate those calls :)
13:58:36flyxgetType() on a module name returns "void"
13:59:16*gunn_ quit (Ping timeout: 264 seconds)
14:02:09*gunn joined #nim
14:03:01mccflyx: my reading is that .() can catch gl.someFunction(x) , however, again, then i'd have to interpret a string at runtime, which is a cost
14:03:42*fredrik92 quit (Quit: Leaving.)
14:06:18mccI guess it seems sorta weird I can totally do a macro that converts %.symbolname to glSymbolName, but I can't do a macro that converts gl.symbolname to glSymbolName
14:09:31def-mcc: can't the string interpretation be done at compile time? at least the information is known at compile time, so "when" or a macro should work
14:09:31Araqyou cannot figure out to use newIdentNode?
14:10:44flyxmcc: okay, this works: https://gist.github.com/flyx/37306d3e1dc2bec63987d5f93b2f3704
14:10:48flyxbut I consider it bad code
14:11:07mccohhh...
14:11:23mcci didn't realize .() could be a macro. Hm.
14:11:44def-but "when" instead of "if" should be simpler if it works
14:13:41flyxthe problem is that it catches everything. if `a` is some variable, `a.foo()` will print "Some useful error message here"
14:13:54flyxso you basically override the compiler messages for unresolvable fields
14:14:00mccaraq: Is it weird that "macro `%.`*(x: expr): expr = x" works, but "macro `%gl.`*(x: expr): expr = x" silently does nothing? If I do the latter %gl.q is just an error message ("% not defined"). I mean, if macro `` can't include alphanumerics in this fashion that is fine, but maybe it should emit an error message rather than failing silently
14:14:36mccflyx: oh. i see :/
14:15:12def-what about making a module gl, "import nil from gl", and then you can use someFunction() as gl.someFunction()?
14:15:50mccaraq: newIdentNode seems straightforward enough, what I cannot figure out how to do at the moment is how to trap the gl.whatever() call into the macro processor in the first place so that i have the opportunity to call newIdentNode.
14:16:15mccaraq: if i could at compile time browse over the contents of the opengl module and generate "bindings" at that poin that would also solve my problem, but it's not clear if that's possible
14:16:41Araqtype DotType = distinct int
14:16:48Araqvar gl: DotType
14:17:05Araqmacro `.`(x: DotType; y: untyped) ...
14:17:50Araqabout the "silently does nothing": No, it's not weird, it's your misunderstanding of what backticks do
14:18:08mccdef-: I still have to populate the module with something. I could use yglukhov's nimx.portable_gl for this but there's some philosophical advantage to the generation of the module being automated (there are a couple symbols missing in portable_gl, i could file pull requests but...)
14:18:51flyxhere, it now restored the error message for other dot expressions: https://gist.github.com/flyx/37306d3e1dc2bec63987d5f93b2f3704
14:18:53mccaraq: okay. and that in fact will *not* catch q.whatever where q is something other than DotType?
14:19:06mccaraq/flyx: thank you so much.
14:19:49*flyx attaches a large „NOT WELL TESTED // USE WITH CARE“ sticker to that code
14:20:15Araqmcc: these are all hackish IMO, and you should stick to generating the wrapper code in a more traditional fashion
14:20:37mccAraq: What would be a traditional means of generating wrapper code for a Nim module?
14:20:56Araqc2nim generates Nim source code...
14:21:11Araqwhat's wrong with yglukhov's OpenGL thing?
14:21:34hohlerdestruct alignment and golang .... two worlds collide
14:22:06Araqalso I think you should use Emscripten, JS backend + OpenGL, why? the JS backend is for web'y stuff
14:23:35mccsorry, i mean: if i want to generate bindings from c, i can use c2nim, if i want to generate bindings from js, i wrote my own script from that, but in this particular situation what i'm curious about is generating a "binding" wrapper for an existing nim module, just to make it look different. i accept this might not be the most reasonable thing to attempt
14:24:24hohlerdedoes nim have problems with packed structs? if a lib function returns a packed struct, can I use that in nim or do I have to take care of padding? sorry for the dumb question, I am a C noob.
14:24:56Araqthere is a .packed pragma for that iirc
14:25:11hohlerdeoh, thx for the hint
14:27:20mccyglukov's opengl thing is very good, the only downside to it is it is missing a couple things which the opengl module has, so if i want to use random stuff there would be some extra steps to adding things.
14:28:17Araqadd the things.
14:30:02*okami quit (Quit: 1.5)
14:31:57mccaraq: I'm avoiding using emscripten because my understanding is it produces fairly bloated output files (in part because it embeds its own libc, etc, i believe?) and also my understanding is it's pretty difficult to interact directly with js libraries from in there. the webgl app i've written (and am now trying to backport to desktop) uses both webgl and a
14:31:57mccwebaudio library called tone.js
14:33:20mccaraq: on the nimx thing i have no defense and i probably will start merging my approach with nimx at some point :O
14:34:34*xet7 quit (Quit: Leaving)
14:36:01*okami joined #nim
14:36:35*okami quit (Client Quit)
14:47:50hohlerdeam I right that single byte alignment for C structs and the packed pragma are basically the same?
14:50:53mcchohlerde: the definition in the manual certainly seems to say so http://nim-lang.org/docs/manual.html#foreign-function-interface-packed-pragma
14:55:42*themagician quit (Ping timeout: 244 seconds)
14:56:07hohlerdemcc: I agree, but I was a bit uncertain. On the other hand that means if a library uses 2 byte struct alignment, I am out of luck and need to emit boilerplate code to handle that special alignment.
14:57:05mccIf you need 2 byte struct alignment, I assume the normal way to do this would be to insert padding members.
14:57:25mccAlso are we talking about 2 byte alignment for fields or 2 byte alignment for the whole structure?
14:58:45hohlerdethe lib uses in its header file #pragma pack(push,2) at the beginning and #pragma pack(pop) at the end
14:59:37Araqis this DOS code?
15:00:07Araq2 byte alignment is kinda like 6 bit bytes
15:01:06hohlerdenope, its running under linux and windows and comes from an ATM manufacturer. the include files are weird. one uses 1 byte alignment and the other 2 byte alignment
15:02:16hohlerdethe first lib version was released in 2007
15:04:04hohlerdeI am currently not sure how to handle 2 byte alignment in a nim wrapper for that lib :-) never did something like manually adding padding bytes.
15:07:38*elrood joined #nim
15:08:07mcchohlerde: unless you try to modify the .packed pragma in nim's code, it would just mean editing the nim versions of the structs and inserting uint8 members as appropriate
15:08:25hohlerdeyes
15:08:27mcchohlerde: will involve doing some math in your head tho
15:08:54hohlerdeand a lot, because the lib uses a lot of (nested) structs
15:15:48planhthsHi, could the syntax ` 'a' not in {'a', 'b', 'c'} ` exist in nim?
15:16:52krux02planhths: whats so bad about not 'a' in {...}?
15:17:18planhthsI though it wasn't compiling
15:17:35planhthskrux02: let me check again
15:17:56mccOkay, so granted that this macro . thing i am doing may not be the best way to do this and I'm trying to understand nim macros at this point--
15:18:21mcc"Warning: overloaded '.' and '()' operators are now .experimental; . is deprecated [Deprecated]" <-- is this surprising? am i doing something wrong / should i be doing something different?
15:18:49BlaXpiritmcc, probably should accept the absence of namespaces
15:18:53mccI get this when I try to compile macro `.` or macro `.()`. This is with last week's git devel
15:18:54planhthsyes it says "Error: type mismatch: got (char) but expected one of ..."
15:18:54krux02planhths, ok I am surprised it isn't compiling
15:19:22mccblaxpirit: sorry, namespaces?
15:20:07BlaXpiritmcc, why do you want to introduce this fake dot if it changes very little?
15:20:16krux02planhths, 'a' notin {'a', 'b', 'c'} works for me
15:20:49planhthskrux02: ok thanks
15:21:24mccblaxpirit: i am trying to bridge two dissimilar APIs without manually writing a bunch of bindings. as discussed above, the advice from this channel is that i should be instead be using manually written bindings (the nimx approach)
15:21:25krux02but it's weird, that not ('a' notin {'a', 'b', 'c'}) doesn't work
15:22:58planhthsnot ('a' notin {'a', 'b', 'c'}) works but " not a' notin {'a', 'b', 'c'}" doesn't
15:23:19planhths*not 'a' in {'a', 'b', 'c'}
15:24:41krux02maybe you can write an expression macro for this ;)
15:26:29planhthsmaybe...
15:34:52Araqunary operators bind stronger than binary ops
15:40:50*planhths quit (Ping timeout: 258 seconds)
15:43:15*planhths joined #nim
15:43:44*reactormonk_ joined #nim
15:44:01*pafmaf quit (Ping timeout: 250 seconds)
15:44:55*yglukhov_ joined #nim
15:45:30*sarlalian joined #nim
15:46:20*arnetheduck quit (Ping timeout: 244 seconds)
15:48:54*reactormonk quit (Quit: WeeChat 1.5)
15:48:55*CARAM__ quit (Ping timeout: 260 seconds)
15:48:55*zielmicha quit (Ping timeout: 260 seconds)
15:48:58*EastByte quit (Ping timeout: 260 seconds)
15:48:59*krux02 quit (Ping timeout: 260 seconds)
15:48:59*mtj_ quit (Ping timeout: 260 seconds)
15:48:59*ofelas quit (Ping timeout: 260 seconds)
15:49:00*kier quit (Ping timeout: 260 seconds)
15:49:00*vktec quit (Ping timeout: 260 seconds)
15:49:01*JStoker quit (Ping timeout: 260 seconds)
15:49:01*RushPL quit (Ping timeout: 260 seconds)
15:49:01*abruanese quit (Ping timeout: 260 seconds)
15:49:02*sarlalian_ quit (Ping timeout: 260 seconds)
15:49:02*yglukhov quit (Ping timeout: 260 seconds)
15:49:09*abruanese joined #nim
15:49:11*krux02 joined #nim
15:49:16*RushPL joined #nim
15:49:34*ofelas joined #nim
15:50:13*mtj_ joined #nim
15:51:08*kier joined #nim
15:53:45*planhths quit (Ping timeout: 244 seconds)
15:54:38*zielmicha joined #nim
15:55:06*JStoker joined #nim
15:55:43*okami joined #nim
15:56:07*CARAM__ joined #nim
15:57:44*PMunch quit (Quit: leaving)
15:59:15*EastByte joined #nim
15:59:36*vktec joined #nim
16:00:58*Andris_zbx quit (Remote host closed the connection)
16:28:38*planhths joined #nim
16:29:38*nsf quit (Quit: WeeChat 1.5)
16:29:47flyxif I have a file named like some stdlib module, how can I import the stdlib module instead? for example, I have a streams.nim in my directory and want to import stdlib's streams
16:34:50dom96I don't think you can currently
16:34:56dom96There is an open issue about this somewhere
16:37:32*yglukhov_ quit (Ping timeout: 265 seconds)
16:42:29*Demon_Fox joined #nim
16:42:36ftsfhttp://static.impbox.net/synth.mp4 \o/ nim synth is sounding synthy. so easy to prototype stuff in nim.
16:44:53*brechtm_ joined #nim
16:45:43Araqflyx: import "$lib/pure/streams"
16:46:03Araqthere is an issue because of the 'pure' part but it will continue to work
16:48:28*brechtm quit (Ping timeout: 264 seconds)
16:48:46dom96ftsf: firefox says the file is corrupt
16:49:30ftsfdom96, =( making video compatible for all browsers is hard.
16:50:20dom96works in Chrome, ooooh
16:51:09dom96ftsf: is this all written in Nim?
16:51:13ftsfdom96, yeah
16:51:19dom96awesome!
16:51:25dom96got the source up anywhere?
16:51:29ftsfSDL for graphics and audio, although I'd like to port it to use JACK
16:51:42ftsfnot yet, but i'll put it up once it's cleaned up a bit
16:51:48cheatfateflyx, i think when you `import streams` you will get stdlib's streams
16:51:54cheatfatenot yours
16:52:13ftsfi'd like to make a little music studio thing, simple synths and sequencer
16:57:13flyxcheatfate: I got mine, not the stdlib's, but I solved it by renaming my file now
16:58:34cheatfateAraq, i thought if i have local version of `somemodule.nim` and stdlib has same module `somemodule.nim`, then if i'm using `import somemodule` - stdlib's module must be imported not my local version, am i wrong?
16:58:49mccftsf: that is a really good sound :O
17:01:28ftsfmcc, thanks! still learning this stuff, but it's coming together
17:01:59*pafmaf joined #nim
17:11:06*okami quit (Quit: 1.5)
17:11:16*okami joined #nim
17:11:42*nairobi joined #nim
17:18:28*dddddd quit (Ping timeout: 244 seconds)
17:21:00*yglukhov joined #nim
17:25:12*yglukhov quit (Ping timeout: 244 seconds)
17:29:00mccflyx: so-- granted that there seems to be a consensus in here that it is not a very good idea to actually use that macro code you pasted--
17:30:31mcc--wait, n/m, figured it out
17:31:18*dddddd joined #nim
17:38:40*xet7 joined #nim
17:41:42*perturbation joined #nim
17:43:21mcc...ok, yeah. so I modified flyx's .() macro in an attempt to make a version that could be used for constants: https://gist.github.com/mcclure/efbb3f564b8c6447f2400ac656913dbe however, when i run it, i get: Error: value of type 'int' has to be discarded
17:43:44mccIf I change it from "let glSomeVar" to "const glSomeVar" it says that a literal(4) has to be discarded. Am I missing something here?
17:45:17mccIt seems to be wanting to treat the ast fragment returned by the macro, in this one case, as a statement rather than a n expression
17:47:18Araqmcc: use 'untyped' as the return type of the macro. known bug.
17:47:32mccok, thanks
17:47:38Araqcheatfate: actually local files override stdlib files
17:47:46*Jesin joined #nim
17:47:47Araqotherwise we couldn't add new modules to the stdlib.
17:56:45flyxI get a strange error with my code here: https://gist.github.com/flyx/f827fbf10d2da4e2fd1bf27809716276
17:57:25flyxwhat does `invalid type: 'None'` mean? I have given all types
17:57:43flyxit even tells me in the error message that the generic type has a proper parameter
17:58:13Araqtry without ': SourceProvider'
17:58:54flyxhmm, that works
17:59:28flyxbut I do need SourceProvider
18:01:27mccIt is normal that macros are recursively available inside themselves, right? Like when I tried making a macro `.`, it was trying to apply macro `.` when I used . inside the macro
18:02:20*yglukhov joined #nim
18:04:09flyxinterestingly, it works when I give [T: BaseLexer] to newYamlLexer explicitly and return YamlLexer[T]
18:04:37*krux02 quit (Remote host closed the connection)
18:09:06*yglukhov quit (Remote host closed the connection)
18:13:24*chemist69 quit (Ping timeout: 258 seconds)
18:15:38*Senketsu quit (Quit: Leaving)
18:15:48*chemist69 joined #nim
18:18:45*csoriano joined #nim
18:21:28*pafmaf quit (Ping timeout: 264 seconds)
18:44:54*yglukhov joined #nim
18:47:54*kulelu88 joined #nim
19:12:08*Mat4 joined #nim
19:13:24*Mat4 left #nim (#nim)
19:14:42*planhths quit (Ping timeout: 265 seconds)
19:22:21*pafmaf joined #nim
19:25:37*Matthias247 joined #nim
19:28:00*krux02 joined #nim
19:34:19*planhths joined #nim
19:35:26*nsf joined #nim
19:48:33*nairobi quit (Remote host closed the connection)
19:52:27*planhths quit (Ping timeout: 244 seconds)
20:01:22*stisa_ joined #nim
20:03:42*gokr1 joined #nim
20:05:59*stisa_ quit (Client Quit)
20:10:13*xet7 quit (*.net *.split)
20:10:13*EastByte quit (*.net *.split)
20:10:13*mtj_ quit (*.net *.split)
20:10:13*stisa quit (*.net *.split)
20:10:14*pie_ quit (*.net *.split)
20:10:14*gokr quit (*.net *.split)
20:10:14*alexsystemf___ quit (*.net *.split)
20:10:14*namnguyen quit (*.net *.split)
20:10:14*derlafff quit (*.net *.split)
20:10:15*jonafato quit (*.net *.split)
20:10:41*jonafato joined #nim
20:11:52*EastByte joined #nim
20:11:53*alexsystemf___ joined #nim
20:11:53*namnguyen joined #nim
20:11:53*derlafff joined #nim
20:12:20*pie_ joined #nim
20:12:21*xet7 joined #nim
20:12:21*alexsystemf___ quit (Max SendQ exceeded)
20:12:48*mtj_ joined #nim
20:13:13*alexsystemf___ joined #nim
20:16:36*pie_ quit (Changing host)
20:16:37*pie_ joined #nim
20:18:47*yglukhov quit (Remote host closed the connection)
20:23:45*rtr_ joined #nim
20:30:02*GangstaCat quit (Quit: Leaving)
20:36:28*fredrik92 joined #nim
20:36:53*dddddd quit (Read error: Connection reset by peer)
20:39:22*dddddd joined #nim
20:40:51*reactormonk_ is now known as reactormonk
20:59:58*Ven_ joined #nim
21:13:51*fredrik92 quit (Quit: Leaving.)
21:14:08*csoriano quit (Read error: Connection reset by peer)
21:14:13*fredrik92 joined #nim
21:16:15*csoriano joined #nim
21:27:10*csoriano quit (Quit: csoriano)
21:28:23*Trustable quit (Remote host closed the connection)
21:30:58*fredrik92 quit (Quit: Leaving.)
21:31:28*fredrik92 joined #nim
21:44:17*fredrik92 quit (Quit: Leaving.)
21:44:41*fredrik92 joined #nim
21:45:02*fredrik92 quit (Client Quit)
21:46:27*fredrik92 joined #nim
21:46:41*fredrik92 quit (Client Quit)
21:47:47*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:49:19mccOK, so, I am confused by when and why the javascript export chooses to turn types into TypedArrays
21:49:20*fredrik92 joined #nim
21:49:47mccIf i compile this code with js: `var a {.exportc.} : array[4, float32] ; var b {.exportc.} : array[1, array[4, float32]]` "a" becomes an Array with 4 elements, and "b" becomes an Array containing 1 element which is a Float32Array with 4 elements.
21:49:51mccWhy?
22:03:44*rtr_ quit (Remote host closed the connection)
22:05:25*rtr_ joined #nim
22:07:04*pafmaf quit (Ping timeout: 264 seconds)
22:09:53*rtr_ quit (Ping timeout: 244 seconds)
22:26:19*nairobi joined #nim
22:40:11*nairobi quit (Remote host closed the connection)
22:48:59*xet7 quit (Read error: Connection reset by peer)
22:49:45*xet7 joined #nim
23:12:41*elrood quit (Quit: Leaving)
23:19:34*Matthias247 quit (Read error: Connection reset by peer)
23:21:24*xet7 quit (Read error: Connection reset by peer)
23:21:49*xet7 joined #nim
23:25:26*perturbation quit (Quit: Leaving)
23:30:14*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:31:17*gunn_ joined #nim
23:32:40*brson joined #nim
23:33:54*brechtm_ quit (Read error: Connection reset by peer)
23:34:00*brechtm joined #nim
23:34:48*xet7_ quit (Remote host closed the connection)
23:35:09*gunn quit (Ping timeout: 276 seconds)
23:36:18*PMunch joined #nim
23:39:33*xet7 quit (Read error: Connection reset by peer)