<< 11-08-2018 >>

00:00:24*ftsf joined #nim
00:01:21ftsfhmm can't use joinPath when targeting js as it's part of os
00:01:38ftsfshould os be available in js?
00:12:51*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:30:25*data-man quit (Ping timeout: 248 seconds)
00:38:19*zolk3ri joined #nim
01:10:15*CcxWrk quit (Quit: ZNC 1.7.1 - https://znc.in)
01:12:25FromGitter<Varriount> ftsf: Think on this: how would that work?
01:13:02*CcxWrk joined #nim
01:13:29*cncr04s17 joined #nim
01:13:35*cncr04s17 quit (Killed (Sigyn (Spam is off topic on freenode.)))
01:13:43FromGitter<Varriount> JavaScript run in a web browser doesn't know for sure what OS it's really running on.
01:14:40*Kilo`byte joined #nim
01:15:02*Kilo`byte quit (Remote host closed the connection)
01:18:24*endragor joined #nim
01:22:37*endragor quit (Ping timeout: 244 seconds)
01:24:03FromGitter<timotheecour> can we please merge https://github.com/nim-lang/Nim/pull/8584 ? all issues were resolved and approved by lemonboy and dom96; it’s blocking other PR's
01:35:53*vosper joined #nim
01:37:54*ekl- joined #nim
01:38:02*ekl- quit (Killed (Sigyn (Spam is off topic on freenode.)))
01:46:54*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:51:33*cspar quit (Ping timeout: 244 seconds)
01:54:23*cspar joined #nim
01:55:46*paperManu joined #nim
02:05:41*paperManu left #nim (#nim)
02:22:00*thk127 joined #nim
02:22:18*thk127 quit (Killed (Sigyn (Spam is off topic on freenode.)))
02:26:10ftsfthe web browser is an OS for its purpose I would say
02:31:08*abm quit (Quit: Leaving)
02:53:20FromGitter<Varriount> @timotheecour I'm going through PRs, I might be able to merge that one.
02:54:46FromGitter<Varriount> Ugh, why doesn't Github default sort PRs by date updated?
02:54:52*Grimnir2 joined #nim
02:54:59FromGitter<Varriount> It makes timely review that much harder.
02:55:04*Grimnir2 quit (Remote host closed the connection)
02:55:26zacharycarter[m]TheLemonMan: I have another one 😇
02:55:39zacharycarter[m]although I'm not sure it's related
02:55:45zacharycarter[m]but it def seems like a codegen issue
02:55:56zacharycarter[m]I'm having difficulty boiling the example down though
03:06:30*stefanos82 joined #nim
03:07:58zacharycarter[m]if anyone with osx wants to try to reproduce - https://github.com/zacharycarter/frag - or help me boil this down to a smaller reproducable example
03:11:17*zolk3ri quit (Quit: leaving)
03:13:18FromGitter<Varriount> zacharycarter: Guess who's up? :P
03:13:39zacharycarter[m]:D
03:13:42zacharycarter[m]Hi buddy!
03:13:46stefanos82zacharycarter[m]: have you tried it with GCC? if yes, what does GCC return as an error message?
03:14:09zacharycarter[m]stefanos82: I don't think it has anything to do with the C compiler - I think the C being produced is not valid
03:14:24zacharycarter[m]there's a forward declaration being created in frag.c without any implementation for the struct
03:14:32zacharycarter[m]not sure why 😕
03:14:40FromGitter<Varriount> zacharycarter: I get a bunch of C compiler errors, "subscript of pointer to incomplete type"
03:14:41stefanos82I didn't say anything about compiler specifically; I asked what GCC returns
03:14:56zacharycarter[m]Varriount: yup
03:14:58stefanos82I have tried a simple demo of mine with clang and gcc and had two completely different error messages
03:15:04zacharycarter[m]Okay - let me try with gcc
03:15:34zacharycarter[m]gotcha
03:18:00zacharycarter[m]It gave a different error, but the error is descriptive of the same symptom
03:18:20zacharycarter[m]https://gist.github.com/zacharycarter/dc6c74c9a766f6266d769dd62b2c45de
03:18:28zacharycarter[m]`tyTuple_Ynko5S7XwBkl4LMl36u3rg` is not being defined in frag.c
03:18:36FromGitter<timotheecour> @Varriount thanks! in github u can use sort:updated-desc ; eg: https://github.com/pulls?q=is%3Apr+author%3Atimotheecour+sort%3Aupdated-desc
03:19:17*vivus quit (Quit: Leaving)
03:20:02FromGitter<Varriount> @timotheecour Yeah, I know about that. I just wish it was the default.
03:20:41stefanos82zacharycarter[m]: I guess it's a bug(?)
03:20:59FromGitter<Varriount> zacharycarter: Any idea what causes it?
03:21:12FromGitter<Varriount> By the way, I'm aiming to resume work on nim-aws
03:21:35zacharycarter[m]Sweet! I started working on a kubernetes library for Nim on Friday
03:21:38FromGitter<timotheecour> @Varriount for #8564 do u want me to add a `IF ERRORLEVEL 1 (GOTO:END)` at end of each cmd ? or do u know another way
03:21:56zacharycarter[m]but I only have codegen from protobuf done atm
03:22:17FromGitter<Varriount> @timotheecour I'm actually curious as to why this is required - don't we already have a batch script to build Nim from source?
03:22:26FromGitter<timotheecour> where
03:22:37zacharycarter[m]Varriount: I think it has something to do with the template `localThreadQueue` and the data types involved
03:22:47FromGitter<Varriount> I know I've seen one somewhere - perhaps csources?
03:22:51FromGitter<timotheecour> there is one in csources, which i’m calling from that build_all.bat
03:23:15FromGitter<timotheecour> ya, i’m automating all the steps. it’s the windows analog of build_all.sh
03:23:22stefanos82zacharycarter[m]: I have just checked it on my system (debian testing 64-bit): it breaks here as well
03:23:39FromGitter<Varriount> @timotheecour Batch files are the ultimate example of an organically grown language (and not even one that Microsoft designed much of)
03:23:46zacharycarter[m]👍thanks stefanos82
03:24:54zacharycarter[m]kind of off topic but - https://github.com/niieani/bash-oo-framework - lol
03:25:21stefanos82I have read it and found it cool and unnecessary at the same time
03:25:39stefanos82zacharycarter[m]: I will investigate your situation and I think I have an idea where the error takes place
03:25:44zacharycarter[m]yeah - I dont know why you'd ever use it unless you only have bash
03:26:27zacharycarter[m]stefanos82: 🤗 thank you! I'm digging too but compiler debugging is very new to me.
03:26:49stefanos82I have no idea about compiler debugging, apart from the standard things lol
03:27:14stefanos82I'm following the old hacker way: reading the *actual code* line by line!
03:28:26*t0ne5 joined #nim
03:28:47*cottongin8 joined #nim
03:29:56*cottongin8 quit (Remote host closed the connection)
03:29:58*t0ne5 quit (Remote host closed the connection)
03:30:10zacharycarter[m]if you look at the definiton for the type SharedDeque in shareddeque.nim - `type SharedDeque*[Size:static[int], T] = tuple`
03:30:37zacharycarter[m]it's wrapped with RtArray in rtarray.nim - `type
03:30:38zacharycarter[m] DynArray* {.unchecked.}[T] = array[0..ArrayDummySize, T]
03:30:39zacharycarter[m] RtArray*[T] = ptr Dynarray[T]`
03:30:52zacharycarter[m]it looks like the compiler throws up there in generating that type fully in frag.nim
03:31:05zacharycarter[m]just not sure why
03:31:41zacharycarter[m]`workThreadQueues* : RtArray[SharedDeque[MaxJobCount,ptr Job]]` in scheduler.nim being the culprit
03:35:01stefanos82based on my short investigation, such cases with `invalid use of undefined type` have to do with bad inclusion
03:35:25stefanos82that is, you try to access data from one .c file to another without forward declaring it or have it under a header file
03:35:30stefanos82this must be the case
03:35:58zacharycarter[m]yeah
03:36:09zacharycarter[m]just where the compiler is screwing up is the question
03:36:25zacharycarter[m]https://github.com/jpbruyere/vkvg - need to create bindings to this btw
03:36:45zacharycarter[m]lots of dependencies though... ugh
03:39:01stefanos82I'm really confused right now by the generated code...
03:39:37zacharycarter[m]yeah - the compiler isnt doing something right
03:39:45stefanos82why does it re-implement tyTuple_Ynko5S7XwBkl4LMl36u3rg on three different occasions?
03:39:51zacharycarter[m]the implementation isn't getting to frag.c
03:39:59zacharycarter[m]that's what I meant by debugging the compiler
03:40:36stefanos82frag_frag.c line 217 shows extern, but the question is: which one does it use?!
03:40:40zacharycarter[m]because the compiler doesn't generate header files
03:40:54zacharycarter[m]extern just means it's exposing the symbol
03:41:16FromGitter<wsdjeg> Hello, man, I am Shidong Wang, the author of SpaceVim, some days ago, I saw the nim language, It is a greate project, and I want to add nim support in SpaceVim, so I for a old vim project, and make some change, ⏎ https://github.com/wsdjeg/vim-nim ⏎ and I also start to learn nim, SpaceVim's lang#nim layer is WIP now, https://github.com/SpaceVim/SpaceVim/pull/2018 ⏎ ⏎ If you use vim to develop nim, you can have
03:41:16FromGitter... a try with it. [https://gitter.im/nim-lang/Nim?at=5b6e5adc988005174ec22e5e]
03:41:25zacharycarter[m]it uses the tuple type defined in that source file, but there's no implementation for some reason
03:41:59zacharycarter[m]Hi man
03:42:39FromGitter<wsdjeg> I want to implement these features: ⏎ ⏎ 1) code completion ⏎ 2) REPL support ⏎ 3) ref/def list ... [https://gitter.im/nim-lang/Nim?at=5b6e5b2fa6af14730b1c877c]
03:43:19zacharycarter[m]1) look at nimsuggest 2) good luck 3) macro maybe? not sure
03:43:52stefanos82zacharycarter[m]: I use silver searcher and I have the following output: https://pasteboard.co/HyCuxcr.bmp
03:43:57FromGitter<wsdjeg> yeah, I use nimsuggest in the project
03:45:40zacharycarter[m]I'm saying that will help with code completion potentially
03:45:55zacharycarter[m]there's no answers to code completion / repl in Nim
03:46:16FromGitter<gogolxdong> good to know, if you are interested , vscode nim plugin needs improvement too.
03:46:19zacharycarter[m]atm anyway
03:46:46zacharycarter[m]yeah - VSCode is atm the most popular editor for nim, and with the most advanced set of tooling
03:47:46FromGitter<wsdjeg> thanks, I am very new to nim, before this feature is merged in to SpaceVim. I need to learn nim, the first tutor I should read is https://nim-lang.org/docs/tut1.html or https://narimiran.github.io/nim-basics/ ?
03:48:02zacharycarter[m]stefanos82: yeah - I just searched with VSCode and my output looked similar, and frag.c is where the implentation is missing
03:48:22stefanos82you mean frag_frag.c
03:48:26zacharycarter[m]in every other .c file there is a struct declaration
03:48:26FromGitter<wsdjeg> sorry, I do not use vscode, vim is my favorite text editor
03:48:38zacharycarter[m]well yeah - whatever
03:49:13zacharycarter[m]wsdjeg: maybe checkout https://github.com/zah/nim.vim
03:49:33FromGitter<wsdjeg> thanks
03:50:17zacharycarter[m]sure
03:51:05FromGitter<gogolxdong> vim is my favourite too, we use vscode on windows
03:51:18stefanos82zacharycarter[m]: it would make much more sense to have a frag_common_parts.c generated file that includes common parts of the generated code
03:51:29FromGitter<wsdjeg> do you know SpaceVim?
03:51:53zacharycarter[m]no - I know spacemacs but not spacevim - I was just reading your website
03:51:59zacharycarter[m]know of(
03:52:26zacharycarter[m]stefanos82: that'd be something to bring up with Araq
03:52:37FromGitter<wsdjeg> thanks, spacemacs is a awesome project, but I do not use emcas
03:52:44zacharycarter[m]I'm sure there's a method to his madness
03:53:01zacharycarter[m]emacs isn't a game, it's life\
03:53:05zacharycarter[m]as krux02
03:53:06zacharycarter[m]ask*
03:53:11zacharycarter[m]I CANNOT type tonight
03:53:26stefanos82zacharycarter[m]: can you open a ticket so I can present my hypothesis?
03:53:51zacharycarter[m]stefanos82: I'd like to get this example to be smaller in size - it's very large atm
03:54:14stefanos82OK
03:54:16FromGitter<wsdjeg> thanks for all of you, now I am going to learn nim.
03:54:19zacharycarter[m]my attempts thus far though have failed 😠
03:54:40zacharycarter[m]😃 it's a great language!
03:55:04zacharycarter[m]thanks for letting us know about spacevim! I'm sure there will be some vim users in here that will be excited to hear about it
03:55:21zacharycarter[m]if they haven't already
03:55:33stefanos82unfortunately for me, I don't use it almost at all as I am spending my entire time mastering modern C++ so I can find a job. I have been unemployed for 3 years now and I'm going bananas!
03:55:44*rockcavera joined #nim
03:55:49zacharycarter[m]ugh
03:55:54zacharycarter[m]modern C++?
03:55:59zacharycarter[m]why?
03:56:52zacharycarter[m]If you really want to get a job - learn JS and react or angular or something
03:56:57zacharycarter[m]that's the quickest path IMO
03:57:08stefanos82I know, but web development stresses me out
03:57:13stefanos82I already know C++
03:57:21zacharycarter[m]but if I was going to get into C/C++ programming - I definitely wouldn't learn modern C++
03:57:21stefanos82I'm just updating myself with the latest standards
03:57:29zacharycarter[m]because I don't think it's used that often
03:57:35stefanos82modern C++ is way better than C++98
03:57:46stefanos82I guess you are not following job ads lol
03:57:48zacharycarter[m]well I'm not saying it's not more feature rich
03:58:06zacharycarter[m]well not for C++11+ jobs no
03:58:18*kaushalmodi_ joined #nim
03:58:37stefanos82there is a high demand for modern C++, at least in Europe
03:59:15zacharycarter[m]well - I am definitely not following job adverts for those jobs haha
03:59:19FromGitter<wsdjeg> I just read the tutor, `nim compile --run greetings.nim` is a command for compiling and running a nim file, so is there a way hide de output of compile process? what I need is just the stdout of compiled project.
03:59:56zacharycarter[m]https://nim-lang.org/docs/nimc.html
04:00:28stefanos82@wsdjeg: yes, you have a couple of options
04:00:41*GrapeNinja joined #nim
04:00:42stefanos82nim c -r --hints:off --verbosity:0
04:00:59*GrapeNinja is now known as Guest95446
04:01:06*Guest95446 quit (Killed (Unit193 (Spam is not permitted on freenode.)))
04:01:52FromGitter<wsdjeg> good to know, thanks.
04:03:43stefanos82@wsgjeg: feel free to create a .cfg file and place those flags in there for simplicity with your running command
04:09:39FromGitter<wsdjeg> ((https://user-images.githubusercontent.com/13142418/43988039-34124c9a-9d5f-11e8-97e6-dcd6a2658ea4.gif))
04:10:30FromGitter<wsdjeg> this is a gif for compile and run nim code in SpaceVim, I just use the command you show me. but I think nim project should have a config file to set the running command, I will check it.
04:11:20FromGitter<wsdjeg> stefanos82: thank you
04:11:38stefanos82well, you can do so
04:11:44stefanos82but Araq told me to avoid it
04:12:01stefanos82try adding those inside your local nim.cfg
04:12:13zacharycarter[m]yeah - the local project cfg exists for a reason
04:12:48stefanos82zacharycarter[m]: if I'm not mistaken, Araq told me to avoid using .cfg all together but I don't remember the exact dialog
04:13:01stefanos82maybe it's something he plans to fix with future Nim releases
04:17:01FromGitter<wsdjeg> does `nim compile` support option like gcc's `-o` option, I do not generate bin file in current path.
04:18:34stefanos82you can change that
04:19:32stefanos82for instance, if your file is foo.nim, just create a foo.nims with switch("out", "bin/foo") in it so it can generate a binary file inside bin directory, assuming you have created it already
04:20:23FromGitter<wsdjeg> got it, thanks.
04:20:32stefanos82no worries
04:25:28FromGitter<wsdjeg> I just check a list of project in `https://github.com/trending/nim`, and I want to know the project file tree for a nim project, It seems that
04:28:56stefanos82@wsdjeg: personally I use: project/{bin, src, tests, misc}
04:29:32stefanos82inside src, I have nim.cfg with --verbosity:0, --hints:off, --nimcache:nimcache
04:30:26stefanos82and for every .nim file that I need to produce different binary file, I do so as I have mentioned before with .nims file(s)
04:36:25FromGitter<wsdjeg> ```code paste, see link``` ⏎ ⏎ here is my file project, it seems that, nim will compile nim file to c file? if it is a git porject, nimcache should be ignroed? [https://gitter.im/nim-lang/Nim?at=5b6e67c9196bc60b6bb2ec34]
04:36:48*d10n0 joined #nim
04:37:06*d10n0 quit (Killed (Sigyn (Spam is off topic on freenode.)))
04:37:23stefanos82yes, nim converts your code to c and compiles it to machine code
04:37:42stefanos82what do you mean with git project?
04:38:15stefanos82nimcache is your directory where nim generates c files and uses it as its caching mechanism
04:38:46stefanos82zacharycarter[m]: you went for sleep?
04:40:57zacharycarter[m]I'm watching a movie
04:41:07zacharycarter[m]but yeah - probably sleep shortly
04:41:12stefanos82cool
04:41:43stefanos82will you remove the project from your repository or should I open a ticket as a question so we can include Araq as well so he can see it?
04:41:44FromGitter<wsdjeg> :) we are in different time zone
04:41:54stefanos82here's it's morning
04:42:50zacharycarter[m]You can open an issue with it if you'd like - and we can try to trim it down
04:42:59zacharycarter[m]I won't remove it
04:43:08FromGitter<wsdjeg> https://github.com/wsdjeg/nim-example, this is my first nim code, I start to learn nim, and try to use nim with SpaceVim.
04:46:13stefanos82zacharycarter[m]: excellent!
04:47:03stefanos82that's the spirit @wsdjeg, keep it up!
04:50:45FromGitter<wsdjeg> yeah, of cause.
05:08:17*vosper joined #nim
05:12:22*wildlander quit (Quit: Konversation terminated!)
05:14:28FromGitter<Varriount> @timotheecour https://gist.github.com/Varriount/8f8c0d5e5224458cbf1dcf1a8916473e
05:16:30FromGitter<Varriount> Note, that's an untested prototype.
05:25:50stefanos82zacharycarter[m]: frag_scheduler.c has 2 pthread.h which means somewhere inside the generated .c files indeed there's something broken
05:26:25*miran joined #nim
05:41:55*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:42:29*vosper joined #nim
05:44:35*stefanos82 quit (Quit: Quitting for now...)
05:47:51*nsf joined #nim
05:52:17*ftsf quit (Remote host closed the connection)
05:52:39*ftsf joined #nim
06:16:49*kaushalmodi_ quit (Quit: Connection closed for inactivity)
06:31:04*miran quit (Ping timeout: 244 seconds)
06:31:05*cspar quit (Ping timeout: 240 seconds)
06:34:44*cspar joined #nim
06:35:12copygirlI get error `redefinition of 'mousePosition'` when using case inside a type where two branches both use the same field.
06:36:19copygirl(evMouseMove has position and motion, and down/up has position)
06:37:50copygirlI suppose I could get rid of psition completely and have you call getMousePosition() though.
06:49:51FromGitter<timotheecour> @Varriount thanks for working on improving this PR! some comments: there’s a bug in your code, you skipped `cd csources` so it pulls from nim, not csources
06:54:30FromGitter<Varriount> Meh, I boot my compiler with those flags, so that's what I put. I forgot about the temp command
06:58:19FromGitter<timotheecour> btw, the path issue is still annoying for me; I have to resort to a kludge like: ⏎ `setx path "C:\Program Files (x86)\Parallels\Parallels Tools\Applications;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Docker;C:\Program Files\Docker;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL
06:58:19FromGitter... Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Users\User\timw\nim-0.18.0_x64\nim-0.18.0\dist\mingw64\bin\”` which is ugly, because finish.exe didn’t work for me (to get gcc in path); any idea?
07:01:00leorizetimotheecour, please care for us IRC users and paste your stuff elsewhere
07:01:34FromGitter<timotheecour> your trick of using gcc is not standard for detection of windows 64 vs 32 but kind of neat; makes me think of following idea: how about making that script instead compile and run a C++ file and move all logic there? I hate windows batch and it’d be cleaner / safer in C++
07:04:26*zama quit (Remote host closed the connection)
07:09:04*cspar quit (Ping timeout: 272 seconds)
07:10:06*zama joined #nim
07:15:08*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:21:08*dddddd quit (Remote host closed the connection)
07:21:44*NimBot joined #nim
07:23:42*yglukhov[i] joined #nim
07:28:50*data-man joined #nim
07:32:00*AlexZ15 joined #nim
07:33:29*AlexZ15 quit (Remote host closed the connection)
07:40:04*cspar joined #nim
07:43:16*data-man quit (Ping timeout: 272 seconds)
07:45:22*yglukhov[i] quit (Remote host closed the connection)
07:45:54*yglukhov[i] joined #nim
07:48:44*yglukhov[i] quit (Remote host closed the connection)
07:49:07*yglukhov[i] joined #nim
08:02:49FromGitter<alehander42> is the "module names unique per Nimble package" because of nimcache clashes ?
08:03:28*gmpreussner_ joined #nim
08:04:33*gmpreussner quit (Ping timeout: 268 seconds)
08:05:09FromGitter<alehander42> ah https://forum.nim-lang.org/t/2937
08:05:53FromGitter<alehander42> I don't agree with the style point, now you end up faking a path in the module name, e.g. `ui_value`
08:06:04FromGitter<alehander42> which is just a huge hack
08:06:26*TheLemonMan joined #nim
08:06:44FromGitter<alehander42> but it seems this is an old feature, so it wouldn't change
08:07:28TheLemonManthe double <pthread.h> inclusion is due to stuff like SysLockObj that injects more than one include a time
08:07:54*cspar quit (Ping timeout: 256 seconds)
08:10:32FromGitter<timotheecour> @alehander42 I agree, I really dislike this limitation, forcing ppl to use `foo/foo_bar.nim` to avoid name clashes. This is not DRY and should be fixed.
08:11:37FromGitter<timotheecour> this is reminiscent of the old way of naming symbols, prefixed with a letter indicating whether it was a type, const or var. So there’s hope we can fix this too (probably easier to fix!)
08:14:11FromGitter<alehander42> @wsdjeg spacevim looks cool! if i try vim again one day, i'll try to use it, about a repl, do you mean you want to expose nim to a vim plugin for interacting with repl-s, or you just wonder if nim has an existing repl?
08:14:32FromGitter<alehander42> @timotheecour yeah, it would be cool to fix it, but I am not sure how much internal assumptions depend on it
08:14:47*yglukhov[i] quit (Remote host closed the connection)
08:15:35*yglukhov[i] joined #nim
08:16:58*Vladar joined #nim
08:17:51FromGitter<timotheecour> @alehander42 @wsdjeg I’m also curious about existence of a repl. inim is not a real real as the whole code is re-executed each time you add a line (behind the hood)
08:27:50*zama quit (Ping timeout: 244 seconds)
08:29:05*zama joined #nim
08:34:09*zama quit (Ping timeout: 268 seconds)
08:35:17*stefanos82 joined #nim
08:35:28TheLemonManzacharycarter[m], all yer codegen errors are somehow related to the usage of RtArray, using a seq works just fine™
08:35:42stefanos82zacharycarter[m]: still up?
08:37:50stefanos82Araq: so now $HOME/.cache is used as our default caching directory?
08:40:37*zama joined #nim
08:43:10stefanos82Araq: is there a way why we haven't added nim as part of the new directory? It would keep various cached projects rather organized in one place than scattered all over $HOME/.cache directory
08:43:23stefanos82*is there a result
08:43:54stefanos82something like $HOME/.cache/nim/ would look much more organized IMHO
08:49:45*alienated joined #nim
08:50:42*alienated quit (Remote host closed the connection)
09:00:47FromGitter<alehander42> you can always add `--nimcache:nimcache` to a project's nim config
09:01:11FromGitter<alehander42> ah yeah they had an issue about that
09:01:26FromGitter<alehander42> https://github.com/nim-lang/Nim/issues/8599
09:01:47TheLemonManzacharycarter[m], bingo, the `mitems` iterator returning a `var T` is what kills the codegen
09:04:13stefanos82TheLemonMan: that's why zacharycarter[m]'s code was partially generated for frag_frag.c and frag_scheduler.c?
09:04:43TheLemonManstefanos82, yep, the double <pthread.h> is a non-issue
09:05:11TheLemonManthat happens because some types abuse the `header` pragma to inject more than a single include
09:05:35TheLemonManI think we should extend it to allow an array of strings
09:05:41stefanos82I know it's not an issue, but what I have said to zacharycarter[m] is that since we got this duplicated header insertion, it means that something is either corrupted or partially generated
09:11:03copygirlAm I misunderstanding something, or why is `or` not implemented for unsigned integers?
09:12:39TheLemonMancopygirl, it is, check system.nim:1106
09:14:39*ng0 joined #nim
09:20:06copygirlAh I guess the types were mismatching.
09:20:09copygirlThank you!
09:24:33*yglukhov[i] quit (Remote host closed the connection)
09:31:01Araqstefanos82: I fixed that in my branch
09:32:21TheLemonManyou stole the fun :(
09:34:29TheLemonManthe problem was that both the references to `T` were via `var` and the codegen was too optimistic about this and produced forward declarations only
09:35:06Araqno, I fixed that .cache/nim/ thing
09:36:09Araqlesson learned, there are no filepatterns in Unix so you can't do 'rm -rf .cache/*.(_r|_d)'
09:37:18TheLemonManthe compiler is telling me to visit https://nim-lang.org/docs/manual/var_t_return.html but that 404s
09:37:48Araqthat will exist when we finally release 0.19
09:39:21Araqin the meantime, read this: https://raw.githubusercontent.com/nim-lang/Nim/devel/doc/manual/var_t_return.rst
09:40:50Araqand that should be 'derive' not 'deviate' ...
09:51:12*zama quit (Ping timeout: 272 seconds)
09:53:03*yglukhov[i] joined #nim
09:55:34*ng0 quit (Quit: Alexa, when is the end of world?)
09:56:14TheLemonManAraq, I have another nasty codegen issue (and a fix ofc), but don't know what the real problem is (a pass in trasf that's unsound or some deeper problem down in the generated AST)... Wanna have a look?
10:13:30FromGitter<timotheecour> @alehander42 ⏎ ⏎ > yeah, it would be cool to fix it, but I am not sure how much internal assumptions depend on it ⏎ just sent out a PR to fix exactly that: ⏎ https://github.com/nim-lang/Nim/pull/8614 => it allows modules with same name in a package! [https://gitter.im/nim-lang/Nim?at=5b6eb6ca196bc60b6bb46623]
10:16:52stefanos82Araq: are you sure about the file patterns?
10:17:03FromGitter<alehander42> nice, but I don't know if some tools etc dont depend on the existing uniqueness
10:18:10stefanos82Araq: because I have tried an easy command and works as expected
10:19:04*dddddd joined #nim
10:19:12FromGitter<timotheecour> @alehander42 well, we’ll just have to see!
10:20:17FromGitter<alehander42> :D yeah!
10:20:26stefanos82Araq: instead of 'rm -rf .cache/*.(_r|_d)', try 'rm -rf .cache/*_{d,r}' instead
10:20:56*TroniQ89 joined #nim
10:21:03*TroniQ89 quit (Remote host closed the connection)
10:21:12FromGitter<Bennyelg> Question: When dividing data sets into pages on html, you must based on the count(*) or you just offseting until you have 0 rows?
10:28:08stefanos82personally, when I'm dealing with such thing and I need all of my table contents, I go with "select * from foo-table limit <my-limit-size-here>"
10:29:28FromGitter<Bennyelg> yea but how you know when to stop rendering javascript pagination ? ⏎ ex ⏎ <<[1][2][3]>> you need to divide your results into pages. a stop condition is required based on the result set you have
10:31:13*yglukhov[i] quit (Remote host closed the connection)
10:32:06*EXCEPTS joined #nim
10:38:02*EXCEPTS quit (Ping timeout: 244 seconds)
10:46:55stefanos82@Bennyelg: have you tried something like this? http://pagination.js.org/
10:58:56*data-man joined #nim
10:59:50*zama joined #nim
11:01:06*kobi7 joined #nim
11:04:26zacharycarter[m]so much talk about the codegen errors while I was asleep 😀
11:05:35stefanos82I investigated your situation and was a partial generation I think, I'm not 100% sure though
11:05:56stefanos82I have compiled C files manually and found frag_frag.c and frag_scheduler.c to be incomplete
11:06:30zacharycarter[m]yeah - I think TheLemonMan explained why it's happening above
11:06:52zacharycarter[m]> zacharycarter[m], bingo, the `mitems` iterator returning a `var T` is what kills the codegen
11:09:14stefanos82yeah, I know
11:09:20stefanos82I read his comment(s)
11:10:54TheLemonManzacharycarter[m], I have a fix ready, I just have to write a test case and push it
11:11:37zacharycarter[m]Need to put a giant N on your chest 😀
11:11:56zacharycarter[m]super nim dev over here :P
11:12:05FromGitter<wsdjeg> hello, man, why I can not sign up nim forum accout? I just merged the `lang#nim` layer in SpaceVim, and I want to create a post about it for some feedbacks. but I failed to create a new forum account.
11:12:16zacharycarter[m]I will keep trying to find these codegen errors
11:12:29zacharycarter[m]wsdjeg: are you encountering an error?
11:12:55FromGitter<wsdjeg> it is saied `Unknown error occurred.`
11:13:17FromGitter<wsdjeg> when I press create account
11:13:56FromGitter<wsdjeg> The forum should be able login via github accout, :)
11:13:59zacharycarter[m]can you check the developer tools?
11:14:00zacharycarter[m]like debug console / network tab? see if any errors are being thrown / requests are failing
11:14:01zacharycarter[m]?
11:14:02zacharycarter[m]I'll try to create an account
11:14:26zacharycarter[m]you can suggest that once we get you a forum account :)
11:14:39FromGitter<wsdjeg> sorry, I can not, I do not use normal browser, I am uing qutebrowser, It does not support console.
11:14:50zacharycarter[m]okay sec
11:16:38zacharycarter[m]worked fine for me wsdjeg
11:16:45zacharycarter[m]did you do the recaptcha challenge?
11:16:49zacharycarter[m]maybe try again?
11:16:51*christophegx joined #nim
11:17:10TheLemonManzacharycarter[m], can you open a ticket to have a # to refer to?
11:17:14FromGitter<wsdjeg> I have pressed `create account` many times
11:17:23zacharycarter[m]TheLemonMan: on it
11:17:52FromGitter<wsdjeg> How can I debug it? in firefox, I will install it.
11:17:52zacharycarter[m]wsdjeg: well it works for me - going to be hard to debug with no way of debugging :P
11:18:19zacharycarter[m]yeah - firefox has a dev console, or chrome
11:18:39*christophegx quit (Remote host closed the connection)
11:22:25zacharycarter[m]TheLemonMan: https://github.com/nim-lang/Nim/issues/8616
11:22:40FromGitter<wsdjeg> oh, got it, in qutebrowser, the checkbox can not be show, it prevent bot.
11:22:59zacharycarter[m]ah
11:23:29FromGitter<wsdjeg> I just create a new account in firefox, :)
11:23:35zacharycarter[m]cool!
11:31:47FromGitter<wsdjeg> I have create a post, and any feedback is welcome.
11:32:02FromGitter<Varriount> @timotheecour The thing is, the user may have a 32-bit compiler installed on a 64-bit operating system.
11:33:08*Vladar quit (Remote host closed the connection)
11:37:56TheLemonManzacharycarter[m], done, let's see what the CI has to say about that
11:39:20*NvpkD1y7Ez joined #nim
11:39:21*NvpkD1y7Ez quit (Remote host closed the connection)
11:42:31zacharycarter[m]:)
11:42:35zacharycarter[m]I will give it a go too
11:47:05zacharycarter[m]working for me TheLemonMan 😃
11:49:57FromGitter<wsdjeg> I just create a thread in the forum, but it is Moderated now.
11:50:49zacharycarter[m]did you confirm your e-mail address?
11:51:44FromGitter<wsdjeg> I have confirmed, but I see this in my profile, Your account is under moderation. This is a spam prevention measure. You can write posts but only moderators and admins will see them until your account is verified by them.
11:52:15zacharycarter[m]ah - I guess that's a thing now - you'll need to wait for a mod I guess - not sure what group that consists of besides dom
11:52:21FromGitter<wsdjeg> I think the only thing I can do is just wait for verified by admin.
11:53:37zacharycarter[m]I agree
11:54:34*Vladar joined #nim
12:07:54*data-man quit (Quit: Konversation terminated!)
12:18:32zacharycarter[m]Since the nimcache change - some things I was doing previously are no longer working - like importing modules in a relative directory at compile time
12:18:55zacharycarter[m]now I can only import them if I specify an absolute path to the directory
12:20:51zacharycarter[m]does that make any sense?
12:26:14*kobi7 quit (Quit: Leaving)
12:29:11Yardanicozacharycarter[m], this moderation thing was around for a long time
12:29:24Yardanicoeven before new forum came out
12:35:44Araqzacharycarter[m]: no.
12:37:40*ng0 joined #nim
12:39:56*data-man joined #nim
12:44:25zacharycarter[m]hrm
12:57:54*wildlander joined #nim
13:00:34*zama quit (Ping timeout: 272 seconds)
13:00:47federico3huh? is bin/nim cc -r tools/nimweb.nim building the old website?
13:01:02dom96yes, we need to gut that
13:03:36federico3dom96: both ./koch web/website will disappear?
13:04:09federico3if so, what parses the contents of doc/ e.g. doc/tut1.rst ?
13:04:21dom96./koch docs will remain
13:04:32dom96Not 100% sure though
13:04:39dom96I can't remember exactly what nimweb does
13:06:00stefanos82dom96: inside changelog.md we have the following link https://nim-lang.org/docs/nimc.html#generated-c-code-directory, but going there does nothing. Can we re-build the docs?
13:06:06*PrimHelios joined #nim
13:06:31dom96docs are rebuilt every release
13:06:41stefanos82I'm talking about the live docs
13:07:21*zama joined #nim
13:17:40*rockcavera quit (Ping timeout: 272 seconds)
13:18:42TheLemonManzacharycarter[m], I've uploaded another version of the patch that plays better with an optimization done by cooldome
13:19:34dom96stefanos82: the live docs?
13:23:43zacharycarter[m]TheLemonMan: sweet! thank you for the heads up!
13:27:23federico3koch docs fails with "manual_snippet_116.nim(2, 38) Error: type expected"
13:28:37federico3aha, it's looking for the nim binary in the wrong place
13:43:31*TheLemonMan quit (Ping timeout: 244 seconds)
13:57:22*miran joined #nim
14:11:06stefanos82dom96: yeah the docs that are here https://nim-lang.org/docs/
14:11:20stefanos82I have tried to view this https://nim-lang.org/docs/nimc.html#generated-c-code-directory and cannot find it anywhere
14:11:23dom96yes, those docs are rebuilt every release
14:16:57stefanos82so why can't we see the aforementioned link?
14:20:32federico3it would be nicer to have nested commands / options in nim. Right now nim doc2 --noMain koch.nim is treated as valid
14:29:57*miran_ joined #nim
14:30:30*miran quit (Ping timeout: 272 seconds)
14:32:37Araqsince you can test for --noMain (ok, maybe not for that one) with 'when' it influences 'doc2' and needs to remain valid
14:40:23*Sembei joined #nim
14:41:16*Pisuke quit (Ping timeout: 272 seconds)
14:48:11*nsf quit (Quit: WeeChat 2.2)
14:55:16FromGitter<dom96> stefanos82: I dunno. The anchor is wrong?
14:55:20FromGitter<dom96> https://nim-lang.org/docs/nimc.html#compiler-usage-generated-c-code-directory
14:55:35FromGitter<dom96> FOSDEM 2019 – Call for participation https://fosdem.org/2019/news/2018-08-10-call-for-participation/
14:56:57*AlwaysHigh12 joined #nim
14:57:27*AlwaysHigh12 quit (Remote host closed the connection)
15:37:15*bitstoppa[m] joined #nim
15:41:12*natrys joined #nim
15:53:07*fsamareanu21 joined #nim
15:54:49*fsamareanu21 quit (Remote host closed the connection)
16:09:41FromGitter<Quelklef> Any guidelines on when to use `using`? I can never tell if I'm using it too much
16:13:26FromGitter<Clyybber> I dont think there are any guidelines for that, just use it when it makes the code more understandable/cleaner i would say
16:13:44FromGitter<Quelklef> hmmmm
16:13:53FromGitter<Quelklef> Darn, now I have to use my brain
16:18:29stefanos82dom96: well, the anchor takes you nowhere :/
16:21:19FromDiscord_<treeform> https://github.com/treeform/typography
16:21:37FromDiscord_<treeform> Thoughts? Feed back? 100% Pure nim font library thingy
16:24:36stefanos82this is amazing
16:24:44stefanos82well done @treeform!
16:25:03FromDiscord_<treeform> thank you
16:31:16stefanos82@dom96: the link you provided works as expected. the original link I shared had #generated-c-code-directory for anchor whereas yours has #compiler-usage-generated-c-code-directory
16:41:04FromGitter<Clyybber> Why does alloc(size) always allocate 96 bits except when you put in a size argument higher than 9 it only allocates 104 bits?
16:42:29Araqalignment requirements plus the allocator needs to store its book-keeping somewhere
16:42:41Araqthat said, I don't know where you get these numbers from
16:43:19Araqok, here is a problem
16:43:24FromGitter<Clyybber> I use getOccupiedMem()
16:43:33Araq'nil' for strings is gone
16:43:53Araqdoes that mean 's == nil' stops compiling? unfortunately not
16:44:15Araqs is converted to 'cstring' and 'nil' for cstring still exists...
16:44:32Araqthat's pretty bad, any solutions?
16:45:16FromGitter<Clyybber> Make the conversion from cstring to string explicit
16:45:20FromGitter<Clyybber> Nvrmind
16:45:26FromGitter<Clyybber> that would break alot of stuff
16:47:30FromGitter<Clyybber> Araq Does getOccupiedMem() include memory blocks allocated using alloc(size)
16:47:31FromGitter<Clyybber> >
16:47:33FromGitter<Clyybber> ?
16:47:46stefanos82Araq: what should we expect from a null cstring?
16:48:01Araqthat it's C's NULL
16:48:22AraqClybber: yes
16:49:12stefanos82Araq: in other words, when we convert a Nim string to cstring, should we automatically be allowed to validate it with NULL?
16:49:57Araqconversion from cstring to string is unsafe though. maybe it's time to make it explicit.
16:50:07Araqer, I mean from string to cstring
16:50:30stefanos82yeah, actually that would become quite handy to be honest with you
16:50:41FromGitter<Clyybber> I think so too
16:51:13federico3koch boot is using only one core
16:53:35*miran_ quit (Quit: Konversation terminated!)
16:54:18zacharycarter[m]does anyone know genotrance's name in here? I can never remember it...
16:56:23zacharycarter[m]I need help with nimgen
16:57:39FromGitter<Varriount> I've used Nimgen a little
16:57:52zacharycarter[m]I'm trying to create updated bindings to allegro5
16:58:06FromGitter<Clyybber> Oh nice
16:58:13zacharycarter[m]but it seems to be including some header files even though I've explicitly placed them under an `[exclude]` block
16:58:14stefanos82zacharycarter[m]: Ganesh Viswanathan
16:58:23stefanos82that's his full name based on his twitter
16:58:44zacharycarter[m]stefanos82: thanks - just need to remember his irc handle
16:58:59FromGitter<Clyybber> Have you tried basing your work on this one: https://github.com/fowlmouth/allegro5
16:59:02FromGitter<Clyybber> ?
16:59:12zacharycarter[m]I can't take all the macros
16:59:43zacharycarter[m]like fowl's bindings are great - but I
17:00:04FromGitter<Clyybber> They dont wokr since 0.17.2
17:00:07zacharycarter[m]I'm going to have to spend time fixing the broken code - he has some really old stuff in some predating varargs
17:00:16Araqzacharycarter[m]: it's shashlick
17:00:24FromGitter<Clyybber> I made a pull request to update it to 0.17.2 but i couldn't fix all the issues
17:00:24zacharycarter[m]thank you
17:00:54zacharycarter[m]I'll see if I can make new ones that work - then if desired, they can be made to be more idiomatic
17:01:14AraqI can help you in fixing fowl's stuff, I think
17:01:36zacharycarter[m]Alright - I'll post the section of the code I'm having issues with then
17:02:42dom96stefanos82: Yes, I know. The link you got was wrong, I don't know where you got it from so I can't fix it
17:02:59dom96All that needs to be fixed is the link though
17:03:13stefanos82from changelog.md
17:03:15*xet7 joined #nim
17:03:26Araqdom96: any opinion on string->cstring conversions?
17:04:04dom96stefanos82: It's possible that the link is correct for 0.19.0 docs
17:04:20stefanos82ah OK
17:04:56FromGitter<Varriount> Araq: I think they are useful.
17:05:23Araqsure they are useful but they bite the new no-nil strings
17:05:34Araqand are strictly speaking unsafe
17:06:04dom96huh?
17:06:06dom96What's bad here?
17:06:17dom96that `var s: string; s == nil` compiles?
17:06:22Araqyup
17:06:48Araqand it changed semantics.
17:06:51dom96So you'd rather break code?
17:06:57Araqpreviously it was a string comparison
17:07:05Araqnow it's a cstring comparison
17:07:39FromGitter<Clyybber> I think we should deprecate the implicit conversion
17:07:50FromGitter<Clyybber> so we dont break code immediately
17:08:13FromGitter<Clyybber> But it makes interfacing with cdeclared procs more cumbersome
17:08:17AraqI want to break it hard and fast, this doesn't work well with a deprecation period
17:08:39dom96Why do you want to do that?
17:08:53stefanos82where is the magic String implemented?
17:09:10Araqbecause I want to break the code at compile-time
17:09:21Araqand not hunt down subtle runtime issues
17:09:31Araqs/issues/changes
17:09:42dom96treeform: Super nice job! Love the comparison between different renderers, wtf is ClearType doing?
17:10:15Araqtreeform: this comes super handy for my secret project...
17:10:38dom96oh, the next section explains it. Awesome
17:10:42FromGitter<Clyybber> dom96 Cleartype does subpixel rendering
17:10:51dom96You should submit this as a Show HN to HN :)
17:11:01FromGitter<Clyybber> I agree
17:13:45dom96treeform: Huh, any reason you haven't used git from the beginning while developing this library? Not doing that makes me feel uneasy
17:14:33FromGitter<Clyybber> Does someone have an idea why this doesn't work: https://github.com/nimious/vulkan/issues/5 ?
17:17:14zacharycarter[m]Araq: here is the repo I'm working on - https://github.com/zacharycarter/allegro5
17:17:31zacharycarter[m]I'm running `nimble install -y` and then running `nim c -r examples/skel.nim`
17:17:39zacharycarter[m]an example of the output is in the README
17:17:43zacharycarter[m]thanks for offering a hand
17:19:54FromGitter<Clyybber> zacharycarter Is fragworks dead?
17:21:01zacharycarter[m]I'm working on a new version of frag right now
17:21:30zacharycarter[m]I plan on featuring an editor as well as a full 3d rendering engine
17:21:30FromGitter<Clyybber> Using allegro?
17:21:37zacharycarter[m]yes
17:21:37FromGitter<Clyybber> Or bgfx?
17:21:42zacharycarter[m]both
17:21:44zacharycarter[m]bgfx + allegro
17:21:48FromGitter<Clyybber> Thats cool
17:21:59zacharycarter[m]allegro will only really be used for window management
17:22:18FromGitter<Clyybber> Why not glfw?
17:22:25zacharycarter[m]no mobile support
17:22:54zacharycarter[m]I could use glfw3 on desktop and allegro on mobile I suppose
17:23:24zacharycarter[m]but I'm not sure glfw3 - besides having a different API - would really benefit much - do you?
17:23:49zacharycarter[m]allegro5 seems pretty capable
17:23:51FromGitter<Clyybber> I dont think so. I would go all allegro if I were to develop for mobile
17:24:10FromGitter<Clyybber> Yeah, you could even ditch bgfx and use allegro only.
17:24:15FromGitter<Clyybber> Though that is a bit radical
17:24:20zacharycarter[m]nah - I want to use BGFX
17:24:26zacharycarter[m]allegro is purely for windowing
17:24:37FromGitter<Clyybber> Any reason for that?
17:24:45FromGitter<Clyybber> Performance?
17:25:06zacharycarter[m]well bgfx just needs a handle to the native window object
17:25:48zacharycarter[m]then it takes over as the drawing API
17:26:17zacharycarter[m]or did you mean - why I want to use bgfx?
17:27:11FromGitter<zetashift> why not sdl for windowing?
17:27:53zacharycarter[m]because allegro is simple enough
17:28:11FromGitter<ozturkberkay> Hello. is it possible to make full web application with nim and h2o?
17:28:23zacharycarter[m]what is h2o?
17:28:43zacharycarter[m]zetashift: Also - I'm doing a lot of multi-threading with lock-free work stealing job queues
17:28:52FromGitter<ozturkberkay> https://h2o.examp1e.net/
17:29:02FromGitter<ozturkberkay> http server
17:29:02zacharycarter[m]so I'm not sure how nice sdl2's threading will play with that
17:29:35zacharycarter[m]ozturkberkay: if you wrote bindings to it - sure
17:29:53zacharycarter[m]if they don't already exist
17:30:18zacharycarter[m]although you don't need to really "write" bindings with Nim - you can generate them for the most part
17:30:53FromGitter<ozturkberkay> I started web programming few weeks ago, so I'm not really sure how to write bindings.
17:31:13zacharycarter[m]might want to start with jester then
17:31:34zacharycarter[m]https://github.com/dom96/jester
17:31:39zacharycarter[m]do you have a requirement to use h2o?
17:31:59FromGitter<ozturkberkay> No. It's just my obsession with speed
17:32:09FromGitter<ozturkberkay> you can check the benchmarks: https://www.techempower.com/benchmarks/
17:32:18zacharycarter[m]http2 isn't necessarily faster
17:32:40zacharycarter[m]well that's just for fortunes
17:32:44FromGitter<zetashift> those benchmarks also don't include the ease-of-use parameters
17:33:08zacharycarter[m]and I don't think they include the most up to date jester benchmarks either
17:33:11zacharycarter[m]I could be wrong though
17:33:32zacharycarter[m]jester recieved it's improvements way after 2018-06-06 right?
17:34:09zacharycarter[m]ozturkberkay - if you just are learning web programming, you're not going to be breaking or redefining any speed records anyway
17:34:15zacharycarter[m]so I'd worry about the learning first
17:34:16FromGitter<ozturkberkay> What path do you suggest me to follow to be able to write my own "bindings" in the future? There is a book on nim but I'm not sure if it covers enough topics
17:34:50zacharycarter[m]learn how to use c2nim / nimgen
17:34:51zacharycarter[m]learn C really
17:35:02zacharycarter[m]then it won't be so confusing
17:35:20FromGitter<ozturkberkay> hmm, i see
17:35:47zacharycarter[m]nimgen is a tool that makes c2nim easier
17:35:56zacharycarter[m]but if you don't understand what is going on - it's going to be difficult to pick up a library and run with the process
17:36:16zacharycarter[m]do you know any C/C++?
17:36:18FromGitter<ozturkberkay> What are your experiences with nim by the way? I'm thinking to switch from Node.js to Nim but not sure if the performance gains would be observable by my customers
17:36:33zacharycarter[m]Nim is way faster than NodeJS
17:36:48zacharycarter[m]Nim can also take advantage of multiple CPUs
17:37:28zacharycarter[m]NodeJS - has a much larger ecosystem
17:37:56zacharycarter[m]Nim can also compile to Javascript, as well as consume / bind to node modules
17:38:06zacharycarter[m]binding to Javascript with node is much more straightforward than binding to C - if you already know javascript
17:38:12zacharycarter[m]sorry I meant with Nim
17:38:29zacharycarter[m]Nim also as async / await like node
17:38:29*MyMind joined #nim
17:38:37zacharycarter[m]for both the JS target as well as the C target
17:39:06*Sembei quit (Ping timeout: 256 seconds)
17:39:10zacharycarter[m]so Nim accomplishes what Node really failed - having a universal language on the frontend / backend
17:39:14FromGitter<ozturkberkay> What front-end framework(s) you use with nim?
17:39:22zacharycarter[m]but still - some parts of Nim aren't available in the Js target - which has to be expected
17:39:37zacharycarter[m]I was using Karax - I'm probably soon going to write my own that uses direct dom manipulation / modern browser apis
17:39:46zacharycarter[m]and doesn't do the whole vdom / dom diffing thing
17:39:53zacharycarter[m]but the forums were written with karax
17:40:00zacharycarter[m]and I wrote play.nim-lang.org with it
17:40:38zacharycarter[m]don't expect a react-esque ecosystem
17:40:52zacharycarter[m]but I mean - you can really call whatever 3rd party JS you want with Nim - it's rather trivial to do so
17:41:00zacharycarter[m]like I"m using ace editor w/ play.nim-lang.org
17:41:51FromGitter<ozturkberkay> After wasting months and writing thousands of PHP code for Wordpress, I finally decided to re-write my e-learning website in a faster and more modern language. Currently, i am in between nodejs and nim
17:42:21zacharycarter[m]Nim also has static typing
17:42:28zacharycarter[m]and metaprogramming
17:42:36zacharycarter[m]and lots of other wins IMO
17:43:26FromGitter<ozturkberkay> So, I wont be able to use react but I might handle the front end with bootstrap?
17:43:40zacharycarter[m]react != bootstrap
17:43:43zacharycarter[m]they're not comparable
17:43:50zacharycarter[m]and you could still use react with Nim
17:44:04*Pisuke joined #nim
17:44:06zacharycarter[m]and yes - you could also use bootstrap
17:44:14zacharycarter[m]although I'd recommend tailwind.js
17:44:17*MyMind quit (Ping timeout: 244 seconds)
17:44:24zacharycarter[m]err wait
17:44:31zacharycarter[m]https://tailwindcss.com/
17:45:13zacharycarter[m]https://github.com/andreaferretti/react.nim - not sure how up to date these are
17:45:30FromGitter<ozturkberkay> I never heard of tailwind but it is looking beautiful
17:46:06FromGitter<ozturkberkay> React is slow but you have the option to use React & React Native to reach multiple platforms
17:46:46FromGitter<Clyybber> zacharycarter Yeah I meant why you prefer to use bgfx for drawing instead of allegro
17:47:16FromDiscord_<treeform> dom96, why does that make you uneasy? It was part of larger project and I factored it out.
17:47:55FromDiscord_<treeform> Araq, what secret project?
17:48:40FromGitter<zetashift> @Clyybber bgfx graphics api is probably lot nicer than allegros
17:49:07FromDiscord_<treeform> dom96, clear type is actually more clear on low resolution CRTs. But in the end its kind of subjective.
17:51:33zacharycarter[m]Clyybber: bgfx is not really comparable to allegro
17:51:33FromGitter<Clyybber> zetashift bgfx is much more low level
17:51:56zacharycarter[m]bgfx basically abstracts away all the differences b/w OpenGL / DirectX.X / Metal / Vulkan etc...
17:52:10zacharycarter[m]so like - just recently w/ apple abandoning support for OpenGL
17:52:16FromGitter<Clyybber> I see
17:52:18zacharycarter[m]bgfx makes a lot of sense to use in a game engine
17:52:21FromGitter<Clyybber> I used it for a bit
17:52:36zacharycarter[m]I don't have to write against N # of APIs
17:52:48FromGitter<Clyybber> The only thing that kinda bothered me was my inability to write a compiling shader for bgfx
17:52:50zacharycarter[m]plust it has draw call bucket sorting
17:53:04zacharycarter[m]I don't have much problems compiling shaders w/ bgfx
17:53:12zacharycarter[m]I've also been using it for a while
17:53:48FromGitter<Clyybber> I searched for the shaders you are using in fragoworks some months ago but couldnt find them.
17:53:48zacharycarter[m]but it's not the most straightforward thing in the world - I agree
17:56:33FromDiscord_<treeform> zacharycarter, I want to try bgfx, I got openGL thing working though. And it works on mac, so I am lazy.
17:56:53FromDiscord_<treeform> I don't have an incentive to rewrite everything.
17:57:14*lolmac joined #nim
17:57:49zacharycarter[m]:P
17:58:11*lolmac quit (Remote host closed the connection)
17:58:12zacharycarter[m]Clyybber - I can walk you through compiling bgfx shaders at some point
17:59:09FromGitter<ozturkberkay> https://github.com/nanoant/WebFrameworkBenchmark ⏎ ⏎ What do you think about this benchmark? Jester performed the worst but I'm not really sure if these kind of benchmarks are meaningful
17:59:40*ErrantEgo0 joined #nim
17:59:56FromGitter<ozturkberkay> also are the any resources to learn jester? it seems there is only the github readme file
18:00:01zacharycarter[m]Jester just got a lot of improvement
18:00:14zacharycarter[m]dom96: is the person to talk to about Jester
18:00:21zacharycarter[m]also the author of Nim in Action
18:00:42*ErrantEgo0 quit (Remote host closed the connection)
18:00:44FromGitter<ozturkberkay> Oh, I did not know that
18:01:37zacharycarter[m]no worries
18:01:59FromDiscord_<treeform> Why is Java Undertow so fast?
18:02:14*Fieldy8 joined #nim
18:03:04FromGitter<zetashift> they optimized the living hell out of it? ;P
18:03:05*Fieldy8 quit (Killed (Unit193 (Spam is not permitted on freenode.)))
18:03:27FromDiscord_<treeform> What tricks did they use?
18:04:13FromGitter<zetashift> I have no idea the site as well as the github readme don't provide a lot of details about the how's: https://github.com/undertow-io/undertow
18:05:10FromDiscord_<treeform> It feels like a massive repo?
18:05:33FromGitter<ozturkberkay> So far, I'm loving Nim. But the lack of learning materials (for web development) and smaller community making it look like a hard path to follow as a beginner. I'm not confident about myself for building an e-learning platform from scratch using Nim
18:05:42federico3Araq: this seems to always return empty strings https://github.com/nim-lang/Nim/blob/devel/compiler/docgen.nim#L210
18:05:42dom96https://www.techempower.com/benchmarks/#section=test&runid=283e5ea5-7d26-4ed6-bf47-62b9dcbdb9ea&hw=ph&test=json
18:05:45dom96Jester is pretty fast
18:05:45FromDiscord_<treeform> I feel like some thing that skips most headers, just raw TCP socket might be faster. But their protocol thingy is really big: https://github.com/undertow-io/undertow/tree/master/core/src/main/java/io/undertow/protocols/http2
18:05:49dom96That benchmark is seriously outdated
18:05:57*xet7 quit (Ping timeout: 240 seconds)
18:06:03dom96(The one by nanoant)
18:07:09dom96ozturkberkay: my book has a chapter that focuses on Jester
18:07:40dom96But really, if you're familiar with web dev in other languages Jester shouldn't be too difficult to pick up
18:07:56FromDiscord_<treeform> dom96, in the benchmarks you linked ruby and php is beating jester?
18:09:01FromGitter<ozturkberkay> I'll definately get the book. I only written PHP for my Wordpress site, nothing more. Should I first get familiar with web development by Node.js or is it not a bad idea to start out with nim?
18:09:16dom96treeform: ?
18:09:44dom96They aren't. You must be looking at one of the rounds or I'm blind
18:10:24dom96ozturkberkay: I would say it's better to get familiar with web dev using Python
18:10:32dom96If all you've done is Wordpress stuff
18:11:12FromDiscord_<treeform> dom96, yes sorry I was looking at the last round
18:11:18FromDiscord_<treeform> what is this 0000-00-00 thing?
18:11:20FromGitter<ozturkberkay> I made some plugins and modifications with ES6 and PHP7. Nothing more
18:11:47FromGitter<ozturkberkay> by the way, httpbeast performed really well. is it fully integrated inside jester?
18:11:57dom96treeform: https://tfb-status.techempower.com/
18:12:04dom96It's a visualization of the latest run there
18:12:42FromGitter<zetashift> the book is really nice shows a lot of 'how to do X'
18:12:51FromGitter<zetashift> including webdev in nim
18:13:40dom96Yep, Jester is built on httpbeast
18:15:25FromGitter<ozturkberkay> This might be a stupid question but why httpbeast ranked much higher than Jester?
18:16:49FromGitter<zetashift> probably uses a jester version without httpbeat
18:19:08Araqfor the frontend, consider to use "Karax"
18:19:22Araqdisclaimer: I wrote it.
18:20:51FromGitter<ozturkberkay> @Araq is it only suitable for single page applications?
18:21:32AraqI don't know what that means.
18:21:46Araqyou can also use multiple pages
18:22:09Araqand Karax support routing, albeit in a pretty bare-bones fashion
18:22:51FromGitter<ozturkberkay> just me and my stupid questions.. :P Just saw this on the github page and thats why I asked: "Karax is a framework for developing single page applications"
18:24:31Araqkarax manages a "single" page for you, like React afaik
18:27:03zacharycarter[m]presentation on Nim at carfax next Friday
18:28:56zacharycarter[m]just to my team - but I will see if I can record it - I guess more and more folks are getting interested, as it was requested during my absence
18:29:00zacharycarter[m]yesterday
18:30:36dom96zetashift: httpbeast is standalone
18:30:55dom96and Jester uses it
18:31:01dom96of course there is overhead associated with that
18:31:10dom96every framework has overhead
18:31:39*cspar joined #nim
18:35:01FromGitter<zetashift> ah I ment they used some specific set up where jester isn't using httpbeast
18:37:15dom96nah, they don't
18:40:25*xet7 joined #nim
18:51:16*host joined #nim
18:56:10*host quit (Ping timeout: 256 seconds)
18:56:40*clyybber joined #nim
19:16:34*yglukhov[i] joined #nim
19:17:54*xet7 quit (Quit: Leaving)
19:27:54*yglukhov[i] quit (Ping timeout: 260 seconds)
19:32:47*ftsf quit (Ping timeout: 244 seconds)
19:32:50*yglukhov[i] joined #nim
19:33:07*yglukhov[i] quit (Read error: Connection reset by peer)
19:35:00*yglukhov[i] joined #nim
19:36:20*yglukhov[i] quit (Read error: Connection reset by peer)
19:36:21*yglukhov_ joined #nim
19:41:27*yglukhov_ quit (Ping timeout: 240 seconds)
19:42:51*danielhuman26 joined #nim
19:43:29*yglukhov[i] joined #nim
19:44:35*danielhuman26 quit (Remote host closed the connection)
19:51:14*Cthalupa quit (Ping timeout: 260 seconds)
19:53:33*Cthalupa joined #nim
19:53:38*ZetaDot_ joined #nim
19:55:19*ZetaDot quit (Ping timeout: 260 seconds)
19:58:27*yglukhov_ joined #nim
19:58:27*yglukhov[i] quit (Read error: Connection reset by peer)
20:02:51*yglukhov_ quit (Ping timeout: 240 seconds)
20:03:50*yglukhov[i] joined #nim
20:05:42*nsf joined #nim
20:05:53*vosper joined #nim
20:17:24zacharycarter[m]hrm
20:17:57zacharycarter[m]nevermind
20:19:04*yglukhov[i] quit (Remote host closed the connection)
20:20:33*yglukhov[i] joined #nim
20:27:54zacharycarter[m]I'm just going to use old fashioned c2nim to make these allegro bindings for now so I can make progress
20:29:59FromGitter<Clyybber> Does someone have experience with vulkan? I can't figure this out: https://github.com/nimious/vulkan/issues/5
20:30:23*xet7 joined #nim
20:30:36zacharycarter[m]nope :/
20:40:03*yglukhov[i] quit (Remote host closed the connection)
20:40:29*Vladar quit (Remote host closed the connection)
20:42:38*brainproxy quit (Quit: WeeChat 2.2)
20:43:07*brainproxy joined #nim
20:43:14FromDiscord_<awr> hah that's ironic
20:43:18FromDiscord_<awr> i was just working on getting a d3d12 swapchain set up in nim
20:46:15zacharycarter[m]ooph - I just may end up using sdl or something for now
20:46:22zacharycarter[m]I can see why fowl wrote the macros he did
20:46:37FromDiscord_<awr> @clyybber i don't remember correctly but don't you get vkCreateSwapchainKHR from vkGetDeviceProcAddr?
20:51:03FromDiscord_<awr> you can't use vkGetDevice/InstanceProcAddr() correctly in that library until the function pointer types are fixed (see the issue i made a few days ago)
20:52:28*yglukhov[i] joined #nim
20:52:34*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:53:27*yglukhov[i] quit (Remote host closed the connection)
20:53:40*yglukhov[i] joined #nim
20:54:10clyybberawr Is getting them from vkGetDeviceProcAddr really needed?
20:54:43FromDiscord_<awr> i'm like 90% sure of it
20:55:21FromDiscord_<awr> in the interim just open up `vulkan.nim` in your nimble cache directory, go to `PFN_vkVoidFunction` and `PFN_vkCreateSwapchainKHR` and add `{.cdecl.}` to the end of them
20:56:13clyybberWill try asap
20:56:46FromDiscord_<awr> `let vkCreateSwapchainKHR = cast[PFN_vkCreateSwapchainKHR](vkGetDeviceProcAddr(device, "vkCreateSwapchainKHR")`
20:57:51FromGitter<data-man> @Clyybber: Maybe helpful for you - https://github.com/ocornut/imgui/blob/master/examples/imgui_impl_vulkan.cpp
20:58:31FromDiscord_<awr> also unrelated question: is adding fields to custom exception types supported? how do i access them in an `except` block, do i cast getCurrentException() or something?
20:59:23*xet7 quit (Remote host closed the connection)
21:00:10FromDiscord_<awr> Also @clyybber if you don't have the debug validation layers turned on it's a good idea, often helps you find out what you're doing wrong quickly https://gpuopen.com/using-the-vulkan-validation-layers/
21:01:05zacharycarter[m]how can you pass something like this to a macro -
21:01:05zacharycarter[m]`x,y,width,height,orientation: cint` ?
21:01:36zacharycarter[m]I don't think this code is working anymore - https://github.com/zacharycarter/allegro5/blob/master/src/al.nim#L361-L404
21:02:31FromDiscord_<awr> you mean without tuples?
21:02:34FromDiscord_<awr> like named arguments?
21:03:03zacharycarter[m]basically what I'm asking is - how would I re-write this with 0.18.1 devel
21:03:10FromDiscord_<awr> https://forum.nim-lang.org/t/1324
21:03:58zacharycarter[m]I'll give this a read - thanks
21:07:08*stefanos82 quit (Quit: Quitting for now...)
21:09:19FromDiscord_<awr> @clyybber relevant: https://www.reddit.com/r/vulkan/comments/6vmj8e/confused_about_the_vulkan_loader_and_interfacing/dm1xk82/
21:10:23FromDiscord_<awr> notice "non-extension" - `vkSwapchainKHR()` is supported through the extension "VK_KHR_swapchain"
21:12:34*nsf quit (Quit: WeeChat 2.2)
21:16:52*xet7 joined #nim
21:18:19*natrys quit (Quit: natrys)
21:29:17zacharycarter[m]yeah - fixing fowl's code is tricky
21:29:19*Sembei joined #nim
21:30:24*Pisuke quit (Ping timeout: 260 seconds)
21:31:14FromGitter<Clyybber> Thanks awr and dataman
21:32:56*cspar quit (Ping timeout: 272 seconds)
21:34:34zacharycarter[m]nevermind I think I got it - and it's simple
21:35:06FromGitter<data-man> @Clyybber ⏎ https://github.com/SaschaWillems/Vulkan - Vulkan Samples ⏎ https://github.com/LunarG/VulkanSamples - Vulkan Samples ⏎ https://github.com/Overv/VulkanTutorial - Tutorial for the Vulkan graphics and compute API ⏎ :-D [https://gitter.im/nim-lang/Nim?at=5b6f568a5ec2bc174fe69ae4]
21:35:28*xet7 quit (Remote host closed the connection)
21:35:40FromGitter<Clyybber> Thank you, I've read all about it already
21:35:40*cspar joined #nim
21:35:51FromGitter<Clyybber> I mean the vulkantutorial
21:36:10FromGitter<Clyybber> and some of the samples, which unfortunately all of them are in c++
21:36:15FromGitter<Clyybber> none in pure C
21:37:03*MyMind joined #nim
21:37:40*Sembei quit (Ping timeout: 256 seconds)
21:38:21zacharycarter[m]yeah - fowls macro is more perplexing than I thought
21:39:37FromDiscord_<awr> the standard vulkan C++ wrapper is pretty thin
21:40:50FromDiscord_<awr> there's Anvil though which i think gives you destructors and all that more typically C++ junk
21:51:33*thejoecarroll11 joined #nim
21:52:58FromGitter<data-man> @Clyybber: BTW SDL2 has Vulkan support.
21:57:05*thejoecarroll11 quit (Ping timeout: 240 seconds)
21:57:06zacharycarter[m]most windowing libs do these days
22:04:58*vosper joined #nim
22:07:13*xet7 joined #nim
22:08:28FromGitter<data-man> https://github.com/NVIDIAGameWorks/GraphicsSamples
22:10:07zacharycarter[m]I'd use bgfx
22:10:17zacharycarter[m]unless you only want to target vulkan
22:10:29FromGitter<Clyybber> I used bgfx
22:10:34FromGitter<Clyybber> But i switched
22:10:39zacharycarter[m]why?
22:10:45FromGitter<Clyybber> I want to learn vulkan
22:10:49zacharycarter[m]oh shaders, right?
22:10:53zacharycarter[m]ah
22:10:53FromGitter<Clyybber> Yeah
22:11:05FromGitter<Clyybber> And I like the api of vulkan
22:11:10zacharycarter[m]meh - you can still learn vulkan
22:11:43FromGitter<Clyybber> And I think compute shaders are pretty useful
22:12:28zacharycarter[m]bgfx supports compute shaders I'm pretty sure
22:12:31zacharycarter[m]if the target device does
22:12:45FromGitter<Clyybber> Hmm
22:12:56zacharycarter[m]https://bkaradzic.github.io/bgfx/bgfx.html
22:13:01FromGitter<Clyybber> bgfx is a really great
22:13:36FromGitter<Clyybber> But i just really wanted to learn vulkan and the nitty gritty details
22:13:43zacharycarter[m]it can be overkill though - I get it
22:13:49zacharycarter[m]yeah - it's not for that
22:13:49FromGitter<Clyybber> so that i can bother other people with my dumb bugs :P
22:22:47FromGitter<Clyybber> awr Unfortunately that didn't solve it
22:24:01*clyybber quit (Ping timeout: 248 seconds)
22:24:47FromGitter<Clyybber> vkSwapchainKHR *is* statically exposed on my platform (linux, intel hd 4600) but even with getting the function pointer through getInstanceProcAddr() I still get a segfault
22:33:16FromDiscord_<awr> try enabling the debug layer
22:50:13FromGitter<Clyybber> I will try
22:52:55*yglukhov[i] quit (Remote host closed the connection)
22:59:52*xet7 quit (Quit: Leaving)
23:01:39*vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:17:41*vosper joined #nim
23:28:47*ZetaDot_ left #nim (#nim)
23:44:39*hooo_ joined #nim
23:44:48hooo_nim compile fast to js?
23:57:45*ng0 quit (Quit: Alexa, when is the end of world?)