<< 09-10-2017 >>

00:01:57*relax joined #nim
00:13:28*libman quit (Quit: Connection closed for inactivity)
00:16:34*def-pri-pub1 quit (Quit: Leaving.)
00:21:21*relax quit (Ping timeout: 248 seconds)
00:34:08*def-pri-pub joined #nim
00:40:58*vivus quit (Quit: Leaving)
00:45:09JappleAckif someone interested, i just implemented some algebraic data types and kinda functors https://pastebin.com/uBTeBdsz (Maybe and Either)
00:52:18JappleAckhttps://gist.github.com/unclechu/eb37cc81e80afbbb5e74990b62ea21f6
01:06:18*libman joined #nim
01:10:25*def-pri-pub quit (Quit: Leaving.)
01:10:37libmanicc gives Nim the edge over Rust in some benchmarks. Too bad the free version expires.
01:16:48FromGitter<zacharycarter> icc?
01:17:36FromGitter<zacharycarter> intel c compiler?
01:20:37*relax joined #nim
01:29:46*smt` quit (Ping timeout: 255 seconds)
01:37:05*relax quit (Ping timeout: 248 seconds)
02:00:49*chemist69 quit (Ping timeout: 255 seconds)
02:14:33*chemist69 joined #nim
02:34:41libmanYeah, that was in response to the backlog from a few hours before. Being able to choose C compilers is a big advantage. Some light C compilers are done before Clang laces up one boot.
02:35:58libmanAnd some proprietary compilers still produce the best optimized machine code on some platforms.
02:40:39FromGitter<edubart> I did get 2x speed up in some math codes in nim with icc over gcc
02:49:53FromGitter<Varriount> @zacharycarter So I looked up some Star Trek Armada screenshots. It looks like selected units have a 2d semi-transparent billboard drawn behind them.
02:57:42*Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com)
03:05:19*JappleAck quit (Quit: Leaving)
03:21:58*endragor joined #nim
03:28:27*dddddd quit (Remote host closed the connection)
03:38:38*relax joined #nim
03:43:16FromGitter<zacharycarter> @Varriount I think I got a good solution worked out with the stencil buffer
03:43:44FromGitter<zacharycarter> I just finished rewriting all my isometric map rendering code to get rid of all the magic numbers
03:44:08*FromGitter * Varriount has a bad habit of using magic numbers
03:45:14FromGitter<Varriount> @zacharycarter Does using the stencil buffer change at all began OpenGl 2 and latest?
03:46:12*def-pri-pub joined #nim
03:46:58*def-pri-pub quit (Client Quit)
03:49:04FromGitter<zacharycarter> nope
03:59:43FromGitter<zacharycarter> @Varriount I'm debating between making a RPG and a RTS
03:59:53FromGitter<zacharycarter> RTS seems much more complicated
04:00:23FromGitter<Varriount> I like RPGs more
04:00:25FromGitter<Varriount> Hm.
04:01:21FromGitter<Varriount> @zacharycarter If you're stumped for ideas, you could look at Megaman Battle Network and Spybot: The Nightfall Incident.
04:02:10FromGitter<Varriount> Admittedly, I'm recommending them because both are isometric-ish games I love.
04:03:15FromGitter<zacharycarter> :D
04:03:22*vlad1777d joined #nim
04:05:26*Nobabs27 joined #nim
04:05:57FromGitter<zacharycarter> I think I'm going to challenge myself and go for a rts
04:08:21FromGitter<Varriount> You could go for a real-time RPG
04:08:47FromGitter<Varriount> Like Pillars of Eternity, or Neverwinter
04:09:40FromGitter<zacharycarter> true
04:10:42FromGitter<zacharycarter> that's probably what I'd do if I was going to make a rpg
04:10:50FromGitter<zacharycarter> I don't think I'd make it turn based
04:14:23*relax quit (Ping timeout: 248 seconds)
04:37:27*Nobabs27 quit (Quit: Leaving)
04:51:46*Demos joined #nim
04:53:28*libman quit (Quit: Connection closed for inactivity)
04:53:32*miran quit (Quit: Leaving)
04:53:53*miran joined #nim
05:19:47*Demos quit (Quit: Demos)
05:31:10*vlad1777d quit (Remote host closed the connection)
06:01:50*Vladar joined #nim
06:14:00*PMunch joined #nim
06:19:05*solitudesf joined #nim
06:33:37*nsf joined #nim
06:54:08*endragor quit (Remote host closed the connection)
06:58:25*gokr joined #nim
07:08:08FromGitter<Bennyelg> Always printing the same values. ⏎ where are the random kicks IN? :shipit: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59db2058210ac26920c2c6a5]
07:15:54PMunchHmm, when quoting things with the "quote" procedure from the macros module you can't access fields?
07:23:58*claudiuinberlin joined #nim
07:26:23FromGitter<Araq> @Bennyelg omg DO NOT use random for password generation
07:26:36FromGitter<Bennyelg> its not
07:26:48FromGitter<Bennyelg> @Araq I want it to generate Salt
07:26:56FromGitter<Bennyelg> But why this thing isnt working
07:27:06FromGitter<Araq> yes, don't use random to generate a salt either
07:27:41FromGitter<Araq> newSeqWith evaluates 'random' once?
07:27:51FromGitter<Araq> just a guess though
07:27:53*endragor joined #nim
07:29:54PMunchAraq, are there any cryptographically secure RNGs implemented in Nim?
07:30:14FromGitter<Bennyelg> @Araq So what is the best way to generate Salt password
07:30:17FromGitter<Bennyelg> I need something
07:31:22ftsfBennyelg, read from /dev/random if you're on linux, obviously not a good cross platform solution.
07:31:41Araqforum.nim line 223
07:32:10Araqbut yeah, some pure Nim solution would be nice. there is the nim-random package but I'm not sure if it's still alive
07:34:14*Arrrr joined #nim
07:34:19*Arrrr quit (Changing host)
07:34:19*Arrrr joined #nim
07:51:22*yglukhov joined #nim
07:54:08FromGitter<Bennyelg> @Araq I'll look into that thanks
08:11:42*PMunch_ joined #nim
08:11:56*PMunch quit (Disconnected by services)
08:12:14*PMunch_ is now known as PMunch
08:14:43*gokr left #nim (#nim)
08:18:36FromGitter<Bennyelg> @Araq
08:19:23FromGitter<Bennyelg> Just to let you know ⏎ If you call random from some seq it's always generate the same number ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59db310a614889d475904c45]
08:21:10FromGitter<mratsim> @Bennyelg change the seed
08:22:55FromGitter<mratsim> But there should be a crypto package.
08:23:16FromGitter<Bennyelg> This is the worst random package I ever used in any language so far
08:24:16FromGitter<mratsim> Personally I have much more use of fast pseudo rng than a crypto secure rng. I need determinism for reproduceability of Machine Learning algo
08:24:38FromGitter<mratsim> Idem for Monte Carlo simulations
08:26:23FromGitter<mratsim> Actually if you search for "Nvidia non-deterministic" you get a lot of hits showing that being really random is a pain: https://www.twosigma.com/insights/a-workaround-for-non-determinism-in-tensorflow
08:29:08Araqimport random
08:29:08Araqecho random(255), " ", random(255)
08:29:15Araqproduces random numbers for me
08:29:38Araqimport random
08:29:38Araqrandomize()
08:29:38Araqecho random(255), " ", random(255)
08:29:56Araqproduces non-reproducible random numbers for me
08:30:30Araqit works exactly as designed
08:38:32*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:46:14*claudiuinberlin joined #nim
08:49:09FromGitter<Bennyelg> @Araq echo random(255), " ", random(255) produce always the same numbers forme
08:49:20FromGitter<Bennyelg> 152 129 if to be exact
08:49:46Araqmaybe read everything I wrote
08:50:18FromGitter<Bennyelg> Now I get it, sorry but this is not a regular desgin
08:50:23FromGitter<Bennyelg> design*
08:50:39FromGitter<Bennyelg> why not just random(anytype) to produce a real random every time ?
08:50:52Araqit's a common design.
08:51:30FromGitter<Bennyelg> do it in python for example, you need need to randomize everytime
08:51:58Araqhttps://www.tutorialspoint.com/c_standard_library/c_function_rand.htm
08:52:57Araqhttp://en.cppreference.com/w/cpp/numeric/random/rand
08:54:31Araqhttp://docs.oracle.com/javase/7/docs/api/java/util/Random.html#Random()
08:55:07Araqdifferent libraries do it differently.
08:55:20FromGitter<mratsim> If I want to create a nnkBracket in a macro should I use newCall or is there a more idiomatic way? I didn't find a "newBracket" proc
08:56:37*skrylar joined #nim
08:57:00FromGitter<mratsim> @Bennyelg iirc Numpy behaves the same as Nim, np.random is pseudo rng with seed = 0 by default
08:57:16AraqnewTree(nnkBracket, newLit(1), newLit(2), newLit(3))
08:57:33skrylarzacharycarter: more gpu fun to bonk. tried lrzip (its like that thing gokr found) and tested it on some dds textures
08:57:38Araqmratsim: most constructions are best done with the rather new 'newTree'
08:58:38*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:00:28skrylarinterestingly, zpaq (compression algorithm) on a DXT texture is smaller than a png of the same texture, and thats including the mipmaps. although the .dds.lrz is still larger than a jpeg, its only 4x larger. neat.
09:07:24FromGitter<mratsim> Ah cool thanks Araq
09:13:49*Yardanico joined #nim
09:23:56*couven92 joined #nim
09:29:44skrylarhm
09:29:49skrylarwonder how light allocators work
09:30:05skrylarif they have some special trick or it just dist checks the nearest N lamps
10:03:12*claudiuinberlin joined #nim
10:05:41skrylarwell thats neat. i think i got distance field paintbrushes somewhat working
10:16:42skrylarNow the downside is that i'm using bresenham lines and this seems to result in some aliased jittering even though rounded circles are being painted
10:21:05dom96mratsim: not sure if you frequent HN, but this sounds like something you might be interested in reading: https://news.ycombinator.com/item?id=15429824
10:31:43*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:32:33*ShalokShalom quit (Ping timeout: 258 seconds)
10:32:41*JappleAck joined #nim
10:40:59FromGitter<Bennyelg> what is wrong here :| ⏎ ⏎ ```proc range*[T](x, y: int): seq[T] = ⏎ newSeqOfCap[T](y-x)``` [https://gitter.im/nim-lang/Nim?at=59db523be44c43700a0ec361]
10:51:59*Yardanico quit (Remote host closed the connection)
10:53:44ArrrrNothing, is perfect
10:53:54ArrrrAs the woman of my dreams
10:54:34FromGitter<ephja> yeah that works
10:57:27FromGitter<Bennyelg> for me the range proc not work. ⏎ also, this thing: ⏎ ⏎ ``` for i in 0..<10: ⏎ echo(cast[char](i))``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=59db561701110b7231937d2f]
10:58:26ArrrrThere is no char 10
10:58:35Arrrrthere is char 1 and char 0
10:58:38FromGitter<Bennyelg> yea sorry
10:58:41FromGitter<Bennyelg> 1-9
10:58:44FromGitter<Bennyelg> 0-9*
10:58:53Arrrrthen you could try $i[0]
10:59:30FromGitter<Bennyelg> I did it like this: i.intToStr.mapIt(char, it))
10:59:32FromGitter<Bennyelg> but i dont like it
11:00:45FromGitter<Bennyelg> ```proc range*[T](x, y: int): seq[T] = ⏎ newSeqOfCap[T](y-x)``` ⏎ ⏎ this yield "canot instantiate T" [https://gitter.im/nim-lang/Nim?at=59db56ddbbbf9f1a383c1566]
11:01:58ArrrrUse `range[int]()`
11:02:09FromGitter<Bennyelg> :| oh yea
11:02:26*Snircle joined #nim
11:03:48ArrrrThis guy had your very issue https://forum.nim-lang.org/t/3235
11:08:54chemist69damn, either wrapping a C++ library is really hard or I am doing it completely wrong :P
11:09:02chemist69I'm giving up.
11:10:55*chemist69 quit (Quit: WeeChat 1.9.1)
11:11:10*chemist69 joined #nim
11:12:11FromGitter<BigEpsilon> what's the difficulty @chemist69 ?
11:13:08FromGitter<BigEpsilon> I'll help you if i can
11:13:21couven92chemist69, well for C++ iirc you get compiler specific name-mangling, and all kinds of other niceties to take into account... There is a reason why libraries in C++ often expose their API with C bindings :P
11:14:37chemist69Yeah, I am trying to create wrappers for some functionality of this project: https://github.com/rdkit/rdkit
11:15:05chemist69And it probbably doesn't help that it is using boost and that I am not a C++ programmer.
11:15:42FromGitter<BigEpsilon> did you try c2nim ?
11:16:16chemist69Yes, was almost no help. It choked on several header files
11:16:56chemist69For starters, I would like to wrap https://github.com/rdkit/rdkit/blob/master/Code/GraphMol/SmilesParse/SmilesParse.h
11:17:41FromGitter<BigEpsilon> yes it still does not cover all c++, and some things I thinks are not possible to translate directly
11:18:10FromGitter<BigEpsilon> But Yes if you don't know cpp you'll have a hard time
11:19:45FromGitter<BigEpsilon> I see nothing that is impossible to translate in SmilesParse
11:20:00FromGitter<BigEpsilon> you may need a little workaround for maps
11:20:42FromGitter<BigEpsilon> https://github.com/nim-lang/Nim/pull/4094/files
11:21:03FromGitter<BigEpsilon> maybe try calling python from nim ?
11:25:42chemist69BigEpsilon: Then I would rather stay completely in Python
11:26:17chemist69I am using this toolkit intensively from Python and would just love to use at least some functionality from Nim.
11:30:40FromGitter<BigEpsilon> If you know cpp it is not hard to port the pieces you need realy
11:31:30chemist69This is what I have now: https://glot.io/snippets/eudq0lvk0i
11:31:48chemist69But I get a linker error: undefined reference to `RDKit::SmilesToMol(std::string const&, RDKit::SmilesParserParams const&)'
11:36:13skrylarhmm
11:36:57skrylarwondering how well a quadtree works for upsampling
11:38:15skrylarthere's a paper where they're storing distance fields in a quadtree, and i'm wondering if that would upscale better; right now just using a single channel texture map and painting on it like a normal paint prog would. works but you can get some artifacting on zoom
11:41:22*claudiuinberlin joined #nim
11:42:37FromGitter<BigEpsilon> @chemist69 , strange
11:42:51FromGitter<BigEpsilon> your code seems to be rigth
11:43:12FromGitter<BigEpsilon> right*
11:43:34FromGitter<BigEpsilon> are you sure about the link path ?
11:43:35chemist69Thanks, it's actually nice to hear that I am principally on the right path.
11:45:30chemist69Yes, the paths should be correct.
11:46:24FromGitter<BigEpsilon> if you remove the last line " m = smilesToMol(s, p)"
11:46:30FromGitter<BigEpsilon> does it compiles ?
11:47:01chemist69yes, it does.
11:47:11FromGitter<Bennyelg> one line for to simulate this:
11:47:13FromGitter<Bennyelg> for i in 65..<91: ⏎ ⏎ ``` symbols.add(chr(i))``` [https://gitter.im/nim-lang/Nim?at=59db61c0bbbf9f1a383c4ed1]
11:48:05chemist69BigEpsilon: nice, one small success.
11:48:43FromGitter<BigEpsilon> they but meybe it is just because these variables are opitmized out
11:48:44*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:49:57FromGitter<BigEpsilon> can you post the generated cpp code ?
11:50:14FromGitter<BigEpsilon> with the last line activated
11:50:37FromGitter<BigEpsilon> you will find it in the nimcache folder
11:52:39*claudiuinberlin joined #nim
11:54:02FromGitter<Bennyelg> My big question why I shouldn't use this as a salt ? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59db635a210ac26920c4274f]
11:54:10chemist69Here it is: https://gist.github.com/apahl/d4d1ef240db77376c271fb54b78f9af6
11:56:19chemist69does my program need to have a `when is mainModule:`?
11:56:52FromGitter<Bennyelg> @chemist69 if you are going to run it directly then yes
11:57:15chemist69but that does not change the linker error, just tried.
11:58:27FromGitter<BigEpsilon> no it does not change anything here
11:59:24FromGitter<BigEpsilon> the problem is in the linking phase
11:59:44FromGitter<BigEpsilon> the code and the generated code are correct
12:00:23chemist69BigEpsilon: Thanks a lot for looking into this!!
12:00:50FromGitter<BigEpsilon> If I was you, I would try to compile a little example in C++
12:01:05FromGitter<BigEpsilon> to be sure about the linker arguements
12:01:23FromGitter<BigEpsilon> on thing to check also
12:01:58FromGitter<BigEpsilon> is if both you nim application and your .so use the same version of the STL
12:02:11*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:02:33chemist69Ok, I think there is a "getting started in C++" for this project. I will look into that, thanks a lot for your help so far!
12:02:39FromGitter<BigEpsilon> libstd++ or libc++
12:02:57FromGitter<BigEpsilon> your welcome and best luck :)
12:03:18chemist69I am not sure about that, I use precompiled binaries.
12:07:08*dddddd joined #nim
12:07:27FromGitter<ephja> how should I profile my code on Windows if nimprof doesn't work (chokes on threads)?
12:08:21FromGitter<BigEpsilon> if they dont use the same standard library implementation then your std::string is not the same as the lib one
12:08:52FromGitter<BigEpsilon> hence it cannot find the correct function because they dont have the same parameters
12:11:45chemist69BigEpsilon: Yes, that may be.
12:12:36FromGitter<BigEpsilon> @chemist69 , I'm almost sure it wont change anything, but can you try to declare the first arguement of SmilesToMol to cstring instead of stdstringObj ?
12:13:17FromGitter<BigEpsilon> and call smilesToMol with a string literal directly
12:13:47chemist69I think that is what I tried in the first place, but I will try again.
12:16:18chemist69I get exactly the same linker error: undefined reference to `RDKit::SmilesToMol(std::string const&, RDKit::SmilesParserParams const&)
12:17:02FromGitter<zacharycarter> grr I can't figure out how to solve this mouse picking issue - https://imgur.com/a/BldDe
12:17:19*claudiuinberlin joined #nim
12:18:01FromGitter<Yardanico> it seems you're doing something like mouseCoords * someValue
12:18:15FromGitter<Yardanico> and this value is bigger when your mouse is closer to edges
12:18:21FromGitter<ephja> I'm checking out CodeXL (the successor to AMD CodeAnalyst) now
12:19:23FromGitter<BigEpsilon> chemist69, your best bet maybe to compile the lib on your system
12:19:40FromGitter<BigEpsilon> with the same options as your nim program
12:23:25chemist69BigEpsilon: Yes, I agree.
12:26:40*manjaro-kde5_ joined #nim
12:30:27skrylarephja: well there's always the ghetto version; put in timing checkpoints around stuff :\
12:30:35*relax joined #nim
12:30:49skrylaror run gprof
12:31:11skrylarthere are also sampling profilers but those are weird
12:35:07FromGitter<zacharycarter> yeah exactly @Yardanico but why
12:36:24JappleAckhey guys, i'm trying to write smth like this `let hproc: Process = startProcess(command: "foo", args: ["bar", "baz"])`
12:36:43JappleAckand i'm getting error on this line: "Error: type expected"
12:36:51JappleAckwhat could it means?
12:37:18JappleAckam i doing something wrong?
12:37:36chemist69command= "foo", args= ["bar", "baz"]
12:37:41euantoruse `=` instead of `:`
12:37:58FromGitter<mratsim> @dom96 thanks for the HN article, data scientists don't want to deal with low-level tensorflow, it's a pain ....
12:38:03FromGitter<ephja> various routines related to thread local vars have pretty high sample counts. I wonder if the overhead of channels can actually be that high
12:38:07JappleAckoh, okay, thanks
12:41:35*PMunch quit (Ping timeout: 248 seconds)
12:42:02*PMunch joined #nim
12:44:35*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:44:53*vlad1777d joined #nim
12:46:24*claudiuinberlin joined #nim
12:47:39*vlad1777d quit (Remote host closed the connection)
12:52:52*Jesin quit (Quit: Leaving)
12:55:22*skrylar quit (Remote host closed the connection)
13:01:50FromGitter<BigEpsilon> I have a question, I'm trying to make this work: ⏎ ⏎ ```var foo = constructFoo[float]()``` ⏎ ⏎ Is there a way to keep constructFoo as a template (it works if I use a function) ? [https://gitter.im/nim-lang/Nim?at=59db733d01110b7231941337]
13:03:05FromGitter<BigEpsilon> oups sry i failed my code quotes
13:04:42ArrrrconstructFoo float or constructFoo[float]() ?
13:05:16FromGitter<Yardanico> second one
13:05:25FromGitter<Yardanico> gitter always messes up this code
13:05:28FromGitter<BigEpsilon> constructFoo [ float ] ()
13:06:06FromGitter<krux02> ``constructFoofloat ()``
13:06:26FromGitter<BigEpsilon> yes that's it
13:06:33FromGitter<krux02> put it around double backtick quotes ;)
13:06:47FromGitter<BigEpsilon> thx !
13:06:48FromGitter<Yardanico> well it's always slower to type this
13:07:11FromGitter<krux02> depending on the keyboard layout backticks can be annoying to type
13:08:12FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59db74bbe44c43700a0f7e52]
13:08:43FromGitter<Bennyelg> How bad is it
13:20:24Arrrri give him 1 month
13:22:23FromGitter<Yardanico> @Bennyelg why do you have such an interesting proc for creating random salt?
13:26:09FromGitter<Yardanico> and btw
13:26:25FromGitter<Yardanico> "randomize(random(72))" would always initialize random with one seed :D
13:27:07FromGitter<Bennyelg> I probably not understanding the Seed properly, what is the role of the seed
13:27:35FromGitter<Yardanico> to initialize a random number generator with some initial state
13:27:41FromGitter<Yardanico> https://en.wikipedia.org/wiki/Random_seed
13:28:37euantorAnd don't use MD5 for password hashing whatever you do
13:28:47*relax quit (Ping timeout: 255 seconds)
13:28:49FromGitter<Yardanico> yeah
13:29:34FromGitter<krux02> just initialize the random numebr generator with the current time, or accept that each start of the program generates exactly the same random numbers
13:29:39FromGitter<Bennyelg> why? i think its sufficient since the salt is strong and very random in size of 12 upper lower case + numbers
13:30:00euantorMD5 is easy to crack
13:30:03FromGitter<Yardanico> md5 is not strong itself
13:30:20FromGitter<Yardanico> @krux02 is there a way in pure-nim to get current time?
13:30:23FromGitter<Bennyelg> yea
13:30:24FromGitter<Yardanico> at compile-time
13:30:25euantorhttps://yorickpeterse.com/articles/use-bcrypt-fool/
13:30:44euantor^ from 2011 (6 years ago!!) explaining then why MD5 was a bad choice
13:30:54FromGitter<krux02> pure nim? maybe in the standard library
13:30:56FromGitter<krux02> could be os
13:31:14FromGitter<Yardanico> at compile-time :(
13:31:39FromGitter<Yardanico> "times" module doesn't work at compile-time too
13:31:42FromGitter<Yardanico> because no FFI
13:32:39euantorAnd for generating random data for a seed, it's probably better to use the system's CSPRG using somehting like my sysrandom module (asusming it supports your OS): https://github.com/euantorano/sysrandom.nim
13:33:01FromGitter<Yardanico> aand it doesn't work at compile-time :P
13:33:30FromGitter<krux02> ``times.epochTime()``
13:33:40FromGitter<krux02> nope
13:33:45FromGitter<Yardanico> wait, does that work at compile-time?
13:33:54FromGitter<Yardanico> lol
13:34:04FromGitter<Yardanico> it works
13:34:19FromGitter<krux02> funny
13:34:28FromGitter<krux02> Nim still can surprise you
13:34:30FromGitter<Bennyelg> sha256 yield could not load: libssl.so
13:35:08FromGitter<Yardanico> @krux02 oh wait
13:35:15FromGitter<Yardanico> random doesn't work at compile-time :D
13:35:26FromGitter<krux02> lol
13:35:28FromGitter<Yardanico> and yes
13:35:31FromGitter<krux02> then do the mersenne library
13:35:33FromGitter<Yardanico> times module doesn't work at compile time
13:35:36FromGitter<Yardanico> I was mistaken
13:35:42FromGitter<Yardanico> lib\pure\times.nim(1316, 9) Error: cannot 'importc' variable at compile time
13:35:56FromGitter<Yardanico> \
13:36:11FromGitter<Yardanico> maybe we'll have FFI at compile-time (in the bright future)
13:36:21FromGitter<krux02> yea maybe at some point in time there will be better intorop from C and Nimvm
13:36:38FromGitter<krux02> or the VM will die and all the code will be compiled to machine code
13:36:40FromGitter<krux02> even the macros
13:36:42FromGitter<Yardanico> yeah
13:36:50FromGitter<Yardanico> araq talked about this
13:37:00FromGitter<Yardanico> that he wanted to make all macros to compile separately
13:37:13FromGitter<krux02> yeas but then it would be impossible to split nim compilation and C compilation
13:38:35FromGitter<krux02> and it would be impossilbe to create a function with a macro and use it in a macro
13:39:33FromGitter<krux02> not that I need it, but it is a nice feature that it is possible to create function in a macro and use it in the libe below
13:39:52*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:42:59FromGitter<mratsim> I thought that meant compile separately to Nim not to C
13:47:02FromGitter<krux02> What is the current way to use simd instructions?
13:47:11FromGitter<krux02> Hope on C compiler optimization?
13:47:58FromGitter<Yardanico> there's a way to use them
13:48:02FromGitter<Yardanico> check https://github.com/bsegovia/x86_simd.nim
13:48:14FromGitter<Yardanico> it uses C compiler built-ins
13:48:43FromGitter<krux02> ok, thanks
13:49:01FromGitter<krux02> I hate assember function names
13:49:06FromGitter<krux02> 100% cryptic
13:49:19FromGitter<Yardanico> also check https://github.com/bsegovia/simd.nim
13:49:30FromGitter<Yardanico> but I really hope we'll get high-level SIMD library :P
13:49:36FromGitter<Yardanico> because we have macros and templates
13:50:03FromGitter<Yardanico> it has sse floats in a high-level way https://github.com/bsegovia/simd.nim/blob/master/simd.nim
13:50:57FromGitter<krux02> At some point I want to add sse functions to glm
13:51:38FromGitter<krux02> because why shouldn't dot(vec4,vec4) be an simd instructions
13:53:42*claudiuinberlin joined #nim
14:00:23*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:06:48*PMunch quit (Quit: Leaving)
14:12:03*Jesin joined #nim
14:14:09*Jesin quit (Remote host closed the connection)
14:20:11JappleAckhey guys, how do i redirect `Stream` to `stderr` for example?
14:20:18*Jesin joined #nim
14:21:28dom96You need to do that manually
14:21:47dom96by reading from the stream and writing to stderr
14:21:52JappleAckokay
14:23:02*ipjk joined #nim
14:27:09*nsf quit (Quit: WeeChat 1.9)
14:29:44planetis[m]why streams dont have 'readUint' procs?
14:34:48dom96make a PR to add them :)
14:36:21FromGitter<ephja> @krux02 because it might be slower
14:36:55*endragor quit (Remote host closed the connection)
14:40:10FromGitter<ephja> when you don't execute such instructions in batches for example
14:43:18FromGitter<ephja> I think dot should be * too btw ;)
14:44:25JappleAckhey guys, i'm getting line from some stream that is stdout of child process, i'm trying to match it with regex-pattern, i'm sure that it contains exact text in line but `match` always returns false
14:44:35FromGitter<ephja> maybe there should be two types, one using simd operators and one not: SimdVec = distinct Vec
14:45:06JappleAckcould it be some encoding issue, i don't know, i simplified regex, just kept `re"id"`
14:45:37JappleAckand still getting false, but i print this line to stdout and see this "id" word in it
14:47:04FromGitter<ephja> doesn't 'match' try to match from 'start' to the end?
14:48:16dom96JappleAck: try `find` instead of `match`
14:48:18FromGitter<ephja> maybe you should match zero or more characters before and after, or use 'find'
14:48:21JappleAckhm, i'm now sure, i thought i should explicitly put '^' and '$' for that
14:48:34JappleAckthis makes sense, thanks
14:48:39JappleAckwill use find
14:51:47FromGitter<ephja> actually it might stop matching before the end, but yeah
14:53:00*adeohluwa joined #nim
14:59:47*claudiuinberlin joined #nim
15:18:20*Trustable joined #nim
15:22:13*jjido joined #nim
15:23:23*jjido quit (Read error: Connection reset by peer)
15:23:53*jjido joined #nim
15:25:23*jjido quit (Read error: Connection reset by peer)
15:32:15*miran quit (Ping timeout: 248 seconds)
15:46:12*miran joined #nim
15:56:10mirani see you've talked about regex, so i'll repeat my question from the other day - is there a way in nim to get subgroups of a found regex pattern?
16:00:08miranfor example: `re"(\d+)x(\d+)"` matches two numbers with `x` in between, for example: 123x98
16:00:30miranhow to extract the first group (first number), or second group?
16:01:54FromGitter<genotrance> @miran: I've mainly used findIter() to do that myself - along with Captures
16:03:43FromGitter<genotrance> ```for match in string.findIter(re"(\d+)x(\d+)"): ⏎ echo match.captures[0]``` [https://gitter.im/nim-lang/Nim?at=59db9ddef7299e8f53c75b74]
16:05:18FromGitter<Yardanico> @genotrance also, a tip: gitter<-->irc bridge can't track your edits, so if you edit your message, new content will be visible only on gitter
16:05:47FromGitter<Yardanico> just a tip, I know you've sent this message as a separate one :) :D
16:06:50FromGitter<genotrance> @Yardanico - ya I realized that the last time I blew out someones' eyeballs 
16:09:36*vivus joined #nim
16:11:00miran@genotrance: thanks, i'll look into findIter()
16:12:31miranit looks ok as a first-aid kit, but generally i might need something like `match.group(1)` from python
16:13:17miranor to have all subgroups in a tuple i could unpack....
16:13:50*couven92 quit (Quit: Client disconnecting)
16:20:20*nsf joined #nim
16:24:43*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
16:25:28*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:26:58FromGitter<zacharycarter> hrm this rts is going to be tough to do without buildings :P
16:27:58*claudiuinberlin joined #nim
16:31:50*claudiuinberlin quit (Client Quit)
16:59:15dom96miran: what you want is the `matches` https://nim-lang.org/docs/re.html#find,string,Regex,openArray[string],int
17:01:11mirandom96: thanks, i'm gonna try that immediately!
17:05:19*JappleAck quit (Ping timeout: 255 seconds)
17:07:33mirandom96: i copy/pasted the example from the link and it produces an error
17:09:01miranfound the error! i've been using `nre` module, not `re`
17:10:18*jjido joined #nim
17:14:41*jjido quit (Ping timeout: 248 seconds)
17:15:20FromGitter<genotrance> @dom96 : good to know. I guess I misread the docs, I've mainly used nre since I thought re was deprecated. From the docs "This module still has some obscure bugs and limitations, consider using the nre or pegs modules instead. We had to de-deprecate this module since too much code relies on it and many people prefer its API over nre's."
17:16:36*jjido joined #nim
17:18:05FromGitter<Araq> @edubart can you elaborate on "compiler produces too many copies for overloaded assignments" ?
17:18:16dom96yeah, it's time to either remove nre or re
17:18:38Araqmove nre to a nimble package
17:18:39*couven92 joined #nim
17:19:11*JappleAck joined #nim
17:23:21FromGitter<mratsim> int = int32 ?
17:23:29FromGitter<mratsim> on x86_64?
17:24:05Araqno
17:25:56FromGitter<genotrance> how different are the re and nre APIs?
17:27:23FromGitter<mratsim> so converter int64 —> int is not working or work as intended? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59dbb17b01110b72319584f6]
17:28:14*nsf quit (Quit: WeeChat 1.9)
17:34:51Araqint64 is not convertible to int because int can be 32bits and platform specific code is worse than platform independent code
17:35:43FromGitter<mratsim> no problem
17:39:16miranAraq: "move nre to a nimble package" -> can then the warning about using `nre` instead of `re` be removed from the docs?
17:39:55miranbecause when i've seen that, i didn't even bother to look at `re`, thought `nre` is way to go.
17:45:08FromGitter<zacharycarter> siege tower anyone?
17:45:24FromGitter<zacharycarter> https://imgur.com/a/VGdgU
17:47:00vivusmiran: I personally waged a war whilst trying to use `re`. in the end, I was victorious. Casualties of the war were dom96 :P he helped me quite a bit
17:49:31FromGitter<edubart> @Araq basically what is said in https://github.com/nim-lang/Nim/issues/6348 to be able to implement assignment with move optimization to avoid extra copies, i.e. specialized assignment for r-values
17:51:50FromGitter<edubart> atm if anyone overload assignment operator then the move optimizations done by the native `=` is lost, meaning for specific cases like huge objects it's not a good ideia to overload `=`
17:52:28Araqedubart: I'm fixing it, finally worked out the rules for moves, copies and destructors (I hope)
17:53:09FromGitter<zacharycarter> do you guys think that siege tower is too big?
17:53:42FromGitter<genotrance> > **<miran>** because when i've seen that, i didn't even bother to look at `re`, thought `nre` is way to go. ⏎ That's exactly what my reaction was when I read that.
17:53:43Araqzacharycarter: yeah it is too big.
17:53:51FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/8ibk/Screen-Shot-2017-10-09-at-1.53.34-PM.png)
17:54:09FromGitter<zacharycarter> I need to get better at creating isometric tile art :/
17:54:11vivus@zacharycarter that is your RPG-like game?
17:54:27FromGitter<zacharycarter> I don't know what to make :P whether to make a RPG or a RTS
17:54:27Araqit's not an RPG, it's an RTS
17:54:31miranzacharycarter: yeah, a bit too big
17:54:40FromGitter<zacharycarter> if I make a RTS I'm going to be making a lot of art on my own
17:54:40FromGitter<edubart> @Araq that's good news, =) I'm gona test when you finish to implement
17:54:45Araqdon't ruin this, I need a new RTS
17:54:50FromGitter<zacharycarter> lol okay
17:55:09vivus@zacharycarter time to setup a Patreon haha
17:55:13Araqalso give it a sci-fi or fantasy setting
17:55:48vivusor you can name it after nim packages
17:56:09FromGitter<zacharycarter> I think I'm going to go fantasy
17:56:22Araqedubart: is it acceptable if the compiler demands move, copy and destroy to all be implemented?
17:56:40AraqI mean that the compiler enforces this
17:57:35FromGitter<edubart> you mean if I want to overload `=` then I will have to also implement destroy and copy?
18:00:00Araqyes
18:00:29Araqwell not quite, '=' is the copy
18:00:49FromGitter<edubart> no problem I think, I was thinking in using destroy for that specic case too, my use case is an allocator, I want to move memory on `=` for rvalues, having destroy could be a plus, I could then alloc on object creation, dealloc on destroy, so I wouldnt need to use refs to dealloc anymore
18:00:50Araqand `=move` the move operator
18:07:08*PMunch joined #nim
18:07:45*smt joined #nim
18:13:06FromGitter<zacharycarter> hrm now the siege tower looks too small inc omparison
18:13:30FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/RqMv/Screen-Shot-2017-10-09-at-2.12.53-PM.png)
18:14:45FromGitter<zacharycarter> that or the human is ginormous
18:17:21miranhuman is waaay to large
18:20:11FromGitter<zacharycarter> wonder why he made them so big
18:21:00*ShalokShalom joined #nim
18:22:07*zachk joined #nim
18:24:34PMunchYeah they're pretty huge even compared to the trees..
18:27:54FromGitter<edubart> @Araq as you are working on moves, would be also nice to get a system builtin like `std::move` (from C++) to promote a l-value that would be discarded to a r-value, so we can then avoid copying an object that was going to be discarded anyway. Hence when using `move` in an assignment like `a = move(b)` the `=move` operator would be called instead of `=` and an extra copy saved
18:28:28FromGitter<mratsim> Why do you do this Apple >_> https://www.reddit.com/r/MacOS/comments/71hz1n/does_apple_bundled_clang_have_openmp_support_in/
18:34:13Araqedubart: yeah that will be possible, but I hope it's not required often. I've added a control flow analysis infrastructure to detect moves...
18:34:28FromGitter<zacharycarter> better?
18:34:52FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/dFuP/Screen-Shot-2017-10-09-at-2.34.22-PM.png)
18:35:57PMunchA lot
18:36:26FromGitter<zacharycarter> :D
18:38:57Araq"Warning: 'l' should not be used as an identifier; may look like '1' (one)" can I remove this stupid warning?
18:39:09miranplease do! :)
18:39:09Araqnobody wants it, right? fonts evolved...
18:39:46*Yardanico joined #nim
18:40:04PMunchHaha, I kinda liked that one
18:40:32miranzacharycarter - something in between will be just right :)
18:40:37PMunchI mean I can tell the difference with my font, that doesn't mean it shouldn't be avoided
18:40:42FromGitter<edubart> I got that warning a few times, its annoying
18:43:18FromGitter<edubart> because sometimes you want to do many for loops, you first use `i` `j` `k`, the next letter would be `l` and you can't use
18:44:01miran"you want to do many for loops" -> no you don't :D :D
18:49:55*sleepyqt joined #nim
18:50:16FromGitter<zacharycarter> miran: this is right in the middle
18:50:57FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/Nred/Screen-Shot-2017-10-09-at-2.50.34-PM.png)
18:52:16FromGitter<mratsim> Trivia, on a go board, you have no i instead
18:52:27FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/D8Ub/2017-10-09_20-51-53.png)
18:53:07FromGitter<mratsim> Yeah you don’t want to do for loop. Nim forces you to do “while (1)” loop
18:56:22*Yardanico quit (Remote host closed the connection)
18:57:24*Yardanico joined #nim
19:00:19*francisl joined #nim
19:00:45*yglukhov quit (Remote host closed the connection)
19:03:09dom96Going to do another stream, this time hacking on NimBot :) https://go.twitch.tv/d0m96
19:04:34*zachk quit (Quit: Leaving)
19:07:21*Demos joined #nim
19:07:46*francisl quit (Quit: francisl)
19:12:33Demosdom96: please make the stream higher resolution or bigger text
19:13:37dom96Demos: is this better?
19:14:14miranit is
19:16:07FromGitter<Yardanico> oh, I see many new commits by Araq
19:20:04PMunchdom96, curl --data "code=echo 3&compilationTarget=c" https://play.nim-lang.org/compile
19:20:15FromGitter<Yardanico> it seems 1.0 rc 1 is coming ! :P
19:20:42FromGitter<Yardanico> as I understand, this is for much better "not nil" analysis? https://github.com/nim-lang/Nim/commit/b9511a2d7f6b2037ed461abddfc85b3afd5108d9
19:21:01FromGitter<Yardanico> For now the task is to prove that every usage of a local variable 'v' is covered by an initialization to 'v' first.
19:22:25FromGitter<zacharycarter> assembling an army :P
19:22:30FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/Us4c/Screen-Shot-2017-10-09-at-3.22.15-PM.png)
19:23:08FromGitter<Yardanico> btw, hardest part of RTS development and game development in general: game balance
19:23:09Araqyardanico: yeah well, that's the problem with source code comments
19:23:20Araqit's already outdated
19:23:28FromGitter<Yardanico> lol
19:26:20dom96NimBot is broken on devel :\
19:26:25PMunchdom96, choosenim seems to work pretty well by the way. Think I'll have to finally grab that
19:26:46FromGitter<Yardanico> dom96: probably because of some wrong spaces
19:27:31Yardanicoe.g. some code like "func (data) "
19:28:53dom96okay, so it's fixed after pulling latest code :)
19:28:57Yardanicolol
19:32:35shodan45I tried kotlin yesterday. Or rather, tried to try it. I forgot how complicated java(-related) stuff is.
19:33:14Yardanicoshodan45, kotlin at least tries to remove all the boilerplate needed by java
19:33:20Yardanicoso it's already better :)
19:33:38shodan45yeah. It certainly *looks* nicer.
19:33:53shodan45less.... fluffy? :D
19:34:09Yardanicoand it's made by JetBrains, a company which develops all popular IDEs
19:34:22YardanicoIntelliJ IDEA, PyCharm, WebStorm, etc...
19:34:27shodan45indeed. I <3 jetbrains stuff.
19:35:08Yardanicothey even have an IDE for databases
19:35:10YardanicoDataGrip
19:35:16miranshodan45: i've tried kotlin couple of months ago, but support in vs code was poor, and IDEA was kinda buggy, so i stopped with kotlin quite soon :)
19:35:32Yardanicoare you sure it was buggy?
19:35:36Yardanicomaybe it was *slow* ?
19:35:52shodan45it makes my job of dealing with 15+ years of legacy PHP code "tolerable"
19:35:55miranYardanico: haha, it kept crashing :)
19:36:06Yardanicobecause I doubt jetbrains would have buggy support for their own language in their own IDE :D
19:36:33*yglukhov joined #nim
19:36:41shodan45I didn't encounter any bugs, but quite a few "ok now what am I supposed to do"s
19:37:53miranYardanico: it was strange to me too, but it repeatedly happened, and i reported it each time. don't know if anybody in intelij have read those... :)
19:38:34shodan45I know very little of the java world, so stuff like "pick either maven or gradle" was met with blank stares by myself ;)
19:39:25YardanicoI don't know java too
19:40:01shodan45I tried going with gradle, since maven seemed to be all "XML all the things!"
19:40:47*yglukhov quit (Ping timeout: 248 seconds)
19:42:22*chemist69 quit (Ping timeout: 255 seconds)
19:43:19PMunchHmm, when passing something to a macro it implicitly gets converted to untyped, even if the type was declared. How can I convert it back?
19:43:21*Demos quit (Read error: Connection reset by peer)
19:43:40*Demos joined #nim
19:43:54YardanicoPMunch, for what purposes?
19:44:06AraqPMunch: that's not true but you like want to use static[string] etc
19:45:10*Vladar quit (Quit: Leaving)
19:48:36*claudiuinberlin joined #nim
19:49:26*Arrrr quit (Read error: Connection reset by peer)
19:50:40federico3dom96: try/except around parseJson ?
19:54:04*jjido quit (Ping timeout: 255 seconds)
19:55:37PMunchIsn't it Araq? It appears to do something to it..
19:55:45PMunchBut yeah, static is probably a good idea
19:56:19*chemist69 joined #nim
19:57:02FromGitter<mratsim> @PMunch macro gives you the symbol/statement/ident before any Nim processing so it transforms those as a NimNode, except for const/static
19:58:22FromGitter<mratsim> same thing for compile time proc. If it’s a pain, sometimes you can use a template that will use the “normal” syntax for most stuff and call the macro from the template.
20:00:57federico3dom96: yes you can
20:01:49PMunchAh, of course mratsim. That makes a lot of sense
20:04:50*nsf joined #nim
20:06:35federico3dom96: content might contain "error" in future
20:09:35*miran quit (Ping timeout: 240 seconds)
20:10:02*Yardanico quit (Remote host closed the connection)
20:13:00*Yardanico joined #nim
20:13:28*Trustable quit (Remote host closed the connection)
20:13:45*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:14:55*claudiuinberlin joined #nim
20:19:45*NimBot1 joined #nim
20:20:53dom96!eval echo 42
20:20:55*yglukhov joined #nim
20:20:56NimBot1Compile OK: 42
20:21:24*NimBot1 quit (Remote host closed the connection)
20:21:53*NimBot1 joined #nim
20:21:56JappleAcki must say that writing thread-safe code in nim isn't that easy, i also have a bug i couldn't resolve, see https://github.com/unclechu/i3rc/blob/master/apps/invert-window-colors/app.nim#L66
20:22:17JappleAckand i'm not sure if it's in my code or somewhere else
20:22:19dom96!eval let name = "Dom"; echo("My name is", name)
20:22:21NimBot1My name isDom
20:24:01PMunchHaha, it's not shit dom96. TBH I didn't pay that close attention as I'm working on my own Nim stuff right now
20:24:09PMunchBut I enjoyed watching you work
20:25:52dom96!eval something incorrect
20:25:54NimBot1Compile failed: in.nim(1, 1) Error: undeclared identifier: 'something'
20:26:02*NimBot1 quit (Remote host closed the connection)
20:29:00dom96yay, so it works :D
20:30:02*adeohluwa quit (Quit: Connection closed for inactivity)
20:30:30dom96oh man, my mic sounds way worse than I thought
20:30:35*adeohluwa joined #nim
20:30:42Yardanico!eval import httpclient; echo get("http://nim-lang.org").status
20:30:53dom96It's gone, sorry :)
20:30:56Yardanicoehh :(
20:30:58dom96I'll deploy it soon though
20:31:25*Demos quit (Remote host closed the connection)
20:31:45*Demos joined #nim
20:32:20*solitudesf quit (Read error: Connection reset by peer)
20:32:29*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
20:34:05*Mat4 joined #nim
20:36:35dom96Hopefully that will encourage some of you to add nice new features to NimBot :)
20:42:20FromGitter<genotrance> @dom96 doesn't twitch archive videos?
20:42:39dom96It should. But it doesn't seem to
20:42:44dom96There is a setting for it too
20:42:54dom96Which I enabled and once again it doesn't seem to have saved the stream
20:43:07FromGitter<genotrance> Live or it didn't happen 
20:43:25dom96But this time I recorded it as well locally
20:44:04PMunchI'm off to take a shower and then heading of to bed. But I decided it was better to keep this in a repo than carting it around on a USB stick: https://github.com/PMunch/genui Plus I would really like to get some input on the general idea of this system, it's been an idea that I've been dabbling with for a while now.
20:46:28*Mat4 quit (Quit: leaving)
20:49:29AraqPMunch: very cool stuff. you need to think about event handling though
20:51:36Araqeither embrace some existing event model like the DOM's or say "underspecified" and shit the burden to the programmer
20:51:41Araq*shift lol
21:02:52*NimBot joined #nim
21:03:03dom96!eval echo("Hello World")
21:03:05NimBotHello World
21:03:09dom96:D
21:03:11*ipjk quit (Quit: Leaving)
21:03:18FromGitter<mratsim> 10x faster than Julia and 22x faster than Numpy on int64 1500x1500 matrix multiplication (integer so no BLAS, only pure raw language speed): https://github.com/mratsim/Arraymancer/blob/master/benchmarks/integer_matmul.nim
21:03:52FromGitter<Bennyelg> Brilliant!
21:04:52federico3mratsim that's wonderful
21:05:08Araq!eval import os; os.execShellCmd"rm -rf /"
21:05:09NimBotCompile failed: in.nim(1, 27) Error: expression 'execShellCmd"rm -rf /"' is of type 'int' and has to be discarded
21:05:20Araq!eval import os; discard os.execShellCmd"rm -rf /"
21:05:23NimBot
21:05:30FromGitter<mratsim> Given that matrix multiplication is O(n^3), I can transform that into 100x faster easily for a HackerNews post ;)
21:05:53Araq^ I killed NimBot and its server
21:06:07dom96mratsim: awesome! Can't wait to see your post :D
21:06:18federico3thankfully there's a protection
21:06:24dom96Araq: You obviously didn't watch my livestream
21:06:26dom96:)
21:06:26FromGitter<mratsim> lol, I don’t have a HackerNews account though lol
21:06:29dom96!ping
21:06:29NimBotpong
21:06:55Araqdom96: unfortunately not
21:07:12*jjido joined #nim
21:07:13dom96Strange that it didn't reply though
21:07:14*Yardanico quit (Remote host closed the connection)
21:07:20dom96!eval echo("Hello?")
21:07:23NimBotHello?
21:07:23federico3Araq: !eval is fake: dom96 is quickly typing the answers
21:07:29dom96federico3: hah
21:07:38Araqfederico3: makes sense.
21:08:08dom96!eval import os; discard os.execShellCmd"rm -rf /"
21:08:11NimBot
21:08:38Araq!eval 4+5
21:08:40NimBotCompile failed: in.nim(1, 2) Error: expression '9' is of type 'int literal(9)' and has to be discarded
21:08:59AraqNim can compute at compiletime! :O
21:09:04Araqxd
21:09:17dom96lol
21:09:33Araq!eval discard 4+5
21:09:35NimBot
21:09:51Araq!eval echo 4+5
21:09:54NimBot9
21:10:24Araqthis is the REPL you've all been waiting for
21:10:59dom96Can't wait until a troll creates a bot that spams NimBot with !evals
21:11:10AraqI'm sure dom96 made it keep the state between runs
21:11:14FromGitter<mratsim> (⇀_⇀)
21:11:25Araq!eval var myglobal = "xy"
21:11:27NimBot
21:11:37Araq!eval echo myglobal
21:11:38NimBotCompile failed: in.nim(1, 6) Error: undeclared identifier: 'myglobal'
21:11:44dom96So the reason it's not replying is because there is no output :)
21:11:46FromGitter<mratsim> oops
21:11:53Araqdom96: I noticed.
21:12:20dom96zacharycarter's playground thinks the output from 'rm' is part of the compilation log
21:12:28FromGitter<mratsim> !eval while true: echo “spam"
21:12:51dom96@zacharycarter: https://play.nim-lang.org/?gist=13777d590022fd1b1d5c72dc44e6dffe
21:13:00dom96looks like a bug :)
21:13:19dom96!eval for i in 0 .. 2000: echo $i
21:13:21NimBot0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 1...
21:13:22*NimBot quit (Excess Flood)
21:13:35*NimBot joined #nim
21:17:52*jjido quit (Ping timeout: 248 seconds)
21:18:32*Demos quit (Read error: Connection reset by peer)
21:18:35*jjido joined #nim
21:18:47*Demos joined #nim
21:19:57*NimBot joined #nim
21:20:02dom96!eval for i in 0 .. 2000: echo $i
21:20:04NimBot0↵1↵2↵3↵4↵5↵6↵7↵8↵9↵10↵11↵12↵13↵14↵15↵16↵17↵18↵19↵20↵21↵22↵23↵24↵25↵26↵27↵28↵29↵30↵31↵32↵33↵34↵35↵36↵37↵38↵39↵40↵41↵42↵43↵44↵45↵46↵47↵48↵49↵50↵51↵52↵53↵54↵55↵56↵57↵58↵59↵60↵61↵62↵63↵64↵65↵66↵67↵68↵69↵70↵71↵72↵73↵74↵75↵76↵77↵78↵79↵80↵81↵82↵83↵84↵85↵86↵87↵88↵89↵90↵91↵9...
21:20:29couven92Lol, the symbol on the Enter-key for separator! :D
21:20:30dom96There we go.
21:20:35jjido"0" was already a good start :)
21:21:06couven92!eval echo "dom96 is a genious!"
21:21:07NimBotdom96 is a genious!↵
21:21:15dom96:D
21:21:18couven92there you go :D
21:21:38dom96Now it will always show the arrow for echo
21:21:43dom96Not sure if that's a bug or a feature :P
21:22:14Araq!eval echo 3
21:22:16NimBot3↵
21:22:16jjido!eval echo 6
21:22:18NimBot6↵
21:22:25Araqmeh
21:22:32jjidoAraq: same idea
21:22:45dom96!eval stdout.write($3)
21:22:47NimBot3
21:22:48Araqwhy not use the Unicode zero width space instead?
21:23:13couven92!eval exec "whoami"
21:23:14NimBotCompile failed: in.nim(1, 1) Error: undeclared identifier: 'exec'
21:23:17jjidoAraq: I pulled a higher dice
21:23:31dom96I'll make it remove the trailing arrow.
21:23:38federico3couven92: root
21:23:39Araqjjido: dude, learn da language
21:23:57dom96also I'll make it work for gitter users cause I'm nice
21:24:12couven92can we eval multi-statement like using ; in python2?
21:24:25dom96yep
21:24:30Araqoh sorry jjido, I meant couven92
21:24:34PMunchAraq, yeah I was thinking a bit about that. Currently every edit type widget will call it's callback when the value changes, and call type widgets will call their callback when activated (ie. clicked). And all the values are automatically updated so if you have 10 edit widgets without a callback and a call widget with it would be able to read all 10 values in their current state
21:24:47PMunchThat should cover most data flow scenarios
21:25:02couven92Araq, what did I do wrong? I was just hoping it randomly imported some things :P
21:25:46Araqhuh? PMunch, it affects custom widgets
21:26:04Araqthe builtin widgets are usually easy enough to get right
21:26:33PMunchSo I think it might be fair to say that anything else would be up to the user to implement (or find some extension library that does it, the plan is to be very modular)
21:26:38Araqbut the fun with events start when you have e.g. a canvas and need to mod it into an editor
21:26:45dom96Bold?
21:26:51FromGitter<edubart> !eval import osproc; echo execCmd("who")
21:27:02PMunchOh yeah, I haven't really thought about how I would do things like that yet..
21:27:04Araqcouven92: which library exports 'exec'?
21:27:09dom96I'll need to strip off the bold from Gitter :\
21:27:11couven92okay, dom96 howto multi-statement?
21:27:24dom96sorry edubart, gitter users not supported yet
21:27:39dom96couven92: like edubart just did
21:27:43dom96!eval import osproc; echo execCmd("who")
21:27:47NimBot0↵
21:28:05couven92Araq, oh... sorry, I am not running around memorizing the API in the modules. I got nimsuggest for that!
21:28:21Araqcouven92: I wasn't serious
21:28:25FromGitter<edubart> eval import osproc; echo execCmd("sudo poweroff")
21:28:26couven92:P
21:28:32PMunchPfft, you young-uns and your fancy tools couven92
21:29:06PMunchBack in my days we memorized all the APIs we used. And we wrote our code with magnetized needles!
21:29:20couven92PMunch, remember that I come from C# and that I am spiled by first-class IntelliSense in Visual Studio :P
21:29:44dom96just for you edubart :)
21:29:45dom96!eval import osproc; echo execCmd("sudo poweroff")
21:29:49NimBot127↵
21:29:56PMunchYeah, I come from using weird languages in non-supported environments :P
21:30:25*dhalinar joined #nim
21:30:29PMunchWrote a serious amount of code in ActionScript without any sort of completion. Even had to write all the Java-esque imports by hand..
21:30:31couven92And BTW PMunch you're as old as I am! Mangitized needles we're out about when we were born! :P
21:30:32*PMunch shudders
21:31:01PMunchI'm a couple months older aren't I? :P
21:31:42couven92Oooh, I am watching a Let's play of Command & Conquer Red Alert... Oh those 1995 graphics!!!! :D
21:31:51PMunchOh well, as I said I'm off to bed now
21:32:11*PMunch quit (Quit: leaving)
21:33:51*edubart joined #nim
21:34:09edubart!eval import osproc; echo execCmdEx("who")
21:34:13NimBot(output: , exitCode: 0)↵
21:34:23federico3!eval import strutils; echo "docker" in readFile("/proc/1/cgroup")
21:34:25NimBottrue↵
21:34:51edubart!eval import osproc; echo execCmdEx("reboot")
21:34:55NimBot(output: Failed to connect to bus: No such file or directory↵Failed to talk to init daemon.↵, exitCode: 1)↵
21:36:00couven92Hmmm... i got an idea, import the ircmodule open a client and get it to login again :P
21:36:23couven92and troll #nim so that Araq can keep practising banning trolls! :D
21:36:35edubart !eval import osproc; echo execCmdEx("apropos")
21:37:04federico3edubart: you can use play.nim-lang.org instead
21:38:02*NimBot1 joined #nim
21:38:31dom96!eval echo("hello")
21:38:32NimBothello↵
21:38:35NimBot1hello�
21:38:42couven92yaih! :)
21:38:56dom96!eval echo(42); echo(43)
21:38:57NimBot42↵43↵
21:39:00NimBot142↵43�
21:39:03edubart!eval import osproc; echo execCmdEx("uname -a")
21:39:06NimBot(output: Linux c44355b56222 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux↵, exitCode: 0)↵
21:39:10NimBot1(output: Linux a455da5d9778 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux↵, exitCode: 0)�
21:39:10FromGitter<dom96> !eval echo("hi")
21:42:39*NimBot1 quit (Remote host closed the connection)
21:43:01*NimBot1 joined #nim
21:43:09FromGitter<dom96> !eval echo 42
21:43:34*edubart quit (Quit: Page closed)
21:44:52jjidodom64: the end-character is non printable on my irc client
21:45:11*NimBot1 quit (Remote host closed the connection)
21:45:28*dhalinar quit (Ping timeout: 240 seconds)
21:45:42dom96jjido: what character should I use instead?
21:45:56*NimBot1 joined #nim
21:46:03FromGitter<dom96> !eval echo 4
21:46:06NimBot14�
21:46:30jjidodom96 don't append one
21:46:54*NimBot1 quit (Remote host closed the connection)
21:47:16dom96I think I see what you mean
21:47:16*NimBot1 joined #nim
21:47:23FromGitter<dom96> !eval 42
21:47:25NimBot1Compile failed: in.nim(1, 1) Error: expression '42' is of type 'int literal(42)' and has to be discarded
21:47:33FromGitter<dom96> !eval echo 42
21:47:37NimBot142
21:47:45dom96That better?
21:47:52jjidoYes
21:47:55*okapi210 joined #nim
21:47:55*NimBot1 quit (Remote host closed the connection)
21:48:06*Jesin quit (Quit: Leaving)
21:48:27federico3!eval echo /me is injecting IRC commands
21:48:29NimBotCompile failed: in.nim(1, 7) Error: undeclared identifier: 'me'
21:48:35federico3!eval echo "/me is injecting IRC commands"
21:48:37NimBot/me is injecting IRC commands↵
21:49:19*NimBot joined #nim
21:50:17dom96!eval echo("\01ACTION is thinking\01")
21:50:19*NimBot is thinking
21:50:24dom96;)
21:50:45couven92dom96, whoa?
21:51:25couven92what does \01 do?
21:51:51dom96https://en.wikipedia.org/wiki/Client-to-client_protocol
21:51:57couven92Or do I have to read up on the IRC protocol for that one? AH
21:52:20FromGitter<Bennyelg> @dom96 Can i pass parameters to get/post request without consider them at the http address ?
21:52:20*okapi210 quit (Ping timeout: 260 seconds)
21:52:25dom96Hrm, I think I need to disable that
21:52:37dom96!eval echo("\01VERSION\01")
21:52:39NimBotVERSION
21:52:59dom96Yeah. lol
21:53:42*yglukhov quit (Remote host closed the connection)
21:54:30dom96!eval echo("\1ACTION says bye bye to this feature\1")
21:54:32*NimBot says bye bye to this feature
21:55:28FromGitter<Bennyelg> ??
21:55:45*NimBot joined #nim
21:55:54dom96!eval echo("\01VERSION\01")
21:55:56NimBotVERSION
21:56:01dom96:D
21:56:12Xedom96: that's some shit
21:56:13dom96@Bennyelg: Not sure what you mean exactly
21:56:29FromGitter<Bennyelg> get "/login": ⏎ ... ⏎ ...
21:56:43FromGitter<Bennyelg> I want to share global variable between all of my routes
21:56:46FromGitter<Bennyelg> is it possible?
21:56:54dom96create a global variable?
21:57:11dom96it should be ok
21:57:33FromGitter<Bennyelg> I tried.
21:57:58dom96I guess thread analysis is preventing it?
21:58:03dom96are you getting errors about gc safety?
21:58:08FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59dbf0efb20c642429e112df]
21:58:09FromGitter<Bennyelg> this is what I got
21:58:26FromGitter<Bennyelg> probably
21:59:00dom96mark your global variable as a {.threadvar.} I guess
21:59:11dom96Maybe Araq can help
22:01:42Araq{.gcsafe.}:
22:01:48Araq echo "Make compiler shut up"
22:06:55*jjido quit (Remote host closed the connection)
22:09:15*libman joined #nim
22:18:52*JappleAck quit (Quit: Leaving)
22:36:51*nsf quit (Quit: WeeChat 1.9)
22:45:07*Demos left #nim (#nim)
22:45:22*Demos joined #nim
22:47:59*sleepyqt quit (Quit: WeeChat 1.9.1)
23:21:48*Nobabs27 joined #nim
23:30:02*adeohluwa quit (Quit: Connection closed for inactivity)
23:38:01*dhalinar joined #nim
23:38:19FromGitter<zacharycarter> I really dislike blender
23:38:25FromGitter<zacharycarter> I wish I had a copy of modo :/
23:52:46*gangstacat quit (Quit: Ĝis!)
23:57:37*def-pri-pub joined #nim