<< 08-01-2015 >>

00:03:32JinShilHello foks. I'm exploring Nim for use in bare-metal firmware.
00:04:00JinShilI'm wondering, is it possible to have Nim generate all the necessary code for the cruntime.
00:04:12JinShilFor example crt0.o and friends.
00:04:15JinShil??
00:04:55JinShilI exploring the idea of using Nim without libc or the cruntime, and rather generate that code with Nim itself.
00:06:51AraqJinShil: kokozedman has some experience with this I think
00:07:14Araqbut you should start with --os:standalone
00:07:31Araqand make yourself familiar with panicoverride etc
00:08:24JinShilyeah, I expect to have port some of the Nim runtime to my platform. That's ok. I did some experiments yesterday using -lib:. and adding my own system.nim.
00:08:59Araqnice
00:09:37JinShilI'm just wondering are there any dependencies on libc baked into the compiler, does all code originate with .nim files.
00:09:55JinShil??
00:10:25Araqthere are not C files written by hand except nimbase.h
00:11:03Araqthe memory manager uses mmap, but it's not hard to patch to use something else
00:12:01Araqso yes, Nim's core is the nim files in system/
00:12:35JinShilok, sounds promising.
00:13:00*BlaXpirit_ quit (Quit: Quit Konversation)
00:13:17JinShilCan you elaborate just a little more on what os:standalone does?
00:13:48JinShilI can guess, but I'm looking for a little more detail.
00:13:59Araqnot much, it disables lots of stuff in system.nim
00:14:06Araqyou can grep for it
00:16:23flaviu> XXX This is a hack, but PCRE does not export its "free" function properly.
00:16:36flaviuLooks good to me: PCRE_EXP_DECL void pcre_free(void *);
00:16:51flaviuCan someone elaborate as to what is meant?
00:18:32Araqflaviu: pcre evolved.
00:18:33*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:18:35*aw1231 quit (Quit: Page closed)
00:19:07flaviuOk, should pcre.nim be regenerated?
00:19:52Araqno. just add the free
00:20:49*brson quit (Ping timeout: 255 seconds)
00:21:13flaviuInteresting: http://www.pcre.org/changelog.txt
00:21:27flaviunot directly useful right now, but in 1-2 years..
00:24:02*shodan45 quit (Ping timeout: 244 seconds)
00:24:48*yglukhov_____ quit (Quit: Be back later ...)
00:25:49*dapz joined #nim
00:26:52*infrashortfoo joined #nim
00:29:40flaviuLooks like pcre's free was changed in v8.30, so Nim doesn't support Debian Squeeze's libpcre3
00:29:49flaviuNot that it matters much.
00:30:00flaviuerr, will matter much.
00:30:29flaviuI'm getting ahead of myself.
00:31:11*infrashortfoo quit (Ping timeout: 256 seconds)
00:36:50JinShilflaviu, I just wanted to follow up on your experiment yesterday minimizing hello world
00:37:08JinShilIt turns out if you add -t:-flto -l:flto you can get it reduced even more.
00:38:20JinShilAlso, I found out that if you comment out `registersignalhandler_19608();` in the generated system.c file, you can get it even smaller.
00:38:25JinShilI was able to get it down to 7K.
00:40:09gmpreussnernot bad
00:40:22gmpreussnertime to start writing 64k demos in nim :)
00:43:29JinShilgmpreussner, I'm just exploring right now, but if Nim keeps my interest, I don't see why we can't have hello world on the order of 10s of bytes and demos less than 16k.
00:47:10Araqecho "hi" save as '.sh' or '.bat' # 9 bytes
00:47:35Araqhere you go, Nim's hello world only takes 9 bytes. beat that. :P
00:47:49Triplefoxwrite "hello world" on a sheet of paper. zero bytes
00:48:04flaviuAraq: You need to include the compiler size in that to be fair.
00:48:16flaviuWhile we're at it, might as well as include the OS :P
00:48:48Lordovoshallo welt
00:49:54AraqJinShil: you can do the same with -d:noSignalHandler
00:51:11Lordovosdo executables that nim produces when compiled statically link to libgcc?
00:51:30JinShilAraq: That's great. I didn't see that documented. That gets me down to 7k on nim commandline
00:51:43JinShilnim c -d:nosignalhandler -d:release --gc:none --stacktrace:off -t:-flto -t:-ffunction-sections -l:-flto -t:-fdata-sections -l:-Wl,--gc-sections hello.nim
00:51:58JinShilSome of those switches may not be necessary. I'm still exploring.
00:52:56gmpreussnerJinShil: i think it would be super awesome if you could write a blog post with your findings
00:55:19JinShilI hope to when I actually finish my experiments. If I can get `proc echo` to print with inline assembly syscalls, I may write something up. I did something similar with D.
00:56:19gmpreussnerdo we have any guidelines on writing wrappers for third party libraries? i looked a few that are linked on the wiki, and it looks like there is no common naming convention, folder structure or style
00:58:30gmpreussnerthe most consistent repositories i found are in nim-lang
00:58:39gmpreussneri guess i will just follow that?
00:59:07gmpreussnerdom96: any insights on this?
01:04:34*Nimbus joined #nim
01:10:13Araqgmpreussner: c2nim now knows about NEP-1
01:12:38gmpreussnerAraq: sorry, what is NEP-1?
01:12:42*imapiekindaguy joined #nim
01:12:56Araqour PEP-8
01:13:04gmpreussneralso, i'm not a fan of source code mixed in with other stuff in the root directory. i like how dom96 has a /src subdirectory in his repos to keep things clean
01:13:20Araqthe official style guide
01:13:24gmpreussnerah
01:13:39Araqgmpreussner: yeah but I'm not a fan of directories :P
01:14:41gmpreussnerdo subdirectories have any implications for the import statements?
01:15:35gmpreussnerNEP-1 has no guidelines for modules as far as i can tell
01:15:42Varriountgmpreussner: You can use strings literals in import statements, and use paths
01:16:06gmpreussnerwell, i wouldn't want to have: import src/wrapper.nim
01:16:14Varriountgmpreussner: And why should it? Everyone has their own view on how modules should be configured.
01:16:29gmpreussnerVarriount: surely they must be some best practices?
01:16:51gmpreussneri dont want to force anyone to use a particular style. im just wondering what proved convenient so far.
01:16:55onionhammerimport src.wrapper
01:17:15gmpreussneronionhammer: i think you can use both / or .
01:17:18Araqyou don't have to do that , onionhammer
01:17:29onionhammerim just saying you can use either or
01:17:37onionhammer. or /
01:18:07Varriountgmpreussner: Aside from *not* emulating java, and using common sense, I really don't know
01:18:29Araqgmpreussner Nimble documents some best practices
01:18:34dtscodeldlework, ping
01:18:43gmpreussnerso, for example, i'm looking at nim-lang/opengl. if i want to import the 'opengl' module, do i have to write 'import src/opengl' because opengl.nim is in the /src subdirectory?
01:18:54Araqno, you don't
01:19:00Araqand nobody does that
01:19:10flaviudoesn't nimble have a sourcedir option?
01:19:21Araqnimblepath deals with this but I don't remember the details
01:19:41Araqall I know is that I wrote that part 3x and then everybody was happy
01:19:45gmpreussneri see, so nimble will search all subdirectories
01:19:58EXetoCno
01:20:00gmpreussnerand i only need 'import opengl'
01:20:11EXetoCyou set the source dir in the package file
01:20:24gmpreussnerah, got it!
01:20:27gmpreussnerthanks EXetoC
01:20:37gmpreussneryeah, it's in the opengl.babel file
01:20:46gmpreussnerok, now everything is clear :)
01:20:54*gsingh93 quit (Quit: Connection closed for inactivity)
01:21:55Araqgood night
01:22:09VarriountGoodnight.
01:22:38EXetoCbb
01:22:54EXetoCmaybe there should be a sub-dir
01:23:56gmpreussnerg'nite Araq
01:25:32*rpag quit (Ping timeout: 265 seconds)
01:30:12*z1y joined #nim
01:30:35*infrashortfoo joined #nim
01:34:54*imapiekindaguy quit (Quit: WeeChat 1.0-rc3)
01:35:03*meanfish joined #nim
01:35:27*infrashortfoo quit (Ping timeout: 264 seconds)
01:44:32*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:44:52*dapz joined #nim
01:45:12*flaviu quit (Remote host closed the connection)
01:45:42*flaviu joined #nim
01:49:20*z1y quit (Quit: Leaving.)
01:49:51*dapz quit (Ping timeout: 264 seconds)
02:13:14*yglukhov_____ joined #nim
02:18:03*yglukhov_____ quit (Ping timeout: 264 seconds)
02:21:35*aw1231 joined #nim
02:21:46*aw1231 quit (Client Quit)
02:23:52*Nimbus quit (Ping timeout: 240 seconds)
02:33:10*infrashortfoo joined #nim
02:34:13*z1y joined #nim
02:38:02*infrashortfoo quit (Ping timeout: 265 seconds)
02:39:55*Lordovos quit (Quit: Leaving)
02:46:09*JinShil quit (Ping timeout: 252 seconds)
02:50:03*kapil__ joined #nim
02:51:55*hasenj joined #nim
03:05:11MrOrdinaireis there any way to generate an expression easily in the codegen module of the compiler?
03:09:59*infrashortfoo joined #nim
03:13:01*VinceAddons quit (Read error: Connection reset by peer)
03:13:47*willwillson_ joined #nim
03:14:01*willwillson quit (Ping timeout: 244 seconds)
03:14:22*infrashortfoo quit (Ping timeout: 240 seconds)
03:15:44*JinShil joined #nim
03:18:25*willwillson_ quit (Ping timeout: 264 seconds)
03:18:55*willwillson joined #nim
03:26:26*darkf joined #nim
03:33:38VarriountMrOrdinaire: Hm?
03:33:55VarriountMrOrdinaire: Wht kind of expression?
03:36:32MrOrdinaireVarriount: I want to generate something like `s.high`. However, at this phase, the compiler has substituted other `s.high`s with something like `high_123(s_1234)`, so simply putting simple symbols like `s` and `high` won't work.
03:39:08VarriountMrOrdinaire: Hm, tricky...
03:39:43VarriountLet's look at the compiler code, and see what we can uncover, eh?
03:39:47Varriount:P
03:40:04MrOrdinaireokay
03:44:21VarriountMrOrdinaire: Perhaps we should find where the compiler translates 's.high' into `high_123(s_1234)`?
03:46:39JinShilHow does one get a pointer from a string?
03:47:36VarriountJinShil: Pointer, or reference? What are you trying to do?
03:48:27JinShilI want to pass the address of a string to an inline assembly procedure. Essentially I want the address of the first character.
03:48:34JinShilref mystring?
03:48:49VarriountJinShil: Use addr(myString[0])
03:49:48VarriountJinShil: *Don't* take the direct address of a string, it contains stuff other than characters (length data, etc)
03:50:17*hasenj quit (Ping timeout: 245 seconds)
03:50:20Triplefoxthe idiom is the same with an array too
03:51:13*willwillson quit (Ping timeout: 244 seconds)
03:52:57VarriountMrOrdinaire: We might have to wait until araq is awake. He just went to bed unfortunately.
03:54:30VarriountMrOrdinaire: Would another possibility be to defer updating the length of the sequence?
03:55:31VarriountFrom what I understand, the bug is caused by the sequence being extended, then s.high being taken. This wouldn't be a problem if extending the sequence didn't affect s.high() and s.len()
03:56:07MrOrdinairehmm
03:58:01VarriountJinShil: The idiom makes sense as soon as you think of a string as a pascal string, rather than a C string
03:58:48VarriountAlso, since a string is a ref, taking the address of the variable holding a reference isn't what you usually want.
04:02:14*yglukhov_____ joined #nim
04:02:17JinShilOk, I'm not familiar with Pascal strings, but I understand what you're saying.
04:02:31JinShilBut I want the address of a string literal. Is that possible?
04:03:06JinShilI tried const s = "Hello" follwed by addr(s[0])
04:03:15JinShilBut I get "expression has no address"
04:05:26Triplefoxit does that with const declarations although i don't know the exact reasons
04:06:02JinShilHow about something equivalent to addr("Hello"[0])
04:06:03JinShil?
04:06:31*yglukhov_____ quit (Ping timeout: 256 seconds)
04:06:32MrOrdinaireVarriount: can you put that as a comment on the github issue #1832? I am going to work now. Talk to you later.
04:07:37VarriountBye. Thanks for all the help MrOrdinaire
04:08:13Triplefoxthe closest i know of is to use var, however i doubt that's exactly what you want
04:09:19*MrOrdinaire left #nim (#nim)
04:09:32JinShilTriplefox, that would be ok, but it seems to do a string copy on assignment. Since I'm targeting a very resource constrained platform, I want to try to elminate such things.
04:11:08Triplefoxthere might a pragma that lets you get at literals...it's way out of my knowledge though
04:13:06JinShilI wonder if the inability to get the address of a string literal is a bug. It should be stored in the rodata segment, so there should be a valid address for it.
04:16:07*z1y quit (Remote host closed the connection)
04:16:36*z1y joined #nim
04:24:13JinShilvar s: cstring = "Hello" addr(s[0]) seems to do well enough. I think anyway. Still trying to get other things to build.
04:27:38Triplefoxyeah, maybe ask araq about it when he's awake. either there's a way to force it or a different equivalent idiom
04:27:44Triplefox(or it's an oversight)
04:30:20VarriountJinShil: You can mark a string with the shallow proc, or use shallowAssign, to prevent the copy on assignment
04:31:24VarriountJinShil: What environment are you targetting?
04:33:11JinShilWell, at first I'll be targetting ARM Cortex-M.
04:33:37JinShilBut I may also try and AVR microcontrollers.
04:34:54JinShilRight now I'm just exploring to see what can be done using my PC.
04:35:10VarriountJinShil: Well, I'm reasonably sure that compilation and such should work. I know we have at least one build target running that tests on an armv6 or v7 architecture.
04:35:59JinShilVarriount: That's encouraging to hear.
04:38:46*jefus__ joined #nim
04:42:22*jefus_ quit (Ping timeout: 245 seconds)
04:48:41JinShilOk, I'm making progress (Thanks for the help everyone), but I'm still hitting some roadblocks. Please check out this simple nim code: http://pastebin.com/PhME0hLC
04:49:04JinShilIt generates this C code: http://pastebin.com/6vRbuuSs
04:49:33JinShilAm I doing something wrong in the assembly syntax? The C code doesn't look right.
04:49:41JinShilAnd I know this assembly code works.
04:51:57*ARCADIVS joined #nim
04:56:16*BitPuffin quit (Ping timeout: 265 seconds)
05:15:51*z1y quit (Ping timeout: 264 seconds)
05:29:54*kniteli quit (Ping timeout: 244 seconds)
05:32:44gmpreussneri have a compile time check of the form: when not defined(android). the compiler warns: Warning: undeclared conditional symbol; use --symbol to declare it: android [User]. how do i fix that? obviously, i DONT want to define 'android'
05:39:38*gsingh93 joined #nim
05:44:01JinShilWell, I finally got it to work, but had to put my asm on on one line. My hello world is now 2.5K. If I use similar techniques with C, I can get it down to 1.6K. Regardless I'm satisfied.
05:44:13JinShilI have to go now. Thanks everyone for the help.
05:45:06*JinShil quit (Quit: Konversation terminated!)
05:51:13*yglukhov_____ joined #nim
05:53:10dv-BBS, or Bodu Bala Sena, otherwise known as Buddhist Power Force, is a Buddhist supremacist group accused of stirring sectarian hatred in Sri Lanka.
05:55:53*yglukhov_____ quit (Ping timeout: 256 seconds)
05:56:06*z1y joined #nim
06:00:18gmpreussnerflaviu: you around?
06:04:58*JinShil joined #nim
06:17:14*ARCADIVS quit (Quit: ARCADIVS)
06:48:05*JinShil quit (Quit: Konversation terminated!)
06:51:17*JinShil joined #nim
06:51:34*kapil__ quit (Quit: Connection closed for inactivity)
06:53:03*yglukhov_____ joined #nim
06:55:38*yglukhov_____ quit (Read error: Connection reset by peer)
06:56:00*yglukhov_____ joined #nim
07:01:59*kapil__ joined #nim
07:10:06*yglukhov_____ quit (Quit: Be back later ...)
07:13:15*JinShil quit (Remote host closed the connection)
07:14:14*gour joined #nim
07:23:35*infrashortfoo joined #nim
07:31:05*infrashortfoo quit (Remote host closed the connection)
07:38:57*repax joined #nim
07:45:52*bjz joined #nim
07:51:07*bjz quit (Ping timeout: 245 seconds)
07:52:03*BitPuffin joined #nim
07:56:38*BitPuffin quit (Ping timeout: 244 seconds)
08:01:57*yglukhov_____ joined #nim
08:03:57*infrashortfoo joined #nim
08:05:31*bjz joined #nim
08:09:52*EXetoC quit (Ping timeout: 245 seconds)
08:23:52*Sphax joined #nim
08:50:01*bjz quit (Read error: Connection reset by peer)
08:52:01*JinShil joined #nim
08:52:41*z1y quit (Ping timeout: 256 seconds)
08:53:49*z1y joined #nim
09:00:00*JinShil quit (Quit: Konversation terminated!)
09:01:18*bjz joined #nim
09:07:25*minciue joined #nim
09:07:29*khmm joined #nim
09:09:40*gokr_ quit (Read error: Connection reset by peer)
09:18:58*BlaXpirit joined #nim
09:25:39*khmm quit (Ping timeout: 245 seconds)
09:26:41reactormonkAraq, hey hey, don't go full Linus
09:31:03*khmm joined #nim
09:37:11*khmm quit (Ping timeout: 244 seconds)
09:39:58*khmm joined #nim
09:50:10*bjz quit (Read error: Connection reset by peer)
09:50:16*khmm_ joined #nim
09:50:18*khmm quit (Remote host closed the connection)
09:50:28*khmm_ quit (Read error: Connection reset by peer)
09:50:46*bjz joined #nim
09:50:49*khmm joined #nim
09:53:27*khmm quit (Remote host closed the connection)
09:57:59ekarlso-reactormonk: :P
10:00:59*z1y quit (Remote host closed the connection)
10:02:23*infrashortfoo quit (Read error: Connection reset by peer)
10:02:45*infrashortfoo joined #nim
10:04:35*khmm joined #nim
10:05:16*bjz quit (Read error: Connection reset by peer)
10:05:25*z1y joined #nim
10:15:46*khmm quit (Remote host closed the connection)
10:19:43Triplefoxwhich library should i use for 3d matrix game math
10:20:54*dyu joined #nim
10:24:42*bjz joined #nim
10:30:27*yglukhov______ joined #nim
10:31:38*yglukhov_____ quit (Ping timeout: 244 seconds)
10:36:47*MajorTennis joined #nim
10:36:52*bjz quit (Ping timeout: 240 seconds)
10:37:02*MajorTennis quit (Changing host)
10:37:02*MajorTennis joined #nim
10:40:54*gsingh93 quit (Quit: Connection closed for inactivity)
10:43:08*JinShil joined #nim
10:44:31*uyppp quit (Ping timeout: 255 seconds)
10:44:42*minciue_ joined #nim
10:45:04*minciue quit (Read error: Connection reset by peer)
10:45:05*minciue_ is now known as minciue
10:46:14*uyppp joined #nim
10:54:30*bjz joined #nim
11:05:22*bjz quit (Read error: Connection reset by peer)
11:06:05yglukhov______Triplefox: I've got a small port of glmatrix C lib here. https://github.com/yglukhov/nimx/blob/master/nimx/matrixes.nim
11:06:21yglukhov______This file doesn't have any dependencies.
11:06:48yglukhov______There's also a library among nimble packages
11:06:58Triplefoxthanks, i'm seeing a few vector math libraries
11:08:35kokozedmanhey guys ... how do I compile a nim program as a 32-bit binary in a 64-bit Ubuntu?
11:08:46kokozedmanI'm getting the usual error: size of array ‘assert_numbits’ is negative
11:08:57kokozedmanalready using --cpu:i386
11:09:47*VinceAddons joined #nim
11:16:37*gour_ joined #nim
11:19:52*z1y quit (Ping timeout: 240 seconds)
11:19:55*bjz joined #nim
11:20:27*gour quit (Ping timeout: 264 seconds)
11:20:31gokrkokozedman: See http://goran.krampe.se/2014/11/03/squeak-to-nim/
11:20:38gokrSearch down for "i386"
11:23:51*Demon_Fox quit (Quit: Leaving)
11:37:15*bjz quit (Ping timeout: 244 seconds)
11:38:03*Mimbus joined #nim
11:44:54*minciue quit (Quit: minciue)
11:48:27wtwwhen compiling the master branch of nim under FreeBSD I'm getting
11:48:28wtwcompiler/nimcache/cgen.o: In function `cgenwritemodules_592360':
11:48:30wtwcgen.c:(.text+0x22e30): undefined reference to `writemapping_203894'
11:48:50wtwis there something I can do about that?
11:51:36*bjz joined #nim
11:56:43kokozedmangokr: thanks, but I used --cpu:i386 --passC:-m32 --passL:-m32
11:57:10gokrkokozedman: Which is what I wrote in that article :)
11:57:21kokozedmangokr: :) ok
11:57:23kokozedmanthanks
11:57:33gokrI also wrote some other details that may be of interest.
11:57:56gokrLike making sure you also compile nimrtl.nim as 32 bits, see article.
11:58:27gokrYou need this if you need GC, which I guess you do :)
11:58:50gokrOh, may perhaps only be relevant for .so generation.
11:58:54*bjz quit (Read error: Connection reset by peer)
11:59:19kokozedmangokr: well, I compile to executable not .so, and it works without the nimrtl.nim thingy
11:59:30gokrYeah.
11:59:44kokozedmanbut I sure will try to remember that when creating a .so ... thanks for the pointer
12:03:10*yglukhov______ quit (Quit: Be back later ...)
12:05:25*yglukhov______ joined #nim
12:12:54BlaXpiritwhat would be an idiomatic way to translate something that uses values True, False, None
12:13:30BlaXpirit2 overloaded procs actually... nevermind
12:16:20*JinShil quit (Quit: Konversation terminated!)
12:16:51*JinShil joined #nim
12:29:16*bjz joined #nim
12:35:01*bjz quit (Read error: Connection reset by peer)
12:39:45*NimBot joined #nim
12:44:28*areckizb quit (Ping timeout: 246 seconds)
12:49:13*JinShil quit (Quit: Konversation terminated!)
12:54:20*BitPuffin joined #nim
13:02:51*z1y joined #nim
13:03:17*jefus__ is now known as jefus
13:04:44*bjz joined #nim
13:06:58*Trustable joined #nim
13:14:11*bjz quit (Ping timeout: 244 seconds)
13:23:35*bjz joined #nim
13:35:54*MrOrdinaire joined #nim
13:42:03*MrOrdinaire quit (Remote host closed the connection)
13:42:22*gokr quit (Quit: Leaving.)
13:43:02*MrOrdinaire joined #nim
13:48:52*MrOrdinaire quit (Remote host closed the connection)
13:50:15*MrOrdinaire joined #nim
13:51:34*kapil__ quit (Quit: Connection closed for inactivity)
13:53:13*bjz quit (Ping timeout: 264 seconds)
13:54:07*bjz joined #nim
13:55:32*MrOrdinaire quit (Remote host closed the connection)
13:57:47*MrOrdinaire joined #nim
13:59:22*gokr_ joined #nim
14:00:26gokr_I wonder if "Illegal type" can be made to be more informative
14:02:27*Trustable quit (Remote host closed the connection)
14:03:17*MrOrdinaire quit (Remote host closed the connection)
14:05:30*MrOrdinaire joined #nim
14:05:54*z1y quit (Remote host closed the connection)
14:06:27*z1y joined #nim
14:07:08MrOrdinaireAraq: do you have a favorite among the three proposed solutions?
14:07:33MrOrdinaireregarding https://github.com/Araq/Nim/pull/1896
14:08:04*bjz quit (Ping timeout: 264 seconds)
14:15:45renesacthe "asm" statement is compiler specific?
14:17:13*gokr_ quit (Ping timeout: 264 seconds)
14:21:59*MrOrdinaire quit (Remote host closed the connection)
14:22:19*MrOrdinaire joined #nim
14:22:57*MrOrdinaire quit (Remote host closed the connection)
14:23:04*jpoirier quit (Quit: Leaving)
14:24:56*bjz joined #nim
14:36:25*gmpreussner_ joined #nim
14:36:39*gmpreussner quit (Ping timeout: 256 seconds)
14:38:04*bjz quit (Ping timeout: 255 seconds)
14:39:04*jefus_ joined #nim
14:39:06gmpreussner_i'm having trouble linking to a dynamic library on Linux. the .so file is in /usr/lib, but i'm getting a runtime error on program startup that the lib couldn't be loaded. if i try to link statically with --dynlibOverride, gcc logs "error: libspnav.so: No such file or directory". do i have to configure anything else for this to work?
14:40:47*gokr joined #nim
14:41:01BlaXpiritgmpreussner_, hmmmm it's a bit hard to diagnose such things
14:41:07BlaXpiritwhat is the name of your library?
14:41:16*gokr1 joined #nim
14:41:33BlaXpiritlibspnav.so or is that a dependency
14:41:53*jefus quit (Ping timeout: 252 seconds)
14:45:39*gokr quit (Ping timeout: 264 seconds)
14:47:20*bjz joined #nim
14:56:13*gokr1 quit (Ping timeout: 264 seconds)
14:56:16gmpreussner_BlaXpirit: yes, that is the library. it has no dependencies other than libc.so
14:57:48*gokr joined #nim
14:58:04BlaXpiritgmpreussner_, there should be no problem
14:58:18gmpreussner_btw this is the very first time i'm trying to link anything on linux, so i may just be missing something non-Nim related?
14:58:25BlaXpiritmaybe your code is wrong, why not show it?
14:58:55gmpreussner_BlaXpirit: https://github.com/nimious/io-spacenav
14:59:13gmpreussner_the third party library was installed through pacman on ArchLinux
14:59:22gmpreussner_it does not ship with my code
14:59:39BlaXpiritgmpreussner_, maybe cdecl is needed?
15:00:45BlaXpiriti added cdecl, doesn't work even then
15:01:11gmpreussner_yeah, i think the problem is that the .so is not found (or perhaps rejected) in the first place
15:01:30BlaXpiritthere is no reason for it to be not found
15:01:57gmpreussner_the /usr/lib directory is not in PATH directory
15:02:08gmpreussner_maybe that is the problem
15:02:15gmpreussner_*not in PATH
15:02:33BlaXpiriti used a lib like that
15:02:36BlaXpiritexactly like that
15:03:12*irrequietus joined #nim
15:05:06gmpreussner_BlaXpirit: even if i copy the .so into my project directory, it doesn't find it
15:05:18BlaXpiritit doesn't find it even if it worked
15:05:36BlaXpiritat least we eliminated the possibility that the mistake is in your code
15:05:47gmpreussner_oh wait, i just made some progress
15:06:03gmpreussner_if i copy it to the root of my project (which is where Nim runs from) then it finds the lib
15:06:15BlaXpiritweird
15:06:52BlaXpiritare you sure you didn't just return to initial problem?
15:07:28ekarlso-is it ok to not include a packages versions / releases in GET /packages ?
15:08:33gmpreussner_BlaXpirit: i gotta go to work now. i will look into this some more this evening. if you have any other ideas, please lemme know!
15:08:34*gokr quit (Ping timeout: 245 seconds)
15:08:43BlaXpiritgmpreussner_, have no other ideas.
15:09:27ekarlso-noone cares for the packages crud ? :D
15:10:05BlaXpiritnoone is here
15:10:09ekarlso-:P
15:14:38ekarlso-is it a bad thing to use method() for stuff ?
15:19:58onionhammerfor what stuff?
15:21:12*bjz quit (Read error: Connection reset by peer)
15:32:57*gmpreussner__ joined #nim
15:33:16*bjz joined #nim
15:33:57*gmpreussner_ quit (Ping timeout: 252 seconds)
15:36:29*kniteli joined #nim
15:39:13*darkf quit (Quit: Leaving)
15:47:45*bjz quit (Read error: Connection reset by peer)
15:52:18*bjz joined #nim
15:54:46*jefus_ is now known as jefus
15:55:24*jpoirier joined #nim
15:55:53*EXetoC joined #nim
15:57:19*dyu quit (Quit: Leaving)
16:05:13*bjz quit (Read error: Connection reset by peer)
16:05:54*z1y quit (Remote host closed the connection)
16:06:30*gour_ is now known as gour
16:06:34*z1y joined #nim
16:08:21*z1y quit (Client Quit)
16:12:43*z1y joined #nim
16:15:24*bjz joined #nim
16:15:49*Trustable joined #nim
16:26:49samlhttp://nitlanguage.org/ is nit successor of nim?
16:27:31BlaXpiritno
16:27:41BlaXpirit"nin" is the successor of "nim"
16:28:55novistnit has "then" clause. what a disaster..
16:29:23*repax quit (Ping timeout: 240 seconds)
16:29:53novistand "end". they did it wrong
16:30:08BlaXpiritwhatever.
16:30:11novistthey should have made it "THIS_CLASS_TERMINATES_RIGHT_HERE_DO_YOU_SEE"
16:30:33novistnot like longer keywords break writs and kill puppies
16:30:41BlaXpirit... ruby
16:31:32novistanother fine example of horrible stuff yes
16:31:40BlaXpiritwhatever.
16:34:37*z1y quit (Ping timeout: 264 seconds)
16:38:50*jefus_ joined #nim
16:40:59*AMorpork is now known as BuyingMorpork
16:42:47*jefus quit (Ping timeout: 245 seconds)
16:46:46*gokr joined #nim
16:46:54*gokr quit (Read error: Connection reset by peer)
16:47:25*gokr joined #nim
16:58:37*yglukhov______ quit (Ping timeout: 264 seconds)
17:01:15*brson joined #nim
17:02:59*shodan45 joined #nim
17:03:34*Epic|gmpreussner joined #nim
17:03:52*gmpreussner__ quit (Ping timeout: 264 seconds)
17:09:05*bjz quit (Ping timeout: 256 seconds)
17:10:24*bjz joined #nim
17:11:10*infrashortfoo quit (Remote host closed the connection)
17:11:15*brson quit (Quit: leaving)
17:11:47*jefus_ is now known as jefus
17:12:03*willwillson joined #nim
17:13:33*infrashortfoo joined #nim
17:17:10*Matthias247 joined #nim
17:18:09*infrashortfoo quit (Ping timeout: 256 seconds)
17:23:59*bjz quit (Ping timeout: 265 seconds)
17:27:32ldleworkdtscode: sup
17:29:46*shodan45 quit (Quit: Konversation terminated!)
17:29:54*shodan45 joined #nim
17:37:11*vendethiel- joined #nim
17:39:01*BuyingMorpork is now known as AMorpork
17:40:16*jpoirier quit (Quit: Page closed)
17:40:46*vendethiel quit (Ping timeout: 255 seconds)
17:41:09*vendethiel joined #nim
17:42:03*vendethiel- quit (Ping timeout: 264 seconds)
17:45:50*Sphax quit (Quit: ZZZZZzzzzz)
17:45:50ldleworkAraq: so can you remind me what the reason for crashing unless -d:release is provided?
17:49:38*infrashortfoo joined #nim
17:53:06*bjz joined #nim
17:54:16*Sergio965 joined #nim
17:55:36*MajorTennis quit (Quit: Leaving)
17:57:14*infrasho_ joined #nim
17:58:21*yglukhov______ joined #nim
17:58:46*Varriount|Busy joined #nim
17:59:17*infrash__ joined #nim
17:59:17*brson joined #nim
17:59:31*infrashortfoo quit (Ping timeout: 252 seconds)
18:01:55*infrasho_ quit (Ping timeout: 255 seconds)
18:02:45*infrashortfoo joined #nim
18:03:52*gmpreussner joined #nim
18:04:10*Epic|gmpreussner quit (Ping timeout: 255 seconds)
18:05:40*infrash__ quit (Ping timeout: 264 seconds)
18:06:26*infrasho_ joined #nim
18:07:55*infrash__ joined #nim
18:09:12*infrashortfoo quit (Ping timeout: 244 seconds)
18:09:23*infrashortfoo joined #nim
18:11:21*infrasho_ quit (Ping timeout: 265 seconds)
18:11:21*infras___ joined #nim
18:12:18*infrash__ quit (Ping timeout: 244 seconds)
18:14:15*infrashortfoo quit (Ping timeout: 265 seconds)
18:17:13*infras___ quit (Ping timeout: 264 seconds)
18:20:06*enquora joined #nim
18:24:23*bjz quit (Ping timeout: 240 seconds)
18:25:33*bjz joined #nim
18:26:35*Matthias247 quit (Read error: Connection reset by peer)
18:29:49*irrequietus quit (Ping timeout: 255 seconds)
18:36:02*bjz quit (Read error: Connection reset by peer)
18:38:30*vendethiel quit (Quit: q+)
18:41:57*SplinterOfChaos quit (Ping timeout: 245 seconds)
18:41:58ldleworkquiet in here today
18:43:15renesacyeah
18:43:27renesacI can't install c2nim via nimble
18:43:50renesacit gives the following compilation error: postprocessor.nim(18, 25) Error: type mismatch: got (PIdent) but expected one of: renderer.isKeyword(s: string): bool
18:44:35BlaXpiritrenesac, that's a relatively minor problem :p
18:44:54BlaXpiritrenesac, i saw in commit history something that says it now only works with latest devel
18:45:02BlaXpiritalso i heard yesterday that devel is broken
18:45:04BlaXpiritso yeah
18:45:11renesacminor problem...
18:45:24BlaXpiritwell i have "llstream not found"
18:45:50BlaXpiritrenesac, u can also get an earlier commit of c2nim
18:46:22renesacI know @#HEAD
18:46:34BlaXpiritthat's ... not what u want
18:46:38BlaXpiritit's head anyway
18:46:53renesacwell, that @#HEAD allowed me to install aporia
18:47:37BlaXpiritok but that's because aporia has tags
18:47:41BlaXpiritc2nim does not have tags
18:47:49renesachum
18:47:49BlaXpiritso it always goes for head anyway
18:47:54renesacright
18:47:56BlaXpiritso i suggest u try @#1625c5ab7781a8cc9798edebc05276a654985444
18:48:47renesacfails saying it's an empty git directory
18:49:25renesacshould I try to update to the last nim devel compiler?
18:49:36renesacor is it really seriously broken?
18:49:36BlaXpirit[:45:01] <BlaXpirit> also i heard yesterday that devel is broken
18:49:40BlaXpiriti have no idea though
18:49:52BlaXpiriti gave up on c2nim
18:50:10*Sphax joined #nim
18:50:31Varriount|BusyBlaXpirit: Hm?
18:50:37BlaXpiritHm?
18:51:04renesacI have a bunch of C code with inline assembly here and hoped it could translate most of it to nimrod style
18:51:21*bjz joined #nim
18:51:25renesacnot sure if it is supported by c2nim though
18:51:31Varriount|Busyrenesac: Are you running Windows? I might have a c2nim binary on my system.
18:51:43Varriount|BusyAlthough, I'm away from my desktop...
18:51:48renesacI'm on linŭ
18:51:51renesaclinux
18:51:58Varriount|Busy:<
18:52:24renesacwell, it is not urgent
18:52:27BlaXpiritVarriount|Busy, do u maybe know how to get a previous commit?
18:52:32renesacI imagine that the devel won't stay broken for long
18:52:39BlaXpiritI don't know the syntax for it
18:52:44BlaXpiritmaybe # is not needed
18:53:01BlaXpirityeah, actually, renesac, try that commit i gave you without # symbol
18:53:04Varriount|BusyBlaXpirit: I use a GUI frontend for git. If I recall correctly, you use revision hashes
18:53:05renesacBlaXpirit: it seems to be needed
18:53:17renesac"unexpected char in version range"
18:53:24def-BlaXpirit: i always just used "git checkout hash && nimble install"
18:53:41BlaXpiritthat's actually an OK option
18:53:48BlaXpiritbut with modification
18:54:00BlaXpiritwell ok
18:54:23renesacI like that nimble downloads all those projects into a defined folder
18:54:26BlaXpiritjust that nimble says it can install a specific commit
18:54:32renesacI would need to go there to execute that command, right?
18:54:51BlaXpirityes, or download it yourself...
18:55:11def-renesac: no, i don't think so. nimble doesn't check out the entire repo
18:55:28def-from what i see
18:55:49renesachum
18:56:01renesacanyway, I think I will wait the devel compiler be unbroken
18:56:07BlaXpiritmaybe it is unbroken
18:57:24ldleworkdon't think so
18:57:40reactormonkSo, how do I use the compiler tests again to see if my changes break something?
18:59:28gmpreussner|workVarriount|Busy: do you know anything about linking third party libs on Linux? i'm having some trouble :/
19:01:47def-gmpreussner|work: always worked for me. what's going wrong?
19:11:58Varriount|Busygmpreussner|work: No idea.
19:12:18Varriount|Busygmpreussner|work: Nim, by default, uses dynamic library loading.
19:14:26BlaXpiritgmpreussner's problem was that libspnav.so wouldn't load
19:14:36BlaXpiriti made this example https://bpaste.net/show/91c3f73711c8 and it doesn't load for me either
19:17:32gmpreussner|workperhaps it's a problem with the library
19:18:30gmpreussner|workwhat's strange is that the error is that the file could not be found, both when linking dynamically or statically
19:18:39BlaXpiritgmpreussner|work, umm no?
19:18:45BlaXpiritit doesnt say file could not be found
19:19:19gmpreussner|workgcc said something along the lines of 'no such file or directory'
19:19:33*EXetoC quit (Quit: WeeChat 1.0.1)
19:19:35gmpreussner|workyou're right, the dynamically linked version shows 'could not load' on startup
19:19:37BlaXpiritgmpreussner|work, maybe when you started doing some shenanigans
19:20:03gmpreussner|workif i copy the .so into the directory that Nim is running from, then it can link the .so
19:21:53gmpreussner|workalthough then i get messages for unresolved X11 symbols
19:22:08gmpreussner|worki think another possibility is that the library was compiled with X11 support enabled, and that something X11 related is missing
19:22:19gmpreussner|workperhaps the messages we see are just misleading
19:22:27BlaXpirityeah, it's werid
19:22:47BlaXpiritah what the heck, i'm gonna try to link it from C and see
19:22:56gmpreussner|workthanks :)
19:23:32BlaXpirityup, getting undefined references
19:23:45BlaXpiritso the lib depends on X11 but doesn't have it as dependency in .so
19:23:49BlaXpiritor somerthing like that
19:24:10BlaXpiritso basically to make it work i used
19:24:12BlaXpirit -lspnav -lX11
19:24:30BlaXpiriti dont know how to give this additional dependency to Nim, but hopefully someone does
19:24:38def--passL:-lX11
19:24:48def-i think
19:25:58*alexruf joined #nim
19:32:56gmpreussner|workawesome, thanks BlaXpirit!
19:33:33*gmpreussner_ joined #nim
19:33:56*gmpreussner quit (Ping timeout: 244 seconds)
19:35:27*gokr quit (Quit: Leaving.)
19:39:12renesacwell, I managed to install c2nim updating to the last devel compiler
19:39:29*Sphax quit (Quit: ZZZZZzzzzz)
19:39:44renesacbut it is useless, it complains about missing ';' in every function definition
19:40:12BlaXpirit:|
19:40:55renesacok, he don't likes "static"
19:41:28renesacnor __inline__
19:41:57renesacand now "Error: '*' expected"
19:42:13BlaXpiritwe get it
19:42:18renesacrefering to the asm block
19:42:32renesacis it normal?
19:42:39renesacor it is broken?
19:42:41BlaXpiritbroken is broken
19:42:45*Sphax joined #nim
19:42:48renesac:/
19:43:12*goobles joined #nim
19:44:10*goobles quit (Client Quit)
19:47:09*vendethiel joined #nim
19:48:45*Sphax quit (Quit: ZZZZZzzzzz)
19:49:44BlaXpiritno, i don't get it for real
19:50:52*rpag joined #nim
19:52:32BlaXpirithttps://github.com/BlaXpirit/nim-csfml/blob/v2.1.0/src/csfml_graphics_gen.nim#L4175 vs https://github.com/LaurentGomila/CSFML/blob/2.1/include/SFML/Graphics/VertexArray.h#L124
19:52:46ekarlso-so, if you declare a proc foo and a proc bar below but call bar from foo u get a unknown identifier ?
19:52:50*Sphax joined #nim
19:53:03BlaXpiritcalling append causes garbage items to appear in VertexArray, but same code works in C
19:53:19willwillsonekarlso-: use a forward declaration
19:53:33BlaXpiritekarlso-, haven't read the tutorial yet, eh?
19:53:43ekarlso-BlaXpirit: I have part 1
19:54:01BlaXpirit http://nim-lang.org/tut1.html#forward-declarations :|
19:54:02ekarlso-missed that part though :(
19:54:17BlaXpiriti've read the stuff like 3 times
19:55:16ekarlso-think i'll do that too before continuing :P
19:56:20BlaXpiritgoddammit something is wrong
19:57:31BlaXpirithow can this function signature https://github.com/BlaXpirit/nim-csfml/blob/v2.1.0/src/csfml_graphics_gen.nim#L4175 cause such code: Dl_106214(triangle_110022, (&v1_110028));
19:59:05*BlaXpirit_ joined #nim
19:59:10BlaXpirit_I just disconnected
20:00:14BlaXpirit_so is this gonna be yet another nim bug
20:01:53*BlaXpirit quit (Ping timeout: 240 seconds)
20:03:45BlaXpirit_whom can I annoy about C FFI?
20:09:17arekzbBlaXpirit: did you auto-generate this file? csfml_graphics_gen.nim or did you hand write it ?
20:09:48*Sphax quit (Quit: ZZZZZzzzzz)
20:10:09BlaXpirit_arekzb, I generated
20:10:32BlaXpirit_readmes contain some information
20:11:19willwillsoncould you use {.bycopy.} maybe?
20:11:32BlaXpirit_bycopy, eh
20:11:39BlaXpirit_that.... is probably it
20:11:51BlaXpirit_it might be the only struct that is just large enough to cause this stuff
20:12:05willwillsonisn't it anything larger than a pointer?
20:12:09BlaXpirit_but it's not supposed to be that way because this is cimport
20:12:32BlaXpirit_but thanks for extremely valuable input, willwillson
20:12:38BlaXpirit_i'm gonna report it anyway
20:13:02willwillsondidn't someone ask from a bycopy annotation at the call site (think it was on the forum)
20:13:15BlaXpirit_?
20:13:45willwillsoni remember sonce feature request... myabe it it was on the proc declaration
20:14:04BlaXpirit_willwillson, aaaand it immediately works
20:14:19BlaXpirit_thank you very much
20:14:26BlaXpirit_i think i'm very lucky that someone noticed this
20:15:17willwillsonnice binding by the way :D
20:15:21BlaXpirit_thx
20:15:57arekzbwillwillson: I see the manual entry on .bycopy., can you expand on why you thought it work in this instance ?
20:19:14*Sphax joined #nim
20:19:35*gokr joined #nim
20:19:55*rpag quit (Quit: Leaving)
20:23:08*Sergio965 quit (Quit: Bye! :))
20:23:53arekzbI see the forum post about someone else's fix with .bycopy. here: http://forum.nimrod-lang.org/t/702 . I'm still not sure on what is happening
20:24:10BlaXpirit_ok thx, arekzb
20:24:51BlaXpirit_so i will have to scan issues then
20:25:14willwillsonarekzb: his vertex object was being passed by reference, the c function signature showed it needed to be passed by value
20:25:46BlaXpirit_not only that, but the function signature itself came out wrong, with a pointer
20:25:57BlaXpirit_(well i guess it wouldn't compile otherwise)
20:32:04*Varriount|Busy quit (Ping timeout: 246 seconds)
20:32:16wtwwhen compiling the master branch of nim under FreeBSD I'm getting
20:32:20arekzbok, BlaXpirit: so did you add a {.bycopy.} on your object definition and did you adjust the append procedure ?
20:32:22wtwcompiler/nimcache/cgen.o: In function `cgenwritemodules_592360':
20:32:22wtwcgen.c:(.text+0x22e30): undefined reference to `writemapping_203898'
20:32:22wtwcollect2: error: ld returned 1 exit status
20:32:30BlaXpirit_arekzb, i didnt adjust anything
20:32:30wtwsomething i can do about that?
20:32:35BlaXpirit_just added bycopy to every objecty
20:32:48arekzboh,
20:32:51arekzbI see
20:33:10BlaXpirit_arekzb, do you understand what's happening?
20:33:16BlaXpirit_because i sure do now
20:33:20*gmpreussner__ joined #nim
20:33:23arekzbI'm almost there
20:33:37*gmpreussner_ quit (Ping timeout: 245 seconds)
20:33:47BlaXpirit_it just generates function with a pointer as if it was a normal function on a normal object without bycopy
20:38:40arekzbok, I think i see now. you added bycopy to all the objects like CircleShape, VertexArray etc. and then the generated procedures in don't use pointer notation
20:39:17BlaXpirit_i didnt add it to VertexArray, no
20:39:23*bjz quit (Ping timeout: 240 seconds)
20:39:23BlaXpirit_just to Vertex and all CSFML structs
20:39:42BlaXpirit_ok basically i added bycopy to objects, but not to ptr objects
20:40:00BlaXpirit_because they actually must not be bycopy
20:40:39*bjz joined #nim
20:40:45arekzbok now I see
20:43:51BlaXpirit_https://github.com/Araq/Nim/issues/1908
20:45:21*irrequietus joined #nim
20:45:50arekzbneat
20:48:55*irrequietus quit (Remote host closed the connection)
20:49:47Varriountarekzb: Did you get my comments from yesterday?
20:50:20Varriount(You were the one who wanted a critique on the string matching procedure, right?
20:50:30arekzbVarriount: yes, thank you for the input
20:51:09arekzbi have made some adjustments on local repo and I'm still profiling using the nim profiler
20:51:36*irrequietus joined #nim
20:52:02arekzbi'm benchmarking that code against Lua and C++, it is very comparable
20:52:05*bjz quit (Read error: Connection reset by peer)
20:52:07*bjz_ joined #nim
20:52:55Varriountarekzb: If you want any reviews on newer versions of the code, feel free to ask.
21:00:18*nande joined #nim
21:02:34*repax joined #nim
21:09:26*gour quit (Quit: Leaving)
21:14:47*Sphax quit (Quit: ZZZZZzzzzz)
21:15:35*meanfish quit (Ping timeout: 256 seconds)
21:16:39*repax quit (Quit: repax)
21:18:24*bjz_ quit (Ping timeout: 265 seconds)
21:19:12*Sphax joined #nim
21:28:59*Demon_Fox joined #nim
21:29:16*shodan45 quit (Quit: Konversation terminated!)
21:34:42*sepisoad joined #nim
21:34:45*z3744817276842 quit (Remote host closed the connection)
21:38:06*jpoirier joined #nim
21:42:40*rpag joined #nim
21:44:11sepisoadis there a debugger for nim?
21:46:15BlaXpirit_gdb :|
21:46:15ldleworksepisoad: gdb I hear
21:49:01*sepisoad quit (Ping timeout: 256 seconds)
21:51:08*Matthias247 joined #nim
21:52:37renesacyou guys could have linked this discussion about debugger: http://forum.nimrod-lang.org/t/680
21:55:53*BitPuffin quit (Ping timeout: 240 seconds)
21:57:28flaviuBlaXpirit_: GDB isn't that bad
21:57:38BlaXpirit_:|
21:57:43flaviuAs I keep saying, the hardest part is just getting started
21:58:00BlaXpirit_it's bad enough that it's much easier to do by hand
21:58:52flaviuPrint out a cheat sheet and you'll get the hang of it quickly
21:59:19Araqthere are lots of frontends available for gdb
21:59:45Araqrenesac: learn about #def for c2nim, I'm using it to wrap thousands of lines of C++ code
21:59:56flaviuYep, use one of those if you're not l33t h@x0r enough for gdb :P
22:00:07ldleworklol
22:00:26Araqbut yeah it's "broken". lol. works much better than any comparable tool.
22:00:43*Varriount|Mobile joined #nim
22:01:21*sepisoad joined #nim
22:03:55*Epic|gmpreussner joined #nim
22:04:05*gmpreussner__ quit (Ping timeout: 252 seconds)
22:06:27*BitPuffin joined #nim
22:08:30AraqEpic|gmpreussner: --symbol:foo is not --define:foo
22:08:47Araqbut this warning will disappear in the next version anyway
22:09:05Araqwas only for transition of existing code to the new defined vs declared split
22:14:18*brson quit (Quit: Lost terminal)
22:14:27*brson joined #nim
22:16:50*leavengood joined #nim
22:18:46*sepisoad quit (Quit: Leaving)
22:19:38*alexruf quit (Quit: Textual IRC Client: www.textualapp.com)
22:19:46kokozedmanat this stage ... what are the flags to produce a final binary without any checks and optimized for speed?
22:20:07kokozedmanI used: -d:release --opt:speed --checks:off
22:20:07def--d:release
22:20:11kokozedmanthose enough?
22:20:47kokozedmandef-: are --opt and --checks still relevant?
22:20:47def--d:release implies --opt:speed and --checks:off
22:20:56kokozedmanoh, ok
22:20:59def-you can see it in config/nim.cfg
22:21:03def--d:release is defined there
22:21:32kokozedmanok, thank
22:21:35kokozedmanthanks*
22:23:24def-if it's still too slow, I'm always interested in investigating why
22:24:31gmpreussner|workAraq: ah, thanks for clarifying!
22:37:15wtwsry for reposting: I get the following error when doing ./koch boot -d:release on FreeBSD
22:37:18wtwcompiler/nimcache/cgen.o: In function `cgenwritemodules_592360':
22:37:20wtwcgen.c:(.text+0x22e30): undefined reference to `writemapping_203898'
22:37:23wtwcollect2: error: ld returned 1 exit statu
22:37:28wtwanybody knows a cure? :)
22:40:58BlaXpirit_wtw, a few days ago i heard that a guy had to use an old version of nim, that was ported to freebsd. that may mean nim doesn't normally work on freebsd
22:41:56wtwi suppose that guy was me, I'm on 0.9.2 currently because this is the latest available version
22:42:03BlaXpirit_oh :p
22:42:07wtw:)
22:42:28wtwhowever, I found some mentioning of freebsd in various build files so I supposed there must be some way
22:43:08*rpag quit (Quit: Leaving)
22:43:10def-wtw: what compiler are you using?
22:43:14def-c compiler*
22:43:32wtwclang, but gcc exhibits the same problem
22:43:54wtwbut clang is the default on freebsd
22:44:32*Matthias247 quit (Read error: Connection reset by peer)
22:44:44BlaXpirit_wtw, make sure to try both master and latest release
22:44:50BlaXpirit_i can't help :|
22:44:59wtwok I haven't tried latest before, but will
22:45:17wtwstrangely, the compiling seems to work fine, only the linking step fails
22:53:54def-wtw: strange, where does writemapping come from?
22:55:04def-ah, it should be from compiler/nimcache/extccomp.c
22:58:08wtwah, I have a N_NIMCALL(void, writemapping_203894)
22:58:29wtwthe number doesn't match, the linker is missing writemapping_203898
22:58:34def-ok, somehow the number became wrong, strange
23:00:23wtwfunny how this generated code looks :D
23:00:27wtw 6 if (!!(((gglobaloptions_169118 &(1<<((((NU8) 12))&31)))!=0))) goto LA3;
23:02:44wtwI just renamed the writemapping_203894 to writemapping_203898
23:02:54wtwnow it's missing writemapping_203894...
23:03:08def-nim will probably overwrite the file if you just run it again
23:03:32def-koch*
23:03:34*gokr quit (Ping timeout: 245 seconds)
23:04:01wtwmy change is still there but apparently something else goes wrong
23:04:07*gmpreussner joined #nim
23:04:22def-i guess you should've done the change the other way around
23:04:25*Epic|gmpreussner quit (Ping timeout: 244 seconds)
23:05:34wtwi.e.? :)
23:05:48def-writemapping_203898 to writemapping_203894
23:06:19BlaXpirit_lol what
23:06:40*gsingh93 joined #nim
23:07:07*BlaXpirit_ quit (Quit: Quit Konversation)
23:07:23*BlaXpirit joined #nim
23:08:02wtwdid the change on the "other side" (cgen.c)
23:08:25*gokr joined #nim
23:08:25wtwnow it's missing writemapping_203898
23:08:34wtwarg :/
23:08:34def-alright, no idea
23:08:48wtwthanks anyway
23:12:06BlaXpiriti'm pretty sure if u fixed this one tiny thing, 100 more would come afterwards
23:13:09wtwyeah, quite likely :/
23:17:53BlaXpiritwhere the heck is fowl though
23:32:18*yglukhov______ quit (Quit: Be back later ...)
23:32:52Araqwtw: dunno why it fails on FreeBSD for you. likely some config is weird for "koch csources"
23:33:09AraqI will have a look later
23:36:22wtwtell me if/how I can help, I'll be away (in bed) now, however ;)
23:38:00wtwI'd also be willing to "adopt" the nim port for freebsd if the current maintainer doesn't want to continue, but I'll talk to him some time soon
23:38:21Araqyeah good, I was about to suggest that
23:42:07*JinShil joined #nim
23:42:35*Var|Mobile joined #nim
23:43:22*yglukhov______ joined #nim
23:46:32*Varriount|Mobile quit (Ping timeout: 245 seconds)
23:47:49*yglukhov______ quit (Ping timeout: 244 seconds)
23:49:31*BlaXpirit quit (Quit: Quit Konversation)
23:56:01onionhammerso araq... how about adding that new new syntax to system.nim :P
23:57:15Araqnah. it solves no problem whatsoever
23:57:22onionhammerit's sugar
23:58:11onionhammerusing new() right now is a pain imo
23:58:49ldleworkonionhammer: the one where you can initialize fields when creating a ref type?
23:59:12onionhammerldlework when using a non-ref type
23:59:27onionhammerif you have a ref type you can just use myrefType(field: 5)
23:59:35ldleworkwait really?
23:59:47ldleworkjsudlow: go refactor our game