00:02:24 | * | irrequietus quit () |
00:05:36 | * | pregressive joined #nim |
00:45:06 | * | brson quit (Remote host closed the connection) |
01:06:25 | * | NimBot joined #nim |
02:16:46 | * | vendethiel joined #nim |
02:17:06 | * | vl409 joined #nim |
03:03:09 | * | NimBot joined #nim |
03:04:10 | * | vl409 quit (Ping timeout: 246 seconds) |
03:08:43 | * | BitPuffin|osx quit (Ping timeout: 260 seconds) |
03:17:12 | * | strcmp2 joined #nim |
03:20:21 | * | strcmp1 quit (Ping timeout: 255 seconds) |
03:22:50 | Demos | what's the status of destructors? |
03:29:28 | * | yglukhov joined #nim |
03:33:45 | * | yglukhov quit (Ping timeout: 244 seconds) |
03:36:43 | * | vendethiel quit (Ping timeout: 246 seconds) |
03:42:19 | * | kilon joined #nim |
03:45:30 | * | pregressive quit (Remote host closed the connection) |
03:46:04 | * | pregressive joined #nim |
03:46:52 | * | kilon quit (Remote host closed the connection) |
03:46:58 | * | darkf joined #nim |
03:50:58 | * | pregressive quit (Ping timeout: 272 seconds) |
04:14:59 | * | NimBot joined #nim |
04:29:03 | * | asdasd quit (Ping timeout: 246 seconds) |
04:40:16 | * | Shoozza joined #nim |
05:14:25 | * | NimBot joined #nim |
05:15:18 | * | Jehan_ joined #nim |
05:20:25 | * | Jehan_ quit (Quit: Leaving) |
05:43:06 | * | dalarmmst joined #nim |
05:58:18 | * | EXetoC joined #nim |
06:00:10 | * | darkf_ joined #nim |
06:00:12 | * | Demos_ joined #nim |
06:03:05 | * | darkf quit (Ping timeout: 244 seconds) |
06:03:36 | * | Demos quit (Ping timeout: 244 seconds) |
06:04:32 | * | EXetoC quit (Quit: WeeChat 1.2) |
06:10:41 | * | darkf__ joined #nim |
06:10:59 | * | Demos__ joined #nim |
06:12:49 | * | xificurC joined #nim |
06:13:55 | * | Demos_ quit (Ping timeout: 244 seconds) |
06:13:56 | * | darkf_ quit (Ping timeout: 244 seconds) |
06:15:30 | * | xificurC quit (Client Quit) |
06:22:54 | ekarlso | Ddomaround ? |
06:22:56 | ekarlso | dom96: .. |
06:42:08 | * | NimBot joined #nim |
06:50:20 | * | gokr joined #nim |
06:59:07 | * | jszymanski joined #nim |
07:03:34 | * | darkf__ is now known as darkf |
07:07:15 | * | Ven joined #nim |
07:23:30 | * | yglukhov joined #nim |
07:31:41 | * | jszymanski quit (Quit: bye) |
07:32:05 | * | Demon_Fox quit (Quit: Leaving) |
07:32:51 | * | yglukhov quit (Remote host closed the connection) |
07:41:09 | * | xificurC joined #nim |
07:43:56 | * | yglukhov joined #nim |
07:49:05 | * | yglukhov quit (Remote host closed the connection) |
07:49:21 | * | strcmp2 quit (Quit: Leaving) |
07:52:00 | * | wuehlmaus joined #nim |
07:56:20 | * | Trustable joined #nim |
07:56:30 | * | Trustable quit (Remote host closed the connection) |
07:57:35 | * | Trustable joined #nim |
07:59:48 | * | Raimondii joined #nim |
08:01:10 | * | Raimondi quit (Ping timeout: 240 seconds) |
08:04:20 | * | Raimondii is now known as Raimondi |
08:07:15 | * | coffeepot joined #nim |
08:07:57 | * | yglukhov joined #nim |
08:20:56 | * | ^aurora^ joined #nim |
08:23:28 | * | NimBot joined #nim |
08:24:32 | * | strcmp1 joined #nim |
08:34:27 | * | filcuc joined #nim |
08:37:49 | NimBot | nim-lang/Nim devel bb1bf2b Yuriy Glukhov [+0 ±1 -0]: Corrected lib name for macos. |
08:37:49 | NimBot | nim-lang/Nim devel 3a01eab Andreas Rumpf [+0 ±1 -0]: Merge pull request #3244 from yglukhov/patch-1... 2 more lines |
08:39:49 | * | kilon joined #nim |
08:40:45 | * | xcombelle joined #nim |
08:42:10 | * | Kingsquee quit (Quit: http://i.imgur.com/EsXzoum.png) |
08:48:37 | * | kilon quit (Remote host closed the connection) |
08:49:12 | * | yglukhov quit (Remote host closed the connection) |
08:52:32 | * | dalarmmst quit (Ping timeout: 244 seconds) |
08:54:09 | NimBot | nim-lang/Nim devel 626226e rku [+0 ±1 -0]: {.compile.} pragma accepts paths relative to file pragma is in. |
08:54:09 | NimBot | nim-lang/Nim devel df0e1a5 rku [+0 ±3 -0]: Added fasm (external assembler) support. |
08:54:09 | NimBot | nim-lang/Nim devel 43bfda0 rku [+8 ±5 -0]: Coroutine support for i386/amd64 platforms unix/windows OSes markAndSweep/refCounting GCs. |
08:54:09 | NimBot | nim-lang/Nim devel 6a7a44b rku [+0 ±2 -0]: cValidAssemblers -> const set... 1 more lines |
08:54:09 | NimBot | 2 more commits. |
08:55:02 | * | filcuc quit (Remote host closed the connection) |
08:56:30 | * | strcmp1 quit (Ping timeout: 255 seconds) |
08:57:00 | * | filcuc joined #nim |
09:06:56 | NimBot | nim-lang/Nim devel 2130e9e Yuriy Glukhov [+0 ±1 -0]: Don't access GCed field in finalizer. Fixes #2305 |
09:06:56 | NimBot | nim-lang/Nim devel 0a1c572 Andreas Rumpf [+0 ±1 -0]: Merge pull request #3243 from yglukhov/gctest-fix... 2 more lines |
09:06:58 | federico3 | dom96: the mlist sync seems to be popular. People are asking for bidirectional sync now |
09:07:59 | nchambers | would that require creating a custom ml? |
09:08:10 | federico3 | custom in what way? |
09:08:27 | Xe | just have an email bot |
09:08:31 | Xe | they're not new tech |
09:08:36 | nchambers | as in rolling our own ml instead of the site gokr's using |
09:08:43 | Xe | nchambers: no |
09:08:48 | Xe | you just need a gmail account |
09:08:52 | gokr | hey |
09:08:57 | federico3 | no, any mlist would do |
09:09:10 | gokr | (client blinked since my nick was mentioned) |
09:09:14 | nchambers | obviously I don't know much of what I'm talking about |
09:09:28 | nchambers | gokr: we are discussing mailing list merging |
09:09:41 | gokr | Yeah, feel free to pick any solution :) |
09:09:45 | * | yglukhov joined #nim |
09:10:11 | nchambers | federico3: and Xe seem to have a pretty good idea picked out, so I'll shut up now :D |
09:10:13 | gokr | Just FYI, I have not been approving all those posts that don't have members on the ml |
09:10:26 | nchambers | if you want to give me access I'll approve them |
09:10:37 | Xe | gokr: can you add [email protected] to the list? |
09:10:39 | gokr | Well, is it the right thing to do? |
09:10:48 | nchambers | no idea |
09:10:56 | nchambers | just putting my services out there |
09:11:09 | federico3 | dom96: what happens if somebody without a forum account posts on the mlist? Do we create a forum account on the fly with a disabled password? |
09:11:22 | gokr | I mean, I will get swamped with all these approvals unless we do something |
09:12:05 | gokr | I got 24 of them sitting there now |
09:14:03 | * | yglukhov quit (Ping timeout: 252 seconds) |
09:17:13 | gokr | Xe: As subscriber? |
09:17:19 | Xe | gokr: yes please |
09:17:29 | gokr | sure |
09:17:31 | Xe | i forget how to sign up for mailing lists |
09:17:34 | Xe | i'm a 90's kid |
09:17:58 | gokr | Or just enter here and hit "Go!": http://www.freelists.org/list/nim-dev |
09:18:13 | nchambers | how to tell if someone is a 90's kid: don't worry they'll tell you |
09:19:13 | * | Ven quit (Ping timeout: 265 seconds) |
09:20:01 | Xe | gokr: I think i did it |
09:20:07 | Xe | nchambers: i actually am 22 lol |
09:20:32 | nchambers | :D I'm 19. welcome brother |
09:21:24 | gokr | God damn kids! :) |
09:21:45 | ekarlso | dont speak of age.. *turning 30 in 4,5 months* |
09:21:56 | gokr | 30? nuthin |
09:22:01 | Xe | gokr: h |
09:22:04 | nchambers | gokr was born with a silver oop in his hand |
09:22:11 | Xe | nchambers: sister* |
09:22:21 | gokr | A silver oop? |
09:22:38 | nchambers | its a play on the saying "silver spoon" |
09:22:49 | nchambers | Xe: you're female? my mistake |
09:22:52 | gokr | Yeah, just trying to figure out the meaning ;) |
09:23:15 | gokr | Xe: I was thinking Xena the warrior, right? |
09:23:44 | Xe | gokr: it stems from a joke a friend of mine made in passing |
09:23:47 | ekarlso | what editor do you guys use ? |
09:23:50 | Xe | ekarlso: vim |
09:23:51 | nchambers | gokr: I would wager you were in your mid 50's when programming was first invented |
09:23:54 | ekarlso | man I would love intellij with nim :p |
09:23:57 | nchambers | ekarlso: gedit/nano |
09:24:05 | gokr | nchambers: Ha! Nah... not THAT old. |
09:24:09 | Xe | learn vim |
09:24:14 | Xe | it got me hired where I work now |
09:24:23 | ekarlso | gokr: aint you up in your 50s? |
09:24:29 | gokr | Not yet :) |
09:24:31 | gokr | 46 |
09:24:38 | nchambers | jeezus gokr you're my parents age |
09:24:45 | Xe | nchambers: h |
09:24:57 | gokr | Xe: Was funny, I worked at a real Linux/Perl nest - and they were all hard core vimmers... |
09:25:14 | gokr | But they were spending AWFUL lot of time doing print debugging on the server. |
09:25:30 | gokr | So I spent 2 days setting up Komodo with remote debugging. Their jaws dropped. |
09:25:47 | gokr | So vim, sure - but just don't forget there are other tools out there ;) |
09:26:26 | gokr | Eh, I worked there as a consultant that is. |
09:27:09 | nchambers | perl vimmers. I can hear the beards rustling from here |
09:27:26 | Xe | wait nchambers is dtscode |
09:27:29 | ekarlso | ls |
09:27:29 | nchambers | yes |
09:27:31 | gokr | In fact, they were mostly young guns. |
09:27:33 | Xe | hi dtscode |
09:27:37 | nchambers | hi Xe |
09:27:44 | gokr | From all over the world too - 17 nations in one office. |
09:27:50 | Xe | oh yay |
09:27:53 | Xe | I still have the nick |
09:27:57 | * | Xe is now known as JohnMadden |
09:27:58 | JohnMadden | aeiou |
09:28:06 | nchambers | nice |
09:28:21 | * | gokr trying to recall the login at freelists... |
09:28:40 | * | JohnMadden is now known as Xe |
09:28:46 | nchambers | gokr: [email protected] |
09:28:59 | Xe | nchambers: you laugh all you want |
09:29:06 | * | yglukhov joined #nim |
09:29:13 | nchambers | at what? |
09:29:13 | Xe | but working on a brony IRC network helped get me hired where I work now as well |
09:29:20 | Xe | also |
09:29:25 | Xe | ircd is a maze of death |
09:29:28 | Xe | don't look into it |
09:29:34 | nchambers | I gave up actually :/ |
09:29:39 | Xe | good |
09:29:51 | Xe | i've been working from scratch in haskell |
09:29:52 | nchambers | also I don't laugh at bronies. I make fun of them to keep my friends humble |
09:31:15 | Xe | haskell is fun |
09:31:47 | * | yglukhov quit (Remote host closed the connection) |
09:34:54 | * | gokr1 joined #nim |
09:36:52 | * | gokr quit (Ping timeout: 246 seconds) |
09:37:04 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
09:41:24 | * | minus quit (Quit: Bye) |
09:41:32 | ekarlso | gokr1: can't you make a plugin for intellij |
09:42:30 | * | yglukhov joined #nim |
09:43:07 | Xe | ekarlso: so can you! |
09:43:20 | ekarlso | Xe: my plate is filled atm :p |
09:43:25 | ekarlso | alreay doing package stuff for nim |
09:43:34 | ekarlso | gonna try to cleanup the registry stuff and get that going |
09:44:13 | gokr1 | ekarlso: Intellij? Why me? |
09:44:33 | * | gokr1 is now known as gokr |
09:44:34 | ekarlso | gokr1: random.choice() |
09:44:36 | ekarlso | :P |
09:45:07 | gokr | https://xkcd.com/221/ |
09:45:24 | ekarlso | hah ;) |
09:46:09 | ekarlso | https://www.facebook.com/InfoQ/photos/a.10151028112312321.423930.75911537320/10153038356187321/?type=1 < what kind are you gokr ? :) |
09:46:42 | gokr | Second one. Of course. |
09:46:44 | gokr | ;) |
09:46:51 | ekarlso | omg :P |
09:46:56 | gokr | I am a Smalltalker, I hate wasted lines |
09:47:00 | ekarlso | that's good :)D |
09:47:07 | ekarlso | so annoying the first one |
09:47:31 | * | minus joined #nim |
09:47:33 | gokr | But you know, I am a different beast. |
09:48:07 | nchambers | more like a cat than a beast |
09:48:10 | nchambers | a small tiny kitty |
09:48:13 | Xe | nchambers: h |
09:48:46 | gokr | Got two cats, but Ron that's here sometimes - he has 8. |
09:49:16 | * | kilon joined #nim |
09:49:30 | gokr | What I mean is - that I am a Smalltalker. Like that guy that just popped in. |
09:50:34 | ekarlso | gokr: what you think of sometthing like gRPC in nim ? |
09:50:36 | ekarlso | www.grpc.io |
09:51:19 | gokr | pbuffer based |
09:51:40 | ekarlso | yeah and seems to be getting lots of traction |
09:52:03 | * | yglukhov_ joined #nim |
09:52:13 | gokr | I know too little of it. |
09:52:25 | * | yglukhov quit (Ping timeout: 240 seconds) |
09:54:01 | gokr | Its funny that these things tend to be reinvented over and over. |
09:54:24 | * | kilon quit (Ping timeout: 264 seconds) |
09:54:41 | Xe | mmhmm |
09:57:22 | gokr | Or googling says, ZeroMQ + MessagePack: http://www.zerorpc.io |
10:07:41 | ekarlso | gokr: yeah, except grpc is the only one that seems to use http2 |
10:08:13 | gokr | Is that good then? :) |
10:20:32 | * | Ven joined #nim |
10:24:09 | * | yglukhov_ quit (Remote host closed the connection) |
10:24:29 | Shoozza | Hello, is someone using sdl2 with him? I managed to compile the skel file but sdl2_gfx.dll is missing. |
10:24:43 | * | yglukhov joined #nim |
10:26:10 | flyx | Shooza: afaik sdl2_gfx doesn't have a binary distribution. did you download the source and compile it? |
10:27:14 | Shoozza | ah so that needs to be done manually |
10:28:34 | federico3 | zerorpc looks pretty nice actually |
10:30:45 | * | Jehan_ joined #nim |
10:31:52 | * | yglukhov quit (Remote host closed the connection) |
10:46:04 | * | yglukhov joined #nim |
10:50:23 | * | kilon joined #nim |
10:52:43 | drewsrem | gokr, remote debugging on Komodo? |
10:52:58 | gokr | yeah |
10:53:45 | gokr | I even helped making some scripts so that the users could "lock" the server - so many devs could cooperate debugging the same server. |
10:54:09 | drewsrem | How does that look like? |
10:54:19 | gokr | Debuggin Perl in Komodo? |
10:54:25 | drewsrem | You mean, debugging a live instance |
10:54:27 | drewsrem | Ah Perl |
10:54:36 | gokr | This was about Perl. |
10:54:41 | drewsrem | Right |
10:54:50 | * | kilon quit (Ping timeout: 260 seconds) |
10:54:54 | gokr | Just saying... vim ain't always the answer :) |
10:55:21 | drewsrem | I don't know really anything about Perl, so, maybe |
10:55:39 | drewsrem | It certainly won't help much with all the massive boilerplate languages like Java |
10:56:21 | drewsrem | Remote debugging like that doesn't sound like a job for a text editor anyway tho |
10:56:36 | Xe | & |
10:56:38 | drewsrem | Maybe if with SSH and tmux you could do similar things? - *shrug* |
10:56:39 | Xe | ^* |
10:57:30 | gokr | My whole point was that they were all so convinced that they had the perfect tool (vim) so they never even bothered to look around and see if there were indeed proper debuggers for Perl. Local or remote. |
10:57:46 | drewsrem | Ah yes, that sounds more like stubborn people |
10:57:50 | gokr | And this is a company with say 20 really sharp devs. |
10:58:33 | gokr | Well, I think the problem was ... "everyone doing things as it had always been done". |
10:58:41 | Xe | vim is but a part of a proper dev stack |
10:59:22 | * | keks_ joined #nim |
10:59:28 | gokr | They were very sharp - but also very focused on the task at hand, not considering the meta level (tooling). |
10:59:44 | drewsrem | gokr, yes I can see that, but also if you can use Vim somewhat it will work for pretty much anything, so you might just not care about anything beyond it, because it "suffices" for pretty much everything from the box, but it isn't in itself the "best" way |
10:59:44 | * | vendethiel joined #nim |
11:00:27 | drewsrem | Learning new IDE thingy usually is quite some initial investment you have to put into |
11:00:32 | * | rollo joined #nim |
11:00:37 | drewsrem | So these people probably will always default to what they're used to |
11:00:44 | gokr | And that is indeed the issue - but you need to know when you might need a different/other tool. |
11:00:47 | Xe | not to mention |
11:00:49 | * | yglukhov quit (Remote host closed the connection) |
11:00:57 | Xe | vim -> not vim is a huge leap if you are invested in vim |
11:01:17 | drewsrem | gokr, yup, Xe, yup |
11:01:20 | gokr | They wasted 1000s (literally) hours on print debugging and post mortem log file debugging this huge mess of a server side Perl system. |
11:02:26 | drewsrem | gokr, that is not to say that it always pays off trying something new, which is why it seems there's no general bullet proof answer to this, sometimes just using oldish tooling works as good, if not even better, sometimes it doesn't |
11:02:39 | Xe | why am I still awake |
11:04:44 | * | jszymanski joined #nim |
11:06:48 | drewsrem | Nim in vim is pure joy however |
11:08:51 | federico3 | Everything in vim is pure joy however |
11:08:58 | drewsrem | Not java |
11:09:52 | drewsrem | Not that Java can be joy anywhere else |
11:10:11 | drewsrem | But certainly less painful |
11:10:28 | * | ^aurora^ joined #nim |
11:10:57 | Jehan_ | Heh. :) |
11:11:11 | * | yglukhov joined #nim |
11:16:33 | * | Ven quit (Remote host closed the connection) |
11:18:40 | * | Ven joined #nim |
11:20:46 | * | BitPuffin|osx joined #nim |
11:23:11 | * | NimBot joined #nim |
11:25:00 | * | vendethiel quit (Ping timeout: 245 seconds) |
11:28:37 | ekarlso | hmm |
11:29:02 | ekarlso | var buf: ptr array[0..512, char]; readBuffer(file, buf, 512) < that wrong ? |
11:31:09 | * | keks_ quit (Ping timeout: 246 seconds) |
11:35:43 | * | kilon joined #nim |
11:39:03 | * | filcuc quit (Quit: Konversation terminated!) |
11:39:34 | * | filcuc joined #nim |
11:39:56 | * | kilon quit (Ping timeout: 246 seconds) |
11:40:11 | * | kilon joined #nim |
11:44:43 | * | kilon quit (Ping timeout: 250 seconds) |
11:45:25 | Jehan_ | ekarlso: Missing discard/use of the result of `readBuffer`? |
11:56:30 | * | arnetheduck joined #nim |
11:58:29 | * | yglukhov quit (Remote host closed the connection) |
12:01:13 | ekarlso | hmm, how can I unpack a array[0..512] into a object ? |
12:01:19 | ekarlso | if there's an easy way... |
12:02:55 | * | filcuc quit (Quit: Konversation terminated!) |
12:05:39 | * | NimBot joined #nim |
12:05:42 | ekarlso | so quiet :P |
12:09:33 | * | yglukhov joined #nim |
12:16:50 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:20:32 | reactormonk | When booting, I get nim/nimcache/unix_amd64.o: No such file or directory |
12:20:47 | reactormonk | I get that pretty much when compiling anything. |
12:21:09 | ekarlso | reactormonk: u got a lcue on array slices ? : p |
12:21:25 | reactormonk | ekarlso, not until I get my compiler working again |
12:21:32 | * | thotypous joined #nim |
12:21:51 | ekarlso | reactormonk: :( |
12:23:02 | * | Ven joined #nim |
12:26:31 | ekarlso | https://glot.io/snippets/e6m74omeft < reactormonk |
12:27:29 | ekarlso | main.nim(7, 15) Error: type mismatch: got (seq[char]) but expected 'array[0..2, char]' |
12:39:04 | * | drewsrem quit (Quit: Leaving) |
12:48:12 | baabelfish | Any timeframe on the next release? I'm itching already |
12:51:07 | ekarlso | baabelfish: u know you how you can populate a array[0..10, char] from a existing array using a slice ? |
12:52:23 | baabelfish | for loop :P |
12:52:45 | ekarlso | :/ |
12:53:08 | ekarlso | http://pastebin.com/rVih4p03 < I got that atm |
12:53:22 | ekarlso | but header.name is hard to unpack from the buffer :/, any help appreciated! |
12:53:31 | baabelfish | I don't know if there is a "not so ugly" memcpy way to do that |
12:54:02 | ekarlso | someone probably has a clue about it ;) |
12:54:25 | * | NimBot joined #nim |
12:54:27 | baabelfish | ekarlso: try casting? |
12:54:54 | ekarlso | i'll wait for Araq or one of the gurus :p |
12:55:09 | baabelfish | ekarlso: heh, that's the best option |
12:57:54 | * | yglukhov quit (Remote host closed the connection) |
13:01:07 | ekarlso | i'm guessing you are hiding dom96 ? |
13:01:49 | Jehan_ | reactormonk: Yeah, I already filed an issue. It's the coroutine patch. |
13:02:07 | Jehan_ | reactormonk: Roll back to the commit before that merge. |
13:02:43 | ekarlso | Jehan_: u got a clue on my q ? |
13:02:54 | Jehan_ | ekarlso: Just reading through the log. |
13:03:34 | Araq | r-ku: I told you to make coroutines optional ... :P |
13:04:09 | OnO | heh.. hi, I was to complain about coroutine too :) |
13:04:22 | OnO | I wish we have not introduce another dependency on fasm |
13:04:29 | OnO | that has no OSX support |
13:04:39 | * | yglukhov joined #nim |
13:04:39 | Jehan_ | ekarlso: use a[0..1] = s[a..a+1], for example. |
13:05:03 | baabelfish | Jehan_: that works that easily? :O |
13:05:19 | Jehan_ | Oops, s[n..n+1] |
13:05:34 | ekarlso | n..n ? |
13:05:37 | ekarlso | like 0..1 ? |
13:05:51 | Jehan_ | ekarlso: Basically, you need slices on the left and the right hand side. |
13:06:49 | ekarlso | Jehan_: not following.. |
13:07:22 | ekarlso | not possible to set a array[0..100] from a existing array ? |
13:07:41 | Jehan_ | ekarlso: https://gist.github.com/rbehrends/af3f48bd0591ad7ae105 |
13:08:26 | ekarlso | reason for the n Jehan_ ? |
13:08:49 | Jehan_ | ekarlso: It's an example? I don't know the context, just that you want to assign array contents. |
13:09:25 | ekarlso | result.name = buffer[0..99] < I do that but then it tells me that buffer[..] is a slice ? |
13:09:46 | Jehan_ | ekarlso: What type is result.name? |
13:10:08 | ekarlso | array[0..99] |
13:10:33 | Jehan_ | Try: result.name[0..99] = buffer[0..99] |
13:11:00 | ekarlso | aha! |
13:11:50 | * | yglukhov quit (Remote host closed the connection) |
13:13:56 | Jehan_ | OnO: Yeah, I'm only now seeing this. This does not look like a good idea to me. |
13:14:11 | NimBot | nim-lang/Nim devel 999c107 Araq [+0 ±2 -0]: fixes #3245 |
13:15:09 | Araq | Jehan_: the Nim compiler treats .asm on its own, it doesn't pass it to gcc |
13:15:25 | Jehan_ | Araq: Well, on my machine, it does. |
13:15:34 | Araq | it only does that until bootstrapping is complete |
13:15:50 | * | FedeOmoto joined #nim |
13:16:49 | * | NimBot joined #nim |
13:18:05 | OnO | Araq: I wonder if we can stick to builtin C compiler asm facilities than using fasm, there's no much code there in .asm files |
13:18:06 | Jehan_ | Araq: I see. I'm still not sure if the fasm approach is a good idea. |
13:18:16 | OnO | only problem is that asm isn't portable between MSVC and GCC |
13:19:12 | Jehan_ | OnO: Not familiar with msvc, but it might be possible to generate C code from the assembly language? |
13:19:24 | Araq | well it's not portable to MSVC and also we need to ensure it doesn't produce stack frames |
13:19:36 | Jehan_ | I mean, technically it might even be possible to write an assembly language DSL in Nim. |
13:19:46 | OnO | pass -fomit-frame-pointer to that particular file |
13:21:21 | Araq | OnO: that's not the same, __declspec(naked) is what's called iirc |
13:21:58 | ekarlso | so a array[0..99, char] < 100 elements of char no ? |
13:22:09 | ekarlso | vs array[0..100] is 101 ? |
13:22:13 | * | ekarlso is wacked |
13:22:25 | OnO | Araq: yeah, that's for MSVC, and -fomit-frame-pointer for GCC/Clang, unfortunatelly there's no way to omit frame pointer for single function in GCC |
13:22:46 | Jehan_ | ekarlso: Well, it's one more element than array[1..99, char], which has exactly 99 elements. |
13:23:00 | Jehan_ | OnO: __attribute__((naked))? |
13:23:13 | ekarlso | Jehan_: isnt that correct way to write it array[0,99] to get 100 ? |
13:23:14 | Araq | it's not just the frame pointer, you also must not generate any kind of function prologue/epilogue |
13:24:06 | Araq | ekarlso: just write array[100, char] if the a..b notation confuses you |
13:24:19 | Araq | that's an array with 100 chars |
13:24:45 | Jehan_ | Araq: I thought that __attribute__((naked)) pretty much does that? I'd have to check to be certain, though. |
13:25:37 | Araq | __atribute__((naked)) doesn't work on ARM last time I checked |
13:25:43 | OnO | Araq: on x86/64 it won't for argument less function it will just need to copy rsp rbp |
13:25:59 | OnO | also I can't see naked on x86 gcc docs |
13:27:07 | OnO | it works for clang, just tested |
13:27:12 | Jehan_ | Hmm, naked may be clang only. |
13:27:18 | ekarlso | Araq: is there a easy way to unpack a buffer of array[0..512, char] to a object that has array[.., char] fieldS? |
13:27:25 | OnO | not working for GCC 4.9 |
13:27:40 | * | keks_ joined #nim |
13:28:09 | * | NimBot joined #nim |
13:28:32 | Araq | hi keks_ welcome |
13:28:44 | Jehan_ | I'm just looking at what ocaml does for it's assembly language parts. |
13:28:52 | OnO | heh... according to docs "naked" is ARM only feature on GCC |
13:29:03 | Araq | hrm ... we have no ARM version of this thing yet :-/ |
13:29:31 | keks_ | moin |
13:29:39 | OnO | we may though compile .s files with gcc/clang directly instead using fasm |
13:30:17 | Jehan_ | OnO: Yeah, but would have to be gcc/clang syntax instead. |
13:30:32 | Jehan_ | But that's what I was thinking about when I said writing a DSL in Nim (perhaps). |
13:30:34 | OnO | att in fact |
13:31:06 | Jehan_ | Everybody inventing their own assembly language syntax has always been one of the more annoying parts. |
13:31:45 | OnO | oh well, there's just intel and AT&T for x86 |
13:31:57 | OnO | unix compilers use att, microsoft intel syntax |
13:32:16 | OnO | but in recent gcc, clang I think you can switch to intel syntax with some pragma |
13:32:26 | * | yglukhov joined #nim |
13:32:37 | Araq | yeah, but it never worked for me |
13:33:36 | Araq | also I prefer an external assembler over gcc's absurd register clobber lists |
13:34:27 | Araq | :"=a"(`result`) |
13:34:29 | Araq | :"a"(`a`), "c"(`b`) |
13:34:55 | Araq | yeah, right, I'm sure I got that right ... |
13:35:22 | Araq | there is a reason why it's disabled in system/arithm.nim ;-) |
13:36:10 | OnO | Araq: that's why you can use .asm files but compile them with gcc/clang directly |
13:36:24 | OnO | with .intel_syntax at the very beginning |
13:36:30 | * | yglukhov quit (Ping timeout: 240 seconds) |
13:36:57 | Jehan_ | Hmm, Ocaml uses clang/gcc syntax and has a separate implementation for MS Windows, anyway. |
13:37:02 | OnO | when using msvc you can use masm |
13:37:41 | Araq | we like to have 1 assembler implementation though |
13:37:48 | * | Ven quit (Remote host closed the connection) |
13:37:54 | Araq | (per CPU architecture) |
13:42:10 | ekarlso | uhm, but wont 0..7 < mean 8 elements ? |
13:42:51 | Araq | ekarlso: the length of an inclusive range a..b is b-a+1 |
13:43:14 | Araq | let's look at an example: 0..7 that means a=0, b=7 |
13:43:35 | Araq | according to Araq's formula the length computes to: 7-0+1 = 8. |
13:48:02 | Araq | Jehan_: a DSL sounds like a good idea though |
13:48:34 | Jehan_ | Araq: Yeah, just a ton of work for something that's so short (so far). |
13:49:14 | Araq | well but the idea is also to allow Nim users to have only 1 implementation of an 'asm' block per architecture |
13:49:53 | Araq | currently we have no solution for this at all and pass the problem to our users |
13:51:01 | Araq | I wonder why r-ku picked fasm over yasm. yasm also works on Mac |
13:53:11 | * | Demos__ quit (Read error: Connection reset by peer) |
13:53:45 | * | NimBot joined #nim |
13:56:03 | * | NimBot joined #nim |
14:02:43 | * | Jehan_ quit (Quit: Leaving) |
14:04:48 | OnO | Araq: correct me if I am wrong but on Windows Nim require GCC to compile, since GCC compiler .s files just fine, then why do we need any compiler? |
14:05:21 | OnO | s/compiler/external assembler |
14:08:40 | * | vl409 joined #nim |
14:14:04 | * | yglukhov joined #nim |
14:15:19 | * | Ven joined #nim |
14:15:31 | * | pregressive joined #nim |
14:15:45 | * | pregressive quit (Remote host closed the connection) |
14:16:52 | * | pregressive joined #nim |
14:18:10 | * | vl409 quit (Ping timeout: 240 seconds) |
14:18:23 | * | yglukhov quit (Ping timeout: 256 seconds) |
14:18:56 | Araq | OnO: you can also bootstrap with Visual Studio |
14:19:20 | Araq | and even if booting doesn't work, tons of other stuff works with VS |
14:19:48 | Araq | including our own product |
14:19:52 | * | irrequietus joined #nim |
14:24:13 | * | yglukhov joined #nim |
14:25:10 | * | irrequietus quit (Ping timeout: 240 seconds) |
14:25:18 | * | irrequietus joined #nim |
14:27:21 | * | jszymanski quit (Quit: computer sleeps...) |
14:27:26 | * | yglukhov quit (Remote host closed the connection) |
14:30:59 | * | jaco60 joined #nim |
14:31:00 | reactormonk | Jehan_, ok, solved. |
14:32:44 | * | vl409 joined #nim |
14:33:17 | reactormonk | how exactly do you build the coroutines part? |
14:33:50 | Araq | -d:nimCoroutines |
14:35:56 | reactormonk | Araq, yes, but gcc: error: lib/pure/nimcache/unix_amd64.o: No such file or directory |
14:36:08 | reactormonk | I have fasm installed. |
14:36:10 | * | bendiken joined #nim |
14:37:41 | Araq | you need to bootstrap before that can work |
14:38:37 | * | filcuc joined #nim |
14:41:19 | reactormonk | I did. |
14:43:19 | * | dalarmmst joined #nim |
14:46:44 | Araq | reactormonk: I will look at this myself soon, not sure what's wrong |
14:47:58 | * | yglukhov joined #nim |
14:49:20 | reactormonk | Araq, I submitted my comments in form of a PR. |
14:49:34 | ekarlso | Araq: ah ok :) |
14:52:43 | * | yglukhov quit (Ping timeout: 265 seconds) |
15:02:57 | * | NimBot joined #nim |
15:04:59 | flyx | I am a bit confused about lexbase. why does BaseLexer have a field bufpos if almost all procs take the position as parameter? |
15:05:42 | flyx | and why does getCurrentLine not take the position as parameter while the other procs do? |
15:17:00 | * | NimBot joined #nim |
15:18:30 | * | arnetheduck quit (Ping timeout: 240 seconds) |
15:20:30 | * | yglukhov joined #nim |
15:25:59 | OnO | r-ku: created PR https://github.com/nim-lang/Nim/pull/3248 making Nim use builtin GCC/Clang assembler instead extra fasm |
15:26:41 | * | yglukhov quit (Remote host closed the connection) |
15:27:05 | * | yglukhov joined #nim |
15:32:12 | * | yglukhov quit (Remote host closed the connection) |
15:33:39 | * | filcuc quit (Quit: Konversation terminated!) |
15:33:47 | * | yglukhov joined #nim |
15:36:16 | * | Ven quit (Remote host closed the connection) |
15:37:26 | * | rollo quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
15:41:14 | * | dalarmmst quit (Ping timeout: 246 seconds) |
15:42:46 | Araq | flyx: speed |
15:43:07 | Araq | I made it trivial for the compiler to keep the important stuff in registers |
15:43:27 | flyx | ah, okay. |
15:44:54 | * | rollo joined #nim |
15:59:03 | ekarlso | hmm |
15:59:33 | ekarlso | so I have a archive.size array[0..11, char] but how do I make that into a int? |
16:07:07 | Araq | ekarlso: you can use streams iirc or 'cast' |
16:07:30 | Araq | let asInt = cast[ptr int](addr yourArray)[] |
16:13:04 | * | zeph joined #nim |
16:15:28 | * | rollo quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:18:16 | ekarlso | Araq: streams ? |
16:22:10 | * | NimBot joined #nim |
16:28:18 | * | vasher_ joined #nim |
16:30:16 | * | rektide joined #nim |
16:30:26 | * | rektide is now known as rektide2 |
16:31:41 | * | rollo joined #nim |
16:32:12 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:32:49 | * | Ven joined #nim |
16:34:45 | * | yglukhov_ joined #nim |
16:36:21 | * | Ven quit (Read error: Connection reset by peer) |
16:37:46 | * | ingsoc joined #nim |
16:38:36 | * | NimBot joined #nim |
16:38:58 | * | yglukhov_ quit (Ping timeout: 246 seconds) |
16:39:20 | ekarlso | dom96: you around ? |
16:40:24 | * | strcmp1 joined #nim |
16:42:22 | * | NimBot joined #nim |
16:45:00 | * | NimBot joined #nim |
16:45:27 | * | keks_ quit (Ping timeout: 246 seconds) |
16:49:20 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:50:14 | flyx | hmm, it's unfortunate that EndOfFile in lexbase is '\0'. could it be changed to '\x04' (end-of-transmission) instead? |
16:57:01 | Araq | what's the difference? |
16:57:15 | Araq | your input contains \0 but not \4 ? |
16:57:24 | Araq | when is that true? |
16:57:55 | * | strcmp1 quit (Ping timeout: 245 seconds) |
17:02:02 | * | strcmp1 joined #nim |
17:03:18 | * | rollo quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
17:03:26 | * | rollo joined #nim |
17:06:39 | * | pregressive quit (Remote host closed the connection) |
17:08:40 | * | Ven joined #nim |
17:09:55 | ekarlso | Araq: is it recommended to use a stream instead of my current approach ? |
17:10:05 | * | pregressive joined #nim |
17:12:07 | * | shodan45 joined #nim |
17:13:09 | Araq | ekarlso: I'd use 'cast' |
17:13:34 | * | yglukhov joined #nim |
17:13:40 | ekarlso | Araq: seems like a "evil" route :P |
17:14:21 | * | NimBot joined #nim |
17:15:25 | * | NimBot joined #nim |
17:18:32 | * | NimBot joined #nim |
17:21:03 | dom96 | ekarlso: Do you want my email, you seem to need to contact me a lot :P |
17:24:07 | ekarlso | dom96: haha :p |
17:27:49 | ekarlso | dom96: u wanna give a initial review ? |
17:28:22 | dom96 | ekarlso: seriously though, if you need me I am way more available over email (same goes for everyone else): dom [at] picheta.me |
17:28:57 | ekarlso | ah ok |
17:30:36 | * | Ven quit (Remote host closed the connection) |
17:31:19 | flyx | Araq: UTF16 |
17:32:07 | * | filcuc joined #nim |
17:37:09 | * | filcuc quit (Remote host closed the connection) |
17:38:19 | * | X67r joined #nim |
17:40:37 | * | pregressive quit (Remote host closed the connection) |
17:42:04 | * | jszymanski joined #nim |
17:44:59 | * | pregressive joined #nim |
17:45:05 | * | yglukhov quit (Remote host closed the connection) |
17:45:46 | * | ingsoc quit (Quit: Leaving.) |
17:45:47 | dom96 | ekarlso: oh and to answer your question |
17:45:48 | dom96 | sure |
17:45:51 | dom96 | I can review it |
17:46:00 | dom96 | what is 'it' though? |
17:46:24 | ekarlso | dom96: tar thing u wanted |
17:46:27 | ekarlso | reads tar files atm |
17:46:38 | * | rollo left #nim (#nim) |
17:47:34 | * | NimBot joined #nim |
17:48:12 | dom96 | ekarlso: cool. Was it difficult? |
17:48:22 | dom96 | also, show me the code |
17:48:24 | ekarlso | dom96: difficult "enough" concidering i |
17:48:31 | ekarlso | i've never done low level stuff like it ;) |
17:52:16 | dom96 | show me the code! |
17:53:28 | * | NimBot joined #nim |
17:53:32 | ekarlso | that you dont know the size off.. |
17:54:42 | ekarlso | dom96: ? ^ |
17:55:32 | dom96 | string? |
17:55:48 | * | jaco60 quit (Remote host closed the connection) |
17:56:29 | ekarlso | seq[char] I guess |
17:56:46 | dom96 | no, string :P |
17:56:51 | * | shodan45 quit (Remote host closed the connection) |
17:57:00 | * | shodan45 joined #nim |
17:57:18 | ekarlso | why string dom96 ?^ |
17:58:33 | baabelfish | It would be more consistent if import statement wouldn't need commas when broken down to multiple lines... |
17:59:18 | dom96 | baabelfish: perhaps, but how important is that really? |
17:59:38 | dom96 | ekarlso: easier to manipulate |
17:59:45 | baabelfish | dom96: yeah, it's not important indeed |
17:59:57 | dom96 | baabelfish: submit a bug report though |
18:01:10 | baabelfish | seems like the language is too well designed if one thinks about things like that |
18:02:37 | ekarlso | dom96: then uhm, how to get a array to string ? :/& |
18:03:11 | dom96 | why do you need that? |
18:03:26 | ekarlso | cause the buffer dom96 is an array ? |
18:03:38 | dom96 | a string is already technically an array |
18:03:43 | ekarlso | http://paste.ubuntu.com/12194077/ |
18:03:58 | federico3 | nimble install nimble@#head is now failing due to lib/nim/impure/rdstdin.nim(103, 10) Error: cannot open 'readline' |
18:04:28 | * | jaco60 joined #nim |
18:04:40 | dom96 | yay, regressions |
18:05:29 | dom96 | I guess Araq removed it? |
18:06:15 | ekarlso | meh |
18:06:23 | ekarlso | why doesnt rust support var as int |
18:06:26 | ekarlso | :P |
18:09:17 | dom96 | ekarlso: just use whatever works |
18:09:18 | dom96 | I need to go |
18:10:13 | * | yglukhov joined #nim |
18:17:39 | * | zeph quit (Ping timeout: 244 seconds) |
18:17:44 | baabelfish | dom96: thanks |
18:18:11 | baabelfish | I'm gonna throw the default values for objects thing there also... |
18:18:45 | * | zeph joined #nim |
18:36:11 | * | NimBot joined #nim |
18:37:11 | * | darkf quit (Quit: Leaving) |
18:39:48 | * | boopisaway is now known as boop |
18:41:02 | baabelfish | dom96: https://github.com/nim-lang/Nim/issues/3250 is this a stupid idea? |
18:42:52 | * | vasher_ quit (Quit: Connection closed for inactivity) |
18:50:02 | * | vendethiel joined #nim |
18:56:40 | * | NimBot joined #nim |
19:01:13 | * | yglukhov quit (Remote host closed the connection) |
19:01:55 | * | UberLambda joined #nim |
19:02:30 | * | enquora joined #nim |
19:02:33 | ekarlso | hmm, can a proc modify a passed in var ? |
19:02:42 | ekarlso | :P |
19:07:21 | baabelfish | ekarlso: proc iModify(x: var int) = x = 42 |
19:12:23 | ekarlso | so right |
19:12:37 | ekarlso | 00000000002 < into a cast[int][...] |
19:12:49 | ekarlso | becomes 140724161205132 |
19:12:56 | ekarlso | wtf is up with that ? |
19:16:17 | ekarlso | Araq: u got an idea ? |
19:16:28 | ekarlso | http://paste.ubuntu.com/12194579/ < is the code |
19:19:49 | * | NimBot joined #nim |
19:24:31 | * | enquora quit (Remote host closed the connection) |
19:25:35 | ekarlso | great, everyone asleep :p |
19:27:35 | * | yglukhov joined #nim |
19:28:13 | federico3 | ekarlso: I hope there could be a better way to pack/unpack bytes than the block at 43 |
19:28:17 | * | unclechu joined #nim |
19:28:23 | * | unclechu quit (Max SendQ exceeded) |
19:28:54 | * | unclechu joined #nim |
19:28:54 | ekarlso | federico3: meh, how ? |
19:29:12 | federico3 | something more declarative? |
19:29:16 | * | unclechu quit (Max SendQ exceeded) |
19:29:35 | FedeOmoto | ekarlso: you're doing it wrong |
19:29:40 | FedeOmoto | take a look at this: |
19:29:41 | FedeOmoto | [fomoto@terminus tmp]$ cat a.nim && nim c -r a > /dev/null |
19:29:41 | FedeOmoto | type |
19:29:41 | FedeOmoto | Header* = object |
19:29:41 | FedeOmoto | size*: array[sizeof(int), char] |
19:29:41 | FedeOmoto | var header: Header |
19:29:43 | FedeOmoto | var i = 123456 |
19:29:45 | FedeOmoto | copyMem(header.size[0].addr, i.addr, sizeof(int)) |
19:29:47 | * | unclechu joined #nim |
19:29:49 | FedeOmoto | var size = cast[ptr int](header.size[0].addr) |
19:29:51 | FedeOmoto | stderr.writeln("result: " , size[]) |
19:29:53 | FedeOmoto | result: 123456 |
19:30:03 | federico3 | |
19:30:05 | federico3 | e.g. https://construct.readthedocs.org/en/latest/basics.html |
19:30:18 | * | xcombelle quit (Quit: bonne nuit) |
19:30:57 | ekarlso | so, how to fix it then federico3 ? |
19:31:26 | federico3 | are you asking me or FedeOmoto? |
19:31:30 | ekarlso | federico3: -,,- |
19:31:43 | federico3 | huh? |
19:31:55 | ekarlso | FedeOmoto: |
19:31:57 | ekarlso | rather :p |
19:32:14 | ekarlso | FedeOmoto: am I unpacking it wrongly or |
19:33:55 | FedeOmoto | ekarlso: yes |
19:34:21 | FedeOmoto | why the size field is 12 bytes long? |
19:34:27 | ekarlso | FedeOmoto: .. |
19:34:50 | ekarlso | FedeOmoto: looking at others that's what they use ? |
19:34:56 | FedeOmoto | hmm nope |
19:35:04 | FedeOmoto | an int has the size of a pointer |
19:35:22 | ekarlso | https://github.com/mdippery/libtar/blob/master/libtar/libtar.h#L48 |
19:35:27 | FedeOmoto | how would you expect to unpack 12 bytes to an int? |
19:36:03 | FedeOmoto | looking at that, I assume it's a textual representation of the "size" |
19:36:35 | ekarlso | yeah? |
19:38:08 | FedeOmoto | don't know, never worked with tar at that level :P |
19:39:10 | FedeOmoto | but I don't see how you can read the size if it isn't represented in that way (textual) |
19:39:35 | ekarlso | Araq: you got a clue man ? |
19:39:38 | ekarlso | use streams ? |
19:40:07 | Araq | c2nim can handle struct tar_header |
19:40:18 | ekarlso | Araq: ... dom96 wanted it in nim :p |
19:40:36 | * | Demon_Fox joined #nim |
19:40:39 | Araq | let me just repeat what I said: *c2nim* can handle struct tar_header |
19:40:59 | ekarlso | yeah, gut wont that just generate c bindings ? |
19:41:44 | Araq | c2nim can also translate C to Nim so that you can throw away the C |
19:42:09 | Araq | it's more work though, you need to clean up the resulting Nim code much more |
19:42:32 | Araq | but it can tell you that char foo[12] is foo: array[12, char] |
19:42:58 | ekarlso | which is.. just the same I have atm.. |
19:42:59 | Araq | how that is then converted into a real size you need to look up in the C implementation |
19:43:23 | Araq | my guess it shifts bytes around into a integer so that it is endian agnostic |
19:43:57 | ekarlso | oct_to_int((t).th_buf.size) |
19:45:31 | ekarlso | is there any helper for that in nim ? |
19:46:00 | FedeOmoto | and this is the function declaration: |
19:46:01 | FedeOmoto | int oct_to_int(char *oct); |
19:46:39 | * | NimBot joined #nim |
19:46:39 | * | irrequietus_ joined #nim |
19:46:46 | Araq | #define th_get_size(t) oct_to_int((t)->th_buf.size) |
19:46:50 | * | irrequietus quit (Ping timeout: 260 seconds) |
19:47:21 | FedeOmoto | as I said, it seems to be an string representation |
19:47:31 | Araq | dunno if we have an octal number parser but it's easy enough |
19:47:37 | FedeOmoto | yeah |
19:48:14 | ekarlso | Araq: wanna make one quick ? :p |
19:49:19 | Araq | parseutils.parseOct |
19:49:56 | ekarlso | funny, stuck inbetween two worlds atm :/ |
19:50:11 | ekarlso | doing nim in one and python in another :p |
19:53:30 | * | gXen joined #nim |
19:55:12 | * | gXen left #nim (#nim) |
19:58:58 | * | UberLambda quit (Quit: GTG) |
20:00:44 | * | mrkishi joined #nim |
20:01:49 | * | mrkishi quit (Max SendQ exceeded) |
20:02:28 | * | mrkishi joined #nim |
20:09:44 | ekarlso | what does stack smashing mean ? :D |
20:13:51 | ekarlso | FedeOmoto: you know why offset get's set to 0 in nextFile on the 2nd iteration ? http://paste.ubuntu.com/12194897/ |
20:21:45 | NimBot | nim-lang/Nim devel 6da8c78 Peter Mora [+1 ±1 -0]: extending metatype matching in sigmatch.nim |
20:21:45 | NimBot | nim-lang/Nim devel 19f5870 Andreas Rumpf [+1 ±1 -0]: Merge pull request #3234 from petermora/mapAutoAuto... 2 more lines |
20:22:35 | NimBot | nim-lang/Nim devel dc6c055 xyz [+0 ±2 -0]: When reading files, check if the eof flag is set before throwing. |
20:22:35 | NimBot | nim-lang/Nim devel 385a883 xyz [+0 ±2 -0]: Use seLen as sugested, and fix typos |
20:22:35 | NimBot | nim-lang/Nim devel 88247e6 xyz [+0 ±1 -0]: Append the readAllBuffer to what was read already |
20:22:35 | NimBot | nim-lang/Nim devel 1def8ec xyz [+0 ±2 -0]: remove fileError |
20:22:35 | NimBot | 1 more commits. |
20:26:17 | * | NimBot joined #nim |
20:28:41 | * | ^aurora^ joined #nim |
20:32:03 | * | NimBot joined #nim |
20:33:18 | ekarlso | Araq: how come "size" in nim using parseOctet($header.size, intVar) becomes 11 whilst looking at the tar file in python using tarfile it's 2 ? :/ |
20:33:33 | * | yglukhov quit (Remote host closed the connection) |
20:33:54 | Araq | are you sure header is zero terminated? |
20:34:00 | Araq | *header.size |
20:34:21 | Araq | just inline the 3 lines that deal with octal to number conversion instead, it's easy |
20:34:55 | Araq | it's interesting how algorithms are much more stable than interfaces |
20:35:23 | ekarlso | 00000000002 |
20:36:15 | ekarlso | oh lol! |
20:38:40 | ekarlso | Araq: ok, so that still doesn't explain why offset is suddenly 0 inside nextFile() after the first file is retrieved.. |
20:40:30 | * | vl409 quit (Ping timeout: 240 seconds) |
20:42:25 | * | Matthias247 joined #nim |
20:42:27 | * | pregressive quit (Remote host closed the connection) |
20:42:57 | * | jszymanski quit (Quit: computer sleeps...) |
20:49:09 | * | NimBot joined #nim |
20:53:22 | ekarlso | Araq: how come that when I have var content = newSeq[char]() passed into readChars readChars says it's read 2 bytes but content.len is 0 ? |
20:53:29 | * | ekarlso doesn't get that |
20:55:23 | Araq | readChars doesn't update the len field as it takes an openArray |
20:55:42 | ekarlso | Araq: ah, so what's the appropriate thing ot use then ? |
20:55:56 | Araq | and thinking about it ... that's rather bad |
20:56:29 | Araq | cause setlen(content, newLength) should wipe out the stored bytes |
20:56:43 | ekarlso | because there's data there but content is empty :| |
20:57:18 | ekarlso | Araq: any ideas are welcome :p |
20:57:47 | Araq | don't use readChars, use readBuffer instead? |
20:58:13 | Araq | or pass a fixedsize array to it instead |
20:58:58 | ekarlso | which one is prefered ? |
21:05:13 | Araq | depends on what you later do with it |
21:05:29 | Araq | fixedsize array is faster unless you need to convert it to a string later anyway |
21:06:04 | ekarlso | Araq: yeah, but the funny thing is I dont know the size of the buffer |
21:06:23 | ekarlso | I mean the content size may vary depending on fizesize |
21:06:47 | Araq | readAll? |
21:07:26 | * | pregressive joined #nim |
21:07:42 | * | NimBot joined #nim |
21:07:48 | ekarlso | hardly ideal it seems for a file that's n+ gb |
21:08:26 | Araq | shouldn't the file header contain section sizes or something? |
21:08:54 | Araq | I mean it's "tar" so it likely predates any such modern ideas, but still |
21:08:55 | ekarlso | Araq: yeah, the header has the "size" of the current file |
21:09:11 | ekarlso | so header + size to get the filerange |
21:10:22 | ekarlso | howso Araq ? |
21:12:23 | Araq | I'm kidding |
21:12:36 | ekarlso | haha, i'm so failing at this ;) |
21:12:55 | Araq | btw what do you ultimately try to accomplish? |
21:13:10 | ekarlso | Araq: provide a iterator for files inside a tarfil |
21:13:44 | ekarlso | tar = newTar(file); for f in tar.iterFiles(): print f.getSize() |
21:13:46 | ekarlso | or similar |
21:13:52 | ekarlso | that was part of what dom96 wanted ;) |
21:13:55 | ekarlso | + write |
21:14:03 | Araq | but we need tarfile generation, not reading |
21:14:22 | ekarlso | Araq: why not have both? |
21:14:40 | Araq | actually we need tar.xz I think |
21:14:51 | ekarlso | well, he said to skip .gz for now :p |
21:14:58 | ekarlso | xz .. hmf |
21:15:26 | ekarlso | Araq: so should I just scrap this? .. |
21:15:37 | dom96 | No. |
21:15:41 | dom96 | We need both reading and writing |
21:15:46 | Araq | no no no, listen to dom96 |
21:15:55 | dom96 | And we don't need compression |
21:15:56 | dom96 | for now |
21:16:20 | dom96 | compression can be easily added on later anyway |
21:16:30 | ekarlso | dom96: how the crap then to read the contents ? |
21:16:48 | ekarlso | readChars() doesn't seem to be doing it |
21:18:58 | * | NimBot joined #nim |
21:20:38 | ekarlso | oh well, seeya tomorrow bed time |
21:20:58 | * | mrkishi quit () |
21:22:12 | Araq | bed time? it's not even midnight |
21:22:22 | ekarlso | Araq: getting up at 0500.. |
21:22:24 | ekarlso | so nightY! |
21:22:33 | ekarlso | dom96: leave me an answer if you want to :p |
21:22:34 | Araq | ugh that sucks |
21:22:47 | Araq | how come you need to get up that early? |
21:23:04 | Araq | still in the Army? |
21:26:20 | federico3 | wtf?! lib/nim/system.nim(2068, 17) Error: undeclared identifier: 'data' |
21:31:59 | * | NimBot joined #nim |
21:34:18 | Araq | federico3: more context required |
21:34:26 | * | Trustable quit (Quit: Leaving) |
21:36:32 | federico3 | I wish I had it, it happend from a completely unrelated piece of code |
21:37:19 | Araq | do you use system.each? |
21:37:47 | federico3 | https://paste.debian.net/304918/ |
21:40:04 | Araq | I don't have POP3Client |
21:41:20 | federico3 | I'm not sure how the error is related to any code. "data" does not even appear as a variable name in the whole file |
21:41:50 | federico3 | it seems to be triggered by using the Table as a return value. If I return "resp" it compiles. |
21:42:20 | * | CryptoToad joined #nim |
21:43:24 | Araq | federico3: this makes no sense |
21:44:09 | federico3 | indeed |
21:49:42 | Araq | well you need to give me something I can compile |
21:50:11 | federico3 | in 1 minute |
21:50:16 | * | brson joined #nim |
21:50:48 | Araq | I'm at the Ballmer's Peak now, so hurry up |
21:54:34 | federico3 | https://github.com/FedericoCeratto/nim-pop3/blob/master/pop3.nim |
21:55:47 | Araq | too late, watching Honest Trailers now ... nah, just kidding |
21:56:03 | federico3 | if I replace the last proc with https://paste.debian.net/304918/ |
21:57:04 | federico3 | aha! |
21:57:41 | federico3 | if I discard the output of capa() in my test code it compiles. If I do "echo c.capa()" it triggers that error. |
21:58:17 | Araq | works for me |
21:58:31 | federico3 | O_O wtf? |
21:58:53 | Araq | well I don't have your test code |
21:59:10 | Araq | but I replaced capa by your other implementation and compiled pop3.nim |
21:59:16 | Araq | with -d:ssl |
21:59:30 | Araq | without it there some other compiler error but the compiler is right |
22:01:33 | federico3 | the test code is trivial, let c = newPOP3Client(host="pop.gmail.com"); <authentication> ; echo c.capa() |
22:01:53 | federico3 | interestingly, if I inline the test code in pop3.nim it works |
22:02:54 | ekarlso | fucking thunder crap.. whole house is shaking atm :/ |
22:03:04 | ekarlso | can't sleep with thor outside! |
22:03:30 | * | NimBot joined #nim |
22:03:40 | federico3 | Araq: https://paste.debian.net/304921/ |
22:03:59 | ekarlso | Araq: what would u suggest to mitigate the buffer thing ? |
22:06:16 | Araq | federico3: the error is perfectly clear :P |
22:06:23 | Araq | temp15.nim(8, 8) template/generic instantiation from here |
22:06:24 | Araq | lib\system.nim(2201, 19) Error: undeclared field: 'data' |
22:06:39 | Araq | you don't import tables.nim |
22:06:47 | Araq | so the $ for tables is not available |
22:06:57 | Araq | which is what 'echo' tries to use |
22:07:09 | Araq | and so it tries to use the generic $ from system.nim |
22:07:18 | Araq | which accesses *every* field in the table |
22:07:33 | Araq | however the data field is not public and so this fails |
22:08:00 | Araq | if it were public you'd get a fucked up $ for Tables instead ;-) |
22:09:17 | FedeOmoto | ekarlso: what are you trying to do? |
22:09:31 | Araq | ekarlso: use readBuffer with the size that tar tells you to use |
22:09:33 | FedeOmoto | may be I can help you, I've time now |
22:11:10 | ekarlso | FedeOmoto: read fileStart = file.header end + 1 with the len of header.header.size() |
22:11:31 | * | mrkishi joined #nim |
22:12:16 | ekarlso | Araq: but u cant tell readBuffer where to read from ? |
22:12:46 | FedeOmoto | ekarlso: yes, you can |
22:12:58 | * | pregressive quit (Ping timeout: 272 seconds) |
22:13:14 | ekarlso | proc readBuffer(f: File; buffer: pointer; len: Natural): int {. < really wher e? |
22:13:28 | FedeOmoto | buffer :P |
22:14:15 | ekarlso | rly, so what, buffer = array[512..foo] then ? .. |
22:14:16 | FedeOmoto | you write in buffer |
22:14:51 | ekarlso | FedeOmoto: I thought it would be read(buffer, x, y) kinda ? |
22:15:33 | FedeOmoto | you're reading from a file, position the file pointer from where you want to start reading |
22:15:54 | ekarlso | FedeOmoto: how ? :/ |
22:16:04 | FedeOmoto | setFilePos |
22:16:19 | ekarlso | omg -,,- |
22:20:00 | * | silven quit (Ping timeout: 245 seconds) |
22:26:25 | * | mrkishi quit () |
22:30:07 | * | kilon joined #nim |
22:31:19 | * | unclechu quit (Quit: Leaving.) |
22:31:20 | * | Jehan_ joined #nim |
22:32:48 | * | xificurC quit (Ping timeout: 255 seconds) |
22:37:41 | * | kilon quit (Remote host closed the connection) |
22:40:06 | * | irrequietus_ quit () |
22:41:59 | * | kilon joined #nim |
22:42:30 | dom96 | federico3: Please report that error as a bug, I think it's worth looking into improving it if possible. |
22:44:43 | * | vendethiel quit (Ping timeout: 246 seconds) |
22:45:07 | * | mrkishi joined #nim |
22:45:22 | * | yglukhov joined #nim |
22:50:11 | * | silven joined #nim |
22:50:20 | * | yglukhov quit (Ping timeout: 272 seconds) |
22:56:03 | * | shevy joined #nim |
22:56:25 | * | mrkishi quit () |
23:03:09 | * | mrkishi joined #nim |
23:03:42 | * | shodan45 quit (Quit: Konversation terminated!) |
23:05:07 | * | xcombelle joined #nim |
23:05:13 | * | brson quit (Quit: leaving) |
23:08:09 | * | NimBot joined #nim |
23:17:04 | * | mrkishi quit () |
23:18:30 | * | BitPuffin|osx quit (Ping timeout: 240 seconds) |
23:27:51 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
23:30:14 | * | silven quit (Read error: Connection reset by peer) |
23:31:45 | * | silven joined #nim |
23:32:39 | * | kilon quit (Remote host closed the connection) |
23:32:53 | * | jaco60 quit (Ping timeout: 246 seconds) |
23:33:19 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:35:00 | * | vasher_ joined #nim |
23:38:04 | * | X67r quit (Quit: leaving) |