00:08:20 | * | Demos_ quit (Quit: Demos_) |
00:08:36 | * | Demos_ joined #nim |
00:11:54 | * | vivus joined #nim |
00:16:58 | vivus | what ORM are the cool-kids using? |
00:19:16 | ipjk | vivus: https://github.com/Araq/ormin, not sure how much it've come along though. |
00:23:32 | vivus | thanks ipjk |
00:26:07 | * | Demos_ quit (Quit: Demos_) |
00:26:25 | * | Demos_ joined #nim |
00:26:39 | * | zachk quit (Quit: Leaving) |
00:30:09 | Demos[m] | Ive been meaning to finish writing my orm, gives you the right types from regular queries |
00:34:26 | vivus | can I update nim by pulling from the repo? |
00:49:05 | * | Demos_ quit (Quit: Demos_) |
00:49:21 | * | Demos_ joined #nim |
00:50:04 | Demos[m] | yes you can |
00:51:21 | vivus | the 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:15 | FromGitter | <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:24 | FromGitter | <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:12 | FromGitter | <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:09 | Tanger | Hey 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:48 | Araq | http://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:27 | FromGitter | <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:53 | salewski | I have not been able to find a better way to write this: |
08:08:58 | salewski | if name.startsWith("modifierReserved_"): name = name[17 .. ^1] |
08:09:05 | * | kunev quit (Ping timeout: 248 seconds) |
08:09:35 | salewski | For tails there is removeSuffix(), but for removing prefix? |
08:10:01 | * | kunev joined #nim |
08:10:38 | salewski | And I wonder, would it make sense when removeSuffix() would return a boolean for sucess? |
08:13:50 | salewski | And another question: Does a trick exists to see the assembler code of Nim statements fast? |
08:14:23 | salewski | I have already looked at assembler code long time ago, but it takes some time... |
08:15:22 | salewski | Instruct gcc to keep assembler listings, and then search manually for the rigth location. |
08:15:49 | salewski | Maybe 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:53 | Araq | salewski: not a fan of these discarable bools, they mess with type inference |
08:19:14 | Araq | removePrefix would be a welcome addition to strutils |
08:19:50 | salewski | OK, thanks. |
08:20:48 | * | salewski quit (Quit: WeeChat 1.9.1) |
08:25:48 | FromGitter | <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:13 | FromGitter | <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:35 | Araq | Options are not clean. |
08:29:06 | Araq | it depends on the use case. often they are only super messy |
08:30:01 | Araq | Haskell has exceptions. I take it the inventors didn't understand FP? |
08:30:09 | Araq | :P |
08:30:25 | FromGitter | <mratsim> I think to be clean language must go all the way with Option, you can't stay in between |
08:30:59 | FromGitter | <mratsim> Iirc they introduced exception because of perf issue |
08:33:33 | * | Demos_ quit (Quit: Demos_) |
08:33:50 | * | Demos_ joined #nim |
08:36:06 | FromGitter | <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:50 | euantor | just 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:39 | FromGitter | <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:07 | FromGitter | <mratsim> (This was for a go playing bot in Rust and it discourages me for doing more in the language) |
09:26:01 | FromGitter | <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:17 | FromGitter | <gokr> I only know Rust "by google" so to speak. |
09:26:51 | Araq | "6 Escaping from control structures" is spot on |
09:26:56 | Araq | from that haskell link |
09:26:57 | FromGitter | <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:39 | FromGitter | <mratsim> Basically there is a tradeoff between safety and flexibility, Rust fails for me while Nim is at a sweet spot |
09:28:59 | Araq | wooohoo, nice blog post |
09:29:05 | Araq | I love the flesh wounds ... |
09:29:10 | FromGitter | <mratsim> lol |
09:29:37 | euantor | Also 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:02 | euantor | Exceptions are by far the more reasonable approach in my opinion |
09:31:46 | FromGitter | <gokr> @mratsim Great read! |
09:32:34 | FromGitter | <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:57 | FromGitter | <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:19 | FromGitter | <mratsim> I’m from France but my parents came from Madagascar |
09:33:43 | Araq | mratsim: at the risk of sounding unprofessional ... what's the most pressing bug for you? |
09:34:28 | FromGitter | <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:31 | dom96 | Posted 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:54 | Araq | dom96: we have tools/nimpretty now... |
09:35:02 | dom96 | Araq: awesome. |
09:35:06 | FromGitter | <gokr> Madagascar, ah. |
09:35:10 | Araq | now only somebody needs to push it into shape ... |
09:35:43 | Araq | it's actually quite hard since the lexer/parser are now very sloppy with comments |
09:35:59 | FromGitter | <mratsim> I would say: https://github.com/nim-lang/Nim/issues/5887 and https://github.com/nim-lang/Nim/issues/3819. |
09:36:16 | dom96 | Araq: :\ |
09:36:30 | dom96 | Will you accept patches to make them less sloppy? |
09:36:35 | Araq | of course |
09:37:03 | * | onionhammer quit (Ping timeout: 240 seconds) |
09:37:11 | Araq | I do wonder however if the AST approach is good for this |
09:37:45 | Araq | could also just work on token streams |
09:37:47 | FromGitter | <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:03 | FromGitter | <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:45 | Araq | oh interesting, I thought closures are much faster |
09:38:49 | FromGitter | <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:53 | FromGitter | <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:27 | Araq | can't you transform it via a macro? |
09:39:45 | Araq | macros are easier to write as you can give them as much context as required |
09:40:51 | FromGitter | <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:02 | dom96 | gokr: ooh nice, I know a guy creating something for classrooms and RPis: PiNet. |
09:43:19 | gokr | Pointer? |
09:44:17 | FromGitter | <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:18 | gokr | dom96: 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:15 | gokr | It 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:44 | gokr | It 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:09 | gokr | dom96: I guess this: http://pinet.org.uk |
09:52:01 | * | claudiuinberlin joined #nim |
09:58:31 | FromGitter | <zacharycarter> @genotrance I'm pretty sure it still builds on nimble install - it's a good question though |
09:58:59 | Araq | zacharycarter: is all of nim-playground open source? |
09:59:06 | FromGitter | <zacharycarter> yup |
09:59:15 | Araq | how 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:58 | FromGitter | <zacharycarter> probably quite a bit but I think it's doable |
10:00:48 | FromGitter | <zacharycarter> couple things I can think that would have to change right away - the docker image would have to include karax |
10:00:58 | FromGitter | <zacharycarter> and then the compiler would have to support the js target |
10:01:46 | FromGitter | <zacharycarter> I need to fix the create gist functionality - I've been slacking on that |
10:01:58 | * | taaperotassu joined #nim |
10:02:10 | Araq | alternatively I can think of a VS code plugin that runs the karax app in its internal browser |
10:02:22 | FromGitter | <zacharycarter> that'd be pretty cool |
10:02:34 | FromGitter | <zacharycarter> I think both ideas are neat |
10:02:36 | Araq | but I know nothing about VS plugins... |
10:02:37 | * | claudiuinberlin joined #nim |
10:03:39 | FromGitter | <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:18 | FromGitter | <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:33 | FromGitter | <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:53 | Araq | yay |
10:20:38 | FromGitter | <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:25 | FromGitter | <zacharycarter> btw for anyone on osx - https://github.com/vadimcn/vscode-lldb |
10:21:35 | FromGitter | <zacharycarter> visual debugging for Nim \o/ |
10:22:43 | euantor | Neat, I need to try that |
10:22:59 | euantor | I 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:47 | FromGitter | <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:12 | FromGitter | <zacharycarter> did you compile them first? |
10:43:10 | FromGitter | <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:10 | FromGitter | ... 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:14 | FromGitter | <Bennyelg> How Do I compile then nim js .. ? |
10:43:39 | FromGitter | <zacharycarter> @Bennyelg yes |
10:45:13 | FromGitter | <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:16 | FromGitter | <zacharycarter> first nimble install |
10:46:20 | FromGitter | <zacharycarter> in the root project directory |
10:47:42 | FromGitter | <Bennyelg> thanks |
10:47:52 | Araq | bennyelg: there is also a "karun" tool that is useful for quickly trying things out |
10:48:09 | FromGitter | <Bennyelg> I'll check it out now, :] |
10:48:33 | * | taaperotassu quit (Ping timeout: 248 seconds) |
10:49:22 | * | onionhammer joined #nim |
10:49:47 | Araq | https://nim-lang.org/araq/karax.html don't reddit it btw, it's outdated |
10:50:10 | Araq | and 'include karaxprelude' is now 'include karax / prelude' |
10:58:52 | * | taaperotassu joined #nim |
10:59:36 | FromGitter | <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:57 | yglukhov | zacharycarter: sure, if it suits you, which im not sure about =) |
11:01:29 | FromGitter | <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:21 | FromGitter | <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:39 | avsej | is 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:49 | avsej | nevermind. writeStackTrace is good enough |
11:47:31 | FromGitter | <mratsim> @avsej: https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html?ref=reddit |
11:49:07 | avsej | thank 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:26 | vivus | dom96: you around? |
12:40:05 | FromGitter | <Bennyelg> Hey a simple data structure of set |
12:40:35 | dom96 | vivus: Please don't ask if I'm around. Just ask me your question. |
12:40:59 | vivus | dom96: I wouldn't want to disturb you if you are busy :) |
12:42:28 | FromGitter | <Bennyelg> what is wrong ⏎ var threadParticipents: initOrderedSetstring () |
12:42:44 | dom96 | Highlighting 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:53 | FromGitter | <ephja> @Bennyelg `=`, not `:` |
12:48:03 | FromGitter | <ephja> :-) |
12:48:15 | FromGitter | <Bennyelg> yea got it hehe |
12:48:18 | FromGitter | <Bennyelg> thanks |
12:48:34 | * | Demos_ quit (Quit: Demos_) |
12:48:54 | * | Demos_ joined #nim |
12:49:52 | * | francisl joined #nim |
12:50:15 | FromGitter | <Bennyelg> anyway to print the sql I execute ? ⏎ in example: ⏎ db.getAllRows(sql"select * from x where name = ?") |
12:50:23 | FromGitter | <Bennyelg> I want to see If I geneerated the sql as it should |
12:50:46 | vivus | dom96: 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:22 | dom96 | yes |
12:52:53 | vivus | seeing raw SQL to create the schema is painful on the eyes |
12:56:25 | dom96 | You can try using ormin if you'd like |
12:56:44 | dom96 | Regarding the code you just PM'd me: you can probably get the raw SQL from that and copy it |
12:56:53 | dom96 | or translate it yourself, sorry but I can't help you there |
12:57:19 | vivus | np |
12:57:30 | * | vivus quit (Quit: Leaving) |
13:01:03 | Araq | ormin 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:06 | FromGitter | <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:42 | Araq | depends 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:00 | FromGitter | <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:33 | FromGitter | <Varriount> @Araq You consider https://github.com/nim-lang/Nim/blob/devel/compiler/parser.nim full of comments? |
14:52:42 | FromGitter | <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:34 | Araq | it's obviously not full of comments. it is reasonably clear code though. |
14:56:47 | Araq | https://www.lua.org/source/5.3/lparser.c.html |
15:00:11 | * | PMunch quit (Quit: Leaving) |
15:01:05 | FromGitter | <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:36 | FromGitter | <d10n> I searched GitHub for example references when writing my tool and there were hardly any :( |
15:03:31 | FromGitter | <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:48 | Araq | not everybody considers foo: Foo an improvement in clarity |
15:17:54 | FromGitter | <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:50 | FromGitter | <Varriount> Araq: |
15:52:07 | * | Sentreen joined #nim |
15:52:28 | FromGitter | <Varriount> Araq: You mean "dyd" is a good variable name? |
15:53:18 | FromGitter | <zacharycarter> @dom96 : can the json macro not handle tables? |
15:53:26 | FromGitter | <zacharycarter> the to macro I mean |
15:57:26 | * | vivus joined #nim |
15:59:45 | vivus | is anybody using ormin? |
16:01:45 | * | PMunch joined #nim |
16:02:41 | vivus | Araq: is ormin alpha-code? |
16:02:44 | * | TjYoco joined #nim |
16:05:28 | Araq | vivus: works for me (tm) |
16:05:48 | Araq | and the readme contains an up-to-date "todo" section |
16:05:58 | vivus | Araq: can you nimble-ify it please? would be easier to use if installable as a package |
16:08:14 | FromGitter | <zacharycarter> I find that I can almost never use the json macro beyond very simple use cases |
16:08:42 | FromGitter | <zacharycarter> the to macro mainly |
16:08:51 | FromGitter | <Yardanico> vivus: it's not really easy ATM |
16:08:57 | FromGitter | <Yardanico> because ormin has a helper tools |
16:09:00 | FromGitter | <Yardanico> *tool |
16:09:22 | vivus | @Yardanico how do I install it then? |
16:09:40 | Trustable | Hi Araq and dom96, pls review this PR: https://github.com/nim-lang/sdl2/pull/98 |
16:10:03 | * | Jesin joined #nim |
16:10:44 | Yardanico | vivus: you clone it and have it in a separate directory in your project? |
16:11:19 | vivus | oh, let me try installing it like so. |
16:13:50 | FromGitter | <zacharycarter> guess it's time for nimyaml |
16:17:45 | * | endragor joined #nim |
16:18:10 | FromGitter | <zacharycarter> damn I don't even think NimYaml will help me |
16:18:46 | FromGitter | <Yardanico> why you don't make parsing procs yourself? and can you provide an example of what you're trying to do? |
16:19:22 | FromGitter | <zacharycarter> I'm trying to parse a key value map that's written inJSON |
16:19:31 | FromGitter | <zacharycarter> I don't know the keys before hand |
16:19:45 | Yardanico | can you provide an example of this map? |
16:19:53 | FromGitter | <zacharycarter> yes I'll make a gist |
16:20:31 | * | endragor_ joined #nim |
16:22:10 | FromGitter | <zacharycarter> @Yardanico https://play.nim-lang.org/?gist=d2bbbf159ad615d33a2de1979a81d0fa |
16:23:48 | * | endragor quit (Ping timeout: 246 seconds) |
16:25:45 | FromGitter | <Yardanico> well firstly - json "to" macro doesn't "user" types IIRC |
16:25:45 | * | Demos_ quit (Quit: Demos_) |
16:25:58 | FromGitter | <Yardanico> I mean table is not built-in |
16:26:00 | FromGitter | <Yardanico> it's a separate module |
16:26:03 | * | Demos_ joined #nim |
16:26:31 | FromGitter | <zacharycarter> I figure this is why it's not working |
16:26:39 | FromGitter | <zacharycarter> but IMO there should be some way to do this |
16:26:43 | FromGitter | <Yardanico> well not really |
16:26:59 | FromGitter | <Yardanico> just parse the whole thing with "to" macro and parse these tilesets separately :) |
16:27:16 | FromGitter | <zacharycarter> I guess |
16:27:18 | FromGitter | <zacharycarter> :/ |
16:27:42 | FromGitter | <Yardanico> well there's nothing bad with that |
16:28:08 | FromGitter | <Yardanico> it would be a lot of work to make "to" macro work for not only built-in types |
16:28:36 | FromGitter | <zacharycarter> it doesn't need to work for all built in types |
16:28:38 | FromGitter | <zacharycarter> just tables :P |
16:28:46 | FromGitter | <zacharycarter> err user types I mean |
16:29:57 | FromGitter | <zacharycarter> I don't even think I can do what your'e describing |
16:30:05 | FromGitter | <zacharycarter> parse everything but the tilesets with the to macro |
16:30:11 | FromGitter | <zacharycarter> and then parse the tilesets seperately |
16:30:21 | FromGitter | <Yardanico> you can do that |
16:30:22 | FromGitter | <Yardanico> easily |
16:30:37 | FromGitter | <zacharycarter> I'm not going to be able to store that data in the same object I'm parsing into |
16:30:55 | FromGitter | <zacharycarter> if I add an extra property to the Tileset object to hol dit |
16:31:02 | FromGitter | <zacharycarter> I get - Error: unhandled exception: key not found: setTiles [KeyError] |
16:31:38 | FromGitter | <zacharycarter> I guess I'll have to get creative |
16:31:57 | FromGitter | <Yardanico> or just parse the whole thing by hand, it's not really that big really :) |
16:32:06 | FromGitter | <Yardanico> well I mean |
16:32:13 | FromGitter | <Yardanico> you don't need to parse EVERYTHING by hand |
16:32:17 | FromGitter | <Yardanico> you can still use "to" macro here |
16:32:31 | * | vlad1777d joined #nim |
16:32:46 | FromGitter | <zacharycarter> yeah for some things |
16:33:01 | FromGitter | <zacharycarter> I'll just parse it by hand but IMO the to macro should support generic key value sets somehow |
16:33:19 | FromGitter | <zacharycarter> I've run into this situation before and needed this functionality - also skipping properties etc |
16:35:32 | vivus | @Yardanico how did you compile ormin? |
16:36:25 | Yardanico | you just import it |
16:36:28 | Yardanico | as a module |
16:37:01 | * | smt joined #nim |
16:42:42 | vivus | @Yardanico are you using ormin for anything? |
16:42:48 | Yardanico | no |
16:44:14 | TjYoco | Can 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:51 | TjYoco | not exactly wrapping the header file I guess, but I hope you understand what I mean |
16:46:12 | vivus | Yardanico: 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:36 | Yardanico | wtf is "/ormin" ? |
16:46:44 | Yardanico | if ormin is in your dir - use "import ormin" |
16:46:47 | * | Snircle quit (Ping timeout: 255 seconds) |
16:47:04 | Yardanico | I mean ormin directory |
16:47:28 | Yardanico | ah |
16:47:44 | Yardanico | vivus, you're right, tools/ormin_importer is not yet automatically recompiled |
16:47:49 | Yardanico | just compile it once |
16:48:04 | Yardanico | this 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:49 | vivus | @Yardanico so I need to compile ormin_importer? |
16:50:26 | dom96 | zacharycarter: nope |
16:50:46 | vivus | nim c tools/ormin_importer.nim ... nim c forumproto.nim forumproto.nim(4, 43) Error: cannot open 'forum_model' |
16:52:25 | FromGitter | <zacharycarter> is there a less verbose way of writing |
16:52:32 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59d6634fe44c43700af9fd49] |
16:53:20 | FromGitter | <zacharycarter> thanks @dom96 |
16:53:34 | FromGitter | <mratsim> part of the proc is missing? Why is there a result hanging alone? |
16:54:03 | * | gokr joined #nim |
16:54:43 | FromGitter | <zacharycarter> sorry I didn't copy the entire proc |
16:54:50 | FromGitter | <zacharycarter> I'm just wondering if there's a shorter way of writing |
16:55:00 | FromGitter | <zacharycarter> JsonNode["fieldName"].getNum.int |
16:59:44 | * | Demos_ quit (Quit: Demos_) |
17:00:02 | * | Demos_ joined #nim |
17:00:51 | dom96 | zacharycarter: that seems about as short as you'll get |
17:01:28 | FromGitter | <zacharycarter> thanks |
17:02:20 | TjYoco | you 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:24 | miran | hi 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:25 | miran | https://forum.nim-lang.org/t/3212 |
17:12:39 | TjYoco | 404 on the link @miran |
17:13:10 | miran | heh, 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:30 | miran | here's the direct link to the repo: |
17:13:31 | miran | https://github.com/narimiran/advent_of_nim_2016 |
17:14:46 | * | Ven`` joined #nim |
17:19:06 | miran | dom96: 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:51 | dom96 | yep, fixed |
17:20:02 | * | Demos_ quit (Quit: Demos_) |
17:20:09 | miran | dom96: thanks! |
17:20:19 | * | Demos_ joined #nim |
17:24:37 | * | Demos joined #nim |
17:24:50 | vivus | Araq: 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:24 | Araq | tools/ormin_importer examples/forum_model.sql |
17:26:44 | Araq | that should produce examples/forum_model.nim |
17:28:14 | vivus | oh I need to run the ormin_importer executable against the .sql file. that makes a lot of sense now |
17:28:15 | Araq | I want to improve Nim's import statement to better support code generators |
17:28:33 | Araq | in the end it should be: |
17:28:50 | * | nsf joined #nim |
17:28:52 | Araq | import !"tools/ormin_importer.nim" / "forum_model.sql" |
17:30:38 | vivus | Araq: so unlike something like SQLAlchemy, in order to use Ormin, you still have to create a schema in a .sql file? |
17:30:42 | dom96 | isn't that just a shortcut for: import tools/ormin_importer; importer_macro("forum_model.sql")? |
17:32:10 | Araq | dom96: hmmmm not really |
17:32:28 | Araq | vivus: for now, yes. |
17:32:54 | vivus | well I got it to compile, so far so good. |
17:32:55 | Araq | usually you already have a database and a model... :P |
17:33:37 | vivus | Araq: 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:17 | Araq | vivus: well it you're unfamiliar with SQL I doubt you'll come very far with ormin |
17:38:19 | Araq | *if |
17:38:55 | vivus | Araq: I am somewhat, but generally, usage of an ORM is meant to eliminate the need to know SQL :P |
17:39:28 | Araq | really? that's news to me |
17:39:40 | Araq | I thought the point is to avoid stringly typed code |
17:39:43 | Araq | :P |
17:40:20 | vivus | I 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:20 | Demos | imo orms are a symptom of most languages not being able to really express the semantics of sql tuples |
17:43:36 | Demos | also how does --clib work |
17:43:41 | * | Jesin quit (Quit: Leaving) |
17:43:56 | Demos | because it adds -l<path-to-proj>/lib to my command line which does not seem right |
17:44:38 | ipjk | I thought ORMs were like, semi-builder patterns that output SQL (or other db-backend) |
17:44:42 | ipjk | Am I wrong? |
17:45:12 | federico3 | ipjk: no, most ORMs do that |
17:46:20 | Demos | it's not well defined |
17:46:59 | Demos | like 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:07 | Demos | and get pretty much the same thing as most ORMs |
17:47:30 | vivus | it'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:03 | Demos | you kinda still need to know sql though |
17:48:27 | Demos | like tbh I always end up knowing what sql I want generated and then poking the orm until it gives me that |
17:48:49 | Demos | if you really want to just store objects use a k/v store or the filesystem |
17:49:35 | federico3 | Demos: 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:49 | vivus | a 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:03 | Demos | but the type of database is always relational |
17:50:18 | * | okapi210 joined #nim |
17:50:32 | Demos | so like, I've just never seen an orm that really uses the database as much more than a kv store |
17:50:59 | Demos | and they almost always throw away the ability to select only the bits you need |
17:51:00 | vivus | federico3 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:02 | Demos | but alasw |
17:51:17 | ipjk | Isn'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:26 | Demos | not really |
17:51:34 | Demos | like if you use string interpolation then sure |
17:51:37 | Demos | but don't do that |
17:51:58 | Demos | (in nim it's easy to write code that looks like string interp but actually uses parameterized queries) |
17:52:12 | vivus | ipjk: it's very easy to screw something up if your raw-SQL is not 100% correct. |
17:52:36 | Demos | well it's very easy to screw stuff up if your generated sql isn't what you expect |
17:52:43 | Demos | usually it' |
17:52:53 | * | Jesin joined #nim |
17:53:06 | ipjk | vivus: that's what I recall |
17:53:55 | vivus | Demos: something like SQLAlchemy is a lot more battle-tested compared to joe-developer writing his own SQL inserts |
17:53:58 | Demos | also: 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:07 | Demos | sqlalchemy is actually awesome |
17:54:23 | Demos | the low level interface is kinda just writing sql in pythonish syntax |
17:54:40 | vivus | Demos: and that is precisely what I was looking for in Nim |
17:54:51 | FromGitter | <d10n> personally I store my user's passwords as lines in a text file (joke) |
17:55:09 | Demos | the 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:15 | vivus | @d10n are you an ex-Yahoo employee? XD |
17:55:44 | FromGitter | <d10n> vivus: no, just aiming for a Verizon acquisition |
17:55:58 | ipjk | vivus: "battle-tested" is a good argument -- and I rather trust that than myself. |
17:56:09 | vivus | @d10n make sure to keep your CentOS 5 servers running unpatched |
17:56:31 | Demos | well sql itself (and the associated interpreters and compilers) are very battle tested |
17:56:52 | Demos | I'd trust just sqlite 1000x more than I would trust sqlalchemy's interfacing with sqlite |
17:57:04 | Demos | although sqlite is particularly battle tested (literally!) |
17:57:16 | vivus | ipjk: 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:56 | Demos | again, sql injections are not prevented with ORMs they are prevented with paramaterized queries |
17:58:10 | vivus | I didn't say they were Demos :) |
17:59:24 | ipjk | But I'd honestly write a server using ORM rather than, for eq. strings with sql. |
17:59:29 | federico3 | vivus: django has been build very much around a relational model - unfortunately |
18:00:11 | ipjk | But, however - I'm just a hobbyist |
18:00:29 | * | PMunch joined #nim |
18:00:56 | ipjk | And that might be a problem, as screwing up, scares me off. |
18:03:15 | vivus | I see Go has an interesting ORM too: http://jinzhu.me/gorm/crud.html#create |
18:06:09 | vivus | I'll just crawl back into the hermit-hole XD |
18:07:19 | * | gangstacat quit (Quit: Ĝis!) |
18:07:43 | Araq | I 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:35 | Demos | anyway, so --cflags? is it supposed to plop a full path into the linker command line? |
18:09:33 | * | TjYoco quit (Quit: Leaving) |
18:09:46 | Demos | sorry --clib |
18:10:30 | Araq | you can use -d:debugOrminSql to see the produced SQL |
18:10:46 | Araq | not that it isn't obvious already how it looks like... |
18:10:58 | Araq | Demos: never used --clib, sorry |
18:12:57 | * | gangstacat joined #nim |
18:13:18 | gokr | Araq: 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:43 | Araq | and claiming that code like |
18:13:46 | Araq | class Post(db.Model): |
18:13:46 | Araq | id = db.Column(db.Integer, primary_key=True) |
18:13:46 | Araq | title = db.Column(db.String(255)) |
18:13:51 | vivus | Araq: 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:02 | Araq | doesn't require knowledge of SQL is far streched |
18:14:19 | * | Demos_ quit (Quit: Demos_) |
18:14:26 | Araq | what's a "primary key"? why is suddendly my Python code typed? |
18:15:11 | Araq | how would I write a foreign key relation? |
18:15:58 | Araq | gokr: quite possible. In fact, I generate the Nim types from the queries |
18:15:59 | * | okapi210 quit (Quit: Page closed) |
18:17:15 | gokr | When 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:30 | Araq | ^ yup. |
18:17:33 | Demos | yeah |
18:17:38 | Demos | that's what I'm saying |
18:17:48 | gokr | Ok, cool. I will take a closer look then ;) |
18:18:00 | Demos | my personal orm does that oo |
18:18:16 | Demos | although I may just start submitting PRs to ormin |
18:18:19 | Demos | :D |
18:19:19 | ipjk | Araq: 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:33 | Araq | ipjk: yeah yeah, whatever man |
18:19:58 | Araq | you're all free to continue the discussion as long as you praise ormin |
18:20:29 | gokr | Avi made ROE in 2004 :) |
18:20:36 | federico3 | ipjk: BTW there's #nim-offtopic for this |
18:21:23 | vivus | federico3: is discussing this necessarily off-topic? it's dealing with nim, SQL and sql-batteries/middleware :) |
18:21:29 | ipjk | federico3: you're right - but this was semi-related. |
18:23:16 | * | libman quit (Quit: Connection closed for inactivity) |
18:26:14 | gokr | Araq: Some info here btw: http://wiki.c2.com/?RelationsAsFirstClassObjects |
18:30:58 | Araq | gokr: oh that's different but also good :-) |
18:31:22 | gokr | Yeah, that would be... sort of one layer on top of ormin |
18:31:27 | gokr | I guess. |
18:31:30 | Araq | ormin right now is 100% static, you cannot muck with the SQL trees at runtime |
18:31:35 | gokr | right |
18:32:03 | Demos | I think being able to muck with the schema at runtime would require dependent types |
18:32:14 | gokr | So perhaps LINQ is a more fitting likeness |
18:32:16 | Demos | so you gotta approximate it with boxed any types |
18:32:23 | Demos | yeah |
18:33:03 | Araq | SQL 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:20 | Araq | or whether that is better done as a separate project |
18:33:36 | gokr | Mmm, yeah, given ormin 100% static... it is probably a separate thing. |
18:34:05 | ipjk | Maybe ormintime? :) |
18:39:05 | dom96 | bah, I keep going into os.html and searching for ospath functions :\ |
18:44:17 | vivus | ormime? |
18:51:13 | Demos | the runtime stuff would require an "any" type right? |
18:53:53 | Araq | Demos: in Ormin I use JSON as the "any" type, it's really handy |
18:54:03 | Araq | and 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:03 | crem | I'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:08 | crem | expected/known? |
19:20:15 | * | Trustable quit (Remote host closed the connection) |
19:20:49 | crem | nimble v0.8.6 compiled at 2017-09-04 20:58:48 |
19:24:35 | crem | Hm, only reproducible with one particular package name. Weird |
19:27:51 | crem | So, 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:56 | FromGitter | <Yardanico> you are not enforced to do it |
19:33:58 | FromGitter | <Yardanico> but it's useful |
19:35:05 | * | gokr quit (Ping timeout: 255 seconds) |
19:39:43 | crem | Thanks. |
19:39:55 | crem | And nimble install installs packges to where? |
19:40:10 | crem | Is it per user, system-wide, per project? |
19:40:31 | FromGitter | <ephja> ~/.nimble |
19:40:57 | * | gokr joined #nim |
19:43:26 | FromGitter | <Yardanico> per user |
19:44:15 | * | ShalokShalom_ is now known as ShalokShalom |
19:44:16 | * | claudiuinberlin joined #nim |
19:56:51 | crem | So, 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:14 | vivus | nimble package-squatting |
20:06:03 | * | mahsav quit (Ping timeout: 258 seconds) |
20:09:22 | * | miran quit (Ping timeout: 264 seconds) |
20:11:03 | FromGitter | <mratsim> Allocating seq is so expensive :/. Did some benchmarks and I spent more time doing allocation than actual math computations |
20:13:12 | Araq | sounds like a functional solution :-) |
20:15:38 | Araq | maybe you should pool the seqs |
20:17:03 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:18:06 | FromGitter | <mratsim> Creating a memory pool? |
20:18:19 | Araq | yeah |
20:19:42 | * | mahsav joined #nim |
20:19:42 | * | mahsav quit (Client Quit) |
20:19:54 | FromGitter | <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:52 | FromGitter | <mratsim> videos would need 5D, and 3D videos would need 6D though I don’t know anyone who does 3D videos ... |
20:21:23 | Calinou | today I learned that there's a semi-standard interface for CLI apps: http://docopt.org/ |
20:21:30 | Calinou | since there's a Nim implementation of it |
20:21:35 | Calinou | that seems pretty clever, I never thought about this before |
20:21:39 | Calinou | seems 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:20 | adam12 | Calinou: Cool - this was perfectly timed as I built a little CLI tool in nim yesterday |
20:34:27 | Calinou | heh :) |
20:34:40 | Calinou | I wanted to write my own CLI library, but this looks pretty good, so I don't need to |
20:34:51 | Calinou | I might write a (simpler) library though, something to simplify the usage of ANSI color codes |
20:35:03 | adam12 | I made mine a bit ghetto but it didn't need much. |
20:35:08 | Calinou | like https://github.com/ogham/rust-ansi-term but for Nim |
20:35:19 | adam12 | Have you seen terminal? |
20:35:23 | adam12 | in stdlib? |
20:35:26 | Calinou | no |
20:35:35 | Calinou | ideally, it should handle Windows as well (for the basic 16 colors) |
20:35:37 | Calinou | and truecolor, too |
20:35:41 | Calinou | (on Linux/macOS/WSL) |
20:36:30 | dom96 | the stdlib module does handle that |
20:37:27 | Calinou | ah, 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:48 | federico3 | Calinou: unfortunately docopt parses a help doc string in order to "reverse" it into argument parsing |
20:54:23 | Calinou | federico3: is it that bad, if the spec is formally defined? that seems convenient to me |
20:54:52 | Calinou | I'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:09 | federico3 | Calinou: 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:49 | adam12 | federico3: do you have an alternative lib? |
21:01:02 | * | claudiuinberlin quit (Client Quit) |
21:01:40 | Calinou | hmm, I don't have the skills to build complex enough CLI tools yet, anyway :P |
21:02:33 | federico3 | Calinou: some comments on docopt at http://pocoo-click.readthedocs.io/en/latest/why/ |
21:02:51 | federico3 | adam12: for Nim or language-independent? |
21:02:56 | adam12 | federico3: nim |
21:05:18 | federico3 | adam12: 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:57 | Demos | I wish docopt was less picky |
21:10:15 | Demos | but I do like that there's an implementation for almost everything |
21:10:52 | Demos | you probably don't want your cli api and your rest api to be the same |
21:11:02 | Demos | because of vastly different perf issues |
21:16:28 | obadz | if I have a char array and I want to extract a small subarray and view each element as uint8 |
21:16:39 | obadz | is the best way to do: |
21:16:45 | obadz | let 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:00 | Araq | obadz: probably |
21:50:59 | FromGitter | <zacharycarter> https://imgur.com/a/ZFeob |
21:51:03 | FromGitter | <zacharycarter> isometric tilemaps yay |
21:55:02 | * | gokr quit (Ping timeout: 260 seconds) |
21:58:29 | * | vlad1777d quit (Ping timeout: 246 seconds) |
21:59:48 | dom96 | oooh, nice. Time to build an Age of Empires clone :D |
22:02:11 | FromGitter | <zacharycarter> hehe |
22:14:39 | * | relax joined #nim |
22:17:35 | * | nhywyll quit (Quit: nhywyll) |
22:18:56 | vivus | does 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:52 | FromGitter | <Varriount> document store? |
23:02:20 | vivus | I 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:32 | vivus | @Varriount like mongo-db |
23:02:43 | FromGitter | <Varriount> @zacharycarter Great. Now make me a clone of Megaman: Battle Network ( https://imgur.com/a/KSqF1 ) |
23:02:47 | FromGitter | <Varriount> :D |
23:03:22 | FromGitter | <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:52 | FromGitter | <zacharycarter> thanks @Varriount |
23:28:28 | adam12 | @zacharycarter that is awesome. |
23:29:37 | FromGitter | <zacharycarter> thanks! |
23:36:11 | FromGitter | <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:17 | FromGitter | <zacharycarter> not sure |
23:38:41 | FromGitter | <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_) |