<< 09-07-2018 >>

00:00:11krux02it is legally not possible to release a game on a console with gpl code in it.
00:00:38nasusirowhy is that if I may ask?
00:01:24krux02well on a game console, the user can't change the sourcecode of the program recompile it and run it.
00:01:28FromGitter<Varriount> I use linenoise. It's a bit unmaintained, but it generally works well.
00:01:47krux02and under gpl it is a requirement to ensure the user is able to do that.
00:01:56krux02not even lgpl can be used on a console.
00:02:17krux02Varriount: I use linenoise as well, but I don't like it at all.
00:02:33FromGitter<Varriount> Why not?
00:02:47nasusirokrux02: what can't change the source code? what causes this kind of restriction?
00:02:57krux02nothing at all, just raw input from stdin plus rlwrap would work better in my opinion.
00:03:22nasusiroI'm confused now...
00:03:39krux02maybe I need to specify, with console I mean game console like play station and nintendo
00:03:43nasusirocan or cannot a change the source code of a console game?
00:03:53krux02nasusiro, Have you ever compiled a program for Play Station?
00:03:56nasusirothat's more like it
00:04:05nasusirothey use BSD licenses
00:04:15krux02BSD is the complete opposite of GPL
00:04:35krux02BSD is basically do whatever you want. Copy it, modify it. Pretend it's yours.
00:04:43krux02well I am not sure about the last one
00:04:53krux02but BSD allows almost everything.
00:04:56nasusiroyou are talking about companies that go after profitability
00:05:11krux02I am not talking about companies.
00:05:27nasusiroyou gave an example of PS
00:05:42krux02??
00:05:50nasusiroyou gave an example of PlayStation
00:06:15nasusirothese companies are not using GPL for multiple reasons
00:06:24krux02yes
00:06:47nasusiroBSD is not a legal nightmare like GPL
00:07:10krux02but I mean, even for the games that run on the Play Station it is not possible to use a GPL licenso even if they release the source code, because it would enable no end user to modify the program.
00:07:26nasusirotherefore, they use any source code that falls under the legal-to-use compatibility table of theirs and use those source codes instead
00:07:34nasusiroanything that is GPL-ed, they avoid it like the plague
00:08:12krux02yes they avoi it because they have to.
00:08:12nasusirothey are not doing so because of modification. Yes, it's one of the main reasons
00:08:22nasusirobut they are doing so to avoid legal issues
00:08:31krux02But gpl is not as horrible as you might think. It is just very very incompatible with commercial games.
00:08:42krux02especially on consoles.
00:09:12krux02There is no way to release a gpl licensed game on a game console legally.
00:09:28nasusiroI myself am not against GPL; on the contrary
00:09:34krux02well GPL is quite easy to understand if you understand the concerns that Richard Stallman has.
00:09:45krux02I like GPL for a lot of things.
00:10:08krux02There are a lot of great products using the gpl licenso
00:10:45krux02and it is possible to take a gpl licensed product, modify it, use it in house over years, and never release the source code.
00:11:02krux02so gpl can be used commercially without relesing the source code.
00:11:47nasusiroyep
00:11:50nasusirofor in-house use
00:11:53krux02but as soon as the the modified program changes the owner, it has to be gpl again.
00:12:31nasusiroit makes sure the program remains alive and accessible by those who are interested in its current and implementation and development
00:13:10FromGitter<Varriount> I like the GPL for applications. Libraries, not so much.
00:13:50shashlickaraq: https://github.com/nim-lang/Nim/pull/8232 is now passing - can we pull it in?
00:14:09shashlickthis is the testament fix to run all tests with no actions
00:14:18*find0x90 quit (Quit: find0x90)
00:14:32krux02I wrote pretty printers for Nim that make debugging Nim a much better experience.
00:15:04FromGitter<Varriount> krux02, nasusiro: Keep in mind that even then, it's still a bit murky. For example, I work for a company who has a contract with the government - If I produce something, it might be considered to be owned by the government.
00:15:17*find0x90 joined #nim
00:15:36nasusirothat's another whole story Varriount
00:15:47*find0x90 quit (Client Quit)
00:15:51FromGitter<Varriount> It still invites complications.
00:16:00krux02yea I would like to not dive into this topic any deeper
00:16:14shashlickvarriount: appreciate a review and pull if you feel changes are acceptable
00:17:06nasusirofrom the moment you work for a company, you have signed a contract that comes with terms and disclosures explaining thoroughly and accurately that whatever you implement either during your working hours or during your employment that may collide or contradict your company's policies, therefore it belongs to them
00:17:30nasusiroacademia showed me its dark side and I know pretty well what it means to go unappreciated
00:18:01krux02nasusiro, well there are contract terms that are void even if signed.
00:18:10FromGitter<Varriount> shashlick: Made comments.
00:18:18nasusirokrux02: such as?
00:18:40FromGitter<Varriount> shashlick: Also, keep in mind that I won't be notified of mentions unless they are prefixed with the '@' symbol, since I'm on gitter.
00:18:53krux02and I have the sispicion that a term like that anything you write during your employment belongs to them is one of those terms that are void even if signed.
00:19:13krux02that really seems like a slavery constract
00:19:39shashlickcool
00:19:43krux02I am owned by the company and therefore everything I do belongs to the company.
00:20:12CodeVancenope Depending on the place. depending on what your company is working on
00:20:17nasusirokrux02: when you are a normal human being and they are a large private university that has a legal department of how many lawyers...meeeeeh it's something I would definitely want to avoid dealing with!
00:20:24krux02No when I do things at home, I do those things at home and they are my personal stuff. Nobody can claim that.
00:20:41nasusiroyeah, that's another story
00:20:46CodeVanceI think they call it no compitition
00:20:55nasusiroCodeVance: something like that
00:21:02krux02nasusiro, well I would claim my human rights and dignity.
00:21:08nasusirokrux02: I did
00:21:19nasusiroI got laid off with the cover of redundancy
00:21:31krux02what is that?
00:21:38krux02cover of redundancy?
00:21:55shashlick@varriount: replied
00:22:04nasusiroif I was laid off for going "against" the system, I could have won any legal battle
00:22:06nasusiroBUT
00:22:36nasusirothey fired us, around the 80% of the entire sub-section of the private university with the excuse of redundancy
00:22:50nasusirolegally, they are allowed to do so as long as they reward you with your benefits
00:23:07nasusirotherefore we don't have a case
00:23:09krux02nasusiro, where do you live?
00:23:15nasusiroEU
00:28:11nasusiroanyway, it's a deep and sad subject. it brings back painful memories...
00:35:57*thomasross quit (Read error: Connection reset by peer)
00:37:46*thomasross joined #nim
00:37:55FromGitter<Varriount> shashlick: Am I correct in assuming those other changed tests were also not run?
00:37:55shashlickyes, a whole bunch of stuff was never run
00:38:01shashlickthat's how i found a bunch of JS issues which I reported
00:39:47shashlickthanks! i can move onto the next thing now 🙂
00:48:03nasusirokrux02: since strings cannot be nil-ed, why do we have this? https://github.com/nim-lang/Nim/blob/master/lib/pure/strutils.nim#L467
00:53:02krux02nasusiro, old stuff from the time when string could be nil
00:53:19nasusirobloody hell...I'm opening a ticket right now.
00:53:24krux02nasusiro, make a pr to deprecate it.
00:53:45krux02really make a PR that is just nicer.
00:54:01krux02then you will even be a contributor to Nim.
00:54:11krux02not just an issue reporter.
00:54:17nasusiroslowly-slowly
00:54:30FromGitter<Varriount> And if it's a simple PR, I can review and merge it in.
00:54:51FromGitter<Varriount> (As opposed to a PR that introduces major functionality, or touches the compiler)
00:55:07nasusirofor the moment I will open a ticket to let Araq and dom96 to know about it
00:55:24nasusiroeventually I will become a contributor and why not a future core member?
00:55:39nasusirofor now I'm familiarize myself with the language
00:56:33krux02nasusiro, just that you know. I have lots of issues with the strutils package. I would really like to remove it from core Nim entirely.
00:57:00nasusiroas I already stated; slowly-slowly
00:57:13FromGitter<Varriount> krux02: And what would be it's replacement?
00:57:22krux02nothing
00:57:58krux02really the strutils package needs a complete overhaul in design.
00:58:28krux02the current version really has too many contributors. Everybody has an opinion and made a pr and pulled it an a different direction.
00:58:39krux02and then it became the horrible mess it is today.
00:59:38krux02just put strutils as it is today in a nimble package.
01:00:48nasusiroisn't there a better methodology than giving access to anyone to submit a PR?
01:00:58nasusiroI mean, isn't there an evaluation method?
01:01:12krux02well anybody can do a PR
01:01:21krux02and I don't know who has rights to accept a PR.
01:01:38nasusirobtw, I opened a ticket: #8252
01:01:46krux02But my personal opinion is that the quality control on PR is not the best.
01:01:57krux02nasusiro, thumbs up
01:02:41FromGitter<Varriount> krux02: It's generally been Araq and dom96.
01:02:47nasusiroI guess we need a group of advanced users that use or have been using Nim for a while now and have extensive experience to validate every code that gets PR-ed
01:03:12FromGitter<Varriount> I merge in bug fixes, however I wait for input from dom96 or Araq for feature additions.
01:04:51krux02nasusiro, I am an advanced used, but I am certainly not qualified to validat PR's that are about the web technologies
01:05:10nasusiroyou mean like jester?
01:05:41krux02yes
01:06:26krux02but that is not Nim standard library
01:07:21FromGitter<Varriount> krux02: My best advice is to write an improved version of the strutils library and present it as a replacement, stating it's merits and the flaws of the original.
01:09:05krux02I was just looking for an example of what I could not maintain.
01:09:11krux02I found the package punycode.
01:09:25krux02wtf is that? What purpose does it have in the standard library?
01:09:37nasusiromaybe to first present a case study or let's call it a hypothesis you are trying to prove and demonstrate the current version's pros and cons and what is the actual alternative based on your own experience
01:09:59FromGitter<Varriount> punycode is an encoding.
01:10:24*dddddd quit (Remote host closed the connection)
01:10:28krux02yea
01:10:29*chrismc joined #nim
01:10:31krux02of what?
01:10:32FromGitter<Varriount> I know about it, because Python has support for punycode encoding.
01:10:51FromGitter<Varriount> https://en.wikipedia.org/wiki/Punycode
01:11:35nasusiroanyway guys, I'm off. Hopefully I will see you tomorrow
01:11:40nasusirogoodnight
01:11:43*nasusiro quit (Quit: Quitting for now...)
01:11:46*chrismc quit (Client Quit)
01:12:51krux02sorry that is just bad
01:16:48krux02Varriount: Punicode is just a bad encoding, even worse than the \xXXXX encoding
01:24:43krux02there is no reason that this is standard libray
01:50:49*krux02 quit (Quit: Leaving)
02:00:55*donlzx joined #nim
02:02:51*brainproxy joined #nim
02:45:48*crem quit (Ping timeout: 256 seconds)
02:47:49*crem joined #nim
03:23:04*endragor joined #nim
04:49:57*miran joined #nim
05:01:58FromGitter<xDotDash> nim doesn't have built-in procs map/flatMap for seqs?
05:02:20miranimport sequtils, and you have map
05:03:30FromGitter<xDotDash> ah thanks
05:05:22*lompik joined #nim
05:05:43*nsf joined #nim
05:13:05*fjvallarino quit (Remote host closed the connection)
05:13:32*fjvallarino joined #nim
05:18:21*fjvallarino quit (Ping timeout: 264 seconds)
05:51:32*xet7 joined #nim
05:51:40*fjvallarino joined #nim
06:05:38*yglukhov[i] joined #nim
06:07:40*crem quit (Ping timeout: 256 seconds)
06:08:55*yglukhov[i] quit (Read error: Connection reset by peer)
06:09:29*yglukhov[i] joined #nim
06:14:06*crem joined #nim
06:20:17*miran quit (Ping timeout: 248 seconds)
06:21:15*Perkol joined #nim
06:21:58*yglukhov[i] quit (Remote host closed the connection)
06:44:33*nomenon joined #nim
06:47:21*arecaceae quit (Remote host closed the connection)
06:47:52*nomenon left #nim ("Leaving")
06:48:04*arecaceae joined #nim
06:53:30*yglukhov[i] joined #nim
07:14:16*yglukhov[i] quit (Remote host closed the connection)
07:15:40*crem quit (Ping timeout: 245 seconds)
07:16:55*yglukhov[i] joined #nim
07:17:10*crem joined #nim
07:18:22*yglukhov[i] quit (Read error: Connection reset by peer)
07:18:59*yglukhov[i] joined #nim
07:30:40FromGitter<Varriount> @xDotDash I like your profile pic.
07:31:54*PMunch joined #nim
07:32:39*brainproxy quit (Ping timeout: 260 seconds)
07:42:14*NamPNQ joined #nim
07:57:13PMunchAraq, as requested yesterday, here is a forum post about my trouble with dynamic libraries
07:57:34*Perkol quit (Remote host closed the connection)
08:03:03*floppydh joined #nim
08:04:48*marszym[m] quit (Ping timeout: 255 seconds)
08:04:51*TheManiac quit (Ping timeout: 245 seconds)
08:04:51*hitchhooker[m] quit (Ping timeout: 245 seconds)
08:04:52*sroecker[m] quit (Ping timeout: 240 seconds)
08:04:52*sg-james[m] quit (Ping timeout: 240 seconds)
08:04:53*dyce[m] quit (Ping timeout: 240 seconds)
08:05:15*narimiran[m] quit (Ping timeout: 255 seconds)
08:05:17*yglukhov quit (Ping timeout: 245 seconds)
08:07:53*rokups joined #nim
08:20:26*marszym[m] joined #nim
08:21:31*dddddd joined #nim
08:24:25PMunchForgot to actually give the link: https://forum.nim-lang.org/t/4029
08:25:12*hitchhooker[m] joined #nim
08:27:13*TheManiac joined #nim
08:28:24*yglukhov[i] quit (Remote host closed the connection)
08:28:35*dyce[m] joined #nim
08:29:46*narimiran[m] joined #nim
08:29:55*tzekid joined #nim
08:30:05*yglukhov[i] joined #nim
08:31:30*sroecker[m] joined #nim
08:31:44*sg-james[m] joined #nim
08:33:57*yglukhov joined #nim
08:40:46*leorize quit (Quit: WeeChat 2.1)
08:49:15FromGitter<mratsim> @LyndsySimon, for your OpenGL aware GUI needs for Tetris also check Nuklear
08:59:10FromGitter<mratsim> @k0pernicus I spent a lot of time in Numpy, Scipy and Scikit-learn codebase, Python, Fortran, C, C++ and Cython. The algorithms are code, the way it’s written is bad, often slow and hard to maintain. They are not software engineers but academics and it shows. Thankfully they are often revisited but some areas are really poor (I remember struggling with scipy optimizers like L-BFGS). I think this applies perfectly even
08:59:10FromGitter... though it’s regarding NLTK (NLP old guard) vs spaCy (rebuild from scratch approach): https://explosion.ai/blog/dead-code-should-be-buried
08:59:21FromGitter<mratsim> The algorithms are good*
09:02:28*rosshadden quit (Read error: Connection reset by peer)
09:03:31*rosshadden joined #nim
09:14:24*tzekid quit (Ping timeout: 252 seconds)
09:15:20*tzekid joined #nim
09:15:49*elrood joined #nim
09:29:32PMunchHow can I get c2nim to understand this: http://ix.io/1gzR/ ?
09:31:25FromGitter<mratsim> pass the GCC preprocessor beforehand?
09:34:39PMunchHuh?
09:34:53PMunchI've never really tried to wrap anything with c2nim before (at least not successfully)
09:35:57Araqc2nim can process that one, no?
09:36:02PMunchhome/peter/div/imlib2/Imlib2.h(33, 1) Error: identifier expected, but got: [NewLine]
09:36:06PMunchThat's the error I get
09:36:36PMunchLine 31 is the second line of the paste
09:36:49PMunchErr 3rd
09:37:20PMunchLine 33 is the 3rd line
09:37:41PMunchNo wait..
09:39:22*Vladar joined #nim
09:41:08PMunchhttp://ix.io/1gzY/C
09:41:13PMunchThat's the file I'm trying to wrap
09:41:47FromGitter<mratsim> windows vs unix carriage return issue?
09:44:07PMunchAppears to be only newlines
09:44:44PMunchYeah, there are no carriage returns in that file
09:46:47*NamPNQ quit (Remote host closed the connection)
09:48:04Araqc2nim understands carriage returns anyway, that's not the problem here
09:53:22*Vladar quit (Quit: Leaving)
10:04:32*Vladar joined #nim
10:36:22*nasusiro joined #nim
10:46:25federico3any tutorial on building for android and iOS?
10:47:46FromGitter<mratsim> Nimx readme?
10:49:03federico3https://github.com/yglukhov/nimx ?
10:49:08FromGitter<mratsim> yes
10:50:03FromGitter<mratsim> strange I’m pretty sure I saw instruction for android for Nimx
10:50:39yglukhovit's just `nake droid` :)
10:50:55yglukhovnimx android build is slightly more complex than it should be though
11:02:09FromGitter<Vindaar> @PMunch: here's what I would do: from https://gist.github.com/Vindaar/c2fce49d574e420606f962ea06d23259 to https://gist.github.com/Vindaar/e518e310eb3a0a95bdda7bbe8e4341f8
11:02:23FromGitter<Vindaar> not sure about windows in that case though :P
11:05:01FromGitter<mratsim> I just took an “if-arrow” in the knees
11:05:23PMunchVindaar, looks promising
11:05:48FromGitter<Vindaar> this is basically how I handled it when wrapping HDF5 and it seems to work just fine
11:09:51PMunchWhere does Nim know where to find those procedures though?
11:10:00PMunchI guess I must static link against imlib
11:14:19FromGitter<Vindaar> You can add an equivalent header like the one here: https://github.com/Vindaar/nimnlopt/blob/master/c_header/nlopt.h
11:14:55FromGitter<Vindaar> that will then insert the the `libname` and `importc` stuff like here https://github.com/Vindaar/nimnlopt/blob/master/src/nlopt/nlopt_wrapper.nim
11:15:14FromGitter<Vindaar> then you can just compile it like a normal nim program and it will link dynamically to you `.so`
11:15:20FromGitter<Vindaar> *your
11:17:46PMunchOoh, that's nice
11:19:02*yglukhov[i] quit (Read error: Connection reset by peer)
11:19:38*yglukhov[i] joined #nim
11:20:18FromGitter<mratsim> check how nimblas does it as well
11:24:15dom96PMunch: If you still want to reset your password on the forum then try doing it again
11:24:16PMunchhttp://ix.io/1gAP/Nim
11:24:18dom96I can send you the link
11:24:18PMunchIt works!
11:24:38PMunchdom96, oh no. I found my password in the password store on my work machine
11:24:49FromGitter<Vindaar> nice to hear :)
11:24:50PMunchI really need to look into syncing these..
11:25:05dom96okay
11:29:02PMunchThese dynlib errors are just bizarre.. https://forum.nim-lang.org/t/4029
11:49:53*Trustable joined #nim
12:08:30*gangstacat quit (Ping timeout: 256 seconds)
12:15:26FromDiscord<2vg> ya, Is there an example of a server socket using SSL?
12:15:26FromDiscord<2vg> Does anyone know?
12:17:00FromDiscord<2vg> By the way @dom96,
12:17:00FromDiscord<2vg> since your http beast does not correspond to pipeline, techempower will not produce results properly…
12:17:33*fvs joined #nim
12:19:01dom96huh, what do you mean?
12:20:53FromDiscord<2vg> In the techempower plaintext benchmark, HTTP pipeline is used.
12:20:53FromDiscord<2vg> I ran the techempower pipeline script with httpbeast, but the response did not return normally.
12:21:10*Vladar quit (Quit: Leaving)
12:21:31dom96oh :/
12:21:40dom96Can you send me a link to the script?
12:21:52dom96I assumed wrk enabled pipelining by default
12:22:12FromDiscord<2vg> However, in other benchmarks, do not use pineplane, it's okay
12:22:13FromDiscord<2vg> Only plaintext will be a bad result.
12:22:24FromDiscord<2vg> okey, wait
12:26:08FromDiscord<2vg> dom96: https://gist.github.com/2vg/1a683fa6a75ce166c206fe6348353050
12:27:06dom96Awesome, thanks
12:27:14dom96I'll have to implement support for that then :(
12:28:12*Vladar joined #nim
12:29:42FromDiscord<2vg> Yes ... However, since the HTTP pipeline is defined in the HTTP RFC, it seems that it supports the normal HTTP server.
12:33:04*lompik quit (Ping timeout: 260 seconds)
12:34:55FromDiscord<2vg> To support pipelines, methods without body like GET and HEAD are sufficient.
12:35:29*Trustable quit (Remote host closed the connection)
12:36:09FromDiscord<2vg> easy pipeline script:
12:36:09FromDiscord<2vg> (echo -en "GET / HTTP/1.1\n\nGET / HTTP/1.1\n\n"; sleep 10) | telnet localhost 8080
12:37:13dom96so without headers?
12:37:27dom96So I just need to support requests with no headers?
12:40:17FromDiscord<2vg> Usually you need Keep-Alive
12:40:17FromDiscord<2vg> However, in HTTP / 1.1, Keep - Alive is the default, so it is normal to work without it.
12:40:17FromDiscord<2vg> If want to explicitly close, the client should include a close in the header.
12:40:28FromDiscord<2vg> Usually you need Keep-Alive
12:40:28FromDiscord<2vg> However, in HTTP/1.1, Keep - Alive is the default, so it is normal to work without it.
12:40:29FromDiscord<2vg> If want to explicitly close, the client should include a close in the header.
12:40:40FromDiscord<2vg> Usually you need Keep-Alive
12:40:40FromDiscord<2vg> However, in HTTP/1.1, Keep-Alive is the default, so it is normal to work without it.
12:40:41FromDiscord<2vg> If want to explicitly close, the client should include a close in the header.
12:41:09FromDiscord<Yardanico> @2vg don't forget that IRC doesn't support edits
12:41:20dom96FromDiscord sucks lol
12:41:34Yardanicodom96 at least it sends edits unlike FromGitter :)
12:41:35FromDiscord<2vg> omg x(
12:41:44dom96I'd rather it just didn't
12:49:23*nsf quit (Quit: WeeChat 2.1)
13:00:27*tzekid quit (Ping timeout: 252 seconds)
13:00:40FromGitter<viniarck> Hi guys, looks like nvim-nim looks abandoned, If you use neovim is there any other fork more updated?
13:01:09FromGitter<viniarck> Or another neovim plugin that you'd recommend?
13:02:00Araqabandoned? are you sure?
13:02:15Araqdom96: can we merge this now? https://github.com/nim-lang/Nim/pull/8094
13:04:28dom96The code is still using seq[Byte]
13:05:15FromGitter<viniarck> Not entirely sure. Just asking, By looking at the issues it doesn't seem too active.
13:05:27FromGitter<viniarck> Anyone out there who's using neovim, which plugin are you using?
13:06:43FromGitter<tim-st> is `x.addr` the opposite of `x[]`?
13:06:44dom96Araq: I would change it to an object variant: https://github.com/nim-lang/Nim/pull/8094#discussion_r200807369
13:08:01Araqthat would likely take more memory then and might also slow it down, just trust GULPF's implementation
13:08:46Araqwe need a DSL for these packed representations, they are the future
13:08:46*endragor quit (Remote host closed the connection)
13:09:14dom96okay, I commented
13:09:17dom96tests are failing too
13:10:33Araqoh indeed
13:10:55Araqbut probably still the old devel failures, let's see
13:11:02dom96possibly
13:11:19Araqyeah it's just the methods regression
13:13:48Yardanicohow do I pass nim's string as "void *pointer" in C?
13:14:07Yardanico(i'm interfacing with a dynamic library)
13:14:26Araqcast[pointer](addr s[0])
13:14:26dom96addr str[0]
13:14:45YardanicoAraq, dom96, thanks
13:18:33FromGitter<tim-st> can I create a finalizer for a wrapped c object?
13:18:49FromGitter<tim-st> I have result: ptr ptr T
13:19:40*brainproxy joined #nim
13:27:44Araqyeah you can. in fact, you can use a destructor
13:30:39FromGitter<tim-st> is this different from `new(result, procName)` ?
13:30:49FromGitter<tim-st> I found only this: https://github.com/nim-lang/Nim/wiki/Destructors
13:40:25PMunchIs there a better way to do this: https://www.reddit.com/r/nim/comments/8x9clc/using_a_table_to_store_a_map/e2230hg/
13:41:03YardanicoPMunch, make a template to shorten the code?
13:41:33Yardanicoor you can convert enum value to string and make a table "enum value": "image path"
13:41:34PMunchOh yeah, I was specifically talking about the closureScope and copy of the hex and loc variables
13:49:54federico3anybody using statsd?
13:55:18*opi quit (Quit: ZNC - http://znc.in)
13:55:58*opi joined #nim
14:14:12dom96TIL about closureScope
14:15:32FromGitter<Varriount> dom96: Have you looked at its implementation?
14:15:40dom96nope
14:16:09Yardanicodom96, it's "template closureScope*(body: untyped): untyped = (proc() = body)()" :D
14:18:13*lompik joined #nim
14:19:13PMunchYardanico, haha really?
14:19:18YardanicoPMunch, https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L4055
14:21:54PMunchBut wait, then why doesn't the actual closure capture variables?
14:24:17*yglukhov[i] quit (Read error: Connection reset by peer)
14:24:51*yglukhov[i] joined #nim
14:28:47*PMunch quit (Quit: Leaving)
14:33:20*nasusiro is now known as stefanos82
14:34:06*stefanos82 quit (Quit: Quitting for now...)
14:34:39*nasusiro joined #nim
14:35:39*nasusiro quit (Client Quit)
14:36:12*stefanos82 joined #nim
14:37:27stefanos82Araq and dom96: I have now changed my nickname from nasusiro to stefanos82 to match that of my GitHub account.
14:37:46stefanos82now things will make much more sense lol
14:51:25*miran joined #nim
15:02:06*nsf joined #nim
15:04:09*cryptocat1094 joined #nim
15:05:30*chemist69 joined #nim
15:05:40*brainproxy quit (Quit: WeeChat 2.1)
15:07:24chemist69does someone have an idea, why the .pure. pragma does not work anymore for enums (https://github.com/nim-lang/Nim/issues/8066)?
15:18:27*NimBot joined #nim
15:19:09*natrys joined #nim
15:19:38*fjvallarino quit (Remote host closed the connection)
15:19:44*fjvallarino joined #nim
15:23:58FromGitter<mratsim> it was supposed to be removed iirc
15:27:07chemist69Ah, ok.
15:39:39shashlickyay CI now in place for nimgen
15:41:31*chemist69 quit (Quit: WeeChat 1.9.1)
15:47:15shashlick@araq, @dom96: can we have a scheduled nightly build and save artifacts so that we can have a daily built snapshot instead of having to build csources and nim for every project? https://www.appveyor.com/docs/build-configuration/#scheduled-builds
15:51:12*natrys quit (Quit: natrys)
15:53:41*natrys joined #nim
16:03:13*natrys quit (Ping timeout: 248 seconds)
16:05:45*natrys joined #nim
16:11:01*fjvallarino quit (Remote host closed the connection)
16:11:28*fjvallarino joined #nim
16:15:54*fjvallarino quit (Ping timeout: 260 seconds)
16:22:08*Jesin quit (Quit: Leaving)
16:25:35*krux02 joined #nim
16:37:34Yardanicoshashlick, we can also save artifacts for every commit
16:37:47Yardanicogithub releases for example
16:38:34FromGitter<tim-st> what does `undefined reference to ...` on gcc output mean?
16:38:52FromGitter<tim-st> when trying to compile wrapped header.h
16:39:37*donlzx quit (Quit: Leaving)
16:46:06shashlickyardanico: i think it will be great
16:47:11*fjvallarino joined #nim
16:48:17FromGitter<krux02> @tim-st it means that you compiled the header, but did not link the library.
16:48:56FromGitter<krux02> it is a linker error, not a compiler error.
16:49:46FromGitter<krux02> the header says "function int foo() exists" and then compiles the module. the linker says: "yea you are using this int foo() here, but I don't have it. "
16:50:00FromGitter<tim-st> @krux02 thanks, i have c files in the folder, which should I compile and how?
16:50:31FromGitter<tim-st> I think only one c file makes sense, I try with passL
16:50:46FromGitter<krux02> no
16:51:00FromGitter<krux02> you should probably tell the nim compiler to compile the c files
16:51:07FromGitter<tim-st> passC?
16:51:13FromGitter<krux02> no
16:51:26FromGitter<krux02> I think it is `compile`
16:51:45FromGitter<tim-st> thanks, I try^^
16:52:49FromGitter<krux02> https://github.com/krux02/nimAntTweakBar/blob/master/AntTweakBar.nim
16:52:58FromGitter<krux02> this is how I did it.
16:53:41FromGitter<tim-st> thanks, so I have to pass release mode settings too?
16:54:15shashlicktim-st: are you wrapping something?
16:54:22*nsf quit (Quit: WeeChat 2.1)
16:55:13dom96shashlick: Yes, I've wanted this for forever
16:55:30dom96The problem is: where do the artifacts get stored?
16:56:04FromGitter<tim-st> yes, but dont succeed, I saw different lmdb implementations, none had a usable api, now there is, but cannot compile the c files...
16:56:37FromGitter<tim-st> there are files "lmdb.h" and "mdb.c"
16:57:01FromGitter<tim-st> and it looks like `MDB_envinfo* {.importc: "MDB_envinfo", header: headerPath.} = object`
16:57:07FromGitter<krux02> @tim-st have you looked at the example I posted?
16:57:14FromGitter<tim-st> yes...
16:57:32FromGitter<tim-st> I added `{.compile: "../liblmdb/mdb.c".}`
16:57:41FromGitter<krux02> and it doesn't help?
16:57:44FromGitter<tim-st> nope
16:57:49FromGitter<krux02> hmm
16:58:03FromGitter<tim-st> likely because there is no link between lmdb.h and mdb.c
16:58:13FromGitter<krux02> what do you mean?
16:58:29FromGitter<tim-st> I mean maybe mdb.c is compiled but not recognized
16:58:55FromGitter<tim-st> it is compiled as mdb.o in nimcache folder
16:59:03FromGitter<krux02> what do you mean with 'recognized?
16:59:04shashlickdom96: there's an API to download artifacts
16:59:33FromGitter<krux02> yes and when mdb.o is the nimcache it means basically that it works
16:59:42shashlickdom96: might be easier to simply HTTP post to somewhere
16:59:58dom96Yes, it's a case of spending the time to implement this
17:00:15dom96Security is something that needs a lot of consideration for this though
17:00:51FromGitter<krux02> @tim-st maybe you need to learn a bit more about the normal compilation process of a C project.
17:01:13FromGitter<tim-st> @krux02 I think I need to compile another file :\
17:01:31shashlickdom96: right now, trying to get appveyor to do both win and lin builds
17:01:55dom96travis can surely provide artifacts too
17:02:28shashlickya, I'd like to test nimgen and wrappers on the last years worth of official releases and on #head
17:03:34FromGitter<tim-st> @krux02 thanks, it works now! but I'm not sure if the compiled files are in release mode e.g. if the release/debug mode is passed also to `compile` pragma
17:04:58FromGitter<krux02> I think those flags are passd to c files, but I am not sure.
17:05:43FromGitter<tim-st> ok, thanks
17:07:09shashlick--verbosity:2
17:15:39*elrood quit (Remote host closed the connection)
17:16:02*elrood joined #nim
17:16:15*gsingh93_ joined #nim
17:18:04*gangstacat joined #nim
17:30:10*erratic joined #nim
17:32:53*gangstacat quit (Quit: Äśis!)
17:48:21*Vladar quit (Quit: Leaving)
17:49:12*gangstacat joined #nim
17:56:47FromGitter<xmonader> Is there special flags to compile app using UI ? ⏎ I did nimble install ui and I get lots of those ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b43a1df70efc60660b9eb26]
18:47:32*nsf joined #nim
19:00:53*PMunch joined #nim
19:03:58*yglukhov[i] quit (Remote host closed the connection)
19:04:31*yglukhov[i] joined #nim
19:04:54*yglukhov[i] quit (Remote host closed the connection)
19:05:09*yglukhov[i] joined #nim
19:05:46*yglukhov[i] quit (Read error: Connection reset by peer)
19:06:21*yglukhov[i] joined #nim
19:08:51*lompik quit (Ping timeout: 240 seconds)
19:18:00*miran_ joined #nim
19:18:21*miran quit (Ping timeout: 240 seconds)
19:26:51*yglukhov[i] quit (Read error: Connection reset by peer)
19:27:26*yglukhov[i] joined #nim
19:34:09*beatmox quit (Remote host closed the connection)
19:34:40*beatmox joined #nim
19:35:38*gsingh93_ quit (Quit: Connection closed for inactivity)
19:35:56FromGitter<tim-st> when I have a c string address, how can I use it in nim as string without copy?
19:37:51FromGitter<tim-st> currently I'm using copyMem and it works, is there a more performant way?
19:43:53CodeVancejust use it as a cstring?
19:44:27FromGitter<tim-st> I'm getting `type: pointer`
19:48:33FromGitter<tim-st> I see, I have to cast the pointer to cstring
19:49:56PMunchAren't Nim strings just the length of the string and a pointer to the string? That should be possible to create from a cstring
19:50:02PMunchDon't think it is though
19:50:53PMunchOh wait, that would probably mess with the GC..
19:50:55FromGitter<tim-st> yes, it seems to work, but I need to set the len, I think
19:51:13PMunchcstrings are NULL delimited
19:51:19PMunchSo you can't set a length
19:51:40shashlickcstrings != strings
19:52:08FromGitter<tim-st> the result is one byte too long
19:52:28FromGitter<tim-st> (extra letter)
19:52:46PMunchThen you have to either handle it, or copy it
19:53:00PMunchUnfortunately
19:53:59FromGitter<tim-st> hm :\
19:55:16FromGitter<tim-st> now it seems to work, I have to test this
19:59:31stefanos82Araq: when you have a couple of minutes available, can I ask you something about the channels algorithm?
19:59:32*Jesin joined #nim
20:11:27FromGitter<tim-st> I kept the old low performance way because e.g. for empty string it doesnt work and tells me str.len == 1
20:16:45stefanos82@tim-st: maybe this answers your question(s) more or less? https://forum.nim-lang.org/t/626
20:17:03*nsf quit (Quit: WeeChat 2.1)
20:17:45*Jesin quit (Quit: Leaving)
20:20:06FromGitter<tim-st> I read this some minutes ago, I think the user wants to achieve the same, but I havent found a solution, for now I stay with the copy, maybe gcc gets it
20:28:01Araqstefanos82: what about it?
20:28:51stefanos82Araq: today that I was in the bank, I was on a queue and wasted more than 15 minutes waiting for a job of 1 minute and 25 seconds. Yes I counted them
20:29:23stefanos82why Nim (and Golang) use traditional FIFO queue for their channels' mechanism?
20:30:28stefanos82even more, why people use FIFO as their task queue? Yes, it works but it's not really helpful with small-to-medium tasks that could get executed in no time.
20:30:36stefanos82Why not go with priority queue?
20:31:22AraqFIFO is the "natural" way of doing things.
20:31:38Araqpriority queue needs a more complex API but I wouldn't mind one.
20:32:27stefanos82very well. I'm taking notes ^_^
20:33:02stefanos82so...shall I consider it as a plausible mechanism that could take place in the near future? I'm asking so I can refresh my knowledge around algorithms
20:33:59shashlickwoohoo - both Windows and Linux CI setup on AppVeyor for nimgen
20:34:28*Jesin joined #nim
20:34:29shashlickall wrappers are tested so if you make one based on nimgen, let me know so that we can make sure it keeps working
20:42:43*miran_ quit (Ping timeout: 268 seconds)
20:43:25*fjvallarino quit (Remote host closed the connection)
20:43:32*fjvallarino joined #nim
20:46:18*PMunch quit (Quit: leaving)
20:55:59Araqstefanos82: well... this stuff predates system.deepCopy and should be moved out of system.nim
20:56:13Araqthen it can also be easier to implement and tinker with
20:56:25stefanos82I guess the docs are not fully updated then?
20:56:39Araqno, the docs reflect reality
20:56:47Araqbut nowadays we can do much better
20:57:01stefanos82I wish Nim had Python's help()
20:57:44stefanos82like nim help <...> and should print your request. For instance, nim help string
20:57:55stefanos82to provide me all the necessary documentation for string
20:58:53stefanos82so far I'm more than impressed with Nim and feels really relaxing, yet challenging to code more and more on a daily basis
20:59:14stefanos82this is a nice feeling that I haven't felt with any other language
20:59:32stefanos82the language that gave me closest feeling to that of Nim is Go
20:59:38stefanos82but not the same as Nim
20:59:41*cryptocat1094 quit (Quit: WeeChat 1.6)
21:12:38FromGitter<xDotDash> What would be the best way to get the fields of an object, inside a macro?
21:13:49shashlickhttps://nim-lang.org/docs/system.html#fieldPairs.i,T
21:14:00Araqstefanos82: https://nim-lang.org/docs/system.html "Group by type"
21:14:15FromGitter<xDotDash> Ah, thank you
21:14:45stefanos82Araq: I know. Click on string
21:14:55stefanos82"built-in string type"
21:15:37stefanos82it doesn't say much, like so many options we see in so many source code samples out there
21:16:17stefanos82so many .this() and .that() that I have no idea what they do to a string, to an integer, you name it
21:17:43*fjvallarino quit (Remote host closed the connection)
21:22:12*fjvallarino joined #nim
21:26:12Araqstefanos82: https://nim-lang.org/docs/system.html "Group by type"
21:26:33Araq--> under the "String" section it lists what you can do with strings
21:27:05Araqbut it's pretty bad. get VS Code, type import strutils; "foo". and let the auto completion show you.
21:27:16stefanos82lol...for heaven's sake, why did not see that yesterday?!
21:27:24stefanos82thank you for the clarification Araq
21:27:40stefanos82I use Vim
21:28:42Araquse a real tool instead.
21:29:07stefanos82and Vim is not?
21:31:19AraqVim predates monitors with VGA resolution
21:31:27*Jesin quit (Quit: Leaving)
21:31:55Araqyou've been brainwashed into believing that mice make you unproductive. no studies ever backed it up, on the contrary.
21:32:58shashlickI was very pleased with vscode but it's too bloated for my VM
21:32:59stefanos82so Nim that is using a CLI concept is useless too?
21:33:14shashlickand given I have to work across OS, vim is LCD
21:33:48Araqwell let's not get into a fight.
21:34:00*ashleyk_ left #nim ("Leaving")
21:34:23Araqbut CLIs and all this command line stuff is pathetic crap to me
21:34:26stefanos82lol you started it with your "use a real tool instead". Let people use whatever they want lol
21:34:54Araqsure use what you want
21:35:04Araqbut don't complain about your tooling then
21:35:25stefanos82when did you hear me complaining about my tooling? O.o
21:35:34shashlickale works well with nim for syntax checking
21:35:53Araq"I need Python's help()" is a complain about your tooling without you realizing that it is.
21:36:03shashlickbut i don't have any completion
21:36:24stefanos82Araq> no, the docs reflect reality
21:36:24stefanos82<Araq> but nowadays we can do much better
21:36:24stefanos82<stefanos82> I wish Nim had Python's help()
21:36:46Araqyou don't want to read pages after pages of "help()". you want auto-completion. ;-)
21:36:57Araqyou want it for Python too.
21:37:10Araqtrust me. ;-)
21:37:11stefanos82you don't want to admit you are tired. You NEED to get some proper sleep mate...
21:37:56stefanos82btw Python has auto-completion even under terminal. Just type whatever you want and press the tab key
21:38:18Araqcool, I need to try that
21:38:37stefanos82write dir and press tab key
21:38:51Araqdoesn't work :-)
21:39:00stefanos82which Python? 2 or 3?
21:39:09Araq2.4.4
21:39:13stefanos82what -_-
21:39:33stefanos82you remained back in the early '90s?
21:39:42Araqit's OSX, it always uses 2.4.4 no matter what I install via brew
21:39:47Araq:D
21:39:50*xet7 quit (Quit: Leaving)
21:40:06stefanos82just install pyenv and you will find your inner peace in no time
21:40:57Araqnah, I'm fine. I don't use Python.
21:42:44stefanos82don't you use brew?
21:44:20Araqbrew install python2.7
21:44:25Araq-- minutes later --
21:44:41AraqError: No formulae found in taps.
21:44:53Araqbut I installed it once anyway, OSX uses 2.4.4 instead.
21:45:04stefanos82replace 2.7 with 3
21:45:31Araqand that's ok, it's a unix system. I expect it to ship with tens of different shitty scripting languages that cannot ever be uninstalled
21:45:51stefanos82read this for its simple steps how to enable auto-completion under OSX https://nicolas.perriault.net/code/2010/python-tab-completion/
21:46:14stefanos82where's dom96?
21:46:19stefanos82he got very quiet today
21:47:01*FromGitter quit (Remote host closed the connection)
21:47:02*oprypin quit (Quit: Bye)
21:47:16Araqhe's fine.
21:47:23*FromGitter joined #nim
21:47:25dom96I'm here
21:47:34*oprypin joined #nim
21:48:40*yglukhov[i] quit (Remote host closed the connection)
21:50:55Araqstefanos82: thanks, but I don't need auto-completion for Python as I don't use Python.
21:51:46Araqotherwise I would have managed to fix my setup
21:51:51CodeVanceIsn't he talking about nim_magic
21:52:28Araqnevertheless it's surprising how bad it all works :-)
21:53:42stefanos82there you are dom96 ^_^
21:53:46stefanos82listen mate, I wanted to ask you
21:54:42stefanos82did you happen to read about Gorilla webkit, purely for academic / research purposes? http://www.gorillatoolkit.org/
21:54:54stefanos82I was thinking, why not have something like that for Nim?
21:55:15stefanos82and some important parts that Jester might have to become part of Nim's standard
21:56:11stefanos82I know Araq how much you hate other languages and adore yours, but let's be honest here lol, you borrowed multiple features from many languages to make Nim what it is today
21:56:25stefanos82no need to sound so biased or mildly harsh with other languages
21:57:15Araqok, fair. but I'm not harsh with other languages, I replaced them all.
21:57:26*rokups quit (Quit: Connection closed for inactivity)
21:58:05dom96Never heard of Gorilla
21:59:15stefanos82dom96: now you do then hehe :D
22:00:00stefanos82it would be really useful to have a Nim webkit, because Jester is a Sinatra-based micro-framework which means the load goes developer's shoulders to implement missing feature
22:00:28dom96when you say "webkit" I think of the rendering engine
22:00:47dom96so I'm not sure what you mean
22:00:52stefanos82true, I meant web toolkit
22:00:55stefanos82my bad
22:01:12dom96I think you mean a full web framework
22:01:17*natrys quit (Quit: natrys)
22:01:21stefanos82well, Jester is a micro-framework, correct?
22:01:28dom96yes
22:01:36FromDiscord<exelotl> nothing stopping people from using/creating other packages to go with jester, right?
22:01:45stefanos82therefore it lacks important parts that users need to implement themselves, correct?
22:01:59stefanos82@exelotl: exactly
22:02:16stefanos82that's why I wanted to ask whether dom96 knows Gorilla
22:02:31dom96yes
22:03:46stefanos82to answer even further to you exelotl, by adding other packages to go with jester means jester is no longer a micro-framework; it will become a full-fledged framework, maybe the size of Django
22:04:11stefanos82but that entails unnecessary restrictions
22:04:30stefanos82think of those restrictions like "Hotel California": once you get in, there's no way out
22:04:37dom96well no, jester would still be a micro-framework
22:04:42stefanos82but with a web toolkit, anyone could use the features of their choice
22:06:01CodeVancejester addons
22:06:35stefanos82oh?
22:06:52stefanos82so we can think of it like "Jester on steroids"?
22:07:47*elrood quit (Quit: Leaving)
22:07:58FromDiscord<exelotl> jeroids
22:08:06FromDiscord<exelotl> I'll see myself out
22:09:01stefanos82why not name it after In Flames' song, The Jester Race?
22:09:07stefanos82what an amazing album...
22:10:11stefanos82seriously now CodeVance, I cannot find jester addons. Any link please?
22:10:47CodeVancenim tinyc doesn't build
22:11:35CodeVancestefanos82: there are no jester addons
22:11:35CodeVancethat I am aware
22:11:45CodeVanceBut I'm thinking of the jester packages like django packages
22:11:46CodeVanceaddons
22:11:52CodeVancenot messing with the core
22:12:13stefanos82that's why I suggested Gorilla as an example.
22:16:29CodeVancelink man
22:16:35CodeVancenvm I see the link
22:17:04stefanos82http://www.gorillatoolkit.org/
22:17:34shashlickcodevance: what issues you seeing with tcc
22:18:24CodeVanceIsn't that already possible with nimble?
22:18:31CodeVancenimble install jester_bla
22:19:38CodeVanceshashlick:
22:20:11*CodeVance sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/bitOCAzZiQkcaSEaPZzeUQJf >
22:21:54*yglukhov[i] joined #nim
22:22:09shashlicki just edited nim.cfg when I was playing with tcc
22:22:20shashlickdo you have the latest release?
22:23:27shashlickhttps://savannah.nongnu.org/projects/tinycc
22:24:23CodeVanceDo I have to build tinyc too?
22:24:36*erratic quit (Ping timeout: 256 seconds)
22:25:25CodeVanceI thought tinyc is already included in nim's repo
22:29:54stefanos82that tinyc is for REPL. it's a work-in-process
22:29:57CodeVanceundeclared identifier errGenerated
22:30:06stefanos82what system are you using, windows or Linux?
22:30:12stefanos82or Mac?
22:30:29CodeVancewin
22:30:30CodeVancewin7
22:33:19CodeVance64bit
22:33:32CodeVanceAm I supposed to take the latest tinyc?
22:34:32stefanos82CodeVance: why not? Try this repo git://repo.or.cz/tinycc.git
22:34:36stefanos82clone it and compile it
22:34:50stefanos82last update was 8 days ago
22:41:22CodeVanceThx
22:44:59stefanos82Araq: can you please explain to me how exactly the tinyc will be Nim's REPL? I'm asking because to be honest with you, I thought tinyc was to be an executable that comes with Nim that compiles code
22:45:24Araqtiny C also has an API
22:45:53Araqtakes in C code, can compile the code and run it
22:46:17stefanos82so are you working on bridging the generated C code with tinyc's API so it can compile in no time?
22:46:32Araqno, I did that.
22:46:43Araqthen I couldn't get to work on Windows
22:46:51Araqand had problems with 64bit code on Linux
22:47:11Araqand stopped caring about Tiny C
22:47:30stefanos82that's sad :(
22:48:03stefanos82but they are working on it. you can see it for yourself here git://repo.or.cz/tinycc.git
22:50:54stefanos82now if we could get tinyc to work with Nim's channels and concurrency would be more than great
22:51:00stefanos82it throws errors
22:53:30Araq;-)
22:53:51stefanos82imagine though if it worked...people would go bananas with Nim!
22:54:00Araqit's not just threading.
22:54:10stefanos82the majority fails, hm?
22:54:27Araqwe also support "bitops" which use the C compiler's intrisics
22:54:40Araq(yes, I cannot write this word)
22:55:05Araqand we're flirting with C++'s zero overhead exceptions
22:55:17Araqall stuff Tiny C can't deliver.
22:55:30stefanos82the word was 95% correct
22:55:33Araqand is outside of its scope
22:55:42stefanos82you just missed an 'n' before sics
22:56:06stefanos82train your brain to split it in two: intrin-sics
22:56:57CodeVanceWould C++ be better , would it affect me at all? Would I need to change the packages I use to fit?
22:56:57stefanos82so if you go with C++, will you stop working on tinyc support unless someone volunteers?
22:57:17Araqdoesn't sound like me. instead I will go on a rant about the English language...
22:57:23Araq;-)
22:57:34stefanos82feel free
22:57:52AraqCodeVance: I don't think so.
22:58:32Araqstefanos82: your question is badly phrased. I stopped working on tinyC support long ago. I'm accepting PRs though.
22:59:18stefanos82Araq: in your favorite language, "you" is for plural but they have unified singular with plural and everything sounds mixed
22:59:51stefanos82when you say "you" it refers to plural as well, therefore the question was not referring to you individually, but to the whole core team
23:00:22Araq"will you stop working on tinyc support unless someone volunteers?" sounds pretty personal
23:01:03shashlickI had spent some time trying to get tinyc to pass nim tests
23:01:04stefanos82let me rephrase it then: will you, the core team, stop working on tinyc support unless someone volunteers?
23:01:14shashlicklatest version was hanging on some tests
23:01:30stefanos82shashlick: I have noticed some peculiar behavior myself with tinyc
23:01:43Araqstefanos82: ok, so I let shashlick answer :-)
23:02:23Araqbut TinyC is about the REPL, right?
23:03:07shashlickhttps://github.com/nim-lang/Nim/issues/7750 <= tcc related issue and PR
23:03:19stefanos82Araq: if you mean by taking advantage its -run flag, then yes it should be the ideal tool for Nim
23:03:25shashlickmy goal wasn't to get the repl working, it was more to see how much of nim was working with tcc
23:04:49Araqwell the question is, where do you see TinyC's advantages for Nim, stefanos82 ?
23:05:09stefanos82fast execution
23:06:04Araqwith its non-existing optimizer?
23:06:14stefanos82Araq: you didn't pay attention what I said before
23:06:52stefanos82the users love speed. Give them that and make it clear for them that if they want optimization, they can switch their CC to gcc
23:07:01stefanos82or the compiler of their choice
23:07:27stefanos82think of tcc's behavior as Nim's sandbox for getting the first impression
23:07:36Araqwhat if my users have the same problem as I have?
23:07:50stefanos82remind me which problems exactly and I forgot please?
23:08:25Araqthe CC step is not on the critical path for development since "signature hashing" arrived
23:08:48Araqand now the time is spent in the Nim steps.
23:08:59Araquntil we get IR (incremental compilation) production ready
23:09:14Araqer, *IC would be the correct abbrev
23:09:28stefanos82you lost me at first
23:09:38stefanos82I thought you meant Intermediate Representation
23:10:54shashlickaraq: how's the newruntime coming? do you think it is for 1.0 or after?
23:11:27*krux02 quit (Remote host closed the connection)
23:11:41stefanos82so basically Nim is considered by you "slow" during the parsing due to the missing incremental compilation mechanism?
23:11:46Araqwell I'm a bit stuck in the implementation.
23:11:47stefanos82I hope I got it wrong thogh
23:11:53stefanos82*though
23:12:50Araqstefanos82: read this please https://github.com/nim-lang/Nim/issues/7874
23:13:03Araqshashlick: it's scheduled for v1.
23:13:29CodeVancearaq. sometimes nim spends so much time going over system modules. when the only thing changing is the project files. If you could fix that I think it would cut out a massive chunk of compilation time.
23:14:53stefanos82Araq: did you happen to study C2lang?
23:15:15stefanos82this guy does an incredible job with how fast it compiles
23:15:15*brainproxy joined #nim
23:15:53*vivus joined #nim
23:16:00Araqc2lang doesn't ring any bells
23:16:15stefanos82"On my laptop C2 compiler parses around 1.5-1.8 million lines of C2 per second in a single thread!"
23:16:23Araqoh yeah
23:16:27stefanos82that was one of his replies back to my comments about his language
23:16:30AraqI know this guy
23:16:33AraqI think.
23:16:33stefanos82I lost my speech lol
23:17:16Araqwell that's just what Delphi used to do, in the 90ies
23:17:29stefanos82so basically when Nim compiles the code, does not it generates a hash key for each file so it can compare future changes?
23:18:13Araqbut these numbers always come from a simple language.
23:18:26FromGitter<kaushalmodi> I think translating this to Nim would be a fun project: http://www.buildyourownlisp.com/contents
23:18:27AraqNim has a macro system and all this compile-time voodoo.
23:18:50Araqand we would like to spend more time in checking your code, not less.
23:18:59CodeVanceits not that simple apparently
23:19:01stefanos82Araq: since I don't know Lisp, does this happen with Lisp too?
23:19:05Araqso we need something that works incrementally
23:19:33*rockcavera joined #nim
23:19:58Araqstefanos82: well the hash computation is the easy part
23:20:11stefanos82what's painful part?
23:20:16stefanos82*the
23:20:32Araqbut you need to fill the RAM with what the compiler "would have done on a full recompile"
23:22:43*NimBot joined #nim
23:22:55*ketralni` joined #nim
23:23:33*ketralnis quit (Ping timeout: 240 seconds)
23:23:57*yglukhov[i] quit (Ping timeout: 240 seconds)
23:24:41stefanos82so Araq, which parts do you want or think they need caching?
23:24:59FromGitter<kaushalmodi> I mentioned that link just to gage if anyone else is interested too, and probably willing to collaborate.
23:25:36stefanos82I'm sure people will follow if you make the start and share it on HN
23:25:45stefanos82that's where I read it either yesterday or today
23:26:20stefanos82I wish I could support financially the author, but I'm complete broke
23:26:25Araqstefanos82: I wrote my thoughs in the https://github.com/nim-lang/Nim/issues/7874
23:26:47Araqand now let me muse about the "new runtime"
23:26:58stefanos82Araq: OK, I will finish it right way. I'm in "General Approach" part right now
23:27:30Araqshashlick: problem is that the current implementation has this split of string / NimString
23:27:37FromGitter<kaushalmodi> I learnt about that book there as well. Just that I've never had any luck posting interesting enough stuff to HN :P. In any case, I'll now step out of the ongoing conversation here.
23:28:07Araq(same for seqs)
23:28:26Araqand this split creates a messy situation.
23:29:16Araqbut I don't think I can avoid it.
23:29:16CodeVanceForce one or the other?
23:30:09Araqthe implementations are easy enough but how to map string to NimString is unclear
23:30:26*krux02 joined #nim
23:32:56Araqalso the destruction injection pass happens before C codegen
23:33:24Araqwhich is nice, except the C codegen knows about strings and how to map them to C
23:34:13Araqand so it needs to be taught to not do that
23:35:48AraqI played with the idea of rewriting the C codegen to be based on ASTs but that's a ton of a work and I could hack into the codegen instead...
23:35:58stefanos82Araq: when Nim starts the compilation procedure, does it generate a specific type of AST syntax or a restricted version of Nim itself?
23:36:58Araqhuh?
23:37:23Araqthere is only one AST and it's used for everything and the macro system's AST is identical to what the compiler uses
23:39:11stefanos82that is not what I meant
23:39:22stefanos82let me share an article that demonstrates what I mean
23:39:34stefanos82Araq: there you go https://perlgeek.de/blog-en/perl-6/2013-rakudos-abstract-syntax-tree.html
23:40:38stefanos82is this the logic Nim is following or does it produce something complete different than this logic / concept?
23:43:01Araqyes and no.
23:43:52Araqhttps://nim-lang.org/docs/macros.html#the-ast-in-nim
23:44:09stefanos82nice, thanks Araq.
23:44:20stefanos82btw, you know files of type DAT?
23:45:36stefanos82you could use them as your tiny case study for caching and validate your reasoning by having actual data in your hands about how faster it compiles or executes by using it
23:47:06stefanos82I remember working on a sample project from "Fluent Python" and the initial code took around 68 seconds to finish and with the use of DAT files it finished in 2.3 seconds
23:47:09stefanos82I was blown away!
23:50:01pqflx3[m]!eval import typetraits; var a: array[-5 .. -3, int]; echo type(a[0])
23:50:03NimBotint
23:50:18pqflx3[m]is this meant to be legal?
23:51:50stefanos82Araq: this line did not parse correct during HTML translation: As a side note, if you choose to use infix operators in a prefix form, the AST behaves as a [parenthetical function call](./macros.html#calls-expressions-call-with) with nnkAccQuoted, as follows:
23:54:27stefanos82the same issue can be found at "Call with raw string literal"
23:55:10*fjvallarino quit (Remote host closed the connection)
23:56:02stefanos82Araq: man...you should DEFINITELY write a compilers book!
23:56:28stefanos82your AST is simply outstandingly awesome, so easy to follow and digest in no time...blimey man, well done!
23:58:05Araqlol thanks
23:59:07stefanos82seriously, do that so we can get rid of the Dragon Book lol
23:59:33stefanos82think of it as "The Design and Evolution of Nim"
23:59:52Araqlet's get out v1 finally first.