<< 05-10-2017 >>

00:08:20*Demos_ quit (Quit: Demos_)
00:08:36*Demos_ joined #nim
00:11:54*vivus joined #nim
00:16:58vivuswhat ORM are the cool-kids using?
00:19:16ipjkvivus: https://github.com/Araq/ormin, not sure how much it've come along though.
00:23:32vivusthanks ipjk
00:26:07*Demos_ quit (Quit: Demos_)
00:26:25*Demos_ joined #nim
00:26:39*zachk quit (Quit: Leaving)
00:30:09Demos[m]Ive been meaning to finish writing my orm, gives you the right types from regular queries
00:34:26vivuscan I update nim by pulling from the repo?
00:49:05*Demos_ quit (Quit: Demos_)
00:49:21*Demos_ joined #nim
00:50:04Demos[m]yes you can
00:51:21vivusthe Nim/ folder is huge after downloading/installing Nim. currently 500MB
01:02:32*Demos_ quit (Quit: Demos_)
01:02:49*Demos_ joined #nim
01:02:55*Demos_ quit (Client Quit)
01:03:13*Demos_ joined #nim
01:06:31*ipjk quit (Read error: Connection reset by peer)
01:08:32*chemist69 quit (Ping timeout: 255 seconds)
01:10:06*yglukhov quit (Remote host closed the connection)
01:22:33*chemist69 joined #nim
01:33:15*vivus quit (Quit: Leaving)
01:54:38*AlexOn365 joined #nim
01:56:58*Demos_ quit (Quit: Demos_)
01:57:18*Demos_ joined #nim
01:58:11*AlexOn365 quit (Read error: Connection reset by peer)
01:59:42*Jesin quit (Quit: Leaving)
02:01:41*def- quit (Ping timeout: 240 seconds)
02:01:48*def- joined #nim
02:10:35*yglukhov joined #nim
02:15:33*yglukhov quit (Ping timeout: 240 seconds)
02:24:30*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:29:50*Demos_ quit (Quit: Demos_)
02:30:08*Demos_ joined #nim
02:31:41*smt quit (Ping timeout: 240 seconds)
02:37:15FromGitter<genotrance> @zacharycarter what does nimble install do on nuklear-nim? Does it just copy the files over and the actual build only happens when a consumer does a build?
02:48:15*endragor joined #nim
02:51:18*Demos_ quit (Quit: Demos_)
02:51:38*Demos_ joined #nim
03:03:11*endragor quit (Read error: Connection reset by peer)
03:03:38*endragor joined #nim
03:04:16*pwntus quit (Ping timeout: 255 seconds)
03:05:06*Ven`` joined #nim
03:06:35*user0_ joined #nim
03:11:05*Demos_ quit (Quit: Demos_)
03:11:24*Demos_ joined #nim
03:11:32*pwntus joined #nim
03:26:23*dhalinar joined #nim
03:27:51*Ven`` quit (Ping timeout: 258 seconds)
03:30:41*dhalinar quit (Ping timeout: 248 seconds)
03:35:24FromGitter<brentp> @zacharycarter that did it. thanks much.
03:45:35*Demos_ quit (Quit: Demos_)
03:45:53*Demos_ joined #nim
03:46:35*dddddd quit (Remote host closed the connection)
04:03:35*Demos_ quit (Quit: Demos_)
04:03:53*Demos_ joined #nim
04:13:02*yglukhov joined #nim
04:17:37*yglukhov quit (Ping timeout: 248 seconds)
04:29:35*francisl quit (Quit: francisl)
04:39:53*Demos_ quit (Quit: Demos_)
04:40:12*Demos_ joined #nim
04:50:12FromGitter<citycide> @PMunch: I'm down for your GUI project. been using nigui the last few days and it's simple enough but it's missing a lot of controls and functionality, and nimx seemed heavier
04:56:07*Demos_ quit (Quit: Demos_)
04:56:22*nhywyll joined #nim
04:56:23*Demos_ joined #nim
05:08:16*miran joined #nim
05:34:10*Demos_ quit (Quit: Demos_)
05:34:29*Demos_ joined #nim
05:42:39*gokr joined #nim
06:07:21*Demos_ quit (Quit: Demos_)
06:07:40*Demos_ joined #nim
06:14:41*miran quit (Ping timeout: 240 seconds)
06:15:12*yglukhov joined #nim
06:19:02*derlafff quit (Remote host closed the connection)
06:19:21*yglukhov quit (Ping timeout: 240 seconds)
06:20:01*derlafff joined #nim
06:28:28*Demos_ quit (Quit: Demos_)
06:28:46*Demos_ joined #nim
06:34:01*nsf joined #nim
06:39:09TangerHey guys, is there any docs on async stuff like asyncCheck, runForever and waitFor?
06:43:53*Vladar joined #nim
06:48:36*Demos_ quit (Quit: Demos_)
06:48:48Araqhttp://beza1e1.tuxen.de/articles/accidentally_turing_complete.html
06:48:56*Demos_ joined #nim
07:09:23*PMunch joined #nim
07:22:46*Demos_ quit (Quit: Demos_)
07:23:04*Demos_ joined #nim
07:25:29*claudiuinberlin joined #nim
07:30:35*PMunch_ joined #nim
07:31:29*PMunch_ quit (Client Quit)
07:31:51*PMunch_ joined #nim
07:32:14*PMunch_ quit (Remote host closed the connection)
07:33:11*PMunch quit (Ping timeout: 258 seconds)
07:41:05*Demos_ quit (Quit: Demos_)
07:41:23*Demos_ joined #nim
07:49:27FromGitter<adamrezich> @Araq I've seen many of these before but holy shit that powerpoint one is hilarious
08:03:16*yglukhov joined #nim
08:07:58*salewski joined #nim
08:08:53salewskiI have not been able to find a better way to write this:
08:08:58salewskiif name.startsWith("modifierReserved_"): name = name[17 .. ^1]
08:09:05*kunev quit (Ping timeout: 248 seconds)
08:09:35salewskiFor tails there is removeSuffix(), but for removing prefix?
08:10:01*kunev joined #nim
08:10:38salewskiAnd I wonder, would it make sense when removeSuffix() would return a boolean for sucess?
08:13:50salewskiAnd another question: Does a trick exists to see the assembler code of Nim statements fast?
08:14:23salewskiI have already looked at assembler code long time ago, but it takes some time...
08:15:22salewskiInstruct gcc to keep assembler listings, and then search manually for the rigth location.
08:15:49salewskiMaybe there is a trich to include a marker, so that we can use grep?
08:17:02*Demos_ quit (Quit: Demos_)
08:17:21*Demos_ joined #nim
08:18:53Araqsalewski: not a fan of these discarable bools, they mess with type inference
08:19:14AraqremovePrefix would be a welcome addition to strutils
08:19:50salewskiOK, thanks.
08:20:48*salewski quit (Quit: WeeChat 1.9.1)
08:25:48FromGitter<mratsim> I don't like those return 1/return 0 either. The clean way would be to return an Option ( Some[string] or None) but that introduce indirections, also it's another concept to learn in Nim
08:27:13FromGitter<mratsim> Rust and FP languages rely heavily on Options for things that may fail. But it doesn't exist in C/C++/Python
08:28:35AraqOptions are not clean.
08:29:06Araqit depends on the use case. often they are only super messy
08:30:01AraqHaskell has exceptions. I take it the inventors didn't understand FP?
08:30:09Araq:P
08:30:25FromGitter<mratsim> I think to be clean language must go all the way with Option, you can't stay in between
08:30:59FromGitter<mratsim> Iirc they introduced exception because of perf issue
08:33:33*Demos_ quit (Quit: Demos_)
08:33:50*Demos_ joined #nim
08:36:06FromGitter<mratsim> Actually it's even worse, Haskell has Maybe/Options, Errors and Exceptions ... https://wiki.haskell.org/Error_vs._Exception
08:36:15*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:46:55*claudiuinberlin joined #nim
08:49:05*Demos_ quit (Quit: Demos_)
08:49:21*Demos_ joined #nim
09:00:56*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:03:32*Demos_ quit (Quit: Demos_)
09:03:48*Demos_ joined #nim
09:06:50euantorjust so long as we don't end up with Rust style code where everything is followed by `.unwrap()`
09:06:58*PMunch joined #nim
09:11:19*Demos_ quit (Quit: Demos_)
09:11:37*Demos_ joined #nim
09:22:39FromGitter<mratsim> oh yeah, unwrap is terribad, 30 lines of Rust 8 calls to unwrap: https://github.com/mratsim/rustygo/blob/master/src/main.rs#L676-L699
09:24:07FromGitter<mratsim> (This was for a go playing bot in Rust and it discourages me for doing more in the language)
09:26:01FromGitter<gokr> @mratsim I am always interested in hearing what people think of Rust - people that have actually coded in it - and also knows Nim.
09:26:17FromGitter<gokr> I only know Rust "by google" so to speak.
09:26:51Araq"6 Escaping from control structures" is spot on
09:26:56Araqfrom that haskell link
09:26:57FromGitter<mratsim> This is my opinion of Rust for my specific needs (scientific computing and implementing algorithms): https://andre-ratsimbazafy.com/why-rust-fails-hard-at-scientific-computing/
09:27:39FromGitter<mratsim> Basically there is a tradeoff between safety and flexibility, Rust fails for me while Nim is at a sweet spot
09:28:59Araqwooohoo, nice blog post
09:29:05AraqI love the flesh wounds ...
09:29:10FromGitter<mratsim> lol
09:29:37euantorAlso so long as we don't up with the Go approach of `if err != nil { return err }` in every other line of code
09:30:02euantorExceptions are by far the more reasonable approach in my opinion
09:31:46FromGitter<gokr> @mratsim Great read!
09:32:34FromGitter<mratsim> Anyway, congrats Araq on bringing up a great language. I’ll try hard to make the Data Science competitive community switch over. People are getting fed up with Python speed, lack of parallelism, and being forced to use weird constructs because for loops on multidimensional arrays are slow.
09:32:57FromGitter<gokr> @mratsim Where are you from btw? If you don't mind me asking. Your name is so cool - but I keep wondering.
09:33:19FromGitter<mratsim> I’m from France but my parents came from Madagascar
09:33:43Araqmratsim: at the risk of sounding unprofessional ... what's the most pressing bug for you?
09:34:28FromGitter<gokr> @mratsim And I truly appreciate your work in getting Nim usable for that field, not that I am in there - but its very uplifting to see it being done.
09:34:31dom96Posted on the first of April, you might want to change that so that people don't feel it's an april fools joke :)
09:34:54Araqdom96: we have tools/nimpretty now...
09:35:02dom96Araq: awesome.
09:35:06FromGitter<gokr> Madagascar, ah.
09:35:10Araqnow only somebody needs to push it into shape ...
09:35:43Araqit's actually quite hard since the lexer/parser are now very sloppy with comments
09:35:59FromGitter<mratsim> I would say: https://github.com/nim-lang/Nim/issues/5887 and https://github.com/nim-lang/Nim/issues/3819.
09:36:16dom96Araq: :\
09:36:30dom96Will you accept patches to make them less sloppy?
09:36:35Araqof course
09:37:03*onionhammer quit (Ping timeout: 240 seconds)
09:37:11AraqI do wonder however if the AST approach is good for this
09:37:45Araqcould also just work on token streams
09:37:47FromGitter<gokr> Just opened up a repo with our little server I am building for a kids-learning-arduino-visual-programming-research project: https://github.com/evothings/ecraft2learn/tree/master/arduinobot
09:38:03FromGitter<mratsim> Also i did a benchmark of Proc vs Method vs Closures here: https://github.com/mratsim/Arraymancer/blob/master/benchmarks/implementation/proc_method_closure_bench.nim ⏎ ⏎ Results were: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d5fd7bb59d55b82376805d]
09:38:45Araqoh interesting, I thought closures are much faster
09:38:49FromGitter<gokr> So ... it's a first shot at a little server that compiles/flashes arduinos - by taking jobs over MQTT or REST (Jester). It's mean to run on a Raspberry in a class room basically.
09:38:53FromGitter<mratsim> Solving the inline iterator issue will allow me to avoid closures which seems to be extremely slow
09:38:55*taaperotassu quit (Ping timeout: 255 seconds)
09:39:27Araqcan't you transform it via a macro?
09:39:45Araqmacros are easier to write as you can give them as much context as required
09:40:51FromGitter<mratsim> That’s one of my next step, do a macro “element wise” so that people can inline arbitrary operations on a tensor like: ⏎ ⏎ ```elementwise(a, b): ⏎ a = log(b) + sin(foo)``` [https://gitter.im/nim-lang/Nim?at=59d5fe22e44c43700af7b663]
09:43:02dom96gokr: ooh nice, I know a guy creating something for classrooms and RPis: PiNet.
09:43:19gokrPointer?
09:44:17FromGitter<mratsim> @Araq should I open a perf bug report for the closure slowness?
09:44:49*Demos_ quit (Quit: Demos_)
09:45:05*Demos_ joined #nim
09:45:18gokrdom96: The server is a first shot - I stumbled around a bit on the threading parts. But now Jester is meant to run "as usual". MQTT is isolated in its own thread, using two channels to talk to the others. And jobs are spawned off on threadpool - and reports back via publishing to that MQTT guy.
09:46:15gokrIt seems to work. But... I first had a threadvar Table with FlowVars - trying to let the jobs report back their results. But... it got icky with GC-safety yaddayadda.
09:47:44gokrIt would be nice to have just a "sharedtable" that actually copies keys/values just like spawn does. Unless I am mistaken, the current sharedtable doesn't allow "normal keys and values".
09:50:09gokrdom96: I guess this: http://pinet.org.uk
09:52:01*claudiuinberlin joined #nim
09:58:31FromGitter<zacharycarter> @genotrance I'm pretty sure it still builds on nimble install - it's a good question though
09:58:59Araqzacharycarter: is all of nim-playground open source?
09:59:06FromGitter<zacharycarter> yup
09:59:15Araqhow much work is it to transform it into something like "jsfiddle" for karax?
09:59:17*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:59:58FromGitter<zacharycarter> probably quite a bit but I think it's doable
10:00:48FromGitter<zacharycarter> couple things I can think that would have to change right away - the docker image would have to include karax
10:00:58FromGitter<zacharycarter> and then the compiler would have to support the js target
10:01:46FromGitter<zacharycarter> I need to fix the create gist functionality - I've been slacking on that
10:01:58*taaperotassu joined #nim
10:02:10Araqalternatively I can think of a VS code plugin that runs the karax app in its internal browser
10:02:22FromGitter<zacharycarter> that'd be pretty cool
10:02:34FromGitter<zacharycarter> I think both ideas are neat
10:02:36Araqbut I know nothing about VS plugins...
10:02:37*claudiuinberlin joined #nim
10:03:39FromGitter<zacharycarter> hrm the issue with create gists and the nim playground seems to be a jester / nginx issue
10:05:39*Demos_ quit (Quit: Demos_)
10:05:54*Demos_ joined #nim
10:10:18FromGitter<zacharycarter> I can post to https://play.nim-lang.org/gist with insomnia but the browser gets a 502
10:14:47*couven92 joined #nim
10:16:33FromGitter<zacharycarter> cool I fixed it - gist integration should be working again once the cache clears
10:18:31*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:18:41*Arrrr joined #nim
10:18:41*Arrrr quit (Changing host)
10:18:41*Arrrr joined #nim
10:19:11*taaperotassu quit (Ping timeout: 248 seconds)
10:19:53Araqyay
10:20:38FromGitter<zacharycarter> I'll play around with getting the js target supported - I think that's the first step to a jsfiddle like experiment w/ karax
10:21:25FromGitter<zacharycarter> btw for anyone on osx - https://github.com/vadimcn/vscode-lldb
10:21:35FromGitter<zacharycarter> visual debugging for Nim \o/
10:22:43euantorNeat, I need to try that
10:22:59euantorI usually use Sublime Text, but if visual debugging in VS Code works well I might end up switching
10:26:04*Demos_ quit (Quit: Demos_)
10:26:22*Demos_ joined #nim
10:26:36*claudiuinberlin joined #nim
10:28:47FromGitter<Bennyelg> Hey, How do I open karax examples?I try to run open example.html but i see blank page
10:30:36*taaperotassu joined #nim
10:31:12FromGitter<zacharycarter> did you compile them first?
10:43:10FromGitter<BigEpsilon> @mratsim , I would add to your article a third reason, which is how painful is to implement algorithms over generic numerical types. ⏎ First you have to use the num carte, you cannot use "as X" because that is valid only for a specific primitive type, so you have to use "Y::from(X).unwarp()" every ware, even for numeric literals ! ⏎ Not to mention that you cannot sort vectors of float because they do not
10:43:10FromGitter... implement Ord trait. ⏎ I used rust in my job to implement isolation forest, but I abandoned the idea of making the algorithm generic. [https://gitter.im/nim-lang/Nim?at=59d60cbdbac826f05439df98]
10:43:14FromGitter<Bennyelg> How Do I compile then nim js .. ?
10:43:39FromGitter<zacharycarter> @Bennyelg yes
10:45:13FromGitter<Bennyelg> ➜ mediaplayer git:(master) ✗ nim js -d:release mediaplayer.nim ⏎ Hint: used config file '/Users/benny/Documents/Nim/config/nim.cfg' [Conf] ⏎ Hint: system [Processing] ⏎ Hint: mediaplayer [Processing] ⏎ mediaplayer.nim(2, 14) Error: cannot open 'karax/karax' [https://gitter.im/nim-lang/Nim?at=59d60d39bac826f05439e214]
10:46:03*endragor quit (Ping timeout: 240 seconds)
10:46:16FromGitter<zacharycarter> first nimble install
10:46:20FromGitter<zacharycarter> in the root project directory
10:47:42FromGitter<Bennyelg> thanks
10:47:52Araqbennyelg: there is also a "karun" tool that is useful for quickly trying things out
10:48:09FromGitter<Bennyelg> I'll check it out now, :]
10:48:33*taaperotassu quit (Ping timeout: 248 seconds)
10:49:22*onionhammer joined #nim
10:49:47Araqhttps://nim-lang.org/araq/karax.html don't reddit it btw, it's outdated
10:50:10Araqand 'include karaxprelude' is now 'include karax / prelude'
10:58:52*taaperotassu joined #nim
10:59:36FromGitter<zacharycarter> @yglukhov - can I use https://github.com/Tormund/rod_tilemap/blob/master/tilemap/tile_map.nim?
10:59:58*Demos_ quit (Quit: Demos_)
11:00:14*Demos_ joined #nim
11:00:57yglukhovzacharycarter: sure, if it suits you, which im not sure about =)
11:01:29FromGitter<zacharycarter> thanks :D
11:02:08*Snircle joined #nim
11:05:08*endragor joined #nim
11:15:54*taaperotassu quit (Ping timeout: 258 seconds)
11:17:03*gokr quit (Ping timeout: 240 seconds)
11:17:32*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:18:01*claudiuinberlin joined #nim
11:18:34*Demos_ quit (Quit: Demos_)
11:18:50*Demos_ joined #nim
11:20:21FromGitter<mratsim> @BigEpsilon Ah yeah the ord, I had the same issue. Rust committee just didn't think of generics, like go.
11:20:55*francisl joined #nim
11:24:04*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:25:45*claudiuinberlin joined #nim
11:41:15*avsej joined #nim
11:41:39avsejis it possible to get stacktrace in nim? or at least caller of the function
11:41:58*taaperotassu joined #nim
11:43:29*nhywyll quit (Ping timeout: 248 seconds)
11:44:49avsejnevermind. writeStackTrace is good enough
11:47:31FromGitter<mratsim> @avsej: https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html?ref=reddit
11:49:07avsejthank you
11:54:15*Demos_ quit (Quit: Demos_)
11:54:33*Demos_ joined #nim
12:02:48*taaperotassu quit (Ping timeout: 240 seconds)
12:08:33*Arrrr quit (Ping timeout: 240 seconds)
12:09:56*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:10:58*dddddd joined #nim
12:11:03*Demos_ quit (Quit: Demos_)
12:11:21*Demos_ joined #nim
12:12:17*taaperotassu joined #nim
12:12:58*claudiuinberlin joined #nim
12:14:12*vlad1777d joined #nim
12:30:55*vivus joined #nim
12:38:26vivusdom96: you around?
12:40:05FromGitter<Bennyelg> Hey a simple data structure of set
12:40:35dom96vivus: Please don't ask if I'm around. Just ask me your question.
12:40:59vivusdom96: I wouldn't want to disturb you if you are busy :)
12:42:28FromGitter<Bennyelg> what is wrong ⏎ var threadParticipents: initOrderedSetstring ()
12:42:44dom96Highlighting me is already a little distracting.
12:44:40*ShalokShalom_ joined #nim
12:47:29*francisl quit (Ping timeout: 248 seconds)
12:47:35*ShalokShalom quit (Ping timeout: 240 seconds)
12:47:53FromGitter<ephja> @Bennyelg `=`, not `:`
12:48:03FromGitter<ephja> :-)
12:48:15FromGitter<Bennyelg> yea got it hehe
12:48:18FromGitter<Bennyelg> thanks
12:48:34*Demos_ quit (Quit: Demos_)
12:48:54*Demos_ joined #nim
12:49:52*francisl joined #nim
12:50:15FromGitter<Bennyelg> anyway to print the sql I execute ? ⏎ in example: ⏎ db.getAllRows(sql"select * from x where name = ?")
12:50:23FromGitter<Bennyelg> I want to see If I geneerated the sql as it should
12:50:46vivusdom96: in this link here: https://github.com/dom96/nim-in-action-code/blob/master/Chapter7/Tweeter/src/database.nim is that your DB schema ?
12:51:22dom96yes
12:52:53vivusseeing raw SQL to create the schema is painful on the eyes
12:56:25dom96You can try using ormin if you'd like
12:56:44dom96Regarding the code you just PM'd me: you can probably get the raw SQL from that and copy it
12:56:53dom96or translate it yourself, sorry but I can't help you there
12:57:19vivusnp
12:57:30*vivus quit (Quit: Leaving)
13:01:03Araqormin imports the SQL schema, it doesn't write it for you :P
13:04:23*taaperotassu quit (Ping timeout: 258 seconds)
13:04:38*gokr joined #nim
13:15:46*taaperotassu joined #nim
13:19:06FromGitter<alehander42> hey @Araq i am trying to run the profiler on the compiler as described in https://nim-lang.org/docs/estp.html but I get i stack overflow, is that normal ?
13:19:42Araqdepends on the input to the compiler
13:22:20*Demos_ quit (Quit: Demos_)
13:22:34*Demos_ joined #nim
13:26:15*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:28:03*gokr quit (Ping timeout: 240 seconds)
13:36:39*PMunch_ joined #nim
13:38:09*PMunch quit (Disconnected by services)
13:38:35*PMunch_ is now known as PMunch
13:40:00FromGitter<alehander42> yeah probably shouldn't tried it on the compiler itself
13:42:51*Demos_ quit (Quit: Demos_)
13:43:09*Demos_ joined #nim
13:47:57*taaperotassu quit (Ping timeout: 260 seconds)
13:51:47*claudiuinberlin joined #nim
13:52:18*user0_ quit (Remote host closed the connection)
13:52:51*user0_ joined #nim
13:54:04*TjYoco joined #nim
13:57:31*Vladar quit (Quit: Leaving)
13:57:40*taaperotassu joined #nim
14:02:47*endragor quit (Remote host closed the connection)
14:03:17*Yardanico joined #nim
14:03:34*Demos_ quit (Quit: Demos_)
14:03:50*Demos_ joined #nim
14:06:46*couven92 quit (Quit: Client disconnecting)
14:16:11*manjaro-kde5 quit (Remote host closed the connection)
14:18:17*vlad1777d quit (Ping timeout: 260 seconds)
14:25:06*relax joined #nim
14:33:57*Sentreen quit (Read error: Connection reset by peer)
14:37:06*Sentreen joined #nim
14:37:09*Demos_ quit (Quit: Demos_)
14:37:23*ipjk joined #nim
14:37:26*Demos_ joined #nim
14:38:38*gokr joined #nim
14:40:13*Sentreen quit (Client Quit)
14:41:19*taaperotassu quit (Ping timeout: 255 seconds)
14:48:51*Sentreen joined #nim
14:49:05*Sentreen quit (Client Quit)
14:49:26*nsf quit (Quit: WeeChat 1.9)
14:52:33FromGitter<Varriount> @Araq You consider https://github.com/nim-lang/Nim/blob/devel/compiler/parser.nim full of comments?
14:52:42FromGitter<Varriount> I think it's lacking. :/
14:53:09*taaperotassu joined #nim
14:53:30*libman joined #nim
14:56:04*Demos_ quit (Quit: Demos_)
14:56:23*Demos_ joined #nim
14:56:34Araqit's obviously not full of comments. it is reasonably clear code though.
14:56:47Araqhttps://www.lua.org/source/5.3/lparser.c.html
15:00:11*PMunch quit (Quit: Leaving)
15:01:05FromGitter<gokr> I must say... its fun to search github and find all these little things written in Nim. I wonder how much is out there - but not listed properly in Nimble.
15:01:44*TjYoco quit (Quit: Leaving)
15:02:03*Vladar joined #nim
15:02:36FromGitter<d10n> I searched GitHub for example references when writing my tool and there were hardly any :(
15:03:31FromGitter<Varriount> Araq: What is it with programmers and short names. That Lua parsing code is clear as mud.
15:11:39*gokr quit (Ping timeout: 258 seconds)
15:12:48Araqnot everybody considers foo: Foo an improvement in clarity
15:17:54FromGitter<zacharycarter> def-pri-pub: if you are around please ping me when you have a chance
15:24:42*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:26:58*claudiuinberlin joined #nim
15:31:25*Demos_ quit (Quit: Demos_)
15:31:36*miran joined #nim
15:31:42*Demos_ joined #nim
15:36:24*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:36:48*claudiuinberlin joined #nim
15:46:34*Trustable joined #nim
15:48:32*Demos_ quit (Quit: Demos_)
15:48:51*Demos_ joined #nim
15:49:50FromGitter<Varriount> Araq:
15:52:07*Sentreen joined #nim
15:52:28FromGitter<Varriount> Araq: You mean "dyd" is a good variable name?
15:53:18FromGitter<zacharycarter> @dom96 : can the json macro not handle tables?
15:53:26FromGitter<zacharycarter> the to macro I mean
15:57:26*vivus joined #nim
15:59:45vivusis anybody using ormin?
16:01:45*PMunch joined #nim
16:02:41vivusAraq: is ormin alpha-code?
16:02:44*TjYoco joined #nim
16:05:28Araqvivus: works for me (tm)
16:05:48Araqand the readme contains an up-to-date "todo" section
16:05:58vivusAraq: can you nimble-ify it please? would be easier to use if installable as a package
16:08:14FromGitter<zacharycarter> I find that I can almost never use the json macro beyond very simple use cases
16:08:42FromGitter<zacharycarter> the to macro mainly
16:08:51FromGitter<Yardanico> vivus: it's not really easy ATM
16:08:57FromGitter<Yardanico> because ormin has a helper tools
16:09:00FromGitter<Yardanico> *tool
16:09:22vivus@Yardanico how do I install it then?
16:09:40TrustableHi Araq and dom96, pls review this PR: https://github.com/nim-lang/sdl2/pull/98
16:10:03*Jesin joined #nim
16:10:44Yardanicovivus: you clone it and have it in a separate directory in your project?
16:11:19vivusoh, let me try installing it like so.
16:13:50FromGitter<zacharycarter> guess it's time for nimyaml
16:17:45*endragor joined #nim
16:18:10FromGitter<zacharycarter> damn I don't even think NimYaml will help me
16:18:46FromGitter<Yardanico> why you don't make parsing procs yourself? and can you provide an example of what you're trying to do?
16:19:22FromGitter<zacharycarter> I'm trying to parse a key value map that's written inJSON
16:19:31FromGitter<zacharycarter> I don't know the keys before hand
16:19:45Yardanicocan you provide an example of this map?
16:19:53FromGitter<zacharycarter> yes I'll make a gist
16:20:31*endragor_ joined #nim
16:22:10FromGitter<zacharycarter> @Yardanico https://play.nim-lang.org/?gist=d2bbbf159ad615d33a2de1979a81d0fa
16:23:48*endragor quit (Ping timeout: 246 seconds)
16:25:45FromGitter<Yardanico> well firstly - json "to" macro doesn't "user" types IIRC
16:25:45*Demos_ quit (Quit: Demos_)
16:25:58FromGitter<Yardanico> I mean table is not built-in
16:26:00FromGitter<Yardanico> it's a separate module
16:26:03*Demos_ joined #nim
16:26:31FromGitter<zacharycarter> I figure this is why it's not working
16:26:39FromGitter<zacharycarter> but IMO there should be some way to do this
16:26:43FromGitter<Yardanico> well not really
16:26:59FromGitter<Yardanico> just parse the whole thing with "to" macro and parse these tilesets separately :)
16:27:16FromGitter<zacharycarter> I guess
16:27:18FromGitter<zacharycarter> :/
16:27:42FromGitter<Yardanico> well there's nothing bad with that
16:28:08FromGitter<Yardanico> it would be a lot of work to make "to" macro work for not only built-in types
16:28:36FromGitter<zacharycarter> it doesn't need to work for all built in types
16:28:38FromGitter<zacharycarter> just tables :P
16:28:46FromGitter<zacharycarter> err user types I mean
16:29:57FromGitter<zacharycarter> I don't even think I can do what your'e describing
16:30:05FromGitter<zacharycarter> parse everything but the tilesets with the to macro
16:30:11FromGitter<zacharycarter> and then parse the tilesets seperately
16:30:21FromGitter<Yardanico> you can do that
16:30:22FromGitter<Yardanico> easily
16:30:37FromGitter<zacharycarter> I'm not going to be able to store that data in the same object I'm parsing into
16:30:55FromGitter<zacharycarter> if I add an extra property to the Tileset object to hol dit
16:31:02FromGitter<zacharycarter> I get - Error: unhandled exception: key not found: setTiles [KeyError]
16:31:38FromGitter<zacharycarter> I guess I'll have to get creative
16:31:57FromGitter<Yardanico> or just parse the whole thing by hand, it's not really that big really :)
16:32:06FromGitter<Yardanico> well I mean
16:32:13FromGitter<Yardanico> you don't need to parse EVERYTHING by hand
16:32:17FromGitter<Yardanico> you can still use "to" macro here
16:32:31*vlad1777d joined #nim
16:32:46FromGitter<zacharycarter> yeah for some things
16:33:01FromGitter<zacharycarter> I'll just parse it by hand but IMO the to macro should support generic key value sets somehow
16:33:19FromGitter<zacharycarter> I've run into this situation before and needed this functionality - also skipping properties etc
16:35:32vivus@Yardanico how did you compile ormin?
16:36:25Yardanicoyou just import it
16:36:28Yardanicoas a module
16:37:01*smt joined #nim
16:42:42vivus@Yardanico are you using ormin for anything?
16:42:48Yardanicono
16:44:14TjYocoCan anyone inform me how this works.. Rainmeter has an API to create plugins. https://github.com/rainmeter/rainmeter-plugin-sdk/tree/master/API the header file in cpp is located there. So is it possible to just wrap the header file like so .. https://gist.github.com/Tyler-Yocolano/3b80001b2a69887dd41d09c2b68e3fb9 ?
16:44:23*Snircle_ joined #nim
16:45:32*taaperotassu quit (Read error: Connection reset by peer)
16:45:51TjYoconot exactly wrapping the header file I guess, but I hope you understand what I mean
16:46:12vivusYardanico: I cloned the repo and when I do the following: import "/ormin", json, it throws the error: forumproto.nim(2, 8) Error: cannot open '/ormin' . doing it like this: import "ormin/ormin", json , gives the error: /bin/sh: 1: tools/ormin_importer: not found ... forumproto.nim(4, 43) Error: cannot open 'forum_model'
16:46:33*PMunch quit (Quit: leaving)
16:46:36Yardanicowtf is "/ormin" ?
16:46:44Yardanicoif ormin is in your dir - use "import ormin"
16:46:47*Snircle quit (Ping timeout: 255 seconds)
16:47:04YardanicoI mean ormin directory
16:47:28Yardanicoah
16:47:44Yardanicovivus, you're right, tools/ormin_importer is not yet automatically recompiled
16:47:49Yardanicojust compile it once
16:48:04Yardanicothis code is disabled https://github.com/Araq/ormin/blob/master/ormin.nim#L12
16:48:20*Yardanico quit (Remote host closed the connection)
16:48:49vivus@Yardanico so I need to compile ormin_importer?
16:50:26dom96zacharycarter: nope
16:50:46vivusnim c tools/ormin_importer.nim ... nim c forumproto.nim forumproto.nim(4, 43) Error: cannot open 'forum_model'
16:52:25FromGitter<zacharycarter> is there a less verbose way of writing
16:52:32FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d6634fe44c43700af9fd49]
16:53:20FromGitter<zacharycarter> thanks @dom96
16:53:34FromGitter<mratsim> part of the proc is missing? Why is there a result hanging alone?
16:54:03*gokr joined #nim
16:54:43FromGitter<zacharycarter> sorry I didn't copy the entire proc
16:54:50FromGitter<zacharycarter> I'm just wondering if there's a shorter way of writing
16:55:00FromGitter<zacharycarter> JsonNode["fieldName"].getNum.int
16:59:44*Demos_ quit (Quit: Demos_)
17:00:02*Demos_ joined #nim
17:00:51dom96zacharycarter: that seems about as short as you'll get
17:01:28FromGitter<zacharycarter>  thanks
17:02:20TjYocoyou can always make a template that turns JsonNode["field"].getInt into JsonNode["field"].getNum.int so technically shorter lol
17:03:37*endragor joined #nim
17:06:05*sz0 joined #nim
17:06:58*endragor_ quit (Ping timeout: 264 seconds)
17:11:24miranhi guys, if anyone of you has some time to go through my beginner code and tell me where could i improve, i would appreciate it
17:11:25miranhttps://forum.nim-lang.org/t/3212
17:12:39TjYoco404 on the link @miran
17:13:10miranheh, i just commented there that the thread seems invisible if you're not logged in :)
17:13:12*endragor quit (Remote host closed the connection)
17:13:30miranhere's the direct link to the repo:
17:13:31miranhttps://github.com/narimiran/advent_of_nim_2016
17:14:46*Ven`` joined #nim
17:19:06mirandom96: you're the admin of nim forum? could you look into why my thread is not visible? is it because of my user status 'moderated'?
17:19:51dom96yep, fixed
17:20:02*Demos_ quit (Quit: Demos_)
17:20:09mirandom96: thanks!
17:20:19*Demos_ joined #nim
17:24:37*Demos joined #nim
17:24:50vivusAraq: if you are available, can you please explain how to run the examples for ormin?
17:24:51*nhywyll joined #nim
17:24:51*gangstacat quit (Quit: Ĝis!)
17:25:11*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:25:12*gangstacat joined #nim
17:26:24Araqtools/ormin_importer examples/forum_model.sql
17:26:44Araqthat should produce examples/forum_model.nim
17:28:14vivusoh I need to run the ormin_importer executable against the .sql file. that makes a lot of sense now
17:28:15AraqI want to improve Nim's import statement to better support code generators
17:28:33Araqin the end it should be:
17:28:50*nsf joined #nim
17:28:52Araqimport !"tools/ormin_importer.nim" / "forum_model.sql"
17:30:38vivusAraq: so unlike something like SQLAlchemy, in order to use Ormin, you still have to create a schema in a .sql file?
17:30:42dom96isn't that just a shortcut for: import tools/ormin_importer; importer_macro("forum_model.sql")?
17:32:10Araqdom96: hmmmm not really
17:32:28Araqvivus: for now, yes.
17:32:54vivuswell I got it to compile, so far so good.
17:32:55Araqusually you already have a database and a model... :P
17:33:37vivusAraq: definitions of the model like so would make it much easier to use: https://github.com/uclaacm/teach_reddit_clone_flask/blob/master/app/models.py (for people not familiar with SQL)
17:35:10*mahsav left #nim (#nim)
17:35:52*mahsav joined #nim
17:38:17Araqvivus: well it you're unfamiliar with SQL I doubt you'll come very far with ormin
17:38:19Araq*if
17:38:55vivusAraq: I am somewhat, but generally, usage of an ORM is meant to eliminate the need to know SQL :P
17:39:28Araqreally? that's news to me
17:39:40AraqI thought the point is to avoid stringly typed code
17:39:43Araq:P
17:40:20vivusI thought I would build a functional web-app with jester and ormin, but some of the code-complexity is still over my head XD
17:40:59*Demos_ quit (Quit: Demos_)
17:41:25*Demos_ joined #nim
17:42:58*manjaro-kde5- joined #nim
17:43:20Demosimo orms are a symptom of most languages not being able to really express the semantics of sql tuples
17:43:36Demosalso how does --clib work
17:43:41*Jesin quit (Quit: Leaving)
17:43:56Demosbecause it adds -l<path-to-proj>/lib to my command line which does not seem right
17:44:38ipjkI thought ORMs were like, semi-builder patterns that output SQL (or other db-backend)
17:44:42ipjkAm I wrong?
17:45:12federico3ipjk: no, most ORMs do that
17:46:20Demosit's not well defined
17:46:59Demoslike if your language knew about sql (for example psql's embedded sql thing) you can just be like "var object = sql"select * from object_table"
17:47:07Demosand get pretty much the same thing as most ORMs
17:47:30vivusit's meant to hold your hand and make coding a bit easier, in that you don't need to know SQL+backend-language for your backend and then know JS/CSS/HTML for the frontend
17:48:03Demosyou kinda still need to know sql though
17:48:27Demoslike tbh I always end up knowing what sql I want generated and then poking the orm until it gives me that
17:48:49Demosif you really want to just store objects use a k/v store or the filesystem
17:49:35federico3Demos: there are ORMs meant to abstract away the type of database used. You describe your "objects" and their relations and they do the magic (hence the name: ORM), of course with limitations
17:49:49vivusa 1-to-1 of this: https://github.com/uclaacm/teach_reddit_clone_flask/blob/master/app/models.py and this: https://github.com/uclaacm/teach_reddit_clone_flask/blob/master/app/views.py is a lot more straight-forward compared to having to define everything in SQL first. if that's the case, perhaps you don't need an ORM, as you are comfortable with SQL already
17:50:03Demosbut the type of database is always relational
17:50:18*okapi210 joined #nim
17:50:32Demosso like, I've just never seen an orm that really uses the database as much more than a kv store
17:50:59Demosand they almost always throw away the ability to select only the bits you need
17:51:00vivusfederico3 is right on that. with many ORMs, you can switch between postgres/mysql with just a few lines of code changed. it's like a middleware layer between DB/app
17:51:02Demosbut alasw
17:51:17ipjkIsn't calling SQL through strings considerd unsafe, if not handeld correctly? Doens't an ORM hold your hand there? (I have 0-interesst in webdev, so sorry if I'm superwrong)
17:51:26Demosnot really
17:51:34Demoslike if you use string interpolation then sure
17:51:37Demosbut don't do that
17:51:58Demos(in nim it's easy to write code that looks like string interp but actually uses parameterized queries)
17:52:12vivusipjk: it's very easy to screw something up if your raw-SQL is not 100% correct.
17:52:36Demoswell it's very easy to screw stuff up if your generated sql isn't what you expect
17:52:43Demosusually it'
17:52:53*Jesin joined #nim
17:53:06ipjkvivus: that's what I recall
17:53:55vivusDemos: something like SQLAlchemy is a lot more battle-tested compared to joe-developer writing his own SQL inserts
17:53:58Demosalso: if you're using a database you should really learn sql. Otherwise you are sacrificing perf for things that you are not using (see: nosql being so popular)
17:54:07Demossqlalchemy is actually awesome
17:54:23Demosthe low level interface is kinda just writing sql in pythonish syntax
17:54:40vivusDemos: and that is precisely what I was looking for in Nim
17:54:51FromGitter<d10n> personally I store my user's passwords as lines in a text file (joke)
17:55:09Demosthe thing is with nim you can just write real sql instead and we can parse it at compile time to do what sqlalchemy does
17:55:15vivus@d10n are you an ex-Yahoo employee? XD
17:55:44FromGitter<d10n> vivus: no, just aiming for a Verizon acquisition
17:55:58ipjkvivus: "battle-tested" is a good argument -- and I rather trust that than myself.
17:56:09vivus@d10n make sure to keep your CentOS 5 servers running unpatched
17:56:31Demoswell sql itself (and the associated interpreters and compilers) are very battle tested
17:56:52DemosI'd trust just sqlite 1000x more than I would trust sqlalchemy's interfacing with sqlite
17:57:04Demosalthough sqlite is particularly battle tested (literally!)
17:57:16vivusipjk: that is how (I assume) most web-frameworks were born. Things that you don't even think about when writing your small web-app (protecting from SQL-injections, etc.)
17:57:56Demosagain, sql injections are not prevented with ORMs they are prevented with paramaterized queries
17:58:10vivusI didn't say they were Demos :)
17:59:24ipjkBut I'd honestly write a server using ORM rather than, for eq. strings with sql.
17:59:29federico3vivus: django has been build very much around a relational model - unfortunately
18:00:11ipjkBut, however - I'm just a hobbyist
18:00:29*PMunch joined #nim
18:00:56ipjkAnd that might be a problem, as screwing up, scares me off.
18:03:15vivusI see Go has an interesting ORM too: http://jinzhu.me/gorm/crud.html#create
18:06:09vivusI'll just crawl back into the hermit-hole XD
18:07:19*gangstacat quit (Quit: Ĝis!)
18:07:43AraqI don't see the point in this discussion, Ormin does what it claims to do and does it exactly in the way that I like it. And I have written lots of code in diverse languages with and without ORMs before.
18:08:35Demosanyway, so --cflags? is it supposed to plop a full path into the linker command line?
18:09:33*TjYoco quit (Quit: Leaving)
18:09:46Demossorry --clib
18:10:30Araqyou can use -d:debugOrminSql to see the produced SQL
18:10:46Araqnot that it isn't obvious already how it looks like...
18:10:58AraqDemos: never used --clib, sorry
18:12:57*gangstacat joined #nim
18:13:18gokrAraq: I am curious, I haven't looked yet at ormin, but is it a sort of "inverted ORM"? Avi Bryant in the Smalltalk community made ROE - which is basically a DSL to manipulate tables and tuples. Expressions build a structure that is then later behind the scenes converted to SQL. Something similar?
18:13:43Araqand claiming that code like
18:13:46Araqclass Post(db.Model):
18:13:46Araq id = db.Column(db.Integer, primary_key=True)
18:13:46Araq title = db.Column(db.String(255))
18:13:51vivusAraq: not all discussions need to be shut down :) we were just discussing the differences that ORMs provide (and what that means). you wrote ormin to serve a purpose for you, and nobody is downplaying that :)
18:14:02Araqdoesn't require knowledge of SQL is far streched
18:14:19*Demos_ quit (Quit: Demos_)
18:14:26Araqwhat's a "primary key"? why is suddendly my Python code typed?
18:15:11Araqhow would I write a foreign key relation?
18:15:58Araqgokr: quite possible. In fact, I generate the Nim types from the queries
18:15:59*okapi210 quit (Quit: Page closed)
18:17:15gokrWhen Avi did ROE it was refreshing - a sort of inverse take. Instead of "fighting" the SQL model (trying to map OO to relational) it was more like "embrace it".
18:17:30Araq^ yup.
18:17:33Demosyeah
18:17:38Demosthat's what I'm saying
18:17:48gokrOk, cool. I will take a closer look then ;)
18:18:00Demosmy personal orm does that oo
18:18:16Demosalthough I may just start submitting PRs to ormin
18:18:19Demos:D
18:19:19ipjkAraq: discussions are always a good thing, with or without point, imo. That's how we thrive as human, through coperation and sharing of ideas and thoughts.
18:19:33Araqipjk: yeah yeah, whatever man
18:19:58Araqyou're all free to continue the discussion as long as you praise ormin
18:20:29gokrAvi made ROE in 2004 :)
18:20:36federico3ipjk: BTW there's #nim-offtopic for this
18:21:23vivusfederico3: is discussing this necessarily off-topic? it's dealing with nim, SQL and sql-batteries/middleware :)
18:21:29ipjkfederico3: you're right - but this was semi-related.
18:23:16*libman quit (Quit: Connection closed for inactivity)
18:26:14gokrAraq: Some info here btw: http://wiki.c2.com/?RelationsAsFirstClassObjects
18:30:58Araqgokr: oh that's different but also good :-)
18:31:22gokrYeah, that would be... sort of one layer on top of ormin
18:31:27gokrI guess.
18:31:30Araqormin right now is 100% static, you cannot muck with the SQL trees at runtime
18:31:35gokrright
18:32:03DemosI think being able to muck with the schema at runtime would require dependent types
18:32:14gokrSo perhaps LINQ is a more fitting likeness
18:32:16Demosso you gotta approximate it with boxed any types
18:32:23Demosyeah
18:33:03AraqSQL tree construction at runtime is also awesome and we need something for that but I don't know whether it belongs to Ormin
18:33:20Araqor whether that is better done as a separate project
18:33:36gokrMmm, yeah, given ormin 100% static... it is probably a separate thing.
18:34:05ipjkMaybe ormintime? :)
18:39:05dom96bah, I keep going into os.html and searching for ospath functions :\
18:44:17vivusormime?
18:51:13Demosthe runtime stuff would require an "any" type right?
18:53:53AraqDemos: in Ormin I use JSON as the "any" type, it's really handy
18:54:03Araqand often what the server needs to produce anyway
19:00:55*francisl quit (Quit: francisl)
19:02:14*claudiuinberlin joined #nim
19:04:10*Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com)
19:06:31*xet7 quit (Quit: Leaving)
19:08:29*francisl joined #nim
19:13:38*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:15:47*sz0 quit (Quit: Connection closed for inactivity)
19:17:29*Vladar quit (Remote host closed the connection)
19:20:03cremI've tried "nimble init", it worked well, but there was exception in the end: Error: unhandled exception: Cannot change root of path: Path does not begin with original root. [ValueError]
19:20:08cremexpected/known?
19:20:15*Trustable quit (Remote host closed the connection)
19:20:49cremnimble v0.8.6 compiled at 2017-09-04 20:58:48
19:24:35cremHm, only reproducible with one particular package name. Weird
19:27:51cremSo, I need nimble to get packages, but for my standalone projects I don't need to "nimble init" etc, do I?
19:29:14*PMunch quit (Quit: leaving)
19:33:56FromGitter<Yardanico> you are not enforced to do it
19:33:58FromGitter<Yardanico> but it's useful
19:35:05*gokr quit (Ping timeout: 255 seconds)
19:39:43cremThanks.
19:39:55cremAnd nimble install installs packges to where?
19:40:10cremIs it per user, system-wide, per project?
19:40:31FromGitter<ephja> ~/.nimble
19:40:57*gokr joined #nim
19:43:26FromGitter<Yardanico> per user
19:44:15*ShalokShalom_ is now known as ShalokShalom
19:44:16*claudiuinberlin joined #nim
19:56:51cremSo, that nimble exception only occurs when I create a package with name 6 or 7 characters long. I bet there's a hidden meaning in packages with such names.
19:59:14vivusnimble package-squatting
20:06:03*mahsav quit (Ping timeout: 258 seconds)
20:09:22*miran quit (Ping timeout: 264 seconds)
20:11:03FromGitter<mratsim> Allocating seq is so expensive :/. Did some benchmarks and I spent more time doing allocation than actual math computations
20:13:12Araqsounds like a functional solution :-)
20:15:38Araqmaybe you should pool the seqs
20:17:03*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:18:06FromGitter<mratsim> Creating a memory pool?
20:18:19Araqyeah
20:19:42*mahsav joined #nim
20:19:42*mahsav quit (Client Quit)
20:19:54FromGitter<mratsim> stack array will be fine, it’s just for holding the “shape” of the tensor so 3D tensor are @[2,3,4] for a 2 x 3 x 4 tensor, most useful is 4D to hold N images of RGB color with H height and W width so @[N, RGB, H, W].
20:20:22*mahsav joined #nim
20:20:52FromGitter<mratsim> videos would need 5D, and 3D videos would need 6D though I don’t know anyone who does 3D videos ...
20:21:23Calinoutoday I learned that there's a semi-standard interface for CLI apps: http://docopt.org/
20:21:30Calinousince there's a Nim implementation of it
20:21:35Calinouthat seems pretty clever, I never thought about this before
20:21:39Calinouseems to be complete enough for most use cases
20:22:05*zachk joined #nim
20:26:04*claudiuinberlin joined #nim
20:26:12*xet7 joined #nim
20:28:55*nsf quit (Quit: WeeChat 1.9)
20:34:20adam12Calinou: Cool - this was perfectly timed as I built a little CLI tool in nim yesterday
20:34:27Calinouheh :)
20:34:40CalinouI wanted to write my own CLI library, but this looks pretty good, so I don't need to
20:34:51CalinouI might write a (simpler) library though, something to simplify the usage of ANSI color codes
20:35:03adam12I made mine a bit ghetto but it didn't need much.
20:35:08Calinoulike https://github.com/ogham/rust-ansi-term but for Nim
20:35:19adam12Have you seen terminal?
20:35:23adam12in stdlib?
20:35:26Calinouno
20:35:35Calinouideally, it should handle Windows as well (for the basic 16 colors)
20:35:37Calinouand truecolor, too
20:35:41Calinou(on Linux/macOS/WSL)
20:36:30dom96the stdlib module does handle that
20:37:27Calinouah, I should take a look then :P
20:38:00*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:38:38*claudiuinberlin joined #nim
20:40:30*claudiuinberlin quit (Client Quit)
20:53:48federico3Calinou: unfortunately docopt parses a help doc string in order to "reverse" it into argument parsing
20:54:23Calinoufederico3: is it that bad, if the spec is formally defined? that seems convenient to me
20:54:52CalinouI've used clap in the past (a popular Rust CLI argument parsing library), it uses plain old code to define arguments (or a .yml file, I've used that instead), it's ok but could be more natural
20:54:56*relax quit (Ping timeout: 248 seconds)
20:58:09federico3Calinou: try to build something with nested commands and argument (like git) and you'll find the limits of docopt :(
20:58:40*claudiuinberlin joined #nim
20:58:49adam12federico3: do you have an alternative lib?
21:01:02*claudiuinberlin quit (Client Quit)
21:01:40Calinouhmm, I don't have the skills to build complex enough CLI tools yet, anyway :P
21:02:33federico3Calinou: some comments on docopt at http://pocoo-click.readthedocs.io/en/latest/why/
21:02:51federico3adam12: for Nim or language-independent?
21:02:56adam12federico3: nim
21:05:18federico3adam12: not yet, I use the sdlib helpers. I'd be happy to see something that can generate CLIs, APIs, help and doc in one shot like http://www.hug.rest/
21:09:57DemosI wish docopt was less picky
21:10:15Demosbut I do like that there's an implementation for almost everything
21:10:52Demosyou probably don't want your cli api and your rest api to be the same
21:11:02Demosbecause of vastly different perf issues
21:16:28obadzif I have a char array and I want to extract a small subarray and view each element as uint8
21:16:39obadzis the best way to do:
21:16:45obadzlet x = ( cast[ptr array[4, uint8]] (addr s[12]) )[] ?
21:22:16*Demos quit (Quit: Demos)
21:22:41*Demos joined #nim
21:22:56*Snircle joined #nim
21:23:02*Sentreen quit (Ping timeout: 240 seconds)
21:36:11*Sentreen joined #nim
21:40:00Araqobadz: probably
21:50:59FromGitter<zacharycarter> https://imgur.com/a/ZFeob
21:51:03FromGitter<zacharycarter> isometric tilemaps yay
21:55:02*gokr quit (Ping timeout: 260 seconds)
21:58:29*vlad1777d quit (Ping timeout: 246 seconds)
21:59:48dom96oooh, nice. Time to build an Age of Empires clone :D
22:02:11FromGitter<zacharycarter> hehe
22:14:39*relax joined #nim
22:17:35*nhywyll quit (Quit: nhywyll)
22:18:56vivusdoes anybody use jester with a document-store?
22:20:01*Demos quit (Ping timeout: 240 seconds)
22:25:32*Jesin quit (Quit: Leaving)
22:31:56*francisl quit (Quit: francisl)
22:32:32*francisl joined #nim
22:32:46*francisl quit (Client Quit)
22:33:32*relax quit (Ping timeout: 260 seconds)
22:37:10*mahsav quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
22:37:56*yglukhov quit (Remote host closed the connection)
22:46:12*Demos_ joined #nim
22:49:30*thmslld_ joined #nim
22:53:32*thmslld_ quit (Ping timeout: 240 seconds)
23:00:52FromGitter<Varriount> document store?
23:02:20vivusI have a views.nim file, using nim-templates. in the following code: return master.layout("TODO", result) (this is at the end of the file), it gives the error: views.nim(42, 1) Error: 'return' not allowed here
23:02:32vivus@Varriount like mongo-db
23:02:43FromGitter<Varriount> @zacharycarter Great. Now make me a clone of Megaman: Battle Network ( https://imgur.com/a/KSqF1 )
23:02:47FromGitter<Varriount> :D
23:03:22FromGitter<Varriount> (Seriously though, nice work. I miss the days of isometric games)
23:03:25*Demos_ quit (Quit: Demos_)
23:03:40*Demos_ joined #nim
23:09:26*Jesin joined #nim
23:18:52FromGitter<zacharycarter> thanks @Varriount
23:28:28adam12@zacharycarter that is awesome.
23:29:37FromGitter<zacharycarter> thanks!
23:36:11FromGitter<genotrance> looking at some C code in openssl, what kind of declaration is this? ⏎ ⏎ ```int (*BIO_meth_get_write(BIO_METHOD *biom)) (BIO *, const char *, int);``` [https://gitter.im/nim-lang/Nim?at=59d6c1ebbac826f0543daf4d]
23:38:17FromGitter<zacharycarter> not sure
23:38:41FromGitter<genotrance> obviously c2nim doesn't like it, but wondering how this can be handled
23:40:10*zachk quit (Quit: night)
23:40:11*Demos_ quit (Quit: Demos_)
23:40:31*Demos_ joined #nim
23:53:10*Demos joined #nim
23:55:53*Demos_ quit (Quit: Demos_)