<< 17-10-2017 >>

00:03:42*d10n-work quit (Quit: Connection closed for inactivity)
00:03:58*JappleAck joined #nim
00:07:19*ryanhowe joined #nim
00:18:32*Nobabs27 quit (Quit: Leaving)
00:21:21*dhalinar quit (Ping timeout: 248 seconds)
00:31:55*ryanhowe quit (Ping timeout: 252 seconds)
00:33:06*kafke_ quit (Remote host closed the connection)
00:36:27*vlad1777d quit (Ping timeout: 240 seconds)
00:38:58*rauss quit (Read error: Connection reset by peer)
00:40:53*rauss joined #nim
00:53:13*def-pri-pub joined #nim
00:58:19*ryanhowe joined #nim
01:12:44*Jesin quit (Quit: Leaving)
01:20:14*Jesin joined #nim
01:23:23*libman quit (Quit: Connection closed for inactivity)
01:24:10*dhalinar joined #nim
01:26:15*user0 quit (Quit: user0)
01:26:50FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/z5Fq/Render2.png)
01:28:41*user0 joined #nim
01:30:46*user0 quit (Client Quit)
01:33:13*user0 joined #nim
01:33:54*kafke joined #nim
01:37:27*chemist69 quit (Disconnected by services)
01:37:32*chemist69_ joined #nim
01:38:19*Jesin quit (Ping timeout: 255 seconds)
01:38:28*kafke quit (Ping timeout: 252 seconds)
01:42:24*yglukhov joined #nim
01:43:52*Jesin joined #nim
01:45:47*dhalinar quit (Ping timeout: 258 seconds)
01:46:35*yglukhov quit (Ping timeout: 240 seconds)
01:49:28*dhalinar joined #nim
01:49:54*SusWombat joined #nim
01:50:20SusWombatAnyone here using nim in vscode and has a idea why i dont get autocompletion for nimble modules?
01:58:48SusWombatoh ... nvm i should try installing nimsuggest first
01:59:56SusWombatthe aur package (arch) for nimsuggest says "This is now part of Nim itself."
02:00:00SusWombatis this true?
02:02:47*JappleAck quit (Quit: Leaving)
02:12:43FromGitter<zacharycarter> SusWombat: I think you have to install it with koch tools
02:12:47FromGitter<zacharycarter> but I could be wrong
02:13:01SusWombatyeah
02:13:19SusWombatim currently trying to decide if i should just compile nim on my own or use choosenim
02:14:05FromGitter<zacharycarter> I do the former on my osx machine
02:14:13FromGitter<zacharycarter> I've used choosenim on other operating systems
02:18:02SusWombatim going to try choosenim
02:19:37shashlickI was building myself on Windows until recently when I moved to choosenim. It can pull from head so might as will leverage it instead of diy
02:31:18*def-pri-pub quit (Quit: Leaving.)
02:32:05*SusWombat quit (Remote host closed the connection)
02:32:55*dhalinar quit (Ping timeout: 252 seconds)
02:33:14*SusWombat joined #nim
02:34:57*stisa quit (Ping timeout: 240 seconds)
02:44:06*rauss quit (Quit: WeeChat 1.9.1)
02:44:15*rauss joined #nim
02:44:29*dddddd quit (Remote host closed the connection)
02:44:29raussI love the tensor lib blog post. Great read
02:44:58*dmu quit (Quit: leaving)
02:45:11FromGitter<zacharycarter> @mratsim wrote it
02:52:26*smt quit (Ping timeout: 246 seconds)
02:53:41FromGitter<zacharycarter> I think I should start a stream - for 3d modeling and programming Nim
02:53:56FromGitter<zacharycarter> dom96 gave me the idea but I think it's a good one
02:54:06raussI've often considered starting to stream my programming and gamedev stuff
02:54:27raussit would almost certainly motivate me to do it more frequently, if it worked out
02:55:23raussThe only reason I haven't is laziness. We should each go for it
02:56:29FromGitter<zacharycarter> yeah it might get me more focused to work on specific things and get things done faster
02:57:43*endragor joined #nim
03:05:07SusWombatIm trying to learn opengl a bit. As there are no glew buinings what would i use instead?
03:05:18SusWombat@zacharycarter maybe?
03:09:39FromGitter<zacharycarter> SusWombat you don't need glew if you use the Nim opengl bindings
03:09:48SusWombatoh ok
03:09:51FromGitter<zacharycarter> the extensions are available via the function loadExtensions
03:10:57SusWombatthanks
03:11:32SusWombatIm probably going to give anyways. But i atleast want to try :D
03:12:07FromGitter<zacharycarter> I recommend https://learnopengl.com/
03:12:26SusWombatHm ok
03:12:39SusWombatim currently started open.gl as it offers sdl as a option
03:13:20SusWombatbut i guess for learning it wouldnt matter if id use glfw instead of sdl right?
03:34:08FromGitter<zacharycarter> nope
03:34:30FromGitter<zacharycarter> whether you choose sdl2 or glfw3 should have little impact suswombat
03:34:38SusWombatok
03:34:49FromGitter<zacharycarter> I recommend sdl2
03:34:59FromGitter<zacharycarter> esp if you want to get into things like webassembly eventually
03:35:06SusWombatyeah but the tutorial uses glfw so wouldnt it be easier to just use that?
03:35:25SusWombatif i would actually use opengl for something real id use sdl anyway
03:36:08SusWombatOnly thing that worrys me a bit that i have to learn 3d stuff when learning opengl. And im not intrested in 3d at aöö
03:36:09SusWombatall*
03:43:35FromGitter<zacharycarter> you don't HAVE to learn 3d
03:43:44FromGitter<zacharycarter> but you need to know linear algebra
03:44:18FromGitter<zacharycarter> I'd go through learning opengl - they even have an example for building a 2d game
03:44:39*yglukhov joined #nim
03:44:44FromGitter<zacharycarter> glfw3 / sdl2 are just the windowing library - but sure you could start with glfw3 if you're not familiar with either library
03:48:41*yglukhov quit (Ping timeout: 240 seconds)
04:00:43*Elronnd quit (Ping timeout: 276 seconds)
04:03:03UxerUosprWhat's the fastest way to check if a string is in a sequence?
04:05:20*Elronnd joined #nim
04:30:04FromGitter<TheSuspiciousWombat> @zacharycarter Do you have any idea if there is a site which translates glfw call to sdl? like not automaticly but some kind of documentation/ressource
05:19:57FromGitter<x86128> Hello! Newbie question. ⏎ Trying to compile this simple code: ⏎ https://gist.github.com/x86128/645835a3f876625ce022fb5283428813 ⏎ ⏎ and got compile time error: ... [https://gitter.im/nim-lang/Nim?at=59e592fde44c43700a41530a]
05:35:18*kafke joined #nim
05:37:41*UxerUospr quit (Quit: Lost terminal)
05:39:41*kafke quit (Ping timeout: 240 seconds)
05:41:33FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e5980c210ac26920f632d0]
05:41:43FromGitter<Bennyelg> you should await you response since it's Async.
05:41:52FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e5981fbbbf9f1a386e1c93]
05:46:54*yglukhov joined #nim
05:47:23FromGitter<x86128> waitFor definition:
05:47:26FromGitter<x86128> proc waitFor*T (fut: Future[T]): T = ⏎ ## *Blocks* the current thread until the specified future completes. ⏎ while not fut.finished: ⏎ ⏎ ```poll()``` ... [https://gitter.im/nim-lang/Nim?at=59e5996df7299e8f53f820c2]
05:48:14FromGitter<x86128> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e5999ef7299e8f53f82153]
05:48:28*retropikzel joined #nim
05:49:06FromGitter<x86128> So actually await perform resolve of Future?
05:51:30*yglukhov quit (Ping timeout: 258 seconds)
05:56:49FromGitter<Bennyelg> Yea
05:58:03*retropikzel left #nim (#nim)
06:04:25*kobi7 joined #nim
06:05:20kobi7hi guys, I was wondering if there is a way to define postfix procs - the arguments are to the left of the proc name
06:05:39kobi7I'm just a beginner but I think I saw infix syntax for templates
06:06:36kobi7or perhaps something like (a:2, b:"hello").args.callme
06:06:47kobi7convert a tuple to proc arguments
06:08:30kobi7no big deal - just wondering if I missed it, since nim is so flexible.
06:09:51Araqkobi7: there are no postfix procs
06:10:05kobi7ok, np
06:10:16Araqso that we can parse a + + b unambiguously without symbol table
06:10:31Araq(that is parsed as (a + (+b)
06:10:34Araq)
06:14:15kobi7Are there data structures other than the ones in the stdlib/Collections?
06:14:25*PMunch joined #nim
06:14:25kobi7specifically a dependency graph
06:15:06kobi7hi PMunch
06:16:27kobi7That's weird: all the nimble package definitions are in one json file? not very scalable...
06:17:03kobi7(multiple pull requests)
06:18:01PMunchHi kobi7
06:18:45Araqkobi7: yeah I argued for a database back in the days
06:19:02Araqeventually we'll need to patch it
06:19:16Araqbut for now it suffices
06:20:12Araqoh also nimble supports multiple packages.json files
06:20:21kobi7multiple files would be fine. I just saw that now so commented.
06:21:11kobi7db actually has benefits that it's easier/faster to download
06:21:21kobi7brb
06:22:36PMunchBut that would mean it would have to be stored and managed somewhere else. Git and GitHub are good tools for managing a shared resource.
06:22:47AraqDBs can also be queried and don't have ascii alignment / whitespace problems, missing commas, missing }'s
06:23:20*nsf joined #nim
06:23:27Araqand are not under the "git diff" oppression
06:24:31kobi7you can have both world: build a binary out of the github resources.
06:24:48kobi7nimble can then work with the binary to do most things.
06:24:57Araqthat doesn't solve much
06:25:10Araqpeople would still need to make PRs against the packages.json
06:25:28kobi7to tell the truth I prefer simple solutions. multiple files is just fine imo.
06:26:43PMunchWe could have just a folder of .nimble files in a folder on GitHub then a server somewhere that hooks into the repo and builds a DB from that automatically
06:27:22PMunchBest of both worlds, you get Git/GitHub as an easy and familiar front-end, and a DB for ease of access for tools.
06:27:35kobi7from optimization perspective, every "release" the information is already known, that's why a database, or a binary representing dependency graph and other relevant structures is fastest for nimble to have at its disposal. That would mean generating binaries every "release" - but the dynamic way is fine in my opinion. it's not that there are millions of packages...
06:27:57Araqa folder of .nimble files is already a much better database than json
06:28:13Araqnice idea, never really occured to me
06:28:28PMunchThere might be some speed issues with lots of small files though..
06:29:06PMunchBut I guess nimble itself could download and build them into one db for local usage
06:29:10Araqyup
06:29:14kobi7someone once said premature optimization is the root of all evil
06:29:21PMunchThat would actually make a lot more sense :P
06:29:59kobi7yes, that is a good idea. adding to an existing db when new packages change.
06:30:17kobi7git is already very good at giving us only the deltas
06:30:47kobi7but you would have to hold all the files locally.
06:31:52PMunchI don't think the overhead of that would be too bad
06:32:34kobi7can github hold a zip file?
06:32:51kobi7nevermind, that has no benefit
06:32:56FromGitter<gokr> I built a similar solution years ago actually.For Squeak.
06:32:57PMunchIt can, but then you loose all of gits capabilities
06:33:29PMunchYou could zip up all the files locally and simply unpack them before a pull if it's a problem
06:33:36FromGitter<gokr> Clients downloaded a complete snapshot, sing fkle.
06:33:59FromGitter<gokr> A serialized model.
06:34:05PMunchhttps://stackoverflow.com/questions/8522619/how-do-i-get-the-list-of-files-about-to-be-updated-by-git-pull-without-knowing
06:34:13PMunchYou could of course also do that
06:34:50PMunchSo download a full copy once, then run that command to look for new/changed files and selectively pull only those, storing them in a db and then deleting them
06:35:07PMunchOh wait, git would see them as deleted though..
06:35:11FromGitter<gokr> The idea with the model was of course to open up tool crafting.
06:36:07*kafke joined #nim
06:36:08PMunchOr would it if they are not checked in?
06:36:10kobi7ok ok this is already over engineering for mostly a non-issue
06:36:30Araqquick, what is -1.#IND ?
06:36:30PMunchgokr, Squeak
06:36:32PMunch?
06:36:42FromGitter<gokr> Www.squeanr
06:36:44PMunchWhat is #IND?
06:36:50FromGitter<gokr> Www.squeak.org
06:37:01AraqPMunch, it's Windows lingo for NaN (omg)
06:37:11kobi7hehe
06:37:22kobi7Indecisive :-)
06:37:45PMunchOh cool, gokr
06:38:14PMunchAh right, been a while since I've done anything with Windows :P
06:39:08kobi7Araq: say I wanted to port some code over to nim. Say also that I want to be adventurous and not do it manually. But still not tackle the whole thing. What are some good ideas for that?
06:40:04FromGitter<Varriount> kobi7: You could try using C2Nim
06:40:05kobi7Is there something like a frontend feature in nim? someLang -> NimAST -> Nim text ?
06:40:40kobi7thanks Varriount
06:40:41FromGitter<Varriount> Depending on how complex the code in question is, it can transform logic and such
06:40:57*kafke quit (Ping timeout: 258 seconds)
06:41:08kobi7it wasn't written in c though.
06:41:32kobi7I think I will use your suggestion for missing functionality like data structures etc.
06:41:43Araqpatch c2nim to do it, every curly braced language is close enough :P
06:42:42*kafke joined #nim
06:42:47kobi7i'll take a look at the sources.
06:43:18Araqwhat language are we talking about?
06:43:37*gokr joined #nim
06:44:20FromGitter<Varriount> Araq: Regarding Nimble files, what Package Control (sublime's plugin manager) does is group the files in folders, organized alphabetically.
06:44:50gokrPMunch: I was heavily involved in Squeak, even led the project for some time. So me being here in Nim is... kinda weird. Smalltalk and Nim are quite far from each other.
06:46:02Araqvarriount: I have no idea how to cut vids with HandBrake
06:46:16Araqisn't there a tool for idiots like me?
06:46:30PMunchWell gokr, they do share some ideas
06:46:41PMunchIn a roundabout way
06:46:43Araqshow the timeline, let me move sections, cut and paste
06:46:48gokrThe idea with SqueakMap (the package manager I built, still operational btw) was that since Squeakers all run the same "IDE", and it's also fully live and programmable - the meta model should also cover packages, but also developers etc.
06:46:55Araqwhat's so hard about that, UI-wise?
06:46:58PMunchAraq, use kdenlive :)
06:47:04PMunchIt's pretty easy to use
06:47:15FromGitter<Varriount> Araq: Hm, handbrake does encoding only.
06:47:25*kobi7 quit (Quit: Leaving)
06:47:28*kafke quit (Ping timeout: 255 seconds)
06:47:33gokrSo you could trivially in a Smalltalk textspace type things like "SqueakMap allPackages select: [:each | each canBeUpdated]" - or things like that.
06:47:41FromGitter<Varriount> Windows Movie Maker?
06:47:44PMunchAraq, or you could try Windows Movie maker :P
06:47:53PMunchHaha, nice one Varriount
06:48:12FromGitter<Varriount> I mean, if you want simple...
06:48:14gokrAraq: I use OpenShot, very nice to do things like that.
06:48:22PMunchHas it gotten any better in post XP versions of Windows?
06:48:24gokrNot sure if it runs on your platform though.
06:49:23gokrAraq: http://www.openshot.org/download/
06:49:25PMunchYeah OpenShot seems like a good alternative
06:49:44gokrIt's very nice, I have "produced" several videos of my daughter's figure skating competitions with that.
06:50:08gokrAnd it has nice trivial profiles for encoding in the end for youtube etc
06:50:54FromGitter<Varriount> gokr: Neat! I'd like to go skating (or for preference, skiing) at some point
06:51:26PMunchI've used lots of different editing software, and kdenlive is the one which hits closest to the "big boys" like Adobe Premiere and Sony Vegas
06:51:26FromGitter<Varriount> Not much chance to do it here on the east coast, despite all the hills.
06:51:40PMunchBoth of which are great tools by the way, but boy do they cost a pretty penny
06:54:38gokrVarriount: We go up north each year to ski, for about 1 week. It's a swedish thing - the "sport week" - all kids are on school leave. Me and Maya snowboard though.
06:55:09PMunchAraq, is there a way to disable an event handler in Karax?
06:55:17AraqI don't get OpenShot lol
06:55:25gokrAraq: ?
06:55:27AraqPMunch: don't add it after a refresh?
06:55:30PMunchgokr, nice snowboarding!
06:55:39Araqwhy are there 5 tracks?
06:55:48Araqwhy doesn't it run my video?
06:56:02gokrAraq: It's a two step thing - you need to to first "import" - then drag down onto the timeline.
06:56:05PMunchAraq, oh right Karax is completely redrawn after each thing
06:56:05Araqit says "preview" it's all black
06:56:07gokrIIRC
06:56:23gokrDrag your movie down onto the timeline.
06:56:35PMunchAraq, missing a codec or something perhaps?
06:57:04gokrI have version 1.4.3 though, not sure what you have.
06:57:21Araqit's a flv file
06:57:26Araqcould that cause problems?
06:57:37gokrNo
06:57:41gokrDon't think so.
06:57:48gokrSo you have it in the "Project Files" list?
06:57:53PMunchCan flv files cause anything but problems?
06:58:01gokrWhat about dragging it down onto the "Track 1" or "Track 2"?
06:58:03Araqgokr: yes
06:58:22AraqI did drag it
06:58:29Araqpreview is black
06:58:37gokrSo you got an "orange plate" on the track?
06:58:38*Laon joined #nim
06:58:52gokrRepresenting the clip I mean.
06:58:57Araqno a black rectangle
06:59:07Araqthat said, my firewall prevented some things
06:59:14Araqlet me try disabled
06:59:15gokrhmm.
06:59:41PMunchYour firewall prevented video playback? What kind of firewall do you have?
07:00:34gokrAraq: Just tried with an flv too - works just fine.
07:00:44gokrBut I get an orange "plate" on the Track, not a black one.
07:01:22gokrAraq: And if you right click on it, pick "Properties", you should see a bunch of meta data of the clip.
07:02:00gokrOh, wow. I use an ancient version :)
07:02:12*lastjedi joined #nim
07:03:03*Arrrr joined #nim
07:05:47*Yardanico joined #nim
07:07:12Yardanicohi everyone!
07:07:34Yardanicodom96, it seems you've already reported an issue with concepts in your book - https://github.com/nim-lang/Nim/issues/6108
07:11:05PMunchHmm, is there a way to forcibly override something?
07:11:40PMunchie. module 1 imports a proc helloWorld, I want to allow that as default but hove proc helloWorld from module 2 override it if it's loaded
07:12:26Yardanicowell simplest solution - you can do that with closures :)
07:12:40PMunchHmm, how so?
07:13:06YardanicoPMunch, in the first module you have "var myproc* = proc ...", and in the second file you do "myproc = proc ..."
07:13:13*yglukhov joined #nim
07:13:13*claudiuinberlin joined #nim
07:13:14Yardanicobut maybe this is a little bit hacky
07:13:33PMunchAah, that would actually work well enough
07:15:04*yglukhov_ joined #nim
07:15:09*yglukhov quit (Read error: Connection reset by peer)
07:15:10*yglukhov_ quit (Remote host closed the connection)
07:15:23*yglukhov joined #nim
07:15:25PMunchOh wait, this is a macro..
07:15:35Araqok kdenlive works
07:15:46Araqnice
07:15:52PMunchNice Araq
07:16:01YardanicoAraq, yay, will you upload your recording today?
07:16:04PMunchAre you editing your previous stream?
07:16:16Yardanicoyeah, he said he'll remove swear words & bad jokes :P
07:16:26PMunchBoooo
07:16:37PMunchMuch more fun with them :P
07:17:20PMunchBut I guess it gives me an incentive to look at the stream :P
07:21:31FromGitter<mratsim> So people start to notice my “Why rust fails hard at scientific computing” post: https://andre-ratsimbazafy.com/why-rust-fails-hard-at-scientific-computing/#comments
07:22:13*Vladar joined #nim
07:22:49Yardanicomratsim: btw, about arrays - you can any size array with third-party module :P
07:22:54Yardanico(in rust)
07:23:22FromGitter<mratsim> 2 years ago I couldn't
07:23:34Yardanicolol, https://andre-ratsimbazafy.com/why-rust-fails-hard-at-scientific-computing/#comment-3570217857
07:23:43Yardanicohis second point is not true because nim has arrays
07:23:50Yardanicoand they can be of (almost) any size :P
07:23:59Yardanicoand they don't need GC afaik
07:24:22Araqok, let's cut here within the sentence. there is no better solution. nobody will notice
07:24:29FromGitter<Bennyelg> hey anyone here worked with pandads before?
07:24:32FromGitter<Bennyelg> pandas*
07:25:31FromGitter<mratsim> yes
07:25:33FromGitter<mratsim> a lot
07:25:49FromGitter<mratsim> I breath pandas :P
07:25:50FromGitter<Bennyelg> My friend have an issue he has some dataframe with some field which is very long field
07:26:08FromGitter<Bennyelg> he gets it with yada yada and after 50 chars it gets ... dots
07:26:11FromGitter<Bennyelg> (3 dots)
07:26:28FromGitter<mratsim> it’s just display then no?
07:26:45FromGitter<mratsim> maybe PM me
07:27:00FromGitter<Bennyelg> how do I pm
07:27:44Yardanicoclick on mratsim's avatar
07:27:51Yardanicoand then click "chat privately"
07:30:40FromGitter<mratsim> done, problem solved :)
07:30:57FromGitter<mratsim> (it was a display option)
07:32:47SusWombatAnyone a idea why this code fails when i have gl.loadExtensions() in it? https://hastebin.com/otuzurexap.js
07:33:18SusWombati get https://gist.github.com/TheSuspiciousWombat/cc71c52335e61417d027587c8b9c9054
07:33:36PMunchCan I use "when defined" to check if a macro exists?
07:33:51Yardanicoyou can use when compiles probably
07:34:05Yardanico"when compiles(mymacro(stuff)):"
07:35:02*Arrrr quit (Quit: Leaving.)
07:35:16FromGitter<mratsim> wow this thread is depressing: https://www.reddit.com/r/programming/comments/76uk7a/you_fired_your_top_talent_i_hope_youre_happy/
07:36:16*user0 quit (Remote host closed the connection)
07:36:39*user0 joined #nim
07:37:17PMunchThanks Yardanico, works like a charm :)
07:38:45PMunchFun-fact, the font used in the "Medium" title is about 2000 euros for a high-traffic site
07:38:57*flyx quit (Quit: ZNC - http://znc.in)
07:39:31*flyx joined #nim
07:41:27*claudiuinberlin quit (Ping timeout: 240 seconds)
07:45:22miranBennyelg - your friend uses Jupyter Notebook? it is just a display
07:51:09SusWombatok got my problem resolved
07:59:14*jjido joined #nim
08:06:44AraqPMunch, when declared(mymacro)
08:07:28Yardanicooh
08:09:56PMunchAh, declared
08:10:05PMunchI knew there was some way to do it
08:10:14PMunchBut I found out there was a better awy
08:10:16PMunchway*
08:11:01Yardanicobtw, this is list comprehension from nimboost library (I "improved" it a bit) - https://gist.github.com/Yardanico/c37bf2236ce5665aba6fea3af6c82802
08:11:21Yardanicoyeah, code generated by macro is a bit horrible
08:11:32Yardanicobecause you don't need to specify types :P
08:16:51Araqok I still fail at Kdenlive
08:17:17AraqI want to *type* the start and the end of the video, before that and after that should be removed
08:17:46Araqit's too long for this pixel based cut nonsense
08:20:32euantorI don't know if there is a way to do that in kdenlive, though it's been a while since I had to use it
08:20:55euantorI believe you can jus use the mouse or the arrow keys to move the cursor to a start/top position and set a slice marker
08:21:33jjidoDoesn't it "zoom in" on your drag position?
08:22:52PMunchYou can zoom
08:23:09PMunchBut I think there is a way to split at a specific point
08:23:45PMunchOf course you can also use the frame by frame stepping buttons to position yourself and then cut
08:26:08gokrHum, 95 comments: https://www.reddit.com/r/rust/comments/76olo3/why_rust_fails_hard_at_scientific_computing/
08:27:19Yardanicoand 60 upvotes :)
08:27:53Yardanicoso they generally agree
08:29:32*jjido quit (Ping timeout: 260 seconds)
08:29:56*jjido joined #nim
08:30:53Yardanico"Personally i don't know of a language that has statically typed stack allocated arbitrary sized arrays. " does nim have that?
08:33:06euantorIf by arbitrary sized arrays they mean that they resize dynamically, no. Arrays are fixed size
08:35:00Araqyardanico: no but C99 and Ada come to mind
08:35:06Araqand Fortran too iirc
08:35:37Araqit's not that useful though, you cannot move things around when it's on the stack
08:35:53Araqso most languages use the heap for that.
08:36:08*lastjedi quit (Ping timeout: 246 seconds)
08:36:09Araqthat doesn't mean it has to be GC'ed though, C++ destructors work fine for this too
08:36:37Araqand Nim is getting better destructors ... :P
08:42:25gokrAraq: IIRC you said something about a new story on concurrency (or such) last week. In the parasail context. Anything to spill?
08:43:34*kafke joined #nim
08:45:33PMunchWhen you get a redefinition error it should really tell you were the last definition was
08:46:53PMunchRight now I'm getting a redefinition error for procedure that has a type named by a symbol from "genSym(nskType)" which should mean that it should never collide..
08:48:22*kafke quit (Ping timeout: 264 seconds)
09:00:21Calinouhi :) I compiled latest Nim HEAD, and I'm getting this when compiling a godot-nim project:
09:00:45Calinouhttps://paste.ee/p/zIk2S
09:00:45PMunchPlease use pastebin if it's a long output
09:00:51Calinouit's only 2 lines, but hastebin was failing me
09:00:57PMunchOkay good :P
09:01:16PMunchI was afraid you were about to paste in a whole compile-output
09:01:37PMunchHmm, that site is blocked by wy firewall..
09:01:42Calinoucompiling Nim itself works, same for a very simple program
09:01:48YardanicoC:\Users\hugol\.nimble\pkgs\compiler-#head\compiler\rodutils.nim(25, 14) Error: type mismatch: got (array[0..80, char], string, BiggestFloat)
09:01:53Calinouyeah, that
09:02:14YardanicoCalinou, did you compile against nim master or devel?
09:02:15Calinouthis is godot-nim by the way, https://github.com/pragmagic/godot-nim
09:02:19CalinouI'm on the master branch
09:02:19Yardanicoyeah, I know it :)
09:02:27Yardanicotry to compile nim from devel
09:02:28Yardanicohttps://github.com/nim-lang/Nim/commit/3308d265816b342a842e7cabef492a54ea722e74
09:02:34CalinouI'll try that
09:04:13Yardanicothe thing is
09:04:28Yardanicoif you've compiled nim from master branch, you should install "compiler" package from master branch too
09:04:32Yardaniconot from "head"
09:04:44Yardanicobecause otherwise they would have different versions
09:05:01Araqgokr: experiments are on-going, I don't want release something that is completely unfinished
09:05:21gokrAnd the oneliner hint on what it is? :)
09:05:38gokrI gather you are working on removing GC need for string, seq and... something.
09:05:51gokrBut ... not sure how that relates to concurrency.
09:06:26gokrBut oh, ok, yeah, I guess non-GC thingies are more easily shared of course.
09:09:58CalinouYardanico: how do I install that package from master branch? using Nimble, or…?
09:10:37YardanicoCalinou, probably "nimble install compiler@#master"
09:11:00Calinoualright
09:11:07Calinoudoesn't that just install the compiler using Nimble? rather than a manual Git clone
09:11:24YardanicoCalinou, yes, it just installs the compiler using Nimble
09:11:41CalinouI already have it installed, though
09:11:47Yardanicowell you have head version
09:11:57Calinouyeah, but I switched to the devel branch
09:13:04Calinouhttps://hastebin.com/elusazegoj.txt
09:13:05Calinou:(
09:13:12CalinouI get this with the #master compiler I just installed
09:13:22Calinoubut yeah, that's not the devel branch
09:18:28PMunchHmm, for genui I currently have three kinds of widgets "show" to show information, "edit" to have an editable field, and "call" to call procedures (typically a button). I now also want to add support for a selections, but I'm unsure if they should be a separate type or a special case of edit. They would work pretty much like an edit in that you change some variable, but only a set of options would be allowed.
09:30:14*Vladar quit (Quit: Leaving)
09:33:13Calinouendragor: oh, you're around, you might know the solution to this problem :P
09:33:15CalinouI thought you weren't on IRC
09:36:07YardanicoCalinou, you can also find him in godot discord
09:42:02AraqPMunch, can't export my video :-) 'melt.exe' not found
09:42:15Araqand then I copied that into shared/ and every DLL it might need
09:42:26Araqand it reports "success in 0s"
09:42:34Araqhaving done nothing whatsoever
09:42:49CalinouYardanico: oh, yeah
09:42:51YardanicoAraq, maybe you need to choose different type of export?
09:43:26Yardanicobut I worked with kdenlive only on linux :P
09:43:42Yardanicoso package manager installs everything beforehand
09:44:44AraqYardanico, no export type works
09:44:51Yardanicooh
09:45:59AraqYardanico, cannot use it on Linux my Linux package manager decided somebody has its lock and I cannot be bothered to fix it
09:46:21*Vladar joined #nim
09:46:47Araqsince everything else hardly works anyway
09:48:15YardanicoAraq, found on reddit:
09:48:15YardanicoThey misplaced the melt.exe. It is in the main directory when it should be in the share directory. Cut and past melt.exe into the share folder. That should fix that problem.
09:48:25Yardanicoten days ago
09:49:08Araqdid that, changed things from "cannot find melt.exe" to "lying"
10:05:12AraqYardanico, where are the poll results again?
10:05:24YardanicoAraq, http://www.strawpoll.me/14163114/r
10:06:49FromGitter<edubart> @Araq suggested an use case for the new destructors https://github.com/nim-lang/Nim/issues/6524
10:08:29Araq"reading and writing to stack memory is much faster" ... have CPU caches stopped working for heap memory? ;-)
10:10:44FromGitter<edubart> the first read/write can be slow, but the major slowdown is allocation/deallocation
10:11:06Araqthat's not how the hardware works, the cache is cacheline based and memory prefetchers do not look for specific address regions either. it's all about keeping things contiguous in memory
10:12:48Araqyou're right about the allocations
10:13:55FromGitter<edubart> in arraymancer we have gained speed ups by allocating on the stack, but we had to work with fixed lengths arrays atm
10:14:37FromGitter<edubart> I want to change later to variable length arrays in some hot areas to makes things more flexible
10:14:41endragorCalinou: try to remove all compiler packages from your nimble repo and build again. I guess this is the problem: https://github.com/nim-lang/nimble/issues/318 . You had older compiler#head trying to be compiled with newer Nim.
10:16:56Calinouendragor: done that, installed compiler#head, now I get https://hastebin.com/ibanupunuw.txt
10:16:58*JappleAck joined #nim
10:17:06Calinou(I did "nimble install godot")
10:25:37dom96yay, got my SNES classic edition finally
10:25:44endragorugh... try either using released Nim version without manually installing `compiler` package (just `nimble install godot`) or changeset eeb2661a28069c94b44cf965817709b0cd9886d7 (does work for me). There are several breaking changes in devel and I'll need to adjust godot-nim for them.
10:25:49endragorCalinou
10:27:35Yardanicodom96, nice!
10:28:01dom96Sadly my stock notifier didn't help me at all
10:28:35FromGitter<edubart> @Araq if the array is on the stack together with all the local variables on the stack too, means that everything is on the same contiguously memory region, potentially in the same cacheline, so reading/writing to stack memory could be faster than accessing and writing to distinct regions (if the array was on the heap)
10:29:48dom96Araq: At least enable archiving on twitch if it's going to take you this long to upload the videos
10:29:58Yardanicoyeah
10:30:06Yardanicoyou can export them directly from twitch btw
10:30:09Yardanicoto youtube
10:30:15dom96oh really? nice
10:30:26dom96I made this a showstopper https://github.com/nim-lang/Nim/issues/6108
10:30:43Yardanicoit's fixed in zahary branch
10:30:53dom96still deserves a showstopper label
10:30:59dom96it needs to be fixed in the next release
10:31:07Yardanicoit probably would
10:31:52Yardanicodom96, https://www.youtube.com/watch?v=7yBivc8DOus a video tutorial for exporting :)
10:34:23YardanicoI'm excited because @zahary also fixed concepts matching for arrays :)
10:34:43Yardanicoso we can have proper iterable concept working for all iterable-like types
10:36:20*sleepyqt joined #nim
10:44:26*kafke joined #nim
10:47:50Araqedubart: that only applies when the arrays are small
10:49:01*kafke quit (Ping timeout: 252 seconds)
10:49:55FromGitter<edubart> and that's my use case, usually use arrays of the size 4 or 2 ints, but want to be able to use with larger sizes
10:50:27Araqoh sorry
10:51:04YardanicoAraq, wait, is https://github.com/nim-lang/Nim/commit/ce2c795379c6b2101a28c5dc1f66dfda35858cbe a proper fix? I thought it should be fixed somewhere in the compiler, and not in the cgen/jsgen
10:51:16Yardanicobecause js would still have the same issue (however it can be fixed easily too)
10:51:58Araqzahary knows what he's doing
10:52:22Araqyou're right that JS could be affected too
10:52:33YardanicoAraq, it's easy to fix too - jsgen.nim line 1078
10:52:44Yardanicoadd tyUserTypeClasses here and done
10:53:36CalinouC:\Users\hugol\.nimble\pkgs\godot-0.6.1\godotapigen.nim(5, 17) Error: cannot open 'compiler\ast'
10:53:49CalinouI get this after deleting compiler#head from .nimble/pkgs, then compiling Nim at the commit endragor mentioned
10:54:02CalinouI'm a bit confused with the relationship between Nimble and the compiler, sorry
10:54:29YardanicoCalinou, well you don't neccesarily need to have compiler source with nim
10:54:40Yardanicoso you need to install it through nimble to allow packages to import compiler modules
10:54:57endragorCalinou: do `nimble install godot -d`
10:55:25Calinouwhat does -d do?
10:55:50Calinoulooks like it works! thanks
10:58:24endragorinstalls dependencies of the package - you had to reinstall them after deleting `compiler` package, because it's a dependency
11:10:47*livcd quit (Quit: Changing server)
11:14:51*livcd joined #nim
11:15:31*vlad1777d joined #nim
11:16:08Calinouendragor: might be more of a Nim question, but how do I use a setter that's in a node? such as `text` in label
11:16:22endragorlabel.text = "hello"
11:17:21YardanicoCalinou, any proc with the name like `somename=` is a setter
11:17:31Calinouwhat about getters? just "label.text"?
11:17:36Yardanicoyes
11:17:59Yardanicoif label.text is a proc, you can also call it like label.text()
11:18:02Yardanicobut label.text would work too
11:19:30Calinoualso, how does type conversion work? I have a proc which returns an int, and neither `myProc(40).string` or `string(myProc(40))` work, for concatenating with other strings
11:20:48YardanicoCalinou, $myvar
11:21:12Yardanicoit's conventional to name a procedure which converts your type to string as $
11:21:20Yardanicoalso it allows "echo" to work on your type
11:21:20dom96Nimble still depends on the compiler at runtime
11:21:33dom96or sorry, no, it depends on the stdlib
11:21:34dom96never mind
11:23:35Calinouwith this code, I'm getting an error on lines 14/16: https://hastebin.com/adunagopon.nim
11:23:45Calinouhttps://hastebin.com/isawofuzet.txt
11:24:33dom96I guess you need to create a Label somehow
11:24:44dom96Search for procedures/methods that return a Label
11:25:14Yardanicowell it's a method
11:25:20Calinouthat .nim file is attached to a Label node, so I shouldn't need to create any object
11:25:22Yardanicoan gdobj is a macro which generates godot type
11:25:50endragorCalinou: self.text = "Fibonacci(40) result: " & $fibo(40) & "\n"
11:25:52dom96oh right, so maybe you need to assign to .text?
11:26:22endragoror just `text = "blabla"` should also work I guess
11:26:45Calinouthis works :) sorry, I'm still a Nim beginner :P
11:26:58Calinou"self" isn't highlighted in VS Code, so I was confused
11:26:58dom96Calinou: Nice to see you getting into it again :)
11:27:08endragoralso better make those `proc` and not `method`. you only need `method` for what you override (like `ready`, `process`, etc)
11:27:15Calinou(also, I thought Nim didn't feature OOP?)
11:27:27Calinoulast time I checked, the features comparison page said it only had minimal OOP support
11:27:47endragor`gdobj` is a macro, it does stuff behind the scenes
11:28:20YardanicoCalinou, it does
11:28:31Yardanicomethod is a nim keyword
11:28:31Araqhmmm can we deprecate .this again? :P
11:29:04YardanicoAraq, why? :)
11:29:26dom96Calinou: What do you consider OOP?
11:29:34Araqit's implemented as a func/proc call rewrite rule
11:29:36dom96Nim supports inheritance and dynamic dispatch
11:29:50Araqand I'd like a different unrelated rewrite rule
11:30:07Yardanicowell you're free to do everything you want, I don't think this is used very often
11:30:14Yardanicobut it allows to type less code :D
11:30:19cremI'm totally fine with python's explicit 'self' approach, let's deprecate .this!
11:30:19Yardanico5 chars less lol
11:30:33Yardanicobtw, if someone didn't vote yet - http://www.strawpoll.me/14163114
11:30:41Yardanico(for araq's live stream)
11:30:47cremLive stream??
11:30:51Yardanicoyes
11:30:56Araq"introduce yet another rewrite rule, take one away" seems fair to me
11:31:00cremNever heard of those.
11:31:06Araqconsidering language complexity
11:31:21Yardanicocrem, two streams by dom96 - https://www.youtube.com/user/d0m96
11:31:27Yardanicoand also Araq has already streamed twice
11:31:27dom96crem: https://www.youtube.com/watch?v=583BwZ7uSro&index=1&list=PLm-fq5xBdPkrMuVkPWuho7XzszB6kJ2My :)
11:31:31Yardanicobut his videos are not yet uploaded
11:31:57FromGitter<Bennyelg> I need to think about the next package for nim
11:32:13AraqBennyelg: do you work on improving the forum?
11:32:29cremuh, 3 hours..
11:32:38Yardanicocrem, well like any other programming stream :P
11:33:03Yardanicoyeah, I would like to see forum in the new design
11:33:14Yardanicobecause it may be confusing that the forum has old design, while website has a new one
11:33:19dom96crem: Check the description for some timestamps
11:33:33cremYeah, I don't know in which mode I should be to watch it. It's probably not very entertaining to listen it audio-only while travelling in a train.
11:33:50FromGitter<Bennyelg> @Araq I would love to try
11:34:24FromGitter<Bennyelg> I can do some bootstraping it
11:34:49YardanicoI think nim forum mostly needs design improvements
11:35:02Yardanicoserver part is (almost) ok
11:35:11Araqyes. well
11:35:23Araqdesign improvements are most important IMO.
11:35:31FromGitter<Bennyelg> I can do that I guess
11:35:34Yardanicobtw nim forum has more than 20,000 posts
11:35:45Yardanicoand more than 3k posts :P
11:35:46Araqwhatever else you improve, do not touch the database model
11:35:54FromGitter<Bennyelg> Did you saw the forum I created with nim?
11:36:01FromGitter<Bennyelg> I posted some pictures few days ago
11:36:09Araqyeah that's why I'm asking
11:36:12FromGitter<Bennyelg> still need more adjustments but its pure nim + jester
11:36:27AraqI thought it were about improving Nim's forum :P
11:36:45FromGitter<Bennyelg> :D nah I did it fresh to learn nim along the way
11:37:15FromGitter<Bennyelg> I must improve in-order to start fixing bugs
11:37:20dom96Please use something like Bulma for the new design
11:37:26Araqbut yes, do not touch the DB model or the data itself.
11:37:49FromGitter<Bennyelg> No of course, I'll fork the project and touch the design here and there and lets see
11:38:01Araqgreat, thanks
11:47:11Araqdom96: ah great idea with the timestamps
11:47:26FromGitter<Bennyelg> @Araq @dom96 I ran createdb which went fine
11:47:39FromGitter<Bennyelg> I can't run forums, I need to compile it right?
11:47:51Araqbennyelg: I think you also need to run editdb
11:48:32FromGitter<Bennyelg> @Araq No I dont, ( unhandled exception: index PersonStatusIdx already exists) if I try to run it.
11:48:43FromGitter<Bennyelg> too bad, I implemented to my forums a small migration system
11:50:39euantorI started looking at the forum, but ran out of time to do much
11:50:59euantorI also implemented a migration system for work, but need to clean it up and make it work with DBs other than db_mysql
11:51:40Araqbennyelg well then you need to create an admin or something and start posting things
11:52:36FromGitter<Bennyelg> @euantor how do you raise up the forums?
11:52:57euantorDo you mean get it running?
11:53:05*yglukhov quit (Remote host closed the connection)
11:53:07FromGitter<Bennyelg> Yes, I ran the createdb
11:53:08FromGitter<Bennyelg> now what?
11:53:31euantorSo you did `nim c -r createdb`?
11:53:36FromGitter<Bennyelg> Yep
11:53:43FromGitter<Bennyelg> went fine but now what
11:53:43euantorNow do `nim c -r forum`
11:53:47euantorand it should work
11:53:49FromGitter<Bennyelg> I tried
11:54:06FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e5ef5ebbbf9f1a386fe9dd]
11:54:36euantorhm
11:54:55FromGitter<zacharycarter> @TheSuspiciousWombat Sorry I missed your message - I am not aware of such a site. GLFW3 is callback based where as SDL2 is event based so their APIs differ a bit. I've been able to google most discrepancies but at this point I'm pretty familiar with both APIs so if you ask in here I can most likely tell you
11:54:56euantorI haven't done any work on it in ages, it's possible there's been an update that's broken it
11:55:13FromGitter<Bennyelg> @ :(
11:55:25FromGitter<Bennyelg> Date: Sat Oct 7 16:38:59 2017 +0100 ⏎ ⏎ ```Merge pull request #107 from stisa/remove-cairo-dep ⏎ ⏎ Remove cairo from .nimble deps``` [https://gitter.im/nim-lang/Nim?at=59e5efad614889d475c5fa90]
11:55:32FromGitter<Bennyelg> my last commit
11:55:37FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e5efb9210ac26920f8192d]
11:56:55Yardanicoseems to be a gcsafe issue
11:56:55*yglukhov joined #nim
11:57:00YardanicoI bet it is 100%
11:58:02Yardanicooh wait it uses jester
12:01:00Yardanicowell
12:01:05*yglukhov quit (Ping timeout: 240 seconds)
12:01:08Yardanicoforum works for me
12:01:10Yardanicoon nim devel :)
12:01:19FromGitter<Bennyelg> I'm using nim delvel
12:01:21FromGitter<Bennyelg> devel
12:01:23FromGitter<Bennyelg> 1) 7.13
12:01:29FromGitter<Bennyelg> 1) 17.3
12:01:30FromGitter<Bennyelg> *
12:01:41FromGitter<Bennyelg> post me the log of our commands
12:01:46FromGitter<Bennyelg> history |
12:02:15YardanicoI cloned it
12:02:18Yardanicodid "nimble install"
12:02:26Yardanicothen nim c -r createdb
12:02:32Yardanicoand then ./forum to run the forum binary
12:02:51FromGitter<zacharycarter> @dom96 thanks for the kind words :D
12:02:56YardanicoLOL https://github.com/nim-lang/nimforum/blob/27a1305b2d669f69f5f3e4576c4051a7fecec244/ranks.nim#L5
12:03:02Yardanicowtf
12:03:28FromGitter<Bennyelg> funny troll
12:04:06FromGitter<Bennyelg> done
12:04:07FromGitter<Bennyelg> work
12:05:09Yardanicohttp://178.205.91.184:5000/ if you want to see a fresh instance of nimforum :P
12:05:28Yardanico(my IP is dynamic anyways so I can just re-plug my ethernet cable and IP will change)
12:05:28FromGitter<Bennyelg> Yea i got it too
12:07:17FromGitter<Bennyelg> My Forums Is Much more Idiomatics :D But i''l work on it
12:07:43FromGitter<Bennyelg> Of Course the credit is to @dom96 and is book
12:07:49Yardanicowhat do you mean by "idiomatic" ? :)
12:08:12FromGitter<Bennyelg> Mean, designed better
12:09:14Yardanicobtw http://reign-studios.net/philipwitte/ doesn't work
12:11:52YardanicoBennyelg: nimforum is at least 5 years old
12:11:59Yardanicohttps://github.com/nim-lang/nimforum/commit/b82d2ea9a6ac8de69faa090d73e47cd570165f16
12:12:07Yardanicohttps://github.com/nim-lang/nimforum/commit/6476dc7cbbe3f04f1b818fb4a71053342bd4f512
12:12:52Yardanicobtw, how does "0 of 2155 users online" work?
12:13:10YardanicoI keep refreshing the page while being logged in, but it's still 0
12:15:43AraqYardanico: it doesn't work for the live version either :-)
12:15:59Yardanicowell I was talking about live version :P
12:18:27*dddddd joined #nim
12:18:44PMunchSorry Araq, I was AFK. Never had any problems like that with kdenlive, so can't really help with a fix. But then again as Yardanico said I've only been using it on Linux where the package manager does everything in order to make the program work. Package lock is probably caused by something not exiting properly and can usually be fixed by simply deleting the lock file :)
12:18:59Yardanicoyeah
12:19:24AraqI know but I couldn't bothered to google where it resides in
12:19:49*yglukhov joined #nim
12:20:36Araqmy default is /etc/bananajoe/local/share/usr/opt/liblibbin
12:21:24Araqbut unfortunately nothing uses that path
12:22:44YardanicoAraq, what is your linux distro?
12:23:05*ShalokShalom_ joined #nim
12:23:47AraqBizzaroLinux version 0xFAC :D
12:24:02Araq(Ubuntu)
12:26:00Yardanicouse your force :P
12:26:00Yardanicosudo rm /var/lib/dpkg/lock
12:26:01*ShalokShalom quit (Ping timeout: 240 seconds)
12:26:27Yardanicoor sudo rm /var/lib/apt/lists/lock
12:26:37*koranza joined #nim
12:27:01Araqsee? I was close
12:29:25Yardanicousually if you have a lock file it means that you've shut down your pc while running dpkg or apt-get
12:29:29Yardanicoor you Ctrl+C'ed it
12:30:15*PMunch_ joined #nim
12:31:19*PMunch quit (Ping timeout: 252 seconds)
12:36:26Araqwell it's in a VM, it can crash all it wants to
12:37:19Demos[m]God ubuntu is so annoying
12:38:35Demos[m]Everyone uses it because it’s “compatible” which means I have to dive through 1000 lines of bash to figure out how to do anything
12:41:46Yardanicoubuntu is falling
12:41:52Yardanicoit's no longer the most popular linux distro
12:42:41Yardanicohttp://distrowatch.com/dwres.php?resource=popularity
12:44:07koranzaHey @Araq, idk how much editing you want to do, but if you just want to trim a video, the easiest software to use imho is avidemux. https://www.howtogeek.com/howto/42107/how-to-quickly-cut-a-clip-from-a-video-file-with-avidemux/
12:44:20koranzaBonus: it's cross platform so you can avoid linux if you want
12:44:35*PMunch__ joined #nim
12:44:51*PMunch__ is now known as PMunch
12:45:15*kafke joined #nim
12:47:05*PMunch_ quit (Ping timeout: 246 seconds)
12:50:10*kafke quit (Ping timeout: 264 seconds)
12:50:21Araqkoranza: thanks will give it a try
12:50:56Demos[m]Isn’t mint ubuntu based?
12:52:00cremIt is.
12:53:10Yardanicoalso for some reason manjaro is gaining popularity
12:53:24Yardanico(it's an arch-based distro with it's own arch-based repos)
12:54:03Yardanicobut I just use antergos so you get hassle-free install and all arch repos :P
12:54:27cremArch is suprisingly good. Takes time during first week to set everything up, but after that everything is under control and rarely breaks. On other hand ubuntu broke quite regularly for me after update, with whole weekend spent to recover.
12:54:51Yardanicowell antergos didn't break for me
12:55:17Yardanicocrem, how many packages you have installed ? :)
12:55:35Demos[m]I like arch for dev systems
12:55:43Demos[m]I like fedora/rhel/suse for headless boxes
12:56:05cremI don't know. Individual packages do break, especially as it's not tested for stability, but that's ok.
12:56:19Yardanicocrem, I mean try to run "screenfetch" :)
12:56:44cremI'm not at home now, so cannot.
12:57:23cremThere was that buggy libsdl 2.0.6 released recently, buggy as hell, broke many things. Their release procedure is weird.
12:57:53Araqcrem: they also introduce new major features in a point release :-)
12:58:30cremThey have yearly releases, and no QA. Just "if anyone sees any bugs, please report it before release" approach. And as noone uses new lib version before release, noone sees bugs.
12:58:53cremyes
12:59:41Araqhuh that problem sounds familiar
13:00:09Araqit's why I like a tick-tock model for development.
13:00:23FromGitter<Bennyelg> anyone watching this? ⏎ https://github.com/kostya/benchmarks
13:00:26dom96FWIW I used avidemux
13:00:43YardanicoBennyelg: microbenchmarks? :) nah
13:01:12Yardanicobut nim is nice there
13:01:13euantorOpenShot has a Windows verison too and has been pretty good in my experience
13:01:14cremThey actually going to make an exception and release bugfix 2.0.7. But during first few weeks after 2.0.6 release they said that ok, there are bugs, they will be fixed in 2.0.7 in a year.
13:02:10FromGitter<Bennyelg> I'm wondering how we "lossing" for rust and crystal all the way
13:02:46Yardanicowell rust maybe is a little bit faster
13:02:53Yardanicobecause it requires you to write a LOT of additional things
13:03:47AraqBennyelg: mostly because nobody cares I think
13:03:54Yardanicoit's not fair also:
13:03:54Yardanicohttps://github.com/kostya/benchmarks/blob/master/brainfuck2/bf.cr
13:03:57Yardanicohttps://github.com/kostya/benchmarks/blob/master/brainfuck2/bf.nim
13:04:20Yardanicowhy the hell would you do a StringIterator in nim?
13:05:41FromGitter<Bennyelg> interesting
13:05:44Yardanicoomg crystal is so slow at compiling
13:05:54FromGitter<Bennyelg> you got crystal installed?
13:05:57Yardanicoyep
13:06:01FromGitter<Bennyelg> hehe
13:06:04Yardanicobut from package manager :)
13:06:07FromGitter<Bennyelg> so modify the bf and run it
13:06:11Yardanicoyeah
13:06:20FromGitter<Bennyelg> let win this ":P
13:06:34Araqyeah well it's nice if somebody can look into these
13:06:58Araqthat said, I'm still looking for benchmarks that make sense
13:07:02*lastjedi joined #nim
13:07:28*firstjedi joined #nim
13:07:30Yardanicowell IDK
13:07:34Yardanicoah wait
13:07:40Yardanicoin brainfuck2 nim is already faster than crystal
13:08:36FromGitter<Bennyelg> @Araq if you see benchmarks and you don't like the nim code posted , dont care about how legit the benchmark just lets be sure we provide the best nim code exists for the benchmark case
13:08:52FromGitter<Bennyelg> @Yardanico post me the times
13:09:04Yardanicowell it's as in the main repo
13:09:09Yardaniconim is ~2 sec for me
13:09:12Yardanicocrystal is ~2.4 sec
13:09:36FromGitter<Bennyelg> you modifed the nim code
13:09:37FromGitter<Bennyelg> ?
13:09:41Yardaniconot yetg
13:09:55FromGitter<Bennyelg> lol, maybe he ran it without -d:release ?
13:09:59euantorThe abse 64 one is easy to fix
13:10:05YardanicoBennyelg: no
13:10:10Yardanicoit's the same as in kostya benchmarks
13:10:15euantorAdd a version that doesn't split the encoded data into lines and you immediately see an improvement
13:10:19Yardanicoyeah
13:10:46miranAraq: i know i've seen that benchmarks repo and it was one (more) reason to try nim, so - even if those "doesn't make sense", it might be good to provide them with as-fast-as-possible versions
13:11:05*lastjedi quit (Ping timeout: 240 seconds)
13:11:25miranfor newcomers like me who are gathering information about which language to try out nex
13:11:35Araqpoint taken.
13:11:52Araqbut that's one reason I'm looking for a decent one
13:12:04Araqnot to win it
13:12:35Araqto see performance regressions
13:13:33miranthere is also http://benchmarksgame.alioth.debian.org/ which is quite popular (often mentioned), but has no nim examples
13:13:41Yardanicoyes
13:13:43Yardanicoand they won't add it
13:14:01dom96maybe it's time we create our own benchmarks... kostya is a crystal user AFAIK, wouldn't be surprised if there is some bias ;)
13:14:34Araqwe can easily host some benchmark site, I think.
13:14:50Araqthe problem is you'll be overwhelmed with PRs you need to carefully review all the time
13:15:03Araqand every benchmark needs clear rules
13:15:30def-miran: https://github.com/def-/nim-benchmarksgame
13:15:30mirani'll take a look at kostya's nim examples, but i'm just a nim beginner so most probably won't be able to provide any better versions than those already there
13:15:43def-miran: and I also improved the one in kostya's repo
13:16:16AraqI have a string concat benchmark where Nim beats C++. Now what? :P
13:16:40def-but like Araq said, benchmarks are not so useful
13:16:56Araqgcbench is useful
13:17:01miranthe reason to post to already published benchmark repos (instead of hosting nim's own) is higher visibility for people outside of nim world (potential new users)
13:17:27Araqmiran: you don't need to host it on Nim's own site
13:17:39def-Araq: sure, but comparing C, D, C++, Nim, Crystal in micro-benchmarks mostly isn't. If one of them gets faster, you can take their idea and implement it in the other language and end up with the same performance usually
13:17:52Yardanicobtw, maybe these benchmarks will improve after destructors and moving instead of copying
13:17:56dom96Problem is that people look at kostya's repo and think "omg Nim is actually slower than these languages"
13:18:06Araqthe problem is not hosting, the problem is it quickly becomes a fulltime job
13:18:47FromGitter<Bennyelg> Hehe well I drop a bomb , nice conversation
13:18:53Yardanicofor some reason D is the fastest at JSON benchmark
13:19:26def-heh, last time I looked at kostya benchmarks Nim was around the top in most
13:19:36Araqwe need to fix Nim's memory consumption for some of these benchmarks
13:19:49Araqthat's concerning me.
13:20:01Yardanicoyeah, json benchmarks takes 1.3gb of RAM
13:20:01Araq1GB where others only use 300MB
13:20:07FromGitter<Bennyelg> I also looked at the memory consumption
13:20:11YardanicoAraq, but sometimes nim takes less than others :)
13:20:23Yardanicohttps://github.com/kostya/benchmarks#brainfuck-v20 nim is slower than top 3, but takes less RAM
13:20:30FromGitter<Bennyelg> looks like the json library needs refactoring
13:20:42Yardanicorefactoring?
13:20:45Yardanicomaybe optimizing? :)
13:20:50Araqthe json library uses OrderedTables which need to be improved
13:20:53def-for json: needs an iterator instead of loading the whole data structure into memory
13:21:06Araqoh yeah! good point
13:21:13def-at least that's how the ones with 1-3 MB did it
13:21:18Yardanicohow does D work then?
13:21:31Yardanicoah yes
13:21:34Araqwhen your working set is only 1-3MB it's no wonder you win
13:21:43Yardanicoit probably loads json data on request
13:21:43Araqmemory usage often equals speed
13:22:03miranmakes sense
13:22:11Yardanicowell for some strange reason kotlin is the best(!) at brainfuck 2.0 with 28mb memory consumption
13:22:22Yardanicomaybe cpu speed vs ram tradeoff
13:23:18*couven92 joined #nim
13:24:12Araqnative kotlin or jvm kotlin?
13:24:41miranYardanico: you said "why the hell would you do a StringIterator in nim?" - could this benchmark be improved or is it just cosmetics?
13:25:15Yardanicomiran, well I don't really know, it seems it's useful there
13:25:24Yardanicoor not
13:25:28YardanicoI'll try to remove it
13:25:51YardanicoAraq, seems to be JVM kotlin
13:26:13Araqwell bbl
13:26:15FromGitter<Bennyelg> as @Yardanico the one who catch my eyes were kotlin
13:26:23FromGitter<Bennyelg> bbl = ?
13:26:49def-"be back later"
13:27:06FromGitter<Bennyelg> go improve it :D
13:27:07FromGitter<Bennyelg> hehe
13:28:03FromGitter<Bennyelg> this benchmark also catch my eyes. ⏎ https://github.com/kostya/benchmarks/blob/master/matmul/matmul.nim
13:29:23miranwhat about it Bennyelg?
13:29:48*ShalokShalom_ is now known as ShalokShalom
13:30:41FromGitter<Bennyelg> How can Interpreted language does that on 0.11 seconds
13:31:15Yardanico"Julia Native Thr"
13:31:27Yardanicofirstly - julia is meant for scientific computations
13:32:30*UxerUospr joined #nim
13:34:43mirandef-: just took a time to look at your benchmark repo - nice collection there!
13:35:29*jjido quit (Ping timeout: 248 seconds)
13:35:35*Laon quit (Ping timeout: 240 seconds)
13:39:50Yardanicooh wait lol
13:39:58YardanicoI found a compiler crash
13:40:29Yardanicoseems to be a stack overflow
13:57:46*PMunch quit (Quit: Leaving)
14:15:48*user0 quit (Remote host closed the connection)
14:16:16*user0 joined #nim
14:17:54*couven92 quit (Quit: Client disconnecting)
14:27:25*miran left #nim (#nim)
14:28:10*endragor quit (Remote host closed the connection)
14:28:36*endragor joined #nim
14:32:48*endragor quit (Ping timeout: 240 seconds)
14:40:31*sleepyqt quit (Quit: Leaving)
14:43:38*sleepyqt joined #nim
15:11:59enthus1asthi guys, we've written a small SOCKS5 server and client. Check it out :) https://github.com/enthus1ast/nimSocks
15:12:19federico3oh nice
15:13:41Yardanicoenthus1ast, yeah, I saw it :) nice
15:14:10Yardanicohttps://github.com/search?q=language%3ANim+created%3A2017-10-17
15:15:01*nsf quit (Quit: WeeChat 1.9)
15:15:19enthus1astah nice to bookmark Yardanico
15:16:57enthus1astto use the client with httpclient oa. the socket must be exported i think
15:21:19Araqwhen isBlob(T)
15:21:20Araqvs
15:21:25Araqwhen isPod(T)
15:21:30Araqwhich name is better?
15:21:48enthus1astwhat is pod?
15:21:59*d10n-work joined #nim
15:22:04Araq"plain old data" iirc
15:22:16cremWhat's the difference of blob/pod vs non-blob/pod?
15:22:32cremCan be memcopied safely?
15:23:16Araqhttps://stackoverflow.com/questions/4178175/what-are-aggregates-and-pods-and-how-why-are-they-special/7189821#7189821
15:23:25Araqexactly, crem nails it
15:23:40Araqmaybe it should be memCopyable(T) ?
15:24:47cremI think that "pod" is C++-specific name. "Old" there means "something from old C, not modern C++".
15:24:58cremOn the other hand, I don't like blob either. :)
15:25:20cremblob means "chunk of bytes without structure" for me.
15:25:52Araqthat's quite on point though
15:26:19Araqyou can only do the required type erasure for copyMem if they have no structure
15:26:33cremWhat is blob/pod in nim? Doesn't have refs/ptrs in it? Doesn't have refs/ptrs into it?
15:26:51Araqwell Nim has no such concept yet
15:26:59Araqthere is "contains GC'ed data"
15:27:23Araqwith affects closures, refs, seqs, strings and their transitive closure
15:27:58AraqI think I'll go with memCopyable for now
15:28:28Araqor maybe allowsCopyMem
15:30:30FromGitter<Varriount> Araq: "supportsMemcopy"?
15:30:56FromGitter<Varriount> Or "canMemcopy"
15:31:04Araqit's system.copyMem
15:31:10AraqcanCopyMem ?
15:31:32AraqsupportsCopyMem(), no need to keep it short, it's rarely used
15:32:03enthus1asti can copy mem when its in the same thread?
15:32:07YardanicoAraq, sorry for me being annoying, but when your next stream will be ? :) we have 24 votes here - http://www.strawpoll.me/14163114/r it's 4% of people who did nim community survey :P
15:32:10*gokr quit (Ping timeout: 255 seconds)
15:33:04*sleepyqt quit (Ping timeout: 255 seconds)
15:33:15AraqYardanico: I dunno if I'll do it tonight or on Thursday night
15:34:05FromGitter<Varriount> Araq: It might be best to use the term which could be grouped with other, similar classifications
15:34:07*sleepyqt joined #nim
15:34:34Araqwhen supportsCopyMem(T): copyMem(x, y, sizeof(T)) # obviously correct code
15:34:41FromGitter<Varriount> If you need to add other classifications (deletable, etc)
15:50:53YardanicoAraq, wait, if we will have destructors for every type, we don't need GC? except for cyclic data?
15:55:09Yardanicoor GC will run only for user types if user didn't provide a destructor?
15:55:42*flyx quit (Quit: ZNC - http://znc.in)
15:56:10euantorGC will call the destructor I would think
15:56:37euantorif it's anything like destructors from any other language
15:56:41*flyx joined #nim
15:57:48Yardanicoeuantor, but it seems that destroyer compiler pass will inject destructor calls in the code
15:57:54Yardanicohttps://github.com/nim-lang/Nim/blob/devel/compiler/destroyer.nim
15:58:02Yardanico"Injects destructor calls into Nim code "
15:58:07*JappleAck quit (Ping timeout: 260 seconds)
15:58:24euantorI've not been following it, but that would make sense when the lifetime of an object can be worked out at compile time
15:58:45Yardanicowell this is probably what araq is doing :)
15:58:55euantorlooks like it
15:59:32euantorI was guessing it was more like C#'s destructors which are functions called when an object is cleaned up by the GC. The function would then close file handles etc.
16:00:08euantorAnd Nim already has destructors that are similar: https://nim-lang.org/docs/manual.html#type-bound-operations-destructors
16:00:20Yardanicoyeah
16:00:37*flyx quit (Client Quit)
16:00:46*flyx joined #nim
16:00:57euantorAnd when it's a ref object you use a finalizer. I guess the new destroyer will call those finalizers too
16:01:24euantorpretty cool :D
16:01:30Yardanicoeuantor, well firstly Araq wants to implement GC-free strings and sequences :)
16:01:46Yardanicohe already tried it for strings, but he said that his gc-free strings were a bit slower than current nim strings
16:02:25Yardanicoeuantor, the example of new destructors - https://github.com/nim-lang/Nim/blob/devel/tests/destructor/tcustomstrings.nim
16:02:27euantorI don't do much low level stuff at all, but I honestly haven't encountered any GC issues in Nim yet. SO long as that doesn't change I'm happy ;)
16:02:41Yardanicocompile with nim c --newruntime tcustomstrings.nim
16:02:48Yardanicoif you have a devel version
16:02:54euantorI'm at work, so can't
16:03:02euantorwill try and remember to look at it later
16:05:34Yardanicoand also it's already cool that nim allows you to use whole stdlib even if you've disabled GC
16:05:38Yardanicobut memory will just leak :)
16:06:11Yardanicoso it would be useful for this use-case: https://groups.google.com/forum/message/raw?msg=comp.lang.ada/E9bNCvDQ12k/1tezW24ZxdAJ
16:07:12AraqYardanico: lol yeah I read that one before, super interesting use case
16:08:29*kafke joined #nim
16:08:48*Trustable joined #nim
16:13:26Yardanicoalso I really like that we can still access all these emails through google
16:15:17*JappleAck joined #nim
16:16:15*user0 quit (Quit: user0)
16:18:13UxerUosprhow should I include a type for use in multiple files in a module without causing a recursive module depency? Should I split it out into a separate file and import it into every other or is there a better way?
16:18:22*gokr joined #nim
16:18:48*user0 joined #nim
16:19:42YardanicoUxerUospr, the simplest way would be to split this type into a separate file
16:20:08Yardaniconim supports recursive module dependency
16:20:11Yardanicobut it can break
16:20:46UxerUosprYardanico: Thanks! That's what I'll do
16:20:52FromGitter<mratsim> @BennyElg for the Kostya matmul benchmark, Julia Native Thread is calling Fortran behind the scene
16:21:24FromGitter<mratsim> Arraymancer also has the same speed if I call the Fortran lib
16:22:08FromGitter<mratsim> They have been tuned for 20 years and were the work of many PhDs (aka BLAS, Basic Linear Algebra Subroutines)
16:24:44*smt joined #nim
16:26:10*vlad1777d quit (Ping timeout: 252 seconds)
16:30:35*JappleAck quit (Read error: Connection reset by peer)
16:33:56shodan45oh look, another C replacement language.... http://ziglang.org/
16:34:21Yardanicog competes with C instead of depending on it. The Zig Standard Library does not depend on libc.
16:34:23*yglukhov quit (Remote host closed the connection)
16:34:24Yardanicothat's nice
16:34:30Yardanico(does not depend on libc)
16:34:38Yardanicobut otoh it's not nice
16:35:23*yglukhov joined #nim
16:35:25shodan45Yardanico: make up your mind :P
16:35:50YardanicoI mean it's nice because it shows that language is quite capable of doing things
16:36:00Yardanicoon the other hand it means that it probably would be slower and would have more bugs
16:36:01Yardanicothan libc
16:36:10shodan45"in a surprise move, instead of libc, zig depends on ruby!"
16:36:53shodan45sorry, I'm in a goofy mood
16:39:14Yardanicoalso it has ReleaseSafe and ReleaseFast
16:39:37*NimBot joined #nim
16:39:50*yglukhov quit (Ping timeout: 246 seconds)
16:40:47*vlad1777d joined #nim
16:42:41*user0_ joined #nim
16:42:42*user0 quit (Read error: Connection reset by peer)
16:42:45*user0_ is now known as user0
16:43:17Yardanicolooks a bit weird :) http://ziglang.org/documentation/master/#case-study-printf
16:45:04FromGitter<BigEpsilon> Hi, I get this error when trying to compile c2nim (master branch) : .nimble/pkgs/compiler-#head/compiler/rodutils.nim(25, 14) Error: type mismatch: got (array[0..80, char], string, BiggestFloat) ⏎ ⏎ ``` ... but expected one of: ⏎ ... proc c_sprintf(buf, frmt: cstring)``` ⏎ ⏎ Any idea ? [https://gitter.im/nim-lang/Nim?at=59e63390f7299e8f53fba522]
16:45:44Yardanicoyeah
16:45:46*dhalinar joined #nim
16:45:48Yardanicoupdate your compiler package :)
16:45:52Yardanicofrom nimble
16:46:00FromGitter<BigEpsilon> nimble update ?
16:46:04Yardanicoprobably
16:46:12Yardanicoah, no
16:46:25Yardanicotry "nimble install compiler@#head"
16:46:36Yardanicoor "nimble uninstall compiler", "nimble install compiler@#head"
16:46:57YardanicoIn recent nim devel implicit array[char] -> cstring conversion was removed, that's why
16:49:23FromGitter<BigEpsilon> thanks !
16:49:26FromGitter<BigEpsilon> it works
16:49:30FromGitter<BigEpsilon> well almost
16:49:34FromGitter<BigEpsilon> c2nim.nim(87, 17) Error: type mismatch: got (PNode, string) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e6349ed6c36fca31628b47]
16:50:05FromGitter<BigEpsilon> but that in c2nim so I will try to correct it
16:50:13FromGitter<Yardanico> hmm, what's your compiler version?
16:50:32FromGitter<BigEpsilon> I'm on head
16:51:03FromGitter<BigEpsilon> Nim Compiler Version 0.17.3 (2017-10-11) [Linux: amd64] ⏎ Copyright (c) 2006-2017 by Andreas Rumpf ⏎ ⏎ git hash: bedc9e4e6de3c536c6ef6b7ff6b1874aac5b29ba [https://gitter.im/nim-lang/Nim?at=59e634f65c40c1ba79b1582c]
16:51:21FromGitter<BigEpsilon> and the compiler as lib is also on head
16:51:39FromGitter<BigEpsilon> just updated it with the help of Yardanico
16:52:12YardanicoI'm the same Yardanico :P
16:52:38FromGitter<BigEpsilon> oh ....
16:52:43*gokr quit (Ping timeout: 255 seconds)
16:52:55FromGitter<BigEpsilon> the gitter ghost of him :)
17:04:17FromGitter<BigEpsilon> ok found the problem, will do a PR tomorow
17:05:50*nsf joined #nim
17:07:05*firstjedi quit (Ping timeout: 240 seconds)
17:09:03*koranza quit (Remote host closed the connection)
17:09:11*lastjedi joined #nim
17:09:42*firstjedi joined #nim
17:09:55*firstjedi quit (Max SendQ exceeded)
17:10:26*firstjedi joined #nim
17:13:26*lastjedi quit (Ping timeout: 246 seconds)
17:18:12*gangstacat quit (Quit: Ĝis!)
17:18:34*yglukhov joined #nim
17:23:02UxerUosprUsing db_postgres getValue(...) I get "row number 0 is out of range 0..-1
17:23:11*yglukhov quit (Ping timeout: 248 seconds)
17:23:12UxerUosprwhen there isn't a value
17:23:15UxerUosprin the table
17:23:23UxerUosprHow should I handle that?
17:26:17Calinou<dom96> Calinou: What do you consider OOP?
17:26:25Calinouclasses (with methods/attributes) and the like
17:26:34Calinouwith inheritance (at least)
17:26:59CalinouI know I'm following a Java course at uni (we'll probably end up writing another https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition :D), but Nim not supporting full-blown OOP is fine to me
17:27:05FromGitter<BigEpsilon> @Araq , a little fix for c2nim https://github.com/nim-lang/c2nim/pull/113
17:28:54*user0 quit (Quit: user0)
17:28:56*rauss quit (Quit: WeeChat 1.9.1)
17:29:01*dhalinar quit (Ping timeout: 240 seconds)
17:29:09*user0 joined #nim
17:29:13YardanicoCalinou, nim has that
17:32:45*rauss joined #nim
17:33:48Calinouok :)
17:34:01Calinouwhat's the equivalent of Python's "pass" in Nim? so that I can define a method without any code inside
17:34:47YardanicoCalinou, discard
17:36:28*gangstacat joined #nim
17:42:31YardanicoCalinou, nim has single-inheritance, but multiple dispatch
17:42:42Yardanicobut really methods are not really needed in most of the cases :)
17:43:09*jjido joined #nim
17:43:15Calinouwhy not?
17:44:05YardanicoCalinou, for example instead of different AST node types inherited from Node you can have one object variant
17:44:42Yardanicoand methods are always slower than simple functions/procedures
17:44:45Calinouthe Godot Nim stub doesn't make use of getNode at all, that doesn't help me :'(
17:44:55Calinousince I need it to connect signals, the GUI doesn't seem to work
17:45:00Calinou(it doesn't find the method in the NativeScript)
17:47:07*yglukhov joined #nim
17:52:19*cscs joined #nim
17:52:34*cscs quit (Client Quit)
17:54:32*Trustable quit (Remote host closed the connection)
17:56:41FromGitter<mratsim> methods are actually not that slow surprisingly, only 3x slower than procs: https://github.com/mratsim/Arraymancer/blob/master/benchmarks/implementation/proc_method_closure_bench.nim
17:57:20*user0 quit (Quit: user0)
17:59:22*claudiuinberlin joined #nim
17:59:40FromGitter<mratsim> Celebrating Christmas, the Nim way
17:59:49FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/JPoP/2017-10-17_19-59-27.png)
18:06:37Calinouoh, that's why my benchmark took 5600 ms to complete
18:06:42Calinougodot-nim uses methods, not procs, though
18:07:02Calinou(Mono without optimizations takes 2200 ms, 1800 ms with optimizations)
18:07:11Calinou(GDScript takes 48000 ms in release mode, 75000 ms in debug mode :P)
18:08:18*sz0 quit (Quit: Connection closed for inactivity)
18:08:19AraqBigEpsilon: Er, sorry, these new newlines shouldn't really be there though
18:08:29AraqI need to patch the renderer again :-)
18:08:40Araqregression caused by live coding, yay
18:09:34livcdah smh dom did ?
18:09:45shodan45Araq: renderer? nim renders things now, too? :D
18:10:06Araqlivcd: no, me.
18:10:22livcdah ok i thought about his twitch
18:10:23Araqshodan45: that's the term I use for AST -> string pretty printing
18:10:47shodan45Araq: oh lol
18:11:16shodan45so then yes, nim renders things :)
18:11:34*nsf quit (Quit: WeeChat 1.9)
18:14:58Yardanicomratsim: it's because of me :P
18:15:09Yardanicoalmost half of all labels were of the same color
18:15:52FromGitter<mratsim> ^^
18:16:19Araqmratsim: that benchmark is flawed
18:16:33*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:16:36FromGitter<mratsim> epochTime?
18:16:55Yardanicotry nimbench
18:16:56Araqno, you don't measure closures but GC allocations
18:16:56Yardanicoit's the best
18:17:25Araqyou should move the closure creation out of the loop
18:17:42Araqbut ok, often that's not possible and then the benchmark is accurate
18:18:34*claudiuinberlin joined #nim
18:19:34FromGitter<mratsim> Well in my case I couldn’t this was previous implementation of my tensor operations before switching to injecting templates
18:19:39Yardanicomratsim: also I've added performance label - and guess who has report last 3 performance issues ? :) https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+label%3APerformance
18:19:51Yardanicoedubart, so arraymancer :)
18:28:18Calinouhow do I tell Nake to build a library (.dll) in release mode, rather than debug?
18:28:21Calinou(with optimizations enabled)
18:28:50FromGitter<mratsim> why are you still using make?
18:28:57FromGitter<mratsim> nake*
18:29:12Yardanicoyeah
18:29:21Yardanicouse nimble
18:29:35YardanicoCalinou, but generally you just add -d:release
18:30:19Calinouif I used "nimble build", it didn't find the classes I needed
18:30:24Calinou(which aren't part of the package)
18:30:35Calinoualso, I didn't know Nake was obsolete
18:30:46Calinouthe readme doesn't state it
18:31:31Yardanicowell, it's not "obsolete" but WHY you use third-party program when you can use official package manager?
18:33:26Araqnake is more powerful than NimScript though since it's compiled :-)
18:34:30Araqhmm this destructor stuff is like crack
18:34:52Araqfits beautiful into Nim's design, better than the GC
18:35:00CalinouYardanico: godot-nim told me to ¯\_(ツ)_/¯
18:35:19Calinouoh, "nimble build" works now
18:35:30AraqYardanico: and I told godot-nim's author to use 'nake'
18:36:03Calinoulooks like it doesn't create a .dll, though, it creates an .exe instead
18:36:11Calinou(I'm calling the command directly)
18:36:41Calinouoh, "nimble make" did the job
18:37:10livcdAraq: oh so there might not be a GC if your experiments go well ? :)
18:37:50Yardanicobut past 1.0
18:37:51Araqthe transition period will likely be measured in years, but yeah
18:37:51Calinouwill we have to manage memory manually in the future? :(
18:38:00CalinouI mean, it's the reason I step away from C++ and the like
18:38:27CalinouYardanico: "nimble make" ignores the "-d:release" I pass to it, i.e. the final .dll is the same size and has the same performance
18:38:34CalinouI'm pretty sure it's built in debug mode
18:38:43YardanicoCalinou, you should add custom commands probably
18:39:06AraqCalinou: usually you don't manage memory manually in C++
18:40:56Calinou:| I added "-d:release" to the package's nim.cfg, it makes the .dll slightly smaller but not any faster
18:41:15Araq-d:release doesn't work in a .cfg file
18:41:23Araqpass it via command line
18:41:37Calinouyes, but "nimble make" ignores it, it outputs the same .dll regardless of what I put
18:46:45*miran joined #nim
18:47:44FromGitter<zetashift> godot-nim is slower than the godot-mono module? :O
18:58:22*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:58:41*neikeq joined #nim
18:59:41UxerUosprI'm not getting anywhere. getValue and getRow in db_postgres both echo/print out "row number 0 is out of range 0..-1" when the query returns no result
19:00:07UxerUosprI've grepped the nim codebase and I haven't found where it's coming from there
19:00:38UxerUosprI assume it's something in what the postgres.nim wrapper is wrapping
19:01:11UxerUosprHow do I get to that code?
19:01:26miranrange 0..-1? shouldn't that be 0..^1? (wild guessing here, i have no idea what i'm talking about)
19:01:53Araqmiran: it's an empty range
19:02:04UxerUosprmiran: I think the "row number 0 is out of range 0..-1" comes from postgres though I'm not sure
19:02:13AraqUxerUospr: the code is in lib/impure/db_postgres.nim
19:03:43UxerUosprAraq: I've looked there and it seems fine... doesn't have the string I'm trying to track down. I looked in /lib/wrappers/postgres.nim as well, since I think that's what db_postgres.nim is importing
19:04:18UxerUosprI'll admit, I don't fully understand the wrapper code so I could have missed something
19:04:41UxerUosprIt's really odd to me that it's priting out this string, though
19:04:53*neikeq quit (Quit: gotta go!)
19:05:01Araqgive me something I can run
19:06:40*claudiuinberlin joined #nim
19:07:07UxerUosprAraq: It'll require having postgres set up and able to communicate, with tables, etc. I can show you what I'm doing, at least... one sec.
19:08:38*Laon joined #nim
19:09:25*dddddd quit (Remote host closed the connection)
19:12:00*Laon89 joined #nim
19:12:01UxerUosprI don't imagine it's very helpful but here's where it happens in my code: https://gist.github.com/optik-aper/58c132a82e8be575d4bda318fcdf1032
19:13:08*Laon quit (Ping timeout: 255 seconds)
19:13:31*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:15:00*ipjk joined #nim
19:16:49mirananything like python's `defaultdict` in nim?
19:17:44miranis there a way how to 'simulate' that without manually checking every time if table has a key, and then if not create for example an empty sequence?
19:18:48UxerUosprAraq: It looks like it might be coming from here: https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/interfaces/libpq/fe-exec.c;hb=6ecabead4b5993c42745f2802d857b1a79f48bf9
19:21:54*gokr joined #nim
19:22:49dom96Calinou: modify the .nimble file then
19:23:03dom96'make' is a task that is most definitely defined in your .nimble file
19:26:40FromGitter<zacharycarter> @zetashift - what makes you say that?
19:28:24*claudiuinberlin joined #nim
19:30:41Araqmiran: getOrDefault
19:32:50miranAraq: will try it, but i'm not sure that's it...
19:32:51AraqUxerUospr: well you don't have any value for this title
19:35:47UxerUosprAraq: I pass in "title" in the proc
19:37:07*Laon joined #nim
19:37:09*user0 joined #nim
19:39:21*Laon89 quit (Ping timeout: 240 seconds)
19:39:48UxerUosprAraq: Also, I should mention that the value does get assigned by getValue as "" when the result isNil
19:40:02*jjido quit (Ping timeout: 255 seconds)
19:40:37UxerUosprIt just seems weird that it would also print out this range error message
19:41:26*Laon quit (Ping timeout: 252 seconds)
19:43:27Araqdoes it raise an exception with this error?
19:45:12UxerUosprAraq: Would that stop execution if it was unhandled? I don't have it handled and it doesn't stop execution. It moves on to the next one happily (I call it about 300 times in a loop)
19:45:36Araqit should die with a stacktrace
19:45:47Araqprobably some error handling is wrong here
19:45:50UxerUosprNo, it doesn't die for that reason
19:51:34miranAraq: i have `var nodes = initTable[string, newSeq[Route]()]()`, and i want to do `nodes[node].add(Route(dest: neighbour, cost: cost))`. i've tried with `getordefault` but i got sigsegv error....
19:52:27Araqthat's not how to call initTable
19:54:17miranno? what's wrong and how do i fix it?
19:55:43Calinou<FromGitter> <zetashift> godot-nim is slower than the godot-mono module? :O
19:55:44AraqinitTable[string, seq[Route]]()
19:55:45Calinouright now, yes
19:56:01Calinounote that if I use a proc instead of a method (for the fibo() recursive function), it's quite faster, 3400 ms instead of 5600 ms
19:56:11miranAraq: oh, i thought so after i asked :) sorry for noob mistakes
19:56:13Calinoustill 1200 ms slower than Mono without optimizations, though
19:56:19Calinouthis is why I'm trying to compile the .dll in release mode :)
19:56:21YardanicoCalinou, why do you have fibo as a recursive function?
19:56:28Yardanicoit's pointless
19:56:29CalinouYardanico: because it's a simple way to benchmark things :P
19:56:43Calinouhonestly, it could be anything
19:56:53Calinoubenchmarks don't reflect real use cases by definition
19:57:01Calinoubut they let you know if something is wrong or slow
19:57:34Araqok but coming up with a representative benchmark for a realworld problem is not that hard either
19:57:46Calinoubut it's more code to write :P
19:57:48Calinouthis one is 5 lines or so
19:58:20miraneven with the correct initTable, i don't seem to get `getOrDefault` to work - sigsegv again....
19:59:06Calinouanyway, still can't get it to compile in release mode :(
20:03:14Yardanicomiran, getOrDefault will return nil
20:03:17Yardanicofor a seq
20:03:23Yardanicobecause default value for seq is nil
20:03:28mirandamn
20:03:36Yardanicoso after you "var mything = table.getOrDefault(key"
20:03:37Yardanicocheck
20:03:42Yardanico"if mything.isNil: ..."
20:03:57YardanicoCalinou, can you compile it with nim compiler?
20:04:00Yardanicowithout nake or nimble
20:04:34miranso i need to revert to `if not table.hasKey(key): ...`?
20:05:22Yardanicomiran, you can even do "if key notin table:"
20:05:39Calinouwhoa…
20:05:40Calinouhttps://media.hugo.pro/godot_2017-10-17_22-05-37.png
20:05:44Calinouthis is hyperspeed compared to anything else :P
20:06:00dom96Calinou: benchmarking non-release mode code doesn't really have much importance.
20:06:10Calinoudom96: yes, this is why I was attempting to compile it in release mode
20:06:18Calinoubut I couldn't do it without calling nim manually :(
20:06:28dom96did you try what I suggested?
20:06:43dom96what's your .nimble file's contents?
20:07:02miranYardanico: ok, it might be more readable. but whatever i choose, i need to initialize the sequence there. there's no 'cure' for that, right?
20:07:31Calinouhttps://hastebin.com/cizuhilazu.nim
20:07:34Calinouthis is the .nimble file
20:07:49Calinou(I didn't touch the code from the Nim stub, only changed some things at the top)
20:07:59dom96ooh, fancy
20:08:09miranfor nested sequences, there would be `newSeqWith`, but when it comes to tables with sequnces, i need to do manual checking?
20:08:28dom96have you tried: exec "nimble build -y" -> exec "nimble build -y -d:release"
20:08:28dom96?
20:09:12Yardanicomiran, yes
20:09:20Yardanicobut in the future seq will be non-nil by default
20:09:24Yardanicostring is already not nil BTW
20:09:28miranreally?
20:09:30Yardanicoyes
20:09:38dom96is it?
20:09:42Yardanicoyes
20:09:45dom96since when?
20:09:55miranthat's something in 0.17.2 or just in devel? (string not nil)
20:10:02Yardanicoin devel
20:10:12*Jesin quit (Quit: Leaving)
20:10:17Calinouthis is with fibo() as a method, it's slower but still pretty fast: https://media.hugo.pro/godot_2017-10-17_22-09-54.png
20:10:22miranand when will that not-nil-seq future be present? soon?
20:10:24Calinoudom96: no, I haven't… I'll try
20:10:27Yardanicomiran, yeah, probably
20:10:39CalinouI'd like to be able to quickly switch between debug and release, though
20:10:46miranseems like a bright future to me :)
20:11:07dom96Calinou: so create another task called 'makeR' or something :)
20:11:20dom96(assuming this works)
20:11:44Calinouyeah, sounds hacky, but that would work :P
20:11:54AraqYardanico: 'nil' is still a thing for strings and seqs, but len(x) == 0 for x.isNil
20:11:58Calinouanyway, thanks for helping me with this :)
20:12:03Araqand that has been the case for quite some time now
20:12:23YardanicoAraq, well at least we can echo empty strings now :)
20:12:37Yardanicoand not initialized ones too
20:12:39Araqmore changes related to 'nil' caused mysterious compiler crashes
20:12:58Yardanicoohh
20:13:00Araqwhich is one more reason I'm going after destructors
20:13:09Yardanicohttps://github.com/nim-lang/Nim/commit/35c8b5e3bcc13ade6441f1b53ee8d3acacffded3
20:14:13Calinousorry for being annoying, I just wanted to get this working to show off :P
20:14:38dom96Calinou: Eventually .nimble files will have more power and get access to arguments
20:14:51dom96Araq: So what happened to the stream?
20:15:26Yardanicodom96, he'll do it tomorrow probably
20:15:37*Jesin joined #nim
20:15:43Araqno, Thursday night, 21:00
20:15:57Yardanico21:00 UTC?
20:16:01AraqI should probably announce this on Twitch somehow
20:16:04miranthe topic?
20:16:08Araq21:00 my time
20:16:11miran19:00 UTC
20:16:19YardanicoAraq, ah, 22:00 for me
20:16:23dom96Araq: No, you should get a Twitter account and announce it there.
20:16:27Yardanicomiran, vote here - http://www.strawpoll.me/14163114
20:16:35YardanicoAraq, we can announce it on reddit too
20:16:41Araqomg
20:16:54Araqthen it has to be awesome...
20:17:13dom96I tweeted about your previous livestreams on Nim's twitter
20:17:26YardanicoAraq, it has to be "nimasome"!
20:17:34miranYardanico: voted for destructors, hoping to see the glimpse of that bright future :)
20:17:54Araqit helps when I don't know I'm being watched
20:18:14Yardanicowell your previous streams were watched by ~10 people
20:18:40Araqthat poll ... so surprising how stable the results are, it feels like 100 more votes wouldn't change the outcome
20:18:55Yardanicoit just changed
20:19:04Yardanicomaybe people from twitter/reddit will vote for karax
20:19:10Yardanicodom96, share this link too then - http://www.strawpoll.me/14163114
20:19:14Yardanicoso people will vote :)
20:19:40AraqYardanico: "destructors for Nim" is still first
20:19:46YardanicoAraq, yes
20:20:39*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
20:23:02YardanicoAraq, everything can still change because we shared the link on twitter & reddit
20:23:10Yardanicopeople there are usually more high-level oriented
20:23:40dom96Araq: Shall I tweet about it?
20:23:51Araqsure, I can stand the pressure
20:25:14dom96now
20:25:16dom96...
20:25:23Araq:P
20:25:25dom96when a copy and paste fails
20:25:26dom96https://twitter.com/nim_lang/status/920385204686073858
20:25:27Yardanicooh, destructors got one more vote
20:25:29Yardanicowe have 30 votes
20:26:03dom96ooh, cool, 20 likes on this tweet of mine https://twitter.com/d0m96/status/919857258191818752
20:26:56Yardanicomaybe we need to cross-post it on /r/programming on thursday ? :)
20:26:59dom96Twitter is a powerful thing
20:27:04dom96We've got 1.1k followers now :)
20:27:24dom96I think it would be better to submit some pre-recorded livestreams
20:27:27dom96*hint hint*
20:28:44YardanicoBtw, strawpoll is updated in real-time
20:28:57Yardanicoso if you're very popular, you can literally see how results change
20:29:05*smt` joined #nim
20:29:13dom96would be cool to recreate strawpoll in Nim :P
20:29:24YardanicoAraq, btw
20:29:24Araqoh!
20:29:35Araqdom96: that's a great idea
20:29:37federico3dom96: or a better doodle.com
20:29:41Araqcan do that with karax+ormin
20:29:44YardanicoAraq, dom96, https://marketplace.visualstudio.com/items?itemName=irth.twitchlint
20:29:50YardanicoTwitchlint is an extension for Visual Studio Code that allows your Twitch viewers sent you suggestions for your code via the chat.
20:29:51Yardanico:P
20:29:57dom96Araq: Awesome :D
20:29:58dom96Do it :)
20:30:14dom96Using web sockets for that would make sense
20:30:23Araqok, tests are green, time for another try to cut my video lol
20:30:28Araqdom96: exactly!
20:30:47YardanicoAraq, try to use avidemux
20:31:27*miran quit (Ping timeout: 240 seconds)
20:33:22*smt quit (Ping timeout: 264 seconds)
20:39:58FromGitter<pacopa> Hi. While compiling koch, I got the following error:
20:40:01FromGitter<pacopa> Hint: dynlib [Processing] ⏎ lib/wrappers/openssl.nim(617, 18) Error: type mismatch: got (ptr array[0..511, char]) ⏎ but expected one of: ⏎ proc hexStr(buf: cstring): string [https://gitter.im/nim-lang/Nim?at=59e66aa001110b7231cad029]
20:40:35Yardanicohmm
20:40:48YardanicoAraq, take my words back :P http://www.strawpoll.me/14163114/r
20:40:53Yardanico19 votes for destructors
20:42:07SunDwarfYardanico, that extension sounds like hell
20:42:13YardanicoSunDwarf, why ? :)
20:42:18Yardanicoif your stream has only 10-15 people
20:42:28Yardanicobut surely Araq's stream will have more
20:42:53SunDwarfgonna love the 1000 lint requests with twitch emotes
20:43:00YardanicoSunDwarf, lol
20:43:32SunDwarfor the inevitable zalgo lint
20:43:44Yardanicobut yeah, this wouldn't help much for araq
20:43:58Yardanicobecause we don't have big experience in destructors :P
20:44:05Yardanicoit would be useful for dom though
20:44:29*firstjedi quit (Ping timeout: 246 seconds)
20:47:17Araqpacopa: koch doesn't use openssl.nim
20:47:20FromGitter<pacopa> Sorry. I was running ./koch tools
20:47:33Araq./koch boot -d:release
20:47:37Araqbefore that then
20:47:53Araqbut yeah, I could improve backwards compat for this
20:50:32FromGitter<pacopa> Ahhh, ok! That was the problem :-) Thanks, @Araq
20:51:26YardanicoAraq, is there something about rodfiles in your todo? :)
20:52:10Araqyardanico: I have new ideas of how to implement these
20:52:22YardanicoAraq, that's always good to hear
20:52:30Yardanicothey'll be a killer feature
20:52:37Yardaniconim is already fast at compilation
20:53:02AraqI don't have good ideas that are not much work though, but I'm getting there
20:56:13*lastjedi joined #nim
20:57:05Yardanicothis is why reddit/github community is not very serious sometimes: https://github.com/Property404/fetlang
20:57:11Yardanicothis repo has almost 1k stars :P
20:59:10FromGitter<Varriount> Yardanico: Truly, that is the programming language of the future.
21:00:37*Yardanico quit (Remote host closed the connection)
21:14:32*d10n-work quit (Quit: Connection closed for inactivity)
21:15:21*firstjedi joined #nim
21:25:01*lastjedi quit (Ping timeout: 240 seconds)
21:25:57*firstjedi quit (Ping timeout: 260 seconds)
21:27:29*gokr quit (Ping timeout: 248 seconds)
21:29:27*endragor joined #nim
21:31:15*couven92 joined #nim
21:34:23*endragor quit (Ping timeout: 248 seconds)
21:35:33Calinoumy favorite joke repo is https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
21:36:05Calinoualthough for esolangs, I'd go for https://github.com/avian2/fimpp
21:36:37Calinouit doesn't work on PonyOS, though :'( that's no fun
21:43:42FromGitter<Varriount> Calinou: I'm trying to decide which is better - the java programmers who want 15 layers of abstraction and indirection, or the general programmers who lump everything into one monolithic function.
21:44:08FromGitter<Varriount> Though, I'll admit to sometimes being part of the latter category
21:49:24CalinouI try to find a middle ground :P
21:49:30Calinouoverengineering definitely isn't a good thing, but underengineering also sin't
21:49:32Calinouisn't*
21:53:32*nsf joined #nim
21:59:13Araqhave yet to find an underengineered codebase that is as bad as overengineered ones
22:00:19*nsf quit (Quit: WeeChat 1.9)
22:08:56*JappleAck joined #nim
22:18:54FromGitter<mratsim> Somehow a lot of Nim code I write is 2-7 lines of stuff and 5-15 lines of comment
22:23:23FromGitter<mratsim> There was this Terraria clone which made Reddit HN 5 days ago and was the first programming/game attempt of someone https://github.com/raxod502/TerrariaClone/blob/master/src/TerrariaClone.java#L1868
22:23:24*Vladar quit (Quit: Leaving)
22:25:08FromGitter<Yardanico> Araq: 47 votes! http://www.strawpoll.me/14163114/r
22:26:45*yglukhov quit (Remote host closed the connection)
22:44:17Araqugh we actually have a test that tests 'echo' is required to lock the stdout stream
22:44:36Araqand that's currently not true for windows and so appveyor is red
22:48:52*sleepyqt quit (Quit: WeeChat 1.9.1)
22:51:02*def-pri-pub joined #nim
23:33:55*def-pri-pub quit (Quit: Leaving.)
23:48:42*Nobabs27 joined #nim
23:51:16*Nobabs25 joined #nim
23:51:34*Nobabs27 quit (Client Quit)
23:59:27*couven92 quit (Quit: Client Disconnecting)