<< 20-03-2017 >>

00:02:08*ftsf_ quit (Ping timeout: 246 seconds)
00:02:24*Jesin quit (Quit: Leaving)
00:03:01*Jesin joined #nim
00:14:07*ftsf_ joined #nim
00:32:48zachcartermorning ftsf_
00:33:00zachcarterhrm.. just noticed something interesting about the SDL2 bindings
00:33:08ftsf_how goes your framework zachcarter?
00:33:17zachcartergreat thanks! got it running on android last night
00:33:51zachcarterI don’t think this is right - https://github.com/nim-lang/sdl2/blob/master/src/sdl2/image.nim#L18
00:33:51ftsf_awesome =)
00:33:55zachcarterthanks :D
00:34:19ftsf_what's wrong with it?
00:34:20zachcarteroh maybe it is
00:34:24zachcarterif I install the correct version of the library...
00:34:34zachcarterwell it’s interesting
00:34:50ftsf_should probably split the external libraries out of the SDL wrapper
00:35:00zachcarterif I install SDL2 via brew, that actually works because brew symlinks sdl2 image includes into usr/local/include/SDL2
00:35:21zachcarterbut if you download the latest verison of SDL_image from the website
00:35:31zachcarterthe directory structure is actually just SDL2_image/include
00:35:38zachcarternot SDL2_image/SDL/include
00:35:49zachcarteror SDL2/iSDL_image.h rather
00:36:04zachcarternot include
00:36:22zachcarterI’ll try downloading that specific verison of SDL_image
00:37:38zachcarterhrm, doesn’t appear to be availble on the website
00:37:54zachcarterbut yeah I agree ftsf_ these shouldn’t be in the sdl2 wrapper it doesn’t make much sense
00:40:20ftsf_there's a few issues with the SDL2 wrappers i need to submit back as PRs
00:40:29ftsf_hopefully will have some time for that soon
00:40:50ftsf_spent the weekend playing around with opengl+sdl2 in nim
00:41:22zachcarternice
00:41:24zachcarterI’ve been down that road
00:41:38zachcarterI’m now using BGFX instead of just OpenGL
00:41:43ftsf_got a model loaded and flying around with FPS style camera, starting to play with shaders and deferred rendering, but running into some issues now
00:41:50zachcarterhrm
00:41:52zachcartermaybe I can help
00:42:14zachcarterI’ve done skeletal animation with OpenGL and SDL / nim
00:42:22zachcarterso I’ve done the whole model loading with assimp thing
00:42:29ftsf_yeah, that's next on my list =)
00:42:31zachcarternever done deferred rendering
00:42:44ftsf_once i get my deferred rendering working
00:42:51zachcarter:)
00:42:55ftsf_just loading in .objs manually at the moment
00:43:00zachcarterah okay
00:43:07ftsf_so easy to do in nim
00:43:14zachcarteryeah
00:51:58*gokr quit (Quit: Leaving.)
01:12:35*rauss joined #nim
01:16:12*user0___ joined #nim
01:17:44*couven92 quit (Quit: Client Disconnecting)
01:19:12*user0___ quit (Client Quit)
02:02:32kulelu88is anybody familiar with parsing an sql file into nim?
02:21:20ftsf_kulelu88, by SQL file you mean a file full of SQL commands?
02:21:26ftsf_what do you want to do with it?
02:22:18kulelu88ftsf: Here is my sql file: https://www.zerobin.net/?ee5fbc6b63e93ce0#Z21wAdwQ4YI8cj4J9tUy1qBeNGnGYjQwKdDqaGSdJD8=
02:22:32kulelu88I want to import the sql data and run regex searches on it
02:23:13ftsf_not sure that nim is the right tool for the job... why not just use your database for that?
02:23:54kulelu88I want to programmatically do it for many sql files ftsf
02:24:32ftsf_you want to run regexes on the SQL command file (what you're linked), or the SQL data (what you'd have in the database after running those commands)?
02:25:19kulelu88ftsf: just the data
02:25:45ftsf_ok, well i don't think there's a good way to get the data other than by running it through your database and extracting the data
02:25:57ftsf_otherwise you'd have to reimplement your the database in nim
02:26:58kulelu88ftsf: I did extract the data from the database via adminer. is there a better way to do it? I thought nims parsesql could do it
02:27:30ftsf_"parses the SQL from input into an AST and returns the AST" an AST is likely not very useful to you
02:27:43ftsf_if you want the data you probably want to export as CSV or something
02:30:11ftsf_then use https://nim-lang.org/docs/parsecsv.html
02:32:02kulelu88ftsf: can I programmatically import the .sql file into a mysql DB, then programmatically run regex queries on it via nim ?
02:32:27ftsf_sure
02:32:55ftsf_use https://nim-lang.org/docs/db_mysql.html perhaps
02:33:56ftsf_import the file to the database then select it and run regex over it... but you can just use the DB to do regex too so may as well do that i'd think?
02:43:29*chemist69 quit (Ping timeout: 246 seconds)
02:45:01*Serenitor quit (Quit: Leaving)
02:50:40kulelu88ftsf: how can I programmatically write regex strings to match against a DB without using a programming language? can sql queries be written themselves and run as a file?
02:51:04ftsf_oh you can use a programming language to programmatically query the DB
02:51:43ftsf_using the link i just gave
02:55:44kulelu88alright thank you ftsf . I am going to try to import it first
02:56:11*chemist69 joined #nim
03:02:34*def-pri-pub quit (Ping timeout: 268 seconds)
03:03:03*def-pri-pub joined #nim
03:25:31kulelu88ftsf: is there a way to connect to the root mysql user and create databases in nim ?
03:36:57*def-pri-pub quit (Quit: leaving)
03:37:49ftsf_kulelu88, of course, just use the open() proc as in that example, but set the arguments appropriately
03:38:00ftsf_then exec to create the database
03:38:31kulelu88`let db = open("localhost", "root", "password")` doesn't work ftsf_
03:38:51ftsf_"doesn't work"... what happens?
03:39:25kulelu88test.nim(2, 14) Error: type mismatch: got (string, string, string) . it expects 4 entries
03:41:05ftsf_you need to specify the database argument as the 4th argument
03:41:08ftsf_use "mysql" i guess
03:45:33*PMunch quit (Quit: leaving)
03:45:56kulelu88ftsf: thank you, that worked.
03:49:05kulelu88now to figure out how to import the .sql file
03:50:38ftsf_read the lines of the file one by one and exec them. assuming each query is one line. if not you might need to split it by ";"
03:50:55*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:51:20ftsf_much easier to get the DB to read the file directly though, if you don't mind feeling dirty it might be easier to use a shell exec
03:52:26kulelu88I am looking at the commands directly and will run an exec for importing the file itself
03:54:44ftsf_ahh if mysql can do that then cool
03:55:36ftsf_ahh "source filename.sql"
03:56:44kulelu88is there a framework for building CLI apps? I'd like to have something like: appname -f file.sql (which imports the .sql into the DB)
03:57:13ftsf_https://nim-lang.org/docs/parseopt.html might be helpful
03:57:41ftsf_https://github.com/c-blake/cligen
03:57:53ftsf_https://nim-lang.org/docs/lib.html is a good place to look for libraries
04:01:26kulelu88wow cligen is nice
04:02:11kulelu88so I can essentially make procs for each activity and then use cli-gen to push instructions to each proc
04:04:16ftsf_yeah, with dispatchMulti if you want mulitple commands
04:12:43*tautologico left #nim (#nim)
04:38:59*deavmi__ joined #nim
04:40:37*deavmi__ quit (Client Quit)
05:30:49*rauss quit (Ping timeout: 240 seconds)
05:33:05*rauss joined #nim
05:54:35*rauss quit (Read error: Connection reset by peer)
05:58:28*nsf joined #nim
05:58:46*rauss joined #nim
06:26:29*kulelu88 quit (Ping timeout: 240 seconds)
06:34:47*ftsf_ quit (Quit: :q!)
06:48:29*kulelu88 joined #nim
06:49:30kulelu88what is the recommended way to interpolate a variable into a string?
06:50:24ldlework% macro
06:50:32ldleworkiirc
06:51:13kulelu88ldlework: not this: https://nim-lang.org/docs/strutils.html#%,string,openArray[string] ?
06:52:00ldleworkwhy not that?
06:54:25*tankfeeder joined #nim
06:55:06kulelu88ldlework: so something like this: db.exec(sql"CREATE DATABASE $val;" % [my-string]) ?
06:55:25ldleworkkulelu88: do not use string interpolation to construct sql :(
06:55:56kulelu88how else can I do it? ldlework . I want the user to provide the name of the DB and then I create it
06:56:43ldleworkhttps://github.com/nanoant/nim-orm
06:58:14kulelu88ldlework: but in theory, what I wrote will work?
06:58:30ldleworkdid you read the docs?
06:58:42ldleworkis `$val` a thing it said you can do?
07:06:49kulelu88alright, it didn't work XD
07:07:04ldleworkjust read the docs for the macro
07:08:59kulelu88which macro? I'm not clear what you are referring to
07:10:50kulelu88ldlework: that nim-orm is not even in nimble ?
07:12:33ldleworkkulelu88: `%` is a nim macro that performs string interpolation
07:12:44ldleworkyou just need to read the docs to learn how to use it
07:13:00ldleworkIts the very link you pasted to the channel
07:13:11kulelu88ldlework: but you said I shouldnt use it to construct SQL queries, so I am looking at nim-orm, which is not in nimble
07:13:21ldleworkAnd then you asked "Will it work anyway?"
07:13:36ldleworkAnd I'm answering yes, that % is for string interpolation in Nim, regardless of what the string interpolation is for
07:13:38*Matthias247 joined #nim
07:13:49ldleworkYou in general should not construct SQL manually from string and rely on a tested ORM library
07:14:02ldleworkIf you're just creating a database, maybe there is not a lot that can go wrong
07:14:16ldleworkbut what about a database named "foo; drop all tables;" ?
07:14:19ldleworkor whatever
07:14:40kulelu88this isn't that type of app for someone to drop tables. it is for internal use
07:15:22ldleworkIts your call.
07:15:38kulelu88ldlework: my point thereafter was that I cannot install nim-orm
07:15:58ldleworkCan't help troubleshoot right now sorry
07:16:29kulelu88no worries
07:16:54*Vladar joined #nim
07:32:09*rokups joined #nim
07:33:27kulelu88whoa, to install strfmt I need hg 0.o
07:33:34kulelu88problem since 2015 based on the logs
07:37:10*BitPuffin|osx quit (Ping timeout: 258 seconds)
07:42:31*brechtm joined #nim
07:50:54*gokr joined #nim
07:51:54*brechtm quit (Remote host closed the connection)
07:54:33*girvo joined #nim
07:58:03*vlad1777d joined #nim
08:06:59*bjz joined #nim
08:09:11Araqkulelu88: I still don't know whether your problem would be solved by just reading the examples in https://nim-lang.org/docs/db_mysql.html
08:10:01Araqyou keep talking about parsing a large .sql file. most people don't "parse large .sql" files, they store the data in the database
08:10:11Araqand then query the database to get the data back
08:11:00*bjz_ joined #nim
08:11:09kulelu88Araq: I have done exactly that. I am now storing the .sql into a mysql database. my problem is that I cannot use a variable in the SQL string
08:11:24kulelu88this didn't work either: db.exec(sql"CREATE DATABASE ?;", dbname)
08:11:35kulelu88a similar problem here: https://forum.nim-lang.org/t/1659
08:11:52kulelu88its not for my lack of "you dont read the docs". I very much am reading it all the time
08:11:59Araqyou mean you store the sql as text/blob in the mysql database?
08:12:09*bjz quit (Ping timeout: 260 seconds)
08:12:32kulelu88yes, but I am building a CLI tool that first creates the DB, then it will fetch the file and import/store it in mysq;
08:12:34kulelu88mysq;
08:12:36kulelu88mysql
08:14:28kulelu88so my problem is no longer parsing the sql, it is using a variable in a string: db.exec(sql"CREATE DATABASE ?;", dbname) --> doesn't work . nor did: db.exec(sql"CREATE DATABASE $val;" % [my-string])
08:16:07kulelu88it seems like a solved-problem in most languages, which is why I am asking here
08:17:40Araqdb.exec(sql("create database " & mystring))
08:21:11*zachcarter quit (Quit: zachcarter)
08:21:47Araqyeah, yeah, I know the stdlib must explain the very basics of how the programming language actually works
08:25:30kulelu88Araq: seeing as I don't want to run circles around exactly what code I am writing, here it is, in all 5-line glory: https://www.zerobin.net/?b0e9e62910241296#qQ4B/WoWyzjJIFyuIBw0oVyXHUsZo9+IF7M8qKxZb3k= with the error-ouput below.
08:27:43AraqI'm pretty sure these 5 lines don't produce this "error-output"
08:41:32*djellemah quit (Ping timeout: 246 seconds)
08:45:13*rauss quit (Quit: WeeChat 1.7)
08:45:19tstmAraq: Also, having examples like "create database" & mystring are horrible as those should never be done in any application that takes in user input.
08:45:43tstmSanitizing input is paramount.
08:48:02Araqtstm: true. but what about sql"create database " & asciiLettersOnly(mystring)
08:49:14Araqwe could have asciiLettersOnly(s: string): Sql and & for sql datatype
08:49:15kulelu88Araq: this is all the code I have and that is the error I am getting when attempting to run the proc using cli-gen
08:49:59AraqI have no idea what cli-gen is
08:50:44flyxfrom what he's saying, it's the tool that generates this „error“-Message
08:51:31Araqor rather proc identifier(s: string): Sql
08:51:52kulelu88here it is: https://www.zerobin.net/?9cbf9e074c295616#t+zAJinOGsxBlkHL19dmPk6WIi7YNzULd3WNOYXUmJI=
08:52:28kulelu88all 6 lines of code now
08:52:54tstmAraq: Yeah, that'd certainly be better!
08:52:57flyxhave you tried `./file create_db dbname="db1"`
08:53:23flyxor perhaps only `./file dbname="db1"`
08:53:37flyxor more likely `./file --dbname="db1"`
08:53:46flyxjust guessing what this tool does
08:53:57flyxyou also could read its documentation
08:57:36kulelu88flyx: yes, you are right. the problem is in the CLI-tool
09:03:30*_RPG_ quit (Remote host closed the connection)
09:09:30kulelu88wow, odd tool. I had to initialize the variable as an empty string
09:17:05*couven92 joined #nim
09:18:05flyxI would guess that this is only necessary to make the syntax `./file --dbname="db1"` work and else it would be just `./file db1`
09:20:19*girvo quit (Ping timeout: 260 seconds)
09:43:56*pie__ joined #nim
09:44:32couven92okay, follow-up question for nim.cfg: How can I use the value of a symbol define as part of the options that are passed to the compiler?
09:47:30couven92e.g.: `--define:"thisIsAMagicCompileOption:magic"` and then `vcc.options.always = thisIsAMagicCompileOption`
09:47:44couven92ah... wait: `$thisIsAMagicCompileOption`?
09:52:06Araqdon't do that
09:52:11Araqit's a bad idea
09:52:24couven92okay... why?
09:54:19Araqbecause that's not how the config system works
09:54:42Araqyou can already override vcc.options.always in a project specific configuration file
09:55:33*Amun_Ra quit (Quit: WeeChat 1.0.1)
09:55:37couven92Hmm... I was looking for a way to have the vcvarsall path in the config... Then vccexe wouldn't need to search for the compiler tools... would make it much more powerful
09:56:25couven92can I change the vcc backend implementation to accept `vcc.options.vcvarsall`?
09:56:42couven92or rather: `vcc.vcvarsall`
09:57:58*Amun_Ra joined #nim
10:02:57*Andris_zbx joined #nim
10:06:51Araqwhat are you trying to solve?
10:06:57*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:07:07couven92the vccexe problem :P
10:08:04*djellemah joined #nim
10:08:05couven92Hmm... I could just add a custom paccC for that... ooohhh...
10:08:17couven92s/paccC/passC
10:15:45*bjz joined #nim
10:33:24*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:36:43*kulelu88 quit (Quit: Leaving)
10:40:39*bjz joined #nim
10:47:35*Ven joined #nim
10:47:58*Ven is now known as Guest90000
10:57:37*brechtm joined #nim
10:59:26*brechtm quit (Remote host closed the connection)
11:00:02*brechtm joined #nim
11:00:12*brechtm quit (Read error: Connection reset by peer)
11:00:43*brechtm joined #nim
11:02:39*Snircle joined #nim
11:28:04*Guest90000 quit (Ping timeout: 260 seconds)
11:33:38couven92howto convert a string into an enum-of-string value?
11:33:53couven92basically the reverse of the $ operator?
11:34:02Araqstrutils.parseEnum
11:34:06couven92thx
11:34:13Araqstrutils.parseEnum[MyEnum](str)
11:36:57*bjz_ joined #nim
11:38:38*bjz quit (Ping timeout: 246 seconds)
11:58:15*brechtm quit (Remote host closed the connection)
11:59:38*brechtm joined #nim
12:01:49*brechtm quit (Remote host closed the connection)
12:04:12*brechtm joined #nim
12:09:59*bjz_ quit (Ping timeout: 264 seconds)
12:10:42*bjz joined #nim
12:14:36*djellemah quit (Ping timeout: 240 seconds)
12:14:59*arnetheduck joined #nim
12:16:15*djellemah joined #nim
12:19:51*yglukhov joined #nim
12:28:40*zachcarter joined #nim
12:35:58*elrood joined #nim
12:40:40*Jehan_ joined #nim
12:45:28*zachcarter quit (Quit: zachcarter)
12:51:23*Snircle_ joined #nim
12:54:14*Snircle quit (Ping timeout: 246 seconds)
13:05:22*Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com)
13:22:22*PMunch joined #nim
13:24:43*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:27:44*brechtm left #nim (#nim)
13:29:43*bjz joined #nim
13:36:03*Jehan_ quit (Quit: Leaving)
13:36:29*PMunch quit (Quit: leaving)
13:39:31*PMunch joined #nim
13:59:03*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:02:21*Jehan_ joined #nim
14:06:50*enthus1ast joined #nim
14:11:16*enthus1ast quit (Ping timeout: 240 seconds)
14:11:50*enthus1ast joined #nim
14:26:53*zachcarter joined #nim
14:26:57zachcartero/
14:29:37*Ven joined #nim
14:30:00*Ven is now known as Guest60921
14:30:06*Snircle joined #nim
14:31:46*djellemah quit (Ping timeout: 240 seconds)
14:34:55*djellemah joined #nim
14:40:53*djellemah quit (Ping timeout: 260 seconds)
14:43:20*djellemah joined #nim
14:45:40*gokr quit (Quit: Leaving.)
14:56:33*BitPuffin|osx joined #nim
15:02:11*tankfeeder quit (Quit: Leaving)
15:04:29ftsfo/
15:04:49ftsfhttps://gist.github.com/ftsf/488c917d7e2a744638d02f8ee7c97991 this is really frustrating, i can't seem to get a simple quad to draw =(
15:05:39zachcarterare you getting errrors?
15:05:42zachcarteror just a black screen?
15:05:46ftsfno errors, just black
15:06:06zachcarterdid you try a triangle first?
15:06:21zachcarterI have some sample code that I know works I could point you to
15:06:47zachcarterhttps://gist.github.com/dgellow/f7bb51536c836ad82120
15:06:53ftsfi did... gonna go back to basics and figure out what's up
15:06:59ftsfbecause my model rendering is working fine
15:07:00zachcarterokay
15:07:02zachcarterhrm
15:07:07ftsfbut then trying to draw full screen quad for fx
15:07:12ftsfand nothing
15:07:16zachcarter:/
15:07:31zachcarterI can’t see anything obviously wrong in your code
15:12:08ftsfthanks for checking
15:23:11*shashlick quit (Ping timeout: 264 seconds)
15:25:24*shashlick joined #nim
15:26:48ftsfaha! i figured it out
15:26:55ftsfmy array was doubles not floats
15:27:02PMunchHaha :P
15:27:37ftsfyay
15:28:11ftsfso happy now :3
15:28:29*Guest60921 quit (Ping timeout: 260 seconds)
15:31:48*Ven joined #nim
15:32:12*Ven is now known as Guest72549
15:35:04*PMunch quit (Quit: leaving)
15:37:46*couven92 quit (Quit: Client disconnecting)
15:39:33*Andris_zbx quit (Remote host closed the connection)
15:55:33*Guest72549 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:13:05*yglukhov quit (Remote host closed the connection)
16:18:06*yglukhov joined #nim
16:22:16*yglukhov quit (Ping timeout: 240 seconds)
16:39:48*sz0 joined #nim
16:58:52*Trustable joined #nim
17:18:14*yglukhov joined #nim
17:20:38*huonw quit (Ping timeout: 255 seconds)
17:22:20*yglukhov quit (Ping timeout: 246 seconds)
17:29:04*huonw joined #nim
17:31:18*brson joined #nim
17:32:56*yglukhov joined #nim
17:39:48*gokr joined #nim
17:42:30*Jehan_ quit (Read error: Connection reset by peer)
17:56:31*yglukhov quit (Remote host closed the connection)
18:03:14*Jehan_ joined #nim
18:11:24*federico3 quit (Quit: WeeChat 1.5)
18:11:54*tankfeeder joined #nim
18:14:17*kulelu88 joined #nim
18:15:43*federico3 joined #nim
18:21:57*federico3 quit (Quit: WeeChat 1.5)
18:22:02*federico1 joined #nim
18:22:25*federico1 quit (Client Quit)
18:22:36*federico3 joined #nim
18:33:23*Jehan_ quit (Read error: Connection reset by peer)
18:39:18*yglukhov joined #nim
18:42:21*Vladar quit (Remote host closed the connection)
18:50:38*bjz joined #nim
18:55:04*Vladar joined #nim
18:56:00*yglukhov quit (Remote host closed the connection)
18:56:08*Matthias247 quit (Read error: Connection reset by peer)
18:57:36*Matthias247 joined #nim
19:03:04*Jehan_ joined #nim
19:12:02dyce[m]nim has spoiled me with its sexy standard library
19:12:14dyce[m]and golang makes me angry having to have ~60 lines of code to unzip a file
19:17:38*tankfeeder quit (Quit: Leaving)
19:19:39*FromGitter quit (Remote host closed the connection)
19:19:47*FromGitter joined #nim
19:25:30subsetparkSo it would seem to be more idiomatic to implement Options using object variants - why are they implemented with a `has` boolean in the stdlib?
19:28:15Araqbecause it's not exposed anyway, these are private fields
19:28:27Araqand a case object wouldn't be more efficient either
19:28:46Araqit would however make the compiler insert checks that the library already does
19:32:59subsetparkah i see
19:37:47*gangstacat quit (Quit: Ĝis)
19:39:02VladarDoes anyone have some time to test my jam-game? https://vladar.itch.io/glorious-glacier-grotto
19:42:07FromGitter<ivankoster> my question got buried yesterday. Anyone know how to check in a macro if an identifier refers to an enum? if you have an enum defined somewhere that is called WireFormat, and you get passed a nimnode of nnkIdent with the value WireFormat, I want to find out if that NimNode refers to an enum or not
19:43:25kulelu88Vladar: should we be able to see your code?
19:44:31*libman joined #nim
19:44:46Vladarkulelu88: what do you mean?
19:45:09kulelu88its part of linux game jam, so should the game be OSS?
19:45:31Vladaryes, of course
19:47:52*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
19:50:51dom96Vladar: looks cool. No OS X binaries though :\
19:51:30Vladardom96: is there even a way to build osx binaries on Linux?
19:51:50Vladarplus, nowhere to test then
19:52:53dyce[m]what does golang do for osx?
19:57:33dyce[m]Vladar: i think travisci has a osx environment you can build with
19:57:54libmanI started working on a multiplatform Nim build environments, but never finished anything.
19:59:35demi-golang compiler can do it
20:00:17*gangstacat joined #nim
20:00:21demi-fwiw, building os x binaries outside of os x isn't officially supported as there is no official spec for the executable binary format
20:03:37Araqivankoster: use macros.getType on a 'typed' macro parameter
20:04:38FromGitter<ivankoster> cant, i'm getting it from somewhere down the AST
20:07:13FromGitter<ivankoster> @araq ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Im in the PbMessage macro and have to check if SomeEnum is actually an enum [https://gitter.im/nim-lang/Nim?at=58d036707b3f37e754199caa]
20:07:35FromGitter<ivankoster> maybe something with bindsym and then gettype? does that work?
20:07:35*Jehan_ quit (Ping timeout: 264 seconds)
20:08:07Araqthat means your macro is misdesigned :-)
20:08:30FromGitter<ivankoster> I don't understand, It's a code block
20:08:36FromGitter<ivankoster> passed to the macro
20:08:51Araqyeah but your code block cannot be analysed
20:09:02Araqneither by the compiler because it doesn't understand your DSL
20:09:14Araqnor by your macro because it cannot do symbol lookups nor type checking
20:09:16FromGitter<ivankoster> I cannot ask the compiler to lookup an identifier in its symbol table?
20:09:27Araqnot in a macro
20:09:34FromGitter<ivankoster> darn
20:10:15FromGitter<ivankoster> then i have no choice but to annotate my DSL with SomeEnum is an enum..
20:10:20*Jehan_ joined #nim
20:10:41Araqand then what? do you also demand to annotate it with the possible enum fields
20:10:55FromGitter<ivankoster> nope
20:11:02FromGitter<ivankoster> just have to know if its an enum or not
20:11:06Araqjust write a macro that takes a proper type
20:11:30Araqyour current approach is doomed to fail: type MyEvilAlias = uint32
20:11:46Araq field: MyEvilAlias # can your macro handle that?
20:12:35FromGitter<ivankoster> can you give more context? How does that fit into the PbMessage call i wrote above?
20:13:53*cheatfate_ joined #nim
20:14:09*elrood_ joined #nim
20:14:24*sz0 quit (Quit: Connection closed for inactivity)
20:14:34Araqtype Alias = PbInt32
20:14:48AraqPbMessage ItemRow:
20:14:48Araq id: Alias @1
20:15:06Araq# not supported.
20:15:35*couven92 joined #nim
20:16:47*Pisuke joined #nim
20:17:14*bbl__ joined #nim
20:18:35*PMunch joined #nim
20:18:59*antranig1 joined #nim
20:20:00*dexterk_ quit (Ping timeout: 258 seconds)
20:20:04*dexterk__ joined #nim
20:20:41*MyMind quit (Excess Flood)
20:20:41*elrood quit (Read error: Connection reset by peer)
20:20:56*euantor_ joined #nim
20:21:45*byyte512 joined #nim
20:22:16*federico1 joined #nim
20:22:35*benoliver999_ joined #nim
20:23:33*pigmej_ joined #nim
20:23:34*flyx|znc joined #nim
20:26:33*vqrs joined #nim
20:26:33*Trustable quit (Read error: Connection reset by peer)
20:27:00*Trustable joined #nim
20:27:29*federico1 is now known as federico2
20:29:11*FromGitter quit (*.net *.split)
20:29:11*federico3 quit (*.net *.split)
20:29:12*vlad1777d quit (*.net *.split)
20:29:12*Jesin quit (*.net *.split)
20:29:12*byte512 quit (*.net *.split)
20:29:13*cheatfate quit (*.net *.split)
20:29:13*antranigv quit (*.net *.split)
20:29:14*vqrs_ quit (*.net *.split)
20:29:14*pigmej quit (*.net *.split)
20:29:14*jivank_ quit (*.net *.split)
20:29:14*joshbaptiste quit (*.net *.split)
20:29:14*euantor quit (*.net *.split)
20:29:15*j75__ quit (*.net *.split)
20:29:15*jmkr quit (*.net *.split)
20:29:15*flyx quit (*.net *.split)
20:29:15*bbl_ quit (*.net *.split)
20:29:16*benoliver999 quit (*.net *.split)
20:29:17*flyx|znc is now known as flyx
20:29:17*pigmej_ is now known as pigmej
20:29:17*joshbapt1 joined #nim
20:29:20*benoliver999_ is now known as benoliver999
20:29:25*euantor_ is now known as euantor
20:29:57*vlad1777d joined #nim
20:30:14*federico2 is now known as federico3
20:30:15*jmkr joined #nim
20:31:24*Jesin joined #nim
20:31:56*bjz joined #nim
20:33:47*FromGitter joined #nim
20:39:10*j75__ joined #nim
20:42:03*cheatfate_ is now known as cheatfate
20:42:15*rokups quit (Quit: Connection closed for inactivity)
20:43:28*vqrs quit (Ping timeout: 240 seconds)
20:46:53*vqrs joined #nim
20:47:13*Trustable quit (Remote host closed the connection)
20:47:38*await is now known as async
20:48:46*async is now known as windows
21:02:10*kier quit (Ping timeout: 258 seconds)
21:06:17*kier joined #nim
21:10:31*Sentreen quit (Read error: Connection reset by peer)
21:10:32*couven92 quit (Ping timeout: 246 seconds)
21:11:04*Sentreen joined #nim
21:12:52*couven92 joined #nim
21:13:20*Jehan_ quit (Ping timeout: 246 seconds)
21:15:39*Jehan_ joined #nim
21:33:44couven92Okay... I have updated and modified the vccexe tool. https://github.com/nim-lang/Nim/pull/5575
21:34:12couven92I think the changes are reasonable and allow for better flexibility also for future VCC toolchains
21:35:16couven92Heck, I can now even use vccexe for every other Visual C/C++ tool I want as well, and since I have in my PATH (since it sits next to nim.exe) this works everywhere for me! :)
21:36:05couven92that means easy access to: nmake, ml, link, dumpbin, etc...! Yaih! :)
21:45:02*def-pri-pub joined #nim
21:49:12*Jehan_ quit (Quit: Leaving)
21:53:51*Jehan_ joined #nim
22:03:39*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:09:05*Vladar quit (Quit: Leaving)
22:18:30cheatfatecouven92, you know why previouse version was better? because it was automatic
22:18:37cheatfatenow it much worse
22:18:51cheatfatebecause everybody needs to modify nim.cfg file
22:19:23couven92well... I have a nim.cfg lying in my %APPDATA%... But, yes... I see your point
22:20:53cheatfatewe just need to find way to check for vs2017
22:20:53couven92cheatfate, okay, here's a deal: I'll put in the auto-detection if the vcvarsall argument is omitted. That sound okay? And I'll default to the latest SDK I find?
22:21:09couven92cheatfate, yeah, I'm working on that
22:21:23couven92will be a couple more days until that's ready thogh...
22:21:35couven92s/thogh/though
22:21:38cheatfatecouven92, you can only make a deal with Araq, not me
22:21:45couven92:P
22:22:11cheatfatebut i prefer automatic tool for every version
22:22:29cheatfateotherwise i will better use mingw
22:23:45couven92Well... You'll get your auto for VS2015 and below, and once I have figured out vswhere, I'll also auto VS2017 (VS2017 will be a little more complicated though, since there are multiple versions there)
22:40:28*bjz joined #nim
22:43:24couven92howto: enumerate the values of a non-ordinal enum type?
22:45:50couven92nvm, I'll just create a list of all enum values, since I need it reversely sorted as well
22:45:59*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:51:30*gokr quit (Ping timeout: 268 seconds)
22:55:36*nsf quit (Quit: WeeChat 1.7)
22:58:05SentreenAm I missing something obvious (again), or is it impossible to do something like `for x, y in zip(xs, ys):`?
22:58:40SentreenUnless I am mistaken, the pairs iterator gets invoked, even when putting parentheses around the `x,y`
22:59:48def-Sentreen: items(zip(xs, ys))
23:01:38SentreenThat does it, thanks! So using `items` just explicitly calls the iterator?
23:01:40*Jehan_ quit (Quit: Leaving)
23:01:48def-yes
23:02:09SentreenOaky, thanks again :)
23:03:44*Jehan_ joined #nim
23:13:40couven92uhm, the standard library documentation states that the commandLineParams is not availble on POSIX. Howto get the commandline arguments the right way?
23:13:46*arnetheduck quit (Ping timeout: 240 seconds)
23:14:59zachcarterdef-: thank you and yguklov for that SDL template repo
23:15:06zachcarterand nimes
23:15:10zachcarterhelped me get my framework on android
23:15:26stisacouven92 parseopt2 I think
23:15:28*vlad1777d quit (Remote host closed the connection)
23:18:42couven92stisa, yeah, but what if I don't need to parse any args... I just want the argv sequence passed into the main function?
23:25:28stisanot sure, sorry
23:26:04couven92well, vcc is windows only anyways, so I don't really care, but I thought it was interesting... :P
23:27:21*xet7_ joined #nim
23:30:06*xet7 quit (Ping timeout: 240 seconds)
23:30:36*Jehan_ quit (Ping timeout: 240 seconds)
23:31:50*girvo joined #nim
23:34:39cheatfatecouven92, check os.paramCount and os.paramStr
23:34:52couven92ah!
23:35:51cheatfatecouven92, 2017 is faster then 2015?
23:36:09cheatfatei mean interface?
23:36:10couven92cheatfate, same issue! The documentation states: that os.paramStr is not available on POSIX
23:36:32couven92cheatfate, what do you mean? If the discovery is faster?
23:36:44cheatfateos.paramStr is available on POSIX
23:36:47cheatfateas well as windows
23:37:04couven92cheatfate, the documentation states otherwise: https://nim-lang.org/docs/os.html#paramStr,int
23:37:36cheatfatethere no any word that it not available on POSIX
23:38:06couven92Quote: "Availability: On Posix there is no portable way to get the command line from a DLL and thus the proc isn't defined in this environment."
23:38:14cheatfateor you want to get parameters inside of shared object?
23:38:50cheatfateyou making executable or library?
23:38:58couven92executable
23:39:10cheatfateso what the problem?
23:39:28cheatfate`there is no portable way to get the command line from DLL`
23:40:03cheatfateso if you are making DLL/SO then you are in trouble, but if you making executable you are ok
23:40:19couven92I'm on Windows, so I have no problem. But if I understand correctly, the paramStr is not defined on POSIX, since there is no DLL (or library) to get the command line arguments from
23:40:44cheatfatecouven92, you are reading wrong
23:41:17couven92AH! Okay... Now, I get it... in a so or dll it doesn't work, right! Sorry!
23:41:45couven92Why would you want to do that in a library anyways? :O
23:44:22cheatfateyou can access even if you are in library, but somebody was too lazy to implement it cross-platform
23:48:13*def-pri-pub quit (Quit: leaving)
23:56:45*yglukhov joined #nim