00:00:48FromGitter<data-man> Is there a way to add a module to imports at compile time? ⏎ Something like: ⏎ ⏎ ```import oswalkdir ⏎ ⏎ for sourceFile in walkDirRec(".", {pcFile}): ⏎ import sourceFile``` [https://gitter.im/nim-lang/Nim?at=5a57fab05a9ebe4f75778df2]
00:02:45Araqdata-man: There is but it's so painful that nobody does it
00:03:33FromGitter<RedBeard0531> It should be easy enough to write an importStr macro (assuming that actually works...)
00:03:34FromGitter<data-man> I want know about this way! :-)
00:06:04AraqRedBeard0531: I would have written an SQL to mongo-query translator if I still worked for that company
00:06:22FromGitter<RedBeard0531> https://play.nim-lang.org/?gist=0178017d98487800e5914ea59db12aa5
00:07:25FromGitter<RedBeard0531> @Araq we already built that https://www.mongodb.com/products/bi-connector
00:08:27FromGitter<RedBeard0531> @data-man that code compiles if you remove the line importStr "NO_SUCH_MODULE"
00:08:32*MJCaley joined #nim
00:09:16Araqgood to know.
00:09:28FromGitter<data-man> @RedBeard0531: Thanks!
00:10:15Araqalso have something like Lucene?
00:10:17FromGitter<data-man> @Araq: What about adding compiler's plugins by this way?
00:10:31Araqwhat about what?
00:10:45Araqoh I see
00:10:57Araqnobody writes compiler plugins so why bother?
00:12:21FromGitter<data-man> It's never too late to start.
00:13:34AraqRedBeard0531 any insights to share about C++ vs Java performance?
00:15:43FromGitter<RedBeard0531> I fucking hate java. Although last time I used it was 10 years ago and I was working on an eclipse plugin that was a GUI for building SELINUX configs, so that may have something to do with it...
00:16:12FromGitter<RedBeard0531> It's pretty hard to beat well written C++ perf
00:17:10FromGitter<RedBeard0531> It's not as powerful as lucene, but we do have https://docs.mongodb.com/manual/core/index-text/
00:20:36FromGitter<RedBeard0531> One of my most fun projects was solving the 30x slowdown when we added unicode support. I managed to get it to the same speed as ascii with a combination of boyer-more + vectorized processing of ascii subsequences: https://github.com/mongodb/mongo/blob/master/src/mongo/db/fts/unicode/string.cpp#L170-L210 (ByteVector is a thin wrapper around vector intrinsics for x64 and PPC64LE)
00:22:00*MJCaley quit (Quit: MJCaley)
00:25:28FromGitter<data-man> ```code paste, see link``` ⏎ ⏎ in.nim(4, 16) Error: 'import' is only allowed at top level [https://gitter.im/nim-lang/Nim?at=5a580078ce68c3bc74a939d0]
00:26:41FromGitter<RedBeard0531> Oh are you trying to do that at runtime?
00:27:06FromGitter<RedBeard0531> I think you need to pull that into a statement-level macro so it happens at compiletime
00:27:59FromGitter<data-man> Yes, at runtime. Thanks.
00:28:41FromGitter<RedBeard0531> That doesn't make sense then. Importing is a compile-time activity...
00:31:47AraqRedBeard031 I meant the claims from Java based DB products that "blow mongo out of the water" etc
00:38:40FromGitter<RedBeard0531> That may be true in very specific cases. But I don't know of any general purpose DBs written in java. And it is a bit hard to compare perf fairly between products with different data models.
00:41:06FromGitter<RedBeard0531> Its also much easier to do a benchmark poorly than correctly. Making useful benchmarks is a Hard Problem.
00:41:27FromGitter<RedBeard0531> But I'm in engineering, not marketing :)
00:48:39*yglukhov joined #nim
00:53:05*yglukhov quit (Ping timeout: 240 seconds)
00:59:05*subsetpark quit (Ping timeout: 255 seconds)
00:59:12*vivus joined #nim
01:16:33*subsetpark joined #nim
01:23:10*gokr quit (Ping timeout: 252 seconds)
02:10:49*sz0 quit (Quit: Connection closed for inactivity)
02:38:40*vivus quit (Quit: Leaving)
02:39:56*endragor joined #nim
03:03:53*chemist69 quit (Ping timeout: 276 seconds)
03:10:00*marenz__ joined #nim
03:13:29*marenz_ quit (Ping timeout: 256 seconds)
03:16:50*chemist69 joined #nim
03:44:11*Elronnd quit (Ping timeout: 276 seconds)
03:48:57*Elronnd joined #nim
03:52:52*yglukhov joined #nim
03:57:41*yglukhov quit (Ping timeout: 256 seconds)
04:13:59*rauss quit (Quit: WeeChat 2.0.1)
04:14:17*arthurz joined #nim
04:15:33*rauss joined #nim
04:16:44*arthurz quit (Client Quit)
04:24:53*vlad1777d quit (Ping timeout: 256 seconds)
04:52:05*marenz__ quit (Ping timeout: 240 seconds)
05:02:51*yglukhov joined #nim
05:07:53*yglukhov quit (Ping timeout: 268 seconds)
05:13:24*darithorn quit (Quit: Leaving)
05:14:20*jxv joined #nim
05:29:47*wurui joined #nim
05:33:55*wurui quit (Read error: Connection reset by peer)
05:42:04*vlad1777d joined #nim
05:48:51*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:52:07*gokr joined #nim
06:02:55*jxv quit (Quit: zzz…)
06:06:19*gokr quit (Ping timeout: 256 seconds)
06:14:36FromGitter<bung87> what 's pythons setattr in nim?
06:14:56*yglukhov joined #nim
06:18:57*yglukhov quit (Ping timeout: 240 seconds)
06:19:55*nsf joined #nim
06:26:10*Demos[m] quit (Ping timeout: 264 seconds)
06:26:10*ehmry quit (Ping timeout: 264 seconds)
06:26:10*Miguelngel[m] quit (Ping timeout: 264 seconds)
06:26:58*Miguelngel[m] joined #nim
06:27:03*Demos[m] joined #nim
06:27:16*ehmry joined #nim
06:38:45*Pisuke joined #nim
06:39:11*MyMind quit (Ping timeout: 256 seconds)
06:58:06*endragor quit (Remote host closed the connection)
07:03:05*Sembei joined #nim
07:04:33*Pisuke quit (Ping timeout: 248 seconds)
07:09:11*arnetheduck joined #nim
07:17:01*MyMind joined #nim
07:18:55*Sembei quit (Ping timeout: 248 seconds)
07:21:43*miran joined #nim
07:22:34*endragor joined #nim
07:54:54*arnetheduck_ joined #nim
07:54:54*arnetheduck quit (Read error: Connection reset by peer)
07:56:46*arnetheduck joined #nim
07:56:46*arnetheduck_ quit (Read error: Connection reset by peer)
07:57:07*arnetheduck quit (Remote host closed the connection)
07:58:57*arnetheduck joined #nim
07:59:40*arnetheduck quit (Remote host closed the connection)
08:01:38*arnetheduck joined #nim
08:04:48*yglukhov joined #nim
08:06:09yglukhovAraq, dom96: pls merge https://github.com/nim-lang/Nim/pull/7067
08:19:09*claudiuinberlin joined #nim
08:40:50*yglukhov quit (Remote host closed the connection)
08:41:25*yglukhov joined #nim
08:45:53*yglukhov quit (Ping timeout: 248 seconds)
08:46:48FromGitter<Varriount> I prefer fmt
08:48:40*zahary joined #nim
08:48:41*yglukhov joined #nim
08:53:31FromGitter<ervinbosenbacher> I have a quick question. Currently we cannot target Swift language right?
08:53:51*dddddd joined #nim
08:59:18dom96no, but we can target objective c
08:59:55FromGitter<ervinbosenbacher> Ok. How mature it is?
09:01:10FromGitter<ervinbosenbacher> Ok.
09:01:54FromGitter<ervinbosenbacher> Thx. I am going to give it go, see I can integrate it with our iOS app development
09:02:06FromGitter<ervinbosenbacher> Any examples around?
09:03:59*gmpreussner quit (Ping timeout: 248 seconds)
09:05:56*gmpreussner joined #nim
09:08:09FromGitter<ervinbosenbacher> nm thx I will give it a go
09:09:10*PMunch joined #nim
09:21:12miranAraq: i agree that `+` is logical for set union (and `*` for intersection), but this is, strictly speaking, not numeric `inc`
09:25:32FromGitter<Araq> yeah I wonder if it's a type and Dom meant ``incl``
09:27:30miransee two points in his post from 3 days ago - seems like it is not typo
09:27:55FromGitter<Araq> well ``inc`` is crazy, no need to discuss it :P
09:29:10dom96I was only suggesting it because of `+=`
09:29:14dom96which to me is the same as `inc`
09:30:04FromGitter<Araq> ok, after the 'fmt' fiasco I won't talk about these things for a couple of days.
09:30:43miranwhat fiasco? it's great fun :D
09:30:54dom96maybe we should have a dedicated bike shed day?
09:30:58dom96or days :P
09:31:19FromGitter<Araq> if I get "work on symbol files" days in return.
09:31:25miranwhat is today's choice? `?`, `f`, `!`, `fmt`?
09:31:36FromGitter<Araq> % and 'fmt'
09:31:45FromGitter<Araq> and I'm not gonna change that anymore
09:31:51FromGitter<Araq> because it's fine.
09:32:00miranah, still the same as few hours ago! boooriiiing! :D
09:33:35FromGitter<Araq> eventually we need a better json module though.
09:33:41dom96note that means we will have both `%` and fmt
09:34:28miranso for us who don't use json, % should be fine. nice
09:35:05*vlad1777d quit (Ping timeout: 240 seconds)
09:36:48*floppydh joined #nim
09:40:18FromGitter<andreaferretti> @dom96 using += for adding elements is readable
09:40:28FromGitter<andreaferretti> using inc for adding elements... ugh
09:40:43FromGitter<andreaferretti> anyway I always use += :-P
09:45:23miranofftopic: https://www.reddit.com/r/programming/comments/7pvkx4/a_brief_introduction_to_nim/
09:46:04miranif this gets some traction, you more experienced in nim, be prepared to answer the questions :)
09:47:26FromGitter<alehander42> what happened, finally, isn't `%` the choice :O
09:49:14FromGitter<alehander42> about compiler plugins, @Araq, I had this a bit fringe idea, it would be very useful to have some hooks in c generation which add a call to a handler on each call or return or even line and you can configure them by args, e.g. ⏎ `nim --instrumentCall --instrumentModule:my.nim c a.nim`
09:49:46FromGitter<alehander42> so you can easily make custom profilers/runtime analysis tools etc and pass them without any compiler modifications
09:49:47*BitPuffin joined #nim
09:50:29Araqthere is .injectStmt iirc
09:52:12miranalehander42: you're the author of py2nim, right? can you please add some examples to the readme?
09:53:01FromGitter<alehander42> yeah, but I didn't find a way to use it for similar goals, you can't really use it to hook exactly on beginning/end of function etc
09:53:49FromGitter<alehander42> here it would add something like `initInstrumentation()`, `finishInstrumentation` which are called in the beginning and the exit of the program and `onTracedCall` which would be all defined in the provided by the user module which would be a very simple and useful api I think
09:54:07FromGitter<alehander42> initProfile*
09:54:27FromGitter<alehander42> @miran @zahary and me are the authors, sorry about that, examples would be good indeed
09:54:55Araqalehander42: just make usage of the new .core feature
09:55:21FromGitter<alehander42> currently there are ~40 simple examples in tests/python/ and tests/nim , I thought about generating a document automatically of them
09:55:25Araqyou import a module that has .core procs (used to be called compiler procs) and the codegen picks it up
09:55:42FromGitter<alehander42> but keep in mind, it's not really ready for use yet
09:55:49AraqI intend to use this for the pluggable GCs
09:56:05FromGitter<alehander42> @Araq, interesting , I'll read its docs now
09:56:21Araqthere are none but zahary knows about the .compilerProc mechanism ;-)
09:56:48FromGitter<alehander42> I'll read the mind of zahary then :D
09:57:03Araq.core is just an alias for .compilerProc as I intend to make it more open
09:57:44Araqproc onReturn() {.core.} = ...
09:57:51Araqproc onEnter() {.core.} = ...
09:58:37FromGitter<alehander42> so how do I tell `.core.` where exactly to add those procs? or onReturn, onEnter are magical names?
09:58:49Araqmagical names the codegen needs to learn
09:59:23Araqthe only tricky bit is to pick the names not too early so that onEnter doesn't call onReturn implicitly
10:00:03FromGitter<alehander42> yeah, I had some custom logic in my patch for not including it in each other and also in some blacklisted modules
10:00:30Araq{.push profiler: off.} ;-)
10:00:40FromGitter<alehander42> ok, but do they receive some context info, e.g. the name of the current function ?
10:01:43Araqyou pass it to onEnter
10:01:55Araqproc onEnter(procname: string) {.core.}
10:02:38FromGitter<alehander42> so, then codegen injects onEnter(procname) in the beginning of each procname proc in the modules I imported it in
10:02:43miran"there are ~40 simple examples in tests/python/ and tests/nim" --> 'nobody' reads those, readme is the usual place to look for some simple examples. and there you can have a link to more examples in some folder
10:03:35Araqalehander42: no, that's not how it works
10:04:00miranthings we want to see (in one place) is: this is python code, and this is it converted to nim
10:04:04Araqit injects this as soon as it knows a .core proc named 'onEnter' exists
10:04:38Araqwhich is problematic, usually we have push/pop pragmas to prevent the logic from getting screwed
10:04:41FromGitter<alehander42> @miran I know, we honestly didn't expect people to see it so soon, I planned on writing a better README and more docs when it's more ready for use, but I'll add some examples today.
10:05:27Araqwhy not use the profiling mechanism btw?
10:06:54*gokr joined #nim
10:10:13FromGitter<alehander42> well I need to collect some more detailed info, profiling is more like a side effect of it
10:10:39Araqthe Nim profiler is based on hooks
10:10:47Araqthe hooks seem to do what you need
10:11:11FromGitter<alehander42> aren't you talking about ` --profiler:on --stackTrace:on`?
10:11:34Araqyou can write your own profiler
10:12:12Araqread its source please and then tell me what's wrong with it
10:12:34Araqit has the required .push/pop features
10:17:54FromGitter<alehander42> how costly is to pass the stack trace on each call, compared to e.g. an int16 value?
10:18:16Araqare you kidding?
10:18:36Araqunusably slow.
10:19:00Araqextract the stack trace in the proc when you need it
10:20:34*yglukhov quit (Remote host closed the connection)
10:20:49FromGitter<alehander42> no, my point is that from what I see this system.hook proc receives a proc hook(st: StackTrace)
10:21:10FromGitter<alehander42> I have to test it locally
10:21:25*yglukhov joined #nim
10:22:02Araqwell I don't remember the details but this is only called occasionally
10:22:20Araqok, I see, probably not what you need
10:23:55*zahary quit (Quit: Leaving.)
10:25:59FromGitter<alehander42> the point is that even big programs should be able to run with this instrumentation in a reasonable time, it's a bit hard to explain, but soon I'll be able to tell more :D
10:26:31*yglukhov quit (Ping timeout: 276 seconds)
10:35:53FromGitter<Araq> yeah well, then do what the stack traced based profiler does and don't track every freaking proc call invokation
10:37:57FromGitter<alehander42> well, for my goals, if I track a function, I have to track *each* invocation of it
10:38:36FromGitter<alehander42> but with a reasonable blacklist of not so important for me *usually* builtin procs (which can be whitelisted back if needed)
10:38:55FromGitter<alehander42> I can still run the nim compiler reasonably quickly with my patch
10:39:12FromGitter<alehander42> (I spent a day once using my instrumented version by mistake)
10:41:49*zahary joined #nim
10:45:10FromGitter<Araq> interesting, how do you store the results?
10:45:30FromGitter<Araq> I instrumented every memory write/read once with sqlite, it was unusable
10:46:21FromGitter<alehander42> well I just collect them into arrays and dump them in the end in my own binary format
10:47:54FromGitter<alehander42> memory reads must be lot more than call invocations I guess :D
10:47:57*rokups joined #nim
10:53:28gokrAraq: I get from time to time "*** buffer overflow detected ***"
10:53:49gokrIn my log, I presume that's output from my Nim program, right?
10:54:08gokrAnd I guess it might be interesting to investigate?
10:55:56livcdmiran: oh is that your screencast ?
10:56:17FromGitter<Araq> interesting yes, but I doubt that error message comes from Nim directly
11:00:17gokrAraq: I am using Jester and HttpClient basically.
11:01:16FromGitter<Araq> yeah, but that sound more like the underlying C library
11:01:34*jackv quit (Quit: WeeChat 1.9)
11:02:41FromGitter<Araq> https://github.com/ninja-build/ninja/issues/1252
11:02:58gokrAraq: Aha, interesting.
11:03:42FromGitter<Araq> could still be caused by your Nim program, of course
11:04:12gokryeah, it runs as a service under systemd - this is shown in journalctl, and it then restarts.
11:05:52gokrOk, yes, it's libc spitting out that.
11:06:11gokrPerhaps I would need to run a debug build to get a trace (hopefully)
11:07:09FromGitter<Araq> --debugInfo is enough, you can stick to the release build
11:07:21FromGitter<Araq> or maybe --debugger:native -d:release
11:07:47*Vladar joined #nim
11:16:33*yglukhov joined #nim
11:18:35*yglukhov quit (Read error: Connection reset by peer)
11:20:03*yglukhov joined #nim
11:29:55*Yardanico joined #nim
11:29:57*PMunch quit (Quit: Leaving)
11:33:57*MJCaley joined #nim
11:43:43*MJCaley quit (Quit: MJCaley)
11:47:40*gangstacat quit (Quit: Ĝis!)
11:50:59*gangstacat joined #nim
11:52:28*zahary quit (Quit: Leaving.)
11:53:45*yglukhov quit ()
11:55:37*zahary joined #nim
12:04:20*yglukhov joined #nim
12:25:52dom96andreaferretti: IMO += shouldn't be used for adding elements, ever.
12:27:24dom96miran: are you the author of that video?
12:29:33Yardanicomiran, how old are you? :)
12:30:38*dddddd quit (Read error: Connection reset by peer)
12:31:49*PMunch joined #nim
12:33:29*vivus joined #nim
12:44:31*zahary quit (Quit: Leaving.)
12:45:18*zahary joined #nim
12:47:27*dddddd joined #nim
12:50:33miranthat's not me
12:50:37mirani'm 31 btw
12:51:58miranhow old you were thinking i was? :)
12:52:13*PMunch quit (Quit: Leaving)
12:52:13dom96is the author of that video here?
12:52:22dom96Just want to tell them: Nice job :)
12:53:20miranlivcd: i'm too camera-shy to have any kind of screencast, let alone about nim where i just started using it couple of months ago
12:57:46*zahary quit (Quit: Leaving.)
13:02:21*Snircle joined #nim
13:03:50livcdmiran: i just thought it was you :)
13:04:12mirani just added a disclaimer on reddit :)
13:06:15*zahary joined #nim
13:18:41*yglukhov quit (Remote host closed the connection)
13:19:15*yglukhov joined #nim
13:21:46*azur_kind joined #nim
13:23:40*yglukhov quit (Ping timeout: 260 seconds)
13:26:19vivusmiran: if the content is solid, programmers won't care for your appearance, which is why you can screencast without showing yourself also
13:27:46dom96yep, I do livestreams without showing myself :)
13:27:57miranvivus: i'm thinking about maybe *writing* some articles about nim for complete beginners (this was a request on reddit recently), but that is as far as i'm willing to do
13:28:17vivusI wrote a nim article on my blog last year.
13:28:17dom96miran: do it!
13:30:06*endragor quit (Read error: Connection reset by peer)
13:30:08mirandom96: i will, once i find out how a day can have at least 30 hours
13:30:10*yglukhov joined #nim
13:30:57*endragor joined #nim
13:31:08miranno seriously, i might find some time to do it relatively soon. but i won't promise anything
13:32:14mirani know that github offers personal pages, but i never tried to make one. hopefully this isn't too complicated (for a person who has never done anything web-based)
13:33:27*yglukhov quit (Remote host closed the connection)
13:34:00*yglukhov joined #nim
13:34:29*zahary quit (Quit: Leaving.)
13:35:08*zahary joined #nim
13:38:45*yglukhov quit (Ping timeout: 264 seconds)
13:41:24*floppydh quit (Quit: WeeChat 2.0.1)
13:45:37*gokr quit (Ping timeout: 248 seconds)
13:47:31*rokups quit (Quit: Connection closed for inactivity)
13:53:23*yglukhov joined #nim
13:58:02*yglukhov quit (Remote host closed the connection)
13:58:03*Jesin quit (Quit: Leaving)
13:59:37*yglukhov_ joined #nim
14:14:18*yglukhov_ quit (Remote host closed the connection)
14:22:39FromGitter<RedBeard0531> @alehander42 depending on what you are trying to do, you may want to look into gcc's -finstrument-functions flag
14:41:41*yglukhov joined #nim
14:42:55*yglukhov quit (Remote host closed the connection)
14:45:38*gokr joined #nim
14:49:37*deech quit (Ping timeout: 248 seconds)
15:00:12*marenz__ joined #nim
15:00:21*yglukhov joined #nim
15:02:11*dom96 wonders what the typical t-shirt size distribution is at a conference like FOSDEM
15:04:25FromGitter<RedBeard0531> bimodal? inverse bell curve?
15:04:55abeaumontdom96: not too different from any other (generalist) tech conf I'd say, maybe someone has published some stats by chance
15:05:39abeaumontI can thing it's a quite common question, since there tends to be lots of tshirts in conferences =)
15:05:55dom96hmmm https://www.geeksaresexy.net/2013/10/16/t-shirt-size-distribution-at-a-linux-conference-1999-vs-2008/
15:06:23Yardanicosooo I guess L?
15:06:48dom96This has some better answers I guess https://www.quora.com/What-is-a-good-split-of-S-M-L-XL-quantities-when-ordering-t-shirts
15:07:53dom96Advice seems to be 1-2-2-1 (s-m-l-xl), that makes sense
15:08:18FromGitter<RedBeard0531> If it would be helpful I can find out the distribution for mongo conferences
15:08:36abeaumontapparently none include women in their research, or they don't bother to do women tshirts at all
15:08:49*jxv joined #nim
15:08:50dom96RedBeard0531: certainly wouldn't hurt, although I would like to buy these t-shirts within the next hour or so
15:09:00FromGitter<RedBeard0531> Actually now I'm curious how the distribution differs around the world
15:09:02abeaumontwhich are usually only a fraction of them and probably 1 size less
15:09:25dom96abeaumont: According to my SO female t-shirts ala https://uktshirtprinting.com/product/custom-product-5a567443181b91-26950756 suck
15:12:01abeaumontunsurprising I'd say, yet having a few would be nice
15:12:14*Serenitor joined #nim
15:12:31abeaumontI'm still tempted to buy one, maybe I should do +)
15:12:48dom96I also have to decide which ratio of colours to get
15:16:12dom96Any opinions?
15:16:30dom96Different colours listed here: https://irclogs.nim-lang.org/11-01-2018.html#22:40:12
15:18:05mirandenim blue + gray (first two options)
15:19:05dom96heh, I like those the most as well, but so far all the requests I got were for navy blue and black
15:22:14abeaumontput one of those blacks into gray, I thought there were only black...
15:22:29abeaumontbut I've bought a gray otherwise
15:22:43abeaumont*I'd have
15:23:32dom96hrm, what do you mean? They all look black to you? :)
15:27:22abeaumontI bought it from teespring, only saw black, should I'd known there were different colors, I'd had chosen gray
15:27:37dom96oh. Yeah, the teespring ones were only black
15:30:46*arnetheduck quit (Remote host closed the connection)
15:43:50FromGitter<ervinbosenbacher> quick question
15:44:19FromGitter<ervinbosenbacher> i guess i should be easy to build something in nim, shared lib and load it back to C
15:44:56FromGitter<ervinbosenbacher> but how about linking back the generated C code
15:54:28miranbtw, irclogs is looking poorly on mobile
15:56:40*miran quit (Quit: Page closed)
15:57:09Araqlinking back?
15:57:29FromGitter<ervinbosenbacher> Sorry :)
15:57:40FromGitter<ervinbosenbacher> output is C then link that
15:57:51FromGitter<ervinbosenbacher> as a static lib
15:58:25dom96miran: PRs welcome ;)
15:58:36dom96Maybe I should put that on our t-shirt :P
15:59:40FromGitter<nitely> more unicode love https://github.com/nitely/nim-unicodeplus
15:59:49*Jesin joined #nim
16:00:35FromGitter<ervinbosenbacher> okay never mind, although successfully managed to port some of our code to Nim then use it as a dybamic lib in python
16:01:19dom96nitely: nice, regex coming soon? :)
16:01:42FromGitter<nitely> in a bit :)
16:06:14*natrys joined #nim
16:07:11dom96hah, I found this: https://dashboard.fosdem.org/dashboard/db/swag
16:16:50FromGitter<RedBeard0531> @dom96 apparently tshirt sizes skew larger in US than the rest of the world (unsurprisingly :( ). I'm waiting for the guy to get back to me with the actual %s we use in europe.
16:17:11dom96Yeah, makes sense :\
16:17:29dom96I think that dashboard I found is what I will base this on
16:17:39dom96Since it shows exactly how much was actually sold
16:18:33FromGitter<RedBeard0531> makes sense
16:18:52dom96thanks for asking though
16:18:58dom96I'll still be interested in the answer :)
16:19:25FromGitter<RedBeard0531> np, just a few messages on slack
16:20:09*zahary quit (Quit: Leaving.)
16:27:57*gokr quit (Ping timeout: 256 seconds)
16:28:30*zahary joined #nim
16:36:51FromGitter<cabhishek> @alehander42 what do think of creating a python to nim translator side - by -side like this http://coffeescript.org/#try ?
16:37:26*acidx quit (*.net *.split)
16:37:26*odc quit (*.net *.split)
16:37:26*pydsigner quit (*.net *.split)
16:37:27*Shoozza quit (*.net *.split)
16:37:36*pydsigner joined #nim
16:37:54FromGitter<cabhishek> ^ might help people coming from python learn nim
16:38:09*odc joined #nim
16:38:12*acidx joined #nim
16:43:43*Jesin quit (Quit: Leaving)
16:45:04Yardanicoit will be possible in the future of course
16:45:08Yardanicobut you need a server for that
16:45:15Yardanicoand decent performance
16:45:45*dddddd quit (Ping timeout: 246 seconds)
16:45:52Yardanicosince nim has much more differences with python than coffeescript with js :)
16:46:03dom96A c2nim version might be doable today
16:46:28dom96although I guess c2nim only handles function/struct defintions
16:46:34*endragor quit (Remote host closed the connection)
16:46:48FromGitter<andreaferretti> turns out it doens't
16:46:56FromGitter<andreaferretti> it handles their body as well!
16:46:58FromGitter<andreaferretti> :-)
16:47:08FromGitter<andreaferretti> Although this was a surpries to me
16:47:35Yardanicodom96, it does handle bodies as well
16:47:41Yardanicobut it doesn't translate any C idioms
16:48:18Yardanicoand py2nim for example can translate python's if isistance(object, other): a elif isistance(object, b): b to actual different procedures
16:48:36Yardanicowell it wouldn't work out of the box most of the time, but it will be not hard to correct it by hand
16:48:53*endragor_ joined #nim
16:50:22Yardanicoalso py2nim can translate python dict/list comprehensions
16:51:03*endrago__ joined #nim
16:52:38dom96I think creating a document showing prepared Nim/Python side-by-side examples would be good nonetheless
16:53:27*endragor_ quit (Ping timeout: 240 seconds)
16:53:53dom96If one of you is up for that I'll happily include that on nim-lang.org
16:55:03FromGitter<cabhishek> @ Yardanico yeah, not necessarily a "one to one" translation but more like this is how its done in Nim
16:55:19*azur_kind quit (Remote host closed the connection)
16:55:31*endrago__ quit (Ping timeout: 240 seconds)
16:55:32FromGitter<cabhishek> @ dom96 I'll take a stab at it
16:56:43dom96cabhishek: great, as far as I can see there are two approaches: creating a page similar to the current features page or writing an article. Up to you how you do it
16:58:07FromGitter<cabhishek> @dom96 I was thinking of first creating a simple UI like coffeescript backed by a server to do the actual translation
16:58:23dom96oh, you're talking about the actual translation thing
16:58:26*Trustable joined #nim
16:58:33dom96well, that's a different thing entirely
16:59:40FromGitter<cabhishek> @dom96 you send python code -> backend service returns Nim code and the UI renders it.
17:00:00FromGitter<cabhishek> Interactive playground
17:00:13dom96yeah, I was talking about the static document
17:01:05*zahary quit (Quit: Leaving.)
17:01:48FromGitter<cabhishek> what will the static document contain?
17:02:10FromGitter<cabhishek> similar to a blog post on how to use py2nim?
17:02:12dom96like I said above, prepared Nim/Python side-by-side examples highlighting interesting differences
17:03:02Yardanicocabhishek: It'll require a decent server :)
17:03:18Yardanicobecause py2nim needs to be actually ABLE to run this python script to translate it
17:03:31Yardanicoso it will need all modules used by this script
17:03:53*darithorn joined #nim
17:05:06dom96cabhishek: but if you do create what you have in mind I might be able to offer a subdomain like py2.nim-lang.org or something :)
17:07:04*jxv quit (Quit: zzz…)
17:07:18*nsf quit (Quit: WeeChat 2.0.1)
17:08:04dom96Yardanico: think you could set up the twitch relay on the Nim VPS?
17:08:17dom96Thinking about doing a livestream tomorrow
17:13:41*vivus quit (Quit: Leaving)
17:17:37FromGitter<cabhishek> @dom96 thanks, I'll play around with the idea and build something simple as a prototype first
17:19:07*endragor joined #nim
17:23:43*endragor quit (Ping timeout: 248 seconds)
17:23:52*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:25:12Yardanicodom96, yep
17:26:17*yglukhov quit (Remote host closed the connection)
17:26:44*Serenitor quit (Quit: Leaving)
17:29:38FromGitter<RedBeard0531> Could you do something crazy like compile py2nim to js and use an emscripten build of python, to push all the work to the client and avoid having a server?
17:29:39*yglukhov_ joined #nim
17:29:50Yardanicopy2nim depends on a python project - python-deduckt
17:30:11Yardanicoit installs some special hooks to catch all runtime stuff happening in the interpreter
17:30:31Yardanicowell techically you can also compile python to JS
17:30:32FromGitter<RedBeard0531> http://pypyjs.org/
17:30:35YardanicoI know
17:30:39Yardanicopypy js is not updated btw
17:30:43Yardanicoit's abandoned :(
17:33:27FromGitter<RedBeard0531> https://github.com/RunestoneInteractive/skulpt looks promising
17:33:56Yardanicobut I doubt they support advanced things that python deduckt uses
17:34:14Yardanicosee for yourself: https://github.com/metacraft-labs/python-deduckt/blob/master/deduckt/tracing.py
17:34:33*yglukhov_ quit (Ping timeout: 264 seconds)
17:40:47*NimBot joined #nim
18:00:07*claudiuinberlin joined #nim
18:05:59*Ven`` joined #nim
18:06:46*Trustable quit (Remote host closed the connection)
18:13:03*yglukhov joined #nim
18:17:45*yglukhov quit (Ping timeout: 264 seconds)
18:19:10*Yardanico quit (Remote host closed the connection)
18:26:31*Yardanico joined #nim
18:28:56*Ven`` quit (Ping timeout: 268 seconds)
18:31:40*miran joined #nim
18:34:28*Demos[m] quit (*.net *.split)
18:34:29*hohlerde quit (*.net *.split)
18:34:30*wishi_ quit (*.net *.split)
18:34:32*askatasuna quit (*.net *.split)
18:34:44*hohlerde joined #nim
18:34:45*Demos[m] joined #nim
18:35:22*askatasuna joined #nim
18:35:44*wishi joined #nim
18:35:49*nsf joined #nim
18:48:12*devdri joined #nim
18:49:20*Shoozza joined #nim
18:59:14*dddddd joined #nim
19:21:15*yglukhov joined #nim
19:21:56*Yardanico quit (Remote host closed the connection)
19:22:15*Yardanico joined #nim
19:59:14*yglukhov quit (Read error: Connection reset by peer)
20:00:00*yglukhov joined #nim
20:02:15*vlad1777d joined #nim
20:08:09*gokr joined #nim
20:10:18*yglukhov quit (Remote host closed the connection)
20:10:59*jxv joined #nim
20:27:33FromGitter<nitely> @dom96 https://github.com/nitely/nim-regex
20:27:59dom96yay, awesome
20:28:20dom96omg, somebody needs to fix highlighting on GitHub
20:28:45FromGitter<nitely> haha the red
20:30:45dom96The code is beautiful
20:30:48*Yardanico quit (Remote host closed the connection)
20:30:57*dom96 cloned it and opened it in VS Code
20:33:04dom96Nice job :)
20:33:08*wastedone_ joined #nim
20:33:13FromGitter<nitely> thanks :)
20:49:19*yglukhov joined #nim
21:13:22dom96T-shirts ordered :D
21:15:43FromGitter<data-man> @nitely: Nice! Some benchmarks? :-)
21:21:23*kivyion joined #nim
21:23:43FromGitter<nitely> Not yet. I'm sure it's faster than pcre for patological cases (the exponential ones) though :p
21:24:05*sz0_ joined #nim
21:25:10*sz0_ quit (Client Quit)
21:25:41*sz0 joined #nim
21:31:26*nsf quit (Quit: WeeChat 2.0.1)
21:38:13Araqnitely: do you use the non-backtracking variant?
21:40:11mirandom96: maybe you can answer this: https://www.reddit.com/r/programming/comments/7pwwxb/c_will_live_for_another_45_years_and_heres_why/dsl61n0/ ?
21:50:43dom96Araq should answer that :)
21:51:02mirani thought he doesn't have a reddit account
21:51:24miranbtw, nice to see i'm not the only one in that thread mentioning nim
21:56:18*Vladar quit (Quit: Leaving)
21:56:45*BitPuffin quit (Remote host closed the connection)
21:57:56*jxv quit (Quit: zzz…)
21:59:27*miran quit (Ping timeout: 256 seconds)
21:59:29*jxv joined #nim
21:59:58FromGitter<nitely> @Araq: yes!
22:05:05FromGitter<zetashift> There's alot about GC's in that thread
22:07:13FromGitter<zetashift> and with that I mean seems some people really really don't want a GC
22:09:06Araqincluding me... :-/
22:13:49FromGitter<zetashift> You should try rust then Araq hehe....please don't ban me for this joke
22:14:44Araqcome on, I hardly ban anybody here
22:16:06livcdare there some companies that are in touch with you Araq that are interested in getting rid of gc ? :D
22:16:29Araqactually no.
22:17:06Araqbut I see way to often "program crashes under extremely hard to reproduce conditions when it's full moon"
22:17:28FromGitter<zetashift> Last ban on this gitter was in march so that's indeed great.
22:18:08FromGitter<zetashift> I hope the transistion to a gc-less Nim runtime(does Nim have one?)/stdlib goes better than in D
22:18:24shashlickso what is the state of the stdlib when gc is off? I keep seeing that statement in comments
22:18:27shashlickhaven't ever tried it though
22:18:45Araqit's fine, your programs leak then :-)
22:19:05Araq--gc:none makes Nim produce warnings when you use the GC
22:20:01FromGitter<data-man> I never used the nimsuggest. All a lexical/semantical information is keep in memory?
22:20:55shashlickaraq: okay ya, it is my responsibility to make sure my code doesn't leak, but can I trust that all libs that I use (at least stdlib) don't leak because they are written with that discipline?
22:21:44Araqshashlick: I think you're misunderstanding me
22:25:57Araqdata-man: quite, yes.
22:26:33Araqzetashift: well the plan is to make the GC precise wrt stack roots and work well with the destructors
22:27:54FromGitter<data-man> @Araq: Why not keep a data about modules in DB (sqlite or key-value DBs)?
22:28:13shashlickWarning: '&(a, " world")' uses GC'ed memory [GcMem]
22:28:39shashlickI just did var a = "hello"; a = a & " world" with --gc:none
22:29:12shashlickso basically I cannot use the stdlib functions with the confidence that it will handle w/gc or w/o gc the same way
22:42:36*natrys quit (Quit: natrys)
22:46:22*yglukhov quit (Remote host closed the connection)
22:52:03GitDisc<treeform> I think some GC or RC is ok. Its when everything is GC and you can't get out of it and its hard to control etc... Like Java GC is really bad for some reason, maybe too many classes/too many abstractions? But python GC/RC is seems ok if it was not for the GIL issues. My best experiences is with the JavaScript GC, probably because you have quality tools to debug it and you are not trying to manage gigabyte heaps. Do you consider reference countin
22:52:03GitDisc<treeform> a garbage collection method? There seems to be tons of emotion around GC or not GC. I just want it to work™. Most of the time GC just works even in Java.
22:53:31GitDisc<treeform> I just want GC out of critical sections, but you can do that with most languages by pre allocation and not allocating anything there. Maybe a way to mark these sections. There is usually just N hot paths in a program.
22:54:57*gokr quit (Ping timeout: 240 seconds)
22:55:24*yglukhov joined #nim
22:58:02GitDisc<treeform> Just having vectors and short lived objects and stuff allocated on the stack and packed contagious arrays are enough for me. Just saying... I just want stuff to work and I don't want to think much about it.
23:01:26shashlickI guess what I'm saying is that I don't expect to ever use --gc:none since I am happy with nim performance for my projects
23:01:44shashlicki also understand and can benefit from turning off the GC for specific sections
23:02:25shashlickI just don't understand the benefit of --gc:none if the stdlib is written with the assumption that gc = on
23:02:52shashlickbut that's from someone who doesn't expect to use --gc:none so perhaps I don't get it :)
23:06:31GitDisc<treeform> Yeah I guess I don't get `--gc:none` too then.
23:07:08shashlickeven the documentation doesn't mention it - https://nim-lang.org/docs/gc.html
23:07:39GitDisc<treeform> I guess only useful for OS writing or some thing?
23:07:48shashlickthere too, it's talking about option 2 where you can get control over when gc runs and for how long if you need that
23:09:41*darithorn quit (Remote host closed the connection)
23:10:00*darithorn joined #nim
23:14:04shashlickya, if there was some doc that described what --gc:none is and when/how to use it, it might clear these types of questions
23:18:21*dddddd quit (Remote host closed the connection)
23:22:02shashlickthis thread provides some early guidance: https://forum.nim-lang.org/t/2489
23:23:38shashlickso basically, if you want to use --gc:none, you can only use a subset of Nim to do what you want. if you end up using a GC dependent stdlib call or other library, you have to rewrite that code with manual memory management
23:23:52shashlickor use the --gc:regions method and separate the manual memory management from portions that require GC as described in the thread
23:24:03shashlickhope @araq can clarify if this is the right way to do things
23:26:56*wastedone_ quit (Quit: wastedone_)
23:28:14*vivus joined #nim
23:33:13*arnetheduck joined #nim
23:38:53*devdri quit ()
23:42:24FromGitter<RedBeard0531> --gc:none is also potentially useful for short-lived but frequently run programs when letting the OS collect your garbage is an acceptable solution.
23:43:11FromGitter<RedBeard0531> Also there are definitely people who will disagree with the statement that you need to disable the GC in order to write an OS.
23:47:32*endragor joined #nim
23:51:51*endragor quit (Ping timeout: 256 seconds)
23:55:02*jxv quit (Ping timeout: 276 seconds)