<< 17-12-2017 >>

00:06:34*yglukhov joined #nim
00:11:04*yglukhov quit (Ping timeout: 265 seconds)
00:14:25FromGitter<Varriount> radagas: Well, the reference itself will be in the stack
00:15:38*qih_ joined #nim
00:18:12FromGitter<Varriount> `ref object ` types will always be allocated on the heap. `object types may be located on the stack or the heap, depending on if the are used by themselves, or embedded in another type.
00:20:26*SenasOzys_ joined #nim
00:21:33*SenasOzys quit (Ping timeout: 256 seconds)
00:31:45*qih_ is now known as qih
00:38:38*Jesin joined #nim
00:39:14*arecaceae quit (Remote host closed the connection)
00:39:33*arecaceae joined #nim
00:41:23*SenasOzys_ quit (Ping timeout: 256 seconds)
00:51:53*SenasOzys_ joined #nim
01:00:50FromGitter<SitiSchu> Is there something like type() from python in nim ? or any other way to find out the type of something ?
01:01:07FromGitter<Quelklef> ...what for?
01:01:21FromGitter<Quelklef> The things you use that for in Python are typically solved other ways in Nim
01:05:13FromGitter<SitiSchu> I'd just like a way to find out the type of things ^^ for example what this thing is: {'key': 'value'}
01:06:26FromGitter<Quelklef> For what, though? Debugging?
01:06:37FromGitter<Quelklef> also that's a list of 2-tuples iirc
01:07:03FromGitter<SitiSchu> Annotating the type and looking up the docs for it
01:07:12FromGitter<Quelklef> `[('key', 'value')]`
01:07:47FromGitter<Quelklef> https://stackoverflow.com/questions/28352559/how-to-get-the-type-of-a-value-as-string
01:07:56FromGitter<Quelklef> should suit your needs, I think
01:12:54FromGitter<SitiSchu> Thanks :)
01:38:57*skrylar joined #nim
01:39:06skrylarinsert into nim values ('skrylar');
01:40:33FromGitter<Quelklef> delete from nim where name='skrylar'
01:40:52FromGitter<Quelklef> ¯\\_(ツ)_/¯
01:41:37FromGitter<SitiSchu> you forgot to specify the columns skrylar :P
01:41:51FromGitter<SitiSchu> ugh I need to turn of that auto emoji thingy
01:41:56skrylarat least mine was valid sql
01:42:01FromGitter<Quelklef> hey mine was too
01:42:32FromGitter<SitiSchu> shouldnt it be `insert into nim (column) values ('skrylar');` ?
01:42:39FromGitter<Quelklef> No, you can omit column names
01:42:43FromGitter<SitiSchu> ah
01:42:54FromGitter<Quelklef> and it'll just do the first column then second etc. i tihnk
01:43:01FromGitter<SitiSchu> yep
01:43:11FromGitter<SitiSchu> can be ommited if you provide values for all columns
01:43:29FromGitter<Quelklef> o
01:43:36FromGitter<Quelklef> been a while since I've done anything with sql
01:43:39FromGitter<Quelklef> ... thank the lord
01:44:31skrylaryou can also eleave out optional columns which go to their defaults
01:44:39skrylarand in the case of firebird, triggers are probably involved :|
02:06:58FromGitter<RedBeard0531> If anyone is doing AOC and would be interested in seeing a nim program optimized to the point where a brute-force solution to today's puzzle is possible (<7hours): https://www.reddit.com/r/adventofcode/comments/7k572l/2017_day_16_solutions/drcxlcu/
02:23:51*heinrich5991 quit (Quit: quit.)
02:28:47*marenz__ quit (Ping timeout: 248 seconds)
02:29:08*chemist69 quit (Ping timeout: 240 seconds)
02:30:34skrylarsupercompilers? :)
02:30:39skrylarwell, superoptimizers
02:32:21skrylarbleh. jenkins seems to have buried the docs on everything that isn't their latest pipeline setup, even though groovy pipeliens are the default
02:32:38FromGitter<zacharycarter> I can't stand jenkins
02:41:41skrylari like the old parts they don't want you to use. they are straightforward and simple
02:41:52skrylarthis new pipeline thing is ostensibly cool but it's not straightforward and simple
02:42:31*heinrich5991 joined #nim
02:42:59*chemist69 joined #nim
02:53:04*SenasOzys__ joined #nim
02:53:15*SenasOzys_ quit (Read error: Connection reset by peer)
02:57:24*MJCaley joined #nim
03:07:20*MJCaley quit (Quit: MJCaley)
03:15:58skrylarthe terrifying thing is that i think its now theoretically possible to animate 3d models with a pencil
03:16:10skrylarthere's a paper on recognizing stick figure drawings in to bone rigs
03:17:32FromGitter<ephja> neat
04:08:40*exit70 left #nim (#nim)
04:12:13*vlad1777d quit (Ping timeout: 255 seconds)
04:54:18*SenasOzys_ joined #nim
04:54:43*SenasOzys__ quit (Read error: Connection reset by peer)
04:55:17*endragor joined #nim
04:58:46*endragor quit (Remote host closed the connection)
05:11:13*SenasOzys_ quit (Ping timeout: 265 seconds)
05:22:17*SenasOzys_ joined #nim
05:24:23*endragor joined #nim
05:29:15*endragor quit (Ping timeout: 256 seconds)
05:45:44*dddddd quit (Remote host closed the connection)
06:08:44*endragor joined #nim
06:13:19*endragor quit (Ping timeout: 248 seconds)
06:30:20*wrigh720 joined #nim
06:30:21*wrigh720 quit (Remote host closed the connection)
06:34:59*methodtic692 joined #nim
06:35:00*methodtic692 quit (Remote host closed the connection)
06:53:07*endragor joined #nim
07:05:35*solitudesf joined #nim
07:10:09*Vladar joined #nim
07:12:57*solitudesf quit (Ping timeout: 264 seconds)
07:33:21*gokr quit (Ping timeout: 264 seconds)
08:03:08skrylaris the preferred way of dealing with openmp in nim to just use a bunch of emit's
08:04:06*qih quit (Quit: qih)
08:09:47*yglukhov joined #nim
08:10:55*yglukhov quit (Remote host closed the connection)
08:11:24*Vladar quit (Remote host closed the connection)
08:15:06*lastjedi joined #nim
08:15:23*couven92 joined #nim
08:16:42*solitudesf joined #nim
08:17:36*lastjedi quit (Remote host closed the connection)
08:24:18*nsf quit (Quit: WeeChat 1.9.1)
08:37:58*yglukhov joined #nim
08:42:47*yglukhov quit (Remote host closed the connection)
08:46:53FromGitter<mratsim> No: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/backend/openmp.nim
08:47:39FromGitter<mratsim> Only needed emit for atomics: https://github.com/mratsim/Arraymancer/blob/master/src/nn_primitives/nnp_softmax_cross_entropy.nim#L106-L107
08:47:45skrylarmratsim: that seems a rather incomplete openmp compared to http://www.openmp.org/wp-content/uploads/omp-hands-on-SC08.pdf
08:49:57FromGitter<mratsim> Works for me ™
08:50:09skrylarmaybe. supposedly i should learn that
08:51:20FromGitter<mratsim> With this I can implement parallel map and reduce.
08:51:47*yglukhov joined #nim
08:51:50skrylarnice
08:52:18arecaceaeskrylar: straightforward and simple only to a shallow degree, you'll quickly hit something that makes you want to have pipelines it seems
08:52:18*claudiuinberlin joined #nim
08:52:31arecaceaeskrylar: currently wrestling with jenkins myself tho
08:52:54skrylarit really depends what you're doing, arecaceae
08:53:03arecaceaeskrylar: I'd love them to not use yet another obscure PL (groovy) nobody uses outside of it
08:53:16skrylargroovy is used in a lot of java projects
08:53:22arecaceaethen I guess I'm just not a Java guy
08:53:25skrylarit's just unused outside of java guys
08:53:39arecaceaeahh isn't gradle using it as well? you're right
08:54:03skrylarnow the grating part is that they use groovy by default, but are trying to hard sell blue ocean to the point they've hidden the groovy docs
08:54:14skrylarso you read these docs that don't work on the "recommended install"
08:54:19FromGitter<mratsim> parallel map, map2, map3: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/higher_order_applymap.nim ⏎ parallel fold, fold over axis, reduce, reduce over axis: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/higher_order_foldreduce.nim ⏎ ⏎ That’s Arraymancer secret sauce and I don’t think you can reproduce it cleanly in any other language. [htt
08:54:19FromGitter... ps://gitter.im/nim-lang/Nim?at=5a3630ba232e79134d5cb6ae]
08:54:43*yglukhov quit (Remote host closed the connection)
08:55:55skrylaryea. i also read people discussing openmp and opencl
08:56:09skrylarthe short consensus is that opencl will also handle vector intrinsics for you supposedly
08:58:33skrylararecaceae, whats your usecase with jenkins?
08:59:10arecaceaeskrylar: companies choice - but I can't find a valid alternative to propose either
08:59:27skrylarthat's not a use case though :<
09:00:02arecaceaeskrylar: well, what specifically do you mean with use-case
09:00:32skrylarin my case i didn't need pipelines because i'm just cross testing packages against stable and devel
09:00:37arecaceaeskrylar: got a bunch of projects that need building in mostly archaic ways, integration with jira/scms/automailing and the like
09:00:56skrylarso it's just one master, old style multiconf project, and a basic "if [ $nim = unstable] change the path"
09:00:56FromGitter<mratsim> Are you sure it was OpenMP vs OpenCL, maybe OpenACC no?
09:01:04skrylarmratsim it was
09:01:17arecaceaeskrylar: oh, looked into gitlab-ci ?
09:01:18skrylaropenmp and opencl, they were discussing how openmp code still needs to be vectorized
09:01:36FromGitter<mratsim> You mean for SIMD?
09:01:44skrylarfor math code yes
09:02:23FromGitter<mratsim> not an issue you can do “#pragma omp parallel for simd” if you want GCC/LLVM to generate simd code
09:02:46skrylarmy old neural net code currently does rely on gcc converting the for loops to simd
09:02:50FromGitter<mratsim> and if speed is critical you will use intrinsics/hand-tuned ASM anyway which you probably can’t do with OpenCL
09:03:29skrylarits hard to say. there are some papers i'd like to implement, and it's not yet apparent where they can best run
09:03:48skrylarI would guess the CPU because these are doing strange neighborhood searches
09:04:28FromGitter<mratsim> I just use BLAS for linear algebra. For everything else there is OpenMP ;)
09:04:36*gmpreussner quit (Ping timeout: 260 seconds)
09:05:14*gmpreussner joined #nim
09:05:38FromGitter<mratsim> I’m pretty confident that Arraymancer is faster than anything else on CPU right now except if a framework implements TRIOT: https://github.com/mratsim/Arraymancer/issues/164
09:06:08arecaceaeskrylar: but yes people want multi-project job-pipelines at our place that jenkins seems to do well, why exactly, I have not figured out yet
09:07:11skrylarmratsim: i still have those blas tabs open, although time has been awkward.
09:08:10skrylararecaceae, pipelines are good if you have very strange and arbitrary needs
09:08:28arecaceaeskrylar: I feel like they beat unmaintained plugins you can easily implement in groovy yourself as well
09:09:05arecaceaeskrylar: also gui-setting and exporting huge XMLs you have to dissect yourself doesnt seem that attractive as well
09:09:10skrylari'm happy so far with some basic jobs and build-after rules. although i can see the appeal in that the multiconf job doesn't seem to understand things like "this is a windows machine"
09:09:48arecaceaeskrylar: I tried this myself for a while - but as you noticed already, everything but pipelines feels like an abandoned ship pretty much
09:09:56skrylarpipelines seem to also mostly be useful for if you are doing shit like debian does, where you're running linters on packages
09:10:28skrylarsince you get that pretty status box thats like, "oh running dpkg took this long and linting failed :D"
09:10:34skrylarbut meh, i'm not shipping products
09:12:34skrylarmratsim: there may come a time aphelion starts using arraymancer
09:13:01skrylaralthough my current problems are incredibly weird research issues like "given a noisy signal with a varying mean, what impact do arbitrary milestones have?"
09:13:32FromGitter<mratsim> aphelion? your scratch tensor lib?
09:13:40skrylarit's a pile of AI code
09:14:00skrylarthe crap tensors were the minimum viable code to run GRUs/tanhs/backprop
09:15:28FromGitter<mratsim> I see. I’m still on the fence on what to work next after I have a minimum viable MNIST: OpenCL, RNNs or SParse Tensors. For MNIST I’m only missing maxpooling
09:15:40arecaceaeskrylar: if your use-case is simple tho, I feel like Jenkins should not be your first choice unless you want to get experience with it in particular, I saw nim uses gitlab-ci and that takes the easy: just yaml it route, nim seems to do fine with it? https://github.com/nim-lang/Nim/blob/devel/.gitlab-ci.yml
09:16:24arecaceaeskrylar: doesnt have to be gitlab-ci, theres tons out there just relying on simle yaml files
09:16:40arecaceaeskrylar: which unlike jenkins, you can also just run locally
09:16:50skrylarbut i do just run jenkins locally...
09:17:52arecaceaeskrylar: probably a waste of resources and time spent configuring then
09:18:21skrylarmost of the time was me failing to remember shell scripting
09:18:33skrylarmuch less time spent getting jenkins to obey than buildbot was
09:19:31arecaceaeskrylar: btw https://github.com/koalaman/shellcheck
09:20:10skrylarif i was also cross testing osx or windows it might add some weirdness
09:20:59skrylaralso pondering if blockhash would be a brilliant idea for testing gui code
09:27:14*Vladar joined #nim
09:27:54*gokr joined #nim
09:37:41*gokr left #nim (#nim)
09:44:39*Drag333 joined #nim
09:44:40*Drag333 quit (Remote host closed the connection)
09:46:33*newn550 joined #nim
09:46:34*newn550 quit (Remote host closed the connection)
09:59:05skrylarwhee, found a use for the critbit module
09:59:06*ra844 joined #nim
09:59:08*ra844 quit (Remote host closed the connection)
09:59:22FromGitter<mratsim> do tell
10:00:43FromGitter<alehander42> how can I test how the docs I write look?
10:00:46*solt551 joined #nim
10:00:48*solt551 quit (Remote host closed the connection)
10:01:24FromGitter<alehander42> ah `nim web`
10:01:51*rauss quit (Read error: Connection reset by peer)
10:03:38*rauss joined #nim
10:03:47FromGitter<mratsim> Rejoice! https://github.com/nim-lang/Nim/pull/6930
10:05:52skrylarmratsim: using them to handle cells in miglayouts
10:05:53*Yardanico joined #nim
10:07:03skrylarwith a two-byte string set to the current x/y it turns in to a sparse key so you can tell it "this element is two rows tall" and it becomes able to tell that a given cell is reserved by a previously specified cell
10:07:33skrylarcritbit seems to work fine enough for this, for now
10:08:54*memol424 joined #nim
10:09:16*memol424 quit (Remote host closed the connection)
10:09:51Yardanicoguys, did memol424 write something to you?
10:10:03*ladyami550 joined #nim
10:11:05*ladyami550 quit (Remote host closed the connection)
10:13:06*dddddd joined #nim
10:17:42arecaceaewhat's the hottest way to pass c/linker flags I need because I compile-pragma a c file that includes system-headers nim doesn't seem to want to be bothered with?
10:18:36FromGitter<mratsim> hottest? {.passC: "-fopenmp”.} and {.passL: "-fopenmp”.} if you want to hardcode this
10:19:12arecaceaemratsim: gorge for pkg-config still the way?
10:19:15FromGitter<mratsim> otherwise you can have that in a nim.cfg
10:19:37FromGitter<mratsim> I don’t know, I don’t use neither gorge nor pig-config :P
10:19:41FromGitter<mratsim> pkg*
10:27:46arecaceaeI find wrapping c stuff to still be strange - I seem to have two options: either I wrap all of glib/gio whatever, the masses of converting headers of billions of lines of code by hand (because c2nim only does so much), OR, I just write a bunch of wrapper c files that expose the little functionality I want and end up writing like 100 lines of c, with no maintenance burden on me etc.
10:29:01arecaceaeI know that depending on what you wrap, you'd want to really wrap the stuff 1:1, but for most I currently seem to care about, I really just only care for a small chunk of functionality out of a lib that its enormeous, and whenever I try to wrap it, I go down this rabbit-hole of figuring out how deep I have to go to wrap types and it ends up being way too much wrapper code
10:30:15FromGitter<mratsim> I think the one with the most experience for this is @StefanSalewski as he is wrapping/porting GTK to Nim
10:30:35arecaceaeI saw his gio repo, last updated 1 year ago
10:30:42Yardanicowrong one
10:31:04arecaceaeI mean it gets even worse, try wrapping xcb and all its ridiculous amounts of addons
10:31:10Yardanicohttps://github.com/StefanSalewski/gintro
10:32:48FromGitter<alehander42> @Araq I added some docs in https://github.com/nim-lang/Nim/pull/6841 , I am not sure about the order in website.ini, I just added it to the last group
10:33:30skrylarscripts help
10:33:58skrylarcrm114, elisp
10:34:40skrylarin some cases back in the day D users were using GCC's xml mode to parse the c++ headers and then processing those, libclang is probably an option as well
10:35:28skrylarthough wrapping as needed is very viable for some stuff shrug
10:35:48arecaceaejust feels like insanity to me personally
10:44:25*yglukhov joined #nim
10:59:59*yglukhov quit (Remote host closed the connection)
11:15:32*jjido joined #nim
11:19:12*gokr joined #nim
11:25:46*yglukhov joined #nim
11:26:17*xkapastel quit (Quit: Connection closed for inactivity)
11:30:38*couven92 quit (Ping timeout: 265 seconds)
11:35:33*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:46:39*lithi13 joined #nim
11:46:42*lithi13 quit (Remote host closed the connection)
11:58:59FromGitter<mratsim> It seems like in master `block` became expression? This compiles in master but not in 0.17.2: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a365c021a4e6c82231c894c]
11:59:30FromGitter<mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a365c215355812e57e68b4d]
12:03:47skrylarnot sure whst the master branch is. i built it once and it still said 0.17.2
12:05:43Yardanicohe meant "devel"
12:05:50Yardanicomaster is always a release version
12:05:55Yardanicoe.g. currently master contains 0.17.2
12:06:16Yardanicoand current devel contains 0.18.0/1.0
12:07:56*vlad1777d joined #nim
12:07:57skrylarmy devel build says 0.17.3
12:08:44Yardanicoyeah it is like this currently
12:09:14Yardanicobecause development versions are always 0.x.uneven number
12:16:30*miran joined #nim
12:20:25FromGitter<mratsim> yeah devel sorry
12:20:41*jjido joined #nim
12:23:51*marenz__ joined #nim
12:47:34FromGitter<GULPF> @dom96 I forgot to confirm my email on the forum, and now the confirmation email is gone (it went to the spam folder and got deleted after 30 days). Can you activate my account manually or something? I know the email is correct because I could reset the password
12:47:54FromGitter<GULPF> I'm GULPF on the forum to
12:48:51dom96Sure, done.
12:49:12FromGitter<GULPF> thanks :)
13:00:25FromGitter<data-man> https://github.com/nim-lang/Nim/pull/6936 truecolor in a terminal :)
13:02:55Araqstrformat has arrived
13:04:51Araqhttps://github.com/nim-lang/Nim/blob/devel/lib/pure/strformat.nim PRs welcome, I consider it rocksolid
13:05:24Yardanicodid you write it yourself?
13:05:27Araqeven installed Python to ensure I get left/-right alignments right
13:05:32Yardanicoor it's a manual merge?
13:05:38Yardanicobut amazing anyway
13:05:58Araqcopied parts of bluenote's work, but rewrote most of it
13:06:58Araqspent 6 hours on it, way too long
13:07:46skrylarAraq, neat.
13:07:57radagastUnless {.inline.} pragma is passed, wouldn't the compilers automatically inline functions where seen fit?
13:08:05Araqthe best thing is that it works out of the box with times.format
13:08:44Yardanicoradagast, nim does that for iterators
13:08:49Yardanicoand C compiler will do it if it wants
13:08:55*skrylar quit (Quit: Leaving)
13:09:35FromGitter<mratsim> I’m not sure gcc/clang can inline nim_call
13:10:01FromGitter<mratsim> I never saw it when I was benchmarking
13:10:27Yardanicomaybe with aggressive GCC/Clang optimizations enabled?
13:10:41Araqenable linktime optimizations
13:10:47Araqand then it should work
13:11:19FromGitter<mratsim> good to know
13:12:33dom96Araq: Awesome.
13:12:45dom96Somebody really needs to fix the GitHub syntax highlighting for #[]#
13:13:32AraqrunnableExamples is pretty neat, cuts the codesize quite a bit
13:13:45Araqbut it was unusable until fixed some bugs :P
13:15:48radagastAh. Thanks. Another thing. Have we considered to use an in-house fork of clang? I have a feeling that it would beget more ease of predictability and maintainability. Just a random thought.
13:16:30Araqyou mean as an interim solution until our LLVM backend works with everything?
13:16:34dom96Araq: You should make the examples collapsed by default
13:16:38dom96that's a lot of examples
13:17:10Araqdom96, hmm but the examples are the best
13:17:14*yglukhov quit (Remote host closed the connection)
13:17:19Araqnobody reads the surrounding text
13:17:38AraqI could have fewer examples though and make the rest ordinary tests
13:17:42dom96People will happily expand them
13:17:52dom96and yeah, you probably should
13:17:55dom96that's excessive
13:18:03dom964 lines of examples is enough
13:18:08radagastAraq: Yes. Wait, are you talking about the NLVM project? I am new to the community, but are we considering to adopt it officially?
13:18:20dom96and if you're showing something substantial then put it below a heading
13:18:43Araqradagast, I've said multiple times that as soon as it gives us one of the following, I'll merge it into the core
13:18:52Araq- better debugging
13:18:54Araq- a REPL
13:19:01Araq- faster exception handling
13:19:06Araq- precise GC
13:20:15*yglukhov joined #nim
13:20:39Araqradagast, what's the benefit of forking clang? protection against stupid C compilers? :-)
13:20:56Araq(cough, Visual C++, I'm looking at you ...)
13:21:55miranre strformat: wooohoooo!! nice job, Araq!
13:23:45radagastGCC and Clang.... they handle things differently, however if we choose to stick to compiler X, we could be able to utilize X's non-standard macros or other utilities. It would also make compiler behavior more "predictable". \nMSVSC is out of the question, completely non-portable and non-free
13:23:54*yglukhov quit (Remote host closed the connection)
13:25:17Yardanicoradagast, but then it would be harder for others to port nim compiler to other platforms
13:25:54YardanicoE.g. for example I was able to run nim on Minoca OS (completely different OS with some posix compat) with minor config changes
13:26:04Yardanicobecause it has it's own GCC and it works
13:26:31radagastYardanico: I see
13:29:18Araqwell we could offer the C backend as is and still use a clang fork to avoid the dependency on Mingw
13:29:44Araqbut since clang hardly supports windows iirc that is asking for trouble
13:30:30Araqwe also need the backend into own executable to benefit from osproc.execProcesses to run codegen on multicore
13:31:31Araqthe problem why we don't bundle mingw is its size, you can install it once and only reinstall Nim as it progresses
13:31:52AraqI don't know if clang would be significantly slower
13:31:55Araqer
13:31:57Araq*smaller
13:32:45Yardanicowell
13:33:48radagastJust looked at strfmt. Fantastic job, Araq!  No more of those manual concatenation on this & $that.
13:34:41YardanicoLLVM 5.0 installer for win64 is 92mb
13:34:53Yardanicoit's only installer
13:34:57Yardanicohttp://releases.llvm.org/download.html
13:35:18Araqthanks but the credit goes to Bluenote, Dom and Python's design that happens to match Nim
13:35:43AraqI only did the finger excercise to implement it.
13:36:00Yardanico"Python's design that happens to match Nim" I see what you did there :P
13:38:51FromGitter<Varriount> Speaking of Python, this has made my day: https://www.python.org/dev/peps/pep-0562/
13:39:32Yardanicocustom __dir__ and __getattr__ for a module?
13:39:33Yardanicohmm
13:40:36*yglukhov joined #nim
13:40:59miranspeaking of PEPs for 3.7: https://www.python.org/dev/peps/pep-0557/
13:41:02FromGitter<Varriount> getattr is a function called when normal attribute access fails. dir() is a helper/debug function normally used to find the accessible attributes of an object.
13:41:25AraqI meant, Python's f-strings with the __format__ protocol was easy to adapt
13:42:00Araqgetattr is Nim's "dot overloading"
13:42:08Araqit works
13:43:28FromGitter<Varriount> miran: I'm surprised 557 one made it in.
13:50:27FromGitter<alehander42> Awesome, I really missed interpolation
13:55:06*MJCaley joined #nim
13:59:12*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:01:59radagast`varargs[type]`'s `len` is an int as opposed to uint or any other unsigned arithmatic types. What's the rationale behind this?
14:03:35*nsf joined #nim
14:04:19Araqunsigned doesn't work, that's why
14:04:24Araqvar x = s.len
14:04:31Araqwhile x >= 0:
14:04:34Araq echo x
14:04:36Araq dec x
14:05:16Araqall 'len's in Nim produce ints because int works, uint doesn't
14:05:41Araquint is more a bit pattern than a number
14:09:37radagastWhat if, hypothetically, you were dealing with a massive linked list? Would an `int` for the list still be a good idea?
14:10:51radagast>9223372036854775807
14:10:53radagastnvm
14:16:50*yglukhov quit (Remote host closed the connection)
14:24:38FromGitter<Varriount> radagast: Keep in mind that `int ` in Nim is the size of a pointer type.
14:30:40FromGitter<mratsim> `uint` is slower than `int` as well for all indexing operations because you would need to convert uint to int (pointer type). Also `uint` rollover on overflow which introduces extra checks for each uint operations, and makes counting error prone.
14:31:44FromGitter<mratsim> C++ designers said that using uint/size_t for indexing was a mistake.
14:31:57FromGitter<Varriount> Well, at the processor level, both int types overflow
14:32:24FromGitter<Varriount> I believe Araq would prefer saturated arithmetic.
14:32:29FromGitter<mratsim> Yes but the rollover introduce extra handling.
14:33:19FromGitter<Varriount> @mratsim Signed integers need to be checked for overflow too.
14:34:00FromGitter<Varriount> That's how the Nim compiler throws overflow errors.
14:34:36FromGitter<mratsim> But the compiler can just propagate the overflow error, and so can optimize the code as if it was bounded.
14:36:08FromGitter<mratsim> I don't know how to explain better :/
14:46:08*jjido joined #nim
15:18:43*yglukhov joined #nim
15:23:25*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:27:46*safvav712t85 joined #nim
15:34:40*couven92 joined #nim
15:42:08*yglukhov quit (Remote host closed the connection)
15:42:58*yglukhov joined #nim
15:55:55*yglukhov quit (Remote host closed the connection)
16:03:27AraqVarriount: indeed I believe saturated arithmetic plus flow typing for array indexes is current the best tradeoff for correctness proofs
16:15:41YardanicoAraq, what do you think about https://github.com/nim-lang/Nim/issues/5600#issuecomment-352256858 ?
16:15:52Yardanicoabout runtime vs compiletime checks for formatting
16:26:10AraqI will later ajust the protocol to prefer formatStatic over format if available
16:26:37Araqat least that's the best idea I currently have, overloading based on static[string] could also be an option
16:29:41*endragor quit (Remote host closed the connection)
16:32:34*endragor joined #nim
16:36:49*endragor quit (Ping timeout: 248 seconds)
16:42:06*MJCaley quit (Quit: MJCaley)
16:46:39*endragor joined #nim
16:52:35FromGitter<data-man> @Araq: Centered alignment not supported?
16:56:06*endragor quit (Quit: Leaving...)
16:59:02Araqdata-man: it is now, implemented the missing ^ and [sign]
16:59:22Araqthe only feature that is still missing is '=' as I don't really understand yet what it does
17:01:08FromGitter<RedBeard0531> @Araq based on https://pyformat.info/#number_sign it looks like it puts the padding between the number and the sign
17:01:48*sendell joined #nim
17:03:43sendellis capturing a var param inside a closure illegal?
17:03:49Araqyes
17:04:20*sendell quit (Client Quit)
17:04:20Araqit would be very hard to support and keep memory safety
17:12:18Araqmeh '=' looks hard to implement, nobody needs it, spaces between the sign and the number are ugly anyway
17:13:35FromGitter<RedBeard0531> I've never used it, but I think I've seen that style it on financial forms
17:13:45*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
17:19:38FromGitter<RedBeard0531> @Araq can you take a look at the approach I've taken here: https://github.com/nim-lang/Nim/compare/devel...RedBeard0531:tester_parallel. In particular, which nimcache name mangling do you prefer? I want to get that right before I fix up the tests that assume a fixed nimcache path. BTW, with just those two changes, "koch test cat stdlib" reruns go from 1:35 -> 43s since tests no longer clobber each other's caches.
17:21:05*SenasOzys_ quit (Ping timeout: 248 seconds)
17:23:13AraqRedBeard0531 subdir in nimcache/ means all the tools continue to work
17:23:37Araqand is what 'koch' uses too
17:23:46AraqI mean 'koch boot'
17:24:59FromGitter<RedBeard0531> do you mean nimcache/lib/blah/... or lib/blah/nimcache/... ? I think the current tester behavior is the latter, and my patch makes it the former.
17:26:44*xkapastel joined #nim
17:30:43FromGitter<RedBeard0531> Also, is tester intentionally not compiled with -d:release, or was that an oversight? I only did --opt:speed to keep the behavior the same while avoiding gcc's braindead -O0 codegen, but it you think -d:release makes sense I'll change it.
17:34:15AraqI only compile with -d:release if it's speed critical
17:34:36Araqthe tester's runtime is probably 99% in execProcesses
17:34:48Araqand so shouldn't benefit from optimizations
17:36:23FromGitter<RedBeard0531> "tester html" takes a while, and its on the critical path since it can't happen in parallel with testing
17:41:41FromGitter<RedBeard0531> -d:release doesn't buy much (~2s) for it on top of --opt:speed (which buys a ton ~15s) so it doesn't seem worth changing
17:50:48*NimBot joined #nim
17:51:00FromGitter<RedBeard0531> is the nimcache dir provided as a define in compiled code?
17:56:32*yglukhov joined #nim
17:59:27*miran quit (Quit: Konversation terminated!)
18:00:35*yglukhov quit (Ping timeout: 240 seconds)
18:02:07*couven92 quit (Ping timeout: 248 seconds)
18:16:11*solitudesf quit (Quit: solitudesf)
18:23:06*solitudesf joined #nim
18:28:41*Trustable joined #nim
18:31:45*solitudesf quit (Quit: solitudesf)
18:33:11*tefter joined #nim
18:33:26*solitudesf joined #nim
18:49:26*MJCaley joined #nim
18:52:17Araqredbeard0531 no and I don't think code should rely on it
18:52:38FromGitter<RedBeard0531> turned out I didn't need it anyway
18:54:00FromGitter<RedBeard0531> I wanted it at one point for my own project since it uses re2c to generate c code and it seemed best to drop the generated file in nimcache
19:03:39Araqthere is a PR that fixes html gen that I need to review and merge...
19:04:33Araqoh .4 for strings does truncate
19:04:48Araqwe don't support that either ... oh well
19:06:23*sz0 joined #nim
19:07:43*mwbrown quit (Ping timeout: 255 seconds)
19:09:40*mwbrown joined #nim
19:14:26*Vladar quit (Quit: Leaving)
19:22:05*Vladar joined #nim
19:35:15Araqhmm these format strings are super error prone
19:35:32Araq8< fails quietly 8< is the right syntax...
19:36:15Araqer <8 is the right syntax
19:36:54YardanicoAraq, i must admit I've only used f-strings in python to nicely embed variables (without using features like number formatting, left/right alignment)
19:38:04Araqwell I dream of debugFmt("{x}") expanding to echo("x: " & x)
19:49:48*yglukhov joined #nim
19:59:14*nsf quit (Quit: WeeChat 1.9.1)
20:02:08*chemist69 quit (Ping timeout: 240 seconds)
20:03:54*Yardanico_ joined #nim
20:05:45*Yardanico quit (Ping timeout: 264 seconds)
20:15:53*chemist69 joined #nim
20:17:18*couven92 joined #nim
20:22:30GitDisc<treeform> I use this
20:22:30GitDisc<treeform> https://gist.github.com/treeform/7a41296e7c341c10c97cfe6181c7fe4c
20:22:33GitDisc<treeform> print x
20:22:39GitDisc<treeform> >> x=3
20:25:33GitDisc<treeform> another cool thing that
20:25:39GitDisc<treeform> print x+2
20:25:46GitDisc<treeform> x+3:5
20:25:53GitDisc<treeform> x+2:5
20:33:45*MJCaley quit (Quit: MJCaley)
20:35:03*Yardanico_ quit (Read error: Connection reset by peer)
20:42:22Araqtreeform: cool macro
20:58:40*Trustable quit (Remote host closed the connection)
21:02:52*qih joined #nim
21:12:58*sz0 quit (Quit: Connection closed for inactivity)
21:26:51*SenasOzys_ joined #nim
21:29:54FromGitter<matrixbot> `pqflx3` Alexander Ivanov (Gitter): Alexander Ivanov (Gitter) From IRC (bridge bot) (Gitter)
21:37:17FromGitter<Yardanico> Wtf?
21:38:07*Jesin quit (Quit: Leaving)
21:41:23*Jesin joined #nim
21:42:46*yglukhov quit (Remote host closed the connection)
22:02:19*Vladar quit (Quit: Leaving)
22:13:18*yglukhov joined #nim
22:15:33*Trustable joined #nim
22:15:36*couven92 quit (Ping timeout: 260 seconds)
22:17:27*yglukhov quit (Ping timeout: 240 seconds)
22:24:03FromGitter<Quelklef> Good bot
22:29:23*Trustable quit (Remote host closed the connection)
22:36:11*solitudesf quit (Ping timeout: 265 seconds)
22:48:42*couven92 joined #nim
22:56:30FromGitter<Yardanico> Araq: is "termux" is being defined somewhere? It seems that the only way to use it is to manually define it in config/arguments
22:57:00Araqno idea, sorry
22:58:41FromGitter<Yardanico> Answer to myself: it's not defined anywhere and you should manually define it
23:00:09Araqnow that you mention it ... that's what I remember too :P
23:03:20FromGitter<Yardanico> BTW, I'll probably make a PR to termux repo after new release (to avoid applying any patches except config) and maybe I can figure out a way to define termux on termux automatically
23:04:40Araqdo we want truecolor support in the terminal?
23:05:30FromGitter<Yardanico> I saw @data-man's PR, why not? Sadly windows doesn't support it afaik
23:06:20Araqthis PR doesn't work well
23:06:37Araqthe idea of terminal.nim is to be stateless
23:06:51FromGitter<Yardanico> Ah, sorry, windows 10 actually supports it
23:06:53Araqproc setForegroundColor*(f: File, color: Color) is exactly what we don't do
23:06:57FromGitter<Yardanico> https://blogs.msdn.microsoft.com/commandline/2016/09/22/24-bit-color-in-the-windows-console/
23:08:28Araqinteresting how the terminal emulators are turning slowly into supporting a markup language
23:08:41FromGitter<RedBeard0531> now that strformat is in stdlib, how hard will it be to teach nimsuggest to do autocomplete inside the fmt"blah blah {expression.here}"
23:08:57Araqvery :-)
23:09:40FromGitter<RedBeard0531> It seems there are basically two ways to build a gui at this point: embedding in either a terminal or a browser
23:10:00FromGitter<Yardanico> Build a gui in Nim?
23:10:20FromGitter<RedBeard0531> It can output to both a browser and a terminal, so sure :)
23:10:25Araqembedding in a terminal is not a way to build a gui
23:10:46Araqthe 80ies called, they want Turbo Pascal's IDE back
23:10:54FromGitter<Yardanico> It's TUI :)
23:11:01FromGitter<RedBeard0531> have you seen vim or htop?
23:11:23federico3is strformat not listed in https://nim-lang.org/docs/lib.html ?
23:11:33FromGitter<RedBeard0531> They even have mouse support in the term now!
23:11:44Araqfederico3, it will be, the docs always refer to the latest release
23:13:40AraqRedBeard ... so like TP's IDE for DOS in 1985?
23:13:45FromGitter<RedBeard0531> btw, I think I worked out all the kinks in https://github.com/nim-lang/Nim/pull/6937 so it should be ready to review. With any luck it should make your local testing much faster after the first run.
23:14:03FromGitter<RedBeard0531> I was born in '86 :)
23:14:07FromGitter<Yardanico> Araq: I can check for termux by checking if file (which is present in termux only) exists, but I don't know if this is an acceptable solution
23:15:34FromGitter<Yardanico> But probably shipping edited config file is much better
23:16:02Araqyeah, that termux patch caused trouble for the people who could build on Android before
23:17:40Araqmouse support -- oh my what's next? putPixel support?
23:19:24Araqbut my server farm has no monitor -- what do you mean by "why the fuck does it matter? by that logic it couldn't support ascii either"
23:20:32FromGitter<Yardanico> Well you can change pixels by writing into the framebuffer if you're in TTY :P
23:21:29FromGitter<RedBeard0531> Also the latest version of gnome-terminal support full-color emoji
23:22:37FromGitter<RedBeard0531> which I of course immediately put to good use: https://github.com/RedBeard0531/dot_files/blob/master/vimrc#L537-L539
23:26:35*xkapastel quit (Quit: Connection closed for inactivity)
23:28:32AraqBojack Horseman doesn't twitter emojis
23:28:33*gokr quit (Ping timeout: 264 seconds)
23:29:33FromGitter<RedBeard0531>  (not sure if that will work over IRC)
23:31:49*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
23:32:46FromGitter<Yardanico> It will, depending on IRC client and font
23:42:15*astronavt joined #nim
23:59:03*oprypin quit (Quit: Bye)
23:59:13*oprypin joined #nim