<< 10-07-2018 >>

00:00:00Araqand then a book shall follow
00:00:08Araqto answer your question
00:00:15stefanos82The Nim Programming Language I presume?
00:00:26AraqI don't think DAT is any particular format
00:00:36*krux02 quit (Remote host closed the connection)
00:02:43stefanos82yeah, that's why I said "as your tiny case study"
00:02:52stefanos82to validate your hypothesis
00:03:02CodeVancethe golden dragon book
00:03:31*donlzx joined #nim
00:04:24stefanos82you have to read it countless times to extract a generic idea what you should really do
00:05:43Araqget "Modern compiler implementation in ML" or whatever it's called
00:06:18stefanos82the book that helped me get rid of my fear about even attempting to write an interpreter, let alone a compiler was "Writing an Interpreter in Go" by Thorsten Ball
00:06:44stefanos82and now he is about to release "Writing a Compiler in Go"
00:09:35stefanos82btw dom96, why the forum auto-refreshes every now and then?
00:10:17stefanos82I have a tab opened with it and auto-refreshes which I presume is to check whether a new comment was added so it can make it visible
00:15:07stefanos82Araq: based on your own experience so far, how heavy macros are they for the translation procedure? I'm talking about AST of course.
00:19:19*fjvallarino joined #nim
00:35:18*thomasross quit (Remote host closed the connection)
00:35:44*thomasross joined #nim
00:39:14*dddddd quit (Remote host closed the connection)
00:56:17*stefanos82 quit (Quit: Quitting for now...)
01:54:22*voiceftp joined #nim
01:58:48*SenasOzys joined #nim
01:59:17*SenasOzys quit (Remote host closed the connection)
01:59:44*SenasOzys joined #nim
02:01:34*dorelix joined #nim
02:02:06CodeVanceCan someone help me build nanovg
02:02:16CodeVanceand get nanovg.nim working
02:03:33FromGitter<kayabaNerve> ?CodeVance Are you getting errors or don't know where to start
02:04:00CodeVanceI can't manage to compile nanovg from source.
02:04:20CodeVanceIt tells me it needs glew/glfw
02:04:33CodeVance-lglfw not included and such
02:05:31FromGitter<kayabaNerve> You might want to print the exact error.
02:05:39FromGitter<kayabaNerve> Compiler, linker, runtime...
02:06:23FromGitter<kayabaNerve> Sounds linker, just checking.
02:06:32CodeVanceokay from nanovg source I call premake
02:06:35CodeVanceI go into build dir
02:06:52CodeVancecall mingw64-make
02:07:27CodeVanceexample_gl2.make:175: recipe for target 'example_gl2.exe' failed
02:07:28CodeVanceprocess_begin: CreateProcess(NULL, cc -o ./example_gl2.exe obj/Debug/example_gl2/example_gl2.o obj/Debug/example_gl2/demo.o obj/Debug/example_gl2/perf.o -L. -lnanovg -lglfw3 -lgdi32 -lwinmm -luser32 -lGLEW -lglu32 -lopengl32 -lkernel32, ...) failed.
02:09:09zacharycartererm there's an example floating out there on github somewhere of building nanvog with Nim
02:10:49CodeVancelol
02:10:50CodeVancezachary carter: what you doing lately?
02:11:13zacharycarternursing my bruised / cracked ribs I got over the weekend :P
02:11:29CodeVanceNice Must have been fun on that thing
02:11:45zacharycarterhahaha it's certainly been fun, only one trip to the emergency room so far hahaha
02:12:09CodeVanceserious
02:12:09zacharycarterworking on the front end of the playground now
02:12:10CodeVance?
02:12:17CodeVanceDid you hear of the karax vuln?
02:12:23zacharycarteryeah - I had to go get meds for the ribs I could barely breathe / couldn't get out of bed they hurt so bad
02:12:31zacharycarterno - what's the vuln with karax?
02:13:12CodeVance`/../file_outside_static`
02:13:17*SenasOzys__ joined #nim
02:13:20*voice_ftp joined #nim
02:13:32CodeVancejust update the karax.
02:13:33zacharycarterhrm?
02:13:39zacharycarterwhat do you mean?
02:14:11CodeVancenvm
02:14:16CodeVancekarax/jester
02:14:17CodeVancelol
02:14:30zacharycarteroh haha
02:14:30CodeVancehttps://forum.nim-lang.org/t/4028
02:14:36CodeVanceIs what I was talking about
02:14:42*craigger_ joined #nim
02:14:52*surma_ joined #nim
02:16:09*brainpro1 joined #nim
02:16:22*riidom joined #nim
02:17:12*literal_ joined #nim
02:17:17zacharycarterhrm - I don't use jester to serve up static files anyway
02:17:22*ehmry_ joined #nim
02:17:33zacharycarterso I'm not sure if it applies - but either way I'm using the latest verison of jester with the new playground
02:18:07CodeVanceHow's your nim html development environment
02:18:07zacharycarterI just let nginx handle static asset requests
02:18:56zacharycarterhttps://github.com/zacharycarter/nim-playground
02:19:02*tersec_ joined #nim
02:19:06zacharycarterthat's what my project looks like
02:19:22*brainproxy quit (Ping timeout: 240 seconds)
02:19:22*arecaceae quit (Ping timeout: 240 seconds)
02:19:23*jxy quit (Ping timeout: 240 seconds)
02:19:23*copygirl quit (Ping timeout: 240 seconds)
02:19:23*tersec quit (Ping timeout: 240 seconds)
02:19:23*voiceftp quit (Ping timeout: 240 seconds)
02:19:23*craigger quit (Ping timeout: 240 seconds)
02:19:23*Guest9022 quit (Ping timeout: 240 seconds)
02:19:23*ehmry quit (Ping timeout: 240 seconds)
02:19:24*riidom_ quit (Ping timeout: 240 seconds)
02:19:24*zama quit (Ping timeout: 260 seconds)
02:19:24*surma quit (Ping timeout: 260 seconds)
02:19:24*EastByte quit (Ping timeout: 260 seconds)
02:19:25*so quit (Ping timeout: 260 seconds)
02:19:25*literal quit (Ping timeout: 260 seconds)
02:19:25*def- quit (Ping timeout: 260 seconds)
02:19:25*SenasOzys quit (Ping timeout: 260 seconds)
02:19:25*edcragg quit (Ping timeout: 260 seconds)
02:19:25*regtools quit (Ping timeout: 260 seconds)
02:19:25*surma_ quit (Changing host)
02:19:25*surma_ joined #nim
02:19:26*surma_ is now known as surma
02:19:33*edcragg joined #nim
02:19:44*EastByte joined #nim
02:19:57*copygirl joined #nim
02:20:04zacharycarterI just use VSCode / Browsersync with hot reload and Parcel for bundling (since loading monaco editor with a cdn / without a bundler is a PITA)
02:20:39*def- joined #nim
02:20:44zacharycarterthe readme is a bit outdated
02:23:01*zama joined #nim
02:23:33*regtools joined #nim
02:23:39CodeVanceDid you go to work like that (with bruised/cracked ribs)
02:25:02*zama quit (Changing host)
02:25:02*zama joined #nim
02:27:09CodeVancenvm get better soon
02:29:16*so joined #nim
02:30:53zacharycarterI did
02:30:55zacharycarterthanks!
02:31:32*Vindaar joined #nim
02:31:57*Vindaar is now known as Guest79477
02:32:05*jxy joined #nim
02:39:26*arecacea1 joined #nim
02:40:03shashlickCodeVance: are you using https://github.com/fowlmouth/nanovg.nim
02:40:51CodeVanceI'm using that and I'm trying to use nanovg
02:40:51CodeVancethe source
02:43:54shashlickok you are having issues building nanovg itself?
02:44:17CodeVanceyes
02:44:34CodeVanceOr its supposed to work in some way but I don't know how
02:44:50shashlickseems like a good candidate for nimgen
02:44:58shashlickanyway, a wrapper already exists so
02:45:18*fjvallarino quit (Remote host closed the connection)
02:45:44*fjvallarino joined #nim
02:46:25CodeVanceIt only counts if you can get it to work
02:47:21*literal_ is now known as literal
02:49:57*fjvallarino quit (Ping timeout: 240 seconds)
02:50:03zacharycarterwell that wrapper is super old
02:50:13zacharycarterbut I've gotten nanvog to work before - just takes some fiddling with
02:50:50zacharycarteralso - may want to check out bgfx
02:50:56zacharycartersince opengl is going through what it's going through
02:51:15zacharycarterup to you though
02:51:27zacharycarterobviously :D
02:51:33CodeVanceI'd like to use bgfx but my pc only has opengl2
02:51:42CodeVanceintel graphics are bad
02:51:53zacharycarterah
02:52:11CodeVanceI was interested in nanovg for the svg/gui
02:52:23zacharycarterNOT 2.1?
02:52:27zacharycartersorry
02:52:33CodeVancebgfx has gl2 support But I'm not experienced enough with it
02:52:42CodeVanceto know how to set it up
02:52:54zacharycartergotta start learning somewhere :)
02:52:55zacharycarterthere's lots of examples
02:52:55zacharycarterI've used it quite a bit
02:53:06zacharycarterand there are a lot of rendering engines already built with it that are open source
02:53:22zacharycarterI plan on using it in my next game project, which I'm going to start soon
02:53:33CodeVanceits not an old laptop but intel's opengl drivers are out of date
02:53:45zacharycarteris it windows?
02:53:54CodeVancewin7
02:53:57zacharycartergotcha
02:54:09CodeVanceI know I need vcc but its so massive
02:54:12CodeVanceto download
02:54:37zacharycartervcc?
02:55:08CodeVancevisual studion c compiler I think
02:55:41zacharycarterto do what?
02:56:07CodeVanceTo compile directx I think
02:56:15CodeVanceor other windows things
02:56:15zacharycarteroh
02:56:19zacharycarteryeah probably
02:56:21CodeVanceFor things to compile
02:56:36CodeVancezachary carter: why not continue with frag
02:56:51CodeVanceMind doing an ad-hoc postmortum?
02:59:01zacharycarterI don't like frag's code structure
02:59:18zacharycarterwhen I started frag - this other dude wanted to help
02:59:29zacharycarterhe ended up helping not very much
02:59:46zacharycarterI wrote a lot of code very fast, and was also learning Nim at the same time
02:59:58zacharycarterif you look at the code in frag vs zengine - you'll see what I mean
03:00:42zacharycarterzengine's code isn't anything great either - but besides all the conditionals regarding wasm, it's not terrible
03:00:50zacharycarterand all that was added at the very end
03:01:09zacharycarterI want to write a parallelized async tasking subsystem to be at the core of the next engine I work on, so getting that solid will be my first priority
03:01:16zacharycarteras well as a virtual file system and async resource loading
03:01:29zacharycarterand a propper rendering engine with PBR, GI, etc
03:02:00CodeVancelol
03:02:04CodeVanceI'm trying to do a semi-rendering engine
03:02:09zacharycarterI'vew done this a few times now - built small engines - so I know how to slap together something fairly quickly
03:02:25zacharycarterbut each time I get to spend more time on the subsystems themselves
03:02:38zacharycartersince I know how I want things designed / structured overall and what I want to focus on each iteration
03:02:42zacharycarterand every time I write one I learn quite a bit
03:02:58zacharycarterso I don't mind throwing them away at the end of the day if I'm going to improve the next time around
03:03:47CodeVanceOkay.
03:05:05CodeVanceSo the mainloop is easy. Then you want all the subsystems to run asynchronisaly ?
03:05:13CodeVanceAs much as possible
03:06:24zacharycarterno
03:06:49zacharycarterwell kind of
03:06:57zacharycarterI want to be able to toss tasks to a subsystem
03:06:58zacharycarterand have them run in parallel
03:08:46CodeVanceWould that be easy enough with nim? I still haven't gotten the hang of async and coroutines. I don't even know the difference. (when to use which)
03:09:42zacharycarterwell it can get tricky with the gc and stuff
03:09:55zacharycarterbut mamy pointed me to some resources a while back
03:10:06zacharycarterlet me try to find the irc logs
03:13:12zacharycarterugh I wish I could search nim irc logs
03:13:13zacharycarterI know there's a way I just can't remember how
03:14:38CodeVanceAren't you on matrix?
03:15:05shashlickzacharycarter: just use google
03:15:22shashlicksite:http://irclogs.nim-lang.org search terms
03:15:24CodeVancegoogle `site:irc-logs.nim-lang.org bla
03:15:40*vivus quit (Quit: Leaving)
03:15:41CodeVanceshashlick: it doesn't work with http
03:18:18*endragor joined #nim
03:18:38*fjvallarino joined #nim
03:18:59shashlickwhat are you looking for? works for me every time
03:30:47*skrylar joined #nim
03:31:14FromGitter<Varriount> Oh hey, it's zacharycarter. :D
03:32:25skrylarthats not how you spell skrylar :^)
03:34:59FromGitter<Varriount> Oh no, it's skrylar. :P
03:35:27*skrylar is forcibly dragging us in to the gtk3 era
03:36:30skrylarkinda curious if anyone ever used nfltk for anything, although since it doesn't appear to be in nimble i'm not sure many people know that its been a thing for almost a year now
03:39:04zacharycarter:p
03:39:20zacharycarterI'll wait till mratsim is around and bug him for those gists again
03:39:27zacharycarterhi Varriount and skrylar
03:39:36skrylarhi zacharycarter
03:43:43FromGitter<Varriount> Hrm, as much as I like this PR, the DSL doesn't seem to give enough information to write a simple parser. https://github.com/nim-lang/Nim/pull/8075/files
03:53:04skrylarthe pegs module didn't look super useful when i looked in to it
03:53:29skrylari was hoping more rebol parse or petitparser and less janky regex api
03:54:04skrylarpetitparser looks fairly straightforward to implement.. although optimizing it, hrm.
03:55:47skrylarI have come to appreciate the elegant simplicity of wildcard operator definitions (ex. operator = sigil+) although i think nim is close to that? or is it just a set of overloadables
03:56:38*dorelix quit (Quit: Leaving)
03:58:41*rockcavera quit (Read error: Connection reset by peer)
03:59:05*rockcavera joined #nim
04:00:59shashlickI've liked pegs as a lighter weight regex
04:04:35FromGitter<Varriount> skrylar: To me, the biggest limitation is that it can only capture a limited number of times.
04:05:12FromGitter<kayabaNerve> I love Nim
04:05:14FromGitter<kayabaNerve> Just saying it
04:05:23FromGitter<kayabaNerve> Evening @Varriount . You doing well? :D
04:05:48FromGitter<Varriount> Yep. I think I finally got output redirection sorted for my command shell.
04:06:08FromGitter<Varriount> The code isn't as nice as I would like it, but it works the same way bash does, more or less.
04:07:06FromGitter<kayabaNerve> Nice! GitHub?
04:07:47FromGitter<Varriount> Here, let me make it public.
04:08:26shashlickVarriount: finally got appveyor setup for nimgen
04:08:26FromGitter<kayabaNerve> I got a project open sourced today. #CommunityService
04:08:58shashlickFun times, get to learn something every day
04:09:46FromGitter<Varriount> Tada! https://github.com/Varriount/commandant
04:10:36FromGitter<kayabaNerve> Nice name
04:11:16FromGitter<kayabaNerve> Are you Clay?
04:14:02FromGitter<Varriount> Yes, that's my name.
04:14:10FromGitter<kayabaNerve> Cool
04:14:27FromGitter<kayabaNerve> Checking because you have 2 commits at the very start and then it's just Clay
04:17:28FromGitter<kaushalmodi> @Varriount Looks like you committed using your work email
04:17:37FromGitter<Varriount> Woops.
04:17:59shashlickany built-in help?
04:18:53FromGitter<kaushalmodi> https://stackoverflow.com/questions/2919878/git-rewrite-previous-commit-usernames-and-emails
04:18:53CodeVancebye all
04:20:03FromGitter<kayabaNerve> Bye
04:20:23FromGitter<kayabaNerve> @Varriount So if I want to mail you a package, is just your name fine or do I need a cubicle number... ?
04:21:21shashlickdid he get doxxed or something?
04:22:00FromGitter<kayabaNerve> Nah. His work email leaked. I'm just messing with him
04:22:35skrylarhe failed his vigilance DC check
04:22:40skrylarit happens to us all in the end
04:22:43FromGitter<kayabaNerve> It's not that big of a deal IMO but I will stop messing with him
04:22:51FromGitter<kayabaNerve> skrylar: My Git commits just use my email
04:22:57skrylarjust be glad its not a fossil repo
04:23:15FromGitter<kayabaNerve> Well. Actually. I use GitHub desktop. It probably uses the GitHub mask...
04:23:40skrylari use my email in github. i don't get a lot of mail from humans /shrug
04:24:06FromGitter<kayabaNerve> Nope. It uses the email of my bankrupt business
04:26:14FromGitter<Varriount> Ok, fixed.
04:26:31FromGitter<Varriount> For anyone who encounters the same situation: https://help.github.com/articles/changing-author-info/
04:27:04FromGitter<kayabaNerve> @Varriount I won't tell anyone it was [email protected]
04:27:18FromGitter<kaushalmodi> I use conditional profiles: https://stackoverflow.com/a/43884702/1219634
04:27:45FromGitter<Varriount> @kaushalmodi Oh nice, that's handy
04:27:46FromGitter<kaushalmodi> That way I can have clean distinction between work and fun repos.
04:29:32skrylarsomething something avoid bankruptcy :f
04:31:08FromGitter<kayabaNerve> :/
04:31:50FromGitter<kayabaNerve> I'm doing that. It sucks. I get paid 1/6th of my market value.
04:32:23FromGitter<Varriount> @kayabaNerve Anything else you've noticed?
04:32:28*lompik joined #nim
04:32:57FromGitter<kayabaNerve> About avoiding bankruptcy, your personal info, or the repo?
04:34:36FromGitter<kaushalmodi> Question about enum and holes: https://nim-lang.org/docs/manual.html#types-enumeration-types
04:34:39FromGitter<Varriount> Mainly the repo.
04:35:09FromGitter<kaushalmodi> That section says that inc/dec/etc are not available for enums with holes..
04:35:16FromGitter<kaushalmodi> But they actually work
04:35:39FromGitter<kayabaNerve> @Varriount There's a ton of commented stuff and I may steal your lexer someday.
04:35:59FromGitter<Varriount> My lexer is really simple.
04:36:20FromGitter<kaushalmodi> The compiler doesn't throw error but trying to echo an enum after it's inc'd value ends up on a "hole" value prints just the int with "invalid data" text.. no errors
04:36:24FromGitter<kayabaNerve> Mhm
04:37:09skrylarenums and sets have presented some silliness in my attempts to get the gnome stack working
04:37:16FromGitter<kayabaNerve> It makes me feel better to be able to use someone else's work to test my new work as a part before I finish it as a whole.
04:37:19skrylarnamely that they use a lot of "enums" that are bit flags
04:37:49FromGitter<Varriount> skrylar: Isn't that what Nim's enums are?
04:37:52FromGitter<kayabaNerve> TBH I only like one flag
04:38:04FromGitter<kayabaNerve> Who wants to seize the means of productions, comrades?
04:38:34skrylar@varriount: nim has sets, which are basically the ole pascal enum+set-of-enum trick which is quite nice but i don't believe we have guarantees on type size
04:38:59skrylarwhen interacting with C code one needs guarantees on type size, or else we're in shady "i have to run a jenkins crossbar test to make sure this never breaks"
04:39:31FromGitter<Varriount> skrylar: There's a sizeof pragma for enums
04:39:44skrylarsets are separate types tho?
04:40:02FromGitter<Varriount> Oh, I was talking just about enums
04:40:26skrylarthe pascal convention doesn't really guarantee WHICH bit you get either, though usually its just done in order
04:40:36FromGitter<kaushalmodi> Hmm, did my question mix up with an ongoing enum discussion?
04:40:51skrylaryou mentioned holes in enums
04:40:57FromGitter<kaushalmodi> Yes
04:41:00skrylarenums are persnickety.
04:41:48FromGitter<kaushalmodi> So the compiler is not erroring out when I use inc/dec with holey enums.. bug?
04:42:22skrylari'm not sure what araqs current impression is on those right now
04:42:45skrylarone would suggest that pred/succ should just step over the holes but that might have subtle performance implications
04:44:20skrylarwhat probably *should* happen is that it does step over holes (possibly using switch statements internally?) but emit a HintYourEnumIsSilly warning
04:44:25FromGitter<kaushalmodi> The manual says that those methods are not available for non-ordinals like "holey enums" (should make that an official term :)), but they do work.. albeit with surprising output
04:44:42FromGitter<kaushalmodi> skrylar: yeah
04:45:41skrylari am usually for trying to do what the user said but then also the lisp thing of warning the user when they are asking for things dumbly and making the compiler emit janky slow code
04:50:03FromGitter<Varriount> Yay, my code no longer leaks file decsriptors
04:50:07FromGitter<Varriount> *descriptors
04:52:03skrylarwoo
04:57:36skrylarhmm. are our term rewriting macros powerful enough to say, replace "foo(bar) or foo(baz) or foo(wizards)" with "foo([bar, baz, wizards])"
04:59:10skrylarsidebar: wekan is peeving me off. yes its pretty, but it seems to be buggy and i can't do simple things like move cards to another board :-|
04:59:38skrylarend of the month should probably migrate back to kanboard (where one can not only move cards between boards, but do so *automatically*)
05:22:37*nsf joined #nim
05:25:18shashlickany clue why my process input stream writeLine hangs even though the process has quit?
05:30:10*miran_ joined #nim
05:32:58FromGitter<Varriount> shashlick: What OS are you running on? And can you post the code?
05:47:00shashlickWindows - let me post a gist
05:47:13shashlickit's not hanging anymore but will keep an eye out
05:47:21shashlickwill share if i run into this again
06:20:36*miran_ quit (Ping timeout: 256 seconds)
06:21:08*shashlick quit (Remote host closed the connection)
06:25:26*tzekid joined #nim
06:29:17*shashlick joined #nim
06:30:19*yglukhov[i] joined #nim
06:30:20*yglukhov_ quit (Read error: Connection reset by peer)
06:33:41*Vladar joined #nim
06:35:00*subsetpark quit (Quit: --)
06:42:02Araqskrylar: "enums with holes" are a bad feature
06:42:19Araqand so neither succ/pred nor inc/dec should work with them
06:42:22FromGitter<tim-st> is there a pragma I can use to mark my proc/iterator for debug only?
06:43:48skrylarwhen defined(debug)?
06:43:53FromGitter<mratsim> when debug: ⏎ useiterator()
06:43:58FromGitter<mratsim> when defined*
06:44:10FromGitter<mratsim> skrylar was faster
06:44:12FromGitter<tim-st> hm, but it should be available in release mode too
06:44:35FromGitter<tim-st> something like deprecated but without deprecating it
06:44:49skrylarin that case emit a warning
06:44:50FromGitter<mratsim> in the iterator, put when defined(debug): {.error: “only use in debug mode”.}
06:45:10FromGitter<tim-st> ok, thank you both :)
06:45:23FromGitter<mratsim> check how modules in threadpool or in httpclient forces you to compile with threads:on or ssl
06:45:34FromGitter<tim-st> ok, thanks
06:47:17FromGitter<tim-st> I think marking it deprecated is easiest
06:48:53FromGitter<mratsim> or when not defined(debug): {. hint: “Note - this proc should only be used in debug mode.}
06:49:30FromGitter<tim-st> perfect, hint is exactly what I need, in both debug and release mode
06:49:43FromGitter<tim-st> btw is there a list of all pragmas?
06:49:58FromGitter<tim-st> ah here: https://nim-lang.org/docs/manual.html#pragmas
06:50:34skrylaryou can also use your own defines for separate debug toggles; some libs i used to poke with did that for ndebug builds
06:51:54FromGitter<tim-st> there is also `warning` this could be fitting too
06:53:30FromGitter<Varriount> Behold, my abomination for tonight! https://gist.github.com/Varriount/928c397492fa0ee426590d59c453d818
06:53:37FromGitter<Varriount> (Line 24)
06:54:47*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
06:59:01*tersec_ quit (Ping timeout: 244 seconds)
07:00:29*tersec_ joined #nim
07:09:28FromGitter<alehander42> @Varriount I saw you writing about parser dsl-s, what do you think about this one https://github.com/alehander42/area42/blob/master/lispy.grammar (very raw, but my idea was to have something like bnf with annotations for fields and a few builtin "functions" like join, and make it able to generate parsers in various languages based on it)
07:09:57FromGitter<alehander42> maybe making it a purely nim-syntax macro dsl would be better
07:10:46FromGitter<Varriount> @alehander42 The problem is that in most parsers, there's two phases: tokenization, and tree construction.
07:11:20FromGitter<Varriount> Most DSLs I've seen for Nim try to treat these phases as the same thing.
07:12:03FromGitter<Varriount> The proposed DSL for pegs.nim comes close - it leaves tree construction to the implementor.
07:12:13FromGitter<Varriount> It merely emits events to be consumed.
07:12:39FromGitter<Varriount> Ideally, it would parse the DSL at compile-time and emit static code, but that's a long way off.
07:12:54FromGitter<alehander42> yeah, my idea was to generate directly AST trees, that's why I want to annotate how I want the tree to look
07:13:16FromGitter<Varriount> @alehander42 By the way, the most "fun" parser generator I've ever used was a python library called codetalker.
07:13:54FromGitter<Varriount> https://pypi.org/project/CodeTalker/
07:14:01FromGitter<Varriount> https://github.com/jaredly/codetalker
07:15:01FromGitter<alehander42> hm, it looks nice, still kinda code-based
07:15:22FromGitter<alehander42> I really dig a purely declarative approach, exactly because it's easier to make multiple parser "backends" for it
07:15:38FromGitter<Varriount> Here's the pegs.nim proposed DSL: https://github.com/nim-lang/Nim/pull/8075
07:15:51FromGitter<alehander42> also my dream was to apply a similar dsl to other aspects of compiler writing, as simple type systems and generators
07:20:01FromGitter<alehander42> I think those guys https://fosdem.org/2018/schedule/event/code_reviving_the_meta_compiler_dream/ had a similar idea, but without the assist for compiler backend thing
07:22:54FromGitter<alehander42> the PR looks cool indeed, the enter/leave idea is cool
07:22:56FromGitter<alehander42> !
07:28:03FromGitter<Varriount> @alehander42 I'm determined to really evaluate the concept though for holes.
07:28:18FromGitter<Varriount> The last thing we need is another fatally-flawed feature.
07:28:41FromGitter<kayabaNerve> @Varriount I would like to add an RFC to Nim
07:28:47FromGitter<kayabaNerve> We have eInt and oInt
07:28:58FromGitter<kayabaNerve> Only even values can be assigned to eInt and vice versa
07:29:10FromGitter<kayabaNerve> We delete int for these new types for ultimate clarity and precision
07:29:35FromGitter<kayabaNerve> If you do manage to assign an even value to eInt, it seg faults.
07:31:40FromGitter<Varriount> @kayabaNerve Only if I get to add an vInt type.
07:34:37FromGitter<alehander42> @kayabaNerve that sounds very very specific
07:35:29FromGitter<alehander42> but can't you somehow do it today? you make them distinct, and you overload the common math ops for them
07:35:41*Lord_Nightmare joined #nim
07:36:26FromGitter<alehander42> the problem is, that wouldn't work even for `div`
07:36:51FromGitter<tim-st> When I need a number to be "a multiple of the os page size" is it enough to do `assert size mod 4096 == 0`?
07:38:02FromGitter<alehander42> @kayabaNerve still, it's funny you can generalize that idea
07:38:36FromGitter<alehander42> you can have something like Modulo[N] and Modulo[N][M] is a number which has M mod N
07:39:50FromGitter<alehander42> and for constants, nim could autogenerate the needed `+`, `*` and `-` and typecheck e.g. ⏎ ⏎ ```proc a*(b: Modulo[5][3], c: Modulo[5][4]): Modulo[5][0] = ⏎ b + c + 4``` [https://gitter.im/nim-lang/Nim?at=5b4462c533b0282df40ecc09]
07:40:19FromGitter<alehander42> oh b + c + 3
07:40:24FromGitter<alehander42> see, nim would've told me !
07:41:16FromGitter<alehander42> and even would be `Modulo[2][0]` etc
07:41:19FromGitter<Varriount> @tim-st Not really. Page size is dependant upon OS configuration and architecture.
07:43:24FromGitter<Varriount> @tim-st http://man7.org/linux/man-pages/man2/getpagesize.2.html
07:45:00skrylarhrm. restya board looks neat
07:45:13FromGitter<Varriount> @tim-st For Windows: https://msdn.microsoft.com/en-us/library/ms724381(v=vs.85).aspx and https://msdn.microsoft.com/en-us/library/ms724958(v=vs.85).aspx
07:46:08FromGitter<tim-st> @Varriount thanks, so if I know the default leastCommonMultiple(unix, windows, otherCommonOs) I can calculate the number correctly under the assumption it wasnt changed?
07:46:12FromGitter<Varriount> Oh, and don't forget https://msdn.microsoft.com/en-us/library/ms724340(v=vs.85).aspx
07:46:33FromGitter<tim-st> *leastCommonMultipleOfPagesizes
07:46:47FromGitter<Varriount> Theoretically.
07:46:53FromGitter<tim-st> Thanks!
07:47:04FromGitter<Varriount> However it's probably better just to use those functions.
07:47:54FromGitter<Varriount> @tim-st Whatever assumption you make about the current page size may not hold up to future architectures.
07:49:42FromGitter<tim-st> that's no problem, the docs say it "should be" a multiple of the pagesize, if it's not performance could be a bit lower
07:53:57*PMunch joined #nim
07:54:13Araq"it's funny you can generalize that idea" -- everything can be generalized in programming.
07:54:46Araqand it's the curse of programming languages
07:57:56FromGitter<Varriount> @tim-st Uh, or the OS could return an error.
07:58:11FromGitter<Varriount> I believe Windows does. I don't know about Linux.
08:08:04FromGitter<mratsim> Generalization leads to architecture astronauts: https://www.joelonsoftware.com/2001/04/21/dont-let-architecture-astronauts-scare-you/
08:11:13FromGitter<tim-st> @Varriount maybe I just make it a multiple of 4mb instead of 4kb that should be enough
08:11:28FromGitter<Varriount> @mratsim I'm guilty of that sometimes. 😔
08:16:32Araqtim-st: page size is 4KB
08:17:10AraqNim's allocator and GC is based on this number and it never fails.
08:17:16Araqand do you know why?
08:17:30Araqbigger page sizes are still a multiple of 4KB.
08:17:31FromGitter<tim-st> Araq: thanks, I need a proc that does nextNumberDividableBy4096(number)
08:17:46FromGitter<tim-st> Araq: yes, that was my idea, i told above
08:18:49Araqproc roundup(x, v: int): int {.inline.} =
08:18:49Araq result = (x + (v-1)) and not (v-1)
08:18:49AraqsysAssert(roundup(14, PageSize) == PageSize, "invalid PageSize")
08:18:51AraqsysAssert(roundup(15, 8) == 16, "roundup broken")
08:18:53AraqsysAssert(roundup(65, 8) == 72, "roundup broken 2")
08:19:05FromGitter<tim-st> nice, thanks :)
08:21:03FromGitter<tim-st> yes, it works
08:22:23*dddddd joined #nim
08:28:41*nc-x joined #nim
08:29:16nc-xDo i have to implement my own hashing function for `ref object of RootObj` if I want to use it in a Table?
08:31:26*nc-x quit (Client Quit)
09:01:19FromGitter<rayman22201> This is a thing I did. Thoughts? https://github.com/nim-lang/Nim/pull/8260
09:01:33*rosshadden quit (Read error: Connection reset by peer)
09:03:26FromGitter<rayman22201> Also it's really late for me and I have to sleep now, so I'm going to have to be that awkward guy to post and leave. Be back online tomorrow! Thanks!
09:03:47*rosshadden joined #nim
09:19:13*SenasOzys__ quit (Remote host closed the connection)
09:50:49*skrylar quit (Remote host closed the connection)
10:15:12*stefanos82 joined #nim
10:16:04*krux02 joined #nim
10:21:41krux02Araq: I have these gdb pretty printers. I would like to create a PR for Nim, but I don't know where to put them.
10:21:55Araqtools/ ?
10:22:19Araqideally there is also a 'koch prepare_gdb' command
10:22:52Araqyou will need to update these pretty printers soon though, as the new string/seq implementation is coming
10:24:50*skyfex quit (Quit: Textual IRC Client: www.textualapp.com)
10:26:03krux02Araq: that wouldn't be too much of a problem, because the main problem was getting around how to implement them using the gdb API. The acutal work that needs to be done isn't too much.
10:26:18krux02Araq, how does the new string memory layout look like?
10:26:25krux02more like std::string?
10:27:14Araqplan is { len; p } where p points to { cap; pointer to allocator; charData[...] }
10:27:47Araqstring literals have a nil allocator and are zero-copy
10:28:31krux02and nil strings are a nil pointer?
10:28:37krux02and appending to a nil string?
10:28:43krux02what is the allocator there?
10:28:53Araqthe default one
10:29:44krux02good thing is that the length of a nil string isn't a special case of nil string anymore.
10:30:30krux02I found out that the gdb api to write pretty printers is actually quite good. It is just poorly documented it a lot of cases. Good thing I had help in #gdb
10:31:04krux02and because of the bad documentations the frontends also struggle to be correct
10:32:06stefanos82Araq: wouldn't be safer if a string's default value were ""?
10:32:31krux02stefanos82, that is the case
10:32:59stefanos82oh "" for a string is considered nil?
10:33:11krux02no
10:33:32krux02a string won't be a pointer type anymore
10:33:40stefanos82lovely!
10:33:55krux02it is the tuple[len: int; p: pointer]
10:34:05krux02so p will be nil on ""
10:34:46krux02but not the string itself
10:34:56stefanos82I see
10:35:39AraqI'm not entirely happy with this representation but it's the best I could come with :P
10:35:58stefanos82Araq: which representation exactly? that of a string?
10:36:12krux02the current implementation is a hash to just treat "" and nil equivalently. With a few exceptions (bugs) here and there, because they are not the same.
10:36:19FromGitter<tim-st> any way to check if a int is a valid file mode like `0o0777` ?
10:36:52Araqyes. SSO is a sweet idea but my feeling is that we gain more by making string literals zero-copy
10:37:05Araqand moves faster
10:37:13krux02Araq: I was listening to a lot of c++ conference talks, and it seems the best string representation (for c++) would be a representation with small string optimizations.
10:37:44stefanos82what's SSO?
10:37:45krux02so that small strings do not have heap memory that causes expensive copies.
10:38:22Araqalso code like proc replace(a, b, c: string) suffers if your strings take 3 or 4 machine words
10:38:25krux02(I mean hack not hash)
10:38:45Araqkrux02: pretty sure I watched all these talks too.
10:39:05krux02good ;)
10:39:44Araqbut Nim is not C++, in Nim you can write const data = [["a", "b", "c"], ["x", "y", "z"]]
10:39:55Araqwithout having to resort to C strings.
10:40:49krux02C string literals have one nice treat though. The same liter on the same file will be collapsed to the same memory location.
10:40:59krux02with file I mean module
10:41:42*rockcavera quit (Ping timeout: 244 seconds)
10:42:06krux02makes the module smaller. But I don't think that it would really matter today anymore at all.
10:42:34stefanos82Araq: without knowing much around string implementation, how does Nim handles little-endian and big-endian?
10:42:58krux02stefanos82, there is a module where you can manually change the endianness of numbers
10:43:10krux02but strings are not endian affected
10:44:07krux02I think only 16 and 32 bit sized character strings are affected by endianness.
10:44:14krux02Nim has 8 bit chars
10:44:49stefanos82this has some good info in it around endianness https://stackoverflow.com/q/21694302
10:46:27krux02as I said Nim isn't affected. It doesn't store characters into pointer members.
10:47:29stefanos82very well
10:52:29stefanos82is there a way to get only the generated AST as my output?
10:52:48*Perkol joined #nim
10:53:24krux02the ast is not characters it is a data structure that is used during compilation.
10:54:13krux02but you can always print the ast of something with the help of a macro
10:54:33krux02macro printit(arg: typed): untyped = dumpTree(arg)
10:59:30Araqkrux02: Nim does the same, string literals are "pooled" or whatever you want to call it
10:59:58krux02Araq: http://ix.io/1gHS
11:00:45krux02oh, I din't know about the pooling. Can it be that the last time I did it, it was not yet the case?
11:01:43krux02Araq: C++ also had some improvements over the years. Especially initialization became a lot better.
11:03:07krux02in c++ {} can be used to initalize everything, not just arrays.
11:03:28krux02but c++ wouldn't be c++ if it hadn't some exceptions.
11:04:08krux02so in order to call the constructor with size and capacity of std::vector<int> you still have to use the () constructor.
11:04:47*viniarck joined #nim
11:05:24*viniarck left #nim (#nim)
11:08:17Perkolhttps://raw.githubusercontent.com/ultramancool/tweetnacl-usable/master/tweetnacl.c I try to use c2nim to convert it, get error tweetnacl.c(3, 8) Error: did not expect [NewLine]
11:09:13PerkolWhat may be the problem
11:09:29FromGitter<mratsim> strange, someone had the same newLine issue yesterday
11:16:27*skrylar joined #nim
11:34:01FromGitter<alehander42> are js string and seq starting with "" @[] now?
11:34:26FromGitter<alehander42> that would be a great anti-bug default
11:35:31krux02alehander42: I don't know anything about the js backend.
11:37:27stefanos82krux02: wow, what a coincidence lol! You have mentioned constructors and Jason Turner just released a new video explaining the use of in_place_t http://paste.debian.net/hidden/d7cdc3c4/
11:39:42krux02I don't know std::in_place_type_t, and I knind of don't want to know
11:43:36stefanos82it's that kind of magic that does magic of doing magic on magic without an extra magic on top of magic...oh look, a squirrel!
11:43:50stefanos82that kind of logic
11:45:13krux02no it is yet another attempt to have an argument of "hey you can do it, see" but in fact the solution is unteachable or not practicable.
11:46:02stefanos82true
11:46:18stefanos82if you could only see my facial expressions when I saw the video
11:46:46krux02it is like std::next, or std::array.
11:48:08krux02They are great in theory, if you would use them exclusively. But the problem is the introduction didn't fix any of the existing problems nor problems of people who are just starting to learn the language. They are most an increase of complexity in the language to fix a minor disign flaw.
11:48:28stefanos82bingo
11:49:21stefanos82they are trying to fix the crack on the door by setting up an entire hangar that builds the whole company that constructs the tools that build brand new doors
11:49:28stefanos82which does not make any sense to me
11:49:47krux02no they fix the crack in the door, but building a new door that does not have the crack.
11:50:07krux02But that doesn't fix the crack at all.
11:51:00krux02And then they are happy, that they didn't break any code that relies on the crack in the door.
11:52:16krux02You then just have two doors. One with a crack and one without a crack that nobody uses.
11:52:48stefanos82yeah :/
11:54:45krux02well it is good if you know all the side entries without the cracks. But I still think it takes you 10 years to learn about them all.
11:55:01krux0210 years of writing buggy horrible software.
11:58:09Perkolhttps://raw.githubusercontent.com/ultramancool/tweetnacl-usable/master/tweetnacl.c what can /temp-tweetnacl.nim.c(701, 32) Error: expected ';' error mean?
11:59:02Perkolsorry gcc: warning: tweetnacl-usable: linker input file unused because linking not done
12:02:38stefanos82krux02: imagine, I don't have a professional experience around C++, only on a personal level purely academic experience and I have seen some horrors with legacy codes. Every newer release they try to fix old issues and most of the time they introduce new headaches.
12:03:27krux02yea unmaintainable.
12:03:34stefanos82if C++ continues with this pace, the standard manual will become the size of "The Art Computer Programming"
12:03:36krux02I hope Nim doesn't do the same horrors.
12:03:37FromGitter<mratsim> I don’t think the issue is with C++. Python legacy code can be ugly too. It’s focus on new features and use case without paying the technical debt.
12:04:49stefanos82the problem with C++ is that Bjarne himself acknowledges the problem and suggests to pick the right paradigm for the right problem
12:04:51krux02I think in dynamically typed languages it can bu much harder to pay the technical depth, because it is very weak at statically analizing the code.
12:05:17stefanos82but C++ is not a toolkit; it's a programming language and us as human species tend to like knowing everything in great detail, especially researchers and scientists
12:05:32krux02not just them
12:05:41FromGitter<mratsim> I would love to have users that want to know everything in details ;)
12:06:05stefanos82mratsim: it's our fault that users got lazier and lazier
12:06:07krux02everybody who cares about a good solution wants to know the details of what is actually happening on the machine.
12:06:25stefanos82thanks to automation, people got used to find everything around them right next to a push button
12:06:26krux02stefanos82, no it's not our fault.
12:06:55krux02I don't know who is to blame. But I generally like to blame the lazy people.
12:07:03FromGitter<mratsim> I don’t think so. Lots of people just want something to just work and focus on say the footbal match and not DNS, networking, redundancy, high availablity, chaos monkeys ….
12:07:03krux02People who don't care are not good programmers.
12:07:06stefanos82that's us, the programmers
12:07:59krux02people who don't care what actually happens on the machine, and don't want to know how the program gets compied are not good programmers
12:08:12stefanos82in the past we had actual qualitative code, due to many factors. nowadays with this cloud thing, people don't care about quality; they care about quantity.
12:08:13FromGitter<mratsim> those people are the one who pay the companies, which develop the product and the devs. And you have a balance to reach for the feature people want and the technical debt and craftmanship of devs
12:08:14krux02that also applies to javascript programmers.
12:08:58krux02I don't want to go to far into that.
12:09:02stefanos82companies don't let developers to build secured products. They care about delivering, that's all
12:09:14stefanos82money money money
12:20:30FromGitter<narimiran> not everyone *wants* to be 'good programmer'. not everyone *can* be 'good programmer'
12:21:20livcda digital plumber
12:21:36*Guest79477 quit (Quit: Leaving)
12:21:51livcd #nim-offtopic
12:24:04krux02stefanos82, money is good. It allows to get such things as food.
12:25:25krux02A good programming language is a language that enables novice programmers to write stable und usable software in reasonable amount of time.
12:27:05krux02and that is what I want for Nim. Enable novice programmers to write stable und usable programs. And no nil strings is on step in that direction.
12:33:19krux02Araq: I have a primitive test project to test the gdb printers. Where should I put that?
12:34:32Araqtests/untestable, maybe
12:35:25Araq(which should have been called 'tests/notautomatable')
12:35:48krux02ok
12:36:06krux02I think it is automatable, but it is so different to test that all the other automated tests
12:52:00FromGitter<kaushalmodi> A discussion going on here if Nim could allow line continuation to work with tokens at beginning of lines too (if possible): https://github.com/nim-lang/Nim/issues/8258
13:07:26Araqgiven enough effort, everything is possible
13:08:39Araqbut "readability" either needs to be baked up by science or paraphrased as "I like it better this way"
13:11:52AraqI fail to see the point though, don't you all want a tool (nimpretty) that settles every tiny code style question?
13:12:12Araqthen why introduce new ways to write the same?
13:12:53FromGitter<mratsim> Brainfuck to rule them all
13:13:03AraqI mean, I know you don't want a "consistent" style. you want *your* style, consistently followed by everybody else.
13:24:04skrylarmratsim: s/brainfuck/rebol/
13:24:46skrylarwell.. smalltalk with integration to the parse dialect might be heavenly :ponders:
13:26:27FromGitter<kaushalmodi> Araq: I've seen that languages either allow a special line continuation token or allow the lines to flow anyhow to the next line if they require a line end char like semicolon. So the line continuation requirement of Nim came as a bit of surprise, and so I put that in my notes. Surprisingly, I saw this issue showing that someone else also found this behavior surprising. That's all. If this alternative style is not
13:26:27FromGitter... implemented, not a big deal. But if enough users like this alternative style and gets implemented, I'll definitely be using that everywhere *consistently* :)
13:30:42*fjvallarino quit (Remote host closed the connection)
13:30:48*fjvallarino joined #nim
13:31:02Araqwell ',' and ';' are natural line continuations and '+', 'and' etc follow them for consistency...
13:31:53Araqyou only argue for consistency when it suits your tastes. and that's getting tiresome really quickly
13:32:33Araqand that's a non-personal 'you' here.
13:32:43Araqevery programmer seems to do that.
13:36:08FromGitter<kaushalmodi> Araq: For record, I never brought this up under the consistency category. It was just surprising and was living silently in my notes. I was just pleased to see someone feel strongly about this detail to request supporting it.
13:36:38FromGitter<kaushalmodi> I don't make fix-for-consistency requests lightly.
13:37:34FromGitter<kaushalmodi> If you support this, I'll be very grateful, that's all.
13:39:31Araqnow we're getting somewhere, if you just say "I like this style better, how about we support it" is a far better way than hiding behind made up claims about objective truths on this matter
13:40:13FromGitter<kaushalmodi> It was never an objective claim.
13:41:14Araqyeah, I should use 'one' more than the unpersonal 'you'
13:42:05*leorize1 joined #nim
13:42:25Araqso ... are only 'and' and 'or' affected?
13:43:53FromGitter<kaushalmodi> I believe any binary operator would apply (thinking which else..). In general, yes, it's usually`and` and `or`.
13:44:31FromGitter<kaushalmodi> Could also be `&` for string Concat
13:44:56FromGitter<kaushalmodi> Or `+`, etc for long math expressions
13:45:19Araqcause if we really consider it, I would in fact vote for:
13:45:28Araqif foo
13:45:31Araqand bar:
13:45:36Araq echo "note the indentation"
13:45:44FromGitter<kaushalmodi> (and I am thinking more, I am recalling all those actual use cases)
13:46:26Araqbut that only makes sense for 'and' and 'or'
13:46:46FromGitter<kaushalmodi> Here's an & example:
13:46:58FromGitter<kaushalmodi> echo "dgdhd"
13:47:05FromGitter<mratsim> for SQL I alsays use: ⏎ ⏎ ```select * from footer ⏎ where 1=1 ⏎ and col1 = ‘foo’ ⏎ and col2 = ‘bar’``` [https://gitter.im/nim-lang/Nim?at=5b44b8d87b811a6d63df4610]
13:47:06FromGitter<kaushalmodi> & "Jdjdh"
13:48:13FromGitter<kaushalmodi> @mratsim Yay for one more supporter :)
13:48:15Araqmratsim: that seems a different problem, infix based syntax doesn't compose well
13:48:43Araqbut maybe that's the "editability" aspect of it
13:48:46FromGitter<mratsim> I’m not really for or against.
13:49:18FromGitter<mratsim> My main grip is the “””, it becomes very strange when you go next line.
13:49:21FromGitter<kaushalmodi> Thanks, "not against" is good
13:50:09FromGitter<mratsim> for me it’s more natural to have the operator at the beginning of the line, that may be because of bullet points.
13:50:43FromGitter<mratsim> but for editability you can just have a dummy true or empty stuff for the first condition
13:50:44Araqiirc Google's style guide says to put it at the line end
13:50:50FromGitter<mratsim> or in the second case for the last condition
13:51:15FromGitter<mratsim> Google style guide for C++ or for Python?
13:51:21Araqfor C++
13:51:51*nc-x joined #nim
13:51:52FromGitter<mratsim> I don’t want to have a Frankenstein language of Python + C++ rules :P
13:52:37nc-xAnyone has any experience with this error (application crashing, not compiler)? https://pastebin.com/WVNnhSMF
13:52:45Araqwell I took Python and improved it, ', \' is ridiculous, this can be ','
13:53:05Araqand the rest followed from consistency considerations...
13:53:18FromGitter<kaushalmodi> Can we quote arbitrary style guides? https://news.ycombinator.com/item?id=7976103
13:53:52Araqtbh
13:54:04Araqthis proposal doesn't work well with anything but 'and' and 'or'
13:54:14Araq& foo is a unary operator
13:54:21Araqbar & foo is a binary operator
13:54:32FromGitter<tim-st> when I need to find out if the target os is 32bit or 64 should I do this over int size?
13:54:40FromGitter<kaushalmodi> Better link: https://www.gnu.org/prep/standards/html_node/Formatting.html
13:55:02Araqnc-x: init your tables
13:55:21FromGitter<mratsim> I’m trying to check into the canonical Google lib, they indeed seem to use then EOL: https://github.com/abseil/abseil-cpp/blob/master/absl/base/internal/thread_identity.cc#L104-L105
13:55:50nc-xAraq: I think I have done it. It works with small values. This issue only occurs if I have some large value.
13:55:53FromGitter<mratsim> but what are Pascal/Python rules here?
13:56:46nc-xWhat I have done is http://craftinginterpreters.com/resolving-and-binding.html and after that I am trying to run a simple lox fibonacci program. For small values it works okay, for large value, about fibonacci(30) I get this crash
13:56:58nc-xAraq: ^^^
13:57:11Araqout of memory?
13:57:13FromGitter<mratsim> fibonacci 20 doesn’t fit in an int64 you know
13:57:23nc-xI have float64
13:57:30FromGitter<mratsim> i don’t even know how big fibonacci30 is
13:57:51FromGitter<kaushalmodi> That HN thread has some good examples showing better readability if operators are at beginning of line. It's nice for people who like aligned operators.
13:58:05FromGitter<mratsim> hmmm no sorry I’m confusing with factorial
13:58:16nc-xAraq: I have lots of memory available, so thats not the issue... This is a bug in my code or nim. Idk.
13:59:13nc-xTo add over to the pain, I have absolutely no tests in the code :P
13:59:39FromGitter<tim-st> does this code find out arch `when int.sizeof <= int32.sizeof` ?
14:00:38PMunchUgh, this dynamic loading this just won't work.. The nimrtl appears to be seriously broken..
14:05:24nc-xWhat is this error now? gc.nim(471) newObjNoInit, alloc.nim(776) rawAlloc, SIGSEGV: Illegal storage access. (Attempt to read from nil?)
14:05:46AraqPMunch: possible
14:05:55FromGitter<mratsim> can you show us how you initialize you table @nc-x?
14:06:34nc-x@mratsim The code is pretty big. It is a complete interpreter.
14:07:00nc-x**incomplete interpreter
14:07:32FromGitter<mratsim> we can’t debug with just this stack trace, it seems like you are using a table that is not properly initialized.
14:07:54FromGitter<mratsim> either it or the things contained inside
14:08:03FromGitter<mratsim> or the key maybe
14:08:41PMunchAraq, so if I get this right the idea is that the nimrtl dynlib should contain all the GC stuff and keep the GC state. Every plugin and the main program should then call the procedures from this library in order to have one unified GC state?
14:08:48nc-xYeah, I will try to debug a bit more and then I will commit the code as-it-is to ask for help in debugging
14:09:27FromGitter<mratsim> you might be missing an initTable or a newTable or a newYourRefType somewhere
14:09:42FromGitter<mratsim> or new result
14:20:17FromGitter<kaushalmodi> Araq: About the unary vs binary &, if the & is indented, wouldn't it be interpreted as binary?
14:20:49FromGitter<mratsim> it depends on the preceding token
14:20:58FromGitter<kaushalmodi> Hmm, yeah..
14:21:19FromGitter<mratsim> you can have “foo” & & “bar{strformatvariable}"
14:21:38FromGitter<mratsim> the first one is infix, the second one is prefix
14:24:33*cryptocat1094 joined #nim
14:27:28*endragor quit (Remote host closed the connection)
14:32:06*endragor joined #nim
14:33:44*NimBot joined #nim
14:34:54AraqPMunch: yes
14:36:27*endragor quit (Ping timeout: 240 seconds)
14:38:57nc-x@mratsim, Araq: Well my issue got solved by --gc:markAndSweep, no idea how or why.
14:39:09*nsf quit (Quit: WeeChat 2.1)
14:39:15FromGitter<mratsim> are you using stable or devel?
14:39:34nc-xdevel
14:40:10FromGitter<mratsim> strange. I thought memory alloc issue for big chunks were solved in March
14:42:44nc-xWell it could very well be an issue in my code that markandsweep gc is ignoring. But as long as it is working fine, I am happy. When it breaks down, then we'll see. :D
14:44:46PMunchAraq, found something interesting. Compile the dll loader with --gc:boehm and the plugins with --gc:boehm --app:lib and it seems to work just fine
14:45:12PMunchDoesn't appear to leak memory either
14:45:48PMunchBut I'm going to go home now. Be back on in about half an hour
14:45:49*PMunch quit (Quit: Leaving)
14:47:27*nc-x quit (Quit: Page closed)
14:47:59krux02Araq: are you shure tools is the right folder for nim-gdb.py?
14:48:08krux02it is not a tool that is built using any nim tool
14:48:22Araqcheck where I put the valgrind config, I don't remember
14:49:05Araq"tools" / "nimgrind.supp"
14:49:13Araqso tools/ is fine
14:49:43shashlickwhat is nim-gdb.py
14:50:26*nc-x joined #nim
14:52:45*Perkol quit (Quit: Leaving)
14:54:07*leorize1 is now known as leorize
14:54:45*nc-x quit (Ping timeout: 252 seconds)
14:56:38*donzx joined #nim
14:57:40krux02shashlick, it is a python script that tells gdb how data structures look like in nim, how to access the children and how to print them.
14:58:03krux02shashlick, basically it allows to use a debugger like you would want to use it.
14:58:21FromGitter<tim-st> @data-man I'd like to use your `nimsnappyc`to support native db value compression but it returns `seq[byte]` where I expect string or cstring, is there a trick to use this type without conversion?
14:59:32*donlzx quit (Ping timeout: 276 seconds)
14:59:44shashlickkrux02: why python?
15:00:00krux02shashlick, the alternative would have been guile
15:00:35krux02it is a script plugin for gdb. And gdb supports guile and python.
15:00:45shashlickok understand
15:00:54FromGitter<alehander42> @krux02 I can add a table pretty printer based on our internal scripts
15:01:06FromGitter<alehander42> I didn't see one on my first look
15:01:13krux02alehander42 I have already a table pretty printer
15:01:25FromGitter<alehander42> ah, ok, I must've missed it
15:01:42krux02well are you looking at the right nim-gdb.py?
15:01:44krux02probably not
15:02:07FromGitter<alehander42> I was looking at https://github.com/krux02/Nim-gdb
15:02:20FromGitter<alehander42> ah that's a fork
15:02:31krux02https://github.com/krux02/Nim/blob/gdb-pretty-printers/gdb/nim-gdb.py
15:02:48krux02I want it in the official repo
15:03:08krux02so that when you clone Nim, it is there
15:04:16krux02it is still not automatically loaded, but yea that is a tough one, because gdb has thousand switching to disable automatic loading and the tutorials only explain how disable automatic loading, not how to enable it.
15:04:21FromGitter<alehander42> as far as I remember OrderedSet is pretty similar to HashSet in my implementation
15:04:29FromGitter<alehander42> it shared code at least
15:06:32*fjvallarino quit (Remote host closed the connection)
15:09:42*fjvallarino joined #nim
15:10:05FromGitter<alehander42> I think
15:10:22FromGitter<alehander42> ```python ⏎ ⏎ yourcode``` ⏎ ⏎ is ~/.gdbinit makes it possible [https://gitter.im/nim-lang/Nim?at=5b44cc5e60c38707836d811f]
15:10:43FromGitter<alehander42> one can also put it in local .gdbinit but then it needs special rule in ~/.gdbinit i think
15:11:14FromGitter<alehander42> anyway, that's still not perfect, as it loads for each file this way
15:11:24FromGitter<alehander42> even non-nim based binaries
15:15:44FromGitter<xDotDash> Is there a way to generate a documentation reference to a type, from, say, a proc?
15:22:51*fjvallarino quit (Remote host closed the connection)
15:26:37krux02xDotDash: I have no idea what exactly you want.
15:26:51krux02do you want the documentation of a type or do you want the documentation of a proc?
15:27:33FromGitter<xDotDash> Similar to how java has `{@link Type}` for Javadocs, I want to be able to link users of my library to it directly
15:28:46FromGitter<xDotDash> So it is a clickable link that takes the user to the Type
15:28:51krux02ok that you mean. I am sorry I think there is no official way to make real references in the documentation commants yet. I normally use ``Type``
15:29:00FromGitter<xDotDash> Ah ok, thanks
15:38:18krux02if nim would compile to libstdnim.so, we could ship a libstdnim-gdb.py along the library, and gdb would load it automatically.
15:44:44krux02Araq: is there a nim command that just echos the path of the nim directory with the sources and eventually nim-gdb.py
15:46:17*fjvallarino joined #nim
15:47:16*leorize quit (Ping timeout: 256 seconds)
15:52:38stefanos82bloody hell...Google is screwing us right now. It does not let me sign in my gmail without providing my phone number. I don't want to give them my phone number for heaven's sake!
15:56:56*leorize joined #nim
15:57:25FromGitter<tim-st> stefanos82: I had this before and got it skipped by using other browser
15:57:38stefanos82I have tried both Firefox and Chrome
15:57:52stefanos82the same thing. The entire Gmail outlook changed
15:57:57stefanos82which means they have applied new rules
15:58:36FromGitter<tim-st> ok, then maybe they think the people are pushed enough in this direction to give everything now
15:58:55*rockcavera joined #nim
15:59:04FromGitter<tim-st> maybe with javascript off
15:59:22stefanos82if they are forcing me to provide my phone number, I will simply close the account
15:59:25stefanos82as simple as that.
15:59:35FromGitter<tim-st> yes, me too, I hate tat
15:59:38FromGitter<tim-st> *that
16:00:20FromGitter<tim-st> and they dont even tell what's about, they say "for better security" lol
16:00:53*subsetpark joined #nim
16:02:51stefanos82for F***'s sake, now it labels it as account RECOVERY!
16:03:02stefanos82what the actual hell Google@
16:03:03stefanos82!
16:03:29stefanos82I don't even owe an Android
16:03:34FromGitter<tim-st> ah, yes, that was exactly the thing they told me too^^
16:03:35stefanos82I use a Linux desktop computer
16:04:21*leorize quit (Ping timeout: 240 seconds)
16:05:20stefanos82so, in other words, I won't be even able to close my Gmail account thanks to this retarded thing
16:05:28stefanos82way to go Google, you did it again!
16:10:35*noonien joined #nim
16:16:01*leorize joined #nim
16:22:12stefanos82man, this is a comedy right now...they send me emails on my secondary email that they have blocked an unauthorized access by my own Gmail account!
16:22:30stefanos82please tell me their ML messed up badly their entire infrastructure
16:23:22*fjvallarino quit (Remote host closed the connection)
16:26:03*Vladar quit (Remote host closed the connection)
16:26:28*Vladar joined #nim
16:32:22FromGitter<mratsim> embrace, extend, extinguish?
16:36:28stefanos82you want to know the shitty part mratsim?
16:36:34stefanos82they asked me for my recovery email
16:36:37stefanos82I gave it to them
16:36:51stefanos82they created a new gmail account that ends with .yahoo.com
16:36:54stefanos82WHAT?!
16:38:43FromGitter<k0pernicus> ...
16:38:56FromGitter<k0pernicus> That's.
16:38:58FromGitter<k0pernicus> Very.
16:39:01FromGitter<k0pernicus> Strange.
16:39:56FromGitter<k0pernicus> Are you sure Google asked you this?
16:40:08FromGitter<k0pernicus> I mean: are you sure it's Google?
16:41:52stefanos82lol yea
16:41:54stefanos82gmail.com
16:42:20stefanos82I have even received emails from [email protected] with my verification code
16:42:30stefanos82oh they messed up so bad lol
16:42:44stefanos82now I want 10 times to delete any Google account I may have
16:47:21*PMunch joined #nim
16:50:36FromGitter<alehander42> nope, it might seem it's from gmail.com but to be actually from somewhere else
16:51:57FromGitter<alehander42> "forging headers" I think
16:53:02*miran_ joined #nim
16:54:39FromGitter<alehander42> so the `from` field can contain all kinds of fake info ⏎ e.g. https://www.howtogeek.com/121532/htg-explains-how-scammers-forge-email-addresses-and-how-you-can-tell/
16:55:06FromGitter<alehander42> I also didn't know that, but make sure that's authentic
16:55:36stefanos82they have fixed my issue and sent me an email
16:55:59*donzx quit (Quit: Leaving)
16:57:16*fjvallarino joined #nim
16:57:43FromGitter<alehander42> hm, still the yahoo.com thing sounds very suspicious
16:58:51stefanos82don't worry. I'm backing up my emails and deleting the account.
16:58:53stefanos82I have had enough
16:59:34*nsf joined #nim
17:01:21*fjvallarino quit (Remote host closed the connection)
17:01:28*fjvallarino joined #nim
17:12:21stefanos82done
17:23:56*ng0 joined #nim
17:28:07FromGitter<alehander42> well, still you have to be sure it's deleted without leaking to a third person account
17:31:37*vivus joined #nim
17:38:02stefanos82they can do whatever they want. it's just an email without access to any bank account or whatsoever. besides, I don't have money, like at all! hahahaha ^_^
17:41:49*PMunch quit (Quit: leaving)
17:49:08FromGitter<Varriount> But they might be able to ruin your reputation.
17:51:42*Cthalupa- quit (Ping timeout: 260 seconds)
17:51:42stefanos82which reputation?
17:51:58stefanos82I guess I'm lucky I have no friends :D
17:52:02*Cthalupa joined #nim
17:52:06stefanos82long live my hermit life!
17:54:37krux02this took longer that I hoped: https://github.com/nim-lang/Nim/pull/8263
17:55:03krux02but when it gets accepted, finally easy to use gdb support
17:55:19shashlick@mratsim: would you be open to changing nim-clblast to look like a standard nimgen project? i would like to add it to the nimgen test matrix
17:55:21krux02easy nim debugging (for unix systems)
17:55:26FromGitter<k0pernicus> Youhou! \o/
17:55:39FromGitter<k0pernicus> Very cool @krux02 :)
17:56:00krux02sorry I mean posix systems
17:56:23krux02I know unix only as a legend that was the mystical predecessor to Linux
17:56:28krux02and from Jurassic Park
17:56:42FromGitter<k0pernicus> Jurassic Park, oh yé…
17:57:23FromGitter<k0pernicus> "It's Unix… I know this system Tim…"
17:57:39FromGitter<k0pernicus> *click* *click*
17:57:44krux02ok I have to go
17:58:00*krux02 quit (Remote host closed the connection)
18:01:33*Cthalupa quit (Ping timeout: 264 seconds)
18:03:31*Cthalupa joined #nim
18:14:33subsetpark@dom96: nimble question for you. i can have a requirements 'requires "[email protected]:foo/bar"' - but can I specify a tag there?
18:15:06dom96yes
18:15:11dom96#your-tag
18:15:30dom96but if you want a version then just specify it
18:16:25skrylaryay, nblosc is in nimble
18:16:30skrylarnow to add firebird and fltk
18:18:03*miran_ is now known as miran
18:20:20subsetparkdom96: specify it like "URL 0.1.1" ?
18:20:26dom96yeah
18:20:41subsetparkoh hm, that works! It ddn't work last time I ried it :)
18:21:08FromGitter<metasyn> hello everyone~ my company has a hack week this week and i decided to do mine in nim
18:21:16skrylarcongrats
18:21:19dom96awesome
18:21:36FromGitter<tim-st> @dom96 is every import name in nimble unique? I mean if this one already exists should I use another one?
18:21:43dom96yes
18:21:48FromGitter<tim-st> :(
18:22:12FromGitter<metasyn> we have this weird internal serialization protocol, so i'm writing the interface for it in nim so people can interact with our software (splunk) via nim
18:22:35FromGitter<metasyn> i'm running into something weird that i'm sure is really basic... basically i'm reading a line form stdin, but it hands even when I check for `endOfFile()`
18:22:45skrylari actually think you should be using git submodules tbh, because they will be pinned to the exact version that is known to work with your project :F
18:23:17dom96skrylar: No need for submodules. Nimble can pin packages too
18:24:05dom96metasyn: gist your code
18:24:15skrylardom96, nimble also doesn't work >:(
18:24:26dom96skrylar: hrm?
18:24:42*skrylar *still* has to perform the operations of `nimble publish` by hand
18:25:27FromGitter<metasyn> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b44fa173c5abf52b64c015d]
18:25:27*Trustable joined #nim
18:25:30skrylarregardless. have to figure out a satisfying way of testing for breakages
18:25:43skrylarconsidering if its worth figuring out lxc/lxd for it
18:25:44dom96So a specific Nimble feature doesn't work, not all of Nimble
18:26:19dom96metasyn: maybe endOfFile is broken, readLine should work
18:28:19FromGitter<metasyn> Hm, I try just replacing that with readLine - it seems like either its reading forever or it never encounters an EOF ?
18:33:24dom96It's reading the lines correctly, right?
18:34:07FromGitter<metasyn> it does on the first exchange, but the second exchange it seems to just hang on reading, e.g. the log just stops at "Reading chunk..." and I have to kill the process
18:34:49dom96Are you just doing `readLine` in a loop?
18:36:19FromGitter<metasyn> it first does readLine to get information about how much more to read, the payload size. after that i use readChars since I know how many bytes i need to read
18:36:45dom96okay, so that's a different problem :)
18:37:18dom96readChars could be the problem then, test it to be sure
18:37:59FromGitter<metasyn> I see - the reason I thought it was at the point above is because the logging will stop at that point, so i didn't think readChars was involved
18:40:09dom96It could be multiple things. endOfFile on stdin could be broken too
18:40:17mirandom96: please moderate this topic: https://forum.nim-lang.org/t/4031 (one reply is hidden)
18:40:44dom96miran: thanks
18:40:51mirannp :)
18:42:14CodeVanceIts me
18:42:16CodeVanceI changed my email
18:43:13dom96metasyn: I just tested it. It seems that endOfFile waits for data on stdin before returning
18:43:41dom96So you should probably only call it when you're about to read data from stdin
18:43:49dom96readChars seems to be working fine for me
18:43:58FromGitter<metasyn> I see
18:44:21FromGitter<metasyn> https://conf.splunk.com/files/2016/slides/extending-spl-with-custom-search-commands-and-the-splunk-sdk-for-python.pdf ⏎ ^ for context, i'm trying to write the parser for slides 21-22
18:45:56dom96Is the data always sent via stdin?
18:46:18FromGitter<metasyn> yeah
18:46:54CodeVanceCan't esacpe EOF?
18:47:26FromGitter<rayman22201> Is there a known behavior that the js backend produces a different result for `cstring.len` than the c backend?
18:47:57CodeVancedoesn't cstring in js just use js's string?
18:48:07FromGitter<rayman22201> yes
18:48:36FromGitter<rayman22201> and on the js backend it does what I expect. lol
18:48:47CodeVanceSo then yes
18:48:59FromGitter<rayman22201> the c backend seems to produce len - 1
18:49:08FromGitter<rayman22201> this is on devel btw
18:49:09CodeVancecstring for c uses c's string
18:49:11dom96rayman22201: that's a bug
18:49:38FromGitter<rayman22201> yay 🎆
18:49:51*smt joined #nim
18:50:25FromGitter<rayman22201> Is it related to the new destructor based strings in the c backend?
18:50:41FromGitter<rayman22201> There is probably no way to know that. stupid question
18:50:48FromGitter<tim-st> how can I check if a c compiler is used for compilation?
18:51:19FromGitter<rayman22201> `nim c` = use a c compiler. `nim js` make js files
18:51:36skrylari think tim means 'when defined(???)'
18:51:43FromGitter<rayman22201> oh, lol
18:52:09FromGitter<tim-st> yes, skrylar
18:52:45CodeVancewhen not defined(js) I think
18:53:28FromGitter<tim-st> no this allows c++
18:53:47FromGitter<tim-st> I think when compiles(some c header test proc)
18:53:50FromGitter<rayman22201> There is a list of all the compiler defined constants that you can use when on somewhere. I'm trying to remember where
18:54:17dom96I'm guessing `when defined(cc)``
18:54:43FromGitter<tim-st> dom96: thanks
18:55:09dom96It sure would be nice if `system` contained a `Backend` constant :)
18:55:35FromGitter<tim-st> dom96: when defined(cc) doesnt work
18:55:53dom96`defined(c)`? I don't know, I'm guessing here. IIRC C++ is: defined(cpp)
18:56:16dom96Why do you want to detect `C` only?
18:56:31FromGitter<tim-st> because my lib is c only
18:57:11dom96How can it be C-only?
18:57:31FromGitter<tim-st> it wraps c source code
18:57:39dom96C++ can use C libraries
18:58:14FromGitter<tim-st> ok, didnt know that
18:59:14*bozaloshtsh quit (Ping timeout: 256 seconds)
19:00:48*cryptocat1094 quit (Ping timeout: 244 seconds)
19:00:54Araqwhen not defined(cpp) and not defined(js) and not defined(objc) # yeah ... I know, it sucks
19:00:57*yglukhov[i] quit (Read error: Connection reset by peer)
19:01:30FromGitter<tim-st> and not defined(nimscript) but when gpp can compile it too, I dont care
19:01:33*yglukhov[i] joined #nim
19:01:49FromGitter<rayman22201> Are there any major roadblocks to js sourcemaps being implemented? That idea seems to have died.
19:01:55FromGitter<tim-st> or if copyMem exists
19:03:09*yglukhov[i] quit (Read error: Connection reset by peer)
19:03:43*yglukhov[i] joined #nim
19:05:20shashlickskrylar: have you tried nimgen?
19:05:58*Cthalupa quit (Ping timeout: 244 seconds)
19:06:04Araqrayman: it's not dead but it's a "champion" to clean it up
19:06:10Araq*but it needs
19:08:05*Cthalupa joined #nim
19:08:18shashlickAraq: what are your main distractions to get to 1.0? Anything the community can do to alleviate
19:08:57FromGitter<rayman22201> @Araq Where does the unfinished sourcemap code currently live?
19:09:07FromGitter<rayman22201> also good question from @slashlick
19:14:59FromGitter<tim-st> Already wanted to use this style a few times in my code: https://github.com/nim-lang/Nim/issues/8258
19:15:24skrylarshashlick, what about it
19:15:39*birdspider joined #nim
19:16:04FromGitter<kaushalmodi> @tim-st Looks like it's not going to happen.. looks like the whole of the core team disagrees
19:17:01shashlickskrylar: curious if you could try it for your next wrapper, you mentioned firebird and fltk
19:18:21FromGitter<tim-st> @kaushalmodi maybe not now, but when nim gets a bigger audience more people will say the same
19:19:18*nc-x joined #nim
19:19:42FromGitter<tim-st> I think even when I used pycharm and pressed format it autoformatted to the style that is prohibited in nim
19:20:01nc-x@tim-st well, most of the go programmers have been asking for generics, yet they still didn't get it ;)
19:20:17Araqshashlick: well ... apart from fixing bugs
19:20:24FromGitter<tim-st> they dont get it because of compile times, which is in fact a good reason
19:20:44Araqfinishing --incremental:on would be most important.
19:20:45nc-xWell D and nim havd pr
19:20:56nc-xpretty fast compile times even with generics
19:21:22FromGitter<tim-st> nims compile times are currently not compareable to go
19:21:49FromGitter<tim-st> I didnt used d but I read people said d has problems compiling bigger projects and it uses tons of memory
19:21:56Araqhuh? I recently compiled Go code on Windows and it was slower than Nim's compile times
19:22:13Araqin fact
19:22:21AraqI was suprised by its poor performance
19:22:35Araqbut maybe it's just a windows specific problem
19:22:36nc-xI think with a opinionated nimpretty would be an end to these types of issues
19:22:36FromGitter<tim-st> maybe a small source code and the first compilation
19:22:48nc-xI have the same experience as that of Araq
19:23:37subsetparkdom96: Is it possible that there is a bug in nimble when nimble.ini only has `cloneUsingHttps = false`?
19:23:50FromGitter<tim-st> but I think it is quite possible to make nims compile times quicker than go, it needs just a cache technique that works
19:24:07Araqwe have one in the works :P
19:24:20dom96subsetpark: dunno, anything is possible
19:24:37Araqit's a pretty solid design, so hopefully only implementation bugs will crop up
19:24:45Araqand not design bugs...
19:25:21FromGitter<tim-st> Araq: does it understand between release mode and debug mode, and between different nimcache folders of different architectures, can it prove files that can be reused?
19:25:24shashlickAraq: well, ya we can work on bugs but if there's specific things on your plate that we can offload, we can try
19:26:02FromGitter<tim-st> I would need more knowledge of e.g. c's *.o files when can these be used again etc
19:27:10subsetparkdom96: yeah, pretty sure.
19:28:26Araqtim-st: yes, it does. also you can use release vs debug specific --nimcaches
19:28:29Araqkoch does that.
19:28:46FromGitter<tim-st> does it also reuse the *.o files?
19:28:53Araqyes.
19:29:01FromGitter<tim-st> ok, that sounds good
19:29:03Araqit also runs the C compiler in parallel
19:29:08Araquses all of your cores
19:29:30Araqbut IC (incremental compilation) is about the frontend "caching"
19:29:37FromGitter<tim-st> so in best case some phases of gcc can be skipped?
19:30:04Araqjust try it, usually only a couple of C files are recompiled
19:30:14FromGitter<tim-st> with devel?
19:30:28FromGitter<tim-st> I have fear using devel, last time nimsuggest went to 100%
19:30:32Araqwith 0.18 too
19:30:36shashlickhttps://github.com/nim-lang/nim/issues/6220 <= no longer crashes, can someone check and close this?
19:30:53FromGitter<tim-st> do I need som extra compilation paramters?
19:31:56shashlickhttps://github.com/nim-lang/nim/issues/6453 <= same for this
19:32:40FromGitter<tim-st> at my current version all files are in the same nimcache folder, I think that can be a problem
19:33:08shashlickhttps://github.com/nim-lang/nim/issues/6671 <= one more that's fixed
19:33:14FromGitter<tim-st> especially c wrapped sources dont get a prefix
19:33:29Araqtim-st so ... use --nimcache ?
19:33:59FromGitter<tim-st> last time I wanted to do that someone said I shouldnt, it's not stable
19:38:05Araqwell koch uses it so it's used on a daily basis
19:38:33*nc-x quit (Ping timeout: 252 seconds)
19:39:09shashlicktestament also uses it right
19:39:57FromGitter<tim-st> but from what I see all files come in one nimcache folder and they are not seperated like in go's caching they use subfolders exactly how the subfolders are in the source code
19:40:12FromGitter<tim-st> the current way allows overwriting of same named files I think
19:40:23FromGitter<tim-st> only stdlib has prefix
19:40:29Araqwhy would subfolder improve "caching"?
19:40:47Araqno, every nimble package gets a prefix, but that's also not the point.
19:41:07Araqthe prefixes are a about clashes, but the topic is "caching"
19:41:33FromGitter<tim-st> because of overwriting and additonally the chance is higher that the already cached version fits better like release/debug mode and arch version
19:42:39FromGitter<tim-st> when I have `main.c` from different folders, both taking 10minutes to compile, only one is always cached?
19:45:15*Trustable quit (Remote host closed the connection)
19:52:11stefanos82dom96: I have tried the jester demo from your book and got the following error message: http://paste.debian.net/hidden/a1f05261/
19:53:27dom96Damn, maybe I shouldn't have tagged 0.3.0 indeed :/
19:54:18stefanos82so, what should I do?
19:54:22stefanos82any suggestions?
19:54:40stefanos82maybe replace the >= 0.0.1 with >= 0.30.0 instead?
19:54:52stefanos82*0.3.0?
19:54:53dom96You're almost there
19:54:59dom96< 0.3.0
19:55:02stefanos82OK
19:55:10dom96or just `jester 0.2.1`
19:55:18stefanos82that should do.
19:56:09stefanos82hello world ^_^
19:57:37stefanos82so, when we interrupt it with Ctrl-C, should we consider such messages "Error: Execution failed with exit code 130" as normal?
19:57:37dom96Araq: When can we release 0.19.0? :)
19:57:45dom96stefanos82: yes
19:57:51stefanos82dom96: lovely
19:58:55Araqdom96: maybe in August
19:59:38dom96Araq: :/
20:04:36FromGitter<kayabaNerve> @alehander42 it was a joke based on Varriount not wanting fatally flawed features. I think removing int counted.
20:05:59*lompik quit (Ping timeout: 260 seconds)
20:20:08Araqhttps://docs.swift.org/swift-book/LanguageGuide/MemorySafety.html oh look, Swift has a borrow checker
20:20:29Araqand globals are different from locals
20:20:46Araqand they probably have something like .gcsafe too then.
20:26:34*yglukhov[i] quit (Remote host closed the connection)
20:27:35dom96That really makes Swift seem complicated to me
20:46:47Araqwell we need the similar rules for proving memory safety
20:47:52Araqfor the "new runtime" (which is more and more a patch to the existing technology)
20:48:07Araq(but that's a good thing, risk mitigation)
20:52:04*miran quit (Ping timeout: 260 seconds)
21:01:01*nsf quit (Quit: WeeChat 2.1)
21:01:08FromDiscord<exelotl> wait a minute, is that URL what I think it is https://media.discordapp.net/attachments/423232256350486539/466347570319458304/PSX_20180710_225726.jpg
21:01:23*yglukhov[i] joined #nim
21:03:57*birdspider quit (Ping timeout: 240 seconds)
21:05:58*birdspider joined #nim
21:08:37*noonien quit (Quit: Connection closed for inactivity)
21:11:40*bozaloshtsh joined #nim
21:12:52*bozaloshtsh quit (Changing host)
21:12:52*bozaloshtsh joined #nim
21:13:29*vivus quit (Quit: Leaving)
21:20:52FromGitter<tim-st> when getting memory safety is only possible via a complex syntax, then I would prefer having no memory safety. Though I think in theory it should be possible to let the compiler determine everything without having the user type these complex syntax like in rust
21:21:58*bozaloshtsh quit (Quit: ZNC 1.7.0 - https://znc.in)
21:22:07*bozaloshtsh joined #nim
21:22:25*bozaloshtsh quit (Changing host)
21:22:25*bozaloshtsh joined #nim
21:22:52AraqI haven't said anything about syntax
21:23:28FromGitter<tim-st> So you want to get memory safety without changing the syntax?
21:26:32Araqdepends on what counts as "changing the syntax". some additions like 'lent T' and 'sink T' are required but mostly affect the stdlib
21:26:55FromGitter<tim-st> why are these required?
21:27:21Araqspeed. conceptual clarity.
21:27:28FromGitter<tim-st> is there no way for the compiler to calculate/prove the correct ones?
21:27:56FromGitter<tim-st> IMO this is already too much
21:28:01Araqthere is, but that gets us into "sufficiently smart compiler" territory
21:28:58skrylarhad pondered a way around that but its not tested so i don't know if it would work. basically had to do with the concept of a compiler that runs its own interpreter, with a marker for running in there (like the >php> tags maybe); but the thing of relevance was the idea that every object had an "orbit" bag where you could shove things that were only valid during compilation
21:29:03FromGitter<tim-st> I think it would be ok, if these were optional, so people who dont use it and stay with normal syntax just dont have memory safety
21:29:41Araqtim-st: the people who don't use it get slower programs, but the same safety
21:30:07skrylarthe hope was you could implement your own special keywordy things by having them put metadata "in orbit" instead of having a ton of special cases; but there'd probably be issues propagating them (i dunno, but it seemed neat)
21:30:26FromGitter<tim-st> ah, nice, so as long as the old way is supported and the new one is not too bad like in rust everything is fine
21:30:32AraqIMO that's a fair tradeoff. write declarative stuff to get more speed. (It's not imperative code)
21:31:14FromGitter<tim-st> also I dint think nim is much slower than rust, benchmarks show they are very similiar although rust devs invests hours in finding the right lifetime parameters
21:35:57*birdspider quit (Quit: Leaving)
21:36:43Araqit's not really about speed.
21:37:38Araqit's about guarantees and positioning Nim for embedded development or hard realtime systems
21:38:24FromGitter<tim-st> ok, for me it's only important that syntax doesnt change too much ;)
21:40:21shashlickfor anyone interested in nimgen development - https://gitter.im/nimgen/Lobby
21:41:09Araqskrylar: sounds like you reinvented "abstract interpretation"
21:44:14skrylarwell now i'm reinventing bytecode ;_;
21:44:50skrylarsomeone had the bright idea to use json to store bytecode (it wasn't me) and it requires a pecuiliar way of stepping through it @_o
21:44:53FromGitter<kayabaNerve> skrylar Why?
21:45:07FromGitter<kayabaNerve> BTW thoughts on Funge98?
21:45:15FromGitter<kayabaNerve> And got it
21:45:21FromGitter<kayabaNerve> Sounds horrible
21:45:50FromGitter<kayabaNerve> Wait is Funge98 bytecode since 1 character is 1 ASCII byte? 0_0
21:45:58skrylarhttps://github.com/inkle/ink/blob/master/Documentation/ink_JSON_runtime_format.md
21:46:05FromGitter<kayabaNerve> *1 ASCII character = 1 byte
21:46:45skrylareeh the only esoteric language i would bother with are maybe L-systems
21:47:34skrylarotherwise pretty much just going to stick with nim (and bolt on rebol for scripting) unless nim starts doing too much stupid :E
21:50:20FromGitter<kayabaNerve> I script in NodeJS
21:50:47skrylarnode is okay
21:51:12FromGitter<kayabaNerve> I work with a lot of web services
21:51:18skrylarmruby is kind of neat, but it had some strange issues when i tried it before
21:51:48FromGitter<kayabaNerve> Servers, bots, APIs, JSON data...
21:52:06FromGitter<kayabaNerve> All the stuff NodeJS is perfect for
21:52:11FromGitter<kayabaNerve> And then Nim <3
21:52:38skrylargo has a rewrite of lua that is kind of neat. it uses native go objects so it plays well with the GC
21:52:42FromGitter<kayabaNerve> And then Funge98 is a fascination of mine 0_0
21:53:36skrylarhave a current fascination with generated content
21:53:55FromGitter<kayabaNerve> Latex is cool
21:54:18skrylarsomeone extended the realm of the mad god guy's island generator to do entire planets; nd just watched the GDC talk today about Overgrowth's animations
21:54:37skrylarthere's like 16 hand-made frames and the rest is all interpolation
21:55:01Araqfun fact: seqs in the compiler take 2 "compilerProcs", strings take 15
21:57:03Araqoh I miscounted seqs
21:58:54Araqbut still ... 15 for strings. that means you need to implement at least 15 magic procs to replace the existing string implementation
21:59:11Araqpretty bad how this code has grown.
21:59:57FromGitter<kayabaNerve> Araq: type string = string
22:00:01FromGitter<kayabaNerve> Did I just solve it?
22:00:04FromGitter<kayabaNerve> 0 procs
22:00:12FromGitter<kayabaNerve> Perfect compatibility
22:00:31skrylardoes a string really need magic procs
22:00:34Araqnice. but nothing compared to my NP = P solution.
22:00:46Araqlet N = 1. --> NP = P.
22:00:58FromGitter<kayabaNerve> I'll write the Latex
22:01:01skrylari mean they're just buffers (elixir even maps them to binary buffers; although erlang is a bit extremely silly with strings)
22:02:03*bozaloshtsh quit (Quit: ZNC 1.7.0 - https://znc.in)
22:02:11Araqskrylar: yes. so that strings continue to work at compile time. and we continue to know that s[i] requires i < s.len
22:02:12*bozaloshtsh joined #nim
22:02:12*bozaloshtsh quit (Changing host)
22:02:12*bozaloshtsh joined #nim
22:03:10FromGitter<Quelklef> What's the AST for an inline proc? I can't find it in the macros.nim documentation
22:03:55Araqthe same as for any other proc, but its pragmas section contains an 'inline' identifier
22:04:18FromGitter<Quelklef> Sorry, I mean like a proc expression: `let x = proc(y: int): int = body`
22:05:40Araqask dumpTree
22:06:24dom96Ugh, there seems to be something really wrong with the tester
22:06:31FromGitter<Quelklef> Oh, fancy. It's `nnkLambda`, ty
22:06:33dom96This many unrelated failures is really bad
22:06:48*ng0 quit (Quit: Alexa, when is the end of world?)
22:09:06Araqthe last time it wasn't unrelated
22:09:20Araqyou merged a system.nim change without waiting for the tests
22:10:24*fjvallarino quit (Remote host closed the connection)
22:10:45dom96Yes, I did. Because I figured a deprecation pragma wouldn't cause a failure.
22:10:51dom96But that really isn't related to what I said
22:10:52*fjvallarino joined #nim
22:11:18dom96I've seen at least 3 merges by you with a "Test failures unrelated" comment
22:11:21*fjvallarino quit (Remote host closed the connection)
22:11:29*fjvallarino joined #nim
22:15:17Araqall related to this regression
22:15:57FromGitter<xDotDash> Are enums with parameterized types useful? I see it atleast doesn't throw any errors
22:16:41FromGitter<xDotDash> s/useful/usable
22:17:59CodeVanceQuelklef `newProc("procName".ident,procType = nnkLambda)`
22:18:00CodeVance@Quelklef
22:19:19*Vladar quit (Quit: Leaving)
22:19:40AraqxDotDash er ... what?
22:26:51FromGitter<xDotDash> Araq: this compiles `type Tester*[T] = enum first, second`without errors
22:26:58dom96Araq: Hrm? I thought this was fixed? The method failures?
22:28:36FromGitter<xDotDash> Though it looks like you can't reference the values then
22:28:56Araqdom96: they are fixed
22:29:05Araqbut not all PRs have been rebased
22:29:41dom96okay, makes sense
22:40:31stefanos82dom96, question: do we need -- for flags inside a .cfg file or not?
22:40:53stefanos82either single or double hyphens that is
22:41:08Araqdouble hyphen is optional
22:41:20stefanos82but single is mandatory?
22:42:58Araqprobably not
22:43:18stefanos82phew...for a moment I was worried
22:43:47stefanos82because all my Nim project contain a nim.cfg with o:"bin/my-executable-name"
22:51:02FromGitter<metasyn> @dom96 i figured out what i was doing wrong earlier btw, nothing wrong with nim, i just was missing a write to the external process so it didn't know to write yet, which is why it was hanging on trying to read (from nothing)
22:51:46*shashlick quit (Remote host closed the connection)
22:54:38*shashlick joined #nim
22:59:05*fjvallarino quit ()
23:03:18FromGitter<Quelklef> @CodeVance Ooh, thanks
23:28:21*find0x90 joined #nim
23:47:24*krux02 joined #nim